Skip to documentation
SLOP

tiny.choir.ir.interfaces

Reference tiny.choir ir interfaces

Defined in ir.

API (191)

Actions

Public operations.

Types and contracts

Public types and contracts.

Namespaces

Public namespaces.

Values and defaults

Public values and defaults.

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

Source

Source: lib/choir/src/core/interfaces/attrs.zig:10

zig
pub const AbstractAttribute = struct {    attr_id: u32,    name: []const u8,    interfaces: []const InterfaceEntry,    pub fn getInterface(self: *const AbstractAttribute, id: InterfaceId) ?*const anyopaque {        for (self.interfaces) |entry| {            if (entry.id == id) return entry.vtable;        }        return null;    }    pub fn hasInterface(self: *const AbstractAttribute, id: InterfaceId) bool {        return self.getInterface(id) != null;    }};

Source: lib/choir/src/core/interfaces/attrs.zig:139

zig
pub const AttributeRegistry = struct {    allocator: std.mem.Allocator,    attrs: std.StringHashMapUnmanaged(AttributeRegistryEntry),    next_attr_id: u32,    pub const AttributeRegistryEntry = struct {        abstract: *const AbstractAttribute,        owns_interfaces: bool,    };    pub const RegisterError = error{DuplicateAttribute} || std.mem.Allocator.Error;    pub const RegisterInterfaceError = error{ UnknownAttribute, DuplicateInterface } || std.mem.Allocator.Error;    pub const RegisterOrReplaceInterfaceError = error{UnknownAttribute} || std.mem.Allocator.Error;    fn interfaceLessThan(_: void, a: InterfaceEntry, b: InterfaceEntry) bool {        return a.id < b.id;    }    pub fn init(allocator: std.mem.Allocator, first_dynamic_id: u32) AttributeRegistry {        return .{            .allocator = allocator,            .attrs = .{},            .next_attr_id = first_dynamic_id,        };    }    pub fn deinit(self: *AttributeRegistry) void {        var it = self.attrs.valueIterator();        while (it.next()) |entry| {            const abstract = entry.abstract;            if (entry.owns_interfaces and abstract.interfaces.len > 0) {                self.allocator.free(@constCast(abstract.interfaces));            }            self.allocator.destroy(@constCast(abstract));        }        var key_iter = self.attrs.keyIterator();        while (key_iter.next()) |name_ptr| {            self.allocator.free(name_ptr.*);        }        self.attrs.deinit(self.allocator);    }    pub fn lookup(self: *const AttributeRegistry, attr_name: []const u8) ?*const AbstractAttribute {        if (self.attrs.get(attr_name)) |entry| {            return entry.abstract;        }        return null;    }    pub fn nextAttributeId(self: *AttributeRegistry) u32 {        return self.next_attr_id;    }    pub fn restoreNextAttributeId(self: *AttributeRegistry, id: u32) void {        self.next_attr_id = id;    }    pub fn registerAttribute(        self: *AttributeRegistry,        attr_name: []const u8,        interfaces: []const InterfaceEntry,    ) RegisterError!*const AbstractAttribute {        if (self.attrs.get(attr_name) != null) return error.DuplicateAttribute;        const owned_name = try self.allocator.dupe(u8, attr_name);        errdefer self.allocator.free(owned_name);        var iface_slice: []InterfaceEntry = &.{};        var owns_interfaces = false;        if (interfaces.len > 0) {            iface_slice = try self.allocator.dupe(InterfaceEntry, interfaces);            std.mem.sort(InterfaceEntry, iface_slice, {}, interfaceLessThan);            owns_interfaces = true;        }        errdefer if (owns_interfaces and iface_slice.len > 0) self.allocator.free(iface_slice);        const abstract = try self.allocator.create(AbstractAttribute);        errdefer self.allocator.destroy(abstract);        abstract.* = .{            .attr_id = self.next_attr_id,            .name = owned_name,            .interfaces = iface_slice,        };        const gop = try self.attrs.getOrPut(self.allocator, owned_name);        if (gop.found_existing) return error.DuplicateAttribute;        gop.key_ptr.* = owned_name;        gop.value_ptr.* = .{            .abstract = abstract,            .owns_interfaces = owns_interfaces,        };        self.next_attr_id += 1;        return abstract;    }    pub fn registerInterface(        self: *AttributeRegistry,        attr_name: []const u8,        entry: InterfaceEntry,    ) RegisterInterfaceError!void {        const reg_entry = self.attrs.getPtr(attr_name) orelse return error.UnknownAttribute;        const abstract: *AbstractAttribute = @constCast(reg_entry.abstract);        for (abstract.interfaces) |existing| {            if (existing.id == entry.id) return error.DuplicateInterface;        }        const old_slice = abstract.interfaces;        const new_slice = try self.allocator.alloc(InterfaceEntry, old_slice.len + 1);        if (old_slice.len > 0) {            @memcpy(new_slice[0..old_slice.len], old_slice);        }        new_slice[old_slice.len] = entry;        std.mem.sort(InterfaceEntry, new_slice, {}, interfaceLessThan);        if (reg_entry.owns_interfaces and old_slice.len > 0) {            self.allocator.free(@constCast(old_slice));        }        reg_entry.owns_interfaces = true;        abstract.interfaces = new_slice;    }    pub fn registerOrReplaceInterface(        self: *AttributeRegistry,        attr_name: []const u8,        entry: InterfaceEntry,    ) RegisterOrReplaceInterfaceError!void {        const reg_entry = self.attrs.getPtr(attr_name) orelse return error.UnknownAttribute;        const abstract: *AbstractAttribute = @constCast(reg_entry.abstract);        const old_slice = abstract.interfaces;        var replace_index: ?usize = null;        for (old_slice, 0..) |existing, i| {            if (existing.id == entry.id) {                replace_index = i;                break;            }        }        const new_len = if (replace_index == null) old_slice.len + 1 else old_slice.len;        const new_slice = try self.allocator.alloc(InterfaceEntry, new_len);        if (old_slice.len > 0) {            @memcpy(new_slice[0..old_slice.len], old_slice);        }        if (replace_index) |idx| {            new_slice[idx] = entry;        } else {            new_slice[old_slice.len] = entry;        }        std.mem.sort(InterfaceEntry, new_slice, {}, interfaceLessThan);        if (reg_entry.owns_interfaces and old_slice.len > 0) {            self.allocator.free(@constCast(old_slice));        }        reg_entry.owns_interfaces = true;        abstract.interfaces = new_slice;    }    pub fn count(self: *const AttributeRegistry) usize {        return self.attrs.count();    }    pub fn removeAttribute(self: *AttributeRegistry, attr_name: []const u8) bool {        const removed = self.attrs.fetchRemove(attr_name) orelse return false;        const abstract = removed.value.abstract;        if (removed.value.owns_interfaces and abstract.interfaces.len > 0) {            self.allocator.free(@constCast(abstract.interfaces));        }        self.allocator.destroy(@constCast(abstract));        self.allocator.free(removed.key);        return true;    }};

Source: lib/choir/src/core/interfaces/base.zig:4

zig
pub const ContextOpaque = opaque {};

Source: lib/choir/src/core/interfaces/base.zig:20

zig
pub const InterfaceEntry = struct {    id: InterfaceId,    vtable: *const anyopaque,};

Source: lib/choir/src/core/interfaces/base.zig:99

zig
pub const TypeParamPayload = struct {    ptr: *anyopaque,    deinit: *const fn (allocator: std.mem.Allocator, ptr: *anyopaque) void,};

Source: lib/choir/src/core/interfaces/ops.zig:32

zig
pub const CountRange = struct {    min: usize = 0,    max: ?usize = null,    pub fn exactly(count: usize) CountRange {        return .{ .min = count, .max = count };    }    pub fn atLeast(count: usize) CountRange {        return .{ .min = count };    }    pub fn atMost(count: usize) CountRange {        return .{ .max = count };    }    pub fn between(min: usize, max: usize) CountRange {        return .{ .min = min, .max = max };    }    pub fn allows(self: CountRange, count: usize) bool {        if (count < self.min) return false;        if (self.max) |max| {            if (count > max) return false;        }        return true;    }    pub fn hasConstraint(self: CountRange) bool {        return self.min != 0 or self.max != null;    }};

Source: lib/choir/src/core/interfaces/ops.zig:1303

zig
pub const DiagnosticKind = enum {    error_,    warning,};

Source: lib/choir/src/core/interfaces/ops.zig:1339

zig
pub const EvalContext = struct {    state: *anyopaque,    allocator: std.mem.Allocator,    emitDiagnostic: *const fn (state: *anyopaque, kind: DiagnosticKind, message: []const u8) EvalError!void,    evaluateRegion: *const fn (state: *anyopaque, region: *const anyopaque) EvalError!IrAttribute,    evaluateRegionWithArgs: *const fn (        state: *anyopaque,        region: *const anyopaque,        args: []const IrAttribute,    ) EvalError!IrAttribute,    evaluateSymbol: *const fn (        state: *anyopaque,        symbol: []const u8,        args: []const IrAttribute,    ) EvalError!IrAttribute,    consumeBranchFuel: *const fn (state: *anyopaque) EvalError!void,    consumeIterationFuel: *const fn (state: *anyopaque) EvalError!void,    allocHandle: *const fn (state: *anyopaque, size: i64) EvalError!i64,    borrowHandle: *const fn (state: *anyopaque, handle: i64) EvalError!i64,    borrowMutHandle: *const fn (state: *anyopaque, handle: i64) EvalError!i64,    moveHandle: *const fn (state: *anyopaque, handle: i64) EvalError!i64,    dropHandle: *const fn (state: *anyopaque, handle: i64) EvalError!void,    createRewriteBuilder: *const fn (state: *anyopaque, root: *IrOperation) EvalError!*anyopaque,};

