mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-12 02:30:30 +09:00
LibJS: Put zombie cell tracking code behind a compile-time flag
Since this is a debug-only feature, let's not have it impact GC marking performance when you don't need it.
This commit is contained in:
parent
f290c59dd8
commit
6a1b82df2b
Notes:
sideshowbarker
2024-07-18 03:12:43 +09:00
Author: https://github.com/awesomekling
Commit: 6a1b82df2b
13 changed files with 76 additions and 8 deletions
|
@ -113,7 +113,9 @@ static consteval size_t __testjs_last() { return (AK::Detail::IntegralConstant<s
|
|||
static constexpr auto TOP_LEVEL_TEST_NAME = "__$$TOP_LEVEL$$__";
|
||||
extern RefPtr<JS::VM> g_vm;
|
||||
extern bool g_collect_on_every_allocation;
|
||||
#ifdef JS_TRACK_ZOMBIE_CELLS
|
||||
extern bool g_zombify_dead_cells;
|
||||
#endif
|
||||
extern bool g_run_bytecode;
|
||||
extern bool g_dump_bytecode;
|
||||
extern String g_currently_running_test;
|
||||
|
@ -284,7 +286,10 @@ inline JSFileResult TestRunner::run_file_test(const String& test_path)
|
|||
JS::VM::InterpreterExecutionScope scope(*interpreter);
|
||||
|
||||
interpreter->heap().set_should_collect_on_every_allocation(g_collect_on_every_allocation);
|
||||
|
||||
#ifdef JS_TRACK_ZOMBIE_CELLS
|
||||
interpreter->heap().set_zombify_dead_cells(g_zombify_dead_cells);
|
||||
#endif
|
||||
|
||||
if (g_run_file) {
|
||||
auto result = g_run_file(test_path, *interpreter);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue