# HG changeset patch # User Bernhard Urban # Date 1364904506 -7200 # Node ID 1f83d8994b7a73e3c08fa37e1b12db169514eff7 # Parent 32f9ec7963f99993679d3b83cda777aeb2a6e6ba unsafeCast: remove anchor node in NewObjectSnippets as it is unnecessary due to the dependency to `result'. also remove a javadoc tag in a comment diff -r 32f9ec7963f9 -r 1f83d8994b7a graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/CheckCastSnippets.java --- 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); } diff -r 32f9ec7963f9 -r 1f83d8994b7a graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/NewObjectSnippets.java --- 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 diff -r 32f9ec7963f9 -r 1f83d8994b7a graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnsafeCastNode.java --- 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 unsafeCast(Object object, @ConstantNodeParameter Stamp stamp); + + @NodeIntrinsic public static native T unsafeCast(Object object, @ConstantNodeParameter Stamp stamp, ValueNode anchor); @SuppressWarnings("unused")