Source: lib/choir/src/core/interfaces/ops.zig:1308

zig
pub const EvalError = error{    UnsupportedOperation,    UnknownEffect,    EffectViolation,    LocationViolation,    DivisionByZero,    InvalidOperand,    InvalidConstant,    RequiresDynamicInfo,    InvalidShiftAmount,    InvalidPredicate,    EvaluationFailed,    Overflow,    RecursionDepthExceeded,    InvalidCondition,    InvalidSize,    NegativeSize,    InvalidHandle,    HandleAlreadyDropped,    BorrowOfInvalidHandle,    MoveOfInvalidHandle,    BranchQuotaExceeded,    IterationQuotaExceeded,    DeviceLocationForbidden,    UnifiedLocationForbidden,    YieldMissingOperand,    NoYield,    ValueNotFound,    OutOfMemory,};

Source: lib/choir/src/core/interfaces/ops.zig:1231

zig
pub const FoldResult = union(enum) {    value: *IrValue,    attribute: IrAttribute,};

Source: lib/choir/src/core/interfaces/ops.zig:1236

zig
pub const FoldResults = struct {    storage: []FoldResult,    len: usize = 0,    pub fn init(storage: []FoldResult) FoldResults {        return .{ .storage = storage };    }    pub fn append(self: *FoldResults, result: FoldResult) error{CapacityExceeded}!void {        std.debug.assert(self.len <= self.storage.len);        if (self.len == self.storage.len) return error.CapacityExceeded;        self.storage[self.len] = result;        self.len += 1;    }    pub fn slice(self: *const FoldResults) []const FoldResult {        std.debug.assert(self.len <= self.storage.len);        return self.storage[0..self.len];    }};

Source: lib/choir/src/core/interfaces/ops.zig:258

zig
pub const OperationInfo = struct {    pub const dynamic_trait_inline_capacity = traits.TraitIds.inline_capacity;    pub const interface_inline_capacity = InterfaceEntries.inline_capacity;    pub const AttributeNameCapacity = struct {        inherent: usize = 0,        required: usize = 0,    };    name: []const u8,    traits: OperationTraits = .{},    shape: OperationShape = .{},    dynamic_trait_ids: traits.TraitIds = .{},    interfaces: InterfaceEntries = .{},    inherent_attribute_names: AttributeNameList = .{},    required_attribute_names: AttributeNameList = .{},    operand_type_constraints: std.ArrayListUnmanaged(OperationTypeConstraint) = .empty,    result_type_constraints: std.ArrayListUnmanaged(OperationTypeConstraint) = .empty,    operand_segments: ?OperationSegmentSpec = null,    result_segments: ?OperationSegmentSpec = null,    properties_model: ?OperationPropertiesModel = null,    pub const AddTraitError = error{DuplicateTrait} || std.mem.Allocator.Error;    pub const AddInterfaceError = error{DuplicateInterface} || std.mem.Allocator.Error;    pub const AddInherentAttributeNameError = error{DuplicateInherentAttributeName} || std.mem.Allocator.Error;    pub const AddRequiredAttributeNameError = error{DuplicateRequiredAttributeName} || AddInherentAttributeNameError;    pub const SetPropertiesModelError = error{        DuplicateOperationProperties,        IncompleteOperationPropertiesCodec,    };    pub const SetShapeError = error{ConflictingOperationShape};    pub const SetSegmentSpecError = error{        EmptySegmentAttributeName,        EmptyOperationSegments,        ConflictingOperandSegments,        ConflictingResultSegments,    } || std.mem.Allocator.Error;    pub const AddTypeConstraintError = error{        DuplicateOperandTypeConstraint,        DuplicateResultTypeConstraint,        ConflictingOperandTypeConstraint,        ConflictingResultTypeConstraint,    } || std.mem.Allocator.Error;    pub fn init(name: []const u8) OperationInfo {        return .{ .name = name };    }    pub fn initEntryStorage(        name: []const u8,        trait_storage: *[dynamic_trait_inline_capacity]TraitId,        interface_storage: *[interface_inline_capacity]InterfaceEntry,        inherent_attribute_storage: [][]const u8,        required_attribute_storage: [][]const u8,    ) OperationInfo {        return .{            .name = name,            .dynamic_trait_ids = traits.TraitIds.initInline(trait_storage),            .interfaces = InterfaceEntries.initInline(interface_storage),            .inherent_attribute_names = initAttributeNameList(inherent_attribute_storage),            .required_attribute_names = initAttributeNameList(required_attribute_storage),        };    }    fn initAttributeNameList(storage: [][]const u8) AttributeNameList {        if (storage.len == 0) return .{};        return AttributeNameList.initBorrowed(storage);    }    pub fn deinit(self: *OperationInfo, allocator: std.mem.Allocator) void {        self.dynamic_trait_ids.deinit(allocator);        self.interfaces.deinit(allocator);        for (self.inherent_attribute_names.values()) |name| {            allocator.free(name);        }        self.inherent_attribute_names.deinit(allocator);        for (self.required_attribute_names.values()) |name| {            allocator.free(name);        }        self.required_attribute_names.deinit(allocator);        for (self.operand_type_constraints.items) |constraint| {            allocator.free(constraint.type_name);        }        self.operand_type_constraints.deinit(allocator);        for (self.result_type_constraints.items) |constraint| {            allocator.free(constraint.type_name);        }        self.result_type_constraints.deinit(allocator);        if (self.operand_segments) |segment_spec| {            freeSegmentSpec(allocator, segment_spec);        }        if (self.result_segments) |segment_spec| {            freeSegmentSpec(allocator, segment_spec);        }    }    pub fn addTrait(        self: *OperationInfo,        allocator: std.mem.Allocator,        trait_id: TraitId,    ) AddTraitError!void {        try self.dynamic_trait_ids.insert(allocator, trait_id);    }    pub fn addInterface(        self: *OperationInfo,        allocator: std.mem.Allocator,        entry: InterfaceEntry,    ) AddInterfaceError!void {        try self.interfaces.insert(allocator, entry);    }    pub fn addOrReplaceInterface(        self: *OperationInfo,        allocator: std.mem.Allocator,        entry: InterfaceEntry,    ) !void {        try self.interfaces.insertOrReplace(allocator, entry);    }    pub fn addInherentAttributeName(        self: *OperationInfo,        allocator: std.mem.Allocator,        name: []const u8,    ) AddInherentAttributeNameError!void {        if (self.hasInherentAttributeName(name)) return error.DuplicateInherentAttributeName;        const owned_name = try allocator.dupe(u8, name);        errdefer allocator.free(owned_name);        try self.inherent_attribute_names.append(allocator, owned_name);        std.mem.sort(            []const u8,            self.inherent_attribute_names.valuesMut(),            {},            name_less_than,        );    }    pub fn addInherentAttributeNames(        self: *OperationInfo,        allocator: std.mem.Allocator,        names: []const []const u8,    ) AddInherentAttributeNameError!void {        for (names) |name| {            try self.addInherentAttributeName(allocator, name);        }    }    pub fn getInherentAttributeNames(self: *const OperationInfo) []const []const u8 {        return self.inherent_attribute_names.values();    }    pub fn hasInherentAttributeName(self: *const OperationInfo, name: []const u8) bool {        return sortedNameContains(self.inherent_attribute_names.values(), name);    }    pub fn addRequiredAttributeName(        self: *OperationInfo,        allocator: std.mem.Allocator,        name: []const u8,    ) AddRequiredAttributeNameError!void {        if (!self.hasInherentAttributeName(name)) {            try self.addInherentAttributeName(allocator, name);        }        if (self.hasRequiredAttributeName(name)) return error.DuplicateRequiredAttributeName;        const owned_name = try allocator.dupe(u8, name);        errdefer allocator.free(owned_name);        try self.required_attribute_names.append(allocator, owned_name);        std.mem.sort(            []const u8,            self.required_attribute_names.valuesMut(),            {},            name_less_than,        );    }    pub fn addRequiredAttributeNames(        self: *OperationInfo,        allocator: std.mem.Allocator,        names: []const []const u8,    ) AddRequiredAttributeNameError!void {        for (names) |name| {            try self.addRequiredAttributeName(allocator, name);        }    }    pub fn getRequiredAttributeNames(self: *const OperationInfo) []const []const u8 {        return self.required_attribute_names.values();    }    pub fn hasRequiredAttributeName(self: *const OperationInfo, name: []const u8) bool {        return sortedNameContains(self.required_attribute_names.values(), name);    }    fn sortedNameContains(names: []const []const u8, name: []const u8) bool {        var left: usize = 0;        var right: usize = names.len;        while (left < right) {            const mid = left + (right - left) / 2;            const cmp = std.mem.order(u8, names[mid], name);            switch (cmp) {                .eq => return true,                .lt => left = mid + 1,                .gt => right = mid,            }        }        return false;    }    pub fn setPropertiesModel(        self: *OperationInfo,        model: OperationPropertiesModel,    ) SetPropertiesModelError!void {        if (self.properties_model != null) return error.DuplicateOperationProperties;        if ((model.getPropertiesAsAttr == null) != (model.setPropertiesFromAttr == null)) {            return error.IncompleteOperationPropertiesCodec;        }        self.properties_model = model;    }    pub fn getPropertiesModel(self: *const OperationInfo) ?*const OperationPropertiesModel {        if (self.properties_model) |*model| return model;        return null;    }    pub fn hasPropertiesModel(self: *const OperationInfo) bool {        return self.properties_model != null;    }    pub fn setShape(        self: *OperationInfo,        shape: OperationShape,    ) SetShapeError!void {        if (self.shape.hasConstraints() and !self.shape.eql(shape)) {            return error.ConflictingOperationShape;        }        self.shape = shape;    }    pub fn setOperandSegments(        self: *OperationInfo,        allocator: std.mem.Allocator,        spec: OperationSegmentSpec,    ) SetSegmentSpecError!void {        try self.setSegmentSpec(allocator, &self.operand_segments, spec, error.ConflictingOperandSegments);    }    pub fn setResultSegments(        self: *OperationInfo,        allocator: std.mem.Allocator,        spec: OperationSegmentSpec,    ) SetSegmentSpecError!void {        try self.setSegmentSpec(allocator, &self.result_segments, spec, error.ConflictingResultSegments);    }    fn setSegmentSpec(        self: *OperationInfo,        allocator: std.mem.Allocator,        slot: *?OperationSegmentSpec,        spec: OperationSegmentSpec,        conflict: SetSegmentSpecError,    ) SetSegmentSpecError!void {        _ = self;        if (spec.attribute_name.len == 0) return error.EmptySegmentAttributeName;        if (spec.segments.len == 0) return error.EmptyOperationSegments;        if (slot.*) |existing| {            if (existing.eql(spec)) return;            return conflict;        }        const owned_name = try allocator.dupe(u8, spec.attribute_name);        errdefer allocator.free(owned_name);        const owned_segments = try allocator.dupe(CountRange, spec.segments);        errdefer allocator.free(owned_segments);        slot.* = .{            .attribute_name = owned_name,            .segments = owned_segments,        };    }    pub fn addOperandTypeConstraint(        self: *OperationInfo,        allocator: std.mem.Allocator,        constraint: OperationTypeConstraint,    ) AddTypeConstraintError!void {        try self.addTypeConstraint(            allocator,            &self.operand_type_constraints,            constraint,            error.DuplicateOperandTypeConstraint,            error.ConflictingOperandTypeConstraint,        );    }    pub fn addResultTypeConstraint(        self: *OperationInfo,        allocator: std.mem.Allocator,        constraint: OperationTypeConstraint,    ) AddTypeConstraintError!void {        try self.addTypeConstraint(            allocator,            &self.result_type_constraints,            constraint,            error.DuplicateResultTypeConstraint,            error.ConflictingResultTypeConstraint,        );    }    fn addTypeConstraint(        self: *OperationInfo,        allocator: std.mem.Allocator,        list: *std.ArrayListUnmanaged(OperationTypeConstraint),        constraint: OperationTypeConstraint,        duplicate: AddTypeConstraintError,        conflict: AddTypeConstraintError,    ) AddTypeConstraintError!void {        _ = self;        for (list.items) |existing| {            if (existing.index == constraint.index) {                if (existing.eql(constraint)) return duplicate;                return conflict;            }        }        const owned_name = try allocator.dupe(u8, constraint.type_name);        errdefer allocator.free(owned_name);        try list.append(allocator, .{            .index = constraint.index,            .type_name = owned_name,            .allow_parameterized = constraint.allow_parameterized,        });        std.mem.sort(OperationTypeConstraint, list.items, {}, type_constraint_less_than);    }    pub fn getOperandTypeConstraints(self: *const OperationInfo) []const OperationTypeConstraint {        return self.operand_type_constraints.items;    }    pub fn getResultTypeConstraints(self: *const OperationInfo) []const OperationTypeConstraint {        return self.result_type_constraints.items;    }    pub fn getOperandSegments(self: *const OperationInfo) ?OperationSegmentSpec {        return self.operand_segments;    }    pub fn getResultSegments(self: *const OperationInfo) ?OperationSegmentSpec {        return self.result_segments;    }    pub fn getInterface(self: *const OperationInfo, id: InterfaceId) ?*const anyopaque {        return self.interfaces.get(id);    }    pub fn hasTraitId(self: *const OperationInfo, trait_id: TraitId) bool {        return self.dynamic_trait_ids.contains(trait_id);    }    pub fn getDynamicTraitIds(self: *const OperationInfo) []const TraitId {        return self.dynamic_trait_ids.values();    }    pub fn hasInterface(self: *const OperationInfo, id: InterfaceId) bool {        return self.getInterface(id) != null;    }    pub fn getNumInterfaces(self: *const OperationInfo) usize {        return self.interfaces.count();    }};

