block
Function parameters
Parameters
- self:*WipFunction
- incoming:u32
- name:[]const u8
Type definitions in this namespace
Types
Functions in this namespace
Functions
= 16
Values
Source
Implementation
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 = @enumFromInt(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 = .{},
});
return index;
}