| author | |
| committer | |
| log | 55bc8a7fa9b820766df2e7625afdd7e88863cc96 |
| tree | f590762b297450451df9a322bea89c7bfa57899f |
| parent | 2e5d13e9cf55ee66c544950b59f8620e626801a7 |
3 files changed, 4 insertions(+), 3 deletions(-)
src/Module.zig+1-1| ... | @@ -6657,7 +6657,7 @@ pub fn structFieldAlignmentExtern(mod: *Module, field_ty: Type) Alignment { | ... | @@ -6657,7 +6657,7 @@ pub fn structFieldAlignmentExtern(mod: *Module, field_ty: Type) Alignment { |
| 6657 | pub fn structPackedFieldBitOffset( | 6657 | pub fn structPackedFieldBitOffset( |
| 6658 | mod: *Module, | 6658 | mod: *Module, |
| 6659 | struct_type: InternPool.Key.StructType, | 6659 | struct_type: InternPool.Key.StructType, |
| 6660 | field_index: usize, | 6660 | field_index: u32, |
| 6661 | ) u16 { | 6661 | ) u16 { |
| 6662 | const ip = &mod.intern_pool; | 6662 | const ip = &mod.intern_pool; |
| 6663 | assert(struct_type.layout == .Packed); | 6663 | assert(struct_type.layout == .Packed); |
src/arch/x86_64/CodeGen.zig+2-1| ... | @@ -11426,7 +11426,8 @@ fn airAggregateInit(self: *Self, inst: Air.Inst.Index) !void { | ... | @@ -11426,7 +11426,8 @@ fn airAggregateInit(self: *Self, inst: Air.Inst.Index) !void { |
| 11426 | .{ .immediate = 0 }, | 11426 | .{ .immediate = 0 }, |
| 11427 | .{ .immediate = result_ty.abiSize(mod) }, | 11427 | .{ .immediate = result_ty.abiSize(mod) }, |
| 11428 | ); | 11428 | ); |
| 11429 | for (elements, 0..) |elem, elem_i| { | 11429 | for (elements, 0..) |elem, elem_i_usize| { |
| 11430 | const elem_i: u32 = @intCast(elem_i_usize); | ||
| 11430 | if ((try result_ty.structFieldValueComptime(mod, elem_i)) != null) continue; | 11431 | if ((try result_ty.structFieldValueComptime(mod, elem_i)) != null) continue; |
| 11431 | 11432 | ||
| 11432 | const elem_ty = result_ty.structFieldType(elem_i, mod); | 11433 | const elem_ty = result_ty.structFieldType(elem_i, mod); |
src/codegen.zig+1-1| ... | @@ -705,7 +705,7 @@ fn lowerParentPtr( | ... | @@ -705,7 +705,7 @@ fn lowerParentPtr( |
| 705 | .Packed => if (mod.typeToStruct(base_type.toType())) |struct_type| | 705 | .Packed => if (mod.typeToStruct(base_type.toType())) |struct_type| |
| 706 | math.divExact(u16, mod.structPackedFieldBitOffset( | 706 | math.divExact(u16, mod.structPackedFieldBitOffset( |
| 707 | struct_type, | 707 | struct_type, |
| 708 | field.index, | 708 | @intCast(field.index), |
| 709 | ), 8) catch |err| switch (err) { | 709 | ), 8) catch |err| switch (err) { |
| 710 | error.UnexpectedRemainder => 0, | 710 | error.UnexpectedRemainder => 0, |
| 711 | error.DivisionByZero => unreachable, | 711 | error.DivisionByZero => unreachable, |