#| -*-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
,@(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)
(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))
#| -*-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
(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)
(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))
#| -*-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
(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*
(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))
\f
(define (envconv/remember new old block)
(call-with-values
(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)
\f
(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*
#| -*-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
(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
`(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))))
#| -*-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
(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))))
`(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)