bug fix for jikes check null

git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@854 379699f6-c40d-0410-875b-85095c16579e
stable
jochen 26 years ago
parent e46d303867
commit 863bb28203
  1. 8
      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
* <pre>
* DUP
* if (POP == null)
* if (POP == null) {
* throw null
* GOTO END_OF_METHOD // not checked
* }
* </pre>
* 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;

Loading…
Cancel
Save