mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
Optimize parser to skip the scanning of the whole function (#475)
* parsing of function including parameter list and function body is skipped in scanner mode * m_bodySrc in InterpretedCodeBlock is removed because it is no longer necessary * some operator overloading in FreeableNode and DestructibleNode is fixed Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
This commit is contained in:
parent
2dc9b08ea7
commit
bb7c12cfd5
10 changed files with 265 additions and 238 deletions
|
|
@ -49,7 +49,6 @@ InterpretedCodeBlock* ScriptParser::generateCodeBlockTreeFromASTWalker(Context*
|
|||
isEvalCodeInFunction = false;
|
||||
|
||||
#ifndef NDEBUG
|
||||
codeBlock->m_bodyStartLOC = scopeCtx->m_bodyStartLOC;
|
||||
codeBlock->m_bodyEndLOC = scopeCtx->m_bodyEndLOC;
|
||||
codeBlock->m_scopeContext = scopeCtx;
|
||||
#endif
|
||||
|
|
@ -314,8 +313,8 @@ void ScriptParser::dumpCodeBlockTree(InterpretedCodeBlock* topCodeBlock)
|
|||
PRINT_TAB()
|
||||
printf("CodeBlock %p %s %s (%d:%d -> %d:%d, block %d)(%s, %s) (E:%d, W:%d, Y:%d, A:%d)\n", cb, cb->m_functionName.string()->toUTF8StringData().data(),
|
||||
cb->m_isStrict ? "Strict" : "",
|
||||
(int)cb->m_bodyStartLOC.line,
|
||||
(int)cb->m_bodyStartLOC.column,
|
||||
(int)cb->m_sourceElementStart.line,
|
||||
(int)cb->m_sourceElementStart.column,
|
||||
(int)cb->m_bodyEndLOC.line,
|
||||
(int)cb->m_bodyEndLOC.column,
|
||||
(int)cb->lexicalBlockIndexFunctionLocatedIn(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue