changeset 10877:b4e7f15cebe6

don't create InstanceOfNodes with different profiles during CheckCastNode lowering
author Lukas Stadler <lukas.stadler@jku.at>
date Thu, 25 Jul 2013 18:01:23 -0700
parents bf50b5daf874
children d9fcc82766da
files graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/CheckCastNode.java
diffstat 1 files changed, 2 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/CheckCastNode.java	Thu Jul 25 19:22:59 2013 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/CheckCastNode.java	Thu Jul 25 18:01:23 2013 -0700
@@ -118,16 +118,8 @@
                     condition = typeTest;
                     stamp = stamp.join(StampFactory.objectNonNull());
                 } else {
-                    double shortCircuitProbability;
-                    if (profile == null) {
-                        shortCircuitProbability = NOT_FREQUENT_PROBABILITY;
-                    } else {
-                        // Tell the instanceof it does not need to do a null check
-                        typeTest.setProfile(new JavaTypeProfile(TriState.FALSE, profile.getNotRecordedProbability(), profile.getTypes()));
-
-                        // TODO (ds) replace with probability of null-seen when available
-                        shortCircuitProbability = NOT_FREQUENT_PROBABILITY;
-                    }
+                    // TODO (ds) replace with probability of null-seen when available
+                    double shortCircuitProbability = NOT_FREQUENT_PROBABILITY;
                     condition = graph().unique(new ShortCircuitOrNode(graph().unique(new IsNullNode(object)), false, typeTest, false, shortCircuitProbability));
                 }
             }