@@ -237,7 +237,7 @@ module Array {
237
237
ElementReferenceRangeReadKnownSummary ( ) {
238
238
mc .getNumberOfArguments ( ) = 2 and
239
239
start = getKnownArrayElementContent ( mc .getArgument ( 0 ) ) .getIndex ( ) and
240
- exists ( int length | length = mc .getArgument ( 1 ) .getConstantValue ( ) .getInt ( ) |
240
+ exists ( int length | mc .getArgument ( 1 ) .getConstantValue ( ) .isInt ( length ) |
241
241
end = ( start + length - 1 ) and
242
242
this = "[](" + start + ", " + length + ")"
243
243
)
@@ -565,7 +565,7 @@ module Array {
565
565
566
566
DeleteAtKnownSummary ( ) {
567
567
this = "delete_at(" + i + ")" and
568
- i = mc .getArgument ( 0 ) .getConstantValue ( ) .getInt ( ) and
568
+ mc .getArgument ( 0 ) .getConstantValue ( ) .isInt ( i ) and
569
569
i >= 0
570
570
}
571
571
@@ -589,7 +589,7 @@ module Array {
589
589
private class DeleteAtUnknownSummary extends DeleteAtSummary {
590
590
DeleteAtUnknownSummary ( ) {
591
591
this = "delete_at(index)" and
592
- not exists ( int i | i = mc .getArgument ( 0 ) .getConstantValue ( ) .getInt ( ) and i >= 0 )
592
+ not exists ( int i | mc .getArgument ( 0 ) .getConstantValue ( ) .isInt ( i ) and i >= 0 )
593
593
}
594
594
595
595
override predicate propagatesFlowExt ( string input , string output , boolean preservesValue ) {
@@ -735,7 +735,7 @@ module Array {
735
735
736
736
FetchKnownSummary ( ) {
737
737
this = "fetch(" + i + ")" and
738
- i = mc .getArgument ( 0 ) .getConstantValue ( ) .getInt ( ) and
738
+ mc .getArgument ( 0 ) .getConstantValue ( ) .isInt ( i ) and
739
739
i >= 0
740
740
}
741
741
@@ -762,7 +762,7 @@ module Array {
762
762
private class FetchUnknownSummary extends FetchSummary {
763
763
FetchUnknownSummary ( ) {
764
764
this = "fetch(index)" and
765
- not exists ( int i | i = mc .getArgument ( 0 ) .getConstantValue ( ) .getInt ( ) and i >= 0 )
765
+ not exists ( int i | mc .getArgument ( 0 ) .getConstantValue ( ) .isInt ( i ) and i >= 0 )
766
766
}
767
767
768
768
override predicate propagatesFlowExt ( string input , string output , boolean preservesValue ) {
@@ -878,7 +878,7 @@ module Array {
878
878
879
879
InsertKnownSummary ( ) {
880
880
this = "insert(" + i + ")" and
881
- i = mc .getArgument ( 0 ) .getConstantValue ( ) .getInt ( )
881
+ mc .getArgument ( 0 ) .getConstantValue ( ) .isInt ( i )
882
882
}
883
883
884
884
override predicate propagatesFlowExt ( string input , string output , boolean preservesValue ) {
@@ -1215,7 +1215,7 @@ module Array {
1215
1215
private int c ;
1216
1216
1217
1217
RotateKnownSummary ( ) {
1218
- c = mc .getArgument ( 0 ) .getConstantValue ( ) .getInt ( ) and
1218
+ mc .getArgument ( 0 ) .getConstantValue ( ) .isInt ( c ) and
1219
1219
this = "rotate(" + c + ")"
1220
1220
or
1221
1221
not exists ( mc .getArgument ( 0 ) ) and c = 1 and this = "rotate"
@@ -1271,7 +1271,7 @@ module Array {
1271
1271
private int c ;
1272
1272
1273
1273
RotateBangKnownSummary ( ) {
1274
- c = mc .getArgument ( 0 ) .getConstantValue ( ) .getInt ( ) and
1274
+ mc .getArgument ( 0 ) .getConstantValue ( ) .isInt ( c ) and
1275
1275
this = "rotate!(" + c + ")"
1276
1276
or
1277
1277
not exists ( mc .getArgument ( 0 ) ) and c = 1 and this = "rotate!"
@@ -1364,7 +1364,7 @@ module Array {
1364
1364
private int n ;
1365
1365
1366
1366
ShiftArgKnownSummary ( ) {
1367
- n = mc .getArgument ( 0 ) .getConstantValue ( ) .getInt ( ) and
1367
+ mc .getArgument ( 0 ) .getConstantValue ( ) .isInt ( n ) and
1368
1368
this = "shift(" + n + ")"
1369
1369
}
1370
1370
@@ -1489,7 +1489,7 @@ module Array {
1489
1489
SliceBangRangeKnownSummary ( ) {
1490
1490
mc .getNumberOfArguments ( ) = 2 and
1491
1491
start = getKnownArrayElementContent ( mc .getArgument ( 0 ) ) .getIndex ( ) and
1492
- exists ( int length | length = mc .getArgument ( 1 ) .getConstantValue ( ) .getInt ( ) |
1492
+ exists ( int length | mc .getArgument ( 1 ) .getConstantValue ( ) .isInt ( length ) |
1493
1493
end = ( start + length - 1 ) and
1494
1494
this = "slice!(" + start + ", " + length + ")"
1495
1495
)
@@ -1681,7 +1681,7 @@ module Array {
1681
1681
or
1682
1682
exists ( ArrayIndex elementIndex , int argIndex |
1683
1683
argIndex in [ 0 .. mc .getNumberOfArguments ( ) - 1 ] and
1684
- elementIndex = mc .getArgument ( argIndex ) .getConstantValue ( ) .getInt ( )
1684
+ mc .getArgument ( argIndex ) .getConstantValue ( ) .isInt ( elementIndex )
1685
1685
|
1686
1686
input = "ArrayElement[" + elementIndex + "] of Receiver" and
1687
1687
output = "ArrayElement[" + argIndex + "] of ReturnValue"
@@ -1698,7 +1698,7 @@ module Array {
1698
1698
ValuesAtUnknownSummary ( ) {
1699
1699
this = "values_at(unknown)" and
1700
1700
exists ( int i | i in [ 0 .. mc .getNumberOfArguments ( ) - 1 ] |
1701
- not exists ( int val | val = mc .getArgument ( i ) .getConstantValue ( ) .getInt ( ) and val >= 0 )
1701
+ not exists ( int val | mc .getArgument ( i ) .getConstantValue ( ) .isInt ( val ) and val >= 0 )
1702
1702
)
1703
1703
}
1704
1704
@@ -1827,7 +1827,7 @@ module Enumerable {
1827
1827
1828
1828
DropKnownSummary ( ) {
1829
1829
this = "drop(" + i + ")" and
1830
- i = mc .getArgument ( 0 ) .getConstantValue ( ) .getInt ( )
1830
+ mc .getArgument ( 0 ) .getConstantValue ( ) .isInt ( i )
1831
1831
}
1832
1832
1833
1833
override predicate propagatesFlowExt ( string input , string output , boolean preservesValue ) {
@@ -1995,7 +1995,7 @@ module Enumerable {
1995
1995
private int n ;
1996
1996
1997
1997
FirstArgKnownSummary ( ) {
1998
- this = "first(" + n + ")" and n = mc .getArgument ( 0 ) .getConstantValue ( ) .getInt ( )
1998
+ this = "first(" + n + ")" and mc .getArgument ( 0 ) .getConstantValue ( ) .isInt ( n )
1999
1999
}
2000
2000
2001
2001
override predicate propagatesFlowExt ( string input , string output , boolean preservesValue ) {
@@ -2391,7 +2391,7 @@ module Enumerable {
2391
2391
2392
2392
TakeKnownSummary ( ) {
2393
2393
this = "take(" + i + ")" and
2394
- i = mc .getArgument ( 0 ) .getConstantValue ( ) .getInt ( )
2394
+ mc .getArgument ( 0 ) .getConstantValue ( ) .isInt ( i )
2395
2395
}
2396
2396
2397
2397
override predicate propagatesFlowExt ( string input , string output , boolean preservesValue ) {
0 commit comments