Source: lib/choir/src/core/interfaces/ops.zig:649

zig
pub const OperationRegistry = struct {    allocator: std.mem.Allocator,    ops: std.StringHashMapUnmanaged(*OperationInfo),    batch_regions: ?*BatchEntryStorage.RegionOwner,    allow_unregistered_operations: bool,    pub const RegisterPropertiesModelError = OperationInfo.SetPropertiesModelError || GetOrCreateError;    pub const RegisterShapeError = OperationInfo.SetShapeError || GetOrCreateError;    pub const RegisterSegmentSpecError = OperationInfo.SetSegmentSpecError || GetOrCreateError;    pub const RegisterTypeConstraintError = OperationInfo.AddTypeConstraintError || GetOrCreateError;    pub const GetOrCreateError: type = std.mem.Allocator.Error;    pub const GetOrCreateResult = struct {        info: *OperationInfo,        created: bool,    };    pub const RegisterTraitError: type = OperationInfo.AddTraitError;    pub const RegisterInterfaceError: type = OperationInfo.AddInterfaceError;    pub const RegisterInherentAttributeNameError: type =        OperationInfo.AddInherentAttributeNameError;    pub const RegisterRequiredAttributeNameError: type =        OperationInfo.AddRequiredAttributeNameError;    const EntryStorage: type = registry_entry.InlineStorage(        OperationInfo,        TraitId,        OperationInfo.dynamic_trait_inline_capacity,        InterfaceEntry,        OperationInfo.interface_inline_capacity,        []const u8,        []const u8,    );    const BatchEntryStorage: type = EntryStorage.BatchStorage;    pub fn init(allocator: std.mem.Allocator) OperationRegistry {        return .{            .allocator = allocator,            .ops = .{},            .batch_regions = null,            .allow_unregistered_operations = false,        };    }    pub fn deinit(self: *OperationRegistry) void {        var it = self.ops.valueIterator();        while (it.next()) |info_ptr| {            const info = info_ptr.*;            if (self.findBatchRegionLink(info) != null) {                info.deinit(self.allocator);                info.* = undefined;            } else {                EntryStorage.destroy(self.allocator, info);            }        }        self.ops.deinit(self.allocator);        while (self.batch_regions) |region| {            self.batch_regions = region.next;            BatchEntryStorage.destroy(self.allocator, region);        }    }    pub fn lookup(self: *const OperationRegistry, op_name: []const u8) ?*OperationInfo {        return self.ops.get(op_name);    }    pub fn getOrCreate(self: *OperationRegistry, op_name: []const u8) GetOrCreateError!*OperationInfo {        return (try self.getOrCreateTracked(op_name)).info;    }    pub fn getOrCreateTracked(self: *OperationRegistry, op_name: []const u8) GetOrCreateError!GetOrCreateResult {        return self.getOrCreateTrackedWithAttributeNameCapacity(op_name, .{});    }    pub fn getOrCreateTrackedWithAttributeNameCapacity(        self: *OperationRegistry,        op_name: []const u8,        capacity: OperationInfo.AttributeNameCapacity,    ) GetOrCreateError!GetOrCreateResult {        if (self.ops.get(op_name)) |existing| {            return .{ .info = existing, .created = false };        }        const info = try EntryStorage.create(            self.allocator,            op_name,            capacity.inherent,            capacity.required,        );        errdefer EntryStorage.destroy(self.allocator, info);        const gop = try self.ops.getOrPut(self.allocator, info.name);        if (gop.found_existing) {            EntryStorage.destroy(self.allocator, info);            return .{ .info = gop.value_ptr.*, .created = false };        }        gop.value_ptr.* = info;        return .{ .info = info, .created = true };    }    pub fn getOrCreateOperationBatch(        self: *OperationRegistry,        operation_specs: anytype,    ) GetOrCreateError!void {        var capacity_value: BatchEntryStorage.Capacity = .{};        for (operation_specs) |op| {            if (self.ops.get(op.name) != null) continue;            capacity_value.add(                op.name.len,                op.inherent_attribute_names.len,                op.required_attribute_names.len,            ) catch return error.OutOfMemory;        }        if (capacity_value.entry_count == 0) return;        const unused_capacity = std.math.cast(            u32,            capacity_value.entry_count,        ) orelse return error.OutOfMemory;        const allocation = try BatchEntryStorage.create(            self.allocator,            capacity_value,        );        errdefer BatchEntryStorage.destroy(self.allocator, allocation.region);        try self.ops.ensureUnusedCapacity(self.allocator, unused_capacity);        var cursor = BatchEntryStorage.Cursor.init(allocation.entries);        for (operation_specs) |op| {            if (self.ops.get(op.name) != null) continue;            const info = cursor.create(                op.name,                op.inherent_attribute_names.len,                op.required_attribute_names.len,            );            self.ops.putAssumeCapacityNoClobber(info.name, info);        }        std.debug.assert(cursor.offset <= allocation.entries.len);        allocation.region.next = self.batch_regions;        self.batch_regions = allocation.region;    }    pub fn registerOperation(        self: *OperationRegistry,        op_name: []const u8,        traits_val: OperationTraits,    ) GetOrCreateError!*OperationInfo {        const info = try self.getOrCreate(op_name);        info.traits = info.traits.merge(traits_val);        return info;    }    pub fn registerTrait(        self: *OperationRegistry,        op_name: []const u8,        trait_id: TraitId,    ) RegisterTraitError!void {        const info = try self.getOrCreate(op_name);        try info.addTrait(self.allocator, trait_id);    }    pub fn registerInterface(        self: *OperationRegistry,        op_name: []const u8,        entry: InterfaceEntry,    ) RegisterInterfaceError!void {        const info = try self.getOrCreate(op_name);        try info.addInterface(self.allocator, entry);    }    pub fn registerOrReplaceInterface(        self: *OperationRegistry,        op_name: []const u8,        entry: InterfaceEntry,    ) GetOrCreateError!void {        const info = try self.getOrCreate(op_name);        try info.addOrReplaceInterface(self.allocator, entry);    }    pub fn registerInherentAttributeName(        self: *OperationRegistry,        op_name: []const u8,        attr_name: []const u8,    ) RegisterInherentAttributeNameError!void {        const info = try self.getOrCreate(op_name);        try info.addInherentAttributeName(self.allocator, attr_name);    }    pub fn registerRequiredAttributeName(        self: *OperationRegistry,        op_name: []const u8,        attr_name: []const u8,    ) RegisterRequiredAttributeNameError!void {        const info = try self.getOrCreate(op_name);        try info.addRequiredAttributeName(self.allocator, attr_name);    }    pub fn registerInherentAttributeNames(        self: *OperationRegistry,        op_name: []const u8,        attr_names: []const []const u8,    ) RegisterInherentAttributeNameError!void {        const info = try self.getOrCreate(op_name);        try info.addInherentAttributeNames(self.allocator, attr_names);    }    pub fn registerPropertiesModel(        self: *OperationRegistry,        op_name: []const u8,        model: OperationPropertiesModel,    ) RegisterPropertiesModelError!void {        const info = try self.getOrCreate(op_name);        try info.setPropertiesModel(model);    }    pub fn registerShape(        self: *OperationRegistry,        op_name: []const u8,        shape: OperationShape,    ) RegisterShapeError!void {        const info = try self.getOrCreate(op_name);        try info.setShape(shape);    }    pub fn registerOperandSegments(        self: *OperationRegistry,        op_name: []const u8,        spec: OperationSegmentSpec,    ) RegisterSegmentSpecError!void {        const info = try self.getOrCreate(op_name);        try info.setOperandSegments(self.allocator, spec);    }    pub fn registerResultSegments(        self: *OperationRegistry,        op_name: []const u8,        spec: OperationSegmentSpec,    ) RegisterSegmentSpecError!void {        const info = try self.getOrCreate(op_name);        try info.setResultSegments(self.allocator, spec);    }    pub fn registerOperandTypeConstraint(        self: *OperationRegistry,        op_name: []const u8,        constraint: OperationTypeConstraint,    ) RegisterTypeConstraintError!void {        const info = try self.getOrCreate(op_name);        try info.addOperandTypeConstraint(self.allocator, constraint);    }    pub fn registerResultTypeConstraint(        self: *OperationRegistry,        op_name: []const u8,        constraint: OperationTypeConstraint,    ) RegisterTypeConstraintError!void {        const info = try self.getOrCreate(op_name);        try info.addResultTypeConstraint(self.allocator, constraint);    }    pub fn count(self: *const OperationRegistry) usize {        return self.ops.count();    }    pub fn removeOperation(self: *OperationRegistry, op_name: []const u8) bool {        const removed = self.ops.fetchRemove(op_name) orelse return false;        const info = removed.value;        std.debug.assert(removed.key.ptr == info.name.ptr);        if (self.findBatchRegionLink(info)) |region_link| {            const region = region_link.*.?;            info.deinit(self.allocator);            info.* = undefined;            if (!self.batchRegionHasLiveInfo(region)) {                region_link.* = region.next;                BatchEntryStorage.destroy(self.allocator, region);            }        } else {            EntryStorage.destroy(self.allocator, info);        }        return true;    }    fn findBatchRegionLink(        self: *OperationRegistry,        info: *const OperationInfo,    ) ?*?*BatchEntryStorage.RegionOwner {        var region_link = &self.batch_regions;        while (region_link.*) |region| {            if (BatchEntryStorage.contains(region, info)) return region_link;            region_link = &region.next;        }        return null;    }    fn batchRegionHasLiveInfo(        self: *const OperationRegistry,        region: *const BatchEntryStorage.RegionOwner,    ) bool {        var it = self.ops.valueIterator();        while (it.next()) |info_ptr| {            if (BatchEntryStorage.contains(region, info_ptr.*)) return true;        }        return false;    }};

