simplified parameterize macro.
This commit is contained in:
parent
9b74020647
commit
39e84d1395
|
@ -327,12 +327,12 @@
|
||||||
(define all-registers
|
(define all-registers
|
||||||
(case wordsize
|
(case wordsize
|
||||||
[(4) '(%eax %edi %ebx %edx %ecx)]
|
[(4) '(%eax %edi %ebx %edx %ecx)]
|
||||||
[else '(%eax %edi %ebx %edx %ecx %r8 %r9 %r10 %r11)]))
|
[else '(%eax %edi %ebx %edx %ecx %r8 %r9 %r10 %r11 %r14 %r15)]))
|
||||||
|
|
||||||
(define non-8bit-registers
|
(define non-8bit-registers
|
||||||
(case wordsize
|
(case wordsize
|
||||||
[(4) '(%edi)]
|
[(4) '(%edi)]
|
||||||
[else '(%edi %r8 %r9 %r10 %r11)]))
|
[else '(%edi %r8 %r9 %r10 %r11 %r14 %r15)]))
|
||||||
|
|
||||||
(define argc-register '%eax)
|
(define argc-register '%eax)
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
1564
|
1565
|
||||||
|
|
|
@ -130,7 +130,6 @@
|
||||||
[if (core-macro . if)]
|
[if (core-macro . if)]
|
||||||
[when (core-macro . when)]
|
[when (core-macro . when)]
|
||||||
[unless (core-macro . unless)]
|
[unless (core-macro . unless)]
|
||||||
[parameterize (core-macro . parameterize)]
|
|
||||||
[case (core-macro . case)]
|
[case (core-macro . case)]
|
||||||
[fluid-let-syntax (core-macro . fluid-let-syntax)]
|
[fluid-let-syntax (core-macro . fluid-let-syntax)]
|
||||||
[record-type-descriptor (core-macro . record-type-descriptor)]
|
[record-type-descriptor (core-macro . record-type-descriptor)]
|
||||||
|
@ -145,6 +144,7 @@
|
||||||
[quasisyntax (macro . quasisyntax)]
|
[quasisyntax (macro . quasisyntax)]
|
||||||
[with-syntax (macro . with-syntax)]
|
[with-syntax (macro . with-syntax)]
|
||||||
[identifier-syntax (macro . identifier-syntax)]
|
[identifier-syntax (macro . identifier-syntax)]
|
||||||
|
[parameterize (macro . parameterize)]
|
||||||
[let (macro . let)]
|
[let (macro . let)]
|
||||||
[let* (macro . let*)]
|
[let* (macro . let*)]
|
||||||
[cond (macro . cond)]
|
[cond (macro . cond)]
|
||||||
|
|
|
@ -2066,42 +2066,28 @@
|
||||||
(define incorrect-usage-macro
|
(define incorrect-usage-macro
|
||||||
(lambda (e) (stx-error e "incorrect usage of auxiliary keyword")))
|
(lambda (e) (stx-error e "incorrect usage of auxiliary keyword")))
|
||||||
|
|
||||||
(define parameterize-transformer ;;; go away
|
(define parameterize-macro
|
||||||
(lambda (e r mr)
|
(lambda (e)
|
||||||
(syntax-match e ()
|
(syntax-match e ()
|
||||||
((_ () b b* ...)
|
((_ () b b* ...)
|
||||||
(chi-internal (cons b b*) r mr))
|
(bless `(begin ,b . ,b*)))
|
||||||
((_ ((olhs* orhs*) ...) b b* ...)
|
((_ ((olhs* orhs*) ...) b b* ...)
|
||||||
(let ((lhs* (map (lambda (x) (gen-lexical 'lhs)) olhs*))
|
(let ((lhs* (generate-temporaries olhs*))
|
||||||
(rhs* (map (lambda (x) (gen-lexical 'rhs)) olhs*))
|
(rhs* (generate-temporaries orhs*)))
|
||||||
(t* (map (lambda (x) (gen-lexical 't)) olhs*))
|
(bless
|
||||||
(swap (gen-lexical 'swap)))
|
`((lambda ,(append lhs* rhs*)
|
||||||
(build-let no-source
|
(let ([swap (lambda ()
|
||||||
(append lhs* rhs*)
|
,@(map (lambda (lhs rhs)
|
||||||
(append (chi-expr* olhs* r mr) (chi-expr* orhs* r mr))
|
`(let ([t (,lhs)])
|
||||||
(build-let no-source
|
(,lhs ,rhs)
|
||||||
(list swap)
|
(set! ,rhs t)))
|
||||||
(list (build-lambda no-source '()
|
lhs* rhs*))])
|
||||||
(build-sequence no-source
|
(dynamic-wind
|
||||||
(map (lambda (t lhs rhs)
|
swap
|
||||||
(build-let no-source
|
(lambda () ,b . ,b*)
|
||||||
(list t)
|
swap)))
|
||||||
(list (build-application no-source
|
,@(append olhs* orhs*))))))))
|
||||||
(build-lexical-reference no-source lhs)
|
|
||||||
'()))
|
|
||||||
(build-sequence no-source
|
|
||||||
(list (build-application no-source
|
|
||||||
(build-lexical-reference no-source lhs)
|
|
||||||
(list (build-lexical-reference no-source rhs)))
|
|
||||||
(build-lexical-assignment no-source rhs
|
|
||||||
(build-lexical-reference no-source t))))))
|
|
||||||
t* lhs* rhs*))))
|
|
||||||
(build-application no-source
|
|
||||||
(build-primref no-source 'dynamic-wind)
|
|
||||||
(list (build-lexical-reference no-source swap)
|
|
||||||
(build-lambda no-source '()
|
|
||||||
(chi-internal (cons b b*) r mr))
|
|
||||||
(build-lexical-reference no-source swap))))))))))
|
|
||||||
|
|
||||||
(define foreign-call-transformer
|
(define foreign-call-transformer
|
||||||
(lambda (e r mr)
|
(lambda (e r mr)
|
||||||
|
@ -2598,7 +2584,6 @@
|
||||||
((if) if-transformer)
|
((if) if-transformer)
|
||||||
((when) when-transformer)
|
((when) when-transformer)
|
||||||
((unless) unless-transformer)
|
((unless) unless-transformer)
|
||||||
((parameterize) parameterize-transformer)
|
|
||||||
((foreign-call) foreign-call-transformer)
|
((foreign-call) foreign-call-transformer)
|
||||||
((syntax-case) syntax-case-transformer)
|
((syntax-case) syntax-case-transformer)
|
||||||
((syntax) syntax-transformer)
|
((syntax) syntax-transformer)
|
||||||
|
@ -2661,6 +2646,7 @@
|
||||||
((trace-let-syntax) trace-let-syntax-macro)
|
((trace-let-syntax) trace-let-syntax-macro)
|
||||||
((trace-letrec-syntax) trace-letrec-syntax-macro)
|
((trace-letrec-syntax) trace-letrec-syntax-macro)
|
||||||
((define-condition-type) define-condition-type-macro)
|
((define-condition-type) define-condition-type-macro)
|
||||||
|
((parameterize) parameterize-macro)
|
||||||
((include-into) include-into-macro)
|
((include-into) include-into-macro)
|
||||||
((eol-style)
|
((eol-style)
|
||||||
(lambda (x)
|
(lambda (x)
|
||||||
|
|
Loading…
Reference in New Issue