From: Chris Hanson Date: Mon, 12 Feb 2018 05:42:10 +0000 (-0800) Subject: Some minor tweaks that were missed in earlier commits. X-Git-Tag: mit-scheme-pucked-x11-0.3.1~7^2~252 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=65dff54f06d86b415fcc178e74494410a76a1618;p=mit-scheme.git Some minor tweaks that were missed in earlier commits. --- diff --git a/src/runtime/mit-syntax.scm b/src/runtime/mit-syntax.scm index a1890a4f6..1f23fa4ac 100644 --- a/src/runtime/mit-syntax.scm +++ b/src/runtime/mit-syntax.scm @@ -61,17 +61,17 @@ USA. (define (classifier:lambda form senv hist) (syntax-check '(_ mit-bvl + form) form) - (compile-lambda scode-lambda-name:unnamed - (cadr form) - form senv hist)) + (classify-lambda scode-lambda-name:unnamed + (cadr form) + form senv hist)) (define (classifier:named-lambda form senv hist) (syntax-check '(_ (identifier . mit-bvl) + form) form) - (compile-lambda (identifier->symbol (caadr form)) - (cdadr form) - form senv hist)) + (classify-lambda (identifier->symbol (caadr form)) + (cdadr form) + form senv hist)) -(define (compile-lambda name bvl form senv hist) +(define (classify-lambda name bvl form senv hist) (let ((senv (make-internal-senv senv))) ;; Force order -- bind names before classifying body. (let ((bvl diff --git a/src/runtime/syntax-definitions.scm b/src/runtime/syntax-definitions.scm index cf8966a3b..55053e8e1 100644 --- a/src/runtime/syntax-definitions.scm +++ b/src/runtime/syntax-definitions.scm @@ -40,17 +40,17 @@ USA. (define-classifier 'begin classifier:begin) (define-classifier 'declare classifier:declare) (define-classifier 'define-syntax classifier:define-syntax) + (define-classifier 'delay classifier:delay) (define-classifier 'er-macro-transformer classifier:er-macro-transformer) (define-classifier 'if classifier:if) + (define-classifier 'lambda classifier:lambda) (define-classifier 'let-syntax classifier:let-syntax) (define-classifier 'letrec-syntax classifier:letrec-syntax) + (define-classifier 'named-lambda classifier:named-lambda) (define-classifier 'or classifier:or) (define-classifier 'quote classifier:quote) (define-classifier 'quote-identifier classifier:quote-identifier) (define-classifier 'rsc-macro-transformer classifier:rsc-macro-transformer) (define-classifier 'sc-macro-transformer classifier:sc-macro-transformer) (define-classifier 'set! classifier:set!) - (define-classifier 'the-environment classifier:the-environment) - (define-classifier 'delay classifier:delay) - (define-classifier 'lambda classifier:lambda) - (define-classifier 'named-lambda classifier:named-lambda))) \ No newline at end of file + (define-classifier 'the-environment classifier:the-environment))) \ No newline at end of file diff --git a/src/runtime/syntax.scm b/src/runtime/syntax.scm index 9f2ed2eb2..8b386b0e0 100644 --- a/src/runtime/syntax.scm +++ b/src/runtime/syntax.scm @@ -105,17 +105,12 @@ USA. (else (if (not (list? (cdr form))) (syntax-error "Combination must be a proper list:" form)) - (expr-item - (let ((items - (classify-forms (cdr form) - senv - (hist-cdr hist)))) - (lambda () - (output/combination - (compile-expr-item item) - (map compile-expr-item items))))))))) + (combination-item item + (classify-forms (cdr form) + senv + (hist-cdr hist))))))) (else - (expr-item (lambda () (output/constant form)))))) + (constant-item form)))) (define (classify-form-car form senv hist) (classify-form (car form) senv (hist-car hist)))