Skip to content

Commit 96b4d1f

Browse files
committed
[1.6>1.7] [MERGE #3458 @aneeshdk] When ForceSplitScope flag is provided don't assume that we have non-simple parameter list
Merge pull request #3458 from aneeshdk:ForceSplitScopeFlagIssue When we force all functions to have split scope we shouldn't assume that those function have non-simple parameter list. Fixed couple of places in EmitOneFunction.
2 parents d43c23a + 8249a06 commit 96b4d1f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/Runtime/ByteCode/ByteCodeEmitter.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3356,8 +3356,10 @@ void ByteCodeGenerator::EmitOneFunction(ParseNode *pnode)
33563356

33573357
DefineLabels(funcInfo);
33583358

3359-
if (pnode->sxFnc.HasNonSimpleParameterList())
3359+
if (pnode->sxFnc.HasNonSimpleParameterList() || !funcInfo->IsBodyAndParamScopeMerged())
33603360
{
3361+
Assert(pnode->sxFnc.HasNonSimpleParameterList() || CONFIG_FLAG(ForceSplitScope));
3362+
33613363
this->InitBlockScopedNonTemps(funcInfo->root->sxFnc.pnodeScopes, funcInfo);
33623364

33633365
EmitDefaultArgs(funcInfo, pnode);
@@ -3400,8 +3402,9 @@ void ByteCodeGenerator::EmitOneFunction(ParseNode *pnode)
34003402

34013403
DefineUserVars(funcInfo);
34023404

3403-
if (pnode->sxFnc.HasNonSimpleParameterList())
3405+
if (pnode->sxFnc.HasNonSimpleParameterList() || !funcInfo->IsBodyAndParamScopeMerged())
34043406
{
3407+
Assert(pnode->sxFnc.HasNonSimpleParameterList() || CONFIG_FLAG(ForceSplitScope));
34053408
this->InitBlockScopedNonTemps(funcInfo->root->sxFnc.pnodeBodyScope, funcInfo);
34063409
}
34073410
else

0 commit comments

Comments
 (0)