@@ -269,15 +269,10 @@ public static boolean updateShape(DynamicObject object,
269269 if (cachedShape .isValid ()) {
270270 return false ;
271271 } else {
272- return updateShapeImpl (object );
272+ return ObsolescenceStrategy . singleton (). updateShape (object );
273273 }
274274 }
275275
276- @ TruffleBoundary
277- static boolean updateShapeImpl (DynamicObject object ) {
278- return ObsolescenceStrategy .singleton ().updateShape (object );
279- }
280-
281276 @ ExportMessage
282277 public static boolean resetShape (DynamicObject object , Shape otherShape ,
283278 @ Bind Node node ,
@@ -314,7 +309,7 @@ protected static boolean putGeneric(DynamicObject object, Object key, Object val
314309 private static boolean putGenericSlowPath (DynamicObject object , Object key , Object value , int newPropertyFlags , int putFlags ,
315310 Shape initialShape , Property propertyOfInitialShape ) {
316311 CompilerAsserts .neverPartOfCompilation ();
317- updateShapeImpl (object );
312+ ObsolescenceStrategy . singleton (). updateShape (object );
318313 Shape oldShape ;
319314 Property existingProperty ;
320315 Shape newShape ;
@@ -345,15 +340,15 @@ private static boolean putGenericSlowPath(DynamicObject object, Object key, Obje
345340 property = newShape .getProperty (key );
346341 }
347342 }
348- } while (updateShapeImpl (object ));
343+ } while (ObsolescenceStrategy . singleton (). updateShape (object ));
349344
350345 assert object .getShape () == oldShape ;
351346 Location location = property .getLocation ();
352347 if (oldShape != newShape ) {
353348 DynamicObjectSupport .grow (object , oldShape , newShape );
354349 location .setSafe (object , value , false , true );
355350 DynamicObjectSupport .setShapeWithStoreFence (object , newShape );
356- updateShapeImpl (object );
351+ ObsolescenceStrategy . singleton (). updateShape (object );
357352 } else {
358353 location .setSafe (object , value , false , false );
359354 }
@@ -732,7 +727,7 @@ public Property getProperty(DynamicObject object, Shape cachedShape, Object key)
732727 @ TruffleBoundary
733728 @ Override
734729 public boolean setPropertyFlags (DynamicObject object , Shape cachedShape , Object key , int propertyFlags ) {
735- updateShapeImpl (object );
730+ ObsolescenceStrategy . singleton (). updateShape (object );
736731 Shape oldShape = object .getShape ();
737732 Property existingProperty = oldShape .getProperty (key );
738733 if (existingProperty == null ) {
@@ -742,7 +737,7 @@ public boolean setPropertyFlags(DynamicObject object, Shape cachedShape, Object
742737 Shape newShape = changePropertyFlags (oldShape , existingProperty , propertyFlags );
743738 if (newShape != oldShape ) {
744739 object .setShape (newShape );
745- updateShapeImpl (object );
740+ ObsolescenceStrategy . singleton (). updateShape (object );
746741 }
747742 }
748743 return true ;
@@ -1750,7 +1745,7 @@ protected final boolean isValid() {
17501745
17511746 protected final void maybeUpdateShape (DynamicObject store ) {
17521747 if (newShapeValidAssumption == Assumption .NEVER_VALID ) {
1753- updateShapeImpl (store );
1748+ ObsolescenceStrategy . singleton (). updateShape (store );
17541749 }
17551750 }
17561751
0 commit comments