Skip to content

Commit

Permalink
fixed files form Closure #72
Browse files Browse the repository at this point in the history
  • Loading branch information
tdurieux committed Mar 7, 2017
1 parent ea26fc1 commit 04638da
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ compiler, fnNode, new MakeDeclaredNamesUnique(
"inline_",
isCallInLoop)));
// Make label names unique to this instance.
new RenameLabels(compiler, new LabelNameSupplier(idSupplier), false)
.process(null, fnNode);
}

static class LabelNameSupplier implements Supplier<String> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ private void visitLabel(Node node, Node parent) {
String name = nameNode.getString();
LabelInfo li = getLabelInfo(name);
// This is a label...
if (li.referenced) {
if (li.referenced || !removeUnused) {
String newName = getNameForId(li.id);
if (!name.equals(newName)) {
// ... and it is used, give it the short name.
Expand Down

0 comments on commit 04638da

Please sign in to comment.