| author | |
| committer | |
| log | 69bd2c243e23fa2d4df2ec50802bd4b453211bfd |
| tree | 5c20c8cad724fc759437e39ddd5a0bed00d781f1 |
| parent | 7691013d10525ded6e02228cf89db94719bac1c5 |
2 files changed, 5 insertions(+), 11 deletions(-)
src/Sema.zig+3-3| ... | ... | @@ -16852,7 +16852,7 @@ fn beginComptimePtrLoad( |
| 16852 | 16852 | }; |
| 16853 | 16853 | return ComptimePtrLoadKit{ |
| 16854 | 16854 | .root_val = parent.root_val, |
| 16855 | .root_ty = parent.ty, | |
| 16855 | .root_ty = parent.root_ty, | |
| 16856 | 16856 | .val = try parent.val.elemValue(sema.arena, elem_ptr.index), |
| 16857 | 16857 | .ty = elem_ty, |
| 16858 | 16858 | .byte_offset = byte_offset, |
| ... | ... | @@ -16868,7 +16868,7 @@ fn beginComptimePtrLoad( |
| 16868 | 16868 | } |
| 16869 | 16869 | return ComptimePtrLoadKit{ |
| 16870 | 16870 | .root_val = parent.root_val, |
| 16871 | .root_ty = parent.ty, | |
| 16871 | .root_ty = parent.root_ty, | |
| 16872 | 16872 | .val = parent.val, |
| 16873 | 16873 | .ty = parent.ty, |
| 16874 | 16874 | .byte_offset = parent.byte_offset, |
| ... | ... | @@ -16896,7 +16896,7 @@ fn beginComptimePtrLoad( |
| 16896 | 16896 | }; |
| 16897 | 16897 | return ComptimePtrLoadKit{ |
| 16898 | 16898 | .root_val = parent.root_val, |
| 16899 | .root_ty = parent.ty, | |
| 16899 | .root_ty = parent.root_ty, | |
| 16900 | 16900 | .val = try parent.val.fieldValue(sema.arena, field_index), |
| 16901 | 16901 | .ty = parent.ty.structFieldType(field_index), |
| 16902 | 16902 | .byte_offset = byte_offset, |
src/type.zig+2-8| ... | ... | @@ -2170,11 +2170,7 @@ pub const Type = extern union { |
| 2170 | 2170 | .optional_single_mut_pointer, |
| 2171 | 2171 | => { |
| 2172 | 2172 | const child_type = self.cast(Payload.ElemType).?.data; |
| 2173 | if (child_type.zigTypeTag() == .Opaque) { | |
| 2174 | return 1; | |
| 2175 | } else { | |
| 2176 | return child_type.abiAlignment(target); | |
| 2177 | } | |
| 2173 | return child_type.abiAlignment(target); | |
| 2178 | 2174 | }, |
| 2179 | 2175 | |
| 2180 | 2176 | .manyptr_u8, |
| ... | ... | @@ -2188,8 +2184,6 @@ pub const Type = extern union { |
| 2188 | 2184 | const ptr_info = self.castTag(.pointer).?.data; |
| 2189 | 2185 | if (ptr_info.@"align" != 0) { |
| 2190 | 2186 | return ptr_info.@"align"; |
| 2191 | } else if (ptr_info.pointee_type.zigTypeTag() == .Opaque) { | |
| 2192 | return 1; | |
| 2193 | 2187 | } else { |
| 2194 | 2188 | return ptr_info.pointee_type.abiAlignment(target); |
| 2195 | 2189 | } |
| ... | ... | @@ -2246,6 +2240,7 @@ pub const Type = extern union { |
| 2246 | 2240 | .export_options, |
| 2247 | 2241 | .extern_options, |
| 2248 | 2242 | .@"opaque", |
| 2243 | .anyopaque, | |
| 2249 | 2244 | => return 1, |
| 2250 | 2245 | |
| 2251 | 2246 | .fn_noreturn_no_args, // represents machine code; not a pointer |
| ... | ... | @@ -2419,7 +2414,6 @@ pub const Type = extern union { |
| 2419 | 2414 | |
| 2420 | 2415 | .empty_struct, |
| 2421 | 2416 | .void, |
| 2422 | .anyopaque, | |
| 2423 | 2417 | .empty_struct_literal, |
| 2424 | 2418 | .type, |
| 2425 | 2419 | .comptime_int, |