fixed free variables not boxing for loop counter when a break is used

This commit is contained in:
albertodemichelis 2017-11-17 04:01:34 +08:00
parent effd225a84
commit b89da87b10

View File

@ -1171,9 +1171,10 @@ public:
} }
_fs->AddInstruction(_OP_JMP, 0, jmppos - _fs->GetCurrentPos() - 1, 0); _fs->AddInstruction(_OP_JMP, 0, jmppos - _fs->GetCurrentPos() - 1, 0);
if(jzpos> 0) _fs->SetIntructionParam(jzpos, 1, _fs->GetCurrentPos() - jzpos); if(jzpos> 0) _fs->SetIntructionParam(jzpos, 1, _fs->GetCurrentPos() - jzpos);
END_SCOPE();
END_BREAKBLE_BLOCK(continuetrg); END_BREAKBLE_BLOCK(continuetrg);
END_SCOPE();
} }
void ForEachStatement() void ForEachStatement()
{ {