pub fn block(self: *WipFunction, incoming: u32, name: []const u8) Allocator.Error!Block.Index self: *WipFunctionincoming: u32name: []const u86428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439 pub fn block(self: *WipFunction, incoming: u32, name: []const u8) Allocator.Error!Block.Index {
try self.blocks.ensureUnusedCapacity(self.builder.gpa, 1);
const index: Block.Index = @fromBackingInt(@intCast(self.blocks.items.len));
const final_name = if (self.strip) .empty else try self.builder.string(name);
self.blocks.appendAssumeCapacity(.{
.name = final_name,
.incoming = incoming,
.instructions = .empty,
});
return index;
}