diff options
Diffstat (limited to 'csc/cps.csc')
| -rw-r--r-- | csc/cps.csc | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/csc/cps.csc b/csc/cps.csc new file mode 100644 index 0000000..561a698 --- /dev/null +++ b/csc/cps.csc @@ -0,0 +1,22 @@ +(define-library (csc cps) + (import (only (csc ir1) + make-constant + constant? + lexical-ref? + library-ref?) + (only (csc ir2) + (make-atom)) + (scheme base)) + (begin + + + (define (to-cps expr k) + (cond + ((or (constant? expr) + (lexical-ref? expr) + (library-ref? expr)) + (make-atom expr continuation)) + (else (error "unexpected type in to-cps" expr)))) + + + (define (ir1->ir2 program) |
