Vixen
02b45cc4
csharp
public record class LibraryIrFunction

A lowered function: a signature, its storage, its SSA value table and a structured body.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

Values is the value table, and the instruction stream refers to a value by its id alone. Writing each type once rather than at every mention keeps the artefact small and makes the reader's interning trivial — id i becomes one object, which is what the IR verifier's define-once check needs.

A table of (id, type) pairs rather than an array indexed by id, because the numbering can have gaps: dead-branch elimination drops a folded branch after its condition was numbered. ValueCount therefore travels separately instead of being inferred from the table's length.

Fields and properties (8)

  • public required string Key

    What a reference to this function resolves by: the declaration's qualified signature.

  • public required string Name

    The identifier the function carried in the module that built it.

  • public required LibraryIrTypeReference ReturnType
  • public ImmutableArray<LibraryIrVariable> Parameters
  • public ImmutableArray<LibraryIrVariable> Locals
  • public ImmutableArray<LibraryIrValue> Values

    The type of every value the function defines, keyed by value id.

  • public int ValueCount

    How many values the function numbered, gaps included.

  • public LibraryIrBlock Body

Used by (4)

  • CompiledLibraryTestsVixen.Raven.Tests
  • LibraryIrVixen.Raven
  • LibraryIrDecoderVixen.Raven
  • LibraryIrEncoderVixen.Raven