Skip to content

Commit 6c4d0de

Browse files
committed
Slow-path markShared()
1 parent a2f7a59 commit 6c4d0de

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/main/java/org/truffleruby/language/objects/shared/SharedObjects.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import java.util.ArrayDeque;
1313
import java.util.Deque;
1414

15+
import com.oracle.truffle.api.object.DynamicObjectLibrary;
1516
import org.truffleruby.Layouts;
1617
import org.truffleruby.RubyContext;
1718
import org.truffleruby.RubyLanguage;
@@ -146,9 +147,7 @@ private static boolean share(RubyContext context, DynamicObject object) {
146147
}
147148

148149
ShapeCachingGuards.updateShape(object);
149-
final Shape oldShape = object.getShape();
150-
final Shape newShape = oldShape.makeSharedShape();
151-
object.setShapeAndGrow(oldShape, newShape);
150+
DynamicObjectLibrary.getUncached().markShared(object);
152151

153152
onShareHook(object);
154153
return true;

0 commit comments

Comments
 (0)