SourceInfo sourceInfo = program.createSourceInfoSynthetic(
GenerateJavaScriptAST.class, "gwtOnLoad");
JsName entryName = topScope.findExistingName("$entry");
entryName.setObfuscatable(true);
JsVar entryVar = new JsVar(sourceInfo, entryName);
JsInvocation registerEntryCall = new JsInvocation(sourceInfo);
JsFunction registerEntryFunction = indexedFunctions.get("Impl.registerEntry");
registerEntryCall.setQualifier(registerEntryFunction.getName().makeRef(
sourceInfo));
entryVar.setInitExpr(registerEntryCall);
JsVars entryVars = new JsVars(sourceInfo);
entryVars.add(entryVar);
globalStmts.add(entryVars);
JsName gwtOnLoadName = topScope.declareName("gwtOnLoad");