# HG changeset patch # User Michael Haupt # Date 1384762290 -3600 # Node ID 3e013f4512de13653584be1fa9d12df1bf0bba81 # Parent 99769479f9ce8dbcba945b165c7621ffdef933f1 temporary addition of CompilerDirectives.transferToInterpreterAndInvalidate() diff -r 99769479f9ce -r 3e013f4512de 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 Fri Nov 15 11:20:18 2013 +0100 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/substitutions/CompilerDirectivesSubstitutions.java Mon Nov 18 09:11:30 2013 +0100 @@ -44,6 +44,11 @@ } @MethodSubstitution + public static void transferToInterpreterAndInvalidate() { + DeoptimizeNode.deopt(DeoptimizationAction.InvalidateReprofile, DeoptimizationReason.UnreachedCode); + } + + @MethodSubstitution public static boolean inInterpreter() { return false; } diff -r 99769479f9ce -r 3e013f4512de 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 Fri Nov 15 11:20:18 2013 +0100 +++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/CompilerDirectives.java Mon Nov 18 09:11:30 2013 +0100 @@ -68,6 +68,13 @@ } /** + * Directive for the compiler to discontinue compilation at this code position and instead + * insert a transfer to the interpreter, invalidating the currently executing machine code. + */ + public static void transferToInterpreterAndInvalidate() { + } + + /** * Returns a boolean value indicating whether the method is executed in the interpreter. * * @return {@code true} when executed in the interpreter, {@code false} in compiled code.