tiny.choir.CompilerSession
Defined in compiler.
API (8)
Actions
Public operations.
Fields and members
Public fields and members.
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;Audit
| Definitions | 5 |
|---|---|
| Public names | 10 |
| Members | 4 |
| Version | 26.7.0 |
| Revision | daab053ee433 |