diff options
Diffstat (limited to 'csc/ir2.csc')
| -rw-r--r-- | csc/ir2.csc | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/csc/ir2.csc b/csc/ir2.csc index 331aa4c..30fb5a3 100644 --- a/csc/ir2.csc +++ b/csc/ir2.csc @@ -4,8 +4,10 @@ %branch %closure %fix + %globals %primitive %variable + *globals* apply-arguments apply-procedure apply? @@ -27,6 +29,7 @@ fix-body fix-functions fix? + globals? kargs-expression kargs-refs kargs? @@ -101,10 +104,10 @@ ; Atoms consist of ; - constant, ; - lexical-ref, - ; - or library-ref + ; - library-ref, + ; - or globals. ; After closure conversion, there are no more lexical refs. - ; Each lexical ref will be converted to one of the following - ; data types. + ; Each lexical ref will be converted to a <variable>. ; A function argument or local variable. @@ -115,6 +118,18 @@ (gensym variable-gensym)) + ; The globals array. This will eventually be stored in register 0. + (define-match-record-type <globals> + (make-globals) + globals? + %globals) + + + ; A global instance of <globals>. + ; Considered equal to calling (make-globals). + (define *globals* (make-globals)) + + ; CPS expressions: ; CPS expressions are similar to IR1 expressions, ; but constrained not to have any subexpressions except atoms. |
