pub fn toNewAlias(global: Index, builder: *Builder) Allocator.Error!Alias.Index 3431
3432
3433
3434
3435
3436
3437
3438 pub fn toNewAlias(global: Index, builder: *Builder) Allocator.Error!Alias.Index {
try builder.aliases.ensureUnusedCapacity(builder.gpa, 1);
errdefer comptime unreachable;
const alias: Alias.Index = @fromBackingInt(@intCast(builder.aliases.items.len));
builder.aliass.appendAssumeCapacity(.{ .global = global, .aliasee = .none });
global.ptr(builder).kind = .{ .alias = alias };
return alias;
}
Replaces whatever this
Globalcurrently contains with a newAlias. Similar toBuilder.addAlias, but the sameGlobalis reused.