mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-25 17:25:08 +02:00
LibIDL: Drop unused imported module state
Semantic IDL lookups no longer rely on imported modules, so stop storing that state on Interface and Module. import directives are still resolved during parsing for now, but the parsed imported-module lists are no longer needed.
This commit is contained in:
committed by
Shannon Booth
parent
0e55b0f87e
commit
5f3812ecca
Notes:
github-actions[bot]
2026-04-24 18:09:51 +00:00
Author: https://github.com/shannonbooth Commit: https://github.com/LadybirdBrowser/ladybird/commit/5f3812eccad Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/9064
@@ -1314,14 +1314,13 @@ Module& Parser::parse()
|
||||
interface.module_own_path = this_module;
|
||||
top_level_resolved_modules().set(this_module, &module);
|
||||
|
||||
Vector<Module&> imports;
|
||||
{
|
||||
while (lexer.consume_specific("#import"sv)) {
|
||||
consume_whitespace();
|
||||
assert_specific('<');
|
||||
auto path = lexer.consume_until('>');
|
||||
lexer.ignore();
|
||||
imports.append(resolve_import(path));
|
||||
resolve_import(path);
|
||||
consume_whitespace();
|
||||
}
|
||||
}
|
||||
@@ -1480,9 +1479,6 @@ Module& Parser::parse()
|
||||
}
|
||||
}
|
||||
|
||||
module.imported_modules = move(imports);
|
||||
interface.imported_modules = module.imported_modules;
|
||||
|
||||
if (top_level_parser() == this)
|
||||
VERIFY(import_stack.is_empty());
|
||||
|
||||
|
||||
@@ -331,7 +331,6 @@ public:
|
||||
ByteString global_mixin_class;
|
||||
|
||||
ByteString module_own_path;
|
||||
Vector<Module&> imported_modules;
|
||||
|
||||
OrderedHashMap<ByteString, Vector<Function&>> overload_sets;
|
||||
OrderedHashMap<ByteString, Vector<Function&>> static_overload_sets;
|
||||
@@ -354,7 +353,6 @@ public:
|
||||
struct Module {
|
||||
ByteString module_own_path;
|
||||
Optional<Interface&> interface;
|
||||
Vector<Module&> imported_modules;
|
||||
Vector<ByteString> imported_files;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user