# HG changeset patch # User Andreas Woess # Date 1425041756 -3600 # Node ID 7d5a0223dc44895459ed8b4a71290674c6f6fc37 # Parent 2625f0dc7b48983fbc77da438f97f5b5fee3079f Truffle: minor ShapeImpl cleanup diff -r 2625f0dc7b48 -r 7d5a0223dc44 graal/com.oracle.truffle.object/src/com/oracle/truffle/object/ShapeImpl.java --- a/graal/com.oracle.truffle.object/src/com/oracle/truffle/object/ShapeImpl.java Fri Feb 27 13:21:16 2015 +0100 +++ b/graal/com.oracle.truffle.object/src/com/oracle/truffle/object/ShapeImpl.java Fri Feb 27 13:55:56 2015 +0100 @@ -353,9 +353,8 @@ */ private ShapeImpl addPropertyInternal(Property prop) { CompilerAsserts.neverPartOfCompilation(); - assert prop.isShadow() || !(this.hasProperty(prop.getKey())) : "duplicate property"; + assert prop.isShadow() || !(this.hasProperty(prop.getKey())) : "duplicate property " + prop.getKey(); assert !getPropertyListInternal(false).contains(prop); - // invalidatePropertyAssumption(prop.getName()); AddPropertyTransition addTransition = new AddPropertyTransition(prop); ShapeImpl cachedShape = queryTransition(addTransition); @@ -653,7 +652,7 @@ newShape = newShape.applyTransition(previous, true); } - getTransitionMapForWrite().put(transition, newShape); + addIndirectTransition(transition, newShape); return newShape; } else { return null; @@ -899,7 +898,7 @@ private Property[] createPropertiesArray() { propertyListAllocCount.inc(); Property[] propertiesArray = new Property[getPropertyCount()]; - List ownProperties = getPropertyList(ALL); + List ownProperties = getPropertyList(); assert ownProperties.size() == getPropertyCount(); for (int i = 0; i < getPropertyCount(); i++) { propertiesArray[i] = ownProperties.get(i); @@ -1099,7 +1098,7 @@ /** * Match all filter. */ - public static final Pred ALL = new Pred() { + private static final Pred ALL = new Pred() { public boolean test(Property t) { return true; }