diff options
author | Andy Wingo <wingo@pobox.com> | 2015-10-28 17:03:42 +0000 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2015-10-28 17:43:55 +0000 |
commit | e3cc0eeb3a9c94f018540e659c4686f5e986b48c (patch) | |
tree | 14966378a33895bcb61100f9223fd66a8798f97c /module/system/repl | |
parent | e7660a607cabdb0061784ada2869e47db946275b (diff) | |
download | guile-e3cc0eeb3a9c94f018540e659c4686f5e986b48c.tar.gz |
Reflection support for unboxed f64 slots
* module/system/vm/assembler.scm (emit-definition): Add representation
field.
(write-arities): Emit representations into the arities section.
* module/system/vm/debug.scm (arity-definitions): Read representations.
* module/system/vm/frame.scm (<binding>): Add representation field and
binding-representation getter.
(available-bindings): Pass representation to make-binding.
(frame-binding-set!, frame-binding-ref, frame-call-representation):
Pass representation to frame-local-ref / frame-local-set!.
* test-suite/tests/rtl.test: Update definition instructions.
* module/language/cps/slot-allocation.scm ($allocation): Add
representations field.
(lookup-representation): New public function.
(allocate-slots): Pass representations to make-$allocation.
* module/language/cps/compile-bytecode.scm (compile-function): Adapt to
emit-definition change.
* libguile/frames.h:
* libguile/frames.c (scm_frame_local_ref, scm_frame_local_set_x): Take
representation argument.
(scm_to_stack_item_representation): New internal helper.
Diffstat (limited to 'module/system/repl')
-rw-r--r-- | module/system/repl/debug.scm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/module/system/repl/debug.scm b/module/system/repl/debug.scm index 6fff660e5..9516af622 100644 --- a/module/system/repl/debug.scm +++ b/module/system/repl/debug.scm @@ -113,7 +113,8 @@ (format port "~aLocal variables:~%" per-line-prefix) (for-each (lambda (binding) - (let ((v (frame-local-ref frame (binding-slot binding)))) + (let ((v (frame-local-ref frame (binding-slot binding) + (binding-representation binding)))) (display per-line-prefix port) (run-hook before-print-hook v) (format port "~a = ~v:@y\n" (binding-name binding) width v))) @@ -174,7 +175,8 @@ (module-use! mod* mod) (for-each (lambda (binding) - (let* ((x (frame-local-ref frame (binding-slot binding))) + (let* ((x (frame-local-ref frame (binding-slot binding) + (binding-representation binding))) (var (if (variable? x) x (make-variable x)))) (format #t "~:[Read-only~;Mutable~] local variable ~a = ~70:@y\n" |