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.jstype |
Provides abstractions to represent types in JavaScript.
|
Modifier and Type | Field and Description |
---|---|
private com.google.common.collect.ImmutableList<TemplateType> |
FunctionTypeBuilder.classTemplateTypeNames |
private java.util.Map<TemplateType,JSType> |
TypeInference.TemplateTypeReplacer.replacements |
private com.google.common.collect.ImmutableList<TemplateType> |
FunctionTypeBuilder.templateTypeNames |
Modifier and Type | Method and Description |
---|---|
private java.util.Map<TemplateType,JSType> |
TypeInference.evaluateTypeTransformations(com.google.common.collect.ImmutableList<TemplateType> templateTypes,
java.util.Map<TemplateType,JSType> inferredTypes)
This function will evaluate the type transformations associated to the
template types
|
private java.util.Map<TemplateType,JSType> |
TypeInference.inferTemplateTypesFromParameters(FunctionType fnType,
Node call) |
Modifier and Type | Method and Description |
---|---|
java.util.Set<java.lang.String> |
GatherExternProperties.ExtractRecordTypePropertyNames.caseTemplateType(TemplateType templateType) |
JSType |
TypeInference.TemplateTypeReplacer.caseTemplateType(TemplateType type) |
private static void |
TypeInference.resolvedTemplateType(java.util.Map<TemplateType,JSType> map,
TemplateType template,
JSType resolved) |
Modifier and Type | Method and Description |
---|---|
private java.util.Map<java.lang.String,JSType> |
TypeInference.buildTypeVariables(java.util.Map<TemplateType,JSType> inferredTypes)
Build the type environment where type transformations will be evaluated.
|
private java.util.Map<TemplateType,JSType> |
TypeInference.evaluateTypeTransformations(com.google.common.collect.ImmutableList<TemplateType> templateTypes,
java.util.Map<TemplateType,JSType> inferredTypes)
This function will evaluate the type transformations associated to the
template types
|
private java.util.Map<TemplateType,JSType> |
TypeInference.evaluateTypeTransformations(com.google.common.collect.ImmutableList<TemplateType> templateTypes,
java.util.Map<TemplateType,JSType> inferredTypes)
This function will evaluate the type transformations associated to the
template types
|
private void |
TypeInference.maybeResolveTemplatedType(JSType paramType,
JSType argType,
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 static void |
TypeInference.resolvedTemplateType(java.util.Map<TemplateType,JSType> map,
TemplateType template,
JSType resolved) |
Constructor and Description |
---|
TemplateTypeReplacer(JSTypeRegistry registry,
java.util.Map<TemplateType,JSType> replacements) |
Modifier and Type | Method and Description |
---|---|
JSType |
ChainableReverseAbstractInterpreter.RestrictByTypeOfResultVisitor.caseTemplateType(TemplateType templateType) |
Modifier and Type | Field and Description |
---|---|
private TemplateType |
JSTypeRegistry.arrayElementTemplateKey
The template variable in
Array<T> . |
private TemplateType |
JSTypeRegistry.iObjectElementTemplateKey
The template variable corresponding to the VALUE type in
IObject<KEY, VALUE> (plus the builtin Javascript Object). |
private TemplateType |
JSTypeRegistry.iObjectIndexTemplateKey
The template variable corresponding to the KEY type in
IObject<KEY, VALUE> (plus the builtin Javascript Object). |
Modifier and Type | Field and Description |
---|---|
private com.google.common.collect.ImmutableList<TemplateType> |
TemplateTypeMap.templateKeys |
private java.util.Map<java.lang.String,TemplateType> |
JSTypeRegistry.templateTypes |
private ArrayDeque<TemplateType> |
TemplateTypeMapReplacer.visitedTypes |
Modifier and Type | Method and Description |
---|---|
TemplateType |
JSTypeRegistry.createTemplateType(java.lang.String name) |
TemplateType |
JSTypeRegistry.createTemplateTypeWithTransformation(java.lang.String name,
Node expr) |
TemplateType |
JSTypeRegistry.getObjectElementKey() |
TemplateType |
JSTypeRegistry.getObjectIndexKey() |
TemplateType |
TemplateTypeMap.getTemplateTypeKeyByName(java.lang.String keyName) |
TemplateType |
TemplateType.toMaybeTemplateType() |
TemplateType |
JSType.toMaybeTemplateType()
Downcasts this to a TemplateType, or returns null if this is not
a function.
|
TemplateType |
ProxyObjectType.toMaybeTemplateType() |
Modifier and Type | Method and Description |
---|---|
com.google.common.collect.ImmutableList<TemplateType> |
TemplateTypeMap.getTemplateKeys()
Returns a list of all template keys.
|
com.google.common.collect.ImmutableList<TemplateType> |
JSTypeRegistry.getTemplateTypesOfBuiltin(java.lang.String fnName) |
(package private) com.google.common.collect.ImmutableList<TemplateType> |
TemplateTypeMap.getUnfilledTemplateKeys()
Returns a list of template keys in this map that do not have corresponding
JSType values.
|
Modifier and Type | Method and Description |
---|---|
T |
Visitor.caseTemplateType(TemplateType templateType)
Template type's case.
|
JSType |
TemplateTypeMapReplacer.caseTemplateType(TemplateType type) |
JSType |
ModificationVisitor.caseTemplateType(TemplateType type) |
T |
RelationshipVisitor.caseTemplateType(TemplateType thisType,
JSType thatType)
Template type's case.
|
java.lang.Boolean |
CanCastToVisitor.caseTemplateType(TemplateType thisType,
JSType thatType) |
JSType |
TemplateTypeMap.getResolvedTemplateType(TemplateType key)
Returns the JSType value associated with the specified template key.
|
private int |
TemplateTypeMap.getTemplateTypeIndex(TemplateType key)
Returns the index of the JSType value associated with the specified
template key.
|
(package private) JSType |
TemplateTypeMap.getUnresolvedOriginalTemplateType(TemplateType key) |
boolean |
TemplateTypeMap.hasTemplateKey(TemplateType templateKey)
Returns true if this map contains the specified template key, false
otherwise.
|
boolean |
TemplateTypeMap.hasTemplateType(TemplateType key)
Returns true if there is a JSType value associated with the specified
template key; false otherwise.
|
private boolean |
TemplateTypeMapReplacer.hasVisitedType(TemplateType type)
Checks if the specified type has already been visited during the Visitor's
traversal of a JSType.
|
private boolean |
TemplateTypeMapReplacer.isRecursive(TemplateType currentType,
JSType replacementType)
Returns whether the replacement type is a templatized type which contains the current type.
|
private boolean |
TemplateTypeMapReplacer.isSameType(TemplateType currentType,
TemplateType replacementType) |
Modifier and Type | Method and Description |
---|---|
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.
|
FunctionType |
JSTypeRegistry.createInterfaceType(java.lang.String name,
Node source,
com.google.common.collect.ImmutableList<TemplateType> templateKeys,
boolean struct)
Creates an interface function type.
|
TemplateTypeMap |
JSTypeRegistry.createTemplateTypeMap(com.google.common.collect.ImmutableList<TemplateType> templateKeys,
com.google.common.collect.ImmutableList<JSType> templateValues)
Creates a template type map from the specified list of template keys and
template value types.
|
TemplatizedType |
JSTypeRegistry.createTemplatizedType(ObjectType baseType,
java.util.Map<TemplateType,JSType> templatizedTypes)
Creates a templatized instance of the specified type.
|
void |
JSTypeRegistry.setTemplateTypeNames(java.util.List<TemplateType> keys)
Sets the template type name.
|
FunctionBuilder |
FunctionBuilder.withTemplateKeys(com.google.common.collect.ImmutableList<TemplateType> templateKeys)
Set the template name.
|
Constructor and Description |
---|
TemplateTypeMap(JSTypeRegistry registry,
com.google.common.collect.ImmutableList<TemplateType> templateKeys,
com.google.common.collect.ImmutableList<JSType> templateValues) |