Skip to content

Commit

Permalink
[1.6>1.7] [MERGE #3458 @aneeshdk] When ForceSplitScope flag is provid…
Browse files Browse the repository at this point in the history
…ed 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.
  • Loading branch information
aneeshdk committed Aug 1, 2017
2 parents d43c23a + 8249a06 commit 96b4d1f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/Runtime/ByteCode/ByteCodeEmitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3356,8 +3356,10 @@ void ByteCodeGenerator::EmitOneFunction(ParseNode *pnode)

DefineLabels(funcInfo);

if (pnode->sxFnc.HasNonSimpleParameterList())
if (pnode->sxFnc.HasNonSimpleParameterList() || !funcInfo->IsBodyAndParamScopeMerged())
{
Assert(pnode->sxFnc.HasNonSimpleParameterList() || CONFIG_FLAG(ForceSplitScope));

this->InitBlockScopedNonTemps(funcInfo->root->sxFnc.pnodeScopes, funcInfo);

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

DefineUserVars(funcInfo);

if (pnode->sxFnc.HasNonSimpleParameterList())
if (pnode->sxFnc.HasNonSimpleParameterList() || !funcInfo->IsBodyAndParamScopeMerged())
{
Assert(pnode->sxFnc.HasNonSimpleParameterList() || CONFIG_FLAG(ForceSplitScope));
this->InitBlockScopedNonTemps(funcInfo->root->sxFnc.pnodeBodyScope, funcInfo);
}
else
Expand Down

0 comments on commit 96b4d1f

Please sign in to comment.