CodeGenerationContext

struct CodeGenerationContext : Sendable

The state of a compilation from Hylo IR to LLVM IR.

  • ir

    The program containing the module.

    Declaration

    Swift

    let ir: IR.Program
  • The Hylo module being compiled.

    Declaration

    Swift

    let module: ModuleDecl.ID
  • A table from string constant to its representation in LLVM.

    Declaration

    Swift

    var strings: Trie<Data, GlobalVariable>
  • A table from mangled function name to its transpilation status.

    Declaration

    Swift

    var transpiled: Set<IR.Function.ID>
  • Creates an instance for compiling m, which is a module of p.

    Declaration

    Swift

    init(forCompiling m: ModuleDecl.ID, of p: IR.Program)
  • Projects the contents of the Hylo module being compiled.

    Declaration

    Swift

    var source: IR.Module { get }