@@ -373,7 +373,7 @@ static AbstractShapeCheckNode create(Shape shape, JSDynamicObject thisObj, Objec
373373 JSDynamicObject depthProto = thisObj ;
374374 for (int i = 0 ; i < depth ; i ++) {
375375 Assumption stablePrototypeAssumption = i == 0 ? null : JSShape .getPrototypeAssumption (depthShape );
376- if (stablePrototypeAssumption != null ) {
376+ if (stablePrototypeAssumption != null && stablePrototypeAssumption != Assumption . ALWAYS_VALID ) {
377377 ass [pos ++] = stablePrototypeAssumption ;
378378 }
379379 depthProto = JSObject .getPrototype (depthProto );
@@ -466,7 +466,9 @@ static AbstractShapeCheckNode create(Shape shape, JSDynamicObject thisObj, Objec
466466 JSDynamicObject depthProto = thisObj ;
467467 for (int i = 0 ; i < depth ; i ++) {
468468 Assumption stablePrototypeAssumption = JSShape .getPrototypeAssumption (depthShape );
469- ass [pos ++] = stablePrototypeAssumption ;
469+ if (stablePrototypeAssumption != Assumption .ALWAYS_VALID ) {
470+ ass [pos ++] = stablePrototypeAssumption ;
471+ }
470472 depthProto = JSObject .getPrototype (depthProto );
471473 depthShape = depthProto .getShape ();
472474 if (depthProto != Null .instance ) {
@@ -666,7 +668,7 @@ static AbstractShapeCheckNode create(Class<?> valueClass, Shape shape, JSDynamic
666668 JSDynamicObject depthProto = thisObj ;
667669 for (int i = 0 ; i < depth ; i ++) {
668670 Assumption stablePrototypeAssumption = i == 0 ? null : JSShape .getPrototypeAssumption (depthShape );
669- if (stablePrototypeAssumption != null ) {
671+ if (stablePrototypeAssumption != null && stablePrototypeAssumption != Assumption . ALWAYS_VALID ) {
670672 ass [pos ++] = stablePrototypeAssumption ;
671673 }
672674 depthProto = JSObject .getPrototype (depthProto );
0 commit comments