@@ -671,7 +671,7 @@ public abstract static class DeleteNode extends YieldingCoreMethodNode {
671
671
protected Object delete (RubyArray array , Object value , Object maybeBlock ,
672
672
@ Bind ("array.getStore()" ) Object store ,
673
673
@ CachedLibrary ("store" ) ArrayStoreLibrary stores ,
674
- @ Cached @ Exclusive IntValueProfile arraySizeProfile ,
674
+ @ Cached @ Shared IntValueProfile arraySizeProfile ,
675
675
@ Cached @ Exclusive LoopConditionProfile loopProfile ) {
676
676
677
677
return delete (array , value , maybeBlock , true , store , store , stores , stores , arraySizeProfile , loopProfile );
@@ -684,7 +684,7 @@ protected Object delete(RubyArray array, Object value, Object maybeBlock,
684
684
@ Bind ("array.getStore()" ) Object store ,
685
685
@ CachedLibrary ("store" ) ArrayStoreLibrary stores ,
686
686
@ CachedLibrary (limit = "1" ) ArrayStoreLibrary newStores ,
687
- @ Cached @ Exclusive IntValueProfile arraySizeProfile ,
687
+ @ Cached @ Shared IntValueProfile arraySizeProfile ,
688
688
@ Cached @ Exclusive LoopConditionProfile loopProfile ) {
689
689
690
690
final Object newStore = stores .allocator (store ).allocate (arraySizeProfile .profile (array .size ));
@@ -770,7 +770,7 @@ protected ToIntNode coerceOtherToInt(RubyBaseNodeWithExecute index) {
770
770
protected Object deleteAt (RubyArray array , int index ,
771
771
@ Bind ("array.getStore()" ) Object store ,
772
772
@ CachedLibrary ("store" ) ArrayStoreLibrary stores ,
773
- @ Cached @ Exclusive IntValueProfile arraySizeProfile ,
773
+ @ Cached @ Shared IntValueProfile arraySizeProfile ,
774
774
@ Cached @ Shared ConditionProfile negativeIndexProfile ,
775
775
@ Cached @ Shared ConditionProfile notInBoundsProfile ) {
776
776
final int size = arraySizeProfile .profile (array .size );
@@ -796,7 +796,7 @@ protected Object deleteAt(RubyArray array, int index,
796
796
protected Object deleteAtCopying (RubyArray array , int index ,
797
797
@ Bind ("array.getStore()" ) Object store ,
798
798
@ CachedLibrary ("store" ) ArrayStoreLibrary stores ,
799
- @ Cached @ Exclusive IntValueProfile arraySizeProfile ,
799
+ @ Cached @ Shared IntValueProfile arraySizeProfile ,
800
800
@ Cached @ Shared ConditionProfile negativeIndexProfile ,
801
801
@ Cached @ Shared ConditionProfile notInBoundsProfile ) {
802
802
final int size = arraySizeProfile .profile (array .size );
@@ -1420,7 +1420,7 @@ protected Object injectSymbolNoInitial(
1420
1420
VirtualFrame frame , RubyArray array , RubySymbol initialOrSymbol , NotProvided symbol , Nil block ,
1421
1421
@ Bind ("array.getStore()" ) Object store ,
1422
1422
@ CachedLibrary ("store" ) ArrayStoreLibrary stores ,
1423
- @ Cached @ Exclusive IntValueProfile arraySizeProfile ,
1423
+ @ Cached @ Shared IntValueProfile arraySizeProfile ,
1424
1424
@ Cached @ Exclusive LoopConditionProfile loopProfile ,
1425
1425
@ Cached @ Shared ToJavaStringNode toJavaString ) {
1426
1426
return injectSymbolHelper (
@@ -1444,7 +1444,7 @@ protected Object injectSymbolWithInitial(
1444
1444
VirtualFrame frame , RubyArray array , Object initialOrSymbol , RubySymbol symbol , Nil block ,
1445
1445
@ Bind ("array.getStore()" ) Object store ,
1446
1446
@ CachedLibrary ("store" ) ArrayStoreLibrary stores ,
1447
- @ Cached @ Exclusive IntValueProfile arraySizeProfile ,
1447
+ @ Cached @ Shared IntValueProfile arraySizeProfile ,
1448
1448
@ Cached @ Exclusive LoopConditionProfile loopProfile ,
1449
1449
@ Cached @ Shared ToJavaStringNode toJavaString ) {
1450
1450
return injectSymbolHelper (
@@ -1672,7 +1672,7 @@ protected RubyArray popZeroNotEmpty(RubyArray array, int n) {
1672
1672
protected RubyArray popNotEmptySharedStorage (RubyArray array , int n ,
1673
1673
@ Bind ("array.getStore()" ) Object store ,
1674
1674
@ CachedLibrary ("store" ) ArrayStoreLibrary stores ,
1675
- @ Cached @ Exclusive IntValueProfile arraySizeProfile ,
1675
+ @ Cached @ Shared IntValueProfile arraySizeProfile ,
1676
1676
@ Cached @ Shared ConditionProfile minProfile ) {
1677
1677
final int size = arraySizeProfile .profile (array .size );
1678
1678
final int numPop = minProfile .profile (size < n ) ? size : n ;
@@ -1691,7 +1691,7 @@ protected RubyArray popNotEmptySharedStorage(RubyArray array, int n,
1691
1691
protected RubyArray popNotEmptyUnsharedStorage (RubyArray array , int n ,
1692
1692
@ Bind ("array.getStore()" ) Object store ,
1693
1693
@ CachedLibrary ("store" ) ArrayStoreLibrary stores ,
1694
- @ Cached @ Exclusive IntValueProfile arraySizeProfile ,
1694
+ @ Cached @ Shared IntValueProfile arraySizeProfile ,
1695
1695
@ Cached @ Shared ConditionProfile minProfile ) {
1696
1696
final int size = arraySizeProfile .profile (array .size );
1697
1697
final int numPop = minProfile .profile (size < n ) ? size : n ;
@@ -1879,8 +1879,8 @@ public abstract static class RotateInplaceNode extends PrimitiveArrayArgumentsNo
1879
1879
protected RubyArray rotate (RubyArray array , int rotation ,
1880
1880
@ Bind ("array.getStore()" ) Object store ,
1881
1881
@ CachedLibrary ("store" ) ArrayStoreLibrary stores ,
1882
- @ Cached @ Exclusive IntValueProfile arraySizeProfile ,
1883
- @ Cached @ Exclusive IntValueProfile rotationProfile ,
1882
+ @ Cached @ Shared IntValueProfile arraySizeProfile ,
1883
+ @ Cached @ Shared IntValueProfile rotationProfile ,
1884
1884
@ Cached LoopConditionProfile loop1Profile ,
1885
1885
@ Cached LoopConditionProfile loop2Profile ,
1886
1886
@ Cached LoopConditionProfile loop3Profile ) {
@@ -1912,8 +1912,8 @@ protected RubyArray rotate(RubyArray array, int rotation,
1912
1912
protected RubyArray rotateStorageNotMutable (RubyArray array , int rotation ,
1913
1913
@ Bind ("array.getStore()" ) Object store ,
1914
1914
@ CachedLibrary ("store" ) ArrayStoreLibrary stores ,
1915
- @ Cached @ Exclusive IntValueProfile arraySizeProfile ,
1916
- @ Cached @ Exclusive IntValueProfile rotationProfile ) {
1915
+ @ Cached @ Shared IntValueProfile arraySizeProfile ,
1916
+ @ Cached @ Shared IntValueProfile rotationProfile ) {
1917
1917
final int size = arraySizeProfile .profile (array .size );
1918
1918
rotation = rotationProfile .profile (rotation );
1919
1919
assert 0 < rotation && rotation < size ;
@@ -2109,7 +2109,7 @@ protected RubyArray sortVeryShort(VirtualFrame frame, RubyArray array, Nil block
2109
2109
@ Bind ("array.getStore()" ) Object store ,
2110
2110
@ CachedLibrary ("store" ) ArrayStoreLibrary stores ,
2111
2111
@ CachedLibrary (limit = "1" ) @ Exclusive ArrayStoreLibrary newStores ,
2112
- @ Cached @ Exclusive IntValueProfile arraySizeProfile ,
2112
+ @ Cached @ Shared IntValueProfile arraySizeProfile ,
2113
2113
@ Cached @ Exclusive DispatchNode compareDispatchNode ,
2114
2114
@ Cached CmpIntNode cmpIntNode ) {
2115
2115
final Object newStore = stores
@@ -2159,7 +2159,7 @@ protected Object sortPrimitiveArrayNoBlock(RubyArray array, Nil block,
2159
2159
@ Bind ("array.getStore()" ) Object store ,
2160
2160
@ CachedLibrary ("store" ) ArrayStoreLibrary stores ,
2161
2161
@ CachedLibrary (limit = "1" ) @ Exclusive ArrayStoreLibrary mutableStores ,
2162
- @ Cached @ Exclusive IntValueProfile arraySizeProfile ) {
2162
+ @ Cached @ Shared IntValueProfile arraySizeProfile ) {
2163
2163
final int size = arraySizeProfile .profile (array .size );
2164
2164
Object newStore = stores .unsharedAllocator (store ).allocate (size );
2165
2165
stores .copyContents (store , 0 , newStore , 0 , size );
0 commit comments