aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/parseTools.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/parseTools.js b/src/parseTools.js
index 2bc2b407..9e0d4f9f 100644
--- a/src/parseTools.js
+++ b/src/parseTools.js
@@ -1003,7 +1003,15 @@ function makeGetValue(ptr, pos, type, noNeedFirst, unsigned, ignore, align, noSa
if (type[0] === '#') type = type.substr(1);
return 'SAFE_HEAP_LOAD(' + offset + ', ' + type + ', ' + (!!unsigned+0) + ', ' + ((!checkSafeHeap() || ignore)|0) + ')';
} else {
- return makeGetSlabs(ptr, type, false, unsigned)[0] + '[' + getHeapOffset(offset, type) + ']';
+ var ret = makeGetSlabs(ptr, type, false, unsigned)[0] + '[' + getHeapOffset(offset, type) + ']';
+ if (ASM_JS) {
+ if (type in Runtime.INT_TYPES) {
+ ret = ret + '|0';
+ } else {
+ ret = '+' + ret;
+ }
+ }
+ return ret;
}
}