mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-27 23:30:46 +00:00
Merge master into v7
Conflicts: libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushByteIns.java
This commit is contained in:
@@ -1034,6 +1034,14 @@ public class AVM2Code implements Cloneable {
|
||||
return bos.toByteArray();
|
||||
}
|
||||
|
||||
public void markOffsets() {
|
||||
long offset = 0;
|
||||
for (int i = 0; i < code.size(); i++) {
|
||||
code.get(i).offset = offset;
|
||||
offset += code.get(i).getBytesLength();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder s = new StringBuilder();
|
||||
|
||||
@@ -122,6 +122,7 @@ public class AVM2ConstantPool implements Cloneable {
|
||||
|
||||
public synchronized int addInt(long value) {
|
||||
ensureDefault(constant_int);
|
||||
value = (int) value;
|
||||
constant_int.add(value);
|
||||
return constant_int.size() - 1;
|
||||
}
|
||||
@@ -150,6 +151,7 @@ public class AVM2ConstantPool implements Cloneable {
|
||||
|
||||
public synchronized int addUInt(long value) {
|
||||
ensureDefault(constant_uint);
|
||||
value &= 0xffffffffl;
|
||||
constant_uint.add(value);
|
||||
return constant_uint.size() - 1;
|
||||
}
|
||||
|
||||
+2
-2
@@ -36,13 +36,13 @@ public class PushByteIns extends InstructionDefinition implements PushIntegerTyp
|
||||
|
||||
@Override
|
||||
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) {
|
||||
lda.operandStack.push(ins.getParam(constants, 0));
|
||||
lda.operandStack.push((long) (byte) ins.operands[0]);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List<GraphTargetItem> output, String path) {
|
||||
stack.push(new IntegerValueAVM2Item(ins, localData.lineStartInstruction, (long) ins.operands[0]));
|
||||
stack.push(new IntegerValueAVM2Item(ins, localData.lineStartInstruction, (long) (byte) ins.operands[0]));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user