Source: lib/choir/src/core/interfaces/ops.zig:83

zig
pub const OperationSegmentSpec = struct {    attribute_name: []const u8,    segments: []const CountRange,    pub fn hasSegments(self: OperationSegmentSpec) bool {        return self.segments.len > 0;    }    pub fn eql(self: OperationSegmentSpec, other: OperationSegmentSpec) bool {        if (!std.mem.eql(u8, self.attribute_name, other.attribute_name)) return false;        if (self.segments.len != other.segments.len) return false;        for (self.segments, other.segments) |a, b| {            if (!std.meta.eql(a, b)) return false;        }        return true;    }    pub fn size(self: OperationSegmentSpec, op: *const IrOperation, index: usize) ?usize {        if (index >= self.segments.len) return null;        const attr = op.getAttrAs(IrAttribute.ArrayAttr, self.attribute_name) orelse return null;        const values = attr.getValues();        if (index >= values.len) return null;        const int_attr = values[index].cast(IrAttribute.IntegerAttr) orelse return null;        return std.math.cast(usize, int_attr.getValue());    }    pub fn offset(self: OperationSegmentSpec, op: *const IrOperation, index: usize) ?usize {        if (index > self.segments.len) return null;        const attr = op.getAttrAs(IrAttribute.ArrayAttr, self.attribute_name) orelse return null;        const values = attr.getValues();        if (index > values.len) return null;        var result: usize = 0;        for (values[0..index]) |value| {            const int_attr = value.cast(IrAttribute.IntegerAttr) orelse return null;            const size_value = std.math.cast(usize, int_attr.getValue()) orelse return null;            result = std.math.add(usize, result, size_value) catch return null;        }        return result;    }};

Source: lib/choir/src/core/interfaces/ops.zig:65

zig
pub const OperationShape = struct {    operands: CountRange = .{},    results: CountRange = .{},    regions: CountRange = .{},    successors: CountRange = .{},    pub fn hasConstraints(self: OperationShape) bool {        return self.operands.hasConstraint() or            self.results.hasConstraint() or            self.regions.hasConstraint() or            self.successors.hasConstraint();    }    pub fn eql(self: OperationShape, other: OperationShape) bool {        return std.meta.eql(self, other);    }};

Source: lib/choir/src/core/interfaces/ops.zig:124

zig
pub const OperationTypeConstraint = struct {    index: usize,    type_name: []const u8,    allow_parameterized: bool = false,    pub fn eql(self: OperationTypeConstraint, other: OperationTypeConstraint) bool {        return self.index == other.index and            self.allow_parameterized == other.allow_parameterized and            std.mem.eql(u8, self.type_name, other.type_name);    }};

Source: lib/choir/src/core/interfaces/ops.zig:1115

zig
pub const RegionKind = enum {    ssacfg,    graph,};

Source: lib/choir/src/core/interfaces/traits.zig:108

zig
pub const OperationTraits = packed struct(u64) {    is_terminator: bool = false,    is_commutative: bool = false,    is_idempotent: bool = false,    is_involution: bool = false,    is_symbol_table: bool = false,    has_no_terminator: bool = false,    has_only_graph_regions: bool = false,    _padding: u57 = 0,    pub fn merge(a: OperationTraits, b: OperationTraits) OperationTraits {        return .{            .is_terminator = a.is_terminator or b.is_terminator,            .is_commutative = a.is_commutative or b.is_commutative,            .is_idempotent = a.is_idempotent or b.is_idempotent,            .is_involution = a.is_involution or b.is_involution,            .is_symbol_table = a.is_symbol_table or b.is_symbol_table,            .has_no_terminator = a.has_no_terminator or b.has_no_terminator,            .has_only_graph_regions = a.has_only_graph_regions or b.has_only_graph_regions,        };    }};

Source: lib/choir/src/core/interfaces/traits.zig:19

zig
pub const TraitEntry = struct {    id: TraitId,    vtable: *const TraitVTable,};

Source: lib/choir/src/core/interfaces/traits.zig:76

zig
pub const TraitRegistry = struct {    traits: std.AutoHashMapUnmanaged(TraitId, *const TraitVTable),    pub const RegisterError = error{DuplicateTrait} || std.mem.Allocator.Error;    pub fn init() TraitRegistry {        return .{ .traits = .{} };    }    pub fn deinit(self: *TraitRegistry, allocator: std.mem.Allocator) void {        self.traits.deinit(allocator);    }    pub fn register(        self: *TraitRegistry,        allocator: std.mem.Allocator,        entry: TraitEntry,    ) RegisterError!void {        const gop = try self.traits.getOrPut(allocator, entry.id);        if (gop.found_existing) return error.DuplicateTrait;        gop.value_ptr.* = entry.vtable;    }    pub fn lookup(self: *const TraitRegistry, id: TraitId) ?*const TraitVTable {        return self.traits.get(id);    }    pub fn count(self: *const TraitRegistry) usize {        return self.traits.count();    }};

Source: lib/choir/src/core/interfaces/traits.zig:14

zig
pub const TraitVTable = struct {    verify: ?*const fn (op_ptr: *const anyopaque) anyerror!void = null,    verify_regions: ?*const fn (op_ptr: *const anyopaque) anyerror!void = null,};

Source: lib/choir/src/core/interfaces/types.zig:13

