diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-01-17 16:12:09 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-01-17 16:12:09 -0800 |
commit | dd7771e94e0e80c4232c39140a0263a18e0bfa86 (patch) | |
tree | 2df84dae1d163e0e8e571adc01b7680991e12036 /src/parseTools.js | |
parent | af52dc5060efa8121130be7976ac919deceab358 (diff) |
handle unsigned reads in safe heap
Diffstat (limited to 'src/parseTools.js')
-rw-r--r-- | src/parseTools.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/parseTools.js b/src/parseTools.js index a564f2e3..1c70a018 100644 --- a/src/parseTools.js +++ b/src/parseTools.js @@ -1328,7 +1328,7 @@ function makeGetValue(ptr, pos, type, noNeedFirst, unsigned, ignore, align, noSa if (printType !== 'null' && printType[0] !== '#') printType = '"' + safeQuote(printType) + '"'; if (printType[0] === '#') printType = printType.substr(1); if (ASM_JS) { - if (!ignore) return asmCoercion('SAFE_HEAP_LOAD(' + asmCoercion(offset, 'i32') + ', ' + Runtime.getNativeTypeSize(type) + ', ' + ((type in Runtime.FLOAT_TYPES)|0) + ')', type); + if (!ignore) return asmCoercion('SAFE_HEAP_LOAD(' + asmCoercion(offset, 'i32') + ', ' + Runtime.getNativeTypeSize(type) + ', ' + ((type in Runtime.FLOAT_TYPES)|0) + ', ' + (!!unsigned+0) + ')', type); // else fall through } else { return asmCoercion('SAFE_HEAP_LOAD(' + offset + ', ' + (ASM_JS ? 0 : printType) + ', ' + (!!unsigned+0) + ', ' + ((!checkSafeHeap() || ignore)|0) + ')', type); |