aboutsummaryrefslogtreecommitdiff
path: root/src/preamble.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-02-23 14:14:43 -0800
committerAlon Zakai <alonzakai@gmail.com>2014-02-23 14:14:43 -0800
commitfd554f90a78d03af31fcc19c22e2ac5f80998fab (patch)
tree48fca08ec7bc889c1ebd129d8fe1be494ea3d3a2 /src/preamble.js
parenta08da7bd41166a40bb5d63396540e37d8caa7fd7 (diff)
emit value in safe heap load logging
Diffstat (limited to 'src/preamble.js')
-rw-r--r--src/preamble.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/preamble.js b/src/preamble.js
index 27a98422..28a1dcbc 100644
--- a/src/preamble.js
+++ b/src/preamble.js
@@ -194,9 +194,6 @@ function SAFE_HEAP_STORE(dest, value, bytes, isFloat) {
}
function SAFE_HEAP_LOAD(dest, bytes, isFloat, unsigned) {
-#if SAFE_HEAP_LOG
- Module.print('SAFE_HEAP load: ' + [dest, bytes, isFloat, unsigned]);
-#endif
assert(dest > 0, 'segmentation fault');
assert(dest % bytes === 0);
assert(dest < Math.max(DYNAMICTOP, STATICTOP));
@@ -204,6 +201,9 @@ function SAFE_HEAP_LOAD(dest, bytes, isFloat, unsigned) {
var type = getSafeHeapType(bytes, isFloat);
var ret = getValue(dest, type, 1);
if (unsigned) ret = unSign(ret, parseInt(type.substr(1)), 1);
+#if SAFE_HEAP_LOG
+ Module.print('SAFE_HEAP load: ' + [dest, ret, bytes, isFloat, unsigned]);
+#endif
return ret;
}