comparison graal/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/FinalFieldTest.java @ 14991:64dcb92ee75a

Truffle: Change signature for Truffle calls from (PackedFrame, Arguments) to (Object[]).
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Sun, 06 Apr 2014 17:46:24 +0200
parents a08b8694f556
children
comparison
equal deleted inserted replaced
14989:a0dbb3628f2a 14991:64dcb92ee75a
28 import com.oracle.truffle.api.frame.*; 28 import com.oracle.truffle.api.frame.*;
29 import com.oracle.truffle.api.nodes.*; 29 import com.oracle.truffle.api.nodes.*;
30 30
31 /** 31 /**
32 * <h3>Using Final Fields in Node Classes</h3> 32 * <h3>Using Final Fields in Node Classes</h3>
33 * 33 *
34 * <p> 34 * <p>
35 * The usage of final fields in node classes is highly encouraged. It is beneficial for performance 35 * The usage of final fields in node classes is highly encouraged. It is beneficial for performance
36 * to declare every field that is not pointing to a child node as final. This gives the Truffle 36 * to declare every field that is not pointing to a child node as final. This gives the Truffle
37 * runtime an increased opportunity to optimize this node. 37 * runtime an increased opportunity to optimize this node.
38 * </p> 38 * </p>
39 * 39 *
40 * <p> 40 * <p>
41 * If a node has a value which may change at run time, but will rarely do so, it is recommended to 41 * If a node has a value which may change at run time, but will rarely do so, it is recommended to
42 * speculate on the field being final. This involves starting executing with a node where this field 42 * speculate on the field being final. This involves starting executing with a node where this field
43 * is final and only if this turns out to be no longer the case, the node is replaced with an 43 * is final and only if this turns out to be no longer the case, the node is replaced with an
44 * alternative implementation of the operation (see {@link ReplaceTest}). 44 * alternative implementation of the operation (see {@link ReplaceTest}).
45 * </p> 45 * </p>
46 * 46 *
47 * <p> 47 * <p>
48 * The next part of the Truffle API introduction is at 48 * The next part of the Truffle API introduction is at
49 * {@link com.oracle.truffle.api.test.ReplaceTest}. 49 * {@link com.oracle.truffle.api.test.ReplaceTest}.
50 * </p> 50 * </p>
51 */ 51 */