From e615308b928585013461482f879f536527c5acc2 Mon Sep 17 00:00:00 2001 From: Rose Hogenson Date: Wed, 20 Jul 2022 15:39:23 -0700 Subject: 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. --- csc/compare-test.csc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'csc/compare-test.csc') diff --git a/csc/compare-test.csc b/csc/compare-test.csc index 68ea5e6..8791e1d 100644 --- a/csc/compare-test.csc +++ b/csc/compare-test.csc @@ -31,6 +31,9 @@ (test diff-record (assert-equal " ( + (!type . + + ) (a . 5 ) @@ -38,9 +41,6 @@ - 5 + 6 ) - (type . - - ) ) " (diff (make-test-type 5 5) (make-test-type 5 6) (cons test-type? %test-type)))) @@ -49,7 +49,7 @@ (test diff-multiline-string (assert-equal " ( - (type . + (!type . string ) (value . @@ -67,7 +67,7 @@ (test diff-vector (assert-equal " ( - (type . + (!type . vector ) (value . -- cgit v1.3.1