java-decompiler: post-import cleanup (formatting and copyright)

master
Roman Shevchenko 10 years ago
parent 663631f045
commit 076e4393f2
  1. 21
      src/org/jetbrains/java/decompiler/code/CodeConstants.java
  2. 71
      src/org/jetbrains/java/decompiler/code/ConstantsUtil.java
  3. 27
      src/org/jetbrains/java/decompiler/code/ExceptionHandler.java
  4. 29
      src/org/jetbrains/java/decompiler/code/ExceptionTable.java
  5. 20
      src/org/jetbrains/java/decompiler/code/FullInstructionSequence.java
  6. 20
      src/org/jetbrains/java/decompiler/code/IfInstruction.java
  7. 30
      src/org/jetbrains/java/decompiler/code/Instruction.java
  8. 58
      src/org/jetbrains/java/decompiler/code/InstructionSequence.java
  9. 23
      src/org/jetbrains/java/decompiler/code/JumpInstruction.java
  10. 24
      src/org/jetbrains/java/decompiler/code/SimpleInstructionSequence.java
  11. 28
      src/org/jetbrains/java/decompiler/code/SwitchInstruction.java
  12. 37
      src/org/jetbrains/java/decompiler/code/cfg/BasicBlock.java
  13. 88
      src/org/jetbrains/java/decompiler/code/cfg/ControlFlowGraph.java
  14. 27
      src/org/jetbrains/java/decompiler/code/cfg/ExceptionRangeCFG.java
  15. 15
      src/org/jetbrains/java/decompiler/code/instructions/AALOAD.java
  16. 15
      src/org/jetbrains/java/decompiler/code/instructions/AASTORE.java
  17. 15
      src/org/jetbrains/java/decompiler/code/instructions/ACONST_NULL.java
  18. 33
      src/org/jetbrains/java/decompiler/code/instructions/ALOAD.java
  19. 20
      src/org/jetbrains/java/decompiler/code/instructions/ANEWARRAY.java
  20. 15
      src/org/jetbrains/java/decompiler/code/instructions/ARETURN.java
  21. 15
      src/org/jetbrains/java/decompiler/code/instructions/ARRAYLENGTH.java
  22. 32
      src/org/jetbrains/java/decompiler/code/instructions/ASTORE.java
  23. 15
      src/org/jetbrains/java/decompiler/code/instructions/ATHROW.java
  24. 15
      src/org/jetbrains/java/decompiler/code/instructions/BALOAD.java
  25. 15
      src/org/jetbrains/java/decompiler/code/instructions/BASTORE.java
  26. 28
      src/org/jetbrains/java/decompiler/code/instructions/BIPUSH.java
  27. 15
      src/org/jetbrains/java/decompiler/code/instructions/CALOAD.java
  28. 15
      src/org/jetbrains/java/decompiler/code/instructions/CASTORE.java
  29. 20
      src/org/jetbrains/java/decompiler/code/instructions/CHECKCAST.java
  30. 15
      src/org/jetbrains/java/decompiler/code/instructions/D2F.java
  31. 15
      src/org/jetbrains/java/decompiler/code/instructions/D2I.java
  32. 15
      src/org/jetbrains/java/decompiler/code/instructions/D2L.java
  33. 15
      src/org/jetbrains/java/decompiler/code/instructions/DADD.java
  34. 15
      src/org/jetbrains/java/decompiler/code/instructions/DALOAD.java
  35. 15
      src/org/jetbrains/java/decompiler/code/instructions/DASTORE.java
  36. 15
      src/org/jetbrains/java/decompiler/code/instructions/DCMPG.java
  37. 15
      src/org/jetbrains/java/decompiler/code/instructions/DCMPL.java
  38. 15
      src/org/jetbrains/java/decompiler/code/instructions/DCONST_0.java
  39. 15
      src/org/jetbrains/java/decompiler/code/instructions/DCONST_1.java
  40. 15
      src/org/jetbrains/java/decompiler/code/instructions/DDIV.java
  41. 32
      src/org/jetbrains/java/decompiler/code/instructions/DLOAD.java
  42. 15
      src/org/jetbrains/java/decompiler/code/instructions/DMUL.java
  43. 15
      src/org/jetbrains/java/decompiler/code/instructions/DNEG.java
  44. 15
      src/org/jetbrains/java/decompiler/code/instructions/DREM.java
  45. 15
      src/org/jetbrains/java/decompiler/code/instructions/DRETURN.java
  46. 31
      src/org/jetbrains/java/decompiler/code/instructions/DSTORE.java
  47. 15
      src/org/jetbrains/java/decompiler/code/instructions/DSUB.java
  48. 15
      src/org/jetbrains/java/decompiler/code/instructions/DUP.java
  49. 15
      src/org/jetbrains/java/decompiler/code/instructions/DUP2.java
  50. 15
      src/org/jetbrains/java/decompiler/code/instructions/DUP2_X1.java
  51. 15
      src/org/jetbrains/java/decompiler/code/instructions/DUP2_X2.java
  52. 15
      src/org/jetbrains/java/decompiler/code/instructions/DUP_X1.java
  53. 15
      src/org/jetbrains/java/decompiler/code/instructions/DUP_X2.java
  54. 15
      src/org/jetbrains/java/decompiler/code/instructions/F2D.java
  55. 15
      src/org/jetbrains/java/decompiler/code/instructions/F2I.java
  56. 15
      src/org/jetbrains/java/decompiler/code/instructions/F2L.java
  57. 15
      src/org/jetbrains/java/decompiler/code/instructions/FADD.java
  58. 15
      src/org/jetbrains/java/decompiler/code/instructions/FALOAD.java
  59. 15
      src/org/jetbrains/java/decompiler/code/instructions/FASTORE.java
  60. 15
      src/org/jetbrains/java/decompiler/code/instructions/FCMPG.java
  61. 15
      src/org/jetbrains/java/decompiler/code/instructions/FCMPL.java
  62. 15
      src/org/jetbrains/java/decompiler/code/instructions/FCONST_0.java
  63. 15
      src/org/jetbrains/java/decompiler/code/instructions/FCONST_1.java
  64. 15
      src/org/jetbrains/java/decompiler/code/instructions/FCONST_2.java
  65. 15
      src/org/jetbrains/java/decompiler/code/instructions/FDIV.java
  66. 32
      src/org/jetbrains/java/decompiler/code/instructions/FLOAD.java
  67. 15
      src/org/jetbrains/java/decompiler/code/instructions/FMUL.java
  68. 15
      src/org/jetbrains/java/decompiler/code/instructions/FNEG.java
  69. 15
      src/org/jetbrains/java/decompiler/code/instructions/FREM.java
  70. 15
      src/org/jetbrains/java/decompiler/code/instructions/FRETURN.java
  71. 31
      src/org/jetbrains/java/decompiler/code/instructions/FSTORE.java
  72. 15
      src/org/jetbrains/java/decompiler/code/instructions/FSUB.java
  73. 19
      src/org/jetbrains/java/decompiler/code/instructions/GETFIELD.java
  74. 20
      src/org/jetbrains/java/decompiler/code/instructions/GETSTATIC.java
  75. 26
      src/org/jetbrains/java/decompiler/code/instructions/GOTO.java
  76. 20
      src/org/jetbrains/java/decompiler/code/instructions/GOTO_W.java
  77. 15
      src/org/jetbrains/java/decompiler/code/instructions/I2B.java
  78. 15
      src/org/jetbrains/java/decompiler/code/instructions/I2C.java
  79. 15
      src/org/jetbrains/java/decompiler/code/instructions/I2D.java
  80. 15
      src/org/jetbrains/java/decompiler/code/instructions/I2F.java
  81. 15
      src/org/jetbrains/java/decompiler/code/instructions/I2L.java
  82. 15
      src/org/jetbrains/java/decompiler/code/instructions/I2S.java
  83. 15
      src/org/jetbrains/java/decompiler/code/instructions/IADD.java
  84. 15
      src/org/jetbrains/java/decompiler/code/instructions/IALOAD.java
  85. 15
      src/org/jetbrains/java/decompiler/code/instructions/IAND.java
  86. 15
      src/org/jetbrains/java/decompiler/code/instructions/IASTORE.java
  87. 15
      src/org/jetbrains/java/decompiler/code/instructions/IDIV.java
  88. 20
      src/org/jetbrains/java/decompiler/code/instructions/IFEQ.java
  89. 20
      src/org/jetbrains/java/decompiler/code/instructions/IFGE.java
  90. 20
      src/org/jetbrains/java/decompiler/code/instructions/IFGT.java
  91. 20
      src/org/jetbrains/java/decompiler/code/instructions/IFLE.java
  92. 20
      src/org/jetbrains/java/decompiler/code/instructions/IFLT.java
  93. 20
      src/org/jetbrains/java/decompiler/code/instructions/IFNE.java
  94. 20
      src/org/jetbrains/java/decompiler/code/instructions/IFNONNULL.java
  95. 20
      src/org/jetbrains/java/decompiler/code/instructions/IFNULL.java
  96. 20
      src/org/jetbrains/java/decompiler/code/instructions/IF_ACMPEQ.java
  97. 20
      src/org/jetbrains/java/decompiler/code/instructions/IF_ACMPNE.java
  98. 20
      src/org/jetbrains/java/decompiler/code/instructions/IF_ICMPEQ.java
  99. 20
      src/org/jetbrains/java/decompiler/code/instructions/IF_ICMPGE.java
  100. 20
      src/org/jetbrains/java/decompiler/code/instructions/IF_ICMPGT.java
  101. Some files were not shown because too many files have changed in this diff Show More

