From: Chris Hanson Date: Thu, 20 Dec 2001 16:28:23 +0000 (+0000) Subject: Eliminate IN-PACKAGE and USING-SYNTAX special forms. X-Git-Tag: 20090517-FFI~2336 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=36afba706c96f3883b804f65e029ea8b77891a5f;p=mit-scheme.git Eliminate IN-PACKAGE and USING-SYNTAX special forms. --- diff --git a/v7/src/compiler/base/scode.scm b/v7/src/compiler/base/scode.scm index ded523a54..6da798f7a 100644 --- a/v7/src/compiler/base/scode.scm +++ b/v7/src/compiler/base/scode.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: scode.scm,v 4.10 1999/01/02 06:06:43 cph Exp $ +$Id: scode.scm,v 4.11 2001/12/20 16:28:22 cph Exp $ -Copyright (c) 1988-1999 Massachusetts Institute of Technology +Copyright (c) 1988-1999, 2001 Massachusetts Institute of Technology This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,7 +16,8 @@ General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software -Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +02111-1307, USA. |# ;;;; SCode Interface @@ -48,8 +49,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. delay-expression make-disjunction disjunction? disjunction-components disjunction-predicate disjunction-alternative - make-in-package in-package? in-package-components - in-package-environment in-package-expression make-lambda lambda? lambda-components make-open-block open-block? open-block-components primitive-procedure? procedure? diff --git a/v7/src/compiler/fggen/canon.scm b/v7/src/compiler/fggen/canon.scm index d97f41815..3eee1f211 100644 --- a/v7/src/compiler/fggen/canon.scm +++ b/v7/src/compiler/fggen/canon.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: canon.scm,v 1.16 1999/01/02 06:06:43 cph Exp $ +$Id: canon.scm,v 1.17 2001/12/20 16:28:22 cph Exp $ -Copyright (c) 1988-1999 Massachusetts Institute of Technology +Copyright (c) 1988-1999, 2001 Massachusetts Institute of Technology This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,7 +16,8 @@ General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software -Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +02111-1307, USA. |# ;;;; Scode canonicalization. @@ -60,10 +61,9 @@ FIRST-CLASS: Treat every expression as if it appeared in a first class environment. This is used by the LOW optimization level. TOP-LEVEL: The expression appears at top level of the original - expression or an in-package special form. It is not - surrounded by any lambda expressions in the input form. - It is assumed that such expressions are only executed - (evaluated) once. + expression. It is not surrounded by any lambda + expressions in the input form. It is assumed that + such expressions are only executed (evaluated) once. ONCE-ONLY: The expression will be executed only once (as long as the corresponding top level expression is executed @@ -640,49 +640,6 @@ ARBITRARY: The expression may be executed more than once. It (default) exp)))))))))))) -;;;; Hair squared - -(define (canonicalize/in-package expr bound context) - (scode/in-package-components - expr - (lambda (environment expression) - (let ((nexpr (canonicalize/expression - expression '() - (if (canonicalize/optimization-low? context) - 'FIRST-CLASS - 'TOP-LEVEL))) - (nenv (canonicalize/expression environment bound context))) - - (define (good expr) - (canonicalize/combine-unary - (lambda (env) - (scode/make-evaluation expr - env - (and (not (eq? context 'TOP-LEVEL)) - (not (eq? context 'ONCE-ONLY))) - expr)) - nenv)) - - (cond ((canout-splice? nexpr) - ;; Random optimization. The in-package expression has no - ;; free variables. Turn it into a sequence. - (canonicalize/combine-unary scode/make-sequence - (combine-list (list nenv nexpr)))) - ((canonicalize/optimization-low? context) - (canonicalize/combine-unary - (lambda (exp) - (canonicalize/bind-environment (canout-expr nexpr) - exp - expr)) - nenv)) - ((not (canout-needs? nexpr)) - (good (canout-expr nexpr))) - (else - (good - (canonicalize/bind-environment (canout-expr nexpr) - (scode/make-the-environment) - expr)))))))) - ;;;; Hair cubed #| @@ -874,7 +831,6 @@ ARBITRARY: The expression may be executed more than once. It (nary-entry unary delay) (binary-entry disjunction) (standard-entry variable) - (standard-entry in-package) (standard-entry the-environment) (dispatch-entries (combination-1 combination-2 combination primitive-combination-0 diff --git a/v7/src/compiler/fggen/fggen.scm b/v7/src/compiler/fggen/fggen.scm index 44d74fec9..f7fbcd17d 100644 --- a/v7/src/compiler/fggen/fggen.scm +++ b/v7/src/compiler/fggen/fggen.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: fggen.scm,v 4.32 1999/01/02 06:06:43 cph Exp $ +$Id: fggen.scm,v 4.33 2001/12/20 16:28:22 cph Exp $ -Copyright (c) 1988-1999 Massachusetts Institute of Technology +Copyright (c) 1988-1999, 2001 Massachusetts Institute of Technology This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,7 +16,8 @@ General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software -Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +02111-1307, USA. |# ;;;; Flow Graph Generation @@ -26,28 +27,25 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (define-structure (context (conc-name context/) (constructor context/make)) - (unconditional? false read-only true type boolean) - (static? false read-only true type boolean)) + (unconditional? #f read-only #t type boolean) + (static? #f read-only #t type boolean)) (define-integrable (context/make-initial) - (context/make true true)) + (context/make #t #t)) (define-integrable (context/make-internal) - (context/make true false)) + (context/make #t #f)) (define-integrable (context/conditional context) - (context/make false - (context/static? context))) + (context/make #f (context/static? context))) (define-integrable (context/unconditional context) - (context/make true - (context/static? context))) - + (context/make #t (context/static? context))) (define (construct-graph scode) (fluid-let ((*virtual-continuations* '()) (*global-variables* '())) - (let ((block (make-block false 'EXPRESSION))) + (let ((block (make-block #f 'EXPRESSION))) (let ((continuation (make-continuation-variable block))) (let ((expression (make-expression @@ -76,7 +74,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (set-procedure-entry-node! procedure next))))) *procedures*) (for-each (lambda (continuation) - (set-virtual-continuation/parent! continuation false)) + (set-virtual-continuation/parent! continuation #f)) *virtual-continuations*) (initialize-reference-contexts! expression *procedures*) expression))))) @@ -150,14 +148,14 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (define (continuation/rvalue continuation) (make-reference (continuation/block continuation) (continuation/parameter continuation) - true)) + #t)) (define-integrable (continuation/next-hooks continuation) (list (make-hook (continuation/entry-node continuation) set-snode-next-edge!))) (define-integrable (continuation-reference block continuation) - (cond ((variable? continuation) (make-reference block continuation true)) + (cond ((variable? continuation) (make-reference block continuation #t)) ((procedure? continuation) continuation) (else (error "Illegal continuation" continuation)))) @@ -180,7 +178,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (scfg*value->value! push (generator (cfg-entry-node push) continuation)))) - (generator false continuation))) + (generator #f continuation))) (define (make-subproblem/canonical prefix continuation) (make-subproblem prefix @@ -264,7 +262,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (define (continue/predicate-constant block continuation rvalue) block continuation ;; ignored (if (and (rvalue/constant? rvalue) - (false? (constant-value rvalue))) + (not (constant-value rvalue))) (snode->pcfg-false (make-fg-noop)) (snode->pcfg-true (make-fg-noop)))) @@ -279,12 +277,12 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. rvalue)) (define (continue/unknown block continuation rvalue) - (make-return block (make-reference block continuation true) rvalue)) + (make-return block (make-reference block continuation #t) rvalue)) (define (continue/effect block continuation rvalue) rvalue ;; ignored (if (variable? continuation) - (continue/unknown block continuation (make-constant false)) + (continue/unknown block continuation (make-constant #f)) (make-null-cfg))) (define-integrable (continue/predicate block continuation rvalue) @@ -308,13 +306,13 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. safe?)))) (define generate/variable - (make-variable-generator scode/variable-name false)) + (make-variable-generator scode/variable-name #f)) (define generate/safe-variable - (make-variable-generator scode/safe-variable-name true)) + (make-variable-generator scode/safe-variable-name #t)) (define generate/global-variable - (make-variable-generator scode/global-variable-name false)) + (make-variable-generator scode/global-variable-name #f)) (define-integrable (scode/make-safe-variable name) (cons safe-variable-tag name)) @@ -370,7 +368,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (define (generate/lambda block continuation context expression) (generate/lambda* block continuation context (context/make-internal) - expression false false)) + expression #f #f)) ;; context is the context of the lambda expression. ;; context* is the context of its subexpressions. @@ -399,7 +397,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (set-block-bound-variables! block `(,continuation ,@vars)) (if (context/static? context*) (for-each (lambda (var) - (lvalue-put! var 'STATIC true)) + (lvalue-put! var 'STATIC #t)) vars))) (let ((procedure (make-procedure @@ -413,14 +411,14 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ;; be either a constant or a procedure. (subproblem-rvalue (generate/subproblem/value block continuation - context* value false))) + context* value #f))) values) (generate/body block continuation context* declarations body*)))) (if closure-block (set-procedure-closure-context! procedure closure-block)) (if (context/unconditional? context) - (procedure-put! procedure 'UNCONDITIONAL true)) + (procedure-put! procedure 'UNCONDITIONAL #t)) (set-procedure-debugging-info! procedure (if (and @@ -441,7 +439,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (return-3 '() '() (scode/make-combination (scode/make-lambda - lambda-tag:let auxiliary '() false names '() + lambda-tag:let auxiliary '() #f names '() (scode/make-sequence (map* actions scode/make-assignment names values))) (map (lambda (name) @@ -589,14 +587,14 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (define (generate/operands expression operands block continuation context index) (let walk ((operands operands) (index index)) - (if (null? operands) - '() + (if (pair? operands) ;; This forces the order of evaluation (let ((next (generate/subproblem/value block continuation context (car operands) 'COMBINATION-OPERAND expression index))) (cons next - (walk (cdr operands) (1+ index))))))) + (walk (cdr operands) (1+ index)))) + '()))) (define (generate/operator block continuation context expression operator operands*) (let ((make-combination @@ -617,7 +615,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. context (context/unconditional context) operator (continuation/known-type continuation) - false)) + #f)) ((scode/absolute-reference? operator) (generate/global-variable block continuation* context operator)) @@ -627,10 +625,10 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. operands* push)))) ((continuation/case continuation - (lambda () (make-combination false continuation)) + (lambda () (make-combination #f continuation)) (lambda () (if (variable? continuation) - (make-combination false continuation) + (make-combination #f continuation) (with-reified-continuation block continuation scfg*scfg->scfg! @@ -674,7 +672,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (continuation/next-hooks (subproblem-continuation subproblem))) (subproblem-prefix subproblem)) (maker block (find-name block name) (subproblem-rvalue subproblem)) - (continue/effect block continuation false)))) + (continue/effect block continuation #f)))) (define (generate/assignment block continuation context expression) (scode/assignment-components expression @@ -736,7 +734,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (lambda (predicate alternative) (generate/conditional block continuation context - (scode/make-conditional predicate true alternative))))) + (scode/make-conditional predicate #t alternative))))) (define (generate/disjunction/value block continuation context expression) (scode/disjunction-components expression @@ -746,7 +744,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (scode/combination-operator predicate))) (generate/conditional block continuation context - (scode/make-conditional predicate true alternative)) + (scode/make-conditional predicate #t alternative)) (generate/combination block continuation context (let ((temp (generate-uninterned-symbol "or-predicate-"))) @@ -764,7 +762,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (boolean-valued-function-variable? (scode/absolute-reference-name operator))) (else - false))) + #f))) (define (generate/access block continuation context expression) (scode/access-components expression @@ -792,8 +790,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (make-constant (compile-recursively (scode/quotation-expression expression) - false - false)))) + #f + #f)))) ((COMPILE-PROCEDURE) (let ((process (lambda (name) @@ -801,7 +799,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (continue/rvalue-constant block continuation (make-constant - (compile-recursively expression true name))) + (compile-recursively expression #t name))) (generate/expression block continuation context expression)))) (fail @@ -871,11 +869,11 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (block-parent block) continuation context (context/make-internal) (scode/quotation-expression (car operands)) - false + #f (make-reference block (find-name block (scode/variable-name (cadr operands))) - false))))) + #f))))) (define (generate/delay block continuation context expression) (generate/combination @@ -884,7 +882,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (ucode-primitive system-pair-cons) (list (ucode-type delayed) 0 - (scode/make-lambda lambda-tag:unnamed '() '() false '() '() + (scode/make-lambda lambda-tag:unnamed '() '() #f '() '() (scode/delay-expression expression)))))) (define (generate/error-combination block continuation context expression) @@ -895,18 +893,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (scode/make-combination compiled-error-procedure (cons message irritants)))))) -(define (generate/in-package block continuation context expression) - (warn "generate/in-package: expression will be interpreted" - expression) - (scode/in-package-components expression - (lambda (environment expression) - (generate/combination - block continuation context - (scode/make-combination - (ucode-primitive scode-eval) - (list (scode/make-quotation expression) - environment)))))) - (define (generate/quotation block continuation context expression) (generate/combination block continuation context @@ -985,7 +971,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (standard-entry definition) (standard-entry delay) (standard-entry disjunction) - (standard-entry in-package) (standard-entry pair) (standard-entry quotation) (standard-entry the-environment) diff --git a/v7/src/cref/anfile.scm b/v7/src/cref/anfile.scm index d9d507eec..1b1d468b8 100644 --- a/v7/src/cref/anfile.scm +++ b/v7/src/cref/anfile.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: anfile.scm,v 1.6 1999/01/02 06:11:34 cph Exp $ +$Id: anfile.scm,v 1.7 2001/12/20 16:28:22 cph Exp $ -Copyright (c) 1988-1999 Massachusetts Institute of Technology +Copyright (c) 1988-1999, 2001 Massachusetts Institute of Technology This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,7 +16,8 @@ General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software -Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +02111-1307, USA. |# ;;;; Free/Bound Variable Analysis @@ -148,7 +149,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (DELAY ,analyze/delay) (DISJUNCTION ,analyze/disjunction) (ERROR-COMBINATION ,analyze/error-combination) - (IN-PACKAGE ,analyze/error) (LAMBDA ,analyze/lambda) (SEQUENCE ,analyze/sequence) (VARIABLE ,analyze/variable)))) diff --git a/v7/src/runtime/codwlk.scm b/v7/src/runtime/codwlk.scm index 79ec01759..31e7ebf69 100644 --- a/v7/src/runtime/codwlk.scm +++ b/v7/src/runtime/codwlk.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: codwlk.scm,v 14.3 1999/01/02 06:11:34 cph Exp $ +$Id: codwlk.scm,v 14.4 2001/12/20 16:28:22 cph Exp $ -Copyright (c) 1988, 1999 Massachusetts Institute of Technology +Copyright (c) 1988, 1999, 2001 Massachusetts Institute of Technology This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,7 +16,8 @@ General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software -Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +02111-1307, USA. |# ;;;; SCode Walker @@ -26,26 +27,25 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (define-structure (scode-walker (constructor %make-scode-walker) (conc-name scode-walker/)) - (access false read-only true) - (assignment false read-only true) - (combination false read-only true) - (comment false read-only true) - (conditional false read-only true) - (constant false read-only true) - (declaration false read-only true) - (definition false read-only true) - (delay false read-only true) - (disjunction false read-only true) - (error-combination false read-only true) - (in-package false read-only true) - (lambda false read-only true) - (open-block false read-only true) - (quotation false read-only true) - (sequence false read-only true) - (the-environment false read-only true) - (unassigned? false read-only true) - (variable false read-only true)) - + (access #f read-only #t) + (assignment #f read-only #t) + (combination #f read-only #t) + (comment #f read-only #t) + (conditional #f read-only #t) + (constant #f read-only #t) + (declaration #f read-only #t) + (definition #f read-only #t) + (delay #f read-only #t) + (disjunction #f read-only #t) + (error-combination #f read-only #t) + (lambda #f read-only #t) + (open-block #f read-only #t) + (quotation #f read-only #t) + (sequence #f read-only #t) + (the-environment #f read-only #t) + (unassigned? #f read-only #t) + (variable #f read-only #t)) + (define (make-scode-walker default alist) (let ((alist (map (lambda (entry) @@ -74,7 +74,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (lookup 'DISJUNCTION default) (lookup 'ERROR-COMBINATION combination-handler) - (lookup 'IN-PACKAGE default) (lookup 'LAMBDA default) (lookup 'OPEN-BLOCK sequence-handler) (lookup 'QUOTATION default) @@ -118,7 +117,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (DEFINITION ,walk/definition) (DELAY ,walk/delay) (DISJUNCTION ,walk/disjunction) - (IN-PACKAGE ,walk/in-package) ((LAMBDA LEXPR EXTENDED-LAMBDA) ,walk/lambda) (QUOTATION ,walk/quotation) ((SEQUENCE-2 SEQUENCE-3) ,walk/sequence) @@ -149,7 +147,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (if (open-block? expression) (scode-walker/open-block walker) (scode-walker/sequence walker))) - + (define (walk/access walker expression) expression (scode-walker/access walker)) @@ -178,10 +176,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. expression (scode-walker/disjunction walker)) -(define (walk/in-package walker expression) - expression - (scode-walker/in-package walker)) - (define (walk/lambda walker expression) expression (scode-walker/lambda walker)) diff --git a/v7/src/runtime/illdef.scm b/v7/src/runtime/illdef.scm index d0ee15169..df3aecaa0 100644 --- a/v7/src/runtime/illdef.scm +++ b/v7/src/runtime/illdef.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: illdef.scm,v 1.4 1999/01/02 06:11:34 cph Exp $ +$Id: illdef.scm,v 1.5 2001/12/20 16:28:22 cph Exp $ -Copyright (c) 1991-1999 Massachusetts Institute of Technology +Copyright (c) 1991-1999, 2001 Massachusetts Institute of Technology This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,7 +16,8 @@ General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software -Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +02111-1307, USA. |# ;;;; Check for Illegal Definitions @@ -37,7 +38,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (DEFINITION ,walk/definition) (DELAY ,walk/delay) (DISJUNCTION ,walk/disjunction) - (IN-PACKAGE ,walk/in-package) (LAMBDA ,walk/lambda) (SEQUENCE ,walk/sequence)))) unspecific) @@ -63,11 +63,11 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (lambda (name required optional rest auxiliary declarations body) name required optional rest (unscan-defines auxiliary declarations body)))))) - (if (null? (cdr expressions)) - (walk/no-definitions (car expressions)) + (if (pair? (cdr expressions)) (begin (walk/expression (car expressions) 'LEGAL) - (loop (cdr expressions)))))) + (loop (cdr expressions))) + (walk/no-definitions (car expressions))))) (define (walk/definition expression context) (case context @@ -117,9 +117,4 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (define (walk/disjunction expression context) (walk/no-definitions (disjunction-predicate expression)) (walk/expression (disjunction-alternative expression) - (if (eq? 'LEGAL context) 'UNUSUAL context))) - -(define (walk/in-package expression context) - context - (walk/no-definitions (in-package-environment expression)) - (check-for-illegal-definitions (in-package-expression expression))) \ No newline at end of file + (if (eq? 'LEGAL context) 'UNUSUAL context))) \ No newline at end of file diff --git a/v7/src/runtime/prgcop.scm b/v7/src/runtime/prgcop.scm index e767449dc..0fc063b4e 100644 --- a/v7/src/runtime/prgcop.scm +++ b/v7/src/runtime/prgcop.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: prgcop.scm,v 1.6 1999/01/02 06:06:43 cph Exp $ +$Id: prgcop.scm,v 1.7 2001/12/20 16:28:22 cph Exp $ -Copyright (c) 1990-1999 Massachusetts Institute of Technology +Copyright (c) 1990-1999, 2001 Massachusetts Institute of Technology This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,7 +16,8 @@ General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software -Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +02111-1307, USA. |# ;;;; Program copier @@ -39,7 +40,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (DEFINITION ,(%copy-pair (ucode-type DEFINITION))) (DELAY ,(%copy-pair (ucode-type DELAY))) (DISJUNCTION ,(%copy-pair (ucode-type DISJUNCTION))) - (IN-PACKAGE ,(%copy-pair (ucode-type IN-PACKAGE))) (LAMBDA ,copy-LAMBDA-object) (QUOTATION ,(%copy-pair (ucode-type QUOTATION))) (SEQUENCE ,copy-SEQUENCE-object) @@ -49,7 +49,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ;;;; Top level -(define *default/copy-constants?* false) +(define *default/copy-constants?* #f) (define *copy-constants?*) diff --git a/v7/src/runtime/runtime.pkg b/v7/src/runtime/runtime.pkg index cd41dbb21..532896433 100644 --- a/v7/src/runtime/runtime.pkg +++ b/v7/src/runtime/runtime.pkg @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: runtime.pkg,v 14.394 2001/12/20 16:13:18 cph Exp $ +$Id: runtime.pkg,v 14.395 2001/12/20 16:28:22 cph Exp $ Copyright (c) 1988-2001 Massachusetts Institute of Technology @@ -2813,10 +2813,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA delay-components delay-expression delay? - in-package-components - in-package-environment - in-package-expression - in-package? make-absolute-reference make-access make-assignment @@ -2825,7 +2821,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA make-declaration make-definition make-delay - make-in-package make-quotation make-the-environment make-variable diff --git a/v7/src/runtime/scode.scm b/v7/src/runtime/scode.scm index 14ce37de3..18a05d7ab 100644 --- a/v7/src/runtime/scode.scm +++ b/v7/src/runtime/scode.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: scode.scm,v 14.16 1999/01/02 06:11:34 cph Exp $ +$Id: scode.scm,v 14.17 2001/12/20 16:28:22 cph Exp $ -Copyright (c) 1988-1999 Massachusetts Institute of Technology +Copyright (c) 1988-1999, 2001 Massachusetts Institute of Technology This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,7 +16,8 @@ General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software -Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +02111-1307, USA. |# ;;;; SCode Abstraction @@ -34,14 +35,14 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (define (scode-constant? object) (if (vector-ref scode-constant/type-vector (object-type object)) - true + #t (and (compiled-code-address? object) (not (eq? (compiled-entry-type object) 'COMPILED-EXPRESSION))))) (define (make-scode-constant/type-vector) - (let ((type-vector (make-vector (microcode-type/code-limit) false))) + (let ((type-vector (make-vector (microcode-type/code-limit) #f))) (for-each (lambda (name) - (vector-set! type-vector (microcode-type name) true)) + (vector-set! type-vector (microcode-type name) #t)) '(BIGNUM CHARACTER COMPILED-CODE-BLOCK @@ -88,7 +89,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ;;;; Variable (define-integrable (make-variable name) - (system-hunk3-cons (ucode-type variable) name true '())) + (system-hunk3-cons (ucode-type variable) name #t '())) (define-integrable (variable? object) (object-type? (ucode-type variable) object)) @@ -239,9 +240,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (define (make-absolute-reference name . rest) (let loop ((reference (make-access system-global-environment name)) (rest rest)) - (if (null? rest) - reference - (loop (make-access reference (car rest)) (cdr rest))))) + (if (pair? rest) + (loop (make-access reference (car rest)) (cdr rest)) + reference))) (define (absolute-reference? object) (and (access? object) @@ -253,24 +254,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (define (absolute-reference-to? object name) (and (absolute-reference? object) (eq? (absolute-reference-name object) name))) - -;;;; In-Package - -(define-integrable (make-in-package environment expression) - (&typed-pair-cons (ucode-type in-package) environment expression)) - -(define-integrable (in-package? object) - (object-type? (ucode-type in-package) object)) - -(define-integrable (in-package-environment expression) - (&pair-car expression)) - -(define-integrable (in-package-expression expression) - (&pair-cdr expression)) - -(define (in-package-components expression receiver) - (receiver (in-package-environment expression) - (in-package-expression expression))) ;;;; Delay diff --git a/v7/src/runtime/unsyn.scm b/v7/src/runtime/unsyn.scm index af838f5db..d69df8ce0 100644 --- a/v7/src/runtime/unsyn.scm +++ b/v7/src/runtime/unsyn.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: unsyn.scm,v 14.21 2001/03/21 19:15:29 cph Exp $ +$Id: unsyn.scm,v 14.22 2001/12/20 16:28:22 cph Exp $ Copyright (c) 1988-2001 Massachusetts Institute of Technology @@ -37,7 +37,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA (DEFINITION ,unsyntax-DEFINITION-object) (DELAY ,unsyntax-DELAY-object) (DISJUNCTION ,unsyntax-DISJUNCTION-object) - (IN-PACKAGE ,unsyntax-IN-PACKAGE-object) (LAMBDA ,unsyntax-LAMBDA-object) (OPEN-BLOCK ,unsyntax-OPEN-BLOCK-object) (QUOTATION ,unsyntax-QUOTATION) @@ -47,14 +46,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA (VARIABLE ,unsyntax-VARIABLE-object)))) unspecific) -(define unsyntaxer:macroize? - true) - -(define unsyntaxer:show-comments? - false) - -(define unsyntaxer:elide-global-accesses? - false) +(define unsyntaxer:macroize? #t) +(define unsyntaxer:show-comments? #f) +(define unsyntaxer:elide-global-accesses? #f) (define substitutions '()) @@ -71,7 +65,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA (action object)))) (define-integrable (has-substitution? object) - (and (not (null? substitutions)) + (and (pair? substitutions) (assq object substitutions))) (define bound (list #F '())) @@ -100,10 +94,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA (define unsyntaxer/scode-walker) (define (unsyntax-objects objects) - (if (null? objects) - '() + (if (pair? objects) (cons (unsyntax-object (car objects)) - (unsyntax-objects (cdr objects))))) + (unsyntax-objects (cdr objects))) + '())) (define (unsyntax-error keyword message . irritants) (apply error @@ -145,7 +139,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA `(ACCESS ,@(unexpand-access object)))) (define (unexpand-access object) - (let loop ((object object) (separate? true)) + (let loop ((object object) (separate? #t)) (if (and separate? (access? object) (not (has-substitution? object))) @@ -207,8 +201,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA (define (unsyntax-sequence-actions seq) (let ((actions (sequence-immediate-actions seq))) (let loop ((actions actions)) - (if (null? actions) - '() + (if (pair? actions) (let ((substitution (has-substitution? (car actions)))) (cond (substitution (cons (cdr substitution) @@ -219,7 +212,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA (loop (cdr actions)))) (else (cons (unsyntax-object (car actions)) - (loop (cdr actions)))))))))) + (loop (cdr actions)))))) + '())))) (define (unsyntax-OPEN-BLOCK-object open-block) (if (eq? #t unsyntaxer:macroize?) @@ -233,12 +227,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA (define (unsyntax-DELAY-object object) `(DELAY ,(unsyntax-object (delay-expression object)))) -(define (unsyntax-IN-PACKAGE-object object) - (in-package-components object - (lambda (environment expression) - `(IN-PACKAGE ,(unsyntax-object environment) - ,@(unsyntax-sequence expression))))) - (define (unsyntax-THE-ENVIRONMENT-object object) object `(THE-ENVIRONMENT)) @@ -269,7 +257,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ,(unsyntax-object alternative))) (define (unsyntax-conditional predicate consequent alternative) - (cond ((false? alternative) + (cond ((not alternative) `(AND ,@(unexpand-conjunction predicate consequent))) ((eq? alternative undefined-conditional-branch) `(IF ,(unsyntax-object predicate) @@ -313,7 +301,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA `(,(unsyntax-object predicate) ,@(conditional-components consequent (lambda (predicate consequent alternative) - (if (false? alternative) + (if (not alternative) (unexpand-conjunction predicate consequent) `(,(unsyntax-conditional predicate consequent @@ -406,7 +394,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA (lambda-components** operator (lambda (name required optional rest body) (if (and (null? optional) - (false? rest) + (not rest) (= (length required) (length operands))) (cond ((or (eq? name lambda-tag:unnamed) (eq? name lambda-tag:let)) @@ -474,7 +462,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ;; the entire expresion to find out if it has any substitutable ;; subparts, we just treat it as malformed if there are active ;; substitutions. - (cond ((not (null? substitutions)) + (cond ((pair? substitutions) (if-malformed)) ((and (or (absolute-reference-to? operator 'SHALLOW-FLUID-BIND) (and (variable? operator) @@ -490,7 +478,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ((and (eq? operator (ucode-primitive with-saved-fluid-bindings 1)) (null? names) (null? values) - (not (null? operands)) + (pair? operands) (lambda? (car operands)) (null? (cdr operands))) (unsyntax/fluid-let/deep (car operands))) @@ -503,9 +491,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA (map extract-transfer-var (sequence-actions (lambda-body (car operands)))) (let every-other ((values values)) - (if (null? values) - '() - (cons (car values) (every-other (cddr values)))))) + (if (pair? values) + (cons (car values) (every-other (cddr values))) + '()))) ,@(lambda-components** (cadr operands) (lambda (name required optional rest body) name required optional rest diff --git a/v7/src/runtime/xeval.scm b/v7/src/runtime/xeval.scm index 6f4564282..da6286f14 100644 --- a/v7/src/runtime/xeval.scm +++ b/v7/src/runtime/xeval.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: xeval.scm,v 1.6 1999/01/02 06:19:10 cph Exp $ +$Id: xeval.scm,v 1.7 2001/12/20 16:28:23 cph Exp $ -Copyright (c) 1989-1999 Massachusetts Institute of Technology +Copyright (c) 1989-1999, 2001 Massachusetts Institute of Technology This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,7 +16,8 @@ General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software -Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +02111-1307, USA. |# ;;;; SCode Evaluator extended for compiled-code environments @@ -45,7 +46,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (open-block-components expression (lambda (names declarations body) declarations body - (not (null? names)))))) + (pair? names))))) (error "Can't perform definition in compiled-code environment:" (unsyntax expression))) @@ -102,7 +103,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (CONDITIONAL ,rewrite/conditional) (DELAY ,rewrite/delay) (DISJUNCTION ,rewrite/disjunction) - (IN-PACKAGE ,rewrite/in-package) (LAMBDA ,rewrite/lambda) (SEQUENCE ,rewrite/sequence) (THE-ENVIRONMENT ,rewrite/the-environment) @@ -205,12 +205,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. environment bound-names))) -(define (rewrite/in-package expression environment bound-names) - (make-in-package (rewrite/expression (in-package-environment expression) - environment - bound-names) - (in-package-expression expression))) - (define (rewrite/sequence expression environment bound-names) (make-sequence (rewrite/expressions (sequence-actions expression) environment diff --git a/v7/src/sf/cgen.scm b/v7/src/sf/cgen.scm index 1b398bc01..c8e2d67d8 100644 --- a/v7/src/sf/cgen.scm +++ b/v7/src/sf/cgen.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: cgen.scm,v 4.4 1999/01/02 06:19:10 cph Exp $ +$Id: cgen.scm,v 4.5 2001/12/20 16:28:23 cph Exp $ -Copyright (c) 1988-1999 Massachusetts Institute of Technology +Copyright (c) 1988-1999, 2001 Massachusetts Institute of Technology This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,7 +16,8 @@ General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software -Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +02111-1307, USA. |# ;;;; SCode Optimizer: Generate SCode from Expression @@ -157,12 +158,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (make-disjunction (cgen/expression interns (disjunction/predicate expression)) (cgen/expression interns (disjunction/alternative expression))))) - -(define-method/cgen 'IN-PACKAGE - (lambda (interns expression) - (make-in-package - (cgen/expression interns (in-package/environment expression)) - (cgen/top-level (in-package/quotation expression))))) (define-method/cgen 'PROCEDURE (lambda (interns procedure) diff --git a/v7/src/sf/chtype.scm b/v7/src/sf/chtype.scm index 0613dac2d..15ff4f83c 100644 --- a/v7/src/sf/chtype.scm +++ b/v7/src/sf/chtype.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: chtype.scm,v 4.3 1999/01/02 06:19:10 cph Exp $ +$Id: chtype.scm,v 4.4 2001/12/20 16:28:23 cph Exp $ -Copyright (c) 1988, 1993, 1999 Massachusetts Institute of Technology +Copyright (c) 1988, 1993, 1999, 2001 Massachusetts Institute of Technology This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,7 +16,8 @@ General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software -Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +02111-1307, USA. |# ;;;; SCode Optimizer: Intern object types @@ -91,11 +92,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (change-type/expression (disjunction/predicate expression)) (change-type/expression (disjunction/alternative expression)))) -(define-method/change-type 'IN-PACKAGE - (lambda (expression) - (change-type/expression (in-package/environment expression)) - (change-type/quotation (in-package/quotation expression)))) - (define-method/change-type 'PROCEDURE (lambda (expression) (change-type/expression (procedure/body expression)))) diff --git a/v7/src/sf/copy.scm b/v7/src/sf/copy.scm index cc50cde9d..30a425047 100644 --- a/v7/src/sf/copy.scm +++ b/v7/src/sf/copy.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: copy.scm,v 4.5 1999/01/02 06:19:10 cph Exp $ +$Id: copy.scm,v 4.6 2001/12/20 16:28:23 cph Exp $ -Copyright (c) 1988-1999 Massachusetts Institute of Technology +Copyright (c) 1988-1999, 2001 Massachusetts Institute of Technology This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,7 +16,8 @@ General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software -Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +02111-1307, USA. |# ;;;; SCode Optimizer: Copy Expression @@ -224,13 +225,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (copy/expression block environment (disjunction/alternative expression))))) - -(define-method/copy 'IN-PACKAGE - (lambda (block environment expression) - (in-package/make - (in-package/scode expression) - (copy/expression block environment (in-package/environment expression)) - (copy/quotation (in-package/quotation expression))))) (define-method/copy 'PROCEDURE (lambda (block environment procedure) diff --git a/v7/src/sf/free.scm b/v7/src/sf/free.scm index 29efb576c..13d046d44 100644 --- a/v7/src/sf/free.scm +++ b/v7/src/sf/free.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: free.scm,v 4.3 1999/01/02 06:19:10 cph Exp $ +$Id: free.scm,v 4.4 2001/12/20 16:28:23 cph Exp $ -Copyright (c) 1988, 1993, 1999 Massachusetts Institute of Technology +Copyright (c) 1988, 1993, 1999, 2001 Massachusetts Institute of Technology This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,7 +16,8 @@ General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software -Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +02111-1307, USA. |# ;;;; SCode Optimizer: Free Variable Analysis @@ -92,10 +93,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (set/union (free/expression (disjunction/predicate expression)) (free/expression (disjunction/alternative expression))))) -(define-method/free 'IN-PACKAGE - (lambda (expression) - (free/expression (in-package/environment expression)))) - (define-method/free 'PROCEDURE (lambda (expression) (set/difference diff --git a/v7/src/sf/object.scm b/v7/src/sf/object.scm index c444744d7..f0722cd5a 100644 --- a/v7/src/sf/object.scm +++ b/v7/src/sf/object.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: object.scm,v 4.9 1999/01/02 06:19:10 cph Exp $ +$Id: object.scm,v 4.10 2001/12/20 16:28:23 cph Exp $ -Copyright (c) 1987-1999 Massachusetts Institute of Technology +Copyright (c) 1987-1999, 2001 Massachusetts Institute of Technology This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,7 +16,8 @@ General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software -Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +02111-1307, USA. |# ;;;; SCode Optimizer: Data Types @@ -29,10 +30,10 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (define (enumeration/make names) (let ((enumerands (let loop ((names names) (index 0)) - (if (null? names) - '() - (cons (vector false (car names) index) - (loop (cdr names) (1+ index))))))) + (if (pair? names) + (cons (vector #f (car names) index) + (loop (cdr names) (1+ index))) + '())))) (let ((enumeration (cons (list->vector enumerands) (map (lambda (enumerand) @@ -45,9 +46,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (define-structure (enumerand (type vector) (conc-name enumerand/)) - (enumeration false read-only true) - (name false read-only true) - (index false read-only true)) + (enumeration #f read-only #t) + (name #f read-only #t) + (index #f read-only #t)) (define-integrable (enumeration/cardinality enumeration) (vector-length (car enumeration))) @@ -86,7 +87,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. declaration delay disjunction - in-package open-block procedure quotation @@ -114,7 +114,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (conc-name delayed-integration/) (constructor delayed-integration/make (operations value))) (state 'NOT-INTEGRATED) - (environment false) + (environment #f) operations value) @@ -126,7 +126,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (CONC-NAME ,(symbol-append name '/)) (CONSTRUCTOR ,(symbol-append name '/MAKE))) ,@(if (or (default-object? scode?) scode?) - `((scode false read-only true)) + `((scode #f read-only #t)) `()) ,@slots)))) (define-simple-type variable (block name flags) #F) @@ -138,7 +138,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (define-simple-type declaration (declarations expression)) (define-simple-type delay (expression)) (define-simple-type disjunction (predicate alternative)) - (define-simple-type in-package (environment quotation)) (define-simple-type open-block (block variables values actions optimized)) (define-simple-type procedure (block name required optional rest body)) (define-simple-type quotation (block expression)) @@ -203,8 +202,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (enumeration/name->index enumeration/expression name))) (define-integrable (global-ref/make name) - (access/make false - (constant/make false system-global-environment) + (access/make #f + (constant/make #f system-global-environment) name)) (define (global-ref? object) @@ -215,7 +214,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (access/name object))) (define-integrable (constant->integration-info constant) - (make-integration-info (constant/make false constant))) + (make-integration-info (constant/make #f constant))) (define-integrable (integration-info? object) (and (pair? object) diff --git a/v7/src/sf/sf.sf b/v7/src/sf/sf.sf index 4e740d73c..060d5dd06 100644 --- a/v7/src/sf/sf.sf +++ b/v7/src/sf/sf.sf @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: sf.sf,v 4.10 2001/12/19 21:53:03 cph Exp $ +$Id: sf.sf,v 4.11 2001/12/20 16:28:23 cph Exp $ Copyright (c) 1988-1999, 2001 Massachusetts Institute of Technology @@ -29,7 +29,6 @@ USA. DECLARATION? DELAY? DISJUNCTION? - IN-PACKAGE? OPEN-BLOCK? PROCEDURE? QUOTATION? diff --git a/v7/src/sf/subst.scm b/v7/src/sf/subst.scm index dc76dd077..3efcfc5b5 100644 --- a/v7/src/sf/subst.scm +++ b/v7/src/sf/subst.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: subst.scm,v 4.16 1999/01/02 06:06:43 cph Exp $ +$Id: subst.scm,v 4.17 2001/12/20 16:28:23 cph Exp $ -Copyright (c) 1988-1999 Massachusetts Institute of Technology +Copyright (c) 1988-1999, 2001 Massachusetts Institute of Technology This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,7 +16,8 @@ General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software -Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +02111-1307, USA. |# ;;;; SCode Optimizer: Beta Substitution @@ -634,13 +635,6 @@ you ask for. (integrate/expression operations environment (delay/expression expression))))) -(define-method/integrate 'IN-PACKAGE - (lambda (operations environment expression) - (in-package/make (in-package/scode expression) - (integrate/expression operations environment - (in-package/environment expression)) - (integrate/quotation (in-package/quotation expression))))) - (define (integrate/quotation quotation) (call-with-values (lambda () diff --git a/v7/src/sf/xform.scm b/v7/src/sf/xform.scm index aa96aae0f..9973a230a 100644 --- a/v7/src/sf/xform.scm +++ b/v7/src/sf/xform.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: xform.scm,v 4.10 2000/03/01 23:48:45 cph Exp $ +$Id: xform.scm,v 4.11 2001/12/20 16:28:23 cph Exp $ -Copyright (c) 1988-2000 Massachusetts Institute of Technology +Copyright (c) 1988-2001 Massachusetts Institute of Technology This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,7 +16,8 @@ General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software -Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +02111-1307, USA. |# ;;;; SCode Optimizer: Transform Input Expression @@ -266,13 +267,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (transform/expression block environment predicate) (transform/expression block environment alternative))))) -(define (transform/in-package block environment expression) - (in-package-components expression - (lambda (environment* expression*) - (in-package/make expression - (transform/expression block environment environment*) - (transform/quotation* false expression*))))) - (define (transform/quotation block environment expression) block environment ;ignored (transform/quotation* expression (quotation-expression expression))) @@ -304,7 +298,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (DEFINITION ,transform/definition) (DELAY ,transform/delay) (DISJUNCTION ,transform/disjunction) - (IN-PACKAGE ,transform/in-package) (LAMBDA ,transform/lambda) (OPEN-BLOCK ,transform/open-block) (QUOTATION ,transform/quotation) diff --git a/v7/src/sos/macros.scm b/v7/src/sos/macros.scm index 556e7c695..d953f1fdc 100644 --- a/v7/src/sos/macros.scm +++ b/v7/src/sos/macros.scm @@ -1,8 +1,8 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: macros.scm,v 1.10 2000/04/06 03:43:15 cph Exp $ +;;; $Id: macros.scm,v 1.11 2001/12/20 16:28:23 cph Exp $ ;;; -;;; Copyright (c) 1993-2000 Massachusetts Institute of Technology +;;; Copyright (c) 1993-2001 Massachusetts Institute of Technology ;;; ;;; This program is free software; you can redistribute it and/or ;;; modify it under the terms of the GNU General Public License as @@ -16,7 +16,8 @@ ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with this program; if not, write to the Free Software -;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;;; 02111-1307, USA. ;;;; Macros @@ -425,7 +426,6 @@ ,(lambda (name expr) (and (not (eq? name (definition-name expr))) (do-expr name (definition-value expr))))) - (IN-PACKAGE ,(lambda (name expr) name (illegal expr))) (LAMBDA ,(lambda (name expr) (lambda-components expr