| ... | @@ -2672,7 +2672,7 @@ pub const Key = union(enum) { | ... | @@ -2672,7 +2672,7 @@ pub const Key = union(enum) { |
| 2672 | const big_int = int.storage.toBigInt(&buffer); | 2672 | const big_int = int.storage.toBigInt(&buffer); |
| 2673 | | 2673 | |
| 2674 | std.hash.autoHash(&hasher, int.ty); | 2674 | std.hash.autoHash(&hasher, int.ty); |
| 2675 | std.hash.autoHash(&hasher, big_int.positive); | 2675 | std.hash.autoHash(&hasher, big_int.positive or big_int.eqlZero()); |
| 2676 | for (big_int.limbs) |limb| std.hash.autoHash(&hasher, limb); | 2676 | for (big_int.limbs) |limb| std.hash.autoHash(&hasher, limb); |
| 2677 | return hasher.final(); | 2677 | return hasher.final(); |
| 2678 | }, | 2678 | }, |
| ... | @@ -7682,7 +7682,7 @@ pub fn get(ip: *InternPool, gpa: Allocator, io: Io, tid: Zcu.PerThread.Id, key: | ... | @@ -7682,7 +7682,7 @@ pub fn get(ip: *InternPool, gpa: Allocator, io: Io, tid: Zcu.PerThread.Id, key: |
| 7682 | return gop.put(); | 7682 | return gop.put(); |
| 7683 | } else |_| {} | 7683 | } else |_| {} |
| 7684 | | 7684 | |
| 7685 | const tag: Tag = if (big_int.positive) .int_positive else .int_negative; | 7685 | const tag: Tag = if (big_int.positive or big_int.eqlZero()) .int_positive else .int_negative; |
| 7686 | try addInt(ip, gpa, io, tid, int.ty, tag, big_int.limbs); | 7686 | try addInt(ip, gpa, io, tid, int.ty, tag, big_int.limbs); |
| 7687 | }, | 7687 | }, |
| 7688 | inline .u64, .i64 => |x| { | 7688 | inline .u64, .i64 => |x| { |
| ... | @@ -7699,7 +7699,7 @@ pub fn get(ip: *InternPool, gpa: Allocator, io: Io, tid: Zcu.PerThread.Id, key: | ... | @@ -7699,7 +7699,7 @@ pub fn get(ip: *InternPool, gpa: Allocator, io: Io, tid: Zcu.PerThread.Id, key: |
| 7699 | | 7699 | |
| 7700 | var buf: [2]Limb = undefined; | 7700 | var buf: [2]Limb = undefined; |
| 7701 | const big_int = BigIntMutable.init(&buf, x).toConst(); | 7701 | const big_int = BigIntMutable.init(&buf, x).toConst(); |
| 7702 | const tag: Tag = if (big_int.positive) .int_positive else .int_negative; | 7702 | const tag: Tag = if (big_int.positive or big_int.eqlZero()) .int_positive else .int_negative; |
| 7703 | try addInt(ip, gpa, io, tid, int.ty, tag, big_int.limbs); | 7703 | try addInt(ip, gpa, io, tid, int.ty, tag, big_int.limbs); |
| 7704 | }, | 7704 | }, |
| 7705 | } | 7705 | } |