Package | Description |
---|---|
com.google.javascript.jscomp |
Provides the core compiler and its public API.
|
Modifier and Type | Field and Description |
---|---|
private CallGraph.Function |
CallGraph.Callsite.containingFunction |
private CallGraph.Function |
CallGraph.mainFunction
Represents the global function.
|
Modifier and Type | Field and Description |
---|---|
private java.util.Map<Node,CallGraph.Function> |
CallGraph.functionsByNode
Maps an AST node (with type Token.FUNCTION) to a Function object.
|
private java.util.Collection<CallGraph.Function> |
CallGraph.Callsite.possibleTargets |
Modifier and Type | Method and Description |
---|---|
private CallGraph.Function |
CallGraph.createFunction(Node functionNode)
Create a Function object for given an Token.FUNCTION AST node.
|
CallGraph.Function |
CallGraph.Callsite.getContainingFunction() |
CallGraph.Function |
CallGraph.getFunctionForAstNode(Node functionNode)
Returns the call graph Function object corresponding to the provided
AST Token.FUNCTION node, or null if no such object exists.
|
CallGraph.Function |
CallGraph.getMainFunction()
Returns a Function object representing the "main" global function.
|
CallGraph.Function |
CallGraph.getUniqueFunctionWithName(java.lang.String desiredName)
Finds a function with the given name.
|
private CallGraph.Function |
CallGraph.lookupFunctionForDefinition(DefinitionsRemover.Definition definition)
Returns a
CallGraph.Function for the passed in DefinitionsRemover.Definition
or null if the definition isn't for a function. |
Modifier and Type | Method and Description |
---|---|
private DiGraph<CallGraph.Function,CallGraph.Callsite> |
CallGraph.constructDirectedGraph(boolean forward)
Constructs a digraph of the call graph.
|
java.util.Collection<CallGraph.Function> |
CallGraph.getAllFunctions()
Returns a collection of all functions (including the main function)
in the call graph.
|
DiGraph<CallGraph.Function,CallGraph.Callsite> |
CallGraph.getBackwardDirectedGraph()
Constructs and returns a directed graph where the nodes are functions and
the edges are callsites connecting callees to callers.
|
DiGraph<CallGraph.Function,CallGraph.Callsite> |
CallGraph.getForwardDirectedGraph()
Constructs and returns a directed graph where the nodes are functions and
the edges are callsites connecting callers to callees.
|
java.util.Collection<CallGraph.Function> |
CallGraph.Callsite.getPossibleTargets()
Returns the possible target functions that this callsite could call.
|
Modifier and Type | Method and Description |
---|---|
private void |
CallGraph.Callsite.addPossibleTarget(CallGraph.Function target) |
private static void |
CallGraph.digraphConnect(DiGraph<CallGraph.Function,CallGraph.Callsite> digraph,
CallGraph.Function caller,
CallGraph.Callsite callsite,
CallGraph.Function callee,
boolean forward) |
private void |
CallGraph.updateFunctionForUse(CallGraph.Function function,
Node useNode)
Updates
CallGraph.Function information (such as whether is is aliased
or exposed to .apply or .call based a site where the function is used. |
Modifier and Type | Method and Description |
---|---|
private static void |
CallGraph.digraphConnect(DiGraph<CallGraph.Function,CallGraph.Callsite> digraph,
CallGraph.Function caller,
CallGraph.Callsite callsite,
CallGraph.Function callee,
boolean forward) |