aboutsummaryrefslogtreecommitdiff
path: root/src/codegen/spirv/Section.zig
diff options
context:
space:
mode:
authorr00ster91 <r00ster91@proton.me>2022-12-13 22:30:06 +0100
committerr00ster91 <r00ster91@proton.me>2022-12-17 14:11:33 +0100
commitaac2d6b56f32134ea32fb3d984e3fcdfddd8aaf6 (patch)
tree941528727d4d0a5b92f58c0b862f0d5f372b89e0 /src/codegen/spirv/Section.zig
parent7350ea3e2da4d4e6ef5092cd9f0832beef0291d5 (diff)
downloadzig-aac2d6b56f32134ea32fb3d984e3fcdfddd8aaf6.tar.gz
zig-aac2d6b56f32134ea32fb3d984e3fcdfddd8aaf6.zip
std.builtin: rename Type.UnionField and Type.StructField's field_type to type
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;