diff --git a/tools/js-optimizer.js b/tools/js-optimizer.js index 23a5467bf..2b84c88cd 100644 --- a/tools/js-optimizer.js +++ b/tools/js-optimizer.js @@ -1402,6 +1402,7 @@ function registerize(ast, asm) { if (!varUses[name]) return false; // no uses left, or not a relevant variable if (optimizables[name]) activeOptimizables[name] = 1; var reg = varRegs[name]; + if (asm) assert(name in asmData.vars, name); var freeRegs = asm ? freeRegsClasses[asmData.vars[name]] : freeRegsClasses; if (!reg) { // acquire register