Issue #1103 Foreach variables fixes

AS3 Switch fixes
This commit is contained in:
Jindra Petřík
2016-01-17 11:32:01 +01:00
parent 54629c9e47
commit 33e433fa26
2 changed files with 51 additions and 36 deletions
@@ -60,6 +60,26 @@ public class ForEachInAVM2Item extends LoopItem implements Block {
public ForEachInAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, Loop loop, InAVM2Item expression, List<GraphTargetItem> commands) {
super(instruction, lineStartIns, loop);
/*
Following was commented out:
The code should fix following:
for each (var a in col)
{
var b = a; //a is temp reg
trace(b);
}
but fails for following:
for each (var a in col)
{
c[a] = a;
}
*/
/*
if (!commands.isEmpty()) {
GraphTargetItem firstAssign = commands.get(0);
if (firstAssign instanceof SetTypeAVM2Item) {
@@ -74,7 +94,7 @@ public class ForEachInAVM2Item extends LoopItem implements Block {
}
//locAssign.
}
}
}*/
this.expression = expression;
this.commands = commands;
}