changeset 22413:bc1e026ef5b1

Document @CompilationFinal semantics for arrays.
author Stefan Marr <stefan.marr@jku.at>
date Tue, 24 Nov 2015 14:53:48 +0100
parents e7c2d89ddf20
children 7015a77b222f
files truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/CompilerDirectives.java
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/CompilerDirectives.java	Mon Nov 23 19:29:26 2015 +0100
+++ b/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/CompilerDirectives.java	Tue Nov 24 14:53:48 2015 +0100
@@ -180,7 +180,8 @@
 
     /**
      * Marks fields that should be considered final for a Truffle compilation although they are not
-     * final while executing in the interpreter.
+     * final while executing in the interpreter. If the field type is an array type, the compiler
+     * considers reads with a constant index as constants.
      */
     @Retention(RetentionPolicy.RUNTIME)
     @Target({ElementType.FIELD})