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