From 27df4647a04b97e3a6a365dc754551db6842b6db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=F8=EDk?= Date: Sun, 10 Jul 2011 17:31:01 +0200 Subject: [PATCH] AS3 - list of instructions after CTRL+SPACE fix AS3 - methodinfo refactoring --- trunk/src/com/jpexs/asdec/abc/ABC.java | 8 ++++---- trunk/src/com/jpexs/asdec/abc/gui/MainFrame.java | 7 +------ trunk/src/com/jpexs/asdec/abc/types/MethodBody.java | 10 +++++----- 3 files changed, 10 insertions(+), 15 deletions(-) diff --git a/trunk/src/com/jpexs/asdec/abc/ABC.java b/trunk/src/com/jpexs/asdec/abc/ABC.java index aacba84af..6220fb6cd 100644 --- a/trunk/src/com/jpexs/asdec/abc/ABC.java +++ b/trunk/src/com/jpexs/asdec/abc/ABC.java @@ -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 { diff --git a/trunk/src/com/jpexs/asdec/abc/gui/MainFrame.java b/trunk/src/com/jpexs/asdec/abc/gui/MainFrame.java index 4a0a3580c..4066dec7e 100644 --- a/trunk/src/com/jpexs/asdec/abc/gui/MainFrame.java +++ b/trunk/src/com/jpexs/asdec/abc/gui/MainFrame.java @@ -174,12 +174,7 @@ public class MainFrame extends JFrame implements ActionListener, ItemListener { JPanel rightPanel = new JPanel(); 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 items=new ArrayList(); - items.add("ahoj"); - cca.setItems(items); + sourceTextArea.setContentType("text/flasm3"); JPanel buttonsPan = new JPanel(); buttonsPan.setLayout(new FlowLayout()); JButton verifyButton = new JButton("Verify"); diff --git a/trunk/src/com/jpexs/asdec/abc/types/MethodBody.java b/trunk/src/com/jpexs/asdec/abc/types/MethodBody.java index 1f6bc52be..a21632732 100644 --- a/trunk/src/com/jpexs/asdec/abc/types/MethodBody.java +++ b/trunk/src/com/jpexs/asdec/abc/types/MethodBody.java @@ -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; }