@ -1,17 +1,18 @@
/* /*
* Fernflower - The Analytical Java Decompiler * Copyright 2000-2014 JetBrains s.r.o.
* http://www.reversed-java.com
* *
* (C) 2008 - 2010, Stiver * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* *
* This software is NEITHER public domain NOR free software * http://www.apache.org/licenses/LICENSE-2.0
* as per GNU License. See license.txt for more details.
* *
* This software is distributed WITHOUT ANY WARRANTY; without * Unless required by applicable law or agreed to in writing, software
* even the implied warranty of MERCHANTABILITY or FITNESS FOR * distributed under the License is distributed on an "AS IS" BASIS,
* A PARTICULAR PURPOSE. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/ */
package org.jetbrains.java.decompiler.code; package org.jetbrains.java.decompiler.code;
public interface CodeConstants { public interface CodeConstants {
@ -366,6 +367,4 @@ public interface CodeConstants {
public final static int opc_ifnonnull = 199; public final static int opc_ifnonnull = 199;
public final static int opc_goto_w = 200; public final static int opc_goto_w = 200;
public final static int opc_jsr_w = 201; public final static int opc_jsr_w = 201;
} }

@ -1,57 +1,21 @@
/* /*
* Fernflower - The Analytical Java Decompiler * Copyright 2000-2014 JetBrains s.r.o.
* http://www.reversed-java.com
* *
* (C) 2008 - 2010, Stiver * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* *
* This software is NEITHER public domain NOR free software * http://www.apache.org/licenses/LICENSE-2.0
* as per GNU License. See license.txt for more details.
* *
* This software is distributed WITHOUT ANY WARRANTY; without * Unless required by applicable law or agreed to in writing, software
* even the implied warranty of MERCHANTABILITY or FITNESS FOR * distributed under the License is distributed on an "AS IS" BASIS,
* A PARTICULAR PURPOSE. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/ */
package org.jetbrains.java.decompiler.code; package org.jetbrains.java.decompiler.code;
import org.jetbrains.java.decompiler.code.optinstructions.ALOAD; import org.jetbrains.java.decompiler.code.optinstructions.*;
import org.jetbrains.java.decompiler.code.optinstructions.ANEWARRAY;
import org.jetbrains.java.decompiler.code.optinstructions.ASTORE;
import org.jetbrains.java.decompiler.code.optinstructions.BIPUSH;
import org.jetbrains.java.decompiler.code.optinstructions.CHECKCAST;
import org.jetbrains.java.decompiler.code.optinstructions.DLOAD;
import org.jetbrains.java.decompiler.code.optinstructions.DSTORE;
import org.jetbrains.java.decompiler.code.optinstructions.FLOAD;
import org.jetbrains.java.decompiler.code.optinstructions.FSTORE;
import org.jetbrains.java.decompiler.code.optinstructions.GETFIELD;
import org.jetbrains.java.decompiler.code.optinstructions.GETSTATIC;
import org.jetbrains.java.decompiler.code.optinstructions.GOTO;
import org.jetbrains.java.decompiler.code.optinstructions.GOTO_W;
import org.jetbrains.java.decompiler.code.optinstructions.IINC;
import org.jetbrains.java.decompiler.code.optinstructions.ILOAD;
import org.jetbrains.java.decompiler.code.optinstructions.INSTANCEOF;
import org.jetbrains.java.decompiler.code.optinstructions.INVOKEDYNAMIC;
import org.jetbrains.java.decompiler.code.optinstructions.INVOKEINTERFACE;
import org.jetbrains.java.decompiler.code.optinstructions.INVOKESPECIAL;
import org.jetbrains.java.decompiler.code.optinstructions.INVOKESTATIC;
import org.jetbrains.java.decompiler.code.optinstructions.INVOKEVIRTUAL;
import org.jetbrains.java.decompiler.code.optinstructions.ISTORE;
import org.jetbrains.java.decompiler.code.optinstructions.JSR;
import org.jetbrains.java.decompiler.code.optinstructions.JSR_W;
import org.jetbrains.java.decompiler.code.optinstructions.LDC;
import org.jetbrains.java.decompiler.code.optinstructions.LDC2_W;
import org.jetbrains.java.decompiler.code.optinstructions.LDC_W;
import org.jetbrains.java.decompiler.code.optinstructions.LLOAD;
import org.jetbrains.java.decompiler.code.optinstructions.LOOKUPSWITCH;
import org.jetbrains.java.decompiler.code.optinstructions.LSTORE;
import org.jetbrains.java.decompiler.code.optinstructions.MULTIANEWARRAY;
import org.jetbrains.java.decompiler.code.optinstructions.NEW;
import org.jetbrains.java.decompiler.code.optinstructions.NEWARRAY;
import org.jetbrains.java.decompiler.code.optinstructions.PUTFIELD;
import org.jetbrains.java.decompiler.code.optinstructions.PUTSTATIC;
import org.jetbrains.java.decompiler.code.optinstructions.RET;
import org.jetbrains.java.decompiler.code.optinstructions.SIPUSH;
import org.jetbrains.java.decompiler.code.optinstructions.TABLESWITCH;
public class ConstantsUtil { public class ConstantsUtil {
@ -79,7 +43,8 @@ public class ConstantsUtil {
opcode == CodeConstants.opc_ifnull || opcode == CodeConstants.opc_ifnull ||
opcode == CodeConstants.opc_ifnonnull) { opcode == CodeConstants.opc_ifnonnull) {
instr = new IfInstruction(); instr = new IfInstruction();
} else { }
else {
Class cl = opcodeClasses[opcode]; Class cl = opcodeClasses[opcode];
@ -89,17 +54,18 @@ public class ConstantsUtil {
if (cl == null) { if (cl == null) {
instr = new Instruction(); instr = new Instruction();
} else { }
else {
instr = (Instruction)cl.newInstance(); instr = (Instruction)cl.newInstance();
} }
} }
instr.opcode = opcode; instr.opcode = opcode;
return instr; return instr;
} catch (Exception ex) { }
catch (Exception ex) {
return null; return null;
} }
} }
@ -513,7 +479,4 @@ public class ConstantsUtil {
GOTO_W.class, // "goto_w", GOTO_W.class, // "goto_w",
JSR_W.class // "jsr_w" JSR_W.class // "jsr_w"
}; };
} }

