tiny.choir.SymbolTable
Defined in ir.symbols.
API (46)
Actions
Public operations.
Collection.deinitCollection.getSymbolTableCollection.initCollection.invalidateSymbolTableCollection.lookupNearestSymbolFromCollection.lookupNearestSymbolRefFromCollection.lookupSymbolInCollection.lookupSymbolRefInVisibility.fromStringVisibility.toStringbuildFromOperationclearRetainingCapacitycollectSymbolUsescollectSymbolUsesInRegioncollectSymbolUsesInSymbolTablecollectSymbolUsesOfcollectSymbolUsesOfInRegioncollectSymbolUsesOfInSymbolTabledeinitgetNearestSymbolTablegetSymbolNamegetSymbolVisibilityinitisDeclarationisSymbolOperationisSymbolTableOperationiteratorlookuplookupNearestSymbolFromlookupNearestSymbolRefFromlookupSymbolInlookupSymbolRefInrenameSymbolInSymbolTablereplaceAllSymbolUsesInRegionreplaceAllSymbolUsesInSymbolTablesetSymbolNamesetSymbolVisibilitysymbolKnownUseEmptysymbolKnownUseEmptyInRegionsymbolKnownUseEmptyInSymbolTableverifyOperation
Types and contracts
Public types and contracts.
Fields and members
Public fields and members.
Source
Source: lib/choir/src/core/symbols.zig:51
zig
pub const SymbolTable = struct { allocator: std.mem.Allocator, symbols: std.StringHashMapUnmanaged(*Operation), pub const symbol_attr_names = struct { pub const sym_name = "sym_name"; pub const sym_visibility = "sym_visibility"; }; pub const Visibility = enum { public, private, nested, pub fn fromString(value: []const u8) ?Visibility { if (std.mem.eql(u8, value, "public")) return .public; if (std.mem.eql(u8, value, "private")) return .private; if (std.mem.eql(u8, value, "nested")) return .nested; return null; } pub fn toString(self: Visibility) []const u8 { return @tagName(self); } }; pub const Collection = struct { allocator: std.mem.Allocator, tables: std.AutoArrayHashMapUnmanaged(*Operation, SymbolTable) = .empty, pub fn init(allocator: std.mem.Allocator) Collection { return .{ .allocator = allocator }; } pub fn deinit(self: *Collection) void { for (self.tables.values()) |*table| { table.deinit(); } self.tables.deinit(self.allocator); self.tables = .empty; } pub fn getSymbolTable(self: *Collection, op: *Operation) SymbolTableError!*SymbolTable { if (!isSymbolTableOperation(op)) return error.InvalidSymbolTable; const entry = try self.tables.getOrPut(self.allocator, op); if (!entry.found_existing) { entry.value_ptr.* = SymbolTable.init(self.allocator); entry.value_ptr.buildFromOperation(op) catch |err| { entry.value_ptr.deinit(); _ = self.tables.swapRemove(op); return err; }; } return entry.value_ptr; } pub fn invalidateSymbolTable(self: *Collection, op: *Operation) void { if (self.tables.getPtr(op)) |table| { table.deinit(); _ = self.tables.swapRemove(op); } } pub fn lookupSymbolIn( self: *Collection, op: *Operation, name: []const u8, ) SymbolTableError!?*Operation { if (!isSymbolTableOperation(op)) return null; const table = try self.getSymbolTable(op); return table.lookup(name); } pub fn lookupSymbolRefIn( self: *Collection, op: *Operation, symbol_ref: *const Attribute.SymbolRefAttr, ) SymbolTableError!?*Operation { var resolved = try self.lookupSymbolIn(op, symbol_ref.getRootReference()) orelse return null; for (symbol_ref.getNestedReferences()) |nested_ref| { resolved = try self.lookupSymbolIn(resolved, nested_ref) orelse return null; if (getSymbolVisibility(resolved) == .private) return null; } return resolved; } pub fn lookupNearestSymbolFrom( self: *Collection, from: *Operation, name: []const u8, ) SymbolTableError!?*Operation { const table_op = getNearestSymbolTable(from) orelse return null; return self.lookupSymbolIn(table_op, name); } pub fn lookupNearestSymbolRefFrom( self: *Collection, from: *Operation, symbol_ref: *const Attribute.SymbolRefAttr, ) SymbolTableError!?*Operation { const table_op = getNearestSymbolTable(from) orelse return null; return self.lookupSymbolRefIn(table_op, symbol_ref); } }; pub fn init(allocator: std.mem.Allocator) SymbolTable { return .{ .allocator = allocator, .symbols = .{}, }; } pub fn deinit(self: *SymbolTable) void { self.symbols.deinit(self.allocator); } pub fn clearRetainingCapacity(self: *SymbolTable) void { self.symbols.clearRetainingCapacity(); } pub fn lookup(self: *const SymbolTable, name: []const u8) ?*Operation { return self.symbols.get(name); } pub fn iterator(self: *SymbolTable) std.StringHashMapUnmanaged(*Operation).Iterator { return self.symbols.iterator(); } pub fn buildFromOperation(self: *SymbolTable, op: *Operation) SymbolTableError!void { self.clearRetainingCapacity(); if (!isSymbolTableOperation(op)) return error.InvalidSymbolTable; if (op.regions.items.len != 1) return error.InvalidSymbolTable; const region = &op.regions.items[0]; if (region.blocks.size != 1) return error.InvalidSymbolTable; try self.appendFromRegion(region); } fn appendFromRegion(self: *SymbolTable, region: *Region) SymbolTableError!void { const block = region.blocks.front() orelse return; var ops = block.getOperations(); while (ops.next()) |op| { if (getSymbolName(op)) |name| { try self.addSymbol(name, op); } } } fn addSymbol(self: *SymbolTable, name: []const u8, op: *Operation) SymbolTableError!void { const entry = try self.symbols.getOrPut(self.allocator, name); if (entry.found_existing) return error.DuplicateSymbol; entry.value_ptr.* = op; } pub fn isSymbolTableOperation(op: *Operation) bool { return op.getTraits().is_symbol_table; } pub fn isSymbolOperation(op: *Operation) bool { return op.interface(interfaces.SymbolOpInterface) != null; } pub fn verifyOperation(op: *Operation) anyerror!void { var symbol_tables = Collection.init(op.allocator); defer symbol_tables.deinit(); _ = try symbol_tables.getSymbolTable(op); try verifySymbols(op); try verifySymbolUsesInSymbolTable(&symbol_tables, op); } fn verifySymbols(op: *Operation) SymbolTableError!void { if (!isSymbolTableOperation(op)) return error.InvalidSymbolTable; if (op.regions.items.len != 1) return error.InvalidSymbolTable; const region = &op.regions.items[0]; if (region.blocks.size != 1) return error.InvalidSymbolTable; const block = region.blocks.front() orelse return; var ops = block.getOperations(); while (ops.next()) |candidate| { if (!isSymbolOperation(candidate)) continue; if (isDeclaration(candidate) and getSymbolVisibility(candidate) == .public) { return error.InvalidSymbolDeclaration; } } } pub fn lookupSymbolIn(op: *Operation, name: []const u8) ?*Operation { if (!isSymbolTableOperation(op)) return null; if (op.regions.items.len == 0) return null; const region = &op.regions.items[0]; const block = region.blocks.front() orelse return null; var ops = block.getOperations(); while (ops.next()) |candidate| { if (getSymbolName(candidate)) |symbol_name| { if (std.mem.eql(u8, symbol_name, name)) return candidate; } } return null; } pub fn lookupSymbolRefIn(op: *Operation, symbol_ref: *const Attribute.SymbolRefAttr) ?*Operation { var resolved = lookupSymbolIn(op, symbol_ref.getRootReference()) orelse return null; for (symbol_ref.getNestedReferences()) |nested_ref| { resolved = lookupSymbolIn(resolved, nested_ref) orelse return null; if (getSymbolVisibility(resolved) == .private) return null; } return resolved; } pub fn getNearestSymbolTable(from: *Operation) ?*Operation { var current: ?*Operation = from; while (current) |op| { if (isSymbolTableOperation(op)) return op; current = op.getParentOp(); } return null; } pub fn lookupNearestSymbolFrom(from: *Operation, name: []const u8) ?*Operation { const table_op = getNearestSymbolTable(from) orelse return null; return lookupSymbolIn(table_op, name); } pub fn lookupNearestSymbolRefFrom(from: *Operation, symbol_ref: *const Attribute.SymbolRefAttr) ?*Operation { const table_op = getNearestSymbolTable(from) orelse return null; return lookupSymbolRefIn(table_op, symbol_ref); } pub fn collectSymbolUses( allocator: std.mem.Allocator, from: *Operation, ) anyerror!SymbolUseRange { var range = SymbolUseRange{}; errdefer range.deinit(allocator); try appendSymbolUsesFromOperation(allocator, &range, from, null); return range; } pub fn collectSymbolUsesInRegion( allocator: std.mem.Allocator, from: *Region, ) anyerror!SymbolUseRange { var range = SymbolUseRange{}; errdefer range.deinit(allocator); try appendSymbolUsesFromRegion(allocator, &range, from, null); return range; } pub fn collectSymbolUsesInSymbolTable( allocator: std.mem.Allocator, op: *Operation, ) anyerror!SymbolUseRange { if (!isSymbolTableOperation(op)) return error.InvalidSymbolTable; var range = SymbolUseRange{}; errdefer range.deinit(allocator); for (op.regions.items) |*region| { try appendSymbolUsesFromRegion(allocator, &range, region, null); } return range; } pub fn collectSymbolUsesOf( allocator: std.mem.Allocator, from: *Operation, symbol_ref: *const Attribute.SymbolRefAttr, ) anyerror!SymbolUseRange { var range = SymbolUseRange{}; errdefer range.deinit(allocator); try appendSymbolUsesFromOperation(allocator, &range, from, symbol_ref); return range; } pub fn collectSymbolUsesOfInRegion( allocator: std.mem.Allocator, from: *Region, symbol_ref: *const Attribute.SymbolRefAttr, ) anyerror!SymbolUseRange { var range = SymbolUseRange{}; errdefer range.deinit(allocator); try appendSymbolUsesFromRegion(allocator, &range, from, symbol_ref); return range; } pub fn collectSymbolUsesOfInSymbolTable( allocator: std.mem.Allocator, op: *Operation, symbol_ref: *const Attribute.SymbolRefAttr, ) anyerror!SymbolUseRange { if (!isSymbolTableOperation(op)) return error.InvalidSymbolTable; var range = SymbolUseRange{}; errdefer range.deinit(allocator); for (op.regions.items) |*region| { try appendSymbolUsesFromRegion(allocator, &range, region, symbol_ref); } return range; } pub fn symbolKnownUseEmpty( allocator: std.mem.Allocator, from: *Operation, symbol_ref: *const Attribute.SymbolRefAttr, ) anyerror!bool { var uses = try collectSymbolUsesOf(allocator, from, symbol_ref); defer uses.deinit(allocator); return uses.empty(); } pub fn symbolKnownUseEmptyInRegion( allocator: std.mem.Allocator, from: *Region, symbol_ref: *const Attribute.SymbolRefAttr, ) anyerror!bool { var uses = try collectSymbolUsesOfInRegion(allocator, from, symbol_ref); defer uses.deinit(allocator); return uses.empty(); } pub fn symbolKnownUseEmptyInSymbolTable( allocator: std.mem.Allocator, op: *Operation, symbol_ref: *const Attribute.SymbolRefAttr, ) anyerror!bool { var uses = try collectSymbolUsesOfInSymbolTable(allocator, op, symbol_ref); defer uses.deinit(allocator); return uses.empty(); } pub fn replaceAllSymbolUsesInRegion( allocator: std.mem.Allocator, from: *Region, old_ref: *const Attribute.SymbolRefAttr, new_leaf: []const u8, ) anyerror!usize { return replaceSymbolUsesInRegion(allocator, from, old_ref, new_leaf); } pub fn replaceAllSymbolUsesInSymbolTable( allocator: std.mem.Allocator, op: *Operation, old_ref: *const Attribute.SymbolRefAttr, new_leaf: []const u8, ) anyerror!usize { if (!isSymbolTableOperation(op)) return error.InvalidSymbolTable; var replaced: usize = 0; for (op.regions.items) |*region| { replaced += try replaceSymbolUsesInRegion(allocator, region, old_ref, new_leaf); } return replaced; } pub fn renameSymbolInSymbolTable( allocator: std.mem.Allocator, op: *Operation, symbol: *Operation, new_name: []const u8, ) anyerror!usize { if (!isSymbolTableOperation(op)) return error.InvalidSymbolTable; if (symbol.getParentOp() != op) return error.InvalidSymbolTable; const old_name = getSymbolName(symbol) orelse return error.InvalidSymbol; if (std.mem.eql(u8, old_name, new_name)) return 0; if (lookupSymbolIn(op, new_name)) |existing| { if (existing != symbol) return error.DuplicateSymbol; } var symbol_tables = Collection.init(allocator); defer symbol_tables.deinit(); var users = try SymbolUserMap.init(allocator, &symbol_tables, op); defer users.deinit(); const replaced = try users.replaceAllUsesWith(symbol, new_name); try setSymbolName(symbol, new_name); symbol_tables.invalidateSymbolTable(op); return replaced; } pub fn getSymbolName(op: *Operation) ?[]const u8 { const iface = op.interface(interfaces.SymbolOpInterface) orelse return null; return iface.call(.getSymbolName, .{}); } pub fn setSymbolName(op: *Operation, name: []const u8) anyerror!void { const iface = op.interface(interfaces.SymbolOpInterface) orelse return error.InvalidSymbol; try iface.call(.setSymbolName, .{name}); } pub fn isDeclaration(op: *Operation) bool { const iface = op.interface(interfaces.SymbolOpInterface) orelse return false; return iface.call(.isDeclaration, .{}); } pub fn getSymbolVisibility(op: *const Operation) Visibility { const string_attr = op.getAttrAs(Attribute.StringAttr, symbol_attr_names.sym_visibility) orelse return .public; return Visibility.fromString(string_attr.getValue()) orelse .public; } pub fn setSymbolVisibility(op: *Operation, visibility: Visibility) anyerror!void { if (!isSymbolOperation(op)) return error.InvalidSymbol; if (visibility == .public) { if (isDeclaration(op)) return error.InvalidSymbolDeclaration; _ = op.removeAttr(symbol_attr_names.sym_visibility); return; } try op.setAttr( symbol_attr_names.sym_visibility, try op.getContext().getStringAttr(visibility.toString()), ); } fn appendSymbolRefsFromOperation( allocator: std.mem.Allocator, range: *SymbolUseRange, op: *Operation, target_ref: ?*const Attribute.SymbolRefAttr, ) anyerror!void { var attrs = op.getAttrs(); while (attrs.next()) |attr| { try appendSymbolRefsFromAttribute(allocator, range, op, attr.name, attr.value, target_ref); } } fn appendSymbolRefsFromAttribute( allocator: std.mem.Allocator, range: *SymbolUseRange, op: *Operation, attr_name: []const u8, attr: Attribute, target_ref: ?*const Attribute.SymbolRefAttr, ) anyerror!void { if (getSymbolRefAttr(attr)) |symbol_ref| { if (target_ref) |target| { if (!isReferencePrefixOf(target, symbol_ref)) return; } try range.append(allocator, .{ .user = op, .attr_name = attr_name, .symbol_ref = symbol_ref, }); return; } const array_attr = getArrayAttr(attr) orelse return; for (array_attr.values) |child| { try appendSymbolRefsFromAttribute(allocator, range, op, attr_name, child, target_ref); } } fn appendSymbolUsesFromOperation( allocator: std.mem.Allocator, range: *SymbolUseRange, op: *Operation, target_ref: ?*const Attribute.SymbolRefAttr, ) anyerror!void { var state = SymbolUseWalkState{ .allocator = allocator, .range = range, .target_ref = target_ref, }; _ = try op.walk(.{ .order = .pre_order }, &state, SymbolUseWalkState.visit); } fn verifySymbolUsesInSymbolTable(symbol_tables: *Collection, op: *Operation) anyerror!void { if (!isSymbolTableOperation(op)) return error.InvalidSymbolTable; for (op.regions.items) |*region| { try verifySymbolUsesInRegion(symbol_tables, region); } } fn verifySymbolUsesFromOperation(symbol_tables: *Collection, op: *Operation) anyerror!void { var state = VerifySymbolUsesWalkState{ .symbol_tables = symbol_tables }; _ = try op.walk(.{ .order = .pre_order }, &state, VerifySymbolUsesWalkState.visit); } fn verifySymbolUsesOnOperation(symbol_tables: *Collection, op: *Operation) anyerror!void { if (op.interface(interfaces.SymbolUserOpInterface)) |iface| { try iface.call(.verifySymbolUses, .{symbol_tables}); } var attrs = op.getDiscardableAttrs(); while (attrs.next()) |attr| { if (attr.value.interface(interfaces.SymbolUserAttrInterface)) |iface| { try iface.call(.verifySymbolUses, .{ op, symbol_tables }); } } } fn verifySymbolUsesInRegion(symbol_tables: *Collection, region: *Region) anyerror!void { var state = VerifySymbolUsesWalkState{ .symbol_tables = symbol_tables }; _ = try region.walkOperations(.{ .order = .pre_order }, &state, VerifySymbolUsesWalkState.visit); } fn appendSymbolUsesFromRegion( allocator: std.mem.Allocator, range: *SymbolUseRange, region: *Region, target_ref: ?*const Attribute.SymbolRefAttr, ) anyerror!void { var state = SymbolUseWalkState{ .allocator = allocator, .range = range, .target_ref = target_ref, }; _ = try region.walkOperations(.{ .order = .pre_order }, &state, SymbolUseWalkState.visit); } fn replaceSymbolUsesOnOperation( allocator: std.mem.Allocator, op: *Operation, old_ref: *const Attribute.SymbolRefAttr, new_leaf: []const u8, ) anyerror!usize { var replaced: usize = 0; var inline_snapshot: [4]NamedAttribute = undefined; const attr_count = op.getNumAttrs(); const attr_snapshot = if (attr_count <= inline_snapshot.len) inline_snapshot[0..attr_count] else try allocator.alloc(NamedAttribute, attr_count); defer if (attr_count > inline_snapshot.len) allocator.free(attr_snapshot); var attrs = op.getAttrs(); var attr_index: usize = 0; while (attrs.next()) |attr| : (attr_index += 1) { if (attr_index >= attr_snapshot.len) return error.OperationAttributesChanged; attr_snapshot[attr_index] = attr; } if (attr_index != attr_snapshot.len) return error.OperationAttributesChanged; for (attr_snapshot) |attr| { const result = try replaceSymbolUsesInAttribute(allocator, op, old_ref, attr.value, new_leaf); const replacement = result.attr orelse continue; try op.setAttr(attr.name, replacement); replaced += result.replaced; } return replaced; } fn replaceSymbolUsesInAttribute( allocator: std.mem.Allocator, op: *Operation, old_ref: *const Attribute.SymbolRefAttr, attr: Attribute, new_leaf: []const u8, ) anyerror!AttributeReplacement { if (getSymbolRefAttr(attr)) |symbol_ref| { const replacement = try replacementSymbolRefAttr(allocator, op, old_ref, symbol_ref, new_leaf) orelse return .{}; return .{ .attr = replacement, .replaced = 1 }; } const array_attr = getArrayAttr(attr) orelse return .{}; var changed = false; var replaced: usize = 0; const values = try allocator.alloc(Attribute, array_attr.values.len); defer allocator.free(values); for (array_attr.values, 0..) |child, index| { const result = try replaceSymbolUsesInAttribute(allocator, op, old_ref, child, new_leaf); values[index] = result.attr orelse child; if (result.attr != null) changed = true; replaced += result.replaced; } if (!changed) return .{}; return .{ .attr = try op.getContext().getArrayAttr(values), .replaced = replaced, }; } fn replaceSymbolUsesInOperation( allocator: std.mem.Allocator, op: *Operation, old_ref: *const Attribute.SymbolRefAttr, new_leaf: []const u8, ) anyerror!usize { var state = ReplaceSymbolUsesWalkState{ .allocator = allocator, .old_ref = old_ref, .new_leaf = new_leaf, }; _ = try op.walk(.{ .order = .pre_order }, &state, ReplaceSymbolUsesWalkState.visit); return state.replaced; } fn replaceSymbolUsesInRegion( allocator: std.mem.Allocator, region: *Region, old_ref: *const Attribute.SymbolRefAttr, new_leaf: []const u8, ) anyerror!usize { var state = ReplaceSymbolUsesWalkState{ .allocator = allocator, .old_ref = old_ref, .new_leaf = new_leaf, }; _ = try region.walkOperations(.{ .order = .pre_order }, &state, ReplaceSymbolUsesWalkState.visit); return state.replaced; } fn replacementSymbolRefAttr( allocator: std.mem.Allocator, op: *Operation, old_ref: *const Attribute.SymbolRefAttr, current_ref: *const Attribute.SymbolRefAttr, new_leaf: []const u8, ) anyerror!?Attribute { if (!isReferencePrefixOf(old_ref, current_ref)) return null; if (current_ref.getNestedReferences().len == 0) { return try op.getContext().getFlatSymbolRefAttr(new_leaf); } if (old_ref.getNestedReferences().len == 0) { return try op.getContext().getSymbolRefAttr(new_leaf, current_ref.getNestedReferences()); } const nested = try allocator.dupe([]const u8, current_ref.getNestedReferences()); defer allocator.free(nested); nested[old_ref.getNestedReferences().len - 1] = new_leaf; return try op.getContext().getSymbolRefAttr(current_ref.getRootReference(), nested); } fn symbolUsePrefix(use: SymbolUse, nested_len: usize) anyerror!SymbolUse { const attr = if (nested_len == 0) try use.user.getContext().getFlatSymbolRefAttr(use.symbol_ref.getRootReference()) else try use.user.getContext().getSymbolRefAttr( use.symbol_ref.getRootReference(), use.symbol_ref.getNestedReferences()[0..nested_len], ); const symbol_ref = attr.cast(Attribute.SymbolRefAttr).?; return .{ .user = use.user, .attr_name = use.attr_name, .symbol_ref = symbol_ref, }; } fn sameUse(a: SymbolUse, b: SymbolUse) bool { return a.user == b.user and std.mem.eql(u8, a.attr_name, b.attr_name) and symbolRefsEqual(a.symbol_ref, b.symbol_ref); } fn symbolRefsEqual(a: *const Attribute.SymbolRefAttr, b: *const Attribute.SymbolRefAttr) bool { if (a == b) return true; if (!std.mem.eql(u8, a.getRootReference(), b.getRootReference())) return false; const a_nested = a.getNestedReferences(); const b_nested = b.getNestedReferences(); if (a_nested.len != b_nested.len) return false; for (a_nested, b_nested) |a_ref, b_ref| { if (!std.mem.eql(u8, a_ref, b_ref)) return false; } return true; } fn isReferencePrefixOf(prefix: *const Attribute.SymbolRefAttr, symbol_ref: *const Attribute.SymbolRefAttr) bool { if (!std.mem.eql(u8, prefix.getRootReference(), symbol_ref.getRootReference())) return false; const prefix_nested = prefix.getNestedReferences(); const ref_nested = symbol_ref.getNestedReferences(); if (prefix_nested.len > ref_nested.len) return false; for (prefix_nested, 0..) |nested, index| { if (!std.mem.eql(u8, nested, ref_nested[index])) return false; } return true; } fn getSymbolRefAttr(attr: Attribute) ?*const Attribute.SymbolRefAttr { if (!std.mem.eql(u8, attr.abstract.name, attribute.builtin_attr_names.symbol_ref)) return null; return attr.cast(Attribute.SymbolRefAttr); } fn getArrayAttr(attr: Attribute) ?*const Attribute.ArrayAttr { if (!std.mem.eql(u8, attr.abstract.name, attribute.builtin_attr_names.array)) return null; return attr.cast(Attribute.ArrayAttr); }};Source: lib/choir/src/root.zig:53
zig
pub const SymbolTable = ir.SymbolTable;Also reachable as
backends.wasm.emission.module_encoding.common.ir.SymbolTable, backends.wasm.emission.module_encoding.common.ir.symbols.SymbolTable, ir.SymbolTable.
Complete caller list for SymbolTable.Collection.deinit
8 direct callers.
lib.choir.src.backends.regalloc.interval.test_candidate_collection_preserves_order_and_indexes_values[function] — test source atlib/choir/src/backends/regalloc/interval.zig:518in nearest public ownertiny.choir.backends.regalloc.intervaltiny.choir.SymbolTable.renameSymbolInSymbolTable[function] atlib/choir/src/core/symbols.zig:400tiny.choir.SymbolTable.verifyOperation[function] atlib/choir/src/core/symbols.zig:213lib.choir.src.core.symbols.test_SymbolTable.Collection_caches_tables_until_invalidated[function] — test source atlib/choir/src/core/symbols.zig:1179in nearest public ownertiny.choir.ir.symbolslib.choir.src.core.symbols.test_SymbolTable.Collection_resolves_nested_symbol_references[function] — test source atlib/choir/src/core/symbols.zig:1220in nearest public ownertiny.choir.ir.symbolslib.choir.src.core.symbols.test_SymbolTable.UserMap_records_and_replaces_nested_symbol_users[function] — test source atlib/choir/src/core/symbols.zig:1349in nearest public ownertiny.choir.ir.symbolslib.choir.src.core.symbols.test_SymbolTable.UserMap_replaces_known_flat_symbol_users[function] — test source atlib/choir/src/core/symbols.zig:1261in nearest public ownertiny.choir.ir.symbolslib.choir.src.core.symbols.test_SymbolTable_renames_symbols_through_array_symbol_reference_attributes[function] — test source atlib/choir/src/core/symbols.zig:1676in nearest public ownertiny.choir.ir.symbols
Complete caller list for SymbolTable.Collection.init
7 direct callers.
tiny.choir.SymbolTable.renameSymbolInSymbolTable[function] atlib/choir/src/core/symbols.zig:400tiny.choir.SymbolTable.verifyOperation[function] atlib/choir/src/core/symbols.zig:213lib.choir.src.core.symbols.test_SymbolTable.Collection_caches_tables_until_invalidated[function] — test source atlib/choir/src/core/symbols.zig:1179in nearest public ownertiny.choir.ir.symbolslib.choir.src.core.symbols.test_SymbolTable.Collection_resolves_nested_symbol_references[function] — test source atlib/choir/src/core/symbols.zig:1220in nearest public ownertiny.choir.ir.symbolslib.choir.src.core.symbols.test_SymbolTable.UserMap_records_and_replaces_nested_symbol_users[function] — test source atlib/choir/src/core/symbols.zig:1349in nearest public ownertiny.choir.ir.symbolslib.choir.src.core.symbols.test_SymbolTable.UserMap_replaces_known_flat_symbol_users[function] — test source atlib/choir/src/core/symbols.zig:1261in nearest public ownertiny.choir.ir.symbolslib.choir.src.core.symbols.test_SymbolTable_renames_symbols_through_array_symbol_reference_attributes[function] — test source atlib/choir/src/core/symbols.zig:1676in nearest public ownertiny.choir.ir.symbols
Complete caller list for SymbolTable.isSymbolTableOperation
16 direct callers.
lib.choir.src.core.symbols.NestedSymbolTableWalkState.visit[method] — private source atlib/choir/src/core/symbols.zig:887in nearest public ownertiny.choir.ir.symbolslib.choir.src.core.symbols.ReplaceSymbolUsesWalkState.visit[method] — private source atlib/choir/src/core/symbols.zig:922in nearest public ownertiny.choir.ir.symbolstiny.choir.SymbolTable.Collection.getSymbolTable[method] atlib/choir/src/core/symbols.zig:93tiny.choir.SymbolTable.Collection.lookupSymbolIn[method] atlib/choir/src/core/symbols.zig:115tiny.choir.SymbolTable.buildFromOperation[method] atlib/choir/src/core/symbols.zig:180tiny.choir.SymbolTable.collectSymbolUsesInSymbolTable[function] atlib/choir/src/core/symbols.zig:298tiny.choir.SymbolTable.collectSymbolUsesOfInSymbolTable[function] atlib/choir/src/core/symbols.zig:333tiny.choir.SymbolTable.getNearestSymbolTable[function] atlib/choir/src/core/symbols.zig:259tiny.choir.SymbolTable.lookupSymbolIn[function] atlib/choir/src/core/symbols.zig:236tiny.choir.SymbolTable.renameSymbolInSymbolTable[function] atlib/choir/src/core/symbols.zig:400tiny.choir.SymbolTable.replaceAllSymbolUsesInSymbolTable[function] atlib/choir/src/core/symbols.zig:386lib.choir.src.core.symbols.SymbolTable.verifySymbolUsesInSymbolTable[function] — private source atlib/choir/src/core/symbols.zig:509in nearest public ownertiny.choir.ir.symbolslib.choir.src.core.symbols.SymbolTable.verifySymbols[function] — private source atlib/choir/src/core/symbols.zig:221in nearest public ownertiny.choir.ir.symbolslib.choir.src.core.symbols.SymbolUseWalkState.visit[method] — private source atlib/choir/src/core/symbols.zig:899in nearest public ownertiny.choir.ir.symbolstiny.choir.ir.SymbolUserMap.init[function] atlib/choir/src/core/symbols.zig:761lib.choir.src.core.symbols.VerifySymbolUsesWalkState.visit[method] — private source atlib/choir/src/core/symbols.zig:909in nearest public ownertiny.choir.ir.symbols
Complete call list for SymbolTable.renameSymbolInSymbolTable
8 direct calls.
tiny.choir.SymbolTable.Collection.deinit[method] atlib/choir/src/core/symbols.zig:85tiny.choir.SymbolTable.Collection.init[function] atlib/choir/src/core/symbols.zig:81tiny.choir.SymbolTable.Collection.invalidateSymbolTable[method] atlib/choir/src/core/symbols.zig:108tiny.choir.SymbolTable.isSymbolTableOperation[function] atlib/choir/src/core/symbols.zig:205tiny.choir.SymbolTable.lookupSymbolIn[function] atlib/choir/src/core/symbols.zig:236tiny.choir.ir.SymbolUserMap.deinit[method] atlib/choir/src/core/symbols.zig:776tiny.choir.ir.SymbolUserMap.init[function] atlib/choir/src/core/symbols.zig:761tiny.choir.ir.SymbolUserMap.replaceAllUsesWith[method] atlib/choir/src/core/symbols.zig:795
Audit
| Definitions | 44 |
|---|---|
| Public names | 220 |
| Members | 7 |
| Version | 26.7.0 |
| Revision | daab053ee433 |