zig
pub const TypeInfo = struct {    name: []const u8,    interfaces: InterfaceEntries = .{},    pub const AddInterfaceError = error{DuplicateInterface} || std.mem.Allocator.Error;    pub fn init(name: []const u8) TypeInfo {        return .{ .name = name };    }    pub fn deinit(self: *TypeInfo, allocator: std.mem.Allocator) void {        self.interfaces.deinit(allocator);    }    pub fn addInterface(        self: *TypeInfo,        allocator: std.mem.Allocator,        entry: InterfaceEntry,    ) AddInterfaceError!void {        try self.interfaces.insert(allocator, entry);    }    pub fn addOrReplaceInterface(        self: *TypeInfo,        allocator: std.mem.Allocator,        entry: InterfaceEntry,    ) !void {        try self.interfaces.insertOrReplace(allocator, entry);    }    pub fn getInterface(self: *const TypeInfo, id: InterfaceId) ?*const anyopaque {        return self.interfaces.get(id);    }    pub fn hasInterface(self: *const TypeInfo, id: InterfaceId) bool {        return self.getInterface(id) != null;    }    pub fn getNumInterfaces(self: *const TypeInfo) usize {        return self.interfaces.count();    }};

Source: lib/choir/src/core/interfaces/types.zig:57

zig
pub const TypeRegistry = struct {    allocator: std.mem.Allocator,    types: std.StringHashMapUnmanaged(*TypeInfo),    batch_regions: ?*BatchEntryStorage.RegionOwner,    allow_unregistered_types: bool,    pub const GetOrCreateError: type = std.mem.Allocator.Error;    pub const GetOrCreateResult = struct {        info: *TypeInfo,        created: bool,    };    pub const RegisterInterfaceError: type = TypeInfo.AddInterfaceError;    const EntryStorage: type = registry_entry.Storage(TypeInfo);    const BatchEntryStorage: type = registry_entry.BatchStorage(TypeInfo);    pub fn init(allocator: std.mem.Allocator) TypeRegistry {        return .{            .allocator = allocator,            .types = .{},            .batch_regions = null,            .allow_unregistered_types = false,        };    }    pub fn deinit(self: *TypeRegistry) void {        var it = self.types.valueIterator();        while (it.next()) |info_ptr| {            const info = info_ptr.*;            if (self.findBatchRegionLink(info) != null) {                info.deinit(self.allocator);                info.* = undefined;            } else {                EntryStorage.destroy(self.allocator, info);            }        }        self.types.deinit(self.allocator);        while (self.batch_regions) |region| {            self.batch_regions = region.next;            BatchEntryStorage.destroy(self.allocator, region);        }    }    pub fn lookup(self: *const TypeRegistry, type_name: []const u8) ?*TypeInfo {        return self.types.get(type_name);    }    pub fn getOrCreate(self: *TypeRegistry, type_name: []const u8) GetOrCreateError!*TypeInfo {        return (try self.getOrCreateTracked(type_name)).info;    }    pub fn getOrCreateTracked(self: *TypeRegistry, type_name: []const u8) GetOrCreateError!GetOrCreateResult {        if (self.types.get(type_name)) |existing| {            return .{ .info = existing, .created = false };        }        const info = try EntryStorage.create(self.allocator, type_name);        errdefer EntryStorage.destroy(self.allocator, info);        const gop = try self.types.getOrPut(self.allocator, info.name);        if (gop.found_existing) {            EntryStorage.destroy(self.allocator, info);            return .{ .info = gop.value_ptr.*, .created = false };        }        gop.value_ptr.* = info;        return .{ .info = info, .created = true };    }    pub fn getOrCreateNamedBatch(self: *TypeRegistry, named_items: anytype) GetOrCreateError!void {        try self.getOrCreateBatch(named_items);    }    fn getOrCreateBatch(        self: *TypeRegistry,        items: anytype,    ) GetOrCreateError!void {        var info_count: usize = 0;        var name_bytes: usize = 0;        for (items) |item| {            const name = batchItemName(item);            if (self.types.get(name) != null) continue;            info_count = std.math.add(usize, info_count, 1) catch return error.OutOfMemory;            name_bytes = std.math.add(usize, name_bytes, name.len) catch return error.OutOfMemory;        }        if (info_count == 0) return;        const unused_capacity = std.math.cast(u32, info_count) orelse return error.OutOfMemory;        const allocation = try BatchEntryStorage.create(self.allocator, info_count, name_bytes);        errdefer BatchEntryStorage.destroy(self.allocator, allocation.region);        var info_index: usize = 0;        var name_offset: usize = 0;        for (items) |item| {            const name = batchItemName(item);            if (self.types.get(name) != null) continue;            const name_end = std.math.add(usize, name_offset, name.len) catch unreachable;            const owned_name = allocation.names[name_offset..name_end];            @memcpy(owned_name, name);            allocation.infos[info_index] = TypeInfo.init(owned_name);            info_index += 1;            name_offset = name_end;        }        std.debug.assert(info_index == allocation.infos.len);        std.debug.assert(name_offset == allocation.names.len);        try self.types.ensureUnusedCapacity(self.allocator, unused_capacity);        for (allocation.infos) |*info| {            if (self.types.get(info.name) != null) continue;            self.types.putAssumeCapacityNoClobber(info.name, info);        }        allocation.region.next = self.batch_regions;        self.batch_regions = allocation.region;    }    fn batchItemName(item: anytype) []const u8 {        if (@TypeOf(item) == []const u8) return item;        return item.name;    }    pub fn registerType(self: *TypeRegistry, type_name: []const u8) GetOrCreateError!*TypeInfo {        return self.getOrCreate(type_name);    }    pub fn registerInterface(        self: *TypeRegistry,        type_name: []const u8,        entry: InterfaceEntry,    ) RegisterInterfaceError!void {        const info = try self.getOrCreate(type_name);        try info.addInterface(self.allocator, entry);    }    pub fn registerOrReplaceInterface(        self: *TypeRegistry,        type_name: []const u8,        entry: InterfaceEntry,    ) !void {        const info = try self.getOrCreate(type_name);        try info.addOrReplaceInterface(self.allocator, entry);    }    pub fn count(self: *const TypeRegistry) usize {        return self.types.count();    }    pub fn removeType(self: *TypeRegistry, type_name: []const u8) bool {        const removed = self.types.fetchRemove(type_name) orelse return false;        const info = removed.value;        std.debug.assert(removed.key.ptr == info.name.ptr);        if (self.findBatchRegionLink(info)) |region_link| {            const region = region_link.*.?;            info.deinit(self.allocator);            info.* = undefined;            if (!self.batchRegionHasLiveInfo(region)) {                region_link.* = region.next;                BatchEntryStorage.destroy(self.allocator, region);            }        } else {            EntryStorage.destroy(self.allocator, info);        }        return true;    }    fn findBatchRegionLink(        self: *TypeRegistry,        info: *const TypeInfo,    ) ?*?*BatchEntryStorage.RegionOwner {        var region_link = &self.batch_regions;        while (region_link.*) |region| {            if (BatchEntryStorage.contains(region, info)) return region_link;            region_link = &region.next;        }        return null;    }    fn batchRegionHasLiveInfo(        self: *const TypeRegistry,        region: *const BatchEntryStorage.RegionOwner,    ) bool {        var it = self.types.valueIterator();        while (it.next()) |info_ptr| {            if (BatchEntryStorage.contains(region, info_ptr.*)) return true;        }        return false;    }};
Called byCallsNo direct callsir.interfaces.AbstractAttributehasInterfaceir.interfaces.AbstractAttributegetInterface
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callersir.interfaces.AbstractAttributegetInterfaceir.interfaces.AbstractAttributehasInterface
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callsprivate sourcelib.choir.src.core.interfaces.attrscheckRegisterAttributeAllocationFailu...test sourcelib.choir.src.core.interfaces.attrstest: attribute registration preserve...ir.AttributeRegistrydeinit
Static calls · unresolved targets: 0 · external targets: 7.
Called byCallsNo direct callsprivate sourcelib.choir.src.core.interfaces.attrscheckRegisterAttributeAllocationFailu...test sourcelib.choir.src.core.interfaces.attrstest: attribute registration preserve...ir.AttributeRegistryinit
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callstest sourcelib.choir.src.core.interfaces.attrstest: attribute registration preserve...ir.AttributeRegistrynextAttributeId
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callsprivate sourcelib.choir.src.core.interfaces.attrscheckRegisterAttributeAllocationFailu...test sourcelib.choir.src.core.interfaces.attrstest: attribute registration preserve...ir.AttributeRegistryregisterAttribute
Static calls · unresolved targets: 1 · external targets: 5.

Source: lib/choir/src/core/interfaces/base.zig:10

zig
pub const InterfaceId = u64;

Source: lib/choir/src/core/interfaces/base.zig:6

zig
pub fn castContext(comptime CtxT: type, ctx_ptr: *const ContextOpaque) *CtxT {    return @ptrCast(@alignCast(@constCast(ctx_ptr)));}

Source: lib/choir/src/core/interfaces/base.zig:12

zig
pub fn interfaceId(comptime name: []const u8) InterfaceId {    return std.hash.Wyhash.hash(0, name);}
Called byCallsNo direct callstest sourcelib.choir.src.core.interfaces.attrstest: SymbolUserAttrInterface stable ...test sourcelib.choir.src.core.interfaces.basetest: interfaceId produces stable has...test sourcelib.choir.src.core.interfaces.opstest: CallOpInterface stable IDtest sourcelib.choir.src.core.interfaces.opstest: ControlFlowInterface stable IDtest sourcelib.choir.src.core.interfaces.opstest: Evaluatable stable ID+15 moreirinterfaceId
Static calls · unresolved targets: 0 · external targets: 0.

Source: lib/choir/src/core/interfaces/base.zig:16

zig
pub fn interfaceIdRuntime(name: []const u8) InterfaceId {    return std.hash.Wyhash.hash(0, name);}
Called byCallsNo direct callstest sourcelib.choir.src.core.interfaces.basetest: interfaceId produces stable has...irinterfaceIdRuntime
Static calls · unresolved targets: 0 · external targets: 0.

Source: lib/choir/src/core/interfaces/entry.zig:41

