private static ImmutableSet < String > findParametersReferencedAfterSideEffect ( ImmutableSet < String > parameters , Node root ) { // TODO(johnlenz): Consider using scope for this. Set < String > locals = new HashSet <> ( parameters ) ; gatherLocalNames ( root , locals ) ; ReferencedAfterSideEffect collector = new ReferencedAfterSideEffect ( parameters , ImmutableSet . copyOf ( locals ) ) ; NodeUtil . visitPostOrder ( root , collector , collector ) ; return collector . getResults ( ) ; }
Bootstrap a traversal to look for parameters referenced after a non - local side - effect .