private JSType getSentinelObjectLiteral() { if (sentinelObjectLiteral == null) { sentinelObjectLiteral = createAnonymousObjectType(null); } return sentinelObjectLiteral; }
/** Creates an empty object literal, `{}`. */ Node createEmptyObjectLit() { Node result = IR.objectlit(); if (isAddingTypes()) { result.setJSType(registry.createAnonymousObjectType(null)); } return result; }
/** * There are some special cases where clients of the compiler * do not run TypedScopeCreator after running this pass. * So always give the namespace literal a type. */ private Node createNamespaceLiteral() { Node objlit = IR.objectlit(); objlit.setJSType( compiler.getTypeRegistry().createAnonymousObjectType(null)); return objlit; }
type = typeRegistry.createAnonymousObjectType(info);
type = typeRegistry.createAnonymousObjectType(info);