diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-11-29 10:51:41 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-12-07 14:23:19 -0800 |
commit | 12983464a96025065fbfeed752b4445f389fe205 (patch) | |
tree | 99d9ee1430885243075531e2c35f7f2d156e5ff4 | |
parent | a10b76178eec4cc5db8f89619751d2a38c66c37e (diff) |
move label definition and add initial value
-rw-r--r-- | src/jsifier.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/jsifier.js b/src/jsifier.js index 7d777575..7bffb583 100644 --- a/src/jsifier.js +++ b/src/jsifier.js @@ -565,6 +565,11 @@ function JSify(data, functionsOnly, givenFunctions) { + '}\n'; } + if (true) { // TODO: optimize away when not needed + if (CLOSURE_ANNOTATIONS) func.JS += '/** @type {number} */'; + func.JS += ' var label = 0;\n'; + } + // Prepare the stack, if we need one. If we have other stack allocations, force the stack to be set up. func.JS += ' ' + RuntimeGenerator.stackEnter(func.initialStack, func.otherStackAllocations) + ';\n'; @@ -586,11 +591,6 @@ function JSify(data, functionsOnly, givenFunctions) { if (LABEL_DEBUG) func.JS += " Module.print(INDENT + ' Entering: " + func.ident + ": ' + Array.prototype.slice.call(arguments)); INDENT += ' ';\n"; - if (true) { // TODO: optimize away when not needed - if (CLOSURE_ANNOTATIONS) func.JS += '/** @type {number} */'; - func.JS += ' var label;\n'; - } - // Walk function blocks and generate JS function walkBlock(block, indent) { if (!block) return ''; |