mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-05-31 19:54:37 +00:00
move to stack fix
This commit is contained in:
@@ -1423,6 +1423,7 @@ public abstract class InstructionDefinition implements Serializable {
|
||||
DuplicateSourceItem ds = (DuplicateSourceItem) stack.peek();
|
||||
if (st.tempIndex == ds.tempIndex) {
|
||||
output.remove(output.size() - 1);
|
||||
stack.moveToStack(output);
|
||||
}
|
||||
}
|
||||
stack.push(stack.pop().value);
|
||||
@@ -1463,7 +1464,7 @@ public abstract class InstructionDefinition implements Serializable {
|
||||
} else {
|
||||
result = new SetPropertyAVM2Item(ins, localData.lineStartInstruction, obj, multiname, value, type.getVal(), callType.getVal(), isStatic.getVal());
|
||||
}
|
||||
SetPropertyIns.handleCompound(localData, obj, multiname, value, output, result);
|
||||
SetPropertyIns.handleCompound(localData, obj, multiname, value, output, stack, result);
|
||||
SetTypeIns.handleResult(value, stack, output, localData, (GraphTargetItem) result, -1, type.getVal());
|
||||
}
|
||||
|
||||
|
||||
@@ -100,6 +100,7 @@ public class CallIns extends InstructionDefinition {
|
||||
SetTemporaryItem st = (SetTemporaryItem) output.get(output.size() - 1);
|
||||
if (st.tempIndex == d.tempIndex) {
|
||||
output.remove(output.size() - 1);
|
||||
stack.moveToStack(output);
|
||||
}
|
||||
}
|
||||
} else if (getProperty.object instanceof SetLocalAVM2Item) {
|
||||
|
||||
@@ -111,7 +111,7 @@ public class GetPropertyIns extends InstructionDefinition {
|
||||
Set<Integer> usage = localData.getSetLocalUsages(localData.code.adr2pos(setLocal.getSrc().getAddress()));
|
||||
if (usage.size() == 2) {
|
||||
findPropName.name = setLocal.value;
|
||||
output.remove(output.size() - 1);
|
||||
output.remove(output.size() - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -158,6 +158,7 @@ public class GetPropertyIns extends InstructionDefinition {
|
||||
}
|
||||
}
|
||||
}
|
||||
stack.moveToStack(output);
|
||||
}
|
||||
}
|
||||
Reference<Boolean> isStatic = new Reference<>(false);
|
||||
|
||||
@@ -58,7 +58,7 @@ public class SetPropertyIns extends InstructionDefinition implements SetTypeIns
|
||||
handleSetProperty(false, localData, stack, ins, output, path);
|
||||
}
|
||||
|
||||
public static void handleCompound(AVM2LocalData localData, GraphTargetItem obj, FullMultinameAVM2Item multiname, GraphTargetItem value, List<GraphTargetItem> output, SetTypeAVM2Item result) {
|
||||
public static void handleCompound(AVM2LocalData localData, GraphTargetItem obj, FullMultinameAVM2Item multiname, GraphTargetItem value, List<GraphTargetItem> output, TranslateStack stack, SetTypeAVM2Item result) {
|
||||
if (value instanceof LocalRegAVM2Item) {
|
||||
LocalRegAVM2Item locVal = (LocalRegAVM2Item) value;
|
||||
if (multiname.name instanceof LocalRegAVM2Item) {
|
||||
@@ -111,7 +111,8 @@ public class SetPropertyIns extends InstructionDefinition implements SetTypeIns
|
||||
if (!output.isEmpty() && output.get(output.size() - 1) instanceof SetTemporaryItem) {
|
||||
SetTemporaryItem st = (SetTemporaryItem) output.get(output.size() - 1);
|
||||
if (st.tempIndex == d.tempIndex) {
|
||||
output.remove(output.size() - 1);
|
||||
output.remove(output.size() - 1);
|
||||
stack.moveToStack(output);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user