CMUCL commit: src (3 files)
Raymond Toy
rtoy at common-lisp.net
Sat Jul 31 18:56:00 CEST 2010
Date: Saturday, July 31, 2010 @ 12:56:00
Author: rtoy
Path: /project/cmucl/cvsroot/src
Added: bootfiles/20a/boot-20b.lisp
Modified: bootfiles/20a/boot-2010-07-1.lisp compiler/byte-comp.lisp
Since it's about time, and while we're doing the cross-compile anyway,
let's update the fasl version to 20b.
To build this, use boot-2010-07-1-cross as the cross-compile script
and -B src/bootfiles/20a/boot-2010-07-1.lisp for cross-build-world.sh.
If there are any restarts, choose the clobber-it restart.
bootfiles/20a/boot-20b.lisp:
o Bootstrap the change to fasl version 20b.
bootfiles/20a/boot-2010-07-1.lisp:
o Load boot-20b.lisp.
compiler/byte-comp.lisp:
o Update byte-fasl-file-version to 20b.
-----------------------------------+
bootfiles/20a/boot-2010-07-1.lisp | 2 +
bootfiles/20a/boot-20b.lisp | 67 ++++++++++++++++++++++++++++++++++++
compiler/byte-comp.lisp | 4 +-
3 files changed, 71 insertions(+), 2 deletions(-)
Index: src/bootfiles/20a/boot-2010-07-1.lisp
diff -u src/bootfiles/20a/boot-2010-07-1.lisp:1.5 src/bootfiles/20a/boot-2010-07-1.lisp:1.6
--- src/bootfiles/20a/boot-2010-07-1.lisp:1.5 Fri Jul 30 18:51:58 2010
+++ src/bootfiles/20a/boot-2010-07-1.lisp Sat Jul 31 12:56:00 2010
@@ -36,3 +36,5 @@
;; Executable feature works on sparc!
#+(or sparc (and x86 darwin))
(pushnew :executable *features*)
+
+(load "src/bootfiles/20a/boot-20b.lisp")
Index: src/bootfiles/20a/boot-20b.lisp
diff -u /dev/null src/bootfiles/20a/boot-20b.lisp:1.1
--- /dev/null Sat Jul 31 12:56:00 2010
+++ src/bootfiles/20a/boot-20b.lisp Sat Jul 31 12:56:00 2010
@@ -0,0 +1,67 @@
+;;;;
+;;;; Boot file for changing the fasl file version numbers to 20b.
+;;;;
+
+(in-package :c)
+
+(setf lisp::*enable-package-locked-errors* nil)
+
+;;;
+;;; Note that BYTE-FASL-FILE-VERSION is a constant.
+;;;
+;;; (Be sure to change BYTE-FASL-FILE-VERSION in
+;;; compiler/byte-comp.lisp to the correct value too!)
+;;;
+#-cmu20b
+(setf (symbol-value 'byte-fasl-file-version) #x20b)
+#-cmu20b
+(setf (backend-fasl-file-version *target-backend*) #x20b)
+
+;;;
+;;; Don't check fasl versions in the compiling Lisp because we'll
+;;; load files compiled with the new version numbers.
+;;;
+#-cmu20b
+(setq lisp::*skip-fasl-file-version-check* t)
+
+;;;
+;;; This is here because BYTE-FASL-FILE-VERSION is constant-folded in
+;;; OPEN-FASL-FILE. To make the new version number take effect, we
+;;; have to redefine the function.
+;;;
+#-cmu20b
+(defun open-fasl-file (name where &optional byte-p)
+ (declare (type pathname name))
+ (let* ((stream (open name :direction :output
+ :if-exists :new-version
+ :element-type '(unsigned-byte 8)))
+ (res (make-fasl-file :stream stream)))
+ (multiple-value-bind
+ (version f-vers f-imp)
+ (if byte-p
+ (values "Byte code"
+ byte-fasl-file-version
+ (backend-byte-fasl-file-implementation *backend*))
+ (values (backend-version *backend*)
+ (backend-fasl-file-version *backend*)
+ (backend-fasl-file-implementation *backend*)))
+ (format stream
+ "FASL FILE output from ~A.~@
+ Compiled ~A on ~A~@
+ Compiler ~A, Lisp ~A~@
+ Targeted for ~A, FASL version ~X~%"
+ where
+ (ext:format-universal-time nil (get-universal-time))
+ (machine-instance) compiler-version
+ (lisp-implementation-version)
+ version f-vers)
+ ;;
+ ;; Terminate header.
+ (dump-byte 255 res)
+ ;;
+ ;; Specify code format.
+ (dump-fop 'lisp::fop-long-code-format res)
+ (dump-byte f-imp res)
+ (dump-unsigned-32 f-vers res))
+ res))
+
Index: src/compiler/byte-comp.lisp
diff -u src/compiler/byte-comp.lisp:1.51 src/compiler/byte-comp.lisp:1.52
--- src/compiler/byte-comp.lisp:1.51 Tue Apr 20 13:57:46 2010
+++ src/compiler/byte-comp.lisp Sat Jul 31 12:56:00 2010
@@ -5,7 +5,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain.
;;;
(ext:file-comment
- "$Header: /project/cmucl/cvsroot/src/compiler/byte-comp.lisp,v 1.51 2010-04-20 17:57:46 rtoy Exp $")
+ "$Header: /project/cmucl/cvsroot/src/compiler/byte-comp.lisp,v 1.52 2010-07-31 16:56:00 rtoy Exp $")
;;;
;;; **********************************************************************
;;;
@@ -34,7 +34,7 @@
;;;; Fasl file format:
-(defconstant byte-fasl-file-version #x20a)
+(defconstant byte-fasl-file-version #x20b)
(let* ((version-string (format nil "~X" byte-fasl-file-version)))
(sys:register-lisp-feature (intern (concatenate 'string "CMU" version-string) :keyword))
More information about the cmucl-commit
mailing list