aboutsummaryrefslogtreecommitdiff
path: root/src/preamble.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/preamble.js')
-rw-r--r--src/preamble.js17
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;