zig
pub fn InlineList(comptime Item: type, comptime inline_capacity: usize) type {    const inline_mask = @as(usize, 1) << (@bitSizeOf(usize) - 1);    return struct {        const Self = @This();        slice: []Item = &.{},        capacity_and_inline: usize = 0,        pub fn initInline(storage: *[inline_capacity]Item) Self {            return initBorrowed(storage);        }        pub fn initBorrowed(storage: []Item) Self {            std.debug.assert(storage.len & inline_mask == 0);            return .{                .slice = storage[0..0],                .capacity_and_inline = inline_mask | storage.len,            };        }        pub fn initBorrowedValues(storage: []Item, values_to_copy: []const Item) Self {            std.debug.assert(storage.len & inline_mask == 0);            std.debug.assert(values_to_copy.len <= storage.len);            @memcpy(storage[0..values_to_copy.len], values_to_copy);            return .{                .slice = storage[0..values_to_copy.len],                .capacity_and_inline = inline_mask | storage.len,            };        }        pub fn deinit(self: *Self, allocator: Allocator) void {            if (!self.isInline() and self.capacity() > 0) {                allocator.free(self.slice.ptr[0..self.capacity()]);            }            self.* = .{};        }        pub fn append(self: *Self, allocator: Allocator, item: Item) Allocator.Error!void {            const capacity_value = self.capacity();            if (self.slice.len < capacity_value) {                self.slice.ptr[self.slice.len] = item;                self.slice.len += 1;                return;            }            if (self.isInline()) {                std.debug.assert(self.slice.len == capacity_value);                const heap_capacity = std.math.add(usize, capacity_value, 1) catch {                    return error.OutOfMemory;                };                const heap_items = try allocator.alloc(Item, heap_capacity);                errdefer allocator.free(heap_items);                @memcpy(heap_items[0..capacity_value], self.slice);                heap_items[capacity_value] = item;                self.slice = heap_items;                self.capacity_and_inline = heap_items.len;                return;            }            var heap: std.ArrayListUnmanaged(Item) = .{                .items = self.slice,                .capacity = capacity_value,            };            try heap.append(allocator, item);            std.debug.assert(heap.capacity & inline_mask == 0);            self.slice = heap.items;            self.capacity_and_inline = heap.capacity;        }        pub fn values(self: *const Self) []const Item {            return self.slice;        }        pub fn valuesMut(self: *Self) []Item {            return self.slice;        }        fn capacity(self: *const Self) usize {            return self.capacity_and_inline & ~inline_mask;        }        fn isInline(self: *const Self) bool {            return self.capacity_and_inline & inline_mask != 0;        }    };}
Called byCallsNo direct callstest sourcelib.choir.src.core.interfaces.opstest: CountRange checks exact and bou...test sourcelib.choir.src.core.interfaces.opstest: OperationInfo segment registrat...ir.CountRangeatLeast
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callstest sourcelib.choir.src.core.interfaces.opstest: CountRange checks exact and bou...test sourcelib.choir.src.core.interfaces.opstest: OperationInfo segment registrat...ir.CountRangeatMost
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callstest sourcelib.choir.src.core.interfaces.opstest: CountRange checks exact and bou...ir.CountRangebetween
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callstest sourcelib.choir.src.core.interfaces.opstest: CountRange checks exact and bou...test sourcelib.choir.src.core.interfaces.opstest: OperationInfo segment registrat...test sourcelib.choir.src.core.interfaces.opstest: OperationInfo shape registratio...ir.CountRangeexactly
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callsir.OperationShapehasConstraintsir.CountRangehasConstraint
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callstest sourcelib.choir.src.core.interfaces.opstest: FoldResults enforces caller-pro...ir.interfaces.FoldResultsappend
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callstest sourcelib.choir.src.core.interfaces.opstest: FoldResults enforces caller-pro...ir.interfaces.FoldResultsinit
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callstest sourcelib.choir.src.core.interfaces.opstest: FoldResults enforces caller-pro...ir.interfaces.FoldResultsslice
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsir.OperationInfoaddInherentAttributeNamesir.OperationInfoaddRequiredAttributeNametest sourcelib.choir.src.core.interfaces.opstest: OperationInfo inherent attribut...ir.OperationInfohasInherentAttributeNameir.OperationInfoaddInherentAttributeName
Static calls · unresolved targets: 2 · external targets: 2.
Called byCallsNo direct callersir.OperationInfoaddInherentAttributeNameir.OperationInfoaddInherentAttributeNames
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callersprivate sourcelib.choir.src.core.interfaces.base.InterfaceE...insertir.OperationInfoaddInterface
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callersprivate sourcelib.choir.src.core.interfaces.ops.OperationInfoaddTypeConstraintir.OperationInfoaddOperandTypeConstraint
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callersprivate sourcelib.choir.src.core.interfaces.base.InterfaceE...insertOrReplaceir.OperationInfoaddOrReplaceInterface
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsir.OperationInfoaddRequiredAttributeNamesir.OperationInfoaddInherentAttributeNameir.OperationInfohasInherentAttributeNameir.OperationInfohasRequiredAttributeNameir.OperationInfoaddRequiredAttributeName
Static calls · unresolved targets: 2 · external targets: 2.
Called byCallsNo direct callersir.OperationInfoaddRequiredAttributeNameir.OperationInfoaddRequiredAttributeNames
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callersprivate sourcelib.choir.src.core.interfaces.ops.OperationInfoaddTypeConstraintir.OperationInfoaddResultTypeConstraint
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallstest sourcelib.choir.src.core.interfaces.opstest: OperationInfo dynamic traitsprivate sourcelib.choir.src.core.interfaces.traits.TraitIdsinsertir.OperationInfoaddTrait
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallstest sourcelib.choir.src.core.interfaces.opstest: OperationInfo dynamic traitstest sourcelib.choir.src.core.interfaces.opstest: OperationInfo inherent attribut...test sourcelib.choir.src.core.interfaces.opstest: OperationInfo segment registrat...test sourcelib.choir.src.core.interfaces.opstest: OperationInfo with traitsprivate sourcelib.choir.src.core.interfaces.base.InterfaceE...deinitprivate sourcelib.choir.src.core.interfaces.opsfreeSegmentSpecprivate sourcelib.choir.src.core.interfaces.traits.TraitIdsdeinitir.OperationInfodeinit
Static calls · unresolved targets: 2 · external targets: 2.
Called byCallsNo direct callersprivate sourcelib.choir.src.core.interfaces.traits.TraitIdsvaluesir.OperationInfogetDynamicTraitIds
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callstest sourcelib.choir.src.core.interfaces.opstest: OperationInfo inherent attribut...ir.OperationInfogetInherentAttributeNames
Static calls · unresolved targets: 1 · external targets: 0.
Called byCallsir.OperationInfohasInterfaceprivate sourcelib.choir.src.core.interfaces.base.InterfaceE...getir.OperationInfogetInterface
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callersprivate sourcelib.choir.src.core.interfaces.base.InterfaceE...countir.OperationInfogetNumInterfaces
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callstest sourcelib.choir.src.core.interfaces.opstest: OperationInfo segment registrat...ir.OperationInfogetOperandSegments
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callstest sourcelib.choir.src.core.interfaces.opstest: OperationInfo segment registrat...ir.OperationInfogetResultSegments
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsir.OperationInfoaddInherentAttributeNameir.OperationInfoaddRequiredAttributeNametest sourcelib.choir.src.core.interfaces.opstest: OperationInfo inherent attribut...private sourcelib.choir.src.core.interfaces.ops.OperationInfosortedNameContainsir.OperationInfohasInherentAttributeName
Static calls · unresolved targets: 1 · external targets: 0.
Called byCallsNo direct callersir.OperationInfogetInterfaceir.OperationInfohasInterface
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callstest sourcelib.choir.src.core.interfaces.opstest: OperationInfo rejects incomplet...ir.OperationInfohasPropertiesModel
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsir.OperationInfoaddRequiredAttributeNameprivate sourcelib.choir.src.core.interfaces.ops.OperationInfosortedNameContainsir.OperationInfohasRequiredAttributeName
Static calls · unresolved targets: 1 · external targets: 0.
Called byCallstest sourcelib.choir.src.core.interfaces.opstest: OperationInfo dynamic traitsprivate sourcelib.choir.src.core.interfaces.traits.TraitIdscontainsir.OperationInfohasTraitId
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callstest sourcelib.choir.src.core.interfaces.opstest: OperationInfo dynamic traitstest sourcelib.choir.src.core.interfaces.opstest: OperationInfo inherent attribut...test sourcelib.choir.src.core.interfaces.opstest: OperationInfo rejects incomplet...test sourcelib.choir.src.core.interfaces.opstest: OperationInfo segment registrat...test sourcelib.choir.src.core.interfaces.opstest: OperationInfo shape registratio...test sourcelib.choir.src.core.interfaces.opstest: OperationInfo with traitsir.OperationInfoinit
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallstest sourcelib.choir.src.core.interfaces.opstest: OperationInfo attribute name st...private sourcelib.choir.src.core.interfaces.base.InterfaceE...initInlineprivate sourcelib.choir.src.core.interfaces.ops.OperationInfoinitAttributeNameListprivate sourcelib.choir.src.core.interfaces.traits.TraitIdsinitInlineir.OperationInfoinitEntryStorage
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallstest sourcelib.choir.src.core.interfaces.opstest: OperationInfo segment registrat...private sourcelib.choir.src.core.interfaces.ops.OperationInfosetSegmentSpecir.OperationInfosetOperandSegments
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callstest sourcelib.choir.src.core.interfaces.opstest: OperationInfo rejects incomplet...ir.OperationInfosetPropertiesModel
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallstest sourcelib.choir.src.core.interfaces.opstest: OperationInfo segment registrat...private sourcelib.choir.src.core.interfaces.ops.OperationInfosetSegmentSpecir.OperationInfosetResultSegments
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallstest sourcelib.choir.src.core.interfaces.opstest: OperationInfo shape registratio...ir.OperationShapeeqlir.OperationShapehasConstraintsir.OperationInfosetShape
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callstest sourcelib.choir.src.core.interfaces.opstest: OperationRegistry basic operati...test sourcelib.choir.src.core.interfaces.opstest: OperationRegistry batch cleans ...test sourcelib.choir.src.core.interfaces.opstest: OperationRegistry batch preserv...test sourcelib.choir.src.core.interfaces.opstest: OperationRegistry batches exact...test sourcelib.choir.src.core.interfaces.opstest: OperationRegistry cleans a shar...+2 moreir.OperationRegistrycount
Static calls · unresolved targets: 0 · external targets: 1.
Called byCallstest sourcelib.choir.src.core.interfaces.opstest: OperationRegistry basic operati...test sourcelib.choir.src.core.interfaces.opstest: OperationRegistry batch cleans ...test sourcelib.choir.src.core.interfaces.opstest: OperationRegistry batch preserv...test sourcelib.choir.src.core.interfaces.opstest: OperationRegistry batches exact...test sourcelib.choir.src.core.interfaces.opstest: OperationRegistry cleans a shar...+7 moreprivate sourcelib.choir.src.core.interfaces.ops.OperationRe...findBatchRegionLinkir.OperationRegistrydeinit
Static calls · unresolved targets: 2 · external targets: 4.
Called byCallsir.OperationRegistryregisterInherentAttributeNameir.OperationRegistryregisterInherentAttributeNamesir.OperationRegistryregisterInterfaceir.OperationRegistryregisterOperandSegmentsir.OperationRegistryregisterOperandTypeConstraint+13 moreir.OperationRegistrygetOrCreateTrackedir.OperationRegistrygetOrCreate
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callstest sourcelib.choir.src.core.interfaces.opstest: OperationRegistry batch cleans ...test sourcelib.choir.src.core.interfaces.opstest: OperationRegistry batch preserv...test sourcelib.choir.src.core.interfaces.opstest: OperationRegistry batches exact...ir.OperationRegistrygetOrCreateOperationBatch
Static calls · unresolved targets: 4 · external targets: 4.
Called byCallsir.OperationRegistrygetOrCreatetest sourcelib.choir.src.core.interfaces.opstest: OperationRegistry co-owns each ...ir.OperationRegistrygetOrCreateTrackedWithAttributeNameCa...ir.OperationRegistrygetOrCreateTracked
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callsir.OperationRegistrygetOrCreateTrackedtest sourcelib.choir.src.core.interfaces.opstest: OperationRegistry co-owns each ...ir.OperationRegistrygetOrCreateTrackedWithAttributeNameCa...
Static calls · unresolved targets: 3 · external targets: 1.
Called byCallsNo direct callstest sourcelib.choir.src.core.interfaces.opstest: OperationRegistry basic operati...test sourcelib.choir.src.core.interfaces.opstest: OperationRegistry batch cleans ...test sourcelib.choir.src.core.interfaces.opstest: OperationRegistry batch preserv...test sourcelib.choir.src.core.interfaces.opstest: OperationRegistry batches exact...test sourcelib.choir.src.core.interfaces.opstest: OperationRegistry cleans a shar...+7 moreir.OperationRegistryinit
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callstest sourcelib.choir.src.core.interfaces.opstest: OperationRegistry basic operati...test sourcelib.choir.src.core.interfaces.opstest: OperationRegistry batch preserv...test sourcelib.choir.src.core.interfaces.opstest: OperationRegistry batches exact...test sourcelib.choir.src.core.interfaces.opstest: OperationRegistry multiple oper...test sourcelib.choir.src.core.interfaces.opstest: OperationRegistry registerInher...+3 moreir.OperationRegistrylookup
Static calls · unresolved targets: 1 · external targets: 0.
Called byCallstest sourcelib.choir.src.core.interfaces.opstest: OperationRegistry registerInher...ir.OperationRegistrygetOrCreateir.OperationRegistryregisterInherentAttributeName
Static calls · unresolved targets: 0 · external targets: 1.
Called byCallsNo direct callersir.OperationRegistrygetOrCreateir.OperationRegistryregisterInherentAttributeNames
Static calls · unresolved targets: 0 · external targets: 1.
Called byCallstest sourcelib.choir.src.core.interfaces.opstest: OperationRegistry registerInter...ir.OperationRegistrygetOrCreateir.OperationRegistryregisterInterface
Static calls · unresolved targets: 0 · external targets: 1.
Called byCallsNo direct callersir.OperationRegistrygetOrCreateir.OperationRegistryregisterOperandSegments
Static calls · unresolved targets: 0 · external targets: 1.
Called byCallsNo direct callersir.OperationRegistrygetOrCreateir.OperationRegistryregisterOperandTypeConstraint
Static calls · unresolved targets: 0 · external targets: 1.
Called byCallstest sourcelib.choir.src.core.interfaces.opstest: OperationRegistry multiple oper...test sourcelib.choir.src.core.interfaces.opstest: OperationRegistry registerOpera...ir.OperationRegistrygetOrCreateir.OperationRegistryregisterOperation
Static calls · unresolved targets: 0 · external targets: 1.
Called byCallstest sourcelib.choir.src.core.interfaces.opstest: OperationRegistry registerOrRep...ir.OperationRegistrygetOrCreateir.OperationRegistryregisterOrReplaceInterface
Static calls · unresolved targets: 0 · external targets: 1.
Called byCallsNo direct callersir.OperationRegistrygetOrCreateir.OperationRegistryregisterPropertiesModel
Static calls · unresolved targets: 0 · external targets: 1.
Called byCallsNo direct callersir.OperationRegistrygetOrCreateir.OperationRegistryregisterRequiredAttributeName
Static calls · unresolved targets: 0 · external targets: 1.
Called byCallsNo direct callersir.OperationRegistrygetOrCreateir.OperationRegistryregisterResultSegments
Static calls · unresolved targets: 0 · external targets: 1.
Called byCallsNo direct callersir.OperationRegistrygetOrCreateir.OperationRegistryregisterResultTypeConstraint
Static calls · unresolved targets: 0 · external targets: 1.
Called byCallsNo direct callersir.OperationRegistrygetOrCreateir.OperationRegistryregisterShape
Static calls · unresolved targets: 0 · external targets: 1.
Called byCallsNo direct callersir.OperationRegistrygetOrCreateir.OperationRegistryregisterTrait
Static calls · unresolved targets: 0 · external targets: 1.
Called byCallstest sourcelib.choir.src.core.interfaces.opstest: OperationRegistry batches exact...test sourcelib.choir.src.core.interfaces.opstest: OperationRegistry co-owns each ...private sourcelib.choir.src.core.interfaces.ops.OperationRe...batchRegionHasLiveInfoprivate sourcelib.choir.src.core.interfaces.ops.OperationRe...findBatchRegionLinkir.OperationRegistryremoveOperation
Static calls · unresolved targets: 2 · external targets: 2.
Called byCallsNo direct callsir.OperationInfosetShapeir.OperationShapeeql
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsir.OperationInfosetShapeir.CountRangehasConstraintir.OperationShapehasConstraints
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callstest sourcelib.choir.src.core.interfaces.traitstest: OperationTraits mergeir.OperationTraitsmerge
Static calls · unresolved targets: 0 · external targets: 0.

