diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-01-23 18:08:36 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-01-23 18:08:36 -0800 |
commit | bbad5cfa15d85010087736bd3319d3f51bf92627 (patch) | |
tree | 104496b1123b547804a850272e67b1ab16beba43 | |
parent | 3b94f5d8d589a57fa0b7b37cbeccb7ac62798311 (diff) |
fix tempDouble aliases
-rw-r--r-- | src/preamble.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/preamble.js b/src/preamble.js index cb17addc..051bb8d4 100644 --- a/src/preamble.js +++ b/src/preamble.js @@ -643,10 +643,10 @@ STACK_MAX = STACK_ROOT + TOTAL_STACK; #if DOUBLE_MODE == 1 #if USE_TYPED_ARRAYS == 2 var tempDoublePtr = Runtime.alignMemory(STACK_MAX, 8); +var tempDoubleI8 = HEAP8.subarray(tempDoublePtr); var tempDoubleI32 = HEAP32.subarray(tempDoublePtr >> 2); -var tempDoubleF64 = new Float64Array(tempDoubleI32.buffer); -var tempDoubleF32 = new Float32Array(tempDoubleI32.buffer); -var tempDoubleI8 = new Int8Array(tempDoubleI32.buffer); +var tempDoubleF32 = HEAPF32.subarray(tempDoublePtr >> 2); +var tempDoubleF64 = new Float64Array(HEAP8.buffer).subarray(tempDoublePtr >> 3); function copyTempFloat(ptr) { // functions, because inlining this code is increases code size too much tempDoubleI8[0] = HEAP8[ptr]; tempDoubleI8[1] = HEAP8[ptr+1]; |