aboutsummaryrefslogtreecommitdiff
path: root/src/snippets.js
diff options
context:
space:
mode:
authorAlon Zakai <azakai@mozilla.com>2010-09-20 09:02:11 -0700
committerAlon Zakai <azakai@mozilla.com>2010-09-20 09:02:11 -0700
commitac2b1c6606bcae0e226074cec36a290e0658e681 (patch)
tree5fc2b45b51f62e34810ba053677afab63882c3aa /src/snippets.js
parent9b369c6e57ad1f7a5f47c0198573c89aa9255d22 (diff)
fixes for clang, including support for phi; all tests pass, but optimizer and relooper broken (on clang)
Diffstat (limited to 'src/snippets.js')
-rw-r--r--src/snippets.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/snippets.js b/src/snippets.js
index d32a0239..813ecacd 100644
--- a/src/snippets.js
+++ b/src/snippets.js
@@ -92,6 +92,16 @@ var Snippets = {
__cxa_guard_release: function() {
return 0;
},
+
+ llvm_memset_i32: function(ptr, value, num) {
+ for (var i = 0; i < num; i++) {
+ HEAP[ptr+i] = value;
+ }
+ },
+
+ isdigit: function(chr) {
+ return chr >= '0'.charCodeAt(0) && chr <= '9'.charCodeAt(0);
+ },
};
// Aliases