public class FunctionBuilder extends DefaultDispatchingParseTreeAuxVisitor<TranslationResult,AstEnv>
Pattern matches on the AST node type and calls itself recursively.
Information is propagated downwards in the tree using AstEnv
and upwards using TranslationResult
.
The class is a very large visitor. Utility methods are kept elsewhere, e.g. in FunctionBuilderHelper
.
Constructor and Description |
---|
FunctionBuilder(ASTInfo astInfo,
FunctionAndBlockManager functionAndBlocksManager,
SourceLocation.SourceLocationMaker sourceLocationMaker,
SyntacticAnalysis syntacticInformationCollector)
Constructs a new function builder.
|
Modifier and Type | Method and Description |
---|---|
TranslationResult |
ignoredByClosureCompiler(com.google.javascript.jscomp.parsing.parser.trees.ParseTree tree) |
(package private) WritePropertyNode |
makeWriteFixedPropertyNode(int baseRegister,
com.google.javascript.jscomp.parsing.parser.Token propertyName,
int rhsRegister,
WritePropertyNode.Kind propertyKind,
SourceLocation location) |
TranslationResult |
process(com.google.javascript.jscomp.parsing.parser.trees.ArrayLiteralExpressionTree tree,
AstEnv env) |
TranslationResult |
process(com.google.javascript.jscomp.parsing.parser.trees.BinaryOperatorTree tree,
AstEnv env) |
TranslationResult |
process(com.google.javascript.jscomp.parsing.parser.trees.BlockTree tree,
AstEnv env) |
TranslationResult |
process(com.google.javascript.jscomp.parsing.parser.trees.BreakStatementTree tree,
AstEnv env) |
TranslationResult |
process(com.google.javascript.jscomp.parsing.parser.trees.CallExpressionTree tree,
AstEnv env) |
TranslationResult |
process(com.google.javascript.jscomp.parsing.parser.trees.CaseClauseTree tree,
AstEnv env) |
TranslationResult |
process(com.google.javascript.jscomp.parsing.parser.trees.CatchTree tree,
AstEnv env) |
TranslationResult |
process(com.google.javascript.jscomp.parsing.parser.trees.CommaExpressionTree tree,
AstEnv env) |
TranslationResult |
process(com.google.javascript.jscomp.parsing.parser.trees.ConditionalExpressionTree tree,
AstEnv env) |
TranslationResult |
process(com.google.javascript.jscomp.parsing.parser.trees.ContinueStatementTree tree,
AstEnv env) |
TranslationResult |
process(com.google.javascript.jscomp.parsing.parser.trees.DebuggerStatementTree tree,
AstEnv env) |
TranslationResult |
process(com.google.javascript.jscomp.parsing.parser.trees.DoWhileStatementTree tree,
AstEnv env) |
TranslationResult |
process(com.google.javascript.jscomp.parsing.parser.trees.EmptyStatementTree tree,
AstEnv env) |
TranslationResult |
process(com.google.javascript.jscomp.parsing.parser.trees.ExpressionStatementTree tree,
AstEnv env) |
TranslationResult |
process(com.google.javascript.jscomp.parsing.parser.trees.FinallyTree tree,
AstEnv env) |
TranslationResult |
process(com.google.javascript.jscomp.parsing.parser.trees.ForInStatementTree tree,
AstEnv env) |
TranslationResult |
process(com.google.javascript.jscomp.parsing.parser.trees.ForStatementTree tree,
AstEnv env) |
TranslationResult |
process(com.google.javascript.jscomp.parsing.parser.trees.FunctionDeclarationTree tree,
AstEnv env) |
TranslationResult |
process(com.google.javascript.jscomp.parsing.parser.trees.GetAccessorTree tree,
AstEnv env) |
TranslationResult |
process(com.google.javascript.jscomp.parsing.parser.trees.IdentifierExpressionTree tree,
AstEnv env) |
TranslationResult |
process(com.google.javascript.jscomp.parsing.parser.trees.IfStatementTree tree,
AstEnv env) |
TranslationResult |
process(com.google.javascript.jscomp.parsing.parser.trees.LabelledStatementTree tree,
AstEnv env) |
TranslationResult |
process(com.google.javascript.jscomp.parsing.parser.trees.LiteralExpressionTree tree,
AstEnv env) |
TranslationResult |
process(com.google.javascript.jscomp.parsing.parser.trees.MemberExpressionTree tree,
AstEnv env) |
TranslationResult |
process(com.google.javascript.jscomp.parsing.parser.trees.MemberLookupExpressionTree tree,
AstEnv env) |
TranslationResult |
process(com.google.javascript.jscomp.parsing.parser.trees.NewExpressionTree tree,
AstEnv env) |
TranslationResult |
process(com.google.javascript.jscomp.parsing.parser.trees.NullTree literalNode,
AstEnv env) |
TranslationResult |
process(com.google.javascript.jscomp.parsing.parser.trees.ObjectLiteralExpressionTree tree,
AstEnv env) |
TranslationResult |
process(com.google.javascript.jscomp.parsing.parser.trees.ParenExpressionTree tree,
AstEnv env) |
TranslationResult |
process(com.google.javascript.jscomp.parsing.parser.trees.ParseTree tree,
AstEnv env)
From
IRFactory.TransformDispatcher.process(ParseTree) |
TranslationResult |
process(com.google.javascript.jscomp.parsing.parser.trees.ProgramTree tree,
AstEnv env) |
TranslationResult |
process(com.google.javascript.jscomp.parsing.parser.trees.PropertyNameAssignmentTree tree,
AstEnv env) |
TranslationResult |
process(com.google.javascript.jscomp.parsing.parser.trees.ReturnStatementTree tree,
AstEnv env) |
TranslationResult |
process(com.google.javascript.jscomp.parsing.parser.trees.SetAccessorTree tree,
AstEnv env) |
TranslationResult |
process(com.google.javascript.jscomp.parsing.parser.trees.SwitchStatementTree tree,
AstEnv env) |
TranslationResult |
process(com.google.javascript.jscomp.parsing.parser.trees.ThisExpressionTree tree,
AstEnv env) |
TranslationResult |
process(com.google.javascript.jscomp.parsing.parser.trees.ThrowStatementTree tree,
AstEnv env) |
TranslationResult |
process(com.google.javascript.jscomp.parsing.parser.trees.TryStatementTree tree,
AstEnv env) |
TranslationResult |
process(com.google.javascript.jscomp.parsing.parser.trees.UnaryExpressionTree tree,
AstEnv env) |
TranslationResult |
process(com.google.javascript.jscomp.parsing.parser.trees.UpdateExpressionTree tree,
AstEnv env) |
TranslationResult |
process(com.google.javascript.jscomp.parsing.parser.trees.VariableDeclarationListTree tree,
AstEnv env) |
TranslationResult |
process(com.google.javascript.jscomp.parsing.parser.trees.VariableDeclarationTree declaration,
AstEnv env) |
TranslationResult |
process(com.google.javascript.jscomp.parsing.parser.trees.VariableStatementTree tree,
AstEnv env) |
TranslationResult |
process(com.google.javascript.jscomp.parsing.parser.trees.WhileStatementTree tree,
AstEnv env) |
TranslationResult |
process(com.google.javascript.jscomp.parsing.parser.trees.WithStatementTree tree,
AstEnv env) |
(package private) Function |
processFunctionDeclaration(com.google.javascript.jscomp.parsing.parser.trees.FunctionDeclarationTree.Kind kind,
java.lang.String name,
com.google.javascript.jscomp.parsing.parser.trees.FormalParameterListTree parameters,
com.google.javascript.jscomp.parsing.parser.trees.ParseTree body,
AstEnv env,
SourceLocation location,
java.lang.String source)
Processes a function declaration.
|
TranslationResult |
unsupportedLanguageFeature(com.google.javascript.jscomp.parsing.parser.trees.ParseTree tree,
java.lang.String feature) |
process, process, process, process, process, process, process, process, process, process, process, process, process, process, process, process, process, process, process, process, process, process, process, process, process, process, process, process, process, process, process, process, process, process, process, process, process, process, process, process, process, process, process, process, process, process, process, process
FunctionBuilder(ASTInfo astInfo, FunctionAndBlockManager functionAndBlocksManager, SourceLocation.SourceLocationMaker sourceLocationMaker, SyntacticAnalysis syntacticInformationCollector)
public TranslationResult ignoredByClosureCompiler(com.google.javascript.jscomp.parsing.parser.trees.ParseTree tree)
WritePropertyNode makeWriteFixedPropertyNode(int baseRegister, com.google.javascript.jscomp.parsing.parser.Token propertyName, int rhsRegister, WritePropertyNode.Kind propertyKind, SourceLocation location)
public TranslationResult process(com.google.javascript.jscomp.parsing.parser.trees.ArrayLiteralExpressionTree tree, AstEnv env)
process
in interface ParseTreeAuxVisitor<TranslationResult,AstEnv>
process
in class DefaultDispatchingParseTreeAuxVisitor<TranslationResult,AstEnv>
public TranslationResult process(com.google.javascript.jscomp.parsing.parser.trees.BinaryOperatorTree tree, AstEnv env)
process
in interface ParseTreeAuxVisitor<TranslationResult,AstEnv>
process
in class DefaultDispatchingParseTreeAuxVisitor<TranslationResult,AstEnv>
public TranslationResult process(com.google.javascript.jscomp.parsing.parser.trees.BlockTree tree, AstEnv env)
process
in interface ParseTreeAuxVisitor<TranslationResult,AstEnv>
process
in class DefaultDispatchingParseTreeAuxVisitor<TranslationResult,AstEnv>
public TranslationResult process(com.google.javascript.jscomp.parsing.parser.trees.BreakStatementTree tree, AstEnv env)
process
in interface ParseTreeAuxVisitor<TranslationResult,AstEnv>
process
in class DefaultDispatchingParseTreeAuxVisitor<TranslationResult,AstEnv>
public TranslationResult process(com.google.javascript.jscomp.parsing.parser.trees.CallExpressionTree tree, AstEnv env)
process
in interface ParseTreeAuxVisitor<TranslationResult,AstEnv>
process
in class DefaultDispatchingParseTreeAuxVisitor<TranslationResult,AstEnv>
public TranslationResult process(com.google.javascript.jscomp.parsing.parser.trees.CaseClauseTree tree, AstEnv env)
process
in interface ParseTreeAuxVisitor<TranslationResult,AstEnv>
process
in class DefaultDispatchingParseTreeAuxVisitor<TranslationResult,AstEnv>
public TranslationResult process(com.google.javascript.jscomp.parsing.parser.trees.CatchTree tree, AstEnv env)
process
in interface ParseTreeAuxVisitor<TranslationResult,AstEnv>
process
in class DefaultDispatchingParseTreeAuxVisitor<TranslationResult,AstEnv>
public TranslationResult process(com.google.javascript.jscomp.parsing.parser.trees.CommaExpressionTree tree, AstEnv env)
process
in interface ParseTreeAuxVisitor<TranslationResult,AstEnv>
process
in class DefaultDispatchingParseTreeAuxVisitor<TranslationResult,AstEnv>
public TranslationResult process(com.google.javascript.jscomp.parsing.parser.trees.ConditionalExpressionTree tree, AstEnv env)
process
in interface ParseTreeAuxVisitor<TranslationResult,AstEnv>
process
in class DefaultDispatchingParseTreeAuxVisitor<TranslationResult,AstEnv>
public TranslationResult process(com.google.javascript.jscomp.parsing.parser.trees.ContinueStatementTree tree, AstEnv env)
process
in interface ParseTreeAuxVisitor<TranslationResult,AstEnv>
process
in class DefaultDispatchingParseTreeAuxVisitor<TranslationResult,AstEnv>
public TranslationResult process(com.google.javascript.jscomp.parsing.parser.trees.DebuggerStatementTree tree, AstEnv env)
process
in interface ParseTreeAuxVisitor<TranslationResult,AstEnv>
process
in class DefaultDispatchingParseTreeAuxVisitor<TranslationResult,AstEnv>
public TranslationResult process(com.google.javascript.jscomp.parsing.parser.trees.DoWhileStatementTree tree, AstEnv env)
process
in interface ParseTreeAuxVisitor<TranslationResult,AstEnv>
process
in class DefaultDispatchingParseTreeAuxVisitor<TranslationResult,AstEnv>
public TranslationResult process(com.google.javascript.jscomp.parsing.parser.trees.EmptyStatementTree tree, AstEnv env)
process
in interface ParseTreeAuxVisitor<TranslationResult,AstEnv>
process
in class DefaultDispatchingParseTreeAuxVisitor<TranslationResult,AstEnv>
public TranslationResult process(com.google.javascript.jscomp.parsing.parser.trees.ExpressionStatementTree tree, AstEnv env)
process
in interface ParseTreeAuxVisitor<TranslationResult,AstEnv>
process
in class DefaultDispatchingParseTreeAuxVisitor<TranslationResult,AstEnv>
public TranslationResult process(com.google.javascript.jscomp.parsing.parser.trees.FinallyTree tree, AstEnv env)
process
in interface ParseTreeAuxVisitor<TranslationResult,AstEnv>
process
in class DefaultDispatchingParseTreeAuxVisitor<TranslationResult,AstEnv>
public TranslationResult process(com.google.javascript.jscomp.parsing.parser.trees.ForInStatementTree tree, AstEnv env)
process
in interface ParseTreeAuxVisitor<TranslationResult,AstEnv>
process
in class DefaultDispatchingParseTreeAuxVisitor<TranslationResult,AstEnv>
public TranslationResult process(com.google.javascript.jscomp.parsing.parser.trees.ForStatementTree tree, AstEnv env)
process
in interface ParseTreeAuxVisitor<TranslationResult,AstEnv>
process
in class DefaultDispatchingParseTreeAuxVisitor<TranslationResult,AstEnv>
public TranslationResult process(com.google.javascript.jscomp.parsing.parser.trees.FunctionDeclarationTree tree, AstEnv env)
process
in interface ParseTreeAuxVisitor<TranslationResult,AstEnv>
process
in class DefaultDispatchingParseTreeAuxVisitor<TranslationResult,AstEnv>
public TranslationResult process(com.google.javascript.jscomp.parsing.parser.trees.GetAccessorTree tree, AstEnv env)
process
in interface ParseTreeAuxVisitor<TranslationResult,AstEnv>
process
in class DefaultDispatchingParseTreeAuxVisitor<TranslationResult,AstEnv>
public TranslationResult process(com.google.javascript.jscomp.parsing.parser.trees.IdentifierExpressionTree tree, AstEnv env)
process
in interface ParseTreeAuxVisitor<TranslationResult,AstEnv>
process
in class DefaultDispatchingParseTreeAuxVisitor<TranslationResult,AstEnv>
public TranslationResult process(com.google.javascript.jscomp.parsing.parser.trees.IfStatementTree tree, AstEnv env)
process
in interface ParseTreeAuxVisitor<TranslationResult,AstEnv>
process
in class DefaultDispatchingParseTreeAuxVisitor<TranslationResult,AstEnv>
public TranslationResult process(com.google.javascript.jscomp.parsing.parser.trees.LabelledStatementTree tree, AstEnv env)
process
in interface ParseTreeAuxVisitor<TranslationResult,AstEnv>
process
in class DefaultDispatchingParseTreeAuxVisitor<TranslationResult,AstEnv>
public TranslationResult process(com.google.javascript.jscomp.parsing.parser.trees.LiteralExpressionTree tree, AstEnv env)
process
in interface ParseTreeAuxVisitor<TranslationResult,AstEnv>
process
in class DefaultDispatchingParseTreeAuxVisitor<TranslationResult,AstEnv>
public TranslationResult process(com.google.javascript.jscomp.parsing.parser.trees.MemberExpressionTree tree, AstEnv env)
process
in interface ParseTreeAuxVisitor<TranslationResult,AstEnv>
process
in class DefaultDispatchingParseTreeAuxVisitor<TranslationResult,AstEnv>
public TranslationResult process(com.google.javascript.jscomp.parsing.parser.trees.MemberLookupExpressionTree tree, AstEnv env)
process
in interface ParseTreeAuxVisitor<TranslationResult,AstEnv>
process
in class DefaultDispatchingParseTreeAuxVisitor<TranslationResult,AstEnv>
public TranslationResult process(com.google.javascript.jscomp.parsing.parser.trees.NewExpressionTree tree, AstEnv env)
process
in interface ParseTreeAuxVisitor<TranslationResult,AstEnv>
process
in class DefaultDispatchingParseTreeAuxVisitor<TranslationResult,AstEnv>
public TranslationResult process(com.google.javascript.jscomp.parsing.parser.trees.NullTree literalNode, AstEnv env)
process
in interface ParseTreeAuxVisitor<TranslationResult,AstEnv>
process
in class DefaultDispatchingParseTreeAuxVisitor<TranslationResult,AstEnv>
public TranslationResult process(com.google.javascript.jscomp.parsing.parser.trees.ObjectLiteralExpressionTree tree, AstEnv env)
process
in interface ParseTreeAuxVisitor<TranslationResult,AstEnv>
process
in class DefaultDispatchingParseTreeAuxVisitor<TranslationResult,AstEnv>
public TranslationResult process(com.google.javascript.jscomp.parsing.parser.trees.ParenExpressionTree tree, AstEnv env)
process
in interface ParseTreeAuxVisitor<TranslationResult,AstEnv>
process
in class DefaultDispatchingParseTreeAuxVisitor<TranslationResult,AstEnv>
public TranslationResult process(com.google.javascript.jscomp.parsing.parser.trees.ParseTree tree, AstEnv env)
DispatchingParseTreeAuxVisitor
IRFactory.TransformDispatcher.process(ParseTree)
process
in interface ParseTreeAuxVisitor<TranslationResult,AstEnv>
process
in class DispatchingParseTreeAuxVisitor<TranslationResult,AstEnv>
public TranslationResult process(com.google.javascript.jscomp.parsing.parser.trees.ProgramTree tree, AstEnv env)
process
in interface ParseTreeAuxVisitor<TranslationResult,AstEnv>
process
in class DefaultDispatchingParseTreeAuxVisitor<TranslationResult,AstEnv>
public TranslationResult process(com.google.javascript.jscomp.parsing.parser.trees.PropertyNameAssignmentTree tree, AstEnv env)
process
in interface ParseTreeAuxVisitor<TranslationResult,AstEnv>
process
in class DefaultDispatchingParseTreeAuxVisitor<TranslationResult,AstEnv>
public TranslationResult process(com.google.javascript.jscomp.parsing.parser.trees.ReturnStatementTree tree, AstEnv env)
process
in interface ParseTreeAuxVisitor<TranslationResult,AstEnv>
process
in class DefaultDispatchingParseTreeAuxVisitor<TranslationResult,AstEnv>
public TranslationResult process(com.google.javascript.jscomp.parsing.parser.trees.SetAccessorTree tree, AstEnv env)
process
in interface ParseTreeAuxVisitor<TranslationResult,AstEnv>
process
in class DefaultDispatchingParseTreeAuxVisitor<TranslationResult,AstEnv>
public TranslationResult process(com.google.javascript.jscomp.parsing.parser.trees.SwitchStatementTree tree, AstEnv env)
process
in interface ParseTreeAuxVisitor<TranslationResult,AstEnv>
process
in class DefaultDispatchingParseTreeAuxVisitor<TranslationResult,AstEnv>
public TranslationResult process(com.google.javascript.jscomp.parsing.parser.trees.ThisExpressionTree tree, AstEnv env)
process
in interface ParseTreeAuxVisitor<TranslationResult,AstEnv>
process
in class DefaultDispatchingParseTreeAuxVisitor<TranslationResult,AstEnv>
public TranslationResult process(com.google.javascript.jscomp.parsing.parser.trees.ThrowStatementTree tree, AstEnv env)
process
in interface ParseTreeAuxVisitor<TranslationResult,AstEnv>
process
in class DefaultDispatchingParseTreeAuxVisitor<TranslationResult,AstEnv>
public TranslationResult process(com.google.javascript.jscomp.parsing.parser.trees.TryStatementTree tree, AstEnv env)
process
in interface ParseTreeAuxVisitor<TranslationResult,AstEnv>
process
in class DefaultDispatchingParseTreeAuxVisitor<TranslationResult,AstEnv>
public TranslationResult process(com.google.javascript.jscomp.parsing.parser.trees.UnaryExpressionTree tree, AstEnv env)
process
in interface ParseTreeAuxVisitor<TranslationResult,AstEnv>
process
in class DefaultDispatchingParseTreeAuxVisitor<TranslationResult,AstEnv>
public TranslationResult process(com.google.javascript.jscomp.parsing.parser.trees.UpdateExpressionTree tree, AstEnv env)
process
in interface ParseTreeAuxVisitor<TranslationResult,AstEnv>
process
in class DefaultDispatchingParseTreeAuxVisitor<TranslationResult,AstEnv>
public TranslationResult process(com.google.javascript.jscomp.parsing.parser.trees.VariableDeclarationListTree tree, AstEnv env)
process
in interface ParseTreeAuxVisitor<TranslationResult,AstEnv>
process
in class DefaultDispatchingParseTreeAuxVisitor<TranslationResult,AstEnv>
public TranslationResult process(com.google.javascript.jscomp.parsing.parser.trees.VariableDeclarationTree declaration, AstEnv env)
process
in interface ParseTreeAuxVisitor<TranslationResult,AstEnv>
process
in class DefaultDispatchingParseTreeAuxVisitor<TranslationResult,AstEnv>
public TranslationResult process(com.google.javascript.jscomp.parsing.parser.trees.VariableStatementTree tree, AstEnv env)
process
in interface ParseTreeAuxVisitor<TranslationResult,AstEnv>
process
in class DefaultDispatchingParseTreeAuxVisitor<TranslationResult,AstEnv>
public TranslationResult process(com.google.javascript.jscomp.parsing.parser.trees.WhileStatementTree tree, AstEnv env)
process
in interface ParseTreeAuxVisitor<TranslationResult,AstEnv>
process
in class DefaultDispatchingParseTreeAuxVisitor<TranslationResult,AstEnv>
public TranslationResult process(com.google.javascript.jscomp.parsing.parser.trees.WithStatementTree tree, AstEnv env)
process
in interface ParseTreeAuxVisitor<TranslationResult,AstEnv>
process
in class DefaultDispatchingParseTreeAuxVisitor<TranslationResult,AstEnv>
Function processFunctionDeclaration(com.google.javascript.jscomp.parsing.parser.trees.FunctionDeclarationTree.Kind kind, java.lang.String name, com.google.javascript.jscomp.parsing.parser.trees.FormalParameterListTree parameters, com.google.javascript.jscomp.parsing.parser.trees.ParseTree body, AstEnv env, SourceLocation location, java.lang.String source)
public TranslationResult unsupportedLanguageFeature(com.google.javascript.jscomp.parsing.parser.trees.ParseTree tree, java.lang.String feature)
Copyright © 2009-2019 Aarhus University