aboutsummaryrefslogtreecommitdiff
path: root/src/codegen/spirv/Section.zig
diff options
context:
space:
mode:
authorVeikka Tuominen <git@vexu.eu>2022-12-18 19:33:15 +0200
committerGitHub <noreply@github.com>2022-12-18 19:33:15 +0200
commit40ed6ae8469fd599f0524d294f38365c3bb8a825 (patch)
tree6e37bbb58fef1ca3aae06e65e179dfa017cb7929 /src/codegen/spirv/Section.zig
parente9e804edc899d8392c9f93a19b92be603c26df79 (diff)
parent2a5e1426aa9469fadb78e837d0100d689213b034 (diff)
downloadzig-40ed6ae8469fd599f0524d294f38365c3bb8a825.tar.gz
zig-40ed6ae8469fd599f0524d294f38365c3bb8a825.zip
Merge pull request #13930 from r00ster91/renamings
std.builtin: renamings
Diffstat (limited to 'src/codegen/spirv/Section.zig')
-rw-r--r--src/codegen/spirv/Section.zig14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/codegen/spirv/Section.zig b/src/codegen/spirv/Section.zig
index 768525028e..83f594dcef 100644
--- a/src/codegen/spirv/Section.zig
+++ b/src/codegen/spirv/Section.zig
@@ -116,7 +116,7 @@ fn writeOperands(section: *Section, comptime Operands: type, operands: Operands)
};
inline for (fields) |field| {
- section.writeOperand(field.field_type, @field(operands, field.name));
+ section.writeOperand(field.type, @field(operands, field.name));
}
}
@@ -196,7 +196,7 @@ fn writeContextDependentNumber(section: *Section, operand: spec.LiteralContextDe
fn writeExtendedMask(section: *Section, comptime Operand: type, operand: Operand) void {
var mask: Word = 0;
inline for (@typeInfo(Operand).Struct.fields) |field, bit| {
- switch (@typeInfo(field.field_type)) {
+ switch (@typeInfo(field.type)) {
.Optional => if (@field(operand, field.name) != null) {
mask |= 1 << @intCast(u5, bit);
},
@@ -214,7 +214,7 @@ fn writeExtendedMask(section: *Section, comptime Operand: type, operand: Operand
section.writeWord(mask);
inline for (@typeInfo(Operand).Struct.fields) |field| {
- switch (@typeInfo(field.field_type)) {
+ switch (@typeInfo(field.type)) {
.Optional => |info| if (@field(operand, field.name)) |child| {
section.writeOperands(info.child, child);
},
@@ -230,7 +230,7 @@ fn writeExtendedUnion(section: *Section, comptime Operand: type, operand: Operan
inline for (@typeInfo(Operand).Union.fields) |field| {
if (@field(Operand, field.name) == tag) {
- section.writeOperands(field.field_type, @field(operand, field.name));
+ section.writeOperands(field.type, @field(operand, field.name));
return;
}
}
@@ -250,7 +250,7 @@ fn operandsSize(comptime Operands: type, operands: Operands) usize {
var total: usize = 0;
inline for (fields) |field| {
- total += operandSize(field.field_type, @field(operands, field.name));
+ total += operandSize(field.type, @field(operands, field.name));
}
return total;
@@ -304,7 +304,7 @@ fn extendedMaskSize(comptime Operand: type, operand: Operand) usize {
var total: usize = 0;
var any_set = false;
inline for (@typeInfo(Operand).Struct.fields) |field| {
- switch (@typeInfo(field.field_type)) {
+ switch (@typeInfo(field.type)) {
.Optional => |info| if (@field(operand, field.name)) |child| {
total += operandsSize(info.child, child);
any_set = true;
@@ -326,7 +326,7 @@ fn extendedUnionSize(comptime Operand: type, operand: Operand) usize {
inline for (@typeInfo(Operand).Union.fields) |field| {
if (@field(Operand, field.name) == tag) {
// Add one for the tag itself.
- return 1 + operandsSize(field.field_type, @field(operand, field.name));
+ return 1 + operandsSize(field.type, @field(operand, field.name));
}
}
unreachable;