Collection<JsStringLiteral> toCreate, Map<JsStringLiteral, JsName> names) {
if (toCreate.size() > 0) {
// Create the pool of variable names.
JsVars vars = new JsVars(program.createSourceInfoSynthetic(
JsStringInterner.class, "Interned string pool"));
SourceInfo sourceInfo = program.createSourceInfoSynthetic(
JsStringInterner.class, "Interned string assignment");
for (JsStringLiteral literal : toCreate) {
JsVar var = new JsVar(sourceInfo, names.get(literal));
var.setInitExpr(literal);
vars.add(var);