aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <azakai@mozilla.com>2010-12-04 20:26:28 -0800
committerAlon Zakai <azakai@mozilla.com>2010-12-04 20:26:28 -0800
commit7e332b116c930f1bd12a4da10ac1cf4ab21ab024 (patch)
tree346b07da2d4bc592a3ae904db3e9069ab134bc27 /src
parent60d8f78f3fc22a9ea96ab09e527760149569d3e2 (diff)
fix for bitshifts
Diffstat (limited to 'src')
-rw-r--r--src/jsifier.js5
-rw-r--r--src/library.js1
-rw-r--r--src/preamble.js3
3 files changed, 6 insertions, 3 deletions
diff --git a/src/jsifier.js b/src/jsifier.js
index b504cb9d..b5ac1262 100644
--- a/src/jsifier.js
+++ b/src/jsifier.js
@@ -717,8 +717,9 @@ function JSify(data, functionsOnly, givenTypes, givenFunctions) {
case 'or': return ident1 + ' | ' + ident2;
case 'and': return ident1 + ' & ' + ident2;
case 'xor': return ident1 + ' ^ ' + ident2;
- case 'shl': case 'ashl': case 'lshl': return ident1 + ' << ' + ident2;
- case 'shr': case 'ashr': case 'lshr': return ident1 + ' >> ' + ident2;
+ case 'shl': return ident1 + ' << ' + ident2;
+ case 'ashr': return ident1 + ' >> ' + ident2;
+ case 'lshr': return ident1 + ' >>> ' + ident2;
case 'fadd': return ident1 + ' + ' + ident2;
case 'fsub': return ident1 + ' - ' + ident2;
case 'fdiv': return ident1 + ' / ' + ident2;
diff --git a/src/library.js b/src/library.js
index 49c1bdc8..370a5b1a 100644
--- a/src/library.js
+++ b/src/library.js
@@ -151,7 +151,6 @@ var Library = {
keys.sort(function(a, b) {
return comparator(base+a*size, base+b*size);
});
- print("KEYS:" + keys)
// apply the sort
var temp = _malloc(num*size);
_memcpy(temp, base, num*size);
diff --git a/src/preamble.js b/src/preamble.js
index f959e89f..c816fd57 100644
--- a/src/preamble.js
+++ b/src/preamble.js
@@ -358,6 +358,9 @@ function llvm_memset_i32(ptr, value, num) {
#else
HEAP[ptr+i] = value;
#endif
+#if SAFE_HEAP
+ SAFE_HEAP_ACCESS(ptr+i, null, true);
+#endif
}
}
_llvm_memset_p0i8_i64 = _llvm_memset_p0i8_i32 = llvm_memset_i32;