Skip to content

Commit a4e0427

Browse files
committed
Simplify SetShapeFlagsNode.
1 parent 2c73c43 commit a4e0427

File tree

1 file changed

+2
-3
lines changed
  • truffle/src/com.oracle.truffle.api.object/src/com/oracle/truffle/api/object

1 file changed

+2
-3
lines changed

truffle/src/com.oracle.truffle.api.object/src/com/oracle/truffle/api/object/DynamicObject.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1387,12 +1387,11 @@ public abstract static class SetShapeFlagsNode extends Node {
13871387
public abstract boolean execute(DynamicObject receiver, int newFlags);
13881388

13891389
@SuppressWarnings("unused")
1390-
@Specialization(guards = {"shape == cachedShape", "flags == newFlags"}, limit = "SHAPE_CACHE_LIMIT")
1390+
@Specialization(guards = {"shape == cachedShape", "flags == newShape.getFlags()"}, limit = "SHAPE_CACHE_LIMIT")
13911391
static boolean doCached(DynamicObject receiver, int flags,
13921392
@Bind("receiver.getShape()") Shape shape,
13931393
@Cached("shape") Shape cachedShape,
1394-
@Cached("flags") int newFlags,
1395-
@Cached("shapeSetFlags(cachedShape, newFlags)") Shape newShape) {
1394+
@Cached("shapeSetFlags(cachedShape, flags)") Shape newShape) {
13961395
if (newShape != cachedShape) {
13971396
receiver.setShape(newShape);
13981397
return true;

0 commit comments

Comments
 (0)