diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-04-04 17:39:11 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-04-04 17:39:11 -0700 |
commit | b050710a1faa841eb3b0069675059a3fafc36e68 (patch) | |
tree | aaee29b96c1cf7d7bfb9c179a5da06809ffca8b6 /src/parseTools.js | |
parent | 6bf571940d90914453b820153f7f2e2dd5c26e21 (diff) |
do not emit the memory initialization into itself
Diffstat (limited to 'src/parseTools.js')
-rw-r--r-- | src/parseTools.js | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/parseTools.js b/src/parseTools.js index a3b6f79c..5459fc67 100644 --- a/src/parseTools.js +++ b/src/parseTools.js @@ -1533,14 +1533,16 @@ function makePointer(slab, pos, allocator, type, ptr, finalMemoryInitialization) } } } else { // USE_TYPED_ARRAYS == 2 - // XXX This heavily assumes the target endianness is the same as our current endianness! XXX - var i = 0; - while (i < slab.length) { - var currType = types[i]; - if (!currType) { i++; continue } - i += writeInt8s(slab, i, slab[i], currType); + if (!finalMemoryInitialization) { + // XXX This heavily assumes the target endianness is the same as our current endianness! XXX + var i = 0; + while (i < slab.length) { + var currType = types[i]; + if (!currType) { i++; continue } + i += writeInt8s(slab, i, slab[i], currType); + } + types = 'i8'; } - types = 'i8'; } if (allocator == 'ALLOC_NONE' && USE_TYPED_ARRAYS == 2) { if (!finalMemoryInitialization) { |