implement string escapes

This commit is contained in:
nora 2023-07-29 22:05:44 +02:00
parent 09ae6cbb56
commit 3270e6b501
4 changed files with 52 additions and 8 deletions

View file

@ -112,7 +112,9 @@ export function lower(ast: Ast): wasm.Module {
}
});
cx.reservedHeapMemoryStart = (mod.datas[0].init.length & ~0x8) + 0x8;
const HEAP_ALIGN = 0x08;
cx.reservedHeapMemoryStart =
(mod.datas[0].init.length + (HEAP_ALIGN - 1)) & ~(HEAP_ALIGN - 1);
addRt(cx, ast);