mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
1. implement stack limit in Function::call
2. implement stack limit in escprima 3. replace RELEASE_ASSERT_NOT_REACHED() with throwing parse error in esprima 4. impement size limit of String 5. expose config parameters in Escargot.h Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
This commit is contained in:
parent
83c0fd9297
commit
f44a2a00a2
27 changed files with 180 additions and 73 deletions
|
|
@ -43,7 +43,7 @@ Value Script::execute(ExecutionState& state, bool isEvalMode, bool needNewEnv, b
|
|||
ExecutionContext ec(state.context(), prevEc, env, m_topCodeBlock->isStrict());
|
||||
Value resultValue;
|
||||
Value thisValue(state.context()->globalObject());
|
||||
ExecutionState newState(state.context(), &ec, &resultValue);
|
||||
ExecutionState newState(&state, &ec, &resultValue);
|
||||
|
||||
Value* registerFile = (Value*)alloca((m_topCodeBlock->byteCodeBlock()->m_requiredRegisterFileSizeInValueSize + 1) * sizeof(Value));
|
||||
Value* stackStorage = registerFile + m_topCodeBlock->byteCodeBlock()->m_requiredRegisterFileSizeInValueSize;
|
||||
|
|
@ -108,7 +108,7 @@ Value Script::executeLocal(ExecutionState& state, Value thisValue, bool isEvalMo
|
|||
|
||||
ExecutionContext ec(state.context(), state.executionContext(), newEnvironment, m_topCodeBlock->isStrict());
|
||||
Value resultValue;
|
||||
ExecutionState newState(state.context(), &ec, &resultValue);
|
||||
ExecutionState newState(&state, &ec, &resultValue);
|
||||
|
||||
size_t stackStorageSize = m_topCodeBlock->identifierOnStackCount();
|
||||
Value* registerFile = ALLOCA((m_topCodeBlock->byteCodeBlock()->m_requiredRegisterFileSizeInValueSize + stackStorageSize) * sizeof(Value), Value, state);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue