Package | Description |
---|---|
com.google.javascript.jscomp |
Provides the core compiler and its public API.
|
com.google.javascript.jscomp.type |
Provides type-checking data structures and algorithms.
|
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 | Class and Description |
---|---|
(package private) class |
GlobalNamespace
Builds a global namespace of all the objects and their properties in
the global scope.
|
(package private) class |
LinkedFlowScope
A flow scope that tries to store as little symbol information as possible,
instead delegating to its parents.
|
(package private) class |
PreprocessorSymbolTable
A symbol table for references that are removed by preprocessor passes
(like
ProcessClosurePrimitives ). |
class |
TypedScope
TypedScope contains information about variables and their types.
|
Modifier and Type | Field and Description |
---|---|
private StaticTypedScope<JSType> |
TypeTransformation.scope |
Modifier and Type | Method and Description |
---|---|
StaticTypedScope<JSType> |
LinkedFlowScope.getParentScope() |
StaticTypedScope<JSType> |
PreprocessorSymbolTable.getParentScope() |
StaticTypedScope<JSType> |
TypedScope.getParentScope() |
StaticTypedScope<TypeI> |
GlobalNamespace.getParentScope() |
StaticTypedScope<TypeI> |
GlobalNamespace.getScope(GlobalNamespace.Name slot) |
StaticTypedScope<JSType> |
PreprocessorSymbolTable.getScope(SimpleSlot slot) |
private StaticTypedScope<JSType> |
TypeTransformation.getScope(StaticTypedScope<JSType> scope,
java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
void |
LinkedFlowScope.completeScope(StaticTypedScope<JSType> staticScope)
Look through the given scope, and try to find slots where it doesn't
have enough type information.
|
void |
CodingConvention.defineDelegateProxyPrototypeProperties(JSTypeRegistry registry,
StaticTypedScope<JSType> scope,
java.util.List<ObjectType> delegateProxyPrototypes,
java.util.Map<java.lang.String,java.lang.String> delegateCallingConventions)
Defines the delegate proxy prototype properties.
|
void |
CodingConventions.Proxy.defineDelegateProxyPrototypeProperties(JSTypeRegistry registry,
StaticTypedScope<JSType> scope,
java.util.List<ObjectType> delegateProxyPrototypes,
java.util.Map<java.lang.String,java.lang.String> delegateCallingConventions) |
void |
CodingConventions.DefaultCodingConvention.defineDelegateProxyPrototypeProperties(JSTypeRegistry registry,
StaticTypedScope<JSType> scope,
java.util.List<ObjectType> delegateProxyPrototypes,
java.util.Map<java.lang.String,java.lang.String> delegateCallingConventions) |
private StaticTypedScope<JSType> |
TypeTransformation.getScope(StaticTypedScope<JSType> scope,
java.lang.String name) |
Constructor and Description |
---|
TypeTransformation(AbstractCompiler compiler,
StaticTypedScope<JSType> scope) |
Modifier and Type | Interface and Description |
---|---|
interface |
FlowScope
A symbol table for inferring types during data flow analysis.
|
Modifier and Type | Method and Description |
---|---|
void |
FlowScope.completeScope(StaticTypedScope<JSType> scope)
Look through the given scope, and try to find slots where it doesn't
have enough type information.
|
Modifier and Type | Method and Description |
---|---|
TypeI |
TypeIRegistry.createTypeFromCommentNode(Node n,
java.lang.String sourceName,
StaticTypedScope<? extends TypeI> scope) |
JSType |
JSTypeExpression.evaluate(StaticTypedScope<JSType> scope,
TypeIRegistry registry)
Evaluates the type expression into a
JSType object. |
Modifier and Type | Field and Description |
---|---|
private com.google.common.collect.Multimap<StaticTypedScope<JSType>,NamedType> |
JSTypeRegistry.resolvedNamedTypes |
private com.google.common.collect.Multimap<StaticTypedScope<JSType>,NamedType> |
JSTypeRegistry.unresolvedNamedTypes |
Modifier and Type | Method and Description |
---|---|
StaticTypedScope<T> |
StaticTypedScope.getParentScope()
Returns the scope enclosing this one or null if none.
|
Modifier and Type | Method and Description |
---|---|
private JSType |
JSTypeRegistry.createFromTypeNodesInternal(Node n,
java.lang.String sourceName,
StaticTypedScope<JSType> scope) |
private JSType |
JSTypeRegistry.createRecordTypeFromNodes(Node n,
java.lang.String sourceName,
StaticTypedScope<JSType> scope)
Creates a RecordType from the nodes representing said record type.
|
JSType |
JSTypeRegistry.createTypeFromCommentNode(Node n,
java.lang.String sourceName,
StaticTypedScope<? extends TypeI> scope)
Creates a JSType from the nodes representing a type.
|
JSType |
JSTypeRegistry.getType(StaticTypedScope<JSType> scope,
java.lang.String jsTypeName,
java.lang.String sourceName,
int lineno,
int charno)
Looks up a type by name.
|
private JSType |
NamedType.lookupViaProperties(ErrorReporter reporter,
StaticTypedScope<JSType> enclosing)
Resolves a type by looking up its first component in the scope, and
subsequent components as properties.
|
JSType |
JSType.resolve(ErrorReporter t,
StaticTypedScope<JSType> scope)
Resolve this type in the given scope.
|
(package private) JSType |
NamespaceType.resolveInternal(ErrorReporter t,
StaticTypedScope<JSType> enclosing)
Resolve the referenced type within the enclosing scope.
|
(package private) JSType |
UnknownType.resolveInternal(ErrorReporter t,
StaticTypedScope<JSType> scope) |
(package private) JSType |
EnumType.resolveInternal(ErrorReporter t,
StaticTypedScope<JSType> scope) |
(package private) JSType |
NoObjectType.resolveInternal(ErrorReporter t,
StaticTypedScope<JSType> scope) |
(package private) JSType |
NamedType.resolveInternal(ErrorReporter t,
StaticTypedScope<JSType> enclosing)
Resolve the referenced type within the enclosing scope.
|
(package private) JSType |
ArrowType.resolveInternal(ErrorReporter t,
StaticTypedScope<JSType> scope) |
(package private) JSType |
AllType.resolveInternal(ErrorReporter t,
StaticTypedScope<JSType> scope) |
(package private) abstract JSType |
JSType.resolveInternal(ErrorReporter t,
StaticTypedScope<JSType> scope) |
(package private) JSType |
FunctionType.resolveInternal(ErrorReporter t,
StaticTypedScope<JSType> scope) |
(package private) JSType |
ValueType.resolveInternal(ErrorReporter t,
StaticTypedScope<JSType> scope) |
(package private) JSType |
ProxyObjectType.resolveInternal(ErrorReporter t,
StaticTypedScope<JSType> scope) |
(package private) JSType |
UnionType.resolveInternal(ErrorReporter t,
StaticTypedScope<JSType> scope) |
(package private) JSType |
EnumElementType.resolveInternal(ErrorReporter t,
StaticTypedScope<JSType> scope) |
(package private) JSType |
PrototypeObjectType.resolveInternal(ErrorReporter t,
StaticTypedScope<JSType> scope) |
private com.google.common.collect.ImmutableList<ObjectType> |
FunctionType.resolveTypeListHelper(com.google.common.collect.ImmutableList<ObjectType> list,
ErrorReporter t,
StaticTypedScope<JSType> scope)
Resolve each item in the list, and return a new list if any
references changed.
|
void |
JSTypeRegistry.resolveTypesInScope(StaticTypedScope<JSType> scope)
Resolve all the unresolved types in the given scope.
|
private void |
NamedType.resolveViaProperties(ErrorReporter reporter,
StaticTypedScope<JSType> enclosing)
Resolves a named type by looking up its first component in the scope, and
subsequent components as properties.
|
(package private) static JSType |
JSType.safeResolve(JSType type,
ErrorReporter t,
StaticTypedScope<JSType> scope)
A null-safe resolve.
|
Modifier and Type | Class and Description |
---|---|
class |
AbstractStaticScope<T>
A scope that just returns null for everything.
|
class |
MapBasedScope
A scope based on a simple hashmap.
|
Modifier and Type | Method and Description |
---|---|
StaticTypedScope<T> |
AbstractStaticScope.getParentScope() |
Modifier and Type | Method and Description |
---|---|
static JSType |
Asserts.assertValidResolve(JSType type,
StaticTypedScope<JSType> scope) |