Mercurial > hg > truffle
diff graal/com.oracle.truffle.api/src/com/oracle/truffle/api/CompilerDirectives.java @ 15230:df724f63f776
Truffle API: Introduce new compiler directive inCompiledCode() as the negation of inInterpreter().
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Fri, 18 Apr 2014 14:01:59 +0200 |
parents | f675818d9ad0 |
children | ada0a7729b6f |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/CompilerDirectives.java Fri Apr 18 02:13:14 2014 +0200 +++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/CompilerDirectives.java Fri Apr 18 14:01:59 2014 +0200 @@ -84,6 +84,15 @@ } /** + * Returns a boolean value indicating whether the method is executed in the compiled code. + * + * @return {@code false} when executed in the interpreter, {@code true} in compiled code. + */ + public static boolean inCompiledCode() { + return false; + } + + /** * Directive for the compiler that the given runnable should only be executed in the interpreter * and ignored in the compiled code. *