Function ret [src]
Prototype
pub fn ret(self: *WipFunction, val: Value) Allocator.Error!Instruction.Index
Parameters
self: *WipFunction
val: Value
Source
pub fn ret(self: *WipFunction, val: Value) Allocator.Error!Instruction.Index {
assert(val.typeOfWip(self) == self.function.typeOf(self.builder).functionReturn(self.builder));
try self.ensureUnusedExtraCapacity(1, NoExtra, 0);
return try self.addInst(null, .{ .tag = .ret, .data = @intFromEnum(val) });
}