public sealed class MetadataLoaderTurns the declarations in a CompiledLibrary into symbols, and resolves the type references between them.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
One loader per compilation, not per library: a type reference resolves against every library the compilation was given, so Shading/Brdf.rvnlib can take a parameter of a struct declared in Core/Math.rvnlib. The shared table keyed by qualified name is what makes that work, and it is why the reference model is a set rather than a list of independent loads.
Resolution is lazy throughout, for the same reason the source symbols' is: a type's base may be declared after it, its members' signatures name the type itself, and a generic parameter's constraint may name its own owner. Names go in eagerly; everything that needs a lookup happens on first read.
Fields and properties (2)
public IReadOnlyList<MetadataNamedTypeSymbol> TopLevelTypesEvery top-level type loaded, in the order the libraries supplied them.
public IReadOnlyList<CompiledLibrary> LibrariesThe libraries that were loaded, deduplicated, in order. What the lowerer links their IR from.
Methods (2)
public IReadOnlyList<MetadataNamedTypeSymbol> Load(CompiledLibrary library, NamespaceSymbol globalNamespace)Creates a symbol for every type declares and files each top-level one in its package namespace under .
public MetadataNamedTypeSymbol? Find(string qualifiedName)The loaded type with this qualified name, or null.
Used by (4)
- CompilationVixen.Raven
- LowererVixen.Raven
- MetadataNamedTypeSymbolVixen.Raven
- ReferenceLinkVixen.Raven