Vixen
02b45cc4
csharp
public sealed class MetadataLoader

Turns 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> TopLevelTypes

    Every top-level type loaded, in the order the libraries supplied them.

  • public IReadOnlyList<CompiledLibrary> Libraries

    The libraries that were loaded, deduplicated, in order. What the lowerer links their IR from.

Methods (2)

Used by (4)

  • CompilationVixen.Raven
  • LowererVixen.Raven
  • MetadataNamedTypeSymbolVixen.Raven
  • ReferenceLinkVixen.Raven