[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 16/27: Stack slots can hold a double
From: |
Andy Wingo |
Subject: |
[Guile-commits] 16/27: Stack slots can hold a double |
Date: |
Wed, 11 Nov 2015 11:39:12 +0000 |
wingo pushed a commit to branch master
in repository guile.
commit fc87033bf0fdc5530842cac8942dd1feaefcfd2a
Author: Andy Wingo <address@hidden>
Date: Wed Oct 28 17:47:48 2015 +0000
Stack slots can hold a double
* libguile/frames.h (union scm_vm_stack_element): Add double member.
* libguile/frames.c (scm_frame_local_ref, scm_frame_local_set_x): Wire
up f64 support.
---
libguile/frames.c | 5 +++--
libguile/frames.h | 1 +
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/libguile/frames.c b/libguile/frames.c
index d522e76..48e963a 100644
--- a/libguile/frames.c
+++ b/libguile/frames.c
@@ -262,7 +262,7 @@ SCM_DEFINE (scm_frame_local_ref, "frame-local-ref", 3, 0, 0,
case STACK_ITEM_SCM:
return item->as_scm;
case STACK_ITEM_F64:
- /* return item->as_f64; */
+ return scm_from_double (item->as_f64);
default:
abort();
}
@@ -298,7 +298,8 @@ SCM_DEFINE (scm_frame_local_set_x, "frame-local-set!", 4,
0, 0,
item->as_scm = val;
break;
case STACK_ITEM_F64:
- /* item->as_f64 = scm_to_double (val); */
+ item->as_f64 = scm_to_double (val);
+ break;
default:
abort();
}
diff --git a/libguile/frames.h b/libguile/frames.h
index c965bbf..bb402ae 100644
--- a/libguile/frames.h
+++ b/libguile/frames.h
@@ -91,6 +91,7 @@ union scm_vm_stack_element
scm_t_uintptr as_uint;
scm_t_uint32 *as_ip;
SCM as_scm;
+ double as_f64;
/* For GC purposes. */
void *as_ptr;
- [Guile-commits] 14/27: VM support for raw slots, (continued)
- [Guile-commits] 14/27: VM support for raw slots, Andy Wingo, 2015/11/11
- [Guile-commits] 15/27: Reflection support for unboxed f64 slots, Andy Wingo, 2015/11/11
- [Guile-commits] 06/27: return-values opcode resets the frame, Andy Wingo, 2015/11/11
- [Guile-commits] 20/27: Scalar replacement for f64->scm, Andy Wingo, 2015/11/11
- [Guile-commits] 21/27: Add fadd, fsub, fmul, fdiv instructions, Andy Wingo, 2015/11/11
- [Guile-commits] 23/27: Fix slot representation computation for fadd, fmul, etc, Andy Wingo, 2015/11/11
- [Guile-commits] 19/27: bv-{f32, f64}-{ref, set!} operate on raw f64 values, Andy Wingo, 2015/11/11
- [Guile-commits] 25/27: Better f64 unboxing for loop vars that might flow to $ktail, Andy Wingo, 2015/11/11
- [Guile-commits] 17/27: Add VM ops to pack and unpack raw f64 values., Andy Wingo, 2015/11/11
- [Guile-commits] 03/27: CSE can run on first-order CPS, Andy Wingo, 2015/11/11
- [Guile-commits] 16/27: Stack slots can hold a double,
Andy Wingo <=
- [Guile-commits] 12/27: Remove return opcode, Andy Wingo, 2015/11/11
- [Guile-commits] 09/27: Always emit return-values, Andy Wingo, 2015/11/11
- [Guile-commits] 08/27: Replace return primcalls with $values, Andy Wingo, 2015/11/11
- [Guile-commits] 24/27: The compiler can unbox float64 loop variables, Andy Wingo, 2015/11/11
- [Guile-commits] 26/27: Remove debug printout in specialize-numbers, Andy Wingo, 2015/11/11
- [Guile-commits] 18/27: Type inference distinguishes between untagged and tagged flonums, Andy Wingo, 2015/11/11
- [Guile-commits] 02/27: Revert "Bootstrap build doesn't have to expand CPS optimizations", Andy Wingo, 2015/11/11