From 5a1249de074a39711eb37257795450c7d35e8ca2 Mon Sep 17 00:00:00 2001 From: Lu Wang Date: Sun, 5 Jan 2014 18:54:14 +0800 Subject: correct annotation for closure --- src/jsifier.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/jsifier.js b/src/jsifier.js index d533e36b..8de20c80 100644 --- a/src/jsifier.js +++ b/src/jsifier.js @@ -625,8 +625,8 @@ function JSify(data, functionsOnly) { } } - if (CLOSURE_ANNOTATIONS) func.JS += '/** @type {number} */'; if (!ASM_JS) { + if (CLOSURE_ANNOTATIONS) func.JS += '/** @type {number} */'; func.JS += INDENTATION + 'var label=0;\n'; } @@ -878,8 +878,8 @@ function JSify(data, functionsOnly) { function makeAssign(item) { var valueJS = item.JS; item.JS = ''; - if (CLOSURE_ANNOTATIONS) item.JS += '/** @type {number} */ '; if (!ASM_JS || item.intertype != 'alloca' || item.funcData.variables[item.assignTo].impl == VAR_EMULATED) { // asm only needs non-allocas + if (CLOSURE_ANNOTATIONS) item.JS += '/** @type {number} */ '; item.JS += ((ASM_JS || item.overrideSSA) ? '' : 'var ') + toNiceIdent(item.assignTo); } var value = parseNumerical(valueJS); -- cgit v1.2.3-18-g5258