From 863bb2820395fb38a3a3385a5eb1b14ee0992767 Mon Sep 17 00:00:00 2001 From: jochen Date: Thu, 17 Jun 1999 11:05:48 +0000 Subject: [PATCH] bug fix for jikes check null git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@854 379699f6-c40d-0410-875b-85095c16579e --- jode/jode/flow/CreateCheckNull.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/jode/jode/flow/CreateCheckNull.java b/jode/jode/flow/CreateCheckNull.java index 97a0ba6..7729fe3 100644 --- a/jode/jode/flow/CreateCheckNull.java +++ b/jode/jode/flow/CreateCheckNull.java @@ -32,7 +32,7 @@ public class CreateCheckNull { * * jikes: * DUP - * if (!POP != null) + * if (POP == null) * throw null; */ @@ -80,8 +80,10 @@ public class CreateCheckNull { * Transforms the code *
      *   DUP
-     *   if (POP == null)
+     *   if (POP == null) {
      *       throw null
+     *       GOTO END_OF_METHOD  // not checked
+     *   }
      * 
* to a CheckNullOperator. This is what jikes generates when it * calls ".new" on an operand. @@ -102,7 +104,7 @@ public class CreateCheckNull { if (!(ifBlock.cond instanceof CompareUnaryOperator)) return false; CompareUnaryOperator cmpOp = (CompareUnaryOperator) ifBlock.cond; - if (cmpOp.getOperatorIndex() != Operator.NOTEQUALS_OP + if (cmpOp.getOperatorIndex() != Operator.EQUALS_OP || !(cmpOp.getCompareType().isOfType(Type.tUObject))) return false;