@@ -145,8 +145,8 @@ protected RubyArray addGeneralize(RubyArray a, RubyArray b,
145
145
@ Bind ("b.store" ) Object bStore ,
146
146
@ CachedLibrary ("aStore" ) ArrayStoreLibrary as ,
147
147
@ CachedLibrary ("bStore" ) ArrayStoreLibrary bs ,
148
- @ Cached ( "createIdentityProfile()" ) IntValueProfile aSizeProfile ,
149
- @ Cached ( "createIdentityProfile()" ) IntValueProfile bSizeProfile ) {
148
+ @ Cached IntValueProfile aSizeProfile ,
149
+ @ Cached IntValueProfile bSizeProfile ) {
150
150
final int aSize = aSizeProfile .profile (a .size );
151
151
final int bSize = bSizeProfile .profile (b .size );
152
152
final int combinedSize = aSize + bSize ;
@@ -174,7 +174,7 @@ protected RubyArray mulZero(RubyArray array, int count) {
174
174
protected RubyArray mulOther (RubyArray array , int count ,
175
175
@ Bind ("array.store" ) Object store ,
176
176
@ CachedLibrary ("store" ) ArrayStoreLibrary arrays ,
177
- @ Cached ( "createIdentityProfile()" ) IntValueProfile arraySizeProfile ,
177
+ @ Cached IntValueProfile arraySizeProfile ,
178
178
@ Cached LoopConditionProfile loopProfile ) {
179
179
180
180
final int size = arraySizeProfile .profile (array .size );
@@ -507,7 +507,7 @@ protected RubyArray compactPrimitive(RubyArray array,
507
507
@ Specialization (guards = "!stores.isPrimitive(store)" , limit = "storageStrategyLimit()" )
508
508
protected Object compactObjects (RubyArray array ,
509
509
@ Bind ("array.store" ) Object store ,
510
- @ Cached ( "createIdentityProfile()" ) IntValueProfile arraySizeProfile ,
510
+ @ Cached IntValueProfile arraySizeProfile ,
511
511
@ CachedLibrary ("store" ) ArrayStoreLibrary stores ,
512
512
@ Cached ArrayBuilderNode arrayBuilder ,
513
513
@ Cached LoopConditionProfile loopProfile ) {
@@ -551,7 +551,7 @@ protected Object compactObjectsNonMutable(RubyArray array,
551
551
@ Bind ("array.store" ) Object store ,
552
552
@ CachedLibrary ("store" ) ArrayStoreLibrary stores ,
553
553
@ CachedLibrary (limit = "1" ) ArrayStoreLibrary mutableStores ,
554
- @ Cached ( "createIdentityProfile()" ) IntValueProfile arraySizeProfile ,
554
+ @ Cached IntValueProfile arraySizeProfile ,
555
555
@ Cached LoopConditionProfile loopProfile ) {
556
556
final int size = arraySizeProfile .profile (array .size );
557
557
final Object oldStore = store ;
@@ -681,7 +681,7 @@ public abstract static class DeleteNode extends YieldingCoreMethodNode {
681
681
protected Object delete (RubyArray array , Object value , Object maybeBlock ,
682
682
@ Bind ("array.store" ) Object store ,
683
683
@ CachedLibrary ("store" ) ArrayStoreLibrary stores ,
684
- @ Cached ( "createIdentityProfile()" ) IntValueProfile arraySizeProfile ,
684
+ @ Cached IntValueProfile arraySizeProfile ,
685
685
@ Cached LoopConditionProfile loopProfile ) {
686
686
687
687
return delete (array , value , maybeBlock , true , store , store , stores , stores , arraySizeProfile , loopProfile );
@@ -694,7 +694,7 @@ protected Object delete(RubyArray array, Object value, Object maybeBlock,
694
694
@ Bind ("array.store" ) Object store ,
695
695
@ CachedLibrary ("store" ) ArrayStoreLibrary stores ,
696
696
@ CachedLibrary (limit = "1" ) ArrayStoreLibrary newStores ,
697
- @ Cached ( "createIdentityProfile()" ) IntValueProfile arraySizeProfile ,
697
+ @ Cached IntValueProfile arraySizeProfile ,
698
698
@ Cached LoopConditionProfile loopProfile ) {
699
699
700
700
final Object newStore = stores .allocator (store ).allocate (arraySizeProfile .profile (array .size ));
@@ -781,7 +781,7 @@ protected ToIntNode coerceOtherToInt(RubyBaseNodeWithExecute index) {
781
781
protected Object deleteAt (RubyArray array , int index ,
782
782
@ Bind ("array.store" ) Object store ,
783
783
@ CachedLibrary ("store" ) ArrayStoreLibrary stores ,
784
- @ Cached ( "createIdentityProfile()" ) IntValueProfile arraySizeProfile ,
784
+ @ Cached IntValueProfile arraySizeProfile ,
785
785
@ Cached ConditionProfile negativeIndexProfile ,
786
786
@ Cached ConditionProfile notInBoundsProfile ) {
787
787
final int size = arraySizeProfile .profile (array .size );
@@ -808,7 +808,7 @@ protected Object deleteAt(RubyArray array, int index,
808
808
protected Object deleteAtCopying (RubyArray array , int index ,
809
809
@ Bind ("array.store" ) Object store ,
810
810
@ CachedLibrary ("store" ) ArrayStoreLibrary stores ,
811
- @ Cached ( "createIdentityProfile()" ) IntValueProfile arraySizeProfile ,
811
+ @ Cached IntValueProfile arraySizeProfile ,
812
812
@ Cached ConditionProfile negativeIndexProfile ,
813
813
@ Cached ConditionProfile notInBoundsProfile ) {
814
814
final int size = arraySizeProfile .profile (array .size );
@@ -884,7 +884,7 @@ protected boolean equalSamePrimitiveType(RubyArray a, RubyArray b,
884
884
@ Bind ("b.store" ) Object bStore ,
885
885
@ CachedLibrary ("aStore" ) ArrayStoreLibrary stores ,
886
886
@ Cached ConditionProfile sameProfile ,
887
- @ Cached ( "createIdentityProfile()" ) IntValueProfile arraySizeProfile ,
887
+ @ Cached IntValueProfile arraySizeProfile ,
888
888
@ Cached ConditionProfile sameSizeProfile ,
889
889
@ Cached BranchProfile trueProfile ,
890
890
@ Cached BranchProfile falseProfile ,
@@ -957,7 +957,7 @@ protected boolean eqlSamePrimitiveType(RubyArray a, RubyArray b,
957
957
@ Bind ("b.store" ) Object bStore ,
958
958
@ CachedLibrary ("aStore" ) ArrayStoreLibrary stores ,
959
959
@ Cached ConditionProfile sameProfile ,
960
- @ Cached ( "createIdentityProfile()" ) IntValueProfile arraySizeProfile ,
960
+ @ Cached IntValueProfile arraySizeProfile ,
961
961
@ Cached ConditionProfile sameSizeProfile ,
962
962
@ Cached BranchProfile trueProfile ,
963
963
@ Cached BranchProfile falseProfile ,
@@ -1027,7 +1027,7 @@ protected RubyArray fill(RubyArray array, Object[] args, Nil block,
1027
1027
@ Bind ("array.store" ) Object store ,
1028
1028
@ CachedLibrary ("store" ) ArrayStoreLibrary stores ,
1029
1029
@ Cached PropagateSharingNode propagateSharingNode ,
1030
- @ Cached ( "createIdentityProfile()" ) IntValueProfile arraySizeProfile ,
1030
+ @ Cached IntValueProfile arraySizeProfile ,
1031
1031
@ Cached LoopConditionProfile loopProfile ) {
1032
1032
final Object value = args [0 ];
1033
1033
propagateSharingNode .executePropagate (array , value );
@@ -1076,7 +1076,7 @@ protected long hash(VirtualFrame frame, RubyArray array,
1076
1076
@ CachedLibrary ("store" ) ArrayStoreLibrary stores ,
1077
1077
@ Cached DispatchNode toHashNode ,
1078
1078
@ Cached ToLongNode toLongNode ,
1079
- @ Cached ( "createIdentityProfile()" ) IntValueProfile arraySizeProfile ,
1079
+ @ Cached IntValueProfile arraySizeProfile ,
1080
1080
@ Cached LoopConditionProfile loopProfile ) {
1081
1081
final int size = arraySizeProfile .profile (array .size );
1082
1082
long h = getContext ().getHashing (this ).start (size );
@@ -1109,7 +1109,7 @@ public abstract static class IncludeNode extends ArrayCoreMethodNode {
1109
1109
protected boolean include (RubyArray array , Object value ,
1110
1110
@ Bind ("array.store" ) Object store ,
1111
1111
@ CachedLibrary ("store" ) ArrayStoreLibrary stores ,
1112
- @ Cached ( "createIdentityProfile()" ) IntValueProfile arraySizeProfile ,
1112
+ @ Cached IntValueProfile arraySizeProfile ,
1113
1113
@ Cached LoopConditionProfile loopProfile ) {
1114
1114
1115
1115
int n = 0 ;
@@ -1356,7 +1356,7 @@ protected Object injectEmptyArrayNoInitial(
1356
1356
protected Object injectWithInitial (RubyArray array , Object initialOrSymbol , NotProvided symbol , RubyProc block ,
1357
1357
@ Bind ("array.store" ) Object store ,
1358
1358
@ CachedLibrary ("store" ) ArrayStoreLibrary stores ,
1359
- @ Cached ( "createIdentityProfile()" ) IntValueProfile arraySizeProfile ,
1359
+ @ Cached IntValueProfile arraySizeProfile ,
1360
1360
@ Cached LoopConditionProfile loopProfile ) {
1361
1361
return injectBlockHelper (stores , array , block , store , initialOrSymbol , 0 , arraySizeProfile , loopProfile );
1362
1362
}
@@ -1368,7 +1368,7 @@ protected Object injectNoInitial(
1368
1368
RubyArray array , NotProvided initialOrSymbol , NotProvided symbol , RubyProc block ,
1369
1369
@ Bind ("array.store" ) Object store ,
1370
1370
@ CachedLibrary ("store" ) ArrayStoreLibrary stores ,
1371
- @ Cached ( "createIdentityProfile()" ) IntValueProfile arraySizeProfile ,
1371
+ @ Cached IntValueProfile arraySizeProfile ,
1372
1372
@ Cached LoopConditionProfile loopProfile ) {
1373
1373
return injectBlockHelper (stores , array , block , store , stores .read (store , 0 ), 1 , arraySizeProfile ,
1374
1374
loopProfile );
@@ -1415,7 +1415,7 @@ protected Object injectSymbolWithInitial(
1415
1415
VirtualFrame frame , RubyArray array , Object initialOrSymbol , RubySymbol symbol , Nil block ,
1416
1416
@ Bind ("array.store" ) Object store ,
1417
1417
@ CachedLibrary ("store" ) ArrayStoreLibrary stores ,
1418
- @ Cached ( "createIdentityProfile()" ) IntValueProfile arraySizeProfile ,
1418
+ @ Cached IntValueProfile arraySizeProfile ,
1419
1419
@ Cached LoopConditionProfile loopProfile ,
1420
1420
@ Cached ToJavaStringNode toJavaString ) {
1421
1421
return injectSymbolHelper (
@@ -1437,7 +1437,7 @@ protected Object injectSymbolNoInitial(
1437
1437
VirtualFrame frame , RubyArray array , RubySymbol initialOrSymbol , NotProvided symbol , Nil block ,
1438
1438
@ Bind ("array.store" ) Object store ,
1439
1439
@ CachedLibrary ("store" ) ArrayStoreLibrary stores ,
1440
- @ Cached ( "createIdentityProfile()" ) IntValueProfile arraySizeProfile ,
1440
+ @ Cached IntValueProfile arraySizeProfile ,
1441
1441
@ Cached LoopConditionProfile loopProfile ,
1442
1442
@ Cached ToJavaStringNode toJavaString ) {
1443
1443
return injectSymbolHelper (
@@ -1480,7 +1480,7 @@ protected Object map(RubyArray array, RubyProc block,
1480
1480
@ Bind ("array.store" ) Object store ,
1481
1481
@ CachedLibrary ("store" ) ArrayStoreLibrary stores ,
1482
1482
@ Cached ArrayBuilderNode arrayBuilder ,
1483
- @ Cached ( "createIdentityProfile()" ) IntValueProfile arraySizeProfile ,
1483
+ @ Cached IntValueProfile arraySizeProfile ,
1484
1484
@ Cached LoopConditionProfile loopProfile ) {
1485
1485
BuilderState state = arrayBuilder .start (arraySizeProfile .profile (array .size ));
1486
1486
@@ -1671,7 +1671,7 @@ protected RubyArray popZeroNotEmpty(RubyArray array, int n) {
1671
1671
protected RubyArray popNotEmptySharedStorage (RubyArray array , int n ,
1672
1672
@ Bind ("array.store" ) Object store ,
1673
1673
@ CachedLibrary ("store" ) ArrayStoreLibrary stores ,
1674
- @ Cached ( "createIdentityProfile()" ) IntValueProfile arraySizeProfile ,
1674
+ @ Cached IntValueProfile arraySizeProfile ,
1675
1675
@ Cached ConditionProfile minProfile ) {
1676
1676
final int size = arraySizeProfile .profile (array .size );
1677
1677
final int numPop = minProfile .profile (size < n ) ? size : n ;
@@ -1690,7 +1690,7 @@ protected RubyArray popNotEmptySharedStorage(RubyArray array, int n,
1690
1690
protected RubyArray popNotEmptyUnsharedStorage (RubyArray array , int n ,
1691
1691
@ Bind ("array.store" ) Object store ,
1692
1692
@ CachedLibrary ("store" ) ArrayStoreLibrary stores ,
1693
- @ Cached ( "createIdentityProfile()" ) IntValueProfile arraySizeProfile ,
1693
+ @ Cached IntValueProfile arraySizeProfile ,
1694
1694
@ Cached ConditionProfile minProfile ) {
1695
1695
final int size = arraySizeProfile .profile (array .size );
1696
1696
final int numPop = minProfile .profile (size < n ) ? size : n ;
@@ -1771,7 +1771,7 @@ protected Object reject(RubyArray array, RubyProc block,
1771
1771
@ CachedLibrary ("store" ) ArrayStoreLibrary stores ,
1772
1772
@ Cached ArrayBuilderNode arrayBuilder ,
1773
1773
@ Cached BooleanCastNode booleanCastNode ,
1774
- @ Cached ( "createIdentityProfile()" ) IntValueProfile arraySizeProfile ,
1774
+ @ Cached IntValueProfile arraySizeProfile ,
1775
1775
@ Cached LoopConditionProfile loopProfile ) {
1776
1776
BuilderState state = arrayBuilder .start (arraySizeProfile .profile (array .size ));
1777
1777
int selectedSize = 0 ;
@@ -1814,7 +1814,7 @@ protected Object rejectInPlaceMutableStore(RubyArray array, RubyProc block,
1814
1814
@ Bind ("array.store" ) Object store ,
1815
1815
@ CachedLibrary ("store" ) ArrayStoreLibrary stores ,
1816
1816
@ CachedLibrary (limit = "1" ) ArrayStoreLibrary mutablestores ,
1817
- @ Cached ( "createIdentityProfile()" ) IntValueProfile arraySizeProfile ,
1817
+ @ Cached IntValueProfile arraySizeProfile ,
1818
1818
@ Cached LoopConditionProfile loop1Profile ,
1819
1819
@ Cached LoopConditionProfile loop2Profile ) {
1820
1820
return rejectInPlaceInternal (array , block , mutablestores , store , arraySizeProfile , loop1Profile ,
@@ -1828,7 +1828,7 @@ protected Object rejectInPlaceImmutableStore(RubyArray array, RubyProc block,
1828
1828
@ Bind ("array.store" ) Object store ,
1829
1829
@ CachedLibrary ("store" ) ArrayStoreLibrary stores ,
1830
1830
@ CachedLibrary (limit = "1" ) ArrayStoreLibrary mutablestores ,
1831
- @ Cached ( "createIdentityProfile()" ) IntValueProfile arraySizeProfile ,
1831
+ @ Cached IntValueProfile arraySizeProfile ,
1832
1832
@ Cached LoopConditionProfile loop1Profile ,
1833
1833
@ Cached LoopConditionProfile loop2Profile ) {
1834
1834
final int size = arraySizeProfile .profile (array .size );
@@ -1926,8 +1926,8 @@ public abstract static class RotateNode extends PrimitiveArrayArgumentsNode {
1926
1926
protected RubyArray rotate (RubyArray array , int rotation ,
1927
1927
@ Bind ("array.store" ) Object store ,
1928
1928
@ CachedLibrary ("store" ) ArrayStoreLibrary stores ,
1929
- @ Cached ( "createIdentityProfile()" ) IntValueProfile arraySizeProfile ,
1930
- @ Cached ( "createIdentityProfile()" ) IntValueProfile rotationProfile ) {
1929
+ @ Cached IntValueProfile arraySizeProfile ,
1930
+ @ Cached IntValueProfile rotationProfile ) {
1931
1931
final int size = arraySizeProfile .profile (array .size );
1932
1932
rotation = rotationProfile .profile (rotation );
1933
1933
assert 0 < rotation && rotation < size ;
@@ -1955,8 +1955,8 @@ public abstract static class RotateInplaceNode extends PrimitiveArrayArgumentsNo
1955
1955
protected RubyArray rotate (RubyArray array , int rotation ,
1956
1956
@ Bind ("array.store" ) Object store ,
1957
1957
@ CachedLibrary ("store" ) ArrayStoreLibrary stores ,
1958
- @ Cached ( "createIdentityProfile()" ) IntValueProfile arraySizeProfile ,
1959
- @ Cached ( "createIdentityProfile()" ) IntValueProfile rotationProfile ,
1958
+ @ Cached IntValueProfile arraySizeProfile ,
1959
+ @ Cached IntValueProfile rotationProfile ,
1960
1960
@ Cached LoopConditionProfile loop1Profile ,
1961
1961
@ Cached LoopConditionProfile loop2Profile ,
1962
1962
@ Cached LoopConditionProfile loop3Profile ) {
@@ -1988,8 +1988,8 @@ protected RubyArray rotate(RubyArray array, int rotation,
1988
1988
protected RubyArray rotateStorageNotMutable (RubyArray array , int rotation ,
1989
1989
@ Bind ("array.store" ) Object store ,
1990
1990
@ CachedLibrary ("store" ) ArrayStoreLibrary stores ,
1991
- @ Cached ( "createIdentityProfile()" ) IntValueProfile arraySizeProfile ,
1992
- @ Cached ( "createIdentityProfile()" ) IntValueProfile rotationProfile ) {
1991
+ @ Cached IntValueProfile arraySizeProfile ,
1992
+ @ Cached IntValueProfile rotationProfile ) {
1993
1993
final int size = arraySizeProfile .profile (array .size );
1994
1994
rotation = rotationProfile .profile (rotation );
1995
1995
assert 0 < rotation && rotation < size ;
@@ -2059,7 +2059,7 @@ public abstract static class SelectNode extends YieldingCoreMethodNode {
2059
2059
protected Object select (RubyArray array , RubyProc block ,
2060
2060
@ Bind ("array.store" ) Object store ,
2061
2061
@ CachedLibrary ("store" ) ArrayStoreLibrary stores ,
2062
- @ Cached ( "createIdentityProfile()" ) IntValueProfile arraySizeProfile ,
2062
+ @ Cached IntValueProfile arraySizeProfile ,
2063
2063
@ Cached LoopConditionProfile loopProfile ,
2064
2064
@ Cached ArrayBuilderNode arrayBuilder ,
2065
2065
@ Cached BooleanCastNode booleanCastNode ) {
@@ -2157,7 +2157,7 @@ protected Object shiftNToInt(RubyArray array, Object n,
2157
2157
public abstract static class SizeNode extends ArrayCoreMethodNode {
2158
2158
@ Specialization
2159
2159
protected int size (RubyArray array ,
2160
- @ Cached ( "createIdentityProfile()" ) IntValueProfile arraySizeProfile ) {
2160
+ @ Cached IntValueProfile arraySizeProfile ) {
2161
2161
return arraySizeProfile .profile (array .size );
2162
2162
}
2163
2163
}
@@ -2181,7 +2181,7 @@ protected RubyArray sortVeryShort(VirtualFrame frame, RubyArray array, Nil block
2181
2181
@ Bind ("array.store" ) Object store ,
2182
2182
@ CachedLibrary ("store" ) ArrayStoreLibrary stores ,
2183
2183
@ CachedLibrary (limit = "1" ) ArrayStoreLibrary newStores ,
2184
- @ Cached ( "createIdentityProfile()" ) IntValueProfile arraySizeProfile ,
2184
+ @ Cached IntValueProfile arraySizeProfile ,
2185
2185
@ Cached DispatchNode compareDispatchNode ,
2186
2186
@ Cached CmpIntNode cmpIntNode ) {
2187
2187
final Object newStore = stores
@@ -2231,7 +2231,7 @@ protected Object sortPrimitiveArrayNoBlock(RubyArray array, Nil block,
2231
2231
@ Bind ("array.store" ) Object store ,
2232
2232
@ CachedLibrary ("store" ) ArrayStoreLibrary stores ,
2233
2233
@ CachedLibrary (limit = "1" ) ArrayStoreLibrary mutableStores ,
2234
- @ Cached ( "createIdentityProfile()" ) IntValueProfile arraySizeProfile ) {
2234
+ @ Cached IntValueProfile arraySizeProfile ) {
2235
2235
final int size = arraySizeProfile .profile (array .size );
2236
2236
Object newStore = stores .allocator (store ).allocate (size );
2237
2237
stores .copyContents (store , 0 , newStore , 0 , size );
@@ -2300,7 +2300,7 @@ protected RubyArray zipToPairs(RubyArray array, RubyArray other,
2300
2300
@ CachedLibrary ("b" ) ArrayStoreLibrary bStores ,
2301
2301
@ CachedLibrary (limit = "1" ) ArrayStoreLibrary pairs ,
2302
2302
@ Cached ConditionProfile bNotSmallerProfile ,
2303
- @ Cached ( "createIdentityProfile()" ) IntValueProfile arraySizeProfile ,
2303
+ @ Cached IntValueProfile arraySizeProfile ,
2304
2304
@ Cached LoopConditionProfile loopProfile ) {
2305
2305
2306
2306
final int zippedLength = arraySizeProfile .profile (array .size );
@@ -2338,7 +2338,7 @@ public abstract static class StoreToNativeNode extends PrimitiveArrayArgumentsNo
2338
2338
protected RubyArray storeToNative (RubyArray array ,
2339
2339
@ Bind ("array.store" ) Object store ,
2340
2340
@ CachedLibrary ("store" ) ArrayStoreLibrary stores ,
2341
- @ Cached ( "createIdentityProfile()" ) IntValueProfile arraySizeProfile ) {
2341
+ @ Cached IntValueProfile arraySizeProfile ) {
2342
2342
final int size = arraySizeProfile .profile (array .size );
2343
2343
Pointer pointer = Pointer .malloc (size * Pointer .SIZE , getContext ());
2344
2344
NativeArrayStorage newStore = new NativeArrayStorage (pointer , size );
0 commit comments