Mercurial > hg > graal-compiler
comparison graal/com.oracle.truffle.object/src/com/oracle/truffle/object/ShapeImpl.java @ 19507:068256ee3b90
Make ShapeImpl#getProperty overridable.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Thu, 19 Feb 2015 15:43:41 +0100 |
parents | e9cbe1618733 |
children | 7d5a0223dc44 |
comparison
equal
deleted
inserted
replaced
19502:c162000dd30c | 19507:068256ee3b90 |
---|---|
273 * @param key the name to look up | 273 * @param key the name to look up |
274 * @return a Property object, or null if not found | 274 * @return a Property object, or null if not found |
275 */ | 275 */ |
276 @Override | 276 @Override |
277 @TruffleBoundary | 277 @TruffleBoundary |
278 public final Property getProperty(Object key) { | 278 public Property getProperty(Object key) { |
279 // return this.propertyMap.get(propertyName); | |
280 PropertyMap current = this.propertyMap; | 279 PropertyMap current = this.propertyMap; |
281 while (current.getLastProperty() != null) { | 280 while (current.getLastProperty() != null) { |
282 if (current.getLastProperty().getKey().equals(key)) { | 281 if (current.getLastProperty().getKey().equals(key)) { |
283 return current.getLastProperty(); | 282 return current.getLastProperty(); |
284 } | 283 } |
285 current = current.getParentMap(); | 284 current = current.getParentMap(); |
286 } | 285 } |
287 | |
288 return null; | 286 return null; |
289 } | 287 } |
290 | 288 |
291 protected final void addDirectTransition(Transition transition, ShapeImpl next) { | 289 protected final void addDirectTransition(Transition transition, ShapeImpl next) { |
292 assert next.getParent() == this && transition.isDirect(); | 290 assert next.getParent() == this && transition.isDirect(); |