changeset 8604:1f83d8994b7a

unsafeCast: remove anchor node in NewObjectSnippets as it is unnecessary due to the dependency to `result'. also remove a javadoc tag in a comment
author Bernhard Urban <bernhard.urban@jku.at>
date Tue, 02 Apr 2013 14:08:26 +0200
parents 32f9ec7963f9
children 1d12b11e80c0
files graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/CheckCastSnippets.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/NewObjectSnippets.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnsafeCastNode.java
diffstat 3 files changed, 6 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/CheckCastSnippets.java	Tue Apr 02 14:51:59 2013 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/CheckCastSnippets.java	Tue Apr 02 14:08:26 2013 +0200
@@ -81,9 +81,8 @@
             }
             exactHit.inc();
         }
-        /**
-         * make sure that the unsafeCast is done *after* the check above,
-         * cf. {@link ReadAfterCheckCast}*/
+        /* make sure that the unsafeCast is done *after* the check above,
+         * cf. ReadAfterCheckCast */
         BeginNode anchorNode = BeginNode.anchor(StampFactory.forNodeIntrinsic());
         return unsafeCast(verifyOop(object), StampFactory.forNodeIntrinsic(), anchorNode);
     }
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/NewObjectSnippets.java	Tue Apr 02 14:51:59 2013 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/NewObjectSnippets.java	Tue Apr 02 14:08:26 2013 +0200
@@ -91,11 +91,7 @@
             }
             result = memory.toObject();
         }
-        /**
-         * make sure that the unsafeCast is anchored after initialization,
-         * cf. {@link ReadAfterCheckCast} and {@link CheckCastSnippets} */
-        BeginNode anchorNode = BeginNode.anchor(StampFactory.forNodeIntrinsic());
-        return unsafeCast(verifyOop(result), StampFactory.forNodeIntrinsic(), anchorNode);
+        return unsafeCast(verifyOop(result), StampFactory.forNodeIntrinsic());
     }
 
     @Snippet
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnsafeCastNode.java	Tue Apr 02 14:51:59 2013 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnsafeCastNode.java	Tue Apr 02 14:08:26 2013 +0200
@@ -112,6 +112,9 @@
     }
 
     @NodeIntrinsic
+    public static native <T> T unsafeCast(Object object, @ConstantNodeParameter Stamp stamp);
+
+    @NodeIntrinsic
     public static native <T> T unsafeCast(Object object, @ConstantNodeParameter Stamp stamp, ValueNode anchor);
 
     @SuppressWarnings("unused")