horrendous hack for TeX... Brian, please forgive me
[nestedvm.git] / src / org / ibex / nestedvm / ClassFileCompiler.java
index 451ece7..1f6ecd4 100644 (file)
@@ -265,8 +265,9 @@ public class ClassFileCompiler extends Compiler implements org.apache.bcel.Const
             a(fac.createCheckCast(new ObjectType("java.lang.Integer")));
             a(fac.createInvoke("java.lang.Integer","intValue",Type.INT,Type.NO_ARGS,INVOKEVIRTUAL));
             a(InstructionConstants.IRETURN);
-            bh.setTarget(a(InstructionConstants.ICONST_M1));
-            a(InstructionConstants.IRETURN);     
+            bh.setTarget(a(InstructionConstants.POP));
+            a(InstructionConstants.ICONST_M1);
+            a(InstructionConstants.IRETURN);
             lookupSymbol.setMaxLocals();
             lookupSymbol.setMaxStack();
             cl.addMethod(lookupSymbol.getMethod());
@@ -1261,13 +1262,7 @@ public class ClassFileCompiler extends Compiler implements org.apache.bcel.Const
                     
                     b1 = a(InstructionFactory.createBranchInstruction(IFGT,null));
                     a(d ? InstructionConstants.DCONST_0 : InstructionConstants.FCONST_0);
-                    if(d) {
-                        a(InstructionConstants.DUP2_X2);
-                        a(InstructionConstants.POP2);
-                    } else {
-                        a(InstructionConstants.POP);
-                    }
-                    a(InstructionConstants.DSUB);
+                    a(d ? InstructionConstants.DSUB : InstructionConstants.FSUB);
                     
                     b1.setTarget(setDouble(d));