Mercurial > hg > truffle
changeset 9378:0e661acc3b4a
Fix null pointer exception in if reordering.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Sun, 28 Apr 2013 01:01:00 +0200 |
parents | 0f4041cc6be1 |
children | 217e82c93bde |
files | graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/IfNode.java |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/IfNode.java Sat Apr 27 22:03:54 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/IfNode.java Sun Apr 28 01:01:00 2013 +0200 @@ -197,7 +197,7 @@ if (b instanceof IsNullNode) { IsNullNode isNullNode = (IsNullNode) b; if (isNullNode.object() == instanceOfA.object()) { - if (instanceOfA.profile().getNullSeen() != TriState.FALSE) { + if (instanceOfA.profile() != null && instanceOfA.profile().getNullSeen() != TriState.FALSE) { instanceOfA.setProfile(new JavaTypeProfile(TriState.FALSE, instanceOfA.profile().getNotRecordedProbability(), instanceOfA.profile().getTypes())); } Debug.log("Can swap instanceof and isnull if");