Mercurial > hg > graal-compiler
changeset 8602:db2b8fbbf8fc
Merge.
author | Roland Schatz <roland.schatz@oracle.com> |
---|---|
date | Tue, 02 Apr 2013 12:57:58 +0200 |
parents | 4d75c3833c54 (current diff) 5a40a5509bac (diff) |
children | 32f9ec7963f9 |
files | |
diffstat | 3 files changed, 10 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/GraalCompilerTest.java Tue Apr 02 11:48:46 2013 +0200 +++ b/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/GraalCompilerTest.java Tue Apr 02 12:57:58 2013 +0200 @@ -71,11 +71,15 @@ protected final Backend backend; public GraalCompilerTest() { - DebugEnvironment.initialize(System.out); this.runtime = Graal.getRequiredCapability(GraalCodeCacheProvider.class); this.backend = Graal.getRequiredCapability(Backend.class); } + @BeforeClass + public static void initializeDebgging() { + DebugEnvironment.initialize(System.out); + } + protected void assertEquals(StructuredGraph expected, StructuredGraph graph) { String expectedString = getCanonicalGraphString(expected); String actualString = getCanonicalGraphString(graph);
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/NewObjectSnippets.java Tue Apr 02 11:48:46 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/NewObjectSnippets.java Tue Apr 02 12:57:58 2013 +0200 @@ -91,7 +91,11 @@ } result = memory.toObject(); } - return unsafeCast(verifyOop(result), StampFactory.forNodeIntrinsic()); + /** + * 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); } @Snippet
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnsafeCastNode.java Tue Apr 02 11:48:46 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnsafeCastNode.java Tue Apr 02 12:57:58 2013 +0200 @@ -112,9 +112,6 @@ } @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")