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