@ -1,24 +1,25 @@
/* /*
* Fernflower - The Analytical Java Decompiler * Copyright 2000-2014 JetBrains s.r.o.
* http://www.reversed-java.com
* *
* (C) 2008 - 2010, Stiver * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* *
* This software is NEITHER public domain NOR free software * http://www.apache.org/licenses/LICENSE-2.0
* as per GNU License. See license.txt for more details.
* *
* This software is distributed WITHOUT ANY WARRANTY; without * Unless required by applicable law or agreed to in writing, software
* even the implied warranty of MERCHANTABILITY or FITNESS FOR * distributed under the License is distributed on an "AS IS" BASIS,
* A PARTICULAR PURPOSE. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/ */
package org.jetbrains.java.decompiler.code; package org.jetbrains.java.decompiler.code;
import org.jetbrains.java.decompiler.main.DecompilerContext;
import java.io.DataOutputStream; import java.io.DataOutputStream;
import java.io.IOException; import java.io.IOException;
import org.jetbrains.java.decompiler.main.DecompilerContext;
public class ExceptionHandler { public class ExceptionHandler {
public int from = 0; public int from = 0;
@ -32,7 +33,8 @@ public class ExceptionHandler {
public int class_index = 0; public int class_index = 0;
public String exceptionClass = null; public String exceptionClass = null;
public ExceptionHandler(){} public ExceptionHandler() {
}
public ExceptionHandler(int from_raw, int to_raw, int handler_raw, String exceptionClass) { public ExceptionHandler(int from_raw, int to_raw, int handler_raw, String exceptionClass) {
this.from = from_raw; this.from = from_raw;
@ -58,5 +60,4 @@ public class ExceptionHandler {
buf.append("exceptionClass: " + exceptionClass + new_line_separator); buf.append("exceptionClass: " + exceptionClass + new_line_separator);
return buf.toString(); return buf.toString();
} }
} }

@ -1,30 +1,32 @@
/* /*
* Fernflower - The Analytical Java Decompiler * Copyright 2000-2014 JetBrains s.r.o.
* http://www.reversed-java.com
* *
* (C) 2008 - 2010, Stiver * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* *
* This software is NEITHER public domain NOR free software * http://www.apache.org/licenses/LICENSE-2.0
* as per GNU License. See license.txt for more details.
* *
* This software is distributed WITHOUT ANY WARRANTY; without * Unless required by applicable law or agreed to in writing, software
* even the implied warranty of MERCHANTABILITY or FITNESS FOR * distributed under the License is distributed on an "AS IS" BASIS,
* A PARTICULAR PURPOSE. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/ */
package org.jetbrains.java.decompiler.code; package org.jetbrains.java.decompiler.code;
import java.util.ArrayList;
import java.util.List;
import org.jetbrains.java.decompiler.code.interpreter.Util; import org.jetbrains.java.decompiler.code.interpreter.Util;
import org.jetbrains.java.decompiler.struct.StructContext; import org.jetbrains.java.decompiler.struct.StructContext;
import java.util.ArrayList;
import java.util.List;
public class ExceptionTable { public class ExceptionTable {
private List<ExceptionHandler> handlers = new ArrayList<ExceptionHandler>(); private List<ExceptionHandler> handlers = new ArrayList<ExceptionHandler>();
public ExceptionTable() {} public ExceptionTable() {
}
public ExceptionTable(List<ExceptionHandler> handlers) { public ExceptionTable(List<ExceptionHandler> handlers) {
this.handlers = handlers; this.handlers = handlers;
@ -53,5 +55,4 @@ public class ExceptionTable {
public List<ExceptionHandler> getHandlers() { public List<ExceptionHandler> getHandlers() {
return handlers; return handlers;
} }
} }

@ -1,17 +1,18 @@
/* /*
* Fernflower - The Analytical Java Decompiler * Copyright 2000-2014 JetBrains s.r.o.
* http://www.reversed-java.com
* *
* (C) 2008 - 2010, Stiver * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* *
* This software is NEITHER public domain NOR free software * http://www.apache.org/licenses/LICENSE-2.0
* as per GNU License. See license.txt for more details.
* *
* This software is distributed WITHOUT ANY WARRANTY; without * Unless required by applicable law or agreed to in writing, software
* even the implied warranty of MERCHANTABILITY or FITNESS FOR * distributed under the License is distributed on an "AS IS" BASIS,
* A PARTICULAR PURPOSE. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/ */
package org.jetbrains.java.decompiler.code; package org.jetbrains.java.decompiler.code;
import org.jetbrains.java.decompiler.util.VBStyleCollection; import org.jetbrains.java.decompiler.util.VBStyleCollection;
@ -34,5 +35,4 @@ public class FullInstructionSequence extends InstructionSequence {
handler.handler_instr = this.getPointerByAbsOffset(handler.handler); handler.handler_instr = this.getPointerByAbsOffset(handler.handler);
} }
} }
} }

@ -1,17 +1,18 @@
/* /*
* Fernflower - The Analytical Java Decompiler * Copyright 2000-2014 JetBrains s.r.o.
* http://www.reversed-java.com
* *
* (C) 2008 - 2010, Stiver * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* *
* This software is NEITHER public domain NOR free software * http://www.apache.org/licenses/LICENSE-2.0
* as per GNU License. See license.txt for more details.
* *
* This software is distributed WITHOUT ANY WARRANTY; without * Unless required by applicable law or agreed to in writing, software
* even the implied warranty of MERCHANTABILITY or FITNESS FOR * distributed under the License is distributed on an "AS IS" BASIS,
* A PARTICULAR PURPOSE. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/ */
package org.jetbrains.java.decompiler.code; package org.jetbrains.java.decompiler.code;
import java.io.DataOutputStream; import java.io.DataOutputStream;
@ -32,5 +33,4 @@ public class IfInstruction extends JumpInstruction {
public int length() { public int length() {
return 3; return 3;
} }
} }

@ -1,17 +1,18 @@
/* /*
* Fernflower - The Analytical Java Decompiler * Copyright 2000-2014 JetBrains s.r.o.
* http://www.reversed-java.com
* *
* (C) 2008 - 2010, Stiver * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* *
* This software is NEITHER public domain NOR free software * http://www.apache.org/licenses/LICENSE-2.0
* as per GNU License. See license.txt for more details.
* *
* This software is distributed WITHOUT ANY WARRANTY; without * Unless required by applicable law or agreed to in writing, software
* even the implied warranty of MERCHANTABILITY or FITNESS FOR * distributed under the License is distributed on an "AS IS" BASIS,
* A PARTICULAR PURPOSE. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/ */
package org.jetbrains.java.decompiler.code; package org.jetbrains.java.decompiler.code;
import java.io.DataOutputStream; import java.io.DataOutputStream;
@ -41,7 +42,8 @@ public class Instruction implements CodeConstants {
// public methods // public methods
// ***************************************************************************** // *****************************************************************************
public Instruction() {} public Instruction() {
}
public int length() { public int length() {
return 1; return 1;
@ -69,13 +71,13 @@ public class Instruction implements CodeConstants {
int op = operands[i]; int op = operands[i];
if (op < 0) { if (op < 0) {
res += " -" + Integer.toHexString(-op); res += " -" + Integer.toHexString(-op);
} else { }
else {
res += " " + Integer.toHexString(op); res += " " + Integer.toHexString(op);
} }
} }
return res; return res;
} }
public boolean canFallthrough() { public boolean canFallthrough() {
@ -102,7 +104,8 @@ public class Instruction implements CodeConstants {
} }
// should be overwritten by subclasses // should be overwritten by subclasses
public void initInstruction(InstructionSequence seq) {} public void initInstruction(InstructionSequence seq) {
}
// should be overwritten by subclasses // should be overwritten by subclasses
public void writeToStream(DataOutputStream out, int offset) throws IOException { public void writeToStream(DataOutputStream out, int offset) throws IOException {
@ -120,5 +123,4 @@ public class Instruction implements CodeConstants {
public void setOperands(int[] operands) { public void setOperands(int[] operands) {
this.operands = operands; this.operands = operands;
} }
} }

@ -1,31 +1,32 @@
/* /*
* Fernflower - The Analytical Java Decompiler * Copyright 2000-2014 JetBrains s.r.o.
* http://www.reversed-java.com
* *
* (C) 2008 - 2010, Stiver * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* *
* This software is NEITHER public domain NOR free software * http://www.apache.org/licenses/LICENSE-2.0
* as per GNU License. See license.txt for more details.
* *
* This software is distributed WITHOUT ANY WARRANTY; without * Unless required by applicable law or agreed to in writing, software
* even the implied warranty of MERCHANTABILITY or FITNESS FOR * distributed under the License is distributed on an "AS IS" BASIS,
* A PARTICULAR PURPOSE. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/ */
package org.jetbrains.java.decompiler.code; package org.jetbrains.java.decompiler.code;
import java.io.DataOutputStream;
import java.io.IOException;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import org.jetbrains.java.decompiler.code.interpreter.Util; import org.jetbrains.java.decompiler.code.interpreter.Util;
import org.jetbrains.java.decompiler.main.DecompilerContext; import org.jetbrains.java.decompiler.main.DecompilerContext;
import org.jetbrains.java.decompiler.struct.StructContext; import org.jetbrains.java.decompiler.struct.StructContext;
import org.jetbrains.java.decompiler.util.InterpreterUtil; import org.jetbrains.java.decompiler.util.InterpreterUtil;
import org.jetbrains.java.decompiler.util.VBStyleCollection; import org.jetbrains.java.decompiler.util.VBStyleCollection;
import java.io.DataOutputStream;
import java.io.IOException;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
public abstract class InstructionSequence { public abstract class InstructionSequence {
@ -44,7 +45,9 @@ public abstract class InstructionSequence {
// ***************************************************************************** // *****************************************************************************
// to nbe overwritten // to nbe overwritten
public InstructionSequence clone() {return null;} public InstructionSequence clone() {
return null;
}
public void clear() { public void clear() {
collinstr.clear(); collinstr.clear();
@ -94,7 +97,8 @@ public abstract class InstructionSequence {
Integer absoffset = new Integer(offset); Integer absoffset = new Integer(offset);
if (collinstr.containsKey(absoffset)) { if (collinstr.containsKey(absoffset)) {
return collinstr.getIndexByKey(absoffset); return collinstr.getIndexByKey(absoffset);
} else { }
else {
return -1; return -1;
} }
} }
@ -103,7 +107,8 @@ public abstract class InstructionSequence {
Integer absoffset = new Integer(((Integer)collinstr.getKey(pointer)).intValue() + offset); Integer absoffset = new Integer(((Integer)collinstr.getKey(pointer)).intValue() + offset);
if (collinstr.containsKey(absoffset)) { if (collinstr.containsKey(absoffset)) {
return collinstr.getIndexByKey(absoffset); return collinstr.getIndexByKey(absoffset);
} else { }
else {
return -1; return -1;
} }
} }
@ -174,25 +179,29 @@ public abstract class InstructionSequence {
if (handler0.to == handler1.to) { if (handler0.to == handler1.to) {
if (handler0.exceptionClass == null) { if (handler0.exceptionClass == null) {
return 1; return 1;
} else { }
else {
if (handler1.exceptionClass == null) { if (handler1.exceptionClass == null) {
return -1; return -1;
} else if(handler0.exceptionClass.equals(handler1.exceptionClass)){ }
else if (handler0.exceptionClass.equals(handler1.exceptionClass)) {
return (handler0.from > handler1.from) ? -1 : 1; // invalid code return (handler0.from > handler1.from) ? -1 : 1; // invalid code
} else { }
else {
if (Util.instanceOf(context, handler0.exceptionClass, handler1.exceptionClass)) { if (Util.instanceOf(context, handler0.exceptionClass, handler1.exceptionClass)) {
return -1; return -1;
} else { }
else {
return 1; return 1;
} }
} }
} }
} else { }
else {
return (handler0.to > handler1.to) ? 1 : -1; return (handler0.to > handler1.to) ? 1 : -1;
} }
} }
}); });
} }
@ -215,5 +224,4 @@ public abstract class InstructionSequence {
public void setExceptionTable(ExceptionTable exceptionTable) { public void setExceptionTable(ExceptionTable exceptionTable) {
this.exceptionTable = exceptionTable; this.exceptionTable = exceptionTable;
} }
} }

