Skip to documentation
SLOP

tiny.choir.CompilerSession

Reference tiny.choir CompilerSession

Defined in compiler.

API (8)

Actions

Public operations.

Fields and members

Public fields and members.

No direct callersNo direct callscompilerSession
Static calls · unresolved targets: unknown · external targets: unknown.

Source

Source: lib/choir/src/compiler/root.zig:22

zig
pub const Session = struct {    allocator: std.mem.Allocator,    ctx: ir.Context,    extension_registry: extensions.ExtensionRegistry,    live: bool = true,    pub fn init(allocator: std.mem.Allocator, options: ContextOptions) !Session {        var ctx = try ir.Context.init(allocator, options.context_limits);        errdefer ctx.deinit(allocator);        try registerCoreDialects(&ctx);        var extension_registry = extensions.ExtensionRegistry.init(allocator);        errdefer extension_registry.deinit();        for (options.packages) |package| {            try extension_registry.registerPackage(&ctx, package);        }        try preloadRequestedDialects(&ctx, options);        return .{            .allocator = allocator,            .ctx = ctx,            .extension_registry = extension_registry,        };    }    pub fn deinit(self: *Session) void {        if (!self.live) return;        self.extension_registry.deinit();        self.ctx.deinit(self.allocator);        self.live = false;    }    pub fn context(self: *Session) *ir.Context {        return &self.ctx;    }    pub fn extensionRegistry(self: *Session) *extensions.ExtensionRegistry {        return &self.extension_registry;    }};

Source: lib/choir/src/root.zig:61

zig
pub const CompilerSession = compiler.Session;
Called byCallsNo direct callersextensions.ExtensionRegistrydeinitCompilerSessiondeinit
Static calls · unresolved targets: 0 · external targets: 1.
Called byCallsNo direct callersprivate sourcelib.choir.src.compiler.rootpreloadRequestedDialectsprivate sourcelib.choir.src.compiler.rootregisterCoreDialectsextensions.ExtensionRegistrydeinitextensions.ExtensionRegistryinitextensions.ExtensionRegistryregisterPackageCompilerSessioninit
Static calls · unresolved targets: 0 · external targets: 2.

Audit

Definitions5
Public names10
Members4
Version26.7.0
Revisiondaab053ee433