Source: lib/choir/src/core/interfaces/traits.zig:4

zig
pub const TraitId = u64;
Called byCallsNo direct callstest sourcelib.choir.src.core.interfaces.traitstest: TraitRegistry register and look...ir.TraitRegistrycount
Static calls · unresolved targets: 0 · external targets: 1.
Called byCallsNo direct callstest sourcelib.choir.src.core.interfaces.traitstest: TraitRegistry register and look...ir.TraitRegistrydeinit
Static calls · unresolved targets: 0 · external targets: 1.
Called byCallsNo direct callstest sourcelib.choir.src.core.interfaces.traitstest: TraitRegistry register and look...ir.TraitRegistryinit
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callstest sourcelib.choir.src.core.interfaces.traitstest: TraitRegistry register and look...ir.TraitRegistrylookup
Static calls · unresolved targets: 1 · external targets: 0.
Called byCallsNo direct callstest sourcelib.choir.src.core.interfaces.traitstest: TraitRegistry register and look...ir.TraitRegistryregister
Static calls · unresolved targets: 0 · external targets: 1.

Source: lib/choir/src/core/interfaces/traits.zig:6

zig
pub fn traitId(comptime name: []const u8) TraitId {    return std.hash.Wyhash.hash(0, name);}
Called byCallsNo direct callstest sourcelib.choir.src.core.interfaces.traitstest: TraitRegistry register and look...test sourcelib.choir.src.core.interfaces.traitstest: traitId produces stable hashesirtraitId
Static calls · unresolved targets: 0 · external targets: 0.

Source: lib/choir/src/core/interfaces/traits.zig:10

