@@ -1156,7 +1156,7 @@ RubyArray initializeSizeTooBig(RubyArray array, long size, NotProvided fillingVa
1156
1156
@ Specialization (guards = "size >= 0" )
1157
1157
RubyArray initializeWithSizeNoValue (RubyArray array , int size , NotProvided fillingValue , Nil block ,
1158
1158
@ Cached @ Shared IsSharedNode isSharedNode ,
1159
- @ CachedLibrary (limit = "2 " ) @ Exclusive ArrayStoreLibrary stores ) {
1159
+ @ CachedLibrary (limit = "storageStrategyLimit() " ) @ Exclusive ArrayStoreLibrary stores ) {
1160
1160
final Object store ;
1161
1161
if (isSharedNode .execute (this , array )) {
1162
1162
store = new SharedArrayStorage (new Object [size ]);
@@ -1206,7 +1206,7 @@ RubyArray initializeSizeOther(RubyArray array, Object size, Object fillingValue,
1206
1206
@ Specialization (guards = "size >= 0" )
1207
1207
static Object initializeBlock (RubyArray array , int size , Object unusedFillingValue , RubyProc block ,
1208
1208
@ Cached ArrayBuilderNode arrayBuilder ,
1209
- @ CachedLibrary (limit = "2 " ) @ Exclusive ArrayStoreLibrary stores ,
1209
+ @ CachedLibrary (limit = "storageStrategyLimit() " ) @ Exclusive ArrayStoreLibrary stores ,
1210
1210
// @Exclusive to fix truffle-interpreted-performance warning
1211
1211
@ Cached @ Exclusive IsSharedNode isSharedNode ,
1212
1212
@ Cached @ Exclusive LoopConditionProfile loopProfile ,
@@ -1820,7 +1820,7 @@ RubyArray replace(RubyArray array, Object otherObject,
1820
1820
@ Cached ToAryNode toAryNode ,
1821
1821
@ Cached ArrayCopyOnWriteNode cowNode ,
1822
1822
@ Cached IsSharedNode isSharedNode ,
1823
- @ CachedLibrary (limit = "2 " ) ArrayStoreLibrary stores ) {
1823
+ @ CachedLibrary (limit = "storageStrategyLimit() " ) ArrayStoreLibrary stores ) {
1824
1824
final var other = toAryNode .execute (this , otherObject );
1825
1825
final int size = other .size ;
1826
1826
Object store = cowNode .execute (other , 0 , size );
@@ -2221,7 +2221,7 @@ RubyArray stealStorageNoOp(RubyArray array, RubyArray other) {
2221
2221
2222
2222
@ Specialization (guards = "array != other" )
2223
2223
static RubyArray stealStorage (RubyArray array , RubyArray other ,
2224
- @ CachedLibrary (limit = "2 " ) ArrayStoreLibrary stores ,
2224
+ @ CachedLibrary (limit = "storageStrategyLimit() " ) ArrayStoreLibrary stores ,
2225
2225
@ Cached PropagateSharingNode propagateSharingNode ,
2226
2226
@ Bind ("this" ) Node node ) {
2227
2227
propagateSharingNode .execute (node , array , other );
0 commit comments