diff options
| author | Rose Hogenson <rhogenson@posteo.net> | 2022-07-24 19:08:49 -0700 |
|---|---|---|
| committer | Rose Hogenson <rhogenson@posteo.net> | 2022-07-24 19:08:49 -0700 |
| commit | 745d6b8e16c7f276f479c18d97200e44d16aafc9 (patch) | |
| tree | 715c8dc403d9779c2f6a4fc153221401dff144cc /csc/ir2.csc | |
| parent | 51a1e71c269f298fba18b620c68a0b1b15d236e9 (diff) | |
| download | chromatopelma-745d6b8e16c7f276f479c18d97200e44d16aafc9.tar.zst | |
Start codegen.
Diffstat (limited to 'csc/ir2.csc')
| -rw-r--r-- | csc/ir2.csc | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/csc/ir2.csc b/csc/ir2.csc index 30fb5a3..642b86c 100644 --- a/csc/ir2.csc +++ b/csc/ir2.csc @@ -5,15 +5,13 @@ %closure %fix %globals + %label %primitive %variable *globals* apply-arguments apply-procedure apply? - atom-continuation - atom-expression - atom? branch-atom branch-false branch-true @@ -30,21 +28,14 @@ fix-functions fix? globals? - kargs-expression - kargs-refs - kargs? - klabel-expression - klabel? - ktail? + label-gensym + label? make-apply - make-atom make-branch make-call-closure make-closure make-fix - make-kargs - make-klabel - make-ktail + make-label make-primitive make-variable primitive-arguments @@ -56,23 +47,27 @@ variable? ; Re-exports from IR1. + %constant + %library-ref constant-expression constant? lexical-ref-gensym lexical-ref-name lexical-ref? + lexical-set-expression + lexical-set-ref + lexical-set? library-ref-library library-ref-name library-ref? make-constant make-lexical-ref - lexical-set-expression - lexical-set-ref - lexical-set? make-lexical-set make-library-ref) (import (scheme base) (only (csc ir1) + %constant + %library-ref constant? lexical-ref-gensym lexical-ref-name @@ -130,6 +125,14 @@ (define *globals* (make-globals)) + ; A label, used for function names and will compile to a constant. + (define-match-record-type <label> + (make-label gensym) + label? + %label + (gensym label-gensym)) + + ; CPS expressions: ; CPS expressions are similar to IR1 expressions, ; but constrained not to have any subexpressions except atoms. |
