diff graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/CheckCastReduction.java @ 18416:0c6504598b65

StampTool: add more methods to create object stamps to avoid using too many boolean arguments, add some javadoc, use them.
author Gilles Duboscq <duboscq@ssw.jku.at>
date Wed, 19 Nov 2014 11:36:48 +0100
parents 7716c6993546
children ca81508f2a19
line wrap: on
line diff
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/CheckCastReduction.java	Wed Nov 19 13:32:05 2014 +0100
+++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/CheckCastReduction.java	Wed Nov 19 11:36:48 2014 +0100
@@ -206,7 +206,7 @@
 
         ObjectStamp subjectStamp = (ObjectStamp) subject.stamp();
         final ResolvedJavaType toType = checkCast.type();
-        ObjectStamp resultStamp = (ObjectStamp) StampFactory.declared(toType, false, true);
+        ObjectStamp resultStamp = (ObjectStamp) StampFactory.declaredTrusted(toType);
         JavaTypeProfile profile = checkCast.profile();
 
         assert FlowUtil.isLegalObjectStamp(subjectStamp);
@@ -214,13 +214,13 @@
 
         /*
          * Depending on what is known about the subject:
-         *
+         * 
          * (a) definitely-non-null
-         *
+         * 
          * (b) null-not-seen-in-profiling
-         *
+         * 
          * (c) runtime-null-check-needed
-         *
+         * 
          * the condition (of the cast-guard to be emitted) and the stamp (of the PiNode to be
          * emitted) are going to be different. Each of the three branches below deals with one of
          * the cases above.