Former-commit-id: 6e95bd8a1457d3c514adb0af6ae0c5feb1564a80
This commit is contained in:
Jarred Sumner
2021-09-05 16:48:26 -07:00
parent 4f966f30a5
commit 2c429f7732
2 changed files with 10 additions and 4 deletions

View File

@@ -93,7 +93,13 @@ extern "C" JSC__JSGlobalObject *Zig__GlobalObject__create(JSClassRef *globalObje
// JSC::Options::useCodeCache() = false;
JSC::VM &vm = JSC::VM::create(JSC::LargeHeap).leakRef();
#ifdef WTF_CPU_ARM64
auto heapSize = JSC::SmallHeap;
#else
auto heapSize = JSC::LargeHeap;
#endif
JSC::VM &vm = JSC::VM::create(heapSize).leakRef();
vm.heap.acquireAccess();
#if ENABLE(WEBASSEMBLY)
JSC::Wasm::enableFastMemory();

View File

@@ -6,13 +6,13 @@
// 1. We can't dynamically link JavaScriptCore
// 2. It's important that this is run whenever JavaScriptCore is updated or the bindings on the Zig side change.
// Failure to do so will lead to undefined behavior and probably some frustrated people.
// --- Regenerate this: ---
// --- Regenerate this: ---
// 1. "make jsc-bindings-headers"
// 2. "makpe sizegen"
// 2. "make sizegen"
// 3. "make jsc-bindings-headers"
// ------------------------
// You can verify the numbers written in this file at runtime via the `extern`d types
// Run "jsc-bindings-headers" twice because it uses these values in the output. That's how all the bJSC__.* types are created - from these values.
// Run "jsc-bindings-headers" twice because it uses these values in the output. That's how all the bJSC__.* types are created - from these values.
pub const JSC__JSObject = 16;
pub const JSC__JSObject_align = 8;
pub const JSC__JSCell = 8;