Mercurial > hg > truffle
comparison graal/com.oracle.truffle.object/src/com/oracle/truffle/object/ShapeImpl.java @ 18625:073e7f314516
OM: add Transition#isDirect()
author | Andreas Woess <andreas.woess@jku.at> |
---|---|
date | Thu, 04 Dec 2014 19:24:14 +0100 |
parents | a9a14b31f3b3 |
children | ce46f909c176 |
comparison
equal
deleted
inserted
replaced
18624:a9a14b31f3b3 | 18625:073e7f314516 |
---|---|
286 | 286 |
287 return null; | 287 return null; |
288 } | 288 } |
289 | 289 |
290 protected final void addDirectTransition(Transition transition, ShapeImpl next) { | 290 protected final void addDirectTransition(Transition transition, ShapeImpl next) { |
291 assert next.getParent() == this; | 291 assert next.getParent() == this && transition.isDirect(); |
292 addTransitionInternal(transition, next); | 292 addTransitionInternal(transition, next); |
293 } | 293 } |
294 | 294 |
295 public final void addIndirectTransition(Transition transition, ShapeImpl next) { | 295 public final void addIndirectTransition(Transition transition, ShapeImpl next) { |
296 assert next.getParent() != this; | 296 assert next.getParent() != this && !transition.isDirect(); |
297 addTransitionInternal(transition, next); | 297 addTransitionInternal(transition, next); |
298 } | 298 } |
299 | 299 |
300 private void addTransitionInternal(Transition transition, ShapeImpl next) { | 300 private void addTransitionInternal(Transition transition, ShapeImpl next) { |
301 getTransitionMapForWrite().put(transition, next); | 301 getTransitionMapForWrite().put(transition, next); |