New patches: [unrevert anonymous**20080901193739] hunk ./expander.scm 380 (immutable transformer-envs) (immutable displacement) (immutable maybe-library)))) - (make-identifier (rtd-constructor :identifier))) + (make-identifier (rtd-constructor :identifier)) hunk ./expander.scm 382 - ;; We sequenced stuff in the let* above because r5rs internal + ;;========================================================================= + ;; + ;; Bindings: + ;; + ;;========================================================================= + + ;; ::= (variable ( ...) ) + ;; | (macro ( ...) #f ) + ;; | (pattern-variable ( ...) ) + ;; | #f (out of context binding from another library) + ;; ::= #t | #f + ;; ::= 0 | 1 | 2 | ... + ;; ::= uniquely identifying binding. + ;; is used for free-identifier=? comparison. + ;; For variable and pattern variable bindings, it is the same + ;; as the symbol emitted for the binding in the object code. + ;; For macro bindings, it is the key for looking up the transformer + ;; in the global macro table. + + + ;type name levels content library) + ; (list type name levels content library)) + + (binding-t (make-rtd 'binding '#((immutable type) (immutable name) (immutable levels) + (mutable content) (immutable library)))) + (make-binding (rtd-constructor binding-t))) + ;; We sequenced stuff in the let* above because r5rs internal ;; definitions use letrec semantics and cannot be used for sequencing. (define identifier? (rtd-predicate :identifier)) hunk ./expander.scm 522 (define (generate-color) (generate-guid 'c)) - ;;========================================================================= - ;; - ;; Bindings: - ;; - ;;========================================================================= - - ;; ::= (variable ( ...) ) - ;; | (macro ( ...) #f ) - ;; | (pattern-variable ( ...) ) - ;; | #f (out of context binding from another library) - ;; ::= #t | #f - ;; ::= 0 | 1 | 2 | ... - ;; ::= uniquely identifying binding. - ;; is used for free-identifier=? comparison. - ;; For variable and pattern variable bindings, it is the same - ;; as the symbol emitted for the binding in the object code. - ;; For macro bindings, it is the key for looking up the transformer - ;; in the global macro table. - - (define (make-binding type name levels content library) - (list type name levels content library)) - - (define (binding-type b) (car b)) - (define (binding-name b) (cadr b)) - (define (binding-levels b) (caddr b)) - (define (binding-mutable? b) (cadddr b)) - (define (binding-dimension b) (cadddr b)) - (define (binding-library b) (car (cddddr b))) - (define (binding-mutable-set! b x) (set-car! (cdddr b) x)) hunk ./expander.scm 523 + (define binding-type (rtd-accessor binding-t 'type)) ; (car b)) + (define binding-name (rtd-accessor binding-t 'name)) ; (cadr b)) + (define binding-levels (let ((result (rtd-accessor binding-t 'levels))) + (pp result) + result)); (caddr b)) + (define binding-mutable? (rtd-accessor binding-t 'content)) ; (cadddr b)) + (define binding-dimension (rtd-accessor binding-t 'content)) ; (cadddr b)) + (define binding-library (rtd-accessor binding-t 'library)) ; (car (cddddr b))) + (define binding-mutable-set! (rtd-mutator binding-t 'content)) ;b x) (set-car! (cdddr b) x)) ;; Looks up binding first in usage environment and ;; then in attached transformer environments. ;; Toplevel forward references are treated specially. Context: [added licensing atsmyles@earthlink.net**20080829205105] [added darcs repository link atsmyles@earthlink.net**20080829202123] [added docs atsmyles@earthlink.net**20080829192722] [2008-08-29 atsmyles@earthlink.net**20080829190246] [update runtime to use err5rs records atsmyles@earthlink.net**20080829190146] [fix compile script atsmyles@earthlink.net**20080824194105] [test for err5rs records atsmyles@earthlink.net**20080822221852] [2008-08-22 atsmyles@earthlink.net**20080822221609] [2008-08-08 atsmyles@earthlink.net**20080808132151] [Initial Commit atsmyles@earthlink.net**20080503205457] Patch bundle hash: 0fc597f2e21cbfd91cbac24975b3d7142b46fe89