src/com/google/javascript/jscomp/InvalidatingTypes.java
/** Invalidates the given type, so that no properties on it will be inlined or renamed. */
Invalidates the given type, so that no properties on it will be inlined or renamed.
Invalidates the given type so that no properties on it will be inlined or renamed .
private Builder addType(JSType type, TypeMismatch mismatch) {
      type = type.restrictByNotNullOrUndefined();
      if (type.isUnionType()) {
        for (JSType alt : type.getUnionMembers()) {
          addType(alt, mismatch);
        }
      } else if (type.isEnumElementType()) { 
        addType(type.getEnumeratedTypeOfEnumElement(), mismatch);
      } else { 
        checkState(!type.isUnionType());
        types.add(type);
        recordInvalidation(type, mismatch);
        ObjectType objType = type.toMaybeObjectType();
        if (objType != null) {
          ObjectType proto = objType.getImplicitPrototype();
          if (proto != null) {
            types.add(proto);
            recordInvalidation(proto, mismatch);
          }
          if (objType.isConstructor()) {
            types.add(objType.toMaybeFunctionType().getInstanceType());
          } else if (objType.isInstanceType()) {
            types.add(objType.getConstructor());
          }
        }
      }
      return this;
    }
private Builder addType ( JSType type , TypeMismatch mismatch ) { type = type . restrictByNotNullOrUndefined ( ) ; if ( type . isUnionType ( ) ) { for ( JSType alt : type . getUnionMembers ( ) ) { addType ( alt , mismatch ) ; } } else if ( type . isEnumElementType ( ) ) { addType ( type . getEnumeratedTypeOfEnumElement ( ) , mismatch ) ; } else { checkState ( ! type . isUnionType ( ) ) ; types . add ( type ) ; recordInvalidation ( type , mismatch ) ; ObjectType objType = type . toMaybeObjectType ( ) ; if ( objType != null ) { ObjectType proto = objType . getImplicitPrototype ( ) ; if ( proto != null ) { types . add ( proto ) ; recordInvalidation ( proto , mismatch ) ; } if ( objType . isConstructor ( ) ) { types . add ( objType . toMaybeFunctionType ( ) . getInstanceType ( ) ) ; } else if ( objType . isInstanceType ( ) ) { types . add ( objType . getConstructor ( ) ) ; } } } return this ; }
Invalidates the given type, so that no properties on it will be inlined or renamed.
Invalidates the given type so that no properties on it will be inlined or renamed .
// only in disamb // amb and inl both do this without the else