Zig 0.17.0-dev (Split by item) This is an example of documentation generated by
ZigDoc , an alternative to Zig's built-in
Auto Doc feature. See also
examples in other modes/formats . The project being documented here (as the example) is the Zig standard library.
std › zig › llvm › Builder › WipFunction › WipPhi Public Struct WipPhi Doc Source Public Struct std.zig.llvm.Builder.WipFunction.WipPhi
pub const WipPhi = struct Fields Functions File zig/llvm/Builder.zig: 7141
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163 pub const WipPhi = struct {
block : Block .Index ,
instruction : Instruction .Index ,
pub fn toValue (self : WipPhi ) Value {
return self .instruction .toValue ();
}
pub fn finish (
self : WipPhi ,
vals : []const Value ,
blocks : []const Block .Index ,
wip : *WipFunction ,
) void {
const incoming_len = self .block .ptrConst (wip ).incoming ;
assert (vals .len == incoming_len and blocks .len == incoming_len );
const instruction = wip .instructions .get (@backingInt (self .instruction ));
var extra = wip .extraDataTrail (Instruction .Phi , instruction .data );
for (vals ) |val | assert (val .typeOfWip (wip ) == extra .data .type );
@memcpy (extra .trail .nextMut (incoming_len , Value , wip ), vals );
@memcpy (extra .trail .nextMut (incoming_len , Block .Index , wip ), blocks );
}
}