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 /test-suite | |
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 'test-suite')
-rw-r--r-- | test-suite/tests/rtl.test | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/test-suite/tests/rtl.test b/test-suite/tests/rtl.test index 872c5f1ff..bae76825e 100644 --- a/test-suite/tests/rtl.test +++ b/test-suite/tests/rtl.test @@ -104,7 +104,7 @@ a procedure." '((begin-program countdown ((name . countdown))) (begin-standard-arity (x) 4 #f) - (definition x 1) + (definition x 1 scm) (br fix-body) (label loop-head) (br-if-= 1 2 #f out) @@ -143,7 +143,7 @@ a procedure." (begin-program accum ((name . accum))) (begin-standard-arity (x) 4 #f) - (definition x 1) + (definition x 1 scm) (free-ref 1 3 0) (box-ref 0 1) (add 0 0 2) @@ -164,7 +164,7 @@ a procedure." '((begin-program call ((name . call))) (begin-standard-arity (f) 7 #f) - (definition f 1) + (definition f 1 scm) (mov 1 5) (call 5 1) (receive 1 5 7) @@ -179,7 +179,7 @@ a procedure." '((begin-program call-with-3 ((name . call-with-3))) (begin-standard-arity (f) 7 #f) - (definition f 1) + (definition f 1 scm) (mov 1 5) (load-constant 0 3) (call 5 2) @@ -196,7 +196,7 @@ a procedure." '((begin-program call ((name . call))) (begin-standard-arity (f) 2 #f) - (definition f 1) + (definition f 1 scm) (mov 1 0) (tail-call 1) (end-arity) @@ -209,7 +209,7 @@ a procedure." '((begin-program call-with-3 ((name . call-with-3))) (begin-standard-arity (f) 2 #f) - (definition f 1) + (definition f 1 scm) (mov 1 0) ;; R0 <- R1 (load-constant 0 3) ;; R1 <- 3 (tail-call 2) @@ -234,7 +234,7 @@ a procedure." (begin-program sqrt-trampoline ((name . sqrt-trampoline))) (begin-standard-arity (x) 3 #f) - (definition x 1) + (definition x 1 scm) (cached-toplevel-box 0 sqrt-scope sqrt #t) (box-ref 2 0) (tail-call 2) @@ -287,7 +287,7 @@ a procedure." (begin-program sqrt-trampoline ((name . sqrt-trampoline))) (begin-standard-arity (x) 3 #f) - (definition x 1) + (definition x 1 scm) (cached-module-box 0 (guile) sqrt #t #t) (box-ref 2 0) (tail-call 2) @@ -368,8 +368,8 @@ a procedure." (assemble-program '((begin-program foo ((name . foo))) (begin-standard-arity (x y) 3 #f) - (definition x 1) - (definition y 2) + (definition x 1 scm) + (definition y 2 scm) (load-constant 1 42) (return-values 2) (end-arity) @@ -380,9 +380,9 @@ a procedure." (assemble-program '((begin-program foo ((name . foo))) (begin-opt-arity (x) (y) z 4 #f) - (definition x 1) - (definition y 2) - (definition z 3) + (definition x 1 scm) + (definition y 2 scm) + (definition z 3 scm) (load-constant 2 42) (return-values 2) (end-arity) |