Commit ba06f21f authored by Raymond Toy's avatar Raymond Toy
Browse files

Wrap exports in eval-when.

 src/compiler/generic/objdef.lisp::
 src/compiler/generic/utils.lisp:;
 src/compiler/generic/vm-macs.lisp::
 src/compiler/sparc/c-callback.lisp::
 src/compiler/sparc/parms.lisp::

  When export lost its compile-time effects and became a normal
  function, the exports in many files no longer took affect while
  compiling the file.  This change makes the compile-time effects
  happen as before in selected files. With this change, the sparc port
  can be cross-compiled from x86 again.

 src/tools/cross-scripts/cross-x86-sparc.lisp::
  Need to frob CHAR-BYTES, which is needed by BYTE-BASH-COPY. .
parent 32d261e4
...@@ -18,7 +18,9 @@ ...@@ -18,7 +18,9 @@
(in-package "VM") (in-package "VM")
(intl:textdomain "cmucl") (intl:textdomain "cmucl")
(eval-when (:compile-toplevel :load-toplevel :execute)
(export '(current-float-trap floating-point-modes sigfpe-handler)) (export '(current-float-trap floating-point-modes sigfpe-handler))
)
(in-package "EXTENSIONS") (in-package "EXTENSIONS")
(export '(set-floating-point-modes get-floating-point-modes (export '(set-floating-point-modes get-floating-point-modes
with-float-traps-masked)) with-float-traps-masked))
......
...@@ -15,10 +15,12 @@ ...@@ -15,10 +15,12 @@
(use-package "SYSTEM") (use-package "SYSTEM")
(intl:textdomain "cmucl") (intl:textdomain "cmucl")
(eval-when (:compile-toplevel :load-toplevel :execute)
(export '(memory-usage count-no-ops descriptor-vs-non-descriptor-storage (export '(memory-usage count-no-ops descriptor-vs-non-descriptor-storage
instance-usage find-holes print-allocated-objects instance-usage find-holes print-allocated-objects
code-breakdown uninterned-symbol-count code-breakdown uninterned-symbol-count
list-allocated-objects)) list-allocated-objects))
)
(in-package "LISP") (in-package "LISP")
(import '( (import '(
dynamic-0-space-start dynamic-1-space-start read-only-space-start dynamic-0-space-start dynamic-1-space-start read-only-space-start
......
...@@ -17,10 +17,12 @@ ...@@ -17,10 +17,12 @@
(intl:textdomain "cmucl-sparc-vm") (intl:textdomain "cmucl-sparc-vm")
(eval-when (:compile-toplevel :load-toplevel :execute)
(export '(fixup-code-object internal-error-arguments (export '(fixup-code-object internal-error-arguments
sigcontext-program-counter sigcontext-register sigcontext-program-counter sigcontext-register
sigcontext-float-register sigcontext-floating-point-modes sigcontext-float-register sigcontext-floating-point-modes
extern-alien-name sanctify-for-execution)) extern-alien-name sanctify-for-execution))
)
#+complex-fp-vops #+complex-fp-vops
(sys:register-lisp-feature :complex-fp-vops) (sys:register-lisp-feature :complex-fp-vops)
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
(in-package "VM") (in-package "VM")
(intl:textdomain "cmucl") (intl:textdomain "cmucl")
(eval-when (:compile-toplevel :load-toplevel :execute)
(export '(lowtag-bits lowtag-mask lowtag-limit type-bits type-mask (export '(lowtag-bits lowtag-mask lowtag-limit type-bits type-mask
target-most-positive-fixnum target-most-negative-fixnum target-most-positive-fixnum target-most-negative-fixnum
even-fixnum-type function-pointer-type other-immediate-0-type even-fixnum-type function-pointer-type other-immediate-0-type
...@@ -52,6 +53,7 @@ ...@@ -52,6 +53,7 @@
complex-double-double-float-type complex-double-double-float-type
simple-array-double-double-float-type simple-array-double-double-float-type
simple-array-complex-double-double-float-type)) simple-array-complex-double-double-float-type))
)
(in-package "KERNEL") (in-package "KERNEL")
(export '(%make-funcallable-instance (export '(%make-funcallable-instance
......
...@@ -17,8 +17,10 @@ ...@@ -17,8 +17,10 @@
(in-package "VM") (in-package "VM")
(intl:textdomain "cmucl") (intl:textdomain "cmucl")
(eval-when (:compile-toplevel :load-toplevel :execute)
(export '(fixnumize static-symbol-p static-symbol-offset offset-static-symbol (export '(fixnumize static-symbol-p static-symbol-offset offset-static-symbol
static-function-offset)) static-function-offset))
)
......
...@@ -163,8 +163,8 @@ ...@@ -163,8 +163,8 @@
(forms `(def-alloc ,alloc-trans ,offset ,variable-length ,header (forms `(def-alloc ,alloc-trans ,offset ,variable-length ,header
,lowtag ',(inits)))) ,lowtag ',(inits))))
`(progn `(progn
(export ',(exports))
(eval-when (compile load eval) (eval-when (compile load eval)
(export ',(exports))
(%define-primitive-object (%define-primitive-object
',(make-primitive-object :name name ',(make-primitive-object :name name
:header header :header header
......
...@@ -13,8 +13,10 @@ ...@@ -13,8 +13,10 @@
(use-package "ALIEN-INTERNALS") (use-package "ALIEN-INTERNALS")
;;; Support for callbacks to Lisp. ;;; Support for callbacks to Lisp.
(eval-when (:compile-toplevel :load-toplevel :execute)
(export '(make-callback-trampoline callback-accessor-form (export '(make-callback-trampoline callback-accessor-form
compatible-function-types-p)) compatible-function-types-p))
)
(defun callback-accessor-form (type sp offset) (defun callback-accessor-form (type sp offset)
(let ((parsed-type (alien::parse-alien-type type))) (let ((parsed-type (alien::parse-alien-type type)))
......
...@@ -61,6 +61,7 @@ ...@@ -61,6 +61,7 @@
;;;; Machine Architecture parameters: ;;;; Machine Architecture parameters:
(eval-when (:compile-toplevel :load-toplevel :execute)
(export '(word-bits byte-bits char-bits word-shift word-bytes char-bytes (export '(word-bits byte-bits char-bits word-shift word-bytes char-bytes
fixnum-tag-bits fixnum-tag-mask positive-fixnum-bits fixnum-tag-bits fixnum-tag-mask positive-fixnum-bits
...@@ -86,6 +87,7 @@ ...@@ -86,6 +87,7 @@
float-underflow-trap-bit float-overflow-trap-bit float-underflow-trap-bit float-overflow-trap-bit
float-imprecise-trap-bit float-invalid-trap-bit float-imprecise-trap-bit float-invalid-trap-bit
float-divide-by-zero-trap-bit)) float-divide-by-zero-trap-bit))
)
#+double-double #+double-double
(export '(double-double-float-digits)) (export '(double-double-float-digits))
...@@ -208,11 +210,13 @@ ...@@ -208,11 +210,13 @@
;;;; Description of the target address space. ;;;; Description of the target address space.
(eval-when (:compile-toplevel :load-toplevel :execute)
(export '(target-read-only-space-start (export '(target-read-only-space-start
target-static-space-start target-static-space-start
target-dynamic-space-start target-dynamic-space-start
target-foreign-linkage-space-start target-foreign-linkage-space-start
target-foreign-linkage-entry-size)) target-foreign-linkage-entry-size))
)
;;; Where to put the different spaces. Must match the C code! ;;; Where to put the different spaces. Must match the C code!
;;; ;;;
...@@ -228,6 +232,7 @@ ...@@ -228,6 +232,7 @@
;;;; Other random constants. ;;;; Other random constants.
(eval-when (:compile-toplevel :load-toplevel :execute)
(export '(halt-trap pending-interrupt-trap error-trap cerror-trap (export '(halt-trap pending-interrupt-trap error-trap cerror-trap
breakpoint-trap function-end-breakpoint-trap breakpoint-trap function-end-breakpoint-trap
after-breakpoint-trap allocation-trap after-breakpoint-trap allocation-trap
...@@ -239,6 +244,7 @@ ...@@ -239,6 +244,7 @@
#+heap-overflow-check #+heap-overflow-check
(export '(dynamic-space-overflow-error-trap (export '(dynamic-space-overflow-error-trap
dynamic-space-overflow-warning-trap)) dynamic-space-overflow-warning-trap))
)
(defenum (:suffix -trap :start 8) (defenum (:suffix -trap :start 8)
halt halt
...@@ -268,7 +274,9 @@ ...@@ -268,7 +274,9 @@
;;;; Static symbols. ;;;; Static symbols.
(eval-when (:compile-toplevel :load-toplevel :execute)
(export '(static-symbols static-functions)) (export '(static-symbols static-functions))
)
;;; These symbols are loaded into static space directly after NIL so ;;; These symbols are loaded into static space directly after NIL so
;;; that the system can compute their address by adding a constant ;;; that the system can compute their address by adding a constant
......
...@@ -186,8 +186,10 @@ ...@@ -186,8 +186,10 @@
(find-symbol ,(symbol-name sym) (find-symbol ,(symbol-name sym)
:vm)))) :vm))))
syms)))) syms))))
(frob OLD-VM:BYTE-BITS OLD-VM:WORD-BITS (frob OLD-VM:BYTE-BITS
OLD-VM:WORD-BITS
OLD-VM:CHAR-BITS OLD-VM:CHAR-BITS
OLD-VM:CHAR-BYTES
OLD-VM:LOWTAG-BITS OLD-VM:LOWTAG-BITS
#+long-float OLD-VM:SIMPLE-ARRAY-LONG-FLOAT-TYPE #+long-float OLD-VM:SIMPLE-ARRAY-LONG-FLOAT-TYPE
OLD-VM:SIMPLE-ARRAY-DOUBLE-FLOAT-TYPE OLD-VM:SIMPLE-ARRAY-DOUBLE-FLOAT-TYPE
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment