@@ -480,7 +480,7 @@ protected RubyArray clear(RubyArray array,
480
480
@ Cached IsSharedNode isSharedNode ,
481
481
@ Cached ConditionProfile sharedProfile ) {
482
482
setStoreAndSize (array ,
483
- ArrayStoreLibrary .initialStorage (sharedProfile .profile (isSharedNode .executeIsShared (array ))),
483
+ ArrayStoreLibrary .initialStorage (sharedProfile .profile (isSharedNode .executeIsShared (this , array ))),
484
484
0 );
485
485
return array ;
486
486
}
@@ -1142,7 +1142,8 @@ protected RubyArray initializeNoArgs(RubyArray array, NotProvided size, NotProvi
1142
1142
@ Cached @ Shared IsSharedNode isSharedNode ,
1143
1143
@ Cached @ Shared ConditionProfile sharedProfile ) {
1144
1144
setStoreAndSize (array ,
1145
- ArrayStoreLibrary .initialStorage (sharedProfile .profile (isSharedNode .executeIsShared (array ))), 0 );
1145
+ ArrayStoreLibrary .initialStorage (sharedProfile .profile (isSharedNode .executeIsShared (this , array ))),
1146
+ 0 );
1146
1147
return array ;
1147
1148
}
1148
1149
@@ -1158,7 +1159,8 @@ protected RubyArray initializeOnlyBlock(
1158
1159
}
1159
1160
1160
1161
setStoreAndSize (array ,
1161
- ArrayStoreLibrary .initialStorage (sharedProfile .profile (isSharedNode .executeIsShared (array ))), 0 );
1162
+ ArrayStoreLibrary .initialStorage (sharedProfile .profile (isSharedNode .executeIsShared (this , array ))),
1163
+ 0 );
1162
1164
return array ;
1163
1165
}
1164
1166
@@ -1190,7 +1192,7 @@ protected RubyArray initializeWithSizeNoValue(RubyArray array, int size, NotProv
1190
1192
@ Cached @ Shared ConditionProfile sharedProfile ,
1191
1193
@ CachedLibrary (limit = "2" ) @ Exclusive ArrayStoreLibrary stores ) {
1192
1194
final Object store ;
1193
- if (sharedProfile .profile (isSharedNode .executeIsShared (array ))) {
1195
+ if (sharedProfile .profile (isSharedNode .executeIsShared (this , array ))) {
1194
1196
store = new SharedArrayStorage (new Object [size ]);
1195
1197
} else {
1196
1198
store = new Object [size ];
@@ -1253,7 +1255,7 @@ protected Object initializeBlock(RubyArray array, int size, Object unusedFilling
1253
1255
} finally {
1254
1256
profileAndReportLoopCount (loopProfile , n );
1255
1257
Object store = arrayBuilder .finish (state , n );
1256
- if (sharedProfile .profile (isSharedNode .executeIsShared (array ))) {
1258
+ if (sharedProfile .profile (isSharedNode .executeIsShared (this , array ))) {
1257
1259
store = stores .makeShared (store , n );
1258
1260
}
1259
1261
setStoreAndSize (array , store , n );
@@ -1836,7 +1838,7 @@ protected RubyArray replace(RubyArray array, RubyArray other,
1836
1838
@ CachedLibrary (limit = "2" ) ArrayStoreLibrary stores ) {
1837
1839
final int size = other .size ;
1838
1840
Object store = cowNode .execute (other , 0 , size );
1839
- if (sharedProfile .profile (isSharedNode .executeIsShared (array ))) {
1841
+ if (sharedProfile .profile (isSharedNode .executeIsShared (this , array ))) {
1840
1842
store = stores .makeShared (store , size );
1841
1843
}
1842
1844
setStoreAndSize (array , store , size );
@@ -2297,9 +2299,7 @@ public abstract static class StoreToNativeNode extends PrimitiveArrayArgumentsNo
2297
2299
protected RubyArray storeToNative (RubyArray array ,
2298
2300
@ Bind ("array.getStore()" ) Object store ,
2299
2301
@ CachedLibrary ("store" ) ArrayStoreLibrary stores ,
2300
- @ Cached IntValueProfile arraySizeProfile ,
2301
- @ Cached IsSharedNode isSharedNode ,
2302
- @ Cached ConditionProfile sharedProfile ) {
2302
+ @ Cached IntValueProfile arraySizeProfile ) {
2303
2303
final int size = arraySizeProfile .profile (array .size );
2304
2304
Pointer pointer = Pointer .mallocAutoRelease (getLanguage (), getContext (), size * Pointer .SIZE );
2305
2305
Object newStore = new NativeArrayStorage (pointer , size );
0 commit comments