@ -1,17 +1,18 @@
/* /*
* Fernflower - The Analytical Java Decompiler * Copyright 2000-2014 JetBrains s.r.o.
* http://www.reversed-java.com
* *
* (C) 2008 - 2010, Stiver * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* *
* This software is NEITHER public domain NOR free software * http://www.apache.org/licenses/LICENSE-2.0
* as per GNU License. See license.txt for more details.
* *
* This software is distributed WITHOUT ANY WARRANTY; without * Unless required by applicable law or agreed to in writing, software
* even the implied warranty of MERCHANTABILITY or FITNESS FOR * distributed under the License is distributed on an "AS IS" BASIS,
* A PARTICULAR PURPOSE. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/ */
package org.jetbrains.java.decompiler.code; package org.jetbrains.java.decompiler.code;
/* /*
@ -25,7 +26,8 @@ public class JumpInstruction extends Instruction {
public int destination; public int destination;
public JumpInstruction() {} public JumpInstruction() {
}
public void initInstruction(InstructionSequence seq) { public void initInstruction(InstructionSequence seq) {
destination = seq.getPointerByRelOffset(this.getOperand(0)); destination = seq.getPointerByRelOffset(this.getOperand(0));
@ -37,5 +39,4 @@ public class JumpInstruction extends Instruction {
newinstr.destination = destination; newinstr.destination = destination;
return newinstr; return newinstr;
} }
} }

@ -1,24 +1,26 @@
/* /*
* Fernflower - The Analytical Java Decompiler * Copyright 2000-2014 JetBrains s.r.o.
* http://www.reversed-java.com
* *
* (C) 2008 - 2010, Stiver * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* *
* This software is NEITHER public domain NOR free software * http://www.apache.org/licenses/LICENSE-2.0
* as per GNU License. See license.txt for more details.
* *
* This software is distributed WITHOUT ANY WARRANTY; without * Unless required by applicable law or agreed to in writing, software
* even the implied warranty of MERCHANTABILITY or FITNESS FOR * distributed under the License is distributed on an "AS IS" BASIS,
* A PARTICULAR PURPOSE. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/ */
package org.jetbrains.java.decompiler.code; package org.jetbrains.java.decompiler.code;
import org.jetbrains.java.decompiler.util.VBStyleCollection; import org.jetbrains.java.decompiler.util.VBStyleCollection;
public class SimpleInstructionSequence extends InstructionSequence { public class SimpleInstructionSequence extends InstructionSequence {
public SimpleInstructionSequence() {} public SimpleInstructionSequence() {
}
public SimpleInstructionSequence(VBStyleCollection<Instruction, Integer> collinstr) { public SimpleInstructionSequence(VBStyleCollection<Instruction, Integer> collinstr) {
this.collinstr = collinstr; this.collinstr = collinstr;
@ -34,6 +36,4 @@ public class SimpleInstructionSequence extends InstructionSequence {
public void removeInstruction(int index) { public void removeInstruction(int index) {
collinstr.remove(index); collinstr.remove(index);
} }
} }

@ -1,17 +1,18 @@
/* /*
* Fernflower - The Analytical Java Decompiler * Copyright 2000-2014 JetBrains s.r.o.
* http://www.reversed-java.com
* *
* (C) 2008 - 2010, Stiver * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* *
* This software is NEITHER public domain NOR free software * http://www.apache.org/licenses/LICENSE-2.0
* as per GNU License. See license.txt for more details.
* *
* This software is distributed WITHOUT ANY WARRANTY; without * Unless required by applicable law or agreed to in writing, software
* even the implied warranty of MERCHANTABILITY or FITNESS FOR * distributed under the License is distributed on an "AS IS" BASIS,
* A PARTICULAR PURPOSE. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/ */
package org.jetbrains.java.decompiler.code; package org.jetbrains.java.decompiler.code;
/* /*
@ -26,7 +27,8 @@ public class SwitchInstruction extends Instruction {
private int defaultdest; private int defaultdest;
public SwitchInstruction() {} public SwitchInstruction() {
}
public void initInstruction(InstructionSequence seq) { public void initInstruction(InstructionSequence seq) {
@ -39,7 +41,8 @@ public class SwitchInstruction extends Instruction {
if (opcode == CodeConstants.opc_lookupswitch) { if (opcode == CodeConstants.opc_lookupswitch) {
len /= 2; len /= 2;
} else { }
else {
low = this.getOperand(1); low = this.getOperand(1);
} }
@ -50,7 +53,8 @@ public class SwitchInstruction extends Instruction {
if (opcode == CodeConstants.opc_lookupswitch) { if (opcode == CodeConstants.opc_lookupswitch) {
values[i] = this.getOperand(pref + k); values[i] = this.getOperand(pref + k);
k++; k++;
} else { }
else {
values[i] = low + k; values[i] = low + k;
} }
destinations[i] = seq.getPointerByRelOffset(this.getOperand(pref + k)); destinations[i] = seq.getPointerByRelOffset(this.getOperand(pref + k));

@ -1,28 +1,29 @@
/* /*
* Fernflower - The Analytical Java Decompiler * Copyright 2000-2014 JetBrains s.r.o.
* http://www.reversed-java.com
* *
* (C) 2008 - 2010, Stiver * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* *
* This software is NEITHER public domain NOR free software * http://www.apache.org/licenses/LICENSE-2.0
* as per GNU License. See license.txt for more details.
* *
* This software is distributed WITHOUT ANY WARRANTY; without * Unless required by applicable law or agreed to in writing, software
* even the implied warranty of MERCHANTABILITY or FITNESS FOR * distributed under the License is distributed on an "AS IS" BASIS,
* A PARTICULAR PURPOSE. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/ */
package org.jetbrains.java.decompiler.code.cfg; package org.jetbrains.java.decompiler.code.cfg;
import java.util.ArrayList;
import java.util.List;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;
import org.jetbrains.java.decompiler.code.InstructionSequence; import org.jetbrains.java.decompiler.code.InstructionSequence;
import org.jetbrains.java.decompiler.code.SimpleInstructionSequence; import org.jetbrains.java.decompiler.code.SimpleInstructionSequence;
import org.jetbrains.java.decompiler.main.DecompilerContext; import org.jetbrains.java.decompiler.main.DecompilerContext;
import org.jetbrains.java.decompiler.modules.decompiler.decompose.IGraphNode; import org.jetbrains.java.decompiler.modules.decompiler.decompose.IGraphNode;
import java.util.ArrayList;
import java.util.List;
public class BasicBlock implements IGraphNode { public class BasicBlock implements IGraphNode {
// ***************************************************************************** // *****************************************************************************
@ -50,8 +51,8 @@ public class BasicBlock implements IGraphNode {
private List<BasicBlock> succExceptions = new ArrayList<BasicBlock>(); private List<BasicBlock> succExceptions = new ArrayList<BasicBlock>();
public BasicBlock() {
public BasicBlock() {} }
public BasicBlock(int id) { public BasicBlock(int id) {
this.id = id; this.id = id;
@ -86,7 +87,8 @@ public class BasicBlock implements IGraphNode {
public Instruction getLastInstruction() { public Instruction getLastInstruction() {
if (seq.isEmpty()) { if (seq.isEmpty()) {
return null; return null;
} else { }
else {
return seq.getLastInstr(); return seq.getLastInstr();
} }
} }
@ -172,7 +174,8 @@ public class BasicBlock implements IGraphNode {
for (int i = 0; i < seq.length(); i++) { for (int i = 0; i < seq.length(); i++) {
if (i < instrOldOffsets.size()) { if (i < instrOldOffsets.size()) {
buf.append(instrOldOffsets.get(i)); buf.append(instrOldOffsets.get(i));
} else { }
else {
buf.append("-1"); buf.append("-1");
} }
buf.append(": "); buf.append(": ");
@ -260,6 +263,4 @@ public class BasicBlock implements IGraphNode {
public void setPredExceptions(List<BasicBlock> predExceptions) { public void setPredExceptions(List<BasicBlock> predExceptions) {
this.predExceptions = predExceptions; this.predExceptions = predExceptions;
} }
} }

@ -1,37 +1,21 @@
/* /*
* Fernflower - The Analytical Java Decompiler * Copyright 2000-2014 JetBrains s.r.o.
* http://www.reversed-java.com
* *
* (C) 2008 - 2010, Stiver * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* *
* This software is NEITHER public domain NOR free software * http://www.apache.org/licenses/LICENSE-2.0
* as per GNU License. See license.txt for more details.
* *
* This software is distributed WITHOUT ANY WARRANTY; without * Unless required by applicable law or agreed to in writing, software
* even the implied warranty of MERCHANTABILITY or FITNESS FOR * distributed under the License is distributed on an "AS IS" BASIS,
* A PARTICULAR PURPOSE. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/ */
package org.jetbrains.java.decompiler.code.cfg; package org.jetbrains.java.decompiler.code.cfg;
import java.util.ArrayList; import org.jetbrains.java.decompiler.code.*;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.jetbrains.java.decompiler.code.CodeConstants;
import org.jetbrains.java.decompiler.code.ExceptionHandler;
import org.jetbrains.java.decompiler.code.Instruction;
import org.jetbrains.java.decompiler.code.InstructionSequence;
import org.jetbrains.java.decompiler.code.JumpInstruction;
import org.jetbrains.java.decompiler.code.SimpleInstructionSequence;
import org.jetbrains.java.decompiler.code.SwitchInstruction;
import org.jetbrains.java.decompiler.code.interpreter.InstructionImpact; import org.jetbrains.java.decompiler.code.interpreter.InstructionImpact;
import org.jetbrains.java.decompiler.main.DecompilerContext; import org.jetbrains.java.decompiler.main.DecompilerContext;
import org.jetbrains.java.decompiler.modules.code.DeadCodeHelper; import org.jetbrains.java.decompiler.modules.code.DeadCodeHelper;
@ -42,6 +26,9 @@ import org.jetbrains.java.decompiler.struct.gen.VarType;
import org.jetbrains.java.decompiler.util.ListStack; import org.jetbrains.java.decompiler.util.ListStack;
import org.jetbrains.java.decompiler.util.VBStyleCollection; import org.jetbrains.java.decompiler.util.VBStyleCollection;
import java.util.*;
import java.util.Map.Entry;
public class ControlFlowGraph implements CodeConstants { public class ControlFlowGraph implements CodeConstants {
public int last_id = 0; public int last_id = 0;
@ -116,11 +103,13 @@ public class ControlFlowGraph implements CodeConstants {
if (range == null) { if (range == null) {
buf.append(">>>>>>>>(exception) Block " + handler.id + "\t" + "ERROR: range not found!" + new_line_separator); buf.append(">>>>>>>>(exception) Block " + handler.id + "\t" + "ERROR: range not found!" + new_line_separator);
} else { }
else {
List<String> exceptionTypes = range.getExceptionTypes(); List<String> exceptionTypes = range.getExceptionTypes();
if (exceptionTypes == null) { if (exceptionTypes == null) {
buf.append(">>>>>>>>(exception) Block " + handler.id + "\t" + "NULL" + new_line_separator); buf.append(">>>>>>>>(exception) Block " + handler.id + "\t" + "NULL" + new_line_separator);
} else { }
else {
for (String exceptionType : exceptionTypes) { for (String exceptionType : exceptionTypes) {
buf.append(">>>>>>>>(exception) Block " + handler.id + "\t" + exceptionType + new_line_separator); buf.append(">>>>>>>>(exception) Block " + handler.id + "\t" + exceptionType + new_line_separator);
} }
@ -128,11 +117,9 @@ public class ControlFlowGraph implements CodeConstants {
} }
} }
buf.append("----- ----- -----" + new_line_separator); buf.append("----- ----- -----" + new_line_separator);
} }
return buf.toString(); return buf.toString();
} }
public void inlineJsr(StructMethod mt) { public void inlineJsr(StructMethod mt) {
@ -170,7 +157,8 @@ public class ControlFlowGraph implements CodeConstants {
ExceptionRangeCFG range = (ExceptionRangeCFG)exceptions.get(i); ExceptionRangeCFG range = (ExceptionRangeCFG)exceptions.get(i);
if (range.getHandler() == block) { if (range.getHandler() == block) {
exceptions.remove(i); exceptions.remove(i);
} else { }
else {
List<BasicBlock> lstRange = range.getProtectedRange(); List<BasicBlock> lstRange = range.getProtectedRange();
lstRange.remove(block); lstRange.remove(block);
@ -187,7 +175,6 @@ public class ControlFlowGraph implements CodeConstants {
it.remove(); it.remove();
} }
} }
} }
public ExceptionRangeCFG getExceptionRange(BasicBlock handler, BasicBlock block) { public ExceptionRangeCFG getExceptionRange(BasicBlock handler, BasicBlock block) {
@ -376,7 +363,6 @@ public class ControlFlowGraph implements CodeConstants {
block.addSuccessor(defaultBlock); block.addSuccessor(defaultBlock);
} }
} }
} }
private void setExceptionEdges(InstructionSequence instrseq, HashMap<Integer, BasicBlock> instrBlocks) { private void setExceptionEdges(InstructionSequence instrseq, HashMap<Integer, BasicBlock> instrBlocks) {
@ -396,7 +382,8 @@ public class ControlFlowGraph implements CodeConstants {
if (mapRanges.containsKey(key)) { if (mapRanges.containsKey(key)) {
ExceptionRangeCFG range = mapRanges.get(key); ExceptionRangeCFG range = mapRanges.get(key);
range.addExceptionType(handler.exceptionClass); range.addExceptionType(handler.exceptionClass);
} else { }
else {
List<BasicBlock> protectedRange = new ArrayList<BasicBlock>(); List<BasicBlock> protectedRange = new ArrayList<BasicBlock>();
for (int j = from.id; j < to.id; j++) { for (int j = from.id; j < to.id; j++) {
@ -405,7 +392,9 @@ public class ControlFlowGraph implements CodeConstants {
block.addSuccessorException(handle); block.addSuccessorException(handle);
} }
ExceptionRangeCFG range = new ExceptionRangeCFG(protectedRange, handle, handler.exceptionClass == null ? null : Arrays.asList(new String[]{handler.exceptionClass})); ExceptionRangeCFG range = new ExceptionRangeCFG(protectedRange, handle, handler.exceptionClass == null
? null
: Arrays.asList(new String[]{handler.exceptionClass}));
mapRanges.put(key, range); mapRanges.put(key, range);
exceptions.add(range); exceptions.add(range);
@ -450,7 +439,8 @@ public class ControlFlowGraph implements CodeConstants {
} }
jsrstack.removeLast(); jsrstack.removeLast();
subroutines.put(enter, exit); subroutines.put(enter, exit);
} else { }
else {
throw new RuntimeException("ERROR: last instruction jsr"); throw new RuntimeException("ERROR: last instruction jsr");
} }
} }
@ -549,7 +539,8 @@ public class ControlFlowGraph implements CodeConstants {
} }
} }
lst = node.getSuccs(); lst = node.getSuccs();
} else { }
else {
if (node == jsr) { if (node == jsr) {
continue; continue;
} }
@ -611,7 +602,8 @@ public class ControlFlowGraph implements CodeConstants {
} }
} }
lst = node.getSuccs(); lst = node.getSuccs();
} else { }
else {
if (node == jsr) { if (node == jsr) {
continue; continue;
} }
@ -626,7 +618,8 @@ public class ControlFlowGraph implements CodeConstants {
if (mapNewNodes.containsKey(childid)) { if (mapNewNodes.containsKey(childid)) {
node.replaceSuccessor(child, (BasicBlock)mapNewNodes.get(childid)); node.replaceSuccessor(child, (BasicBlock)mapNewNodes.get(childid));
} else if(common_blocks.contains(child)) { }
else if (common_blocks.contains(child)) {
// make a copy of the current block // make a copy of the current block
BasicBlock copy = (BasicBlock)child.clone(); BasicBlock copy = (BasicBlock)child.clone();
@ -636,7 +629,8 @@ public class ControlFlowGraph implements CodeConstants {
child.getSuccs().contains(ret)) { child.getSuccs().contains(ret)) {
copy.addSuccessor(ret); copy.addSuccessor(ret);
child.removeSuccessor(ret); child.removeSuccessor(ret);
} else { }
else {
for (int k = 0; k < child.getSuccs().size(); k++) { for (int k = 0; k < child.getSuccs().size(); k++) {
copy.addSuccessor((BasicBlock)child.getSuccs().get(k)); copy.addSuccessor((BasicBlock)child.getSuccs().get(k));
} }
@ -654,13 +648,13 @@ public class ControlFlowGraph implements CodeConstants {
node.replaceSuccessor(child, copy); node.replaceSuccessor(child, copy);
blocks.addWithKey(copy, copy.id); blocks.addWithKey(copy, copy.id);
} else { }
else {
// stop at the first fixed node // stop at the first fixed node
//lstNodes.add(child); //lstNodes.add(child);
mapNewNodes.put(childid, child); mapNewNodes.put(childid, child);
} }
} }
} }
} }
@ -686,7 +680,8 @@ public class ControlFlowGraph implements CodeConstants {
ExceptionRangeCFG newRange = new ExceptionRangeCFG(lstNewRange, ExceptionRangeCFG newRange = new ExceptionRangeCFG(lstNewRange,
(BasicBlock)mapNewNodes.get(range.getHandler().id), range.getExceptionTypes()); (BasicBlock)mapNewNodes.get(range.getHandler().id), range.getExceptionTypes());
exceptions.add(newRange); exceptions.add(newRange);
} else { }
else {
lstNewRange = lstRange; lstNewRange = lstRange;
} }
@ -695,7 +690,6 @@ public class ControlFlowGraph implements CodeConstants {
} }
} }
} }
} }
private void removeJsr(StructMethod mt) { private void removeJsr(StructMethod mt) {
@ -730,7 +724,6 @@ public class ControlFlowGraph implements CodeConstants {
i--; i--;
} }
} }
} }
block.mark = 1; block.mark = 1;
@ -753,7 +746,6 @@ public class ControlFlowGraph implements CodeConstants {
removeJsrInstructions(pool, suc, point); removeJsrInstructions(pool, suc, point);
} }
} }
} }
private void setFirstAndLastBlocks() { private void setFirstAndLastBlocks() {
@ -818,7 +810,6 @@ public class ControlFlowGraph implements CodeConstants {
stackNode.removeLast(); stackNode.removeLast();
} }
} }
} }
@ -883,5 +874,4 @@ public class ControlFlowGraph implements CodeConstants {
public void setFinallyExits(HashSet<BasicBlock> finallyExits) { public void setFinallyExits(HashSet<BasicBlock> finallyExits) {
this.finallyExits = finallyExits; this.finallyExits = finallyExits;
} }
} }

