Issue #223 AS2 Detecting uninitialized class fields

This commit is contained in:
Jindra Pet��k
2013-07-30 23:01:39 +02:00
parent b4bb09065e
commit 765cc1665e
58 changed files with 435 additions and 73 deletions
@@ -24,28 +24,26 @@ import java.util.List;
public class RemoveSpriteActionItem extends ActionItem {
private GraphTargetItem target;
public RemoveSpriteActionItem(GraphSourceItem instruction, GraphTargetItem target) {
super(instruction, PRECEDENCE_PRIMARY);
this.target = target;
this.value = target;
}
@Override
public String toString(ConstantPool constants) {
return hilight("removeMovieClip(") + target.toString(constants) + hilight(")");
return hilight("removeMovieClip(") + value.toString(constants) + hilight(")");
}
@Override
public List<com.jpexs.decompiler.graph.GraphSourceItemPos> getNeededSources() {
List<com.jpexs.decompiler.graph.GraphSourceItemPos> ret = super.getNeededSources();
ret.addAll(target.getNeededSources());
ret.addAll(value.getNeededSources());
return ret;
}
@Override
public List<GraphSourceItem> toSource(List<Object> localData, SourceGenerator generator) {
return toSourceMerge(localData, generator, target, new ActionRemoveSprite());
return toSourceMerge(localData, generator, value, new ActionRemoveSprite());
}
@Override