track f64 offsets in Literal (#1190)
This commit is contained in:
@@ -415,7 +415,7 @@ impl Machine {
|
||||
Literal::Fixnum(n)
|
||||
}
|
||||
(HeapCellValueTag::F64, f) => {
|
||||
Literal::Float(f)
|
||||
Literal::Float(f.as_offset())
|
||||
}
|
||||
(HeapCellValueTag::Atom, (atom, arity)) => {
|
||||
debug_assert_eq!(arity, 0);
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -742,7 +742,7 @@ impl MachineState {
|
||||
self.unify_rational(n, nx);
|
||||
}
|
||||
Ok(Term::Literal(_, Literal::Float(n))) => {
|
||||
self.unify_f64(n, nx);
|
||||
self.unify_f64(n.as_ptr(), nx);
|
||||
}
|
||||
Ok(Term::Literal(_, Literal::Integer(n))) => {
|
||||
self.unify_big_int(n, nx);
|
||||
|
||||
Reference in New Issue
Block a user