Implement 5.43 making it a little harder for myself
This commit is contained in:
@@ -29,8 +29,7 @@
|
||||
((definition? exp)
|
||||
(compile-definition exp ct-env target linkage))
|
||||
((if? exp) (compile-if exp ct-env target linkage))
|
||||
((let? exp)
|
||||
(compile (let->combination exp) ct-env target linkage))
|
||||
((let? exp) (compile (let->combination exp) ct-env target linkage))
|
||||
((lambda? exp) (compile-lambda exp ct-env target linkage))
|
||||
((begin? exp)
|
||||
(compile-sequence (begin-actions exp)
|
||||
@@ -52,9 +51,12 @@
|
||||
(define (empty-instruction-sequence)
|
||||
(make-instruction-sequence '() '() '()))
|
||||
|
||||
;; Implemented in 5.38.
|
||||
;; Implemented in 5.38
|
||||
(define (primitive-procedure? exp) #f)
|
||||
|
||||
;; Implemented in 5.43
|
||||
(define (lambda->lambda-without-defines exp) exp)
|
||||
|
||||
;;;SECTION 5.5.2
|
||||
|
||||
;;;linkage code
|
||||
@@ -187,8 +189,8 @@
|
||||
(define (compile-lambda exp ct-env target linkage)
|
||||
(let ((proc-entry (make-label 'entry))
|
||||
(after-lambda (make-label 'after-lambda)))
|
||||
(let ((lambda-linkage
|
||||
(if (eq? linkage 'next) after-lambda linkage)))
|
||||
(let ((lambda-linkage (if (eq? linkage 'next) after-lambda linkage))
|
||||
(exp (lambda->lambda-without-defines exp)))
|
||||
(append-instruction-sequences
|
||||
(tack-on-instruction-sequence
|
||||
(end-with-linkage lambda-linkage
|
||||
|
||||
Reference in New Issue
Block a user