private void visitCall ( AmbiguatedFunctionSummary callerInfo , Node invocation ) { // Handle special cases (Math, RegExp) // TODO: This logic can probably be replaced with @nosideeffects annotations in externs. if ( invocation . isCall ( ) && ! NodeUtil . functionCallHasSideEffects ( invocation , compiler ) ) { return ; } // Handle known cases now (Object, Date, RegExp, etc) if ( invocation . isNew ( ) && ! NodeUtil . constructorCallHasSideEffects ( invocation ) ) { return ; } List < AmbiguatedFunctionSummary > calleeSummaries = getSummariesForCallee ( invocation ) ; if ( calleeSummaries . isEmpty ( ) ) { callerInfo . setAllFlags ( ) ; return ; } for ( AmbiguatedFunctionSummary calleeInfo : calleeSummaries ) { SideEffectPropagation edge = SideEffectPropagation . forInvocation ( invocation ) ; reverseCallGraph . connect ( calleeInfo . graphNode , edge , callerInfo . graphNode ) ; } }
Record information about a call site .