Issue #306 AS1/2 direct editing, decompilation - ActionDelete fix

This commit is contained in:
Jindra Pet��k
2014-03-02 12:30:00 +01:00
parent a6010ec64f
commit 901ce2898e
3 changed files with 3 additions and 5 deletions
@@ -76,6 +76,6 @@ public class DeleteActionItem extends ActionItem {
@Override
public boolean hasReturnValue() {
return false;
return true;
}
}
@@ -41,7 +41,6 @@ public class ActionDelete extends Action {
GraphTargetItem propertyName = stack.pop();
GraphTargetItem object = stack.pop();
output.add(new DeleteActionItem(this, object, propertyName));
stack.push(new DirectValueActionItem(this, -1, Boolean.TRUE, new ArrayList<String>()));
stack.push(new DeleteActionItem(this, object, propertyName));
}
}
@@ -40,7 +40,6 @@ public class ActionDelete2 extends Action {
public void translate(Stack<GraphTargetItem> stack, List<GraphTargetItem> output, java.util.HashMap<Integer, String> regNames, HashMap<String, GraphTargetItem> variables, HashMap<String, GraphTargetItem> functions, int staticOperation, String path) {
GraphTargetItem propertyName = stack.pop();
output.add(new DeleteActionItem(this, null, propertyName));
stack.push(new DirectValueActionItem(this, -1, Boolean.TRUE, new ArrayList<String>()));
stack.push(new DeleteActionItem(this, null, propertyName));
}
}