mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
remove StackStorage from ExecutionContext, add RareData to ExecutionContext
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
This commit is contained in:
parent
9166303dcc
commit
6e5fb90eec
7 changed files with 17 additions and 28 deletions
|
|
@ -32,7 +32,7 @@ Value Script::execute(Context* ctx)
|
|||
Value resultValue;
|
||||
ExecutionState state(ctx, &ec, &resultValue);
|
||||
|
||||
ByteCodeInterpreter::interpret(state, m_topCodeBlock, 0);
|
||||
ByteCodeInterpreter::interpret(state, m_topCodeBlock, 0, nullptr);
|
||||
|
||||
return resultValue;
|
||||
}
|
||||
|
|
@ -83,13 +83,12 @@ Value Script::executeLocal(ExecutionState& state)
|
|||
ExecutionState newState(state.context(), &ec, &resultValue);
|
||||
|
||||
size_t stackStorageSize = m_topCodeBlock->identifierOnStackCount();
|
||||
ec.giveStackStorage(ALLOCA(stackStorageSize * sizeof(Value), Value, state));
|
||||
Value* stackStorage = ec.stackStorage();
|
||||
Value* stackStorage = ALLOCA(stackStorageSize * sizeof(Value), Value, state);
|
||||
for (size_t i = 0; i < stackStorageSize; i++) {
|
||||
stackStorage[i] = Value();
|
||||
}
|
||||
|
||||
ByteCodeInterpreter::interpret(newState, m_topCodeBlock, 0);
|
||||
ByteCodeInterpreter::interpret(newState, m_topCodeBlock, 0, stackStorage);
|
||||
|
||||
return resultValue;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue