mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-24 22:00:55 +00:00
AS3 - list of instructions after CTRL+SPACE fix
AS3 - methodinfo refactoring
This commit is contained in:
@@ -169,8 +169,8 @@ public class ABC {
|
||||
bodies[i].method_info = ais.readU30();
|
||||
bodies[i].max_stack = ais.readU30();
|
||||
bodies[i].max_regs = ais.readU30();
|
||||
bodies[i].scope_depth = ais.readU30();
|
||||
bodies[i].max_scope = ais.readU30();
|
||||
bodies[i].init_scope_depth = ais.readU30();
|
||||
bodies[i].max_scope_depth = ais.readU30();
|
||||
int code_length = ais.readU30();
|
||||
bodies[i].codeBytes = new byte[code_length];
|
||||
for (int j = 0; j < code_length; j++) {
|
||||
@@ -279,8 +279,8 @@ public class ABC {
|
||||
aos.writeU30(bodies[i].method_info);
|
||||
aos.writeU30(bodies[i].max_stack);
|
||||
aos.writeU30(bodies[i].max_regs);
|
||||
aos.writeU30(bodies[i].scope_depth);
|
||||
aos.writeU30(bodies[i].max_scope);
|
||||
aos.writeU30(bodies[i].init_scope_depth);
|
||||
aos.writeU30(bodies[i].max_scope_depth);
|
||||
byte codeBytes[] = bodies[i].code.getBytes();
|
||||
aos.writeU30(codeBytes.length);
|
||||
try {
|
||||
|
||||
@@ -175,11 +175,6 @@ public class MainFrame extends JFrame implements ActionListener, ItemListener {
|
||||
rightPanel.setLayout(new BorderLayout());
|
||||
rightPanel.add(new JScrollPane(sourceTextArea), BorderLayout.CENTER);
|
||||
sourceTextArea.setContentType("text/flasm3");
|
||||
ActionMap am=sourceTextArea.getActionMap();
|
||||
ComboCompletionAction cca=(ComboCompletionAction)am.get("combo-completion");
|
||||
List<String> items=new ArrayList<String>();
|
||||
items.add("ahoj");
|
||||
cca.setItems(items);
|
||||
JPanel buttonsPan = new JPanel();
|
||||
buttonsPan.setLayout(new FlowLayout());
|
||||
JButton verifyButton = new JButton("Verify");
|
||||
|
||||
@@ -30,8 +30,8 @@ public class MethodBody implements Cloneable {
|
||||
public int method_info;
|
||||
public int max_stack;
|
||||
public int max_regs;
|
||||
public int scope_depth;
|
||||
public int max_scope;
|
||||
public int init_scope_depth;
|
||||
public int max_scope_depth;
|
||||
public byte codeBytes[];
|
||||
public AVM2Code code;
|
||||
public ABCException exceptions[] = new ABCException[0];
|
||||
@@ -40,7 +40,7 @@ public class MethodBody implements Cloneable {
|
||||
@Override
|
||||
public String toString() {
|
||||
String s = "";
|
||||
s += "method_info=" + method_info + " max_stack=" + max_stack + " max_regs=" + max_regs + " scope_depth=" + scope_depth + " max_scope=" + max_scope;
|
||||
s += "method_info=" + method_info + " max_stack=" + max_stack + " max_regs=" + max_regs + " scope_depth=" + init_scope_depth + " max_scope=" + max_scope_depth;
|
||||
s += "\r\nCode:\r\n" + code.toString();
|
||||
return s;
|
||||
}
|
||||
@@ -87,10 +87,10 @@ public class MethodBody implements Cloneable {
|
||||
ret.codeBytes = codeBytes;
|
||||
ret.exceptions = exceptions;
|
||||
ret.max_regs = max_regs;
|
||||
ret.max_scope = max_scope;
|
||||
ret.max_scope_depth = max_scope_depth;
|
||||
ret.max_stack = max_stack;
|
||||
ret.method_info = method_info;
|
||||
ret.scope_depth = scope_depth;
|
||||
ret.init_scope_depth = init_scope_depth;
|
||||
ret.traits = traits; //maybe deep clone
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user