# HG changeset patch # User Thomas Wuerthinger # Date 1381789903 -7200 # Node ID a9837a03127e0bf3614c172185ae75ccefb92150 # Parent 53297646b01108494542eaaab163a4495f41f7ae Fix wrong modification of ReplacementsImpl macro node method handling. diff -r 53297646b011 -r a9837a03127e graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/InvokeNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/InvokeNode.java Mon Oct 14 23:30:05 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/InvokeNode.java Tue Oct 15 00:31:43 2013 +0200 @@ -185,7 +185,7 @@ @Override public void setDeoptimizationState(FrameState f) { - throw new IllegalStateException(); + throw new IllegalStateException("Cannot set deoptimization state " + f + " for invoke " + this); } @Override diff -r 53297646b011 -r a9837a03127e graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/ReplacementsImpl.java --- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/ReplacementsImpl.java Mon Oct 14 23:30:05 2013 +0200 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/ReplacementsImpl.java Tue Oct 15 00:31:43 2013 +0200 @@ -402,7 +402,6 @@ } else { StructuredGraph intrinsicGraph = InliningUtil.getIntrinsicGraph(ReplacementsImpl.this, callee); if ((callTarget.invokeKind() == InvokeKind.Static || callTarget.invokeKind() == InvokeKind.Special) && - InliningUtil.getMacroNodeClass(ReplacementsImpl.this, callee) == null && (policy.shouldInline(callee, methodToParse) || (intrinsicGraph != null && policy.shouldUseReplacement(callee, methodToParse)))) { StructuredGraph targetGraph; if (intrinsicGraph != null && policy.shouldUseReplacement(callee, methodToParse)) { diff -r 53297646b011 -r a9837a03127e graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/substitutions/CompilerDirectivesSubstitutions.java --- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/substitutions/CompilerDirectivesSubstitutions.java Mon Oct 14 23:30:05 2013 +0200 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/substitutions/CompilerDirectivesSubstitutions.java Tue Oct 15 00:31:43 2013 +0200 @@ -69,8 +69,8 @@ public static native Object unsafeCast(Object value, Class clazz, boolean condition); @MethodSubstitution - public static MaterializedFrame unsafeFrameCast(MaterializedFrame value) { - return CompilerDirectives.unsafeCast(value, FrameWithoutBoxing.class, true); + private static Class getUnsafeFrameType() { + return FrameWithoutBoxing.class; } @MacroSubstitution(macro = CustomizedUnsafeLoadMacroNode.class, isStatic = true) diff -r 53297646b011 -r a9837a03127e graal/com.oracle.truffle.api/src/com/oracle/truffle/api/CompilerDirectives.java --- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/CompilerDirectives.java Mon Oct 14 23:30:05 2013 +0200 +++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/CompilerDirectives.java Tue Oct 15 00:31:43 2013 +0200 @@ -173,7 +173,11 @@ * @return the value to be casted to the new type */ public static MaterializedFrame unsafeFrameCast(MaterializedFrame value) { - return value; + return unsafeCast(value, getUnsafeFrameType(), true); + } + + private static Class getUnsafeFrameType() { + return MaterializedFrame.class; } /**