diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-01-17 10:19:47 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-01-17 10:19:47 -0800 |
commit | d0342ae398c47077b5dd20f1f6ba20110b27ec9e (patch) | |
tree | bb8067afc9f1dde5345925a2e98a92021a5054f9 /tools | |
parent | d19b49ff81788b3414a3b90fe96b5e5887449c3b (diff) |
use double for float arguments to safe heap
Diffstat (limited to 'tools')
-rw-r--r-- | tools/js-optimizer.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/js-optimizer.js b/tools/js-optimizer.js index fa59dbec..7640f43a 100644 --- a/tools/js-optimizer.js +++ b/tools/js-optimizer.js @@ -3951,7 +3951,7 @@ function safeHeap(ast) { return ['call', ['name', 'SAFE_HEAP_STORE'], [ptr, makeAsmCoercion(value, ASM_INT), ['num', 4], ['num', '0']]]; } case 'HEAPF32': { - return ['call', ['name', 'SAFE_HEAP_STORE'], [ptr, makeAsmCoercion(value, ASM_FLOAT), ['num', 4], ['num', '1']]]; + return ['call', ['name', 'SAFE_HEAP_STORE'], [ptr, makeAsmCoercion(value, ASM_DOUBLE), ['num', 4], ['num', '1']]]; } case 'HEAPF64': { return ['call', ['name', 'SAFE_HEAP_STORE'], [ptr, makeAsmCoercion(value, ASM_DOUBLE), ['num', 8], ['num', '1']]]; @@ -3975,7 +3975,7 @@ function safeHeap(ast) { return makeAsmCoercion(['call', ['name', 'SAFE_HEAP_LOAD'], [ptr, ['num', 4], ['num', '0']]], ASM_INT); } case 'HEAPF32': { - return makeAsmCoercion(['call', ['name', 'SAFE_HEAP_LOAD'], [ptr, ['num', 4], ['num', '1']]], ASM_FLOAT); + return makeAsmCoercion(['call', ['name', 'SAFE_HEAP_LOAD'], [ptr, ['num', 4], ['num', '1']]], ASM_DOUBLE); } case 'HEAPF64': { return makeAsmCoercion(['call', ['name', 'SAFE_HEAP_LOAD'], [ptr, ['num', 8], ['num', '1']]], ASM_DOUBLE); |