track f64 offsets in Literal (#1190)

This commit is contained in:
Mark Thom
2022-05-04 21:54:46 -06:00
parent 0f502fff84
commit 6030fae685
13 changed files with 163 additions and 71 deletions

View File

@@ -24,7 +24,7 @@ impl From<Literal> for HeapCellValue {
Literal::Rational(bigint_ptr) => {
typed_arena_ptr_as_cell!(bigint_ptr)
}
Literal::Float(f) => HeapCellValue::from(f),
Literal::Float(f) => HeapCellValue::from(f.as_ptr()),
Literal::String(s) => {
if s == atom!("") {
empty_list_as_cell!()
@@ -55,7 +55,7 @@ impl TryFrom<HeapCellValue> for Literal {
Ok(Literal::Fixnum(n))
}
(HeapCellValueTag::F64, f) => {
Ok(Literal::Float(f))
Ok(Literal::Float(f.as_offset()))
}
(HeapCellValueTag::Cons, cons_ptr) => {
match_untyped_arena_ptr!(cons_ptr,