zig
pub fn traitIdRuntime(name: []const u8) TraitId {    return std.hash.Wyhash.hash(0, name);}
Called byCallsNo direct callstest sourcelib.choir.src.core.interfaces.traitstest: traitId produces stable hashesirtraitIdRuntime
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callersprivate sourcelib.choir.src.core.interfaces.base.InterfaceE...insertir.TypeInfoaddInterface
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callersprivate sourcelib.choir.src.core.interfaces.base.InterfaceE...insertOrReplaceir.TypeInfoaddOrReplaceInterface
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callersprivate sourcelib.choir.src.core.interfaces.base.InterfaceE...deinitir.TypeInfodeinit
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsir.TypeInfohasInterfaceprivate sourcelib.choir.src.core.interfaces.base.InterfaceE...getir.TypeInfogetInterface
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callersprivate sourcelib.choir.src.core.interfaces.base.InterfaceE...countir.TypeInfogetNumInterfaces
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callersir.TypeInfogetInterfaceir.TypeInfohasInterface
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callsprivate sourcelib.choir.src.core.interfaces.types.TypeRegistrygetOrCreateBatchir.TypeInfoinit
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callstest sourcelib.choir.src.core.interfaces.typestest: TypeRegistry cleans a shared en...test sourcelib.choir.src.core.interfaces.typestest: TypeRegistry co-owns a named ba...test sourcelib.choir.src.core.interfaces.typestest: TypeRegistry co-owns each heade...test sourcelib.choir.src.core.interfaces.typestest: TypeRegistry named batch preser...test sourcelib.choir.src.core.interfaces.typestest: TypeRegistry named batch preser...test sourcelib.choir.src.core.interfaces.typestest: TypeRegistry releases a batch a...ir.TypeRegistrycount
Static calls · unresolved targets: 0 · external targets: 1.
Called byCallstest sourcelib.choir.src.core.interfaces.typestest: TypeRegistry basic usagetest sourcelib.choir.src.core.interfaces.typestest: TypeRegistry cleans a shared en...test sourcelib.choir.src.core.interfaces.typestest: TypeRegistry co-owns a named ba...test sourcelib.choir.src.core.interfaces.typestest: TypeRegistry co-owns each heade...test sourcelib.choir.src.core.interfaces.typestest: TypeRegistry named batch preser...+3 moreprivate sourcelib.choir.src.core.interfaces.types.TypeRegistryfindBatchRegionLinkir.TypeRegistrydeinit
Static calls · unresolved targets: 2 · external targets: 4.
Called byCallsir.TypeRegistryregisterInterfaceir.TypeRegistryregisterOrReplaceInterfaceir.TypeRegistryregisterTypetest sourcelib.choir.src.core.interfaces.typestest: TypeRegistry cleans a shared en...test sourcelib.choir.src.core.interfaces.typestest: TypeRegistry co-owns a named ba...+2 moreir.TypeRegistrygetOrCreateTrackedir.TypeRegistrygetOrCreate
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallstest sourcelib.choir.src.core.interfaces.typestest: TypeRegistry co-owns a named ba...test sourcelib.choir.src.core.interfaces.typestest: TypeRegistry named batch preser...test sourcelib.choir.src.core.interfaces.typestest: TypeRegistry named batch preser...test sourcelib.choir.src.core.interfaces.typestest: TypeRegistry releases a batch a...private sourcelib.choir.src.core.interfaces.types.TypeRegistrygetOrCreateBatchir.TypeRegistrygetOrCreateNamedBatch
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callsir.TypeRegistrygetOrCreatetest sourcelib.choir.src.core.interfaces.typestest: TypeRegistry co-owns each heade...ir.TypeRegistrygetOrCreateTracked
Static calls · unresolved targets: 3 · external targets: 1.
Called byCallsNo direct callstest sourcelib.choir.src.core.interfaces.typestest: TypeRegistry basic usagetest sourcelib.choir.src.core.interfaces.typestest: TypeRegistry cleans a shared en...test sourcelib.choir.src.core.interfaces.typestest: TypeRegistry co-owns a named ba...test sourcelib.choir.src.core.interfaces.typestest: TypeRegistry co-owns each heade...test sourcelib.choir.src.core.interfaces.typestest: TypeRegistry named batch preser...+3 moreir.TypeRegistryinit
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callstest sourcelib.choir.src.core.interfaces.typestest: TypeRegistry basic usagetest sourcelib.choir.src.core.interfaces.typestest: TypeRegistry co-owns a named ba...test sourcelib.choir.src.core.interfaces.typestest: TypeRegistry named batch preser...test sourcelib.choir.src.core.interfaces.typestest: TypeRegistry named batch preser...test sourcelib.choir.src.core.interfaces.typestest: TypeRegistry releases a batch a...test sourcelib.choir.src.core.interfaces.typestest: TypeRegistry stable pointersir.TypeRegistrylookup
Static calls · unresolved targets: 1 · external targets: 0.
Called byCallstest sourcelib.choir.src.core.interfaces.typestest: TypeRegistry basic usagetest sourcelib.choir.src.core.interfaces.typestest: TypeRegistry releases a batch a...ir.TypeRegistrygetOrCreateir.TypeRegistryregisterInterface
Static calls · unresolved targets: 0 · external targets: 1.
Called byCallsNo direct callersir.TypeRegistrygetOrCreateir.TypeRegistryregisterOrReplaceInterface
Static calls · unresolved targets: 0 · external targets: 1.
Called byCallstest sourcelib.choir.src.core.interfaces.typestest: TypeRegistry basic usageir.TypeRegistrygetOrCreateir.TypeRegistryregisterType
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallstest sourcelib.choir.src.core.interfaces.typestest: TypeRegistry co-owns each heade...test sourcelib.choir.src.core.interfaces.typestest: TypeRegistry named batch preser...test sourcelib.choir.src.core.interfaces.typestest: TypeRegistry releases a batch a...private sourcelib.choir.src.core.interfaces.types.TypeRegistrybatchRegionHasLiveInfoprivate sourcelib.choir.src.core.interfaces.types.TypeRegistryfindBatchRegionLinkir.TypeRegistryremoveType
Static calls · unresolved targets: 2 · external targets: 2.

Source: lib/choir/src/core/interfaces/root.zig

zig
const base = @import("base.zig");const traits = @import("traits.zig");const attrs = @import("attrs.zig");const ops = @import("ops.zig");const types = @import("types.zig");const entry = @import("entry.zig");pub const InlineList = entry.InlineList;pub const ContextOpaque = base.ContextOpaque;pub const castContext = base.castContext;pub const InterfaceId = base.InterfaceId;pub const interfaceId = base.interfaceId;pub const interfaceIdRuntime = base.interfaceIdRuntime;pub const InterfaceEntry = base.InterfaceEntry;pub const TypeParamPayload = base.TypeParamPayload;pub const TraitId = traits.TraitId;pub const traitId = traits.traitId;pub const traitIdRuntime = traits.traitIdRuntime;pub const OperationTraits = traits.OperationTraits;pub const TraitVTable = traits.TraitVTable;pub const TraitEntry = traits.TraitEntry;pub const TraitRegistry = traits.TraitRegistry;pub const AbstractAttribute = attrs.AbstractAttribute;pub const AttributeEqualInterface = attrs.AttributeEqualInterface;pub const AttributePrintInterface = attrs.AttributePrintInterface;pub const AttributeArrayInterface = attrs.AttributeArrayInterface;pub const SymbolUserAttrInterface = attrs.SymbolUserAttrInterface;pub const AttributeRegistry = attrs.AttributeRegistry;pub const OperationInfo = ops.OperationInfo;pub const CountRange = ops.CountRange;pub const OperationShape = ops.OperationShape;pub const OperationSegmentSpec = ops.OperationSegmentSpec;pub const OperationTypeConstraint = ops.OperationTypeConstraint;pub const OperationPropertiesModel = ops.OperationPropertiesModel;pub const singleAttributePropertiesModel = ops.singleAttributePropertiesModel;pub const OperationRegistry = ops.OperationRegistry;pub const CseOpInterface = ops.CseOpInterface;pub const SymbolOpInterface = ops.SymbolOpInterface;pub const SymbolUserOpInterface = ops.SymbolUserOpInterface;pub const CallOpInterface = ops.CallOpInterface;pub const FunctionOpInterface = ops.FunctionOpInterface;pub const RegionKind = ops.RegionKind;pub const RegionKindInterface = ops.RegionKindInterface;pub const ControlFlowInterface = ops.ControlFlowInterface;pub const InferTypeOpInterface = ops.InferTypeOpInterface;pub const FoldResult = ops.FoldResult;pub const FoldResults = ops.FoldResults;pub const FoldOpInterface = ops.FoldOpInterface;pub const DiagnosticKind = ops.DiagnosticKind;pub const EvalError = ops.EvalError;pub const EvalContext = ops.EvalContext;pub const Evaluatable = ops.Evaluatable;pub const YieldOpInterface = ops.YieldOpInterface;pub const HandlerEntryOpInterface = ops.HandlerEntryOpInterface;pub const TranslationDialectInterface = ops.TranslationDialectInterface;pub const TypeInfo = types.TypeInfo;pub const TypeRegistry = types.TypeRegistry;pub const TypePrintInterface = types.TypePrintInterface;pub const TypeVerifyInterface = types.TypeVerifyInterface;pub const TypeParamInterface = types.TypeParamInterface;pub const ShapedTypeInterface = types.ShapedTypeInterface;pub const effects = @import("effects.zig");pub const EffectOpInterface = effects.EffectOpInterface;

Source: lib/choir/src/core/root.zig:63

zig
pub const interfaces = @import("interfaces/root.zig");

Also reachable as

backends.wasm.emission.module_encoding.common.ir.interfaces.

Complete caller list for ir.interfaceId

20 direct callers.

Complete caller list for ir.OperationRegistry.count

7 direct callers.

Complete caller list for ir.OperationRegistry.deinit

12 direct callers.

Complete caller list for ir.OperationRegistry.getOrCreate

18 direct callers.

Complete caller list for ir.OperationRegistry.init

12 direct callers.

Complete caller list for ir.OperationRegistry.lookup

8 direct callers.

Complete caller list for ir.TypeRegistry.deinit

8 direct callers.

Complete caller list for ir.TypeRegistry.getOrCreate

7 direct callers.

Complete caller list for ir.TypeRegistry.init

8 direct callers.

Audit

Definitions167
Public names626
Members117
Version26.7.0
Revisiondaab053ee433