That would also avoid calling updateNames more than once.

Basically: find globals through traversal and ruling out what is in asmInfo.vars and .params. Then go over .vars and params and pick a minified name for each. Then traverse to replace those names?