@@ -127,6 +127,8 @@ private module Input1 implements InputSig1<Location> {
127127 tp0 order by kind , id1 , id2
128128 )
129129 }
130+
131+ int getTypePathLimit ( ) { result = 10 }
130132}
131133
132134private import Input1
@@ -135,6 +137,8 @@ private module M1 = Make1<Location, Input1>;
135137
136138private import M1
137139
140+ predicate getTypePathLimit = Input1:: getTypePathLimit / 0 ;
141+
138142class TypePath = M1:: TypePath ;
139143
140144module TypePath = M1:: TypePath;
@@ -2217,8 +2221,9 @@ private module Debug {
22172221 private Locatable getRelevantLocatable ( ) {
22182222 exists ( string filepath , int startline , int startcolumn , int endline , int endcolumn |
22192223 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" )
22222227 )
22232228 }
22242229
@@ -2227,6 +2232,11 @@ private module Debug {
22272232 result = inferType ( n , path )
22282233 }
22292234
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+
22302240 Function debugResolveCallTarget ( Call c ) {
22312241 c = getRelevantLocatable ( ) and
22322242 result = resolveCallTarget ( c )
@@ -2265,6 +2275,10 @@ private module Debug {
22652275 result = strictcount ( Type t0 | t0 = inferType ( n , path ) )
22662276 }
22672277
2278+ predicate countTypesForNodeAtLimit ( AstNode n , int c ) {
2279+ c = strictcount ( Type t , TypePath path | t = debugInferTypeForNodeAtLimit ( n , path ) )
2280+ }
2281+
22682282 predicate maxTypes ( AstNode n , TypePath path , Type t , int c ) {
22692283 c = countTypesAtPath ( n , path , t ) and
22702284 c = max ( countTypesAtPath ( _, _, _) )
0 commit comments