@@ -74,7 +74,7 @@ module CallGraph {
7474 */
7575 pragma [ nomagic]
7676 private
77- DataFlow:: SourceNode getABoundFunctionReference ( DataFlow:: FunctionNode function , int boundArgs , DataFlow:: TypeTracker t ) {
77+ DataFlow:: SourceNode getABoundFunctionReferenceAux ( DataFlow:: FunctionNode function , int boundArgs , DataFlow:: TypeTracker t ) {
7878 exists ( DataFlow:: PartialInvokeNode partial , DataFlow:: Node callback |
7979 result = partial .getBoundFunction ( callback , boundArgs ) and
8080 getAFunctionReference ( function , 0 , t .continue ( ) ) .flowsTo ( callback )
@@ -90,7 +90,7 @@ module CallGraph {
9090 private
9191 DataFlow:: SourceNode getABoundFunctionReferenceAux ( DataFlow:: FunctionNode function , int boundArgs , DataFlow:: TypeTracker t , DataFlow:: StepSummary summary ) {
9292 exists ( DataFlow:: SourceNode prev |
93- prev = getABoundFunctionReference ( function , boundArgs , t ) and
93+ prev = getABoundFunctionReferenceAux ( function , boundArgs , t ) and
9494 DataFlow:: StepSummary:: step ( prev , result , summary )
9595 )
9696 }
@@ -100,8 +100,12 @@ module CallGraph {
100100 * with `function` as the underlying function.
101101 */
102102 cached
103- DataFlow:: SourceNode getABoundFunctionReference ( DataFlow:: FunctionNode function , int boundArgs ) {
104- result = getABoundFunctionReference ( function , boundArgs , DataFlow:: TypeTracker:: end ( ) )
103+ DataFlow:: SourceNode getABoundFunctionReference ( DataFlow:: FunctionNode function , int boundArgs , boolean contextDependent ) {
104+ exists ( DataFlow:: TypeTracker t |
105+ result = getABoundFunctionReferenceAux ( function , boundArgs , t ) and
106+ t .end ( ) and
107+ contextDependent = t .hasCall ( )
108+ )
105109 }
106110
107111 /**
0 commit comments