@@ -170,6 +170,11 @@ module PointsTo {
170170
171171cached module PointsToInternal {
172172
173+ pragma [ noinline]
174+ cached predicate importCtxPointsTo ( ControlFlowNode f , ObjectInternal value , ControlFlowNode origin ) {
175+ PointsToInternal:: pointsTo ( f , any ( Context ctx | ctx .isImport ( ) ) , value , origin )
176+ }
177+
173178 /** INTERNAL -- Use `f.refersTo(value, origin)` instead. */
174179 cached predicate pointsTo ( ControlFlowNode f , PointsToContext context , ObjectInternal value , ControlFlowNode origin ) {
175180 points_to_candidate ( f , context , value , origin ) and
@@ -695,7 +700,7 @@ private module InterModulePointsTo {
695700 predicate ofInterestInExports ( ModuleObjectInternal mod , string name ) {
696701 exists ( ImportStarNode imp , ImportStarRefinement def , EssaVariable var |
697702 imp = def .getDefiningNode ( ) and
698- PointsToInternal:: pointsTo ( imp .getModule ( ) , any ( Context ctx | ctx . isImport ( ) ) , mod , _) and
703+ PointsToInternal:: importCtxPointsTo ( imp .getModule ( ) , mod , _) and
699704 var = def .getVariable ( )
700705 |
701706 if var .isMetaVariable ( ) then (
@@ -878,7 +883,7 @@ module InterProceduralPointsTo {
878883 /** Helper for parameter_points_to */
879884 pragma [ noinline]
880885 private predicate default_parameter_points_to ( ParameterDefinition def , PointsToContext context , ObjectInternal value , ControlFlowNode origin ) {
881- exists ( PointsToContext imp | imp . isImport ( ) | PointsToInternal:: pointsTo ( def .getDefault ( ) , imp , value , origin ) ) and
886+ PointsToInternal:: importCtxPointsTo ( def .getDefault ( ) , value , origin ) and
882887 context_for_default_value ( def , context )
883888 }
884889
@@ -2198,7 +2203,7 @@ cached module ModuleAttributes {
21982203 private predicate importStarDef ( ImportStarRefinement def , EssaVariable input , ModuleObjectInternal mod ) {
21992204 exists ( ImportStarNode imp |
22002205 def .getVariable ( ) .getName ( ) = "$" and imp = def .getDefiningNode ( ) and
2201- input = def .getInput ( ) and PointsToInternal:: pointsTo ( imp .getModule ( ) , any ( Context ctx | ctx . isImport ( ) ) , mod , _)
2206+ input = def .getInput ( ) and PointsToInternal:: importCtxPointsTo ( imp .getModule ( ) , mod , _)
22022207 )
22032208 }
22042209
0 commit comments