comparison graal/com.oracle.truffle.api/src/com/oracle/truffle/api/CompilerDirectives.java @ 9313:6369d37b37d1

Added annotation CompilerDirectives.CompilationFinal for fields that should be considered final during compilation, but are not final while executing in the Truffle interpreter.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Thu, 25 Apr 2013 19:43:49 +0200
parents 159ac409c27a
children 1188b7c42196
comparison
equal deleted inserted replaced
9312:7ef126622c47 9313:6369d37b37d1
20 * or visit www.oracle.com if you need additional information or have any 20 * or visit www.oracle.com if you need additional information or have any
21 * questions. 21 * questions.
22 */ 22 */
23 package com.oracle.truffle.api; 23 package com.oracle.truffle.api;
24 24
25 import java.lang.annotation.*;
25 import java.util.concurrent.*; 26 import java.util.concurrent.*;
26 27
27 /** 28 /**
28 * Directives that influence the optimizations of the Truffle compiler. All of the operations have 29 * Directives that influence the optimizations of the Truffle compiler. All of the operations have
29 * no effect when executed in the Truffle interpreter. 30 * no effect when executed in the Truffle interpreter.
83 * 84 *
84 * @param reason the reason for the bailout 85 * @param reason the reason for the bailout
85 */ 86 */
86 public static void bailout(String reason) { 87 public static void bailout(String reason) {
87 } 88 }
89
90 /**
91 * Marks fields that should be considered final for a Truffle compilation although they are not
92 * final while executing in the interpreter.
93 */
94 @Retention(RetentionPolicy.RUNTIME)
95 @Target({ElementType.FIELD})
96 public @interface CompilationFinal {
97 }
88 } 98 }