diff options
author | Alon Zakai <azakai@mozilla.com> | 2010-12-04 15:33:29 -0800 |
---|---|---|
committer | Alon Zakai <azakai@mozilla.com> | 2010-12-04 15:33:29 -0800 |
commit | 60d8f78f3fc22a9ea96ab09e527760149569d3e2 (patch) | |
tree | 5697470d8b23dcb259f700238726e4a3965b5a15 /src | |
parent | 6b7bf0aa4ed04bbd30d9f69a12bb7a45e7f0c7a4 (diff) |
llvm.va_copy
Diffstat (limited to 'src')
-rw-r--r-- | src/library.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/library.js b/src/library.js index 8b698623..49c1bdc8 100644 --- a/src/library.js +++ b/src/library.js @@ -294,6 +294,20 @@ var Library = { // LLVM specifics + llvm_va_copy: function(ppdest, ppsrc) { + IHEAP[ppdest] = IHEAP[ppsrc]; +#if SAFE_HEAP + SAFE_HEAP_ACCESS(ppdest, null, true); +#endif + /* Alternate implementation that copies the actual DATA; it assumes the va_list is prefixed by its size + var psrc = IHEAP[ppsrc]-1; + var num = IHEAP[psrc]; // right before the data, is the number of (flattened) values + var pdest = _malloc(num+1); + _memcpy(pdest, psrc, num+1); + IHEAP[ppdest] = pdest+1; + */ + }, + __assert_fail: function(condition, file, line) { ABORT = true; throw 'Assertion failed: ' + Pointer_stringify(condition);//JSON.stringify(arguments)//condition; |