Skip to content

Commit fd49721

Browse files
committed
Fix the updateShape() deprecation
1 parent c7d05d2 commit fd49721

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/org/truffleruby/language/objects/ShapeCachingGuards.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,16 @@
1616

1717
import com.oracle.truffle.api.CompilerDirectives;
1818
import com.oracle.truffle.api.object.DynamicObject;
19+
import com.oracle.truffle.api.object.DynamicObjectLibrary;
1920
import com.oracle.truffle.api.object.ObjectType;
2021
import com.oracle.truffle.api.object.Shape;
2122

2223
public abstract class ShapeCachingGuards {
2324

2425
public static boolean updateShape(DynamicObject object) {
2526
CompilerDirectives.transferToInterpreterAndInvalidate();
26-
boolean updated = object.updateShape();
27+
// TODO (eregon, 14 July 2020): review callers, once they use the library they should not need to update the Shape manually anymore
28+
boolean updated = DynamicObjectLibrary.getUncached().updateShape(object);
2729
if (updated) {
2830
assert !SharedObjects.isShared(RubyLanguage.getCurrentContext(), object);
2931
}

0 commit comments

Comments
 (0)