mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-29 22:42:52 +00:00
LibJS/Bytecode: Make Bytecode::Interpreter participate in GC marking
Since the relationship between VM and Bytecode::Interpreter is now clear, we can have VM ask the Interpreter for roots in the GC marking pass. This avoids having to register and unregister handles and MarkedVectors over and over. Since GeneratorObject can also own a RegisterWindow, we share the code in a RegisterWindow::visit_edges() helper. ~4% speed-up on Kraken/stanford-crypto-ccm.js :^)
This commit is contained in:
parent
cfb6baf973
commit
fb979dcf34
Notes:
sideshowbarker
2024-07-17 07:14:09 +09:00
Author: https://github.com/awesomekling
Commit: fb979dcf34
Pull-request: https://github.com/SerenityOS/serenity/pull/19754
5 changed files with 56 additions and 27 deletions
|
@ -52,6 +52,8 @@ void GeneratorObject::visit_edges(Cell::Visitor& visitor)
|
|||
visitor.visit(m_generating_function);
|
||||
visitor.visit(m_previous_value);
|
||||
m_execution_context.visit_edges(visitor);
|
||||
if (m_frame.has_value())
|
||||
m_frame->visit_edges(visitor);
|
||||
}
|
||||
|
||||
// 27.5.3.2 GeneratorValidate ( generator, generatorBrand ), https://tc39.es/ecma262/#sec-generatorvalidate
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue