Christophe Rhodes [Wed, 26 Aug 2009 20:57:49 +0000 (20:57 +0000)]
1.0.30.54: Fix a cross-compiler leak in specialized %unary-truncate
Don't use host values of most-fooative fixnum. (Also expand on the
comment about using an exclusive test for floats within the fixnum
range)
Christophe Rhodes [Wed, 26 Aug 2009 20:25:41 +0000 (20:25 +0000)]
1.0.30.53: fix occasional SIGBUS in single-float complex arithmetic
The alignment restrictions on movaps for moving a pair of single floats
are too strict; use movq instead. (From Paul Khuong)
Christophe Rhodes [Wed, 26 Aug 2009 17:01:49 +0000 (17:01 +0000)]
1.0.30.52: fix for multiple-value TRUNCATE
Regression from 1.0.30 (in 1.0.30.28); Noted by Lars Nostdal; fix by
Paul Khuong
Christophe Rhodes [Sun, 23 Aug 2009 21:36:13 +0000 (21:36 +0000)]
1.0.30.51: fix for COERCE compilation regression
Code of the form
(defun foo (x)
(declare (type simple-vector x))
(coerce x '(vector (unsigned-byte 8))))
should not cause a full WARNING, but with the new COERCE transforms,
expanded into one of those IFs where one branch is dead, but the
compiler couldn't prove it.
Define a whole heap of new backend type predicates for all specialized
vectors, generalizing VECTOR-T-P. (Some specialized vectors are
implemented using widetags, and so are excluded from these new
definitions).
Christophe Rhodes [Sun, 23 Aug 2009 15:06:39 +0000 (15:06 +0000)]
1.0.30.50: fix SAVE-LISP-AND-DIE docstring
From Leslie Polzer sbcl-devel 2009-08-07
Christophe Rhodes [Sun, 23 Aug 2009 09:09:52 +0000 (09:09 +0000)]
1.0.30.49: delete-file behaviour reversal
In the 1.0.29.x series, DELETE-FILE started deleting the truename of the
given pathname designator (rather than the pathname itself), meaning
that symlinks could no longer be deleted. Revert back to the historical
behaviour. (Noted on sbcl-devel by Luis Oliveira 2009-08-18.)
Although the behaviour hasn't changed recently, there's a similar issue
in RENAME-FILE, but that operator has such bizarre behaviour anyway it
might be worth just letting sleeping pathname functions lie.
Christophe Rhodes [Sat, 22 Aug 2009 15:54:46 +0000 (15:54 +0000)]
1.0.30.48: utf-8 simple-array-nil correctness
If an empty range of a simple-array-nil is requested for conversion, we
should return an empty octet sequence, not blow up.
Christophe Rhodes [Sat, 22 Aug 2009 15:43:20 +0000 (15:43 +0000)]
x86 sap fixes
The sap-ref-with-offset stuff was wrong in that the displacement was
multiplied by a notional element size, rather than being uniformly
treated as a number of bytes. Mostly this codepath wasn't exposed at
all (other than with sap-ref-8, which worked by "accident"), but
attempts to implement UTF-16, which requires (sap-ref-16 sap (+ offset
2)), showed up the problem.
Nikodemus Siivola [Wed, 12 Aug 2009 12:22:19 +0000 (12:22 +0000)]
1.0.30.46: SB-INTROSPECT test adjustment
* Fix ALLOCATION-INFORMATION test on PPC, and hopefully on SPARC as
well. Thanks to Bruce O'Neel.
Nikodemus Siivola [Wed, 12 Aug 2009 11:59:04 +0000 (11:59 +0000)]
1.0.30.45: various pretty-printing improvements
Patch by Tobias Rittweiler:
* Add a PPRINT-DECLARE which a) makes sure that (DECLARE (FUNCTION
F)) is not printed as (DECLARE #'F), and b) places each declaration
specifier on its own line. Also used for DECLAIM.
* Better pprint SETQ forms which assign to multiple variables. At the
moment it's printed like
(SETQ FOO
(FROB-FOO 0 1 2 3 4 5 6 7 8 9)
QUUX
(FROB-QUUX 9 8 7 6 5 4 3 2 1 0))
With the patch it's indented like
(SETQ FOO (FROB-FOO 0 1 2 3 4 5 6 7 8 9)
QUUX (FROB-QUUX 9 8 7 6 5 4 3 2 1 0))
It uses the former indentation style if the value (e.g. the
"(FROB-FOO ...)") does not fit on a single line.
This also affects PSETQ, SETF, PSETF.
* Add pprint entry for SB-INT:DX-FLET because there are CL macros
which expand to that.
* Fix typo in *LOOP-SEPARATING-CLAUSES*; I mistakenly put WHERE
instead of WITH in it.
* Fix PPRINT-IF to make sure that the predicate is always printed
right after the IF. The current definition may occassionally print
an IF form like
(IF
(PREDICATE)
(THEN)
(ELSE))
* Some small refactoring work:
- Use PPRINT-LINEAR, and PPRINT-FILL instead of equivalent, but
hairy FORMAT calls.
- Add PPRINT-SPREAD-FUN-CALL which is the common subtrate of
pretty-printing simple LOOP forms, and DECLARE forms.
Nikodemus Siivola [Wed, 12 Aug 2009 11:14:15 +0000 (11:14 +0000)]
1.0.30.44: DECODE-FLOAT and INTEGER-DECODE-FOAT are not flushable
...as they should signal an error for non-floats in safe code,
and hence UNSAFELY-FLUSHABLE.
Ditto for FLOAT-SIGN, FLOAT-RADIX, FLOAT-DIGITS, and FLOAT-PRECISION,
though for some reason Python seemed unwilling to delete these calls
despite them being marked as flushable as well.
See: https://bugs.launchpad.net/sbcl/+bug/412416
Nikodemus Siivola [Tue, 11 Aug 2009 11:22:17 +0000 (11:22 +0000)]
1.0.30.43: LVAR-MATCHES needs to deal with unnamed leaves
...by passing ERRORP=NIL to COMBINATION-FUN-SOURCE-NAME. Also smooth
the return value convention of C-F-S-N by adding a secondary value:
NIL is a valid name for a local function.
See: https://bugs.launchpad.net/sbcl/+bug/411563
Nikodemus Siivola [Mon, 10 Aug 2009 09:58:45 +0000 (09:58 +0000)]
1.0.30.42: missing array predicate definitions
* Not all specialized array predicates had an out-of-line predicate.
Generate them from the SAETP vector. Reported by Stelian Ionescu.
* Test case.
Christophe Rhodes [Fri, 7 Aug 2009 11:21:21 +0000 (11:21 +0000)]
1.0.30.41: Octets support for ebcdic-us
Continuing the theme of extensions no-one has ever asked for.
(There's a lot of duplicated code everywhere in
src/code/external-formats that could be replaced with a
sufficiently complicated macro-defining-macro...)
Nikodemus Siivola [Thu, 6 Aug 2009 15:57:26 +0000 (15:57 +0000)]
1.0.30.40: faster SLOT-VALUE on structures
* Replace the SLOT-VALUE and SET-SLOT-VALUE compiler macros
with deftransforms once PCL has been built, and if the type
is known to be a structure and the slot name maps cleanly
to an accessor we can use it.
Nikodemus Siivola [Thu, 6 Aug 2009 13:41:41 +0000 (13:41 +0000)]
1.0.30.39: SB-INTROSPECT:ALLOCATION-INFORMATION test adjustment
* Ignore the :LARGE property on PPC, where is seems to bounce
back and forth. Reported by Bruce O'Neel.
(This is not a real fix, of course: the question of _why_
PPC sometimes has (or thinks it has) #'CONS on a large
object page remains.)
Nikodemus Siivola [Thu, 6 Aug 2009 12:52:58 +0000 (12:52 +0000)]
1.0.30.38: faster TRUNCATE on floats
* Specialized %UNARY-TRUNCATE/SINGLE-FLOAT and
%UNARY-TRUNCATE/DOUBLE-FLOAT.
* Explicit coercions to appropriate float types in the TRUNCATE
transforms. This gets rid of generic arithmetic in the general case
(Python is reluctant to insert explicit integer-tofloat coercions
for integers of unknown range due to precision issues.)
* Since COERCE (and %SINGLE-FLOAT and %DOUBLE-FLOAT) are not
flushable, take core not to generate leftover code in the TRUNCATE
transform when the result lvar has a single-value type.
* Rename %UNARY-TRUNCATE float VOPs, so that transforming to a
specialized floating point version doesn't make use unable to
implement it directly as a VOP when the range of the float is
sufficiently constrained.
Nikodemus Siivola [Thu, 6 Aug 2009 12:03:38 +0000 (12:03 +0000)]
1.0.30.37: fix SB-INTROSPECT test broken by 1.0.30.35
* Mishandled return value.
Christophe Rhodes [Wed, 5 Aug 2009 14:17:51 +0000 (14:17 +0000)]
1.0.30.36: Hangul syllable character names
Provide for the construction of Hangul syllable character names,
as required by Unicode ("This character name is a normative
property of the character"). At present done at build-time; if
the increase in core size is too painful, it can be done
algorithmically in CHAR-NAME and NAME-CHAR.
Nikodemus Siivola [Wed, 5 Aug 2009 12:11:42 +0000 (12:11 +0000)]
1.0.30.35: turn SB-INTROSPECT into an ASDF system
* I at least am starting to find myself having to insert
(EVAL-WHEN (...) (REQUIRE :SB-INTROSPECT))
in too many places. This may be a sign that things aught to be in
SB-EXT instead, but ASDFication seems like a logical next step.
...arguably all contribs but ASDF itself should be ASDF systems.
Nikodemus Siivola [Tue, 4 Aug 2009 10:59:09 +0000 (10:59 +0000)]
1.0.30.34: flushable INITIALIZE-VECTOR
* Allows deleting simple unused MAKE-ARRAY and VECTOR combinations.
* Move ASSERT-NO-CONSING and ASSERT-CONSING to compiler-test-util.lisp,
so that they can be used outside dynamic-extent.impure.lisp.
Nikodemus Siivola [Tue, 4 Aug 2009 10:15:11 +0000 (10:15 +0000)]
1.0.30.33: failed aver in %ALLOCATE-CLOSURES IR2 conversion
Patch by Larry D'Anna. He explains:
This snippit
(labels ((K (&optional x) #'k)))
fails with failed AVER: (XEP-P XEP), in %ALLOCATE-CLOSURES-IR2-CONVERT-OPTIMIZER
The problem is that it's trying to allocate a closure for the XEP
for K, but K has been deleted because nothing references K except
itself. %ALLOCATE-CLOSURES-IR2-CONVERT-OPTIMIZER already skips any
leafs that lacks a XEP. This patch makes it also skip leafs who's
XEPs have been deleted.
Christophe Rhodes [Mon, 3 Aug 2009 16:13:23 +0000 (16:13 +0000)]
1.0.31.32: Update to Unicode 5.0.1
There's more to be done, including fixing magic numbers and
documenting formats in internals, but this does the job for now, and
does wonders for my "lines changed" stats.
Kevin Rosenberg [Sun, 2 Aug 2009 12:47:21 +0000 (12:47 +0000)]
1.0.30.31:
src/runtime/interrupt.c: Fix spelling error in error message
Nikodemus Siivola [Sat, 1 Aug 2009 09:13:35 +0000 (09:13 +0000)]
1.0.30.30: make SB-CLTL2:VARIABLE-INFORMATION alien-aware.
* Patch by Larry D'Anna.
Nikodemus Siivola [Sat, 1 Aug 2009 09:05:01 +0000 (09:05 +0000)]
1.0.30.29: SB-CLTL2:DEFINE-DECLARATION
* Patch by Larry D'Anna.
Nikodemus Siivola [Sat, 1 Aug 2009 08:30:08 +0000 (08:30 +0000)]
1.0.30.28: SB-CLTL2:AUGMENT-ENVIRONMENT
* Patch by Larry D'Anna.
Nikodemus Siivola [Sat, 1 Aug 2009 07:57:36 +0000 (07:57 +0000)]
1.0.30.27: pretty-printing improvements
* Improved pretty-printing of simple LOOP forms, IF, and
MULTIPLE-VALUE-CALL. Patches by Tobias Rittweiler.
* Improved pretty-printing of general macro calls by inspecting
location of &BODY in the lambda-list. Patch by Tobias Rittweiler.
* Make tests in walker.impure.lisp ignore newlines as well.
Nikodemus Siivola [Fri, 31 Jul 2009 13:00:17 +0000 (13:00 +0000)]
1.0.30.26: fix failing AVER in CONVERT-MV-CALL
See https://bugs.launchpad.net/sbcl/+bug/392203
Patch by Larry D'Anna.
His comments:
Ever since Spice Lisp, convert-mv-call had returned without doing
anything if (functional-entry-fun fun) is not null, ie if fun
possesses a XEP. 0.8.5.5 replaces this criterion with "if the last
optional entry has references", and signals an error if the last
optional entry has no references and the XEP exists.
I can't know exactly what Alexy was thinking when he put the aver
in, but I can guess: If the XEP exists it should contain a
reference to the last entry point, so if the last entry point has
no refs and a XEP exists something went wrong. However, if the
number of required + optional arguments is 0, then XEP doesn't need
the "last" entry point, it can always use the "more" entry point
instead, which is exactly what seems to have happened in this case.
This patch combines the two conditions. convert-mv-call will return
without action if *either* a XEP exists, *or* the last optional
entry has references."
Nikodemus Siivola [Fri, 31 Jul 2009 12:14:00 +0000 (12:14 +0000)]
1.0.30.25: deftransform for ARRAY-IN-BOUNDS-P
* Patch by Leslie Polzer.
* Also give notes when giving up in ARRAY-TYPE-DIMENSIONS-OR-GIVE-UP.
Nikodemus Siivola [Fri, 31 Jul 2009 09:42:20 +0000 (09:42 +0000)]
1.0.30.24: hopefully fix _long_ SLEEP issues on OpenBSD
* OpenBSD refuses to nanosleep() over 100 million seconds (returning
EINVAL), so loop with 100 million second sleeps till the time left
is smaller than that.
...who knows, maybe there is a good reason to sleep over 3 years?
Bug reported by Johsh Elsasser.
Nikodemus Siivola [Fri, 31 Jul 2009 09:19:19 +0000 (09:19 +0000)]
1.0.30.23: adjust OpenBSD address spaces on x86
* Patch by Josh Elsasser. He says:
"The current address space locations for x86 OpenBSD are adequate,
but could still be better chosen. The only real problem with the
current addresses is that the default dynamic space size is larger
than the default data size resource limit, which means that sbcl
will not run without some tweaking. Attached is a patch to lower
the dynamic space size, as well as move all spaces to locations
which I suspect may prove more future-proof against OpenBSD
changes. The patch also greatly expands the OpenBSD comment. I
apologize for the verbosity, but the address space layout on
OpenBSD/i386 is quite complex and I wanted to record the details
before I forgot (again)."
Committing untested, as I don't have an OpenBSD system available.
Nikodemus Siivola [Fri, 31 Jul 2009 09:11:15 +0000 (09:11 +0000)]
1.0.30.22: better DELETE-FILE on streams
* Don't close the stream on Unix, so users can enjoy the normal
Unixy-IO to unlinked files.
* On Windows, close the stream with :ABORT NIL, so that there
is no danger of close trying to delete file as well.
Bug with DELETE-FILE trying to delete files twice reported by
John Fremlin.
Nikodemus Siivola [Thu, 30 Jul 2009 14:10:39 +0000 (14:10 +0000)]
1.0.30.21: prettier STYLE-WARNINGS for incompatible type proclamations
* Print the specifier, not the type object.
Nikodemus Siivola [Thu, 30 Jul 2009 13:36:43 +0000 (13:36 +0000)]
1.0.30.20: less DEFGENERIC clobbers FTYPE STYLE-WARNINGS
* Remove the declamation from DESCRIBE-OBJECT.
* Make SBCL warn only if the new type is more general than the old
type.
* In NOTE-GF-SIGNATURE, use the existing GF lambda-list if the user
didn't provide one to ENSURE-GENERIC-FUNCTION. This allows us to
deduce sufficiently good types for condition slot readers from the
lambda-list to elide the warning.
Nikodemus Siivola [Thu, 30 Jul 2009 11:37:12 +0000 (11:37 +0000)]
1.0.30.19: optimize (COERCE X 'VECTOR) as well
Nikodemus Siivola [Thu, 30 Jul 2009 11:02:21 +0000 (11:02 +0000)]
1.0.30.18: undefined variables in contribs
* No MSG_NOSIGNAL on Darwin. It was also groveled twice on Linux.
* Tyop in SB-SIMPLE-STREAMS.
...the real question is why ASDF didn't consider these failures,
though. Grumble.
Nikodemus Siivola [Thu, 30 Jul 2009 09:51:57 +0000 (09:51 +0000)]
1.0.30.17: generalize the previous COERCE optimization a bit
* As noted by Christophe Rhodes, this is simple enough to apply to
non-simple one-dimensional recognizable subtypes of ARRAY. ...and
(COERCE X 'STRING) is so tempting to write that it is worth
optimizing too.
Need to take some care with things like
(COERCE X '(BIT-VECTOR (NOT SIMPLE-BIT-VECTOR)))
though.
Add compiler notes as well.
Nikodemus Siivola [Wed, 29 Jul 2009 19:14:46 +0000 (19:14 +0000)]
1.0.30.16: faster COERCE for various (SIMPLE-ARRAY * (*)) subtypes
* Optimize for all regonizable subtypes.
* Also optimize for SIMPLE-STRING.
Nikodemus Siivola [Wed, 29 Jul 2009 16:15:42 +0000 (16:15 +0000)]
1.0.30.15: more complete SB-CLTL2:DECLARATION-INFORMATION
* (DECLARATION-INFORMATION 'DECLARATION) returns a list of
declaration names that have been proclaimed as valid.
Patch by Larry D'Anna.
Nikodemus Siivola [Wed, 29 Jul 2009 16:01:29 +0000 (16:01 +0000)]
1.0.30.14: some SB-CLTL2 docstrings
* Add docstrings for DECLARATION-INFORMATION, PARSE-MACRO and ENCLOSE.
* Rename a test for variable-information that had the same name as another.
Patch by Larry D'Anna, prose and indentation somewhat altered
by yours truly.
Nikodemus Siivola [Wed, 29 Jul 2009 15:36:58 +0000 (15:36 +0000)]
1.0.30.13: SB-EXT:CONSTANT-FUNCTION does not exits
* Remove reference to it from the manual.
Nikodemus Siivola [Wed, 29 Jul 2009 15:34:15 +0000 (15:34 +0000)]
1.0.30.12: make SB-GROVEL ASDF:OOS :FORCE T friendly
* Use INTERN instead of GENTEMP to generate padding names.
Patch by Leslie Polzer.
Nikodemus Siivola [Wed, 29 Jul 2009 15:15:31 +0000 (15:15 +0000)]
1.0.30.11: autogenerate tagname information for LDB in genesis
* Also remove some 32-bit assumption from LDB, and
add missing array types there.
Patch by Luis Oliveira.
* Also fix the DESCRIBE buglet credit in NEWS.
Nikodemus Siivola [Wed, 29 Jul 2009 14:51:23 +0000 (14:51 +0000)]
1.0.30.10: DESCRIBE reports on undefined but assumed/declared functions
* If FTYPE has been declared, report it even if the function is
not defined.
* If calls to the function have been compiled, report it with
an "assumed type" -- for now that is always FUNCTION, though.
Nikodemus Siivola [Wed, 29 Jul 2009 14:48:51 +0000 (14:48 +0000)]
1.0.30.9: improved generic-function FTYPE handling
* Use :DEFINED-METHOD as :WHERE-FROM even if there is no explicit
DEFGENERIC -- initial type becomes FUNCTION.
* Also signal a style-warning when the FTYPE is clobbered by a
generic function -- though in this case it is more "bad SBCL style"
than bad user style... but at least the user will know that
something unexpected is going on. (Clobbering itself is not new.)
Nikodemus Siivola [Wed, 29 Jul 2009 13:35:33 +0000 (13:35 +0000)]
1.0.30.8: redo the recent FP optimizations in a better way
* Multiplication and division should respect signed zeros.
* Optimize division to multiplication by reciprocal when an exact
reciprocal exits -- and always for FLOAT-ACCURACY=0. (Thanks
to Paul Khuong!)
Nikodemus Siivola [Tue, 28 Jul 2009 18:25:18 +0000 (18:25 +0000)]
1.0.30.7: refactor debugging cruft in definition of FXCH
* Change a call to BREAK into an AVER. Thanks to Tobias Rittweiler.
* Also fix topy in GET-TIME-OF-DAY dogstring.
Nikodemus Siivola [Tue, 28 Jul 2009 17:41:39 +0000 (17:41 +0000)]
1.0.30.6: fix minor bug in DESCRIBE
* Generic functions defined by non-toplevel DEFMETHODs may
have an :ASSUMED :WHERE-FROM in globaldb.
Nikodemus Siivola [Tue, 28 Jul 2009 17:12:25 +0000 (17:12 +0000)]
1.0.30.5: optimize some floating point operations
* Convert (/ <float> <one>) to (+ <float> <zero>), and similarly for *.
* Convert (/ <float> <minus-one>) to (+ (%negate <float>) <zero>), and
similarly for *.
* Convert (* <float> <two>) to (+ <float> <float>).
* Iff FLOAT-ACCURACY is zero, convert (+ <float> <zero>) and (- <float> <zero>)
to <float>.
Juho Snellman [Mon, 20 Jul 2009 04:26:31 +0000 (04:26 +0000)]
1.0.30.4: cfasl support
Experimental support for compiling any toplevel compile-time
effects to a separate cfasl file, in addition to evaluating
them.
* Open a second fasl output stream if :EMIT-CFASL is passed to
COMPILE-FILE. In the places where we'd normally evaluate the body
of a EVAL-WHEN :COMPILE-TOPLEVEL do both the evaluation and do a
normal compilation of the form, with the output going to the second
fasl stream.
* Fix a couple of places where a %compiler-defun would assume it'd
never be called outside the compiler (now it can be called during
cfasl loading).
* Remove the timestamps from the human-readable fasl header. They're
not really useful for anything, and make the cfasls less deterministic
and thus less useful.
Paul Khuong [Sat, 18 Jul 2009 17:53:00 +0000 (17:53 +0000)]
1.0.30.3: deal with load-time-value constants more aggressively
* Revert 1.0.29.54.rc5 to allow constant moves from LTV TNs.
* Modify the relevant VOPs to handle LTV constants correctly.
While this mostly results in duplicated code, VOPs can generate
better code even for unknown values in the constant vector.
Paul Khuong [Sat, 18 Jul 2009 17:44:42 +0000 (17:44 +0000)]
1.0.30.2: more aggressive constant-folding
* Allow constant-folding on values of an EQL type.
* Fix a buggy :load-if in x86-64 float EQLs VOPs.
Nikodemus Siivola [Sat, 18 Jul 2009 16:58:37 +0000 (16:58 +0000)]
1.0.30.1: correct nested DX handling
* RECHECK-DYNAMIC-EXTENT-LVARS must deal with nested lvars as well:
LVAR-GOOD-FOR-DX-P may return true because a nested call is actually
good for DX, not because the lvar itself _is_ automatically DX.
So, if the compiler has rearranged things a bit, we
RECHECK-DYNAMIC-EXTENT-LVARS may believe that something is DX without
the LVAR of the actual value producer being marked as such: compiler
confusion and miscompilation follows. (And no stack-allocation
failure note even though the value is actually heap allocated.)
Fixing this is just a matter of using
HANDLE-NESTED-DYNAMIC-EXTENT-LVARS in during the rechecking as well.
* ...however, doing _that_ also makes us stack allocate values from
non-DX single-use variables substituted into DX expressions (the
"otherwise inaccessible" vs "otherwise inaccessed" distinction) --
which is not good, so disable single-use variable substitution when
the target is DX unless the source is as well. One ASSERT-NO-CONSING
test case needs to be removed because of this:
(let* ((a (list 1 2 3))
(b (the list a)))
(declare (dynamic-extent b))
...)
should not stack allocate A!
* It's not all whack-a-mole: this takes care of many previous cases
where the compiler refused to stack allocate in the presence of
non-trivial nested inline expansions, _and_ allows us the get rid of
MAYBE-PROPAGATE-DYNAMIC-EXTENT, since the recheck pass now catches
all the cases that was needed for.
Nikodemus Siivola [Fri, 17 Jul 2009 21:20:31 +0000 (21:20 +0000)]
1.0.30: release, will be tagged as sbcl_0_1_0_30
Nikodemus Siivola [Wed, 8 Jul 2009 13:34:56 +0000 (13:34 +0000)]
1.0.29.54.rc5: fix load-time-value regressions
* (SPECIFIIER-TYPE 'FUNCTION) is not a FUN-TYPE.
* Don't allow constant moves from LTV TNs (better fix after release):
this is the simple and obviously correct fix.
* Also declaim the type of the correct function in the test-case from
last commit.
Nikodemus Siivola [Wed, 8 Jul 2009 12:55:11 +0000 (12:55 +0000)]
1.0.29.54.rc4: correct loading of first FP operand as inline constant
* x86-64 only.
Paul Khuong [Mon, 6 Jul 2009 13:18:09 +0000 (13:18 +0000)]
1.0.29.54.rc3: Make float tests consume less memory
* A test introduced in 1.0.29.44 uses a lot of memory during compilation. Split
the definition into multiple toplevel functions to avoid exhausting the heap.
Nikodemus Siivola [Wed, 1 Jul 2009 15:13:09 +0000 (15:13 +0000)]
1.0.29.54.rc2: two more CTOR optimization issues
* Invalid calls of the form (MAKE-INSTANCE ''QUUX) or similar reported
hard to understand errors instead of using the NO-APPLICABLE-METHOD
machinery. (reported by Gabor Melis)
* Runtime generation of new CTORs for the inline cache was not thread
safe: grab *WORLD-LOCK* to ansure that (1) all CTORs end up in
*ALL-CTORS* (2) we don't construct a CTOR with the same name twice.
Also initialize the new CTOR with the initial constructor before
setting its FDEFINITION: this is strictly speaking not needed given
the lock, but more clearly correct. No test-case, as I was unable to
actually provoke problem in real code.
Nikodemus Siivola [Mon, 29 Jun 2009 07:46:49 +0000 (07:46 +0000)]
1.0.29.54.rc1: pre-release freeze start
Paul Khuong [Sun, 28 Jun 2009 21:37:05 +0000 (21:37 +0000)]
1.0.29.54: Inline unboxed constants on x86[-64]
* New build-time feature: inline-constants, which specifies that SB!C
and SB!VM implement a protocol described in base-target-features.lisp-expr.
Backends implementing that feature are able to load constants from code
components, in a section that follows the actual executable code.
* Implement the protocol on x86 and x86-64, and use it for float constants,
and, on x86-64 only, mid-sized (> 2^(29-32), but still machine-sized)
integers.
* Use the new feature in integer and float arithmetic VOPs.
* Adjust a few test cases to take newly consing situations into account.
* Clean-up:
- New build-time feature: float-eql-vops, which disable rewriting EQL
of single and double floats in terms of foo-float*-bits.
- Fix a typo (unused variable lookup) in TWO-ARG-+/-
Nikodemus Siivola [Sun, 28 Jun 2009 21:21:04 +0000 (21:21 +0000)]
1.0.29.53: ...really this time...
(Missed version.lisp-expr and tests/compiler-test-util.lisp)
Nikodemus Siivola [Sun, 28 Jun 2009 21:18:44 +0000 (21:18 +0000)]
1.0.29.53: some LOAD-TIME-VALUE smartness
* Implicit READ-ONLY-P for obviously immutable values.
* Annotate the result with a derived type -- in practice
the obvious declarared type of the function, if any.
* In the test suite organize compiler tests a bit:
** compiler-test-util.lisp has some general-purpose
tools for determining if the compiled code passes muster.
** Move some pure tests from compiler.impure.lisp to the pure
file: they were in the impure file because they defined
utils which are now in the COMPILER-TEST-UTIL (aka CUA)
package.
Nikodemus Siivola [Sun, 28 Jun 2009 14:45:38 +0000 (14:45 +0000)]
1.0.29.52: small UCD optimizations and related cleanups
* Fix "optimization failure with anything using
SB-IMPL::UCD-GENERAL-CATEGORY" reported by Lynn Quam
(https://bugs.launchpad.net/sbcl/+bug/392206) and related
performance issues.
** Declare returns types of UCD accessors where it seems to matter.
** Make the character database a global variable, not special.
* Delete stale header comments from target-char.lisp: not just ASCII
for quite a while now.
* Delete references to fonts and bits from docstrings everywhere but
in CHAR-INT and canonicalize docstring indentation.
(The patch is a bit noisy because moving the definition of the
character database inside the macrolet messed up a whole bunch of
indentation -- sorry about that.)
Nikodemus Siivola [Sun, 28 Jun 2009 10:55:52 +0000 (10:55 +0000)]
1.0.29.51: correctly compute default initargs for FAST-MAKE-INSTANCE
* Ooops, can't use DEFAULT-INITARGS, since calling it executes the
initforms. Define and use CTOR-DEFAULT-INITARGS.
* A better test-case.
* Reported by Leslie P. Polzer.
Nikodemus Siivola [Sat, 27 Jun 2009 09:28:16 +0000 (09:28 +0000)]
1.0.29.50: update ASDF
* Not from cclan anymore, but http://common-lisp.net/project/asdf/asdf.git
Nikodemus Siivola [Sat, 27 Jun 2009 09:02:04 +0000 (09:02 +0000)]
1.0.29.49: silence compiler note for type-checks from MAKE-INSTANCE in safe code
* Reported by Samium Gromoff.
Nikodemus Siivola [Fri, 26 Jun 2009 20:45:04 +0000 (20:45 +0000)]
1.0.29.48: compute default initargs for SB-PCL::FAST-MAKE-INSTANCE
* Reported by Lars Rune Nøstdal.
* SB-PCL::DEFAULT-INITARGS doesn't have to be a generic function.
* Test-case.
Paul Khuong [Fri, 26 Jun 2009 16:54:18 +0000 (16:54 +0000)]
1.0.29.47: Floating point correctness improvement
* Don't perform constant folding for addition/subtraction of 0
or multiplication/division/exponentiation by +/- 1 on float
types.
* Also operate on the imaginary part for generic addition and
subtraction with mixed complex/real arguments, as specified.
* Update NEWS for 10.29.44.
Nikodemus Siivola [Fri, 26 Jun 2009 15:56:09 +0000 (15:56 +0000)]
1.0.29.46: export SB-POSIX:FILENAME and SB-POSIX:FILE-DESCRIPTOR
* Also define the non-designator types, and export the designator
types.
* Document both types and functions separately, moving the docs from
manual into docstrings.
* Extend FILENAME-DESIGNATOR for STREAMS for consistency with pathnames.
Nikodemus Siivola [Thu, 25 Jun 2009 17:11:05 +0000 (17:11 +0000)]
1.0.29.45: another CTOR optimization
* If we're forced to use the fallback generator, but the initargs can be
verified early on and there are no extra methods on MAKE-INSTANCE
we don't have to go through full MAKE-INSTANCE: instead use
FAST-MAKE-INSTANCE. 1 less GF call and no initarg checking at runtime
yields a ~2-4 fold performance improvement.
Paul Khuong [Thu, 25 Jun 2009 15:37:05 +0000 (15:37 +0000)]
1.0.29.44: Complex float improvements
* On all platforms:
- Slightly more stable complex-complex float (double and single)
division;
- New transform for real-complex division;
- complex-real and real-complex float addition and subtraction
behave as though the real was first upgraded to a complex, thus
losing the sign of any imaginary zero.
* On x86-64
- Complexes floats are represented packed in a single SSE register;
- VOPs for all four arithmetic operations, complex-complex, but also
complex-real and real-complex, except for complex-complex and
real-complex division;
- VOPs for =, negate and conjugate of complexes (complex-real and
complex-complex);
- VOPs for EQL of floats (real and complexes).
- Full register moves for float values in SSE registers should also
speed scalar operations up.
Paul Khuong [Thu, 25 Jun 2009 15:26:10 +0000 (15:26 +0000)]
1.0.29.43: SSE{1,2} instruction definitions on x86-64
* Most definitions have barely been tested.
* Small disassembler bugfix for an SSE instruction format also included.
Nikodemus Siivola [Thu, 25 Jun 2009 15:00:34 +0000 (15:00 +0000)]
1.0.29.42: small fixoid for the EXPT optimization from 1.0.29.40
* EQL -1, not 1 -- no easily observable difference, but this one gets
the branchless version actually used.
Nikodemus Siivola [Thu, 25 Jun 2009 14:55:41 +0000 (14:55 +0000)]
1.0.29.41: inline CTOR caches for MAKE-INSTANCE
* If MAKE-INSTANCE has constant keywords but a variable first argument,
build an inline cache of CTORs.
** Initially a sorted list, switching to a max 256 entry table if
the list grows too large.
** Rename CTOR-NAME to CTOR-NAME-OR-CLASS, and allow building CTORs
for class arguments as wel. Similarly, CTOR function names
can contain class objects as well.
** Factor out RANDOMLY-PUNTING-LAMBDA from cache.lisp, since CTOR
cache wants it too.
** STD-INSTANCE-P and FSC-INSTANCE-P become functions with compiler
macros -- they are now used in compiler-support.lisp, which
is built before low.lisp, so using macros is out.
* Also enable the existing CTOR optimization for constant class objects
as class arguments.
* Tests.
Nikodemus Siivola [Thu, 25 Jun 2009 11:26:57 +0000 (11:26 +0000)]
1.0.29.40: more (EXPT MINUS-ONE INTEGER) optimization
* Branchless version, thanks to Paul Khuong.
* Also optimize -1.0 and -1.0d0 cases.
* Tests.
Nikodemus Siivola [Thu, 25 Jun 2009 10:32:55 +0000 (10:32 +0000)]
1.0.29.39: SLEEP on large integers
* Truncate arguments to nanosleep to SIGNED-WORD -- sleeping for 68
years should be enough for anyone. (reported by Leslie Polzer, patch
by Stas Boukarev)
* Also fix a snafu from the last commit: GET-UNIVERSAL-TIME, not
GET-INTERNAL-REAL. Feh.
Nikodemus Siivola [Thu, 25 Jun 2009 09:40:22 +0000 (09:40 +0000)]
1.0.29.38: better DESCRIBE
* Rework DESCRIBE for more comprehensive reporting and
easier to read output.
* Delete src/pcl/describe.lisp, no PCL leftovers in the new DESCRIBE
except for some heritage in DESCRIBE-INSTANCE.
* Fix COMPILED timestamps: we want both internal-real and universal
time for different use-cases. (Though I'm not sure if we really care
about the COMPILED timestamps that much, especially now that I
unilaterally removed their printing from DESCRIBE.)
* Give primitive type transform functions the lambda-list of the type.
Gabor Melis [Wed, 24 Jun 2009 20:03:43 +0000 (20:03 +0000)]
1.0.29.37: fix control stack exhuastion regression on x86 darwin
... caused by 1.0.29.32.
https://bugs.launchpad.net/bugs/391620
Nikodemus Siivola [Wed, 24 Jun 2009 15:14:44 +0000 (15:14 +0000)]
1.0.29.36: another regression from 1.0.29.27
* Need to be able to load zero-length .lisp files -- but still
disallow loading of empty fasls.
* Reported by Martin Cracauer.
Nikodemus Siivola [Wed, 24 Jun 2009 14:33:18 +0000 (14:33 +0000)]
1.0.29.35: regression from 1.0.29.27
* If the runtime namestring is not available, don't try to parse it.
* Reported by Josh Elsasser.
Nikodemus Siivola [Mon, 22 Jun 2009 16:06:22 +0000 (16:06 +0000)]
1.0.29.34: hopefully thread-safe SB-PROFILE
* Nuke PCOUNTER stuff, and replace it with a COUNTER local to
profile.lisp:
** New counter uses ATOMIC-INCF for atomicity, plus a lock and
an overflow counter to handle counts over word in size.
** Stack allocate counters and counter value cells when possible
to reduce overhead.
* Nuke the FASTBIG-stuff. A generic arithmetic call with fixnum args
is not that slow -- and if it turns out to be too slow after all,
then the compiler should take care of this under appropriate policy
instead of us using hacks like this.
* Test case from Volkan Yazici.
Gabor Melis [Mon, 22 Jun 2009 13:00:14 +0000 (13:00 +0000)]
1.0.29.33: fix compilation with QSHOW_SIGNAL_SAFE on win32
Gabor Melis [Mon, 22 Jun 2009 12:58:22 +0000 (12:58 +0000)]
1.0.29.32: SCRUB-CONTROL-STACK related changes
- remove unused count logic from SCRUB-CONTROL-STACK
- fix SCRUB-CONTROL-STACK being uncareful about touching the guard
page
- threads stopped by gc do a quick scrubbing of the control stack to
slightly lessen the probability of uninitialized stack locations
pointing to live objects
Nikodemus Siivola [Mon, 22 Jun 2009 11:53:51 +0000 (11:53 +0000)]
1.0.29.31: new contrib: SB-QUEUE
* Lockless thread-safe FIFO queue.
Nikodemus Siivola [Mon, 22 Jun 2009 08:05:46 +0000 (08:05 +0000)]
1.0.29.30: oops, get documentation for built-in macros right
* Reported by Harald Hanche-Olsen.
Nikodemus Siivola [Sun, 21 Jun 2009 21:59:22 +0000 (21:59 +0000)]
1.0.29.29: (one more)^3 DIRECTORY regression
* Fix /*/foo: refactoring left lambdas where none were needed, so the
iteration code was never run at all for non-leaf cases.
* Test-cases...
Nikodemus Siivola [Sun, 21 Jun 2009 18:19:25 +0000 (18:19 +0000)]
1.0.29.28: optimize (EXPT -1 INTEGER)
* Patch by Stas Boukarev.
Nikodemus Siivola [Sun, 21 Jun 2009 16:30:32 +0000 (16:30 +0000)]
1.0.29.27: add shebang line to fasls
* Don't advertise yet, and don't make fasls executable out of the box
-- since the SBCL version used to run the fasl has to be the same as
compiled it this is clearly not good for distributing stuff in
general, just for local convenience.
Nikodemus Siivola [Sun, 21 Jun 2009 14:57:37 +0000 (14:57 +0000)]
1.0.29.26: robustify GENTEMP against pretty-printer
* Patch by Alex Plotnick.
Nikodemus Siivola [Sun, 21 Jun 2009 12:16:03 +0000 (12:16 +0000)]
1.0.29.25: make SB-INTROSPECT pass tests on PPC and Sparc
* Patch by Bruce O'Neel.
Nikodemus Siivola [Sun, 21 Jun 2009 10:26:24 +0000 (10:26 +0000)]
1.0.29.24: preserve docstrings for local and anonymous functions
Based on patch by Lessie Polzer:
* Rename SIMPLE-FUN-XREFS to SIMPLE-FUN-INFO. Slot holds the docstring
and/or XREF vector for the function. This saves space in the common
case of no dostring -- the patch actually ends up shrinking
sbcl.core a bit.
* Teach the compiler how to grab the docstrings from LAMBDAs and how
to preserve them for the lambdas constructed for FLET and LABELS
functions.
* Store COMPILER-MACRO documentation in the COMPILER-MACRO-FUNCTION.
* Store macro documentation in the MACRO-FUNCTION.
* Nuke (INFO :FUNCTION :DOCUMENTATION).
Nikodemus Siivola [Sat, 20 Jun 2009 13:48:46 +0000 (13:48 +0000)]
1.0.29.23: simple-fun and closure cleanups
* Reorganize things a bit between kernel.lisp and target-misc.lisp for
clarity, ditto for the package-data-lisp.expr.
* Define SIMPLE-FUN, CLOSURE, and FUNCALLABLE-INSTANCE types, and use
them instead of manually checking for widetags in various places.
* Implement (SETF %FUN-LAMBDA-LIST), and make it work on interpreted
functions as well by giving them an DEBUG-LAMBDA-LIST. Use in
DEFMACRO and DEFINE-COMPILER-MACRO instead of looking at the widetags.
* Make (SETF %FUN-NAME) to work: on closures just change the name of
the underlying function and let the callers beware. On interpreted
functions change the new DEBUG-NAME slot instead of NAME. Use in
DEFMACRO and DEFINE-COMPILER-MACRO.
* Implement and use DO-CLOSURE-VALUES to walk over closure environment
instead of manually iterating over indexes.
* Use %FUN-FUN in FUN-DEBUG-FUN, and %FUN-LAMBDA-LIST in the
SB-ACLREPL::INSPECTED-PARTS.
* Remove the commented out (SETF %FUN-NAME) from DEFUN: the compiler
does the right thing, and for the debugger to have a useful name it
has to be on the SIMPLE-FUN at any rate, so...
* Slightly nicer DESCRIBE of interpreted functions.
Nikodemus Siivola [Sat, 20 Jun 2009 11:37:25 +0000 (11:37 +0000)]
1.0.29.22: smattering of DOCUMENTATION cleanups
* Delete stale function documentation: STEP-CONDITION-SOURCE-PATH and
STEP-CONDITION-PATHNAME no longer exist.
* Move RANDOM-DOCUMENTATION to SB-KERNEL, use it in FDOCUMENTATION.
* Replace bare INFO calls from DOCUMENTATION methods with calls to
FDOCUMENTATION, as per FIXME.
* Make FDOCUMENTATION work on '(SETF FOO) names, and delete the
DEFKNOWNs for it.
Nikodemus Siivola [Sat, 20 Jun 2009 09:31:50 +0000 (09:31 +0000)]
1.0.29.21: less strict os-provides-dladdr.c
* Allows us to use dladdr on FC6, where previous test failed because
we expected an exact match on the name for "printf", whereas the
name we got is "_IO_printf".
IIRC the reason for the name was that some marginal platform had a
dladdr that always returned "unknown function" or something like
that -- here's hoping that's not the case anymore, but if it is,
testing that the return value is not a placeholder string like that
is probably better.
Nikodemus Siivola [Sat, 20 Jun 2009 09:08:09 +0000 (09:08 +0000)]
1.0.29.20: fix build breakage from 1.0.29.12 (PPC and MIPS, hopefully)
* Typos in make-config.sh PPC parts. Reported by Bruce O'Neel.
* MIPS was missing :STACK-ALLOCATABLE-VECTORS.
Nikodemus Siivola [Thu, 18 Jun 2009 19:19:44 +0000 (19:19 +0000)]
1.0.29.19: robustify SYMBOL-VALUE-IN-THREAD
* Deal with UNBOUND-MARKER-WIDETAG, bogus values, and GC potentially
moving the object.
* Disable one of the test on Darwin as it deadlocks for reasons which
seem to have nothing to do with S-V-I-T, but rather re-entrancy and
signal-handler safety of OS provided C functions.
Nikodemus Siivola [Thu, 18 Jun 2009 14:14:34 +0000 (14:14 +0000)]
1.0.29.18: delete more debugging cruft that should never have been committed
...sorry about the noise.
Nikodemus Siivola [Thu, 18 Jun 2009 12:41:13 +0000 (12:41 +0000)]
1.0.29.17: SYMBOL-VALUE-IN-THREAD
* Build on top of %SYMBOL-VALUE-IN-THREAD, document and export from
SB-THREAD. Write a bunch of test-cases.
* New condition: SB-THREAD:THREAD-ERROR. Inherit from it in
JOIN-THREAD-ERROR and INTERRUPT-THREAD-ERROR, and deprecate
JOIN-THREAD-ERROR-THREAD and INTERRUPT-THREAD-ERROR-THREAD in favor
of THREAD-ERROR-THREAD.
* General threading related documentation touchups.
Nikodemus Siivola [Thu, 18 Jun 2009 09:32:45 +0000 (09:32 +0000)]
1.0.29.16: make the fopcompiler DEFGLOBAL-aware
* Thanks to Lars Rune Nøstdal.