From: Chris Hanson Date: Wed, 19 Dec 2001 21:39:30 +0000 (+0000) Subject: Remove explicit references to syntax tables. X-Git-Tag: 20090517-FFI~2354 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=f00715d8aa943973096fe5cf3674c376f6573601;p=mit-scheme.git Remove explicit references to syntax tables. --- diff --git a/v7/src/compiler/back/asmmac.scm b/v7/src/compiler/back/asmmac.scm index 519c64a8f..08516ca22 100644 --- a/v7/src/compiler/back/asmmac.scm +++ b/v7/src/compiler/back/asmmac.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: asmmac.scm,v 1.8 1999/01/02 06:06:43 cph Exp $ +$Id: asmmac.scm,v 1.9 2001/12/19 21:39:29 cph Exp $ -Copyright (c) 1988, 1990, 1999 Massachusetts Institute of Technology +Copyright (c) 1988, 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,15 +16,17 @@ 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. |# ;;;; Assembler Syntax Macros (declare (usual-integrations)) -(syntax-table-define assembler-syntax-table 'DEFINE-INSTRUCTION - (macro (keyword . rules) +(syntax-table/define (->environment '(COMPILER LAP-SYNTAXER)) + 'DEFINE-INSTRUCTION + (lambda (keyword . rules) `(ADD-INSTRUCTION! ',keyword ,(compile-database rules diff --git a/v7/src/compiler/base/macros.scm b/v7/src/compiler/base/macros.scm index 2fd45449d..a165f471e 100644 --- a/v7/src/compiler/base/macros.scm +++ b/v7/src/compiler/base/macros.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: macros.scm,v 4.16 1999/01/02 06:06:43 cph Exp $ +$Id: macros.scm,v 4.17 2001/12/19 21:39:29 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. |# ;;;; Compiler Macros @@ -25,46 +26,40 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (declare (usual-integrations)) (define (initialize-package!) - (for-each (lambda (entry) - (syntax-table-define compiler-syntax-table (car entry) - (cadr entry))) - `((CFG-NODE-CASE ,transform/cfg-node-case) - (DEFINE-ENUMERATION ,transform/define-enumeration) - (DEFINE-EXPORT ,transform/define-export) - (DEFINE-LVALUE ,transform/define-lvalue) - (DEFINE-PNODE ,transform/define-pnode) - (DEFINE-ROOT-TYPE ,transform/define-root-type) - (DEFINE-RTL-EXPRESSION ,transform/define-rtl-expression) - (DEFINE-RTL-PREDICATE ,transform/define-rtl-predicate) - (DEFINE-RTL-STATEMENT ,transform/define-rtl-statement) - (DEFINE-RULE ,transform/define-rule) - (DEFINE-RVALUE ,transform/define-rvalue) - (DEFINE-SNODE ,transform/define-snode) - (DEFINE-VECTOR-SLOTS ,transform/define-vector-slots) - (DESCRIPTOR-LIST ,transform/descriptor-list) - (ENUMERATION-CASE ,transform/enumeration-case) - (INST-EA ,transform/inst-ea) - (LAP ,transform/lap) - (LAST-REFERENCE ,transform/last-reference) - (MAKE-LVALUE ,transform/make-lvalue) - (MAKE-PNODE ,transform/make-pnode) - (MAKE-RVALUE ,transform/make-rvalue) - (MAKE-SNODE ,transform/make-snode) - (PACKAGE ,transform/package))) - (syntax-table-define lap-generator-syntax-table 'DEFINE-RULE - transform/define-rule)) - -(define compiler-syntax-table - (make-syntax-table syntax-table/system-internal)) - -(define lap-generator-syntax-table - (make-syntax-table compiler-syntax-table)) - -(define assembler-syntax-table - (make-syntax-table compiler-syntax-table)) - -(define early-syntax-table - (make-syntax-table compiler-syntax-table)) + (let ((compiler-env (->environment '(COMPILER))) + (lap-syntaxer-env (->environment '(COMPILER LAP-SYNTAXER)))) + (set-environment-syntax-table! compiler-env + (make-syntax-table (->environment '()))) + (for-each (lambda (entry) + (syntax-table/define compiler-env (car entry) (cadr entry))) + `((CFG-NODE-CASE ,transform/cfg-node-case) + (DEFINE-ENUMERATION ,transform/define-enumeration) + (DEFINE-EXPORT ,transform/define-export) + (DEFINE-LVALUE ,transform/define-lvalue) + (DEFINE-PNODE ,transform/define-pnode) + (DEFINE-ROOT-TYPE ,transform/define-root-type) + (DEFINE-RTL-EXPRESSION ,transform/define-rtl-expression) + (DEFINE-RTL-PREDICATE ,transform/define-rtl-predicate) + (DEFINE-RTL-STATEMENT ,transform/define-rtl-statement) + (DEFINE-RULE ,transform/define-rule) + (DEFINE-RVALUE ,transform/define-rvalue) + (DEFINE-SNODE ,transform/define-snode) + (DEFINE-VECTOR-SLOTS ,transform/define-vector-slots) + (DESCRIPTOR-LIST ,transform/descriptor-list) + (ENUMERATION-CASE ,transform/enumeration-case) + (INST-EA ,transform/inst-ea) + (LAP ,transform/lap) + (LAST-REFERENCE ,transform/last-reference) + (MAKE-LVALUE ,transform/make-lvalue) + (MAKE-PNODE ,transform/make-pnode) + (MAKE-RVALUE ,transform/make-rvalue) + (MAKE-SNODE ,transform/make-snode) + (PACKAGE ,transform/package))) + (set-environment-syntax-table! lap-syntaxer-env + (make-syntax-table compiler-env)) + (syntax-table/define lap-syntaxer-env + 'DEFINE-RULE + transform/define-rule))) (define transform/last-reference (macro (name) diff --git a/v7/src/compiler/machines/C/compiler.pkg b/v7/src/compiler/machines/C/compiler.pkg index fced4907d..4efda9e16 100644 --- a/v7/src/compiler/machines/C/compiler.pkg +++ b/v7/src/compiler/machines/C/compiler.pkg @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: compiler.pkg,v 1.10 1999/01/02 06:06:43 cph Exp $ +$Id: compiler.pkg,v 1.11 2001/12/19 21:39:29 cph Exp $ Copyright (c) 1992-1999 Massachusetts Institute of Technology @@ -109,11 +109,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (define-package (compiler macros) (files "base/macros") (parent ()) - (export (compiler) - assembler-syntax-table - compiler-syntax-table - early-syntax-table - lap-generator-syntax-table) (import (runtime macros) parse-define-syntax) (initialization (initialize-package!))) diff --git a/v7/src/compiler/machines/C/compiler.sf b/v7/src/compiler/machines/C/compiler.sf index d7766e65b..cb532981e 100644 --- a/v7/src/compiler/machines/C/compiler.sf +++ b/v7/src/compiler/machines/C/compiler.sf @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: compiler.sf,v 1.8 2001/12/17 17:40:58 cph Exp $ +$Id: compiler.sf,v 1.9 2001/12/19 21:39:29 cph Exp $ Copyright (c) 1992-1999, 2001 Massachusetts Institute of Technology @@ -55,9 +55,7 @@ USA. (sf-and-load '("base/pmlook") '(COMPILER PATTERN-MATCHER/LOOKUP)) (sf-and-load '("base/pmpars") '(COMPILER PATTERN-MATCHER/PARSER)) (sf-and-load '("rtlbase/valclass") '(COMPILER)) - (fluid-let ((sf/default-syntax-table - (access compiler-syntax-table - (->environment '(COMPILER MACROS))))) + (fluid-let ((sf/default-syntax-table (->environment '(COMPILER)))) (sf-and-load '("machines/C/machin") '(COMPILER))) (set! (access endianness (->environment '(COMPILER))) 'BIG) (sf-and-load '("back/syntax") '(COMPILER LAP-SYNTAXER)) diff --git a/v7/src/compiler/machines/C/decls.scm b/v7/src/compiler/machines/C/decls.scm index 788bee1da..199936b1b 100644 --- a/v7/src/compiler/machines/C/decls.scm +++ b/v7/src/compiler/machines/C/decls.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: decls.scm,v 1.4 1999/01/02 06:06:43 cph Exp $ +$Id: decls.scm,v 1.5 2001/12/19 21:39:29 cph Exp $ -Copyright (c) 1992-1999 Massachusetts Institute of Technology +Copyright (c) 1992-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. |# ;;;; Compiler File Dependencies @@ -343,12 +344,12 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. "ralloc" "rcompr" "rcse1" "rcse2" "rcseep" "rcseht" "rcserq" "rcsesr" "rdebug" "rdflow" "rerite" "rinvex" "rlife" "rtlcsm")) - compiler-syntax-table) + (->environment '(COMPILER))) (file-dependency/syntax/join (filename/append "machines/C" "lapgen" "rules1" "rules2" "rules3" "rules4" "rulfix" "rulflo" "cout") - lap-generator-syntax-table))) + (->environment '(COMPILER LAP-SYNTAXER))))) ;;;; Integration Dependencies diff --git a/v7/src/compiler/machines/alpha/compiler.pkg b/v7/src/compiler/machines/alpha/compiler.pkg index e6c3c1e92..e8b3f3eab 100644 --- a/v7/src/compiler/machines/alpha/compiler.pkg +++ b/v7/src/compiler/machines/alpha/compiler.pkg @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: compiler.pkg,v 1.13 1999/01/02 06:48:57 cph Exp $ +$Id: compiler.pkg,v 1.14 2001/12/19 21:39:29 cph Exp $ -Copyright (c) 1992-1999 Massachusetts Institute of Technology +Copyright (c) 1992-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,8 +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. |# ;;;; Compiler Packaging @@ -109,11 +109,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (define-package (compiler macros) (files "base/macros") (parent ()) - (export (compiler) - assembler-syntax-table - compiler-syntax-table - early-syntax-table - lap-generator-syntax-table) (import (runtime macros) parse-define-syntax) (initialization (initialize-package!))) diff --git a/v7/src/compiler/machines/alpha/compiler.sf b/v7/src/compiler/machines/alpha/compiler.sf index bd57de3c3..52a5a3e94 100644 --- a/v7/src/compiler/machines/alpha/compiler.sf +++ b/v7/src/compiler/machines/alpha/compiler.sf @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: compiler.sf,v 1.8 2001/12/17 17:40:58 cph Exp $ +$Id: compiler.sf,v 1.9 2001/12/19 21:39:29 cph Exp $ Copyright (c) 1992-1999, 2001 Massachusetts Institute of Technology @@ -55,9 +55,7 @@ USA. (sf-and-load '("base/pmlook") '(COMPILER PATTERN-MATCHER/LOOKUP)) (sf-and-load '("base/pmpars") '(COMPILER PATTERN-MATCHER/PARSER)) (sf-and-load '("rtlbase/valclass") '(COMPILER)) - (fluid-let ((sf/default-syntax-table - (access compiler-syntax-table - (->environment '(COMPILER MACROS))))) + (fluid-let ((sf/default-syntax-table (->environment '(COMPILER)))) (sf-and-load '("machines/alpha/machin") '(COMPILER))) (set! (access endianness (->environment '(COMPILER))) 'LITTLE) (fluid-let ((sf/default-declarations @@ -87,8 +85,7 @@ USA. (newline) (for-each (lambda (name) (load (string-append "machines/alpha/" name ".scm") - '(COMPILER LAP-SYNTAXER) - early-syntax-table)) + '(COMPILER LAP-SYNTAXER))) '("instr1" "instr2" "instr3"))))) ;; Resyntax any files that need it. diff --git a/v7/src/compiler/machines/alpha/decls.scm b/v7/src/compiler/machines/alpha/decls.scm index 917ffcd87..a33329a46 100644 --- a/v7/src/compiler/machines/alpha/decls.scm +++ b/v7/src/compiler/machines/alpha/decls.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: decls.scm,v 1.6 1999/01/02 06:48:57 cph Exp $ +$Id: decls.scm,v 1.7 2001/12/19 21:39:29 cph Exp $ -Copyright (c) 1992-1999 Massachusetts Institute of Technology +Copyright (c) 1992-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,8 +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. |# ;;;; Compiler File Dependencies @@ -347,16 +347,13 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. "ralloc" "rcompr" "rcse1" "rcse2" "rcseep" "rcseht" "rcserq" "rcsesr" "rdebug" "rdflow" "rerite" "rinvex" "rlife" "rtlcsm")) - compiler-syntax-table) + (->environment '(COMPILER))) (file-dependency/syntax/join (filename/append "machines/alpha" "lapgen" "rules1" "rules2" "rules3" "rules4" "rulfix" "rulflo" - ) - lap-generator-syntax-table) - (file-dependency/syntax/join - (filename/append "machines/alpha" "instr1" "instr2" "instr3") - assembler-syntax-table))) + "instr1" "instr2" "instr3") + (->environment '(COMPILER LAP-SYNTAXER))))) ;;;; Integration Dependencies diff --git a/v7/src/compiler/machines/alpha/inerly.scm b/v7/src/compiler/machines/alpha/inerly.scm index c6ac73e0e..102b3307d 100644 --- a/v7/src/compiler/machines/alpha/inerly.scm +++ b/v7/src/compiler/machines/alpha/inerly.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: inerly.scm,v 1.2 1999/01/02 06:48:57 cph Exp $ +$Id: inerly.scm,v 1.3 2001/12/19 21:39:29 cph Exp $ -Copyright (c) 1992-1999 Massachusetts Institute of Technology +Copyright (c) 1992-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,8 +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. |# ;;; Alpha Instruction Set Macros. Early version @@ -44,8 +44,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ;;; Instruction and addressing mode macros -(syntax-table-define early-syntax-table 'DEFINE-INSTRUCTION - (macro (opcode . patterns) +(syntax-table/define (->environment '(COMPILER)) + 'DEFINE-INSTRUCTION + (lambda (opcode . patterns) `(SET! EARLY-INSTRUCTIONS (CONS (LIST ',opcode diff --git a/v7/src/compiler/machines/alpha/insmac.scm b/v7/src/compiler/machines/alpha/insmac.scm index b8d2e7c63..d4cdf560d 100644 --- a/v7/src/compiler/machines/alpha/insmac.scm +++ b/v7/src/compiler/machines/alpha/insmac.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: insmac.scm,v 1.2 1999/01/02 06:48:57 cph Exp $ +$Id: insmac.scm,v 1.3 2001/12/19 21:39:29 cph Exp $ -Copyright (c) 1992-1999 Massachusetts Institute of Technology +Copyright (c) 1992-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,8 +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. |# ;;;; Alpha Instruction Set Macros @@ -27,8 +27,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ;;;; Definition macros -(syntax-table-define assembler-syntax-table 'DEFINE-SYMBOL-TRANSFORMER - (macro (name . alist) +(syntax-table/define (->environment '(COMPILER LAP-SYNTAXER)) + 'DEFINE-SYMBOL-TRANSFORMER + (lambda (name . alist) `(BEGIN (DECLARE (INTEGRATE-OPERATOR ,name)) (DEFINE (,name SYMBOL) @@ -38,8 +39,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #F (CDR PLACE))))))) -(syntax-table-define assembler-syntax-table 'DEFINE-TRANSFORMER - (macro (name value) +(syntax-table/define (->environment '(COMPILER LAP-SYNTAXER)) + 'DEFINE-TRANSFORMER + (lambda (name value) `(DEFINE ,name ,value))) ;;;; Fixed width instruction parsing diff --git a/v7/src/compiler/machines/alpha/lapgen.scm b/v7/src/compiler/machines/alpha/lapgen.scm index 594b8b66d..42b8fd976 100644 --- a/v7/src/compiler/machines/alpha/lapgen.scm +++ b/v7/src/compiler/machines/alpha/lapgen.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: lapgen.scm,v 1.6 1999/01/02 06:48:57 cph Exp $ +$Id: lapgen.scm,v 1.7 2001/12/19 21:39:29 cph Exp $ -Copyright (c) 1992-1999 Massachusetts Institute of Technology +Copyright (c) 1992-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,13 +16,12 @@ 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. |# ;;;; RTL Rules for Alpha. Shared utilities. ;; Package: (compiler lap-syntaxer) -;; Syntax: lap-generator-syntax-table (declare (usual-integrations)) diff --git a/v7/src/compiler/machines/alpha/rules1.scm b/v7/src/compiler/machines/alpha/rules1.scm index a28477d0d..29cad2e55 100644 --- a/v7/src/compiler/machines/alpha/rules1.scm +++ b/v7/src/compiler/machines/alpha/rules1.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: rules1.scm,v 1.3 1999/01/02 06:48:57 cph Exp $ +$Id: rules1.scm,v 1.4 2001/12/19 21:39:29 cph Exp $ -Copyright (c) 1992-1999 Massachusetts Institute of Technology +Copyright (c) 1992-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,13 +16,12 @@ 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. |# ;;;; LAP Generation Rules: Data Transfers ;; Package: (compiler lap-syntaxer) -;; Syntax: lap-generator-syntax-table (declare (usual-integrations)) diff --git a/v7/src/compiler/machines/alpha/rules2.scm b/v7/src/compiler/machines/alpha/rules2.scm index 89220ca69..4111b7a26 100644 --- a/v7/src/compiler/machines/alpha/rules2.scm +++ b/v7/src/compiler/machines/alpha/rules2.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: rules2.scm,v 1.2 1999/01/02 06:48:57 cph Exp $ +$Id: rules2.scm,v 1.3 2001/12/19 21:39:30 cph Exp $ -Copyright (c) 1992-1999 Massachusetts Institute of Technology +Copyright (c) 1992-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,13 +16,12 @@ 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. |# ;;;; LAP Generation Rules: Predicates ;; Package: (compiler lap-syntaxer) -;; Syntax: lap-generator-syntax-table (declare (usual-integrations)) diff --git a/v7/src/compiler/machines/alpha/rules3.scm b/v7/src/compiler/machines/alpha/rules3.scm index 7f6ec8f5f..46f63fcf8 100644 --- a/v7/src/compiler/machines/alpha/rules3.scm +++ b/v7/src/compiler/machines/alpha/rules3.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: rules3.scm,v 1.7 1999/01/02 06:48:57 cph Exp $ +$Id: rules3.scm,v 1.8 2001/12/19 21:39:30 cph Exp $ -Copyright (c) 1992-1999 Massachusetts Institute of Technology +Copyright (c) 1992-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,13 +16,12 @@ 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. |# ;;;; LAP Generation Rules: Invocations and Entries (Alpha) ;; Package: (compiler lap-syntaxer) -;; Syntax: lap-generator-syntax-table (declare (usual-integrations)) diff --git a/v7/src/compiler/machines/alpha/rules4.scm b/v7/src/compiler/machines/alpha/rules4.scm index 6e32f68fa..71a22b321 100644 --- a/v7/src/compiler/machines/alpha/rules4.scm +++ b/v7/src/compiler/machines/alpha/rules4.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: rules4.scm,v 1.3 1999/01/02 06:48:57 cph Exp $ +$Id: rules4.scm,v 1.4 2001/12/19 21:39:30 cph Exp $ -Copyright (c) 1992-1999 Massachusetts Institute of Technology +Copyright (c) 1992-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,13 +16,12 @@ 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. |# ;;;; LAP Generation Rules: Interpreter Calls ;; Package: (compiler lap-syntaxer) -;; Syntax: lap-generator-syntax-table (declare (usual-integrations)) diff --git a/v7/src/compiler/machines/alpha/rulfix.scm b/v7/src/compiler/machines/alpha/rulfix.scm index d280fb45a..d86dd5069 100644 --- a/v7/src/compiler/machines/alpha/rulfix.scm +++ b/v7/src/compiler/machines/alpha/rulfix.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: rulfix.scm,v 1.4 1999/01/02 06:48:57 cph Exp $ +$Id: rulfix.scm,v 1.5 2001/12/19 21:39:30 cph Exp $ -Copyright (c) 1992-1999 Massachusetts Institute of Technology +Copyright (c) 1992-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,13 +16,12 @@ 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. |# ;;;; LAP Generation Rules: Fixnum Rules ;; Package: (compiler lap-syntaxer) -;; Syntax: lap-generator-syntax-table (declare (usual-integrations)) diff --git a/v7/src/compiler/machines/alpha/rulflo.scm b/v7/src/compiler/machines/alpha/rulflo.scm index 0146d9f75..0fed1c9fa 100644 --- a/v7/src/compiler/machines/alpha/rulflo.scm +++ b/v7/src/compiler/machines/alpha/rulflo.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: rulflo.scm,v 1.3 1999/01/02 06:48:57 cph Exp $ +$Id: rulflo.scm,v 1.4 2001/12/19 21:39:30 cph Exp $ -Copyright (c) 1992-1999 Massachusetts Institute of Technology +Copyright (c) 1992-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,13 +16,12 @@ 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. |# ;;;; LAP Generation Rules: Flonum rules ;; Package: (compiler lap-syntaxer) -;; Syntax: lap-generator-syntax-table (declare (usual-integrations)) diff --git a/v7/src/compiler/machines/bobcat/compiler.pkg b/v7/src/compiler/machines/bobcat/compiler.pkg index cd34e17f2..26e7a192c 100644 --- a/v7/src/compiler/machines/bobcat/compiler.pkg +++ b/v7/src/compiler/machines/bobcat/compiler.pkg @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: compiler.pkg,v 1.50 1999/01/02 06:06:43 cph Exp $ +$Id: compiler.pkg,v 1.51 2001/12/19 21:39:30 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. |# ;;;; Compiler Packaging @@ -109,11 +110,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (define-package (compiler macros) (files "base/macros") (parent ()) - (export (compiler) - assembler-syntax-table - compiler-syntax-table - early-syntax-table - lap-generator-syntax-table) (import (runtime macros) parse-define-syntax) (initialization (initialize-package!))) diff --git a/v7/src/compiler/machines/bobcat/compiler.sf b/v7/src/compiler/machines/bobcat/compiler.sf index db637802a..819e18600 100644 --- a/v7/src/compiler/machines/bobcat/compiler.sf +++ b/v7/src/compiler/machines/bobcat/compiler.sf @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: compiler.sf,v 1.20 2001/12/17 17:40:58 cph Exp $ +$Id: compiler.sf,v 1.21 2001/12/19 21:39:30 cph Exp $ Copyright (c) 1988-1999, 2001 Massachusetts Institute of Technology @@ -54,9 +54,7 @@ USA. ((access initialize-package! environment))) (sf-and-load '("base/pmlook") '(COMPILER PATTERN-MATCHER/LOOKUP)) (sf-and-load '("base/pmpars") '(COMPILER PATTERN-MATCHER/PARSER)) - (fluid-let ((sf/default-syntax-table - (access compiler-syntax-table - (->environment '(COMPILER MACROS))))) + (fluid-let ((sf/default-syntax-table (->environment '(COMPILER)))) (sf-and-load '("machines/bobcat/machin") '(COMPILER))) (fluid-let ((sf/default-declarations '((integrate-external "insseq") @@ -85,8 +83,7 @@ USA. (newline) (for-each (lambda (name) (load (string-append "machines/bobcat/" name ".scm") - '(COMPILER LAP-SYNTAXER) - early-syntax-table)) + '(COMPILER LAP-SYNTAXER))) '("instr1" "instr2" "instr3" "instr4" "flinstr1" "flinstr2"))))) diff --git a/v7/src/compiler/machines/bobcat/decls.scm b/v7/src/compiler/machines/bobcat/decls.scm index 783b1b542..a6e936bc8 100644 --- a/v7/src/compiler/machines/bobcat/decls.scm +++ b/v7/src/compiler/machines/bobcat/decls.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: decls.scm,v 4.37 1999/01/02 06:06:43 cph Exp $ +$Id: decls.scm,v 4.38 2001/12/19 21:39:30 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. |# ;;;; Compiler File Dependencies @@ -346,16 +347,13 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. "ralloc" "rcompr" "rcse1" "rcse2" "rcseep" "rcseht" "rcserq" "rcsesr" "rdebug" "rdflow" "rerite" "rinvex" "rlife" "rtlcsm")) - compiler-syntax-table) - (file-dependency/syntax/join - (filename/append "machines/bobcat" - "lapgen" "rules1" "rules2" "rules3" "rules4") - lap-generator-syntax-table) + (->environment '(COMPILER))) (file-dependency/syntax/join (filename/append "machines/bobcat" + "lapgen" "rules1" "rules2" "rules3" "rules4" "insutl" "instr1" "instr2" "instr3" "instr4" "flinstr1" "flinstr2") - assembler-syntax-table))) + (->environment '(COMPILER LAP-SYNTAXER))))) ;;;; Integration Dependencies diff --git a/v7/src/compiler/machines/bobcat/inerly.scm b/v7/src/compiler/machines/bobcat/inerly.scm index aa491bddd..b5b1f1389 100644 --- a/v7/src/compiler/machines/bobcat/inerly.scm +++ b/v7/src/compiler/machines/bobcat/inerly.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: inerly.scm,v 1.8 1999/01/02 06:06:43 cph Exp $ +$Id: inerly.scm,v 1.9 2001/12/19 21:39:30 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. |# ;;;; 68000 Instruction Set Macros. Early version @@ -53,23 +54,27 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (and (memq (car s1) s2) (eq-subset? (cdr s1) s2)))) -(syntax-table-define early-syntax-table 'DEFINE-EA-TRANSFORMER - (macro (name . restrictions) +(syntax-table/define (->environment '(COMPILER)) + 'DEFINE-EA-TRANSFORMER + (lambda (name . restrictions) `(DEFINE-EARLY-TRANSFORMER ',name (APPLY MAKE-EA-TRANSFORMER ',restrictions)))) -(syntax-table-define early-syntax-table 'DEFINE-SYMBOL-TRANSFORMER - (macro (name . assoc) +(syntax-table/define (->environment '(COMPILER)) + 'DEFINE-SYMBOL-TRANSFORMER + (lambda (name . assoc) `(DEFINE-EARLY-TRANSFORMER ',name (MAKE-SYMBOL-TRANSFORMER ',assoc)))) -(syntax-table-define early-syntax-table 'DEFINE-REG-LIST-TRANSFORMER - (macro (name . assoc) +(syntax-table/define (->environment '(COMPILER)) + 'DEFINE-REG-LIST-TRANSFORMER + (lambda (name . assoc) `(DEFINE-EARLY-TRANSFORMER ',name (MAKE-BIT-MASK-TRANSFORMER 16 ',assoc)))) ;;;; Instruction and addressing mode macros -(syntax-table-define early-syntax-table 'DEFINE-INSTRUCTION - (macro (opcode . patterns) +(syntax-table/define (->environment '(COMPILER)) + 'DEFINE-INSTRUCTION + (lambda (opcode . patterns) `(SET! EARLY-INSTRUCTIONS (CONS (LIST ',opcode @@ -88,8 +93,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. patterns)) EARLY-INSTRUCTIONS)))) -(syntax-table-define early-syntax-table 'EXTENSION-WORD - (macro descriptors +(syntax-table/define (->environment '(COMPILER)) + 'EXTENSION-WORD + (lambda descriptors (expand-descriptors descriptors (lambda (instruction size source destination) (if (or source destination) @@ -98,8 +104,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (error "EXTENSION-WORD: Extensions must be 16 bit multiples" size)) (optimize-group-syntax instruction true))))) -(syntax-table-define early-syntax-table 'VARIABLE-EXTENSION - (macro (binding . clauses) +(syntax-table/define (->environment '(COMPILER)) + 'VARIABLE-EXTENSION + (lambda (binding . clauses) (variable-width-expression-syntaxer (car binding) (cadr binding) @@ -113,8 +120,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ;;; *** NOTE: If this format changes, insutl.scm must also be changed! *** -(syntax-table-define early-syntax-table 'DEFINE-EA-DATABASE - (macro rules +(syntax-table/define (->environment '(COMPILER)) + 'DEFINE-EA-DATABASE + (lambda rules `(SET! EARLY-EA-DATABASE (LIST ,@(map (lambda (rule) diff --git a/v7/src/compiler/machines/bobcat/insmac.scm b/v7/src/compiler/machines/bobcat/insmac.scm index 136976229..8749a5cca 100644 --- a/v7/src/compiler/machines/bobcat/insmac.scm +++ b/v7/src/compiler/machines/bobcat/insmac.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: insmac.scm,v 1.127 1999/01/02 06:06:43 cph Exp $ +$Id: insmac.scm,v 1.128 2001/12/19 21:39:30 cph Exp $ -Copyright (c) 1988, 1990, 1999 Massachusetts Institute of Technology +Copyright (c) 1988, 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. |# ;;;; 68000 Instruction Set Macros @@ -28,8 +29,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (define ea-database-name 'EA-DATABASE) -(syntax-table-define assembler-syntax-table 'DEFINE-EA-DATABASE - (macro rules +(syntax-table/define (->environment '(COMPILER LAP-SYNTAXER)) + 'DEFINE-EA-DATABASE + (lambda rules `(DEFINE ,ea-database-name ,(compile-database rules (lambda (pattern actions) @@ -37,8 +39,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (make-position-dependent pattern actions) (make-position-independent pattern actions))))))) -(syntax-table-define assembler-syntax-table 'EXTENSION-WORD - (macro descriptors +(syntax-table/define (->environment '(COMPILER LAP-SYNTAXER)) + 'EXTENSION-WORD + (lambda descriptors (expand-descriptors descriptors (lambda (instruction size source destination) (if (or source destination) @@ -48,8 +51,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (error "EXTENSION-WORD: Extensions must be 16 bit multiples" size))))))) -(syntax-table-define assembler-syntax-table 'VARIABLE-EXTENSION - (macro (binding . clauses) +(syntax-table/define (->environment '(COMPILER LAP-SYNTAXER)) + 'VARIABLE-EXTENSION + (lambda (binding . clauses) (variable-width-expression-syntaxer (car binding) (cadr binding) @@ -114,8 +118,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ;;;; Transformers -(syntax-table-define assembler-syntax-table 'DEFINE-EA-TRANSFORMER - (macro (name #!optional categories keywords) +(syntax-table/define (->environment '(COMPILER LAP-SYNTAXER)) + 'DEFINE-EA-TRANSFORMER + (lambda (name #!optional categories keywords) (define (filter special generator extraction) (define (multiple rem) (if (null? rem) @@ -148,8 +153,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. `(ea-keyword ea))) ea)))))))) -(syntax-table-define assembler-syntax-table 'DEFINE-SYMBOL-TRANSFORMER - (macro (name . alist) +(syntax-table/define (->environment '(COMPILER LAP-SYNTAXER)) + 'DEFINE-SYMBOL-TRANSFORMER + (lambda (name . alist) `(begin (declare (integrate-operator ,name)) (define (,name symbol) @@ -159,8 +165,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #F (cdr place))))))) -(syntax-table-define assembler-syntax-table 'DEFINE-REG-LIST-TRANSFORMER - (macro (name . alist) +(syntax-table/define (->environment '(COMPILER LAP-SYNTAXER)) + 'DEFINE-REG-LIST-TRANSFORMER + (lambda (name . alist) `(begin (declare (integrate-operator ,name)) (define (,name reg-list) diff --git a/v7/src/compiler/machines/i386/compiler.pkg b/v7/src/compiler/machines/i386/compiler.pkg index f1bed1284..bd7bcab2b 100644 --- a/v7/src/compiler/machines/i386/compiler.pkg +++ b/v7/src/compiler/machines/i386/compiler.pkg @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: compiler.pkg,v 1.24 1999/01/02 06:06:43 cph Exp $ +$Id: compiler.pkg,v 1.25 2001/12/19 21:39:30 cph Exp $ -Copyright (c) 1992-1999 Massachusetts Institute of Technology +Copyright (c) 1992-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. |# ;;;; Compiler Packaging @@ -109,12 +110,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (define-package (compiler macros) (files "base/macros") - (parent ()) - (export (compiler) - assembler-syntax-table - compiler-syntax-table - early-syntax-table - lap-generator-syntax-table) + (parent (compiler)) (import (runtime macros) parse-define-syntax) (initialization (initialize-package!))) diff --git a/v7/src/compiler/machines/i386/compiler.sf b/v7/src/compiler/machines/i386/compiler.sf index 907a517dc..8908f92e3 100644 --- a/v7/src/compiler/machines/i386/compiler.sf +++ b/v7/src/compiler/machines/i386/compiler.sf @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: compiler.sf,v 1.14 2001/12/17 17:40:58 cph Exp $ +$Id: compiler.sf,v 1.15 2001/12/19 21:39:30 cph Exp $ Copyright (c) 1992-2001 Massachusetts Institute of Technology @@ -54,9 +54,7 @@ USA. ((access initialize-package! environment))) (sf-and-load '("base/pmlook") '(COMPILER PATTERN-MATCHER/LOOKUP)) (sf-and-load '("base/pmpars") '(COMPILER PATTERN-MATCHER/PARSER)) - (fluid-let ((sf/default-syntax-table - (access compiler-syntax-table - (->environment '(COMPILER MACROS))))) + (fluid-let ((sf/default-syntax-table (->environment '(COMPILER)))) (sf-and-load '("machines/i386/machin") '(COMPILER))) (fluid-let ((sf/default-declarations '((integrate-external "insseq") @@ -85,8 +83,7 @@ USA. (newline) (for-each (lambda (name) (load (string-append "machines/i386/" name ".scm") - '(COMPILER LAP-SYNTAXER) - early-syntax-table)) + '(COMPILER LAP-SYNTAXER))) '("insutl" "instr1" "instr2" "instrf"))))) ;; Resyntax any files that need it. diff --git a/v7/src/compiler/machines/i386/decls.scm b/v7/src/compiler/machines/i386/decls.scm index 92a1bd0ef..19b4e94a6 100644 --- a/v7/src/compiler/machines/i386/decls.scm +++ b/v7/src/compiler/machines/i386/decls.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: decls.scm,v 1.9 2000/01/10 03:54:25 cph Exp $ +$Id: decls.scm,v 1.10 2001/12/19 21:39:30 cph Exp $ Copyright (c) 1992-2000 Massachusetts Institute of Technology @@ -363,15 +363,13 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. "ralloc" "rcompr" "rcse1" "rcse2" "rcseep" "rcseht" "rcserq" "rcsesr" "rdebug" "rdflow" "rerite" "rinvex" "rlife" "rtlcsm")) - compiler-syntax-table) + (->environment '(COMPILER))) (file-dependency/syntax/join (filename/append "machines/i386" "lapgen" - "rules1" "rules2" "rules3" "rules4" "rulfix" "rulflo") - lap-generator-syntax-table) - (file-dependency/syntax/join - (filename/append "machines/i386" "insutl" "instr1" "instr2" "instrf") - assembler-syntax-table))) + "rules1" "rules2" "rules3" "rules4" "rulfix" "rulflo" + "insutl" "instr1" "instr2" "instrf") + (->environment '(COMPILER LAP-SYNTAXER))))) ;;;; Integration Dependencies diff --git a/v7/src/compiler/machines/i386/inerly.scm b/v7/src/compiler/machines/i386/inerly.scm index e33d053bc..3023d3591 100644 --- a/v7/src/compiler/machines/i386/inerly.scm +++ b/v7/src/compiler/machines/i386/inerly.scm @@ -1,9 +1,8 @@ #| -*-Scheme-*- -$Id: inerly.scm,v 1.3 1999/01/02 06:06:43 cph Exp $ -$MC68020-Header: inerly.scm,v 1.6 88/08/31 06:00:59 GMT cph Exp $ +$Id: inerly.scm,v 1.4 2001/12/19 21:39:30 cph Exp $ -Copyright (c) 1992, 1999 Massachusetts Institute of Technology +Copyright (c) 1992, 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 @@ -17,14 +16,15 @@ 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. |# ;;; i386 Instruction Set Macros. Early version ;;; NOPs for now. (declare (usual-integrations)) - + ;;;; Transformers and utilities (define early-instructions '()) @@ -42,8 +42,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ;;; Instruction and addressing mode macros -(syntax-table-define early-syntax-table 'DEFINE-INSTRUCTION - (macro (opcode . patterns) +(syntax-table/define (->environment '(COMPILER LAP-SYNTAXER)) + 'DEFINE-INSTRUCTION + (lambda (opcode . patterns) `(SET! EARLY-INSTRUCTIONS (CONS (LIST ',opcode diff --git a/v7/src/compiler/machines/i386/insmac.scm b/v7/src/compiler/machines/i386/insmac.scm index 1d147feca..5f8849196 100644 --- a/v7/src/compiler/machines/i386/insmac.scm +++ b/v7/src/compiler/machines/i386/insmac.scm @@ -1,9 +1,8 @@ #| -*-Scheme-*- -$Id: insmac.scm,v 1.11 1999/01/02 06:06:43 cph Exp $ -$Vax-Header: insmac.scm,v 1.12 89/05/17 20:29:15 GMT jinx Exp $ +$Id: insmac.scm,v 1.12 2001/12/19 21:39:30 cph Exp $ -Copyright (c) 1992, 1999 Massachusetts Institute of Technology +Copyright (c) 1992, 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 @@ -17,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. |# ;;;; Intel 386 Instruction Set Macros @@ -29,8 +29,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (define ea-database-name 'EA-DATABASE) -(syntax-table-define assembler-syntax-table 'DEFINE-EA-DATABASE - (macro rules +(syntax-table/define (->environment '(COMPILER LAP-SYNTAXER)) + 'DEFINE-EA-DATABASE + (lambda rules `(DEFINE ,ea-database-name ,(compile-database rules (lambda (pattern actions) @@ -54,8 +55,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ;; This one is necessary to distinguish between r/mW mW, etc. -(syntax-table-define assembler-syntax-table 'DEFINE-EA-TRANSFORMER - (macro (name #!optional restriction) +(syntax-table/define (->environment '(COMPILER LAP-SYNTAXER)) + 'DEFINE-EA-TRANSFORMER + (lambda (name #!optional restriction) (if (default-object? restriction) `(define (,name expression) (let ((match-result (pattern-lookup ,ea-database-name expression))) diff --git a/v7/src/compiler/machines/mips/compiler.pkg b/v7/src/compiler/machines/mips/compiler.pkg index ec7862dc9..50dde456c 100644 --- a/v7/src/compiler/machines/mips/compiler.pkg +++ b/v7/src/compiler/machines/mips/compiler.pkg @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: compiler.pkg,v 1.20 1999/01/02 06:06:43 cph Exp $ +$Id: compiler.pkg,v 1.21 2001/12/19 21:39:30 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. |# ;;;; Compiler Packaging @@ -109,11 +110,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (define-package (compiler macros) (files "base/macros") (parent ()) - (export (compiler) - assembler-syntax-table - compiler-syntax-table - early-syntax-table - lap-generator-syntax-table) (import (runtime macros) parse-define-syntax) (initialization (initialize-package!))) diff --git a/v7/src/compiler/machines/mips/compiler.sf-big b/v7/src/compiler/machines/mips/compiler.sf-big index 7dce83ba1..7375b4c7d 100644 --- a/v7/src/compiler/machines/mips/compiler.sf-big +++ b/v7/src/compiler/machines/mips/compiler.sf-big @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: compiler.sf-big,v 1.10 2001/12/17 17:40:58 cph Exp $ +$Id: compiler.sf-big,v 1.11 2001/12/19 21:39:30 cph Exp $ Copyright (c) 1988-1999, 2001 Massachusetts Institute of Technology @@ -55,9 +55,7 @@ USA. (sf-and-load '("base/pmlook") '(COMPILER PATTERN-MATCHER/LOOKUP)) (sf-and-load '("base/pmpars") '(COMPILER PATTERN-MATCHER/PARSER)) (sf-and-load '("rtlbase/valclass") '(COMPILER)) - (fluid-let ((sf/default-syntax-table - (access compiler-syntax-table - (->environment '(COMPILER MACROS))))) + (fluid-let ((sf/default-syntax-table (->environment '(COMPILER)))) (sf-and-load '("machines/mips/machin") '(COMPILER))) (set! (access endianness (->environment '(COMPILER))) 'BIG) (fluid-let ((sf/default-declarations @@ -87,8 +85,7 @@ USA. (newline) (for-each (lambda (name) (load (string-append "machines/mips/" name ".scm") - '(COMPILER LAP-SYNTAXER) - early-syntax-table)) + '(COMPILER LAP-SYNTAXER))) '("instr1" "instr2a" "instr2b" "instr3"))))) ;; Resyntax any files that need it. diff --git a/v7/src/compiler/machines/mips/compiler.sf-little b/v7/src/compiler/machines/mips/compiler.sf-little index 18da376f8..d776ce8f5 100644 --- a/v7/src/compiler/machines/mips/compiler.sf-little +++ b/v7/src/compiler/machines/mips/compiler.sf-little @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: compiler.sf-little,v 1.10 2001/12/17 17:40:58 cph Exp $ +$Id: compiler.sf-little,v 1.11 2001/12/19 21:39:30 cph Exp $ Copyright (c) 1988-1999, 2001 Massachusetts Institute of Technology @@ -55,9 +55,7 @@ USA. (sf-and-load '("base/pmlook") '(COMPILER PATTERN-MATCHER/LOOKUP)) (sf-and-load '("base/pmpars") '(COMPILER PATTERN-MATCHER/PARSER)) (sf-and-load '("rtlbase/valclass") '(COMPILER)) - (fluid-let ((sf/default-syntax-table - (access compiler-syntax-table - (->environment '(COMPILER MACROS))))) + (fluid-let ((sf/default-syntax-table (->environment '(COMPILER)))) (sf-and-load '("machines/mips/machin") '(COMPILER))) (set! (access endianness (->environment '(COMPILER))) 'LITTLE) (fluid-let ((sf/default-declarations @@ -87,8 +85,7 @@ USA. (newline) (for-each (lambda (name) (load (string-append "machines/mips/" name ".scm") - '(COMPILER LAP-SYNTAXER) - early-syntax-table)) + '(COMPILER LAP-SYNTAXER))) '("instr1" "instr2a" "instr2b" "instr3"))))) ;; Resyntax any files that need it. diff --git a/v7/src/compiler/machines/mips/decls.scm b/v7/src/compiler/machines/mips/decls.scm index 70b7f6914..076d48839 100644 --- a/v7/src/compiler/machines/mips/decls.scm +++ b/v7/src/compiler/machines/mips/decls.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: decls.scm,v 1.10 1999/01/02 06:06:43 cph Exp $ +$Id: decls.scm,v 1.11 2001/12/19 21:39:30 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. |# ;;;; Compiler File Dependencies @@ -346,16 +347,13 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. "ralloc" "rcompr" "rcse1" "rcse2" "rcseep" "rcseht" "rcserq" "rcsesr" "rdebug" "rdflow" "rerite" "rinvex" "rlife" "rtlcsm")) - compiler-syntax-table) + (->environment '(COMPILER))) (file-dependency/syntax/join (filename/append "machines/mips" "lapgen" "rules1" "rules2" "rules3" "rules4" "rulfix" "rulflo" - ) - lap-generator-syntax-table) - (file-dependency/syntax/join - (filename/append "machines/mips" "instr1" "instr2a" "instr2b" "instr3") - assembler-syntax-table))) + "instr1" "instr2a" "instr2b" "instr3") + (->environment '(COMPILER LAP-SYNTAXER))))) ;;;; Integration Dependencies diff --git a/v7/src/compiler/machines/mips/inerly.scm b/v7/src/compiler/machines/mips/inerly.scm index d1e31ca21..429c5767a 100644 --- a/v7/src/compiler/machines/mips/inerly.scm +++ b/v7/src/compiler/machines/mips/inerly.scm @@ -1,9 +1,8 @@ #| -*-Scheme-*- -$Id: inerly.scm,v 1.2 1999/01/02 06:06:43 cph Exp $ -$MC68020-Header: inerly.scm,v 1.6 88/08/31 06:00:59 GMT cph Exp $ +$Id: inerly.scm,v 1.3 2001/12/19 21:39:30 cph Exp $ -Copyright (c) 1988, 1989, 1990, 1999 Massachusetts Institute of Technology +Copyright (c) 1988, 1989, 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 @@ -17,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. |# ;;; MIPS Instruction Set Macros. Early version @@ -42,8 +42,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ;;; Instruction and addressing mode macros -(syntax-table-define early-syntax-table 'DEFINE-INSTRUCTION - (macro (opcode . patterns) +(syntax-table/define (->environment '(COMPILER)) + 'DEFINE-INSTRUCTION + (lambda (opcode . patterns) `(SET! EARLY-INSTRUCTIONS (CONS (LIST ',opcode diff --git a/v7/src/compiler/machines/mips/insmac.scm b/v7/src/compiler/machines/mips/insmac.scm index 6055010f6..61611a8dd 100644 --- a/v7/src/compiler/machines/mips/insmac.scm +++ b/v7/src/compiler/machines/mips/insmac.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: insmac.scm,v 1.3 1999/01/02 06:06:43 cph Exp $ +$Id: insmac.scm,v 1.4 2001/12/19 21:39:30 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. |# ;;;; MIPS Instruction Set Macros @@ -25,8 +26,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ;;;; Definition macros -(syntax-table-define assembler-syntax-table 'DEFINE-SYMBOL-TRANSFORMER - (macro (name . alist) +(syntax-table/define (->environment '(COMPILER LAP-SYNTAXER)) + 'DEFINE-SYMBOL-TRANSFORMER + (lambda (name . alist) `(BEGIN (DECLARE (INTEGRATE-OPERATOR ,name)) (DEFINE (,name SYMBOL) @@ -36,8 +38,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #F (CDR PLACE))))))) -(syntax-table-define assembler-syntax-table 'DEFINE-TRANSFORMER - (macro (name value) +(syntax-table/define (->environment '(COMPILER LAP-SYNTAXER)) + 'DEFINE-TRANSFORMER + (lambda (name value) `(DEFINE ,name ,value))) ;;;; Fixed width instruction parsing diff --git a/v7/src/compiler/machines/sparc/decls.scm b/v7/src/compiler/machines/sparc/decls.scm index ce1b2eaef..054fe2f69 100644 --- a/v7/src/compiler/machines/sparc/decls.scm +++ b/v7/src/compiler/machines/sparc/decls.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: decls.scm,v 1.4 1999/01/02 06:06:43 cph Exp $ +$Id: decls.scm,v 1.5 2001/12/19 21:39:30 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. |# ;;;; Compiler File Dependencies @@ -340,16 +341,13 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. "ralloc" "rcompr" "rcse1" "rcse2" "rcseep" "rcseht" "rcserq" "rcsesr" "rdebug" "rdflow" "rerite" "rinvex" "rlife" "rtlcsm")) - compiler-syntax-table) + (->environment '(COMPILER))) (file-dependency/syntax/join (filename/append "machines/sparc" "lapgen" - "rules1" "rules2" "rules3" "rules4" "rulfix" "rulflo") - lap-generator-syntax-table) - (file-dependency/syntax/join - (filename/append "machines/sparc" + "rules1" "rules2" "rules3" "rules4" "rulfix" "rulflo" "instr1" "instr2a" "instr2b" "instr3") - assembler-syntax-table))) + (->environment '(COMPILER LAP-SYNTAXER))))) ;;;; Integration Dependencies diff --git a/v7/src/compiler/machines/sparc/inerly.scm b/v7/src/compiler/machines/sparc/inerly.scm index 9695e13c9..4c7ea5c8e 100644 --- a/v7/src/compiler/machines/sparc/inerly.scm +++ b/v7/src/compiler/machines/sparc/inerly.scm @@ -1,9 +1,8 @@ #| -*-Scheme-*- -$Id: inerly.scm,v 1.2 1999/01/02 06:06:43 cph Exp $ -$MC68020-Header: inerly.scm,v 1.6 88/08/31 06:00:59 GMT cph Exp $ +$Id: inerly.scm,v 1.3 2001/12/19 21:39:30 cph Exp $ -Copyright (c) 1988, 1989, 1990, 1999 Massachusetts Institute of Technology +Copyright (c) 1988, 1989, 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 @@ -17,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. |# ;;; SPARC Instruction Set Macros. Early version @@ -42,8 +42,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ;;; Instruction and addressing mode macros -(syntax-table-define early-syntax-table 'DEFINE-INSTRUCTION - (macro (opcode . patterns) +(syntax-table/define (->environment '(COMPILER)) + 'DEFINE-INSTRUCTION + (lambda (opcode . patterns) `(SET! EARLY-INSTRUCTIONS (CONS (LIST ',opcode diff --git a/v7/src/compiler/machines/sparc/insmac.scm b/v7/src/compiler/machines/sparc/insmac.scm index 766fbff96..d695125e4 100644 --- a/v7/src/compiler/machines/sparc/insmac.scm +++ b/v7/src/compiler/machines/sparc/insmac.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: insmac.scm,v 1.2 1999/01/02 06:06:43 cph Exp $ +$Id: insmac.scm,v 1.3 2001/12/19 21:39:30 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. |# ;;;; SPARC Instruction Set Macros @@ -25,8 +26,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ;;;; Definition macros -(syntax-table-define assembler-syntax-table 'DEFINE-SYMBOL-TRANSFORMER - (macro (name . alist) +(syntax-table/define (->environment '(COMPILER LAP-SYNTAXER)) + 'DEFINE-SYMBOL-TRANSFORMER + (lambda (name . alist) `(BEGIN (DECLARE (INTEGRATE-OPERATOR ,name)) (DEFINE (,name SYMBOL) @@ -36,8 +38,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #F (CDR PLACE))))))) -(syntax-table-define assembler-syntax-table 'DEFINE-TRANSFORMER - (macro (name value) +(syntax-table/define (->environment '(COMPILER LAP-SYNTAXER)) + 'DEFINE-TRANSFORMER + (lambda (name value) `(DEFINE ,name ,value))) ;;;; Fixed width instruction parsing diff --git a/v7/src/compiler/machines/spectrum/compiler.pkg b/v7/src/compiler/machines/spectrum/compiler.pkg index e96f0a1f8..22875dcce 100644 --- a/v7/src/compiler/machines/spectrum/compiler.pkg +++ b/v7/src/compiler/machines/spectrum/compiler.pkg @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: compiler.pkg,v 1.50 1999/01/02 06:06:43 cph Exp $ +$Id: compiler.pkg,v 1.51 2001/12/19 21:39:30 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. |# ;;;; Compiler Packaging @@ -109,11 +110,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (define-package (compiler macros) (files "base/macros") (parent ()) - (export (compiler) - assembler-syntax-table - compiler-syntax-table - early-syntax-table - lap-generator-syntax-table) (import (runtime macros) parse-define-syntax) (initialization (initialize-package!))) diff --git a/v7/src/compiler/machines/spectrum/compiler.sf b/v7/src/compiler/machines/spectrum/compiler.sf index 02a1ec3f9..abe79096c 100644 --- a/v7/src/compiler/machines/spectrum/compiler.sf +++ b/v7/src/compiler/machines/spectrum/compiler.sf @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: compiler.sf,v 1.20 2001/12/17 17:40:58 cph Exp $ +$Id: compiler.sf,v 1.21 2001/12/19 21:39:30 cph Exp $ Copyright (c) 1988-1999, 2001 Massachusetts Institute of Technology @@ -54,9 +54,7 @@ USA. ((access initialize-package! environment))) (sf-and-load '("base/pmlook") '(COMPILER PATTERN-MATCHER/LOOKUP)) (sf-and-load '("base/pmpars") '(COMPILER PATTERN-MATCHER/PARSER)) - (fluid-let ((sf/default-syntax-table - (access compiler-syntax-table - (->environment '(COMPILER MACROS))))) + (fluid-let ((sf/default-syntax-table (->environment '(COMPILER)))) (sf-and-load '("machines/spectrum/machin") '(COMPILER))) (fluid-let ((sf/default-declarations '((integrate-external "insseq") @@ -85,8 +83,7 @@ USA. (newline) (for-each (lambda (name) (load (string-append "machines/spectrum/" name ".scm") - '(COMPILER LAP-SYNTAXER) - early-syntax-table)) + '(COMPILER LAP-SYNTAXER))) '("instr1" "instr2" "instr3"))))) ;; Resyntax any files that need it. diff --git a/v7/src/compiler/machines/spectrum/decls.scm b/v7/src/compiler/machines/spectrum/decls.scm index bc7ab06bc..501935e2a 100644 --- a/v7/src/compiler/machines/spectrum/decls.scm +++ b/v7/src/compiler/machines/spectrum/decls.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: decls.scm,v 4.35 1999/01/02 06:06:43 cph Exp $ +$Id: decls.scm,v 4.36 2001/12/19 21:39:30 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. |# ;;;; Compiler File Dependencies @@ -346,15 +347,13 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. "ralloc" "rcompr" "rcse1" "rcse2" "rcseep" "rcseht" "rcserq" "rcsesr" "rdebug" "rdflow" "rerite" "rinvex" "rlife" "rtlcsm")) - compiler-syntax-table) + (->environment '(COMPILER))) (file-dependency/syntax/join (filename/append "machines/spectrum" "lapgen" - "rules1" "rules2" "rules3" "rules4" "rulfix" "rulflo") - lap-generator-syntax-table) - (file-dependency/syntax/join - (filename/append "machines/spectrum" "instr1" "instr2" "instr3") - assembler-syntax-table))) + "rules1" "rules2" "rules3" "rules4" "rulfix" "rulflo" + "instr1" "instr2" "instr3") + (->environment '(COMPILER LAP-SYNTAXER))))) ;;;; Integration Dependencies diff --git a/v7/src/compiler/machines/spectrum/inerly.scm b/v7/src/compiler/machines/spectrum/inerly.scm index ab06d3f07..56fa57329 100644 --- a/v7/src/compiler/machines/spectrum/inerly.scm +++ b/v7/src/compiler/machines/spectrum/inerly.scm @@ -1,9 +1,8 @@ #| -*-Scheme-*- -$Id: inerly.scm,v 1.2 1999/01/02 06:06:43 cph Exp $ -$MC68020-Header: inerly.scm,v 1.6 88/08/31 06:00:59 GMT cph Exp $ +$Id: inerly.scm,v 1.3 2001/12/19 21:39:30 cph Exp $ -Copyright (c) 1988, 1989, 1990, 1999 Massachusetts Institute of Technology +Copyright (c) 1988, 1989, 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 @@ -17,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. |# ;;; Spectrum Instruction Set Macros. Early version @@ -42,8 +42,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ;;; Instruction and addressing mode macros -(syntax-table-define early-syntax-table 'DEFINE-INSTRUCTION - (macro (opcode . patterns) +(syntax-table/define (->environment '(COMPILER)) + 'DEFINE-INSTRUCTION + (lambda (opcode . patterns) `(SET! EARLY-INSTRUCTIONS (CONS (LIST ',opcode diff --git a/v7/src/compiler/machines/spectrum/insmac.scm b/v7/src/compiler/machines/spectrum/insmac.scm index 1157f484e..cc4873bd9 100644 --- a/v7/src/compiler/machines/spectrum/insmac.scm +++ b/v7/src/compiler/machines/spectrum/insmac.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: insmac.scm,v 1.3 1999/01/02 06:06:43 cph Exp $ +$Id: insmac.scm,v 1.4 2001/12/19 21:39:30 cph Exp $ -Copyright (c) 1988, 1989, 1990, 1999 Massachusetts Institute of Technology +Copyright (c) 1988, 1989, 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. |# ;;;; Spectrum Instruction Set Macros @@ -25,8 +26,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ;;;; Definition macros -(syntax-table-define assembler-syntax-table 'DEFINE-SYMBOL-TRANSFORMER - (macro (name . alist) +(syntax-table/define (->environment '(COMPILER LAP-SYNTAXER)) + 'DEFINE-SYMBOL-TRANSFORMER + (lambda (name . alist) `(begin (declare (integrate-operator ,name)) (define (,name symbol) @@ -36,8 +38,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #F (cdr place))))))) -(syntax-table-define assembler-syntax-table 'DEFINE-TRANSFORMER - (macro (name value) +(syntax-table/define (->environment '(COMPILER LAP-SYNTAXER)) + 'DEFINE-TRANSFORMER + (lambda (name value) `(define ,name ,value))) ;;;; Fixed width instruction parsing diff --git a/v7/src/compiler/machines/vax/compiler.pkg b/v7/src/compiler/machines/vax/compiler.pkg index 2eb5203a1..40c7ed772 100644 --- a/v7/src/compiler/machines/vax/compiler.pkg +++ b/v7/src/compiler/machines/vax/compiler.pkg @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: compiler.pkg,v 1.22 1999/01/02 06:06:43 cph Exp $ +$Id: compiler.pkg,v 1.23 2001/12/19 21:39:30 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. |# ;;;; Compiler Packaging @@ -109,11 +110,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (define-package (compiler macros) (files "base/macros") (parent ()) - (export (compiler) - assembler-syntax-table - compiler-syntax-table - early-syntax-table - lap-generator-syntax-table) (import (runtime macros) parse-define-syntax) (initialization (initialize-package!))) @@ -654,14 +650,4 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. dbg-info/labels dbg-label/external? dbg-label/name - dbg-labels/find-offset)) - -#| -(define-package (compiler disassembler macros) - (files "machines/vax/dsyn" - ) - (parent (compiler disassembler)) - (export (compiler) - disassembler-syntax-table) - (initialization (initialize-package!))) -|# \ No newline at end of file + dbg-labels/find-offset)) \ No newline at end of file diff --git a/v7/src/compiler/machines/vax/compiler.sf b/v7/src/compiler/machines/vax/compiler.sf index 0a0041041..9d8c9e2f2 100644 --- a/v7/src/compiler/machines/vax/compiler.sf +++ b/v7/src/compiler/machines/vax/compiler.sf @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: compiler.sf,v 1.11 2001/12/17 17:40:58 cph Exp $ +$Id: compiler.sf,v 1.12 2001/12/19 21:39:30 cph Exp $ Copyright (c) 1988-1999, 2001 Massachusetts Institute of Technology @@ -54,9 +54,7 @@ USA. ((access initialize-package! environment))) (sf-and-load '("base/pmlook") '(COMPILER PATTERN-MATCHER/LOOKUP)) (sf-and-load '("base/pmpars") '(COMPILER PATTERN-MATCHER/PARSER)) - (fluid-let ((sf/default-syntax-table - (access compiler-syntax-table - (->environment '(COMPILER MACROS))))) + (fluid-let ((sf/default-syntax-table (->environment '(COMPILER)))) (sf-and-load '("machines/vax/machin") '(COMPILER))) (fluid-let ((sf/default-declarations '((integrate-external "insseq") @@ -89,8 +87,7 @@ USA. (newline) (for-each (lambda (name) (load (string-append "machines/vax/" name ".scm") - '(COMPILER LAP-SYNTAXER) - early-syntax-table)) + '(COMPILER LAP-SYNTAXER))) '("insutl" "instr1" "instr2" "instr3"))))) ;; Resyntax any files that need it. diff --git a/v7/src/compiler/machines/vax/decls.scm b/v7/src/compiler/machines/vax/decls.scm index 87d7a63fa..5e4c0722f 100644 --- a/v7/src/compiler/machines/vax/decls.scm +++ b/v7/src/compiler/machines/vax/decls.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: decls.scm,v 4.13 1999/01/02 06:06:43 cph Exp $ +$Id: decls.scm,v 4.14 2001/12/19 21:39:30 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. |# ;;;; Compiler File Dependencies. VAX version. @@ -346,19 +347,16 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. "ralloc" "rcompr" "rcse1" "rcse2" "rcseep" "rcseht" "rcserq" "rcsesr" "rdebug" "rdflow" "rerite" "rinvex" "rlife" "rtlcsm")) - compiler-syntax-table) - (file-dependency/syntax/join - (filename/append "machines/vax" - "lapgen" "rules1" "rules2" "rules3" "rules4" "rulfix") - lap-generator-syntax-table) + (->environment '(COMPILER))) (file-dependency/syntax/join (filename/append "machines/vax" + "lapgen" "rules1" "rules2" "rules3" "rules4" "rulfix" "insutl" "instr1" "instr2" "instr3") - assembler-syntax-table) + (->environment '(COMPILER LAP-SYNTAXER))) (file-dependency/syntax/join (filename/append "machines/vax" "dinstr1" "dinstr2" "dinstr3") - disassembler-syntax-table))) + (->environment '(COMPILER DISASSEMBLER))))) ;;;; Integration Dependencies diff --git a/v7/src/compiler/machines/vax/dsyn.scm b/v7/src/compiler/machines/vax/dsyn.scm index 823348714..d231fe3d4 100644 --- a/v7/src/compiler/machines/vax/dsyn.scm +++ b/v7/src/compiler/machines/vax/dsyn.scm @@ -1,9 +1,8 @@ #| -*-Scheme-*- -$Id: dsyn.scm,v 1.8 1999/01/02 06:06:43 cph Exp $ -This file has no counterpart in the MC68020 compiler +$Id: dsyn.scm,v 1.9 2001/12/19 21:39:30 cph Exp $ -Copyright (c) 1987, 1989, 1999 Massachusetts Institute of Technology +Copyright (c) 1987, 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 @@ -27,18 +26,18 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ;;;; Instruction decoding (define (initialize-package!) - (syntax-table-define disassembler-syntax-table - 'DEFINE-INSTRUCTION + (set-environment-syntax-table! + (->environment '(COMPILER DISASSEMBLER)) + (make-syntax-table (->environment '(COMPILER)))) + (syntax-table/define (->environment '(COMPILER DISASSEMBLER)) + 'DEFINE-INSTRUCTION transform/define-instruction)) (define instructions-disassembled-specially '(BYTE WORD LONG BUG B BR BSB)) -(define disassembler-syntax-table - (make-syntax-table system-global-syntax-table)) - (define transform/define-instruction - (macro (name . patterns) + (lambda (name . patterns) (if (memq name instructions-disassembled-specially) ''() `(begin ,@(map (lambda (pattern) diff --git a/v7/src/compiler/machines/vax/inerly.scm b/v7/src/compiler/machines/vax/inerly.scm index 83cd08c77..3c010fa0b 100644 --- a/v7/src/compiler/machines/vax/inerly.scm +++ b/v7/src/compiler/machines/vax/inerly.scm @@ -1,9 +1,8 @@ #| -*-Scheme-*- -$Id: inerly.scm,v 1.7 1999/01/02 06:06:43 cph Exp $ -$MC68020-Header: inerly.scm,v 1.6 88/08/31 06:00:59 GMT cph Exp $ +$Id: inerly.scm,v 1.8 2001/12/19 21:39:30 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 @@ -17,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. |# ;;;; VAX Instruction Set Macros. Early version @@ -30,8 +30,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (define early-transformers '()) (define early-ea-database '()) -(syntax-table-define early-syntax-table 'DEFINE-INSTRUCTION - (macro (opcode . patterns) +(syntax-table/define (->environment '(COMPILER)) + 'DEFINE-INSTRUCTION + (lambda (opcode . patterns) `(SET! EARLY-INSTRUCTIONS (CONS (LIST ',opcode @@ -57,18 +58,21 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (cons (cons name transformer) early-transformers))) -(syntax-table-define early-syntax-table 'DEFINE-SYMBOL-TRANSFORMER - (macro (name . assoc) +(syntax-table/define (->environment '(COMPILER)) + 'DEFINE-SYMBOL-TRANSFORMER + (lambda (name . assoc) `(DEFINE-EARLY-TRANSFORMER ',name (MAKE-SYMBOL-TRANSFORMER ',assoc)))) ;; *** Is this right? *** -(syntax-table-define early-syntax-table 'DEFINE-TRANSFORMER - (macro (name value) +(syntax-table/define (->environment '(COMPILER)) + 'DEFINE-TRANSFORMER + (lambda (name value) `(DEFINE-EARLY-TRANSFORMER ',name ,value))) -(syntax-table-define early-syntax-table 'DEFINE-EA-TRANSFORMER - (macro (name category type) +(syntax-table/define (->environment '(COMPILER)) + 'DEFINE-EA-TRANSFORMER + (lambda (name category type) `(DEFINE-EARLY-TRANSFORMER ',name (MAKE-EA-TRANSFORMER ',category ',type)))) @@ -88,8 +92,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ;;; *** NOTE: If this format changes, insutl.scm must also be changed! *** -(syntax-table-define early-syntax-table 'DEFINE-EA-DATABASE - (macro rules +(syntax-table/define (->environment '(COMPILER)) + 'DEFINE-EA-DATABASE + (lambda rules `(SET! EARLY-EA-DATABASE (LIST ,@(map (lambda (rule) diff --git a/v7/src/compiler/machines/vax/insmac.scm b/v7/src/compiler/machines/vax/insmac.scm index 3e2eed3d1..8fc9fbf77 100644 --- a/v7/src/compiler/machines/vax/insmac.scm +++ b/v7/src/compiler/machines/vax/insmac.scm @@ -1,9 +1,8 @@ #| -*-Scheme-*- -$Id: insmac.scm,v 1.13 1999/01/02 06:06:43 cph Exp $ -$MC68020-Header: insmac.scm,v 1.124 88/06/14 08:47:02 GMT cph Exp $ +$Id: insmac.scm,v 1.14 2001/12/19 21:39:30 cph Exp $ -Copyright (c) 1987, 1989, 1999 Massachusetts Institute of Technology +Copyright (c) 1987, 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 @@ -17,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. |# ;;;; VAX Instruction Set Macros @@ -29,8 +29,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (define ea-database-name 'EA-DATABASE) -(syntax-table-define assembler-syntax-table 'DEFINE-EA-DATABASE - (macro rules +(syntax-table/define (->environment '(COMPILER LAP-SYNTAXER)) + 'DEFINE-EA-DATABASE + (lambda rules `(DEFINE ,ea-database-name ,(compile-database rules (lambda (pattern actions) @@ -43,16 +44,18 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ',categories ,(process-fields value false)))))))) -(syntax-table-define assembler-syntax-table 'DEFINE-EA-TRANSFORMER - (macro (name category type) +(syntax-table/define (->environment '(COMPILER LAP-SYNTAXER)) + 'DEFINE-EA-TRANSFORMER + (lambda (name category type) `(define (,name expression) (let ((ea (process-ea expression ',type))) (and ea (memq ',category (ea-categories ea)) ea))))) -(syntax-table-define assembler-syntax-table 'DEFINE-SYMBOL-TRANSFORMER - (macro (name . alist) +(syntax-table/define (->environment '(COMPILER LAP-SYNTAXER)) + 'DEFINE-SYMBOL-TRANSFORMER + (lambda (name . alist) `(begin (declare (integrate-operator ,name)) (define (,name symbol) @@ -62,8 +65,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #F (cdr place))))))) -(syntax-table-define assembler-syntax-table 'DEFINE-TRANSFORMER - (macro (name value) +(syntax-table/define (->environment '(COMPILER LAP-SYNTAXER)) + 'DEFINE-TRANSFORMER + (lambda (name value) `(define ,name ,value))) (define (parse-instruction opcode tail early?)