Skip to content

Commit f69c446

Browse files
committed
Simplify SetShapeFlagsNode.
1 parent 1b9f51a commit f69c446

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
@@ -1379,12 +1379,11 @@ public abstract static class SetShapeFlagsNode extends Node {
13791379
public abstract boolean execute(DynamicObject receiver, int newFlags);
13801380

13811381
@SuppressWarnings("unused")
1382-
@Specialization(guards = {"shape == cachedShape", "flags == newFlags"}, limit = "SHAPE_CACHE_LIMIT")
1382+
@Specialization(guards = {"shape == cachedShape", "flags == newShape.getFlags()"}, limit = "SHAPE_CACHE_LIMIT")
13831383
static boolean doCached(DynamicObject receiver, int flags,
13841384
@Bind("receiver.getShape()") Shape shape,
13851385
@Cached("shape") Shape cachedShape,
1386-
@Cached("flags") int newFlags,
1387-
@Cached("shapeSetFlags(cachedShape, newFlags)") Shape newShape) {
1386+
@Cached("shapeSetFlags(cachedShape, flags)") Shape newShape) {
13881387
if (newShape != cachedShape) {
13891388
receiver.setShape(newShape);
13901389
return true;

0 commit comments

Comments
 (0)