@@ -170,7 +170,7 @@ protected RubyArray mulZero(RubyArray array, int count) {
170
170
limit = "storageStrategyLimit()" )
171
171
protected RubyArray mulOther (RubyArray array , int count ,
172
172
@ CachedLibrary ("array.store" ) ArrayStoreLibrary arrays ,
173
- @ Cached ( "createCountingProfile()" ) LoopConditionProfile loopProfile ) {
173
+ @ Cached LoopConditionProfile loopProfile ) {
174
174
175
175
final int size = array .size ;
176
176
final int newSize ;
@@ -478,7 +478,7 @@ protected RubyArray compactPrimitive(RubyArray array,
478
478
protected Object compactObjectsNonMutable (RubyArray array ,
479
479
@ CachedLibrary ("array.store" ) ArrayStoreLibrary stores ,
480
480
@ Cached ArrayBuilderNode arrayBuilder ,
481
- @ Cached ( "createCountingProfile()" ) LoopConditionProfile loopProfile ) {
481
+ @ Cached LoopConditionProfile loopProfile ) {
482
482
final int size = array .size ;
483
483
final Object store = array .store ;
484
484
BuilderState state = arrayBuilder .start (size );
@@ -514,7 +514,7 @@ protected Object compactNotObjects(RubyArray array,
514
514
protected Object compactObjectsNonMutable (RubyArray array ,
515
515
@ CachedLibrary ("array.store" ) ArrayStoreLibrary stores ,
516
516
@ CachedLibrary (limit = "1" ) ArrayStoreLibrary mutableStores ,
517
- @ Cached ( "createCountingProfile()" ) LoopConditionProfile loopProfile ) {
517
+ @ Cached LoopConditionProfile loopProfile ) {
518
518
final int size = array .size ;
519
519
final Object oldStore = array .store ;
520
520
final Object newStore ;
@@ -602,7 +602,7 @@ protected RubyArray concatManyGeneral(RubyArray array, Object first, Object[] re
602
602
@ Cached ArrayAppendManyNode appendManyNode ,
603
603
@ Cached ArrayCopyOnWriteNode cowNode ,
604
604
@ Cached ConditionProfile selfArgProfile ,
605
- @ Cached ( "createCountingProfile()" ) LoopConditionProfile loopProfile ) {
605
+ @ Cached LoopConditionProfile loopProfile ) {
606
606
final int size = array .size ;
607
607
Object store = cowNode .execute (array , 0 , size );
608
608
@@ -633,7 +633,7 @@ public abstract static class DeleteNode extends YieldingCoreMethodNode {
633
633
limit = "storageStrategyLimit()" )
634
634
protected Object delete (VirtualFrame frame , RubyArray array , Object value , Object maybeBlock ,
635
635
@ CachedLibrary ("array.store" ) ArrayStoreLibrary stores ,
636
- @ Cached ( "createCountingProfile()" ) LoopConditionProfile loopProfile ) {
636
+ @ Cached LoopConditionProfile loopProfile ) {
637
637
638
638
return delete (frame , array , value , maybeBlock , true , array .store , array .store , stores , stores , loopProfile );
639
639
}
@@ -644,7 +644,7 @@ protected Object delete(VirtualFrame frame, RubyArray array, Object value, Objec
644
644
protected Object delete (VirtualFrame frame , RubyArray array , Object value , Object maybeBlock ,
645
645
@ CachedLibrary ("array.store" ) ArrayStoreLibrary oldStores ,
646
646
@ CachedLibrary (limit = "1" ) ArrayStoreLibrary newStores ,
647
- @ Cached ( "createCountingProfile()" ) LoopConditionProfile loopProfile ) {
647
+ @ Cached LoopConditionProfile loopProfile ) {
648
648
649
649
final Object oldStore = array .store ;
650
650
final Object newStore = oldStores .allocator (oldStore ).allocate (array .size );
@@ -838,7 +838,7 @@ protected boolean equalSamePrimitiveType(RubyArray a, RubyArray b,
838
838
@ Cached ConditionProfile sameSizeProfile ,
839
839
@ Cached BranchProfile trueProfile ,
840
840
@ Cached BranchProfile falseProfile ,
841
- @ Cached ( "createCountingProfile()" ) LoopConditionProfile loopProfile ) {
841
+ @ Cached LoopConditionProfile loopProfile ) {
842
842
843
843
if (sameProfile .profile (a == b )) {
844
844
return true ;
@@ -906,7 +906,7 @@ protected boolean eqlSamePrimitiveType(RubyArray a, RubyArray b,
906
906
@ Cached ConditionProfile sameSizeProfile ,
907
907
@ Cached BranchProfile trueProfile ,
908
908
@ Cached BranchProfile falseProfile ,
909
- @ Cached ( "createCountingProfile()" ) LoopConditionProfile loopProfile ) {
909
+ @ Cached LoopConditionProfile loopProfile ) {
910
910
911
911
if (sameProfile .profile (a == b )) {
912
912
return true ;
@@ -967,7 +967,7 @@ public abstract static class FillNode extends ArrayCoreMethodNode {
967
967
protected RubyArray fill (RubyArray array , Object [] args , Nil block ,
968
968
@ CachedLibrary ("array.store" ) ArrayStoreLibrary stores ,
969
969
@ Cached PropagateSharingNode propagateSharingNode ,
970
- @ Cached ( "createCountingProfile()" ) LoopConditionProfile loopProfile ) {
970
+ @ Cached LoopConditionProfile loopProfile ) {
971
971
final Object value = args [0 ];
972
972
propagateSharingNode .executePropagate (array , value );
973
973
@@ -1010,7 +1010,7 @@ protected long hash(VirtualFrame frame, RubyArray array,
1010
1010
@ CachedLibrary ("array.store" ) ArrayStoreLibrary stores ,
1011
1011
@ Cached DispatchNode toHashNode ,
1012
1012
@ Cached ToLongNode toLongNode ,
1013
- @ Cached ( "createCountingProfile()" ) LoopConditionProfile loopProfile ) {
1013
+ @ Cached LoopConditionProfile loopProfile ) {
1014
1014
final int size = array .size ;
1015
1015
long h = getContext ().getHashing (this ).start (size );
1016
1016
h = Hashing .update (h , CLASS_SALT );
@@ -1037,7 +1037,7 @@ public abstract static class IncludeNode extends ArrayCoreMethodNode {
1037
1037
@ Specialization (limit = "storageStrategyLimit()" )
1038
1038
protected boolean include (RubyArray array , Object value ,
1039
1039
@ CachedLibrary ("array.store" ) ArrayStoreLibrary stores ,
1040
- @ Cached ( "createCountingProfile()" ) LoopConditionProfile loopProfile ) {
1040
+ @ Cached LoopConditionProfile loopProfile ) {
1041
1041
final Object store = array .store ;
1042
1042
1043
1043
loopProfile .profileCounted (array .size );
@@ -1122,7 +1122,7 @@ protected RubyArray initializeWithSizeAndValue(RubyArray array, int size, Object
1122
1122
@ CachedLibrary (limit = "1" ) ArrayStoreLibrary allocatedStores ,
1123
1123
@ Cached ConditionProfile needsFill ,
1124
1124
@ Cached PropagateSharingNode propagateSharingNode ,
1125
- @ Cached ( "createCountingProfile()" ) LoopConditionProfile loopProfile ) {
1125
+ @ Cached LoopConditionProfile loopProfile ) {
1126
1126
final Object allocatedStore = stores .allocateForNewValue (array .store , fillingValue , size );
1127
1127
if (needsFill .profile (!allocatedStores .isDefaultValue (allocatedStore , fillingValue ))) {
1128
1128
propagateSharingNode .executePropagate (array , fillingValue );
@@ -1148,7 +1148,7 @@ protected RubyArray initializeSizeOther(RubyArray array, Object size, Object fil
1148
1148
protected Object initializeBlock (RubyArray array , int size , Object unusedFillingValue , RubyProc block ,
1149
1149
@ Cached ArrayBuilderNode arrayBuilder ,
1150
1150
@ Cached PropagateSharingNode propagateSharingNode ,
1151
- @ Cached ( "createCountingProfile()" ) LoopConditionProfile loopProfile ) {
1151
+ @ Cached LoopConditionProfile loopProfile ) {
1152
1152
BuilderState state = arrayBuilder .start (size );
1153
1153
1154
1154
int n = 0 ;
@@ -1273,7 +1273,7 @@ protected Object injectEmptyArrayNoInitial(
1273
1273
limit = "storageStrategyLimit()" )
1274
1274
protected Object injectWithInitial (RubyArray array , Object initialOrSymbol , NotProvided symbol , RubyProc block ,
1275
1275
@ CachedLibrary ("array.store" ) ArrayStoreLibrary stores ,
1276
- @ Cached ( "createCountingProfile()" ) LoopConditionProfile loopProfile ) {
1276
+ @ Cached LoopConditionProfile loopProfile ) {
1277
1277
final Object store = array .store ;
1278
1278
return injectBlockHelper (stores , array , block , store , initialOrSymbol , 0 , loopProfile );
1279
1279
}
@@ -1284,7 +1284,7 @@ protected Object injectWithInitial(RubyArray array, Object initialOrSymbol, NotP
1284
1284
protected Object injectNoInitial (
1285
1285
RubyArray array , NotProvided initialOrSymbol , NotProvided symbol , RubyProc block ,
1286
1286
@ CachedLibrary ("array.store" ) ArrayStoreLibrary stores ,
1287
- @ Cached ( "createCountingProfile()" ) LoopConditionProfile loopProfile ) {
1287
+ @ Cached LoopConditionProfile loopProfile ) {
1288
1288
final Object store = array .store ;
1289
1289
return injectBlockHelper (stores , array , block , store , stores .read (store , 0 ), 1 , loopProfile );
1290
1290
}
@@ -1330,7 +1330,7 @@ protected Object injectSymbolEmptyArrayNoInitial(
1330
1330
protected Object injectSymbolWithInitial (
1331
1331
VirtualFrame frame , RubyArray array , Object initialOrSymbol , RubySymbol symbol , Nil block ,
1332
1332
@ CachedLibrary ("array.store" ) ArrayStoreLibrary stores ,
1333
- @ Cached ( "createCountingProfile()" ) LoopConditionProfile loopProfile ,
1333
+ @ Cached LoopConditionProfile loopProfile ,
1334
1334
@ Cached ToJavaStringNode toJavaString ) {
1335
1335
final Object store = array .store ;
1336
1336
return injectSymbolHelper (
@@ -1350,7 +1350,7 @@ protected Object injectSymbolWithInitial(
1350
1350
protected Object injectSymbolNoInitial (
1351
1351
VirtualFrame frame , RubyArray array , RubySymbol initialOrSymbol , NotProvided symbol , Nil block ,
1352
1352
@ CachedLibrary ("array.store" ) ArrayStoreLibrary stores ,
1353
- @ Cached ( "createCountingProfile()" ) LoopConditionProfile loopProfile ,
1353
+ @ Cached LoopConditionProfile loopProfile ,
1354
1354
@ Cached ToJavaStringNode toJavaString ) {
1355
1355
final Object store = array .store ;
1356
1356
return injectSymbolHelper (
@@ -1392,7 +1392,7 @@ public abstract static class MapNode extends YieldingCoreMethodNode {
1392
1392
protected Object map (RubyArray array , RubyProc block ,
1393
1393
@ CachedLibrary ("array.store" ) ArrayStoreLibrary stores ,
1394
1394
@ Cached ArrayBuilderNode arrayBuilder ,
1395
- @ Cached ( "createCountingProfile()" ) LoopConditionProfile loopProfile ) {
1395
+ @ Cached LoopConditionProfile loopProfile ) {
1396
1396
final Object store = array .store ;
1397
1397
final int size = array .size ;
1398
1398
BuilderState state = arrayBuilder .start (size );
@@ -1652,7 +1652,7 @@ protected RubyArray pushOne(RubyArray array, Object value, Object[] rest) {
1652
1652
1653
1653
@ Specialization (guards = { "rest.length > 0" , "wasProvided(value)" })
1654
1654
protected RubyArray pushMany (VirtualFrame frame , RubyArray array , Object value , Object [] rest ,
1655
- @ Cached ( "createCountingProfile()" ) LoopConditionProfile loopProfile ) {
1655
+ @ Cached LoopConditionProfile loopProfile ) {
1656
1656
// NOTE (eregon): Appending one by one here to avoid useless generalization to Object[]
1657
1657
// if the arguments all fit in the current storage
1658
1658
appendOneNode .executeAppendOne (array , value );
@@ -1675,7 +1675,7 @@ protected Object rejectOther(RubyArray array, RubyProc block,
1675
1675
@ CachedLibrary ("array.store" ) ArrayStoreLibrary stores ,
1676
1676
@ Cached ArrayBuilderNode arrayBuilder ,
1677
1677
@ Cached BooleanCastNode booleanCastNode ,
1678
- @ Cached ( "createCountingProfile()" ) LoopConditionProfile loopProfile ) {
1678
+ @ Cached LoopConditionProfile loopProfile ) {
1679
1679
final Object store = array .store ;
1680
1680
final int size = array .size ;
1681
1681
@@ -1720,8 +1720,8 @@ protected Object rejectEmpty(RubyArray array, RubyProc block) {
1720
1720
protected Object rejectInPlaceMutableStore (RubyArray array , RubyProc block ,
1721
1721
@ CachedLibrary ("array.store" ) ArrayStoreLibrary stores ,
1722
1722
@ CachedLibrary (limit = "1" ) ArrayStoreLibrary mutablestores ,
1723
- @ Cached ( "createCountingProfile()" ) LoopConditionProfile loop1Profile ,
1724
- @ Cached ( "createCountingProfile()" ) LoopConditionProfile loop2Profile ) {
1723
+ @ Cached LoopConditionProfile loop1Profile ,
1724
+ @ Cached LoopConditionProfile loop2Profile ) {
1725
1725
return rejectInPlaceInternal (array , block , mutablestores , array .store , loop1Profile , loop2Profile );
1726
1726
}
1727
1727
@@ -1731,8 +1731,8 @@ protected Object rejectInPlaceMutableStore(RubyArray array, RubyProc block,
1731
1731
protected Object rejectInPlaceImmutableStore (RubyArray array , RubyProc block ,
1732
1732
@ CachedLibrary ("array.store" ) ArrayStoreLibrary stores ,
1733
1733
@ CachedLibrary (limit = "1" ) ArrayStoreLibrary mutablestores ,
1734
- @ Cached ( "createCountingProfile()" ) LoopConditionProfile loop1Profile ,
1735
- @ Cached ( "createCountingProfile()" ) LoopConditionProfile loop2Profile ) {
1734
+ @ Cached LoopConditionProfile loop1Profile ,
1735
+ @ Cached LoopConditionProfile loop2Profile ) {
1736
1736
final Object mutableStore = stores .allocator (array .store ).allocate (array .size );
1737
1737
stores .copyContents (array .store , 0 , mutableStore , 0 , array .size );
1738
1738
array .store = mutableStore ;
@@ -1855,9 +1855,9 @@ protected RubyArray rotate(RubyArray array, int rotation,
1855
1855
@ CachedLibrary ("array.store" ) ArrayStoreLibrary arrays ,
1856
1856
@ Cached ("createIdentityProfile()" ) IntValueProfile sizeProfile ,
1857
1857
@ Cached ("createIdentityProfile()" ) IntValueProfile rotationProfile ,
1858
- @ Cached ( "createCountingProfile()" ) LoopConditionProfile loop1Profile ,
1859
- @ Cached ( "createCountingProfile()" ) LoopConditionProfile loop2Profile ,
1860
- @ Cached ( "createCountingProfile()" ) LoopConditionProfile loop3Profile ) {
1858
+ @ Cached LoopConditionProfile loop1Profile ,
1859
+ @ Cached LoopConditionProfile loop2Profile ,
1860
+ @ Cached LoopConditionProfile loop3Profile ) {
1861
1861
final int size = sizeProfile .profile (array .size );
1862
1862
rotation = rotationProfile .profile (rotation );
1863
1863
assert 0 < rotation && rotation < size ;
@@ -1954,7 +1954,7 @@ public abstract static class SelectNode extends YieldingCoreMethodNode {
1954
1954
@ Specialization (limit = "storageStrategyLimit()" )
1955
1955
protected Object select (RubyArray array , RubyProc block ,
1956
1956
@ CachedLibrary ("array.store" ) ArrayStoreLibrary stores ,
1957
- @ Cached ( "createCountingProfile()" ) LoopConditionProfile loopProfile ,
1957
+ @ Cached LoopConditionProfile loopProfile ,
1958
1958
@ Cached ArrayBuilderNode arrayBuilder ,
1959
1959
@ Cached BooleanCastNode booleanCastNode ) {
1960
1960
final Object store = array .store ;
@@ -2211,7 +2211,7 @@ protected RubyArray zipToPairs(RubyArray array, RubyArray other,
2211
2211
@ CachedLibrary ("other.store" ) ArrayStoreLibrary bStores ,
2212
2212
@ CachedLibrary (limit = "1" ) ArrayStoreLibrary pairs ,
2213
2213
@ Cached ConditionProfile bNotSmallerProfile ,
2214
- @ Cached ( "createCountingProfile()" ) LoopConditionProfile loopProfile ) {
2214
+ @ Cached LoopConditionProfile loopProfile ) {
2215
2215
final Object a = array .store ;
2216
2216
final Object b = other .store ;
2217
2217
0 commit comments