introduce CutPoint heap tag so that they can be offset by call_continuation/1
This commit is contained in:
@@ -493,6 +493,15 @@ impl Fixnum {
|
||||
.with_f(false)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn as_cutpoint(num: i64) -> Self {
|
||||
Fixnum::new()
|
||||
.with_num(u64::from_ne_bytes(num.to_ne_bytes()) & ((1 << 56) - 1))
|
||||
.with_tag(HeapCellValueTag::CutPoint as u8)
|
||||
.with_m(false)
|
||||
.with_f(false)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn build_with_checked(num: i64) -> Result<Self, OutOfBounds> {
|
||||
const UPPER_BOUND: i64 = (1 << 55) - 1;
|
||||
|
||||
Reference in New Issue
Block a user