Package com.oracle.truffle.api
Annotation Interface CompilerDirectives.CompilationFinal
- Enclosing class:
CompilerDirectives
Marks fields that should be considered final for a Truffle compilation although they are not
final while executing in the interpreter. If the field type is an array type, the compiler
considers reads with a constant index as constants.
- Since:
- 0.8 or earlier
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionint
Specifies the number of array dimensions to be marked as compilation final.
-
Element Details
-
dimensions
int dimensionsSpecifies the number of array dimensions to be marked as compilation final. This value should be specified for all array-typed compilation-final fields and should be left unspecified for other field types for which it has no meaning. The allowed range is from 0 to the number of declared array dimensions (inclusive). Specifically, adimensions
value of 0 marks only the reference to the (outermost) array as final but not its elements, a value of 1 marks the outermost array and all its elements as final but not the elements of any nested arrays. For compatibility reasons, array-typed fields without an explicitdimensions
parameter default to the number of array dimensions declared in the field type.- Since:
- 0.14
- Default:
-1
-