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

@@ -533,10 +533,17 @@ pub enum Literal {
Fixnum(Fixnum),
Integer(TypedArenaPtr<Integer>),
Rational(TypedArenaPtr<Rational>),
Float(F64Ptr),
Float(F64Offset),
String(Atom),
}
impl From<F64Ptr> for Literal {
#[inline(always)]
fn from(ptr: F64Ptr) -> Literal {
Literal::Float(ptr.as_offset())
}
}
impl fmt::Display for Literal {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match self {