Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.truffle.api/src/com/oracle/truffle/api/CompilerDirectives.java @ 11269:f00c85ee46a2
Truffle: add CompilerDirectives.inInterpreter()
author | Andreas Woess <andreas.woess@jku.at> |
---|---|
date | Thu, 08 Aug 2013 19:35:32 +0200 |
parents | d2055a110396 |
children | 494b818b527c |
comparison
equal
deleted
inserted
replaced
11268:ac59bdde1194 | 11269:f00c85ee46a2 |
---|---|
40 /** | 40 /** |
41 * Directive for the compiler to discontinue compilation at this code position and instead | 41 * Directive for the compiler to discontinue compilation at this code position and instead |
42 * insert a transfer to the interpreter. | 42 * insert a transfer to the interpreter. |
43 */ | 43 */ |
44 public static void transferToInterpreter() { | 44 public static void transferToInterpreter() { |
45 } | |
46 | |
47 /** | |
48 * Returns a boolean value indicating whether the method is executed in the interpreter. | |
49 * | |
50 * @return {@code true} when executed in the interpreter, {@code false} in compiled code. | |
51 */ | |
52 public static boolean inInterpreter() { | |
53 return true; | |
45 } | 54 } |
46 | 55 |
47 /** | 56 /** |
48 * Directive for the compiler that the given runnable should only be executed in the interpreter | 57 * Directive for the compiler that the given runnable should only be executed in the interpreter |
49 * and ignored in the compiled code. | 58 * and ignored in the compiled code. |