Revise Jump bytecode and JumpFlowRecord for CodeCache

* remove JumpByteCode and add JumpFlowRecord which has no pointer value
* simplify JumpFlowRecord data caching
* fix coverity issue
* add log message for code cache

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
This commit is contained in:
HyukWoo Park 2021-03-16 14:45:46 +09:00 committed by Patrick Kim
commit 8f4b125b22
12 changed files with 82 additions and 90 deletions

View file

@ -268,9 +268,9 @@ ScriptParser::InitializeScriptResult ScriptParser::initializeScript(String* sour
ASSERT(!!topCodeBlock && !!topByteBlock);
script->m_topCodeBlock = topCodeBlock;
topCodeBlock->m_byteCodeBlock = topByteBlock;
#ifndef NDEBUG
ESCARGOT_LOG_INFO("CODECACHE: Load CodeCache Done (%s)\n", srcName->toUTF8StringData().data());
#endif
ScriptParser::InitializeScriptResult result;
result.script = script;
return result;
@ -339,9 +339,8 @@ ScriptParser::InitializeScriptResult ScriptParser::initializeScript(String* sour
topCodeBlock->m_byteCodeBlock = ByteCodeGenerator::generateByteCode(m_context, topCodeBlock, programNode, inWith, true);
codeCache->postCacheWriting(srcHash);
#ifndef NDEBUG
ESCARGOT_LOG_INFO("CODECACHE: Store CodeCache Done (%s)\n", srcName->toUTF8StringData().data());
#endif
} else {
topCodeBlock->m_byteCodeBlock = ByteCodeGenerator::generateByteCode(m_context, topCodeBlock, programNode, inWith, false);
}