mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
1. reduce byteCode Register size
2. remove ast implicitly when use less avoiding memory leak 3. change ByteCodeBlockData gc type into atomic 4. add literal info into ByteCodeBlock 5. force enable eager sweep 6. divide GC_mark_and_push_custom into GC_mark_and_push_custom_iterable and GC_mark_and_push_custom Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
This commit is contained in:
parent
520a56ffdb
commit
fd9fc94072
109 changed files with 958 additions and 163 deletions
|
|
@ -20,6 +20,7 @@ Value Script::execute(ExecutionState& state, bool isEvalMode, bool needNewEnv, b
|
|||
ByteCodeGenerator g;
|
||||
g.generateByteCode(state.context(), m_topCodeBlock, programNode, isEvalMode, isOnGlobal);
|
||||
|
||||
delete m_topCodeBlock->m_cachedASTNode;
|
||||
m_topCodeBlock->m_cachedASTNode = nullptr;
|
||||
|
||||
LexicalEnvironment* env;
|
||||
|
|
@ -43,7 +44,7 @@ Value Script::execute(ExecutionState& state, bool isEvalMode, bool needNewEnv, b
|
|||
ExecutionState newState(state.context(), &ec, &resultValue);
|
||||
|
||||
Value* registerFile = (Value*)alloca(m_topCodeBlock->byteCodeBlock()->m_requiredRegisterFileSizeInValueSize * sizeof(Value));
|
||||
ByteCodeInterpreter::interpret(newState, m_topCodeBlock, 0, registerFile, nullptr);
|
||||
ByteCodeInterpreter::interpret(newState, m_topCodeBlock, m_topCodeBlock->byteCodeBlock(), 0, registerFile, nullptr);
|
||||
|
||||
return resultValue;
|
||||
}
|
||||
|
|
@ -81,6 +82,7 @@ Value Script::executeLocal(ExecutionState& state, bool isEvalMode, bool needNewR
|
|||
ByteCodeGenerator g;
|
||||
g.generateByteCode(state.context(), m_topCodeBlock, programNode, isEvalMode);
|
||||
|
||||
delete m_topCodeBlock->m_cachedASTNode;
|
||||
m_topCodeBlock->m_cachedASTNode = nullptr;
|
||||
|
||||
EnvironmentRecord* record;
|
||||
|
|
@ -110,7 +112,7 @@ Value Script::executeLocal(ExecutionState& state, bool isEvalMode, bool needNewR
|
|||
}
|
||||
|
||||
Value* registerFile = (Value*)alloca(m_topCodeBlock->byteCodeBlock()->m_requiredRegisterFileSizeInValueSize * sizeof(Value));
|
||||
ByteCodeInterpreter::interpret(newState, m_topCodeBlock, 0, registerFile, stackStorage);
|
||||
ByteCodeInterpreter::interpret(newState, m_topCodeBlock, m_topCodeBlock->byteCodeBlock(), 0, registerFile, stackStorage);
|
||||
|
||||
return resultValue;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue