Skip to content

Commit

Permalink
Fix missing parameters in collectByteCodeLOCData
Browse files Browse the repository at this point in the history
Signed-off-by: HyukWoo Park <[email protected]>
  • Loading branch information
clover2123 authored and ksh8281 committed Mar 20, 2024
1 parent 23cbade commit 01c1324
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/interpreter/ByteCodeGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,11 @@ void ByteCodeGenerator::collectByteCodeLOCData(Context* context, InterpretedCode
// Parsing
Node* ast = nullptr;
if (codeBlock->isGlobalCodeBlock() || codeBlock->isEvalCode()) {
InterpretedCodeBlock* parentCodeBlock = codeBlock->parent();
bool allowSC = parentCodeBlock ? parentCodeBlock->allowSuperCall() : false;
bool allowSP = parentCodeBlock ? parentCodeBlock->allowSuperProperty() : false;
ast = esprima::parseProgram(context, codeBlock->src(), esprima::generateClassInfoFrom(context, codeBlock->parent()),
codeBlock->script()->isModule(), codeBlock->isStrict(), codeBlock->inWith(), false, false, false, true);
codeBlock->script()->isModule(), codeBlock->isStrict(), codeBlock->inWith(), allowSC, allowSP, false, true);
} else {
ast = esprima::parseSingleFunction(context, codeBlock);
}
Expand Down

0 comments on commit 01c1324

Please sign in to comment.