diff options
| author | Rose Hogenson <rhogenson@google.com> | 2022-07-20 15:39:23 -0700 |
|---|---|---|
| committer | Rose Hogenson <rhogenson@posteo.net> | 2022-07-20 20:08:14 -0700 |
| commit | e615308b928585013461482f879f536527c5acc2 (patch) | |
| tree | dd00eef6713c103f755b98c5ffde1e2ca2d994f7 /csc/testing.csc | |
| parent | d18813441649665f42b524443c65d0b6bb4ac59a (diff) | |
| download | chromatopelma-e615308b928585013461482f879f536527c5acc2.tar.zst | |
Perform argument conversion.
The point of argument conversion is to validate on each function call
that the right number of arguments were passed, and to ensure that no
function has more than 1 argument. This second condition makes CPS
slightly simpler, and ensures that the arguments will all fit in locals.
We take the strategy of allocating a vector for each function call.
Ideally we would optimize away most of these allocations, but for now I
just want it to work.
Diffstat (limited to 'csc/testing.csc')
| -rw-r--r-- | csc/testing.csc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/csc/testing.csc b/csc/testing.csc index e46d300..3fa8ad5 100644 --- a/csc/testing.csc +++ b/csc/testing.csc @@ -61,11 +61,9 @@ (define-syntax assert-equal (syntax-rules () ((assert-equal left right transformers ...) - (let* ((x left) - (y right) - (d (diff x y transformers ...))) + (let ((d (diff left right transformers ...))) (unless (string=? "" d) - (fatalf "Fatal:\n {}\nis not equal to\n {}.\nleft is\n {}\nright is\n {}\ndiff (-left +right):\n{}" 'left 'right x y d)))) + (fatalf "Fatal:\n {}\nis not equal to\n {}.\ndiff (-left +right):\n{}" 'left 'right d)))) ((assert-equal left right) (assert-equal equal? left right)))) |
