diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-01-06 10:40:50 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-01-06 10:40:50 -0800 |
commit | 4f62d35360010a756f8a10e04e9b2a2525a7a2b8 (patch) | |
tree | 90e30b9c5e1a8407e13e2c776d9582edc53f5d7c | |
parent | 2bafed8fee5cf4d24748561690da4dce135e505b (diff) | |
parent | 5a1249de074a39711eb37257795450c7d35e8ca2 (diff) |
Merge pull request #1978 from coolwanglu/pr
correct annotation for closure
-rw-r--r-- | src/jsifier.js | 4 |
1 files 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); |