| ... | @@ -1113,6 +1113,10 @@ pub const Value = extern union { | ... | @@ -1113,6 +1113,10 @@ pub const Value = extern union { |
| 1113 | .bool_true, | 1113 | .bool_true, |
| 1114 | => return BigIntMutable.init(&space.limbs, 1).toConst(), | 1114 | => return BigIntMutable.init(&space.limbs, 1).toConst(), |
| 1115 | | 1115 | |
| | 1116 | .enum_field_index => { |
| | 1117 | const index = val.castTag(.enum_field_index).?.data; |
| | 1118 | return BigIntMutable.init(&space.limbs, index).toConst(); |
| | 1119 | }, |
| 1116 | .runtime_value => { | 1120 | .runtime_value => { |
| 1117 | const sub_val = val.castTag(.runtime_value).?.data; | 1121 | const sub_val = val.castTag(.runtime_value).?.data; |
| 1118 | return sub_val.toBigIntAdvanced(space, target, opt_sema); | 1122 | return sub_val.toBigIntAdvanced(space, target, opt_sema); |
| ... | @@ -1983,6 +1987,7 @@ pub const Value = extern union { | ... | @@ -1983,6 +1987,7 @@ pub const Value = extern union { |
| 1983 | .variable, | 1987 | .variable, |
| 1984 | => .gt, | 1988 | => .gt, |
| 1985 | | 1989 | |
| | 1990 | .enum_field_index => return std.math.order(lhs.castTag(.enum_field_index).?.data, 0), |
| 1986 | .runtime_value => { | 1991 | .runtime_value => { |
| 1987 | // This is needed to correctly handle hashing the value. | 1992 | // This is needed to correctly handle hashing the value. |
| 1988 | // Checks in Sema should prevent direct comparisons from reaching here. | 1993 | // Checks in Sema should prevent direct comparisons from reaching here. |