#| -*-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
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))
\f
-(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
#| -*-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
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
(declare (usual-integrations))
\f
(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)))
\f
(define transform/last-reference
(macro (name)
#| -*-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
(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!)))
#| -*-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
(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))
#| -*-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
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
"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)))))
\f
;;;; Integration Dependencies
#| -*-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
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
(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!)))
#| -*-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
(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
(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.
#| -*-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
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
"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)))))
\f
;;;; Integration Dependencies
#| -*-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
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
;;; 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
#| -*-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
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
\f
;;;; 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)
#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
#| -*-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
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))
\f
#| -*-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
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))
\f
#| -*-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
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))
\f
#| -*-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
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))
\f
#| -*-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
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))
\f
#| -*-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
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))
\f
#| -*-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
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))
\f
#| -*-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
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
(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!)))
#| -*-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
((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")
(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")))))
#| -*-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
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
"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)))))
\f
;;;; Integration Dependencies
#| -*-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
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
(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))))
\f
;;;; 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
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)
(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)
;;; *** 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)
#| -*-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
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
(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)
(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)
(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)
\f
;;;; 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)
`(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)
#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)
#| -*-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
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
(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!)))
#| -*-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
((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")
(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.
#| -*-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
"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)))))
\f
;;;; Integration Dependencies
#| -*-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
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))
-\f
+
;;;; Transformers and utilities
(define early-instructions '())
;;; 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
#| -*-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
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
(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)
;; 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)))
#| -*-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
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
(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!)))
#| -*-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
(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
(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.
#| -*-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
(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
(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.
#| -*-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
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
"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)))))
\f
;;;; Integration Dependencies
#| -*-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
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
;;; 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
#| -*-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
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
\f
;;;; 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)
#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
#| -*-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
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
"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)))))
\f
;;;; Integration Dependencies
#| -*-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
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
;;; 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
#| -*-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
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
\f
;;;; 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)
#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
#| -*-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
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
(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!)))
#| -*-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
((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")
(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.
#| -*-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
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
"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)))))
\f
;;;; Integration Dependencies
#| -*-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
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
;;; 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
#| -*-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
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
\f
;;;; 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)
#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)))
\f
;;;; Fixed width instruction parsing
#| -*-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
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
(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!)))
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
#| -*-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
((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")
(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.
#| -*-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
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.
"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)))))
\f
;;;; Integration Dependencies
#| -*-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
;;;; 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)
#| -*-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
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
(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
(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))))
;;; *** 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)
#| -*-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
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
(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)
',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)
#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)))
\f
(define (parse-instruction opcode tail early?)