mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 06:48:49 +00: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
|
@ -18,7 +18,9 @@ namespace JS {
|
|||
|
||||
RefPtr<::JS::VM> g_vm;
|
||||
bool g_collect_on_every_allocation = false;
|
||||
#ifdef JS_TRACK_ZOMBIE_CELLS
|
||||
bool g_zombify_dead_cells = false;
|
||||
#endif
|
||||
bool g_run_bytecode = false;
|
||||
bool g_dump_bytecode = false;
|
||||
String g_currently_running_test;
|
||||
|
@ -110,7 +112,9 @@ int main(int argc, char** argv)
|
|||
});
|
||||
args_parser.add_option(print_json, "Show results as JSON", "json", 'j');
|
||||
args_parser.add_option(g_collect_on_every_allocation, "Collect garbage after every allocation", "collect-often", 'g');
|
||||
#ifdef JS_TRACK_ZOMBIE_CELLS
|
||||
args_parser.add_option(g_zombify_dead_cells, "Zombify dead cells (to catch missing GC marks)", "zombify-dead-cells", 'z');
|
||||
#endif
|
||||
args_parser.add_option(g_run_bytecode, "Use the bytecode interpreter", "run-bytecode", 'b');
|
||||
args_parser.add_option(g_dump_bytecode, "Dump the bytecode", "dump-bytecode", 'd');
|
||||
args_parser.add_option(test_glob, "Only run tests matching the given glob", "filter", 'f', "glob");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue