AS1/2 and AS3 now share common decompiling method

This commit is contained in:
Jindra Pet��k
2013-02-24 22:46:42 +01:00
parent 6d644179ca
commit 8baa5691e9
423 changed files with 5610 additions and 4709 deletions
@@ -19,8 +19,10 @@ package com.jpexs.decompiler.flash.action.swf4;
import com.jpexs.decompiler.flash.SWFInputStream;
import com.jpexs.decompiler.flash.SWFOutputStream;
import com.jpexs.decompiler.flash.action.Action;
import com.jpexs.decompiler.flash.action.ActionGraphSource;
import com.jpexs.decompiler.flash.action.parser.FlasmLexer;
import com.jpexs.decompiler.flash.action.parser.ParseException;
import com.jpexs.decompiler.flash.graph.GraphSource;
import com.jpexs.decompiler.flash.helpers.Helper;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
@@ -81,4 +83,17 @@ public class ActionIf extends Action {
public String toString() {
return "ActionIf";
}
@Override
public boolean isBranch() {
return true;
}
@Override
public List<Integer> getBranches(GraphSource code) {
List<Integer> ret = super.getBranches(code);
ret.add(code.adr2pos(getAddress() + getBytes(((ActionGraphSource) code).version).length + offset));
ret.add(code.adr2pos(getAddress() + getBytes(((ActionGraphSource) code).version).length));
return ret;
}
}