mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
Fix finding has_catch in Global Code block. Modify binding methods of Global enviroment.
This commit is contained in:
parent
a7c88abf44
commit
4964d66df8
6 changed files with 43 additions and 8 deletions
|
|
@ -18,7 +18,11 @@ CodeBlock* ScriptParser::generateCodeBlockTreeFromASTWalker(Context* ctx, String
|
|||
CodeBlock* codeBlock;
|
||||
if (parentCodeBlock == nullptr) {
|
||||
// globalBlock
|
||||
codeBlock = new CodeBlock(ctx, script, source, scopeCtx->m_isStrict, scopeCtx->m_locStart, scopeCtx->m_names);
|
||||
codeBlock = new CodeBlock(ctx, script, source, scopeCtx->m_isStrict, scopeCtx->m_locStart, scopeCtx->m_names,
|
||||
(CodeBlock::CodeBlockInitFlag)((scopeCtx->m_hasEval ? CodeBlock::CodeBlockHasEval : 0)
|
||||
| (scopeCtx->m_hasWith ? CodeBlock::CodeBlockHasWith : 0)
|
||||
| (scopeCtx->m_hasCatch ? CodeBlock::CodeBlockHasCatch : 0)
|
||||
| (scopeCtx->m_hasYield ? CodeBlock::CodeBlockHasYield : 0)));
|
||||
} else {
|
||||
codeBlock = new CodeBlock(ctx, script, StringView(source, scopeCtx->m_locStart.index, scopeCtx->m_locEnd.index),
|
||||
scopeCtx->m_locStart,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue