| ... | ... | @@ -2687,23 +2687,19 @@ pub fn updateComptimeNav(dwarf: *Dwarf, pt: Zcu.PerThread, nav_index: InternPool |
| 2687 | 2687 | }, |
| 2688 | 2688 | }; |
| 2689 | 2689 | try wip_nav.abbrevCode(if (is_comptime) |
| 2690 | | if (has_runtime_bits and has_comptime_state) |
| 2691 | | .struct_field_comptime_runtime_bits_comptime_state |
| 2692 | | else if (has_comptime_state) |
| 2690 | if (has_comptime_state) |
| 2693 | 2691 | .struct_field_comptime_comptime_state |
| 2694 | 2692 | else if (has_runtime_bits) |
| 2695 | 2693 | .struct_field_comptime_runtime_bits |
| 2696 | 2694 | else |
| 2697 | 2695 | .struct_field_comptime |
| 2698 | 2696 | else if (field_init != .none) |
| 2699 | | if (has_runtime_bits and has_comptime_state) |
| 2700 | | .struct_field_default_runtime_bits_comptime_state |
| 2701 | | else if (has_comptime_state) |
| 2697 | if (has_comptime_state) |
| 2702 | 2698 | .struct_field_default_comptime_state |
| 2703 | 2699 | else if (has_runtime_bits) |
| 2704 | 2700 | .struct_field_default_runtime_bits |
| 2705 | 2701 | else |
| 2706 | | .struct_field_default |
| 2702 | .struct_field |
| 2707 | 2703 | else |
| 2708 | 2704 | .struct_field); |
| 2709 | 2705 | if (loaded_struct.fieldName(ip, field_index).unwrap()) |field_name| try wip_nav.strp(field_name.toSlice(ip)) else { |
| ... | ... | @@ -2717,8 +2713,10 @@ pub fn updateComptimeNav(dwarf: *Dwarf, pt: Zcu.PerThread, nav_index: InternPool |
| 2717 | 2713 | try uleb128(diw, loaded_struct.fieldAlign(ip, field_index).toByteUnits() orelse |
| 2718 | 2714 | field_type.abiAlignment(zcu).toByteUnits().?); |
| 2719 | 2715 | } |
| 2720 | | if (has_runtime_bits) try wip_nav.blockValue(nav_src_loc, .fromInterned(field_init)); |
| 2721 | | if (has_comptime_state) try wip_nav.refValue(.fromInterned(field_init)); |
| 2716 | if (has_comptime_state) |
| 2717 | try wip_nav.refValue(.fromInterned(field_init)) |
| 2718 | else if (has_runtime_bits) |
| 2719 | try wip_nav.blockValue(nav_src_loc, .fromInterned(field_init)); |
| 2722 | 2720 | } |
| 2723 | 2721 | try uleb128(diw, @intFromEnum(AbbrevCode.null)); |
| 2724 | 2722 | } |
| ... | ... | @@ -3363,9 +3361,7 @@ fn updateLazyType( |
| 3363 | 3361 | field_type.comptimeOnly(zcu) and try field_type.onePossibleValue(pt) == null, |
| 3364 | 3362 | }, |
| 3365 | 3363 | }; |
| 3366 | | try wip_nav.abbrevCode(if (has_runtime_bits and has_comptime_state) |
| 3367 | | .struct_field_comptime_runtime_bits_comptime_state |
| 3368 | | else if (has_comptime_state) |
| 3364 | try wip_nav.abbrevCode(if (has_comptime_state) |
| 3369 | 3365 | .struct_field_comptime_comptime_state |
| 3370 | 3366 | else if (has_runtime_bits) |
| 3371 | 3367 | .struct_field_comptime_runtime_bits |
| ... | ... | @@ -3386,8 +3382,10 @@ fn updateLazyType( |
| 3386 | 3382 | try uleb128(diw, field_type.abiAlignment(zcu).toByteUnits().?); |
| 3387 | 3383 | field_byte_offset += field_type.abiSize(zcu); |
| 3388 | 3384 | } |
| 3389 | | if (has_runtime_bits) try wip_nav.blockValue(src_loc, .fromInterned(comptime_value)); |
| 3390 | | if (has_comptime_state) try wip_nav.refValue(.fromInterned(comptime_value)); |
| 3385 | if (has_comptime_state) |
| 3386 | try wip_nav.refValue(.fromInterned(comptime_value)) |
| 3387 | else if (has_runtime_bits) |
| 3388 | try wip_nav.blockValue(src_loc, .fromInterned(comptime_value)); |
| 3391 | 3389 | } |
| 3392 | 3390 | try uleb128(diw, @intFromEnum(AbbrevCode.null)); |
| 3393 | 3391 | }, |
| ... | ... | @@ -3956,23 +3954,19 @@ pub fn updateContainerType(dwarf: *Dwarf, pt: Zcu.PerThread, type_index: InternP |
| 3956 | 3954 | }, |
| 3957 | 3955 | }; |
| 3958 | 3956 | try wip_nav.abbrevCode(if (is_comptime) |
| 3959 | | if (has_runtime_bits and has_comptime_state) |
| 3960 | | .struct_field_comptime_runtime_bits_comptime_state |
| 3961 | | else if (has_comptime_state) |
| 3957 | if (has_comptime_state) |
| 3962 | 3958 | .struct_field_comptime_comptime_state |
| 3963 | 3959 | else if (has_runtime_bits) |
| 3964 | 3960 | .struct_field_comptime_runtime_bits |
| 3965 | 3961 | else |
| 3966 | 3962 | .struct_field_comptime |
| 3967 | 3963 | else if (field_init != .none) |
| 3968 | | if (has_runtime_bits and has_comptime_state) |
| 3969 | | .struct_field_default_runtime_bits_comptime_state |
| 3970 | | else if (has_comptime_state) |
| 3964 | if (has_comptime_state) |
| 3971 | 3965 | .struct_field_default_comptime_state |
| 3972 | 3966 | else if (has_runtime_bits) |
| 3973 | 3967 | .struct_field_default_runtime_bits |
| 3974 | 3968 | else |
| 3975 | | .struct_field_default |
| 3969 | .struct_field |
| 3976 | 3970 | else |
| 3977 | 3971 | .struct_field); |
| 3978 | 3972 | if (loaded_struct.fieldName(ip, field_index).unwrap()) |field_name| try wip_nav.strp(field_name.toSlice(ip)) else { |
| ... | ... | @@ -3986,8 +3980,10 @@ pub fn updateContainerType(dwarf: *Dwarf, pt: Zcu.PerThread, type_index: InternP |
| 3986 | 3980 | try uleb128(diw, loaded_struct.fieldAlign(ip, field_index).toByteUnits() orelse |
| 3987 | 3981 | field_type.abiAlignment(zcu).toByteUnits().?); |
| 3988 | 3982 | } |
| 3989 | | if (has_runtime_bits) try wip_nav.blockValue(ty_src_loc, .fromInterned(field_init)); |
| 3990 | | if (has_comptime_state) try wip_nav.refValue(.fromInterned(field_init)); |
| 3983 | if (has_comptime_state) |
| 3984 | try wip_nav.refValue(.fromInterned(field_init)) |
| 3985 | else if (has_runtime_bits) |
| 3986 | try wip_nav.blockValue(ty_src_loc, .fromInterned(field_init)); |
| 3991 | 3987 | } |
| 3992 | 3988 | try uleb128(diw, @intFromEnum(AbbrevCode.null)); |
| 3993 | 3989 | } |
| ... | ... | @@ -4064,23 +4060,19 @@ pub fn updateContainerType(dwarf: *Dwarf, pt: Zcu.PerThread, type_index: InternP |
| 4064 | 4060 | }, |
| 4065 | 4061 | }; |
| 4066 | 4062 | try wip_nav.abbrevCode(if (is_comptime) |
| 4067 | | if (has_runtime_bits and has_comptime_state) |
| 4068 | | .struct_field_comptime_runtime_bits_comptime_state |
| 4069 | | else if (has_comptime_state) |
| 4063 | if (has_comptime_state) |
| 4070 | 4064 | .struct_field_comptime_comptime_state |
| 4071 | 4065 | else if (has_runtime_bits) |
| 4072 | 4066 | .struct_field_comptime_runtime_bits |
| 4073 | 4067 | else |
| 4074 | 4068 | .struct_field_comptime |
| 4075 | 4069 | else if (field_init != .none) |
| 4076 | | if (has_runtime_bits and has_comptime_state) |
| 4077 | | .struct_field_default_runtime_bits_comptime_state |
| 4078 | | else if (has_comptime_state) |
| 4070 | if (has_comptime_state) |
| 4079 | 4071 | .struct_field_default_comptime_state |
| 4080 | 4072 | else if (has_runtime_bits) |
| 4081 | 4073 | .struct_field_default_runtime_bits |
| 4082 | 4074 | else |
| 4083 | | .struct_field_default |
| 4075 | .struct_field |
| 4084 | 4076 | else |
| 4085 | 4077 | .struct_field); |
| 4086 | 4078 | if (loaded_struct.fieldName(ip, field_index).unwrap()) |field_name| try wip_nav.strp(field_name.toSlice(ip)) else { |
| ... | ... | @@ -4094,8 +4086,10 @@ pub fn updateContainerType(dwarf: *Dwarf, pt: Zcu.PerThread, type_index: InternP |
| 4094 | 4086 | try uleb128(diw, loaded_struct.fieldAlign(ip, field_index).toByteUnits() orelse |
| 4095 | 4087 | field_type.abiAlignment(zcu).toByteUnits().?); |
| 4096 | 4088 | } |
| 4097 | | if (has_runtime_bits) try wip_nav.blockValue(ty_src_loc, .fromInterned(field_init)); |
| 4098 | | if (has_comptime_state) try wip_nav.refValue(.fromInterned(field_init)); |
| 4089 | if (has_comptime_state) |
| 4090 | try wip_nav.refValue(.fromInterned(field_init)) |
| 4091 | else if (has_runtime_bits) |
| 4092 | try wip_nav.blockValue(ty_src_loc, .fromInterned(field_init)); |
| 4099 | 4093 | } |
| 4100 | 4094 | try uleb128(diw, @intFromEnum(AbbrevCode.null)); |
| 4101 | 4095 | } |
| ... | ... | @@ -4680,14 +4674,11 @@ const AbbrevCode = enum { |
| 4680 | 4674 | big_enum_field, |
| 4681 | 4675 | generated_field, |
| 4682 | 4676 | struct_field, |
| 4683 | | struct_field_default, |
| 4684 | 4677 | struct_field_default_runtime_bits, |
| 4685 | 4678 | struct_field_default_comptime_state, |
| 4686 | | struct_field_default_runtime_bits_comptime_state, |
| 4687 | 4679 | struct_field_comptime, |
| 4688 | 4680 | struct_field_comptime_runtime_bits, |
| 4689 | 4681 | struct_field_comptime_comptime_state, |
| 4690 | | struct_field_comptime_runtime_bits_comptime_state, |
| 4691 | 4682 | packed_struct_field, |
| 4692 | 4683 | untagged_union_field, |
| 4693 | 4684 | tagged_union, |
| ... | ... | @@ -4980,15 +4971,6 @@ const AbbrevCode = enum { |
| 4980 | 4971 | .{ .alignment, .udata }, |
| 4981 | 4972 | }, |
| 4982 | 4973 | }, |
| 4983 | | .struct_field_default = .{ |
| 4984 | | .tag = .member, |
| 4985 | | .attrs = &.{ |
| 4986 | | .{ .name, .strp }, |
| 4987 | | .{ .type, .ref_addr }, |
| 4988 | | .{ .data_member_location, .udata }, |
| 4989 | | .{ .alignment, .udata }, |
| 4990 | | }, |
| 4991 | | }, |
| 4992 | 4974 | .struct_field_default_runtime_bits = .{ |
| 4993 | 4975 | .tag = .member, |
| 4994 | 4976 | .attrs = &.{ |
| ... | ... | @@ -5006,18 +4988,7 @@ const AbbrevCode = enum { |
| 5006 | 4988 | .{ .type, .ref_addr }, |
| 5007 | 4989 | .{ .data_member_location, .udata }, |
| 5008 | 4990 | .{ .alignment, .udata }, |
| 5009 | | .{ .ZIG_comptime_default_value, .ref_addr }, |
| 5010 | | }, |
| 5011 | | }, |
| 5012 | | .struct_field_default_runtime_bits_comptime_state = .{ |
| 5013 | | .tag = .member, |
| 5014 | | .attrs = &.{ |
| 5015 | | .{ .name, .strp }, |
| 5016 | | .{ .type, .ref_addr }, |
| 5017 | | .{ .data_member_location, .udata }, |
| 5018 | | .{ .alignment, .udata }, |
| 5019 | | .{ .default_value, .block }, |
| 5020 | | .{ .ZIG_comptime_default_value, .ref_addr }, |
| 4991 | .{ .ZIG_comptime_value, .ref_addr }, |
| 5021 | 4992 | }, |
| 5022 | 4993 | }, |
| 5023 | 4994 | .struct_field_comptime = .{ |
| ... | ... | @@ -5046,16 +5017,6 @@ const AbbrevCode = enum { |
| 5046 | 5017 | .{ .ZIG_comptime_value, .ref_addr }, |
| 5047 | 5018 | }, |
| 5048 | 5019 | }, |
| 5049 | | .struct_field_comptime_runtime_bits_comptime_state = .{ |
| 5050 | | .tag = .member, |
| 5051 | | .attrs = &.{ |
| 5052 | | .{ .const_expr, .flag_present }, |
| 5053 | | .{ .name, .strp }, |
| 5054 | | .{ .type, .ref_addr }, |
| 5055 | | .{ .const_value, .block }, |
| 5056 | | .{ .ZIG_comptime_value, .ref_addr }, |
| 5057 | | }, |
| 5058 | | }, |
| 5059 | 5020 | .packed_struct_field = .{ |
| 5060 | 5021 | .tag = .member, |
| 5061 | 5022 | .attrs = &.{ |