LibJS+LibWeb: Use new Cell::Visitor helpers to avoid manual iteration

This commit is contained in:
Andreas Kling
2024-04-15 13:58:21 +02:00
parent 1a6d025793
commit 53d0dd4a2e
63 changed files with 98 additions and 213 deletions

View File

@@ -59,10 +59,8 @@ void ExecutionContext::visit_edges(Cell::Visitor& visitor)
if (instruction_stream_iterator.has_value())
visitor.visit(const_cast<Bytecode::Executable*>(instruction_stream_iterator.value().executable()));
visitor.visit(function_name);
for (auto argument : arguments)
visitor.visit(argument);
for (auto local : locals)
visitor.visit(local);
visitor.visit(arguments);
visitor.visit(locals);
script_or_module.visit(
[](Empty) {},
[&](auto& script_or_module) {