Kernel: Collect created AML nodes in add_{named,alias}...

This makes it harder to miss adding scoped objects. Before I was not
deleting all types of nodes on method return
This commit is contained in:
2025-04-01 22:48:22 +03:00
parent b145c1ab64
commit 3800d5420e
4 changed files with 59 additions and 34 deletions

View File

@@ -31,8 +31,8 @@ namespace Kernel::ACPI::AML
BAN::ErrorOr<Node> evaluate(const Scope& scope, BAN::StringView);
// returns empty scope if object already exited
BAN::ErrorOr<Scope> add_named_object(const Scope& scope, const NameString& name_string, Node&& node);
BAN::ErrorOr<Scope> add_alias(const Scope& scope, const NameString& name_string, Reference* reference);
BAN::ErrorOr<Scope> add_named_object(ParseContext& context, const NameString& name_string, Node&& node);
BAN::ErrorOr<Scope> add_alias(ParseContext& scope, const NameString& name_string, Reference* reference);
BAN::ErrorOr<void> remove_named_object(const Scope& absolute_path);