Mercurial > hg > graal-compiler
comparison graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/serial/PostOrderDeserializer.java @ 20130:8dc73c226c63
Truffle: cache NodeClass lookup in Node.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Thu, 02 Apr 2015 01:26:31 +0200 |
parents | 5b7db8941fd7 |
children |
comparison
equal
deleted
inserted
replaced
20129:5b7db8941fd7 | 20130:8dc73c226c63 |
---|---|
255 } | 255 } |
256 } | 256 } |
257 | 257 |
258 private static Node updateParent(Node parent, Node child) { | 258 private static Node updateParent(Node parent, Node child) { |
259 if (child != null) { | 259 if (child != null) { |
260 NodeClass.get(child.getClass()).getParentField().putObject(child, parent); | 260 NodeClass nodeClass = NodeClass.get(child.getClass()); |
261 nodeClass.getNodeClassField().putObject(child, nodeClass); | |
262 nodeClass.getParentField().putObject(child, parent); | |
261 } | 263 } |
262 return child; | 264 return child; |
263 } | 265 } |
264 | 266 |
265 private static Unsafe loadUnsafe() { | 267 private static Unsafe loadUnsafe() { |