@ -1,26 +1,27 @@
/* /*
* Fernflower - The Analytical Java Decompiler * Copyright 2000-2014 JetBrains s.r.o.
* http://www.reversed-java.com
* *
* (C) 2008 - 2010, Stiver * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* *
* This software is NEITHER public domain NOR free software * http://www.apache.org/licenses/LICENSE-2.0
* as per GNU License. See license.txt for more details.
* *
* This software is distributed WITHOUT ANY WARRANTY; without * Unless required by applicable law or agreed to in writing, software
* even the implied warranty of MERCHANTABILITY or FITNESS FOR * distributed under the License is distributed on an "AS IS" BASIS,
* A PARTICULAR PURPOSE. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/ */
package org.jetbrains.java.decompiler.code.cfg; package org.jetbrains.java.decompiler.code.cfg;
import org.jetbrains.java.decompiler.main.DecompilerContext;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashSet; import java.util.HashSet;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import org.jetbrains.java.decompiler.main.DecompilerContext;
public class ExceptionRangeCFG { public class ExceptionRangeCFG {
private List<BasicBlock> protectedRange = new ArrayList<BasicBlock>(); // FIXME: replace with set private List<BasicBlock> protectedRange = new ArrayList<BasicBlock>(); // FIXME: replace with set
@ -92,7 +93,8 @@ public class ExceptionRangeCFG {
if (exceptionType == null) { if (exceptionType == null) {
this.exceptionTypes = null; this.exceptionTypes = null;
} else { }
else {
this.exceptionTypes.add(exceptionType); this.exceptionTypes.add(exceptionType);
} }
} }
@ -124,5 +126,4 @@ public class ExceptionRangeCFG {
// public void setExceptionType(String exceptionType) { // public void setExceptionType(String exceptionType) {
// this.exceptionType = exceptionType; // this.exceptionType = exceptionType;
// } // }
} }

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,10 +1,25 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction;
import java.io.DataOutputStream; import java.io.DataOutputStream;
import java.io.IOException; import java.io.IOException;
import org.jetbrains.java.decompiler.code.Instruction;
public class ALOAD extends Instruction { public class ALOAD extends Instruction {
private static int[] opcodes = new int[]{opc_aload_0, opc_aload_1, opc_aload_2, opc_aload_3}; private static int[] opcodes = new int[]{opc_aload_0, opc_aload_1, opc_aload_2, opc_aload_3};
@ -18,10 +33,12 @@ public class ALOAD extends Instruction {
out.writeByte(opc_aload); out.writeByte(opc_aload);
if (wide) { if (wide) {
out.writeShort(index); out.writeShort(index);
} else { }
else {
out.writeByte(index); out.writeByte(index);
} }
} else { }
else {
out.writeByte(opcodes[index]); out.writeByte(opcodes[index]);
} }
} }
@ -31,13 +48,13 @@ public class ALOAD extends Instruction {
if (index > 3) { if (index > 3) {
if (wide) { if (wide) {
return 4; return 4;
} else { }
else {
return 2; return 2;
} }
} else { }
else {
return 1; return 1;
} }
} }
} }

