Skip to content
Snippets Groups Projects
Commit b7ec2074 authored by Robert P. Goldman's avatar Robert P. Goldman
Browse files

Merge branch 'master' into docs

parents 6651b328 cf6739d2
No related branches found
No related tags found
No related merge requests found
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
:licence "MIT" :licence "MIT"
:description "Another System Definition Facility" :description "Another System Definition Facility"
:long-description "ASDF builds Common Lisp software organized into defined systems." :long-description "ASDF builds Common Lisp software organized into defined systems."
:version "3.1.0.108" ;; to be automatically updated by make bump-version :version "3.1.0.111" ;; to be automatically updated by make bump-version
:depends-on () :depends-on ()
#+asdf3 :encoding #+asdf3 :utf-8 #+asdf3 :encoding #+asdf3 :utf-8
:class #.(if (find-class 'package-system nil) 'package-system 'system) :class #.(if (find-class 'package-system nil) 'package-system 'system)
......
;;; -*- mode: Common-Lisp; Base: 10 ; Syntax: ANSI-Common-Lisp ; buffer-read-only: t; -*- ;;; -*- mode: Common-Lisp; Base: 10 ; Syntax: ANSI-Common-Lisp ; buffer-read-only: t; -*-
;;; This is ASDF 3.1.0.108: Another System Definition Facility. ;;; This is ASDF 3.1.0.111: Another System Definition Facility.
;;; ;;;
;;; Feedback, bug reports, and patches are all welcome: ;;; Feedback, bug reports, and patches are all welcome:
;;; please mail to <asdf-devel@common-lisp.net>. ;;; please mail to <asdf-devel@common-lisp.net>.
......
...@@ -312,3 +312,14 @@ ...@@ -312,3 +312,14 @@
(assert-equal (multiple-value-list (ensure-gethash 3 h nil)) '(nil nil)) (assert-equal (multiple-value-list (ensure-gethash 3 h nil)) '(nil nil))
(assert-equal (multiple-value-list (gethash 3 h 4)) '(nil t)) (assert-equal (multiple-value-list (gethash 3 h 4)) '(nil t))
(assert-equal (multiple-value-list (ensure-gethash 3 h 5)) '(nil t))) (assert-equal (multiple-value-list (ensure-gethash 3 h 5)) '(nil t)))
(DBG :optimization-settings)
#-(or ecl-bytecmp gcl mkcl)
(loop :with settings = (get-optimization-settings)
:for i :from 0 :to 3 :do
(with-optimization-settings (`((speed ,i) (space ,i) (safety ,i) (debug ,i)))
(let ((s (get-optimization-settings)))
(loop :for q :in '(speed space safety debug) :do
#+mkcl (DBG :os i q s (assoc q s))
(assert-equal i (second (assoc q s))))))
(assert-equal (get-optimization-settings) settings))
...@@ -62,29 +62,34 @@ This can help you produce more deterministic output for FASLs.")) ...@@ -62,29 +62,34 @@ This can help you produce more deterministic output for FASLs."))
"Optimization settings saved by PROCLAIM-OPTIMIZATION-SETTINGS") "Optimization settings saved by PROCLAIM-OPTIMIZATION-SETTINGS")
(defparameter +optimization-variables+ (defparameter +optimization-variables+
;; TODO: allegro genera corman mcl ;; TODO: allegro genera corman mcl
(or #+(or abcl xcl) '(system::*speed* c::*space* c::*safety* c::*debug*) (or #+(or abcl xcl) '(system::*speed* system::*space* system::*safety* system::*debug*)
#+clisp '(system::*optimize*) #+clisp '() ;; system::*optimize* is a constant hash-table! (with non-constant contents)
#+clozure '(ccl::*nx-speed* ccl::*nx-space* ccl::*nx-safety* #+clozure '(ccl::*nx-speed* ccl::*nx-space* ccl::*nx-safety*
ccl::*nx-debug* ccl::*nx-cspeed*) ccl::*nx-debug* ccl::*nx-cspeed*)
#+(or cmu scl) '(c::*default-cookie*) #+(or cmu scl) '(c::*default-cookie*)
#+ecl '(c::*speed* c::*space* c::*safety* c::*debug*) #+ecl (unless (use-ecl-byte-compiler-p) '(c::*speed* c::*space* c::*safety* c::*debug*))
#+gcl '(compiler::*speed* compiler::*space* compiler::*compiler-new-safety* compiler::*debug*) #+gcl '(compiler::*speed* compiler::*space* compiler::*compiler-new-safety* compiler::*debug*)
#+lispworks '(compiler::*optimization-level*) #+lispworks '(compiler::*optimization-level*)
#+mkcl '(si::*speed* si::*space* si::*safety* si::*debug*) #+mkcl '(si::*speed* si::*space* si::*safety* si::*debug*)
#+sbcl '(sb-c::*policy*))) #+sbcl '(sb-c::*policy*)))
(defun get-optimization-settings () (defun get-optimization-settings ()
"Get current compiler optimization settings, ready to PROCLAIM again" "Get current compiler optimization settings, ready to PROCLAIM again"
#-(or abcl clisp clozure cmu ecl lispworks mkcl sbcl scl xcl) #-(or abcl allegro clisp clozure cmu ecl lispworks mkcl sbcl scl xcl)
(warn "~S does not support ~S. Please help me fix that." (warn "~S does not support ~S. Please help me fix that."
'get-optimization-settings (implementation-type)) 'get-optimization-settings (implementation-type))
#+clozure (ccl:declaration-information 'optimize nil) #+(or abcl allegro clisp clozure cmu ecl lispworks mkcl sbcl scl xcl)
#+(or abcl clisp cmu ecl lispworks mkcl sbcl scl xcl)
(let ((settings '(speed space safety debug compilation-speed #+(or cmu scl) c::brevity))) (let ((settings '(speed space safety debug compilation-speed #+(or cmu scl) c::brevity)))
#.`(loop :for x :in settings #.`(loop #+(or allegro clozure)
,@(or #+(or abcl ecl gcl mkcl xcl) '(:for v :in *optimization-variables*)) ,@'(:with info = #+allegro (sys:declaration-information 'optimize)
:for y = (or #+clisp (gethash x system::*optimize*) #+clozure (ccl:declaration-information 'optimize nil))
:for x :in settings
,@(or #+(or abcl ecl gcl mkcl xcl) '(:for v :in +optimization-variables+))
:for y = (or #+(or allegro clozure) (second (assoc x info)) ; normalize order
#+clisp (gethash x system::*optimize* 1)
#+(or abcl ecl mkcl xcl) (symbol-value v) #+(or abcl ecl mkcl xcl) (symbol-value v)
#+(or cmu scl) (slot-value c::*default-cookie* x) #+(or cmu scl) (slot-value c::*default-cookie*
(case x (compilation-speed 'c::cspeed)
(otherwise x)))
#+lispworks (slot-value compiler::*optimization-level* x) #+lispworks (slot-value compiler::*optimization-level* x)
#+sbcl (cdr (assoc x sb-c::*policy*))) #+sbcl (cdr (assoc x sb-c::*policy*)))
:when y :collect (list x y)))) :when y :collect (list x y))))
...@@ -95,6 +100,13 @@ This can help you produce more deterministic output for FASLs.")) ...@@ -95,6 +100,13 @@ This can help you produce more deterministic output for FASLs."))
(unless (equal *previous-optimization-settings* settings) (unless (equal *previous-optimization-settings* settings)
(setf *previous-optimization-settings* settings)))) (setf *previous-optimization-settings* settings))))
(defmacro with-optimization-settings ((&optional (settings *optimization-settings*)) &body body) (defmacro with-optimization-settings ((&optional (settings *optimization-settings*)) &body body)
#+(or allegro clisp)
(let ((previous-settings (gensym "PREVIOUS-SETTINGS")))
`(let ((,previous-settings (get-optimization-settings)))
,@(when settings `((proclaim `(optimize ,@,settings))))
(unwind-protect (progn ,@body)
(proclaim `(optimize ,@,previous-settings)))))
#-(or allegro clisp)
`(let ,(loop :for v :in +optimization-variables+ :collect `(,v ,v)) `(let ,(loop :for v :in +optimization-variables+ :collect `(,v ,v))
,@(when settings `((proclaim `(optimize ,@,settings)))) ,@(when settings `((proclaim `(optimize ,@,settings))))
,@body))) ,@body)))
......
...@@ -67,7 +67,7 @@ previously-loaded version of ASDF." ...@@ -67,7 +67,7 @@ previously-loaded version of ASDF."
;; "3.4.5.67" would be a development version in the official branch, on top of 3.4.5. ;; "3.4.5.67" would be a development version in the official branch, on top of 3.4.5.
;; "3.4.5.0.8" would be your eighth local modification of official release 3.4.5 ;; "3.4.5.0.8" would be your eighth local modification of official release 3.4.5
;; "3.4.5.67.8" would be your eighth local modification of development version 3.4.5.67 ;; "3.4.5.67.8" would be your eighth local modification of development version 3.4.5.67
(asdf-version "3.1.0.108") (asdf-version "3.1.0.111")
(existing-version (asdf-version))) (existing-version (asdf-version)))
(setf *asdf-version* asdf-version) (setf *asdf-version* asdf-version)
(when (and existing-version (not (equal asdf-version existing-version))) (when (and existing-version (not (equal asdf-version existing-version)))
......
"3.1.0.108" "3.1.0.111"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment