Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
asdf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Didier Verna
asdf
Commits
ed5fdc52
Commit
ed5fdc52
authored
10 years ago
by
Francois-Rene Rideau
Browse files
Options
Downloads
Patches
Plain Diff
Tweak previous get-optimization-settings. Tests included.
parent
f2298f1e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
test/test-utilities.script
+9
-0
9 additions, 0 deletions
test/test-utilities.script
uiop/lisp-build.lisp
+7
-5
7 additions, 5 deletions
uiop/lisp-build.lisp
with
16 additions
and
5 deletions
test/test-utilities.script
+
9
−
0
View file @
ed5fdc52
...
...
@@ -312,3 +312,12 @@
(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 (ensure-gethash 3 h 5)) '(nil t)))
(DBG :optimization-settings)
#-(or allegro ecl-bytecmp gcl mkcl)
(loop :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)))))))
This diff is collapsed.
Click to expand it.
uiop/lisp-build.lisp
+
7
−
5
View file @
ed5fdc52
...
...
@@ -62,12 +62,12 @@ This can help you produce more deterministic output for FASLs."))
"Optimization settings saved by PROCLAIM-OPTIMIZATION-SETTINGS"
)
(
defparameter
+optimization-variables+
;; TODO: allegro genera corman mcl
(
or
#+
(
or
abcl
xcl
)
'
(
system::*speed*
c
::*space*
c
::*safety*
c
::*debug*
)
#+
clisp
'
(
system::*optimize*
)
(
or
#+
(
or
abcl
xcl
)
'
(
system::*speed*
system
::*space*
system
::*safety*
system
::*debug*
)
#+
clisp
'
(
)
;;
system::*optimize*
is a constant hash-table! (with non-constant contents
)
#+
clozure
'
(
ccl::*nx-speed*
ccl::*nx-space*
ccl::*nx-safety*
ccl::*nx-debug*
ccl::*nx-cspeed*
)
#+
(
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*
)
#+
lispworks
'
(
compiler::*optimization-level*
)
#+
mkcl
'
(
si::*speed*
si::*space*
si::*safety*
si::*debug*
)
...
...
@@ -81,10 +81,12 @@ This can help you produce more deterministic output for FASLs."))
#+
(
or
abcl
clisp
cmu
ecl
lispworks
mkcl
sbcl
scl
xcl
)
(
let
((
settings
'
(
speed
space
safety
debug
compilation-speed
#+
(
or
cmu
scl
)
c::brevity
)))
#.`
(
loop
:for
x
:in
settings
,@
(
or
#+
(
or
abcl
ecl
gcl
mkcl
xcl
)
'
(
:for
v
:in
*
optimization-variables
*
))
,@
(
or
#+
(
or
abcl
ecl
gcl
mkcl
xcl
)
'
(
:for
v
:in
+
optimization-variables
+
))
:for
y
=
(
or
#+
clisp
(
gethash
x
system::*optimize*
)
#+
(
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
)
#+
sbcl
(
cdr
(
assoc
x
sb-c::*policy*
)))
:when
y
:collect
(
list
x
y
))))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment