Mercurial > hg > truffle
diff graal/com.oracle.truffle.object.basic/src/com/oracle/truffle/object/basic/ShapeBasic.java @ 21924:c0744b24b230
Truffle: minor refactoring
author | Andreas Woess <andreas.woess@oracle.com> |
---|---|
date | Thu, 11 Jun 2015 17:16:53 +0200 |
parents | 19340125f182 |
children |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.object.basic/src/com/oracle/truffle/object/basic/ShapeBasic.java Thu Jun 11 17:10:27 2015 +0200 +++ b/graal/com.oracle.truffle.object.basic/src/com/oracle/truffle/object/basic/ShapeBasic.java Thu Jun 11 17:16:53 2015 +0200 @@ -42,17 +42,6 @@ @Override public ShapeImpl replaceProperty(Property oldProperty, Property newProperty) { - assert oldProperty.getKey().equals(newProperty.getKey()); - onPropertyTransition(oldProperty); - - Transition replacePropertyTransition = new Transition.DirectReplacePropertyTransition(oldProperty, newProperty); - ShapeImpl cachedShape = queryTransition(replacePropertyTransition); - if (cachedShape != null) { - return cachedShape; - } - PropertyMap newPropertyMap = this.getPropertyMap().replaceCopy(oldProperty, newProperty); - ShapeImpl newShape = createShape(getLayout(), getSharedData(), this, getObjectType(), newPropertyMap, replacePropertyTransition, allocator(), getId()); - addDirectTransition(replacePropertyTransition, newShape); - return newShape; + return directReplaceProperty(oldProperty, newProperty); } }