swc/crates/swc_bundler/tests/fixture/deno-9199/output/entry.inlined.ts
2021-11-09 20:42:49 +09:00

12 lines
324 B
TypeScript

const heap = new Array(32).fill(undefined);
heap.push(undefined, null, true, false);
let heap_next = heap.length;
function addHeapObject(obj) {
if (heap_next === heap.length) heap.push(heap.length + 1);
const idx = heap_next;
heap_next = heap[idx];
heap[idx] = obj;
return idx;
}
addHeapObject("hello");