Search in sources :

Example 1 with InvalidatingTypes

use of com.google.javascript.jscomp.InvalidatingTypes in project closure-compiler by google.

the class SerializeTypesToPointers method create.

static SerializeTypesToPointers create(AbstractCompiler compiler, StringPool.Builder stringPoolBuilder, SerializationOptions serializationOptions) {
    InvalidatingTypes invalidatingTypes = new InvalidatingTypes.Builder(compiler.getTypeRegistry()).addAllTypeMismatches(compiler.getTypeMismatches()).build();
    // this set requires access to the externs and src ASTs, so can't be populated yet.
    LinkedHashSet<String> propertiesReferencedInAst = new LinkedHashSet<>();
    JSTypeReconserializer jsTypeReconserializer = JSTypeReconserializer.create(compiler.getTypeRegistry(), invalidatingTypes, stringPoolBuilder, propertiesReferencedInAst::contains, serializationOptions);
    return new SerializeTypesToPointers(compiler, jsTypeReconserializer, propertiesReferencedInAst);
}
Also used : LinkedHashSet(java.util.LinkedHashSet) InvalidatingTypes(com.google.javascript.jscomp.InvalidatingTypes)

Aggregations

InvalidatingTypes (com.google.javascript.jscomp.InvalidatingTypes)1 LinkedHashSet (java.util.LinkedHashSet)1