| ... | ... | @@ -3101,9 +3101,8 @@ pub const Type = extern union { |
| 3101 | 3101 | return Value.Tag.int_i64.create(arena, n); |
| 3102 | 3102 | } |
| 3103 | 3103 | |
| 3104 | | var res = try std.math.big.int.Managed.initSet(arena, 1); |
| 3105 | | try res.shiftLeft(res, info.bits - 1); |
| 3106 | | res.negate(); |
| 3104 | var res = try std.math.big.int.Managed.init(arena); |
| 3105 | try res.setTwosCompIntLimit(.min, info.signedness, info.bits); |
| 3107 | 3106 | |
| 3108 | 3107 | const res_const = res.toConst(); |
| 3109 | 3108 | if (res_const.positive) { |
| ... | ... | @@ -3126,13 +3125,8 @@ pub const Type = extern union { |
| 3126 | 3125 | return Value.Tag.int_u64.create(arena, n); |
| 3127 | 3126 | } |
| 3128 | 3127 | |
| 3129 | | var res = try std.math.big.int.Managed.initSet(arena, 1); |
| 3130 | | try res.shiftLeft(res, info.bits - @boolToInt(info.signedness == .signed)); |
| 3131 | | const one = std.math.big.int.Const{ |
| 3132 | | .limbs = &[_]std.math.big.Limb{1}, |
| 3133 | | .positive = true, |
| 3134 | | }; |
| 3135 | | res.sub(res.toConst(), one) catch unreachable; |
| 3128 | var res = try std.math.big.int.Managed.init(arena); |
| 3129 | try res.setTwosCompIntLimit(.max, info.signedness, info.bits); |
| 3136 | 3130 | |
| 3137 | 3131 | const res_const = res.toConst(); |
| 3138 | 3132 | if (res_const.positive) { |