Better line start detection

Fixed debug info injection
This commit is contained in:
Jindra Petřík
2015-11-17 09:24:42 +01:00
parent 632e5156c8
commit 4a4e0e4898
547 changed files with 2058 additions and 1911 deletions

View File

@@ -589,7 +589,7 @@ public abstract class Action implements GraphSourceItem {
} else {
if (lastPush) {
writer.newLine();
lastPush = false;
//lastPush = false;
}
writer.append("", offset);
@@ -623,11 +623,7 @@ public abstract class Action implements GraphSourceItem {
writer.newLine();
}
}
if (a instanceof ActionPush) {
lastPush = true;
} else {
lastPush = false;
}
lastPush = a instanceof ActionPush;
//}
}
@@ -706,6 +702,7 @@ public abstract class Action implements GraphSourceItem {
/**
* Translates this function to stack and output.
*
* @param lineStartIns Line start instruction
* @param stack Stack
* @param output Output
* @param regNames Register names
@@ -715,7 +712,7 @@ public abstract class Action implements GraphSourceItem {
* @param path the value of path
* @throws java.lang.InterruptedException
*/
public void translate(TranslateStack stack, List<GraphTargetItem> output, HashMap<Integer, String> regNames, HashMap<String, GraphTargetItem> variables, HashMap<String, GraphTargetItem> functions, int staticOperation, String path) throws InterruptedException {
public void translate(GraphSourceItem lineStartIns, TranslateStack stack, List<GraphTargetItem> output, HashMap<Integer, String> regNames, HashMap<String, GraphTargetItem> variables, HashMap<String, GraphTargetItem> functions, int staticOperation, String path) throws InterruptedException {
}
@Override
@@ -899,7 +896,7 @@ public abstract class Action implements GraphSourceItem {
}
expectedSize += getStackPushCount(localData, stack);*/
translate(stack, output, aLocalData.regNames, aLocalData.variables, aLocalData.functions, staticOperation, path);
translate(aLocalData.lineStartAction, stack, output, aLocalData.regNames, aLocalData.variables, aLocalData.functions, staticOperation, path);
/*if (stack.size() != expectedSize && !(this instanceof ActionPushDuplicate)) {
throw new Error("HONFIKA stack size mismatch");
}*/
@@ -1015,7 +1012,8 @@ public abstract class Action implements GraphSourceItem {
outs.add(out);
endAddr += size;
}
((GraphSourceItemContainer) action).translateContainer(outs, stack, output, registerNames, variables, functions);
((GraphSourceItemContainer) action).translateContainer(outs, action, stack, output, registerNames, variables, functions);
ip = adr2ip(actions, endAddr);
continue;
}
@@ -1153,7 +1151,7 @@ public abstract class Action implements GraphSourceItem {
if (v.name instanceof DirectValueActionItem) {
if (((DirectValueActionItem) v.name).value instanceof String) {
if (((DirectValueActionItem) v.name).value.equals("_global")) {
GetVariableActionItem gvt = new GetVariableActionItem(null, ((GetMemberActionItem) t).memberName);
GetVariableActionItem gvt = new GetVariableActionItem(null, null, ((GetMemberActionItem) t).memberName);
if (lastMember == null) {
return gvt;
} else {
@@ -1280,7 +1278,7 @@ public abstract class Action implements GraphSourceItem {
ImplementsOpActionItem iot = (ImplementsOpActionItem) parts.get(1);
implementsOp = iot.superclasses;
} else {
ok = false;
//ok = false;
break;
}
}
@@ -1296,7 +1294,7 @@ public abstract class Action implements GraphSourceItem {
}
}
} else {
ok = false;
//ok = false;
}
} else {
ok = false;
@@ -1383,15 +1381,15 @@ public abstract class Action implements GraphSourceItem {
}
if (ret instanceof GetVariableActionItem) {
GetVariableActionItem gv = (GetVariableActionItem) ret;
ret = new SetVariableActionItem(null, gv.name, value);
ret = new SetVariableActionItem(null, null, gv.name, value);
} else if (ret instanceof GetMemberActionItem) {
GetMemberActionItem mem = (GetMemberActionItem) ret;
ret = new SetMemberActionItem(null, mem.object, mem.memberName, value);
ret = new SetMemberActionItem(null, null, mem.object, mem.memberName, value);
} else if ((ret instanceof DirectValueActionItem) && ((DirectValueActionItem) ret).value instanceof RegisterNumber) {
ret = new StoreRegisterActionItem(null, (RegisterNumber) ((DirectValueActionItem) ret).value, value, false);
ret = new StoreRegisterActionItem(null, null, (RegisterNumber) ((DirectValueActionItem) ret).value, value, false);
} else if (ret instanceof GetPropertyActionItem) {
GetPropertyActionItem gp = (GetPropertyActionItem) ret;
ret = new SetPropertyActionItem(null, gp.target, gp.propertyIndex, value);
ret = new SetPropertyActionItem(null, null, gp.target, gp.propertyIndex, value);
}
if (boxed) {
GraphTargetItem b = ret;

View File

@@ -121,7 +121,7 @@ public class ActionGraph extends Graph {
break;
}
} else {
target = new DirectValueActionItem(null, 0, st.target, new ArrayList<>());
target = new DirectValueActionItem(null, null, 0, st.target, new ArrayList<>());
targetStart = t;
targetStartItem = it;
}
@@ -140,7 +140,7 @@ public class ActionGraph extends Graph {
}
}
}
if ((targetStart > -1) && (targetEnd > -1)) {
if ((targetStart > -1) && (targetEnd > -1) && targetStartItem != null) {
List<GraphTargetItem> newlist = new ArrayList<>();
for (int i = 0; i < targetStart; i++) {
newlist.add(list.get(i));
@@ -149,7 +149,7 @@ public class ActionGraph extends Graph {
for (int i = targetStart + 1; i < targetEnd; i++) {
tellist.add(list.get(i));
}
newlist.add(new TellTargetActionItem(targetStartItem.getSrc(), target, tellist));
newlist.add(new TellTargetActionItem(targetStartItem.getSrc(), targetStartItem.getLineStartItem(), target, tellist));
for (int i = targetEnd + 1; i < list.size(); i++) {
newlist.add(list.get(i));
}
@@ -174,7 +174,7 @@ public class ActionGraph extends Graph {
EnumerateActionItem eti = (EnumerateActionItem) en;
list.remove(t);
wi.commands.remove(0);
list.add(t, new ForInActionItem(null, wi.loop, sti.getObject(), eti.object, wi.commands));
list.add(t, new ForInActionItem(null, null, wi.loop, sti.getObject(), eti.object, wi.commands));
list.remove(t - 1);
t--;
}
@@ -207,7 +207,7 @@ public class ActionGraph extends Graph {
}
if (!storeRegisters.isEmpty()) {
List<GraphPart> caseBodies = new ArrayList<>();
boolean proceed = false;
boolean proceed;
do {
proceed = false;
caseBodies.add(part.nextParts.get(0)); //jump
@@ -260,6 +260,7 @@ public class ActionGraph extends Graph {
}
List<GraphTargetItem> ret = null;
if ((part.nextParts.size() == 2) && (!stack.isEmpty()) && (stack.peek() instanceof StrictEqActionItem)) {
GraphSourceItem switchStartItem = code.get(part.start);
GraphTargetItem switchedObject = null;
if (!output.isEmpty()) {
@@ -268,7 +269,7 @@ public class ActionGraph extends Graph {
}
}
if (switchedObject == null) {
switchedObject = new DirectValueActionItem(null, -1, Null.INSTANCE, null);
switchedObject = new DirectValueActionItem(null, null, -1, Null.INSTANCE, null);
}
HashMap<Integer, GraphTargetItem> caseValuesMap = new HashMap<>();
@@ -309,18 +310,17 @@ public class ActionGraph extends Graph {
GraphPart defaultPart2 = getCommonPart(localData, defaultAndLastPart, loops);//34-37
List<GraphTargetItem> defaultCommands = new ArrayList<>();
List<GraphTargetItem> defaultCommands;//= new ArrayList<>();
List<GraphPart> stopPart2 = new ArrayList<>(stopPart);
stopPart2.add(defaultPart2);
defaultCommands = printGraph(partCodes, partCodePos, localData, stack, allParts, null, defaultPart, stopPart2, loops, staticOperation, path);
List<GraphPart> loopContinues = new ArrayList<>();
for (Loop l : loops) {
if (l.loopContinue != null) {
loopContinues.add(l.loopContinue);
}
}
/*List<GraphPart> loopContinues = new ArrayList<>();
for (Loop l : loops) {
if (l.loopContinue != null) {
loopContinues.add(l.loopContinue);
}
}*/
List<GraphPart> breakParts = new ArrayList<>();
/*for (int g = 0; g < caseBodyParts.size(); g++) {
if (g < caseBodyParts.size() - 1) {
@@ -355,13 +355,11 @@ public class ActionGraph extends Graph {
for (int i = 0; i < caseBodyParts.size(); i++) {
if (caseValuesMap.containsKey(i)) {
caseValues.add(caseValuesMap.get(i));
} else {
continue;
}
}
List<List<GraphTargetItem>> caseCommands = new ArrayList<>();
GraphPart next = null;
GraphPart next;
next = breakPart;
@@ -398,11 +396,10 @@ public class ActionGraph extends Graph {
}
}
List<GraphPart> ignored = new ArrayList<>();
for (Loop l : loops) {
ignored.add(l.loopContinue);
}
/*List<GraphPart> ignored = new ArrayList<>();
for (Loop l : loops) {
ignored.add(l.loopContinue);
}*/
for (int i = 0; i < caseBodies.size(); i++) {
List<GraphTargetItem> cc = new ArrayList<>();
GraphPart nextCase = null;
@@ -410,13 +407,13 @@ public class ActionGraph extends Graph {
if (next != null) {
if (i < caseBodies.size() - 1) {
if (!caseBodies.get(i).leadsTo(localData, this, code, caseBodies.get(i + 1), loops)) {
cc.add(new BreakItem(null, currentLoop.id));
cc.add(new BreakItem(null, localData.lineStartInstruction, currentLoop.id));
} else {
nextCase = caseBodies.get(i + 1);
}
} else if (!defaultCommands.isEmpty()) {
if (!caseBodies.get(i).leadsTo(localData, this, code, defaultPart, loops)) {
cc.add(new BreakItem(null, currentLoop.id));
cc.add(new BreakItem(null, localData.lineStartInstruction, currentLoop.id));
} else {
nextCase = defaultPart;
}
@@ -447,7 +444,7 @@ public class ActionGraph extends Graph {
}
ret = new ArrayList<>();
ret.addAll(output);
SwitchItem sti = new SwitchItem(null, currentLoop, switchedObject, caseValues, caseCommands, defaultCommands, valuesMapping);
SwitchItem sti = new SwitchItem(null, switchStartItem, currentLoop, switchedObject, caseValues, caseCommands, defaultCommands, valuesMapping);
ret.add(sti);
currentLoop.phase = 2;
if (next != null) {

View File

@@ -17,6 +17,7 @@
package com.jpexs.decompiler.flash.action;
import com.jpexs.decompiler.flash.BaseLocalData;
import com.jpexs.decompiler.flash.abc.avm2.parser.script.Reference;
import com.jpexs.decompiler.graph.GraphPart;
import com.jpexs.decompiler.graph.GraphSource;
import com.jpexs.decompiler.graph.GraphSourceItem;

View File

@@ -40,6 +40,7 @@ import com.jpexs.decompiler.flash.ecma.Null;
import com.jpexs.decompiler.flash.exporters.modes.ScriptExportMode;
import com.jpexs.decompiler.flash.helpers.SWFDecompilerPlugin;
import com.jpexs.decompiler.graph.Graph;
import com.jpexs.decompiler.graph.GraphSourceItem;
import com.jpexs.decompiler.graph.GraphSourceItemContainer;
import com.jpexs.decompiler.graph.GraphTargetItem;
import com.jpexs.decompiler.graph.NotCompileTimeItem;
@@ -594,9 +595,8 @@ public class ActionListReader {
/**
* Removes multiple actions from the action list, and updates all references
* This
* method will keep the inner actions of the container when you remove the
* container
* This method will keep the inner actions of the container when you remove
* the container
*
* @param actions
* @param actionsToRemove
@@ -1120,10 +1120,10 @@ public class ActionListReader {
} else if (!(a instanceof GraphSourceItemContainer)) {
//return in for..in, TODO:Handle this better way
if (((a instanceof ActionEquals) || (a instanceof ActionEquals2)) && (stack.size() == 1) && (stack.peek() instanceof DirectValueActionItem)) {
stack.push(new DirectValueActionItem(null, 0, Null.INSTANCE, new ArrayList<>()));
stack.push(new DirectValueActionItem(null, null, 0, Null.INSTANCE, new ArrayList<>()));
}
if ((a instanceof ActionStoreRegister) && stack.isEmpty()) {
stack.push(new DirectValueActionItem(null, 0, Null.INSTANCE, new ArrayList<>()));
stack.push(new DirectValueActionItem(null, null, 0, Null.INSTANCE, new ArrayList<>()));
}
a.translate(localData, stack, output, Graph.SOP_USE_STATIC/*Graph.SOP_SKIP_STATIC*/, path);
}
@@ -1136,7 +1136,7 @@ public class ActionListReader {
if (varname != null) {
GraphTargetItem varval = vars.get(varname);
if (varval != null && varval.isCompileTime() && indeterminate) {
vars.put(varname, new NotCompileTimeItem(null, varval));
vars.put(varname, new NotCompileTimeItem(null, null, varval));
}
}
}
@@ -1166,7 +1166,11 @@ public class ActionListReader {
output2s.add(output2);
endAddr += size;
}
cnt.translateContainer(output2s, stack, output, localData.regNames, localData.variables, localData.functions);
GraphSourceItem lineStartItem = null;
if (cnt instanceof GraphSourceItem) {
lineStartItem = (GraphSourceItem) cnt;
}
cnt.translateContainer(output2s, lineStartItem, stack, output, localData.regNames, localData.variables, localData.functions);
ip = (int) endAddr;
continue;
}
@@ -1175,7 +1179,7 @@ public class ActionListReader {
if (a instanceof ActionEnd) {
break;
}
if (goaif) {
if (goaif && aif != null) {
aif.ignoreUsed = true;
aif.jumpUsed = true;
indeterminate = true;

View File

@@ -17,6 +17,7 @@
package com.jpexs.decompiler.flash.action;
import com.jpexs.decompiler.flash.BaseLocalData;
import com.jpexs.decompiler.graph.GraphSourceItem;
import com.jpexs.decompiler.graph.GraphTargetItem;
import java.util.HashMap;
@@ -32,6 +33,8 @@ public class ActionLocalData extends BaseLocalData {
public final HashMap<String, GraphTargetItem> functions;
public GraphSourceItem lineStartAction;
public ActionLocalData() {
regNames = new HashMap<>();
variables = new HashMap<>();

View File

@@ -19,6 +19,7 @@ package com.jpexs.decompiler.flash.action.flashlite;
import com.jpexs.decompiler.flash.BaseLocalData;
import com.jpexs.decompiler.flash.action.Action;
import com.jpexs.decompiler.flash.action.model.FSCommand2ActionItem;
import com.jpexs.decompiler.graph.GraphSourceItem;
import com.jpexs.decompiler.graph.GraphTargetItem;
import com.jpexs.decompiler.graph.TranslateStack;
import java.util.ArrayList;
@@ -37,14 +38,14 @@ public class ActionFSCommand2 extends Action {
}
@Override
public void translate(TranslateStack stack, List<GraphTargetItem> output, HashMap<Integer, String> regNames, HashMap<String, GraphTargetItem> variables, HashMap<String, GraphTargetItem> functions, int staticOperation, String path) {
public void translate(GraphSourceItem lineStartItem, TranslateStack stack, List<GraphTargetItem> output, HashMap<Integer, String> regNames, HashMap<String, GraphTargetItem> variables, HashMap<String, GraphTargetItem> functions, int staticOperation, String path) {
long numArgs = popLong(stack);
GraphTargetItem command = stack.pop();
List<GraphTargetItem> args = new ArrayList<>();
for (long l = 0; l < numArgs; l++) {
args.add(stack.pop());
}
stack.push(new FSCommand2ActionItem(this, command, args));
stack.push(new FSCommand2ActionItem(this, lineStartItem, command, args));
}
@Override

View File

@@ -22,6 +22,7 @@ import com.jpexs.decompiler.flash.action.Action;
import com.jpexs.decompiler.flash.action.model.StrictModeActionItem;
import com.jpexs.decompiler.flash.action.parser.ActionParseException;
import com.jpexs.decompiler.flash.action.parser.pcode.FlasmLexer;
import com.jpexs.decompiler.graph.GraphSourceItem;
import com.jpexs.decompiler.graph.GraphTargetItem;
import com.jpexs.decompiler.graph.TranslateStack;
import java.io.IOException;
@@ -63,7 +64,7 @@ public class ActionStrictMode extends Action {
}
@Override
public void translate(TranslateStack stack, List<GraphTargetItem> output, HashMap<Integer, String> regNames, HashMap<String, GraphTargetItem> variables, HashMap<String, GraphTargetItem> functions, int staticOperation, String path) {
output.add(new StrictModeActionItem(this, mode));
public void translate(GraphSourceItem lineStartItem, TranslateStack stack, List<GraphTargetItem> output, HashMap<Integer, String> regNames, HashMap<String, GraphTargetItem> variables, HashMap<String, GraphTargetItem> functions, int staticOperation, String path) {
output.add(new StrictModeActionItem(this, lineStartItem, mode));
}
}

View File

@@ -33,15 +33,15 @@ import java.util.List;
public abstract class ActionItem extends GraphTargetItem implements Serializable {
public ActionItem() {
super(null, NOPRECEDENCE);
super(null, null, NOPRECEDENCE);
}
public ActionItem(GraphSourceItem instruction, int precedence) {
super(instruction, precedence);
public ActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, int precedence) {
this(instruction, lineStartIns, precedence, null);
}
public ActionItem(GraphSourceItem instruction, int precedence, GraphTargetItem value) {
super(instruction, precedence, value);
public ActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, int precedence, GraphTargetItem value) {
super(instruction, lineStartIns, precedence, value);
}
protected boolean isEmptyString(GraphTargetItem target) {

View File

@@ -29,8 +29,8 @@ import java.util.List;
public class AsciiToCharActionItem extends ActionItem {
public AsciiToCharActionItem(GraphSourceItem instruction, GraphTargetItem value) {
super(instruction, PRECEDENCE_PRIMARY, value);
public AsciiToCharActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY, value);
}
@Override

View File

@@ -29,8 +29,8 @@ import java.util.List;
public class CallActionItem extends ActionItem {
public CallActionItem(GraphSourceItem instruction, GraphTargetItem value) {
super(instruction, PRECEDENCE_PRIMARY, value);
public CallActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY, value);
}
@Override

View File

@@ -43,8 +43,8 @@ public class CallFunctionActionItem extends ActionItem {
return arguments;
}
public CallFunctionActionItem(GraphSourceItem instruction, GraphTargetItem functionName, List<GraphTargetItem> arguments) {
super(instruction, PRECEDENCE_PRIMARY);
public CallFunctionActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem functionName, List<GraphTargetItem> arguments) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
this.functionName = functionName;
this.arguments = arguments;
}

View File

@@ -46,8 +46,8 @@ public class CallMethodActionItem extends ActionItem {
return ret;
}
public CallMethodActionItem(GraphSourceItem instruction, GraphTargetItem scriptObject, GraphTargetItem methodName, List<GraphTargetItem> arguments) {
super(instruction, PRECEDENCE_PRIMARY);
public CallMethodActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem scriptObject, GraphTargetItem methodName, List<GraphTargetItem> arguments) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
this.methodName = methodName;
this.arguments = arguments;
this.scriptObject = scriptObject;

View File

@@ -42,8 +42,8 @@ public class CastOpActionItem extends ActionItem {
return ret;
}
public CastOpActionItem(GraphSourceItem instruction, GraphTargetItem constructor, GraphTargetItem object) {
super(instruction, PRECEDENCE_PRIMARY);
public CastOpActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem constructor, GraphTargetItem object) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
this.constructor = constructor;
this.object = object;
}

View File

@@ -30,8 +30,8 @@ import java.util.Set;
public class CharToAsciiActionItem extends ActionItem {
public CharToAsciiActionItem(GraphSourceItem instruction, GraphTargetItem value) {
super(instruction, PRECEDENCE_PRIMARY, value);
public CharToAsciiActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY, value);
}
@Override

View File

@@ -45,8 +45,8 @@ public class CloneSpriteActionItem extends ActionItem {
return ret;
}
public CloneSpriteActionItem(GraphSourceItem instruction, GraphTargetItem source, GraphTargetItem target, GraphTargetItem depth) {
super(instruction, PRECEDENCE_PRIMARY);
public CloneSpriteActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem source, GraphTargetItem target, GraphTargetItem depth) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
this.source = source;
this.target = target;
this.depth = depth;

View File

@@ -40,8 +40,8 @@ public class DecrementActionItem extends ActionItem {
return ret;
}
public DecrementActionItem(GraphSourceItem instruction, GraphTargetItem object) {
super(instruction, PRECEDENCE_ADDITIVE);
public DecrementActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object) {
super(instruction, lineStartIns, PRECEDENCE_ADDITIVE);
this.object = object;
}

View File

@@ -67,8 +67,8 @@ public class DefineLocalActionItem extends ActionItem implements SetTypeActionIt
return value;
}
public DefineLocalActionItem(GraphSourceItem instruction, GraphTargetItem name, GraphTargetItem value) {
super(instruction, PRECEDENCE_PRIMARY, value);
public DefineLocalActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem name, GraphTargetItem value) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY, value);
this.name = name;
}
@@ -98,7 +98,7 @@ public class DefineLocalActionItem extends ActionItem implements SetTypeActionIt
@Override
public GraphTargetItem getObject() {
return new DefineLocalActionItem(getSrc(), name, null);
return new DefineLocalActionItem(getSrc(), getLineStartItem(), name, null);
}
@Override

View File

@@ -30,7 +30,7 @@ public class DefineRegisterActionItem extends ActionItem {
private final int register;
public DefineRegisterActionItem(String identifier, int register) {
super(null, PRECEDENCE_PRIMARY);
super(null, null, PRECEDENCE_PRIMARY);
this.identifier = identifier;
this.register = register;
}

View File

@@ -43,8 +43,8 @@ public class DeleteActionItem extends ActionItem {
return ret;
}
public DeleteActionItem(GraphSourceItem instruction, GraphTargetItem object, GraphTargetItem propertyName) {
super(instruction, PRECEDENCE_PRIMARY);
public DeleteActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object, GraphTargetItem propertyName) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
this.object = object;
this.propertyName = propertyName;
}

View File

@@ -47,11 +47,11 @@ public class DirectValueActionItem extends ActionItem implements SimpleValue {
public final int pos;
public DirectValueActionItem(Object o) {
this(null, 0, o, new ArrayList<>());
this(null, null, 0, o, new ArrayList<>());
}
public DirectValueActionItem(GraphSourceItem instruction, int instructionPos, Object value, List<String> constants) {
super(instruction, PRECEDENCE_PRIMARY);
public DirectValueActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, int instructionPos, Object value, List<String> constants) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
this.constants = constants;
this.value = value;
this.pos = instructionPos;
@@ -64,10 +64,7 @@ public class DirectValueActionItem extends ActionItem implements SimpleValue {
@Override
public boolean isVariableComputed() {
if (computedRegValue != null) {
return true;
}
return false;
return (computedRegValue != null);
}
@Override

View File

@@ -35,8 +35,8 @@ public class EnumerateActionItem extends ActionItem {
return ret;
}
public EnumerateActionItem(GraphSourceItem instruction, GraphTargetItem object) {
super(instruction, PRECEDENCE_PRIMARY);
public EnumerateActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
this.object = object;
}

View File

@@ -32,8 +32,8 @@ import java.util.List;
*/
public class EvalActionItem extends ActionItem {
public EvalActionItem(GraphSourceItem instruction, GraphTargetItem value) {
super(instruction, PRECEDENCE_PRIMARY, value);
public EvalActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY, value);
}
@Override

View File

@@ -29,8 +29,8 @@ public class ExtendsActionItem extends ActionItem {
public GraphTargetItem superclass;
public ExtendsActionItem(GraphSourceItem instruction, GraphTargetItem subclass, GraphTargetItem superclass) {
super(instruction, PRECEDENCE_PRIMARY);
public ExtendsActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem subclass, GraphTargetItem superclass) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
this.subclass = subclass;
this.superclass = superclass;
}

View File

@@ -45,8 +45,8 @@ public class FSCommand2ActionItem extends ActionItem {
return ret;
}
public FSCommand2ActionItem(GraphSourceItem instruction, GraphTargetItem command, List<GraphTargetItem> arguments) {
super(instruction, PRECEDENCE_PRIMARY);
public FSCommand2ActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem command, List<GraphTargetItem> arguments) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
this.command = command;
this.arguments = arguments;
}

View File

@@ -37,8 +37,8 @@ public class FSCommandActionItem extends ActionItem {
private final GraphTargetItem command;
public FSCommandActionItem(GraphSourceItem instruction, GraphTargetItem command) {
super(instruction, PRECEDENCE_PRIMARY);
public FSCommandActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem command) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
this.command = command;
}
@@ -57,7 +57,7 @@ public class FSCommandActionItem extends ActionItem {
if ((command instanceof DirectValueActionItem) && ((DirectValueActionItem) command).isString()) {
return toSourceMerge(localData, generator, new ActionGetURL("FSCommand:" + ((DirectValueActionItem) command).getAsString(), ""));
}
return toSourceMerge(localData, generator, new AddActionItem(null, asg.pushConstTargetItem("FSCommand:"), command, true), asg.pushConstTargetItem(""), new ActionGetURL2(1/*GET*/, false, false));
return toSourceMerge(localData, generator, new AddActionItem(null, null, asg.pushConstTargetItem("FSCommand:"), command, true), asg.pushConstTargetItem(""), new ActionGetURL2(1/*GET*/, false, false));
}
@Override

View File

@@ -76,11 +76,11 @@ public class FunctionActionItem extends ActionItem {
}
public FunctionActionItem() {
super(null, PRECEDENCE_PRIMARY);
super(null, null, PRECEDENCE_PRIMARY);
}
public FunctionActionItem(GraphSourceItem instruction, String functionName, List<String> paramNames, List<GraphTargetItem> actions, List<String> constants, int regStart, List<VariableActionItem> variables) {
super(instruction, PRECEDENCE_PRIMARY);
public FunctionActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, String functionName, List<String> paramNames, List<GraphTargetItem> actions, List<String> constants, int regStart, List<VariableActionItem> variables) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
this.actions = actions;
this.constants = constants;
this.functionName = functionName;
@@ -272,18 +272,18 @@ public class FunctionActionItem extends ActionItem {
if (registerNames.contains(varName)) {
if (stored != null) {
v.setBoxedValue(new StoreRegisterActionItem(null, new RegisterNumber(registerNames.indexOf(varName), varName), stored, false));
v.setBoxedValue(new StoreRegisterActionItem(null, null, new RegisterNumber(registerNames.indexOf(varName), varName), stored, false));
} else {
v.setBoxedValue(new DirectValueActionItem(new RegisterNumber(registerNames.indexOf(varName), varName)));
}
} else {
if (v.isDefinition()) {
v.setBoxedValue(new DefineLocalActionItem(null, ((ActionSourceGenerator) generator).pushConstTargetItem(varName), stored));
v.setBoxedValue(new DefineLocalActionItem(null, null, ((ActionSourceGenerator) generator).pushConstTargetItem(varName), stored));
} else {
if (stored != null) {
v.setBoxedValue(new SetVariableActionItem(null, ((ActionSourceGenerator) generator).pushConstTargetItem(varName), stored));
v.setBoxedValue(new SetVariableActionItem(null, null, ((ActionSourceGenerator) generator).pushConstTargetItem(varName), stored));
} else {
v.setBoxedValue(new GetVariableActionItem(null, ((ActionSourceGenerator) generator).pushConstTargetItem(varName)));
v.setBoxedValue(new GetVariableActionItem(null, null, ((ActionSourceGenerator) generator).pushConstTargetItem(varName)));
}
}
}

View File

@@ -43,8 +43,8 @@ public class GetMemberActionItem extends ActionItem {
return ret;
}
public GetMemberActionItem(GraphSourceItem instruction, GraphTargetItem object, GraphTargetItem memberName) {
super(instruction, PRECEDENCE_PRIMARY);
public GetMemberActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object, GraphTargetItem memberName) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
this.object = object;
this.memberName = memberName;
}

View File

@@ -43,8 +43,8 @@ public class GetPropertyActionItem extends ActionItem {
return ret;
}
public GetPropertyActionItem(GraphSourceItem instruction, GraphTargetItem target, int propertyIndex) {
super(instruction, PRECEDENCE_PRIMARY);
public GetPropertyActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem target, int propertyIndex) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
this.target = target;
this.propertyIndex = propertyIndex;
}

View File

@@ -12,7 +12,8 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
* License along with this library.
*/
package com.jpexs.decompiler.flash.action.model;
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
@@ -29,8 +30,8 @@ import java.util.Set;
public class GetTimeActionItem extends ActionItem {
public GetTimeActionItem(GraphSourceItem instruction) {
public GetTimeActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
}
@Override

View File

@@ -63,8 +63,8 @@ public class GetURL2ActionItem extends ActionItem {
return writer.append(methodStr).append(")");
}
public GetURL2ActionItem(GraphSourceItem instruction, GraphTargetItem urlString, GraphTargetItem targetString, int method) {
super(instruction, PRECEDENCE_PRIMARY);
public GetURL2ActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem urlString, GraphTargetItem targetString, int method) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
this.urlString = urlString;
this.targetString = targetString;
this.sendVarsMethod = method;

View File

@@ -43,8 +43,8 @@ public class GetURLActionItem extends ActionItem {
return writer.append("\")");
}
public GetURLActionItem(GraphSourceItem instruction, String urlString, String targetString) {
super(instruction, PRECEDENCE_PRIMARY);
public GetURLActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, String urlString, String targetString) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
this.urlString = urlString;
this.targetString = targetString;
}

View File

@@ -56,8 +56,8 @@ public class GetVariableActionItem extends ActionItem {
return ret;
}
public GetVariableActionItem(GraphSourceItem instruction, GraphTargetItem value) {
super(instruction, PRECEDENCE_PRIMARY);
public GetVariableActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
this.name = value;
}

View File

@@ -12,7 +12,8 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
* License along with this library.
*/
package com.jpexs.decompiler.flash.action.model;
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
@@ -31,8 +32,8 @@ import java.util.List;
*/
public class GetVersionActionItem extends ActionItem {
public GetVersionActionItem(GraphSourceItem instruction) {
public GetVersionActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
}
@Override

View File

@@ -47,8 +47,8 @@ public class GotoFrame2ActionItem extends ActionItem {
return ret;
}
public GotoFrame2ActionItem(GraphSourceItem instruction, GraphTargetItem frame, boolean sceneBiasFlag, boolean playFlag, int sceneBias) {
super(instruction, PRECEDENCE_PRIMARY);
public GotoFrame2ActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem frame, boolean sceneBiasFlag, boolean playFlag, int sceneBias) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
this.frame = frame;
this.sceneBiasFlag = sceneBiasFlag;
this.playFlag = playFlag;

View File

@@ -29,8 +29,8 @@ public class GotoFrameActionItem extends ActionItem {
public int frame;
public GotoFrameActionItem(GraphSourceItem instruction, int frame) {
super(instruction, PRECEDENCE_PRIMARY);
public GotoFrameActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, int frame) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
this.frame = frame;
}

View File

@@ -30,8 +30,8 @@ public class GotoLabelActionItem extends ActionItem {
public String label;
public GotoLabelActionItem(GraphSourceItem instruction, String label) {
super(instruction, PRECEDENCE_PRIMARY);
public GotoLabelActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, String label) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
this.label = label;
}

View File

@@ -29,8 +29,8 @@ public class ImplementsOpActionItem extends ActionItem {
public List<GraphTargetItem> superclasses;
public ImplementsOpActionItem(GraphSourceItem instruction, GraphTargetItem subclass, List<GraphTargetItem> superclasses) {
super(instruction, PRECEDENCE_PRIMARY);
public ImplementsOpActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem subclass, List<GraphTargetItem> superclasses) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
this.subclass = subclass;
this.superclasses = superclasses;
}

View File

@@ -40,8 +40,8 @@ public class IncrementActionItem extends ActionItem {
return ret;
}
public IncrementActionItem(GraphSourceItem instruction, GraphTargetItem object) {
super(instruction, PRECEDENCE_ADDITIVE);
public IncrementActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object) {
super(instruction, lineStartIns, PRECEDENCE_ADDITIVE);
this.object = object;
}

View File

@@ -38,8 +38,8 @@ public class InitArrayActionItem extends ActionItem {
ret.addAll(values);
return ret;
}
public InitArrayActionItem(GraphSourceItem instruction, List<GraphTargetItem> values) {
public InitArrayActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, List<GraphTargetItem> values) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
this.values = values;
}

View File

@@ -44,8 +44,8 @@ public class InitObjectActionItem extends ActionItem {
return ret;
}
public InitObjectActionItem(GraphSourceItem instruction, List<GraphTargetItem> names, List<GraphTargetItem> values) {
super(instruction, PRECEDENCE_PRIMARY);
public InitObjectActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, List<GraphTargetItem> names, List<GraphTargetItem> values) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
this.values = values;
this.names = names;
}

View File

@@ -47,8 +47,8 @@ public class LoadMovieActionItem extends ActionItem {
return ret;
}
public LoadMovieActionItem(GraphSourceItem instruction, GraphTargetItem urlString, GraphTargetItem targetString, int method) {
super(instruction, PRECEDENCE_PRIMARY);
public LoadMovieActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem urlString, GraphTargetItem targetString, int method) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
this.urlString = urlString;
this.targetString = targetString;
this.method = method;

View File

@@ -49,8 +49,8 @@ public class LoadMovieNumActionItem extends ActionItem {
return ret;
}
public LoadMovieNumActionItem(GraphSourceItem instruction, GraphTargetItem urlString, GraphTargetItem num, int method) {
super(instruction, PRECEDENCE_PRIMARY);
public LoadMovieNumActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem urlString, GraphTargetItem num, int method) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
this.urlString = urlString;
this.num = num;
this.method = method;
@@ -77,11 +77,11 @@ public class LoadMovieNumActionItem extends ActionItem {
@Override
public List<GraphSourceItem> toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException {
ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator;
Object lev = null;
Object lev;
if ((num instanceof DirectValueActionItem) && (((DirectValueActionItem) num).value instanceof Long)) {
lev = asGenerator.pushConstTargetItem("_level" + ((DirectValueActionItem) num).value);
} else {
lev = new AddActionItem(getSrc(), asGenerator.pushConstTargetItem("_level"), num, true);
lev = new AddActionItem(getSrc(), getLineStartItem(), asGenerator.pushConstTargetItem("_level"), num, true);
}
return toSourceMerge(localData, generator, urlString, lev, new ActionGetURL2(method, false, false));
}

View File

@@ -47,8 +47,8 @@ public class LoadVariablesActionItem extends ActionItem {
return ret;
}
public LoadVariablesActionItem(GraphSourceItem instruction, GraphTargetItem urlString, GraphTargetItem targetString, int method) {
super(instruction, PRECEDENCE_PRIMARY);
public LoadVariablesActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem urlString, GraphTargetItem targetString, int method) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
this.urlString = urlString;
this.targetString = targetString;
this.method = method;

View File

@@ -49,8 +49,8 @@ public class LoadVariablesNumActionItem extends ActionItem {
return ret;
}
public LoadVariablesNumActionItem(GraphSourceItem instruction, GraphTargetItem urlString, GraphTargetItem num, int method) {
super(instruction, PRECEDENCE_PRIMARY);
public LoadVariablesNumActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem urlString, GraphTargetItem num, int method) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
this.urlString = urlString;
this.num = num;
this.method = method;
@@ -77,11 +77,11 @@ public class LoadVariablesNumActionItem extends ActionItem {
@Override
public List<GraphSourceItem> toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException {
ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator;
Object lev = null;
Object lev;
if ((num instanceof DirectValueActionItem) && (((DirectValueActionItem) num).value instanceof Long)) {
lev = asGenerator.pushConstTargetItem("_level" + ((DirectValueActionItem) num).value);
} else {
lev = new AddActionItem(getSrc(), asGenerator.pushConstTargetItem("_level"), num, true);
lev = new AddActionItem(getSrc(), getLineStartItem(), asGenerator.pushConstTargetItem("_level"), num, true);
}
return toSourceMerge(localData, generator, urlString, lev, new ActionGetURL2(method, true, false));
}

View File

@@ -29,8 +29,8 @@ import java.util.List;
public class MBAsciiToCharActionItem extends ActionItem {
public MBAsciiToCharActionItem(GraphSourceItem instruction, GraphTargetItem value) {
super(instruction, PRECEDENCE_PRIMARY, value);
public MBAsciiToCharActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY, value);
}
@Override

View File

@@ -29,8 +29,8 @@ import java.util.List;
public class MBCharToAsciiActionItem extends ActionItem {
public MBCharToAsciiActionItem(GraphSourceItem instruction, GraphTargetItem value) {
super(instruction, PRECEDENCE_PRIMARY, value);
public MBCharToAsciiActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY, value);
}
@Override

View File

@@ -45,8 +45,8 @@ public class MBStringExtractActionItem extends ActionItem {
return ret;
}
public MBStringExtractActionItem(GraphSourceItem instruction, GraphTargetItem value, GraphTargetItem index, GraphTargetItem count) {
super(instruction, PRECEDENCE_PRIMARY, value);
public MBStringExtractActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value, GraphTargetItem index, GraphTargetItem count) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY, value);
this.index = index;
this.count = count;
}

View File

@@ -31,8 +31,8 @@ import java.util.List;
public class MBStringLengthActionItem extends ActionItem {
//public GraphTargetItem value;
public MBStringLengthActionItem(GraphSourceItem instruction, GraphTargetItem value) {
super(instruction, PRECEDENCE_PRIMARY, value);
public MBStringLengthActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY, value);
}
@Override

View File

@@ -45,8 +45,8 @@ public class NewMethodActionItem extends ActionItem {
return ret;
}
public NewMethodActionItem(GraphSourceItem instruction, GraphTargetItem scriptObject, GraphTargetItem methodName, List<GraphTargetItem> arguments) {
super(instruction, PRECEDENCE_PRIMARY);
public NewMethodActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem scriptObject, GraphTargetItem methodName, List<GraphTargetItem> arguments) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
this.methodName = methodName;
this.arguments = arguments;
this.scriptObject = scriptObject;

View File

@@ -42,8 +42,8 @@ public class NewObjectActionItem extends ActionItem {
return ret;
}
public NewObjectActionItem(GraphSourceItem instruction, GraphTargetItem objectName, List<GraphTargetItem> arguments) {
super(instruction, PRECEDENCE_PRIMARY);
public NewObjectActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem objectName, List<GraphTargetItem> arguments) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
this.objectName = objectName;
this.arguments = arguments;
}

View File

@@ -12,7 +12,8 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
* License along with this library.
*/
package com.jpexs.decompiler.flash.action.model;
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
@@ -33,8 +34,8 @@ public class NextFrameActionItem extends ActionItem {
return writer.append("()");
}
public NextFrameActionItem(GraphSourceItem instruction) {
public NextFrameActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
}
@Override

View File

@@ -12,7 +12,8 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
* License along with this library.
*/
package com.jpexs.decompiler.flash.action.model;
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
@@ -33,8 +34,8 @@ public class PlayActionItem extends ActionItem {
return writer.append("()");
}
public PlayActionItem(GraphSourceItem instruction) {
public PlayActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
}
@Override

View File

@@ -12,7 +12,8 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
* License along with this library.
*/
package com.jpexs.decompiler.flash.action.model;
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
@@ -30,8 +31,8 @@ import java.util.List;
*/
public class PopActionItem extends ActionItem {
public PopActionItem(GraphSourceItem instruction) {
public PopActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns) {
super(instruction, lineStartIns, NOPRECEDENCE);
}
@Override

View File

@@ -49,8 +49,8 @@ public class PostDecrementActionItem extends ActionItem implements SetTypeAction
return ret;
}
public PostDecrementActionItem(GraphSourceItem instruction, GraphTargetItem object) {
super(instruction, PRECEDENCE_POSTFIX);
public PostDecrementActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object) {
super(instruction, lineStartIns, PRECEDENCE_POSTFIX);
this.object = object;
}
@@ -77,7 +77,7 @@ public class PostDecrementActionItem extends ActionItem implements SetTypeAction
@Override
public GraphTargetItem getValue() {
return new SubtractActionItem(null, object, new DirectValueActionItem(null, 0, 1L, null));
return new SubtractActionItem(null, null, object, new DirectValueActionItem(null, null, 0, 1L, null));
}
@Override

View File

@@ -49,8 +49,8 @@ public class PostIncrementActionItem extends ActionItem implements SetTypeAction
return ret;
}
public PostIncrementActionItem(GraphSourceItem instruction, GraphTargetItem object) {
super(instruction, PRECEDENCE_POSTFIX);
public PostIncrementActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object) {
super(instruction, lineStartIns, PRECEDENCE_POSTFIX);
this.object = object;
}
@@ -77,7 +77,7 @@ public class PostIncrementActionItem extends ActionItem implements SetTypeAction
@Override
public GraphTargetItem getValue() {
return new AddActionItem(null, object, new DirectValueActionItem(null, 0, 1L, null), true);
return new AddActionItem(null, null, object, new DirectValueActionItem(null, null, 0, 1L, null), true);
}
@Override

View File

@@ -12,7 +12,8 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
* License along with this library.
*/
package com.jpexs.decompiler.flash.action.model;
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
@@ -33,8 +34,8 @@ public class PrevFrameActionItem extends ActionItem {
return writer.append("()");
}
public PrevFrameActionItem(GraphSourceItem instruction) {
public PrevFrameActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
}
@Override

View File

@@ -47,8 +47,8 @@ public class PrintActionItem extends ActionItem {
return ret;
}
public PrintActionItem(GraphSourceItem instruction, GraphTargetItem target, GraphTargetItem boundingBox) {
super(instruction, PRECEDENCE_PRIMARY);
public PrintActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem target, GraphTargetItem boundingBox) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
this.target = target;
this.boundingBox = boundingBox;
}
@@ -67,7 +67,7 @@ public class PrintActionItem extends ActionItem {
@Override
public List<GraphSourceItem> toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException {
ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator;
return toSourceMerge(localData, generator, new AddActionItem(getSrc(), asGenerator.pushConstTargetItem("print:#"), boundingBox, true), target, new ActionGetURL2(0, false, false));
return toSourceMerge(localData, generator, new AddActionItem(getSrc(), getLineStartItem(), asGenerator.pushConstTargetItem("print:#"), boundingBox, true), target, new ActionGetURL2(0, false, false));
}
@Override

View File

@@ -47,8 +47,8 @@ public class PrintAsBitmapActionItem extends ActionItem {
return ret;
}
public PrintAsBitmapActionItem(GraphSourceItem instruction, GraphTargetItem target, GraphTargetItem boundingBox) {
super(instruction, PRECEDENCE_PRIMARY);
public PrintAsBitmapActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem target, GraphTargetItem boundingBox) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
this.target = target;
this.boundingBox = boundingBox;
}
@@ -67,7 +67,7 @@ public class PrintAsBitmapActionItem extends ActionItem {
@Override
public List<GraphSourceItem> toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException {
ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator;
return toSourceMerge(localData, generator, new AddActionItem(getSrc(), asGenerator.pushConstTargetItem("printasbitmap:#"), boundingBox, true), target, new ActionGetURL2(0, false, false));
return toSourceMerge(localData, generator, new AddActionItem(getSrc(), getLineStartItem(), asGenerator.pushConstTargetItem("printasbitmap:#"), boundingBox, true), target, new ActionGetURL2(0, false, false));
}
@Override

View File

@@ -47,8 +47,8 @@ public class PrintAsBitmapNumActionItem extends ActionItem {
return ret;
}
public PrintAsBitmapNumActionItem(GraphSourceItem instruction, GraphTargetItem num, GraphTargetItem boundingBox) {
super(instruction, PRECEDENCE_PRIMARY);
public PrintAsBitmapNumActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem num, GraphTargetItem boundingBox) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
this.num = num;
this.boundingBox = boundingBox;
}
@@ -67,13 +67,13 @@ public class PrintAsBitmapNumActionItem extends ActionItem {
@Override
public List<GraphSourceItem> toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException {
ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator;
Object lev = null;
Object lev;
if ((num instanceof DirectValueActionItem) && (((DirectValueActionItem) num).value instanceof Long)) {
lev = asGenerator.pushConstTargetItem("_level" + ((DirectValueActionItem) num).value);
} else {
lev = new AddActionItem(getSrc(), asGenerator.pushConstTargetItem("_level"), num, true);
lev = new AddActionItem(getSrc(), getLineStartItem(), asGenerator.pushConstTargetItem("_level"), num, true);
}
return toSourceMerge(localData, generator, new AddActionItem(getSrc(), asGenerator.pushConstTargetItem("printasbitmap:#"), boundingBox, true), lev, new ActionGetURL2(0, false, false));
return toSourceMerge(localData, generator, new AddActionItem(getSrc(), getLineStartItem(), asGenerator.pushConstTargetItem("printasbitmap:#"), boundingBox, true), lev, new ActionGetURL2(0, false, false));
}
@Override

View File

@@ -47,8 +47,8 @@ public class PrintNumActionItem extends ActionItem {
return ret;
}
public PrintNumActionItem(GraphSourceItem instruction, GraphTargetItem num, GraphTargetItem boundingBox) {
super(instruction, PRECEDENCE_PRIMARY);
public PrintNumActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem num, GraphTargetItem boundingBox) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
this.num = num;
this.boundingBox = boundingBox;
}
@@ -67,13 +67,13 @@ public class PrintNumActionItem extends ActionItem {
@Override
public List<GraphSourceItem> toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException {
ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator;
Object lev = null;
Object lev;
if ((num instanceof DirectValueActionItem) && (((DirectValueActionItem) num).value instanceof Long)) {
lev = asGenerator.pushConstTargetItem("_level" + ((DirectValueActionItem) num).value);
} else {
lev = new AddActionItem(getSrc(), asGenerator.pushConstTargetItem("_level"), num, true);
lev = new AddActionItem(getSrc(), getLineStartItem(), asGenerator.pushConstTargetItem("_level"), num, true);
}
return toSourceMerge(localData, generator, new AddActionItem(getSrc(), asGenerator.pushConstTargetItem("print:#"), boundingBox, true), lev, new ActionGetURL2(0, false, false));
return toSourceMerge(localData, generator, new AddActionItem(getSrc(), getLineStartItem(), asGenerator.pushConstTargetItem("print:#"), boundingBox, true), lev, new ActionGetURL2(0, false, false));
}
@Override

View File

@@ -29,8 +29,8 @@ import java.util.List;
public class RandomNumberActionItem extends ActionItem {
public RandomNumberActionItem(GraphSourceItem instruction, GraphTargetItem maximum) {
super(instruction, PRECEDENCE_PRIMARY, maximum);
public RandomNumberActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem maximum) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY, maximum);
}
@Override

View File

@@ -29,8 +29,8 @@ import java.util.List;
public class RemoveSpriteActionItem extends ActionItem {
public RemoveSpriteActionItem(GraphSourceItem instruction, GraphTargetItem target) {
super(instruction, PRECEDENCE_PRIMARY, target);
public RemoveSpriteActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem target) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY, target);
}
@Override

View File

@@ -42,8 +42,8 @@ import java.util.Set;
public class ReturnActionItem extends ActionItem implements ExitItem {
//public GraphTargetItem value;
public ReturnActionItem(GraphSourceItem instruction, GraphTargetItem value) {
super(instruction, PRECEDENCE_PRIMARY, value);
public ReturnActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY, value);
}
@Override

View File

@@ -76,8 +76,8 @@ public class SetMemberActionItem extends ActionItem implements SetTypeActionItem
return value;
}
public SetMemberActionItem(GraphSourceItem instruction, GraphTargetItem object, GraphTargetItem objectName, GraphTargetItem value) {
super(instruction, PRECEDENCE_ASSIGMENT, value);
public SetMemberActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object, GraphTargetItem objectName, GraphTargetItem value) {
super(instruction, lineStartIns, PRECEDENCE_ASSIGMENT, value);
this.object = object;
this.objectName = objectName;
}
@@ -101,7 +101,7 @@ public class SetMemberActionItem extends ActionItem implements SetTypeActionItem
@Override
public GraphTargetItem getObject() {
return new GetMemberActionItem(getSrc(), object, objectName);
return new GetMemberActionItem(getSrc(), getLineStartItem(), object, objectName);
}
@Override

View File

@@ -67,8 +67,8 @@ public class SetPropertyActionItem extends ActionItem implements SetTypeActionIt
return value;
}
public SetPropertyActionItem(GraphSourceItem instruction, GraphTargetItem target, int propertyIndex, GraphTargetItem value) {
super(instruction, PRECEDENCE_ASSIGMENT, value);
public SetPropertyActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem target, int propertyIndex, GraphTargetItem value) {
super(instruction, lineStartIns, PRECEDENCE_ASSIGMENT, value);
this.target = target;
this.propertyIndex = propertyIndex;
}
@@ -86,7 +86,7 @@ public class SetPropertyActionItem extends ActionItem implements SetTypeActionIt
@Override
public GraphTargetItem getObject() {
return new GetPropertyActionItem(getSrc(), target, propertyIndex);
return new GetPropertyActionItem(getSrc(), getLineStartItem(), target, propertyIndex);
}
@Override

View File

@@ -29,8 +29,8 @@ public class SetTarget2ActionItem extends ActionItem {
public class SetTarget2ActionItem extends ActionItem {
public GraphTargetItem target;
public SetTarget2ActionItem(GraphSourceItem instruction, GraphTargetItem target) {
public SetTarget2ActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem target) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
this.target = target;
}

View File

@@ -29,8 +29,8 @@ public class SetTargetActionItem extends ActionItem {
public String target;
public SetTargetActionItem(GraphSourceItem instruction, String target) {
super(instruction, PRECEDENCE_PRIMARY);
public SetTargetActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, String target) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
this.target = target;
}

View File

@@ -66,8 +66,8 @@ public class SetVariableActionItem extends ActionItem implements SetTypeActionIt
return value;
}
public SetVariableActionItem(GraphSourceItem instruction, GraphTargetItem name, GraphTargetItem value) {
super(instruction, PRECEDENCE_ASSIGMENT, value);
public SetVariableActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem name, GraphTargetItem value) {
super(instruction, lineStartIns, PRECEDENCE_ASSIGMENT, value);
this.name = name;
}
@@ -93,7 +93,7 @@ public class SetVariableActionItem extends ActionItem implements SetTypeActionIt
@Override
public GraphTargetItem getObject() {
return new GetVariableActionItem(getSrc(), name);
return new GetVariableActionItem(getSrc(), getLineStartItem(), name);
}
@Override

View File

@@ -43,8 +43,8 @@ public class StartDragActionItem extends ActionItem {
public GraphTargetItem x1;
public StartDragActionItem(GraphSourceItem instruction, GraphTargetItem target, GraphTargetItem lockCenter, GraphTargetItem constrain, GraphTargetItem x1, GraphTargetItem y1, GraphTargetItem x2, GraphTargetItem y2) {
super(instruction, PRECEDENCE_PRIMARY);
public StartDragActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem target, GraphTargetItem lockCenter, GraphTargetItem constrain, GraphTargetItem x1, GraphTargetItem y1, GraphTargetItem x2, GraphTargetItem y2) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
this.target = target;
this.lockCenter = lockCenter;
this.constrain = constrain;

View File

@@ -12,7 +12,8 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
* License along with this library.
*/
package com.jpexs.decompiler.flash.action.model;
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
@@ -33,8 +34,8 @@ public class StopActionItem extends ActionItem {
return writer.append("()");
}
public StopActionItem(GraphSourceItem instruction) {
public StopActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
}
@Override

View File

@@ -12,7 +12,8 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
* License along with this library.
*/
package com.jpexs.decompiler.flash.action.model;
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
@@ -33,8 +34,8 @@ public class StopAllSoundsActionItem extends ActionItem {
return writer.append("()");
}
public StopAllSoundsActionItem(GraphSourceItem instruction) {
public StopAllSoundsActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
}
@Override

View File

@@ -12,7 +12,8 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
* License along with this library.
*/
package com.jpexs.decompiler.flash.action.model;
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
@@ -33,8 +34,8 @@ public class StopDragActionItem extends ActionItem {
return writer.append("()");
}
public StopDragActionItem(GraphSourceItem instruction) {
public StopDragActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
}
@Override

View File

@@ -66,8 +66,8 @@ public class StoreRegisterActionItem extends ActionItem implements SetTypeAction
return value;
}
public StoreRegisterActionItem(GraphSourceItem instruction, RegisterNumber register, GraphTargetItem value, boolean define) {
super(instruction, PRECEDENCE_ASSIGMENT, value);
public StoreRegisterActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, RegisterNumber register, GraphTargetItem value, boolean define) {
super(instruction, lineStartIns, PRECEDENCE_ASSIGMENT, value);
this.register = register;
this.define = define;
}
@@ -88,7 +88,7 @@ public class StoreRegisterActionItem extends ActionItem implements SetTypeAction
@Override
public GraphTargetItem getObject() {
return new DirectValueActionItem(getSrc(), -1, register, null);
return new DirectValueActionItem(getSrc(), getLineStartItem(), -1, register, null);
}
@Override

View File

@@ -24,8 +24,8 @@ public class StrictModeActionItem extends ActionItem {
public int mode;
public StrictModeActionItem(GraphSourceItem instruction, int mode) {
super(instruction, PRECEDENCE_PRIMARY);
public StrictModeActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, int mode) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
this.mode = mode;
}

View File

@@ -35,8 +35,8 @@ public class StringExtractActionItem extends ActionItem {
public GraphTargetItem count;
public StringExtractActionItem(GraphSourceItem instruction, GraphTargetItem value, GraphTargetItem index, GraphTargetItem count) {
super(instruction, PRECEDENCE_PRIMARY, value);
public StringExtractActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value, GraphTargetItem index, GraphTargetItem count) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY, value);
this.index = index;
this.count = count;
}

View File

@@ -31,8 +31,8 @@ import java.util.Set;
public class StringLengthActionItem extends ActionItem {
//public GraphTargetItem value;
public StringLengthActionItem(GraphSourceItem instruction, GraphTargetItem value) {
super(instruction, PRECEDENCE_PRIMARY, value);
public StringLengthActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY, value);
}
@Override

View File

@@ -29,8 +29,8 @@ import java.util.List;
public class TargetPathActionItem extends ActionItem {
public TargetPathActionItem(GraphSourceItem instruction, GraphTargetItem object) {
super(instruction, PRECEDENCE_PRIMARY, object);
public TargetPathActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY, object);
}
@Override

View File

@@ -31,7 +31,7 @@ public class TemporaryRegister extends ActionItem {
private final int regId;
public TemporaryRegister(int regId, GraphTargetItem value) {
super(value.getSrc(), value.getPrecedence(), value);
super(value.getSrc(), value.getLineStartItem(), value.getPrecedence(), value);
this.regId = regId;
}

View File

@@ -29,8 +29,8 @@ import java.util.List;
public class ThrowActionItem extends ActionItem {
public ThrowActionItem(GraphSourceItem instruction, GraphTargetItem object) {
super(instruction, PRECEDENCE_PRIMARY, object);
public ThrowActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY, object);
}
@Override

View File

@@ -29,8 +29,8 @@ import java.util.List;
public class ToIntegerActionItem extends ActionItem {
public ToIntegerActionItem(GraphSourceItem instruction, GraphTargetItem value) {
super(instruction, PRECEDENCE_PRIMARY, value);
public ToIntegerActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY, value);
}
@Override

View File

@@ -29,8 +29,8 @@ import java.util.List;
public class ToNumberActionItem extends ActionItem {
public ToNumberActionItem(GraphSourceItem instruction, GraphTargetItem value) {
super(instruction, PRECEDENCE_PRIMARY, value);
public ToNumberActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY, value);
}
@Override

View File

@@ -30,8 +30,8 @@ import java.util.List;
public class ToStringActionItem extends ActionItem {
public ToStringActionItem(GraphSourceItem instruction, GraphTargetItem value) {
super(instruction, PRECEDENCE_PRIMARY, value);
public ToStringActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY, value);
}
@Override

View File

@@ -12,7 +12,8 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
* License along with this library.
*/
package com.jpexs.decompiler.flash.action.model;
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
@@ -33,8 +34,8 @@ public class ToggleHighQualityActionItem extends ActionItem {
return writer.append("()");
}
public ToggleHighQualityActionItem(GraphSourceItem instruction) {
public ToggleHighQualityActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
}
@Override

View File

@@ -29,8 +29,8 @@ import java.util.List;
public class TraceActionItem extends ActionItem {
public TraceActionItem(GraphSourceItem instruction, GraphTargetItem value) {
super(instruction, PRECEDENCE_PRIMARY, value);
public TraceActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY, value);
}
@Override

View File

@@ -32,8 +32,8 @@ import java.util.Set;
public class TypeOfActionItem extends ActionItem {
public TypeOfActionItem(GraphSourceItem instruction, GraphTargetItem value) {
super(instruction, PRECEDENCE_PRIMARY, value);
public TypeOfActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY, value);
}
@Override

View File

@@ -42,8 +42,8 @@ public class UnLoadMovieActionItem extends ActionItem {
ret.add(targetString);
return ret;
}
public UnLoadMovieActionItem(GraphSourceItem instruction, GraphTargetItem targetString) {
public UnLoadMovieActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem targetString) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
this.targetString = targetString;
}

View File

@@ -46,8 +46,8 @@ public class UnLoadMovieNumActionItem extends ActionItem {
return ret;
}
public UnLoadMovieNumActionItem(GraphSourceItem instruction, GraphTargetItem num) {
super(instruction, PRECEDENCE_PRIMARY);
public UnLoadMovieNumActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem num) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
this.num = num;
}
@@ -66,7 +66,7 @@ public class UnLoadMovieNumActionItem extends ActionItem {
if ((num instanceof DirectValueActionItem) && (((DirectValueActionItem) num).value instanceof Long)) {
return toSourceMerge(localData, generator, new ActionGetURL("", "_level" + ((DirectValueActionItem) num).value));
} else {
return toSourceMerge(localData, generator, new ActionPush(""), new AddActionItem(getSrc(), asGenerator.pushConstTargetItem("_level"), num, true), new ActionGetURL2(0, false, true));
return toSourceMerge(localData, generator, new ActionPush(""), new AddActionItem(getSrc(), getLineStartItem(), asGenerator.pushConstTargetItem("_level"), num, true), new ActionGetURL2(0, false, true));
}
}

View File

@@ -25,8 +25,8 @@ public class UnsupportedActionItem extends ActionItem {
public String value;
public UnsupportedActionItem(GraphSourceItem instruction, String value) {
super(instruction, PRECEDENCE_PRIMARY);
public UnsupportedActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, String value) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
this.value = value;
}

View File

@@ -72,7 +72,7 @@ public class ClassActionItem extends ActionItem implements Block {
}
public ClassActionItem(GraphTargetItem className, GraphTargetItem extendsOp, List<GraphTargetItem> implementsOp, GraphTargetItem constructor, List<GraphTargetItem> functions, List<MyEntry<GraphTargetItem, GraphTargetItem>> vars, List<GraphTargetItem> staticFunctions, List<MyEntry<GraphTargetItem, GraphTargetItem>> staticVars) {
super(null, NOPRECEDENCE);
super(null, null, NOPRECEDENCE);
this.className = className;
this.functions = functions;
this.vars = vars;

View File

@@ -63,8 +63,8 @@ public class ForInActionItem extends LoopActionItem implements Block {
return ret;
}
public ForInActionItem(Action instruction, Loop loop, GraphTargetItem variableName, GraphTargetItem enumVariable, List<GraphTargetItem> commands) {
super(instruction, loop);
public ForInActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, Loop loop, GraphTargetItem variableName, GraphTargetItem enumVariable, List<GraphTargetItem> commands) {
super(instruction, lineStartIns, loop);
this.variableName = variableName;
this.enumVariable = enumVariable;
this.commands = commands;

View File

@@ -41,8 +41,8 @@ public class IfFrameLoadedActionItem extends ActionItem implements Block {
private final GraphTargetItem frame;
public IfFrameLoadedActionItem(GraphTargetItem frame, List<GraphTargetItem> actions, GraphSourceItem instruction) {
super(instruction, NOPRECEDENCE);
public IfFrameLoadedActionItem(GraphTargetItem frame, List<GraphTargetItem> actions, GraphSourceItem instruction, GraphSourceItem lineStartIns) {
super(instruction, lineStartIns, NOPRECEDENCE);
this.actions = actions;
this.frame = frame;
}

View File

@@ -40,7 +40,7 @@ public class InterfaceActionItem extends ActionItem {
public List<GraphTargetItem> superInterfaces;
public InterfaceActionItem(GraphTargetItem name, List<GraphTargetItem> superInterfaces) {
super(null, NOPRECEDENCE);
super(null, null, NOPRECEDENCE);
this.name = name;
this.superInterfaces = superInterfaces;
}

View File

@@ -12,19 +12,20 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
* License along with this library.
*/
package com.jpexs.decompiler.flash.action.model.clauses;
import com.jpexs.decompiler.flash.action.model.ActionItem;
import com.jpexs.decompiler.graph.GraphSourceItem;
import com.jpexs.decompiler.graph.Loop;
public abstract class LoopActionItem extends ActionItem {
public Loop loop;
public LoopActionItem(Action instruction, Loop loop) {
public LoopActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, Loop loop) {
super(instruction, lineStartIns, NOPRECEDENCE);
this.loop = loop;
}
}

View File

@@ -38,8 +38,8 @@ public class TellTargetActionItem extends ActionItem {
public GraphTargetItem target;
public TellTargetActionItem(GraphSourceItem instruction, GraphTargetItem target, List<GraphTargetItem> commands) {
super(instruction, PRECEDENCE_PRIMARY);
public TellTargetActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem target, List<GraphTargetItem> commands) {
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
this.target = target;
this.commands = commands;
}

View File

@@ -59,7 +59,7 @@ public class TryActionItem extends ActionItem implements Block {
}
public TryActionItem(List<GraphTargetItem> tryCommands, List<GraphTargetItem> catchExceptions, List<List<GraphTargetItem>> catchCommands, List<GraphTargetItem> finallyCommands) {
super(null, NOPRECEDENCE);
super(null, null, NOPRECEDENCE);
this.tryCommands = tryCommands;
this.catchExceptions = catchExceptions;
this.catchCommands = catchCommands;

View File

@@ -36,14 +36,14 @@ public class WithActionItem extends ActionItem {
public List<GraphTargetItem> items;
public WithActionItem(Action instruction, GraphTargetItem scope, List<GraphTargetItem> items) {
super(instruction, NOPRECEDENCE);
public WithActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem scope, List<GraphTargetItem> items) {
super(instruction, lineStartIns, NOPRECEDENCE);
this.scope = scope;
this.items = items;
}
public WithActionItem(Action instruction, ActionItem scope) {
super(instruction, NOPRECEDENCE);
public WithActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, ActionItem scope) {
super(instruction, lineStartIns, NOPRECEDENCE);
this.scope = scope;
this.items = new ArrayList<>();
}

View File

@@ -35,8 +35,8 @@ public class AddActionItem extends BinaryOpItem {
boolean version2;
public AddActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide, boolean version2) {
super(instruction, PRECEDENCE_ADDITIVE, leftSide, rightSide, "+");
public AddActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide, boolean version2) {
super(instruction, lineStartIns, PRECEDENCE_ADDITIVE, leftSide, rightSide, "+");
this.version2 = version2;
}

View File

@@ -29,8 +29,8 @@ import java.util.List;
public class AndActionItem extends BinaryOpItem {
public AndActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) {
super(instruction, PRECEDENCE_LOGICALAND, leftSide, rightSide, "and");
public AndActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) {
super(instruction, lineStartIns, PRECEDENCE_LOGICALAND, leftSide, rightSide, "and");
}
@Override

View File

@@ -28,8 +28,8 @@ import java.util.List;
public class BitAndActionItem extends BinaryOpItem {
public BitAndActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) {
super(instruction, PRECEDENCE_BITWISEAND, leftSide, rightSide, "&");
public BitAndActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) {
super(instruction, lineStartIns, PRECEDENCE_BITWISEAND, leftSide, rightSide, "&");
}
@Override

View File

@@ -28,8 +28,8 @@ import java.util.List;
public class BitOrActionItem extends BinaryOpItem {
public BitOrActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) {
super(instruction, PRECEDENCE_BITWISEOR, leftSide, rightSide, "|");
public BitOrActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) {
super(instruction, lineStartIns, PRECEDENCE_BITWISEOR, leftSide, rightSide, "|");
}
@Override

Some files were not shown because too many files have changed in this diff Show More