class_body
{ "{"
line_comment "// TODO(johnlenz): We no longer make this check, but we shou"...
field_declaration (+25 nodes collapsed)
field_declaration
modifiers
private "private"
final "final"
type_identifier "AbstractCompiler"
variable_declarator
identifier "compiler"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "JSTypeRegistry"
variable_declarator
identifier "registry"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "ReverseAbstractInterpreter"
variable_declarator
identifier "reverseInterpreter"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "Scope"
variable_declarator
identifier "syntacticScope"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "FlowScope"
variable_declarator
identifier "functionScope"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "FlowScope"
variable_declarator
identifier "bottomScope"
; ";"
field_declaration
modifiers
private "private"
final "final"
generic_type
type_identifier "Map"
type_arguments
< "<"
type_identifier "String"
, ","
type_identifier "AssertionFunctionSpec"
> ">"
variable_declarator
identifier "assertionFunctionsMap"
; ";"
line_comment "// For convenience"
field_declaration
modifiers
private "private"
final "final"
type_identifier "ObjectType"
variable_declarator
identifier "unknownType"
; ";"
constructor_declaration (+267 nodes collapsed)
block_comment "/**\n * Infers all of a function's arguments if their types"...
method_declaration (+361 nodes collapsed)
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
type_identifier "FlowScope"
identifier "createInitialEstimateLattice"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "bottomScope"
; ";"
} "}"
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
type_identifier "FlowScope"
identifier "createEntryLattice"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "functionScope"
; ";"
} "}"
method_declaration (+68 nodes collapsed)
method_declaration (+768 nodes collapsed)
method_declaration (+1167 nodes collapsed)
block_comment "/**\n * Traverse a return value.\n */"
method_declaration (+138 nodes collapsed)
block_comment "/**\n * Any value can be thrown, so it's really impossible "...
method_declaration (+137 nodes collapsed)
method_declaration (+110 nodes collapsed)
block_comment "/**\n * Updates the scope according to the result of a type"...
method_declaration (+310 nodes collapsed)
block_comment "/**\n * Defines a property if the property has not been def"...
method_declaration (+483 nodes collapsed)
block_comment "/**\n * Defines a declared property if it has not been defi"...
method_declaration (+67 nodes collapsed)
block_comment "/**\n * Declares a property on its owner, if necessary.\n "...
method_declaration (+197 nodes collapsed)
method_declaration (+333 nodes collapsed)
block_comment "/** Traverse each element of the array. */"
method_declaration (+50 nodes collapsed)
method_declaration (+460 nodes collapsed)
method_declaration (+319 nodes collapsed)
method_declaration (+40 nodes collapsed)
method_declaration (+228 nodes collapsed)
method_declaration (+170 nodes collapsed)
method_declaration (+280 nodes collapsed)
method_declaration (+116 nodes collapsed)
block_comment "/**\n * We only do forward type inference. We do not do ful"...
method_declaration (+83 nodes collapsed)
block_comment "/**\n * When \"bind\" is called on a function, we infer the t"...
method_declaration (+123 nodes collapsed)
block_comment "/**\n * For functions with function parameters, type infere"...
method_declaration (+212 nodes collapsed)
method_declaration (+197 nodes collapsed)
method_declaration (+415 nodes collapsed)
method_declaration (+63 nodes collapsed)
method_declaration (+162 nodes collapsed)
method_declaration (+115 nodes collapsed)
class_declaration (+145 nodes collapsed)
block_comment "/**\n * For functions with function(this: T, ...) and T as "...
method_declaration
modifiers
private "private"
boolean_type "boolean"
identifier "inferTemplatedTypesForCall"
formal_parameters
( "("
formal_parameter
type_identifier "Node"
identifier "n"
, ","
formal_parameter
type_identifier "FunctionType"
identifier "fnType"
) ")"
block
{ "{"
local_variable_declaration (+26 nodes collapsed)
if_statement
if "if"
parenthesized_expression
( "("
method_invocation
identifier "keys"
. "."
identifier "isEmpty"
argument_list
( "("
) ")"
) ")"
block
{ "{"
return_statement
return "return"
false "false"
; ";"
} "}"
line_comment "// Try to infer the template types"
local_variable_declaration
generic_type
type_identifier "Map"
type_arguments
< "<"
type_identifier "TemplateType"
, ","
type_identifier "JSType"
> ">"
variable_declarator
identifier "inferred"
= "="
method_invocation
identifier "inferTemplateTypesFromParameters"
argument_list
( "("
identifier "fnType"
, ","
identifier "n"
) ")"
; ";"
line_comment "// Replace all template types. If we couldn't find a replace"...
line_comment "// replace it with UNKNOWN."
local_variable_declaration
type_identifier "TemplateTypeReplacer"
variable_declarator
identifier "replacer"
= "="
object_creation_expression
new "new"
type_identifier "TemplateTypeReplacer"
argument_list
( "("
identifier "registry"
, ","
identifier "inferred"
) ")"
; ";"
local_variable_declaration
type_identifier "Node"
variable_declarator
identifier "callTarget"
= "="
method_invocation
identifier "n"
. "."
identifier "getFirstChild"
argument_list
( "("
) ")"
; ";"
local_variable_declaration
type_identifier "FunctionType"
variable_declarator
identifier "replacementFnType"
= "="
method_invocation
method_invocation
identifier "fnType"
. "."
identifier "visit"
argument_list
( "("
identifier "replacer"
) ")"
. "."
identifier "toMaybeFunctionType"
argument_list
( "("
) ")"
; ";"
expression_statement
method_invocation
identifier "Preconditions"
. "."
identifier "checkNotNull"
argument_list
( "("
identifier "replacementFnType"
) ")"
; ";"
expression_statement
method_invocation
identifier "callTarget"
. "."
identifier "setJSType"
argument_list
( "("
identifier "replacementFnType"
) ")"
; ";"
expression_statement
method_invocation
identifier "n"
. "."
identifier "setJSType"
argument_list
( "("
method_invocation
identifier "replacementFnType"
. "."
identifier "getReturnType"
argument_list
( "("
) ")"
) ")"
; ";"
return_statement
return "return"
field_access
identifier "replacer"
. "."
identifier "madeChanges"
; ";"
} "}"
method_declaration (+278 nodes collapsed)
method_declaration (+31 nodes collapsed)
method_declaration (+70 nodes collapsed)
method_declaration (+130 nodes collapsed)
method_declaration (+107 nodes collapsed)
block_comment "/**\n * Suppose X is an object with inferred properties.\n "...
method_declaration (+50 nodes collapsed)
block_comment "/**\n * If we access a property of a symbol, then that symb"...
method_declaration (+89 nodes collapsed)
method_declaration (+453 nodes collapsed)
method_declaration (+31 nodes collapsed)
method_declaration (+401 nodes collapsed)
method_declaration (+105 nodes collapsed)
block_comment "/**\n * Infers the boolean outcome pair that can be taken b"...
method_declaration (+78 nodes collapsed)
block_comment "/**\n * Infers the boolean literal set that can be taken by"...
method_declaration (+49 nodes collapsed)
block_comment "/**\n * When traversing short-circuiting binary operations,"...
class_declaration (+234 nodes collapsed)
method_declaration (+99 nodes collapsed)
method_declaration (+113 nodes collapsed)
method_declaration (+52 nodes collapsed)
block_comment "/**\n * This method gets the JSType from the Node argument "...
method_declaration (+55 nodes collapsed)
method_declaration (+25 nodes collapsed)
} "}"