@ -1,10 +1,25 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction;
import java.io.DataOutputStream; import java.io.DataOutputStream;
import java.io.IOException; import java.io.IOException;
import org.jetbrains.java.decompiler.code.Instruction;
public class ANEWARRAY extends Instruction { public class ANEWARRAY extends Instruction {
public void writeToStream(DataOutputStream out, int offset) throws IOException { public void writeToStream(DataOutputStream out, int offset) throws IOException {
@ -15,5 +30,4 @@ public class ANEWARRAY extends Instruction {
public int length() { public int length() {
return 3; return 3;
} }
} }

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,10 +1,25 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction;
import java.io.DataOutputStream; import java.io.DataOutputStream;
import java.io.IOException; import java.io.IOException;
import org.jetbrains.java.decompiler.code.Instruction;
public class ASTORE extends Instruction { public class ASTORE extends Instruction {
private static int[] opcodes = new int[]{opc_astore_0, opc_astore_1, opc_astore_2, opc_astore_3}; private static int[] opcodes = new int[]{opc_astore_0, opc_astore_1, opc_astore_2, opc_astore_3};
@ -18,10 +33,12 @@ public class ASTORE extends Instruction {
out.writeByte(opc_astore); out.writeByte(opc_astore);
if (wide) { if (wide) {
out.writeShort(index); out.writeShort(index);
} else { }
else {
out.writeByte(index); out.writeByte(index);
} }
} else { }
else {
out.writeByte(opcodes[index]); out.writeByte(opcodes[index]);
} }
} }
@ -31,12 +48,13 @@ public class ASTORE extends Instruction {
if (index > 3) { if (index > 3) {
if (wide) { if (wide) {
return 4; return 4;
} else { }
else {
return 2; return 2;
} }
} else { }
else {
return 1; return 1;
} }
} }
} }

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,20 +1,37 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction;
import java.io.DataOutputStream; import java.io.DataOutputStream;
import java.io.IOException; import java.io.IOException;
import org.jetbrains.java.decompiler.code.Instruction;
public class BIPUSH extends Instruction { public class BIPUSH extends Instruction {
private static int[] opcodes = new int[] {opc_iconst_m1,opc_iconst_0,opc_iconst_1,opc_iconst_2,opc_iconst_3,opc_iconst_4,opc_iconst_5}; private static int[] opcodes =
new int[]{opc_iconst_m1, opc_iconst_0, opc_iconst_1, opc_iconst_2, opc_iconst_3, opc_iconst_4, opc_iconst_5};
public void writeToStream(DataOutputStream out, int offset) throws IOException { public void writeToStream(DataOutputStream out, int offset) throws IOException {
int value = getOperand(0); int value = getOperand(0);
if (value < -1 || value > 5) { if (value < -1 || value > 5) {
out.writeByte(opc_bipush); out.writeByte(opc_bipush);
out.writeByte(value); out.writeByte(value);
} else { }
else {
out.writeByte(opcodes[value + 1]); out.writeByte(opcodes[value + 1]);
} }
} }
@ -23,7 +40,8 @@ public class BIPUSH extends Instruction {
int value = getOperand(0); int value = getOperand(0);
if (value < -1 || value > 5) { if (value < -1 || value > 5) {
return 2; return 2;
} else { }
else {
return 1; return 1;
} }
} }

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,10 +1,25 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction;
import java.io.DataOutputStream; import java.io.DataOutputStream;
import java.io.IOException; import java.io.IOException;
import org.jetbrains.java.decompiler.code.Instruction;
public class CHECKCAST extends Instruction { public class CHECKCAST extends Instruction {
public void writeToStream(DataOutputStream out, int offset) throws IOException { public void writeToStream(DataOutputStream out, int offset) throws IOException {
@ -15,6 +30,5 @@ public class CHECKCAST extends Instruction {
public int length() { public int length() {
return 3; return 3;
} }
} }

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,10 +1,25 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction;
import java.io.DataOutputStream; import java.io.DataOutputStream;
import java.io.IOException; import java.io.IOException;
import org.jetbrains.java.decompiler.code.Instruction;
public class DLOAD extends Instruction { public class DLOAD extends Instruction {
private static int[] opcodes = new int[]{opc_dload_0, opc_dload_1, opc_dload_2, opc_dload_3}; private static int[] opcodes = new int[]{opc_dload_0, opc_dload_1, opc_dload_2, opc_dload_3};
@ -18,10 +33,12 @@ public class DLOAD extends Instruction {
out.writeByte(opc_dload); out.writeByte(opc_dload);
if (wide) { if (wide) {
out.writeShort(index); out.writeShort(index);
} else { }
else {
out.writeByte(index); out.writeByte(index);
} }
} else { }
else {
out.writeByte(opcodes[index]); out.writeByte(opcodes[index]);
} }
} }
@ -31,12 +48,13 @@ public class DLOAD extends Instruction {
if (index > 3) { if (index > 3) {
if (wide) { if (wide) {
return 4; return 4;
} else { }
else {
return 2; return 2;
} }
} else { }
else {
return 1; return 1;
} }
} }
} }

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,10 +1,25 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction;
import java.io.DataOutputStream; import java.io.DataOutputStream;
import java.io.IOException; import java.io.IOException;
import org.jetbrains.java.decompiler.code.Instruction;
public class DSTORE extends Instruction { public class DSTORE extends Instruction {
private static int[] opcodes = new int[]{opc_dstore_0, opc_dstore_1, opc_dstore_2, opc_dstore_3}; private static int[] opcodes = new int[]{opc_dstore_0, opc_dstore_1, opc_dstore_2, opc_dstore_3};
@ -18,10 +33,12 @@ public class DSTORE extends Instruction {
out.writeByte(opc_dstore); out.writeByte(opc_dstore);
if (wide) { if (wide) {
out.writeShort(index); out.writeShort(index);
} else { }
else {
out.writeByte(index); out.writeByte(index);
} }
} else { }
else {
out.writeByte(opcodes[index]); out.writeByte(opcodes[index]);
} }
} }
@ -31,10 +48,12 @@ public class DSTORE extends Instruction {
if (index > 3) { if (index > 3) {
if (wide) { if (wide) {
return 4; return 4;
} else { }
else {
return 2; return 2;
} }
} else { }
else {
return 1; return 1;
} }
} }

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,10 +1,25 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction;
import java.io.DataOutputStream; import java.io.DataOutputStream;
import java.io.IOException; import java.io.IOException;
import org.jetbrains.java.decompiler.code.Instruction;
public class FLOAD extends Instruction { public class FLOAD extends Instruction {
private static int[] opcodes = new int[]{opc_fload_0, opc_fload_1, opc_fload_2, opc_fload_3}; private static int[] opcodes = new int[]{opc_fload_0, opc_fload_1, opc_fload_2, opc_fload_3};
@ -18,10 +33,12 @@ public class FLOAD extends Instruction {
out.writeByte(opc_fload); out.writeByte(opc_fload);
if (wide) { if (wide) {
out.writeShort(index); out.writeShort(index);
} else { }
else {
out.writeByte(index); out.writeByte(index);
} }
} else { }
else {
out.writeByte(opcodes[index]); out.writeByte(opcodes[index]);
} }
} }
@ -31,12 +48,13 @@ public class FLOAD extends Instruction {
if (index > 3) { if (index > 3) {
if (wide) { if (wide) {
return 4; return 4;
} else { }
else {
return 2; return 2;
} }
} else { }
else {
return 1; return 1;
} }
} }
} }

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,10 +1,25 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction;
import java.io.DataOutputStream; import java.io.DataOutputStream;
import java.io.IOException; import java.io.IOException;
import org.jetbrains.java.decompiler.code.Instruction;
public class FSTORE extends Instruction { public class FSTORE extends Instruction {
private static int[] opcodes = new int[]{opc_fstore_0, opc_fstore_1, opc_fstore_2, opc_fstore_3}; private static int[] opcodes = new int[]{opc_fstore_0, opc_fstore_1, opc_fstore_2, opc_fstore_3};
@ -18,10 +33,12 @@ public class FSTORE extends Instruction {
out.writeByte(opc_fstore); out.writeByte(opc_fstore);
if (wide) { if (wide) {
out.writeShort(index); out.writeShort(index);
} else { }
else {
out.writeByte(index); out.writeByte(index);
} }
} else { }
else {
out.writeByte(opcodes[index]); out.writeByte(opcodes[index]);
} }
} }
@ -31,10 +48,12 @@ public class FSTORE extends Instruction {
if (index > 3) { if (index > 3) {
if (wide) { if (wide) {
return 4; return 4;
} else { }
else {
return 2; return 2;
} }
} else { }
else {
return 1; return 1;
} }
} }

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,10 +1,25 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction;
import java.io.DataOutputStream; import java.io.DataOutputStream;
import java.io.IOException; import java.io.IOException;
import org.jetbrains.java.decompiler.code.Instruction;
public class GETFIELD extends Instruction { public class GETFIELD extends Instruction {
public void writeToStream(DataOutputStream out, int offset) throws IOException { public void writeToStream(DataOutputStream out, int offset) throws IOException {

@ -1,10 +1,25 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction;
import java.io.DataOutputStream; import java.io.DataOutputStream;
import java.io.IOException; import java.io.IOException;
import org.jetbrains.java.decompiler.code.Instruction;
public class GETSTATIC extends Instruction { public class GETSTATIC extends Instruction {
public void writeToStream(DataOutputStream out, int offset) throws IOException { public void writeToStream(DataOutputStream out, int offset) throws IOException {
@ -15,5 +30,4 @@ public class GETSTATIC extends Instruction {
public int length() { public int length() {
return 3; return 3;
} }
} }

@ -1,10 +1,25 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.JumpInstruction;
import java.io.DataOutputStream; import java.io.DataOutputStream;
import java.io.IOException; import java.io.IOException;
import org.jetbrains.java.decompiler.code.JumpInstruction;
public class GOTO extends JumpInstruction { public class GOTO extends JumpInstruction {
public void writeToStream(DataOutputStream out, int offset) throws IOException { public void writeToStream(DataOutputStream out, int offset) throws IOException {
@ -12,7 +27,8 @@ public class GOTO extends JumpInstruction {
if (operand < -32768 || operand > 32767) { if (operand < -32768 || operand > 32767) {
out.writeByte(opc_goto_w); out.writeByte(opc_goto_w);
out.writeInt(operand); out.writeInt(operand);
} else { }
else {
out.writeByte(opc_goto); out.writeByte(opc_goto);
out.writeShort(operand); out.writeShort(operand);
} }
@ -22,9 +38,9 @@ public class GOTO extends JumpInstruction {
int operand = getOperand(0); int operand = getOperand(0);
if (operand < -32768 || operand > 32767) { if (operand < -32768 || operand > 32767) {
return 5; return 5;
} else { }
else {
return 3; return 3;
} }
} }
} }

@ -1,10 +1,25 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.JumpInstruction;
import java.io.DataOutputStream; import java.io.DataOutputStream;
import java.io.IOException; import java.io.IOException;
import org.jetbrains.java.decompiler.code.JumpInstruction;
public class GOTO_W extends JumpInstruction { public class GOTO_W extends JumpInstruction {
public void writeToStream(DataOutputStream out, int offset) throws IOException { public void writeToStream(DataOutputStream out, int offset) throws IOException {
@ -15,5 +30,4 @@ public class GOTO_W extends JumpInstruction {
public int length() { public int length() {
return 5; return 5;
} }
} }

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,3 +1,18 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.Instruction; import org.jetbrains.java.decompiler.code.Instruction;

@ -1,10 +1,25 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.JumpInstruction;
import java.io.DataOutputStream; import java.io.DataOutputStream;
import java.io.IOException; import java.io.IOException;
import org.jetbrains.java.decompiler.code.JumpInstruction;
public class IFEQ extends JumpInstruction { public class IFEQ extends JumpInstruction {
public void writeToStream(DataOutputStream out, int offset) throws IOException { public void writeToStream(DataOutputStream out, int offset) throws IOException {
@ -15,5 +30,4 @@ public class IFEQ extends JumpInstruction {
public int length() { public int length() {
return 3; return 3;
} }
} }

@ -1,10 +1,25 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.JumpInstruction;
import java.io.DataOutputStream; import java.io.DataOutputStream;
import java.io.IOException; import java.io.IOException;
import org.jetbrains.java.decompiler.code.JumpInstruction;
public class IFGE extends JumpInstruction { public class IFGE extends JumpInstruction {
public void writeToStream(DataOutputStream out, int offset) throws IOException { public void writeToStream(DataOutputStream out, int offset) throws IOException {
@ -15,5 +30,4 @@ public class IFGE extends JumpInstruction {
public int length() { public int length() {
return 3; return 3;
} }
} }

@ -1,10 +1,25 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.JumpInstruction;
import java.io.DataOutputStream; import java.io.DataOutputStream;
import java.io.IOException; import java.io.IOException;
import org.jetbrains.java.decompiler.code.JumpInstruction;
public class IFGT extends JumpInstruction { public class IFGT extends JumpInstruction {
public void writeToStream(DataOutputStream out, int offset) throws IOException { public void writeToStream(DataOutputStream out, int offset) throws IOException {
@ -15,5 +30,4 @@ public class IFGT extends JumpInstruction {
public int length() { public int length() {
return 3; return 3;
} }
} }

@ -1,10 +1,25 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.JumpInstruction;
import java.io.DataOutputStream; import java.io.DataOutputStream;
import java.io.IOException; import java.io.IOException;
import org.jetbrains.java.decompiler.code.JumpInstruction;
public class IFLE extends JumpInstruction { public class IFLE extends JumpInstruction {
public void writeToStream(DataOutputStream out, int offset) throws IOException { public void writeToStream(DataOutputStream out, int offset) throws IOException {
@ -15,5 +30,4 @@ public class IFLE extends JumpInstruction {
public int length() { public int length() {
return 3; return 3;
} }
} }

@ -1,10 +1,25 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.JumpInstruction;
import java.io.DataOutputStream; import java.io.DataOutputStream;
import java.io.IOException; import java.io.IOException;
import org.jetbrains.java.decompiler.code.JumpInstruction;
public class IFLT extends JumpInstruction { public class IFLT extends JumpInstruction {
public void writeToStream(DataOutputStream out, int offset) throws IOException { public void writeToStream(DataOutputStream out, int offset) throws IOException {
@ -15,5 +30,4 @@ public class IFLT extends JumpInstruction {
public int length() { public int length() {
return 3; return 3;
} }
} }

@ -1,10 +1,25 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.JumpInstruction;
import java.io.DataOutputStream; import java.io.DataOutputStream;
import java.io.IOException; import java.io.IOException;
import org.jetbrains.java.decompiler.code.JumpInstruction;
public class IFNE extends JumpInstruction { public class IFNE extends JumpInstruction {
public void writeToStream(DataOutputStream out, int offset) throws IOException { public void writeToStream(DataOutputStream out, int offset) throws IOException {
@ -15,5 +30,4 @@ public class IFNE extends JumpInstruction {
public int length() { public int length() {
return 3; return 3;
} }
} }

@ -1,10 +1,25 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.JumpInstruction;
import java.io.DataOutputStream; import java.io.DataOutputStream;
import java.io.IOException; import java.io.IOException;
import org.jetbrains.java.decompiler.code.JumpInstruction;
public class IFNONNULL extends JumpInstruction { public class IFNONNULL extends JumpInstruction {
public void writeToStream(DataOutputStream out, int offset) throws IOException { public void writeToStream(DataOutputStream out, int offset) throws IOException {
@ -15,5 +30,4 @@ public class IFNONNULL extends JumpInstruction {
public int length() { public int length() {
return 3; return 3;
} }
} }

@ -1,10 +1,25 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.JumpInstruction;
import java.io.DataOutputStream; import java.io.DataOutputStream;
import java.io.IOException; import java.io.IOException;
import org.jetbrains.java.decompiler.code.JumpInstruction;
public class IFNULL extends JumpInstruction { public class IFNULL extends JumpInstruction {
public void writeToStream(DataOutputStream out, int offset) throws IOException { public void writeToStream(DataOutputStream out, int offset) throws IOException {
@ -15,5 +30,4 @@ public class IFNULL extends JumpInstruction {
public int length() { public int length() {
return 3; return 3;
} }
} }

@ -1,10 +1,25 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.JumpInstruction;
import java.io.DataOutputStream; import java.io.DataOutputStream;
import java.io.IOException; import java.io.IOException;
import org.jetbrains.java.decompiler.code.JumpInstruction;
public class IF_ACMPEQ extends JumpInstruction { public class IF_ACMPEQ extends JumpInstruction {
public void writeToStream(DataOutputStream out, int offset) throws IOException { public void writeToStream(DataOutputStream out, int offset) throws IOException {
@ -15,6 +30,5 @@ public class IF_ACMPEQ extends JumpInstruction {
public int length() { public int length() {
return 3; return 3;
} }
} }

@ -1,10 +1,25 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.JumpInstruction;
import java.io.DataOutputStream; import java.io.DataOutputStream;
import java.io.IOException; import java.io.IOException;
import org.jetbrains.java.decompiler.code.JumpInstruction;
public class IF_ACMPNE extends JumpInstruction { public class IF_ACMPNE extends JumpInstruction {
public void writeToStream(DataOutputStream out, int offset) throws IOException { public void writeToStream(DataOutputStream out, int offset) throws IOException {
@ -15,5 +30,4 @@ public class IF_ACMPNE extends JumpInstruction {
public int length() { public int length() {
return 3; return 3;
} }
} }

@ -1,10 +1,25 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.JumpInstruction;
import java.io.DataOutputStream; import java.io.DataOutputStream;
import java.io.IOException; import java.io.IOException;
import org.jetbrains.java.decompiler.code.JumpInstruction;
public class IF_ICMPEQ extends JumpInstruction { public class IF_ICMPEQ extends JumpInstruction {
public void writeToStream(DataOutputStream out, int offset) throws IOException { public void writeToStream(DataOutputStream out, int offset) throws IOException {
@ -15,5 +30,4 @@ public class IF_ICMPEQ extends JumpInstruction {
public int length() { public int length() {
return 3; return 3;
} }
} }

@ -1,10 +1,25 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.JumpInstruction;
import java.io.DataOutputStream; import java.io.DataOutputStream;
import java.io.IOException; import java.io.IOException;
import org.jetbrains.java.decompiler.code.JumpInstruction;
public class IF_ICMPGE extends JumpInstruction { public class IF_ICMPGE extends JumpInstruction {
public void writeToStream(DataOutputStream out, int offset) throws IOException { public void writeToStream(DataOutputStream out, int offset) throws IOException {
@ -15,5 +30,4 @@ public class IF_ICMPGE extends JumpInstruction {
public int length() { public int length() {
return 3; return 3;
} }
} }

@ -1,10 +1,25 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.java.decompiler.code.instructions; package org.jetbrains.java.decompiler.code.instructions;
import org.jetbrains.java.decompiler.code.JumpInstruction;
import java.io.DataOutputStream; import java.io.DataOutputStream;
import java.io.IOException; import java.io.IOException;
import org.jetbrains.java.decompiler.code.JumpInstruction;
public class IF_ICMPGT extends JumpInstruction { public class IF_ICMPGT extends JumpInstruction {
public void writeToStream(DataOutputStream out, int offset) throws IOException { public void writeToStream(DataOutputStream out, int offset) throws IOException {
@ -15,5 +30,4 @@ public class IF_ICMPGT extends JumpInstruction {
public int length() { public int length() {
return 3; return 3;
} }
} }

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

Loading…
Cancel
Save