generateGwtOnLoad(Lists.create(entryFunctions), globalStmts);
// Add a few things onto the beginning.
// Reserve the "_" identifier.
JsVars vars = new JsVars(jsProgram.getSourceInfo());
vars.add(new JsVar(jsProgram.getSourceInfo(), globalTemp));
globalStmts.add(0, vars);
// Long lits must go at the top, they can be constant field initializers.
generateLongLiterals(vars);
generateImmortalTypes(vars);
generateQueryIdConstants(vars);
generateInternedCastMapLiterals(vars);
// Class objects, but only if there are any.
if (x.getDeclaredTypes().contains(x.getTypeClassLiteralHolder())) {
// TODO: perhaps they could be constant field initializers also?
vars = new JsVars(jsProgram.getSourceInfo());
generateClassLiterals(vars);
if (!vars.isEmpty()) {
globalStmts.add(vars);
}
}
if (program.getRunAsyncs().size() > 0) {