Mercurial > hg > truffle
diff 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 |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/CompilerDirectives.java Thu Apr 25 18:49:15 2013 +0200 +++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/CompilerDirectives.java Thu Apr 25 19:43:49 2013 +0200 @@ -22,6 +22,7 @@ */ package com.oracle.truffle.api; +import java.lang.annotation.*; import java.util.concurrent.*; /** @@ -85,4 +86,13 @@ */ public static void bailout(String reason) { } + + /** + * Marks fields that should be considered final for a Truffle compilation although they are not + * final while executing in the interpreter. + */ + @Retention(RetentionPolicy.RUNTIME) + @Target({ElementType.FIELD}) + public @interface CompilationFinal { + } }