Package | Description |
---|---|
com.google.javascript.jscomp |
Provides the core compiler and its public API.
|
com.google.javascript.jscomp.lint | |
com.google.javascript.jscomp.newtypes | |
com.google.javascript.jscomp.parsing |
Provides utilities to help with parsing JSDoc annotations and performing AST
transformations.
|
com.google.javascript.jscomp.testing | |
com.google.javascript.jscomp.type |
Provides type-checking data structures and algorithms.
|
com.google.javascript.refactoring | |
com.google.javascript.rhino |
The core AST from Rhino.
|
com.google.javascript.rhino.jstype |
Provides abstractions to represent types in JavaScript.
|
com.google.javascript.rhino.testing |
Modifier and Type | Field and Description |
---|---|
(package private) Node |
ScopedAliases.AliasUsage.aliasReference |
Node |
CheckEventfulObjectDisposal.EventfulObjectState.allocationSite |
private Node |
OptimizeParameters.Parameter.arg |
private Node |
AnalyzePrototypeProperties.LiteralProperty.assign |
private Node |
CheckGlobalThis.assignLhsChild
If
assignLhsChild != null , then the node being traversed is
a descendant of the first child of an ASSIGN node. |
private Node |
DefinitionsRemover.AssignmentDefinition.assignment |
(package private) Node |
RemoveUnusedVars.Assign.assignNode |
private Node |
CallGraph.Function.astNode |
private Node |
CallGraph.Callsite.astNode |
(package private) Node |
CodingConvention.Cache.cacheObj |
(package private) Node |
ProcessTweaks.TweakFunctionCall.callNode |
(package private) Node |
ChainCalls.CallSite.callNode |
(package private) Node |
FunctionInjector.Reference.callNode |
(package private) Node |
NewTypeInference.DeferredCheck.callSite |
private Node |
ProcessClosurePrimitives.ProvidedName.candidateDefinition |
(package private) Node |
Es6RewriteGenerators.ExceptionContext.catchBlock |
(package private) Node |
ClosureRewriteClass.ClassDefinition.classModifier |
private Node |
Es6ToEs3Converter.CheckClassAssignments.className |
(package private) Node |
Es6ToEs3Converter.ClassDeclarationMetadata.classNameNode |
private Node |
NodeTraversal.curNode
Contains the current node
|
private Node |
ClosureCheckModule.currentModule |
private Node |
PhaseOptimizer.currentScope |
private Node |
Es6RewriteGenerators.currentStatement |
private Node |
FlowSensitiveInlineVariables.Candidate.def |
(package private) Node |
ProcessTweaks.TweakInfo.defaultValueNode |
private Node |
Es6ToEs3Converter.ClassDeclarationMetadata.definePropertiesObjForClass
An object literal node that will be used in a call to Object.defineProperties, to add getters
and setters to the class.
|
private Node |
Es6ToEs3Converter.ClassDeclarationMetadata.definePropertiesObjForPrototype
An object literal node that will be used in a call to Object.defineProperties, to add getters
and setters to the prototype.
|
(package private) Node |
GlobalTypeInfo.PropertyDef.defSite |
(package private) Node |
PolymerClassDefinition.descriptor
The object literal passed to the call to the Polymer() function.
|
private Node |
Es6RewriteGenerators.enclosingBlock |
(package private) Node |
CreateSyntheticBlocks.Marker.endMarker |
(package private) Node |
CollapseVariableDeclarations.Collapse.endNode
Last node (non-inclusive) of the chain of nodes to collapse.
|
private Node |
FunctionTypeBuilder.errorRoot |
private Node |
ProcessClosurePrimitives.ProvidedName.explicitNode |
private Node |
AnalyzePrototypeProperties.AssignmentProperty.exprNode |
(package private) Node |
Compiler.externAndJsRoot |
private Node |
PureFunctionIdentifier.externs |
private Node |
ExternExportsPass.externsRoot
The AST root which holds the externs generated.
|
(package private) Node |
Compiler.externsRoot |
private Node |
GlobalNamespace.externsRoot |
(package private) Node |
ExpressionDecomposer.DecompositionState.extractBeforeStatement |
private Node |
Es6RewriteGenerators.ControlExitsCheck.finallyName |
private Node |
ProcessClosurePrimitives.ProvidedName.firstNode |
private Node |
InlineFunctions.NamedFunction.fn |
private Node |
InlineFunctions.FunctionExpression.fn |
protected Node |
DefinitionsRemover.FunctionDefinition.function |
private Node |
AngularPass.NodeContext.functionNode
Function node
|
private Node |
J2clPropertyInlinerPass.StaticFieldGetterSetterInliner.J2clProperty.getKey |
private Node |
Es6RewriteGenerators.hoistRoot |
Node |
ProcessDefines.DefineInfo.initialValue |
Node |
ProcessDefines.DefineInfo.initialValueParent |
private Node |
Es6ToEs3Converter.ClassDeclarationMetadata.insertionPoint
A statement node.
|
(package private) Node |
Compiler.jsRoot |
private Node |
PhaseOptimizer.jsRoot |
private Node |
PerformanceTracker.jsRoot |
(package private) Node |
CodingConvention.Cache.key |
private Node |
AnalyzePrototypeProperties.LiteralProperty.key |
(package private) Node |
CodingConvention.Cache.keyFn |
(package private) Node |
ClosureCodeRemoval.RemovableAssignment.lastAncestor
The last ancestor
|
private Node |
PhaseOptimizer.lastAst |
private Node |
ProcessDefines.DefineInfo.lastValue |
(package private) Node |
ExtractPrototypeMemberDeclarations.PrototypeMemberDeclaration.lhs |
private Node |
DefinitionsRemover.ObjectLiteralPropertyDefinition.literal |
private Node |
NodeIterators.LocalVarMotion.lookAhead |
private Node |
DefinitionsRemover.IncompleteDefinition.lValue |
private Node |
ProcessDefines.CollectDefines.lvalueToRemoveLater |
private Node |
AnalyzePrototypeProperties.LiteralProperty.map |
private Node |
JsMessageDefinition.messageNode |
private Node |
JsMessageVisitor.MessageLocation.messageNode |
(package private) Node |
ClosureRewriteModule.ModuleDescription.moduleDecl |
(package private) Node |
ClosureRewriteModule.ModuleDescription.moduleScopeRoot |
(package private) Node |
ClosureRewriteModule.ModuleDescription.moduleStatementRoot |
(package private) Node |
ChainCalls.CallSite.n |
private Node |
FunctionTypeBuilder.AstFunctionContents.n |
(package private) Node |
PolymerPass.MemberDefinition.name
Name
Node for the definition of this member. |
(package private) Node |
ClosureRewriteClass.MemberDefinition.name |
(package private) Node |
ClosureRewriteClass.ClassDefinition.name |
(package private) Node |
RescopeGlobalSymbols.RewriteScopeCallback.ModuleGlobal.name |
private Node |
DefinitionsRemover.ObjectLiteralPropertyDefinition.name |
private Node |
DefinitionsRemover.VarDefinition.name |
(package private) Node |
Var.nameNode
Var node
|
private Node |
ReferenceCollectingCallback.Reference.nameNode |
(package private) Node |
RemoveUnusedVars.Assign.nameNode |
private Node |
AnalyzePrototypeProperties.GlobalFunction.nameNode |
private Node |
FunctionRewriter.Reduction.newChild |
(package private) Node |
ChainCalls.CallSite.nextGetPropFirstChildNode |
(package private) Node |
ChainCalls.CallSite.nextGetPropNode |
private Node |
JsMessageVisitor.MalformedException.node |
(package private) Node |
MustBeReachingVariableDef.Definition.node |
(package private) Node |
CodePrinter.MappedCodePrinter.Mapping.node |
private Node |
AngularPass.NodeContext.node
Node jsDoc is attached to.
|
(package private) Node |
TypedScopeCreator.DeferredSetType.node |
private Node |
TypedScopeCreator.StubDeclaration.node |
private Node |
MinimizedCondition.MeasuredNode.node |
private Node |
RemoveUnusedVars.Continuation.node |
(package private) Node |
DefinitionSite.node |
Node |
JSError.node
Node where the warning occurred.
|
(package private) Node |
UseSite.node |
(package private) Node |
AliasStrings.StringOccurrence.node |
(package private) Node |
CrossModuleCodeMotion.Declaration.node |
(package private) Node |
NameAnalyzer.SpecialReferenceNode.node
The CALL node
|
(package private) Node |
GlobalNamespace.AstChange.node |
(package private) Node |
GlobalNamespace.Ref.node |
(package private) Node |
ClosureCodeRemoval.RemovableAssignment.node
The node
|
(package private) Node |
ExtractPrototypeMemberDeclarations.PrototypeMemberDeclaration.node |
(package private) Node |
ProcessEs6Modules.NameNodePair.nodeForSourceInfo |
(package private) Node |
CodingConvention.ObjectLiteralCast.objectNode
Object to cast.
|
private Node |
FunctionRewriter.Reduction.oldChild |
private Node |
Es6RewriteGenerators.originalGeneratorBody |
(package private) Node |
CodingConvention.Bind.parameters |
private Node |
FunctionTypeBuilder.parametersNode |
(package private) Node |
CollapseVariableDeclarations.Collapse.parent
Parent of the nodes to the collapse
|
(package private) Node |
ChainCalls.CallSite.parent |
(package private) Node |
AliasStrings.StringOccurrence.parent |
private Node |
FunctionRewriter.Reduction.parent |
Node |
FunctionNames.FunctionRecord.parent |
(package private) Node |
NameAnalyzer.JsNameRefNode.parent
Parent node of the name access
(ASSIGN, VAR, FUNCTION, OBJECTLIT, or CALL)
|
(package private) Node |
ClosureCodeRemoval.RemovableAssignment.parent
Its parent
|
private Node |
ExtractPrototypeMemberDeclarations.ExtractionInstance.parent |
(package private) Node |
AliasStrings.StringInfo.parentForNewVarDecl |
private Node |
MinimizedCondition.placeholder
A placeholder at the same AST location as the original condition
|
private Node |
PolymerPass.polymerElementExterns |
private Node |
PolymerClassRewriter.polymerElementExterns |
private Node |
PolymerPassFindExterns.polymerElementExterns |
private Node |
ProcessClosurePrimitives.ProvidedName.replacementNode |
(package private) Node |
ClosureRewriteModule.ModuleDescription.requireInsertNode |
(package private) Node |
ProcessClosurePrimitives.UnrecognizedRequire.requireNode |
private Node |
CodePrinter.Builder.root |
private Node |
PreprocessorSymbolTable.root |
private Node |
ReferenceCollectingCallback.BasicBlock.root |
(package private) Node |
J2clPropertyInlinerPass.StaticFieldGetterSetterInliner.root |
private Node |
J2clPass.ClassStaticFunctionsInliner.root |
private Node |
SyntheticAst.root |
(package private) Node |
RescopeGlobalSymbols.RewriteScopeCallback.ModuleGlobal.root |
private Node |
JsAst.root |
private Node |
ControlFlowAnalysis.root |
private Node |
NTIScope.root |
private Node |
GlobalNamespace.root |
private Node |
PureFunctionIdentifier.root |
private Node |
SymbolTable.SymbolScope.rootNode |
protected Node |
Scope.rootNode |
private Node |
InlineFunctions.FunctionState.safeFnNode |
private Node |
ScopedAliases.Traversal.scopeFunctionBody |
private Node |
J2clPropertyInlinerPass.StaticFieldGetterSetterInliner.J2clProperty.setKey |
(package private) Node |
AliasStrings.StringInfo.siblingToInsertVarDeclBefore |
Node |
NameReferenceGraph.Reference.site |
(package private) Node |
CreateSyntheticBlocks.Marker.startMarker |
(package private) Node |
CollapseVariableDeclarations.Collapse.startNode
Variable declaration that any following var nodes should be
collapsed into
|
(package private) Node |
ClosureRewriteClass.ClassDefinition.superClass |
(package private) Node |
Es6ToEs3Converter.ClassDeclarationMetadata.superClassNameNode |
private Node |
AngularPass.NodeContext.target
Node after which to inject the new code
|
(package private) Node |
PolymerClassDefinition.target
The target node (LHS) for the Polymer element definition.
|
(package private) Node |
CodingConvention.Bind.target |
private Node |
TemplateAstMatcher.templateStart
The head of the Node list that should be used to start the matching
process.
|
(package private) Node |
CodingConvention.Bind.thisValue |
private Node |
FlowSensitiveInlineVariables.Candidate.use |
private Node |
FlowSensitiveInlineVariables.Candidate.useCfgNode |
(package private) Node |
PolymerPass.MemberDefinition.value
Value
Node (RHS) for the definition of this member. |
(package private) Node |
ClosureRewriteClass.MemberDefinition.value |
(package private) Node |
InlineProperties.PropertyInfo.value |
protected Node |
ExternExportsPass.Export.value |
private Node |
DefinitionsRemover.ObjectLiteralPropertyDefinition.value |
private Node |
AnalyzePrototypeProperties.LiteralProperty.value |
(package private) Node |
CodingConvention.Cache.valueFn |
(package private) Node |
ProcessTweaks.TweakFunctionCall.valueNode |
private Node |
InlineFunctions.FunctionVar.var |
private Node |
CombinedCompilerPass.CallbackWrapper.waiting
The node that
NodeTraversal.Callback.shouldTraverse(NodeTraversal, Node, Node)
returned false for. |
Modifier and Type | Field and Description |
---|---|
(package private) java.util.Map<Node,InlineVariables.AliasCandidate> |
InlineVariables.InliningBehavior.aliasCandidates
Stored possible aliases of variables that never change, with
all the reference info about those variables.
|
private java.util.List<Node> |
ScopedAliases.Traversal.aliasDefinitionsInOrder |
private java.util.List<Node> |
PureFunctionIdentifier.allFunctionCalls |
private java.util.Map<Node,ProcessDefines.CollectDefines.RefInfo> |
ProcessDefines.CollectDefines.allRefInfo |
private java.util.Stack<Node> |
NodeIterators.FunctionlessLocalScope.ancestors |
private java.util.Map<Node,java.lang.String> |
InlineFunctions.anonFns |
private java.util.Map<Node,java.lang.String> |
InlineFunctions.CallVisitor.anonFunctionMap |
private java.util.Map<Node,java.lang.String> |
GlobalTypeInfo.anonFunNames |
private java.util.Deque<java.util.List<Node>> |
OptimizeArgumentsArray.argumentsAccessStack |
private java.util.List<Node> |
ClosureCodeRemoval.assertionCalls
List of assertion functions.
|
(package private) java.util.List<Node> |
ClosureCodeRemoval.RemovableAssignment.assignAncestors
Full chain of ASSIGN ancestors
|
private java.util.HashMap<Node,java.lang.Integer> |
DotFormatter.assignments |
private java.util.Map<Node,RemoveUnusedVars.Assign> |
RemoveUnusedVars.assignsByNode
The assigns, indexed by the NAME node that they assign to.
|
private java.util.Map<Node,java.lang.Integer> |
ControlFlowAnalysis.astPosition |
private java.util.Set<Node> |
ChainCalls.badFunctionNodes |
private java.util.Map<Node,Node> |
RenameProperties.callNodeToParentMap |
private java.util.Map<Node,Node> |
RenameProperties.callNodeToParentMap |
private java.util.List<Node> |
PureFunctionIdentifier.FunctionInformation.callsInFunctionBody |
private java.util.Map<Node,CallGraph.Callsite> |
CallGraph.callsitesByNode
Maps an AST node (with type Token.CALL or Token.NEW) to a Callsite object.
|
private java.util.List<Node> |
CheckUnusedPrivateProperties.candidates |
private java.util.List<Node> |
RemoveUnusedClassProperties.candidates |
private java.util.Map<Node,JSType> |
GlobalTypeInfo.castTypes |
private ControlFlowGraph<Node> |
NewTypeInference.cfg |
private ControlFlowGraph<Node> |
DotFormatter.cfg |
private ControlFlowGraph<Node> |
ControlFlowAnalysis.cfg |
private ControlFlowGraph<Node> |
FlowSensitiveInlineVariables.cfg |
private ControlFlowGraph<Node> |
UnreachableCodeElimination.EliminationPass.cfg |
private java.util.Deque<Node> |
NodeTraversal.cfgRoots
A stack of scope roots that are valid cfg roots.
|
(package private) java.util.Deque<ControlFlowGraph<Node>> |
NodeTraversal.cfgs
Stack of control flow graphs (CFG).
|
private com.google.common.collect.Multimap<Var,Node> |
RemoveUnusedVars.classDefiningCalls
Subclass name -> class-defining call EXPR node.
|
private java.util.SortedMap<java.lang.String,Node> |
ProcessTweaks.compilerDefaultValueOverrides |
private static com.google.common.base.Function<Node,Node.TypeDeclarationNode> |
JsdocToEs6TypedConverter.TypeDeclarationsIRFactory.CONVERT_TYPE_NODE |
private java.util.Map<java.lang.String,Node> |
CheckProvides.CheckProvidesCallback.ctors |
private java.util.List<Node> |
OptimizeArgumentsArray.currentArgumentsAccess |
private java.util.Set<Node> |
VariableReferenceCheck.ReferenceCheckingBehavior.ShallowReferenceCollector.currParamReferences |
private java.util.Map<Node,FunctionTypeBuilder.AstFunctionContents> |
TypedScopeCreator.FirstOrderFunctionAnalyzer.data |
private java.util.Map<Node,JSType> |
GlobalTypeInfo.declaredObjLitProps |
private com.google.common.collect.ImmutableMap<java.lang.String,Node> |
Compiler.defaultDefineValues |
private java.util.Map<Node,NewTypeInference.DeferredCheck> |
NewTypeInference.deferredChecks |
private java.util.List<Node> |
ProcessClosurePrimitives.defineCalls |
private java.util.Map<java.lang.String,Node> |
ExternExportsPass.definitionMap
A map of all assigns to their parent nodes.
|
private java.util.Map<Node,DefinitionSite> |
SimpleDefinitionFinder.definitionSiteMap |
private java.util.Map<Node,java.lang.String> |
ShadowVariables.deltaPseudoNameMap |
private java.util.List<Node> |
SymbolTable.docInfos
All Nodes with JSDocInfo in the program.
|
private java.util.Map<java.lang.String,Node> |
ProcessDefines.dominantReplacements |
(package private) java.util.Set<Node> |
SideEffectsAnalysis.RawMotionEnvironment.environment |
private java.util.Map<DiGraph.DiGraphEdge<Node,ControlFlowGraph.Branch>,TypeEnv> |
NewTypeInference.envs |
private java.util.Deque<Node> |
ControlFlowAnalysis.exceptionHandler |
private java.util.List<Node> |
ProcessCommonJSModules.ProcessCommonJsModulesCallback.exportRefs |
private java.util.LinkedHashMap<java.lang.String,Node> |
FindExportableNodes.exports
The set of node with @export annotations and their associated fully qualified names
|
(package private) java.util.List<Node> |
ClosureRewriteModule.ModuleDescription.exports |
private com.google.common.collect.Multimap<Node,Node> |
ControlFlowAnalysis.finallyMap |
private com.google.common.collect.Multimap<Node,Node> |
ControlFlowAnalysis.finallyMap |
private java.util.Map<java.lang.String,Node> |
J2clPass.ClassStaticFunctionsInliner.fnsToInlineByQualifiedName |
private java.util.Map<Node,FunctionTypeBuilder.AstFunctionContents> |
TypedScopeCreator.functionAnalysisResults |
private com.google.common.collect.Multimap<Node,java.lang.String> |
Es6RewriteBlockScopedDeclaration.LoopClosureTransformer.functionHandledMap |
private com.google.common.collect.Multimap<Node,Es6RewriteBlockScopedDeclaration.LoopClosureTransformer.LoopObject> |
Es6RewriteBlockScopedDeclaration.LoopClosureTransformer.functionLoopObjectsMap |
private java.util.Map<Node,FunctionNames.FunctionRecord> |
FunctionNames.functionMap |
private java.util.Map<Node,FunctionNames.FunctionRecord> |
FunctionNames.FunctionListExtractor.functionMap |
private java.util.Map<Node,FunctionNames.FunctionRecord> |
FunctionNames.FunctionExpressionNamer.functionMap |
private com.google.common.collect.ListMultimap<JSModule,Node> |
MoveFunctionDeclarations.functions |
private java.util.Map<Node,CallGraph.Function> |
CallGraph.functionsByNode
Maps an AST node (with type Token.FUNCTION) to a Function object.
|
private java.util.Map<Node,PureFunctionIdentifier.FunctionInformation> |
PureFunctionIdentifier.functionSideEffectMap |
private java.util.ArrayList<Node> |
RenameVars.globalNameNodes
List of global NAME nodes
|
private static com.google.common.base.Predicate<DiGraph.DiGraphEdge<Node,ControlFlowGraph.Branch>> |
CheckMissingReturn.GOES_THROUGH_TRUE_CONDITION_PREDICATE |
private java.util.Set<Node> |
ChainCalls.goodFunctionNodes |
private java.util.Set<Node> |
JsMessageVisitor.googMsgNodes
List of found goog.getMsg call nodes.
|
(package private) static com.google.common.base.Predicate<Node> |
NodeUtil.IMMUTABLE_PREDICATE |
private java.util.List<Node> |
Es6ToEs3ClassSideInheritance.FindStaticMembers.inheritsCalls |
private java.util.Set<Node> |
ScopedAliases.Traversal.injectedDecls |
private java.util.Map<java.lang.String,Node> |
Compiler.injectedLibraries |
private java.util.Map<Node,CrossModuleCodeMotion.InstanceofInfo> |
CrossModuleCodeMotion.instanceofNodes |
private static com.google.common.base.Predicate<Node> |
CheckMissingReturn.IS_RETURN |
private static com.google.common.base.Predicate<Node> |
NodeUtil.isStatement |
private java.util.List<Node> |
ExpandJqueryAliases.FindCallbackArgumentReferences.keyReferences |
private java.util.Set<Node> |
GlobalTypeInfo.ProcessScope.lendsObjlits |
private java.util.List<Node> |
TypedScopeCreator.AbstractScopeBuilder.lentObjectLiterals
Object literals with a @lends annotation aren't analyzed until we
reach the root of the statement they're defined in.
|
private java.util.Set<Node> |
Es6RewriteBlockScopedDeclaration.letConsts |
private java.util.ArrayList<Node> |
RenameVars.localNameNodes
List of local NAME nodes
|
private java.util.Map<Node,Es6RewriteBlockScopedDeclaration.LoopClosureTransformer.LoopObject> |
Es6RewriteBlockScopedDeclaration.LoopClosureTransformer.loopObjectMap |
private static com.google.common.base.Predicate<Node> |
Es6RewriteBlockScopedDeclaration.loopPredicate |
private java.util.Deque<Node> |
CreateSyntheticBlocks.markerStack
Markers can be nested.
|
(package private) static com.google.common.base.Predicate<Node> |
NodeUtil.MATCH_NOT_CLASS |
(package private) static com.google.common.base.Predicate<Node> |
NodeUtil.MATCH_NOT_FUNCTION |
(package private) static com.google.common.base.Predicate<Node> |
NodeUtil.MATCH_NOT_THIS_BINDING |
(package private) static com.google.common.base.Predicate<Node> |
PeepholeRemoveDeadCode.MATCH_UNNAMED_BREAK |
private static com.google.common.base.Predicate<Node> |
DeadAssignmentsElimination.matchRemovableAssigns |
(package private) com.google.common.collect.Multimap<Var,Node> |
MaybeReachingVariableUse.ReachingUses.mayUseMap |
(package private) com.google.common.collect.Multimap<java.lang.String,Node> |
MethodCompilerPass.methodDefinitions |
private java.util.List<Node> |
ProcessCommonJSModules.ProcessCommonJsModulesCallback.moduleExportRefs |
private java.util.Map<JSModule,Node> |
AliasStrings.moduleVarParentMap
Map from module to the node in that module that should parent any string
variable declarations that have to be moved into that module
|
private java.util.Map<JSModule,Node> |
CrossModuleCodeMotion.moduleVarParentMap
Map from module to the node in that module that should parent any string
variable declarations that have to be moved into that module
|
private java.util.Map<Node,Node> |
PhaseOptimizer.mtoc |
private java.util.Map<Node,Node> |
PhaseOptimizer.mtoc |
private java.util.Map<java.lang.String,java.util.List<Node>> |
MakeDeclaredNamesUnique.ContextualRenameInverter.nameMap |
private java.util.Map<Node,Es6TypedToEs6Converter.Namespace> |
Es6TypedToEs6Converter.nodeNamespaceMap |
private com.google.common.collect.Ordering<Node> |
SymbolTable.nodeOrdering |
private java.util.Map<DiGraph.DiGraphNode<Node,ControlFlowGraph.Branch>,java.lang.Integer> |
ControlFlowAnalysis.nodePriorities |
private java.util.Set<Node> |
DeclaredGlobalExternsOnWindow.nodes |
private java.util.Set<Node> |
CollapseVariableDeclarations.nodesToCollapse
Nodes we've already looked at for collapsing, so that we don't look at them
again (we look ahead when examining what nodes can be collapsed, and the
node traversal may give them to us again)
|
(package private) java.util.Set<Node> |
NameAnalyzer.FindReferences.nodesToKeep |
private java.util.Map<Node,RawNominalType> |
GlobalTypeInfo.nominaltypesByNode |
private static com.google.common.base.Predicate<Node> |
NameAnalyzer.NON_LOCAL_RESULT_PREDICATE |
private java.util.List<Node> |
TypedScopeCreator.AbstractScopeBuilder.nonExternFunctions
Functions that we found in the global scope and not in externs.
|
private java.util.Set<Node> |
MarkNoSideEffectCalls.noSideEffectFunctionNames |
private static com.google.common.base.Predicate<Node> |
SideEffectsAnalysis.NOT_FUNCTION_PREDICATE |
private java.util.Map<Node,java.lang.String> |
ShadowVariables.oldPseudoNameMap |
private java.util.Deque<java.util.Map<java.lang.String,Node>> |
Es6TypedToEs6Converter.overloadStack |
private java.util.ArrayList<Node> |
TemplateAstMatcher.paramNodeMatches
Record the first Node to match a template parameter, only valid for
the last match if it was successful.
|
private com.google.common.collect.ImmutableList<Node> |
PolymerPass.polymerElementProps |
private com.google.common.collect.ImmutableList.Builder<Node> |
PolymerPassFindExterns.polymerElementProps |
private java.util.Map<DiGraph.DiGraphNode<Node,ControlFlowGraph.Branch>,java.lang.Integer> |
ControlFlowAnalysis.AstControlFlowGraph.priorities |
private java.util.Comparator<DiGraph.DiGraphNode<Node,ControlFlowGraph.Branch>> |
ControlFlowAnalysis.priorityComparator |
private java.util.List<Node> |
CheckSideEffects.problemNodes |
private java.util.Set<Node> |
Es6TypedToEs6Converter.processedOverloads |
(package private) java.util.List<Node> |
ClosureRewriteModule.ModuleDescription.provides |
private java.util.Map<java.lang.String,Node> |
CheckProvides.CheckProvidesCallback.provides |
private java.util.Map<Node,java.lang.String> |
RenameVars.pseudoNameMap
Maps a name node to its pseudo name, null if we are not generating so
there will be no overhead unless we are debugging.
|
private com.google.common.collect.Multimap<Var,Node> |
Es6RewriteBlockScopedDeclaration.LoopClosureTransformer.referenceMap |
private com.google.common.collect.Multimap<Node,NameReferenceGraph.Name> |
NameReferenceGraph.referenceMap |
private java.util.Map<Node,SymbolTable.Reference> |
SymbolTable.Symbol.references |
private java.util.Map<Node,InlineFunctions.Reference> |
InlineFunctions.FunctionState.references |
private java.util.Map<Node,Node> |
SideEffectsAnalysis.VariableUseDeclarationMap.referencesByNameNode |
private java.util.Map<Node,Node> |
SideEffectsAnalysis.VariableUseDeclarationMap.referencesByNameNode |
private java.util.List<Node> |
OptimizeParameters.removedNodes |
private java.util.Map<Node,java.util.Map<java.lang.String,java.lang.String>> |
Es6RewriteBlockScopedDeclaration.renameMap |
private java.util.Map<Node,java.util.Map<java.lang.String,java.lang.String>> |
Es6RenameReferences.renameMap |
private java.util.List<Node> |
GatherSideEffectSubexpressionsCallback.GetReplacementSideEffectSubexpressions.replacements |
private java.util.Set<Node> |
ConformanceRules.BanUnknownThis.reports |
private java.util.Map<java.lang.String,Node> |
CheckRequiresForConstructors.requires |
(package private) java.util.List<Node> |
ClosureRewriteModule.ModuleDescription.requires |
private java.util.List<Node> |
ProcessClosurePrimitives.requiresToBeRemoved |
(package private) java.util.Map<Node,JSType> |
DisambiguateProperties.Property.rootTypesByNode
A map from nodes that need renaming to the highest type in the prototype
chain containing the field for each node.
|
private java.util.List<Node> |
ScopedAliases.Traversal.scopeCalls |
private java.util.Deque<Node> |
NodeTraversal.scopeRoots
A stack of scope roots.
|
private java.util.Map<Node,SymbolTable.SymbolScope> |
SymbolTable.scopes
All syntactic scopes in the program, uniquely identified by the node where
they're declared.
|
private java.util.Map<Node,TypedScope> |
MemoizedScopeCreator.scopes |
private com.google.common.collect.ListMultimap<Node,NameAnalyzer.NameInformation> |
NameAnalyzer.scopes
Map of name scopes - all children of the Node key have a dependency on the
name value.
|
private com.google.common.collect.Multimap<Node,java.lang.String> |
ShadowVariables.scopeUpRefMap |
private static com.google.common.base.Predicate<Node> |
FlowSensitiveInlineVariables.SIDE_EFFECT_PREDICATE |
private java.util.Set<Node> |
Es6ToEs3ClassSideInheritance.JavascriptClass.staticFieldAccess |
private java.util.Set<Node> |
Es6ToEs3ClassSideInheritance.JavascriptClass.staticMembers |
private java.util.List<Node> |
RenameProperties.stringNodesToRename |
private java.util.List<Node> |
AmbiguateProperties.stringNodesToRename |
private com.google.common.collect.Table<Node,java.lang.String,SymbolTable.Symbol> |
SymbolTable.symbols
All symbols in the program, uniquely identified by the node where
they're declared and their name.
|
private java.util.List<Node> |
RemoveUnusedVars.CallSiteOptimizer.toRemove |
private java.util.List<Node> |
RemoveUnusedVars.CallSiteOptimizer.toReplaceWithZero |
private java.util.Map<java.lang.String,Node> |
CheckRequiresForConstructors.usages |
private java.util.List<Node> |
ExpandJqueryAliases.FindCallbackArgumentReferences.valueReferences |
(package private) java.util.Map<java.lang.String,Node> |
NodeUtil.VarCollector.vars |
private com.google.common.collect.Multimap<Var,Node> |
ShadowVariables.varToNameUsage |
private java.util.Map<Node,VariableVisibilityAnalysis.VariableVisibility> |
VariableVisibilityAnalysis.visibilityByDeclaringNameNode
Maps the declaring name node for a variable to that variable's
visibility.
|
private java.util.Map<java.lang.String,Node> |
CheckRequiresForConstructors.weakUsages |
Modifier and Type | Method and Description |
---|---|
private Node |
RuntimeTypeCheck.AddMarkers.addMarker(FunctionType funType,
Node nodeToInsertAfter,
ObjectType interfaceType) |
private static Node |
Normalize.NormalizeStatements.addToFront(Node parent,
Node newChild,
Node after) |
private Node |
FunctionToBlockMutator.aliasAndInlineArguments(Node fnTemplateRoot,
java.util.LinkedHashMap<java.lang.String,Node> argMap,
java.util.Set<java.lang.String> namesToAlias)
Inlines the arguments within the node tree using the given argument map,
replaces "unsafe" names with local aliases.
|
private static Node |
Es6ToEs3Converter.arrayFromIterable(AbstractCompiler compiler,
Node iterable)
Returns a call to $jscomp.arrayFromIterable with
iterable as its argument. |
private Node |
Es6ConvertSuper.baseCall(java.lang.String baseClass,
java.lang.String methodName,
Node arguments) |
(package private) static Node |
NodeUtil.booleanNode(boolean value) |
protected Node |
FunctionRewriter.Reducer.buildCallNode(java.lang.String methodName,
Node argumentNode,
Node srcref)
Builds a method call based on the the given method name,
argument and history.
|
private Node |
ReplaceStrings.buildReplacement(Node expr,
Node prefix,
java.lang.StringBuilder keyBuilder)
Builds a replacement abstract syntax tree for the string expression
expr . |
private static Node |
ExpressionDecomposer.buildResultExpression(Node expr,
boolean needResult,
java.lang.String tempName)
Create an expression tree for an expression.
|
private static Node |
Es6ToEs3Converter.callEs6RuntimeFunction(AbstractCompiler compiler,
Node iterable,
java.lang.String function) |
private static Node |
CreateSyntheticBlocks.childAfter(Node parent,
Node siblingBefore)
Like Node.getNext, that null is used to signal the child before the
block.
|
private static Node |
SideEffectsAnalysis.closestControlDependentAncestor(Node node) |
private static Node |
NameAnalyzer.collapseReplacements(java.util.List<Node> replacements)
Merge a list of nodes into a single expression.
|
(package private) static Node |
ControlFlowAnalysis.computeFallThrough(Node n)
Computes the destination node of n when we want to fallthrough into the
subtree of n.
|
private Node |
UnreachableCodeElimination.EliminationPass.computeFollowing(Node n) |
(package private) static Node |
ControlFlowAnalysis.computeFollowNode(Node node) |
(package private) static Node |
ControlFlowAnalysis.computeFollowNode(Node node,
ControlFlowAnalysis cfa) |
private static Node |
ControlFlowAnalysis.computeFollowNode(Node fromNode,
Node node,
ControlFlowAnalysis cfa)
Computes the follow() node of a given node and its parent.
|
private static Node |
ReplaceMessages.constructAddOrStringNode(java.util.Iterator<java.lang.CharSequence> partsIterator,
Node argListNode)
Creates a parse tree corresponding to the remaining message parts in
an iteration.
|
private static Node |
ReplaceMessages.constructStringExprNode(java.util.Iterator<java.lang.CharSequence> parts,
Node objLitNode,
Node refNode)
Creates a parse tree corresponding to the remaining message parts in an
iteration.
|
private Node |
Es6TypedToEs6Converter.convertDeclaredTypeToJSDoc(Node type) |
private Node |
Es6TypedToEs6Converter.convertMemberFunctionToMemberVariable(Node member) |
private Node |
Es6TypedToEs6Converter.convertNamedType(Node type) |
private Node |
Es6TypedToEs6Converter.convertWithLocation(Node type) |
private static Node |
FunctionToBlockMutator.createAssignStatementNode(java.lang.String name,
Node expression)
Create a valid statement Node containing an assignment to name of the
given expression.
|
private Node |
RuntimeTypeCheck.AddChecks.createCheckerNode(JSType type)
Creates a node which evaluates to a checker for the given type (which
must not be a union).
|
private Node |
RuntimeTypeCheck.AddChecks.createCheckTypeCallNode(JSType type,
Node expr)
Creates a function call to check that the given expression matches the
given type at runtime.
|
private Node |
ProcessTweaks.createCompilerDefaultValueOverridesVarNode(Node sourceInformationNode)
Creates a JS object that holds a map of tweakId -> default value override.
|
private static Node |
CoverageInstrumentationPass.createConditionalVarDecl(java.lang.String name,
Node srcref) |
private static Node |
Es6TemplateLiterals.createCookedStringArray(Node n) |
private Node |
ProcessClosurePrimitives.ProvidedName.createDeclarationNode()
Create the declaration node for this name, without inserting it
into the AST.
|
(package private) Node |
ProcessTweaks.TweakFunction.createDefaultValueNode() |
private Node |
ExternExportsPass.Export.createExternFunction(Node exportedFunction)
Given a function to export, create the empty function that
will be put in the externs file.
|
private Node |
ExternExportsPass.Export.createExternObjectLit(Node exportedObjectLit)
Given an object literal to export, create an object lit with all its
string properties.
|
private static Node |
Es6RewriteGenerators.createFinallyJumpBlock(Node finallyName,
int finallyStartState) |
private static Node |
Es6RewriteGenerators.createIteratorResult(Node value,
boolean done) |
private Node |
ProcessClosurePrimitives.ProvidedName.createNamespaceLiteral()
There are some special cases where clients of the compiler
do not run TypedScopeCreator after running this pass.
|
private Node |
Es6TypedToEs6Converter.createPropertyDefinition(Node member,
java.lang.String className) |
private static Node |
Es6TemplateLiterals.createRawStringArray(Node n) |
private static Node |
Es6RewriteGenerators.createSafeBreak() |
private static Node |
Es6RewriteGenerators.createStateUpdate() |
private static Node |
Es6RewriteGenerators.createStateUpdate(int state) |
private Node |
TemplateAstMatcher.createTemplateLocalNameNode(int index) |
private Node |
TemplateAstMatcher.createTemplateParameterNode(int index,
JSType type) |
protected Node |
NodeIterators.FunctionlessLocalScope.current()
Gets the node most recently returned by next().
|
protected Node |
NodeIterators.FunctionlessLocalScope.currentParent()
Gets the parent of the node most recently returned by next().
|
private static Node |
Es6RewriteDestructuring.defaultValueHook(Node getprop,
Node defaultValue)
Helper for transpiling DEFAULT_VALUE trees.
|
private Node |
OptimizeParameters.eliminateCallParamAt(SimpleDefinitionFinder defFinder,
OptimizeParameters.Parameter p,
Node call,
int argIndex)
Eliminates the parameter from a function call.
|
private static Node |
OptimizeParameters.eliminateFunctionParamAt(Node function,
int argIndex)
Eliminates the parameter from a function definition.
|
(package private) abstract Node |
AbstractCompiler.ensureLibraryInjected(java.lang.String resourceName,
boolean normalizeAndUniquifyNames)
The subdir js/ contains libraries of code that we inject
at compile-time only if requested by this function.
|
(package private) Node |
Compiler.ensureLibraryInjected(java.lang.String resourceName,
boolean normalizeAndUniquifyNames) |
private Node |
ExpressionDecomposer.extractConditional(Node expr,
Node injectionPoint,
boolean needResult) |
private Node |
ExpressionDecomposer.extractExpression(Node expr,
Node injectionPoint) |
private static Node |
ClosureRewriteClass.extractProperty(Node objlit,
java.lang.String keyName) |
Node |
SideEffectsAnalysis.VariableUseDeclarationMap.findDeclaringNameNodeForUse(Node usingNameNode)
Returns the NAME node for the declaration of the variable
that
usingNameNode refers to, if it is in the map,
or null otherwise. |
private static Node |
RuntimeTypeCheck.AddMarkers.findEnclosingConstructorDeclaration(Node n) |
(package private) static Node |
ExpressionDecomposer.findExpressionRoot(Node subExpression) |
(package private) static Node |
ExpressionDecomposer.findInjectionPoint(Node subExpression) |
private Node |
RuntimeTypeCheck.AddMarkers.findNodeToInsertAfter(Node n)
Find the node to insert the markers after.
|
private static Node |
ExpressionDecomposer.findNonconditionalParent(Node subExpression,
Node expressionRoot) |
private Node |
ScopedAliases.Traversal.findScopeMethodCall(Node scopeRoot) |
private static Node |
ClosureRewriteClass.fixupFreeCall(Node call) |
private static Node |
ClosureRewriteClass.fixupSrcref(Node node) |
private static Node |
GlobalTypeInfo.fromDefsiteToName(Node defSite) |
protected static Node |
StatementFusion.fuseExpressionIntoExpression(Node exp1,
Node exp2) |
private static Node |
StatementFusion.fuseIntoOneStatement(Node parent,
Node first,
Node last)
Given a block, fuse a list of statements with comma's.
|
private static Node |
NodeUtil.getAddingRoot(Node n)
Gets a Node at the top of the current scope where we can add new var
declarations as children.
|
Node |
OptimizeParameters.Parameter.getArg() |
(package private) static Node |
NodeUtil.getArgumentForCallOrNew(Node call,
int index)
Given the new or call, this returns the nth
argument of the call or null if no such argument exists.
|
private static Node |
RemoveUnusedVars.CallSiteOptimizer.getArgumentForCallOrNewOrDotCall(UseSite site,
int argIndex)
Returns the nth argument node given a usage site for a direct function
call or for a func.call() node.
|
(package private) static Node |
NodeUtil.getArgumentForFunction(Node function,
int index)
Given the function, this returns the nth
argument or null if no such parameter exists.
|
Node |
CodingConvention.AssertionFunctionSpec.getAssertedParam(Node firstParam)
Returns the parameter of the assertion function that is being checked.
|
(package private) Node |
ReferenceCollectingCallback.Reference.getAssignedValue() |
static Node |
NodeUtil.getAssignedValue(Node n)
For an assignment or variable declaration get the assigned value.
|
private Node |
AnalyzePrototypeProperties.AssignmentProperty.getAssignNode() |
Node |
CallGraph.Function.getAstNode()
Returns the underlying AST node for the function.
|
Node |
CallGraph.Callsite.getAstNode() |
Node |
SyntheticAst.getAstRoot(AbstractCompiler compiler) |
Node |
JsAst.getAstRoot(AbstractCompiler compiler) |
Node |
SourceAst.getAstRoot(AbstractCompiler compiler)
Gets the root node of the AST for the source file this represents.
|
Node |
CompilerInput.getAstRoot(AbstractCompiler compiler) |
private static Node |
CheckEventfulObjectDisposal.getBase(Node n) |
private Node |
ProcessCommonJSModules.ProcessCommonJsModulesCallback.getBaseQualifiedNameNode(Node n) |
(package private) static Node |
NodeUtil.getBestLValue(Node n)
Find the l-value that the given r-value is being assigned to.
|
(package private) static Node |
NodeUtil.getBestLValueOwner(Node lValue)
Get the owner of the given l-value node.
|
private static Node |
PeepholeMinimizeConditions.getBlockExpression(Node n) |
private static Node |
PeepholeMinimizeConditions.getBlockReturnExpression(Node n) |
private static Node |
PeepholeMinimizeConditions.getBlockVar(Node n) |
(package private) Node |
NTIScope.getBody() |
Node |
CallGraph.Function.getBodyNode()
Returns the AST node for the body of the function.
|
private Node |
TypeTransformation.getCallArgument(Node n,
int i) |
(package private) static Node |
NodeUtil.getCatchBlock(Node n) |
(package private) static Node |
ControlFlowAnalysis.getCatchHandlerForBlock(Node block)
Locate the catch BLOCK given the first block in a TRY.
|
private Node |
NodeTraversal.getCfgRoot() |
private static Node |
ReplaceMessagesForChrome.getChromeI18nGetMessageNode(java.lang.String messageId) |
private Node |
TypeTransformation.getComputedPropValue(Node n) |
private Node |
PeepholeRemoveDeadCode.getConditionalStatementCondition(Node n) |
(package private) static Node |
NodeUtil.getConditionExpression(Node n)
Gets the condition of an ON_TRUE / ON_FALSE CFG edge.
|
Node |
NodeTraversal.getCurrentNode()
Returns the node currently being traversed.
|
private Node |
ProcessCommonJSModules.ProcessCommonJsModulesCallback.getCurrentScriptNode(Node n)
Returns next script node in parents.
|
Node |
SymbolTable.Symbol.getDeclarationNode() |
private static Node |
AngularPass.getDeclarationRValue(Node n)
Given a VAR node (variable declaration) returns the node of initial value.
|
Node |
InlineFunctions.Function.getDeclaringBlock() |
Node |
InlineFunctions.NamedFunction.getDeclaringBlock() |
Node |
InlineFunctions.FunctionVar.getDeclaringBlock() |
Node |
InlineFunctions.FunctionExpression.getDeclaringBlock() |
(package private) Node |
ProcessTweaks.TweakInfo.getDefaultValueNode() |
private Node |
FlowSensitiveInlineVariables.Candidate.getDefCfgNode() |
(package private) Node |
MustBeReachingVariableDef.getDefNode(java.lang.String name,
Node useNode) |
static Node |
NodeUtil.getEnclosingBlock(Node n)
Finds the block containing the given node.
|
(package private) static Node |
NodeUtil.getEnclosingClass(Node n)
Finds the class containing the given node.
|
(package private) static Node |
NodeUtil.getEnclosingClassMemberFunction(Node n)
Finds the class member function containing the given node.
|
private static Node |
ProcessClosurePrimitives.getEnclosingDeclNameNode(Node n)
Returns the qualified name node of the function whose scope we're in,
or null if it cannot be found.
|
Node |
NodeTraversal.getEnclosingFunction()
Examines the functions stack for the last instance of a function node.
|
static Node |
NodeUtil.getEnclosingFunction(Node n)
Finds the function containing the given node.
|
static Node |
NodeUtil.getEnclosingNode(Node n,
com.google.common.base.Predicate<Node> pred) |
private Node |
PhaseOptimizer.getEnclosingScope(Node n) |
static Node |
NodeUtil.getEnclosingScript(Node n)
Finds the script containing the given node.
|
static Node |
NodeUtil.getEnclosingStatement(Node n) |
(package private) static Node |
NodeUtil.getEnclosingType(Node n,
int type)
Gets the closest ancestor to the given node of the provided type.
|
(package private) static Node |
PeepholeMinimizeConditions.getExceptionHandler(Node n) |
(package private) static Node |
ControlFlowAnalysis.getExceptionHandler(Node n)
Get the TRY block with a CATCH that would be run if n throws an exception.
|
(package private) static Node |
NodeUtil.getFirstComputedPropMatchingKey(Node objlit,
Node key) |
private static Node |
CodeGenerator.getFirstNonEmptyChild(Node n)
Gets the first non-empty child of the given node.
|
(package private) static Node |
NodeUtil.getFirstPropMatchingKey(Node objlit,
java.lang.String keyName) |
private static Node |
RemoveUnusedVars.getFunctionArgList(Node function) |
(package private) static Node |
NodeUtil.getFunctionBody(Node fn)
Return a BLOCK node for the given FUNCTION node.
|
private Node |
TypeTransformation.getFunctionBody(Node n) |
Node |
AngularPass.NodeContext.getFunctionNode() |
Node |
InlineFunctions.Function.getFunctionNode()
Gets the function node
|
Node |
InlineFunctions.NamedFunction.getFunctionNode() |
Node |
InlineFunctions.FunctionVar.getFunctionNode() |
Node |
InlineFunctions.FunctionExpression.getFunctionNode() |
static Node |
NodeUtil.getFunctionParameters(Node fnNode) |
private Node |
FunctionRewriter.GetterReducer.getGetPropertyName(Node functionNode)
Checks if the function matches the pattern:
function(
|
(package private) Node |
ReferenceCollectingCallback.Reference.getGrandparent() |
(package private) Node |
NameAnalyzer.SpecialReferenceNode.getGrandparent() |
(package private) Node |
ProcessTweaks.TweakFunctionCall.getIdNode() |
Node |
Var.getInitialValue() |
Node |
TypedVar.getInitialValue() |
private Node |
ClosureRewriteModule.getInsertRoot(Node n) |
private Node |
CoverageInstrumentationPass.getInstrumentationExternsNode()
Creates a node of externs code required for the arrays used for
instrumentation.
|
(package private) abstract Node |
AbstractCompiler.getJsRoot()
Returns the root of the source tree, ignoring externs
|
(package private) Node |
Compiler.getJsRoot() |
Node |
ProcessDefines.DefineInfo.getLastValue()
Gets the last assigned value.
|
(package private) static Node |
NodeUtil.getLoopCodeBlock(Node n) |
abstract Node |
DefinitionsRemover.Definition.getLValue()
Variable or property name represented by this definition.
|
Node |
DefinitionsRemover.IncompleteDefinition.getLValue() |
Node |
DefinitionsRemover.FunctionDefinition.getLValue() |
Node |
DefinitionsRemover.AssignmentDefinition.getLValue() |
Node |
DefinitionsRemover.ObjectLiteralPropertyDefinition.getLValue() |
Node |
DefinitionsRemover.VarDefinition.getLValue() |
Node |
JsMessageDefinition.getMessageNode() |
private static Node |
InlineSimpleMethods.getMethodBlock(Node fn)
Return a BLOCK node if the given FUNCTION node is a valid method
definition, null otherwise.
|
private Node |
ClosureRewriteModule.getModuleScopeRootForLoadModuleCall(Node n) |
private Node |
ClosureRewriteModule.getModuleStatementRootForLoadModuleCall(Node n) |
private static Node |
PeepholeCollectPropertyAssignments.getName(Node n) |
Node |
Var.getNameNode() |
Node |
TypedVar.getNameNode() |
static Node |
NodeUtil.getNameNode(Node n)
Gets the node of a function or class's name.
|
(package private) static Node |
SimpleDefinitionFinder.getNameNodeFromFunctionNode(Node function) |
private Node |
ReplaceMessages.getNewValueNode(JsMessage message,
Node origValueNode)
Constructs a node representing a message's value, or, if possible, just
modifies
origValueNode so that it accurately represents the
message's value. |
private Node |
ReplaceMessagesForChrome.getNewValueNode(Node origNode,
JsMessage message) |
private static Node |
ControlFlowAnalysis.getNextSiblingOfType(Node first,
int... types)
Get the next sibling (including itself) of one of the given types.
|
(package private) Node |
JsMessageVisitor.MalformedException.getNode() |
Node |
AngularPass.NodeContext.getNode() |
Node |
Var.getNode() |
Node |
ReferenceCollectingCallback.Reference.getNode() |
(package private) Node |
MinimizedCondition.MeasuredNode.getNode() |
Node |
GlobalNamespace.Ref.getNode() |
Node |
TypedVar.getNode() |
(package private) abstract Node |
AbstractCompiler.getNodeForCodeInsertion(JSModule module)
Gets a suitable SCRIPT node to serve as a parent for code insertion.
|
(package private) Node |
Compiler.getNodeForCodeInsertion(JSModule module) |
private static Node |
NodeUtil.getNthSibling(Node first,
int index)
Given the first sibling, this returns the nth
sibling or null if no such sibling exists.
|
(package private) Node |
ReferenceCollectingCallback.Reference.getParent() |
(package private) Node |
NameAnalyzer.SpecialReferenceNode.getParent() |
Node |
Var.getParentNode() |
Node |
TypedVar.getParentNode() |
(package private) Node |
MinimizedCondition.getPlaceholder() |
private static Node |
ReplaceMessagesForChrome.getPlaceholderValue(Node placeholderValues,
java.lang.String placeholderName) |
(package private) Node |
PolymerPassFindExterns.getPolymerElementExterns() |
Node |
AnalyzePrototypeProperties.Property.getPrototype()
Returns the GETPROP node that refers to the prototype.
|
Node |
AnalyzePrototypeProperties.AssignmentProperty.getPrototype() |
Node |
AnalyzePrototypeProperties.LiteralProperty.getPrototype() |
(package private) static Node |
NodeUtil.getPrototypeClassName(Node qName) |
private Node |
ProcessClosurePrimitives.ProvidedName.getProvideStringNode() |
private static Node |
Es6TypedToEs6Converter.getQualifiedMemberAccess(AbstractCompiler compiler,
Node member,
Node staticAccess,
Node instanceAccess)
Constructs a Node that represents an access to the given class member, qualified by either the
static or the instance access context, depending on whether the member is static.
|
private static Node |
Es6ToEs3Converter.getQualifiedMemberAccess(Node member,
Node staticAccess,
Node instanceAccess)
Constructs a Node that represents an access to the given class member, qualified by either the
static or the instance access context, depending on whether the member is static.
|
private static Node |
FunctionToBlockMutator.getReplacementReturnStatement(Node node,
java.lang.String resultName)
Replace the 'return' statement with its child expression.
|
(package private) abstract Node |
AbstractCompiler.getRoot()
Returns the root node of the AST, which includes both externs and source.
|
(package private) Node |
NTIScope.getRoot() |
Node |
Compiler.getRoot() |
(package private) Node |
SymbolTable.SymbolScope.getRootNode() |
Node |
LinkedFlowScope.getRootNode() |
Node |
PreprocessorSymbolTable.getRootNode() |
Node |
TypedScope.getRootNode() |
Node |
Scope.getRootNode()
Gets the container node of the scope.
|
Node |
GlobalNamespace.getRootNode() |
(package private) static Node |
NodeUtil.getRootOfQualifiedName(Node qName)
Gets the root node of a qualified name.
|
abstract Node |
DefinitionsRemover.Definition.getRValue()
Value expression that acts as the right hand side of the
definition statement.
|
Node |
DefinitionsRemover.IncompleteDefinition.getRValue() |
Node |
DefinitionsRemover.FunctionDefinition.getRValue() |
Node |
DefinitionsRemover.AssignmentDefinition.getRValue() |
Node |
DefinitionsRemover.ObjectLiteralPropertyDefinition.getRValue() |
Node |
DefinitionsRemover.VarDefinition.getRValue() |
(package private) static Node |
NodeUtil.getRValueOfLValue(Node n)
Gets the r-value (or intializer) of a node returned by getBestLValue.
|
Node |
InlineFunctions.FunctionState.getSafeFnNode() |
Node |
NodeTraversal.getScopeRoot()
Returns the current scope's root.
|
private static Node |
ConformanceRules.NoImplicitlyPublicDecls.getScriptNode(Node start) |
private Node |
FunctionRewriter.SetterReducer.getSetPropertyName(Node functionNode)
Checks if the function matches the pattern:
function(
|
private Node |
PeepholeRemoveDeadCode.getSimpleAssignmentName(Node n) |
private Node |
PeepholeRemoveDeadCode.getSimpleAssignmentValue(Node n) |
Node |
NameReferenceGraph.Reference.getSite()
Get accessor for retrieving the actual node corresponding to the
reference.
|
Node |
FunctionTypeBuilder.FunctionContents.getSourceNode()
Returns the source node of this function.
|
Node |
FunctionTypeBuilder.UnknownFunctionContents.getSourceNode() |
Node |
FunctionTypeBuilder.AstFunctionContents.getSourceNode() |
private Node |
GenerateExports.getSynthesizedExternsRoot()
Lazily create a "new" externs root for undeclared variables.
|
private Node |
VarCheck.getSynthesizedExternsRoot()
Lazily create a "new" externs root for undeclared variables.
|
Node |
AngularPass.NodeContext.getTarget() |
private static Node |
CodePrinter.PrettyCodePrinter.getTryForCatch(Node n) |
private Node |
Es6RewriteGenerators.getUnique(Node node,
int type)
Finds the only child of the
node of the given type. |
Node |
AnalyzePrototypeProperties.Property.getValue()
Returns the value of this property.
|
Node |
AnalyzePrototypeProperties.AssignmentProperty.getValue() |
Node |
AnalyzePrototypeProperties.LiteralProperty.getValue() |
protected Node |
ExternExportsPass.Export.getValue(Node qualifiedNameNode)
If the given value is a qualified name which refers
a function or object literal, the node is returned.
|
private static Node |
PeepholeCollectPropertyAssignments.getValue(Node n) |
private Node |
FunctionRewriter.ReturnConstantReducer.getValueNode(Node functionNode)
Checks if the function matches the pattern:
function(
|
private static Node |
ProcessDefines.CollectDefines.getValueParent(GlobalNamespace.Ref ref)
Gets the parent node of the value for any assignment to a Name.
|
private static Node |
CollapseProperties.getValueParent(GlobalNamespace.Ref ref)
Gets the parent node of the value for any assignment to a Name.
|
private Node |
TemplateAstMatcher.initTemplate(Node templateFunctionNode)
Prepare an template AST to use when performing matches.
|
(package private) static Node |
FunctionArgumentInjector.inject(AbstractCompiler compiler,
Node node,
Node parent,
java.util.Map<java.lang.String,Node> replacements)
With the map provided, replace the names with expression trees.
|
(package private) static Node |
FunctionArgumentInjector.inject(AbstractCompiler compiler,
Node node,
Node parent,
java.util.Map<java.lang.String,Node> replacements,
boolean replaceThis) |
(package private) Node |
FunctionInjector.inline(FunctionInjector.Reference ref,
java.lang.String fnName,
Node fnNode)
Inline a function into the call site.
|
private Node |
FunctionInjector.inlineFunction(FunctionInjector.Reference ref,
Node fnNode,
java.lang.String fnName)
Inline a function which fulfills the requirements of
canInlineReferenceAsStatementBlock into the call site, replacing the
parent expression.
|
private Node |
FunctionInjector.inlineReturnValue(FunctionInjector.Reference ref,
Node fnNode)
Inline a function that fulfills the requirements of
canInlineReferenceDirectly into the call site, replacing only the CALL
node.
|
private Node |
RescopeGlobalSymbols.RemoveGlobalVarCallback.joinOnComma(java.util.List<Node> commas,
Node source) |
private Node |
RuntimeTypeCheck.jsCode(java.lang.String prop) |
(package private) Node |
Compiler.loadLibraryCode(java.lang.String resourceName,
boolean normalizeAndUniquifyNames)
Load a library as a resource
|
private Node |
CheckEventfulObjectDisposal.Traversal.localEventfulObjectAssign(NodeTraversal t,
Node propertyNode) |
private Node |
ProcessClosurePrimitives.ProvidedName.makeAssignmentExprNode()
Creates a dotted namespace assignment expression
(e.g.
|
private static Node |
PeepholeSubstituteAlternateSyntax.makeForwardSlashBracketSafe(Node n)
returns a string node that can safely be rendered inside /brackets/.
|
private static Node |
Es6RewriteGenerators.makeGeneratorMarker(int i) |
(package private) static Node |
Es6ToEs3Converter.makeIterator(AbstractCompiler compiler,
Node iterable)
Returns a call to
$jscomp.makeIterator with iterable as its argument. |
private Node |
PolymerClassRewriter.makeReadOnlySetter(java.lang.String propName,
java.lang.String qualifiedPath)
Adds the generated setter for a readonly property.
|
private Node |
ProcessClosurePrimitives.ProvidedName.makeVarDeclNode()
Creates a simple namespace variable declaration
(e.g.
|
private Node |
Es6TypedToEs6Converter.maybeCreateAnyType(Node n,
Node type) |
private static Node |
ClosureRewriteClass.maybeDetach(Node node) |
private Node |
Es6TypedToEs6Converter.maybeGetQualifiedNameNode(Node oldNameNode) |
protected Node |
FunctionRewriter.SingleReturnStatementReducer.maybeGetSingleReturnRValue(Node functionNode) |
private Node |
Es6TypedToEs6Converter.maybeProcessOptionalParameter(Node n,
Node type) |
private Node |
Es6TypedToEs6Converter.maybeProcessOptionalProperty(Node n,
Node type) |
private Node |
PeepholeMinimizeConditions.maybeReplaceChildWithNumber(Node n,
Node parent,
int num)
Replaces a node with a number node if the new number node is not equivalent
to the current node.
|
(package private) Node |
FunctionToBlockMutator.mutate(java.lang.String fnName,
Node fnNode,
Node callNode,
java.lang.String resultName,
boolean needsDefaultResult,
boolean isCallInLoop) |
private Node |
CoverageInstrumentationCallback.newArrayDeclarationNode(NodeTraversal traversal)
Create and return a new array declaration node.
|
(package private) static Node |
NodeUtil.newCallNode(Node callTarget,
Node... parameters)
A new CALL node with the "FREE_CALL" set based on call target.
|
(package private) static Node |
NodeUtil.newExpr(Node child)
Creates an EXPR_RESULT.
|
private Node |
CoverageInstrumentationCallback.newHeaderNode(NodeTraversal traversal,
Node srcref) |
private Node |
CoverageInstrumentationCallback.newInstrumentationNode(NodeTraversal traversal,
Node node)
Creates and return a new instrumentation node.
|
private static Node |
NodeUtil.newName(AbstractCompiler compiler,
java.lang.String name) |
(package private) static Node |
NodeUtil.newName(AbstractCompiler compiler,
java.lang.String name,
Node srcref)
Creates a new node representing an *existing* name, copying over the source
location information from the basis node.
|
(package private) static Node |
NodeUtil.newName(AbstractCompiler compiler,
java.lang.String name,
Node basisNode,
java.lang.String originalName)
Creates a new node representing an *existing* name, copying over the source
location information from the basis node and assigning the given original
name to the node.
|
static Node |
NodeUtil.newPropertyAccess(AbstractCompiler compiler,
Node context,
java.lang.String name)
Creates a property access on the
context tree. |
static Node |
NodeUtil.newQName(AbstractCompiler compiler,
java.lang.String name)
Creates a node representing a qualified name.
|
(package private) static Node |
NodeUtil.newQName(AbstractCompiler compiler,
java.lang.String name,
Node basisNode,
java.lang.String originalName)
Creates a node representing a qualified name, copying over the source
location information from the basis node and assigning the given original
name to the node.
|
static Node |
NodeUtil.newQNameDeclaration(AbstractCompiler compiler,
java.lang.String name,
Node value,
JSDocInfo info)
Creates a node representing a qualified name.
|
private Node |
InstrumentFunctions.InstrumentReturns.newReportFunctionExitNode(Node infoNode,
Node returnRhs) |
(package private) static Node |
NodeUtil.newUndefinedNode(Node srcReferenceNode)
Create a node for an empty result expression:
"void 0"
|
(package private) static Node |
NodeUtil.newVarNode(java.lang.String name,
Node value)
Create a VAR node containing the given name and initial value expression.
|
Node |
NodeIterators.FunctionlessLocalScope.next() |
Node |
NodeIterators.LocalVarMotion.next() |
private static Node |
DartSuperAccessorsPass.normalizeAssignmentOp(Node n)
Transforms `a += b` to `a = a + b`.
|
(package private) static Node |
NodeUtil.numberNode(double value,
Node srcref) |
(package private) Node |
StatementFusion.optimizeSubtree(Node n) |
Node |
PeepholeMinimizeConditions.optimizeSubtree(Node node)
Tries to apply our various peephole minimizations on the passed in node.
|
Node |
PeepholeSubstituteAlternateSyntax.optimizeSubtree(Node node)
Tries apply our various peephole minimizations on the passed in node.
|
(package private) Node |
ExploitAssigns.optimizeSubtree(Node subtree) |
(package private) Node |
PeepholeReplaceKnownMethods.optimizeSubtree(Node subtree) |
(package private) Node |
PeepholeRemoveDeadCode.optimizeSubtree(Node subtree) |
(package private) abstract Node |
AbstractPeepholeOptimization.optimizeSubtree(Node subtree)
Given a node to optimize and a traversal, optimize the node.
|
(package private) Node |
PeepholeSimplifyRegExp.optimizeSubtree(Node subtree) |
(package private) Node |
PeepholeFoldConstants.optimizeSubtree(Node subtree) |
(package private) Node |
PeepholeCollectPropertyAssignments.optimizeSubtree(Node subtree) |
(package private) Node |
ReorderConstantExpression.optimizeSubtree(Node subtree) |
Node |
Compiler.parse(SourceFile file) |
(package private) static Node |
Normalize.parseAndNormalizeTestCode(AbstractCompiler compiler,
java.lang.String code) |
Node |
FunctionRewriter.parseHelperCode(FunctionRewriter.Reducer reducer)
Parse helper code needed by a reducer.
|
(package private) Node |
Compiler.parseInputs()
Parses the externs and main inputs.
|
(package private) abstract Node |
AbstractCompiler.parseSyntheticCode(java.lang.String code)
Parses code for injecting.
|
(package private) Node |
Compiler.parseSyntheticCode(java.lang.String js) |
(package private) abstract Node |
AbstractCompiler.parseSyntheticCode(java.lang.String filename,
java.lang.String code)
Parses code for injecting, and associate it with a given source file.
|
(package private) Node |
Compiler.parseSyntheticCode(java.lang.String fileName,
java.lang.String js) |
(package private) abstract Node |
AbstractCompiler.parseTestCode(java.lang.String code)
Parses code for testing.
|
(package private) Node |
Compiler.parseTestCode(java.lang.String js) |
private Node |
PeepholeFoldConstants.performArithmeticOp(int opType,
Node left,
Node right)
Try to fold arithmetic binary operators
|
private Node |
PeepholeMinimizeConditions.performConditionSubstitutions(Node n)
Try to minimize the given condition by applying local substitutions.
|
(package private) abstract Node |
FunctionRewriter.Reducer.reduce(Node node) |
Node |
FunctionRewriter.EmptyFunctionReducer.reduce(Node node) |
Node |
FunctionRewriter.IdentityReducer.reduce(Node node) |
Node |
FunctionRewriter.ReturnConstantReducer.reduce(Node node) |
Node |
FunctionRewriter.GetterReducer.reduce(Node node) |
Node |
FunctionRewriter.SetterReducer.reduce(Node node) |
private Node |
PeepholeSubstituteAlternateSyntax.reduceSubstractionAssignment(Node n) |
private Node |
PeepholeSubstituteAlternateSyntax.reduceTrueFalse(Node n) |
private static Node |
CreateSyntheticBlocks.removeChildAfter(Node parent,
Node siblingBefore)
Like removeChildAfter, the firstChild is removed
|
private Node |
DartSuperAccessorsPass.renameProperty(Node propertyName)
Wraps a property string in a JSCompiler_renameProperty call.
|
private static Node |
DartSuperAccessorsPass.replace(Node original,
Node replacement) |
private Node |
ReplaceMessages.replaceCallNode(JsMessage message,
Node callNode)
Replaces a CALL node with an inlined message value.
|
private Node |
ReplaceStrings.replaceExpression(NodeTraversal t,
Node expr,
Node parent)
Replaces a string expression with a short encoded string expression.
|
private Node |
PeepholeMinimizeConditions.replaceNode(Node lhs,
MinimizedCondition.MeasuredNode rhs) |
private static Node |
FunctionToBlockMutator.replaceReturns(Node block,
java.lang.String resultName,
java.lang.String labelName,
boolean resultMustBeSet)
Convert returns to assignments and breaks, as needed.
|
private static Node |
FunctionToBlockMutator.replaceReturnWithBreak(Node current,
Node parent,
java.lang.String resultName,
java.lang.String labelName)
Replace the 'return' statement with its child expression.
|
private static Node |
InlineSimpleMethods.returnedExpression(Node fn)
Return the node that represents the expression returned
by the method, given a FUNCTION node.
|
private Node |
ExpressionDecomposer.rewriteCallExpression(Node call,
ExpressionDecomposer.DecompositionState state)
Rewrite the call so "this" is preserved.
|
private static Node |
ClosureCodingConvention.safeNext(Node n) |
private static Node |
CodingConventions.DefaultCodingConvention.safeNext(Node n) |
private Node |
SanityCheck.sanityCheckCodeGeneration(Node root)
Sanity checks code generation by performing it once, parsing the result,
then generating code from the second parse tree to verify that it matches
the code generated from the first parse tree.
|
private Node |
GatherSideEffectSubexpressionsCallback.GetReplacementSideEffectSubexpressions.simplifyShortCircuitBranch(Node node) |
(package private) static Node |
PeepholeMinimizeConditions.skipFinallyNodes(Node n) |
private Node |
ClosureRewriteModule.skipHeaderNodes(Node script) |
private static Node |
MinimizedCondition.swapWithPlaceholderNode(Node n)
Remove the given node from the AST, and replace it with a placeholder
SCRIPT node.
|
private Node |
ExpandJqueryAliases.tryExpandJqueryEachCall(NodeTraversal t,
Node n,
Node callbackFunction,
java.util.List<Node> keyNodes,
java.util.List<Node> valueNodes) |
private Node |
PeepholeFoldConstants.tryFoldAdd(Node node,
Node left,
Node right) |
private Node |
PeepholeFoldConstants.tryFoldAddConstantString(Node n,
Node left,
Node right)
Try to fold an ADD node with constant operands
|
private Node |
PeepholeFoldConstants.tryFoldAndOr(Node n,
Node left,
Node right)
Try to fold a AND/OR node.
|
private Node |
PeepholeFoldConstants.tryFoldArithmeticOp(Node n,
Node left,
Node right)
Try to fold arithmetic binary operators
|
private Node |
PeepholeFoldConstants.tryFoldArrayAccess(Node n,
Node left,
Node right) |
private Node |
PeepholeReplaceKnownMethods.tryFoldArrayJoin(Node n)
Try to fold an array join: ['a', 'b', 'c'].join('') -> 'abc';
|
private Node |
PeepholeFoldConstants.tryFoldAssign(Node n,
Node left,
Node right) |
private Node |
PeepholeRemoveDeadCode.tryFoldAssignment(Node subtree)
Try removing identity assignments
|
private Node |
PeepholeFoldConstants.tryFoldBinaryOperator(Node subtree) |
private Node |
PeepholeFoldConstants.tryFoldCall(Node n)
Remove useless calls:
Object.defineProperties(o, {}) -> o
|
private Node |
PeepholeFoldConstants.tryFoldChildAddString(Node n,
Node left,
Node right)
Expressions such as [foo() + 'a' + 'b'] generate parse trees
where no node has two const children ((foo() + 'a') + 'b'), so
tryFoldAdd() won't fold it -- tryFoldLeftChildAdd() will (for Strings).
|
private Node |
PeepholeRemoveDeadCode.tryFoldComma(Node n) |
private Node |
PeepholeFoldConstants.tryFoldComparison(Node n,
Node left,
Node right)
Try to fold comparison nodes, e.g ==
|
private Node |
PeepholeFoldConstants.tryFoldCtorCall(Node n)
Try to fold away unnecessary object instantiation.
|
(package private) Node |
PeepholeRemoveDeadCode.tryFoldDoAway(Node n)
Removes DOs that always evaluate to false.
|
(package private) Node |
PeepholeRemoveDeadCode.tryFoldEmptyDo(Node n)
Removes DOs that have empty bodies into FORs, which are
much easier for the CFA to analyze.
|
private Node |
PeepholeRemoveDeadCode.tryFoldExpr(Node subtree)
Try folding EXPR_RESULT nodes by removing useless Ops and expressions.
|
(package private) Node |
PeepholeRemoveDeadCode.tryFoldFor(Node n)
Removes FORs that always evaluate to false.
|
private Node |
PeepholeFoldConstants.tryFoldGetElem(Node n,
Node left,
Node right)
Try to fold array-element.
|
private Node |
PeepholeFoldConstants.tryFoldGetProp(Node n,
Node left,
Node right)
Try to fold array-length.
|
private Node |
PeepholeRemoveDeadCode.tryFoldHook(Node n)
Try folding HOOK (?:) if the condition results of the condition is known.
|
private Node |
PeepholeRemoveDeadCode.tryFoldIf(Node n)
Try folding IF nodes by removing dead branches.
|
private Node |
PeepholeSubstituteAlternateSyntax.tryFoldImmediateCallToBoundFunction(Node n) |
private Node |
PeepholeFoldConstants.tryFoldInForcedStringContext(Node n) |
private Node |
PeepholeFoldConstants.tryFoldInstanceof(Node n,
Node left,
Node right)
Try to fold
left instanceof right into true
or false . |
private Node |
PeepholeReplaceKnownMethods.tryFoldKnownMethods(Node subtree) |
private Node |
PeepholeReplaceKnownMethods.tryFoldKnownNumericMethods(Node subtree)
Try to evaluate known Numeric methods
parseInt(), parseFloat()
|
private Node |
PeepholeReplaceKnownMethods.tryFoldKnownStringMethods(Node subtree)
Try to evaluate known String methods
.indexOf(), .substr(), .substring()
|
private Node |
PeepholeFoldConstants.tryFoldLeftChildOp(Node n,
Node left,
Node right)
Expressions such as [foo() * 10 * 20] generate parse trees
where no node has two const children ((foo() * 10) * 20), so
performArithmeticOp() won't fold it -- tryFoldLeftChildOp() will.
|
private Node |
PeepholeSubstituteAlternateSyntax.tryFoldLiteralConstructor(Node n)
Replaces a new Array, Object, or RegExp node with a literal, unless the
call is to a local constructor function with the same name.
|
private Node |
PeepholeFoldConstants.tryFoldObjectPropAccess(Node n,
Node left,
Node right) |
private Node |
PeepholeReplaceKnownMethods.tryFoldParseNumber(Node n,
java.lang.String functionName,
Node firstArg)
Try to evaluate parseInt, parseFloat:
parseInt("1") -> 1
parseInt("1", 10) -> 1
parseFloat("1.11") -> 1.11
|
private Node |
PeepholeSubstituteAlternateSyntax.tryFoldRegularExpressionConstructor(Node n) |
private Node |
PeepholeFoldConstants.tryFoldShift(Node n,
Node left,
Node right)
Try to fold shift operations
|
private Node |
PeepholeSubstituteAlternateSyntax.tryFoldSimpleFunctionCall(Node n) |
private Node |
PeepholeSubstituteAlternateSyntax.tryFoldStandardConstructors(Node n)
Fold "new Object()" to "Object()".
|
private Node |
PeepholeFoldConstants.tryFoldStringArrayAccess(Node n,
Node left,
Node right) |
private Node |
PeepholeReplaceKnownMethods.tryFoldStringCharAt(Node n,
Node stringNode,
Node arg1)
Try to fold .charAt() calls on strings
|
private Node |
PeepholeReplaceKnownMethods.tryFoldStringCharCodeAt(Node n,
Node stringNode,
Node arg1)
Try to fold .charCodeAt() calls on strings
|
private Node |
PeepholeReplaceKnownMethods.tryFoldStringIndexOf(Node n,
java.lang.String functionName,
Node lstringNode,
Node firstArg)
Try to evaluate String.indexOf/lastIndexOf:
"abcdef".indexOf("bc") -> 1
"abcdefbc".indexOf("bc", 3) -> 6
|
private Node |
PeepholeReplaceKnownMethods.tryFoldStringSplit(Node n,
Node stringNode,
Node arg1)
Try to fold .split() calls on strings
|
private Node |
PeepholeReplaceKnownMethods.tryFoldStringSubstr(Node n,
Node stringNode,
Node arg1)
Try to fold .substr() calls on strings
|
private Node |
PeepholeReplaceKnownMethods.tryFoldStringSubstring(Node n,
Node stringNode,
Node arg1)
Try to fold .substring() calls on strings
|
private Node |
PeepholeReplaceKnownMethods.tryFoldStringToLowerCase(Node subtree,
Node stringNode) |
private Node |
PeepholeReplaceKnownMethods.tryFoldStringToUpperCase(Node subtree,
Node stringNode) |
private Node |
PeepholeRemoveDeadCode.tryFoldTry(Node n)
Remove try blocks without catch blocks and with empty or not
existent finally blocks.
|
private Node |
PeepholeFoldConstants.tryFoldTypeof(Node originalTypeofNode)
Folds 'typeof(foo)' if foo is a literal, e.g.
|
private Node |
PeepholeFoldConstants.tryFoldUnaryOperator(Node n) |
(package private) Node |
PeepholeRemoveDeadCode.tryFoldWhile(Node n)
Removes WHILEs that always evaluate to false.
|
(package private) Node |
StatementFusion.tryFuseStatements(Node n) |
(package private) Node |
StatementFusion.tryFuseStatementsAggressively(Node n) |
private Node |
PeepholeSubstituteAlternateSyntax.tryMinimizeArrayLiteral(Node n) |
private Node |
PeepholeMinimizeConditions.tryMinimizeCondition(Node n)
Try to minimize condition expression, as there are additional
assumptions that can be made when it is known that the final result
is a boolean.
|
private Node |
PeepholeMinimizeConditions.tryMinimizeExprResult(Node n)
Try to remove leading NOTs from EXPR_RESULTS.
|
private Node |
PeepholeMinimizeConditions.tryMinimizeHook(Node n)
Try flipping HOOKs that have negated conditions.
|
private Node |
PeepholeMinimizeConditions.tryMinimizeIf(Node n)
Try turning IF nodes into smaller HOOKs
Returns the replacement for n or the original if no replacement was
necessary.
|
private Node |
PeepholeMinimizeConditions.tryMinimizeNot(Node n)
Try to minimize NOT nodes such as !(x==y).
|
private Node |
PeepholeSubstituteAlternateSyntax.tryMinimizeStringArrayLiteral(Node n) |
private Node |
PeepholeSubstituteAlternateSyntax.tryMinimizeWindowRefs(Node node) |
(package private) Node |
PeepholeRemoveDeadCode.tryOptimizeBlock(Node n)
Try removing unneeded block nodes and their useless children
|
private Node |
PeepholeRemoveDeadCode.tryOptimizeDefaultCase(Node n) |
private Node |
PeepholeRemoveDeadCode.tryOptimizeSwitch(Node n)
Remove useless switches and cases.
|
private Node |
PeepholeSubstituteAlternateSyntax.tryReduceReturn(Node n)
Reduce "return undefined" or "return void 0" to simply "return".
|
private Node |
PeepholeFoldConstants.tryReduceVoid(Node n) |
private Node |
PeepholeMinimizeConditions.tryRemoveRedundantExit(Node n)
Remove duplicate exits.
|
private Node |
PeepholeMinimizeConditions.tryReplaceExitWithBreak(Node n)
Replace duplicate exits in control structures.
|
private Node |
PeepholeMinimizeConditions.tryReplaceIf(Node n)
Use "return x?1:2;" in place of "if(x)return 1;return 2;"
|
private Node |
PeepholeSubstituteAlternateSyntax.tryReplaceUndefined(Node n)
Use "void 0" in place of "undefined"
|
private Node |
PeepholeSubstituteAlternateSyntax.tryRotateAssociativeOperator(Node n) |
private Node |
PeepholeRemoveDeadCode.trySimplifyUnusedResult(Node n)
General cascading unused operation node removal.
|
private Node |
PeepholeRemoveDeadCode.trySimplifyUnusedResult(Node n,
boolean removeUnused)
General cascading unused operation node removal.
|
private Node |
PeepholeSubstituteAlternateSyntax.trySplitComma(Node n) |
private Node |
PeepholeFoldConstants.tryUnfoldAssignOp(Node n,
Node left,
Node right) |
private static Node |
PolymerClassRewriter.varToAssign(Node var) |
Modifier and Type | Method and Description |
---|---|
abstract java.util.Set<Node> |
SideEffectsAnalysis.AbstractMotionEnvironment.calculateEnvironment()
Calculates the set of nodes that this environment represents.
|
java.util.Set<Node> |
SideEffectsAnalysis.IntraproceduralMotionEnvironment.calculateEnvironment() |
java.util.Set<Node> |
SideEffectsAnalysis.CrossModuleMotionEnvironment.calculateEnvironment() |
java.util.Set<Node> |
SideEffectsAnalysis.RawMotionEnvironment.calculateEnvironment() |
(package private) ControlFlowGraph<Node> |
Compiler.computeCFG()
Control Flow Analysis.
|
private ControlFlowGraph<Node> |
TypeInferencePass.computeCfg(Node n) |
private java.util.List<Node> |
AngularPass.createDependenciesList(Node n)
Given a FUNCTION node returns array of STRING nodes representing function
parameters.
|
private java.util.List<Node> |
AngularPass.createStringsFromParamList(Node params)
Given a PARAM_LIST node creates an array of corresponding STRING nodes.
|
(package private) java.util.List<Node> |
NodeIterators.FunctionlessLocalScope.currentAncestors()
Gets the ancestors of the current node, with the deepest node first.
|
private java.util.Set<Node> |
SideEffectsAnalysis.VisibilityLocationAbstraction.findStorageLocationReferences(Node root)
Returns the set of references to storage locations (both variables
and the heap) under
root . |
(package private) static java.util.Map<java.lang.String,Node> |
DefaultPassConfig.getAdditionalReplacements(CompilerOptions options) |
(package private) java.util.Collection<Node> |
ScopedAliases.Traversal.getAliasDefinitionsInOrder() |
java.util.Collection<Node> |
SymbolTable.getAllJSDocInfoNodes() |
private com.google.common.collect.ImmutableList<Node> |
TypeTransformation.getCallParams(Node n) |
(package private) java.util.List<Node> |
PureFunctionIdentifier.FunctionInformation.getCallsInFunctionBody()
Gets the list of CALL and NEW nodes.
|
(package private) ControlFlowGraph<Node> |
ControlFlowAnalysis.getCfg() |
ControlFlowGraph<Node> |
NodeTraversal.getControlFlowGraph()
Gets the control flow graph for the current JS scope.
|
(package private) abstract com.google.common.collect.ImmutableMap<java.lang.String,Node> |
AbstractCompiler.getDefaultDefineValues()
Gets a map of default @define values.
|
(package private) com.google.common.collect.ImmutableMap<java.lang.String,Node> |
Compiler.getDefaultDefineValues() |
java.util.Map<java.lang.String,Node> |
CompilerOptions.getDefineReplacements()
Returns the map of define replacements.
|
(package private) java.util.LinkedHashMap<java.lang.String,Node> |
FindExportableNodes.getExports() |
(package private) static java.util.LinkedHashMap<java.lang.String,Node> |
FunctionArgumentInjector.getFunctionCallParameterMap(Node fnNode,
Node callNode,
com.google.common.base.Supplier<java.lang.String> safeNameIdSupplier)
Get a mapping for function parameter names to call arguments.
|
java.lang.Iterable<Node> |
FunctionNames.getFunctionNodeList() |
(package private) static java.lang.Iterable<Node> |
NodeUtil.getObjectDefinedPropertiesKeys(Node definePropertiesCall) |
java.util.Comparator<DiGraph.DiGraphNode<Node,ControlFlowGraph.Branch>> |
ControlFlowAnalysis.AstControlFlowGraph.getOptionalNodeComparator(boolean isForward) |
(package private) com.google.common.collect.ImmutableList<Node> |
PolymerPassFindExterns.getPolymerElementProps() |
private java.util.Map<Node,InlineFunctions.Reference> |
InlineFunctions.FunctionState.getReferencesInternal() |
private static java.util.Map<java.lang.String,Node> |
CompilerOptions.getReplacementsHelper(java.util.Map<java.lang.String,java.lang.Object> source)
Creates a map of String->Node from a map of String->Number/String/Boolean.
|
private static java.util.List<Node> |
NameAnalyzer.getRhsSubexpressions(Node n)
Extract a list of subexpressions that act as right hand sides.
|
(package private) java.util.List<Node> |
ScopedAliases.Traversal.getScopeCalls() |
private java.util.List<Node> |
NameAnalyzer.getSideEffectNodes(Node n)
Extract a list of replacement nodes to use.
|
java.util.Map<java.lang.String,Node> |
TemplateAstMatcher.getTemplateNodeToMatchMap()
Returns a map from named template Nodes (such as parameters
or local variables) to Nodes that were matches from the last matched
template.
|
java.util.Map<java.lang.String,Node> |
CompilerOptions.getTweakReplacements()
Returns the map of tweak replacements.
|
(package private) java.util.Collection<Node> |
MaybeReachingVariableUse.getUses(java.lang.String name,
Node defNode)
Gets a list of nodes that may be using the value assigned to
name
in defNode . |
(package private) static java.util.Collection<Node> |
NodeUtil.getVarsDeclaredInBranch(Node root)
Retrieves vars declared in the current node tree, excluding descent scopes.
|
static java.util.Map<Node,Node> |
NodeUtil.mapMainToClone(Node main,
Node clone)
Given an AST and its copy, map the root node of each scope of main to the
corresponding root node of clone
|
static java.util.Map<Node,Node> |
NodeUtil.mapMainToClone(Node main,
Node clone)
Given an AST and its copy, map the root node of each scope of main to the
corresponding root node of clone
|
private java.util.List<Node> |
CheckEventfulObjectDisposal.Traversal.maybeGetValueNodesFromCall(Node n) |
Modifier and Type | Method and Description |
---|---|
private boolean |
StripCode.Strip.actsOnStripType(NodeTraversal t,
Node callNode)
Determines whether the given node helps to define a
strip type.
|
(package private) void |
InlineCostEstimator.CompiledSizeEstimator.add(Node root) |
(package private) void |
CodeGenerator.add(Node n) |
(package private) void |
CodeGenerator.add(Node n,
CodeGenerator.Context context) |
(package private) void |
TypedCodeGenerator.add(Node n,
CodeGenerator.Context context) |
private void |
NameAnalyzer.FindReferences.addAllChildren(Node n) |
(package private) void |
CodeGenerator.addAllSiblings(Node n) |
(package private) void |
CodeGenerator.addArrayList(Node firstInList)
This function adds a comma-separated list as is specified by an ARRAYLIT
node with the associated skipIndexes array.
|
(package private) void |
CodeGenerator.addArrayPattern(Node n) |
private void |
CodeGenerator.addArrowFunction(Node n,
Node first,
Node last,
CodeGenerator.Context context) |
void |
NameReferenceGraph.Name.addAssignmentDeclaration(Node node) |
private static void |
PolymerPassSuppressBehaviors.addBehaviorSuppressions(Node behaviorValue) |
private void |
MakeDeclaredNamesUnique.ContextualRenameInverter.addCandidateNameReference(java.lang.String name,
Node n) |
(package private) void |
CodeGenerator.addCaseBody(Node caseBody) |
private void |
ProcessCommonJSModules.ProcessCommonJsModulesCallback.addConstToObjLitKeys(Node n)
Add an @const annotation to each key of an object literal
|
(package private) void |
ProcessClosurePrimitives.ProvidedName.addDefinition(Node node,
JSModule module)
Record function declaration, variable declaration or assignment that
refers to the same name as the provide statement.
|
private void |
CheckEventfulObjectDisposal.Traversal.addDisposeArgumentsMatched(java.util.Map<java.lang.String,java.util.List<java.lang.Integer>> map,
Node n,
java.lang.String property,
java.util.List<Node> foundDisposeCalls) |
private static void |
FunctionToBlockMutator.addDummyAssignment(Node node,
java.lang.String resultName)
Example:
a = (void) 0;
|
private void |
GenerateExports.addExportMethod(java.util.Map<java.lang.String,Node> exports,
java.lang.String export,
Node context) |
private void |
CodeGenerator.addExpr(Node n,
int minPrecedence,
CodeGenerator.Context context) |
private static void |
DeclaredGlobalExternsOnWindow.addExtern(Node node) |
private static void |
ObjectPropertyStringPreprocess.addExternDeclaration(Node externs,
Node declarationStmt) |
private void |
CodeGenerator.addFunction(Node n,
Node first,
Node last,
CodeGenerator.Context context) |
void |
NameReferenceGraph.Name.addFunctionDeclaration(Node node) |
(package private) void |
NTIScope.addFunNamespace(Node qnameNode) |
(package private) void |
ProcessTweaks.TweakInfo.addGetterCall(java.lang.String sourceName,
ProcessTweaks.TweakFunction tweakFunc,
Node callNode) |
private void |
CoverageInstrumentationPass.addHeaderCode(Node script)
Creates the js code to be added to source.
|
private void |
RewritePolyfills.Traverser.addInstaller(Node sourceNode,
java.lang.String function) |
private void |
CodeGenerator.addJsString(Node n)
Outputs a JS string, using the optimal (single/double) quote character
|
(package private) void |
CodeGenerator.addList(Node firstInList) |
(package private) void |
CodeGenerator.addList(Node firstInList,
boolean isArrayOrFunctionArgument,
CodeGenerator.Context lhsContext,
java.lang.String separator) |
(package private) void |
CodeGenerator.addList(Node firstInList,
java.lang.String separator) |
void |
SourceMap.addMapping(Node node,
FilePosition outputStartPosition,
FilePosition outputEndPosition) |
private Node |
RuntimeTypeCheck.AddMarkers.addMarker(FunctionType funType,
Node nodeToInsertAfter,
ObjectType interfaceType) |
(package private) void |
NTIScope.addNamespace(Node qnameNode,
Namespace ns) |
(package private) void |
NTIScope.addNamespaceLit(Node qnameNode) |
private static MinimizedCondition.MeasuredNode |
MinimizedCondition.MeasuredNode.addNode(Node parent,
MinimizedCondition.MeasuredNode... children) |
private void |
AngularPass.addNode(Node n,
NodeTraversal t)
Add node to the list of injectables.
|
private void |
CodeGenerator.addNonEmptyStatement(Node n,
CodeGenerator.Context context,
boolean allowNonBlockChild)
Adds a block or expression, substituting a VOID with an empty statement.
|
(package private) void |
CodeGenerator.addObjectPattern(Node n) |
(package private) void |
ProcessTweaks.TweakInfo.addOverrideDefaultValueCall(java.lang.String sourceName,
ProcessTweaks.TweakFunction tweakFunc,
Node callNode,
Node defaultValueNode) |
private static void |
PeepholeSubstituteAlternateSyntax.addParameterAfter(Node parameterList,
Node after) |
private void |
MethodCompilerPass.addPossibleSignature(java.lang.String name,
Node node,
NodeTraversal t)
Adds a node that may represent a function signature (if it's a function
itself or the name of a function).
|
(package private) void |
ProcessClosurePrimitives.ProvidedName.addProvide(Node node,
JSModule module,
boolean explicit)
Add an implicit or explicit provide.
|
(package private) void |
PreprocessorSymbolTable.addReference(Node node) |
(package private) void |
ProcessTweaks.TweakInfo.addRegisterCall(java.lang.String sourceName,
ProcessTweaks.TweakFunction tweakFunc,
Node callNode,
Node defaultValueNode) |
private void |
MethodCompilerPass.addSignature(java.lang.String name,
Node function,
java.lang.String fnSourceName) |
void |
MethodCompilerPass.SignatureStore.addSignature(java.lang.String functionName,
Node functionNode,
java.lang.String sourceFile) |
private void |
NameAnalyzer.FindReferences.addSimplifiedChildren(Node n) |
private void |
NameAnalyzer.FindReferences.addSimplifiedExpression(Node n,
Node parent) |
private void |
GenerateExports.addStatement(Node context,
Node stmt) |
(package private) void |
CodeGenerator.addStringKey(Node n) |
private int |
CollapseProperties.addStubsForUndeclaredProperties(GlobalNamespace.Name n,
java.lang.String alias,
Node parent,
Node addAfter)
Adds global variable "stubs" for any properties of a global name that are
only set in a local scope or read but never set.
|
private SymbolTable.Symbol |
SymbolTable.addSymbol(java.lang.String name,
JSType type,
boolean inferred,
SymbolTable.SymbolScope scope,
Node declNode) |
private void |
Es6ConvertSuper.addSyntheticConstructor(Node classNode) |
private void |
MustBeReachingVariableDef.addToDefIfLocal(java.lang.String name,
Node node,
Node rValue,
MustBeReachingVariableDef.MustDef def)
Set the variable lattice for the given name to the node value in the def
lattice.
|
private void |
Es6ToEs3Converter.addToDefinePropertiesObject(Es6ToEs3Converter.ClassDeclarationMetadata metadata,
Node member) |
private static Node |
Normalize.NormalizeStatements.addToFront(Node parent,
Node newChild,
Node after) |
private void |
LiveVariablesAnalysis.addToSetIfLocal(Node node,
BitSet set) |
private void |
MaybeReachingVariableUse.addToUseIfLocal(java.lang.String name,
Node node,
MaybeReachingVariableUse.ReachingUses use)
Sets the variable for the given name to the node value in the upward
exposed lattice.
|
private void |
Es6ToEs3Converter.addTypeDeclarations(Es6ToEs3Converter.ClassDeclarationMetadata metadata,
Node insertionPoint)
Add declarations for properties that were defined with a getter and/or setter,
so that the typechecker knows those properties exist on the class.
|
(package private) void |
NTIScope.addTypedef(Node qnameNode,
Typedef td) |
private void |
PolymerClassRewriter.addTypesToFunctions(Node objLit,
java.lang.String thisType)
Adds an @this annotation to all functions in the objLit.
|
private void |
OptimizeParameters.addVariableToFunction(Node function,
Node varName,
Node value)
Adds a variable to the top of a function block.
|
private Node |
FunctionToBlockMutator.aliasAndInlineArguments(Node fnTemplateRoot,
java.util.LinkedHashMap<java.lang.String,Node> argMap,
java.util.Set<java.lang.String> namesToAlias)
Inlines the arguments within the node tree using the given argument map,
replaces "unsafe" names with local aliases.
|
(package private) static boolean |
NodeUtil.allArgsUnescapedLocal(Node callOrNew) |
private boolean |
InstrumentFunctions.InstrumentReturns.allPathsReturn(Node function) |
(package private) static boolean |
NodeUtil.allResultsMatch(Node n,
com.google.common.base.Predicate<Node> p)
Apply the supplied predicate against
all possible result Nodes of the expression.
|
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzeAddBwd(Node expr,
TypeEnv outEnv,
JSType requiredType) |
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzeAddFwd(Node expr,
TypeEnv inEnv,
JSType requiredType) |
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzeArrayLitBwd(Node expr,
TypeEnv outEnv) |
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzeArrayLitFwd(Node expr,
TypeEnv inEnv) |
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzeAssertionCall(Node callNode,
TypeEnv env,
CodingConvention.AssertionFunctionSpec assertionFunctionSpec) |
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzeAssignAddBwd(Node expr,
TypeEnv outEnv,
JSType requiredType) |
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzeAssignAddFwd(Node expr,
TypeEnv inEnv,
JSType requiredType) |
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzeAssignBwd(Node expr,
TypeEnv outEnv,
JSType requiredType) |
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzeAssignFwd(Node expr,
TypeEnv inEnv,
JSType requiredType,
JSType specializedType) |
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzeAssignNumericOpBwd(Node expr,
TypeEnv outEnv) |
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzeAssignNumericOpFwd(Node expr,
TypeEnv inEnv) |
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzeBinaryNumericOpBwd(Node expr,
TypeEnv outEnv) |
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzeBinaryNumericOpFwd(Node expr,
TypeEnv inEnv) |
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzeCallNewBwd(Node expr,
TypeEnv outEnv,
JSType requiredType) |
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzeCallNewFwd(Node expr,
TypeEnv inEnv,
JSType requiredType,
JSType specializedType) |
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzeCallNodeArgsFwdWhenError(Node callNode,
TypeEnv inEnv) |
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzeCallNodeArgumentsBwd(Node callNode,
TypeEnv outEnv) |
private TypeEnv |
NewTypeInference.analyzeCallNodeArgumentsFwd(Node call,
Node firstArg,
FunctionType funType,
java.util.List<JSType> argTypesForDeferredCheck,
TypeEnv inEnv) |
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzeCastFwd(Node expr,
TypeEnv inEnv) |
private void |
NewTypeInference.analyzeConditionalStmFwd(DiGraph.DiGraphNode<Node,ControlFlowGraph.Branch> stm,
Node cond,
TypeEnv inEnv) |
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzeEnumObjLitBwd(Node objLit,
TypeEnv outEnv,
JSType requiredType) |
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzeEnumObjLitFwd(Node objLit,
TypeEnv inEnv,
JSType requiredType) |
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzeEqNeBwd(Node expr,
TypeEnv outEnv) |
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzeExprBwd(Node expr,
TypeEnv outEnv) |
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzeExprBwd(Node expr,
TypeEnv outEnv,
JSType requiredType)
For now, we won't emit any warnings bwd.
|
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzeExprFwd(Node expr,
TypeEnv inEnv) |
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzeExprFwd(Node expr,
TypeEnv inEnv,
JSType requiredType) |
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzeExprFwd(Node expr,
TypeEnv inEnv,
JSType requiredType,
JSType specializedType) |
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzeFunctionBindFwd(Node call,
TypeEnv inEnv) |
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzeGetElemBwd(Node expr,
TypeEnv outEnv,
JSType requiredType) |
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzeGetElemFwd(Node expr,
TypeEnv inEnv,
JSType requiredType,
JSType specializedType) |
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzeGoogTypeof(Node typeof,
Node typeString,
TypeEnv inEnv,
JSType specializedType) |
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzeHookBwd(Node expr,
TypeEnv outEnv,
JSType requiredType) |
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzeHookFwd(Node expr,
TypeEnv inEnv,
JSType requiredType,
JSType specializedType) |
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzeInBwd(Node expr,
TypeEnv outEnv) |
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzeIncDecFwd(Node expr,
TypeEnv inEnv,
JSType requiredType) |
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzeInFwd(Node expr,
TypeEnv inEnv,
JSType specializedType) |
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzeInstanceofFwd(Node expr,
TypeEnv inEnv,
JSType specializedType) |
private NewTypeInference.LValueResultFwd |
NewTypeInference.analyzeIObjectElmLvalFwd(Node prop,
NewTypeInference.LValueResultFwd recvLvalue,
JSType indexType) |
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzeLogicalOpBwd(Node expr,
TypeEnv outEnv) |
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzeLogicalOpFwd(Node expr,
TypeEnv inEnv,
JSType requiredType,
JSType specializedType) |
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzeLooseCallNodeBwd(Node callNode,
TypeEnv outEnv,
JSType retType) |
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzeLooseCallNodeFwd(Node callNode,
TypeEnv inEnv,
JSType requiredType) |
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzeLtGtBwd(Node expr,
TypeEnv outEnv) |
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzeLtGtFwd(Node expr,
TypeEnv inEnv) |
private NewTypeInference.LValueResultBwd |
NewTypeInference.analyzeLValueBwd(Node expr,
TypeEnv outEnv,
JSType type,
boolean doSlicing) |
private NewTypeInference.LValueResultBwd |
NewTypeInference.analyzeLValueBwd(Node expr,
TypeEnv outEnv,
JSType type,
boolean doSlicing,
boolean insideQualifiedName)
When
doSlicing is set, remove the lvalue from the returned env |
private NewTypeInference.LValueResultFwd |
NewTypeInference.analyzeLValueFwd(Node expr,
TypeEnv inEnv,
JSType type) |
private NewTypeInference.LValueResultFwd |
NewTypeInference.analyzeLValueFwd(Node expr,
TypeEnv inEnv,
JSType type,
boolean insideQualifiedName) |
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzeNameBwd(Node expr,
TypeEnv outEnv,
JSType requiredType) |
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzeNameFwd(Node expr,
TypeEnv inEnv,
JSType requiredType,
JSType specializedType) |
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzeNonStrictComparisonFwd(Node expr,
TypeEnv inEnv,
JSType specializedType) |
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzeObjLitBwd(Node objLit,
TypeEnv outEnv,
JSType requiredType) |
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzeObjLitFwd(Node objLit,
TypeEnv inEnv,
JSType requiredType,
JSType specializedType) |
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzePropAccessBwd(Node receiver,
java.lang.String pname,
TypeEnv outEnv,
JSType requiredType) |
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzePropAccessFwd(Node receiver,
java.lang.String pname,
TypeEnv inEnv,
JSType requiredType,
JSType specializedType) |
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzePropertyTestCallFwd(Node call,
TypeEnv inEnv,
JSType specializedType) |
private NewTypeInference.LValueResultBwd |
NewTypeInference.analyzePropLValBwd(Node obj,
QualifiedName pname,
TypeEnv outEnv,
JSType type,
boolean doSlicing) |
private NewTypeInference.LValueResultFwd |
NewTypeInference.analyzePropLValFwd(Node obj,
QualifiedName pname,
NewTypeInference.LValueResultFwd recvLvalue,
JSType requiredType,
boolean insideQualifiedName) |
private NewTypeInference.LValueResultFwd |
NewTypeInference.analyzeReceiverLvalFwd(Node obj,
QualifiedName pname,
TypeEnv inEnv,
JSType propType) |
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzeSpecializedTypeof(Node typeof,
Node typeString,
int comparisonOp,
TypeEnv inEnv,
JSType specializedType) |
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzeStrictComparisonFwd(int comparisonOp,
Node lhs,
Node rhs,
TypeEnv inEnv,
JSType specializedType) |
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzeTypePredicate(Node call,
java.lang.String typeHint,
TypeEnv inEnv,
JSType specializedType) |
private NewTypeInference.EnvTypePair |
NewTypeInference.analyzeUnaryNumFwd(Node expr,
TypeEnv inEnv) |
private void |
GenerateExports.annotate(Node node) |
private static void |
PrepareAst.PrepareAnnotations.annotateCalls(Node n)
There are two types of calls we are interested in calls without explicit
"this" values (what we are call "free" calls) and direct call to eval.
|
private void |
Normalize.NormalizeStatements.annotateConstantsByConvention(Node n,
Node parent)
Mark names and properties that are constants by convention.
|
private void |
PolymerClassRewriter.appendBehaviorMembersToBlock(PolymerClassDefinition cls,
Node block)
Appends all required behavior functions and non-property members to the given block.
|
(package private) void |
PureFunctionIdentifier.FunctionInformation.appendCall(Node callNode)
Add a CALL or NEW node to the list of calls this function makes.
|
(package private) static void |
DotFormatter.appendDot(Node n,
ControlFlowGraph<Node> inCFG,
java.lang.Appendable builder)
Converts an AST to dot representation and appends it to the given buffer.
|
(package private) void |
ExternExportsPass.Export.appendExtern(java.lang.String path,
Node valueToExport)
Appends the exported function and all paths necessary for the path to be
declared.
|
private static void |
JSDocInfoPrinter.appendFunctionNode(java.lang.StringBuilder sb,
Node function) |
private void |
ExternExportsPass.Export.appendPathDefinition(java.lang.String path,
Node initializer) |
private void |
PolymerClassRewriter.appendPropertiesToBlock(PolymerClassDefinition cls,
Node block,
java.lang.String basePath)
Appends all properties in the ClassDefinition to the prototype of the custom element.
|
private static void |
JSDocInfoPrinter.appendTypeNode(java.lang.StringBuilder sb,
Node typeNode) |
boolean |
NodeUtil.MatchNameNode.apply(Node n) |
boolean |
NodeUtil.MatchNodeType.apply(Node n) |
boolean |
NodeUtil.MatchDeclaration.apply(Node n) |
boolean |
NodeUtil.MatchNotFunction.apply(Node n) |
boolean |
NodeUtil.MatchNotClass.apply(Node n) |
boolean |
NodeUtil.MatchShallowStatement.apply(Node n) |
boolean |
FunctionArgumentInjector.ReferencedAfterSideEffect.apply(Node node) |
boolean |
PeepholeRemoveDeadCode.MatchUnnamedBreak.apply(Node n) |
(package private) boolean |
PeepholeMinimizeConditions.areMatchingExits(Node nodeThis,
Node nodeThat)
Check whether one exit can be replaced with another.
|
(package private) abstract boolean |
AbstractCompiler.areNodesEqualForInlining(Node n1,
Node n2)
Are the nodes equal for the purpose of inlining?
If type aware optimizations are on, type equality is checked.
|
(package private) boolean |
Compiler.areNodesEqualForInlining(Node n1,
Node n2) |
protected boolean |
AbstractPeepholeOptimization.areNodesEqualForInlining(Node n1,
Node n2)
Are the nodes equal for the purpose of inlining?
If type aware optimizations are on, type equality is checked.
|
private boolean |
InlineSimpleMethods.argsMayHaveSideEffects(Node call)
Check whether the given method call's arguments have side effects.
|
private static Node |
Es6ToEs3Converter.arrayFromIterable(AbstractCompiler compiler,
Node iterable)
Returns a call to $jscomp.arrayFromIterable with
iterable as its argument. |
(package private) static java.lang.String |
NodeUtil.arrayToString(Node literal) |
private boolean |
CodeGenerator.arrowFunctionNeedsParens(Node parent,
CodeGenerator.Context context) |
(package private) void |
TypedScopeCreator.AbstractScopeBuilder.assertDefinitionNode(Node n,
int type)
Asserts that it's OK to define this node's name.
|
private void |
TypedScopeCreator.AbstractScopeBuilder.attachLiteralTypes(Node n) |
private void |
TypeInference.backwardsInferenceFromCallSite(Node n,
FunctionType fnType)
We only do forward type inference.
|
private Node |
Es6ConvertSuper.baseCall(java.lang.String baseClass,
java.lang.String methodName,
Node arguments) |
private boolean |
ProcessClosurePrimitives.baseUsedInClass(Node n)
Verify if goog.base call is used in a class
|
private void |
CollapseVariableDeclarations.GatherCollapses.blacklistStubVars(NodeTraversal t,
Node varNode) |
private void |
InlineVariables.InliningBehavior.blacklistVarReferencesInTree(Node root,
Scope scope)
If there are any variable references in the given node tree, blacklist
them to prevent the pass from trying to inline the variable.
|
private void |
InlineObjectLiterals.InliningBehavior.blacklistVarReferencesInTree(Node root,
Scope scope)
If there are any variable references in the given node tree,
blacklist them to prevent the pass from trying to inline the
variable.
|
(package private) static boolean |
FunctionArgumentInjector.bodyMayHaveConditionalCode(Node n)
We consider a return or expression trivial if it doesn't contain a conditional expression or
a function.
|
(package private) java.util.List<FlowScope> |
TypeInference.branchedFlowThrough(Node source,
FlowScope input) |
(package private) boolean |
CodePrinter.PrettyCodePrinter.breakAfterBlockFor(Node n,
boolean isStatementContext) |
(package private) boolean |
CodeConsumer.breakAfterBlockFor(Node n,
boolean statementContext) |
protected Node |
FunctionRewriter.Reducer.buildCallNode(java.lang.String methodName,
Node argumentNode,
Node srcref)
Builds a method call based on the the given method name,
argument and history.
|
private boolean |
OptimizeParameters.buildParameterList(java.util.List<OptimizeParameters.Parameter> parameters,
Node cur,
Scope s) |
private Node |
ReplaceStrings.buildReplacement(Node expr,
Node prefix,
java.lang.StringBuilder keyBuilder)
Builds a replacement abstract syntax tree for the string expression
expr . |
private static Node |
ExpressionDecomposer.buildResultExpression(Node expr,
boolean needResult,
java.lang.String tempName)
Create an expression tree for an expression.
|
private com.google.common.collect.ImmutableMap<java.lang.String,JSType> |
NewTypeInference.calcTypeInstantiation(Node callNode,
Node receiver,
Node firstArg,
FunctionType funType,
TypeEnv typeEnv,
boolean isFwd)
We don't use the requiredType of the context to unify with the return
type.
|
private java.util.Map<java.lang.String,JSType> |
NewTypeInference.calcTypeInstantiationBwd(Node callNode,
FunctionType funType,
TypeEnv typeEnv) |
private java.util.Map<java.lang.String,JSType> |
NewTypeInference.calcTypeInstantiationFwd(Node callNode,
Node receiver,
Node firstArg,
FunctionType funType,
TypeEnv typeEnv) |
(package private) abstract SideEffectsAnalysis.LocationSummary |
SideEffectsAnalysis.LocationAbstraction.calculateLocationSummary(Node node)
Calculates the abstraction-specific side effects
for the node.
|
SideEffectsAnalysis.LocationSummary |
SideEffectsAnalysis.DegenerateLocationAbstraction.calculateLocationSummary(Node node) |
(package private) SideEffectsAnalysis.LocationSummary |
SideEffectsAnalysis.VisibilityLocationAbstraction.calculateLocationSummary(Node node)
Calculates the MOD/REF summary for the given node.
|
(package private) static SideEffectsAnalysis.EffectLocation |
SideEffectsAnalysis.DegenerateLocationAbstraction.calculateModSet(Node node) |
(package private) static SideEffectsAnalysis.EffectLocation |
SideEffectsAnalysis.DegenerateLocationAbstraction.calculateRefSet(Node node) |
private static Node |
Es6ToEs3Converter.callEs6RuntimeFunction(AbstractCompiler compiler,
Node iterable,
java.lang.String function) |
(package private) static boolean |
NodeUtil.callHasLocalResult(Node n) |
private boolean |
FunctionInjector.callMeetsBlockInliningRequirements(FunctionInjector.Reference ref,
Node fnNode,
java.util.Set<java.lang.String> namesToAlias)
Determines whether a function can be inlined at a particular call site.
|
private boolean |
CollapseVariableDeclarations.GatherCollapses.canBeRedeclared(Node n,
Scope s) |
(package private) static boolean |
NodeUtil.canBeSideEffected(Node n) |
(package private) static boolean |
NodeUtil.canBeSideEffected(Node n,
java.util.Set<java.lang.String> knownConstants,
Scope scope) |
private boolean |
RemoveUnusedVars.CallSiteOptimizer.canChangeSignature(Node function) |
(package private) ExpressionDecomposer.DecompositionType |
ExpressionDecomposer.canExposeExpression(Node subExpression)
Determine whether a expression is movable, or can be be made movable be
decomposing the containing expression.
|
private boolean |
PeepholeSubstituteAlternateSyntax.canFoldStandardConstructors(Node n) |
private boolean |
StatementFusion.canFuseIntoOneStatement(Node block) |
private FunctionInjector.CanInlineResult |
FunctionInjector.canInlineReferenceAsStatementBlock(FunctionInjector.Reference ref,
Node fnNode,
java.util.Set<java.lang.String> namesToAlias)
Determines whether a function can be inlined at a particular call site.
|
private FunctionInjector.CanInlineResult |
FunctionInjector.canInlineReferenceDirectly(FunctionInjector.Reference ref,
Node fnNode,
java.util.Set<java.lang.String> namesToAlias)
Determines whether a function can be inlined at a particular call site.
|
(package private) FunctionInjector.CanInlineResult |
FunctionInjector.canInlineReferenceToFunction(FunctionInjector.Reference ref,
Node fnNode,
java.util.Set<java.lang.String> needAliases,
boolean referencesThis,
boolean containsFunctions) |
(package private) boolean |
RemoveUnusedVars.CallSiteOptimizer.canModifyCallers(Node function) |
private boolean |
InlineVariables.InliningBehavior.canMoveAggressively(Node value)
If the value is a literal, we can cross more boundaries to inline it.
|
private static boolean |
CrossModuleCodeMotion.canMoveValue(ReferenceCollectingCallback collector,
Scope scope,
Node n)
Determines whether the given value is eligible to be moved across modules.
|
private static boolean |
FunctionArgumentInjector.canNameValueChange(Node n,
Node parent)
This is similar to NodeUtil.isLValue except that object properties and
array member modification aren't important ("o" in "o.a = 2" is still "o"
after assignment, where in as "o = x", "o" is now "x").
|
private void |
Es6ToEs3Converter.cannotConvert(Node n,
java.lang.String message) |
private void |
Es6ToEs3Converter.cannotConvertYet(Node n,
java.lang.String feature)
Warns the user that the given ES6 feature cannot be converted to ES3
because the transpilation is not yet implemented.
|
private static boolean |
ClosureOptimizePrimitives.canOptimizeObjectCreate(Node firstParam)
Returns whether the given call to goog.object.create can be converted to an
object literal.
|
private static boolean |
ClosureOptimizePrimitives.canOptimizeObjectCreateSet(Node firstParam)
Returns whether the given call to goog.object.create can be converted to an
object literal.
|
private boolean |
RemoveUnusedVars.CallSiteOptimizer.canRemoveArgFromCallSites(Node function,
int argIndex)
Remove all references to a parameter, otherwise simplify the known
references.
|
private boolean |
RewriteBindThis.canRewriteBinding(Node functionNode) |
(package private) void |
TypeCheck.check(Node node,
boolean externs) |
void |
ConformanceRules.AbstractRule.check(NodeTraversal t,
Node n) |
void |
ConformanceRules.CustomRuleProxy.check(NodeTraversal t,
Node n) |
void |
CheckConformance.Rule.check(NodeTraversal t,
Node n)
Perform conformance check
|
private void |
ConstParamCheck.checkArgumentConstant(NodeTraversal traversal,
Node argument)
Check the method call argument to be constant string literal.
|
private static void |
StrictModeCheck.checkAssignment(NodeTraversal t,
Node n)
Checks that an assignment is not to the "arguments" object.
|
private void |
TypeCheck.checkCallConventions(NodeTraversal t,
Node n)
Validate class-defining calls.
|
private void |
Es6ToEs3Converter.checkClassReassignment(Node clazz) |
private void |
Es6ConvertSuper.checkClassSuperReferences(Node classNode) |
protected abstract ConformanceRules.ConformanceResult |
ConformanceRules.AbstractRule.checkConformance(NodeTraversal t,
Node n) |
protected ConformanceRules.ConformanceResult |
ConformanceRules.InferredConstCheck.checkConformance(NodeTraversal t,
Node n) |
protected ConformanceRules.ConformanceResult |
ConformanceRules.BannedDependency.checkConformance(NodeTraversal t,
Node n) |
protected ConformanceRules.ConformanceResult |
ConformanceRules.BannedName.checkConformance(NodeTraversal t,
Node n) |
protected ConformanceRules.ConformanceResult |
ConformanceRules.BannedProperty.checkConformance(NodeTraversal t,
Node n) |
protected ConformanceRules.ConformanceResult |
ConformanceRules.RestrictedNameCall.checkConformance(NodeTraversal t,
Node n) |
protected ConformanceRules.ConformanceResult |
ConformanceRules.RestrictedMethodCall.checkConformance(NodeTraversal t,
Node n) |
protected ConformanceRules.ConformanceResult |
ConformanceRules.BannedCodePattern.checkConformance(NodeTraversal t,
Node n) |
protected ConformanceRules.ConformanceResult |
ConformanceRules.BanExpose.checkConformance(NodeTraversal t,
Node n) |
protected ConformanceRules.ConformanceResult |
ConformanceRules.RequireUseStrict.checkConformance(NodeTraversal t,
Node n) |
protected ConformanceRules.ConformanceResult |
ConformanceRules.BanThrowOfNonErrorTypes.checkConformance(NodeTraversal t,
Node n) |
protected ConformanceRules.ConformanceResult |
ConformanceRules.BanNullDeref.checkConformance(NodeTraversal t,
Node n) |
protected ConformanceRules.ConformanceResult |
ConformanceRules.BanUnknownThis.checkConformance(NodeTraversal t,
Node n) |
protected ConformanceRules.ConformanceResult |
ConformanceRules.BanUnknownDirectThisPropsReferences.checkConformance(NodeTraversal t,
Node n) |
protected ConformanceRules.ConformanceResult |
ConformanceRules.BanUnknownTypedClassPropsReferences.checkConformance(NodeTraversal t,
Node n) |
protected ConformanceRules.ConformanceResult |
ConformanceRules.BanUnresolvedType.checkConformance(NodeTraversal t,
Node n) |
protected ConformanceRules.ConformanceResult |
ConformanceRules.BanGlobalVars.checkConformance(NodeTraversal t,
Node n) |
protected ConformanceRules.ConformanceResult |
ConformanceRules.RequireFileoverviewVisibility.checkConformance(NodeTraversal t,
Node n) |
protected ConformanceRules.ConformanceResult |
ConformanceRules.NoImplicitlyPublicDecls.checkConformance(NodeTraversal t,
Node n) |
private ConformanceRules.ConformanceResult |
ConformanceRules.BannedProperty.checkConformance(NodeTraversal t,
Node n,
ConformanceRules.BannedProperty.Property prop) |
private ConformanceRules.ConformanceResult |
ConformanceRules.RestrictedMethodCall.checkConformance(NodeTraversal t,
Node n,
ConformanceRules.RestrictedMethodCall.Restriction r,
boolean isCallInvocation) |
private void |
CheckAccessControls.checkConstantProperty(NodeTraversal t,
Node getprop)
Determines whether the given constant property got reassigned
|
private void |
CheckAccessControls.checkConstructorDeprecation(NodeTraversal t,
Node n,
Node parent)
Checks the given NEW node to ensure that access restrictions are obeyed.
|
private void |
StrictModeCheck.NonExternChecks.checkDeclaration(NodeTraversal t,
Node n)
Checks for illegal declarations.
|
private void |
TypeCheck.checkDeclaredPropertyInheritance(NodeTraversal t,
Node n,
FunctionType ctorType,
java.lang.String propertyName,
JSDocInfo info,
JSType propertyType)
Given a constructor type and a property name, check that the property has
the JSDoc annotation @override iff the property is declared on a
superclass.
|
private static void |
StrictModeCheck.checkDelete(NodeTraversal t,
Node n)
Checks that variables, functions, and arguments are not deleted.
|
private void |
TypeCheck.checkEnumAlias(NodeTraversal t,
JSDocInfo declInfo,
Node value)
Checks enum aliases.
|
private void |
CheckAccessControls.checkFinalClassOverrides(NodeTraversal t,
Node fn,
Node parent)
Checks if a constructor is trying to override a final class.
|
private void |
TypedScopeCreator.AbstractScopeBuilder.checkForCallingConventionDefiningCalls(Node n,
java.util.Map<java.lang.String,java.lang.String> delegateCallingConventions)
Look for calls that set a delegate method's calling convention.
|
void |
CodingConvention.checkForCallingConventionDefiningCalls(Node n,
java.util.Map<java.lang.String,java.lang.String> delegateCallingConventions)
Checks for function calls that set the calling conventions on delegate
methods.
|
void |
CodingConventions.Proxy.checkForCallingConventionDefiningCalls(Node n,
java.util.Map<java.lang.String,java.lang.String> delegateCallingConventions) |
void |
CodingConventions.DefaultCodingConvention.checkForCallingConventionDefiningCalls(Node n,
java.util.Map<java.lang.String,java.lang.String> delegateCallingConventions) |
private void |
TypedScopeCreator.AbstractScopeBuilder.checkForClassDefiningCalls(Node n)
Look for class-defining calls.
|
private void |
CollapseProperties.checkForHosedThisReferences(Node function,
JSDocInfo docInfo,
GlobalNamespace.Name name)
Warns about any references to "this" in the given FUNCTION.
|
private static boolean |
NodeUtil.checkForStateChangeHelper(Node n,
boolean checkForNewObjects,
AbstractCompiler compiler)
Returns true if some node in n's subtree changes application state.
|
private void |
TypedScopeCreator.GlobalScopeBuilder.checkForTypedef(Node candidate,
JSDocInfo info)
Handle typedefs.
|
private static void |
StrictModeCheck.checkFunctionUse(NodeTraversal t,
Node n)
Checks that the function is used legally.
|
private void |
StrictModeCheck.NonExternChecks.checkGetProp(NodeTraversal t,
Node n)
Checks that the arguments.callee is not used.
|
private DeadAssignmentsElimination.VariableLiveness |
DeadAssignmentsElimination.checkHookBranchReadBeforeKill(Node trueCase,
Node falseCase,
java.lang.String variable) |
private void |
JsMessageVisitor.checkIfMessageDuplicated(java.lang.String msgName,
Node msgNode)
Checks if message already processed.
|
private void |
TypeCheck.checkInterfaceConflictProperties(NodeTraversal t,
Node n,
java.lang.String functionName,
java.util.Map<java.lang.String,ObjectType> properties,
java.util.Map<java.lang.String,ObjectType> currentProperties,
ObjectType interfaceType)
Check whether there's any property conflict for for a particular super
interface
|
private void |
CheckSuspiciousCode.checkInvalidIn(NodeTraversal t,
Node n) |
private void |
NewTypeInference.checkInvalidTypename(Node typeString) |
private void |
TypeCheck.checkJsdocInfoContainsObjectWithBadKey(NodeTraversal t,
Node n)
Checks if current node contains js docs and checks all types specified in the js doc whether
they have Objects with potentially invalid keys.
|
private void |
CheckAccessControls.checkKeyVisibilityConvention(NodeTraversal t,
Node key,
Node parent)
Determines whether the given OBJECTLIT property visibility
violates the coding convention.
|
private static boolean |
FlowSensitiveInlineVariables.checkLeftOf(Node n,
Node expressionRoot,
com.google.common.base.Predicate<Node> predicate)
Given an expression by its root and sub-expression n, return true if there
the predicate is true for some expression on the left of n.
|
private void |
CheckSuspiciousCode.checkMissingSemicolon(NodeTraversal t,
Node n) |
private void |
CheckAccessControls.checkNameDeprecation(NodeTraversal t,
Node n,
Node parent)
Checks the given NAME node to ensure that access restrictions are obeyed.
|
private void |
InlineFunctions.FindCandidatesReferences.checkNameUsage(Node n,
Node parent)
Find functions that can be inlined.
|
private void |
CheckAccessControls.checkNameVisibility(NodeTraversal t,
Node name,
Node parent)
Reports an error if the given name is not visible in the current context.
|
private void |
CheckSuspiciousCode.checkNaN(NodeTraversal t,
Node n) |
private void |
CheckSuspiciousCode.checkNegatedLeftOperandOfInOperator(NodeTraversal t,
Node n) |
protected void |
JsMessageVisitor.checkNode(Node node,
int type)
Checks a node's type.
|
private void |
CheckSuspiciousCode.checkNonObjectInstanceOf(NodeTraversal t,
Node n) |
private void |
CheckAccessControls.checkNonOverriddenPropertyVisibility(NodeTraversal t,
Node getprop,
Node parent,
JSDocInfo.Visibility visibility,
boolean isClassType,
JSType objectType,
StaticSourceFile referenceSource,
StaticSourceFile definingSource) |
private static void |
StrictModeCheck.checkObjectLiteralOrClass(NodeTraversal t,
Node n)
Checks that object literal keys or class method names are valid.
|
private void |
CheckAccessControls.checkOverriddenPropertyVisibility(NodeTraversal t,
Node getprop,
Node parent,
JSDocInfo.Visibility visibility,
JSDocInfo.Visibility fileOverviewVisibility,
ObjectType objectType,
boolean sameInput) |
private void |
CheckAccessControls.checkOverriddenPropertyVisibilityMismatch(JSDocInfo.Visibility overriding,
JSDocInfo.Visibility overridden,
JSDocInfo.Visibility fileOverview,
NodeTraversal t,
Node getprop) |
private void |
CheckAccessControls.checkPackagePropertyVisibility(NodeTraversal t,
Node getprop,
StaticSourceFile referenceSource,
StaticSourceFile definingSource) |
private JSDocInfo.Visibility |
CheckAccessControls.checkPrivateNameConvention(JSDocInfo.Visibility v,
Node name)
Returns the effective visibility of the given name, reporting an error
if there is a contradiction in the various sources of visibility
(example: a variable with a trailing underscore that is declared
@public ). |
private void |
CheckAccessControls.checkPrivatePropertyVisibility(NodeTraversal t,
Node getprop,
Node parent,
boolean isClassType,
JSType ownerType) |
private void |
TypeCheck.checkPropCreation(NodeTraversal t,
Node lvalue) |
private void |
TypeCheck.checkPropertyAccess(JSType childType,
java.lang.String propName,
NodeTraversal t,
Node n)
Emit a warning if we can prove that a property cannot possibly be
defined on an object.
|
private void |
TypeCheck.checkPropertyAccessHelper(JSType objectType,
java.lang.String propName,
NodeTraversal t,
Node n) |
private void |
CheckAccessControls.checkPropertyDeprecation(NodeTraversal t,
Node n,
Node parent)
Checks the given GETPROP node to ensure that access restrictions are
obeyed.
|
private void |
TypeCheck.checkPropertyInheritanceOnGetpropAssign(NodeTraversal t,
Node assign,
Node object,
java.lang.String property,
JSDocInfo info,
JSType propertyType) |
private void |
TypeCheck.checkPropertyInheritanceOnPrototypeLitKey(NodeTraversal t,
Node key,
java.lang.String propertyName,
ObjectType type) |
private void |
CheckAccessControls.checkPropertyVisibility(NodeTraversal t,
Node getprop,
Node parent)
Reports an error if the given property is not visible in the current
context.
|
private void |
CheckAccessControls.checkProtectedPropertyVisibility(NodeTraversal t,
Node getprop,
JSType ownerType) |
private void |
ClosureCheckModule.checkRequireCall(NodeTraversal t,
Node callNode,
Node parent) |
private static boolean |
FlowSensitiveInlineVariables.checkRightOf(Node n,
Node expressionRoot,
com.google.common.base.Predicate<Node> predicate)
Given an expression by its root and sub-expression n, return true if there
the predicate is true for some expression on the right of n.
|
private static void |
ProcessEs6Modules.checkStrictModeDirective(NodeTraversal t,
Node n) |
private static void |
ClosureRewriteModule.checkStrictModeDirective(NodeTraversal t,
Node n) |
private static void |
ReplaceMessages.checkStringExprNode(Node node)
Checks that a node is a valid string expression (either a string literal
or a concatenation of string literals).
|
private void |
TypeCheck.checkTypeContainsObjectWithBadKey(NodeTraversal t,
Node n,
JSTypeExpression type) |
private void |
TypeCheck.checkTypeofString(NodeTraversal t,
Node n,
java.lang.String s) |
(package private) RawNominalType |
GlobalTypeInfo.ProcessScope.checkValidLendsToPrototypeAndGetClass(QualifiedName lendsQname,
java.lang.String lendsName,
Node objlit) |
private static void |
StrictModeCheck.checkWith(NodeTraversal t,
Node n)
Reports a warning for with statements.
|
private static Node |
CreateSyntheticBlocks.childAfter(Node parent,
Node siblingBefore)
Like Node.getNext, that null is used to signal the child before the
block.
|
private static Node |
SideEffectsAnalysis.closestControlDependentAncestor(Node node) |
private void |
ExploitAssigns.collapseAssign(Node assign,
Node expr,
Node exprParent)
Try to collapse the given assign into subsequent expressions.
|
private boolean |
ExploitAssigns.collapseAssignEqualTo(Node expr,
Node exprParent,
Node value)
Collapse the given assign expression into the expression directly
following it, if possible.
|
void |
GlobalNamespace.BuildGlobalNamespace.collect(JSModule module,
Scope scope,
Node n) |
private static boolean |
PeepholeCollectPropertyAssignments.collectArrayProperty(Node arrayLiteral,
Node propertyCandidate) |
private java.util.Map<java.lang.String,ProcessDefines.DefineInfo> |
ProcessDefines.collectDefines(Node root,
GlobalNamespace namespace)
Finds all defines, and creates a
ProcessDefines.DefineInfo data structure for
each one. |
private java.util.ArrayList<java.lang.String> |
GlobalTypeInfo.CollectNamedTypes.collectFormals(Node fn,
JSDocInfo fnDoc) |
private static boolean |
PeepholeCollectPropertyAssignments.collectObjectProperty(Node objectLiteral,
Node propertyCandidate) |
private boolean |
PeepholeCollectPropertyAssignments.collectProperty(Node propertyCandidate,
java.lang.String name,
Node value) |
private void |
CrossModuleCodeMotion.collectReferences(Node root) |
private ProcessTweaks.CollectTweaksResult |
ProcessTweaks.collectTweaks(Node root)
Finds all calls to goog.tweak functions and emits warnings/errors if any
of the calls have issues.
|
private TypeEnv |
NewTypeInference.collectTypesForFreeVarsFwd(Node n,
TypeEnv env) |
private static TernaryValue |
PeepholeFoldConstants.compareAsNumbers(int op,
Node left,
Node right,
boolean useTypes)
The result of the comparison, or UNKNOWN if the
result could not be determined.
|
private ControlFlowGraph<Node> |
TypeInferencePass.computeCfg(Node n) |
private void |
MustBeReachingVariableDef.computeDependence(MustBeReachingVariableDef.Definition def,
Node rValue)
Computes all the local variables that rValue reads from and store that
in the def's depends set.
|
(package private) static Node |
ControlFlowAnalysis.computeFallThrough(Node n)
Computes the destination node of n when we want to fallthrough into the
subtree of n.
|
private DeclaredFunctionType |
GlobalTypeInfo.ProcessScope.computeFnDeclaredType(JSDocInfo fnDoc,
java.lang.String functionName,
Node declNode,
RawNominalType ownerType,
NTIScope parentScope) |
private DeclaredFunctionType |
GlobalTypeInfo.ProcessScope.computeFnDeclaredTypeFromCallee(Node declNode,
JSType declaredTypeAsJSType) |
private Node |
UnreachableCodeElimination.EliminationPass.computeFollowing(Node n) |
(package private) static Node |
ControlFlowAnalysis.computeFollowNode(Node node) |
(package private) static Node |
ControlFlowAnalysis.computeFollowNode(Node node,
ControlFlowAnalysis cfa) |
private static Node |
ControlFlowAnalysis.computeFollowNode(Node fromNode,
Node node,
ControlFlowAnalysis cfa)
Computes the follow() node of a given node and its parent.
|
private void |
LiveVariablesAnalysis.computeGenKill(Node n,
BitSet gen,
BitSet kill,
boolean conditional)
Computes the GEN and KILL set.
|
private void |
MaybeReachingVariableUse.computeMayUse(Node n,
Node cfgNode,
MaybeReachingVariableUse.ReachingUses output,
boolean conditional) |
private static MinimizedCondition |
MinimizedCondition.computeMinimizedCondition(Node n)
Minimize the condition at the given node.
|
private void |
MustBeReachingVariableDef.computeMustDef(Node n,
Node cfgNode,
MustBeReachingVariableDef.MustDef output,
boolean conditional) |
private void |
ControlFlowAnalysis.connectToPossibleExceptionHandler(Node cfgNode,
Node target)
Connects cfgNode to the proper CATCH block if target subtree might throw
an exception.
|
private static Node |
ReplaceMessages.constructAddOrStringNode(java.util.Iterator<java.lang.CharSequence> partsIterator,
Node argListNode)
Creates a parse tree corresponding to the remaining message parts in
an iteration.
|
private DefinitionProvider |
CallGraph.constructDefinitionProvider(Node externsRoot,
Node jsRoot)
Constructs a DefinitionProvider that can be used to determine the
targets of callsites.
|
(package private) static boolean |
NodeUtil.constructorCallHasSideEffects(Node callNode)
Do calls to this constructor have side effects?
|
private static Node |
ReplaceMessages.constructStringExprNode(java.util.Iterator<java.lang.CharSequence> parts,
Node objLitNode,
Node refNode)
Creates a parse tree corresponding to the remaining message parts in an
iteration.
|
private static boolean |
PeepholeMinimizeConditions.consumesDanglingElse(Node n)
Does a statement consume a 'dangling else'? A statement consumes
a 'dangling else' if an 'else' token following the statement
would be considered by the parser to be part of the statement.
|
(package private) static boolean |
NodeUtil.containsFunction(Node n)
Determines if the given node contains a function statement or function
expression.
|
private boolean |
NameReferenceGraphConstruction.Traversal.containsName(Node n) |
private boolean |
CollapseAnonymousFunctions.Callback.containsName(Node n,
java.lang.String name) |
static boolean |
NodeUtil.containsType(Node node,
int type) |
(package private) static boolean |
NodeUtil.containsType(Node node,
int type,
com.google.common.base.Predicate<Node> traverseChildrenPred) |
private boolean |
Es6RewriteGenerators.controlCanExit(Node n) |
private Node |
Es6TypedToEs6Converter.convertDeclaredTypeToJSDoc(Node type) |
private static void |
FunctionToBlockMutator.convertLastReturnToStatement(Node block,
java.lang.String resultName)
Replace the 'return' statement with its child expression.
|
private Node |
Es6TypedToEs6Converter.convertMemberFunctionToMemberVariable(Node member) |
private Node |
Es6TypedToEs6Converter.convertNamedType(Node type) |
static Node.TypeDeclarationNode |
JsdocToEs6TypedConverter.TypeDeclarationsIRFactory.convertTypeNodeAST(Node n)
The root of a JSTypeExpression is very different from an AST node, even
though we use the same Java class to represent them.
|
private Node |
Es6TypedToEs6Converter.convertWithLocation(Node type) |
private void |
Es6ToEs3ClassSideInheritance.copyDeclarations(Es6ToEs3ClassSideInheritance.JavascriptClass superClass,
Es6ToEs3ClassSideInheritance.JavascriptClass subClass,
Node inheritsCall)
When static get/set properties are transpiled, in addition to the Object.defineProperties, they
are declared with stub GETPROP declarations so that the type checker understands that these
properties exist on the class.
|
(package private) static void |
NodeUtil.copyNameAnnotations(Node source,
Node destination)
Copy any annotations that follow a named value.
|
private void |
Es6ToEs3ClassSideInheritance.copyStaticMembers(Es6ToEs3ClassSideInheritance.JavascriptClass superClass,
Es6ToEs3ClassSideInheritance.JavascriptClass subClass,
Node inheritsCall) |
private SymbolTable.Symbol |
SymbolTable.copySymbolTo(StaticSlot sym,
Node declNode,
SymbolTable.SymbolScope scope) |
(package private) static int |
NodeUtil.countAstSizeUpToLimit(Node n,
int limit) |
private void |
RenameProperties.ProcessProperties.countCallCandidates(NodeTraversal t,
Node callNode)
Counts references to property names that occur in a special function
call.
|
(package private) static Es6ToEs3Converter.ClassDeclarationMetadata |
Es6ToEs3Converter.ClassDeclarationMetadata.create(Node classNode,
Node parent) |
private static Node |
FunctionToBlockMutator.createAssignStatementNode(java.lang.String name,
Node expression)
Create a valid statement Node containing an assignment to name of the
given expression.
|
private CallGraph.Callsite |
CallGraph.createCallsite(Node callsiteNode) |
private Node |
RuntimeTypeCheck.AddChecks.createCheckTypeCallNode(JSType type,
Node expr)
Creates a function call to check that the given expression matches the
given type at runtime.
|
private Node |
ProcessTweaks.createCompilerDefaultValueOverridesVarNode(Node sourceInformationNode)
Creates a JS object that holds a map of tweakId -> default value override.
|
private static Node |
CoverageInstrumentationPass.createConditionalVarDecl(java.lang.String name,
Node srcref) |
private static Node |
Es6TemplateLiterals.createCookedStringArray(Node n) |
private void |
NewTypeInference.createDeferredCheckBwd(Node expr,
JSType requiredType) |
private java.util.List<Node> |
AngularPass.createDependenciesList(Node n)
Given a FUNCTION node returns array of STRING nodes representing function
parameters.
|
private void |
ControlFlowAnalysis.createEdge(Node fromNode,
ControlFlowGraph.Branch branch,
Node toNode)
Connects the two nodes in the control flow graph.
|
private EnumType |
TypedScopeCreator.AbstractScopeBuilder.createEnumTypeFromNodes(Node rValue,
java.lang.String name,
JSDocInfo info)
Creates a new enum type, based on the given nodes.
|
private Node |
ExternExportsPass.Export.createExternFunction(Node exportedFunction)
Given a function to export, create the empty function that
will be put in the externs file.
|
private Node |
ExternExportsPass.Export.createExternObjectLit(Node exportedObjectLit)
Given an object literal to export, create an object lit with all its
string properties.
|
private static Node |
Es6RewriteGenerators.createFinallyJumpBlock(Node finallyName,
int finallyStartState) |
private CallGraph.Function |
CallGraph.createFunction(Node functionNode)
Create a Function object for given an Token.FUNCTION AST node.
|
private java.lang.String |
GlobalTypeInfo.CollectNamedTypes.createFunctionInternalName(Node fn,
Node nameNode) |
private void |
CallGraph.createFunctionsAndCallsites(Node jsRoot,
DefinitionProvider provider)
Creates
CallGraph.Function s and CallGraph.Callsite s in a single
AST traversal. |
private FunctionType |
TypedScopeCreator.AbstractScopeBuilder.createFunctionTypeFromNodes(Node rValue,
java.lang.String name,
JSDocInfo info,
Node lvalueNode)
Creates a new function type, based on the given nodes.
|
(package private) static TypedScope |
TypedScope.createGlobalScope(Node rootNode) |
(package private) static Scope |
Scope.createGlobalScope(Node rootNode) |
(package private) TypedScope |
TypedScopeCreator.createInitialScope(Node root)
Create the outermost scope.
|
private JSTypeExpression |
Es6TypedToEs6Converter.createIObject(Node indexSignature) |
private static Node |
Es6RewriteGenerators.createIteratorResult(Node value,
boolean done) |
(package private) static TypedScope |
TypedScope.createLatticeBottom(Node rootNode) |
private NameAnalyzer.NameInformation |
NameAnalyzer.createNameInformation(NodeTraversal t,
Node n)
Creates name information for the current node during a traversal.
|
private NameAnalyzer.NameInformation |
NameAnalyzer.createNameInformation(java.lang.String name,
Scope scope,
Node rootNameNode)
Creates name information for a particular qualified name that occurs in a
particular scope.
|
private Node |
Es6TypedToEs6Converter.createPropertyDefinition(Node member,
java.lang.String className) |
private static Node |
Es6TemplateLiterals.createRawStringArray(Node n) |
(package private) static boolean |
NodeUtil.createsBlockScope(Node n)
A block scope is created by a non-synthetic block node, a for loop node,
or a for-of loop node.
|
TypedScope |
TypedScopeCreator.createScope(Node root,
Scope parent)
Creates a scope with all types declared.
|
TypedScope |
MemoizedScopeCreator.createScope(Node n,
Scope parent) |
Scope |
Es6SyntacticScopeCreator.createScope(Node n,
Scope parent) |
<T extends Scope> |
ScopeCreator.createScope(Node n,
T parent)
Creates a
Scope object. |
<T extends Scope> |
SyntacticScopeCreator.createScope(Node n,
T parent) |
private boolean |
CheckEventfulObjectDisposal.Traversal.createsEventfulObject(Node n) |
private java.util.List<Node> |
AngularPass.createStringsFromParamList(Node params)
Given a PARAM_LIST node creates an array of corresponding STRING nodes.
|
private SideEffectsAnalysis.LocationAbstraction |
SideEffectsAnalysis.createVisibilityAbstraction(Node externs,
Node root) |
(package private) Var |
TypedScope.declare(java.lang.String name,
Node nameNode,
CompilerInput input) |
(package private) Var |
Scope.declare(java.lang.String name,
Node nameNode,
CompilerInput input)
Declares a variable.
|
(package private) TypedVar |
TypedScope.declare(java.lang.String name,
Node nameNode,
JSType type,
CompilerInput input) |
(package private) TypedVar |
TypedScope.declare(java.lang.String name,
Node nameNode,
JSType type,
CompilerInput input,
boolean inferred) |
private void |
TypedScopeCreator.LocalScopeBuilder.declareArguments(Node functionNode)
Declares all of a function's arguments.
|
SymbolTable.Symbol |
SymbolTable.declareInferredSymbol(SymbolTable.SymbolScope scope,
java.lang.String name,
Node declNode)
Declare a symbol after the main symbol table was constructed.
|
private void |
Es6SyntacticScopeCreator.declareLHS(Scope declarationScope,
Node lhs) |
private boolean |
CheckRequiresForConstructors.declaresFunction(Node n)
If this returns true, check for @extends and @implements annotations on this node.
|
private SymbolTable.Symbol |
SymbolTable.declareSymbol(java.lang.String name,
JSType type,
boolean inferred,
SymbolTable.SymbolScope scope,
Node declNode,
JSDocInfo info) |
private void |
SyntacticScopeCreator.declareVar(Node n)
Declares a variable.
|
private void |
Es6SyntacticScopeCreator.declareVar(Node n) |
private void |
Es6SyntacticScopeCreator.declareVar(Scope s,
Node n)
Declares a variable.
|
private int |
CollapseProperties.declareVarsForObjLitValues(GlobalNamespace.Name objlitName,
java.lang.String alias,
Node objlit,
Node varNode,
Node nameToAddAfter,
Node varParent)
Declares global variables to serve as aliases for the values in an object
literal, optionally removing all of the object literal's keys and values.
|
private void |
ExpressionDecomposer.decomposeObjectLiteralKeys(Node key,
Node stopNode,
ExpressionDecomposer.DecompositionState state)
Decompose an object literal.
|
private void |
ExpressionDecomposer.decomposeSubExpressions(Node n,
Node stopNode,
ExpressionDecomposer.DecompositionState state) |
static boolean |
CodingConventions.defaultIsFunctionCallThatAlwaysThrows(Node n,
java.lang.String alwaysThrowsFunctionName) |
private static Node |
Es6RewriteDestructuring.defaultValueHook(Node getprop,
Node defaultValue)
Helper for transpiling DEFAULT_VALUE trees.
|
(package private) void |
TypedScopeCreator.AbstractScopeBuilder.defineCatch(Node n)
Defines a catch parameter.
|
(package private) void |
TypedScopeCreator.AbstractScopeBuilder.defineFunctionLiteral(Node n)
Defines a function literal.
|
private void |
TypedScopeCreator.AbstractScopeBuilder.defineName(Node name,
Node var,
JSDocInfo info)
Defines a variable based on the
Token.NAME node passed. |
private void |
TypedScopeCreator.AbstractScopeBuilder.defineObjectLiteral(Node objectLit) |
SymbolTable.Reference |
SymbolTable.Symbol.defineReferenceAt(Node n) |
private void |
TypedScopeCreator.AbstractScopeBuilder.defineSlot(Node name,
Node parent,
JSType type)
Defines a typed variable.
|
(package private) void |
TypedScopeCreator.AbstractScopeBuilder.defineSlot(Node n,
Node parent,
JSType type,
boolean inferred)
Defines a typed variable.
|
(package private) void |
TypedScopeCreator.AbstractScopeBuilder.defineSlot(Node n,
Node parent,
java.lang.String variableName,
JSType type,
boolean inferred)
Defines a symbol in the current scope.
|
(package private) void |
TypedScopeCreator.AbstractScopeBuilder.defineVar(Node n)
Defines a VAR initialization.
|
private FlowScope |
TypeInference.dereferencePointer(Node n,
FlowScope scope)
If we access a property of a symbol, then that symbol is not
null or undefined.
|
CodingConvention.Cache |
ClosureCodingConvention.describeCachingCall(Node node) |
CodingConvention.Cache |
CodingConvention.describeCachingCall(Node node)
Builds a
CodingConvention.Cache instance from the given call node and returns that instance, or null
if the Node does not resemble a cache utility call. |
CodingConvention.Cache |
CodingConventions.Proxy.describeCachingCall(Node node) |
CodingConvention.Cache |
CodingConventions.DefaultCodingConvention.describeCachingCall(Node node) |
CodingConvention.Bind |
CodingConvention.describeFunctionBind(Node n)
A Bind instance or null.
|
CodingConvention.Bind |
CodingConventions.Proxy.describeFunctionBind(Node n) |
CodingConvention.Bind |
CodingConventions.DefaultCodingConvention.describeFunctionBind(Node n) |
CodingConvention.Bind |
ClosureCodingConvention.describeFunctionBind(Node n,
boolean callerChecksTypes,
boolean iCheckTypes) |
CodingConvention.Bind |
CodingConvention.describeFunctionBind(Node n,
boolean callerChecksTypes,
boolean iCheckTypes)
A Bind instance or null.
|
CodingConvention.Bind |
CodingConventions.Proxy.describeFunctionBind(Node n,
boolean callerChecksTypes,
boolean iCheckTypes) |
CodingConvention.Bind |
CodingConventions.DefaultCodingConvention.describeFunctionBind(Node n,
boolean callerChecksTypes,
boolean iCheckTypes) |
(package private) GlobalNamespace.Ref.Type |
GlobalNamespace.BuildGlobalNamespace.determineGetTypeForHookOrBooleanExpr(JSModule module,
Scope scope,
Node parent,
java.lang.String name)
Determines whether the result of a hook (x?y:z) or boolean expression
(x||y) or (x&&y) is assigned to a specific global name.
|
(package private) boolean |
FunctionInjector.doesFunctionMeetMinimumRequirements(java.lang.String fnName,
Node fnNode) |
private static boolean |
FunctionInjector.doesLowerCost(Node fnNode,
int callCost,
int directInlines,
int costDeltaDirect,
int blockInlines,
int costDeltaBlock,
boolean removable) |
private void |
TypeCheck.doPercentTypedAccounting(NodeTraversal t,
Node n)
Counts the given node in the typed statistics.
|
private void |
Normalize.NormalizeStatements.doStatementNormalizations(Node n)
Do normalizations that introduce new siblings or parents.
|
private void |
ReplaceStrings.doSubstitutions(NodeTraversal t,
ReplaceStrings.Config config,
Node n)
Replace the parameters specified in the config, if possible.
|
private int |
SideEffectsAnalysis.VisibilityLocationAbstraction.effectMaskForVariableReference(Node variableReference)
Calculates the effect mask for a variable reference.
|
private Node |
OptimizeParameters.eliminateCallParamAt(SimpleDefinitionFinder defFinder,
OptimizeParameters.Parameter p,
Node call,
int argIndex)
Eliminates the parameter from a function call.
|
private static Node |
OptimizeParameters.eliminateFunctionParamAt(Node function,
int argIndex)
Eliminates the parameter from a function definition.
|
(package private) void |
StripCode.Strip.eliminateKeysWithStripNamesFromObjLit(NodeTraversal t,
Node n)
Eliminates any object literal keys in an object literal declaration that
have strip names.
|
private boolean |
OptimizeParameters.eliminateParamsAfter(Node function,
int argIndex)
Removes all formal parameters starting at argIndex.
|
private boolean |
OptimizeParameters.eliminateParamsAfter(Node fnNode,
Node argNode) |
(package private) void |
CodePrinter.MappedCodePrinter.endSourceMapping(Node node)
Finishes the source mapping for the given
node at the current position.
|
(package private) void |
CodeConsumer.endSourceMapping(Node node)
Finishes the source mapping for the given
node at the current position.
|
private static boolean |
ClosureCodingConvention.endsWithPrototype(Node qualifiedName)
Given a qualified name node, returns whether "prototype" is at the end.
|
private void |
TypeInference.ensurePropertyDeclared(Node getprop)
Defines a declared property if it has not been defined yet.
|
private boolean |
TypeInference.ensurePropertyDeclaredHelper(Node getprop,
ObjectType objectType)
Declares a property on its owner, if necessary.
|
private void |
TypeInference.ensurePropertyDefined(Node getprop,
JSType rightType)
Defines a property if the property has not been defined yet.
|
private void |
TypeCheck.ensureTyped(NodeTraversal t,
Node n)
Ensure that the given node has a type.
|
private void |
TypeCheck.ensureTyped(NodeTraversal t,
Node n,
JSType type)
Enforces type casts, and ensures the node is typed.
|
private void |
TypeCheck.ensureTyped(NodeTraversal t,
Node n,
JSTypeNative type) |
void |
NodeTraversal.FunctionCallback.enterFunction(AbstractCompiler compiler,
Node fnRoot) |
private void |
ClosureRewriteModule.enterModule(Node n) |
private static int |
FunctionInjector.estimateCallCost(Node fnNode,
boolean referencesThis)
Gets an estimate of the cost in characters of making the function call:
the sum of the identifiers and the separators.
|
private static int |
MinimizedCondition.MeasuredNode.estimateCostOneLevel(Node n)
Estimate the number of characters in the textual representation of
the given node and that will be devoted to negation or parentheses.
|
(package private) JSType |
TypeTransformation.eval(Node ttlAst,
com.google.common.collect.ImmutableMap<java.lang.String,JSType> typeVars)
Evaluates the type transformation expression and returns the resulting
type.
|
(package private) JSType |
TypeTransformation.eval(Node ttlAst,
com.google.common.collect.ImmutableMap<java.lang.String,JSType> typeVars,
com.google.common.collect.ImmutableMap<java.lang.String,java.lang.String> nameVars)
Evaluates the type transformation expression and returns the resulting
type.
|
private boolean |
TypeTransformation.evalBoolean(Node ttlAst,
TypeTransformation.NameResolver nameResolver) |
private boolean |
TypeTransformation.evalBooleanOperation(Node ttlAst,
TypeTransformation.NameResolver nameResolver) |
private JSType |
TypeTransformation.evalConditional(Node ttlAst,
TypeTransformation.NameResolver nameResolver) |
private JSType |
TypeTransformation.evalInstanceOf(Node ttlAst,
TypeTransformation.NameResolver nameResolver) |
private JSType |
TypeTransformation.evalInternal(Node ttlAst,
TypeTransformation.NameResolver nameResolver) |
private JSType |
TypeTransformation.evalMaprecord(Node ttlAst,
TypeTransformation.NameResolver nameResolver) |
private JSType |
TypeTransformation.evalMapunion(Node ttlAst,
TypeTransformation.NameResolver nameResolver) |
private JSType |
TypeTransformation.evalNativeTypeExpr(Node ttlAst) |
private JSType |
TypeTransformation.evalOperationExpression(Node ttlAst,
TypeTransformation.NameResolver nameResolver) |
private JSType |
TypeTransformation.evalPrintType(Node ttlAst,
TypeTransformation.NameResolver nameResolver) |
private JSType |
TypeTransformation.evalPropType(Node ttlAst,
TypeTransformation.NameResolver nameResolver) |
private JSType |
TypeTransformation.evalRawTypeOf(Node ttlAst,
TypeTransformation.NameResolver nameResolver) |
private JSType |
TypeTransformation.evalRecord(Node record,
TypeTransformation.NameResolver nameResolver) |
private JSType |
TypeTransformation.evalRecordParam(Node ttlAst,
TypeTransformation.NameResolver nameResolver) |
private JSType |
TypeTransformation.evalRecordType(Node ttlAst,
TypeTransformation.NameResolver nameResolver) |
private java.lang.String |
TypeTransformation.evalString(Node ttlAst,
TypeTransformation.NameResolver nameResolver) |
private java.lang.String[] |
TypeTransformation.evalStringParams(Node ttlAst,
TypeTransformation.NameResolver nameResolver) |
private boolean |
TypeTransformation.evalStringPredicate(Node ttlAst,
TypeTransformation.NameResolver nameResolver) |
private JSType |
TypeTransformation.evalTemplateTypeOf(Node ttlAst,
TypeTransformation.NameResolver nameResolver) |
private JSType |
TypeTransformation.evalTemplatizedType(Node ttlAst,
TypeTransformation.NameResolver nameResolver) |
private JSType |
TypeTransformation.evalTypeExpression(Node ttlAst,
TypeTransformation.NameResolver nameResolver) |
private JSType |
TypeTransformation.evalTypeName(Node ttlAst) |
private JSType |
TypeTransformation.evalTypeOfVar(Node ttlAst) |
private JSType[] |
TypeTransformation.evalTypeParams(Node ttlAst,
TypeTransformation.NameResolver nameResolver) |
private boolean |
TypeTransformation.evalTypePredicate(Node ttlAst,
TypeTransformation.NameResolver nameResolver) |
private JSType |
TypeTransformation.evalTypeVar(Node ttlAst,
TypeTransformation.NameResolver nameResolver) |
private boolean |
TypeTransformation.evalTypevarPredicate(Node ttlAst,
TypeTransformation.NameResolver nameResolver) |
(package private) static TernaryValue |
PeepholeFoldConstants.evaluateComparison(int op,
Node left,
Node right,
boolean useTypes) |
(package private) static boolean |
NodeUtil.evaluatesToLocalValue(Node value) |
(package private) static boolean |
NodeUtil.evaluatesToLocalValue(Node value,
com.google.common.base.Predicate<Node> locals) |
private JSType |
TypeTransformation.evalUnionType(Node ttlAst,
TypeTransformation.NameResolver nameResolver) |
private void |
CheckEventfulObjectDisposal.Traversal.eventfulObjectDisposed(NodeTraversal t,
Node variableNode) |
(package private) void |
TypeValidator.expectActualObject(NodeTraversal t,
Node n,
JSType type,
java.lang.String msg)
Expect the type to be an object.
|
(package private) void |
TypeValidator.expectAllInterfaceProperties(NodeTraversal t,
Node n,
FunctionType type)
Expect that all properties on interfaces that this type implements are
implemented and correctly typed.
|
(package private) void |
TypeValidator.expectAnyObject(NodeTraversal t,
Node n,
JSType type,
java.lang.String msg)
Expect the type to contain an object sometimes.
|
(package private) void |
TypeValidator.expectArgumentMatchesParameter(NodeTraversal t,
Node n,
JSType argType,
JSType paramType,
Node callNode,
int ordinal)
Expect that the type of an argument matches the type of the parameter
that it's fulfilling.
|
(package private) void |
TypeValidator.expectBitwiseable(NodeTraversal t,
Node n,
JSType type,
java.lang.String msg)
Expect the type to be a valid operand to a bitwise operator.
|
(package private) boolean |
TypeValidator.expectCanAssignTo(NodeTraversal t,
Node n,
JSType rightType,
JSType leftType,
java.lang.String msg)
Expect that the first type can be assigned to a symbol of the second
type.
|
(package private) boolean |
TypeValidator.expectCanAssignToPropertyOf(NodeTraversal t,
Node n,
JSType rightType,
JSType leftType,
Node owner,
java.lang.String propName)
Expect that the first type can be assigned to a symbol of the second
type.
|
(package private) void |
TypeValidator.expectCanCast(NodeTraversal t,
Node n,
JSType castType,
JSType type)
Expect that the first type can be cast to the second type.
|
(package private) void |
TypeValidator.expectCastIsNecessary(NodeTraversal t,
Node n,
JSType castType,
JSType type)
Expect that casting type to castType is necessary.
|
(package private) void |
TypeValidator.expectIndexMatch(NodeTraversal t,
Node n,
JSType objType,
JSType indexType)
Expect that the first type can be addressed with GETELEM syntax,
and that the second type is the right type for an index into the
first type.
|
private void |
TypeValidator.expectInterfaceProperty(NodeTraversal t,
Node n,
ObjectType instance,
ObjectType implementedInterface,
java.lang.String prop)
Expect that the property in an interface that this type implements is
implemented and correctly typed.
|
(package private) boolean |
TypeValidator.expectNotNullOrUndefined(NodeTraversal t,
Node n,
JSType type,
java.lang.String msg,
JSType expectedType)
Expect the type to be anything but the null or void type.
|
(package private) void |
TypeValidator.expectNumber(NodeTraversal t,
Node n,
JSType type,
java.lang.String msg)
Expect the type to be a number, or a type convertible to number.
|
(package private) boolean |
TypeValidator.expectObject(NodeTraversal t,
Node n,
JSType type,
java.lang.String msg)
Expect the type to be an object, or a type convertible to object.
|
(package private) void |
TypeValidator.expectString(NodeTraversal t,
Node n,
JSType type,
java.lang.String msg)
Expect the type to be a string, or a type convertible to string.
|
(package private) void |
TypeValidator.expectStringOrNumber(NodeTraversal t,
Node n,
JSType type,
java.lang.String msg)
Expect the type to be a number or string, or a type convertible to a number
or string.
|
(package private) void |
TypeValidator.expectSuperType(NodeTraversal t,
Node n,
ObjectType superObject,
ObjectType subObject)
Expect that the first type is the direct superclass of the second type.
|
(package private) void |
TypeValidator.expectSwitchMatchesCase(NodeTraversal t,
Node n,
JSType switchType,
JSType caseType)
Expect that the type of a switch condition matches the type of its
case condition.
|
(package private) TypedVar |
TypeValidator.expectUndeclaredVariable(java.lang.String sourceName,
CompilerInput input,
Node n,
Node parent,
TypedVar var,
java.lang.String variableName,
JSType newType)
Expect that the given variable has not been declared with a type.
|
(package private) void |
TypeValidator.expectValidTypeofName(NodeTraversal t,
Node n,
java.lang.String found) |
private JSType |
CheckMissingReturn.explicitReturnExpected(Node scope)
Determines if the given scope should explicitly return.
|
private void |
ExportTestFunctions.exportTestFunctionAsProperty(java.lang.String fullyQualifiedFunctionName,
Node parent,
Node node,
Node scriptNode) |
private void |
ExportTestFunctions.exportTestFunctionAsSymbol(java.lang.String testFunctionName,
Node node,
Node scriptNode) |
(package private) void |
ExpressionDecomposer.exposeExpression(Node expression)
Perform any rewriting necessary so that the specified expression
is movable.
|
private void |
ExpressionDecomposer.exposeExpression(Node expressionRoot,
Node subExpression)
Rewrite the expression such that the sub-expression is in a movable
expression statement while maintaining evaluation order.
|
(package private) com.google.common.collect.ImmutableList<PolymerBehaviorExtractor.BehaviorDefinition> |
PolymerBehaviorExtractor.extractBehaviors(Node behaviorArray)
Extracts all Behaviors from an array literal, recursively.
|
private ClosureRewriteClass.ClassDefinition |
ClosureRewriteClass.extractClassDefinition(Node targetName,
Node callNode)
Validates the class definition and if valid, destructively extracts
the class definition from the AST.
|
private static java.lang.String |
ClosureCodingConvention.extractClassNameIfGoog(Node node,
Node parent,
java.lang.String functionName) |
java.lang.String |
ClosureCodingConvention.extractClassNameIfProvide(Node node,
Node parent)
Extracts X from goog.provide('X'), if the applied Node is goog.
|
java.lang.String |
CodingConvention.extractClassNameIfProvide(Node node,
Node parent)
Convenience method for determining provided dependencies amongst different
JS scripts.
|
java.lang.String |
CodingConventions.Proxy.extractClassNameIfProvide(Node node,
Node parent) |
java.lang.String |
CodingConventions.DefaultCodingConvention.extractClassNameIfProvide(Node node,
Node parent) |
java.lang.String |
ClosureCodingConvention.extractClassNameIfRequire(Node node,
Node parent)
Extracts X from goog.require('X'), if the applied Node is goog.
|
java.lang.String |
CodingConvention.extractClassNameIfRequire(Node node,
Node parent)
Convenience method for determining required dependencies amongst different
JS scripts.
|
java.lang.String |
CodingConventions.Proxy.extractClassNameIfRequire(Node node,
Node parent) |
java.lang.String |
CodingConventions.DefaultCodingConvention.extractClassNameIfRequire(Node node,
Node parent) |
private Node |
ExpressionDecomposer.extractConditional(Node expr,
Node injectionPoint,
boolean needResult) |
private static ExtractPrototypeMemberDeclarations.PrototypeMemberDeclaration |
ExtractPrototypeMemberDeclarations.PrototypeMemberDeclaration.extractDeclaration(Node n) |
private Node |
ExpressionDecomposer.extractExpression(Node expr,
Node injectionPoint) |
private void |
Normalize.NormalizeStatements.extractForInitializer(Node n,
Node before,
Node beforeParent)
Bring the initializers out of FOR loops.
|
private void |
JsMessageVisitor.extractFromCallNode(JsMessage.Builder builder,
Node node)
Initializes a message builder from a CALL node.
|
(package private) static PolymerClassDefinition |
PolymerClassDefinition.extractFromCallNode(Node callNode,
AbstractCompiler compiler,
GlobalNamespace globalNames)
Validates the class definition and if valid, destructively extracts the class definition from
the AST.
|
private void |
JsMessageVisitor.extractFromFunctionNode(JsMessage.Builder builder,
Node node)
Initializes a message builder from a FUNCTION node.
|
private static void |
JsMessageVisitor.extractFromReturnDescendant(JsMessage.Builder builder,
Node node)
Appends value parts to the message builder by traversing the descendants
of the given RETURN node.
|
boolean |
ClosureCodingConvention.extractIsModuleFile(Node node,
Node parent) |
boolean |
CodingConvention.extractIsModuleFile(Node node,
Node parent)
Convenience method for determining if the node indicates the file
is a "module" file (a file whose top level symbols are not in global
scope).
|
boolean |
CodingConventions.Proxy.extractIsModuleFile(Node node,
Node parent) |
boolean |
CodingConventions.DefaultCodingConvention.extractIsModuleFile(Node node,
Node parent) |
private void |
JsMessageVisitor.extractMessageFrom(JsMessage.Builder builder,
Node valueNode,
Node docNode)
Creates a
JsMessage for a JS message defined using an assignment to
a qualified name (e.g a.b.MSG_X = goog.getMsg(...); ). |
private void |
JsMessageVisitor.extractMessageFromVariable(JsMessage.Builder builder,
Node nameNode,
Node parentNode,
Node grandParentNode)
Creates a
JsMessage for a JS message defined using a JS variable
declaration (e.g var MSG_X = ...; ). |
(package private) static com.google.common.collect.ImmutableList<PolymerPass.MemberDefinition> |
PolymerPassStaticUtils.extractProperties(Node descriptor)
Extracts a list of
PolymerPass.MemberDefinition s for the properties block of the given
descriptor Object literal. |
private static Node |
ClosureRewriteClass.extractProperty(Node objlit,
java.lang.String keyName) |
private static java.lang.String |
JsMessageVisitor.extractStringFromStringExprNode(Node node)
Returns the string value associated with a node representing a JS string or
several JS strings added together (e.g.
|
(package private) void |
SymbolTable.fillJSDocInfo(AbstractCompiler compiler,
Node externs,
Node root)
Index JSDocInfo.
|
(package private) void |
SymbolTable.fillPropertySymbols(AbstractCompiler compiler,
Node externs,
Node root)
Create symbols and references for all properties of types in
this symbol table.
|
(package private) void |
SymbolTable.fillSymbolVisibility(AbstractCompiler compiler,
Node externs,
Node root)
Records the visibility of each symbol.
|
(package private) void |
SymbolTable.fillThisReferences(AbstractCompiler compiler,
Node externs,
Node root)
Fill in references to "this" variables.
|
private java.util.Set<java.lang.String> |
InlineFunctions.findCalledFunctions(Node node)
This functions that may be called directly.
|
private static void |
InlineFunctions.findCalledFunctions(Node node,
java.util.Set<java.lang.String> changed) |
private void |
MakeDeclaredNamesUnique.findDeclaredNames(Node n,
Node parent,
MakeDeclaredNamesUnique.Renamer renamer)
Traverses the current scope and collects declared names.
|
Node |
SideEffectsAnalysis.VariableUseDeclarationMap.findDeclaringNameNodeForUse(Node usingNameNode)
Returns the NAME node for the declaration of the variable
that
usingNameNode refers to, if it is in the map,
or null otherwise. |
private static Node |
RuntimeTypeCheck.AddMarkers.findEnclosingConstructorDeclaration(Node n) |
(package private) static Node |
ExpressionDecomposer.findExpressionRoot(Node subExpression) |
private boolean |
OptimizeParameters.findFixedParameters(java.util.List<OptimizeParameters.Parameter> parameters,
Node cur)
Determine which parameters use the same expression.
|
void |
InlineFunctions.FindCandidateFunctions.findFunctionExpressions(NodeTraversal t,
Node n)
Find function expressions that are called directly in the form of
(function(a,b,...){...})(a,b,...)
or
(function(a,b,...){...}).call(this,a,b, ...)
|
(package private) static Node |
ExpressionDecomposer.findInjectionPoint(Node subExpression) |
(package private) static java.util.Set<java.lang.String> |
FunctionArgumentInjector.findModifiedParameters(Node fnNode)
Retrieve a set of names that can not be safely substituted in place.
|
private static java.util.Set<java.lang.String> |
FunctionArgumentInjector.findModifiedParameters(Node n,
Node parent,
java.util.Set<java.lang.String> names,
java.util.Set<java.lang.String> unsafe,
boolean inInnerFunction)
Check for uses of the named value that imply a pass-by-value
parameter is expected.
|
void |
InlineFunctions.FindCandidateFunctions.findNamedFunctions(NodeTraversal t,
Node n,
Node parent) |
private Node |
RuntimeTypeCheck.AddMarkers.findNodeToInsertAfter(Node n)
Find the node to insert the markers after.
|
private static Node |
ExpressionDecomposer.findNonconditionalParent(Node subExpression,
Node expressionRoot) |
private static java.util.Set<java.lang.String> |
FunctionArgumentInjector.findParametersReferencedAfterSideEffect(java.util.Set<java.lang.String> parameters,
Node root)
Boot strap a traversal to look for parameters referenced
after a non-local side-effect.
|
private Node |
ScopedAliases.Traversal.findScopeMethodCall(Node scopeRoot) |
(package private) void |
SymbolTable.findScopes(AbstractCompiler compiler,
Node externs,
Node root)
Finds all the scopes and adds them to this symbol table.
|
private java.util.Set<Node> |
SideEffectsAnalysis.VisibilityLocationAbstraction.findStorageLocationReferences(Node root)
Returns the set of references to storage locations (both variables
and the heap) under
root . |
private void |
TypedScopeCreator.AbstractScopeBuilder.finishConstructorDefinition(Node n,
java.lang.String variableName,
FunctionType fnType,
TypedScope scopeToDeclareIn,
CompilerInput input,
TypedVar newVar) |
private void |
DevirtualizePrototypeMethods.fixFunctionType(Node functionNode)
Creates a new type based on the original function type by
adding the original this pointer type to the beginning of the
argument type list and replacing the this pointer type with bottom.
|
private void |
RewritePolyfills.Traverser.fixJsdocType(Scope scope,
Node node) |
private void |
ScopedAliases.Traversal.fixTypeNode(Node typeNode) |
private void |
ProcessCommonJSModules.SuffixVarsCallback.fixTypeNode(NodeTraversal t,
Node typeNode)
Replace type name references.
|
private void |
ProcessEs6Modules.RenameGlobalVars.fixTypeNode(NodeTraversal t,
Node typeNode)
Replace type name references.
|
private static void |
FunctionToBlockMutator.fixUnitializedVarDeclarations(Node n)
For all VAR node with uninitialized declarations, set
the values to be "undefined".
|
private static Node |
ClosureRewriteClass.fixupFreeCall(Node call) |
private static Node |
ClosureRewriteClass.fixupSrcref(Node node) |
private void |
CollapseProperties.flattenNameRef(java.lang.String alias,
Node n,
Node parent,
java.lang.String originalName)
Replaces a GETPROP a.b.c with a NAME a$b$c.
|
private void |
CollapseProperties.flattenNameRefAtDepth(java.lang.String alias,
Node n,
int depth,
java.lang.String originalName)
Flattens a particular prefix of a single name reference.
|
(package private) FlowScope |
TypeInference.flowThrough(Node n,
FlowScope input) |
(package private) LiveVariablesAnalysis.LiveVariableLattice |
LiveVariablesAnalysis.flowThrough(Node node,
LiveVariablesAnalysis.LiveVariableLattice input) |
(package private) MaybeReachingVariableUse.ReachingUses |
MaybeReachingVariableUse.flowThrough(Node n,
MaybeReachingVariableUse.ReachingUses input) |
(package private) MustBeReachingVariableDef.MustDef |
MustBeReachingVariableDef.flowThrough(Node n,
MustBeReachingVariableDef.MustDef input) |
(package private) static NodeIterators.LocalVarMotion |
NodeIterators.LocalVarMotion.forAssign(Node name,
Node assign,
Node expr,
Node block) |
private java.lang.String |
NodeTraversal.formatNodeContext(java.lang.String label,
Node n) |
private java.lang.String |
NodeTraversal.formatNodePosition(Node n) |
(package private) static NodeIterators.LocalVarMotion |
NodeIterators.LocalVarMotion.forVar(Node name,
Node var,
Node block) |
(package private) static MinimizedCondition |
MinimizedCondition.fromConditionNode(Node n)
Remove the passed condition node from the AST, and then return a
MinimizedCondition that represents the condition node after
minimization.
|
private static Node |
GlobalTypeInfo.fromDefsiteToName(Node defSite) |
private void |
ObjectLitAssignmentShortening.ObjectLitShorteningCallback.functionAssignmentShortening(Node n,
Node functionNode,
Node parent) |
(package private) static boolean |
NodeUtil.functionCallHasSideEffects(Node callNode)
Returns true if calls to this function have side effects.
|
(package private) static boolean |
NodeUtil.functionCallHasSideEffects(Node callNode,
AbstractCompiler compiler)
Returns true if calls to this function have side effects.
|
(package private) static boolean |
NodeUtil.functionHasInlineJsdocs(Node fn) |
private static void |
StatementFusion.fuseExpressionIntoControlFlowStatement(Node before,
Node control) |
protected static Node |
StatementFusion.fuseExpressionIntoExpression(Node exp1,
Node exp2) |
protected static void |
StatementFusion.fuseExpresssonIntoFirstChild(Node exp,
Node stmt) |
protected static void |
StatementFusion.fuseExpresssonIntoSecondChild(Node exp,
Node stmt) |
private static Node |
StatementFusion.fuseIntoOneStatement(Node parent,
Node first,
Node last)
Given a block, fuse a list of statements with comma's.
|
private static void |
FunctionArgumentInjector.gatherLocalNames(Node n,
java.util.Set<java.lang.String> names)
Gather any names declared in the local scope.
|
private static java.lang.String |
CheckEventfulObjectDisposal.generateKey(NodeTraversal t,
Node n,
boolean noLocalVariables) |
private static Node |
NodeUtil.getAddingRoot(Node n)
Gets a Node at the top of the current scope where we can add new var
declarations as children.
|
(package private) static Node |
NodeUtil.getArgumentForCallOrNew(Node call,
int index)
Given the new or call, this returns the nth
argument of the call or null if no such argument exists.
|
(package private) static Node |
NodeUtil.getArgumentForFunction(Node function,
int index)
Given the function, this returns the nth
argument or null if no such parameter exists.
|
(package private) static java.lang.String |
NodeUtil.getArrayElementStringValue(Node n)
When converting arrays to string using Array.prototype.toString or
Array.prototype.join, the rules for conversion to String are different
than converting each element individually.
|
JSType |
ClosureCodingConvention.AssertInstanceofSpec.getAssertedNewType(Node call,
DeclaredTypeRegistry scope) |
JSType |
ClosureCodingConvention.AssertFunctionByTypeName.getAssertedNewType(Node call,
DeclaredTypeRegistry scope) |
JSType |
CodingConvention.AssertionFunctionSpec.getAssertedNewType(Node call,
DeclaredTypeRegistry scope)
Returns the new type system type for a type assertion.
|
JSType |
ClosureCodingConvention.AssertInstanceofSpec.getAssertedOldType(Node call,
JSTypeRegistry registry)
Returns the type for a type assertion, or null if the function asserts
that the node must not be null or undefined.
|
JSType |
ClosureCodingConvention.AssertFunctionByTypeName.getAssertedOldType(Node call,
JSTypeRegistry registry) |
JSType |
CodingConvention.AssertionFunctionSpec.getAssertedOldType(Node call,
JSTypeRegistry registry)
Returns the old type system type for a type assertion, or null if
the function asserts that the node must not be null or undefined.
|
Node |
CodingConvention.AssertionFunctionSpec.getAssertedParam(Node firstParam)
Returns the parameter of the assertion function that is being checked.
|
static Node |
NodeUtil.getAssignedValue(Node n)
For an assignment or variable declaration get the assigned value.
|
private static Node |
CheckEventfulObjectDisposal.getBase(Node n) |
private Node |
ProcessCommonJSModules.ProcessCommonJsModulesCallback.getBaseQualifiedNameNode(Node n) |
private static com.google.common.collect.ImmutableList<PolymerPass.MemberDefinition> |
PolymerBehaviorExtractor.getBehaviorFunctionsToCopy(Node behaviorObjLit) |
static JSDocInfo |
NodeUtil.getBestJSDocInfo(Node n)
Find the best JSDoc for the given node.
|
(package private) static Node |
NodeUtil.getBestLValue(Node n)
Find the l-value that the given r-value is being assigned to.
|
(package private) static java.lang.String |
NodeUtil.getBestLValueName(Node lValue)
Get the name of the given l-value node.
|
(package private) static Node |
NodeUtil.getBestLValueOwner(Node lValue)
Get the owner of the given l-value node.
|
private java.lang.String |
NodeTraversal.getBestSourceFileName(Node n) |
private static Node |
PeepholeMinimizeConditions.getBlockExpression(Node n) |
private static Node |
PeepholeMinimizeConditions.getBlockReturnExpression(Node n) |
private static Node |
PeepholeMinimizeConditions.getBlockVar(Node n) |
private static java.util.Collection<DefinitionsRemover.Definition> |
PureFunctionIdentifier.getCallableDefinitions(DefinitionProvider definitionProvider,
Node name)
Query the DefinitionProvider for the list of definitions that
correspond to a given qualified name subtree.
|
private Node |
TypeTransformation.getCallArgument(Node n,
int i) |
private java.lang.String |
TypeTransformation.getCallName(Node n) |
private int |
TypeTransformation.getCallParamCount(Node n) |
private com.google.common.collect.ImmutableList<Node> |
TypeTransformation.getCallParams(Node n) |
CallGraph.Callsite |
CallGraph.getCallsiteForAstNode(Node callsiteNode)
Returns the call graph Callsite object corresponding to the provided
AST Token.CALL or Token.NEW node, or null if no such object exists.
|
(package private) JSType |
GlobalTypeInfo.getCastType(Node n) |
(package private) static Node |
NodeUtil.getCatchBlock(Node n) |
(package private) static Node |
ControlFlowAnalysis.getCatchHandlerForBlock(Node block)
Locate the catch BLOCK given the first block in a TRY.
|
CodingConvention.SubclassRelationship |
ClosureCodingConvention.getClassesDefinedByCall(Node callNode)
Checks if the given method defines a subclass relationship,
and if it does, returns information on that relationship.
|
CodingConvention.SubclassRelationship |
CodingConvention.getClassesDefinedByCall(Node callNode)
Checks if the given method defines a subclass relationship,
and if it does, returns information on that relationship.
|
CodingConvention.SubclassRelationship |
CodingConventions.Proxy.getClassesDefinedByCall(Node callNode) |
CodingConvention.SubclassRelationship |
CodingConventions.DefaultCodingConvention.getClassesDefinedByCall(Node callNode) |
private JSType |
CheckAccessControls.getClassOfMethod(Node n,
Node parent)
Gets the type of the class that "owns" a method, or null if
we know that its un-owned.
|
private java.lang.String |
TypeTransformation.getComputedPropName(Node n) |
private Node |
TypeTransformation.getComputedPropValue(Node n) |
private Node |
PeepholeRemoveDeadCode.getConditionalStatementCondition(Node n) |
(package private) static Node |
NodeUtil.getConditionExpression(Node n)
Gets the condition of an ON_TRUE / ON_FALSE CFG edge.
|
(package private) static int |
InlineCostEstimator.getCost(Node root)
Determines the size of the JS code.
|
(package private) static int |
InlineCostEstimator.getCost(Node root,
int costThreshold)
Determines the estimated size of the JS snippet represented by the node.
|
static int |
NodeUtil.getCount(Node n,
com.google.common.base.Predicate<Node> pred,
com.google.common.base.Predicate<Node> traverseChildrenPred) |
private Node |
ProcessCommonJSModules.ProcessCommonJsModulesCallback.getCurrentScriptNode(Node n)
Returns next script node in parents.
|
private static Node |
AngularPass.getDeclarationRValue(Node n)
Given a VAR node (variable declaration) returns the node of initial value.
|
private DeclaredFunctionType |
GlobalTypeInfo.ProcessScope.getDeclaredFunctionTypeFromContext(java.lang.String functionName,
Node declNode,
NTIScope parentScope) |
private DeclaredFunctionType |
GlobalTypeInfo.getDeclaredFunctionTypeOfCalleeIfAny(Node fn,
NTIScope currentScope) |
private JSType |
TypedScopeCreator.AbstractScopeBuilder.getDeclaredRValueType(Node lValue,
Node rValue)
Check for common idioms of a typed R-value assigned to a const L-value.
|
(package private) JSType |
TypedScopeCreator.AbstractScopeBuilder.getDeclaredType(JSDocInfo info,
Node lValue,
Node rValue)
Look for a type declaration on a property assignment
(in an ASSIGN or an object literal key).
|
private JSType |
TypedScopeCreator.AbstractScopeBuilder.getDeclaredTypeInAnnotation(Node node,
JSDocInfo info)
Returns the type specified in a JSDoc annotation near a GETPROP or NAME.
|
(package private) MustBeReachingVariableDef.Definition |
MustBeReachingVariableDef.getDef(java.lang.String name,
Node useNode)
Gets the must reaching definition of a given node.
|
private static StaticSourceFile |
AccessControlUtils.getDefiningSource(Node getprop,
ObjectType referenceType,
java.lang.String propertyName)
Returns the source file in which the given property is defined,
or null if it is not known.
|
private static StaticSourceFile |
CheckAccessControls.getDefiningSource(Node getprop,
ObjectType referenceType,
java.lang.String propertyName) |
private void |
FlowSensitiveInlineVariables.Candidate.getDefinition(Node n)
Set the def node
|
(package private) static DefinitionsRemover.Definition |
DefinitionsRemover.getDefinition(Node n,
boolean isExtern) |
private DefinitionSite |
SimpleDefinitionFinder.getDefinitionAt(Node node) |
(package private) DefinitionSite |
SimpleDefinitionFinder.getDefinitionForFunction(Node function) |
java.util.Collection<DefinitionsRemover.Definition> |
DefinitionProvider.getDefinitionsReferencedAt(Node useSite)
Returns a collection of definitions that characterize the
possible values of a variable or property.
|
java.util.Collection<DefinitionsRemover.Definition> |
NameReferenceGraph.getDefinitionsReferencedAt(Node useSite) |
java.util.Collection<DefinitionsRemover.Definition> |
SimpleDefinitionFinder.getDefinitionsReferencedAt(Node useSite) |
(package private) Node |
MustBeReachingVariableDef.getDefNode(java.lang.String name,
Node useNode) |
CodingConvention.DelegateRelationship |
CodingConvention.getDelegateRelationship(Node callNode) |
CodingConvention.DelegateRelationship |
CodingConventions.Proxy.getDelegateRelationship(Node callNode) |
CodingConvention.DelegateRelationship |
CodingConventions.DefaultCodingConvention.getDelegateRelationship(Node callNode) |
private java.util.List<NameAnalyzer.NameInformation> |
NameAnalyzer.getDependencyScope(Node n)
Gets the nearest enclosing dependency scope, or null if there isn't one.
|
(package private) static JSDocInfo.Visibility |
AccessControlUtils.getEffectiveNameVisibility(Node name,
Var var,
com.google.common.collect.ImmutableMap<StaticSourceFile,JSDocInfo.Visibility> fileVisibilityMap)
Returns the effective visibility of the given name.
|
(package private) static JSDocInfo.Visibility |
AccessControlUtils.getEffectivePropertyVisibility(Node property,
ObjectType referenceType,
com.google.common.collect.ImmutableMap<StaticSourceFile,JSDocInfo.Visibility> fileVisibilityMap,
CodingConvention codingConvention)
Returns the effective visibility of the given property.
|
private static JSDocInfo.Visibility |
AccessControlUtils.getEffectiveVisibilityForNonOverriddenProperty(Node getprop,
ObjectType objectType,
JSDocInfo.Visibility fileOverviewVisibility,
CodingConvention codingConvention)
Returns the effective visibility of the given non-overridden property.
|
static Node |
NodeUtil.getEnclosingBlock(Node n)
Finds the block containing the given node.
|
(package private) static Node |
NodeUtil.getEnclosingClass(Node n)
Finds the class containing the given node.
|
(package private) static Node |
NodeUtil.getEnclosingClassMemberFunction(Node n)
Finds the class member function containing the given node.
|
private static Node |
ProcessClosurePrimitives.getEnclosingDeclNameNode(Node n)
Returns the qualified name node of the function whose scope we're in,
or null if it cannot be found.
|
static Node |
NodeUtil.getEnclosingFunction(Node n)
Finds the function containing the given node.
|
static Node |
NodeUtil.getEnclosingNode(Node n,
com.google.common.base.Predicate<Node> pred) |
SymbolTable.SymbolScope |
SymbolTable.getEnclosingScope(Node n)
Gets the scope that contains the given node.
|
private Node |
PhaseOptimizer.getEnclosingScope(Node n) |
static Node |
NodeUtil.getEnclosingScript(Node n)
Finds the script containing the given node.
|
static Node |
NodeUtil.getEnclosingStatement(Node n) |
(package private) static Node |
NodeUtil.getEnclosingType(Node n,
int type)
Gets the closest ancestor to the given node of the provided type.
|
(package private) static Node |
PeepholeMinimizeConditions.getExceptionHandler(Node n) |
(package private) static Node |
ControlFlowAnalysis.getExceptionHandler(Node n)
Get the TRY block with a CATCH that would be run if n throws an exception.
|
private static java.lang.String |
FieldCleanupPass.QualifiedNameSearchTraversal.getFieldName(Node n) |
(package private) static Node |
NodeUtil.getFirstComputedPropMatchingKey(Node objlit,
Node key) |
private static Node |
CodeGenerator.getFirstNonEmptyChild(Node n)
Gets the first non-empty child of the given node.
|
(package private) static Node |
NodeUtil.getFirstPropMatchingKey(Node objlit,
java.lang.String keyName) |
private FunctionTypeBuilder.AstFunctionContents |
TypedScopeCreator.getFunctionAnalysisResults(Node n) |
private java.lang.String |
TypedCodeGenerator.getFunctionAnnotation(Node fnNode) |
private static Node |
RemoveUnusedVars.getFunctionArgList(Node function) |
(package private) static Node |
NodeUtil.getFunctionBody(Node fn)
Return a BLOCK node for the given FUNCTION node.
|
private Node |
TypeTransformation.getFunctionBody(Node n) |
(package private) static java.util.LinkedHashMap<java.lang.String,Node> |
FunctionArgumentInjector.getFunctionCallParameterMap(Node fnNode,
Node callNode,
com.google.common.base.Supplier<java.lang.String> safeNameIdSupplier)
Get a mapping for function parameter names to call arguments.
|
private DefinitionsRemover.Definition |
RemoveUnusedVars.CallSiteOptimizer.getFunctionDefinition(Node function) |
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.
|
int |
FunctionNames.getFunctionId(Node f) |
java.lang.String |
FunctionNames.getFunctionName(Node f) |
private java.lang.String |
TypeTransformation.getFunctionParameter(Node n,
int i) |
static Node |
NodeUtil.getFunctionParameters(Node fnNode) |
private static java.util.Set<java.lang.String> |
FunctionArgumentInjector.getFunctionParameterSet(Node fnNode)
Get a set of function parameter names.
|
(package private) java.lang.String |
GlobalTypeInfo.getFunInternalName(Node n) |
private Node |
FunctionRewriter.GetterReducer.getGetPropertyName(Node functionNode)
Checks if the function matches the pattern:
function(
|
(package private) static java.lang.String |
ReplaceIdGenerators.getIdForGeneratorNode(boolean consistent,
Node n) |
(package private) static TernaryValue |
NodeUtil.getImpureBooleanValue(Node n)
Gets the boolean value of a node that represents a expression.
|
static InputId |
NodeUtil.getInputId(Node n) |
private Node |
ClosureRewriteModule.getInsertRoot(Node n) |
private JSDocInfo |
PureFunctionIdentifier.FunctionAnalyzer.getJSDocInfoForFunction(Node node,
Node parent,
Node gramp)
Get the doc info associated with the function.
|
(package private) static JSType |
ConformanceRules.ConformanceUtil.getJSType(AbstractCompiler compiler,
Node n)
This method gets the JSType from the Node argument and verifies that it is
present.
|
private JSType |
TypeInference.getJSType(Node n)
This method gets the JSType from the Node argument and verifies that it is
present.
|
private JSType |
InlineProperties.getJSType(Node n)
This method gets the JSType from the Node argument and verifies that it is
present.
|
private JSType |
AmbiguateProperties.getJSType(Node n)
This method gets the JSType from the Node argument and verifies that it is
present.
|
private JSType |
TypeCheck.getJSType(Node n)
This method gets the JSType from the Node argument and verifies that it is
present.
|
private JSType |
TypeValidator.getJSType(Node n)
This method gets the JSType from the Node argument and verifies that it is
present.
|
(package private) static NodeUtil.ValueType |
NodeUtil.getKnownValueType(Node n)
Apply the supplied predicate against
all possible result Nodes of the expression.
|
(package private) static Node |
NodeUtil.getLoopCodeBlock(Node n) |
private static Node |
InlineSimpleMethods.getMethodBlock(Node fn)
Return a BLOCK node if the given FUNCTION node is a valid method
definition, null otherwise.
|
private static java.lang.String |
DevirtualizePrototypeMethods.getMethodName(Node node) |
private Node |
ClosureRewriteModule.getModuleScopeRootForLoadModuleCall(Node n) |
private Node |
ClosureRewriteModule.getModuleStatementRootForLoadModuleCall(Node n) |
static java.lang.String |
NodeUtil.getName(Node n) |
java.lang.String |
NameAnonymousFunctionsMapped.MappedFunctionNamer.getName(Node node) |
java.lang.String |
AnonymousFunctionNamingCallback.FunctionNamer.getName(Node node)
Generates a string representation of a node for use by
setFunctionName.
|
java.lang.String |
FunctionNames.FunctionExpressionNamer.getName(Node node) |
java.lang.String |
NameAnonymousFunctions.AnonymousFunctionNamer.getName(Node node) |
(package private) java.lang.String |
NodeNameExtractor.getName(Node node)
Returns a qualified name of the specified node.
|
private static Node |
PeepholeCollectPropertyAssignments.getName(Node n) |
(package private) java.lang.String |
GlobalNamespace.BuildGlobalNamespace.getNameForClassMembers(Node n)
Gets the fully qualified name corresponding to an class member function,
as long as it and its prefix property names are valid JavaScript
identifiers.
|
(package private) java.lang.String |
GlobalNamespace.BuildGlobalNamespace.getNameForObjLitKey(Node n)
Gets the fully qualified name corresponding to an object literal key,
as long as it and its prefix property names are valid JavaScript
identifiers.
|
static Node |
NodeUtil.getNameNode(Node n)
Gets the node of a function or class's name.
|
(package private) static Node |
SimpleDefinitionFinder.getNameNodeFromFunctionNode(Node function) |
(package private) static int |
NodeUtil.getNameReferenceCount(Node node,
java.lang.String name)
Finds the number of times a simple name is referenced within the node tree.
|
static java.lang.String |
NodeUtil.getNearestFunctionName(Node n)
Gets the function's name.
|
private java.lang.String |
RenameVars.getNewGlobalName(Node n) |
private java.lang.String |
RenameVars.getNewLocalName(Node n) |
private Node |
ReplaceMessages.getNewValueNode(JsMessage message,
Node origValueNode)
Constructs a node representing a message's value, or, if possible, just
modifies
origValueNode so that it accurately represents the
message's value. |
private Node |
ReplaceMessagesForChrome.getNewValueNode(Node origNode,
JsMessage message) |
private static Node |
ControlFlowAnalysis.getNextSiblingOfType(Node first,
int... types)
Get the next sibling (including itself) of one of the given types.
|
(package private) static int |
NodeUtil.getNodeTypeReferenceCount(Node node,
int type,
com.google.common.base.Predicate<Node> traverseChildrenPred)
Finds the number of times a type is referenced within the node tree.
|
private static int |
CodeGenerator.getNonEmptyChildCount(Node n,
int maxCount) |
private static com.google.common.collect.ImmutableList<PolymerPass.MemberDefinition> |
PolymerBehaviorExtractor.getNonPropertyMembersToCopy(Node behaviorObjLit) |
private static int |
PeepholeFoldConstants.getNormalizedNodeType(Node n) |
private static Node |
NodeUtil.getNthSibling(Node first,
int index)
Given the first sibling, this returns the nth
sibling or null if no such sibling exists.
|
static java.lang.Double |
NodeUtil.getNumberValue(Node n) |
(package private) static java.lang.Double |
NodeUtil.getNumberValue(Node n,
boolean useType)
Gets the value of a node as a Number, or null if it cannot be converted.
|
private void |
FlowSensitiveInlineVariables.Candidate.getNumUseInUseCfgNode(Node cfgNode)
Computes the number of uses of the variable varName and store it in
numUseWithinUseCfgNode.
|
private java.lang.String |
ReplaceIdGenerators.ReplaceGenerators.getObfuscatedName(Node id,
java.lang.String callName,
ReplaceIdGenerators.NameSupplier nameGenerator,
java.lang.String name) |
(package private) static java.lang.Iterable<Node> |
NodeUtil.getObjectDefinedPropertiesKeys(Node definePropertiesCall) |
CodingConvention.ObjectLiteralCast |
ClosureCodingConvention.getObjectLiteralCast(Node callNode) |
CodingConvention.ObjectLiteralCast |
CodingConvention.getObjectLiteralCast(Node callNode)
Checks if the given method performs a object literal cast, and if it does,
returns information on the cast.
|
CodingConvention.ObjectLiteralCast |
CodingConventions.Proxy.getObjectLiteralCast(Node callNode) |
CodingConvention.ObjectLiteralCast |
CodingConventions.DefaultCodingConvention.getObjectLiteralCast(Node callNode) |
(package private) static java.lang.String |
NodeUtil.getObjectLitKeyName(Node key)
Get the name of an object literal key.
|
(package private) static JSType |
TypeCheck.getObjectLitKeyTypeFromValueType(Node key,
JSType valueType) |
(package private) static int |
NodeUtil.getOpFromAssignmentOp(Node n) |
private static JSDocInfo.Visibility |
CheckAccessControls.getOverridingPropertyVisibility(Node parent) |
private java.lang.String |
TypedCodeGenerator.getParameterNodeJSDocType(Node parameterNode)
Creates a JSDoc-suitable String representation the type of a parameter.
|
private static Node |
ReplaceMessagesForChrome.getPlaceholderValue(Node placeholderValues,
java.lang.String placeholderName) |
(package private) JSType |
GlobalTypeInfo.getPropDeclaredType(Node n) |
private static java.lang.String |
GenerateExports.getPropertyName(Node node)
Assumes the node type is correct and returns the property name
(not fully qualified).
|
private JSType |
TypeInference.getPropertyType(JSType objType,
java.lang.String propName,
Node n,
FlowScope scope) |
private java.lang.String |
CheckUnusedPrivateProperties.getPropName(Node n) |
private java.lang.String |
NewTypeInference.getPropNameForErrorMsg(Node propAccessNode) |
(package private) GlobalTypeInfo.PropertyType |
GlobalTypeInfo.ProcessScope.getPropTypeHelper(JSDocInfo jsdoc,
Node initializer,
RawNominalType thisType) |
(package private) static Node |
NodeUtil.getPrototypeClassName(Node qName) |
(package private) static java.lang.String |
NodeUtil.getPrototypePropertyName(Node qName) |
private java.lang.String |
AnalyzePrototypeProperties.ProcessProperties.getPrototypePropertyNameFromRValue(Node rValue)
Returns the name of a prototype property being assigned to this r-value.
|
(package private) static TernaryValue |
NodeUtil.getPureBooleanValue(Node n)
Gets the boolean value of a node that represents a literal.
|
private TypedScope |
TypedScopeCreator.AbstractScopeBuilder.getQnameRootScope(Node n)
Return the scope for the name of the given node.
|
private static Node |
Es6TypedToEs6Converter.getQualifiedMemberAccess(AbstractCompiler compiler,
Node member,
Node staticAccess,
Node instanceAccess)
Constructs a Node that represents an access to the given class member, qualified by either the
static or the instance access context, depending on whether the member is static.
|
private static Node |
Es6ToEs3Converter.getQualifiedMemberAccess(Node member,
Node staticAccess,
Node instanceAccess)
Constructs a Node that represents an access to the given class member, qualified by either the
static or the instance access context, depending on whether the member is static.
|
private static java.lang.String |
NewTypeInference.getReadableCalleeName(Node expr) |
private static java.lang.String |
JsMessageVisitor.getReadableTokenName(Node node)
Returns human-readable name of the given node's type.
|
InlineFunctions.Reference |
InlineFunctions.FunctionState.getReference(Node n) |
java.util.List<NameReferenceGraph.Name> |
NameReferenceGraph.getReferencesAt(Node site)
Retrieves a list of all possible Names that this site is referring to.
|
private static Node |
FunctionToBlockMutator.getReplacementReturnStatement(Node node,
java.lang.String resultName)
Replace the 'return' statement with its child expression.
|
private static java.util.List<Node> |
NameAnalyzer.getRhsSubexpressions(Node n)
Extract a list of subexpressions that act as right hand sides.
|
private java.lang.String |
ClosureRewriteModule.getRootName(Node n) |
(package private) static Node |
NodeUtil.getRootOfQualifiedName(Node qName)
Gets the root node of a qualified name.
|
(package private) static Node |
NodeUtil.getRValueOfLValue(Node n)
Gets the r-value (or intializer) of a node returned by getBestLValue.
|
private static Node |
ConformanceRules.NoImplicitlyPublicDecls.getScriptNode(Node start) |
private Node |
FunctionRewriter.SetterReducer.getSetPropertyName(Node functionNode)
Checks if the function matches the pattern:
function(
|
private java.util.List<Node> |
NameAnalyzer.getSideEffectNodes(Node n)
Extract a list of replacement nodes to use.
|
private Node |
PeepholeRemoveDeadCode.getSimpleAssignmentName(Node n) |
private Node |
PeepholeRemoveDeadCode.getSimpleAssignmentValue(Node n) |
private static java.lang.String |
SimpleDefinitionFinder.getSimplifiedName(Node node)
Extract a name from a node.
|
java.lang.String |
ClosureCodingConvention.getSingletonGetterClassName(Node callNode) |
java.lang.String |
CodingConvention.getSingletonGetterClassName(Node callNode)
Checks if the given method defines a singleton getter, and if it does,
returns the name of the class with the singleton getter.
|
java.lang.String |
CodingConventions.Proxy.getSingletonGetterClassName(Node callNode) |
java.lang.String |
CodingConventions.DefaultCodingConvention.getSingletonGetterClassName(Node callNode) |
static StaticSourceFile |
NodeUtil.getSourceFile(Node n) |
private static java.lang.String |
NameReferenceGraphReport.getSourceFile(Node node)
Given a node, find the name of the containing source file.
|
private int |
ProcessClosurePrimitives.ProvidedName.getSourceInfoOffset(Node provideStringNode)
Get the offset into the provide node where the symbol appears.
|
static java.lang.String |
NodeUtil.getSourceName(Node n) |
private static java.lang.String |
NodeTraversal.getSourceName(Node n) |
private SourcePosition<CompilerOptions.AliasTransformation> |
ScopedAliases.Traversal.getSourceRegion(Node n) |
static java.lang.String |
NodeUtil.getStringValue(Node n)
Gets the value of a node as a String, or null if it cannot be converted.
|
private SymbolTable.Symbol |
SymbolTable.getSymbolForName(Node source,
java.lang.String name) |
private static Node |
CodePrinter.PrettyCodePrinter.getTryForCatch(Node n) |
private JSType |
DisambiguateProperties.getType(Node node) |
private JSType |
NameReferenceGraphConstruction.getType(Node n)
A helper to retrieve the type of a node.
|
private java.lang.String |
TypedCodeGenerator.getTypeAnnotation(Node node) |
private JSTypeExpression |
Es6ToEs3Converter.getTypeFromGetterOrSetter(Node node) |
private JSType |
NewTypeInference.getTypeFromString(Node typeString) |
private Node |
Es6RewriteGenerators.getUnique(Node node,
int type)
Finds the only child of the
node of the given type. |
(package private) java.util.Collection<Node> |
MaybeReachingVariableUse.getUses(java.lang.String name,
Node defNode)
Gets a list of nodes that may be using the value assigned to
name
in defNode . |
protected Node |
ExternExportsPass.Export.getValue(Node qualifiedNameNode)
If the given value is a qualified name which refers
a function or object literal, the node is returned.
|
private static Node |
PeepholeCollectPropertyAssignments.getValue(Node n) |
private Node |
FunctionRewriter.ReturnConstantReducer.getValueNode(Node functionNode)
Checks if the function matches the pattern:
function(
|
(package private) GlobalNamespace.Name.Type |
GlobalNamespace.BuildGlobalNamespace.getValueType(Node n)
Gets the type of a value or simple expression.
|
VariableVisibilityAnalysis.VariableVisibility |
VariableVisibilityAnalysis.getVariableVisibility(Node declaringNameNode)
Returns the visibility of of a variable, given that variable's declaring
name node.
|
(package private) static java.util.Collection<Node> |
NodeUtil.getVarsDeclaredInBranch(Node root)
Retrieves vars declared in the current node tree, excluding descent scopes.
|
private JSType |
GlobalTypeInfo.getVarTypeFromAnnotation(Node nameNode,
NTIScope currentScope) |
private void |
ControlFlowAnalysis.handleBreak(Node node) |
private void |
ProcessClosurePrimitives.handleCandidateProvideDefinition(NodeTraversal t,
Node n,
Node parent)
Handles a candidate definition for a goog.provided name.
|
private void |
ControlFlowAnalysis.handleCase(Node node) |
private void |
ControlFlowAnalysis.handleCatch(Node node) |
private void |
ProcessClosurePrimitives.handleClosureDefinesValues(NodeTraversal t,
Node n) |
private void |
ControlFlowAnalysis.handleContinue(Node node) |
private void |
ControlFlowAnalysis.handleDefault(Node node) |
private void |
TransformAMDToCJSModule.TransformAMDModulesCallback.handleDefineObjectLiteral(Node parent,
Node onlyExport,
Node script)
When define is called with an object literal, assign it to module.exports and
we're done.
|
private void |
ControlFlowAnalysis.handleDo(Node node) |
private void |
ExternExportsPass.handleExportDefinition(NodeTraversal t,
Node definitionNode) |
private void |
ControlFlowAnalysis.handleExpr(Node node) |
private void |
ControlFlowAnalysis.handleFor(Node forNode) |
private void |
ControlFlowAnalysis.handleFunction(Node node) |
private void |
TypedScopeCreator.LocalScopeBuilder.handleFunctionInputs(Node fnNode)
Handle bleeding functions and function parameters.
|
(package private) void |
GlobalNamespace.BuildGlobalNamespace.handleGet(JSModule module,
Scope scope,
Node n,
Node parent,
java.lang.String name)
Updates our representation of the global namespace to reflect a read
of a global name.
|
(package private) void |
GlobalNamespace.BuildGlobalNamespace.handleGet(JSModule module,
Scope scope,
Node n,
Node parent,
java.lang.String name,
GlobalNamespace.Ref.Type type)
Updates our representation of the global namespace to reflect a read
of a global name.
|
private void |
DisambiguateProperties.FindRenameableProperties.handleGetProp(NodeTraversal t,
Node n) |
private void |
ControlFlowAnalysis.handleIf(Node node) |
private void |
DisambiguateProperties.FindRenameableProperties.handleObjectLit(NodeTraversal t,
Node n) |
private java.lang.String |
TransformAMDToCJSModule.TransformAMDModulesCallback.handlePlugins(NodeTraversal t,
Node script,
java.lang.String moduleName,
Node modNode)
Require.js supports a range of plugins that are hard to support
statically.
|
private void |
ExternExportsPass.handlePropertyExportCall(Node parent) |
private void |
TransformAMDToCJSModule.TransformAMDModulesCallback.handleRequire(NodeTraversal t,
Node defineNode,
Node script,
Node callback,
Node aliasNode,
Node modNode)
Rewrite a single require call.
|
private void |
TransformAMDToCJSModule.TransformAMDModulesCallback.handleRequiresAndParamList(NodeTraversal t,
Node defineNode,
Node script,
Node requiresNode,
Node callback)
Rewrites the required modules to
var nameInParamList = require("nameFromRequireList"); |
private void |
ControlFlowAnalysis.handleReturn(Node node) |
(package private) void |
GlobalNamespace.BuildGlobalNamespace.handleSetFromGlobal(JSModule module,
Scope scope,
Node n,
Node parent,
java.lang.String name,
boolean isPropAssign,
GlobalNamespace.Name.Type type)
Updates our representation of the global namespace to reflect an
assignment to a global name in global scope.
|
(package private) void |
GlobalNamespace.BuildGlobalNamespace.handleSetFromLocal(JSModule module,
Scope scope,
Node n,
Node parent,
java.lang.String name)
Updates our representation of the global namespace to reflect an
assignment to a global name in a local scope.
|
private void |
ControlFlowAnalysis.handleStmt(Node node) |
private void |
ControlFlowAnalysis.handleStmtList(Node node) |
private void |
ControlFlowAnalysis.handleSwitch(Node node) |
private void |
ExternExportsPass.handleSymbolExportCall(Node parent) |
private void |
ControlFlowAnalysis.handleThrow(Node node) |
private void |
ControlFlowAnalysis.handleTry(Node node) |
private void |
ProcessClosurePrimitives.handleTypedefDefinition(NodeTraversal t,
Node n)
Handles a typedef definition for a goog.provided name.
|
void |
AstValidator.ViolationHandler.handleViolation(java.lang.String message,
Node n) |
private void |
ControlFlowAnalysis.handleWhile(Node node) |
private void |
ControlFlowAnalysis.handleWith(Node node) |
static boolean |
NodeUtil.has(Node node,
com.google.common.base.Predicate<Node> pred,
com.google.common.base.Predicate<Node> traverseChildrenPred) |
private boolean |
RewriteBindThis.hasBindThisCall(Node functionNode) |
(package private) static boolean |
PeepholeRemoveDeadCode.hasBreakOrContinue(Node n) |
(package private) static boolean |
NodeUtil.hasCatchHandler(Node n) |
private static boolean |
CrossModuleCodeMotion.hasConditionalAncestor(Node n)
return true if the node has any form of conditional in its ancestry
TODO(nicksantos) keep track of the conditionals in the ancestry, so
that we don't have to recrawl it.
|
(package private) static boolean |
VarCheck.hasDuplicateDeclarationSuppression(Node n,
Var origVar) |
private boolean |
MaybeReachingVariableUse.hasExceptionHandler(Node cfgNode) |
(package private) static boolean |
NodeUtil.hasFinally(Node n) |
private static boolean |
InlineFunctions.hasLocalNames(Node fnNode) |
private boolean |
FunctionArgumentInjector.ReferencedAfterSideEffect.hasNonLocalSideEffect(Node n) |
private static boolean |
MarkNoSideEffectCalls.hasNoSideEffectsAnnotation(Node node)
Get the value of the @nosideeffects annotation stored in the
doc info.
|
private static boolean |
FunctionToBlockMutator.hasReturnAtExit(Node block) |
(package private) abstract boolean |
AbstractCompiler.hasScopeChanged(Node n)
True iff a function changed since the last time a pass was run
|
(package private) boolean |
Compiler.hasScopeChanged(Node n) |
(package private) boolean |
PhaseOptimizer.hasScopeChanged(Node n) |
private static boolean |
PolymerClassRewriter.hasShorthandAssignment(Node objLit) |
void |
CheckUnusedPrivateProperties.hotSwapScript(Node scriptRoot,
Node originalRoot) |
void |
InferJSDocInfo.hotSwapScript(Node root,
Node originalRoot) |
void |
CheckRequiresForConstructors.hotSwapScript(Node scriptRoot,
Node originalRoot) |
void |
AngularPass.hotSwapScript(Node scriptRoot,
Node originalRoot) |
void |
Es6RewriteBlockScopedDeclaration.hotSwapScript(Node scriptRoot,
Node originalRoot) |
void |
SubstituteEs6Syntax.hotSwapScript(Node scriptRoot,
Node originalRoot) |
void |
ClosureCheckModule.hotSwapScript(Node scriptRoot,
Node originalRoot) |
void |
PolymerPass.hotSwapScript(Node scriptRoot,
Node originalRoot) |
void |
ClosureRewriteClass.hotSwapScript(Node scriptRoot,
Node originalRoot) |
void |
ReferenceCollectingCallback.hotSwapScript(Node scriptRoot,
Node originalRoot)
Same as process but only runs on a part of AST associated to one script.
|
void |
CheckJSDoc.hotSwapScript(Node scriptRoot,
Node originalRoot) |
void |
CombinedCompilerPass.hotSwapScript(Node scriptRoot,
Node originalRoot) |
void |
Es6SplitVariableDeclarations.hotSwapScript(Node scriptRoot,
Node originalRoot) |
void |
Es6RewriteGenerators.hotSwapScript(Node scriptRoot,
Node originalRoot) |
void |
ScopedAliases.hotSwapScript(Node root,
Node originalRoot) |
void |
FieldCleanupPass.hotSwapScript(Node scriptRoot,
Node originalRoot) |
void |
Es6TypedToEs6Converter.hotSwapScript(Node scriptRoot,
Node originalRoot) |
void |
Es6ConvertSuper.hotSwapScript(Node scriptRoot,
Node originalRoot) |
void |
ClosureRewriteModule.hotSwapScript(Node scriptRoot,
Node originalRoot) |
void |
CheckSideEffects.hotSwapScript(Node scriptRoot,
Node originalRoot) |
void |
DartSuperAccessorsPass.hotSwapScript(Node scriptRoot,
Node originalRoot) |
void |
CollectFileOverviewVisibility.hotSwapScript(Node scriptRoot,
Node originalRoot) |
void |
Es6RewriteDestructuring.hotSwapScript(Node scriptRoot,
Node originalRoot) |
void |
HotSwapCompilerPass.hotSwapScript(Node scriptRoot,
Node originalRoot)
Process the JS with root node root.
|
void |
DefaultPassConfig.GlobalTypeResolver.hotSwapScript(Node scriptRoot,
Node originalRoot) |
void |
GlobalVarReferenceMap.GlobalVarRefCleanupPass.hotSwapScript(Node scriptRoot,
Node originalRoot) |
void |
Es6ToEs3ClassSideInheritance.hotSwapScript(Node scriptRoot,
Node originalRoot) |
void |
VarCheck.hotSwapScript(Node scriptRoot,
Node originalRoot) |
void |
Es6RewriteArrowFunction.hotSwapScript(Node scriptRoot,
Node originalRoot) |
void |
CleanupPasses.MemoizedScopeCleanupPass.hotSwapScript(Node scriptRoot,
Node originalRoot) |
void |
RewritePolyfills.hotSwapScript(Node scriptRoot,
Node originalRoot) |
void |
CheckAccessControls.hotSwapScript(Node scriptRoot,
Node originalRoot) |
void |
VariableReferenceCheck.hotSwapScript(Node scriptRoot,
Node originalRoot) |
void |
Es6ToEs3Converter.hotSwapScript(Node scriptRoot,
Node originalRoot) |
void |
Es6RenameVariablesInParamLists.hotSwapScript(Node scriptRoot,
Node originalRoot) |
void |
CheckProvides.hotSwapScript(Node scriptRoot,
Node originalRoot) |
void |
ProcessClosurePrimitives.hotSwapScript(Node scriptRoot,
Node originalRoot) |
private void |
TypedScopeCreator.DiscoverEnumsAndTypedefs.identifyNameNode(Node nameNode,
JSDocInfo info) |
java.util.List<java.lang.String> |
ClosureCodingConvention.identifyTypeDeclarationCall(Node n) |
java.util.List<java.lang.String> |
CodingConvention.identifyTypeDeclarationCall(Node n)
Checks if the given CALL node is forward-declaring any types,
and returns the name of the types if it is.
|
java.util.List<java.lang.String> |
CodingConventions.Proxy.identifyTypeDeclarationCall(Node n) |
java.util.List<java.lang.String> |
CodingConventions.DefaultCodingConvention.identifyTypeDeclarationCall(Node n) |
(package private) void |
TypeInferencePass.inferAllScopes(Node node)
Entry point for type inference when running over part of the tree.
|
private JSType |
GlobalTypeInfo.ProcessScope.inferConstTypeFromRhs(Node constExpr) |
(package private) FunctionTypeBuilder |
FunctionTypeBuilder.inferFromOverriddenFunction(FunctionType oldType,
Node paramsParent)
Infer the parameter and return types of a function from
the parameter and return types of the function it is overriding.
|
(package private) FunctionTypeBuilder |
FunctionTypeBuilder.inferParameterTypes(Node argsParent,
JSDocInfo info)
Infer the parameter types from the list of argument names and
the doc info.
|
void |
LinkedFlowScope.inferQualifiedSlot(Node node,
java.lang.String symbol,
JSType bottomType,
JSType inferredType,
boolean declared) |
(package private) void |
TypeInferencePass.inferScope(Node n,
TypedScope scope) |
private boolean |
TypeInference.inferTemplatedTypesForCall(Node n,
FunctionType fnType)
For functions with function(this: T, ...) and T as parameters, type
inference will set the type of this on a function literal argument to the
the actual type of T.
|
private java.util.Map<TemplateType,JSType> |
TypeInference.inferTemplateTypesFromParameters(FunctionType fnType,
Node call) |
private boolean |
UnreachableCodeElimination.EliminationPass.inFinally(Node parent,
Node child) |
private static boolean |
PeepholeFoldConstants.inForcedStringContext(Node n)
Returns whether this node must be coerced to a string.
|
private void |
Es6ToEs3Converter.initSymbolBefore(Node n)
Inserts a call to $jscomp.initSymbol() before
n . |
private Node |
TemplateAstMatcher.initTemplate(Node templateFunctionNode)
Prepare an template AST to use when performing matches.
|
(package private) static Node |
FunctionArgumentInjector.inject(AbstractCompiler compiler,
Node node,
Node parent,
java.util.Map<java.lang.String,Node> replacements)
With the map provided, replace the names with expression trees.
|
(package private) static Node |
FunctionArgumentInjector.inject(AbstractCompiler compiler,
Node node,
Node parent,
java.util.Map<java.lang.String,Node> replacements,
boolean replaceThis) |
(package private) Node |
FunctionInjector.inline(FunctionInjector.Reference ref,
java.lang.String fnName,
Node fnNode)
Inline a function into the call site.
|
private void |
InlineSimpleMethods.inlineConstReturn(Node parent,
Node call,
Node returnedValue)
Replace the provided object and its method call with the tree specified
in returnedValue.
|
private static int |
FunctionInjector.inlineCostDelta(Node fnNode,
java.util.Set<java.lang.String> namesToAlias,
FunctionInjector.InliningMode mode) |
private void |
InlineVariables.InliningBehavior.inlineDeclaredConstant(Var v,
Node value,
java.util.List<ReferenceCollectingCallback.Reference> refSet)
Inline a declared constant.
|
private void |
InlineSimpleMethods.inlineEmptyMethod(Node parent,
Node call)
Remove the provided object and its method call.
|
private Node |
FunctionInjector.inlineFunction(FunctionInjector.Reference ref,
Node fnNode,
java.lang.String fnName)
Inline a function which fulfills the requirements of
canInlineReferenceAsStatementBlock into the call site, replacing the
parent expression.
|
private void |
J2clPass.inlineFunctionsInFile(Node root,
java.lang.String classFileName,
java.util.Set<java.lang.String> fnNamesToInline,
FunctionInjector.InliningMode inliningMode) |
private void |
InlineSimpleMethods.inlinePropertyReturn(Node parent,
Node call,
Node returnedValue)
Replace the provided method call with the tree specified in returnedValue
Parse tree of a call is
name
call
getprop
obj
string
|
private Node |
FunctionInjector.inlineReturnValue(FunctionInjector.Reference ref,
Node fnNode)
Inline a function that fulfills the requirements of
canInlineReferenceDirectly into the call site, replacing only the CALL
node.
|
private void |
InlineVariables.InliningBehavior.inlineValue(Var v,
ReferenceCollectingCallback.Reference ref,
Node value)
Replace the given reference with the given value node.
|
private void |
InlineVariables.InliningBehavior.inlineWellDefinedVariable(Var v,
Node value,
java.util.List<ReferenceCollectingCallback.Reference> refSet)
Inline an immutable variable into all of its references.
|
(package private) boolean |
FunctionInjector.inliningLowersCost(JSModule fnModule,
Node fnNode,
java.util.Collection<? extends FunctionInjector.Reference> refs,
java.util.Set<java.lang.String> namesToAlias,
boolean isRemovable,
boolean referencesThis)
Determine if inlining the function is likely to reduce the code size.
|
private boolean |
Es6RewriteBlockScopedDeclaration.inLoop(Node n)
Whether n is inside a loop.
|
private void |
Es6RewriteGenerators.insertAll(Node node,
int type,
java.util.List<Node> matchingNodes)
Adds all children of the
node of the given type to given list. |
(package private) void |
Es6ToEs3Converter.ClassDeclarationMetadata.insertNodeAndAdvance(Node newNode) |
private boolean |
CheckMissingGetCssName.insideAssignmentToIdConstant(Node n)
Returns whether the node is the right hand side of an assignment or
initialization of a variable named *_ID of *_ID_.
|
private static boolean |
CheckMissingGetCssName.insideGetCssNameCall(Node n)
Returns whether the node is an argument of a goog.getCssName call.
|
private static boolean |
CheckMissingGetCssName.insideGetUniqueIdCall(Node n)
Returns whether the node is an argument of a function that returns
a unique id (the last part of the qualified name matches
GET_UNIQUE_ID_FUNCTION).
|
private boolean |
ConformanceRules.BanNullDeref.invalidDeref(Node n) |
private boolean |
GlobalTypeInfo.CollectNamedTypes.isAliasedNamespaceDefinition(Node qnameNode) |
protected boolean |
ConformanceRules.AbstractTypeRestrictionRule.isAllType(Node n) |
private static boolean |
InlineFunctions.isAlwaysInlinable(Node fn) |
private static boolean |
NameAnalyzer.isAnalyzableObjectDefinePropertiesDefinition(Node n)
Check if
n is an Object.defineProperties definition
that is static enough for this pass to understand and remove. |
private static boolean |
GlobalTypeInfo.isAnnotatedAsConst(Node defSite) |
private SymbolTable.Symbol |
SymbolTable.isAnySymbolDeclared(java.lang.String name,
Node declNode,
SymbolTable.SymbolScope scope)
Checks if any symbol is already declared at the given node and scope
for the given name.
|
private boolean |
LiveVariablesAnalysis.isArgumentsName(Node n) |
private boolean |
ExpandJqueryAliases.isArrayLitValidForExpansion(Node n) |
protected boolean |
ConformanceRules.AbstractTypeRestrictionRule.isAssertionCall(Node n) |
static boolean |
NodeUtil.isAssignmentOp(Node n) |
(package private) static boolean |
NodeUtil.isAssignmentTarget(Node n) |
private boolean |
AnalyzePrototypeProperties.ProcessProperties.isAssignRValue(Node n,
Node parent)
Returns true if this is the r-value of an assignment.
|
private static boolean |
ClosureRewriteModule.isAssignTarget(Node n) |
private static boolean |
CoalesceVariableNames.LiveRangeChecker.isAssignTo(Var var,
Node n,
Node parent) |
private static boolean |
PolymerPassSuppressBehaviors.isBehavior(Node value) |
(package private) static boolean |
NodeUtil.isBleedingFunctionName(Node n)
Returns whether this is a bleeding function (an anonymous named function
that bleeds into the inner scope).
|
private static boolean |
ReferenceCollectingCallback.isBlockBoundary(Node n,
Node parent) |
private static boolean |
CodeGenerator.isBlockDeclOrDo(Node n) |
(package private) static boolean |
NodeUtil.isBlockScopedDeclaration(Node n)
Is this node the name of a block-scoped declaration?
Checks for let, const, class, or block-scoped function declarations.
|
(package private) static boolean |
NodeUtil.isBlockScopedFunctionDeclaration(Node n) |
private boolean |
TypeTransformation.isBooleanOperation(Node n) |
static boolean |
NodeUtil.isBooleanResult(Node n) |
(package private) static boolean |
ControlFlowAnalysis.isBreakStructure(Node n,
boolean labeled)
Determines whether the given node can be terminated with a BREAK node.
|
static boolean |
ControlFlowAnalysis.isBreakTarget(Node target,
java.lang.String label)
Checks if target is actually the break target of labeled continue.
|
private static boolean |
DartSuperAccessorsPass.isCalled(Node n) |
private static boolean |
PureFunctionIdentifier.isCallOrApply(Node callSite) |
static boolean |
NodeUtil.isCallOrNew(Node node) |
(package private) static boolean |
NodeUtil.isCallOrNewArgument(Node n) |
(package private) static boolean |
NodeUtil.isCallOrNewTarget(Node n)
Returns whether this is a target of a call or new.
|
(package private) static boolean |
ConformanceRules.ConformanceUtil.isCallTarget(Node n) |
private boolean |
ExportTestFunctions.ExportTestFunctionsNodes.isCallTargetQName(Node n,
java.lang.String qname) |
private static boolean |
ClosureRewriteModule.isCallTo(Node n,
java.lang.String qname) |
private boolean |
ScopedAliases.Traversal.isCallToScopeMethod(Node n) |
(package private) boolean |
StripCode.Strip.isCallWhoseReturnValueShouldBeStripped(Node n)
Gets whether a node is a CALL node whose return value should be
stripped.
|
private boolean |
CheckUnusedPrivateProperties.isCandidatePropertyDefinition(Node n) |
private boolean |
ConformanceRules.BannedProperty.isCandidatePropUse(Node n,
ConformanceRules.BannedProperty.Property prop)
Determines if
n is a potentially banned use of prop . |
(package private) static boolean |
InlineFunctions.isCandidateUsage(Node name) |
private boolean |
CheckUnusedPrivateProperties.isCheckablePrivatePropDecl(Node n) |
private boolean |
ConformanceRules.BanUnknownTypedClassPropsReferences.isCheckablePropertySource(Node n) |
private boolean |
CheckJSDoc.isClass(Node n) |
private boolean |
CheckJSDoc.isClassDecl(Node n) |
static boolean |
NodeUtil.isClassDeclaration(Node n)
|
private boolean |
GatherSideEffectSubexpressionsCallback.isClassDefiningCall(Node callNode)
Determines if a call defines a class inheritance or mixing
relation, according to the current coding convention.
|
private boolean |
GlobalNamespace.BuildGlobalNamespace.isClassDefiningCall(Node callNode) |
private boolean |
RuntimeTypeCheck.AddMarkers.isClassDefiningCall(Node next) |
(package private) static boolean |
NodeUtil.isClassExpression(Node n)
|
boolean |
ClosureCodingConvention.isClassFactoryCall(Node callNode) |
boolean |
CodingConvention.isClassFactoryCall(Node callNode)
Checks if the given method is a call to a class factory, such a factory returns a
unique class.
|
boolean |
CodingConventions.Proxy.isClassFactoryCall(Node callNode) |
boolean |
CodingConventions.DefaultCodingConvention.isClassFactoryCall(Node callNode) |
boolean |
GoogleCodingConvention.isClassFactoryCall(Node callNode) |
private static boolean |
GlobalTypeInfo.isClassPropertyDeclaration(Node n,
NTIScope s) |
private boolean |
ConformanceRules.BanUnknownTypedClassPropsReferences.isClassType(Node n) |
private static boolean |
ExploitAssigns.isCollapsibleValue(Node value,
boolean isLValue)
Determines whether we know enough about the given value to be able
to collapse it into subsequent expressions.
|
static boolean |
NodeUtil.isCompoundAssignementOp(Node n) |
private static boolean |
ExpressionDecomposer.isConditionalOp(Node n) |
private boolean |
PeepholeRemoveDeadCode.isConditionalStatement(Node n) |
private boolean |
GlobalTypeInfo.isConst(Node defSite) |
(package private) static boolean |
NodeUtil.isConstantByConvention(CodingConvention convention,
Node node)
Whether the given name is constant by coding convention.
|
(package private) static boolean |
NodeUtil.isConstantDeclaration(CodingConvention convention,
JSDocInfo info,
Node node)
Temporary function to determine if a node is constant
in the old or new world.
|
(package private) static boolean |
NodeUtil.isConstantName(Node node)
Determines whether a variable is constant:
In Normalize, any name that matches the
CodingConvention.isConstant(String) is annotated with an
IS_CONSTANT_NAME property. |
private boolean |
ExpressionDecomposer.isConstantNameNode(Node n,
java.util.Set<java.lang.String> knownConstants) |
(package private) static boolean |
NodeUtil.isConstantVar(Node node,
Scope scope) |
private boolean |
CheckUnusedPrivateProperties.isConstructor(Node n) |
private boolean |
RemoveUnusedClassProperties.isConstructor(Node n) |
private boolean |
ClosureRewriteClass.isContainedInGoogDefineClass(Node n) |
(package private) static boolean |
ControlFlowAnalysis.isContinueStructure(Node n)
Determines whether the given node can be advanced with a CONTINUE node.
|
(package private) static boolean |
ControlFlowAnalysis.isContinueTarget(Node target,
java.lang.String label)
Checks if target is actually the continue target of labeled continue.
|
private static boolean |
SideEffectsAnalysis.isControlDependentChild(Node child)
Returns true if the number of times the child executes depends on the
parent.
|
static boolean |
NodeUtil.isControlStructure(Node n)
Determines whether the given node is a FOR, DO, WHILE, WITH, or IF node.
|
(package private) static boolean |
NodeUtil.isControlStructureCodeBlock(Node parent,
Node n)
Determines whether the given node is code node for FOR, DO,
WHILE, WITH, or IF node.
|
private static boolean |
GlobalTypeInfo.isCtorDefinedByCall(Node qnameNode) |
private boolean |
ConformanceRules.BanGlobalVars.isDeclaration(Node n) |
private static boolean |
StrictModeCheck.isDeclaration(Node n)
Determines if the given name is a declaration, which can be a declaration
of a variable, function, or argument.
|
private static boolean |
ReferenceCollectingCallback.Reference.isDeclarationHelper(Node node) |
private static boolean |
NodeUtil.isDeclarationParent(Node parent) |
private boolean |
ConformanceRules.BanUnknownTypedClassPropsReferences.isDeclaredUnknown(Node n) |
(package private) boolean |
NTIScope.isDefined(Node qnameNode) |
(package private) static boolean |
DefinitionsRemover.isDefinitionNode(Node n) |
private static boolean |
CheckAccessControls.isDeprecatedFunction(Node n)
Returns whether this is a function node annotated as deprecated.
|
(package private) static boolean |
NodeUtil.isDestructuringDeclaration(Node n) |
(package private) static boolean |
FunctionInjector.isDirectCallNodeReplacementPossible(Node fnNode)
Checks if the given function matches the criteria for an inlinable
function, and if so, adds it to our set of inlinable functions.
|
(package private) static boolean |
NodeUtil.isEmptyBlock(Node block)
Returns whether this a BLOCK node with no children.
|
private static boolean |
CheckMissingReturn.isEmptyFunction(Node function) |
(package private) static boolean |
NodeUtil.isEmptyFunctionExpression(Node node)
Determines if a node is a function expression that has an empty body.
|
private static boolean |
InlineSimpleMethods.isEmptyMethod(Node fn)
Return whether the given FUNCTION node is an empty method definition.
|
private boolean |
ConformanceRules.AbstractTypeRestrictionRule.isEmptyType(Node n) |
(package private) static boolean |
NodeUtil.isEnhancedFor(Node n) |
static boolean |
ControlFlowGraph.isEnteringNewCfgNode(Node n) |
(package private) static boolean |
NodeUtil.isEnumDecl(Node n) |
private static boolean |
NodeUtil.isEquivalentToExcludingFunctions(Node thisNode,
Node thatNode) |
(package private) static boolean |
PeepholeMinimizeConditions.isExceptionPossible(Node n) |
(package private) static boolean |
NodeUtil.isExecutedExactlyOnce(Node n) |
private static boolean |
PeepholeRemoveDeadCode.isExit(Node n) |
private static boolean |
ClosureRewriteModule.isExportPropAssign(Node n) |
(package private) static boolean |
NodeUtil.isExprAssign(Node n)
Is this node an assignment expression statement?
|
(package private) static boolean |
NodeUtil.isExprCall(Node n)
Is this node a call expression statement?
|
private static boolean |
PeepholeRemoveDeadCode.isExprConditional(Node n) |
(package private) static boolean |
NodeUtil.isExpressionResultUsed(Node expr) |
private boolean |
ExpressionDecomposer.isExpressionTreeUnsafe(Node n,
boolean followingSideEffectsExist) |
private static boolean |
VarCheck.isExternNamespace(Node n) |
private static boolean |
PeepholeMinimizeConditions.isFoldableExpressBlock(Node n) |
static boolean |
NodeUtil.isForIn(Node n) |
(package private) static boolean |
NodeUtil.isFunctionBind(Node expr) |
private boolean |
NewTypeInference.isFunctionBind(Node expr,
TypeEnv env,
boolean isFwd) |
(package private) static boolean |
NodeUtil.isFunctionBlock(Node n) |
boolean |
ClosureCodingConvention.isFunctionCallThatAlwaysThrows(Node n) |
boolean |
CodingConvention.isFunctionCallThatAlwaysThrows(Node n)
Used by CheckMissingReturn.
|
boolean |
CodingConventions.Proxy.isFunctionCallThatAlwaysThrows(Node n) |
boolean |
CodingConventions.DefaultCodingConvention.isFunctionCallThatAlwaysThrows(Node n) |
private boolean |
CheckJSDoc.isFunctionDecl(Node n) |
static boolean |
NodeUtil.isFunctionDeclaration(Node n)
Is this node a function declaration? A function declaration is a function
that has a name that is added to the current scope (i.e.
|
(package private) static boolean |
NodeUtil.isFunctionExpression(Node n)
Is a FUNCTION node an function expression? An function expression is one
that has either no name or a name that is not added to the current scope.
|
(package private) static boolean |
NodeUtil.isFunctionObjectApply(Node callNode) |
(package private) static boolean |
NodeUtil.isFunctionObjectCall(Node callNode) |
private static boolean |
StrictModeCheck.isFunctionType(Node n) |
private boolean |
StatementFusion.isFusableControlStatement(Node n) |
static boolean |
NodeUtil.isGet(Node n)
Is this a GETPROP or GETELEM node?
|
private static boolean |
ClosureRewriteModule.isGetModuleCall(Node n) |
private static boolean |
ClosureRewriteModule.isGetModuleCallAlias(Node n) |
(package private) static boolean |
NodeUtil.isGetOrSetKey(Node node)
Determines whether a node represents an object literal get or set key
(e.g.
|
private boolean |
AnalyzePrototypeProperties.ProcessProperties.isGlobalFunctionDeclaration(NodeTraversal t,
Node n)
Determines whether
n is the FUNCTION node in a global function
declaration. |
private boolean |
Es6ToEs3Converter.isGlobalSymbol(NodeTraversal t,
Node n) |
private static boolean |
GatherRawExports.isGlobalThisObject(NodeTraversal t,
Node n) |
private boolean |
TypedScopeCreator.AbstractScopeBuilder.isGoogAbstractMethod(Node n)
We have to special-case goog.abstractMethod in createFunctionTypeFromNodes,
because some people use it (incorrectly) for interfaces:
/* @interface * /
var example.MyInterface = goog.abstractMethod;
|
(package private) static boolean |
NodeUtil.isGoogBind(Node n) |
private static boolean |
ClosureRewriteClass.isGoogDefineClass(Node value) |
private void |
CheckEventfulObjectDisposal.ComputeEventizeTraversal.isGoogEventsUnlisten(Node n) |
private static boolean |
NodeUtil.isGoogModuleCall(Node n) |
(package private) static boolean |
NodeUtil.isGoogPartial(Node n) |
private boolean |
ScopedAliases.Traversal.isGoogScopeFunctionBody(Node n)
Returns true if n is the goog.scope function body
|
private boolean |
NewTypeInference.isGoogTypeof(Node expr) |
private boolean |
ClosureRewriteModule.isHeaderNode(Node n) |
static boolean |
NodeUtil.isHoistedFunctionDeclaration(Node n)
Is this node a hoisted function declaration? A function declaration in the
scope root is hoisted to the top of the scope.
|
private boolean |
FunctionRewriter.IdentityReducer.isIdentityFunction(Node functionNode)
Checks if the function matches the pattern:
function(
|
(package private) static boolean |
NodeUtil.isImmutableResult(Node n) |
(package private) static boolean |
NodeUtil.isImmutableValue(Node n)
Returns true if this is an immutable value.
|
static boolean |
NodeUtil.isImportedName(Node n) |
(package private) static boolean |
NodeUtil.isImpureTrue(Node n) |
private static boolean |
PureFunctionIdentifier.isIncDec(Node n) |
private static boolean |
CodeGenerator.isIndirectEval(Node n) |
static boolean |
NodeUtil.isInFunction(Node n) |
boolean |
CodingConvention.isInlinableFunction(Node n) |
boolean |
CodingConventions.Proxy.isInlinableFunction(Node n) |
boolean |
CodingConventions.DefaultCodingConvention.isInlinableFunction(Node n) |
private static boolean |
DartSuperAccessorsPass.isInsideInstanceMember(Node n)
Returns true if this node is or is enclosed by an instance member definition
(non-static method, getter or setter).
|
(package private) static boolean |
PeepholeCollectPropertyAssignments.isInterestingValue(Node n) |
private static boolean |
AliasStrings.isInThrowExpression(Node n)
Is the
Node currently within a 'throw' expression? |
boolean |
ExpandJqueryAliases.isJqueryExpandedEachCall(Node call,
java.lang.String qName) |
static boolean |
ExpandJqueryAliases.isJqueryExtendCall(Node n,
java.lang.String qname,
AbstractCompiler compiler)
Check that Node n is a call to one of the jQuery.extend methods that we
can expand.
|
protected boolean |
ConformanceRules.AbstractTypeRestrictionRule.isKnown(Node n) |
private static boolean |
PureFunctionIdentifier.isKnownLocalValue(Node value) |
private boolean |
ConformanceRules.BanUnknownDirectThisPropsReferences.isKnownThis(Node n) |
static boolean |
NodeUtil.isLhsByDestructuring(Node n) |
private static boolean |
ReferenceCollectingCallback.Reference.isLhsOfEnhancedForExpression(Node n) |
static boolean |
NodeUtil.isLiteralValue(Node n,
boolean includeFunctions)
Returns true if this is a literal value.
|
private static boolean |
ClosureRewriteModule.isLoadModuleCall(Node n) |
private boolean |
FunctionArgumentInjector.ReferencedAfterSideEffect.isLocalName(Node node) |
private boolean |
NameReferenceGraphConstruction.Traversal.isLocalNameReference(NodeTraversal t,
Node n) |
(package private) static boolean |
NodeUtil.isLoopStructure(Node n)
Determines whether the given node is a FOR, DO, or WHILE node.
|
(package private) static boolean |
PeepholeMinimizeConditions.isLowerPrecedence(Node n,
int precedence)
Whether the node type has lower precedence than "precedence"
|
static boolean |
NodeUtil.isLValue(Node n)
Determines whether this node is used as an L-value.
|
private boolean |
InlineVariables.InliningBehavior.isLValue(Node n) |
private static boolean |
Normalize.FindExposeAnnotations.isMarkedExpose(Node n) |
private boolean |
InlineProperties.ReplaceCandidates.isMatchingType(Node n,
JSType src) |
(package private) boolean |
StripCode.Strip.isMethodOrCtorCallThatTriggersRemoval(NodeTraversal t,
Node n,
Node parent)
Gets whether a CALL node triggers statement removal, based on the name
of the object whose method is being called, or the name of the method.
|
(package private) static boolean |
NodeUtil.isModuleFile(Node n) |
private static boolean |
OptimizeParameters.isMovableValue(Node n,
Scope s) |
private static boolean |
ExploitAssigns.isNameAssignedTo(java.lang.String name,
Node node) |
static boolean |
NodeUtil.isNameDeclaration(Node n)
Is this node a name declaration?
|
private boolean |
ExportTestFunctions.ExportTestFunctionsNodes.isNameDeclaredFunction(Node node)
Whether node corresponds to a function expression declared with var, let
or const which is of the form:
|
private boolean |
GlobalTypeInfo.ProcessScope.isNamedType(Node getProp) |
private boolean |
CheckJSDoc.isNameIntializeWithClass(Node n) |
(package private) static boolean |
NodeUtil.isNameReferenced(Node node,
java.lang.String name)
Whether a simple name is referenced within the node tree.
|
(package private) static boolean |
NodeUtil.isNameReferenced(Node node,
java.lang.String name,
com.google.common.base.Predicate<Node> traverseChildrenPred)
Whether a simple name is referenced within the node tree.
|
(package private) boolean |
NTIScope.isNamespace(Node expr) |
(package private) static boolean |
NodeUtil.isNamespaceDecl(Node n)
Returns true iff this node defines a namespace, such as goog or goog.math.
|
private static boolean |
ProcessClosurePrimitives.isNamespacePlaceholder(Node n) |
(package private) static boolean |
NodeUtil.isNaN(Node n) |
protected boolean |
ConformanceRules.AbstractTypeRestrictionRule.isNativeObjectType(Node n) |
(package private) boolean |
GlobalNamespace.BuildGlobalNamespace.isNestedAssign(Node parent)
Determines whether an assignment is nested (i.e.
|
private boolean |
Es6SyntacticScopeCreator.isNodeAtCurrentLexicalScope(Node n)
Determines whether the name should be declared at current lexical scope.
|
static boolean |
NodeUtil.isNullOrUndefined(Node n) |
static boolean |
NodeUtil.isNumericResult(Node n)
Returns true if the result of node evaluation is always a number
|
(package private) static boolean |
NodeUtil.isObjectCallMethod(Node callNode,
java.lang.String methodName) |
(package private) static boolean |
NodeUtil.isObjectDefinePropertiesDefinition(Node n) |
(package private) static boolean |
NodeUtil.isObjectLitKey(Node node)
Determines whether a node represents an object literal key
(e.g.
|
static boolean |
NodeUtil.isObjectResult(Node n) |
boolean |
CodingConvention.isOptionalParameter(Node parameter)
This checks whether a given parameter name should be treated as an
optional parameter as far as type checking or function call arg count
checking is concerned.
|
boolean |
CodingConventions.Proxy.isOptionalParameter(Node parameter) |
boolean |
CodingConventions.DefaultCodingConvention.isOptionalParameter(Node parameter) |
boolean |
GoogleCodingConvention.isOptionalParameter(Node parameter)
This checks whether a given parameter name should be treated as an
optional parameter as far as type checking or function call arg count
checking is concerned.
|
private boolean |
FunctionTypeBuilder.isOptionalParameter(Node param,
JSDocInfo info) |
private boolean |
CheckAccessControls.isPackageAccessAllowed(TypedVar var,
Node name) |
private boolean |
CodeGenerator.isPatternInitializer(Node n)
Determines whether the given child of a destructuring pattern is the initializer for
that pattern.
|
private static boolean |
CheckUnusedPrivateProperties.isPinningPropertyUse(Node n) |
private static boolean |
RemoveUnusedClassProperties.isPinningPropertyUse(Node n) |
static boolean |
PolymerPass.isPolymerCall(Node value) |
private static boolean |
PolymerPassFindExterns.isPolymerElementExterns(Node value) |
private static boolean |
PolymerPassFindExterns.isPolymerElementPropExpr(Node value) |
private boolean |
InlineAliases.AliasesCollector.isPrivate(Node nameNode) |
private boolean |
CheckProvides.CheckProvidesCallback.isPrivate(Node classOrFn) |
private static boolean |
CheckAccessControls.isPrivateAccessAllowed(TypedVar var,
Node name,
Node parent) |
private boolean |
CheckUnusedPrivateProperties.isPrivatePropDecl(Node n) |
private boolean |
NewTypeInference.isPropertyAbsentTest(Node propAccessNode) |
private static boolean |
PeepholeMinimizeConditions.isPropertyAssignmentInExpression(Node n)
Does the expression contain a property assignment?
|
private static boolean |
PeepholeCollectPropertyAssignments.isPropertyAssignmentToName(Node propertyCandidate) |
(package private) static boolean |
NodeUtil.isPropertyTest(AbstractCompiler compiler,
Node propAccess)
Determines whether this node is testing for the existence of a property.
|
private boolean |
NewTypeInference.isPropertyTestCall(Node expr) |
boolean |
JqueryCodingConvention.isPropertyTestFunction(Node call) |
boolean |
ClosureCodingConvention.isPropertyTestFunction(Node call) |
boolean |
CodingConvention.isPropertyTestFunction(Node call)
Whether this CALL function is testing for the existence of a property.
|
boolean |
CodingConventions.Proxy.isPropertyTestFunction(Node call) |
boolean |
CodingConventions.DefaultCodingConvention.isPropertyTestFunction(Node call) |
private static boolean |
InlineSimpleMethods.isPropertyTree(Node expectedGetprop)
Returns true if the provided node is a getprop for
which the left child is this or a valid property tree
and for which the right side is a string.
|
boolean |
JqueryCodingConvention.isPrototypeAlias(Node getProp) |
boolean |
CodingConvention.isPrototypeAlias(Node getProp)
Whether this GETPROP node is an alias for an object prototype.
|
boolean |
CodingConventions.Proxy.isPrototypeAlias(Node getProp) |
boolean |
CodingConventions.DefaultCodingConvention.isPrototypeAlias(Node getProp) |
(package private) static boolean |
NodeUtil.isPrototypeAssignment(Node getProp) |
(package private) static boolean |
NodeUtil.isPrototypeMethod(Node n) |
private static boolean |
DevirtualizePrototypeMethods.isPrototypeMethodDefinition(Node node)
Determines if the current node is a function prototype definition.
|
private boolean |
NameReferenceGraphConstruction.Traversal.isPrototypeNameReference(Node n) |
(package private) static boolean |
NodeUtil.isPrototypeProperty(Node n) |
private static boolean |
GlobalTypeInfo.isPrototypeProperty(Node getProp) |
static boolean |
NodeUtil.isPrototypePropertyDeclaration(Node n) |
private static boolean |
GlobalTypeInfo.isPrototypePropertyDeclaration(Node n) |
(package private) boolean |
PeepholeMinimizeConditions.isPure(Node n) |
private static boolean |
SideEffectsAnalysis.isPure(Node node)
Returns true if the node is pure, that is it side effect free and does it
not depend on its environment?
|
private boolean |
TypedScopeCreator.AbstractScopeBuilder.isQnameRootedInGlobalScope(Node n)
Check if the given node is a property of a name in the global scope.
|
private boolean |
GlobalTypeInfo.CollectNamedTypes.isQualifiedFunctionDefinition(Node qnameNode) |
private boolean |
TypedScopeCreator.AbstractScopeBuilder.isQualifiedNameInferred(java.lang.String qName,
Node n,
JSDocInfo info,
Node rhsValue,
JSType valueType)
Determines whether a qualified name is inferred.
|
private static boolean |
CoalesceVariableNames.LiveRangeChecker.isReadFrom(Var var,
Node name) |
private boolean |
CollapseAnonymousFunctions.Callback.isRecursiveFunction(Node function) |
private static boolean |
FunctionRewriter.isReduceableFunctionExpression(Node n) |
(package private) static boolean |
NodeUtil.isReferenceName(Node n) |
private boolean |
Es6ToEs3ClassSideInheritance.isReferenceToClass(NodeTraversal t,
Node n) |
(package private) boolean |
StripCode.Strip.isReferenceToRemovedVar(NodeTraversal t,
Node n)
Determines whether a NAME node represents a reference to a variable that
has been removed.
|
(package private) static boolean |
NodeUtil.isRelationalOperation(Node n)
Returns true if the operator on this node is relational.
|
private boolean |
RemoveUnusedClassProperties.isRemovablePropertyDefinition(Node n) |
private static boolean |
PeepholeMinimizeConditions.isReturnBlock(Node n) |
private static boolean |
PeepholeMinimizeConditions.isReturnExpressBlock(Node n) |
private static boolean |
PeepholeMinimizeConditions.isReturnExpression(Node n) |
private static boolean |
RewritePolyfills.isRootInScope(Node node,
NodeTraversal traversal) |
private boolean |
ExpressionDecomposer.isSafeAssign(Node n,
boolean seenSideEffects)
It is always safe to inline "foo()" for expressions such as
"a = b = c = foo();"
As the assignment is unaffected by side effect of "foo()"
and the names assigned-to can not influence the state before
the call to foo.
|
private boolean |
ExploitAssigns.isSafeReplacement(Node node,
Node replacement)
Checks name referenced in node to determine if it might have
changed.
|
private static PeepholeSubstituteAlternateSyntax.FoldArrayAction |
PeepholeSubstituteAlternateSyntax.isSafeToFoldArrayConstructor(Node arg)
Checks if it is safe to fold Array() constructor into [].
|
private static boolean |
PeepholeRemoveDeadCode.isSimpleAssignment(Node n) |
(package private) static boolean |
SimpleDefinitionFinder.isSimpleFunctionDeclaration(Node fn) |
(package private) static boolean |
NodeUtil.isSimpleOperator(Node n) |
static boolean |
NodeUtil.isStatement(Node n) |
static boolean |
NodeUtil.isStatementBlock(Node n) |
(package private) static boolean |
NodeUtil.isStatementParent(Node parent) |
private boolean |
GlobalTypeInfo.ProcessScope.isStaticCtorProp(Node getProp,
NTIScope s) |
private boolean |
RewritePolyfills.Traverser.isStaticFunction(Node node,
NodeTraversal traversal) |
private boolean |
NameReferenceGraphConstruction.Traversal.isStaticNameReference(Node n,
Scope scope) |
private static boolean |
SideEffectsAnalysis.VisibilityLocationAbstraction.isStorageNode(Node node)
Returns true if the node is a storage node.
|
private static boolean |
ConstParamCheck.isStringLiteralValue(Node node)
Returns true iff the value associated with the node is a JS string literal,
or a concatenation thereof.
|
static boolean |
NodeUtil.isStringResult(Node n) |
private ExpressionDecomposer.DecompositionType |
ExpressionDecomposer.isSubexpressionMovable(Node expressionRoot,
Node subExpression)
Walk the AST from the call site to the expression root and verify that
the portions of the expression that are evaluated before the call are:
1) Unaffected by the the side-effects, if any, of the call.
|
private boolean |
DartSuperAccessorsPass.isSuperGet(Node n) |
private boolean |
DartSuperAccessorsPass.isSuperSet(Node n) |
private boolean |
FunctionInjector.isSupportedCallType(Node callNode)
Only ".call" calls and direct calls to functions are supported.
|
(package private) static boolean |
NodeUtil.isSwitchCase(Node n)
Whether the node is part of a switch statement.
|
(package private) static boolean |
NodeUtil.isSymmetricOperation(Node n)
Returns true if the operator on this node is symmetric
|
private boolean |
TemplateAstMatcher.isTemplateLocalNameNode(Node n) |
private boolean |
TemplateAstMatcher.isTemplateParameterNode(Node n) |
protected boolean |
ConformanceRules.AbstractTypeRestrictionRule.isTemplateType(Node n) |
private boolean |
ProcessCommonJSModules.ProcessCommonJsModulesCallback.isTopLevelAssignLhs(Node n) |
private static boolean |
NodeUtil.isToStringMethodCall(Node call) |
(package private) static boolean |
NodeUtil.isTryCatchNodeContainer(Node n)
Whether the node is a CATCH container BLOCK.
|
(package private) static boolean |
NodeUtil.isTryFinallyNode(Node parent,
Node child)
Whether the child node is the FINALLY block of a try.
|
private boolean |
GlobalNamespace.BuildGlobalNamespace.isTypeDeclaration(Node n)
Determines whether a set operation is a constructor or enumeration
or interface declaration.
|
(package private) static boolean |
NodeUtil.isTypedefDecl(Node n) |
protected boolean |
ConformanceRules.AbstractTypeRestrictionRule.isTypeImmediatelyTightened(Node n) |
private boolean |
TypeTransformation.isTypeName(Node n) |
private boolean |
TypeTransformation.isTypeVar(Node n) |
static boolean |
NodeUtil.isUndefined(Node n) |
protected boolean |
ConformanceRules.AbstractTypeRestrictionRule.isUnknown(Node n) |
private static boolean |
PeepholeRemoveDeadCode.isUnremovableNode(Node n)
Some nodes unremovable node don't have side-effects.
|
protected boolean |
ConformanceRules.AbstractTypeRestrictionRule.isUsed(Node n) |
private boolean |
PeepholeRemoveDeadCode.isUselessCase(Node caseNode,
Node previousCase)
The function assumes that when checking a CASE node there is no
DEFAULT node in the SWITCH.
|
(package private) static boolean |
NodeUtil.isValidCfgRoot(Node n) |
(package private) static boolean |
ProcessClosurePrimitives.isValidDefineValue(Node val) |
(package private) static boolean |
NodeUtil.isValidDefineValue(Node val,
java.util.Set<java.lang.String> defines)
Determines whether the given value may be assigned to a define.
|
private static boolean |
CheckAccessControls.isValidPrivateConstructorAccess(Node parent)
Whether the given access of a private constructor is legal.
|
(package private) static boolean |
NodeUtil.isVanillaFor(Node n) |
(package private) static boolean |
NodeUtil.isVanillaFunction(Node n) |
(package private) static boolean |
NodeUtil.isVarArgsFunction(Node function)
Determines if a function takes a variable number of arguments by
looking for references to the "arguments" var_args object.
|
boolean |
CodingConvention.isVarArgsParameter(Node parameter)
This checks whether a given parameter should be treated as a marker
for a variable argument list function.
|
boolean |
CodingConventions.Proxy.isVarArgsParameter(Node parameter) |
boolean |
CodingConventions.DefaultCodingConvention.isVarArgsParameter(Node parameter) |
boolean |
GoogleCodingConvention.isVarArgsParameter(Node parameter) |
private boolean |
FunctionTypeBuilder.isVarArgsParameter(Node param,
JSDocInfo info)
Determine whether this is a var args parameter.
|
private static boolean |
PeepholeMinimizeConditions.isVarBlock(Node n) |
(package private) static boolean |
NodeUtil.isVarDeclaration(Node n)
Is this node the name of a variable being declared?
|
private DeadAssignmentsElimination.VariableLiveness |
DeadAssignmentsElimination.isVariableReadBeforeKill(Node n,
java.lang.String variable)
Give an expression and a variable.
|
private boolean |
DeadAssignmentsElimination.isVariableStillLiveWithinExpression(Node n,
Node exprRoot,
java.lang.String variable)
Given a variable, node n in the tree and a sub-tree denoted by exprRoot as
the root, this function returns true if there exists a read of that
variable before a write to that variable that is on the right side of n.
|
private boolean |
InlineObjectLiterals.InliningBehavior.isVarOrAssignExprLhs(Node n) |
(package private) static boolean |
NodeUtil.isVarOrSimpleAssignLhs(Node n,
Node parent)
Determines whether this node is strictly on the left hand side of an assign
or var initialization.
|
private boolean |
ConformanceRules.BanGlobalVars.isWhitelisted(Node n) |
protected boolean |
ConformanceRules.AbstractTypeRestrictionRule.isWhitelistedType(Node n) |
(package private) static boolean |
NodeUtil.isWithinLoop(Node n) |
private static boolean |
ConformanceRules.NoImplicitlyPublicDecls.isWizDeclaration(Node n)
Do not check Wiz-style declarations for implicit public visibility.
|
private Node |
RescopeGlobalSymbols.RemoveGlobalVarCallback.joinOnComma(java.util.List<Node> commas,
Node source) |
private boolean |
SimpleDefinitionFinder.DefinitionGatheringCallback.jsdocContainsDeclarations(Node node) |
void |
GatherSideEffectSubexpressionsCallback.SideEffectAccumulator.keepSimplifiedHookExpression(Node hook,
boolean thenHasSideEffects,
boolean elseHasSideEffects)
Simplifies a subtree whose root node is a HOOK expression
and adds the resulting subtree to the list of nodes that have
side effects.
|
void |
GatherSideEffectSubexpressionsCallback.GetReplacementSideEffectSubexpressions.keepSimplifiedHookExpression(Node hook,
boolean thenHasSideEffects,
boolean elseHasSideEffects) |
void |
NameAnalyzer.FindReferences.NodeAccumulator.keepSimplifiedHookExpression(Node hook,
boolean thenHasSideEffects,
boolean elseHasSideEffects) |
void |
GatherSideEffectSubexpressionsCallback.SideEffectAccumulator.keepSimplifiedShortCircuitExpression(Node original)
Simplifies a subtree whose root node is an AND or OR expression
and adds the resulting subtree to the list of nodes that have
side effects.
|
void |
GatherSideEffectSubexpressionsCallback.GetReplacementSideEffectSubexpressions.keepSimplifiedShortCircuitExpression(Node original) |
void |
NameAnalyzer.FindReferences.NodeAccumulator.keepSimplifiedShortCircuitExpression(Node original) |
void |
GatherSideEffectSubexpressionsCallback.SideEffectAccumulator.keepSubTree(Node original)
Adds subtree to the list of nodes that have side effects.
|
void |
GatherSideEffectSubexpressionsCallback.GetReplacementSideEffectSubexpressions.keepSubTree(Node original) |
void |
NameAnalyzer.FindReferences.NodeAccumulator.keepSubTree(Node original) |
(package private) int |
DotFormatter.key(Node n) |
private Node |
CheckEventfulObjectDisposal.Traversal.localEventfulObjectAssign(NodeTraversal t,
Node propertyNode) |
private java.util.Collection<DefinitionsRemover.Definition> |
CallGraph.lookupDefinitionsForTargetsOfCall(Node callsite,
DefinitionProvider definitionProvider)
Queries the definition provider for the definitions that could be the
targets of the given callsite node.
|
private JSType |
TypedScopeCreator.AbstractScopeBuilder.lookupQualifiedName(Node n) |
static JSError |
JSError.make(Node n,
CheckLevel level,
DiagnosticType type,
java.lang.String... arguments) |
static JSError |
JSError.make(Node n,
DiagnosticType type,
java.lang.String... arguments)
Creates a JSError from a file and Node position.
|
JSError |
NodeTraversal.makeError(Node n,
CheckLevel level,
DiagnosticType type,
java.lang.String... arguments)
Creates a JSError during NodeTraversal.
|
JSError |
NodeTraversal.makeError(Node n,
DiagnosticType type,
java.lang.String... arguments)
Creates a JSError during NodeTraversal.
|
private static Node |
PeepholeSubstituteAlternateSyntax.makeForwardSlashBracketSafe(Node n)
returns a string node that can safely be rendered inside /brackets/.
|
(package private) static Node |
Es6ToEs3Converter.makeIterator(AbstractCompiler compiler,
Node iterable)
Returns a call to
$jscomp.makeIterator with iterable as its argument. |
private void |
FunctionToBlockMutator.makeLocalNamesUnique(Node fnNode,
boolean isCallInLoop)
Fix-up all local names to be unique for this subtree.
|
static java.util.Map<Node,Node> |
NodeUtil.mapMainToClone(Node main,
Node clone)
Given an AST and its copy, map the root node of each scope of main to the
corresponding root node of clone
|
void |
SideEffectsAnalysis.VariableUseDeclarationMap.mapUses(Node root)
Adds a map from each use NAME in
root to its corresponding
declaring name, *provided the declaration is also under root*. |
private JSType |
NewTypeInference.markAndGetTypeOfPreanalyzedNode(Node qnameNode,
TypeEnv env,
boolean isFwd) |
private void |
GlobalTypeInfo.CollectNamedTypes.markAssignNodeAsAnalyzed(Node maybeAssign) |
private boolean |
RemoveUnusedVars.CallSiteOptimizer.markUnreferencedFunctionArgs(Scope scope,
Node function,
java.util.Set<Var> referenced,
Node param,
int paramIndex,
boolean canChangeSignature)
For each unused function parameter, determine if it can be removed
from all the call sites, if so, remove it from the function signature
and the call sites otherwise replace the unused value where possible
with a constant (0).
|
boolean |
TemplateAstMatcher.matches(Node n) |
private boolean |
TemplateAstMatcher.matchesNode(Node template,
Node ast)
Returns whether two nodes are equivalent, taking into account the template
parameters that were provided to this matcher.
|
private boolean |
TemplateAstMatcher.matchesNodeShape(Node template,
Node ast) |
private boolean |
ConformanceRules.RestrictedMethodCall.matchesProp(Node n,
ConformanceRules.RestrictedMethodCall.Restriction r) |
private boolean |
TemplateAstMatcher.matchesTemplate(Node template,
Node ast) |
private boolean |
TemplateAstMatcher.matchesTemplateShape(Node template,
Node ast)
Returns whether the template matches an AST structure node starting with
node, taking into account the template parameters that were provided to
this matcher.
|
private static boolean |
MinimizeExitPoints.matchingExitNode(Node n,
int type,
java.lang.String labelName)
Determines if n matches the type and name for the following types of
"exits":
- return without values
- continues and breaks with or without names.
|
private static boolean |
ControlFlowAnalysis.matchLabel(Node target,
java.lang.String label)
Check if label is actually referencing the target control structure.
|
private void |
GlobalTypeInfo.ProcessScope.mayAddPropToPrototype(RawNominalType rawType,
java.lang.String pname,
Node defSite,
Node initializer)
Called for the usual style of prototype-property definitions,
but also for @lends and for direct assignments of object literals to prototypes.
|
private boolean |
GlobalTypeInfo.ProcessScope.mayAddPropToType(Node getProp,
RawNominalType rawType) |
private void |
CodeGenerator.maybeAddAccessibilityModifier(Node n) |
private void |
CheckRequiresForConstructors.maybeAddConstructor(Node n) |
(package private) static void |
NodeUtil.maybeAddFinally(Node tryNode)
Add a finally block if one does not exist.
|
private void |
GlobalTypeInfo.CollectNamedTypes.maybeAddFunctionToNamespace(Node funQname) |
private void |
Es6TypedToEs6Converter.maybeAddGenerics(Node n,
Node jsDocNode) |
private void |
CodeGenerator.maybeAddGenericTypes(Node n) |
private void |
CheckRequiresForConstructors.maybeAddJsDocUsages(NodeTraversal t,
Node n) |
private void |
CodeGenerator.maybeAddOptional(Node n) |
(package private) void |
InlineFunctions.FindCandidatesReferences.maybeAddReference(NodeTraversal t,
InlineFunctions.FunctionState fs,
Node callNode,
JSModule module) |
private void |
ProcessCommonJSModules.ProcessCommonJsModulesCallback.maybeAddReferenceCount(Node n) |
private boolean |
InlineFunctions.FindCandidatesReferences.maybeAddReferenceUsingMode(NodeTraversal t,
InlineFunctions.FunctionState fs,
Node callNode,
JSModule module,
FunctionInjector.InliningMode mode) |
private void |
ProcessClosurePrimitives.maybeAddStringNodeToSymbolTable(Node n)
The string in
n is a reference name. |
(package private) static void |
FunctionArgumentInjector.maybeAddTempsForCallArguments(Node fnNode,
java.util.Map<java.lang.String,Node> argMap,
java.util.Set<java.lang.String> namesNeedingTemps,
CodingConvention convention)
Updates the set of parameter names in set unsafe to include any
arguments from the call site that require aliases.
|
private void |
ProcessClosurePrimitives.maybeAddToSymbolTable(Node n)
Add the given qualified name node to the symbol table.
|
private void |
CodeGenerator.maybeAddTypeDecl(Node n) |
private void |
CheckRequiresForConstructors.maybeAddUsage(NodeTraversal t,
Node n,
JSTypeExpression expr)
Adds a usage for the given type expression (unless it references a variable that is
defined in the externs, in which case no goog.require() is needed).
|
private void |
CheckRequiresForConstructors.maybeAddUsage(NodeTraversal t,
Node n,
Node rootTypeNode,
java.util.Map<java.lang.String,Node> usagesMap,
com.google.common.base.Predicate<Node> pred) |
private void |
Es6TypedToEs6Converter.maybeAddVisibility(Node n) |
private void |
CheckRequiresForConstructors.maybeAddWeakUsage(NodeTraversal t,
Node n,
Node typeNode)
Adds a weak usage for the given type expression (unless it references a variable that is
defined in the externs, in which case no goog.require() is needed).
|
private void |
NameReferenceGraphConstruction.Traversal.maybeAliasNamesOnAssign(Node lhs,
Node rhs) |
private boolean |
InlineProperties.GatherCandidates.maybeCandidateDefinition(NodeTraversal t,
Node n,
Node parent) |
private void |
Denormalize.maybeCollapseIntoForStatements(Node n,
Node parent)
Collapse VARs and EXPR_RESULT node into FOR loop initializers where
possible.
|
private void |
TypedScopeCreator.LocalScopeBuilder.maybeCollectMember(Node member,
Node nodeWithJsDocInfo,
Node value) |
private Node |
Es6TypedToEs6Converter.maybeCreateAnyType(Node n,
Node type) |
(package private) static RemoveUnusedVars.Assign |
RemoveUnusedVars.Assign.maybeCreateAssign(Node assignNode)
If this is an assign to a variable or its property, return it.
|
private void |
Es6TypedToEs6Converter.maybeCreateQualifiedDeclaration(Node n,
Node parent) |
(package private) void |
TypedScopeCreator.AbstractScopeBuilder.maybeDeclareQualifiedName(NodeTraversal t,
JSDocInfo info,
Node n,
Node parent,
Node rhsValue)
Declare the symbol for a qualified name in the global scope.
|
(package private) void |
TypedScopeCreator.GlobalScopeBuilder.maybeDeclareQualifiedName(NodeTraversal t,
JSDocInfo info,
Node n,
Node parent,
Node rhsValue) |
private boolean |
SymbolTable.PropertyRefCollector.maybeDefineReference(Node n,
java.lang.String propName,
SymbolTable.Symbol ownerSymbol) |
private boolean |
SymbolTable.PropertyRefCollector.maybeDefineTypedReference(Node n,
java.lang.String propName,
JSType owner) |
private static Node |
ClosureRewriteClass.maybeDetach(Node node) |
(package private) void |
StripCode.Strip.maybeEliminateAssignmentByLvalueName(NodeTraversal t,
Node n,
Node parent)
Eliminates an assignment if the l-value is:
- A field name that's a strip name
- A qualified name that begins with a strip type
|
(package private) void |
StripCode.Strip.maybeEliminateExpressionByName(NodeTraversal t,
Node n,
Node parent)
Eliminates an expression if it refers to:
- A field name that's a strip name
- A qualified name that begins with a strip type
This gets rid of construct like:
a.prototype.logger; (used instead of a.prototype.logger = null;)
This expression is not an assignment and so will not be caught by
maybeEliminateAssignmentByLvalueName.
|
private void |
ExpandJqueryAliases.maybeExpandJqueryEachCall(NodeTraversal t,
Node n)
Expand a jQuery.expandedEach call
Expanded jQuery.expandedEach calls will replace the GETELEM nodes of a
property assignment with GETPROP nodes to allow for renaming.
|
private void |
ExpandJqueryAliases.maybeExpandJqueryExtendCall(Node n)
Expand jQuery.extend (and derivative) calls into direct object assignments
Example: jQuery.extend(obj1, {prop1: val1, prop2: val2}) ->
obj1.prop1 = val1;
obj1.prop2 = val2;
|
(package private) void |
ExpressionDecomposer.maybeExposeExpression(Node expression)
If required, rewrite the statement containing the expression.
|
private static boolean |
ExpressionDecomposer.maybeExternMethod(Node node) |
private JSType |
InlineProperties.GatherCandidates.maybeGetInstanceTypeFromPrototypeRef(Node src) |
private RawNominalType |
GlobalTypeInfo.ProcessScope.maybeGetOwnerType(Node funNode,
Node parent) |
private Node |
Es6TypedToEs6Converter.maybeGetQualifiedNameNode(Node oldNameNode) |
protected Node |
FunctionRewriter.SingleReturnStatementReducer.maybeGetSingleReturnRValue(Node functionNode) |
private java.util.List<Node> |
CheckEventfulObjectDisposal.Traversal.maybeGetValueNodesFromCall(Node n) |
private Var |
AnalyzePrototypeProperties.ProcessProperties.maybeGetVar(NodeTraversal t,
Node maybeName) |
(package private) boolean |
GlobalNamespace.BuildGlobalNamespace.maybeHandlePrototypePrefix(JSModule module,
Scope scope,
Node n,
Node parent,
java.lang.String name)
Updates our representation of the global namespace to reflect a read
of a global name's longest prefix before the "prototype" property if the
name includes the "prototype" property.
|
private boolean |
NameAnalyzer.FindReferences.maybeHiddenAlias(Node n)
A value whose result is the return value of a function call
can be an alias to global object.
|
private static boolean |
JsMessageVisitor.maybeInitMetaDataFromHelpVar(JsMessage.Builder builder,
Node sibling)
Initializes the meta data in a JsMessage by examining a node just before or
after a message VAR node.
|
private static boolean |
JsMessageVisitor.maybeInitMetaDataFromJsDoc(JsMessage.Builder builder,
Node node)
Initializes the meta data in a message builder given a node that may
contain JsDoc properties.
|
private void |
JsMessageVisitor.maybeInitMetaDataFromJsDocOrHelpVar(JsMessage.Builder builder,
Node varNode,
Node parentOfVarNode)
Initializes the meta data in a JsMessage by examining the nodes just before
and after a message VAR node.
|
private void |
RenameProperties.ProcessProperties.maybeMarkCandidate(Node n)
If a property node is eligible for renaming, stashes a reference to it
and increments the property name's access count.
|
private void |
AmbiguateProperties.ProcessProperties.maybeMarkCandidate(Node n,
JSType type)
If a property node is eligible for renaming, stashes a reference to it
and increments the property name's access count.
|
(package private) static boolean |
Normalize.NormalizeStatements.maybeNormalizeFunctionDeclaration(Node n)
Rewrite named unhoisted functions declarations to a known
consistent behavior so we don't to different logic paths for the same
code.
|
(package private) static boolean |
NodeUtil.mayBeObect(Node n) |
private void |
PhaseOptimizer.maybePrintAstHashcodes(java.lang.String passName,
Node root) |
private void |
ProcessClosurePrimitives.maybeProcessClassBaseCall(NodeTraversal t,
Node n) |
private Node |
Es6TypedToEs6Converter.maybeProcessOptionalParameter(Node n,
Node type) |
private Node |
Es6TypedToEs6Converter.maybeProcessOptionalProperty(Node n,
Node type) |
private boolean |
NameAnalyzer.FindReferences.maybeRecordAlias(java.lang.String name,
Node parent,
NameAnalyzer.NameInformation referring,
java.lang.String referringName) |
private void |
NameReferenceGraphConstruction.Traversal.maybeRecordExport(Node call) |
private void |
GlobalTypeInfo.CollectNamedTypes.maybeRecordNominalType(Node defSite,
Node nameNode,
JSDocInfo fnDoc,
boolean isRedeclaration) |
private void |
NameAnalyzer.FindReferences.maybeRecordReferenceOrAlias(NodeTraversal t,
Node n,
Node parent,
NameAnalyzer.NameInformation nameInfo,
NameAnalyzer.NameInformation referring) |
(package private) void |
StripCode.Strip.maybeRemoveCall(NodeTraversal t,
Node n,
Node parent)
Removes a method call if
StripCode.Strip.isMethodOrCtorCallThatTriggersRemoval(com.google.javascript.jscomp.NodeTraversal, com.google.javascript.rhino.Node, com.google.javascript.rhino.Node)
indicates that it should be removed. |
(package private) void |
StripCode.Strip.maybeRemoveReferenceToRemovedVariable(NodeTraversal t,
Node n,
Node parent)
Removes a reference if it is a reference to a removed variable.
|
private void |
DisambiguatePrivateProperties.maybeRename(Node n) |
private Node |
PeepholeMinimizeConditions.maybeReplaceChildWithNumber(Node n,
Node parent,
int num)
Replaces a node with a number node if the new number node is not equivalent
to the current node.
|
private void |
ExpandJqueryAliases.maybeReplaceJqueryPrototypeAlias(Node n) |
private JSType |
CheckEventfulObjectDisposal.maybeReturnDisposedType(Node n,
boolean checkDispose) |
private void |
ClosureRewriteClass.maybeRewriteClassDefinition(Node n) |
private void |
ClosureRewriteClass.maybeRewriteClassDefinition(Node n,
Node target,
Node value) |
private void |
PhaseOptimizer.maybeSanityCheck(Node externs,
Node root)
Runs the sanity check if it is available.
|
private void |
NewTypeInference.maybeSetTypeI(Node n,
JSType t) |
private void |
SubstituteEs6Syntax.maybeSimplifyArrowFunctionBody(Node arrowFunction,
Node body)
If possible, replace functions of the form ()=>{ return x; } with ()=>x
|
private boolean |
InlineProperties.GatherCandidates.maybeStoreCandidateValue(JSType type,
java.lang.String propName,
Node value) |
(package private) static boolean |
NodeUtil.mayBeString(Node n) |
(package private) static boolean |
NodeUtil.mayBeString(Node n,
boolean useType)
Return if the node is possibly a string.
|
private void |
ClosureRewriteModule.maybeUpdateExportDeclToNode(NodeTraversal t,
Node target,
Node value) |
private void |
ClosureRewriteModule.maybeUpdateExportObjectDecl(NodeTraversal t,
Node n)
For exports like "exports = {prop: value}" update the declarations to enforce
|
private void |
Es6TypedToEs6Converter.maybeVisitColonType(Node n,
Node jsDocNode) |
private void |
GlobalTypeInfo.ProcessScope.maybeWarnFunctionDeclaration(Node funNode,
DeclaredFunctionType funType) |
private boolean |
GlobalTypeInfo.CollectNamedTypes.mayCreateFunctionNamespace(Node qnameNode) |
private boolean |
GlobalTypeInfo.CollectNamedTypes.mayCreateWindowNamespace(Node qnameNode) |
(package private) static boolean |
NodeUtil.mayEffectMutableState(Node n)
Returns true if the node may create new mutable state, or change existing
state.
|
(package private) boolean |
AbstractPeepholeOptimization.mayEffectMutableState(Node n) |
(package private) static boolean |
NodeUtil.mayEffectMutableState(Node n,
AbstractCompiler compiler) |
(package private) static boolean |
FunctionArgumentInjector.mayHaveConditionalCode(Node n)
We consider an expression trivial if it doesn't contain a conditional expression or
a function.
|
static boolean |
NodeUtil.mayHaveSideEffects(Node n)
Returns true if the node which may have side effects when executed.
|
(package private) boolean |
AbstractPeepholeOptimization.mayHaveSideEffects(Node n) |
static boolean |
NodeUtil.mayHaveSideEffects(Node n,
AbstractCompiler compiler) |
private JSType |
GlobalTypeInfo.ProcessScope.mayInferFromRhsIfConst(Node lvalueNode) |
static boolean |
ControlFlowAnalysis.mayThrowException(Node n)
Determines if the subtree might throw an exception.
|
private boolean |
NewTypeInference.mayWarnAboutBadIObjectIndex(Node n,
JSType iobjectType,
JSType foundIndexType,
JSType requiredIndexType) |
private boolean |
NewTypeInference.mayWarnAboutConst(Node n) |
private boolean |
NewTypeInference.mayWarnAboutConstProp(Node propAccess,
JSType recvType,
QualifiedName pname) |
private boolean |
NewTypeInference.mayWarnAboutDictPropAccess(Node obj,
JSType type) |
private boolean |
GlobalTypeInfo.ProcessScope.mayWarnAboutExistingProp(RawNominalType classType,
java.lang.String pname,
Node propCreationNode,
JSType typeInJsdoc) |
private boolean |
NewTypeInference.mayWarnAboutGlobalThis(Node thisExpr,
NTIScope currentScope) |
private boolean |
NewTypeInference.mayWarnAboutInexistentProp(Node propAccessNode,
JSType recvType,
QualifiedName propQname,
TypeEnv env) |
private void |
GlobalTypeInfo.ProcessScope.mayWarnAboutInterfacePropInit(RawNominalType rawType,
Node initializer) |
(package private) boolean |
GlobalTypeInfo.ProcessScope.mayWarnAboutNoInit(Node constExpr) |
private boolean |
NewTypeInference.mayWarnAboutNonObject(Node receiver,
JSType recvType,
JSType specializedType) |
private NewTypeInference.EnvTypePair |
NewTypeInference.mayWarnAboutNullableReferenceAndTighten(Node obj,
JSType recvType,
JSType maybeSpecType,
TypeEnv inEnv) |
private boolean |
NewTypeInference.mayWarnAboutPropCreation(QualifiedName pname,
Node getProp,
JSType recvType) |
private boolean |
NewTypeInference.mayWarnAboutStructPropAccess(Node obj,
JSType type) |
private JSDocInfo |
ClosureRewriteClass.mergeJsDocFor(ClosureRewriteClass.ClassDefinition cls,
Node associatedNode) |
private static boolean |
PeepholeCollectPropertyAssignments.mightContainForwardReference(Node node,
java.lang.String varName) |
private void |
TypeValidator.mismatch(Node n,
java.lang.String msg,
JSType found,
JSType required) |
private void |
TypeValidator.mismatch(NodeTraversal t,
Node n,
java.lang.String msg,
JSType found,
JSType required)
Report a type mismatch
|
private void |
TypeValidator.mismatch(NodeTraversal t,
Node n,
java.lang.String msg,
JSType found,
JSTypeNative required) |
private static void |
MinimizeExitPoints.moveAllFollowing(Node start,
Node srcParent,
Node destParent)
Move all the child nodes following start in srcParent to the end of
destParent's child list.
|
private void |
TransformAMDToCJSModule.TransformAMDModulesCallback.moveCallbackContentToTopLevel(Node defineParent,
Node script,
Node callbackBlock)
Moves the statements in the callback to be direct children of the
current script.
|
private void |
ClosureRewriteModule.moveChildrenAfter(Node fromNode,
Node targetBlock) |
(package private) void |
ExpressionDecomposer.moveExpression(Node expression)
Extract the specified expression from its parent expression.
|
private void |
Normalize.NormalizeStatements.moveNamedFunctions(Node functionBody)
Move all the functions that are valid at the execution of the first
statement of the function to the beginning of the function definition.
|
private void |
CreateSyntheticBlocks.moveSiblingExclusive(Node src,
Node dest,
Node start,
Node end)
Move the Nodes between start and end from the source block to the
destination block.
|
private static void |
NodeUtil.mtocHelper(java.util.Map<Node,Node> map,
Node main,
Node clone) |
(package private) Node |
FunctionToBlockMutator.mutate(java.lang.String fnName,
Node fnNode,
Node callNode,
java.lang.String resultName,
boolean needsDefaultResult,
boolean isCallInLoop) |
private static java.lang.String |
DotFormatter.name(Node n) |
private void |
AnonymousFunctionNamingCallback.nameClassMethods(Node classMembersNode,
java.lang.String className) |
(package private) boolean |
StripCode.Strip.nameIncludesFieldNameToStrip(Node n) |
private void |
AnonymousFunctionNamingCallback.nameObjectLiteralMethods(Node objectLiteral,
java.lang.String context) |
private FlowScope |
TypeInference.narrowScope(FlowScope scope,
Node node,
JSType narrowed) |
(package private) static Node |
NodeUtil.newCallNode(Node callTarget,
Node... parameters)
A new CALL node with the "FREE_CALL" set based on call target.
|
(package private) static Node |
NodeUtil.newCallNode(Node callTarget,
Node... parameters)
A new CALL node with the "FREE_CALL" set based on call target.
|
(package private) static Node |
NodeUtil.newExpr(Node child)
Creates an EXPR_RESULT.
|
(package private) static boolean |
NodeUtil.newHasLocalResult(Node n) |
private Node |
CoverageInstrumentationCallback.newHeaderNode(NodeTraversal traversal,
Node srcref) |
private Node |
CoverageInstrumentationCallback.newInstrumentationNode(NodeTraversal traversal,
Node node)
Creates and return a new instrumentation node.
|
(package private) static Node |
NodeUtil.newName(AbstractCompiler compiler,
java.lang.String name,
Node srcref)
Creates a new node representing an *existing* name, copying over the source
location information from the basis node.
|
(package private) static Node |
NodeUtil.newName(AbstractCompiler compiler,
java.lang.String name,
Node basisNode,
java.lang.String originalName)
Creates a new node representing an *existing* name, copying over the source
location information from the basis node and assigning the given original
name to the node.
|
static Node |
NodeUtil.newPropertyAccess(AbstractCompiler compiler,
Node context,
java.lang.String name)
Creates a property access on the
context tree. |
(package private) static Node |
NodeUtil.newQName(AbstractCompiler compiler,
java.lang.String name,
Node basisNode,
java.lang.String originalName)
Creates a node representing a qualified name, copying over the source
location information from the basis node and assigning the given original
name to the node.
|
static Node |
NodeUtil.newQNameDeclaration(AbstractCompiler compiler,
java.lang.String name,
Node value,
JSDocInfo info)
Creates a node representing a qualified name.
|
private Node |
InstrumentFunctions.InstrumentReturns.newReportFunctionExitNode(Node infoNode,
Node returnRhs) |
(package private) static Node |
NodeUtil.newUndefinedNode(Node srcReferenceNode)
Create a node for an empty result expression:
"void 0"
|
(package private) static Node |
NodeUtil.newVarNode(java.lang.String name,
Node value)
Create a VAR node containing the given name and initial value expression.
|
private static boolean |
SideEffectsAnalysis.nodeHasAncestor(Node node,
Node possibleAncestor)
Returns true if
possibleAncestor is an ancestor ofnode . |
private static boolean |
SideEffectsAnalysis.nodeHasCall(Node node)
Returns true if a node has a CALL or a NEW descendant.
|
void |
AstChangeProxy.ChangeListener.nodeRemoved(Node node)
Notifies clients about node removals.
|
void |
NameAnalyzer.RemoveListener.nodeRemoved(Node n) |
private static boolean |
SideEffectsAnalysis.nodesHaveSameControlFlow(Node node1,
Node node2)
Returns true if the two nodes have the same control flow properties,
that is, is node1 be executed every time node2 is executed and vice versa?
|
(package private) static boolean |
NodeUtil.nodeTypeMayHaveSideEffects(Node n)
Returns true if the current node's type implies side effects.
|
(package private) boolean |
AbstractPeepholeOptimization.nodeTypeMayHaveSideEffects(Node n)
Returns true if the current node's type implies side effects.
|
(package private) static boolean |
NodeUtil.nodeTypeMayHaveSideEffects(Node n,
AbstractCompiler compiler) |
private static Node |
DartSuperAccessorsPass.normalizeAssignmentOp(Node n)
Transforms `a += b` to `a = a + b`.
|
private void |
PrepareAst.normalizeBlocks(Node n)
Add blocks to IF, WHILE, DO, etc.
|
private void |
Normalize.NormalizeStatements.normalizeLabels(Node n)
Limit the number of special cases where LABELs need to be handled.
|
private void |
PrepareAst.normalizeNodeTypes(Node n)
Covert EXPR_VOID to EXPR_RESULT to simplify the rest of the code.
|
(package private) static void |
Normalize.normalizeSyntheticCode(AbstractCompiler compiler,
Node js,
java.lang.String prefix) |
private void |
AstChangeProxy.notifyOfRemoval(Node node)
Notifies listeners about a removal.
|
(package private) static Node |
NodeUtil.numberNode(double value,
Node srcref) |
private static java.util.List<ClosureRewriteClass.MemberDefinition> |
ClosureRewriteClass.objectLitToList(Node objlit) |
void |
VarCheck.RedeclarationCheckHandler.onRedeclaration(Scope s,
java.lang.String name,
Node n,
CompilerInput input) |
void |
SyntacticScopeCreator.RedeclarationHandler.onRedeclaration(Scope s,
java.lang.String name,
Node n,
CompilerInput input) |
void |
SyntacticScopeCreator.DefaultRedeclarationHandler.onRedeclaration(Scope s,
java.lang.String name,
Node n,
CompilerInput input) |
void |
Normalize.DuplicateDeclarationHandler.onRedeclaration(Scope s,
java.lang.String name,
Node n,
CompilerInput input)
Remove duplicate VAR declarations encountered discovered during
scope creation.
|
private void |
OptimizeParameters.optimizeCallSite(SimpleDefinitionFinder defFinder,
java.util.List<OptimizeParameters.Parameter> parameters,
Node call) |
private void |
OptimizeParameters.optimizeFunctionDefinition(java.util.List<OptimizeParameters.Parameter> parameters,
Node function) |
(package private) Node |
StatementFusion.optimizeSubtree(Node n) |
Node |
PeepholeMinimizeConditions.optimizeSubtree(Node node)
Tries to apply our various peephole minimizations on the passed in node.
|
Node |
PeepholeSubstituteAlternateSyntax.optimizeSubtree(Node node)
Tries apply our various peephole minimizations on the passed in node.
|
(package private) Node |
ExploitAssigns.optimizeSubtree(Node subtree) |
(package private) Node |
PeepholeReplaceKnownMethods.optimizeSubtree(Node subtree) |
(package private) Node |
PeepholeRemoveDeadCode.optimizeSubtree(Node subtree) |
(package private) abstract Node |
AbstractPeepholeOptimization.optimizeSubtree(Node subtree)
Given a node to optimize and a traversal, optimize the node.
|
(package private) Node |
PeepholeSimplifyRegExp.optimizeSubtree(Node subtree) |
(package private) Node |
PeepholeFoldConstants.optimizeSubtree(Node subtree) |
(package private) Node |
PeepholeCollectPropertyAssignments.optimizeSubtree(Node subtree) |
(package private) Node |
ReorderConstantExpression.optimizeSubtree(Node subtree) |
private static void |
JsMessageVisitor.parseMessageTextNode(JsMessage.Builder builder,
Node node)
Appends the message parts in a JS message value extracted from the given
text node.
|
private com.google.common.collect.ImmutableList<PolymerPass.MemberDefinition> |
PolymerClassRewriter.parseReadOnlyProperties(PolymerClassDefinition cls,
Node block)
Generates the _set* setters for readonly properties and appends them to the given block.
|
(package private) void |
TypedScopeCreator.patchGlobalScope(TypedScope globalScope,
Node scriptRoot)
Patches a given global scope by removing variables previously declared in
a script and re-traversing a new version of that script.
|
(package private) void |
PassConfig.patchGlobalTypedScope(AbstractCompiler compiler,
Node scriptRoot)
Regenerates the top scope potentially only for a sub-tree of AST and then
copies information for the old global scope.
|
private Node |
PeepholeFoldConstants.performArithmeticOp(int opType,
Node left,
Node right)
Try to fold arithmetic binary operators
|
private Node |
PeepholeMinimizeConditions.performConditionSubstitutions(Node n)
Try to minimize the given condition by applying local substitutions.
|
private static JSType |
NewTypeInference.pickReqObjType(Node expr) |
private void |
Es6TypedToEs6Converter.popNamespace(Node n,
Node parent) |
(package private) abstract void |
AbstractCompiler.prepareAst(Node root)
Normalizes the types of AST nodes in the given tree, and
annotates any nodes to which the coding convention applies so that passes
can read the annotations instead of using the coding convention.
|
(package private) void |
Compiler.prepareAst(Node root) |
private void |
TemplateAstMatcher.prepTemplatePlaceholders(Node fn)
Build parameter and local information for the template and replace
the references in the template 'fn' with placeholder nodes use to
facility matching.
|
(package private) void |
InstrumentFunctions.InstrumentReturns.process(Node function) |
void |
DisambiguateProperties.process(Node externs,
Node root) |
void |
RecordFunctionInformation.process(Node externs,
Node root) |
void |
CollapseVariableDeclarations.process(Node externs,
Node root) |
void |
NewTypeInference.process(Node externs,
Node root) |
void |
ProcessCommonJSModules.process(Node externs,
Node root) |
void |
SymbolTable.PropertyRefCollector.process(Node externs,
Node root) |
void |
SymbolTable.ThisRefCollector.process(Node externs,
Node root) |
void |
PeepholeOptimizationsPass.process(Node externs,
Node root) |
void |
JsMessageVisitor.process(Node externs,
Node root) |
void |
CheckUnusedPrivateProperties.process(Node externs,
Node root) |
void |
TransformAMDToCJSModule.process(Node externs,
Node root) |
void |
NameAnonymousFunctionsMapped.process(Node externs,
Node root) |
void |
MarkNoSideEffectCalls.process(Node externs,
Node root) |
void |
ConstCheck.process(Node externs,
Node root) |
void |
PrepareAst.process(Node externs,
Node root) |
void |
InferJSDocInfo.process(Node externs,
Node root) |
void |
ProcessTweaks.process(Node externs,
Node root) |
void |
CheckRequiresForConstructors.process(Node externs,
Node root)
Uses Collections of new and goog.require nodes to create a compiler warning
for each new class name without a corresponding goog.require().
|
void |
AngularPass.process(Node externs,
Node root) |
void |
InlineVariables.process(Node externs,
Node root) |
void |
InferConsts.process(Node externs,
Node js) |
void |
NameReferenceGraphConstruction.process(Node externs,
Node root) |
void |
Es6RewriteBlockScopedDeclaration.process(Node externs,
Node root) |
void |
ImplicitNullabilityCheck.process(Node externs,
Node root) |
void |
RenameVars.process(Node externs,
Node root) |
void |
MoveFunctionDeclarations.process(Node externs,
Node root) |
void |
OptimizeCalls.process(Node externs,
Node root) |
void |
ReplaceIdGenerators.process(Node externs,
Node root) |
void |
SubstituteEs6Syntax.process(Node externs,
Node root) |
void |
ConvertToDottedProperties.process(Node externs,
Node root) |
void |
ClosureCheckModule.process(Node externs,
Node root) |
void |
PolymerPass.process(Node externs,
Node root) |
void |
ClosureRewriteClass.process(Node externs,
Node root) |
void |
GatherRawExports.process(Node externs,
Node root) |
void |
CheckRegExp.process(Node externs,
Node root) |
void |
ErrorPass.process(Node externs,
Node root) |
void |
InlineProperties.process(Node externs,
Node root) |
void |
ReferenceCollectingCallback.process(Node externs,
Node root)
Convenience method for running this pass over a tree with this
class as a callback.
|
void |
J2clPropertyInlinerPass.process(Node externs,
Node root) |
void |
TypedScopeCreator.FirstOrderFunctionAnalyzer.process(Node externs,
Node root) |
void |
CollapseAnonymousFunctions.process(Node externs,
Node root) |
void |
MinimizeExitPoints.process(Node externs,
Node root) |
void |
CoalesceVariableNames.process(Node externs,
Node root) |
void |
CheckJSDoc.process(Node externs,
Node root) |
void |
CoverageInstrumentationPass.process(Node externsNode,
Node rootNode) |
void |
Es6ExternsCheck.process(Node externs,
Node root) |
void |
InlineObjectLiterals.process(Node externs,
Node root) |
void |
MakeDeclaredNamesUnique.ContextualRenameInverter.process(Node externs,
Node js) |
void |
J2clPass.process(Node externs,
Node root) |
void |
GatherExternProperties.process(Node externs,
Node root) |
void |
CompilerPass.process(Node externs,
Node root)
Process the JS with root node root.
|
void |
RenameProperties.process(Node externs,
Node root) |
void |
StrictModeCheck.process(Node externs,
Node root) |
void |
RewriteBindThis.process(Node externs,
Node root) |
void |
RescopeGlobalSymbols.process(Node externs,
Node root) |
void |
ControlFlowAnalysis.process(Node externs,
Node root) |
void |
InstrumentFunctions.process(Node externs,
Node root) |
void |
RemoveUnusedVars.process(Node externs,
Node root)
Traverses the root, removing all unused variables.
|
void |
CheckConformance.process(Node externs,
Node root) |
void |
OptimizeArgumentsArray.process(Node externs,
Node root) |
void |
ChainCalls.process(Node externs,
Node root) |
void |
ProcessDefines.process(Node externs,
Node root) |
void |
ExternExportsPass.process(Node externs,
Node root) |
void |
CombinedCompilerPass.process(Node externs,
Node root) |
void |
Es6SplitVariableDeclarations.process(Node externs,
Node root) |
void |
Es6RewriteGenerators.process(Node externs,
Node root) |
void |
GenerateExports.process(Node externs,
Node root) |
void |
ScopedAliases.process(Node externs,
Node root) |
void |
FlowSensitiveInlineVariables.process(Node externs,
Node root) |
void |
ExpandJqueryAliases.process(Node externs,
Node root) |
void |
FieldCleanupPass.process(Node externs,
Node root) |
void |
ReplaceStrings.process(Node externs,
Node root) |
void |
UnreachableCodeElimination.process(Node externs,
Node toplevel) |
void |
Denormalize.process(Node externs,
Node root) |
void |
AstValidator.process(Node externs,
Node root) |
void |
JsdocToEs6TypedConverter.process(Node externs,
Node root) |
void |
Es6TypedToEs6Converter.process(Node externs,
Node scriptRoot) |
void |
ObjectPropertyStringPreprocess.process(Node externs,
Node root) |
void |
Es6ConvertSuper.process(Node externs,
Node root) |
void |
RenameLabels.process(Node externs,
Node root) |
void |
DeadAssignmentsElimination.process(Node externs,
Node root) |
void |
InlineFunctions.process(Node externs,
Node root) |
void |
ClosureRewriteModule.process(Node externs,
Node root) |
void |
InlineAliases.process(Node externs,
Node root) |
void |
InjectEs6RuntimeLibrary.process(Node externs,
Node root) |
void |
CheckSideEffects.process(Node externs,
Node root) |
void |
CheckSideEffects.StripProtection.process(Node externs,
Node root) |
void |
PhaseOptimizer.process(Node externs,
Node root)
Run all the passes in the optimizer.
|
void |
PhaseOptimizer.NamedPass.process(Node externs,
Node root) |
void |
PhaseOptimizer.Loop.process(Node externs,
Node root) |
void |
AliasStrings.process(Node externs,
Node root) |
void |
DisambiguatePrivateProperties.process(Node externs,
Node root) |
void |
FunctionRewriter.process(Node externs,
Node root) |
void |
DartSuperAccessorsPass.process(Node externs,
Node root) |
void |
CollectFileOverviewVisibility.process(Node externs,
Node root) |
void |
RemoveUnusedClassProperties.process(Node externs,
Node root) |
void |
GlobalTypeInfo.process(Node externs,
Node root) |
void |
CrossModuleCodeMotion.process(Node externs,
Node root) |
void |
AmbiguateProperties.process(Node externs,
Node root) |
void |
ObjectLitAssignmentShortening.process(Node externs,
Node root) |
void |
SideEffectsAnalysis.process(Node externs,
Node root) |
void |
CrossModuleMethodMotion.process(Node externRoot,
Node root) |
void |
FunctionNames.process(Node externs,
Node root) |
void |
SimpleDefinitionFinder.process(Node externs,
Node source) |
void |
ClosureOptimizePrimitives.process(Node externs,
Node root) |
void |
NameAnonymousFunctions.process(Node externs,
Node root) |
void |
CheckEventfulObjectDisposal.process(Node externs,
Node root) |
void |
CreateSyntheticBlocks.process(Node externs,
Node root) |
void |
CallGraph.process(Node externsRoot,
Node jsRoot)
Builds a call graph for the given externsRoot and jsRoot.
|
void |
VariableVisibilityAnalysis.process(Node externs,
Node root)
Determines the visibility class for each variable in root.
|
void |
DevirtualizePrototypeMethods.process(Node externs,
Node root) |
void |
NameAnalyzer.process(Node externs,
Node root) |
void |
ObjectPropertyStringPostprocess.process(Node externs,
Node root) |
void |
Es6RewriteDestructuring.process(Node externs,
Node root) |
void |
LineNumberCheck.process(Node externs,
Node root) |
void |
SanityCheck.process(Node externs,
Node root) |
void |
DefaultPassConfig.GlobalTypeResolver.process(Node externs,
Node root) |
void |
DefaultPassConfig.ClearTypedScope.process(Node externs,
Node root) |
void |
ExportTestFunctions.process(Node externs,
Node root) |
void |
ConstParamCheck.process(Node externs,
Node root) |
void |
StripCode.process(Node externs,
Node root) |
void |
CollapseProperties.process(Node externs,
Node root) |
void |
GlobalVarReferenceMap.GlobalVarRefCleanupPass.process(Node externs,
Node root) |
void |
TypeCheck.process(Node externsRoot,
Node jsRoot)
Main entry point for this phase of processing.
|
void |
Es6ToEs3ClassSideInheritance.process(Node externs,
Node root) |
void |
TypeInferencePass.process(Node externsRoot,
Node jsRoot)
Main entry point for type inference when running over the whole tree.
|
void |
VarCheck.process(Node externs,
Node root) |
void |
CheckMissingGetCssName.process(Node externs,
Node root) |
void |
OptimizeParameters.process(Node externs,
Node root) |
void |
DeclaredGlobalExternsOnWindow.process(Node externs,
Node root) |
void |
Es6RewriteArrowFunction.process(Node externs,
Node root) |
void |
ClosureCodeRemoval.process(Node externs,
Node root) |
void |
ShadowVariables.process(Node externs,
Node root) |
void |
ExtractPrototypeMemberDeclarations.process(Node externs,
Node root) |
void |
CleanupPasses.MemoizedScopeCleanupPass.process(Node externs,
Node root) |
void |
RewritePolyfills.process(Node externs,
Node root) |
void |
ReplaceCssNames.process(Node externs,
Node root) |
void |
CheckAccessControls.process(Node externs,
Node root) |
void |
VariableReferenceCheck.process(Node externs,
Node root) |
void |
Normalize.process(Node externs,
Node root) |
void |
Normalize.PropagateConstantAnnotationsOverVars.process(Node externs,
Node root) |
void |
Normalize.VerifyConstants.process(Node externs,
Node root) |
void |
PureFunctionIdentifier.process(Node externsAst,
Node srcAst) |
void |
PureFunctionIdentifier.Driver.process(Node externs,
Node root) |
void |
Es6ToEs3Converter.process(Node externs,
Node root) |
void |
Es6RenameVariablesInParamLists.process(Node externs,
Node root) |
void |
MethodCompilerPass.process(Node externs,
Node root) |
void |
CheckProvides.process(Node externs,
Node root) |
void |
RuntimeTypeCheck.process(Node externs,
Node root) |
void |
ProcessClosurePrimitives.process(Node externs,
Node root) |
void |
AnalyzePrototypeProperties.process(Node externRoot,
Node root) |
void |
OptimizeReturns.process(Node externs,
Node root) |
void |
CheckDebuggerStatement.process(Node externs,
Node root) |
void |
RemoveUnusedPrototypeProperties.process(Node externRoot,
Node root) |
void |
CheckGlobalNames.process(Node externs,
Node root) |
void |
OptimizeCalls.CallGraphCompilerPass.process(Node externs,
Node root,
SimpleDefinitionFinder definitions) |
void |
RemoveUnusedVars.process(Node externs,
Node root,
SimpleDefinitionFinder defFinder) |
void |
DevirtualizePrototypeMethods.process(Node externs,
Node root,
SimpleDefinitionFinder definitions) |
void |
OptimizeParameters.process(Node externs,
Node root,
SimpleDefinitionFinder definitions) |
void |
OptimizeReturns.process(Node externs,
Node root,
SimpleDefinitionFinder definitions) |
private void |
ProcessClosurePrimitives.processAddDependency(Node n,
Node parent)
Process a goog.addDependency() call and record any forward declarations.
|
private void |
ProcessClosurePrimitives.processBaseClassCall(NodeTraversal t,
Node n)
Processes the base class call.
|
(package private) boolean |
GatherSideEffectSubexpressionsCallback.processConstructorCall(Node node)
Processes a NEW expression.
|
private boolean |
ProcessDefines.CollectDefines.processDefineAssignment(NodeTraversal t,
java.lang.String name,
Node value,
Node valueParent)
Tracks the given define.
|
private void |
ProcessClosurePrimitives.processDefineCall(NodeTraversal t,
Node n,
Node parent)
Handles a goog.define call.
|
private void |
CodeGenerator.processEnd(Node n,
CodeGenerator.Context context) |
private void |
ProcessCommonJSModules.ProcessCommonJsModulesCallback.processExports(Node script,
java.lang.String moduleName)
Process all references to module.exports and exports.
|
void |
ProcessEs6Modules.processFile(Node root) |
NTIScope |
NewTypeInference.processForTesting(Node externs,
Node root) |
TypedScope |
TypeCheck.processForTesting(Node externsRoot,
Node jsRoot)
Main entry point of this phase for testing code.
|
private void |
ProcessClosurePrimitives.processForwardDeclare(NodeTraversal t,
Node n,
Node parent)
Process a goog.forwardDeclare() call and record the specified forward
declaration.
|
(package private) boolean |
GatherSideEffectSubexpressionsCallback.processFunctionCall(Node node)
Processes a CALL expression.
|
private boolean |
AnalyzePrototypeProperties.ProcessProperties.processGlobalFunctionDeclaration(NodeTraversal t,
Node nameNode,
Var v)
Processes a NAME node to see if it's a global function declaration.
|
(package private) boolean |
GatherSideEffectSubexpressionsCallback.processHook(Node node)
Processes a HOOK expression.
|
private void |
ProcessClosurePrimitives.processInheritsCall(Node n)
Processes the goog.inherits call.
|
(package private) void |
GlobalTypeInfo.ProcessScope.processLendsNode(Node objlit) |
(package private) void |
GlobalTypeInfo.ProcessScope.processLendsToNamespace(QualifiedName lendsQname,
java.lang.String lendsName,
Node objlit) |
(package private) void |
JsMessageVisitor.processMessageFallback(Node callNode,
JsMessage message1,
JsMessage message2)
Processes the goog.getMsgWithFallback primitive.
|
(package private) void |
ReplaceMessages.processMessageFallback(Node callNode,
JsMessage message1,
JsMessage message2) |
private void |
Compiler.processNewScript(JsAst ast,
Node originalRoot) |
private java.lang.String |
AnalyzePrototypeProperties.ProcessProperties.processNonFunctionPrototypeAssign(Node n,
Node parent)
If this is a non-function prototype assign, return the prop name.
|
private void |
ClosureOptimizePrimitives.processObjectCreateCall(Node callNode)
Converts all of the given call nodes to object literals that are safe to
do so.
|
private void |
ClosureOptimizePrimitives.processObjectCreateSetCall(Node callNode)
Converts all of the given call nodes to object literals that are safe to
do so.
|
(package private) void |
TypedScopeCreator.AbstractScopeBuilder.processObjectLitProperties(Node objLit,
ObjectType objLitType,
boolean declareOnOwner)
Process an object literal and all the types on it.
|
private void |
MethodCompilerPass.GatherSignatures.processPrototypeParent(NodeTraversal t,
Node n)
Processes the parent of a GETPROP prototype, which can either be
another GETPROP (in the case of Foo.prototype.bar), or can be
an assignment (in the case of Foo.prototype = ...).
|
private boolean |
AnalyzePrototypeProperties.ProcessProperties.processPrototypeRef(NodeTraversal t,
Node ref)
Processes the GETPROP of prototype, which can either be under
another GETPROP (in the case of Foo.prototype.bar), or can be
under an assignment (in the case of Foo.prototype = ...).
|
private void |
ProcessClosurePrimitives.processProvideCall(NodeTraversal t,
Node n,
Node parent)
Handles a goog.provide call.
|
private void |
ProcessClosurePrimitives.processProvideFromPreviousPass(NodeTraversal t,
java.lang.String name,
Node parent)
Processes the output of processed-provide from a previous pass.
|
private void |
GlobalTypeInfo.CollectNamedTypes.processQualifiedDefinition(Node qnameNode) |
private void |
ProcessClosurePrimitives.processRequireCall(NodeTraversal t,
Node n,
Node parent)
Handles a goog.require call.
|
private void |
ProcessClosurePrimitives.processSetCssNameMapping(NodeTraversal t,
Node n,
Node parent)
Processes a call to goog.setCssNameMapping().
|
(package private) boolean |
GatherSideEffectSubexpressionsCallback.processShortCircuitExpression(Node node)
Processes an AND or OR expression.
|
private void |
ReplaceCssNames.Traversal.processStringNode(NodeTraversal t,
Node n)
Processes a string argument to goog.getCssName().
|
private TypeEnv |
NewTypeInference.processVarDeclaration(Node nameNode,
TypeEnv inEnv)
Processes a single variable declaration in a VAR statement.
|
private static boolean |
CheckAccessControls.propertyIsDeclaredButNotPrivate(Node getprop,
Node parent) |
private void |
NodeTraversal.pushScope(Node node)
Creates a new scope (e.g.
|
(package private) boolean |
StripCode.Strip.qualifiedNameBeginsWithStripType(Node n)
Gets whether a qualified name begins with a strip name.
|
(package private) static void |
PolymerPassStaticUtils.quoteListenerAndHostAttributeKeys(Node objLit)
Makes sure that the keys for listeners and hostAttributes blocks are quoted to avoid renaming.
|
private void |
ClosureRewriteModule.recordAndUpdateModule(NodeTraversal t,
Node call) |
boolean |
ProcessDefines.DefineInfo.recordAssignment(Node value)
Records an assigned value.
|
private void |
NameAnalyzer.FindDependencyScopes.recordAssignment(NodeTraversal t,
Node n,
Node recordNode) |
private NameReferenceGraph.Name |
NameReferenceGraphConstruction.Traversal.recordClassConstructorOrInterface(java.lang.String name,
FunctionType type,
Node n,
Node rhs)
Creates the name in the graph if it does not already exist.
|
private void |
NameAnalyzer.FindDependencyScopes.recordConsumers(NodeTraversal t,
Node n,
Node recordNode) |
private void |
NameAnalyzer.FindDependencyScopes.recordDepScope(Node node,
NameAnalyzer.NameInformation name)
Defines a dependency scope.
|
private NameReferenceGraph.Name |
NameReferenceGraphConstruction.Traversal.recordPrototypePropDefinition(Node qName,
JSType type,
Node assign) |
private void |
NameReferenceGraphConstruction.Traversal.recordPrototypePropUse(Node n) |
private void |
NameAnalyzer.FindDeclarationsAndSetters.recordPrototypeSet(java.lang.String className,
java.lang.String prototypeProperty,
Node node)
Records the assignment to a prototype property of a global name,
if possible.
|
private void |
RenameVars.recordPseudoName(Node n) |
private void |
ClosureRewriteModule.recordRequire(NodeTraversal t,
Node call) |
private void |
NameAnalyzer.FindDeclarationsAndSetters.recordSet(java.lang.String name,
Node node)
Records the assignment of a value to a global name.
|
private NameReferenceGraph.Name |
NameReferenceGraphConstruction.Traversal.recordStaticNameDefinition(java.lang.String name,
JSType type,
Node n,
Node rValue) |
private NameReferenceGraph.Reference |
NameReferenceGraphConstruction.Traversal.recordStaticNameUse(Node n) |
private void |
NameReferenceGraphConstruction.Traversal.recordUnknownUse(Node n) |
private void |
TypeInference.redeclareSimpleVar(FlowScope scope,
Node nameNode,
JSType varType) |
(package private) static void |
NodeUtil.redeclareVarsInsideBranch(Node branch)
Given a node tree, finds all the VAR declarations in that tree that are
not in an inner scope.
|
(package private) abstract Node |
FunctionRewriter.Reducer.reduce(Node node) |
Node |
FunctionRewriter.EmptyFunctionReducer.reduce(Node node) |
Node |
FunctionRewriter.IdentityReducer.reduce(Node node) |
Node |
FunctionRewriter.ReturnConstantReducer.reduce(Node node) |
Node |
FunctionRewriter.GetterReducer.reduce(Node node) |
Node |
FunctionRewriter.SetterReducer.reduce(Node node) |
private Node |
PeepholeSubstituteAlternateSyntax.reduceSubstractionAssignment(Node n) |
private Node |
PeepholeSubstituteAlternateSyntax.reduceTrueFalse(Node n) |
(package private) static boolean |
NodeUtil.referencesSuper(Node n)
Returns true if the current scope contains references to the 'super' keyword.
|
(package private) static boolean |
NodeUtil.referencesThis(Node n)
Returns true if the shallow scope contains references to 'this' keyword
|
(package private) void |
PassConfig.regenerateGlobalTypedScope(AbstractCompiler compiler,
Node root)
Regenerates the top scope from scratch.
|
private void |
ProcessClosurePrimitives.registerAnyProvidedPrefixes(java.lang.String ns,
Node node,
JSModule module)
Registers ProvidedNames for prefix namespaces if they haven't
already been defined.
|
private void |
PeepholeRemoveDeadCode.removeCase(Node switchNode,
Node caseNode)
Remove the case from the switch redeclaring any variables declared in it.
|
static void |
NodeUtil.removeChild(Node parent,
Node node)
Safely remove children while maintaining a valid node structure.
|
(package private) void |
AstChangeProxy.removeChild(Node parent,
Node node)
Removes a node from the parent's child list.
|
private static Node |
CreateSyntheticBlocks.removeChildAfter(Node parent,
Node siblingBefore)
Like removeChildAfter, the firstChild is removed
|
private void |
UnreachableCodeElimination.EliminationPass.removeDeadExprStatementSafely(Node n) |
private void |
Normalize.removeDuplicateDeclarations(Node externs,
Node root)
Remove duplicate VAR declarations.
|
private void |
UnreachableCodeElimination.EliminationPass.removeNode(Node n) |
private void |
PolymerClassRewriter.removePropertyDocs(Node objLit)
Remove all JSDocs from properties of a class definition
|
(package private) void |
SimpleDefinitionFinder.removeReferences(Node node)
Traverse a node and its children and remove any references to from
the structures.
|
private static void |
CoalesceVariableNames.removeVarDeclaration(Node name)
Tries to remove variable declaration if the variable has been coalesced
with another variable that has already been declared.
|
(package private) void |
StripCode.Strip.removeVarDeclarationsByNameOrRvalue(NodeTraversal t,
Node n,
Node parent)
Removes declarations of any variables whose names are strip names or
whose whose r-values are static method calls on strip types.
|
private Node |
DartSuperAccessorsPass.renameProperty(Node propertyName)
Wraps a property string in a JSCompiler_renameProperty call.
|
private void |
Es6RenameReferences.renameReference(NodeTraversal t,
Node n) |
private static Node |
DartSuperAccessorsPass.replace(Node original,
Node replacement) |
private Node |
ReplaceMessages.replaceCallNode(JsMessage message,
Node callNode)
Replaces a CALL node with an inlined message value.
|
private Node |
ReplaceStrings.replaceExpression(NodeTraversal t,
Node expr,
Node parent)
Replaces a string expression with a short encoded string expression.
|
private void |
ProcessClosurePrimitives.replaceGoogDefines(Node n) |
(package private) void |
StripCode.Strip.replaceHighestNestedCallWithNull(Node node,
Node parent)
Use a while loop to get up out of any nested calls.
|
private void |
ProcessCommonJSModules.ProcessCommonJsModulesCallback.replaceIfStatementWithBranch(Node ifStatement,
Node branch) |
private Node |
PeepholeMinimizeConditions.replaceNode(Node lhs,
MinimizedCondition.MeasuredNode rhs) |
(package private) void |
TemplateAstMatcher.replaceNodeInPlace(Node n,
Node replacement) |
private void |
ExpandJqueryAliases.replaceOriginalJqueryEachCall(Node n,
Node expandedBlock) |
private static void |
DevirtualizePrototypeMethods.replaceReferencesToThis(Node node,
java.lang.String name)
Replaces references to "this" with references to name.
|
private static Node |
FunctionToBlockMutator.replaceReturns(Node block,
java.lang.String resultName,
java.lang.String labelName,
boolean resultMustBeSet)
Convert returns to assignments and breaks, as needed.
|
private static Node |
FunctionToBlockMutator.replaceReturnWithBreak(Node current,
Node parent,
java.lang.String resultName,
java.lang.String labelName)
Replace the 'return' statement with its child expression.
|
private void |
RescopeGlobalSymbols.RewriteScopeCallback.replaceSymbol(Node node,
java.lang.String name,
CompilerInput input) |
private static void |
InlineSimpleMethods.replaceThis(Node expectedGetprop,
Node replacement)
Finds the occurrence of "this" in the provided property tree and replaces
it with replacement
|
private void |
NameAnalyzer.replaceTopLevelExpressionWithRhs(Node parent,
Node n)
Simplify a toplevel expression, while preserving program
behavior.
|
private void |
Normalize.DuplicateDeclarationHandler.replaceVarWithAssignment(Node n,
Node parent,
Node grandparent)
Remove the parent VAR.
|
(package private) void |
AstChangeProxy.replaceWith(Node parent,
Node node,
java.util.List<Node> replacements)
Replaces a node with the provided list.
|
(package private) void |
AstChangeProxy.replaceWith(Node parent,
Node node,
Node replacement)
Replaces a node from the parent's child list.
|
(package private) void |
StripCode.Strip.replaceWithEmpty(Node n,
Node parent)
Replaces a node with an EMPTY node.
|
private void |
Es6TypedToEs6Converter.replaceWithNodes(Node n,
java.lang.Iterable<Node> replacements) |
(package private) void |
StripCode.Strip.replaceWithNull(Node n,
Node parent)
Replaces a node with a NULL node.
|
private void |
NameAnalyzer.replaceWithRhs(Node parent,
Node n)
Replace n with a simpler expression, while preserving program
behavior.
|
protected void |
AbstractPeepholeOptimization.report(DiagnosticType diagnostic,
Node n)
Helper method for reporting an error to the compiler when applying a
peephole optimization.
|
(package private) boolean |
ConformanceRules.BanNullDeref.report(Node n) |
private void |
CheckJSDoc.report(Node n,
DiagnosticType type,
java.lang.String... arguments) |
void |
NodeTraversal.report(Node n,
DiagnosticType diagnosticType,
java.lang.String... arguments)
Reports a diagnostic (error or warning)
|
protected void |
ConformanceRules.AbstractRule.report(NodeTraversal t,
Node n,
ConformanceRules.ConformanceResult result)
Report a conformance warning for the given node.
|
private void |
ScopedAliases.Traversal.report(NodeTraversal t,
Node n,
DiagnosticType error,
java.lang.String... arguments) |
private void |
TypeCheck.report(NodeTraversal t,
Node n,
DiagnosticType diagnosticType,
java.lang.String... arguments) |
private void |
ProcessClosurePrimitives.reportBadBaseMethodUse(NodeTraversal t,
Node n,
java.lang.String className,
java.lang.String extraMessage)
Reports an incorrect use of super-method calling.
|
private void |
ProcessClosurePrimitives.reportBadClosureCommonDefinesDefinition(NodeTraversal t,
Node n)
Reports an incorrect CLOSURE_DEFINES definition.
|
private void |
ProcessClosurePrimitives.reportBadGoogBaseUse(NodeTraversal t,
Node n,
java.lang.String extraMessage)
Reports an incorrect use of super-method calling.
|
(package private) abstract void |
AbstractCompiler.reportChangeToEnclosingScope(Node n)
Passes that do cross-scope modifications use this (eg, InlineVariables)
|
(package private) void |
Compiler.reportChangeToEnclosingScope(Node n) |
(package private) void |
PhaseOptimizer.reportChangeToEnclosingScope(Node n) |
private void |
CheckRequiresForConstructors.reportDuplicateRequireWarning(Node call,
java.lang.String require) |
(package private) void |
ConstCheck.reportError(NodeTraversal t,
Node n,
Var var,
java.lang.String name)
Reports a reassigned constant error.
|
private void |
ClosureRewriteClass.reportErrorOnContext(Node parent) |
private void |
CheckRequiresForConstructors.reportExtraRequireWarning(Node call,
java.lang.String require) |
private static void |
CheckSuspiciousCode.reportIfNaN(NodeTraversal t,
Node n) |
private static boolean |
CheckSuspiciousCode.reportIfNonObject(NodeTraversal t,
Node n,
DiagnosticType diagnosticType) |
private static void |
CheckSuspiciousCode.reportIfWasEmpty(NodeTraversal t,
Node block) |
private void |
CheckJSDoc.reportMisplaced(Node n,
java.lang.String annotationName,
java.lang.String note) |
private void |
TypeTransformation.reportWarning(Node n,
DiagnosticType msg,
java.lang.String... param) |
(package private) void |
ImplicitNullabilityCheck.reportWarning(NodeTraversal t,
Node n,
java.lang.String name)
Reports an implicitly nullable name in JSDoc warning.
|
private java.lang.String |
InlineAliases.AliasesInliner.resolveAlias(java.lang.String name,
Node n)
Use the alias table to look up the resolved name of the given alias.
|
private static Node |
InlineSimpleMethods.returnedExpression(Node fn)
Return the node that represents the expression returned
by the method, given a FUNCTION node.
|
private static void |
CollapseProperties.rewriteAliasProps(GlobalNamespace.Name name,
Node value,
int depth,
java.util.Set<GlobalNamespace.AstChange> newNodes) |
private void |
RewriteBindThis.rewriteBinding(Node functionNode) |
private Node |
ExpressionDecomposer.rewriteCallExpression(Node call,
ExpressionDecomposer.DecompositionState state)
Rewrite the call so "this" is preserved.
|
private void |
PolymerPass.rewriteClassDefinition(Node node,
Node parent,
NodeTraversal traversal) |
private void |
DevirtualizePrototypeMethods.rewriteDefinition(Node node,
java.lang.String newMethodName)
Rewrites method definitions as global functions that take "this"
as their first argument.
|
private static void |
Normalize.NormalizeStatements.rewriteFunctionDeclaration(Node n)
Rewrite the function declaration from:
function x() {}
FUNCTION
NAME
LP
BLOCK
to:
var x = function() {};
VAR
NAME
FUNCTION
NAME (w/ empty string)
LP
BLOCK
|
private static void |
FunctionToBlockMutator.rewriteFunctionDeclarations(Node n) |
private void |
ClosureRewriteModule.rewriteGetModuleCall(NodeTraversal t,
Node n) |
private void |
ClosureRewriteModule.rewriteGetModuleCallAlias(NodeTraversal t,
Node n) |
private void |
ClosureRewriteClass.rewriteGoogDefineClass(Node exprRoot,
ClosureRewriteClass.ClassDefinition cls) |
private void |
ExportTestFunctions.ExportTestFunctionsNodes.rewriteMemberDefInObjLit(Node memberDef,
Node objLit) |
private void |
ClosureRewriteModule.rewriteModuleAsScope(Node root) |
(package private) void |
PolymerClassRewriter.rewritePolymerClass(Node exprRoot,
PolymerClassDefinition cls,
boolean isInGlobalScope)
Rewrites a given call to Polymer({}) to a set of declarations and assignments which can be
understood by the compiler.
|
private void |
ProcessEs6Modules.rewriteRequires(Node script) |
private void |
OptimizeReturns.rewriteReturns(SimpleDefinitionFinder defFinder,
Node fnNode)
For the supplied function node, rewrite all the return expressions so that:
return foo();
becomes:
foo(); return;
Useless return will be removed later by the peephole optimization passes.
|
private void |
Compiler.runHotSwap(Node originalRoot,
Node js,
PassConfig passConfig)
Execute the passes from a PassConfig instance over a single replaced file.
|
private void |
Compiler.runHotSwapPass(Node originalRoot,
Node js,
PassFactory passFactory) |
private VariableMap |
DefaultPassConfig.runVariableRenaming(AbstractCompiler compiler,
VariableMap prevVariableMap,
Node externs,
Node root) |
private void |
NameReferenceGraphConstruction.Traversal.safeAlias(Node n)
Given a node, this alias all the names in the node that need aliasing.
|
private static Node |
ClosureCodingConvention.safeNext(Node n) |
private static Node |
CodingConventions.DefaultCodingConvention.safeNext(Node n) |
boolean |
SideEffectsAnalysis.safeToMoveBefore(Node source,
SideEffectsAnalysis.AbstractMotionEnvironment environment,
Node destination)
Determines whether it is safe to move code (
source ) across
an environment to another program point (immediately preceding
destination ). |
private void |
SanityCheck.sanityCheckAst(Node externs,
Node root)
Sanity check the AST is structurally accurate.
|
private Node |
SanityCheck.sanityCheckCodeGeneration(Node root)
Sanity checks code generation by performing it once, parsing the result,
then generating code from the second parse tree to verify that it matches
the code generated from the first parse tree.
|
private void |
SanityCheck.sanityCheckExternProperties(Node externs) |
private void |
SanityCheck.sanityCheckNormalization(Node externs,
Node root)
Sanity checks the AST.
|
private void |
SanityCheck.sanityCheckVars(Node externs,
Node root) |
private void |
GlobalNamespace.scanFromNode(GlobalNamespace.BuildGlobalNamespace builder,
JSModule module,
Scope scope,
Node n) |
private void |
SyntacticScopeCreator.scanRoot(Node n) |
private void |
Es6SyntacticScopeCreator.scanRoot(Node n) |
private void |
SyntacticScopeCreator.scanVars(Node n)
Scans and gather variables declarations under a Node
|
private void |
Es6SyntacticScopeCreator.scanVars(Node n)
Scans and gather variables declarations under a Node
|
(package private) boolean |
DisambiguateProperties.Property.scheduleRenaming(Node node,
JSType type)
Schedule the node to potentially be renamed.
|
void |
LineNumberCheck.setCheckSubTree(Node root) |
(package private) static void |
NodeUtil.setDebugInformation(Node node,
Node basisNode,
java.lang.String originalName)
Sets the debug information (source file info and original name)
on the given node.
|
(package private) void |
TypedScopeCreator.AbstractScopeBuilder.setDeferredType(Node node,
JSType type) |
void |
NameAnonymousFunctionsMapped.MappedFunctionNamer.setFunctionName(java.lang.String name,
Node fnNode) |
void |
AnonymousFunctionNamingCallback.FunctionNamer.setFunctionName(java.lang.String name,
Node fnNode)
Sets the name of an anonymous function.
|
void |
FunctionNames.FunctionExpressionNamer.setFunctionName(java.lang.String name,
Node fnNode) |
void |
NameAnonymousFunctions.AnonymousFunctionNamer.setFunctionName(java.lang.String name,
Node fnNode) |
(package private) static void |
SourceInformationAnnotator.setOriginalName(Node n,
java.lang.String name) |
private void |
OptimizeParameters.setParameterSideEffectInfo(OptimizeParameters.Parameter p,
Node value) |
(package private) MinimizedCondition |
MinimizedCondition.setPlaceholder(Node placeholder) |
void |
InlineFunctions.FunctionState.setSafeFnNode(Node safeFnNode) |
(package private) abstract void |
AbstractCompiler.setScope(Node n)
Let the PhaseOptimizer know which scope a pass is currently analyzing
|
(package private) void |
Compiler.setScope(Node n) |
(package private) void |
PhaseOptimizer.setScope(Node n) |
private void |
ProcessClosurePrimitives.ProvidedName.setSourceInfo(Node newNode)
Copy source info to the new node.
|
private void |
JsdocToEs6TypedConverter.setTypeExpression(Node n,
JSTypeExpression type) |
protected boolean |
ConformanceRules.AbstractRule.shouldCheckConformance(Node n) |
private boolean |
CheckAccessControls.shouldEmitDeprecationWarning(NodeTraversal t,
Node n,
Node parent)
Determines whether a deprecation warning should be emitted.
|
private boolean |
CheckGlobalThis.shouldReportThis(Node n) |
boolean |
ProcessCommonJSModules.FindGoogProvideOrGoogModule.shouldTraverse(NodeTraversal nodeTraversal,
Node n,
Node parent) |
boolean |
ProcessCommonJSModules.FindModuleExportStatements.shouldTraverse(NodeTraversal nodeTraversal,
Node n,
Node parent) |
boolean |
ProcessCommonJSModules.FindDefineAmdStatements.shouldTraverse(NodeTraversal nodeTraversal,
Node n,
Node parent) |
boolean |
CheckUnusedPrivateProperties.shouldTraverse(NodeTraversal t,
Node n,
Node parent) |
boolean |
CheckRequiresForConstructors.shouldTraverse(NodeTraversal t,
Node n,
Node parent) |
boolean |
NameReferenceGraphConstruction.Traversal.shouldTraverse(NodeTraversal t,
Node n,
Node parent) |
boolean |
CheckGlobalThis.shouldTraverse(NodeTraversal t,
Node n,
Node parent)
Since this pass reports errors only when a global
this keyword
is encountered, there is no reason to traverse non global contexts. |
boolean |
MoveFunctionDeclarations.shouldTraverse(NodeTraversal t,
Node n,
Node parent) |
boolean |
ClosureCheckModule.shouldTraverse(NodeTraversal t,
Node n,
Node parent) |
boolean |
ReferenceCollectingCallback.shouldTraverse(NodeTraversal nodeTraversal,
Node n,
Node parent)
Updates block stack.
|
boolean |
TypedScopeCreator.AbstractScopeBuilder.shouldTraverse(NodeTraversal t,
Node n,
Node parent) |
boolean |
Es6ExternsCheck.shouldTraverse(NodeTraversal t,
Node n,
Node parent) |
boolean |
CheckMissingReturn.shouldTraverse(NodeTraversal nodeTraversal,
Node n,
Node parent) |
boolean |
MakeDeclaredNamesUnique.shouldTraverse(NodeTraversal t,
Node n,
Node parent) |
boolean |
MakeDeclaredNamesUnique.ContextualRenameInverter.shouldTraverse(NodeTraversal t,
Node n,
Node parent) |
boolean |
J2clPass.ClassStaticFunctionsInliner.FunctionDefsCollector.shouldTraverse(NodeTraversal nodeTraversal,
Node n,
Node parent) |
boolean |
ControlFlowAnalysis.shouldTraverse(NodeTraversal nodeTraversal,
Node n,
Node parent) |
boolean |
InstrumentFunctions.InstrumentReturns.shouldTraverse(NodeTraversal t,
Node n,
Node parent) |
boolean |
CheckConformance.shouldTraverse(NodeTraversal t,
Node n,
Node parent) |
boolean |
OptimizeArgumentsArray.shouldTraverse(NodeTraversal nodeTraversal,
Node node,
Node parent) |
boolean |
ChainCalls.GatherFunctions.shouldTraverse(NodeTraversal nodeTraversal,
Node n,
Node parent) |
boolean |
ProcessDefines.CollectDefines.shouldTraverse(NodeTraversal nodeTraversal,
Node n,
Node parent)
Keeps track of whether the traversal is in a conditional branch.
|
boolean |
CombinedCompilerPass.shouldTraverse(NodeTraversal t,
Node n,
Node parent) |
boolean |
Es6RewriteGenerators.DecomposeYields.shouldTraverse(NodeTraversal t,
Node n,
Node parent) |
boolean |
Es6RewriteGenerators.ControlExitsCheck.shouldTraverse(NodeTraversal nodeTraversal,
Node n,
Node parent) |
boolean |
NodeTraversal.Callback.shouldTraverse(NodeTraversal nodeTraversal,
Node n,
Node parent)
Visits a node in pre order (before visiting its children) and decides
whether this node's children should be traversed.
|
boolean |
NodeTraversal.AbstractPostOrderCallback.shouldTraverse(NodeTraversal nodeTraversal,
Node n,
Node parent) |
boolean |
NodeTraversal.AbstractScopedCallback.shouldTraverse(NodeTraversal nodeTraversal,
Node n,
Node parent) |
boolean |
NodeTraversal.AbstractShallowCallback.shouldTraverse(NodeTraversal nodeTraversal,
Node n,
Node parent) |
boolean |
NodeTraversal.AbstractShallowStatementCallback.shouldTraverse(NodeTraversal nodeTraversal,
Node n,
Node parent) |
boolean |
NodeTraversal.AbstractNodeTypePruningCallback.shouldTraverse(NodeTraversal nodeTraversal,
Node n,
Node parent) |
boolean |
Denormalize.shouldTraverse(NodeTraversal t,
Node n,
Node parent) |
boolean |
Es6TypedToEs6Converter.shouldTraverse(NodeTraversal t,
Node n,
Node parent) |
boolean |
Es6TypedToEs6Converter.ScanNamespaces.shouldTraverse(NodeTraversal t,
Node n,
Node parent) |
boolean |
Es6ConvertSuper.shouldTraverse(NodeTraversal t,
Node n,
Node parent) |
boolean |
RenameLabels.ProcessLabels.shouldTraverse(NodeTraversal nodeTraversal,
Node node,
Node parent)
shouldTraverse is call when descending into the Node tree, so it is used
here to build the context for label renames.
|
boolean |
GatherSideEffectSubexpressionsCallback.shouldTraverse(NodeTraversal traversal,
Node node,
Node parent)
Computes the list of subtrees whose root nodes have side effects.
|
boolean |
InlineFunctions.FindCandidateFunctions.shouldTraverse(NodeTraversal nodeTraversal,
Node n,
Node parent) |
boolean |
ClosureRewriteModule.shouldTraverse(NodeTraversal t,
Node n,
Node parent) |
boolean |
DisambiguatePrivateProperties.shouldTraverse(NodeTraversal t,
Node n,
Node parent) |
boolean |
FunctionRewriter.ReductionGatherer.shouldTraverse(NodeTraversal raversal,
Node node,
Node parent) |
boolean |
DartSuperAccessorsPass.shouldTraverse(NodeTraversal t,
Node n,
Node parent) |
boolean |
RemoveUnusedClassProperties.shouldTraverse(NodeTraversal t,
Node n,
Node parent) |
boolean |
ControlFlowGraph.AbstractCfgNodeTraversalCallback.shouldTraverse(NodeTraversal nodeTraversal,
Node n,
Node parent) |
boolean |
SimpleDefinitionFinder.DefinitionGatheringCallback.shouldTraverse(NodeTraversal t,
Node n,
Node parent) |
boolean |
CheckUnreachableCode.shouldTraverse(NodeTraversal t,
Node n,
Node parent) |
boolean |
NameAnalyzer.FindReferences.shouldTraverse(NodeTraversal t,
Node n,
Node parent) |
boolean |
Es6RewriteDestructuring.shouldTraverse(NodeTraversal nodeTraversal,
Node n,
Node parent) |
boolean |
LineNumberCheck.shouldTraverse(NodeTraversal t,
Node n,
Node parent) |
boolean |
TypeCheck.shouldTraverse(NodeTraversal t,
Node n,
Node parent) |
boolean |
GlobalNamespace.BuildGlobalNamespace.shouldTraverse(NodeTraversal t,
Node n,
Node parent)
Collect the references in pre-order.
|
boolean |
Es6RewriteArrowFunction.shouldTraverse(NodeTraversal t,
Node n,
Node parent) |
boolean |
Es6RewriteArrowFunction.UpdateThisAndArgumentsReferences.shouldTraverse(NodeTraversal t,
Node n,
Node parent) |
boolean |
CheckAccessControls.shouldTraverse(NodeTraversal t,
Node n,
Node parent) |
boolean |
Normalize.NormalizeStatements.shouldTraverse(NodeTraversal t,
Node n,
Node parent) |
boolean |
Normalize.ScopeTicklingCallback.shouldTraverse(NodeTraversal nodeTraversal,
Node n,
Node parent) |
boolean |
PureFunctionIdentifier.FunctionAnalyzer.shouldTraverse(NodeTraversal traversal,
Node node,
Node parent) |
boolean |
Es6ToEs3Converter.shouldTraverse(NodeTraversal t,
Node n,
Node parent)
Some nodes must be visited pre-order in order to rewrite the
references to
this correctly. |
boolean |
AnalyzePrototypeProperties.ProcessProperties.shouldTraverse(NodeTraversal t,
Node n,
Node parent) |
(package private) void |
CombinedCompilerPass.CallbackWrapper.shouldTraverseIfActive(NodeTraversal t,
Node n,
Node parent) |
private boolean |
TypedScopeCreator.AbstractScopeBuilder.shouldUseFunctionLiteralType(FunctionType type,
JSDocInfo info,
Node lValue)
If a variable is assigned a function literal in the global scope,
make that a declared type (even if there's no doc info).
|
static boolean |
CoalesceVariableNames.LiveRangeChecker.shouldVisit(Node n) |
private JSType |
GlobalTypeInfo.ProcessScope.simpleInferCallNewType(Node n) |
private JSType |
GlobalTypeInfo.ProcessScope.simpleInferExprType(Node n) |
private FunctionType |
GlobalTypeInfo.ProcessScope.simpleInferFunctionType(Node n) |
private JSType |
GlobalTypeInfo.ProcessScope.simpleInferGetpropType(Node n) |
private Node |
GatherSideEffectSubexpressionsCallback.GetReplacementSideEffectSubexpressions.simplifyShortCircuitBranch(Node node) |
(package private) static Node |
PeepholeMinimizeConditions.skipFinallyNodes(Node n) |
private Node |
ClosureRewriteModule.skipHeaderNodes(Node script) |
void |
Es6SplitVariableDeclarations.splitDeclaration(Node n,
Node parent) |
private void |
Normalize.NormalizeStatements.splitVarDeclarations(Node n)
Split a var node such as:
var a, b;
into individual statements:
var a;
var b;
|
(package private) void |
CodePrinter.MappedCodePrinter.startSourceMapping(Node node)
Starts the source mapping for the given
node at the current position.
|
(package private) void |
CodeConsumer.startSourceMapping(Node node)
Starts the source mapping for the given
node at the current position.
|
private static boolean |
PeepholeMinimizeConditions.statementMustExitParent(Node n) |
private static boolean |
SideEffectsAnalysis.VisibilityLocationAbstraction.storageNodeIsLValue(Node node)
Return true if the storage node is an l-value.
|
private static boolean |
SideEffectsAnalysis.VisibilityLocationAbstraction.storageNodeIsRValue(Node node)
Return true if the storage node is an r-value.
|
private static void |
PolymerPassSuppressBehaviors.stripPropertyTypes(Node behaviorValue) |
private void |
PolymerPassSuppressBehaviors.suppressBehavior(Node behaviorValue)
Strip property type annotations and add suppress checkTypes and globalThis on functions.
|
private static void |
PolymerPassSuppressBehaviors.suppressDefaultValues(Node behaviorValue) |
private static Node |
MinimizedCondition.swapWithPlaceholderNode(Node n)
Remove the given node from the AST, and replace it with a placeholder
SCRIPT node.
|
(package private) static void |
PolymerPassStaticUtils.switchDollarSignPropsToBrackets(Node objLit,
AbstractCompiler compiler)
Switches all "this.$.foo" to "this.$['foo']".
|
private boolean |
NewTypeInference.tightenTypeAndDontWarn(java.lang.String varName,
Node n,
JSType declared,
JSType inferred,
JSType required) |
private FlowScope |
TypeInference.tightenTypesAfterAssertions(FlowScope scope,
Node callNode) |
static java.lang.String |
DotFormatter.toDot(Node n)
Converts an AST to dot representation.
|
(package private) static java.lang.String |
DotFormatter.toDot(Node n,
ControlFlowGraph<Node> inCFG)
Converts an AST to dot representation.
|
void |
Compiler.toSource(Compiler.CodeBuilder cb,
int inputSeqNum,
Node root)
Writes out JS code from a root node.
|
abstract java.lang.String |
AbstractCompiler.toSource(Node root)
Prints a node to source code.
|
java.lang.String |
Compiler.toSource(Node n)
Generates JavaScript source code for an AST, doesn't generate source
map info.
|
private static java.lang.String |
CodePrinter.toSource(Node root,
CodePrinter.Format outputFormat,
CompilerOptions options,
SourceMap sourceMap,
boolean tagAsStrict,
boolean lineBreak,
CodePrinter.Builder.CodeGeneratorFactory codeGeneratorFactory)
Converts a tree to JS code
|
private java.lang.String |
Compiler.toSource(Node n,
SourceMap sourceMap,
boolean firstOutput)
Generates JavaScript source code for an AST.
|
private void |
JsMessageVisitor.trackMessage(NodeTraversal t,
JsMessage message,
java.lang.String msgName,
Node msgNode,
boolean isUnnamedMessage)
Track a message for later retrieval.
|
(package private) static void |
CombinedCompilerPass.traverse(AbstractCompiler compiler,
Node root,
java.util.List<NodeTraversal.Callback> callbacks) |
static void |
NodeTraversal.traverse(AbstractCompiler compiler,
Node root,
NodeTraversal.Callback cb)
Deprecated.
Use traverseEs6 whenever possible.
|
void |
NodeTraversal.traverse(Node root)
Traverses a parse tree recursively.
|
private FlowScope |
TypeInference.traverse(Node n,
FlowScope scope) |
private void |
TemplateAstMatcher.traverse(Node n,
TemplateAstMatcher.Visitor callback) |
private FlowScope |
TypeInference.traverseAdd(Node n,
FlowScope scope) |
private TypeInference.BooleanOutcomePair |
TypeInference.traverseAnd(Node n,
FlowScope scope) |
private void |
RemoveUnusedVars.traverseAndRemoveUnusedReferences(Node root)
Traverses a node recursively.
|
private FlowScope |
TypeInference.traverseArrayLiteral(Node n,
FlowScope scope)
Traverse each element of the array.
|
private FlowScope |
TypeInference.traverseAssign(Node n,
FlowScope scope) |
private void |
NodeTraversal.traverseBlockScope(Node n)
Traverses a non-function block.
|
private void |
NodeTraversal.traverseBranch(Node n,
Node parent)
Traverses a branch.
|
private FlowScope |
TypeInference.traverseCall(Node n,
FlowScope scope) |
private FlowScope |
TypeInference.traverseCatch(Node catchNode,
FlowScope scope)
Any value can be thrown, so it's really impossible to determine the type
of a CATCH param.
|
private FlowScope |
TypeInference.traverseChildren(Node n,
FlowScope scope) |
private void |
NodeTraversal.traverseClass(Node n,
Node parent)
Traverses a class.
|
boolean |
PureFunctionIdentifier.SideEffectPropagationCallback.traverseEdge(PureFunctionIdentifier.FunctionInformation callee,
Node callSite,
PureFunctionIdentifier.FunctionInformation caller) |
static void |
NodeTraversal.traverseEs6(AbstractCompiler compiler,
Node root,
NodeTraversal.Callback cb)
Traverses using the ES6SyntacticScopeCreator
|
private void |
NodeTraversal.traverseFunction(Node n,
Node parent)
Traverses a function.
|
private void |
RemoveUnusedVars.traverseFunction(Node n,
Scope parentScope)
Traverses a function, which creates a new scope in JavaScript.
|
void |
NodeTraversal.traverseFunctionOutOfBand(Node node,
Scope scope)
Traverse a function out-of-band of normal traversal.
|
private FlowScope |
TypeInference.traverseGetElem(Node n,
FlowScope scope) |
private FlowScope |
TypeInference.traverseGetProp(Node n,
FlowScope scope) |
private FlowScope |
TypeInference.traverseHook(Node n,
FlowScope scope) |
(package private) void |
NodeTraversal.traverseInnerNode(Node node,
Node parent,
Scope refinedScope)
Traverses an inner node recursively with a refined scope.
|
private FlowScope |
TypeInference.traverseName(Node n,
FlowScope scope) |
private FlowScope |
TypeInference.traverseNew(Node n,
FlowScope scope) |
private void |
RemoveUnusedVars.traverseNode(Node n,
Node parent,
Scope scope)
Traverses everything in the current scope and marks variables that
are referenced.
|
private void |
DotFormatter.traverseNodes(Node parent) |
private FlowScope |
TypeInference.traverseObjectLiteral(Node n,
FlowScope scope) |
private TypeInference.BooleanOutcomePair |
TypeInference.traverseOr(Node n,
FlowScope scope) |
private FlowScope |
TypeInference.traverseReturn(Node n,
FlowScope scope)
Traverse a return value.
|
static void |
NodeTraversal.traverseRoots(AbstractCompiler compiler,
NodeTraversal.Callback cb,
Node externs,
Node root)
Deprecated.
|
(package private) void |
NodeTraversal.traverseRoots(Node externs,
Node root) |
static void |
NodeTraversal.traverseRootsEs6(AbstractCompiler compiler,
NodeTraversal.Callback cb,
Node externs,
Node root) |
static void |
NodeTraversal.traverseRootsTyped(AbstractCompiler compiler,
NodeTraversal.Callback cb,
Node externs,
Node root) |
private TypeInference.BooleanOutcomePair |
TypeInference.traverseShortCircuitingBinOp(Node n,
FlowScope scope) |
static void |
NodeTraversal.traverseTyped(AbstractCompiler compiler,
Node root,
NodeTraversal.Callback cb) |
private TypeInference.BooleanOutcomePair |
TypeInference.traverseWithinShortCircuitingBinOp(Node n,
FlowScope scope) |
(package private) void |
NodeTraversal.traverseWithScope(Node root,
Scope s)
Traverses a parse tree recursively with a scope, starting with the given
root.
|
private void |
PeepholeFoldConstants.tryConvertOperandsToNumber(Node n) |
private void |
PeepholeFoldConstants.tryConvertToNumber(Node n) |
private boolean |
SymbolTable.PropertyRefCollector.tryDefineLexicalQualifiedNameRef(java.lang.String name,
Node n) |
private Node |
ExpandJqueryAliases.tryExpandJqueryEachCall(NodeTraversal t,
Node n,
Node callbackFunction,
java.util.List<Node> keyNodes,
java.util.List<Node> valueNodes) |
private Node |
PeepholeFoldConstants.tryFoldAdd(Node node,
Node left,
Node right) |
private Node |
PeepholeFoldConstants.tryFoldAddConstantString(Node n,
Node left,
Node right)
Try to fold an ADD node with constant operands
|
private Node |
PeepholeFoldConstants.tryFoldAndOr(Node n,
Node left,
Node right)
Try to fold a AND/OR node.
|
private Node |
PeepholeFoldConstants.tryFoldArithmeticOp(Node n,
Node left,
Node right)
Try to fold arithmetic binary operators
|
private Node |
PeepholeFoldConstants.tryFoldArrayAccess(Node n,
Node left,
Node right) |
private Node |
PeepholeReplaceKnownMethods.tryFoldArrayJoin(Node n)
Try to fold an array join: ['a', 'b', 'c'].join('') -> 'abc';
|
private Node |
PeepholeFoldConstants.tryFoldAssign(Node n,
Node left,
Node right) |
private Node |
PeepholeRemoveDeadCode.tryFoldAssignment(Node subtree)
Try removing identity assignments
|
private Node |
PeepholeFoldConstants.tryFoldBinaryOperator(Node subtree) |
private Node |
PeepholeFoldConstants.tryFoldCall(Node n)
Remove useless calls:
Object.defineProperties(o, {}) -> o
|
private Node |
PeepholeFoldConstants.tryFoldChildAddString(Node n,
Node left,
Node right)
Expressions such as [foo() + 'a' + 'b'] generate parse trees
where no node has two const children ((foo() + 'a') + 'b'), so
tryFoldAdd() won't fold it -- tryFoldLeftChildAdd() will (for Strings).
|
private Node |
PeepholeRemoveDeadCode.tryFoldComma(Node n) |
private Node |
PeepholeFoldConstants.tryFoldComparison(Node n,
Node left,
Node right)
Try to fold comparison nodes, e.g ==
|
private Node |
PeepholeFoldConstants.tryFoldCtorCall(Node n)
Try to fold away unnecessary object instantiation.
|
(package private) Node |
PeepholeRemoveDeadCode.tryFoldDoAway(Node n)
Removes DOs that always evaluate to false.
|
(package private) Node |
PeepholeRemoveDeadCode.tryFoldEmptyDo(Node n)
Removes DOs that have empty bodies into FORs, which are
much easier for the CFA to analyze.
|
private Node |
PeepholeRemoveDeadCode.tryFoldExpr(Node subtree)
Try folding EXPR_RESULT nodes by removing useless Ops and expressions.
|
(package private) Node |
PeepholeRemoveDeadCode.tryFoldFor(Node n)
Removes FORs that always evaluate to false.
|
private void |
PeepholeRemoveDeadCode.tryFoldForCondition(Node forCondition)
Remove always true loop conditions.
|
private Node |
PeepholeFoldConstants.tryFoldGetElem(Node n,
Node left,
Node right)
Try to fold array-element.
|
private Node |
PeepholeFoldConstants.tryFoldGetProp(Node n,
Node left,
Node right)
Try to fold array-length.
|
private Node |
PeepholeRemoveDeadCode.tryFoldHook(Node n)
Try folding HOOK (?:) if the condition results of the condition is known.
|
private Node |
PeepholeRemoveDeadCode.tryFoldIf(Node n)
Try folding IF nodes by removing dead branches.
|
private Node |
PeepholeSubstituteAlternateSyntax.tryFoldImmediateCallToBoundFunction(Node n) |
private Node |
PeepholeFoldConstants.tryFoldInForcedStringContext(Node n) |
private Node |
PeepholeFoldConstants.tryFoldInstanceof(Node n,
Node left,
Node right)
Try to fold
left instanceof right into true
or false . |
private Node |
PeepholeReplaceKnownMethods.tryFoldKnownMethods(Node subtree) |
private Node |
PeepholeReplaceKnownMethods.tryFoldKnownNumericMethods(Node subtree)
Try to evaluate known Numeric methods
parseInt(), parseFloat()
|
private Node |
PeepholeReplaceKnownMethods.tryFoldKnownStringMethods(Node subtree)
Try to evaluate known String methods
.indexOf(), .substr(), .substring()
|
private Node |
PeepholeFoldConstants.tryFoldLeftChildOp(Node n,
Node left,
Node right)
Expressions such as [foo() * 10 * 20] generate parse trees
where no node has two const children ((foo() * 10) * 20), so
performArithmeticOp() won't fold it -- tryFoldLeftChildOp() will.
|
private Node |
PeepholeSubstituteAlternateSyntax.tryFoldLiteralConstructor(Node n)
Replaces a new Array, Object, or RegExp node with a literal, unless the
call is to a local constructor function with the same name.
|
private Node |
PeepholeFoldConstants.tryFoldObjectPropAccess(Node n,
Node left,
Node right) |
private Node |
PeepholeReplaceKnownMethods.tryFoldParseNumber(Node n,
java.lang.String functionName,
Node firstArg)
Try to evaluate parseInt, parseFloat:
parseInt("1") -> 1
parseInt("1", 10) -> 1
parseFloat("1.11") -> 1.11
|
private Node |
PeepholeSubstituteAlternateSyntax.tryFoldRegularExpressionConstructor(Node n) |
private Node |
PeepholeFoldConstants.tryFoldShift(Node n,
Node left,
Node right)
Try to fold shift operations
|
private Node |
PeepholeSubstituteAlternateSyntax.tryFoldSimpleFunctionCall(Node n) |
private Node |
PeepholeSubstituteAlternateSyntax.tryFoldStandardConstructors(Node n)
Fold "new Object()" to "Object()".
|
private Node |
PeepholeFoldConstants.tryFoldStringArrayAccess(Node n,
Node left,
Node right) |
private Node |
PeepholeReplaceKnownMethods.tryFoldStringCharAt(Node n,
Node stringNode,
Node arg1)
Try to fold .charAt() calls on strings
|
private Node |
PeepholeReplaceKnownMethods.tryFoldStringCharCodeAt(Node n,
Node stringNode,
Node arg1)
Try to fold .charCodeAt() calls on strings
|
private Node |
PeepholeReplaceKnownMethods.tryFoldStringIndexOf(Node n,
java.lang.String functionName,
Node lstringNode,
Node firstArg)
Try to evaluate String.indexOf/lastIndexOf:
"abcdef".indexOf("bc") -> 1
"abcdefbc".indexOf("bc", 3) -> 6
|
private Node |
PeepholeReplaceKnownMethods.tryFoldStringSplit(Node n,
Node stringNode,
Node arg1)
Try to fold .split() calls on strings
|
private Node |
PeepholeReplaceKnownMethods.tryFoldStringSubstr(Node n,
Node stringNode,
Node arg1)
Try to fold .substr() calls on strings
|
private Node |
PeepholeReplaceKnownMethods.tryFoldStringSubstring(Node n,
Node stringNode,
Node arg1)
Try to fold .substring() calls on strings
|
private Node |
PeepholeReplaceKnownMethods.tryFoldStringToLowerCase(Node subtree,
Node stringNode) |
private Node |
PeepholeReplaceKnownMethods.tryFoldStringToUpperCase(Node subtree,
Node stringNode) |
private Node |
PeepholeRemoveDeadCode.tryFoldTry(Node n)
Remove try blocks without catch blocks and with empty or not
existent finally blocks.
|
private Node |
PeepholeFoldConstants.tryFoldTypeof(Node originalTypeofNode)
Folds 'typeof(foo)' if foo is a literal, e.g.
|
private Node |
PeepholeFoldConstants.tryFoldUnaryOperator(Node n) |
(package private) Node |
PeepholeRemoveDeadCode.tryFoldWhile(Node n)
Removes WHILEs that always evaluate to false.
|
(package private) Node |
StatementFusion.tryFuseStatements(Node n) |
(package private) Node |
StatementFusion.tryFuseStatementsAggressively(Node n) |
private void |
PeepholeMinimizeConditions.tryJoinForCondition(Node n) |
static boolean |
NodeUtil.tryMergeBlock(Node block)
Merge a block with its parent block.
|
private Node |
PeepholeSubstituteAlternateSyntax.tryMinimizeArrayLiteral(Node n) |
private Node |
PeepholeMinimizeConditions.tryMinimizeCondition(Node n)
Try to minimize condition expression, as there are additional
assumptions that can be made when it is known that the final result
is a boolean.
|
(package private) void |
MinimizeExitPoints.tryMinimizeExits(Node n,
int exitType,
java.lang.String labelName)
Attempts to minimize the number of explicit exit points in a control
structure to take advantage of the implied exit at the end of the
structure.
|
private Node |
PeepholeMinimizeConditions.tryMinimizeExprResult(Node n)
Try to remove leading NOTs from EXPR_RESULTS.
|
private Node |
PeepholeMinimizeConditions.tryMinimizeHook(Node n)
Try flipping HOOKs that have negated conditions.
|
private Node |
PeepholeMinimizeConditions.tryMinimizeIf(Node n)
Try turning IF nodes into smaller HOOKs
Returns the replacement for n or the original if no replacement was
necessary.
|
private void |
MinimizeExitPoints.tryMinimizeIfBlockExits(Node srcBlock,
Node destBlock,
Node ifNode,
int exitType,
java.lang.String labelName)
Look for exits (returns, breaks, or continues, depending on the context) at
the end of a block and removes them by moving the if node's siblings,
if any, into the opposite condition block.
|
private Node |
PeepholeMinimizeConditions.tryMinimizeNot(Node n)
Try to minimize NOT nodes such as !(x==y).
|
private Node |
PeepholeSubstituteAlternateSyntax.tryMinimizeStringArrayLiteral(Node n) |
(package private) void |
MinimizeExitPoints.tryMinimizeSwitchCaseExits(Node n,
int exitType,
java.lang.String labelName)
Attempt to remove explicit exits from switch cases that also occur implicitly
after the switch.
|
(package private) void |
MinimizeExitPoints.tryMinimizeSwitchExits(Node n,
int exitType,
java.lang.String labelName) |
private Node |
PeepholeSubstituteAlternateSyntax.tryMinimizeWindowRefs(Node node) |
(package private) Node |
PeepholeRemoveDeadCode.tryOptimizeBlock(Node n)
Try removing unneeded block nodes and their useless children
|
private void |
PeepholeRemoveDeadCode.tryOptimizeConditionalAfterAssign(Node n)
Attempt to replace the condition of if or hook immediately that is a
reference to a name that is assigned immediately before.
|
private Node |
PeepholeRemoveDeadCode.tryOptimizeDefaultCase(Node n) |
private Node |
PeepholeRemoveDeadCode.tryOptimizeSwitch(Node n)
Remove useless switches and cases.
|
private void |
PeepholeFoldConstants.tryReduceOperandsForOp(Node n) |
private Node |
PeepholeSubstituteAlternateSyntax.tryReduceReturn(Node n)
Reduce "return undefined" or "return void 0" to simply "return".
|
private Node |
PeepholeFoldConstants.tryReduceVoid(Node n) |
private void |
RemoveUnusedVars.CallSiteOptimizer.tryRemoveAllFollowingArgs(Node function,
int argIndex)
Remove all the following parameters without side-effects
|
private void |
RemoveUnusedVars.CallSiteOptimizer.tryRemoveArgFromCallSites(Node function,
int argIndex,
boolean canModifyAllSites)
Remove all references to a parameter if possible otherwise simplify the
side-effect free parameters.
|
private void |
DeadAssignmentsElimination.tryRemoveAssignment(NodeTraversal t,
Node n,
DataFlowAnalysis.FlowState<LiveVariablesAnalysis.LiveVariableLattice> state) |
private void |
DeadAssignmentsElimination.tryRemoveAssignment(NodeTraversal t,
Node n,
Node exprRoot,
DataFlowAnalysis.FlowState<LiveVariablesAnalysis.LiveVariableLattice> state)
Determines if any local variables are dead after the instruction
n
and are assigned within the subtree of n . |
private void |
SymbolTable.PropertyRefCollector.tryRemoveLexicalQualifiedNameRef(java.lang.String name,
Node n) |
private Node |
PeepholeMinimizeConditions.tryRemoveRedundantExit(Node n)
Remove duplicate exits.
|
private void |
PeepholeMinimizeConditions.tryRemoveRepeatedStatements(Node n)
Try to remove duplicate statements from IF blocks.
|
private void |
UnreachableCodeElimination.EliminationPass.tryRemoveUnconditionalBranching(Node n)
Tries to remove n if it is an unconditional branch node (break, continue,
or return) and the target of n is the same as the the follow of n.
|
private Node |
PeepholeMinimizeConditions.tryReplaceExitWithBreak(Node n)
Replace duplicate exits in control structures.
|
private Node |
PeepholeMinimizeConditions.tryReplaceIf(Node n)
Use "return x?1:2;" in place of "if(x)return 1;return 2;"
|
private Node |
PeepholeSubstituteAlternateSyntax.tryReplaceUndefined(Node n)
Use "void 0" in place of "undefined"
|
private Node |
PeepholeSubstituteAlternateSyntax.tryRotateAssociativeOperator(Node n) |
private Node |
PeepholeRemoveDeadCode.trySimplifyUnusedResult(Node n)
General cascading unused operation node removal.
|
private Node |
PeepholeRemoveDeadCode.trySimplifyUnusedResult(Node n,
boolean removeUnused)
General cascading unused operation node removal.
|
private Node |
PeepholeSubstituteAlternateSyntax.trySplitComma(Node n) |
private Node |
PeepholeFoldConstants.tryUnfoldAssignOp(Node n,
Node left,
Node right) |
private static CodingConvention.SubclassType |
ClosureCodingConvention.typeofClassDefiningName(Node callName)
Determines whether the given node is a class-defining name, like
"inherits" or "mixin."
|
private void |
NewTypeInference.unifyWithSubtypeWarnIfFail(JSType genericType,
JSType concreteType,
java.util.List<java.lang.String> typeParameters,
com.google.common.collect.Multimap<java.lang.String,JSType> typeMultimap,
Node toWarnOn,
boolean isFwd) |
(package private) static MinimizedCondition |
MinimizedCondition.unoptimized(Node n)
Return a MeasuredNode of the given condition node, without minimizing
the result.
|
private void |
CodeGenerator.unrollBinaryOperator(Node n,
int op,
java.lang.String opStr,
CodeGenerator.Context context,
CodeGenerator.Context rhsContext,
int leftPrecedence,
int rightPrecedence)
We could use addList recursively here, but sometimes we produce
very deeply nested operators and run out of stack space, so we
just unroll the recursion when possible.
|
private static void |
TransformAMDToCJSModule.unsupportedDefineError(NodeTraversal t,
Node n) |
private void |
ProcessDefines.CollectDefines.updateAssignAllowedStack(Node n,
boolean entering)
Determines whether assignment to a define should be allowed
in the subtree of the given node, and if not, records that fact.
|
private void |
TypeInference.updateBind(Node n)
When "bind" is called on a function, we infer the type of the returned
"bound" function by looking at the number of parameters in the call site.
|
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. |
private void |
ReplaceMessages.updateFunctionNode(JsMessage message,
Node functionNode)
Updates the descendants of a FUNCTION node to represent a message's value.
|
(package private) abstract void |
AbstractCompiler.updateGlobalVarReferences(java.util.Map<Var,ReferenceCollectingCallback.ReferenceCollection> refMapPatch,
Node collectionRoot)
Updates the list of references for variables in global scope.
|
(package private) void |
Compiler.updateGlobalVarReferences(java.util.Map<Var,ReferenceCollectingCallback.ReferenceCollection> refMapPatch,
Node collectionRoot) |
(package private) void |
GlobalVarReferenceMap.updateGlobalVarReferences(java.util.Map<Var,ReferenceCollectingCallback.ReferenceCollection> refMapPatch,
Node root)
Updates the internal reference map based on the provided parameters.
|
private TypeEnv |
NewTypeInference.updateLvalueTypeInEnv(TypeEnv env,
Node lvalue,
QualifiedName qname,
JSType type) |
private void |
ClosureRewriteModule.updateRequire(Node call) |
private void |
TypeInference.updateScopeForTypeChange(FlowScope scope,
Node left,
JSType leftType,
JSType resultType)
Updates the scope according to the result of a type change, like
an assignment or a type cast.
|
private void |
TypeInference.updateTypeOfParameters(Node n,
FunctionType fnType)
For functions with function parameters, type inference will set the type of
a function literal argument from the function parameter type.
|
private void |
AstValidator.validateAmbientDeclaration(Node n) |
private void |
AstValidator.validateAmbientDeclarationHelper(Node n) |
private void |
AstValidator.validateArrayLit(Node n) |
private void |
AstValidator.validateArrayPattern(int type,
Node n) |
private void |
CheckJSDoc.validateArrowFunction(Node n)
Check that an arrow function is not annotated with .
|
private void |
AstValidator.validateAssignmentExpression(Node n) |
private void |
AstValidator.validateAssignmentTarget(Node n) |
private void |
AstValidator.validateBinaryOp(Node n) |
private void |
AstValidator.validateBlock(Node n) |
private void |
AstValidator.validateBreak(Node n) |
(package private) static boolean |
ConformanceRules.ConformanceUtil.validateCall(AbstractCompiler compiler,
Node callOrNew,
FunctionType functionType,
boolean isCallInvocation)
Validate the parameters and the 'this' type, of a new or call.
|
private void |
AstValidator.validateCall(Node n) |
private void |
AstValidator.validateCase(Node n) |
private void |
AstValidator.validateCatch(Node n) |
private void |
AstValidator.validateChildCount(Node n) |
private void |
AstValidator.validateChildCount(Node n,
int expected) |
private void |
AstValidator.validateChildCountIn(Node n,
int min,
int max) |
private void |
AstValidator.validateChildless(Node n) |
private void |
AstValidator.validateClass(Node n) |
private void |
AstValidator.validateClassDeclaration(Node n,
boolean isAmbient)
In a class declaration, unlike a class expression,
the class name is required.
|
private void |
AstValidator.validateClassHelper(Node n,
boolean isAmbient) |
private void |
CheckJSDoc.validateClassLevelJsDoc(Node n,
JSDocInfo info)
Checks that class-level annotations like @interface/@extends are not used on member functions.
|
private void |
AstValidator.validateClassMember(Node n,
boolean isAmbient) |
private void |
AstValidator.validateClassMembers(Node n,
boolean isAmbient) |
void |
AstValidator.validateCodeRoot(Node n) |
private void |
AstValidator.validateComputedPropClassMethod(Node n) |
private void |
AstValidator.validateContinue(Node n) |
private void |
AstValidator.validateDefaultCase(Node n) |
private void |
AstValidator.validateDefaultValue(int type,
Node n) |
private void |
CheckJSDoc.validateDefaultValue(Node n,
JSDocInfo info)
Check that an arrow function is not annotated with .
|
private void |
CheckJSDoc.validateDeprecatedJsDoc(Node n,
JSDocInfo info)
Checks that deprecated annotations such as @expose are not present
|
private void |
AstValidator.validateDo(Node n) |
private void |
AstValidator.validateEmptyName(Node n) |
private void |
AstValidator.validateEmptyString(Node n) |
private void |
AstValidator.validateEnum(Node n) |
private void |
AstValidator.validateEnumMembers(Node n) |
private void |
AstValidator.validateEs6Feature(java.lang.String feature,
Node n) |
private void |
AstValidator.validateEs6TypedFeature(java.lang.String feature,
Node n) |
private void |
AstValidator.validateExport(Node n,
boolean isAmbient) |
private void |
AstValidator.validateExportSpecifier(Node n) |
private void |
AstValidator.validateExportSpecifiers(Node n) |
void |
AstValidator.validateExpression(Node n) |
private void |
AstValidator.validateExprStmt(Node n) |
private void |
AstValidator.validateFor(Node n) |
private void |
AstValidator.validateForOf(Node n) |
private void |
AstValidator.validateFunctionBody(Node n,
boolean noBlock) |
private void |
AstValidator.validateFunctionExpression(Node n) |
private void |
AstValidator.validateFunctionExpressionHelper(Node n,
boolean isAmbient) |
private void |
CheckJSDoc.validateFunctionJsDoc(Node n,
JSDocInfo info)
Checks that JSDoc intended for a function is actually attached to a
function.
|
private void |
AstValidator.validateFunctionSignature(Node n) |
private void |
AstValidator.validateFunctionStatement(Node n) |
private void |
AstValidator.validateGetProp(Node n) |
private void |
AstValidator.validateHasInputId(Node n) |
private void |
AstValidator.validateHasSourceName(Node n) |
private void |
AstValidator.validateIf(Node n) |
private void |
AstValidator.validateImport(Node n) |
private void |
AstValidator.validateImportSpecifier(Node n) |
private void |
AstValidator.validateImportSpecifiers(Node n) |
private void |
AstValidator.validateInterface(Node n) |
private void |
AstValidator.validateInterfaceExtends(Node n) |
private void |
AstValidator.validateInterfaceMember(Node n) |
private void |
AstValidator.validateInterfaceMembers(Node n) |
private void |
AstValidator.validateIsSynthetic(Node n) |
private void |
AstValidator.validateLabel(Node n) |
private void |
AstValidator.validateLabelName(Node n) |
private void |
AstValidator.validateMaximumChildCount(Node n,
int i) |
private void |
AstValidator.validateMinimumChildCount(Node n,
int i) |
private void |
CheckJSDoc.validateMsgJsDoc(Node n,
JSDocInfo info)
Checks that annotations for messages (
@desc , @hidden ,
and @meaning )
are in the proper place, namely on names starting with MSG_ which
indicates they should be
extracted for translation. |
private void |
AstValidator.validateName(Node n) |
private void |
AstValidator.validateNameDeclarationChild(int type,
Node n) |
private void |
AstValidator.validateNameDeclarationHelper(int type,
Node n) |
private void |
AstValidator.validateNamedType(Node n) |
private void |
AstValidator.validateNamespace(Node n,
boolean isAmbient) |
private void |
AstValidator.validateNamespaceElements(Node n,
boolean isAmbient) |
private void |
AstValidator.validateNamespaceName(Node n) |
private void |
AstValidator.validateNew(Node n) |
private void |
CheckJSDoc.validateNoCollapse(Node n,
JSDocInfo info)
Warns when nocollapse annotations are present on nodes
which are not eligible for property collapsing.
|
private void |
AstValidator.validateNodeType(int type,
Node n) |
private void |
AstValidator.validateNonEmptyString(Node n) |
private void |
AstValidator.validateNonNullString(Node n) |
private void |
CheckJSDoc.validateNoSideEffects(Node n,
JSDocInfo info)
Check that @nosideeeffects annotations are only present in externs.
|
private void |
AstValidator.validateNumber(Node n) |
private void |
AstValidator.validateObjectLit(Node n) |
private void |
AstValidator.validateObjectLitComputedPropKey(Node n) |
private void |
AstValidator.validateObjectLiteralKeyName(Node n) |
private void |
AstValidator.validateObjectLitGetKey(Node n) |
private void |
AstValidator.validateObjectLitKey(Node n) |
private void |
AstValidator.validateObjectLitSetKey(Node n) |
private void |
AstValidator.validateObjectLitStringKey(Node n) |
private void |
AstValidator.validateObjectPattern(int type,
Node n) |
private void |
AstValidator.validateObjectPatternComputedPropKey(int type,
Node n) |
private void |
AstValidator.validateObjectPatternStringKey(int type,
Node n) |
private boolean |
ClosureRewriteClass.validateObjLit(Node objlit,
Node parent) |
private void |
AstValidator.validateOptionalExpression(Node n) |
private void |
AstValidator.validateOptionalName(Node n) |
private static boolean |
ConformanceRules.ConformanceUtil.validateParameterList(AbstractCompiler compiler,
Node callOrNew,
FunctionType functionType,
boolean isCallInvocation) |
private void |
AstValidator.validateParameters(Node n) |
private void |
AstValidator.validateParametersEs5(Node n) |
private void |
AstValidator.validateParametersEs6(Node n) |
private void |
AstValidator.validateRegExpLit(Node n) |
private void |
AstValidator.validateRest(Node n) |
private void |
AstValidator.validateReturn(Node n) |
void |
AstValidator.validateRoot(Node n) |
private void |
ScopedAliases.Traversal.validateScopeCall(NodeTraversal t,
Node n,
Node parent) |
void |
AstValidator.validateScript(Node n) |
private void |
AstValidator.validateSpread(Node n) |
void |
AstValidator.validateStatement(Node n) |
void |
AstValidator.validateStatement(Node n,
boolean isAmbient) |
private void |
AstValidator.validateString(Node n) |
private void |
AstValidator.validateSwitch(Node n) |
private void |
AstValidator.validateSwitchMember(Node n) |
private void |
AstValidator.validateSyntheticBlock(Node n) |
private void |
AstValidator.validateTaggedTemplateLit(Node n) |
private void |
CheckJSDoc.validateTempates(Node n,
JSDocInfo info) |
private void |
AstValidator.validateTemplateLit(Node n) |
private void |
AstValidator.validateTemplateLitSub(Node n) |
private static boolean |
ConformanceRules.ConformanceUtil.validateThis(Node callOrNew,
FunctionType functionType,
boolean isCallInvocation) |
private void |
AstValidator.validateThrow(Node n) |
private void |
AstValidator.validateTrinaryOp(Node n) |
private void |
AstValidator.validateTry(Node n) |
private void |
AstValidator.validateTypeAlias(Node n) |
private void |
CheckJSDoc.validateTypeAnnotations(Node n,
JSDocInfo info)
Check that JSDoc with a
@type annotation is in a valid place. |
private void |
AstValidator.validateUnaryOp(Node n) |
private boolean |
ClosureRewriteClass.validateUsage(Node n) |
private void |
AstValidator.validateVarOrAssignmentTarget(Node n) |
private void |
AstValidator.validateVarOrOptionalExpression(Node n) |
private void |
AstValidator.validateWhile(Node n) |
private void |
AstValidator.validateWith(Node n) |
private void |
AstValidator.validateYield(Node n) |
private boolean |
ProcessClosurePrimitives.validPrimitiveCall(NodeTraversal t,
Node n) |
private static boolean |
NameAnalyzer.valueConsumedByParent(Node n,
Node parent)
Determine if the parent reads the value of a child expression
directly.
|
private static Node |
PolymerClassRewriter.varToAssign(Node var) |
private boolean |
ProcessClosurePrimitives.verifyDefine(NodeTraversal t,
Node expr,
Node methodName,
Node args)
Verifies that a provide method call has exactly one argument,
and that it's a string literal and that the contents of the string are
valid JS tokens.
|
private boolean |
ProcessClosurePrimitives.verifyIsLast(NodeTraversal t,
Node methodName,
Node arg) |
private boolean |
ProcessClosurePrimitives.verifyLastArgumentIsString(NodeTraversal t,
Node methodName,
Node arg)
Verifies that a method call has exactly one argument, and that it's a
string literal.
|
private boolean |
ProcessClosurePrimitives.verifyNotNull(NodeTraversal t,
Node methodName,
Node arg) |
private boolean |
ProcessClosurePrimitives.verifyOfType(NodeTraversal t,
Node methodName,
Node arg,
int desiredType) |
private boolean |
ProcessClosurePrimitives.verifyProvide(NodeTraversal t,
Node methodName,
Node arg)
Verifies that a provide method call has exactly one argument,
and that it's a string literal and that the contents of the string are
valid JS tokens.
|
static void |
NodeUtil.verifyScopeChanges(java.util.Map<Node,Node> map,
Node main,
boolean verifyUnchangedNodes)
Checks that the scope roots marked as changed have indeed changed
|
private boolean |
ProcessClosurePrimitives.verifySetCssNameMapping(NodeTraversal t,
Node methodName,
Node firstArg)
Verifies that setCssNameMapping is called with the correct methods.
|
private void |
AstValidator.violation(java.lang.String message,
Node n) |
private static ConformanceRules.ConformanceResult |
ConformanceRules.NoImplicitlyPublicDecls.visibilityAtDeclarationOrFileoverview(JSDocInfo declaredJsDoc,
Node scriptNode) |
void |
NodeUtil.VarCollector.visit(Node n) |
void |
NodeUtil.Visitor.visit(Node node) |
void |
FunctionArgumentInjector.ReferencedAfterSideEffect.visit(Node n) |
void |
TemplateAstMatcher.Visitor.visit(Node n) |
private void |
CollectFileOverviewVisibility.visit(Node scriptNode) |
void |
DisambiguateProperties.FindExternProperties.visit(NodeTraversal t,
Node n,
Node parent) |
void |
DisambiguateProperties.FindRenameableProperties.visit(NodeTraversal t,
Node n,
Node parent) |
void |
RecordFunctionInformation.visit(NodeTraversal t,
Node n,
Node parent) |
void |
CollapseVariableDeclarations.GatherCollapses.visit(NodeTraversal t,
Node n,
Node parent) |
void |
ProcessCommonJSModules.ProcessCommonJsModulesCallback.visit(NodeTraversal t,
Node n,
Node parent) |
void |
ProcessCommonJSModules.SuffixVarsCallback.visit(NodeTraversal t,
Node n,
Node parent) |
void |
SymbolTable.PropertyRefCollector.visit(NodeTraversal t,
Node n,
Node parent) |
void |
SymbolTable.ThisRefCollector.visit(NodeTraversal t,
Node n,
Node parent) |
void |
SymbolTable.JSDocInfoCollector.visit(NodeTraversal t,
Node n,
Node parent) |
void |
SymbolTable.VisibilityCollector.visit(NodeTraversal t,
Node n,
Node parent) |
void |
PeepholeOptimizationsPass.PeepCallback.visit(NodeTraversal t,
Node n,
Node parent) |
void |
JsMessageVisitor.visit(NodeTraversal traversal,
Node node,
Node parent) |
void |
CheckUnusedPrivateProperties.visit(NodeTraversal t,
Node n,
Node parent) |
void |
TransformAMDToCJSModule.TransformAMDModulesCallback.visit(NodeTraversal t,
Node n,
Node parent) |
void |
TransformAMDToCJSModule.DefineCallbackReturnCallback.visit(NodeTraversal t,
Node n,
Node parent) |
void |
TransformAMDToCJSModule.RenameCallback.visit(NodeTraversal t,
Node n,
Node parent) |
void |
MarkNoSideEffectCalls.GatherNoSideEffectFunctions.visit(NodeTraversal traversal,
Node node,
Node parent) |
void |
MarkNoSideEffectCalls.SetNoSideEffectCallProperty.visit(NodeTraversal traversal,
Node node,
Node parent) |
void |
ConstCheck.visit(NodeTraversal t,
Node n,
Node parent) |
void |
PrepareAst.PrepareAnnotations.visit(NodeTraversal t,
Node n,
Node parent) |
void |
InferJSDocInfo.visit(NodeTraversal t,
Node n,
Node parent) |
void |
ProcessTweaks.CollectTweaks.visit(NodeTraversal t,
Node n,
Node parent) |
void |
CheckRequiresForConstructors.visit(NodeTraversal t,
Node n,
Node parent) |
void |
AngularPass.visit(NodeTraversal t,
Node n,
Node parent) |
void |
NameReferenceGraphConstruction.Traversal.visit(NodeTraversal t,
Node n,
Node parent) |
void |
Es6RewriteBlockScopedDeclaration.visit(NodeTraversal t,
Node n,
Node parent) |
void |
Es6RewriteBlockScopedDeclaration.RewriteBlockScopedFunctionDeclaration.visit(NodeTraversal t,
Node n,
Node parent) |
void |
Es6RewriteBlockScopedDeclaration.CollectUndeclaredNames.visit(NodeTraversal t,
Node n,
Node parent) |
void |
Es6RewriteBlockScopedDeclaration.LoopClosureTransformer.visit(NodeTraversal t,
Node n,
Node parent) |
void |
CheckGlobalThis.visit(NodeTraversal t,
Node n,
Node parent) |
void |
ImplicitNullabilityCheck.visit(NodeTraversal t,
Node n,
Node p)
Crawls the JSDoc of the given node to find any names in JSDoc
that are implicitly null.
|
void |
RenameVars.ProcessVars.visit(NodeTraversal t,
Node n,
Node parent) |
void |
MoveFunctionDeclarations.visit(NodeTraversal t,
Node n,
Node parent) |
void |
ReplaceIdGenerators.GatherGenerators.visit(NodeTraversal t,
Node n,
Node parent) |
void |
ReplaceIdGenerators.ReplaceGenerators.visit(NodeTraversal t,
Node n,
Node parent) |
void |
SubstituteEs6Syntax.visit(NodeTraversal t,
Node n,
Node parent) |
void |
ConvertToDottedProperties.visit(NodeTraversal t,
Node n,
Node parent) |
void |
ClosureCheckModule.visit(NodeTraversal t,
Node n,
Node parent) |
void |
PolymerPass.visit(NodeTraversal traversal,
Node node,
Node parent) |
void |
ClosureRewriteClass.visit(NodeTraversal t,
Node n,
Node parent) |
void |
GatherRawExports.visit(NodeTraversal t,
Node n,
Node parent) |
void |
CheckRegExp.visit(NodeTraversal t,
Node n,
Node parent) |
void |
FindExportableNodes.visit(NodeTraversal t,
Node n,
Node parent) |
void |
InlineProperties.GatherCandidates.visit(NodeTraversal t,
Node n,
Node parent) |
void |
InlineProperties.ReplaceCandidates.visit(NodeTraversal t,
Node n,
Node parent) |
void |
ReferenceCollectingCallback.visit(NodeTraversal t,
Node n,
Node parent)
For each node, update the block stack and reference collection
as appropriate.
|
void |
J2clPropertyInlinerPass.StaticFieldGetterSetterInliner.GatherJ2CLClassGetterSetters.visit(NodeTraversal t,
Node n,
Node parent) |
void |
J2clPropertyInlinerPass.StaticFieldGetterSetterInliner.DetermineInlinableProperties.visit(NodeTraversal t,
Node n,
Node parent) |
void |
J2clPropertyInlinerPass.StaticFieldGetterSetterInliner.InlinePropertiesPass.visit(NodeTraversal t,
Node n,
Node parent) |
void |
TypedScopeCreator.DiscoverEnumsAndTypedefs.visit(NodeTraversal t,
Node node,
Node parent) |
void |
TypedScopeCreator.AbstractScopeBuilder.visit(NodeTraversal t,
Node n,
Node parent) |
void |
TypedScopeCreator.GlobalScopeBuilder.visit(NodeTraversal t,
Node n,
Node parent)
Visit a node in the global scope, and add anything it declares to the
global symbol table.
|
void |
TypedScopeCreator.LocalScopeBuilder.visit(NodeTraversal t,
Node n,
Node parent)
Visit a node in a local scope, and add any local variables or catch
parameters into the local symbol table.
|
void |
TypedScopeCreator.FirstOrderFunctionAnalyzer.visit(NodeTraversal t,
Node n,
Node parent) |
void |
CollapseAnonymousFunctions.Callback.visit(NodeTraversal t,
Node n,
Node parent) |
void |
MinimizeExitPoints.visit(NodeTraversal t,
Node n,
Node parent) |
void |
CoalesceVariableNames.visit(NodeTraversal t,
Node n,
Node parent) |
void |
CoalesceVariableNames.CombinedLiveRangeChecker.visit(NodeTraversal t,
Node n,
Node parent) |
void |
CoalesceVariableNames.LiveRangeChecker.visit(NodeTraversal t,
Node n,
Node parent) |
void |
CheckJSDoc.visit(NodeTraversal t,
Node n,
Node parent) |
void |
CheckMissingReturn.visit(NodeTraversal t,
Node n,
Node parent) |
void |
MakeDeclaredNamesUnique.visit(NodeTraversal t,
Node n,
Node parent) |
void |
MakeDeclaredNamesUnique.ContextualRenameInverter.visit(NodeTraversal t,
Node node,
Node parent) |
void |
J2clPass.ClassStaticFunctionsInliner.FunctionDefsCollector.visit(NodeTraversal t,
Node n,
Node parent) |
void |
J2clPass.ClassStaticFunctionsInliner.StaticCallInliner.visit(NodeTraversal t,
Node n,
Node parent) |
void |
GatherExternProperties.visit(NodeTraversal t,
Node n,
Node parent) |
void |
RenameProperties.ProcessProperties.visit(NodeTraversal t,
Node n,
Node parent) |
void |
StrictModeCheck.visit(NodeTraversal t,
Node n,
Node parent) |
void |
StrictModeCheck.NonExternChecks.visit(NodeTraversal t,
Node n,
Node parent) |
void |
RewriteBindThis.visit(NodeTraversal traversal,
Node node,
Node parent) |
void |
RescopeGlobalSymbols.RewriteGlobalFunctionStatementsToVarAssignmentsCallback.visit(NodeTraversal t,
Node n,
Node parent) |
void |
RescopeGlobalSymbols.FindCrossModuleNamesCallback.visit(NodeTraversal t,
Node n,
Node parent) |
void |
RescopeGlobalSymbols.FindNamesReferencingThis.visit(NodeTraversal t,
Node n,
Node parent) |
void |
RescopeGlobalSymbols.RewriteScopeCallback.visit(NodeTraversal t,
Node n,
Node parent) |
void |
RescopeGlobalSymbols.RemoveGlobalVarCallback.visit(NodeTraversal t,
Node n,
Node parent) |
void |
RescopeGlobalSymbols.MakeExternsReferenceWindowExplicitly.visit(NodeTraversal t,
Node n,
Node parent) |
void |
ControlFlowAnalysis.visit(NodeTraversal t,
Node n,
Node parent) |
void |
InstrumentFunctions.RemoveCallback.visit(NodeTraversal t,
Node n,
Node parent) |
void |
InstrumentFunctions.InstrumentReturns.visit(NodeTraversal t,
Node n,
Node parent) |
void |
InstrumentFunctions.InstrumentCallback.visit(NodeTraversal t,
Node n,
Node parent) |
void |
CheckConformance.visit(NodeTraversal t,
Node n,
Node parent) |
void |
SourceInformationAnnotator.visit(NodeTraversal t,
Node n,
Node parent) |
void |
ProcessEs6Modules.visit(NodeTraversal t,
Node n,
Node parent) |
void |
ProcessEs6Modules.RenameGlobalVars.visit(NodeTraversal t,
Node n,
Node parent) |
void |
OptimizeArgumentsArray.visit(NodeTraversal traversal,
Node node,
Node parent) |
void |
ChainCalls.GatherFunctions.visit(NodeTraversal t,
Node n,
Node parent) |
void |
ChainCalls.GatherCallSites.visit(NodeTraversal t,
Node n,
Node parent)
If the function call returns this and the next statement has the same
target expression, record the call site.
|
void |
ProcessDefines.CollectDefines.visit(NodeTraversal t,
Node n,
Node parent) |
void |
ExternExportsPass.visit(NodeTraversal t,
Node n,
Node parent) |
void |
CombinedCompilerPass.visit(NodeTraversal t,
Node n,
Node parent) |
void |
Es6SplitVariableDeclarations.visit(NodeTraversal t,
Node n,
Node parent) |
void |
Es6RewriteGenerators.visit(NodeTraversal t,
Node n,
Node parent) |
void |
Es6RewriteGenerators.ControlExitsCheck.visit(NodeTraversal t,
Node n,
Node parent) |
void |
ScopedAliases.Traversal.visit(NodeTraversal t,
Node n,
Node parent) |
void |
FlowSensitiveInlineVariables.visit(NodeTraversal t,
Node n,
Node parent) |
void |
FlowSensitiveInlineVariables.GatherCandiates.visit(NodeTraversal t,
Node n,
Node parent) |
void |
NodeTraversal.Callback.visit(NodeTraversal t,
Node n,
Node parent)
Visits a node in postorder (after its children have been visited).
|
void |
NodeTraversal.AbstractPreOrderCallback.visit(NodeTraversal t,
Node n,
Node parent) |
void |
ExpandJqueryAliases.visit(NodeTraversal t,
Node n,
Node parent) |
void |
ExpandJqueryAliases.FindCallbackArgumentReferences.visit(NodeTraversal t,
Node n,
Node parent) |
void |
FieldCleanupPass.QualifiedNameSearchTraversal.visit(NodeTraversal t,
Node n,
Node p) |
void |
ReplaceStrings.visit(NodeTraversal t,
Node n,
Node parent) |
void |
UnreachableCodeElimination.EliminationPass.visit(NodeTraversal t,
Node n,
Node parent) |
void |
Denormalize.visit(NodeTraversal t,
Node n,
Node parent) |
void |
JsdocToEs6TypedConverter.visit(NodeTraversal t,
Node n,
Node parent) |
void |
Es6TypedToEs6Converter.visit(NodeTraversal t,
Node n,
Node parent) |
void |
Es6TypedToEs6Converter.ScanNamespaces.visit(NodeTraversal t,
Node n,
Node parent) |
void |
Es6RenameReferences.visit(NodeTraversal t,
Node n,
Node parent) |
void |
ObjectPropertyStringPreprocess.Callback.visit(NodeTraversal t,
Node n,
Node parent) |
void |
Es6ConvertSuper.visit(NodeTraversal t,
Node n,
Node parent) |
void |
RenameLabels.ProcessLabels.visit(NodeTraversal nodeTraversal,
Node node,
Node parent)
Delegate the actual processing of the node to visitLabel and
visitBreakOrContinue.
|
void |
GatherSideEffectSubexpressionsCallback.visit(NodeTraversal traversal,
Node node,
Node parent) |
void |
PolymerPassFindExterns.visit(NodeTraversal t,
Node n,
Node parent) |
void |
DeadAssignmentsElimination.visit(NodeTraversal t,
Node n,
Node parent) |
void |
InlineFunctions.FindCandidateFunctions.visit(NodeTraversal t,
Node n,
Node parent) |
void |
InlineFunctions.CallVisitor.visit(NodeTraversal t,
Node n,
Node parent) |
void |
InlineFunctions.FindCandidatesReferences.visit(NodeTraversal t,
Node n,
Node parent) |
void |
ClosureRewriteModule.visit(NodeTraversal t,
Node n,
Node parent)
Rewrite:
goog.module('foo')
var bar = goog.require('bar');
exports = something;
to:
goog.provide('foo');
goog.require('ns.bar');
goog.scope(function() {
var bar = ns.bar;
foo = something;
});
|
void |
InlineAliases.AliasesCollector.visit(NodeTraversal t,
Node n,
Node parent) |
void |
InlineAliases.AliasesInliner.visit(NodeTraversal t,
Node n,
Node parent) |
void |
CheckSideEffects.visit(NodeTraversal t,
Node n,
Node parent) |
void |
CheckSideEffects.StripProtection.visit(NodeTraversal t,
Node n,
Node parent) |
void |
CheckSideEffects.GetNoSideEffectExterns.visit(NodeTraversal t,
Node n,
Node parent) |
void |
AliasStrings.visit(NodeTraversal t,
Node n,
Node parent) |
void |
DisambiguatePrivateProperties.visit(NodeTraversal t,
Node n,
Node parent) |
void |
FunctionRewriter.ReductionGatherer.visit(NodeTraversal traversal,
Node node,
Node parent) |
void |
DartSuperAccessorsPass.visit(NodeTraversal t,
Node n,
Node parent) |
void |
RemoveUnusedClassProperties.visit(NodeTraversal t,
Node n,
Node parent) |
void |
GlobalTypeInfo.CollectNamedTypes.visit(NodeTraversal t,
Node n,
Node parent) |
void |
GlobalTypeInfo.ProcessScope.visit(NodeTraversal t,
Node n,
Node parent) |
void |
AnonymousFunctionNamingCallback.visit(NodeTraversal t,
Node n,
Node parent) |
void |
AmbiguateProperties.ProcessProperties.visit(NodeTraversal t,
Node n,
Node parent) |
void |
ObjectLitAssignmentShortening.ObjectLitShorteningCallback.visit(NodeTraversal t,
Node n,
Node parent) |
void |
FunctionNames.FunctionListExtractor.visit(NodeTraversal t,
Node n,
Node parent) |
void |
SimpleDefinitionFinder.DefinitionGatheringCallback.visit(NodeTraversal traversal,
Node node,
Node parent) |
void |
SimpleDefinitionFinder.UseSiteGatheringCallback.visit(NodeTraversal traversal,
Node node,
Node parent) |
void |
ClosureOptimizePrimitives.FindObjectCreateCalls.visit(NodeTraversal t,
Node n,
Node parent) |
void |
CoverageInstrumentationCallback.visit(NodeTraversal traversal,
Node node,
Node parent)
Instruments the JS code by inserting appropriate nodes into the AST.
|
void |
CheckEventfulObjectDisposal.ComputeEventizeTraversal.visit(NodeTraversal t,
Node n,
Node parent) |
void |
CheckEventfulObjectDisposal.Traversal.visit(NodeTraversal t,
Node n,
Node parent) |
void |
CreateSyntheticBlocks.Callback.visit(NodeTraversal t,
Node n,
Node parent) |
void |
CheckUnreachableCode.visit(NodeTraversal t,
Node n,
Node parent) |
void |
NameAnalyzer.ProcessExternals.visit(NodeTraversal t,
Node n,
Node parent) |
void |
NameAnalyzer.FindDependencyScopes.visit(NodeTraversal t,
Node n,
Node parent) |
void |
NameAnalyzer.HoistVariableAndFunctionDeclarations.visit(NodeTraversal t,
Node n,
Node parent) |
void |
NameAnalyzer.FindDeclarationsAndSetters.visit(NodeTraversal t,
Node n,
Node parent) |
void |
NameAnalyzer.FindReferences.visit(NodeTraversal t,
Node n,
Node parent) |
void |
ObjectPropertyStringPostprocess.Callback.visit(NodeTraversal t,
Node n,
Node parent) |
void |
Es6RewriteDestructuring.visit(NodeTraversal t,
Node n,
Node parent) |
void |
LineNumberCheck.visit(NodeTraversal t,
Node n,
Node parent) |
void |
ExportTestFunctions.ExportTestFunctionsNodes.visit(NodeTraversal t,
Node n,
Node parent) |
void |
ConstParamCheck.visit(NodeTraversal traversal,
Node node,
Node parent)
Callback to visit a node and check method call arguments of
goog.string.Const.from . |
void |
StripCode.Strip.visit(NodeTraversal t,
Node n,
Node parent) |
void |
TypeCheck.visit(NodeTraversal t,
Node n,
Node parent)
This is the meat of the type checking.
|
void |
Es6ToEs3ClassSideInheritance.FindStaticMembers.visit(NodeTraversal t,
Node n,
Node parent) |
void |
TypeInferencePass.FirstScopeBuildingCallback.visit(NodeTraversal t,
Node n,
Node parent) |
void |
TypeInferencePass.SecondScopeBuildingCallback.visit(NodeTraversal t,
Node n,
Node parent) |
void |
InvocationsCallback.visit(NodeTraversal t,
Node n,
Node parent) |
void |
VarCheck.visit(NodeTraversal t,
Node n,
Node parent) |
void |
VarCheck.NameRefInExternsCheck.visit(NodeTraversal t,
Node n,
Node parent) |
void |
GlobalNamespace.BuildGlobalNamespace.visit(NodeTraversal t,
Node n,
Node parent) |
void |
CheckMissingGetCssName.visit(NodeTraversal t,
Node n,
Node parent) |
void |
DeclaredGlobalExternsOnWindow.visit(NodeTraversal t,
Node n,
Node parent) |
void |
Es6RewriteArrowFunction.UpdateThisAndArgumentsReferences.visit(NodeTraversal t,
Node n,
Node parent) |
void |
ClosureCodeRemoval.FindAbstractMethods.visit(NodeTraversal t,
Node n,
Node parent) |
void |
ClosureCodeRemoval.FindAssertionCalls.visit(NodeTraversal t,
Node n,
Node parent) |
void |
ShadowVariables.GatherReferenceInfo.visit(NodeTraversal t,
Node n,
Node parent) |
void |
ShadowVariables.DoShadowVariables.visit(NodeTraversal t,
Node n,
Node parent) |
void |
PolymerPassSuppressBehaviors.visit(NodeTraversal t,
Node n,
Node parent) |
void |
ExtractPrototypeMemberDeclarations.GatherExtractionInfo.visit(NodeTraversal t,
Node n,
Node parent) |
void |
RewritePolyfills.Traverser.visit(NodeTraversal traversal,
Node node,
Node parent) |
void |
ReplaceCssNames.Traversal.visit(NodeTraversal t,
Node n,
Node parent) |
void |
CheckAccessControls.visit(NodeTraversal t,
Node n,
Node parent) |
void |
VariableReferenceCheck.ReferenceCheckingBehavior.ShallowReferenceCollector.visit(NodeTraversal t,
Node n,
Node parent) |
void |
Normalize.FindExposeAnnotations.visit(NodeTraversal t,
Node n,
Node parent) |
void |
Normalize.RewriteExposedProperties.visit(NodeTraversal t,
Node n,
Node parent) |
void |
Normalize.PropagateConstantAnnotationsOverVars.visit(NodeTraversal t,
Node n,
Node parent) |
void |
Normalize.VerifyConstants.visit(NodeTraversal t,
Node n,
Node parent) |
void |
Normalize.NormalizeStatements.visit(NodeTraversal t,
Node n,
Node parent) |
void |
Normalize.ScopeTicklingCallback.visit(NodeTraversal t,
Node n,
Node parent) |
void |
PureFunctionIdentifier.FunctionAnalyzer.visit(NodeTraversal traversal,
Node node,
Node parent) |
void |
CheckSuspiciousCode.visit(NodeTraversal t,
Node n,
Node parent) |
void |
Es6ToEs3Converter.visit(NodeTraversal t,
Node n,
Node parent) |
void |
Es6ToEs3Converter.CheckClassAssignments.visit(NodeTraversal t,
Node n,
Node parent) |
void |
Es6RenameVariablesInParamLists.visit(NodeTraversal t,
Node n,
Node parent) |
void |
Es6RenameVariablesInParamLists.CollectReferences.visit(NodeTraversal t,
Node n,
Node parent) |
void |
MethodCompilerPass.GetExternMethods.visit(NodeTraversal t,
Node n,
Node parent) |
void |
MethodCompilerPass.GatherSignatures.visit(NodeTraversal t,
Node n,
Node parent) |
void |
CheckProvides.CheckProvidesCallback.visit(NodeTraversal t,
Node n,
Node parent) |
void |
RuntimeTypeCheck.AddMarkers.visit(NodeTraversal t,
Node n,
Node parent) |
void |
RuntimeTypeCheck.AddChecks.visit(NodeTraversal t,
Node n,
Node parent) |
void |
ProcessClosurePrimitives.visit(NodeTraversal t,
Node n,
Node parent) |
void |
AnalyzePrototypeProperties.ProcessProperties.visit(NodeTraversal t,
Node n,
Node parent) |
void |
AnalyzePrototypeProperties.ProcessExternProperties.visit(NodeTraversal t,
Node n,
Node parent) |
void |
CheckDebuggerStatement.visit(NodeTraversal t,
Node n,
Node parent) |
(package private) void |
InlineSimpleMethods.InlineTrivialAccessors.visit(NodeTraversal t,
Node callNode,
Node parent,
java.lang.String callName) |
(package private) abstract void |
InvocationsCallback.visit(NodeTraversal t,
Node callNode,
Node parent,
java.lang.String callName)
Called for each callnode that is a method invocation.
|
private void |
InlineAliases.AliasesCollector.visitAliasDefinition(Node lhs,
JSDocInfo info)
Maybe record that given lvalue is an alias of the qualified name on its rhs.
|
private void |
GlobalTypeInfo.CollectNamedTypes.visitAliasedNamespace(Node lhs) |
private void |
Es6TypedToEs6Converter.visitAmbientDeclaration(Node n,
Node parent) |
private void |
ProcessCommonJSModules.ProcessCommonJsModulesCallback.visitAMDIfStatement(Node n)
Rewrites AMD part of UMD pattern by removing the if-condition and the
then-branch and adds the else-branch directly to the current parent node.
|
private void |
Es6ToEs3Converter.visitArrayLitOrCallWithSpread(NodeTraversal t,
Node node,
Node parent)
Processes array literals or calls containing spreads.
|
private void |
Es6RewriteDestructuring.visitArrayPattern(NodeTraversal t,
Node arrayPattern,
Node parent) |
private void |
Es6RewriteArrowFunction.visitArrowFunction(NodeTraversal t,
Node n) |
void |
CheckEventfulObjectDisposal.Traversal.visitAssign(NodeTraversal t,
Node n) |
private void |
TypeCheck.visitAssign(NodeTraversal t,
Node assign)
Visits an assignment
lvalue = rvalue . |
private void |
Es6ToEs3ClassSideInheritance.FindStaticMembers.visitAssign(NodeTraversal t,
Node n) |
private void |
PureFunctionIdentifier.FunctionAnalyzer.visitAssignmentOrUnaryOperator(PureFunctionIdentifier.FunctionInformation sideEffectInfo,
Scope scope,
Node op,
Node lhs,
Node rhs)
Record information about the side effects caused by an
assignment or mutating unary operator.
|
private void |
TypeCheck.visitBinaryOperator(int op,
NodeTraversal t,
Node n)
This function unifies the type checking involved in the core binary
operators and the corresponding assignment operators.
|
private void |
RenameLabels.ProcessLabels.visitBreakOrContinue(Node node)
Rename label references in breaks and continues.
|
private void |
GlobalTypeInfo.ProcessScope.visitCall(Node call) |
private void |
CheckEventfulObjectDisposal.ComputeEventizeTraversal.visitCall(NodeTraversal t,
Node n) |
private void |
CheckEventfulObjectDisposal.Traversal.visitCall(NodeTraversal t,
Node n) |
private void |
TypeCheck.visitCall(NodeTraversal t,
Node n)
Visits a CALL node.
|
private void |
PureFunctionIdentifier.FunctionAnalyzer.visitCall(PureFunctionIdentifier.FunctionInformation sideEffectInfo,
Node node)
Record information about a call site.
|
private void |
CheckRequiresForConstructors.visitCallNode(Node call,
Node parent) |
void |
InlineFunctions.CallVisitorCallback.visitCallSite(NodeTraversal t,
Node callNode,
InlineFunctions.FunctionState fs) |
void |
InlineFunctions.FindCandidatesReferences.visitCallSite(NodeTraversal t,
Node callNode,
InlineFunctions.FunctionState fs) |
void |
InlineFunctions.Inline.visitCallSite(NodeTraversal t,
Node callNode,
InlineFunctions.FunctionState fs) |
private void |
Es6TypedToEs6Converter.visitClass(Node n,
Node parent) |
private void |
Es6ToEs3Converter.visitClass(Node classNode,
Node parent)
Classes are processed in 3 phases:
The class name is extracted.
|
private void |
Es6ToEs3Converter.visitClassMember(Node member,
Es6ToEs3Converter.ClassDeclarationMetadata metadata)
Handles transpilation of a standard class member function.
|
private void |
CheckProvides.CheckProvidesCallback.visitClassNode(Node classNode) |
private void |
CheckRequiresForConstructors.visitClassNode(NodeTraversal t,
Node classNode) |
private void |
GlobalTypeInfo.ProcessScope.visitClassPropertyDeclaration(Node getProp) |
private void |
ProcessCommonJSModules.ProcessCommonJsModulesCallback.visitCommonJSIfStatement(Node n)
Rewrites CommonJS part of UMD pattern by removing the if-condition and the
else-branch and adds the then-branch directly to the current parent node.
|
private void |
Es6ToEs3Converter.visitComputedPropInClass(Node member,
Es6ToEs3Converter.ClassDeclarationMetadata metadata) |
private void |
GlobalTypeInfo.ProcessScope.visitConstructorPropertyDeclaration(Node getProp) |
private void |
Es6ToEs3ClassSideInheritance.FindStaticMembers.visitDefinedPropertiesCall(NodeTraversal t,
Node definePropertiesCall) |
private void |
Es6RewriteDestructuring.visitDestructuringPatternInCatch(Node pattern) |
private void |
Es6RewriteDestructuring.visitDestructuringPatternInEnhancedFor(Node pattern) |
private void |
GlobalTypeInfo.CollectNamedTypes.visitEnum(Node qnameNode) |
private void |
Es6TypedToEs6Converter.visitEnum(Node n,
Node parent) |
private void |
Es6TypedToEs6Converter.visitExport(Node n,
Node parent) |
private void |
ProcessEs6Modules.visitExport(NodeTraversal t,
Node export,
Node parent) |
private void |
JsMessageVisitor.visitFallbackFunctionCall(NodeTraversal t,
Node call)
Visit a call to goog.getMsgWithFallback.
|
private void |
Es6RewriteDestructuring.visitForOf(Node node) |
private void |
Es6ToEs3Converter.visitForOf(NodeTraversal t,
Node node,
Node parent) |
private void |
RuntimeTypeCheck.AddMarkers.visitFunction(Node n) |
private void |
RuntimeTypeCheck.AddChecks.visitFunction(Node n)
Insert checks for the parameters of the function.
|
private void |
Es6TypedToEs6Converter.visitFunction(Node n,
Node parent) |
void |
CheckEventfulObjectDisposal.Traversal.visitFunction(NodeTraversal t,
Node n) |
private void |
TypeCheck.visitFunction(NodeTraversal t,
Node n)
Visits a
Token.FUNCTION node. |
private void |
PureFunctionIdentifier.FunctionAnalyzer.visitFunction(NodeTraversal traversal,
Node node,
Node parent,
Node gramp)
Record function and check for @nosideeffects annotations.
|
private void |
Es6ToEs3ClassSideInheritance.FindStaticMembers.visitFunctionClassDef(Node n) |
private void |
GlobalTypeInfo.CollectNamedTypes.visitFunctionEarly(Node fn) |
private NTIScope |
GlobalTypeInfo.ProcessScope.visitFunctionLate(Node fn,
RawNominalType ownerType)
Compute the declared type for a given scope.
|
private void |
CheckProvides.CheckProvidesCallback.visitFunctionNode(Node n,
Node parent) |
private void |
Es6RewriteGenerators.visitGenerator(Node n,
Node parent) |
private void |
TypeCheck.visitGetElem(NodeTraversal t,
Node n)
Visits a GETELEM node.
|
private void |
Es6ToEs3Converter.visitGetprop(NodeTraversal t,
Node n) |
private void |
Es6ToEs3ClassSideInheritance.FindStaticMembers.visitGetProp(NodeTraversal t,
Node n) |
private void |
TypeCheck.visitGetProp(NodeTraversal t,
Node n,
Node parent)
Visits a GETPROP node.
|
private void |
ProcessEs6Modules.visitImport(NodeTraversal t,
Node importDecl,
Node parent) |
private void |
CheckRequiresForConstructors.visitImportNode(Node importNode) |
private void |
Es6TypedToEs6Converter.visitInterface(Node n,
Node parent) |
private void |
TypeCheck.visitInterfaceGetprop(NodeTraversal t,
Node assign,
Node object,
java.lang.String property,
Node lvalue,
Node rvalue)
Visits an ASSIGN node for cases such as
|
private void |
RenameLabels.ProcessLabels.visitLabel(Node node,
Node parent)
Rename or remove labels.
|
private void |
Es6RewriteGenerators.DecomposeYields.visitLoop(Node n) |
private void |
Es6ToEs3Converter.visitMemberFunctionDefInObjectLit(Node n,
Node parent)
Converts a member definition in an object literal to an ES3 key/value pair.
|
private void |
SymbolTable.VisibilityCollector.visitName(NodeTraversal t,
Node n,
Node parent) |
(package private) boolean |
TypeCheck.visitName(NodeTraversal t,
Node n,
Node parent)
Visits a NAME node.
|
private void |
Es6TypedToEs6Converter.visitNamespaceDeclaration(Node n,
Node parent) |
private void |
GlobalTypeInfo.ProcessScope.visitNamespacePropertyDeclaration(Node getProp) |
private void |
GlobalTypeInfo.ProcessScope.visitNamespacePropertyDeclaration(Node declNode,
Node recv,
java.lang.String pname) |
private void |
TypeCheck.visitNew(NodeTraversal t,
Node n)
Visits a NEW node.
|
private void |
CheckEventfulObjectDisposal.Traversal.visitNew(NodeTraversal t,
Node n,
Node parent) |
private void |
GlobalTypeInfo.CollectNamedTypes.visitNewCtorDefinedByCall(Node qnameNode) |
private void |
CheckRequiresForConstructors.visitNewNode(NodeTraversal t,
Node newNode) |
private void |
Es6ToEs3Converter.visitObject(Node obj) |
private void |
GlobalTypeInfo.ProcessScope.visitObjectLit(Node objLitNode,
Node parent) |
private void |
Es6RewriteDestructuring.visitObjectPattern(NodeTraversal t,
Node objectPattern,
Node parent) |
private void |
Es6ToEs3Converter.visitObjectWithComputedProperty(Node obj) |
private void |
TypeCheck.visitObjLitKey(NodeTraversal t,
Node key,
Node objlit,
JSType litType)
Visits an object literal field definition
key : value . |
private void |
GlobalTypeInfo.CollectNamedTypes.visitObjlitNamespace(Node qnameNode) |
(package private) void |
CombinedCompilerPass.CallbackWrapper.visitOrMaybeActivate(NodeTraversal t,
Node n,
Node parent)
Visits the node unless the wrapped callback is inactive.
|
private void |
GlobalTypeInfo.ProcessScope.visitOtherPropertyDeclaration(Node getProp) |
private void |
TypeCheck.visitParameterList(NodeTraversal t,
Node call,
FunctionType functionType)
Visits the parameters of a CALL or a NEW node.
|
private void |
Es6RewriteDestructuring.visitParamList(Node paramList,
Node function)
Processes trailing default and rest parameters.
|
static void |
NodeUtil.visitPostOrder(Node node,
NodeUtil.Visitor visitor,
com.google.common.base.Predicate<Node> traverseChildrenPred)
A post-order traversal, calling Visitor.visit for each child matching
the predicate.
|
static void |
NodeUtil.visitPreOrder(Node node,
NodeUtil.Visitor visitor,
com.google.common.base.Predicate<Node> traverseChildrenPred)
A pre-order traversal, calling Visitor.visit for each child matching
the predicate.
|
private void |
SymbolTable.VisibilityCollector.visitProperty(NodeTraversal t,
Node getprop,
Node parent) |
private void |
GlobalTypeInfo.ProcessScope.visitPropertyDeclaration(Node getProp) |
private void |
GlobalTypeInfo.ProcessScope.visitPrototypeAssignment(Node getProp) |
private void |
GlobalTypeInfo.ProcessScope.visitPrototypePropertyDeclaration(Node getProp) |
private void |
CheckRequiresForConstructors.visitQualifiedName(Node getprop) |
private void |
CheckRequiresForConstructors.visitRequire(java.lang.String requiredName,
Node node) |
private void |
ProcessCommonJSModules.ProcessCommonJsModulesCallback.visitRequireCall(NodeTraversal t,
Node require,
Node parent)
Visit require calls.
|
private void |
Es6ToEs3Converter.visitRestParam(Node restParam,
Node paramList)
Processes a rest parameter
|
private void |
CheckEventfulObjectDisposal.Traversal.visitReturn(NodeTraversal t,
Node n) |
private void |
TypeCheck.visitReturn(NodeTraversal t,
Node n)
Visits a RETURN node.
|
private void |
RuntimeTypeCheck.AddChecks.visitReturn(NodeTraversal t,
Node n) |
private void |
ProcessCommonJSModules.ProcessCommonJsModulesCallback.visitScript(NodeTraversal t,
Node script)
Emit goog.provide and add suffix to all global vars to avoid conflicts
with other modules.
|
private void |
ProcessEs6Modules.visitScript(NodeTraversal t,
Node script) |
private void |
Es6ToEs3Converter.visitStringKey(Node n)
Converts extended object literal {a} to {a:a}.
|
(package private) void |
CompilerInput.DepsFinder.visitSubtree(Node n,
Node parent) |
private void |
Es6ConvertSuper.visitSuper(Node node,
Node parent) |
private void |
DartSuperAccessorsPass.visitSuperGet(Node superGet) |
private void |
DartSuperAccessorsPass.visitSuperSet(Node superSet) |
(package private) static void |
Es6TemplateLiterals.visitTaggedTemplateLiteral(NodeTraversal t,
Node n)
Converts tag`a\tb${bar}` to:
// A global (module) scoped variable
var $jscomp$templatelit$0 = ["a\tb"]; // cooked string array
$jscomp$templatelit$0.raw = ["a\\tb"]; // raw string array
...
|
(package private) static void |
Es6TemplateLiterals.visitTemplateLiteral(NodeTraversal t,
Node n)
Converts `${a} b ${c} d ${e}` to (a + " b " + c + " d " + e)
|
(package private) void |
CompilerInput.DepsFinder.visitTree(Node n) |
private void |
Es6TypedToEs6Converter.visitTypeAlias(NodeTraversal t,
Node n,
Node parent) |
private void |
GlobalTypeInfo.CollectNamedTypes.visitTypedef(Node qnameNode) |
void |
SymbolTable.JSDocInfoCollector.visitTypeNode(Node refNode,
com.google.common.collect.ImmutableList<java.lang.String> templateTypeNames,
SymbolTable.SymbolScope scope,
Node n) |
private void |
Es6ToEs3ClassSideInheritance.FindStaticMembers.visitVar(Node n) |
private void |
GlobalTypeInfo.ProcessScope.visitVar(Node nameNode,
Node parent) |
private void |
TypeCheck.visitVar(NodeTraversal t,
Node n)
Visits a VAR node.
|
private void |
Es6TypedToEs6Converter.visitVarInsideNamespace(Node n,
Node parent) |
private void |
GlobalTypeInfo.CollectNamedTypes.visitWindowVar(Node nameNode) |
private void |
Es6RewriteGenerators.visitYieldExpr(Node n,
Node parent) |
private void |
Es6RewriteGenerators.DecomposeYields.visitYieldExpression(Node n) |
private void |
Es6RewriteGenerators.visitYieldFor(NodeTraversal t,
Node n,
Node parent)
Translates expressions using the new yield-for syntax.
|
private void |
Es6RewriteGenerators.visitYieldThrows(Node n,
Node parent) |
private void |
NewTypeInference.warnInvalidOperand(Node expr,
int operatorType,
java.lang.Object expected,
java.lang.Object actual) |
protected boolean |
ConformanceRules.AbstractTypeRestrictionRule.wasCast(Node n) |
Modifier and Type | Method and Description |
---|---|
private void |
CheckEventfulObjectDisposal.Traversal.addDisposeArgumentsMatched(java.util.Map<java.lang.String,java.util.List<java.lang.Integer>> map,
Node n,
java.lang.String property,
java.util.List<Node> foundDisposeCalls) |
private void |
GenerateExports.addExportMethod(java.util.Map<java.lang.String,Node> exports,
java.lang.String export,
Node context) |
private Node |
FunctionToBlockMutator.aliasAndInlineArguments(Node fnTemplateRoot,
java.util.LinkedHashMap<java.lang.String,Node> argMap,
java.util.Set<java.lang.String> namesToAlias)
Inlines the arguments within the node tree using the given argument map,
replaces "unsafe" names with local aliases.
|
private boolean |
InlineSimpleMethods.allDefinitionsEquivalent(java.util.Collection<Node> definitions)
Given a set of method definitions, verify they are the same.
|
(package private) static boolean |
NodeUtil.allResultsMatch(Node n,
com.google.common.base.Predicate<Node> p)
Apply the supplied predicate against
all possible result Nodes of the expression.
|
private void |
NewTypeInference.analyzeConditionalStmFwd(DiGraph.DiGraphNode<Node,ControlFlowGraph.Branch> stm,
Node cond,
TypeEnv inEnv) |
private void |
NewTypeInference.analyzeFunctionBwd(java.util.List<DiGraph.DiGraphNode<Node,ControlFlowGraph.Branch>> workset) |
private void |
NewTypeInference.analyzeFunctionFwd(java.util.List<DiGraph.DiGraphNode<Node,ControlFlowGraph.Branch>> workset) |
(package private) static void |
DotFormatter.appendDot(Node n,
ControlFlowGraph<Node> inCFG,
java.lang.Appendable builder)
Converts an AST to dot representation and appends it to the given buffer.
|
boolean |
CheckUnreachableCode.ReachablePredicate.apply(GraphReachability.EdgeTuple<Node,ControlFlowGraph.Branch> input) |
private void |
NewTypeInference.buildWorkset(DiGraph.DiGraphNode<Node,ControlFlowGraph.Branch> dn,
java.util.List<DiGraph.DiGraphNode<Node,ControlFlowGraph.Branch>> workset) |
private void |
NewTypeInference.buildWorkset(DiGraph.DiGraphNode<Node,ControlFlowGraph.Branch> dn,
java.util.List<DiGraph.DiGraphNode<Node,ControlFlowGraph.Branch>> workset) |
private void |
NewTypeInference.buildWorksetHelper(DiGraph.DiGraphNode<Node,ControlFlowGraph.Branch> dn,
java.util.List<DiGraph.DiGraphNode<Node,ControlFlowGraph.Branch>> workset,
java.util.Set<DiGraph.DiGraphNode<Node,ControlFlowGraph.Branch>> seen) |
private void |
NewTypeInference.buildWorksetHelper(DiGraph.DiGraphNode<Node,ControlFlowGraph.Branch> dn,
java.util.List<DiGraph.DiGraphNode<Node,ControlFlowGraph.Branch>> workset,
java.util.Set<DiGraph.DiGraphNode<Node,ControlFlowGraph.Branch>> seen) |
private void |
NewTypeInference.buildWorksetHelper(DiGraph.DiGraphNode<Node,ControlFlowGraph.Branch> dn,
java.util.List<DiGraph.DiGraphNode<Node,ControlFlowGraph.Branch>> workset,
java.util.Set<DiGraph.DiGraphNode<Node,ControlFlowGraph.Branch>> seen) |
SideEffectsAnalysis.LocationSummary |
SideEffectsAnalysis.LocationAbstraction.calculateLocationSummary(java.util.Set<Node> nodes)
Calculates the abstraction-specific side effects
for the node.
|
private static boolean |
FlowSensitiveInlineVariables.checkLeftOf(Node n,
Node expressionRoot,
com.google.common.base.Predicate<Node> predicate)
Given an expression by its root and sub-expression n, return true if there
the predicate is true for some expression on the left of n.
|
private static boolean |
FlowSensitiveInlineVariables.checkRightOf(Node n,
Node expressionRoot,
com.google.common.base.Predicate<Node> predicate)
Given an expression by its root and sub-expression n, return true if there
the predicate is true for some expression on the right of n.
|
private static Node |
NameAnalyzer.collapseReplacements(java.util.List<Node> replacements)
Merge a list of nodes into a single expression.
|
private UndiGraph<Var,java.lang.Void> |
CoalesceVariableNames.computeVariableNamesInterferenceGraph(NodeTraversal t,
ControlFlowGraph<Node> cfg,
java.util.Set<Var> escaped) |
(package private) static boolean |
NodeUtil.containsType(Node node,
int type,
com.google.common.base.Predicate<Node> traverseChildrenPred) |
(package private) static boolean |
NodeUtil.evaluatesToLocalValue(Node value,
com.google.common.base.Predicate<Node> locals) |
private boolean |
CheckMissingReturn.fastAllPathsReturnCheck(ControlFlowGraph<Node> cfg)
Fast check to see if all execution paths contain a return statement.
|
private void |
InlineObjectLiterals.InliningBehavior.fillInitialValues(ReferenceCollectingCallback.Reference init,
java.util.Map<java.lang.String,Node> initvals)
Populates a map of key names -> initial assigned values.
|
static int |
NodeUtil.getCount(Node n,
com.google.common.base.Predicate<Node> pred,
com.google.common.base.Predicate<Node> traverseChildrenPred) |
static int |
NodeUtil.getCount(Node n,
com.google.common.base.Predicate<Node> pred,
com.google.common.base.Predicate<Node> traverseChildrenPred) |
static Node |
NodeUtil.getEnclosingNode(Node n,
com.google.common.base.Predicate<Node> pred) |
private TypeEnv |
NewTypeInference.getInEnv(DiGraph.DiGraphNode<Node,ControlFlowGraph.Branch> dn) |
(package private) static int |
NodeUtil.getNodeTypeReferenceCount(Node node,
int type,
com.google.common.base.Predicate<Node> traverseChildrenPred)
Finds the number of times a type is referenced within the node tree.
|
private TypeEnv |
NewTypeInference.getOutEnv(DiGraph.DiGraphNode<Node,ControlFlowGraph.Branch> dn) |
private int |
ControlFlowAnalysis.AstControlFlowGraph.getPosition(DiGraph.DiGraphNode<Node,ControlFlowGraph.Branch> n)
Gets the pre-order traversal position of the given node.
|
static boolean |
NodeUtil.has(Node node,
com.google.common.base.Predicate<Node> pred,
com.google.common.base.Predicate<Node> traverseChildrenPred) |
static boolean |
NodeUtil.has(Node node,
com.google.common.base.Predicate<Node> pred,
com.google.common.base.Predicate<Node> traverseChildrenPred) |
private static boolean |
NewTypeInference.hasPathWithNoReturn(ControlFlowGraph<Node> cfg) |
private void |
CheckUnreachableCode.initScope(ControlFlowGraph<Node> controlFlowGraph) |
(package private) static Node |
FunctionArgumentInjector.inject(AbstractCompiler compiler,
Node node,
Node parent,
java.util.Map<java.lang.String,Node> replacements)
With the map provided, replace the names with expression trees.
|
(package private) static Node |
FunctionArgumentInjector.inject(AbstractCompiler compiler,
Node node,
Node parent,
java.util.Map<java.lang.String,Node> replacements,
boolean replaceThis) |
private void |
Es6RewriteGenerators.insertAll(Node node,
int type,
java.util.List<Node> matchingNodes)
Adds all children of the
node of the given type to given list. |
(package private) static boolean |
NodeUtil.isNameReferenced(Node node,
java.lang.String name,
com.google.common.base.Predicate<Node> traverseChildrenPred)
Whether a simple name is referenced within the node tree.
|
private Node |
RescopeGlobalSymbols.RemoveGlobalVarCallback.joinOnComma(java.util.List<Node> commas,
Node source) |
(package private) static void |
FunctionArgumentInjector.maybeAddTempsForCallArguments(Node fnNode,
java.util.Map<java.lang.String,Node> argMap,
java.util.Set<java.lang.String> namesNeedingTemps,
CodingConvention convention)
Updates the set of parameter names in set unsafe to include any
arguments from the call site that require aliases.
|
private void |
CheckRequiresForConstructors.maybeAddUsage(NodeTraversal t,
Node n,
Node rootTypeNode,
java.util.Map<java.lang.String,Node> usagesMap,
com.google.common.base.Predicate<Node> pred) |
private void |
CheckRequiresForConstructors.maybeAddUsage(NodeTraversal t,
Node n,
Node rootTypeNode,
java.util.Map<java.lang.String,Node> usagesMap,
com.google.common.base.Predicate<Node> pred) |
private void |
TypeInference.maybeResolveTemplateTypeFromNodes(java.lang.Iterable<Node> declParams,
java.lang.Iterable<Node> callParams,
java.util.Map<TemplateType,JSType> resolvedTypes,
java.util.Set<JSType> seenTypes) |
private void |
TypeInference.maybeResolveTemplateTypeFromNodes(java.lang.Iterable<Node> declParams,
java.lang.Iterable<Node> callParams,
java.util.Map<TemplateType,JSType> resolvedTypes,
java.util.Set<JSType> seenTypes) |
private void |
TypeInference.maybeResolveTemplateTypeFromNodes(java.util.Iterator<Node> declParams,
java.util.Iterator<Node> callParams,
java.util.Map<TemplateType,JSType> resolvedTypes,
java.util.Set<JSType> seenTypes) |
private void |
TypeInference.maybeResolveTemplateTypeFromNodes(java.util.Iterator<Node> declParams,
java.util.Iterator<Node> callParams,
java.util.Map<TemplateType,JSType> resolvedTypes,
java.util.Set<JSType> seenTypes) |
private static void |
NodeUtil.mtocHelper(java.util.Map<Node,Node> map,
Node main,
Node clone) |
private static void |
NodeUtil.mtocHelper(java.util.Map<Node,Node> map,
Node main,
Node clone) |
private void |
ControlFlowAnalysis.prioritizeFromEntryNode(DiGraph.DiGraphNode<Node,ControlFlowGraph.Branch> entry)
Given an entry node, find all the nodes reachable from that node
and prioritize them.
|
private void |
Es6ToEs3ClassSideInheritance.processInherits(java.util.List<Node> inheritsCalls) |
private void |
Es6RenameReferences.renameTypeNode(NodeTraversal t,
java.lang.Iterable<Node> typeNodes) |
(package private) void |
AstChangeProxy.replaceWith(Node parent,
Node node,
java.util.List<Node> replacements)
Replaces a node with the provided list.
|
private void |
Es6TypedToEs6Converter.replaceWithNodes(Node n,
java.lang.Iterable<Node> replacements) |
(package private) abstract void |
AbstractCompiler.setDefaultDefineValues(com.google.common.collect.ImmutableMap<java.lang.String,Node> values)
Stores a map of default @define values.
|
(package private) void |
Compiler.setDefaultDefineValues(com.google.common.collect.ImmutableMap<java.lang.String,Node> values) |
private TypeEnv |
NewTypeInference.setOutEnv(DiGraph.DiGraphNode<Node,ControlFlowGraph.Branch> dn,
TypeEnv e) |
(package private) static java.lang.String |
DotFormatter.toDot(Node n,
ControlFlowGraph<Node> inCFG)
Converts an AST to dot representation.
|
private Node |
ExpandJqueryAliases.tryExpandJqueryEachCall(NodeTraversal t,
Node n,
Node callbackFunction,
java.util.List<Node> keyNodes,
java.util.List<Node> valueNodes) |
private Node |
ExpandJqueryAliases.tryExpandJqueryEachCall(NodeTraversal t,
Node n,
Node callbackFunction,
java.util.List<Node> keyNodes,
java.util.List<Node> valueNodes) |
private void |
DeadAssignmentsElimination.tryRemoveDeadAssignments(NodeTraversal t,
ControlFlowGraph<Node> cfg)
Try to remove useless assignments from a control flow graph that has been
annotated with liveness information.
|
private void |
ClosureRewriteModule.updateExports(java.util.List<Node> exports) |
private void |
ClosureRewriteModule.updateRequires(java.util.List<Node> requires) |
static void |
NodeUtil.verifyScopeChanges(java.util.Map<Node,Node> map,
Node main,
boolean verifyUnchangedNodes)
Checks that the scope roots marked as changed have indeed changed
|
static void |
NodeUtil.verifyScopeChanges(java.util.Map<Node,Node> map,
Node main,
boolean verifyUnchangedNodes)
Checks that the scope roots marked as changed have indeed changed
|
static void |
NodeUtil.visitPostOrder(Node node,
NodeUtil.Visitor visitor,
com.google.common.base.Predicate<Node> traverseChildrenPred)
A post-order traversal, calling Visitor.visit for each child matching
the predicate.
|
static void |
NodeUtil.visitPreOrder(Node node,
NodeUtil.Visitor visitor,
com.google.common.base.Predicate<Node> traverseChildrenPred)
A pre-order traversal, calling Visitor.visit for each child matching
the predicate.
|
Constructor and Description |
---|
AliasedNode(Var aliasVar,
Node aliasReference) |
AliasedTypeNode(Var aliasVar,
Node aliasReference) |
AliasUsage(Var aliasVar,
Node aliasReference) |
Assign(Node assignNode,
Node nameNode,
boolean isPropertyAssign) |
AssignmentDefinition(Node node,
boolean inExterns) |
AssignmentProperty(Node node,
Var rootVar,
JSModule module) |
AstChange(JSModule module,
Scope scope,
Node node) |
AstControlFlowGraph(Node entry,
java.util.Map<DiGraph.DiGraphNode<Node,ControlFlowGraph.Branch>,java.lang.Integer> priorities,
boolean edgeAnnotations)
Constructor.
|
AstFunctionContents(Node n) |
BasicBlock(ReferenceCollectingCallback.BasicBlock parent,
Node root)
Creates a new block.
|
Bind(Node target,
Node thisValue,
Node parameters) |
Builder(Node node)
Sets the root node from which to generate the source code.
|
Cache(Node cacheObj,
Node key,
Node valueFn,
Node keyFn) |
Callsite(Node callsiteAstNode) |
CallSite(Node parent,
Node n,
Node callNode,
Node nextGetPropNode,
Node nextGetPropFirstChildNode) |
Candidate(java.lang.String varName,
MustBeReachingVariableDef.Definition defMetadata,
Node use,
Node useCfgNode) |
CheckClassAssignments(Node className) |
ClassDeclarationMetadata(Node insertionPoint,
java.lang.String fullClassName,
boolean anonymous,
Node classNameNode,
Node superClassNameNode) |
ClassDefiningFunctionNode(NameAnalyzer.JsName name,
Node node)
Create a class defining function node from the name & setter node
|
ClassDefinition(Node name,
JSDocInfo classInfo,
Node superClass,
ClosureRewriteClass.MemberDefinition constructor,
java.util.List<ClosureRewriteClass.MemberDefinition> staticProps,
java.util.List<ClosureRewriteClass.MemberDefinition> props,
Node classModifier) |
ClassStaticFunctionsInliner(Node root,
java.lang.String classFileName,
java.util.Set<java.lang.String> fnNamesToInline,
FunctionInjector.InliningMode inliningMode) |
Collapse(Node startNode,
Node endNode,
Node parent) |
Continuation(Node node,
Scope scope) |
ControlExitsCheck(Node finallyName,
int finallyStartState) |
CrossModuleMotionEnvironment(Node sourceNode,
JSModule sourceModule,
Node destinationNode,
JSModule destinationModule,
JSModuleGraph moduleGraph)
Creates a cross module code motion environment.
|
Declaration(JSModule module,
Node node) |
DeferredCheck(Node callSite,
JSType expectedRetType,
NTIScope callerScope,
NTIScope calleeScope) |
DeferredSetType(Node node,
JSType type) |
DefineInfo(Node initialValue,
Node initialValueParent)
Initializes a define.
|
Definition(Node node) |
DefinitionSite(Node node,
DefinitionsRemover.Definition definition,
JSModule module,
boolean inGlobalScope,
boolean inExterns) |
DotFormatter(Node n,
ControlFlowGraph<Node> cfg,
java.lang.Appendable builder,
boolean printAnnotations) |
ExceptionContext(int catchStartCase,
Node catchBlock) |
Export(java.lang.String symbolName,
Node value) |
ExternalNameOnlyDefinition(Node lValue) |
ExtractionInstance(ExtractPrototypeMemberDeclarations.PrototypeMemberDeclaration head,
Node parent) |
FindCallbackArgumentReferences(Node functionRoot,
java.util.List<Node> keyReferences,
java.util.List<Node> valueReferences,
boolean useArrayMode) |
Function(Node functionAstNode) |
FunctionArgumentDefinition(Node function,
Node argumentName,
boolean inExterns) |
FunctionDefinition(Node node,
boolean inExterns) |
FunctionExpression(Node fn,
int index) |
FunctionExpressionDefinition(Node node,
boolean inExterns) |
FunctionlessLocalScope(Node... ancestors) |
FunctionRecord(int id,
Node parent,
java.lang.String name) |
FunctionTypeBuilder(java.lang.String fnName,
AbstractCompiler compiler,
Node errorRoot,
TypedScope scope) |
FunctionVar(Node var) |
GlobalFunction(Node nameNode,
Var var,
JSModule module) |
GlobalNamespace(AbstractCompiler compiler,
Node root)
Creates an instance that may emit warnings when building the namespace.
|
GlobalNamespace(AbstractCompiler compiler,
Node externsRoot,
Node root)
Creates an instance that may emit warnings when building the namespace.
|
IncompleteDefinition(Node lValue,
boolean inExterns) |
InstanceOfCheckNode(NameAnalyzer.JsName name,
Node node)
Create an instanceof node from the name and parent node
|
IntraproceduralMotionEnvironment(ControlFlowGraph<Node> controlFlowGraph,
Node cfgSource,
Node cfgDestination)
Creates an intraprocedural motion environment.
|
J2clProperty(Node getKey,
Node setKey) |
JSError(java.lang.String sourceName,
Node node,
DiagnosticType type,
java.lang.String... arguments)
Creates a JSError for a source file location.
|
JSError(java.lang.String sourceName,
Node node,
int lineno,
int charno,
DiagnosticType type,
CheckLevel level,
java.lang.String... arguments)
Creates a JSError at a CheckLevel for a source file location.
|
JsMessageDefinition(Node messageNode)
Constructs JS message definition.
|
JsNameRefNode(NameAnalyzer.JsName name,
Node node)
Create a node that refers to a name
|
LiteralProperty(Node key,
Node value,
Node map,
Node assign,
Var rootVar,
JSModule module) |
LocalVarMotion(Node nameNode,
NodeIterators.FunctionlessLocalScope iterator) |
MalformedException(java.lang.String message,
Node node) |
Marker(Node startMarker,
Node endMarker) |
MeasuredNode(Node n,
int len,
boolean ch) |
MemberDefinition(JSDocInfo info,
Node name,
Node value) |
MemberDefinition(JSDocInfo info,
Node name,
Node value) |
MessageLocation(JsMessage message,
Node messageNode) |
ModuleDescription(Node n) |
ModuleGlobal(Node root,
Node name) |
NamedFunction(Node fn) |
NamedFunctionDefinition(Node node,
boolean inExterns) |
NameNodePair(java.lang.String name,
Node nodeForSourceInfo) |
NodeContext(java.lang.String name,
Node node,
Node functionNode,
Node target) |
NTIScope(Node root,
NTIScope parent,
java.util.List<java.lang.String> formals,
JSTypes commonTypes) |
ObjectLiteralCast(java.lang.String typeName,
Node objectNode,
DiagnosticType diagnosticType) |
ObjectLiteralPropertyDefinition(Node lit,
Node name,
Node value,
boolean isExtern) |
Parameter(Node arg,
boolean shouldRemove) |
PerformanceTracker(Node jsRoot,
CompilerOptions.TracerMode mode) |
PolymerClassDefinition(Node target,
Node descriptor,
JSDocInfo classInfo,
PolymerPass.MemberDefinition constructor,
java.lang.String nativeBaseElement,
java.util.List<PolymerPass.MemberDefinition> props,
com.google.common.collect.ImmutableList<PolymerBehaviorExtractor.BehaviorDefinition> behaviors) |
PolymerClassRewriter(AbstractCompiler compiler,
Node polymerElementExterns) |
PreprocessorSymbolTable(Node root) |
PropertyDef(Node defSite,
DeclaredFunctionType methodType,
NTIScope methodScope) |
PropertyExport(java.lang.String exportPath,
java.lang.String symbolName,
Node value) |
PropertyInfo(JSType type,
Node value) |
PrototypeMemberDeclaration(Node lhs,
Node node) |
PrototypeSetNode(NameAnalyzer.JsName name,
Node parent)
Create a set node from the name & setter node
|
ProvidedName(java.lang.String namespace,
Node node,
JSModule module,
boolean explicit) |
RecordTypePropertyDefinition(Node name) |
Reduction(Node parent,
Node oldChild,
Node newChild) |
Ref(JSModule module,
Scope scope,
Node node,
GlobalNamespace.Name name,
GlobalNamespace.Ref.Type type,
int index)
Creates a reference at the current node.
|
Reference(Node site) |
Reference(Node nameNode,
NodeTraversal t,
ReferenceCollectingCallback.BasicBlock basicBlock) |
Reference(Node nameNode,
ReferenceCollectingCallback.BasicBlock basicBlock,
Scope scope,
InputId inputId) |
Reference(Node callNode,
Scope scope,
JSModule module,
FunctionInjector.InliningMode mode) |
Reference(Node callNode,
Scope scope,
JSModule module,
FunctionInjector.InliningMode mode) |
Reference(SimpleSlot symbol,
Node node) |
Reference(SymbolTable.Symbol symbol,
Node node) |
RemovableAssignment(Node nameNode,
Node assignNode,
NodeTraversal traversal)
Data structure for information about a removable assignment.
|
Scope(Node rootNode) |
Scope(Scope parent,
Node rootNode)
Creates a Scope given the parent Scope and the root node of the scope.
|
SpecialReferenceNode(NameAnalyzer.JsName name,
Node node)
Create a special reference node.
|
StaticFieldGetterSetterInliner(Node root) |
StringOccurrence(Node node,
Node parent) |
StubDeclaration(Node node,
boolean isExtern,
java.lang.String ownerName) |
SubclassRelationship(CodingConvention.SubclassType type,
Node subclassNode,
Node superclassNode) |
SymbolExport(java.lang.String symbolName,
Node value) |
SymbolScope(Node rootNode,
SymbolTable.SymbolScope parent,
JSType typeOfThis,
SymbolTable.Symbol mySymbol) |
SyntheticAst(Node root) |
TemplateAstMatcher(AbstractCompiler compiler,
Node templateFunctionNode)
Constructs this matcher with a Function node that serves as the template
to match all other nodes against.
|
TemplateAstMatcher(AbstractCompiler compiler,
Node templateFunctionNode,
TypeMatchingStrategy typeMatchingStrategy)
Constructs this matcher with a Function node that serves as the template
to match all other nodes against.
|
TweakFunctionCall(ProcessTweaks.TweakFunction tweakFunc,
Node callNode) |
TweakFunctionCall(ProcessTweaks.TweakFunction tweakFunc,
Node callNode,
Node valueNode) |
TypedScope(Node rootNode,
boolean isBottom)
Creates a empty Scope (bottom of the lattice).
|
TypedScope(TypedScope parent,
Node rootNode) |
TypedVar(boolean inferred,
java.lang.String name,
Node nameNode,
JSType type,
TypedScope scope,
int index,
CompilerInput input) |
UnknownDefinition(Node lValue,
boolean inExterns) |
UnrecognizedRequire(Node requireNode,
java.lang.String namespace) |
UseSite(Node node,
Scope scope,
JSModule module) |
Var(java.lang.String name,
Node nameNode,
Scope scope,
int index,
CompilerInput input) |
VarDefinition(Node node,
boolean inExterns) |
Constructor and Description |
---|
AstControlFlowGraph(Node entry,
java.util.Map<DiGraph.DiGraphNode<Node,ControlFlowGraph.Branch>,java.lang.Integer> priorities,
boolean edgeAnnotations)
Constructor.
|
CallVisitor(java.util.Map<java.lang.String,InlineFunctions.FunctionState> fns,
java.util.Map<Node,java.lang.String> anonFns,
InlineFunctions.CallVisitorCallback callback) |
DotFormatter(Node n,
ControlFlowGraph<Node> cfg,
java.lang.Appendable builder,
boolean printAnnotations) |
EliminationPass(ControlFlowGraph<Node> cfg) |
Es6RenameReferences(java.util.Map<Node,java.util.Map<java.lang.String,java.lang.String>> renameMap) |
FindCallbackArgumentReferences(Node functionRoot,
java.util.List<Node> keyReferences,
java.util.List<Node> valueReferences,
boolean useArrayMode) |
FindCallbackArgumentReferences(Node functionRoot,
java.util.List<Node> keyReferences,
java.util.List<Node> valueReferences,
boolean useArrayMode) |
FindCandidatesReferences(java.util.Map<java.lang.String,InlineFunctions.FunctionState> fns,
java.util.Map<Node,java.lang.String> anonFns) |
FirstOrderFunctionAnalyzer(AbstractCompiler compiler,
java.util.Map<Node,FunctionTypeBuilder.AstFunctionContents> outParam) |
FunctionExpressionNamer(java.util.Map<Node,FunctionNames.FunctionRecord> functionMap) |
FunctionListExtractor(java.util.Map<Node,FunctionNames.FunctionRecord> functionMap) |
GetReplacementSideEffectSubexpressions(AbstractCompiler compiler,
java.util.List<Node> replacements)
Creates the accumulator.
|
IntraproceduralMotionEnvironment(ControlFlowGraph<Node> controlFlowGraph,
Node cfgSource,
Node cfgDestination)
Creates an intraprocedural motion environment.
|
LiveVariablesAnalysis(ControlFlowGraph<Node> cfg,
Scope jsScope,
AbstractCompiler compiler) |
MaybeReachingVariableUse(ControlFlowGraph<Node> cfg,
Scope jsScope,
AbstractCompiler compiler) |
MustBeReachingVariableDef(ControlFlowGraph<Node> cfg,
Scope jsScope,
AbstractCompiler compiler) |
ProcessDefines(AbstractCompiler compiler,
java.util.Map<java.lang.String,Node> replacements)
Create a pass that overrides define constants.
|
ProcessTweaks(AbstractCompiler compiler,
boolean stripTweaks,
java.util.Map<java.lang.String,Node> compilerDefaultValueOverrides) |
RawMotionEnvironment(java.util.Set<Node> environment) |
ShadowVariables(AbstractCompiler compiler,
java.util.Map<java.lang.String,RenameVars.Assignment> assignments,
java.util.SortedSet<RenameVars.Assignment> varsByFrequency,
java.util.Map<Node,java.lang.String> pseudoNameMap) |
TypeInference(AbstractCompiler compiler,
ControlFlowGraph<Node> cfg,
ReverseAbstractInterpreter reverseInterpreter,
TypedScope functionScope,
java.util.Map<java.lang.String,CodingConvention.AssertionFunctionSpec> assertionFunctionsMap) |
Modifier and Type | Field and Description |
---|---|
private com.google.common.collect.Ordering<Node> |
CheckRequiresAndProvidesSorted.alphabetical |
private com.google.common.base.Function<Node,java.lang.String> |
CheckRequiresAndProvidesSorted.getNamespace |
private java.util.Deque<Node> |
CheckUselessBlocks.loneBlocks |
private static com.google.common.base.Predicate<Node> |
CheckNullableReturn.NULLABLE_RETURN_PREDICATE |
private java.util.List<Node> |
CheckRequiresAndProvidesSorted.provides |
private java.util.List<Node> |
CheckRequiresAndProvidesSorted.requires |
Modifier and Type | Method and Description |
---|---|
private void |
CheckUselessBlocks.allowLoneBlock(Node parent)
Remove the enclosing block of a block-scoped declaration from the loneBlocks stack.
|
private void |
CheckEnums.checkDuplicateEnumValues(NodeTraversal t,
Node n) |
private void |
CheckJSDocStyle.checkInlineParams(NodeTraversal t,
Node function)
Checks that the inline type annotations are correct.
|
private void |
CheckJSDocStyle.checkMissingJsDoc(NodeTraversal t,
Node function) |
private void |
CheckEnums.checkName(NodeTraversal t,
Node node) |
private void |
CheckEnums.checkNamingAndAssignmentUsage(NodeTraversal t,
Node n) |
private boolean |
CheckJSDocStyle.checkParam(NodeTraversal t,
Node param,
java.lang.String name,
JSTypeExpression paramType)
Checks that the given parameter node has the given name, and that the given type is
compatible.
|
private void |
CheckJSDocStyle.checkParams(NodeTraversal t,
Node function,
JSDocInfo jsDoc) |
private void |
CheckJSDocStyle.checkReturn(NodeTraversal t,
Node function,
JSDocInfo jsDoc) |
private void |
CheckJSDocStyle.checkStyleForPrivateProperties(NodeTraversal t,
Node n) |
private void |
CheckJSDocStyle.checkSuppressionsOnNonFunction(NodeTraversal t,
Node n,
JSDocInfo jsDoc) |
private boolean |
CheckJSDocStyle.hasAnyInlineJsDoc(Node function) |
static boolean |
CheckNullableReturn.hasReturnDeclaredNullable(Node n) |
private static boolean |
CheckNullableReturn.hasSingleThrow(Node blockNode) |
void |
CheckUselessBlocks.hotSwapScript(Node scriptRoot,
Node originalRoot) |
void |
CheckNullableReturn.hotSwapScript(Node scriptRoot,
Node originalRoot) |
void |
CheckRequiresAndProvidesSorted.hotSwapScript(Node scriptRoot,
Node originalRoot) |
void |
CheckInterfaces.hotSwapScript(Node scriptRoot,
Node originalRoot) |
void |
CheckDuplicateCase.hotSwapScript(Node scriptRoot,
Node originalRoot) |
void |
CheckForInOverArray.hotSwapScript(Node scriptRoot,
Node originalRoot) |
void |
CheckPrototypeProperties.hotSwapScript(Node scriptRoot,
Node originalRoot) |
boolean |
CheckForInOverArray.isForInOverArray(Node n) |
private boolean |
CheckJSDocStyle.isFunctionThatShouldHaveJsDoc(NodeTraversal t,
Node function)
Whether the given function should have JSDoc.
|
boolean |
CheckForInOverArray.isGoogObjectIterationOverArray(Node n) |
private boolean |
CheckInterfaces.isInterface(Node n)
Whether a function is an interface constructor, or a method on an interface.
|
private boolean |
CheckUselessBlocks.isLoneBlock(Node n)
A lone block is a non-synthetic, not-added BLOCK that is a direct child of
another non-synthetic, not-added BLOCK or a SCRIPT node.
|
private static boolean |
CheckNullableReturn.isNullable(Node n) |
private static boolean |
CheckNullableReturn.isReturnTypeNullable(Node n) |
void |
CheckJSDocStyle.process(Node externs,
Node root) |
void |
CheckEmptyStatements.process(Node externs,
Node root) |
void |
CheckUselessBlocks.process(Node externs,
Node root) |
void |
CheckNullableReturn.process(Node externs,
Node root) |
void |
CheckRequiresAndProvidesSorted.process(Node externs,
Node root) |
void |
CheckInterfaces.process(Node externs,
Node root) |
void |
CheckDuplicateCase.process(Node externs,
Node root) |
void |
CheckForInOverArray.process(Node externs,
Node root) |
void |
CheckPrototypeProperties.process(Node externs,
Node root) |
void |
CheckEnums.process(Node externs,
Node root) |
boolean |
CheckJSDocStyle.FindNonTrivialReturn.shouldTraverse(NodeTraversal t,
Node n,
Node parent) |
boolean |
CheckJSDocStyle.ExternsCallback.shouldTraverse(NodeTraversal t,
Node n,
Node parent) |
boolean |
CheckUselessBlocks.shouldTraverse(NodeTraversal t,
Node n,
Node parent) |
boolean |
CheckNullableReturn.shouldTraverse(NodeTraversal nodeTraversal,
Node n,
Node parent) |
boolean |
CheckPrototypeProperties.shouldTraverse(NodeTraversal nodeTraversal,
Node n,
Node parent) |
void |
CheckJSDocStyle.visit(NodeTraversal t,
Node n,
Node parent) |
void |
CheckJSDocStyle.ExternsCallback.visit(NodeTraversal t,
Node n,
Node parent) |
void |
CheckEmptyStatements.visit(NodeTraversal t,
Node n,
Node parent) |
void |
CheckUselessBlocks.visit(NodeTraversal t,
Node n,
Node parent) |
void |
CheckNullableReturn.visit(NodeTraversal t,
Node n,
Node parent) |
void |
CheckRequiresAndProvidesSorted.visit(NodeTraversal t,
Node n,
Node parent) |
void |
CheckInterfaces.visit(NodeTraversal t,
Node n,
Node parent) |
void |
CheckDuplicateCase.visit(NodeTraversal t,
Node n,
Node parent) |
void |
CheckForInOverArray.visit(NodeTraversal t,
Node n,
Node parent) |
void |
CheckPrototypeProperties.visit(NodeTraversal t,
Node n,
Node parent) |
void |
CheckEnums.visit(NodeTraversal t,
Node n,
Node parent) |
private void |
CheckJSDocStyle.visitFunction(NodeTraversal t,
Node function,
Node parent) |
private void |
CheckJSDocStyle.visitNonFunction(NodeTraversal t,
Node n) |
Modifier and Type | Method and Description |
---|---|
static boolean |
CheckNullableReturn.canReturnNull(ControlFlowGraph<Node> graph) |
Modifier and Type | Field and Description |
---|---|
private Node |
RawNominalType.defSite |
private Node |
Property.defSite |
(package private) Node |
JSTypeCreatorFromJSDoc.ParamIterator.params
The PARAM_LIST node containing the function parameters.
|
Modifier and Type | Field and Description |
---|---|
private java.util.Map<Node,java.lang.String> |
JSTypeCreatorFromJSDoc.unknownTypeNames |
Modifier and Type | Method and Description |
---|---|
Node |
RawNominalType.getDefSite() |
(package private) Node |
JSTypeCreatorFromJSDoc.ParamIterator.getNode() |
Modifier and Type | Method and Description |
---|---|
java.util.Map<Node,java.lang.String> |
JSTypeCreatorFromJSDoc.getUnknownTypesMap() |
Modifier and Type | Method and Description |
---|---|
void |
RawNominalType.addClassProperty(java.lang.String pname,
Node defSite,
JSType type,
boolean isConstant)
Add a new non-optional declared property to instances of this class
|
void |
RawNominalType.addCtorProperty(java.lang.String pname,
Node defSite,
JSType type,
boolean isConstant)
Add a new non-optional declared property to this class's constructor
|
void |
Namespace.addProperty(java.lang.String pname,
Node defSite,
JSType type,
boolean isConstant)
Add a new non-optional declared property to this namespace
|
void |
RawNominalType.addProtoProperty(java.lang.String pname,
Node defSite,
JSType type,
boolean isConstant)
Add a new declared prototype property to this class
|
void |
RawNominalType.addUndeclaredClassProperty(java.lang.String pname,
JSType type,
Node defSite)
Add a new undeclared property to instances of this class
|
void |
RawNominalType.addUndeclaredCtorProperty(java.lang.String pname,
Node defSite)
Add a new undeclared property to this class's constructor
|
void |
Namespace.addUndeclaredProperty(java.lang.String pname,
Node defSite,
JSType t,
boolean isConstant)
Add a new undeclared property to this namespace
|
void |
RawNominalType.addUndeclaredProtoProperty(java.lang.String pname,
Node defSite)
Add a new undeclared prototype property to this class
|
private void |
JSTypeCreatorFromJSDoc.checkInvalidGenericsInstantiation(Node n) |
private void |
JSTypeCreatorFromJSDoc.fillInFormalParameterTypes(JSDocInfo jsdoc,
Node funNode,
com.google.common.collect.ImmutableList<java.lang.String> typeParameters,
DeclaredTypeRegistry registry,
FunctionTypeBuilder builder,
boolean ignoreJsdoc) |
private void |
JSTypeCreatorFromJSDoc.fillInFunTypeBuilder(Node jsdocNode,
RawNominalType ownerType,
DeclaredTypeRegistry registry,
com.google.common.collect.ImmutableList<java.lang.String> typeParameters,
FunctionTypeBuilder builder) |
private void |
JSTypeCreatorFromJSDoc.fillInReturnType(JSDocInfo jsdoc,
Node funNode,
Node parent,
com.google.common.collect.ImmutableList<java.lang.String> typeParameters,
DeclaredTypeRegistry registry,
FunctionTypeBuilder builder,
boolean ignoreJsdoc) |
static QualifiedName |
QualifiedName.fromNode(Node qnameNode) |
JSTypeCreatorFromJSDoc.FunctionAndSlotType |
JSTypeCreatorFromJSDoc.getFunctionType(JSDocInfo jsdoc,
java.lang.String functionName,
Node declNode,
RawNominalType constructorType,
RawNominalType ownerType,
DeclaredTypeRegistry registry)
Consumes either a "classic" function jsdoc with @param, @return, etc,
or a jsdoc with @type {function ...} and finds the types of the formal
parameters and the return value.
|
private DeclaredFunctionType |
JSTypeCreatorFromJSDoc.getFunTypeFromTypicalFunctionJsdoc(JSDocInfo jsdoc,
java.lang.String functionName,
Node funNode,
RawNominalType constructorType,
RawNominalType ownerType,
DeclaredTypeRegistry registry,
FunctionTypeBuilder builder) |
private JSType |
JSTypeCreatorFromJSDoc.getFunTypeHelper(Node jsdocNode,
DeclaredTypeRegistry registry,
com.google.common.collect.ImmutableList<java.lang.String> typeParameters) |
private NominalType |
JSTypeCreatorFromJSDoc.getMaybeParentClass(JSDocInfo jsdoc,
java.lang.String functionName,
Node funNode,
com.google.common.collect.ImmutableList<java.lang.String> typeParameters,
DeclaredTypeRegistry registry) |
private JSType |
JSTypeCreatorFromJSDoc.getMaybeTypeFromComment(Node n,
DeclaredTypeRegistry registry,
com.google.common.collect.ImmutableList<java.lang.String> typeParameters) |
private JSType |
JSTypeCreatorFromJSDoc.getNamedTypeHelper(Node n,
DeclaredTypeRegistry registry,
com.google.common.collect.ImmutableList<java.lang.String> outerTypeParameters) |
private JSType |
JSTypeCreatorFromJSDoc.getNominalTypeHelper(RawNominalType rawType,
Node n,
DeclaredTypeRegistry registry,
com.google.common.collect.ImmutableList<java.lang.String> outerTypeParameters) |
private JSType |
JSTypeCreatorFromJSDoc.getRecordTypeHelper(Node n,
DeclaredTypeRegistry registry,
com.google.common.collect.ImmutableList<java.lang.String> typeParameters) |
private JSType |
JSTypeCreatorFromJSDoc.getThisOrNewType(Node n,
DeclaredTypeRegistry registry,
com.google.common.collect.ImmutableList<java.lang.String> typeParameters) |
private JSType |
JSTypeCreatorFromJSDoc.getTypeFromComment(Node n,
DeclaredTypeRegistry registry,
com.google.common.collect.ImmutableList<java.lang.String> typeParameters) |
private JSType |
JSTypeCreatorFromJSDoc.getTypeFromCommentHelper(Node n,
DeclaredTypeRegistry registry,
com.google.common.collect.ImmutableList<java.lang.String> typeParameters) |
private void |
JSTypeCreatorFromJSDoc.handleConstructorAnnotation(java.lang.String functionName,
Node funNode,
RawNominalType constructorType,
NominalType parentClass,
com.google.common.collect.ImmutableSet<NominalType> implementedIntfs,
DeclaredTypeRegistry registry,
FunctionTypeBuilder builder) |
private void |
JSTypeCreatorFromJSDoc.handleInterfaceAnnotation(JSDocInfo jsdoc,
java.lang.String functionName,
Node funNode,
RawNominalType constructorType,
com.google.common.collect.ImmutableSet<NominalType> implementedIntfs,
com.google.common.collect.ImmutableList<java.lang.String> typeParameters,
DeclaredTypeRegistry registry,
FunctionTypeBuilder builder) |
private static boolean |
RawNominalType.isBuiltinHelper(java.lang.String nameToCheck,
java.lang.String builtinName,
Node defSite) |
private boolean |
JSTypeCreatorFromJSDoc.isUnionWithUndefined(Node n) |
private JSType |
JSTypeCreatorFromJSDoc.lookupTypeByName(java.lang.String name,
Node n,
DeclaredTypeRegistry registry,
com.google.common.collect.ImmutableList<java.lang.String> outerTypeParameters) |
(package private) static Property |
Property.makeConstant(Node defSite,
JSType inferredType,
JSType declaredType) |
static RawNominalType |
RawNominalType.makeDictClass(Node defSite,
java.lang.String name,
com.google.common.collect.ImmutableList<java.lang.String> typeParameters) |
static RawNominalType |
RawNominalType.makeNominalInterface(Node defSite,
java.lang.String name,
com.google.common.collect.ImmutableList<java.lang.String> typeParameters) |
(package private) static Property |
Property.makeOptional(Node defSite,
JSType inferredType,
JSType declaredType) |
static RawNominalType |
RawNominalType.makeStructClass(Node defSite,
java.lang.String name,
com.google.common.collect.ImmutableList<java.lang.String> typeParameters) |
static RawNominalType |
RawNominalType.makeStructuralInterface(Node defSite,
java.lang.String name,
com.google.common.collect.ImmutableList<java.lang.String> typeParameters) |
static RawNominalType |
RawNominalType.makeUnrestrictedClass(Node defSite,
java.lang.String name,
com.google.common.collect.ImmutableList<java.lang.String> typeParameters) |
(package private) static Property |
Property.makeWithDefsite(Node defSite,
JSType inferredType,
JSType declaredType) |
private JSTypeCreatorFromJSDoc.ParameterType |
JSTypeCreatorFromJSDoc.parseParameter(Node jsdoc,
JSTypeCreatorFromJSDoc.ParameterKind p,
DeclaredTypeRegistry registry,
com.google.common.collect.ImmutableList<java.lang.String> typeParameters) |
Constructor and Description |
---|
ParamIterator(Node params,
JSDocInfo jsdoc) |
Property(Node defSite,
JSType inferredType,
JSType declaredType,
Property.Attribute attribute) |
RawNominalType(Node defSite,
java.lang.String name,
com.google.common.collect.ImmutableList<java.lang.String> typeParameters,
RawNominalType.Kind kind,
ObjectKind objectKind) |
Modifier and Type | Field and Description |
---|---|
Node |
ParserRunner.ParseResult.ast |
private Node |
IRFactory.resultNode |
private Node |
JsDocInfoParser.templateNode |
private Node |
IRFactory.templateNode |
private Node |
TypeTransformationParser.typeTransformationAst |
Modifier and Type | Method and Description |
---|---|
private Node |
IRFactory.cloneProps(Node n)
Clone the properties from the template node recursively, skips nodes that
have properties already.
|
private Node |
IRFactory.TransformDispatcher.convertTypeTree(ParseTree typeTree) |
private Node |
IRFactory.TransformDispatcher.createIncrDecrNode(int type,
boolean postfix,
Node operand) |
private Node |
IRFactory.TransformDispatcher.createMissingExpressionNode() |
private Node |
IRFactory.TransformDispatcher.createMissingNameNode() |
private Node |
JsDocInfoParser.createTemplateNode() |
private Node |
IRFactory.createTemplateNode() |
private Node |
TypeTransformationParser.getCallArgument(Node n,
int i) |
private Node |
TypeTransformationParser.getFunctionBody(Node n) |
(package private) Node |
IRFactory.getResultNode() |
Node |
TypeTransformationParser.getTypeTransformationAst() |
private Node |
IRFactory.justTransform(ParseTree node) |
private Node |
IRFactory.maybeInjectCastNode(ParseTree node,
JSDocInfo info,
Node irNode) |
private Node |
JsDocInfoParser.newNode(int type) |
private Node |
IRFactory.newNode(int type) |
private Node |
IRFactory.newNode(int type,
Node child1) |
private Node |
IRFactory.newNode(int type,
Node child1,
Node child2) |
private Node |
IRFactory.newNode(int type,
Node child1,
Node child2,
Node child3) |
private Node |
IRFactory.newNumberNode(java.lang.Double value) |
private Node |
IRFactory.newStringNode(int type,
java.lang.String value) |
private Node |
JsDocInfoParser.newStringNode(java.lang.String s) |
private Node |
IRFactory.newStringNode(java.lang.String value) |
private Node |
JsDocInfoParser.newStringNode(java.lang.String s,
int lineno,
int charno) |
private Node |
JsDocInfoParser.parseAndRecordParamTypeNode(JsDocToken token)
Looks for a type expression at the current token and if found,
returns it.
|
private Node |
JsDocInfoParser.parseAndRecordTypeNameNode(JsDocToken token,
int lineno,
int startCharno,
boolean matchingLC)
Looks for a type expression at the current token and if found,
returns it.
|
(package private) Node |
JsDocInfoParser.parseAndRecordTypeNode(JsDocToken token)
Looks for a type expression at the current token and if found,
returns it.
|
private Node |
JsDocInfoParser.parseAndRecordTypeNode(JsDocToken token,
int lineno,
int startCharno,
boolean matchingLC,
boolean onlyParseSimpleNames)
Looks for a parameter type expression at the current token and if found,
returns it.
|
private Node |
JsDocInfoParser.parseBasicTypeExpression(JsDocToken token)
BasicTypeExpression := '*' | 'null' | 'undefined' | TypeName
| FunctionType | UnionType | RecordType
|
private Node |
JsDocInfoParser.parseContextTypeExpression(JsDocToken token)
ContextTypeExpression := BasicTypeExpression | '?'
For expressions on the right hand side of a this: or new:
|
private Node |
JsDocInfoParser.parseFieldName(JsDocToken token)
FieldName := NameExpression | StringLiteral | NumberLiteral |
ReservedIdentifier
|
private Node |
JsDocInfoParser.parseFieldType(JsDocToken token)
FieldType := FieldName | FieldName ':' TypeExpression
|
private Node |
JsDocInfoParser.parseFieldTypeList(JsDocToken token)
FieldTypeList := FieldType | FieldType ',' FieldTypeList
|
private Node |
JsDocInfoParser.parseFunctionType(JsDocToken token)
FunctionType := 'function' FunctionSignatureType
FunctionSignatureType :=
TypeParameters '(' 'this' ':' TypeName, ParametersType ')' ResultType
|
private Node |
JsDocInfoParser.parseParametersType(JsDocToken token)
ParametersType := RestParameterType | NonRestParametersType
| NonRestParametersType ',' RestParameterType
RestParameterType := '...' Identifier
NonRestParametersType := ParameterType ',' NonRestParametersType
| ParameterType
| OptionalParametersType
OptionalParametersType := OptionalParameterType
| OptionalParameterType, OptionalParametersType
OptionalParameterType := ParameterType=
ParameterType := TypeExpression | Identifier ':' TypeExpression
|
private Node |
JsDocInfoParser.parseParamTypeExpression(JsDocToken token)
ParamTypeExpression :=
OptionalParameterType |
TopLevelTypeExpression |
'...' TopLevelTypeExpression
OptionalParameterType :=
TopLevelTypeExpression '='
|
private Node |
JsDocInfoParser.parseParamTypeExpressionAnnotation(JsDocToken token)
ParamTypeExpressionAnnotation := '{' ParamTypeExpression '}'
|
private Node |
JsDocInfoParser.parseRecordType(JsDocToken token)
RecordType := '{' FieldTypeList '}'
|
private Node |
JsDocInfoParser.parseResultType()
ResultType :=
|
private Node |
JsDocInfoParser.parseTopLevelTypeExpression(JsDocToken token)
TopLevelTypeExpression := TypeExpression
| TypeUnionList
We made this rule up, for the sake of backwards compatibility.
|
private Node |
JsDocInfoParser.parseTypeExpression(JsDocToken token)
TypeExpression := BasicTypeExpression
| '?' BasicTypeExpression
| '!' BasicTypeExpression
| BasicTypeExpression '?'
| BasicTypeExpression '!'
| '?'
|
private Node |
JsDocInfoParser.parseTypeExpressionAnnotation(JsDocToken token)
TypeExpressionAnnotation := TypeExpression |
'{' TopLevelTypeExpression '}'
|
private Node |
JsDocInfoParser.parseTypeExpressionList(JsDocToken token)
TypeExpressionList := TopLevelTypeExpression
| TopLevelTypeExpression ',' TypeExpressionList
|
private Node |
JsDocInfoParser.parseTypeName(JsDocToken token)
TypeName := NameExpression | NameExpression TypeApplication
TypeApplication := '.<' TypeExpressionList '>'
|
private Node |
JsDocInfoParser.parseTypeNameAnnotation(JsDocToken token)
TypeNameAnnotation := TypeName | '{' TypeName '}'
|
static Node |
JsDocInfoParser.parseTypeString(java.lang.String typeString)
Parses a string containing a JsDoc type declaration, returning the
type if the parsing succeeded or
null if it failed. |
private Node |
JsDocInfoParser.parseUnionType(JsDocToken token)
UnionType := '(' TypeUnionList ')'
TypeUnionList := TypeExpression | TypeExpression '|' TypeUnionList
We've removed the empty union type.
|
private Node |
JsDocInfoParser.parseUnionTypeWithAlternate(JsDocToken token,
Node alternate)
Create a new union type, with an alternate that has already been
parsed.
|
Node |
IRFactory.TransformDispatcher.process(ParseTree node) |
(package private) Node |
IRFactory.TransformDispatcher.processAmbientDeclaration(AmbientDeclarationTree tree) |
(package private) Node |
IRFactory.TransformDispatcher.processArrayLiteral(ArrayLiteralExpressionTree tree) |
(package private) Node |
IRFactory.TransformDispatcher.processArrayPattern(ArrayPatternTree tree) |
(package private) Node |
IRFactory.TransformDispatcher.processArrayType(ArrayTypeTree tree) |
(package private) Node |
IRFactory.TransformDispatcher.processAssignmentRestElement(AssignmentRestElementTree tree) |
(package private) Node |
IRFactory.TransformDispatcher.processAstRoot(ProgramTree rootNode) |
(package private) Node |
IRFactory.TransformDispatcher.processBinaryExpression(BinaryOperatorTree exprNode) |
(package private) Node |
IRFactory.TransformDispatcher.processBlock(BlockTree blockNode) |
(package private) Node |
IRFactory.TransformDispatcher.processBooleanLiteral(LiteralExpressionTree literal) |
(package private) Node |
IRFactory.TransformDispatcher.processBreakStatement(BreakStatementTree statementNode) |
(package private) Node |
IRFactory.TransformDispatcher.processCallSignature(CallSignatureTree tree) |
(package private) Node |
IRFactory.TransformDispatcher.processCatchClause(CatchTree clauseNode) |
(package private) Node |
IRFactory.TransformDispatcher.processClassDeclaration(ClassDeclarationTree tree) |
(package private) Node |
IRFactory.TransformDispatcher.processCommaExpression(CommaExpressionTree tree) |
(package private) Node |
IRFactory.TransformDispatcher.processComprehension(ComprehensionTree tree) |
(package private) Node |
IRFactory.TransformDispatcher.processComprehensionFor(ComprehensionForTree tree) |
(package private) Node |
IRFactory.TransformDispatcher.processComprehensionIf(ComprehensionIfTree tree) |
(package private) Node |
IRFactory.TransformDispatcher.processComputedPropertyDefinition(ComputedPropertyDefinitionTree tree) |
(package private) Node |
IRFactory.TransformDispatcher.processComputedPropertyGetter(ComputedPropertyGetterTree tree) |
(package private) Node |
IRFactory.TransformDispatcher.processComputedPropertyMemberVariable(ComputedPropertyMemberVariableTree tree) |
(package private) Node |
IRFactory.TransformDispatcher.processComputedPropertyMethod(ComputedPropertyMethodTree tree) |
(package private) Node |
IRFactory.TransformDispatcher.processComputedPropertySetter(ComputedPropertySetterTree tree) |
(package private) Node |
IRFactory.TransformDispatcher.processConditionalExpression(ConditionalExpressionTree exprNode) |
(package private) Node |
IRFactory.TransformDispatcher.processContinueStatement(ContinueStatementTree statementNode) |
(package private) Node |
IRFactory.TransformDispatcher.processDebuggerStatement(DebuggerStatementTree node) |
(package private) Node |
IRFactory.TransformDispatcher.processDefaultParameter(DefaultParameterTree tree) |
(package private) Node |
IRFactory.TransformDispatcher.processDoLoop(DoWhileStatementTree loopNode) |
(package private) Node |
IRFactory.TransformDispatcher.processElementGet(MemberLookupExpressionTree getNode) |
(package private) Node |
IRFactory.TransformDispatcher.processEmptyStatement(EmptyStatementTree exprNode) |
(package private) Node |
IRFactory.TransformDispatcher.processEnumDeclaration(EnumDeclarationTree tree) |
(package private) Node |
IRFactory.TransformDispatcher.processExportDecl(ExportDeclarationTree tree) |
(package private) Node |
IRFactory.TransformDispatcher.processExportSpec(ExportSpecifierTree tree) |
(package private) Node |
IRFactory.TransformDispatcher.processExpressionStatement(ExpressionStatementTree statementNode) |
(package private) Node |
IRFactory.TransformDispatcher.processFinally(FinallyTree finallyNode) |
(package private) Node |
IRFactory.TransformDispatcher.processForInLoop(ForInStatementTree loopNode) |
(package private) Node |
IRFactory.TransformDispatcher.processForLoop(ForStatementTree loopNode) |
(package private) Node |
IRFactory.TransformDispatcher.processFormalParameterList(FormalParameterListTree tree) |
(package private) Node |
IRFactory.TransformDispatcher.processForOf(ForOfStatementTree loopNode) |
(package private) Node |
IRFactory.TransformDispatcher.processFunction(FunctionDeclarationTree functionTree) |
(package private) Node |
IRFactory.TransformDispatcher.processFunctionCall(CallExpressionTree callNode) |
(package private) Node |
IRFactory.TransformDispatcher.processFunctionType(FunctionTypeTree tree) |
(package private) Node |
IRFactory.TransformDispatcher.processGenericTypeList(GenericTypeListTree tree) |
(package private) Node |
IRFactory.TransformDispatcher.processGetAccessor(GetAccessorTree tree) |
(package private) Node |
IRFactory.TransformDispatcher.processIfStatement(IfStatementTree statementNode) |
(package private) Node |
IRFactory.TransformDispatcher.processIllegalToken(ParseTree node) |
(package private) Node |
IRFactory.TransformDispatcher.processImportDecl(ImportDeclarationTree tree) |
(package private) Node |
IRFactory.TransformDispatcher.processImportSpec(ImportSpecifierTree tree) |
(package private) Node |
IRFactory.TransformDispatcher.processIndexSignature(IndexSignatureTree tree) |
(package private) Node |
IRFactory.TransformDispatcher.processInterfaceDeclaration(InterfaceDeclarationTree tree) |
(package private) Node |
IRFactory.TransformDispatcher.processLabeledStatement(LabelledStatementTree labelTree) |
(package private) Node |
IRFactory.TransformDispatcher.processLiteralExpression(LiteralExpressionTree expr) |
(package private) Node |
IRFactory.TransformDispatcher.processMemberVariable(MemberVariableTree tree) |
(package private) Node |
IRFactory.TransformDispatcher.processMissingExpression(MissingPrimaryExpressionTree tree) |
(package private) Node |
IRFactory.TransformDispatcher.processModuleImport(ModuleImportTree tree) |
(package private) Node |
IRFactory.TransformDispatcher.processName(IdentifierExpressionTree nameNode) |
(package private) Node |
IRFactory.TransformDispatcher.processName(IdentifierExpressionTree nameNode,
boolean asString) |
(package private) Node |
IRFactory.TransformDispatcher.processName(IdentifierToken identifierToken) |
(package private) Node |
IRFactory.TransformDispatcher.processName(IdentifierToken identifierToken,
boolean asString) |
(package private) Node |
IRFactory.TransformDispatcher.processNamespaceDeclaration(NamespaceDeclarationTree tree) |
(package private) Node |
IRFactory.TransformDispatcher.processNamespaceName(NamespaceNameTree name) |
(package private) Node |
IRFactory.TransformDispatcher.processNameWithInlineJSDoc(IdentifierToken identifierToken) |
(package private) Node |
IRFactory.TransformDispatcher.processNewExpression(NewExpressionTree exprNode) |
(package private) Node |
IRFactory.TransformDispatcher.processNull(NullTree literal) |
(package private) Node |
IRFactory.TransformDispatcher.processNullLiteral(LiteralExpressionTree literal) |
(package private) Node |
IRFactory.TransformDispatcher.processNumberLiteral(LiteralExpressionTree literalNode) |
(package private) Node |
IRFactory.TransformDispatcher.processObjectLiteral(ObjectLiteralExpressionTree objTree) |
private Node |
IRFactory.TransformDispatcher.processObjectLitKeyAsString(Token token)
Transforms the given node and then sets its type to Token.STRING if it
was Token.NAME.
|
(package private) Node |
IRFactory.TransformDispatcher.processObjectPattern(ObjectPatternTree tree) |
(package private) Node |
IRFactory.TransformDispatcher.processOptionalParameter(OptionalParameterTree optionalParam) |
(package private) Node |
IRFactory.TransformDispatcher.processParameterizedType(ParameterizedTypeTree tree) |
(package private) Node |
IRFactory.TransformDispatcher.processParenthesizedExpression(ParenExpressionTree exprNode) |
(package private) Node |
IRFactory.TransformDispatcher.processPostfixExpression(PostfixExpressionTree exprNode) |
(package private) Node |
IRFactory.TransformDispatcher.processPropertyGet(MemberExpressionTree getNode) |
(package private) Node |
IRFactory.TransformDispatcher.processPropertyNameAssignment(PropertyNameAssignmentTree tree) |
(package private) Node |
IRFactory.TransformDispatcher.processRecordType(RecordTypeTree tree) |
(package private) Node |
IRFactory.TransformDispatcher.processRegExpLiteral(LiteralExpressionTree literalTree) |
(package private) Node |
IRFactory.TransformDispatcher.processRestParameter(RestParameterTree tree) |
(package private) Node |
IRFactory.TransformDispatcher.processReturnStatement(ReturnStatementTree statementNode) |
(package private) Node |
IRFactory.TransformDispatcher.processSetAccessor(SetAccessorTree tree) |
(package private) Node |
IRFactory.TransformDispatcher.processSpreadExpression(SpreadExpressionTree tree) |
(package private) Node |
IRFactory.TransformDispatcher.processString(LiteralToken token) |
(package private) Node |
IRFactory.TransformDispatcher.processStringLiteral(LiteralExpressionTree literalTree) |
(package private) Node |
IRFactory.TransformDispatcher.processSuper(SuperExpressionTree tree) |
(package private) Node |
IRFactory.TransformDispatcher.processSwitchCase(CaseClauseTree caseNode) |
(package private) Node |
IRFactory.TransformDispatcher.processSwitchDefault(DefaultClauseTree caseNode) |
(package private) Node |
IRFactory.TransformDispatcher.processSwitchStatement(SwitchStatementTree statementNode) |
(package private) Node |
IRFactory.TransformDispatcher.processTemplateLiteral(TemplateLiteralExpressionTree tree) |
(package private) Node |
IRFactory.TransformDispatcher.processTemplateLiteralPortion(TemplateLiteralPortionTree tree) |
(package private) Node |
IRFactory.TransformDispatcher.processTemplateLiteralToken(LiteralToken token) |
(package private) Node |
IRFactory.TransformDispatcher.processTemplateSubstitution(TemplateSubstitutionTree tree) |
(package private) Node |
IRFactory.TransformDispatcher.processThisExpression(ThisExpressionTree node) |
(package private) Node |
IRFactory.TransformDispatcher.processThrowStatement(ThrowStatementTree statementNode) |
(package private) Node |
IRFactory.TransformDispatcher.processTryStatement(TryStatementTree statementNode) |
(package private) Node |
IRFactory.TransformDispatcher.processTypeAlias(TypeAliasTree tree) |
(package private) Node |
IRFactory.TransformDispatcher.processTypedParameter(TypedParameterTree typeAnnotation) |
(package private) Node |
IRFactory.TransformDispatcher.processTypeName(TypeNameTree tree) |
(package private) Node |
IRFactory.TransformDispatcher.processTypeQuery(TypeQueryTree tree) |
(package private) Node |
IRFactory.TransformDispatcher.processUnaryExpression(UnaryExpressionTree exprNode) |
(package private) Node |
IRFactory.TransformDispatcher.processUnionType(UnionTypeTree tree) |
(package private) Node |
IRFactory.TransformDispatcher.processVariableDeclaration(VariableDeclarationTree decl) |
(package private) Node |
IRFactory.TransformDispatcher.processVariableDeclarationList(VariableDeclarationListTree decl) |
(package private) Node |
IRFactory.TransformDispatcher.processVariableStatement(VariableStatementTree stmt) |
(package private) Node |
IRFactory.TransformDispatcher.processWhileLoop(WhileStatementTree stmt) |
(package private) Node |
IRFactory.TransformDispatcher.processWithStatement(WithStatementTree stmt) |
(package private) Node |
IRFactory.TransformDispatcher.processYield(YieldExpressionTree tree) |
private Node |
JsDocInfoParser.reportGenericTypeSyntaxWarning() |
private Node |
JsDocInfoParser.reportTypeSyntaxWarning(java.lang.String warning) |
private Node |
IRFactory.TransformDispatcher.safeProcessName(IdentifierToken identifierToken) |
private Node |
IRFactory.transform(ParseTree tree) |
private Node |
IRFactory.transformBlock(ParseTree node) |
(package private) Node |
IRFactory.TransformDispatcher.transformLabelName(IdentifierToken token) |
private Node |
IRFactory.TransformDispatcher.transformList(int type,
com.google.common.collect.ImmutableList<ParseTree> list) |
private Node |
IRFactory.TransformDispatcher.transformListOrEmpty(int type,
com.google.common.collect.ImmutableList<ParseTree> list) |
private Node |
IRFactory.transformNodeWithInlineJsDoc(ParseTree node)
Names and destructuring patterns, in parameters or variable declarations are special,
because they can have inline type docs attached.
|
private Node |
IRFactory.transformNumberAsString(LiteralToken token) |
(package private) Node |
IRFactory.TransformDispatcher.transformOrEmpty(IdentifierToken token,
ParseTree parent) |
(package private) Node |
IRFactory.TransformDispatcher.transformOrEmpty(ParseTree tree,
ParseTree parent) |
(package private) Node |
IRFactory.TransformDispatcher.unsupportedLanguageFeature(ParseTree node,
java.lang.String feature) |
private Node |
JsDocInfoParser.wrapNode(int type,
Node n) |
Modifier and Type | Method and Description |
---|---|
private void |
TypeTransformationParser.addNewWarning(java.lang.String messageId,
java.lang.String messageArg,
Node nodeWarning) |
private boolean |
TypeTransformationParser.checkParameterCount(Node expr,
TypeTransformationParser.Keywords keyword) |
private Node |
IRFactory.cloneProps(Node n)
Clone the properties from the template node recursively, skips nodes that
have properties already.
|
private Node |
IRFactory.TransformDispatcher.createIncrDecrNode(int type,
boolean postfix,
Node operand) |
(package private) JSTypeExpression |
JsDocInfoParser.createJSTypeExpression(Node n)
Constructs a new
JSTypeExpression . |
private Node |
TypeTransformationParser.getCallArgument(Node n,
int i) |
private java.lang.String |
TypeTransformationParser.getCallName(Node n) |
private int |
TypeTransformationParser.getCallParamCount(Node n) |
private Node |
TypeTransformationParser.getFunctionBody(Node n) |
private int |
TypeTransformationParser.getFunctionParamCount(Node n) |
private boolean |
TypeTransformationParser.isBooleanOperation(Node n) |
private static boolean |
IRFactory.isBreakTarget(Node n) |
private static boolean |
IRFactory.isContinueTarget(Node n) |
private boolean |
IRFactory.TransformDispatcher.isDirective(Node n) |
private boolean |
TypeTransformationParser.isOperation(Node n) |
private boolean |
TypeTransformationParser.isTypeName(Node n) |
private boolean |
TypeTransformationParser.isTypeVar(Node n) |
private boolean |
TypeTransformationParser.isValidExpression(Node e)
A valid expression is either:
- NAME for a type variable
- STRING for a type name
- CALL for the other expressions
|
private boolean |
TypeTransformationParser.isValidStringParam(Node expr) |
private static boolean |
IRFactory.labelsMatch(Node label,
Node labelName) |
private Node |
IRFactory.maybeInjectCastNode(ParseTree node,
JSDocInfo info,
Node irNode) |
(package private) void |
IRFactory.TransformDispatcher.maybeProcessAccessibilityModifier(Node n,
ParseTree tree,
TokenType type) |
private void |
IRFactory.TransformDispatcher.maybeProcessGenerics(Node n,
GenericTypeListTree generics) |
private void |
IRFactory.TransformDispatcher.maybeProcessType(Node typeTarget,
ParseTree typeTree) |
private void |
IRFactory.maybeSetLength(Node node,
SourcePosition start,
SourcePosition end) |
private void |
IRFactory.maybeSetLengthFrom(Node node,
Node ref) |
private void |
IRFactory.TransformDispatcher.maybeWarnKeywordProperty(Node node) |
private Node |
IRFactory.newNode(int type,
Node child1) |
private Node |
IRFactory.newNode(int type,
Node child1,
Node child2) |
private Node |
IRFactory.newNode(int type,
Node child1,
Node child2,
Node child3) |
private void |
IRFactory.TransformDispatcher.parseDirectives(Node node)
Parse the directives, encode them in the AST, and remove their nodes.
|
private Node |
JsDocInfoParser.parseUnionTypeWithAlternate(JsDocToken token,
Node alternate)
Create a new union type, with an alternate that has already been
parsed.
|
private void |
JsDocInfoParser.recordTypeNode(int lineno,
int startCharno,
Node typeAst,
boolean matchingLC) |
private void |
IRFactory.setFileOverviewJsDoc(Node irNode) |
private void |
IRFactory.setSourceInfo(Node node,
Node ref) |
private void |
IRFactory.setSourceInfo(Node irNode,
ParseTree node) |
private void |
IRFactory.setSourceInfo(Node node,
SourcePosition start,
SourcePosition end) |
private void |
IRFactory.setSourceInfo(Node irNode,
Token token) |
private boolean |
TypeTransformationParser.validAllTypeExpression(Node expr)
An all type expression must be of the form: all()
|
private void |
IRFactory.validate(Node n) |
private void |
IRFactory.validateAll(Node n) |
private void |
IRFactory.validateBreakContinue(Node n) |
private void |
IRFactory.validateLabel(Node n) |
private void |
IRFactory.validateParameters(Node n) |
private void |
IRFactory.validateReturn(Node n) |
private boolean |
TypeTransformationParser.validBooleanExpression(Node expr)
A boolean expression must be a boolean predicate or a boolean
type predicate
|
private boolean |
TypeTransformationParser.validBooleanOperation(Node expr) |
private boolean |
TypeTransformationParser.validConditionalExpression(Node expr)
A conditional type transformation expression must be of the
form cond(BoolExp, TTLExp, TTLExp)
|
private boolean |
TypeTransformationParser.validInstanceOfExpression(Node expr)
A typeOfVar expression must be of the form instanceOf('name')
|
private boolean |
TypeTransformationParser.validMaprecordExpression(Node expr)
A maprecord type transformation expression must be of the form
maprecord(TTLExp, (typevar, typevar) => TTLExp).
|
private boolean |
TypeTransformationParser.validMapunionExpression(Node expr)
A mapunion type transformation expression must be of the form
mapunion(TTLExp, (typevar) => TTLExp).
|
private boolean |
TypeTransformationParser.validNativeTypeExpr(Node expr) |
private boolean |
TypeTransformationParser.validNoneTypeExpression(Node expr)
A none type expression must be of the form: none()
|
private boolean |
TypeTransformationParser.validOperationExpression(Node expr)
An operation expression is a cond or a mapunion
|
private boolean |
TypeTransformationParser.validPrintTypeExpression(Node expr) |
private boolean |
TypeTransformationParser.validPropTypeExpression(Node expr) |
private boolean |
TypeTransformationParser.validRawTypeOfTypeExpression(Node expr)
A raw type expression must be of the form rawTypeOf(TTLExp)
|
private boolean |
TypeTransformationParser.validRecordParam(Node expr)
A record must be a valid type transformation expression or a node of the form:
{prop:TTLExp, prop:TTLExp, ...}
Notice that the values are mandatory and they must be valid type
transformation expressions
|
private boolean |
TypeTransformationParser.validRecordTypeExpression(Node expr)
A record type expression must be of the form:
record(RecordExp, RecordExp, ...)
|
private boolean |
TypeTransformationParser.validStringPredicate(Node expr,
int paramCount) |
private boolean |
TypeTransformationParser.validTemplateTypeExpression(Node expr)
A template type expression must be of the form type(typename, TTLExp,...)
or type(typevar, TTLExp...)
|
private boolean |
TypeTransformationParser.validTemplateTypeOfExpression(Node expr)
A template type of expression must be of the form
templateTypeOf(TTLExp, index)
|
private boolean |
TypeTransformationParser.validTypeExpression(Node expr)
A TTL type expression must be a union type, a template type, a record type
or any of the type predicates (none, rawTypeOf, templateTypeOf).
|
private boolean |
TypeTransformationParser.validTypeOfVarExpression(Node expr)
A typeOfVar expression must be of the form typeOfVar('name')
|
private boolean |
TypeTransformationParser.validTypePredicate(Node expr,
int paramCount) |
private boolean |
TypeTransformationParser.validTypeTransformationExpression(Node expr)
Checks the structure of the AST of a type transformation expression
in @template T := TTLExp =:
|
private boolean |
TypeTransformationParser.validTypevarParam(Node expr) |
private boolean |
TypeTransformationParser.validTypevarPredicate(Node expr,
int paramCount) |
private boolean |
TypeTransformationParser.validUnionTypeExpression(Node expr)
A Union type expression must be a valid type variable or
a union(TTLExp, TTLExp, ...)
|
private boolean |
TypeTransformationParser.validUnknownTypeExpression(Node expr)
An unknown type expression must be of the form: unknown()
|
private void |
TypeTransformationParser.warnExtraParam(java.lang.String msg,
Node e) |
private void |
TypeTransformationParser.warnInvalid(java.lang.String msg,
Node e) |
private void |
TypeTransformationParser.warnInvalidExpression(java.lang.String msg,
Node e) |
private void |
TypeTransformationParser.warnInvalidInside(java.lang.String msg,
Node e) |
private void |
TypeTransformationParser.warnMissingParam(java.lang.String msg,
Node e) |
private Node |
JsDocInfoParser.wrapNode(int type,
Node n) |
Constructor and Description |
---|
ParseResult(Node ast,
java.util.List<Comment> comments,
FeatureSet features) |
Modifier and Type | Method and Description |
---|---|
static NodeSubject |
NodeSubject.assertNode(Node node) |
void |
NodeSubject.isEqualTo(Node node) |
Constructor and Description |
---|
NodeSubject(FailureStrategy fs,
Node node) |
Modifier and Type | Method and Description |
---|---|
private FlowScope |
SemanticReverseAbstractInterpreter.caseAndOrMaybeShortCircuiting(Node left,
Node right,
FlowScope blindScope,
boolean outcome) |
private FlowScope |
SemanticReverseAbstractInterpreter.caseAndOrNotShortCircuiting(Node left,
Node right,
FlowScope blindScope,
boolean outcome) |
private FlowScope |
SemanticReverseAbstractInterpreter.caseEquality(Node condition,
FlowScope blindScope,
com.google.common.base.Function<JSType.TypePair,JSType.TypePair> merging) |
private FlowScope |
SemanticReverseAbstractInterpreter.caseEquality(Node left,
Node right,
FlowScope blindScope,
com.google.common.base.Function<JSType.TypePair,JSType.TypePair> merging) |
private FlowScope |
SemanticReverseAbstractInterpreter.caseIn(Node object,
java.lang.String propertyName,
FlowScope blindScope)
Given 'property in object', ensures that the object has the property in the
informed scope by defining it as a qualified name if the object type lacks
the property and it's not in the blind scope.
|
private FlowScope |
SemanticReverseAbstractInterpreter.caseInstanceOf(Node left,
Node right,
FlowScope blindScope,
boolean outcome) |
private FlowScope |
SemanticReverseAbstractInterpreter.caseIsArray(Node value,
FlowScope blindScope,
boolean outcome) |
private FlowScope |
SemanticReverseAbstractInterpreter.caseNameOrGetProp(Node name,
FlowScope blindScope,
boolean outcome) |
private FlowScope |
SemanticReverseAbstractInterpreter.caseTypeOf(Node node,
JSType type,
java.lang.String value,
boolean resultEqualsValue,
FlowScope blindScope) |
protected void |
ChainableReverseAbstractInterpreter.declareNameInScope(FlowScope scope,
Node node,
JSType type)
Declares a refined type in
scope for the name represented by
node . |
protected FlowScope |
ChainableReverseAbstractInterpreter.firstPreciserScopeKnowingConditionOutcome(Node condition,
FlowScope blindScope,
boolean outcome)
Calculates the preciser scope starting with the first link.
|
FlowScope |
ReverseAbstractInterpreter.getPreciserScopeKnowingConditionOutcome(Node condition,
FlowScope blindScope,
boolean outcome)
Calculates a precise version of the scope knowing the outcome of the
condition.
|
FlowScope |
ClosureReverseAbstractInterpreter.getPreciserScopeKnowingConditionOutcome(Node condition,
FlowScope blindScope,
boolean outcome) |
FlowScope |
SemanticReverseAbstractInterpreter.getPreciserScopeKnowingConditionOutcome(Node condition,
FlowScope blindScope,
boolean outcome) |
protected JSType |
ChainableReverseAbstractInterpreter.getTypeIfRefinable(Node node,
FlowScope scope)
Returns the type of a node in the given scope if the node corresponds to a
name whose type is capable of being refined.
|
void |
FlowScope.inferQualifiedSlot(Node node,
java.lang.String symbol,
JSType bottomType,
JSType inferredType,
boolean declare)
Infer the type of a qualified name.
|
private FlowScope |
SemanticReverseAbstractInterpreter.maybeRestrictName(FlowScope blindScope,
Node node,
JSType originalType,
JSType restrictedType)
If the restrictedType differs from the originalType, then we should
branch the current flow scope and create a new flow scope with the name
declared with the new type.
|
private FlowScope |
SemanticReverseAbstractInterpreter.maybeRestrictTwoNames(FlowScope blindScope,
Node left,
JSType originalLeftType,
JSType restrictedLeftType,
Node right,
JSType originalRightType,
JSType restrictedRightType) |
protected FlowScope |
ChainableReverseAbstractInterpreter.nextPreciserScopeKnowingConditionOutcome(Node condition,
FlowScope blindScope,
boolean outcome)
Delegates the calculation of the preciser scope to the next link.
|
private FlowScope |
ClosureReverseAbstractInterpreter.restrictParameter(Node parameter,
JSType type,
FlowScope blindScope,
com.google.common.base.Function<ClosureReverseAbstractInterpreter.TypeRestriction,JSType> restriction,
boolean outcome) |
Modifier and Type | Field and Description |
---|---|
(package private) Node |
RefasterJsScanner.RefasterJsTemplate.afterTemplate |
(package private) Node |
RefasterJsScanner.RefasterJsTemplate.beforeTemplate |
private Node |
Match.node |
private Node |
SuggestedFix.originalMatchedNode |
private Node |
SuggestedFix.Builder.originalMatchedNode |
private Node |
RefactoringDriver.rootNode |
Modifier and Type | Field and Description |
---|---|
private java.util.List<Node> |
ErrorToFixMapper.RequireProvideSorter.calls |
Modifier and Type | Method and Description |
---|---|
private Node |
SuggestedFix.Builder.findGoogRequireNode(Node n,
NodeMetadata metadata,
java.lang.String namespace) |
Node |
Match.getNode()
Returns the node that matched the given conditions.
|
Node |
SuggestedFix.getOriginalMatchedNode()
Returns the JS Compiler Node for the original node that caused this SuggestedFix to
be constructed.
|
private Node |
RefasterJsScanner.transformNode(Node templateNode,
java.util.Map<java.lang.String,Node> templateNodeToMatchMap)
Transforms the template node to a replacement node by mapping the template names to
the ones that were matched against in the JsSourceMatcher.
|
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,Node> |
JsSourceMatcher.getTemplateNodeToMatchMap()
Returns a map from named template node strings to Nodes that were the
equivalent matches from the last matched template.
|
Modifier and Type | Method and Description |
---|---|
SuggestedFix.Builder |
SuggestedFix.Builder.addCast(Node n,
AbstractCompiler compiler,
java.lang.String type)
Adds a cast of the given type to the provided node.
|
SuggestedFix.Builder |
SuggestedFix.Builder.addChildToFront(Node parentNode,
java.lang.String content)
Inserts a new node as the first child of the provided node.
|
SuggestedFix.Builder |
SuggestedFix.Builder.addOrReplaceJsDoc(Node n,
java.lang.String newJsDoc)
Adds or replaces the JS Doc for the given node.
|
SuggestedFix.Builder |
SuggestedFix.Builder.changeJsDocType(Node n,
AbstractCompiler compiler,
java.lang.String type)
Changes the JS Doc Type of the given node.
|
int |
ErrorToFixMapper.RequireProvideSorter.compare(Node n1,
Node n2) |
SuggestedFix.Builder |
SuggestedFix.Builder.delete(Node n)
Deletes a node and its contents from the source file.
|
private SuggestedFix.Builder |
SuggestedFix.Builder.delete(Node n,
boolean deleteWhitespaceBefore)
Deletes a node and its contents from the source file.
|
SuggestedFix.Builder |
SuggestedFix.Builder.deleteArgument(Node n,
int position)
Deletes an argument from an existing function call, including any JS doc that precedes it.
|
SuggestedFix.Builder |
SuggestedFix.Builder.deleteWithoutRemovingWhitespaceBefore(Node n)
Deletes a node and its contents from the source file.
|
private Node |
SuggestedFix.Builder.findGoogRequireNode(Node n,
NodeMetadata metadata,
java.lang.String namespace) |
java.lang.String |
SuggestedFix.Builder.generateCode(AbstractCompiler compiler,
Node node) |
private static java.lang.String |
ErrorToFixMapper.getNamespaceFromClosureNode(Node exprResult) |
SuggestedFix.Builder |
SuggestedFix.Builder.insertArguments(Node n,
int position,
java.lang.String... args)
Inserts arguments into an existing function call.
|
SuggestedFix.Builder |
SuggestedFix.Builder.insertBefore(Node nodeToInsertBefore,
Node n,
AbstractCompiler compiler)
Inserts a new node before the provided node.
|
private SuggestedFix.Builder |
SuggestedFix.Builder.insertBefore(Node nodeToInsertBefore,
Node n,
AbstractCompiler compiler,
java.lang.String sortKey) |
SuggestedFix.Builder |
SuggestedFix.Builder.insertBefore(Node nodeToInsertBefore,
java.lang.String content)
Inserts a string before the provided node.
|
private SuggestedFix.Builder |
SuggestedFix.Builder.insertBefore(Node nodeToInsertBefore,
java.lang.String content,
java.lang.String sortKey) |
abstract boolean |
Scanner.matches(Node node,
NodeMetadata t)
Returns true if the given node and node traversal should match for this
particular scanner.
|
boolean |
RefasterJsScanner.matches(Node node,
NodeMetadata metadata) |
boolean |
Matcher.matches(Node n,
NodeMetadata metadata)
Returns true if the specified
Node and NodeMetadata match
the given pattern. |
boolean |
JsSourceMatcher.matches(Node n,
NodeMetadata metadata) |
private static boolean |
Matchers.matchesPrototypeInstanceVar(Node node,
NodeMetadata metadata,
java.lang.String name)
Checks to see if the node represents an access of an instance variable
on an object given a prototype declaration of an object.
|
SuggestedFix.Builder |
SuggestedFix.Builder.removeCast(Node n,
AbstractCompiler compiler)
Removes a cast from the given node.
|
SuggestedFix.Builder |
SuggestedFix.Builder.rename(Node n,
java.lang.String name)
Renames a given node to the provided name.
|
SuggestedFix.Builder |
SuggestedFix.Builder.rename(Node n,
java.lang.String name,
boolean replaceEntireName)
Renames a given node to the provided name.
|
SuggestedFix.Builder |
SuggestedFix.Builder.replace(Node original,
Node newNode,
AbstractCompiler compiler)
Replaces the provided node with new node in the source file.
|
SuggestedFix.Builder |
SuggestedFix.Builder.replaceRange(Node first,
Node last,
java.lang.String newContent)
Replaces a range of nodes with the given content.
|
SuggestedFix.Builder |
SuggestedFix.Builder.setOriginalMatchedNode(Node node)
Sets the node on this SuggestedFix that caused this SuggestedFix to be built
in the first place.
|
boolean |
JsFlumeCallback.shouldTraverse(NodeTraversal nodeTraversal,
Node n,
Node parent) |
private Node |
RefasterJsScanner.transformNode(Node templateNode,
java.util.Map<java.lang.String,Node> templateNodeToMatchMap)
Transforms the template node to a replacement node by mapping the template names to
the ones that were matched against in the JsSourceMatcher.
|
void |
JsFlumeCallback.visit(NodeTraversal t,
Node n,
Node parent) |
void |
ErrorToFixMapper.RequireProvideSorter.visit(NodeTraversal nodeTraversal,
Node n,
Node parent) |
Modifier and Type | Method and Description |
---|---|
private Node |
RefasterJsScanner.transformNode(Node templateNode,
java.util.Map<java.lang.String,Node> templateNodeToMatchMap)
Transforms the template node to a replacement node by mapping the template names to
the ones that were matched against in the JsSourceMatcher.
|
Constructor and Description |
---|
JsSourceMatcher(AbstractCompiler compiler,
Node templateNode)
Constructs this matcher with a Function node that serves as the template
to match all other nodes against.
|
Match(Node node,
NodeMetadata metadata) |
RefasterJsTemplate(AbstractCompiler compiler,
Node beforeTemplate,
Node afterTemplate) |
SuggestedFix(Node originalMatchedNode,
com.google.common.collect.SetMultimap<java.lang.String,CodeReplacement> replacements,
java.lang.String description) |
Modifier and Type | Class and Description |
---|---|
private static class |
Node.NumberNode |
private static class |
Node.StringNode |
static class |
Node.TypeDeclarationNode
Represents a node in the type declaration AST.
|
Modifier and Type | Field and Description |
---|---|
private Node |
Node.AncestorIterable.cur |
private Node |
Node.SiblingNodeIterable.current |
private Node |
Node.first |
private Node |
Node.last |
(package private) Node |
Node.next |
(package private) Node |
Node.NodeMismatch.nodeActual |
(package private) Node |
Node.NodeMismatch.nodeExpected |
private Node |
Node.parent |
private Node |
JSTypeExpression.root
The root of the AST.
|
private Node |
Node.SiblingNodeIterable.start |
Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.lang.String,Node> |
JSDocInfo.LazilyInitializedInfo.typeTransformations |
Modifier and Type | Method and Description |
---|---|
(package private) <T extends Node> |
Node.copyNodeFields(T dst) |
Modifier and Type | Method and Description |
---|---|
static Node |
IR.add(Node expr1,
Node expr2) |
static Node |
IR.and(Node expr1,
Node expr2) |
static Node |
IR.arraylit(Node... exprs) |
static Node |
IR.assign(Node target,
Node expr) |
private static Node |
IR.binaryOp(int token,
Node expr1,
Node expr2) |
static Node |
IR.block() |
static Node |
IR.block(java.util.List<Node> stmts) |
static Node |
IR.block(Node... stmts) |
static Node |
IR.block(Node stmt) |
private static Node |
IR.blockUnchecked(Node stmt) |
static Node |
IR.breakNode() |
static Node |
IR.breakNode(Node name) |
static Node |
IR.call(Node target,
Node... args) |
static Node |
IR.caseNode(Node expr,
Node body) |
static Node |
IR.cast(Node expr1,
JSDocInfo jsdoc) |
static Node |
IR.catchNode(Node expr,
Node body) |
Node |
Node.cloneNode() |
Node |
Node.clonePropsFrom(Node other)
Clone the properties from the provided node without copying
the property object.
|
Node |
Node.cloneTree() |
static Node |
IR.comma(Node expr1,
Node expr2) |
static Node |
IR.computedProp(Node key,
Node value) |
static Node |
IR.constNode(Node lhs,
Node value) |
static Node |
IR.continueNode() |
static Node |
IR.continueNode(Node name) |
Node |
Node.copyInformationFrom(Node other)
Copies source file and name information from the other
node given to the current node.
|
Node |
Node.copyInformationFromForTree(Node other)
Copies source file and name information from the other node to the
entire tree rooted at this node.
|
static Node |
IR.dec(Node exp,
boolean isPost) |
static Node |
IR.declaration(Node lhs,
int type) |
static Node |
IR.declaration(Node lhs,
Node value,
int type) |
static Node |
IR.defaultCase(Node body) |
Node |
Node.detachFromParent()
Removes this node from its parent.
|
static Node |
IR.doNode(Node body,
Node cond) |
static Node |
IR.empty() |
static Node |
IR.eq(Node expr1,
Node expr2)
"=="
|
static Node |
IR.exprResult(Node expr) |
static Node |
IR.falseNode() |
static Node |
IR.forIn(Node target,
Node cond,
Node body) |
static Node |
IR.forNode(Node init,
Node cond,
Node incr,
Node body) |
static Node |
IR.function(Node name,
Node params,
Node body) |
Node |
Node.getAncestor(int level)
Gets the ancestor node relative to this.
|
Node |
Node.getChildAtIndex(int i) |
Node |
Node.getChildBefore(Node child) |
static Node |
IR.getelem(Node target,
Node elem) |
Node |
Node.getFirstChild() |
Node |
Node.getFirstFirstChild() |
Node |
Node.getGrandparent() |
Node |
Node.getLastChild() |
Node |
Node.getLastSibling() |
Node |
Node.getNext() |
Node |
StaticRef.getNode()
The node where the reference lives.
|
Node |
Node.getParent() |
static Node |
IR.getprop(Node target,
Node prop) |
static Node |
IR.getprop(Node target,
Node prop,
Node... moreProps) |
static Node |
IR.getprop(Node target,
java.lang.String prop,
java.lang.String... moreProps) |
Node |
JSTypeExpression.getRoot() |
Node |
StaticScope.getRootNode()
Returns the root node associated with this scope.
|
Node |
Node.getSecondChild() |
Node |
FunctionTypeI.getSource() |
static Node |
IR.hook(Node cond,
Node trueval,
Node falseval) |
static Node |
IR.ifNode(Node cond,
Node then) |
static Node |
IR.ifNode(Node cond,
Node then,
Node elseNode) |
static Node |
IR.in(Node expr1,
Node expr2) |
static Node |
IR.inc(Node exp,
boolean isPost) |
static Node |
IR.label(Node name,
Node stmt) |
static Node |
IR.labelName(java.lang.String name) |
static Node |
IR.let(Node lhs,
Node value) |
static Node |
IR.lt(Node expr1,
Node expr2)
"<"
|
private static Node |
TypeDeclarationsIR.maybeAddType(Node node,
Node.TypeDeclarationNode type) |
static Node |
IR.memberFunctionDef(java.lang.String name,
Node function) |
static Node |
IR.name(java.lang.String name) |
static Node |
IR.ne(Node expr1,
Node expr2)
"!="
|
static Node |
IR.neg(Node expr1) |
static Node |
IR.newNode(Node target,
Node... args) |
static Node |
Node.newNumber(double number) |
static Node |
Node.newNumber(double number,
int lineno,
int charno) |
static Node |
Node.newString(int type,
java.lang.String str) |
static Node |
Node.newString(int type,
java.lang.String str,
int lineno,
int charno) |
static Node |
Node.newString(java.lang.String str) |
static Node |
Node.newString(java.lang.String str,
int lineno,
int charno) |
Node |
Node.SiblingNodeIterable.next() |
static Node |
IR.not(Node expr1) |
static Node |
IR.nullNode() |
static Node |
IR.number(double d) |
static Node |
IR.objectlit(Node... propdefs) |
static Node |
IR.or(Node expr1,
Node expr2) |
static Node |
IR.paramList() |
static Node |
IR.paramList(java.util.List<Node> params) |
static Node |
IR.paramList(Node... params) |
static Node |
IR.paramList(Node param) |
static Node |
IR.pos(Node expr1) |
static Node |
IR.propdef(Node string,
Node value) |
static Node |
IR.regexp(Node expr) |
static Node |
IR.regexp(Node expr,
Node flags) |
Node |
Node.removeChildAfter(Node prev) |
Node |
Node.removeChildren() |
Node |
Node.removeFirstChild()
Removes the first child of Node.
|
static Node |
IR.rest(java.lang.String name) |
static Node |
IR.returnNode() |
static Node |
IR.returnNode(Node expr) |
static Node |
IR.script() |
static Node |
IR.script(java.util.List<Node> stmts) |
static Node |
IR.script(Node... stmts) |
Node |
Node.setJSDocInfo(JSDocInfo info)
Sets the
JSDocInfo attached to this node. |
static Node |
IR.sheq(Node expr1,
Node expr2)
"==="
|
static Node |
IR.shne(Node expr1,
Node expr2)
"!=="
|
static Node |
IR.spread(Node expr) |
Node |
Node.srcref(Node other) |
Node |
Node.srcrefTree(Node other) |
static Node |
IR.string(java.lang.String s) |
static Node |
IR.stringKey(java.lang.String s) |
static Node |
IR.stringKey(java.lang.String s,
Node value) |
static Node |
IR.sub(Node expr1,
Node expr2) |
static Node |
IR.superNode() |
static Node |
IR.switchNode(Node cond,
Node... cases) |
static Node |
IR.thisNode() |
static Node |
IR.throwNode(Node expr) |
static Node |
IR.trueNode() |
static Node |
IR.tryCatch(Node tryBody,
Node catchNode) |
static Node |
IR.tryCatchFinally(Node tryBody,
Node catchNode,
Node finallyBody) |
static Node |
IR.tryFinally(Node tryBody,
Node finallyBody) |
private static Node |
IR.unaryOp(int token,
Node expr) |
Node |
Node.useSourceInfoFrom(Node other)
Overwrite all the source information in this node with
that of
other . |
Node |
Node.useSourceInfoFromForTree(Node other)
Overwrite all the source information in this node and its subtree with
that of
other . |
Node |
Node.useSourceInfoIfMissingFrom(Node other)
Overwrite all the source information in this node with
that of
other iff the source info is missing. |
Node |
Node.useSourceInfoIfMissingFromForTree(Node other)
Overwrite all the source information in this node and its subtree with
that of
other iff the source info is missing. |
static Node |
IR.var(Node lhs) |
static Node |
IR.var(Node lhs,
Node value) |
static Node |
IR.voidNode(Node expr1) |
static Node |
IR.whileNode(Node cond,
Node body) |
static Node |
IR.yield() |
static Node |
IR.yield(Node expr) |
Modifier and Type | Method and Description |
---|---|
java.lang.Iterable<Node> |
Node.children()
Return an iterable object that iterates over this node's children.
|
java.util.Collection<Node> |
JSDocInfo.getTypeNodes()
Returns a collection of all type nodes that are a part of this JSDocInfo.
|
com.google.common.collect.ImmutableMap<java.lang.String,Node> |
JSDocInfo.getTypeTransformations()
Gets the type transformations.
|
java.util.Iterator<Node> |
Node.SiblingNodeIterable.iterator() |
java.util.Iterator<Node> |
Node.AncestorIterable.iterator() |
java.lang.Iterable<Node> |
Node.siblings()
Return an iterable object that iterates over this node's siblings,
including this Node.
|
Modifier and Type | Method and Description |
---|---|
static Node |
IR.add(Node expr1,
Node expr2) |
void |
Node.addChildAfter(Node newChild,
Node node)
Add 'child' after 'node'.
|
void |
Node.addChildBefore(Node newChild,
Node node)
Add 'child' before 'node'.
|
void |
Node.addChildrenAfter(Node children,
Node node)
Add all children after 'node'.
|
void |
Node.addChildrenToBack(Node children) |
void |
Node.addChildrenToFront(Node children) |
void |
Node.addChildToBack(Node child) |
void |
Node.addChildToFront(Node child) |
static Node |
IR.and(Node expr1,
Node expr2) |
static Node |
IR.arraylit(Node... exprs) |
static Node.TypeDeclarationNode |
TypeDeclarationsIR.arrayType(Node elementType)
Represents an array type.
|
static Node |
IR.assign(Node target,
Node expr) |
private static Node |
IR.binaryOp(int token,
Node expr1,
Node expr2) |
static Node |
IR.block(Node... stmts) |
static Node |
IR.block(Node stmt) |
private static Node |
IR.blockUnchecked(Node stmt) |
static Node |
IR.breakNode(Node name) |
static Node |
IR.call(Node target,
Node... args) |
static Node |
IR.call(Node target,
Node... args) |
static Node |
IR.caseNode(Node expr,
Node body) |
static Node |
IR.cast(Node expr1,
JSDocInfo jsdoc) |
static Node |
IR.catchNode(Node expr,
Node body) |
java.lang.String |
Node.checkTreeEquals(Node actual)
Checks if the subtree under this node is the same as another subtree.
|
(package private) Node.NodeMismatch |
Node.checkTreeEqualsImpl(Node actual)
Compare this node to the given node recursively and return the first pair of nodes
that differs doing a preorder depth-first traversal.
|
private Node.NodeMismatch |
Node.checkTreeEqualsImpl(Node actual,
boolean jsDoc)
Compare this node to the given node recursively and return the first pair of nodes
that differs doing a preorder depth-first traversal.
|
java.lang.String |
Node.checkTreeEqualsIncludingJsDoc(Node actual)
Checks if the subtree under this node is the same as another subtree.
|
Node |
Node.clonePropsFrom(Node other)
Clone the properties from the provided node without copying
the property object.
|
static Node |
IR.comma(Node expr1,
Node expr2) |
static Node |
IR.computedProp(Node key,
Node value) |
static Node |
IR.constNode(Node lhs,
Node value) |
static Node |
IR.continueNode(Node name) |
Node |
Node.copyInformationFrom(Node other)
Copies source file and name information from the other
node given to the current node.
|
Node |
Node.copyInformationFromForTree(Node other)
Copies source file and name information from the other node to the
entire tree rooted at this node.
|
TypeI |
TypeIRegistry.createTypeFromCommentNode(Node n,
java.lang.String sourceName,
StaticTypedScope<? extends TypeI> scope) |
static Node |
IR.dec(Node exp,
boolean isPost) |
static Node |
IR.declaration(Node lhs,
int type) |
static Node |
IR.declaration(Node lhs,
Node value,
int type) |
(package private) boolean |
JSDocInfo.declareTypeTransformation(java.lang.String newName,
Node expr)
Declares a type transformation expression.
|
static Node |
IR.defaultCase(Node body) |
static Node |
IR.doNode(Node body,
Node cond) |
static Node |
IR.eq(Node expr1,
Node expr2)
"=="
|
static Node |
IR.exprResult(Node expr) |
static Node |
IR.forIn(Node target,
Node cond,
Node body) |
static Node |
IR.forNode(Node init,
Node cond,
Node incr,
Node body) |
static Node |
IR.function(Node name,
Node params,
Node body) |
static Node.TypeDeclarationNode |
TypeDeclarationsIR.functionType(Node returnType,
java.util.LinkedHashMap<java.lang.String,Node.TypeDeclarationNode> requiredParams,
java.util.LinkedHashMap<java.lang.String,Node.TypeDeclarationNode> optionalParams,
java.lang.String restName,
Node.TypeDeclarationNode restType)
Represents a function type.
|
Node |
Node.getChildBefore(Node child) |
static Node |
IR.getelem(Node target,
Node elem) |
int |
Node.getIndexOfChild(Node child) |
static Node |
IR.getprop(Node target,
Node prop) |
static Node |
IR.getprop(Node target,
Node prop,
Node... moreProps) |
static Node |
IR.getprop(Node target,
Node prop,
Node... moreProps) |
static Node |
IR.getprop(Node target,
java.lang.String prop,
java.lang.String... moreProps) |
java.lang.String |
TypeIRegistry.getReadableTypeName(Node n) |
boolean |
Node.hasChild(Node child) |
static Node |
IR.hook(Node cond,
Node trueval,
Node falseval) |
static Node |
IR.ifNode(Node cond,
Node then) |
static Node |
IR.ifNode(Node cond,
Node then,
Node elseNode) |
static Node |
IR.in(Node expr1,
Node expr2) |
static Node |
IR.inc(Node exp,
boolean isPost) |
boolean |
Node.isEquivalentTo(Node node)
Returns true if this node is equivalent semantically to another
|
(package private) boolean |
Node.isEquivalentTo(Node node,
boolean compareType,
boolean recurse,
boolean jsDoc) |
(package private) boolean |
Node.NumberNode.isEquivalentTo(Node node,
boolean compareType,
boolean recur,
boolean jsDoc) |
(package private) boolean |
Node.StringNode.isEquivalentTo(Node node,
boolean compareType,
boolean recur,
boolean jsDoc) |
boolean |
Node.isEquivalentToShallow(Node node)
Checks equivalence without going into child nodes
|
boolean |
Node.isEquivalentToTyped(Node node)
Returns true if this node is equivalent semantically to another and
the types are equivalent.
|
static Node |
IR.label(Node name,
Node stmt) |
static Node |
IR.let(Node lhs,
Node value) |
static Node |
IR.lt(Node expr1,
Node expr2)
"<"
|
void |
JSDocInfoBuilder.markTypeNode(Node typeNode,
int lineno,
int startCharno,
int endLineno,
int endCharno,
boolean hasLC)
Adds a type declaration to the current marker.
|
boolean |
Node.matchesQualifiedName(Node n)
Returns whether a node matches a simple or a qualified name, such as
x or a.b.c or this.a . |
private static Node |
TypeDeclarationsIR.maybeAddType(Node node,
Node.TypeDeclarationNode type) |
private static boolean |
IR.mayBeExpression(Node n)
It isn't possible to always determine if a detached node is a expression,
so make a best guess.
|
private static boolean |
IR.mayBeExpressionOrEmpty(Node n) |
private static boolean |
IR.mayBeStatement(Node n)
It isn't possible to always determine if a detached node is a expression,
so make a best guess.
|
private static boolean |
IR.mayBeStatementNoReturn(Node n)
It isn't possible to always determine if a detached node is a expression,
so make a best guess.
|
static Node |
IR.memberFunctionDef(java.lang.String name,
Node function) |
static Node |
IR.ne(Node expr1,
Node expr2)
"!="
|
static Node |
IR.neg(Node expr1) |
static Node |
IR.newNode(Node target,
Node... args) |
static Node |
IR.newNode(Node target,
Node... args) |
static Node |
IR.not(Node expr1) |
static Node |
IR.objectlit(Node... propdefs) |
static Node |
IR.or(Node expr1,
Node expr2) |
static Node |
IR.paramList(Node... params) |
static Node |
IR.paramList(Node param) |
static Node |
IR.pos(Node expr1) |
static Node |
IR.propdef(Node string,
Node value) |
boolean |
JSDocInfoBuilder.recordTypeTransformation(java.lang.String name,
Node expr)
Records a type transformation expression together with its template
type name.
|
static Node |
IR.regexp(Node expr) |
static Node |
IR.regexp(Node expr,
Node flags) |
void |
Node.removeChild(Node child)
Detach a child from its parent and siblings.
|
Node |
Node.removeChildAfter(Node prev) |
void |
Node.replaceChild(Node child,
Node newChild)
Detaches child from Node and replaces it with newChild.
|
void |
Node.replaceChildAfter(Node prevChild,
Node newChild) |
static Node |
IR.returnNode(Node expr) |
static Node |
IR.script(Node... stmts) |
void |
FunctionTypeI.setSource(Node n) |
static Node |
IR.sheq(Node expr1,
Node expr2)
"==="
|
static Node |
IR.shne(Node expr1,
Node expr2)
"!=="
|
static Node |
IR.spread(Node expr) |
Node |
Node.srcref(Node other) |
Node |
Node.srcrefTree(Node other) |
static Node |
IR.stringKey(java.lang.String s,
Node value) |
static Node |
IR.sub(Node expr1,
Node expr2) |
static Node |
IR.switchNode(Node cond,
Node... cases) |
static Node |
IR.switchNode(Node cond,
Node... cases) |
static Node |
IR.throwNode(Node expr) |
private static void |
Node.toStringTreeHelper(Node n,
int level,
java.lang.Appendable sb) |
static Node |
IR.tryCatch(Node tryBody,
Node catchNode) |
static Node |
IR.tryCatchFinally(Node tryBody,
Node catchNode,
Node finallyBody) |
static Node |
IR.tryFinally(Node tryBody,
Node finallyBody) |
private static Node |
IR.unaryOp(int token,
Node expr) |
Node |
Node.useSourceInfoFrom(Node other)
Overwrite all the source information in this node with
that of
other . |
Node |
Node.useSourceInfoFromForTree(Node other)
Overwrite all the source information in this node and its subtree with
that of
other . |
Node |
Node.useSourceInfoIfMissingFrom(Node other)
Overwrite all the source information in this node with
that of
other iff the source info is missing. |
Node |
Node.useSourceInfoIfMissingFromForTree(Node other)
Overwrite all the source information in this node and its subtree with
that of
other iff the source info is missing. |
static Node |
IR.var(Node lhs) |
static Node |
IR.var(Node lhs,
Node value) |
static Node |
IR.voidNode(Node expr1) |
static Node |
IR.whileNode(Node cond,
Node body) |
static Node |
IR.yield(Node expr) |
Modifier and Type | Method and Description |
---|---|
static Node |
IR.block(java.util.List<Node> stmts) |
static Node |
IR.paramList(java.util.List<Node> params) |
static Node |
IR.script(java.util.List<Node> stmts) |
Constructor and Description |
---|
AncestorIterable(Node cur) |
JSTypeExpression(Node root,
java.lang.String sourceName) |
Node(int nodeType,
Node child) |
Node(int nodeType,
Node child,
int lineno,
int charno) |
Node(int nodeType,
Node left,
Node right) |
Node(int nodeType,
Node left,
Node mid,
Node right) |
Node(int nodeType,
Node left,
Node mid,
Node mid2,
Node right) |
NodeMismatch(Node nodeExpected,
Node nodeActual) |
SiblingNodeIterable(Node start) |
TypeDeclarationNode(int nodeType,
Node child) |
TypeDeclarationNode(int nodeType,
Node left,
Node right) |
TypeDeclarationNode(int nodeType,
Node left,
Node mid,
Node right) |
Modifier and Type | Field and Description |
---|---|
private Node |
SimpleReference.node |
(package private) Node |
ArrowType.parameters |
private Node |
FunctionBuilder.parametersNode |
private Node |
NamedType.PropertyContinuation.propertyNode |
private Node |
Property.propertyNode
The node corresponding to this property, e.g., a GETPROP node that
declares this property.
|
private Node |
RecordTypeBuilder.RecordProperty.propertyNode |
private Node |
FunctionParamBuilder.root |
private Node |
FunctionType.source
The function node which this type represents.
|
private Node |
FunctionBuilder.sourceNode |
private Node |
TemplateType.typeTransformation |
Modifier and Type | Method and Description |
---|---|
Node |
FunctionParamBuilder.build() |
Node |
JSTypeRegistry.createOptionalParameters(JSType... parameterTypes)
Creates a tree hierarchy representing a typed parameter list in which
every parameter is optional.
|
private Node |
JSTypeRegistry.createParameters(boolean lastVarArgs,
JSType... parameterTypes)
Creates a tree hierarchy representing a typed argument list.
|
Node |
JSTypeRegistry.createParameters(JSType... parameterTypes)
Creates a tree hierarchy representing a typed argument list.
|
Node |
JSTypeRegistry.createParametersWithVarArgs(JSType... parameterTypes)
Creates a tree hierarchy representing a typed argument list.
|
Node |
SimpleReference.getNode() |
Node |
Property.getNode() |
Node |
FunctionType.getParametersNode()
Gets an LP node that contains all params.
|
Node |
RecordTypeBuilder.RecordProperty.getPropertyNode() |
Node |
ObjectType.getPropertyNode(java.lang.String propertyName)
Gets the node corresponding to the definition of the specified property.
|
Node |
ObjectType.getRootNode() |
Node |
FunctionType.getSource()
Gets the source node or null if this is an unknown function.
|
Node |
TemplateType.getTypeTransformation() |
Node |
FunctionParamBuilder.newOptionalParameterFromNode(Node n)
Copies the parameter specification from the given node,
but makes sure it's optional.
|
private Node |
FunctionParamBuilder.newParameter(JSType type) |
Node |
FunctionParamBuilder.newParameterFromNode(Node n)
Copies the parameter specification from the given node.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Iterable<Node> |
FunctionType.getParameters() |
Modifier and Type | Method and Description |
---|---|
RecordTypeBuilder |
RecordTypeBuilder.addProperty(java.lang.String name,
JSType type,
Node propertyNode)
Adds a property with the given name and type to the record type.
|
private void |
FunctionType.appendArgString(java.lang.StringBuilder b,
Node p,
boolean forAnnotations) |
(package private) ArrowType |
JSTypeRegistry.createArrowType(Node parametersNode)
Creates an arrow type with an unknown return type.
|
(package private) ArrowType |
JSTypeRegistry.createArrowType(Node parametersNode,
JSType returnType)
Creates an arrow type, an abstract representation of the parameters
and return value of a function.
|
FunctionType |
JSTypeRegistry.createConstructorType(java.lang.String name,
Node source,
Node parameters,
JSType returnType,
com.google.common.collect.ImmutableList<TemplateType> templateKeys)
Creates a constructor function type.
|
EnumType |
JSTypeRegistry.createEnumType(java.lang.String name,
Node source,
JSType elementsType)
Creates an enum type.
|
private JSType |
JSTypeRegistry.createFromTypeNodesInternal(Node n,
java.lang.String sourceName,
StaticTypedScope<JSType> scope) |
FunctionType |
JSTypeRegistry.createFunctionType(JSType returnType,
Node parameters) |
FunctionType |
JSTypeRegistry.createInterfaceType(java.lang.String name,
Node source,
com.google.common.collect.ImmutableList<TemplateType> templateKeys,
boolean struct)
Creates an interface function type.
|
private FunctionType |
JSTypeRegistry.createNativeFunctionType(JSType returnType,
Node parameters) |
private JSType |
JSTypeRegistry.createRecordTypeFromNodes(Node n,
java.lang.String sourceName,
StaticTypedScope<JSType> scope)
Creates a RecordType from the nodes representing said record type.
|
TemplateType |
JSTypeRegistry.createTemplateTypeWithTransformation(java.lang.String name,
Node expr) |
JSType |
JSTypeRegistry.createTypeFromCommentNode(Node n,
java.lang.String sourceName,
StaticTypedScope<? extends TypeI> scope)
Creates a JSType from the nodes representing a type.
|
boolean |
ObjectType.defineDeclaredProperty(java.lang.String propertyName,
JSType type,
Node propertyNode)
Defines a property whose type is explicitly declared by the programmer.
|
boolean |
EnumType.defineElement(java.lang.String name,
Node definingNode)
Defines a new element on this enum.
|
boolean |
ObjectType.defineInferredProperty(java.lang.String propertyName,
JSType type,
Node propertyNode)
Defines a property whose type is inferred.
|
(package private) boolean |
UnknownType.defineProperty(java.lang.String propertyName,
JSType type,
boolean inferred,
Node propertyNode) |
(package private) boolean |
NoObjectType.defineProperty(java.lang.String propertyName,
JSType type,
boolean inferred,
Node propertyNode) |
(package private) boolean |
NamedType.defineProperty(java.lang.String propertyName,
JSType type,
boolean inferred,
Node propertyNode) |
(package private) boolean |
InstanceObjectType.defineProperty(java.lang.String name,
JSType type,
boolean inferred,
Node propertyNode) |
(package private) boolean |
FunctionType.defineProperty(java.lang.String name,
JSType type,
boolean inferred,
Node propertyNode) |
(package private) boolean |
ProxyObjectType.defineProperty(java.lang.String propertyName,
JSType type,
boolean inferred,
Node propertyNode) |
(package private) boolean |
RecordType.defineProperty(java.lang.String propertyName,
JSType type,
boolean inferred,
Node propertyNode) |
(package private) boolean |
EnumElementType.defineProperty(java.lang.String propertyName,
JSType type,
boolean inferred,
Node propertyNode) |
(package private) boolean |
PrototypeObjectType.defineProperty(java.lang.String name,
JSType type,
boolean inferred,
Node propertyNode) |
(package private) abstract boolean |
ObjectType.defineProperty(java.lang.String propertyName,
JSType type,
boolean inferred,
Node propertyNode)
Defines a property.
|
boolean |
ObjectType.defineSynthesizedProperty(java.lang.String propertyName,
JSType type,
Node propertyNode)
Defines a property whose type is on a synthesized object.
|
(package private) static FunctionType |
FunctionType.forInterface(JSTypeRegistry registry,
java.lang.String name,
Node source,
TemplateTypeMap typeParameters)
Creates an instance for a function that is an interface.
|
private JSType |
JSTypeRegistry.getJSTypeOrUnknown(Node n) |
private java.lang.String |
JSTypeRegistry.getReadableJSTypeName(Node n,
boolean dereference)
Given a node, get a human-readable name for the type of that node so
that will be easy for the programmer to find the original declaration.
|
java.lang.String |
JSTypeRegistry.getReadableTypeName(Node n)
The nice API for this method is a single argument; dereference is a detail.
|
java.lang.String |
JSTypeRegistry.getReadableTypeNameNoDeref(Node n) |
Node |
FunctionParamBuilder.newOptionalParameterFromNode(Node n)
Copies the parameter specification from the given node,
but makes sure it's optional.
|
Node |
FunctionParamBuilder.newParameterFromNode(Node n)
Copies the parameter specification from the given node.
|
void |
Property.setNode(Node n) |
void |
PrototypeObjectType.setPropertyNode(java.lang.String propertyName,
Node defSite) |
void |
ObjectType.setPropertyNode(java.lang.String propertyName,
Node defSite)
Sets the node where the property was defined.
|
(package private) boolean |
FunctionType.setPrototype(ObjectType prototype,
Node propertyNode)
Sets the prototype.
|
(package private) void |
FunctionType.setPrototypeBasedOn(ObjectType baseType,
Node propertyNode) |
private boolean |
FunctionType.setPrototypeNoCheck(ObjectType prototype,
Node propertyNode)
Set the prototype without doing any sanity checks.
|
void |
FunctionType.setSource(Node source)
Sets the source node.
|
FunctionBuilder |
FunctionBuilder.withParamsNode(Node parametersNode)
Set the parameters of the function type with a specially-formatted node.
|
FunctionBuilder |
FunctionBuilder.withSourceNode(Node sourceNode)
Set the source node of the function type.
|
Constructor and Description |
---|
ArrowType(JSTypeRegistry registry,
Node parameters,
JSType returnType) |
ArrowType(JSTypeRegistry registry,
Node parameters,
JSType returnType,
boolean returnTypeInferred) |
EnumType(JSTypeRegistry registry,
java.lang.String name,
Node source,
JSType elementsType)
Creates an enum type.
|
FunctionType(JSTypeRegistry registry,
java.lang.String name,
Node source,
ArrowType arrowType,
JSType typeOfThis,
TemplateTypeMap templateTypeMap,
boolean isConstructor,
boolean nativeType)
Creates an instance for a function that might be a constructor.
|
FunctionType(JSTypeRegistry registry,
java.lang.String name,
Node source,
TemplateTypeMap typeParameters)
Creates an instance for a function that is an interface.
|
Property(java.lang.String name,
JSType type,
boolean inferred,
Node propertyNode) |
PropertyContinuation(java.lang.String propertyName,
JSType type,
boolean inferred,
Node propertyNode) |
RecordProperty(JSType type,
Node propertyNode) |
SimpleReference(T symbol,
Node node) |
TemplateType(JSTypeRegistry registry,
java.lang.String name,
Node typeTransformation) |
Modifier and Type | Method and Description |
---|---|
Node |
AbstractStaticScope.getRootNode() |
Modifier and Type | Method and Description |
---|---|
protected void |
BaseJSTypeTestCase.assertTypeEquals(JSType expected,
Node actual)
Asserts that a Node representing a type expression resolves to the
correct
JSType . |