Package | Description |
---|---|
com.google.javascript.jscomp.newtypes |
Modifier and Type | Field and Description |
---|---|
private ObjectType |
JSTypes.booleanInstanceObjtype |
private static ObjectType |
ObjectType.BOTTOM_OBJECT |
private ObjectType |
JSTypes.numberInstanceObjtype |
private ObjectType |
JSTypes.stringInstanceObjtype |
(package private) static ObjectType |
ObjectType.TOP_DICT |
(package private) static ObjectType |
ObjectType.TOP_OBJECT |
(package private) static ObjectType |
ObjectType.TOP_STRUCT |
Modifier and Type | Field and Description |
---|---|
private com.google.common.collect.ImmutableSet<ObjectType> |
UnionType.objs |
private com.google.common.collect.ImmutableSet<ObjectType> |
ObjsType.objs |
private com.google.common.collect.ImmutableSet<ObjectType> |
NullableObjsType.objs |
Modifier and Type | Method and Description |
---|---|
(package private) static ObjectType |
ObjectType.fromFunction(FunctionType fn,
NominalType fnNominal) |
(package private) static ObjectType |
ObjectType.fromNominalType(NominalType cl) |
(package private) static ObjectType |
ObjectType.fromProperties(java.util.Map<java.lang.String,Property> oldProps)
Construct an object with the given declared properties.
|
(package private) ObjectType |
JSTypes.getBooleanInstanceObjType() |
(package private) ObjectType |
JSTypes.getNumberInstanceObjType() |
(package private) ObjectType |
JSType.getObjTypeIfSingletonObj() |
(package private) ObjectType |
JSTypes.getStringInstanceObjType() |
private static ObjectType |
ObjectType.join(ObjectType obj1,
ObjectType obj2) |
(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 ObjectType |
ObjectType.meet(ObjectType obj1,
ObjectType obj2) |
(package private) ObjectType |
ObjectType.specialize(ObjectType other) |
(package private) ObjectType |
ObjectType.substituteGenerics(java.util.Map<java.lang.String,JSType> concreteTypes) |
(package private) static ObjectType |
ObjectType.unifyUnknowns(ObjectType t1,
ObjectType t2)
Unify the two types symmetrically, given that we have already instantiated
the type variables of interest in
t1 and t2 , treating
JSType.UNKNOWN as a "hole" to be filled. |
(package private) ObjectType |
ObjectType.withFunction(FunctionType ft,
NominalType fnNominal) |
private ObjectType |
ObjectType.withLoose() |
(package private) ObjectType |
ObjectType.withProperty(QualifiedName qname,
JSType type) |
private ObjectType |
ObjectType.withPropertyHelper(QualifiedName qname,
JSType type,
boolean isDeclared,
boolean isConstant) |
private ObjectType |
ObjectType.withPropertyRequired(java.lang.String pname) |
Modifier and Type | Method and Description |
---|---|
(package private) abstract com.google.common.collect.ImmutableSet<ObjectType> |
JSType.getObjs() |
protected com.google.common.collect.ImmutableSet<ObjectType> |
UnionType.getObjs() |
protected com.google.common.collect.ImmutableSet<ObjectType> |
MaskType.getObjs() |
protected com.google.common.collect.ImmutableSet<ObjectType> |
ObjsType.getObjs() |
protected com.google.common.collect.ImmutableSet<ObjectType> |
NullableObjsType.getObjs() |
(package private) static com.google.common.collect.ImmutableSet<ObjectType> |
ObjectType.joinSets(com.google.common.collect.ImmutableSet<ObjectType> objs1,
com.google.common.collect.ImmutableSet<ObjectType> objs2) |
(package private) static com.google.common.collect.ImmutableSet<ObjectType> |
ObjectType.meetSets(java.util.Set<ObjectType> objs1,
java.util.Set<ObjectType> objs2) |
(package private) static com.google.common.collect.ImmutableSet<ObjectType> |
ObjectType.meetSetsHelper(boolean specializeObjs1,
java.util.Set<ObjectType> objs1,
java.util.Set<ObjectType> objs2) |
(package private) static com.google.common.collect.ImmutableSet<ObjectType> |
ObjectType.specializeSet(java.util.Set<ObjectType> objs1,
java.util.Set<ObjectType> objs2) |
(package private) static com.google.common.collect.ImmutableSet<ObjectType> |
ObjectType.withDeclaredProperty(java.util.Set<ObjectType> objs,
QualifiedName qname,
JSType type,
boolean isConstant) |
(package private) static com.google.common.collect.ImmutableSet<ObjectType> |
ObjectType.withLooseObjects(java.util.Set<ObjectType> objs) |
(package private) static com.google.common.collect.ImmutableSet<ObjectType> |
ObjectType.withoutProperty(java.util.Set<ObjectType> objs,
QualifiedName qname) |
(package private) static com.google.common.collect.ImmutableSet<ObjectType> |
ObjectType.withProperty(java.util.Set<ObjectType> objs,
QualifiedName qname,
JSType type) |
(package private) static com.google.common.collect.ImmutableSet<ObjectType> |
ObjectType.withPropertyRequired(java.util.Set<ObjectType> objs,
java.lang.String pname) |
Modifier and Type | Method and Description |
---|---|
private boolean |
ObjectType.arePropertiesSubtypes(ObjectType other,
java.util.Set<java.lang.String> otherPropNames,
SubtypeCache subSuperMap) |
static JSType |
JSType.fromObjectType(ObjectType obj) |
(package private) boolean |
ObjectType.isLooseSubtypeOf(ObjectType other,
SubtypeCache subSuperMap) |
(package private) boolean |
ObjectType.isSubtypeOf(ObjectType obj2,
SubtypeCache subSuperMap) |
private boolean |
ObjectType.isSubtypeOfHelper(boolean keepLoosenessOfThis,
ObjectType other,
SubtypeCache subSuperMap)
Required properties are acceptable where an optional is required,
but not vice versa.
|
private static ObjectType |
ObjectType.join(ObjectType obj1,
ObjectType obj2) |
(package private) static ObjectType |
ObjectType.meet(ObjectType obj1,
ObjectType obj2) |
(package private) ObjectType |
ObjectType.specialize(ObjectType other) |
private boolean |
ObjectType.unifyPropsWithSubtype(ObjectType other,
java.util.Set<java.lang.String> thisProps,
java.util.List<java.lang.String> typeParameters,
com.google.common.collect.Multimap<java.lang.String,JSType> typeMultimap,
SubtypeCache subSuperMap) |
(package private) static ObjectType |
ObjectType.unifyUnknowns(ObjectType t1,
ObjectType t2)
Unify the two types symmetrically, given that we have already instantiated
the type variables of interest in
t1 and t2 , treating
JSType.UNKNOWN as a "hole" to be filled. |
(package private) boolean |
ObjectType.unifyWithSubtype(ObjectType other,
java.util.List<java.lang.String> typeParameters,
com.google.common.collect.Multimap<java.lang.String,JSType> typeMultimap,
SubtypeCache subSuperMap)
Unify
this , which may contain free type variables,
with other , a concrete type, modifying the supplied
typeMultimap to add any new template varaible type bindings. |
Modifier and Type | Method and Description |
---|---|
private static boolean |
JSType.isInhabitable(java.util.Set<ObjectType> objs) |
(package private) static boolean |
ObjectType.isUnionSubtype(boolean keepLoosenessOfThis,
java.util.Set<ObjectType> objs1,
java.util.Set<ObjectType> objs2,
SubtypeCache subSuperMap) |
(package private) static boolean |
ObjectType.isUnionSubtype(boolean keepLoosenessOfThis,
java.util.Set<ObjectType> objs1,
java.util.Set<ObjectType> objs2,
SubtypeCache subSuperMap) |
(package private) static com.google.common.collect.ImmutableSet<ObjectType> |
ObjectType.joinSets(com.google.common.collect.ImmutableSet<ObjectType> objs1,
com.google.common.collect.ImmutableSet<ObjectType> objs2) |
(package private) static com.google.common.collect.ImmutableSet<ObjectType> |
ObjectType.joinSets(com.google.common.collect.ImmutableSet<ObjectType> objs1,
com.google.common.collect.ImmutableSet<ObjectType> objs2) |
private static JSType |
JSType.makeType(int mask,
com.google.common.collect.ImmutableSet<ObjectType> objs,
java.lang.String typeVar,
com.google.common.collect.ImmutableSet<EnumType> enums) |
private static JSType |
JSType.meetEnums(int newMask,
int unionMask,
com.google.common.collect.ImmutableSet<ObjectType> newObjs,
java.lang.String newTypevar,
com.google.common.collect.ImmutableSet<ObjectType> objs1,
com.google.common.collect.ImmutableSet<ObjectType> objs2,
com.google.common.collect.ImmutableSet<EnumType> enums1,
com.google.common.collect.ImmutableSet<EnumType> enums2)
Both
meet and specialize do the same computation for enums. |
private static JSType |
JSType.meetEnums(int newMask,
int unionMask,
com.google.common.collect.ImmutableSet<ObjectType> newObjs,
java.lang.String newTypevar,
com.google.common.collect.ImmutableSet<ObjectType> objs1,
com.google.common.collect.ImmutableSet<ObjectType> objs2,
com.google.common.collect.ImmutableSet<EnumType> enums1,
com.google.common.collect.ImmutableSet<EnumType> enums2)
Both
meet and specialize do the same computation for enums. |
private static JSType |
JSType.meetEnums(int newMask,
int unionMask,
com.google.common.collect.ImmutableSet<ObjectType> newObjs,
java.lang.String newTypevar,
com.google.common.collect.ImmutableSet<ObjectType> objs1,
com.google.common.collect.ImmutableSet<ObjectType> objs2,
com.google.common.collect.ImmutableSet<EnumType> enums1,
com.google.common.collect.ImmutableSet<EnumType> enums2)
Both
meet and specialize do the same computation for enums. |
(package private) static com.google.common.collect.ImmutableSet<ObjectType> |
ObjectType.meetSets(java.util.Set<ObjectType> objs1,
java.util.Set<ObjectType> objs2) |
(package private) static com.google.common.collect.ImmutableSet<ObjectType> |
ObjectType.meetSets(java.util.Set<ObjectType> objs1,
java.util.Set<ObjectType> objs2) |
(package private) static com.google.common.collect.ImmutableSet<ObjectType> |
ObjectType.meetSetsHelper(boolean specializeObjs1,
java.util.Set<ObjectType> objs1,
java.util.Set<ObjectType> objs2) |
(package private) static com.google.common.collect.ImmutableSet<ObjectType> |
ObjectType.meetSetsHelper(boolean specializeObjs1,
java.util.Set<ObjectType> objs1,
java.util.Set<ObjectType> objs2) |
(package private) static com.google.common.collect.ImmutableSet<ObjectType> |
ObjectType.specializeSet(java.util.Set<ObjectType> objs1,
java.util.Set<ObjectType> objs2) |
(package private) static com.google.common.collect.ImmutableSet<ObjectType> |
ObjectType.specializeSet(java.util.Set<ObjectType> objs1,
java.util.Set<ObjectType> objs2) |
(package private) static com.google.common.collect.ImmutableSet<ObjectType> |
ObjectType.withDeclaredProperty(java.util.Set<ObjectType> objs,
QualifiedName qname,
JSType type,
boolean isConstant) |
(package private) static com.google.common.collect.ImmutableSet<ObjectType> |
ObjectType.withLooseObjects(java.util.Set<ObjectType> objs) |
(package private) static com.google.common.collect.ImmutableSet<ObjectType> |
ObjectType.withoutProperty(java.util.Set<ObjectType> objs,
QualifiedName qname) |
(package private) static com.google.common.collect.ImmutableSet<ObjectType> |
ObjectType.withProperty(java.util.Set<ObjectType> objs,
QualifiedName qname,
JSType type) |
(package private) static com.google.common.collect.ImmutableSet<ObjectType> |
ObjectType.withPropertyRequired(java.util.Set<ObjectType> objs,
java.lang.String pname) |
Constructor and Description |
---|
NullableObjsType(com.google.common.collect.ImmutableSet<ObjectType> objs) |
ObjsType(com.google.common.collect.ImmutableSet<ObjectType> objs) |
UnionType(int mask,
com.google.common.collect.ImmutableSet<ObjectType> objs,
java.lang.String typeVar,
com.google.common.collect.ImmutableSet<EnumType> enums) |