@@ -127,6 +127,8 @@ private module Input1 implements InputSig1<Location> {
127
127
tp0 order by kind , id1 , id2
128
128
)
129
129
}
130
+
131
+ int getTypePathLimit ( ) { result = 10 }
130
132
}
131
133
132
134
private import Input1
@@ -135,6 +137,8 @@ private module M1 = Make1<Location, Input1>;
135
137
136
138
private import M1
137
139
140
+ predicate getTypePathLimit = Input1:: getTypePathLimit / 0 ;
141
+
138
142
class TypePath = M1:: TypePath ;
139
143
140
144
module TypePath = M1:: TypePath;
@@ -2217,8 +2221,9 @@ private module Debug {
2217
2221
private Locatable getRelevantLocatable ( ) {
2218
2222
exists ( string filepath , int startline , int startcolumn , int endline , int endcolumn |
2219
2223
result .getLocation ( ) .hasLocationInfo ( filepath , startline , startcolumn , endline , endcolumn ) and
2220
- filepath .matches ( "%/sqlx.rs" ) and
2221
- startline = [ 56 .. 60 ]
2224
+ // startline = [319 .. 326] and
2225
+ startline = 325 and
2226
+ filepath .matches ( "%/register_allocator.rs" )
2222
2227
)
2223
2228
}
2224
2229
@@ -2227,6 +2232,11 @@ private module Debug {
2227
2232
result = inferType ( n , path )
2228
2233
}
2229
2234
2235
+ Type debugInferTypeForNodeAtLimit ( AstNode n , TypePath path ) {
2236
+ result = inferType ( n , path ) and
2237
+ exists ( TypePath path0 | exists ( inferType ( n , path0 ) ) and path0 .length ( ) = getTypePathLimit ( ) )
2238
+ }
2239
+
2230
2240
Function debugResolveCallTarget ( Call c ) {
2231
2241
c = getRelevantLocatable ( ) and
2232
2242
result = resolveCallTarget ( c )
@@ -2265,6 +2275,10 @@ private module Debug {
2265
2275
result = strictcount ( Type t0 | t0 = inferType ( n , path ) )
2266
2276
}
2267
2277
2278
+ predicate countTypesForNodeAtLimit ( AstNode n , int c ) {
2279
+ c = strictcount ( Type t , TypePath path | t = debugInferTypeForNodeAtLimit ( n , path ) )
2280
+ }
2281
+
2268
2282
predicate maxTypes ( AstNode n , TypePath path , Type t , int c ) {
2269
2283
c = countTypesAtPath ( n , path , t ) and
2270
2284
c = max ( countTypesAtPath ( _, _, _) )
0 commit comments