diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-09-29 16:21:24 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-10-02 17:31:36 -0700 |
commit | 42dde1ea07e2f8cb2c1dec48f7bee4318b39dc2f (patch) | |
tree | 1caa9748e85f3927ece246ef5932d21dbf4ee72b /src/analyzer.js | |
parent | e7515cbf708b6a402a190de9eb3775f19ee2272e (diff) |
define legalized bitshift vars explicitly
Diffstat (limited to 'src/analyzer.js')
-rw-r--r-- | src/analyzer.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/analyzer.js b/src/analyzer.js index 3fb20253..17ad26ad 100644 --- a/src/analyzer.js +++ b/src/analyzer.js @@ -783,13 +783,14 @@ function analyzer(data, sidePass) { assert(PRECISE_I64_MATH, 'Must have precise i64 math for non-constant 64-bit shifts'); Types.preciseI64MathUsed = 1; value.intertype = 'value'; - value.ident = 'var ' + value.assignTo + '$0 = ' + + value.ident = makeVarDef(value.assignTo) + '$0=' + asmCoercion('_bitshift64' + value.op[0].toUpperCase() + value.op.substr(1) + '(' + asmCoercion(sourceElements[0].ident, 'i32') + ',' + asmCoercion(sourceElements[1].ident, 'i32') + ',' + asmCoercion(value.params[1].ident + '$0', 'i32') + ')', 'i32' ) + ';' + - 'var ' + value.assignTo + '$1 = tempRet0;'; + makeVarDef(value.assignTo) + '$1=tempRet0;'; + value.vars = [[value.assignTo + '$0', 'i32'], [value.assignTo + '$1', 'i32']]; value.assignTo = null; i++; continue; |