diff options
-rw-r--r-- | tools/js-optimizer.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/js-optimizer.js b/tools/js-optimizer.js index 77c48a23..103fb1fe 100644 --- a/tools/js-optimizer.js +++ b/tools/js-optimizer.js @@ -1251,7 +1251,8 @@ var ASM_INT = 0; var ASM_DOUBLE = 1; function detectAsmCoercion(node) { - // for params, +x vs x|0, for vars, +0 vs 0, so check for "+" + // for params, +x vs x|0, for vars, 0.0 vs 0 + if (node[0] == 'num' && node[1].toString().indexOf('.') >= 0) return ASM_DOUBLE; return node[0] == 'unary-prefix' ? ASM_DOUBLE : ASM_INT; } |