diff options
author | Alon Zakai <azakai@mozilla.com> | 2010-12-30 21:42:06 -0800 |
---|---|---|
committer | Alon Zakai <azakai@mozilla.com> | 2010-12-30 21:42:06 -0800 |
commit | ff4341e7d5bfb82cc711146ab80e31635e5865b7 (patch) | |
tree | e8c25ce0f8d7fe869e48531c4c277ea7f95db7c4 /src/preamble.js | |
parent | 47f29aed8aa7905c24562188d2d7e2861972ebed (diff) |
simple django-style substitution/macros
Diffstat (limited to 'src/preamble.js')
-rw-r--r-- | src/preamble.js | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/src/preamble.js b/src/preamble.js index c743dd49..ed6f1d62 100644 --- a/src/preamble.js +++ b/src/preamble.js @@ -138,21 +138,8 @@ function Pointer_make(slab, pos, allocator) { if (typeof curr === 'function') { curr = Runtime.getFunctionIndex(curr); } -#if SAFE_HEAP - SAFE_HEAP_STORE(ret + i, curr, null); -#else -#if USE_TYPED_ARRAYS - // TODO: Check - also in non-typedarray case - for functions, and if so add |.__index__| - if (typeof curr === 'number' || typeof curr === 'boolean') { - IHEAP[ret + i] = curr; // TODO: optimize. Can easily detect floats, but 1.0 might look like an int... - FHEAP[ret + i] = curr; - } else { - HEAP[ret + i] = curr; - } -#else - HEAP[ret + i] = curr; -#endif -#endif + + {{{ makeSetValue(0, 'ret+i', 'curr', null, 'null') }}} } return ret; |