Package | Description |
---|---|
com.google.javascript.jscomp |
Provides the core compiler and its public API.
|
com.google.javascript.jscomp.newtypes |
Modifier and Type | Method and Description |
---|---|
private FunctionType |
GlobalTypeInfo.ProcessScope.simpleInferFunctionType(Node n) |
Modifier and Type | Method and Description |
---|---|
private TypeEnv |
NewTypeInference.analyzeCallNodeArgumentsFwd(Node call,
Node firstArg,
FunctionType funType,
java.util.List<JSType> argTypesForDeferredCheck,
TypeEnv inEnv) |
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) |
Modifier and Type | Field and Description |
---|---|
private static FunctionType |
FunctionType.BOTTOM_FUNCTION |
private FunctionType |
RawNominalType.ctorFn |
private FunctionType |
ObjectType.fn |
private static FunctionType |
FunctionType.LOOSE_TOP_FUNCTION |
(package private) static FunctionType |
FunctionType.QMARK_FUNCTION |
(package private) static FunctionType |
FunctionType.TOP_FUNCTION |
Modifier and Type | Method and Description |
---|---|
FunctionType |
FunctionTypeBuilder.buildFunction() |
FunctionType |
RawNominalType.getConstructorFunction() |
FunctionType |
JSType.getFunType() |
(package private) FunctionType |
ObjectType.getFunType() |
FunctionType |
JSType.getFunTypeIfSingletonObj() |
FunctionType |
FunctionType.instantiateGenerics(java.util.Map<java.lang.String,JSType> typeMap) |
FunctionType |
FunctionType.instantiateGenericsFromArgumentTypes(java.util.List<JSType> argTypes) |
private static FunctionType |
FunctionType.instantiateGenericsWithUnknown(FunctionType f) |
(package private) static FunctionType |
FunctionType.join(FunctionType f1,
FunctionType f2) |
private static FunctionType |
FunctionType.looseJoin(FunctionType f1,
FunctionType f2) |
(package private) static FunctionType |
FunctionType.meet(FunctionType f1,
FunctionType f2) |
(package private) static FunctionType |
FunctionType.normalized(java.util.List<JSType> requiredFormals,
java.util.List<JSType> optionalFormals,
JSType restFormals,
JSType retType,
JSType nominalType,
JSType receiverType,
java.util.Map<java.lang.String,JSType> outerVars,
com.google.common.collect.ImmutableList<java.lang.String> typeParameters,
boolean isLoose) |
(package private) FunctionType |
FunctionType.specialize(FunctionType other) |
(package private) FunctionType |
FunctionType.substituteGenerics(java.util.Map<java.lang.String,JSType> concreteTypes)
FunctionType#substituteGenerics is called while instantiating prototype
methods of generic nominal types.
|
private FunctionType |
FunctionType.substituteNominalGenerics(java.util.Map<java.lang.String,JSType> typeMap) |
private FunctionType |
FunctionType.substituteParametricGenerics(java.util.Map<java.lang.String,JSType> typeMap) |
FunctionType |
DeclaredFunctionType.toFunctionType() |
FunctionType |
FunctionType.transformByApplyProperty(JSTypes commonTypes) |
FunctionType |
FunctionType.transformByCallProperty() |
(package private) static FunctionType |
FunctionType.unifyUnknowns(FunctionType f1,
FunctionType f2)
Unify the two types symmetrically, given that we have already instantiated
the type variables of interest in
f1 and f2 , treating
JSType.UNKNOWN as a "hole" to be filled. |
(package private) FunctionType |
FunctionType.withLoose() |
Modifier and Type | Method and Description |
---|---|
(package private) static ObjectType |
ObjectType.fromFunction(FunctionType fn,
NominalType fnNominal) |
JSType |
JSTypes.fromFunctionType(FunctionType fn) |
(package private) static JSType |
JSType.fromFunctionType(FunctionType fn,
NominalType fnNominal) |
private static FunctionType |
FunctionType.instantiateGenericsWithUnknown(FunctionType f) |
(package private) static boolean |
FunctionType.isInhabitable(FunctionType f) |
(package private) boolean |
FunctionType.isLooseSubtypeOf(FunctionType f2,
SubtypeCache subSuperMap) |
(package private) boolean |
FunctionType.isSubtypeOf(FunctionType other,
SubtypeCache subSuperMap) |
private boolean |
FunctionType.isSubtypeOfHelper(FunctionType other,
boolean checkThisType,
SubtypeCache subSuperMap) |
boolean |
FunctionType.isValidOverride(FunctionType other) |
(package private) static FunctionType |
FunctionType.join(FunctionType f1,
FunctionType f2) |
private static FunctionType |
FunctionType.looseJoin(FunctionType f1,
FunctionType f2) |
(package private) static ObjectType |
ObjectType.makeObjectType(NominalType nominalType,
PersistentMap<java.lang.String,Property> props,
FunctionType fn,
Namespace ns,
boolean isLoose,
ObjectKind ok) |
(package private) static FunctionType |
FunctionType.meet(FunctionType f1,
FunctionType f2) |
void |
RawNominalType.setCtorFunction(FunctionType ctorFn) |
(package private) FunctionType |
FunctionType.specialize(FunctionType other) |
(package private) static FunctionType |
FunctionType.unifyUnknowns(FunctionType f1,
FunctionType f2)
Unify the two types symmetrically, given that we have already instantiated
the type variables of interest in
f1 and f2 , treating
JSType.UNKNOWN as a "hole" to be filled. |
(package private) boolean |
FunctionType.unifyWithSubtype(FunctionType other,
java.util.List<java.lang.String> typeParameters,
com.google.common.collect.Multimap<java.lang.String,JSType> typeMultimap,
SubtypeCache subSuperMap) |
JSType |
JSType.withFunction(FunctionType ft,
NominalType fnNominal) |
(package private) ObjectType |
ObjectType.withFunction(FunctionType ft,
NominalType fnNominal) |
Constructor and Description |
---|
ObjectType(NominalType nominalType,
PersistentMap<java.lang.String,Property> props,
FunctionType fn,
Namespace ns,
boolean isLoose,
ObjectKind objectKind) |