diff options
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; |
