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