diff options
| author | Taylan Kammer <taylan.kammer@gmail.com> | 2026-06-21 23:31:08 +0200 |
|---|---|---|
| committer | Taylan Kammer <taylan.kammer@gmail.com> | 2026-06-21 23:31:08 +0200 |
| commit | af42ac0a082c90b6dfced76cd1ecdf5091e22c7e (patch) | |
| tree | 936dda4883ceb21e5e48c067edda440bf10693d6 /src/zisp/value.zig | |
| parent | b84ed4f563b3536365f7d3cc4d068407e98685b3 (diff) | |
yippie
Diffstat (limited to 'src/zisp/value.zig')
| -rw-r--r-- | src/zisp/value.zig | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/zisp/value.zig b/src/zisp/value.zig index 4ff683a..4ce6cd2 100644 --- a/src/zisp/value.zig +++ b/src/zisp/value.zig @@ -265,15 +265,11 @@ pub const Value = packed union { const ptr_bits: u20 = hi16_tag_ptr; const tag_bits: u20 = @intFromEnum(ht); if (hi20_bits != ptr_bits << 4 | tag_bits) return null; - - // A zero payload value here would actually indicate that the value is - // not a pointer at all, but the Positive cqNaN value; this is totally - // fine, because @ptrFromInt() turns zero into null anyway. return @ptrFromInt(v.bits << 20 >> 16); } /// Checks for a pointer and returns the value and tag separately, or null - /// if this isn't a pointer at all. Could be useful for a dispatch table. + /// if this isn't a pointer or null. Could be useful for a dispatch table. pub fn getPtrAny(v: Value) ?struct { Zptr, HeapType } { const hi16_bits: u16 = @intCast(v.bits >> 48); if (hi16_bits != hi16_tag_ptr) return null; |
