comparison graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/NodeUtil.java @ 11636:136eaa90ef41

Truffle: make NodeUtil class final and its unsafe field private.
author Andreas Woess <andreas.woess@jku.at>
date Sat, 14 Sep 2013 20:49:30 +0200
parents ccf047a30f18
children e8dfad9a424f
comparison
equal deleted inserted replaced
11635:3f8bb25fb0a1 11636:136eaa90ef41
35 import com.oracle.truffle.api.nodes.Node.Children; 35 import com.oracle.truffle.api.nodes.Node.Children;
36 36
37 /** 37 /**
38 * Utility class that manages the special access methods for node instances. 38 * Utility class that manages the special access methods for node instances.
39 */ 39 */
40 public class NodeUtil { 40 public final class NodeUtil {
41 41
42 /** 42 /**
43 * Interface that allows the customization of field offsets used for {@link Unsafe} field 43 * Interface that allows the customization of field offsets used for {@link Unsafe} field
44 * accesses. 44 * accesses.
45 */ 45 */
272 array[i] = list.get(i); 272 array[i] = list.get(i);
273 } 273 }
274 return array; 274 return array;
275 } 275 }
276 276
277 protected static final Unsafe unsafe = getUnsafe(); 277 private static final Unsafe unsafe = getUnsafe();
278 278
279 private static Unsafe getUnsafe() { 279 private static Unsafe getUnsafe() {
280 try { 280 try {
281 return Unsafe.getUnsafe(); 281 return Unsafe.getUnsafe();
282 } catch (SecurityException e) { 282 } catch (SecurityException e) {