Mercurial > hg > graal-compiler
changeset 12770:3e013f4512de
temporary addition of CompilerDirectives.transferToInterpreterAndInvalidate()
author | Michael Haupt <michael.haupt@oracle.com> |
---|---|
date | Mon, 18 Nov 2013 09:11:30 +0100 |
parents | 99769479f9ce |
children | d3f5a5b1d99c a7990d87c26e |
files | graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/substitutions/CompilerDirectivesSubstitutions.java graal/com.oracle.truffle.api/src/com/oracle/truffle/api/CompilerDirectives.java |
diffstat | 2 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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; }
--- 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.