From 3f15fa70a53ef7fc16591cfa9af9a6d03cf80d23 Mon Sep 17 00:00:00 2001 From: Stephen Adams Date: Sat, 29 Apr 1995 00:57:30 +0000 Subject: [PATCH] Tidying. --- v8/src/compiler/midend/copier.scm | 77 +++++++++++------------------ v8/src/compiler/midend/earlyrew.scm | 26 +++++----- v8/src/compiler/midend/envconv.scm | 30 +++++------ v8/src/compiler/midend/expand.scm | 18 +++---- v8/src/compiler/midend/inlate.scm | 10 ++-- 5 files changed, 72 insertions(+), 89 deletions(-) diff --git a/v8/src/compiler/midend/copier.scm b/v8/src/compiler/midend/copier.scm index 35130cc8f..8cf8bd23c 100644 --- a/v8/src/compiler/midend/copier.scm +++ b/v8/src/compiler/midend/copier.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: copier.scm,v 1.4 1994/11/26 20:00:29 gjr Exp $ +$Id: copier.scm,v 1.5 1995/04/29 00:52:59 adams Exp $ -Copyright (c) 1994 Massachusetts Institute of Technology +Copyright (c) 1994-1995 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -62,17 +62,17 @@ MIT in each case. |# ,@(copier/expr* state rands))) (define-copier-handler LET (state bindings body) - `(LET ,(lmap (lambda (binding) - (list (car binding) - (copier/expr state (cadr binding)))) - bindings) + `(LET ,(map (lambda (binding) + (list (car binding) + (copier/expr state (cadr binding)))) + bindings) ,(copier/expr state body))) (define-copier-handler LETREC (state bindings body) - `(LETREC ,(lmap (lambda (binding) - (list (car binding) - (copier/expr state (cadr binding)))) - bindings) + `(LETREC ,(map (lambda (binding) + (list (car binding) + (copier/expr state (cadr binding)))) + bindings) ,(copier/expr state body))) (define-copier-handler QUOTE (state object) @@ -124,45 +124,28 @@ MIT in each case. |# (if (not (pair? expr)) (illegal expr)) (state (case (car expr) - ((QUOTE) - (copier/quote state expr)) - ((LOOKUP) - (copier/lookup state expr)) - ((LAMBDA) - (copier/lambda state expr)) - ((LET) - (copier/let state expr)) - ((DECLARE) - (copier/declare state expr)) - ((CALL) - (copier/call state expr)) - ((BEGIN) - (copier/begin state expr)) - ((IF) - (copier/if state expr)) - ((LETREC) - (copier/letrec state expr)) - ((SET!) - (copier/set! state expr)) - ((UNASSIGNED?) - (copier/unassigned? state expr)) - ((OR) - (copier/or state expr)) - ((DELAY) - (copier/delay state expr)) - ((ACCESS) - (copier/access state expr)) - ((DEFINE) - (copier/define state expr)) - ((IN-PACKAGE) - (copier/in-package state expr)) - ((THE-ENVIRONMENT) - (copier/the-environment state expr)) + ((QUOTE) (copier/quote state expr)) + ((LOOKUP) (copier/lookup state expr)) + ((LAMBDA) (copier/lambda state expr)) + ((LET) (copier/let state expr)) + ((DECLARE) (copier/declare state expr)) + ((CALL) (copier/call state expr)) + ((BEGIN) (copier/begin state expr)) + ((IF) (copier/if state expr)) + ((LETREC) (copier/letrec state expr)) + ((SET!) (copier/set! state expr)) + ((UNASSIGNED?) (copier/unassigned? state expr)) + ((OR) (copier/or state expr)) + ((DELAY) (copier/delay state expr)) + ((ACCESS) (copier/access state expr)) + ((DEFINE) (copier/define state expr)) + ((IN-PACKAGE) (copier/in-package state expr)) + ((THE-ENVIRONMENT) (copier/the-environment state expr)) (else (illegal expr))) expr)) (define (copier/expr* state exprs) - (lmap (lambda (expr) - (copier/expr state expr)) - exprs)) + (map (lambda (expr) + (copier/expr state expr)) + exprs)) diff --git a/v8/src/compiler/midend/earlyrew.scm b/v8/src/compiler/midend/earlyrew.scm index 2a3bca674..c0ed1c9ad 100644 --- a/v8/src/compiler/midend/earlyrew.scm +++ b/v8/src/compiler/midend/earlyrew.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: earlyrew.scm,v 1.7 1995/02/28 01:39:12 adams Exp $ +$Id: earlyrew.scm,v 1.8 1995/04/29 00:55:26 adams Exp $ -Copyright (c) 1994 Massachusetts Institute of Technology +Copyright (c) 1994-1995 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -78,17 +78,17 @@ MIT in each case. |# (default)))) (define-early-rewriter LET (bindings body) - `(LET ,(lmap (lambda (binding) - (list (car binding) - (earlyrew/expr (cadr binding)))) - bindings) + `(LET ,(map (lambda (binding) + (list (car binding) + (earlyrew/expr (cadr binding)))) + bindings) ,(earlyrew/expr body))) (define-early-rewriter LETREC (bindings body) - `(LETREC ,(lmap (lambda (binding) - (list (car binding) - (earlyrew/expr (cadr binding)))) - bindings) + `(LETREC ,(map (lambda (binding) + (list (car binding) + (earlyrew/expr (cadr binding)))) + bindings) ,(earlyrew/expr body))) (define-early-rewriter QUOTE (object) @@ -134,9 +134,9 @@ MIT in each case. |# (illegal expr)))) (define (earlyrew/expr* exprs) - (lmap (lambda (expr) - (earlyrew/expr expr)) - exprs)) + (map (lambda (expr) + (earlyrew/expr expr)) + exprs)) (define (earlyrew/remember new old) (code-rewrite/remember new old)) diff --git a/v8/src/compiler/midend/envconv.scm b/v8/src/compiler/midend/envconv.scm index a05467419..ab27a3053 100644 --- a/v8/src/compiler/midend/envconv.scm +++ b/v8/src/compiler/midend/envconv.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: envconv.scm,v 1.7 1994/12/06 16:30:09 adams Exp $ +$Id: envconv.scm,v 1.8 1995/04/29 00:55:01 adams Exp $ -Copyright (c) 1994 Massachusetts Institute of Technology +Copyright (c) 1994-1995 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -153,16 +153,16 @@ MIT in each case. |# (envconv/env/block env)))))) (define-environment-converter LET (env bindings body) - (let ((bindings* (lmap (lambda (binding) - (list (car binding) - (envconv/expr env (cadr binding)))) - bindings))) + (let ((bindings* (map (lambda (binding) + (list (car binding) + (envconv/expr env (cadr binding)))) + bindings))) (envconv/binding-body (let ((context (envconv/env/context env))) (if (eq? context 'TOP-LEVEL) 'ONCE-ONLY context)) env - (lmap car bindings) + (map car bindings) body (lambda (body*) `(LET ,bindings* @@ -321,9 +321,9 @@ MIT in each case. |# (envconv/expr-with-name env expr #f)) (define (envconv/expr* env exprs) - (lmap (lambda (expr) - (envconv/expr env expr)) - exprs)) + (map (lambda (expr) + (envconv/expr env expr)) + exprs)) (define (envconv/remember new old block) (call-with-values @@ -552,9 +552,9 @@ MIT in each case. |# (LOOKUP ,(envconv/env/reified-name (envconv/env/parent env*))) (QUOTE ,(list->vector (cons lambda-tag:make-environment names))) - ,@(lmap (lambda (name) - `(LOOKUP ,name)) - names)) + ,@(map (lambda (name) + `(LOOKUP ,name)) + names)) body*)) (define (envconv/process-root! top-level-env top-level-program) @@ -863,10 +863,10 @@ MIT in each case. |# (define (envconv/wrap-with-cache-bindings env cells body) (let ((body* - `(CALL (LAMBDA (,(new-continuation-variable) ,@(lmap cadr cells)) + `(CALL (LAMBDA (,(new-continuation-variable) ,@(map cadr cells)) ,body) (QUOTE #F) - ,@(lmap caddr cells)))) + ,@(map caddr cells)))) (if (or (eq? (envconv/env/context env) 'TOP-LEVEL) (not envconv/variable-caches-must-be-static?)) body* diff --git a/v8/src/compiler/midend/expand.scm b/v8/src/compiler/midend/expand.scm index 26c5c344b..e763deb70 100644 --- a/v8/src/compiler/midend/expand.scm +++ b/v8/src/compiler/midend/expand.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: expand.scm,v 1.4 1995/02/27 23:05:55 adams Exp $ +$Id: expand.scm,v 1.5 1995/04/29 00:57:30 adams Exp $ Copyright (c) 1994-1995 Massachusetts Institute of Technology @@ -79,9 +79,9 @@ MIT in each case. |# (if (null? auxes) `(LAMBDA ,rest ,body) (let ((body* - `(LET ,(lmap (lambda (aux) - (list aux `(QUOTE ,%unassigned))) - auxes) + `(LET ,(map (lambda (aux) + (list aux `(QUOTE ,%unassigned))) + auxes) ,(expand/aux/sort auxes body)))) (expand/split-block body* form) `(LAMBDA ,rest @@ -271,17 +271,17 @@ MIT in each case. |# `(CALL (QUOTE ,%vector) (QUOTE #F) ,@exprs) - `(QUOTE ,(list->vector (lmap cadr exprs))))) + `(QUOTE ,(list->vector (map cadr exprs))))) (define (->multi-define defns) `(CALL (QUOTE ,%*define*) (QUOTE #F) ,(list-ref (car defns) 3) - (QUOTE ,(list->vector (lmap (lambda (defn) - (cadr (list-ref defn 4))) - defns))) + (QUOTE ,(list->vector (map (lambda (defn) + (cadr (list-ref defn 4))) + defns))) ,(->vector - (lmap (lambda (defn) + (map (lambda (defn) (list-ref defn 5)) defns)))) diff --git a/v8/src/compiler/midend/inlate.scm b/v8/src/compiler/midend/inlate.scm index 61ef4a092..b56b08d1b 100644 --- a/v8/src/compiler/midend/inlate.scm +++ b/v8/src/compiler/midend/inlate.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: inlate.scm,v 1.3 1995/02/22 04:09:20 adams Exp $ +$Id: inlate.scm,v 1.4 1995/04/29 00:57:15 adams Exp $ -Copyright (c) 1994 Massachusetts Institute of Technology +Copyright (c) 1994-1995 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -59,7 +59,7 @@ MIT in each case. |# (if (sequence? form*) (beginnify (inlate/map-declarations - (lmap inlate/scode (sequence-actions form*)))) + (map inlate/scode (sequence-actions form*)))) (inlate/scode form*))) (new-dbg-expression/make form)))) @@ -158,14 +158,14 @@ MIT in each case. |# `(UNASSIGNED? ,(cadr rands)) `(CALL ,(inlate/scode rator) (QUOTE #F) ; continuation - ,@(lmap inlate/scode rands)))))) + ,@(map inlate/scode rands)))))) (define-inlator COMMENT (text body) text ; ignored (inlate/scode body)) (define-inlator SEQUENCE (actions) - (beginnify (lmap inlate/scode actions))) + (beginnify (map inlate/scode actions))) (define-inlator CONDITIONAL (pred conseq alt) `(IF ,(inlate/scode pred) -- 2.25.1