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.
Nikodemus Siivola [Thu, 18 Jun 2009 09:21:34 +0000 (09:21 +0000)]
1.0.29.15: delete stray debugging cruft
* Commit mishap from 1.0.29.14.
Nikodemus Siivola [Thu, 18 Jun 2009 08:49:29 +0000 (08:49 +0000)]
1.0.29.14: implement SB-INTROSPECT:ALLOCATION-INFORMATION
* Allows users to gain insights into allocation behaviour.
Nikodemus Siivola [Wed, 17 Jun 2009 20:03:35 +0000 (20:03 +0000)]
1.0.29.13: relax CAST-EXTERNALLY-CHECKABLE-P a bit
* Allows (lambda (x y) (string= x y)) to be compiled without inserting
type-checks that will be done by STRING=* into the lambda.
Nikodemus Siivola [Wed, 17 Jun 2009 16:40:34 +0000 (16:40 +0000)]
1.0.29.12: nicer DX capability conditionalization
* New *FEATURES*: :STACK-ALLOCATABLE-LISTS, :STACK-ALLOCATABLE-VECTORS, and
:STACK-ALLOCATABLE-FIXED-OBJECTS filled in by make-config.sh.
* Use them instead of #!+(or arch1 arch2 ...).
Nikodemus Siivola [Tue, 16 Jun 2009 09:41:54 +0000 (09:41 +0000)]
1.0.29.11: one more one more DIRECTORY regressions
* (DIRECTORY "X*") should not match directories with dotted names.
* Get rid of the KLUDGE to make up a directory component from pathname
name and type, which was a source of inconsistencies between
handling files and directories. Instead make MAP-DIRECTORY
:DIRECTORIES :AS-FILES map over directory entries with
filename-style pathnames, which allows us to share the matching
logic between the two nicely.
Nikodemus Siivola [Mon, 15 Jun 2009 22:13:08 +0000 (22:13 +0000)]
1.0.29.10: one more DIRECTORY regression
* (DIRECTORY "X*.*") should match directories in addition to files.
Nikodemus Siivola [Mon, 15 Jun 2009 12:03:10 +0000 (12:03 +0000)]
1.0.29.9: prettier style-warnings for incompatible FTYPE proclamations
* Unparse the types and indent nicely.
Nikodemus Siivola [Mon, 15 Jun 2009 11:05:41 +0000 (11:05 +0000)]
1.0.29.8: :PTY and stream arguments in RUN-PROGRAM
* Reported by Elliot Slaughter, patch by Stas Boukarev.
Nikodemus Siivola [Mon, 15 Jun 2009 10:03:54 +0000 (10:03 +0000)]
1.0.29.6: regression in DIRECTORY when matching directory patterns
* Don't recurse on the return value of PATTERN-MATCHES, but rather
the subdirectory that matches.
Nikodemus Siivola [Wed, 10 Jun 2009 13:03:36 +0000 (13:03 +0000)]
1.0.29.6: work around stack-allocated value cell badness in HANDLER-CASE
* Use an explicit CONS so the closed-over variable is read-only and
doesn't need a value cell, and stack allocate the CONS instead.
(Stack analysis still can't reason about stack allocated
value-cells... it might be that doing a transformation like this in
the compiler would be the way to integrate dx value cells properly
into Python, maybe?)
Nikodemus Siivola [Tue, 9 Jun 2009 12:23:51 +0000 (12:23 +0000)]
1.0.29.5: list item seek transform needs to check for both :TEST and :TEST-NOT
* When both are provided, abort the transform and let the full call
take care of signalling the error. Reported by Tobias Ritterweiler.
Nikodemus Siivola [Fri, 5 Jun 2009 14:25:29 +0000 (14:25 +0000)]
1.0.29.4: still more MAKE-ARRAY work
* Re-order the three MAKE-ARRAY deftransform, so that the more
specific ones are tried before the general one -- which allows stack
allocation in more the remaining cases that used to fail (I don't
know why I blamed VECTOR-FILL* for that before.)
* When constant splicing for initial-element in
TRANSFORM-MAKE-ARRAY-VECTOR didn't quote it, leading to lossiness
with symbols or lists as constant initial-elements. (Bug masked
earlier by the mis-ordering of the deftransforms.)
* In the final leg of TRANSFORM-MAKE-ARRAY-VECTOR also eliminate the
possible :INITIAL-ELEMENT keyword.
* When eliminating keywords from a MAKE-ARRAY call, don't flush the
lvars before checking that all of them can be eliminated. (Also
masked by the earlier mis-ordering.)
Nikodemus Siivola [Fri, 5 Jun 2009 13:08:35 +0000 (13:08 +0000)]
1.0.29.3: better reporting for failure to stack allocate
* If the LVAR has no uses left, it is not good for DX.
* When flushing the destination of a DX lvar, note that its uses will
not be stack allocated.
* Pull out the failure to stack allocate reporting into
NOTE-NO-STACK-ALLOCATION, relax the filter to allow complaints
about non-constant REFs, and omit notes for flushed and flushable
combinations. TODO: the compiler should know about non-consing
functions, so that it can avoid inane notes like "could not stack
allocate the result of (CAR X)" should someone declare that DX.
* Muffle compiler notes from WITH-PINNED-OBJECTS, since our paranoid
use of DX-LET there is liable to cause lots of confusing "unable to
stack allocate" notes.
Nikodemus Siivola [Fri, 5 Jun 2009 11:36:46 +0000 (11:36 +0000)]
1.0.29.2: implement fixnump/signed-word VOP on x86 and x86-64
* No need to cons up a bignum, and just one branch required.
Eliminates a whole class of signed-word to integer coercions.
Nikodemus Siivola [Thu, 4 Jun 2009 18:01:31 +0000 (18:01 +0000)]
1.0.29.1: fix FILL
* Imaginary parts were messed up on 64 bit platforms when
filling arrays of (COMPLEX SINGLE-FLOAT). Thanks to Paul Khuong.
* Also delay the transform of FILL till constraint propagation has
run, to get the constant argument form MAKE-ARRAY in properly.
* ...and eradicate remaining references to the SUPPORT file.
Nikodemus Siivola [Thu, 4 Jun 2009 12:59:09 +0000 (12:59 +0000)]
1.0.29: release, will be tagged as sbcl_1_0_29
Nikodemus Siivola [Thu, 4 Jun 2009 11:28:34 +0000 (11:28 +0000)]
1.0.28.77: fix test failures on PPC and elsewhere
* Most of the failures were test that cannot pass due to missing
bits of DX implementation -- stack allocatable vectors and
fixed-alloc.
* Mark backtrace test 353 as expected to fail on PPC as well.
* Don't declare *HANDLER-CLUSTERS* as dynamic-extent on platforms
that do not support DX fixed-alloc, since it will just give
a spurious compiler note.
Nikodemus Siivola [Wed, 3 Jun 2009 15:56:32 +0000 (15:56 +0000)]
1.0.28.76: fix non-unicode builds on x86 and x86-64
* The problem has been there since 1.0.24.35, but possibly
exposed only recently: MOVE-IF/CHAR cannot use byte-sized
registers since CMOV cannot. Hence disable if for non-unicode
builds.
Reported by Stas Boukarev.
* Missing news entry from 1.0.28.75.
Nikodemus Siivola [Wed, 3 Jun 2009 09:09:52 +0000 (09:09 +0000)]
1.0.28.75: documentation work related to move to Launchpad
* Delete SUPPORT and minimize BUGS.
The information that used to be there is now the first chapter of
the manual: "Getting Support and Reporting Bugs", Maybe it belongs
elsewhere, but IMO it should be as prominent as we can make it - so
the first chapter for now.
Refer to Lauchpad and sbcl-bugs in "Reporting Bugs".
Remove Dan B. from support providers for now, given that
metacircles.com is currently domain-parked.
Nikodemus Siivola [Tue, 2 Jun 2009 18:33:52 +0000 (18:33 +0000)]
1.0.28.74: SHARED-INITIALIZE should initialize unbound :CLASS slots
* This has been around for a while, but despite the misleading
comment in the source the spec is clear enough.
Nikodemus Siivola [Tue, 2 Jun 2009 17:23:08 +0000 (17:23 +0000)]
1.0.28.73: regression from 1.0.28.21
* One leg of logic lost in the refactoring: if the type to verify is
(SIMPLE-ARRAY * (*)) we need to check that there is no array
header.
Nikodemus Siivola [Tue, 2 Jun 2009 15:59:33 +0000 (15:59 +0000)]
1.0.28.72: two regressions from 1.0.28.59
* OPEN should not physicalize the pathname associated with
the stream.
* RENAME-FILE needs to deal with logical pathnames.
(Both revealed by ansi-tests, as were the last bunch.)
Nikodemus Siivola [Tue, 2 Jun 2009 15:03:03 +0000 (15:03 +0000)]
1.0.28.71: two regressions from the 1.0.28. series
* from 1.0.28.51: when destructuring a constant :INITIAL-CONTENTS to
MAKE-ARRAY, take care to quote the elements.
* from 1.0.28.61: handle :BACK and :UP in CANONICALIZE-PATHNAME, and
make sure they do not appear after :WILD-INFERIORS or :ABSOLUTE.
I'm more and more concinved that MAKE-PATHNAME should canonicalize,
though, so that these checks don't need to be carried out by users
of pathnames -- but leaving that for later.
...how appropriate that it is .71 that fixes both.
Nikodemus Siivola [Sat, 23 May 2009 08:27:21 +0000 (08:27 +0000)]
1.0.28.70: regression in ABOUT-TO-MODIFY-SYMBOL-VALUE from 1.0.28.30
* Patch and test-case by Stas Boukarev.
Nikodemus Siivola [Fri, 22 May 2009 06:16:20 +0000 (06:16 +0000)]
1.0.28.69: filesystem tests and small Windows improvements
* FILE-AUTHOR returns NIL instead of signalling an error on Windows
* Missing DIRECTORY canonicalization tests.
* Check one-letter devices for being alpha-chars when unparsing
them on Windows.
* NATIVE-NAMESTRING now has similar tailing-slash handling
on Windows as elsewhere -- adjust the test.
* Windows namestrings canonicalize / to \ -- make the random
namestring tests take that into account.
...filesys.pure.lisp passes on Windows.
Nathan Froyd [Thu, 21 May 2009 21:03:34 +0000 (21:03 +0000)]
1.0.28.68: move PPC over to slimmed-down EMIT-ERROR-BREAK interface
nyef pointed out that compiler/generic/array.lisp was kinda ugly with the
#!+ condition goo it in. This patch is the first step towards moving all
backends over to the slimmer EMIT-ERROR-BREAK interface--one that doesn't
require duplicating lots of error generation code in VOP generation
functions.
Nathan Froyd [Thu, 21 May 2009 16:22:54 +0000 (16:22 +0000)]
1.0.28.67: fix build on powerpc-linux
lose() was not getting declared early enough; shuffle header files around
to ensure interr.h gets included before gc.h in the relevant places.
Nikodemus Siivola [Thu, 21 May 2009 15:27:37 +0000 (15:27 +0000)]
1.0.28.66: implement SB-EXT:GET-TIME-OF-DAY
* On unixoid platforms is this pretty much what UNIX-GETTIMEOFDAY
used to be, whereas on Windows we build it on top of
SystemTimeAsFileTime since gettimeofday() doesn't give us
microseconds there -- it's almost as if the POSIX API support on
Windows as intentionally sucky...
* Keep UNIX-GETTIMEOFDAY around as a wrapper to GET-TIME-OF-DAY,
since there are applications in the wild that use it directly.
Scheduled for deletion towards to the end of 2009, or so.
Nathan Froyd [Thu, 21 May 2009 12:13:53 +0000 (12:13 +0000)]
1.0.28.65: fix compiling with *PROFILE-HASH-CACHE* set to T
We were trying to set the PROBES/MISSES variables prior to actually
defining them. Rearrange the logic and add a little OAOO to ensure the
variables are DEFVAR'd first.
Nikodemus Siivola [Thu, 21 May 2009 10:30:27 +0000 (10:30 +0000)]
1.0.28.64: more DIRECTORY work
* While DIRECTORY on local UNC paths worked as of 1.0.28.61, turns
out Windows network shares don't exist as far as stat() is
concerned -- and hence using the proper share path didn't work.
Replace QUERY-FILE-SYSTEM in MAP-DIRECTORY with UNIX-REALPATH
sans stat, and we're good.
* Canonicalize the pathnames for DIRECTORY, so that (DIRECTORY #P".")
is equivalent to (DIRECTORY #P"./") -- ditto for #P".." and
#P"../". Also make DIRECTORY treat :UNSPECIFIC names and types as
if they were NIL.
Nikodemus Siivola [Thu, 21 May 2009 09:56:16 +0000 (09:56 +0000)]
1.0.28.63: SB-EXT:DEFINE-HASH-TABLE-TEST
* Based on old SB-INT:DEFINE-HASH-TABLE-TEST, but:
** macro, not a function.
** only two arguments: name of the test function, and the hash function
(which can also be a lambda form.)
** :TEST accepts both 'NAME, and #'NAME as well.
** pick up redefinitions of the test and hash-function without
re-executing the D-H-T-T form.
** protected by package locks.
* MAKE-HASH-TABLE :HASH-FUNCTION supported as well. EQ-based hashing
not legal for user-provided hash functions, accidents prevented by
wrapping functions which may return a true secondary value in
a closure.
* Documentation -- other hash-table extensions as well.
* Documentation generation improvements:
** use the shortest package name available -- CL:FOO, not
COMMON-LISP:FOO.
** kludge around texi2pdf making &key and company bold
** add exceptions so that we don't format words ANSI and CLHS
as lowecase symbols.
Nathan Froyd [Thu, 21 May 2009 01:50:52 +0000 (01:50 +0000)]
1.0.28.62: restore SYSCALL macros to the target build
Apparently there were other clients floating out in the wild.
Nikodemus Siivola [Wed, 20 May 2009 13:51:53 +0000 (13:51 +0000)]
1.0.28.61: partial re-implementation of DIRECTORY
* Rip out !ENUMERATE-MATCHES, which insisted on walking the
directory tree from the root -- making using DIRECTORY on
UNC pathnames a losing proposition.
* New guts built on top of MAP-DIRECTORY, and it's lower level cousin
WITH-NATIVE-DIRECTORY-ITERATOR. This seems easier to understand to
me at least, and was certainly easier than trying to re-architect
!ENUMERATE-MATCHES. ...and DIRECTORY now works on UNC shares, yay!
...and a bunch of associated secondary changes:
** Rename UNIX-FILE-KIND NATIVE-FILE-KIND, and move it to
filesys.lisp.
** Add functions UNIX-OPENDIR, UNIX-READDIR, UNIX-CLOSEDIR, and
UNIX-DIRENT-NAME -- later to be turned into OS-*, and possibly
moved into SB-SYS.
** *IGNORE-WILDCARDS* is no longer needed in MAYBE-MAKE-PATTERN,
kill it.
** Share UNPARSE-*-PIECE as UNPARSE-PHYSICAL-PIECE between Win32
and Unix: both have the same lisp namestring syntax for pieces,
and if a third pathname host appears it probably should too.
** Fix DEFKNOWN of DIRECTORY: RESOLVE-SYMLINKS needs to be a
keyword there.
** Kill QUICK-INTEGER-TO-STRING -- use %OUTPUT-INTEGER-IN-BASE
in GENSYM instead.
** Kill PATHAME-ORDER, unused.
** Follow the same convention as elsewhere for :AS-FILE in
NATIVE-NAMESTRING on Windows -- users needing the
no-trailing-slash version are supposed to say :AS-FILE. OS
pickiness on slash-or-no seems universal...
Nikodemus Siivola [Tue, 19 May 2009 12:30:24 +0000 (12:30 +0000)]
1.0.28.60: partial UNC pathname support for Windows
UNC hosts are represented using the devíce components of pathnames,
as are drives. This is sleightly lossy since it prevents accessing
network hosts named with a single letter -- single-letter devices
are taken to mean drives.
However, since storing the host in the pathname host component
would lead to confusion between logical hosts and UNC hosts,
this seems preferable right now, so that
(make-pathname :host "foo" ...)
remains unambiguous. DIRECTORY does not work yet with UNC pathnames
since it insists on walking the path from root -- which Windows
doesn't seem to allow for UNC paths, not even local ones.
Nikodemus Siivola [Mon, 18 May 2009 20:38:44 +0000 (20:38 +0000)]
1.0.28.59: give UNIX-NAMESTRING the chop
Use PROBE-FILE and NATIVE-NAMESTRING instead as appropriate.
Nikodemus Siivola [Mon, 18 May 2009 09:17:49 +0000 (09:17 +0000)]
1.0.28.58: more MAKE-ARRAY goodness
Consider (MAKE-ARRAY '(3) :INITIAL-CONTENTS (LIST X Y Z)):
The transform for LIST dimensions replaces this with an identical
call, except that the dimensions will be 3.
The transform for INTEGER dimensions fires, but does not yet
see the (LIST X Y Z) in INITIAL-CONTENTS, since it is now an
argument to the lambda introduced by the previous call.
One option would be to delay the latter transform if we don't see
how to compile it nicely, because after a couple of IR1-OPTIMIZE
passes the call to LIST will be there, and the intermediate lambda
eliminated.
However, because multiple roundtrips like that suck, instead make
the source transform for MAKE-ARRAY smart enough to recognize this
case, and transform to the integer argument case directly.
...now, this makes me think we really should try to eliminate /
simplify lambdas introduced by TRANSFORM-CALL up front somehow.
Nikodemus Siivola [Mon, 18 May 2009 07:58:11 +0000 (07:58 +0000)]
1.0.28.57: cross compiler is able to reason about host complexes
...based on the type the host object will take in target,
which just needs to follow the same logic our dumper uses.
...fixing which shows the the new FILL transform didn't handle
complex single floats quite right yet.
Nikodemus Siivola [Sun, 17 May 2009 18:01:01 +0000 (18:01 +0000)]
1.0.28.56: more robust stack frame pointer checking in SB-SPROF
Foreign code might not have a frame pointer like we expect. Use
CONTROL-STACK-POINTER-VALID-P to check it.
Patch by Bart Botta.
Nikodemus Siivola [Sun, 17 May 2009 17:30:23 +0000 (17:30 +0000)]
1.0.28.55: transform FILL to a UB*-BASH-FILL when possible
The performance boost for all cases which previously used
VECTOR-FILL* is quite noticeable.
Also delay the FILL transform if the vector element type is
not yet known.
...also one leftover #+sb-xc-host from the previous commit.
Nikodemus Siivola [Sun, 17 May 2009 17:11:59 +0000 (17:11 +0000)]
1.0.28.54: more principled approach to complex dumping in the xc
Christophe points out that (UPGRADED-COMPLEX-PART-TYPE 'DOUBLE-FLOAT)
can be REAL on some hosts, in which case the host will happily
agree that (TYPEP #C(2 2) '(COMPLEX DOUBLE-FLOAT)) is true... etc.
So in the cross compiler look at the type of the parts of the
complex, and refuse to dump it if it doesn't look like something we
can handle correctly.
Nikodemus Siivola [Sun, 17 May 2009 12:44:17 +0000 (12:44 +0000)]
1.0.28.53: enable dumping of specialized complexes in the cross-compiler
* No reason to disable it that I can see, and if it is disabled the
cross-compiler will dump slightly bogus objects for complex single
and double floats -- using the generic complex widetag.
Noticed while trying to initialize arrays using the
SAETP-DEFAULT-INITIAL-ELEMENT.
Nikodemus Siivola [Sat, 16 May 2009 15:10:54 +0000 (15:10 +0000)]
1.0.28.52: fix x86-64 build, oops
Name data vector accessor VOPs consistently, using the -WITH-OFFSET/
style names, since on x86-64 they all are with offsets.
(INITIALIZE-VECTOR has a macrolet that generates VOP calls based on
the platform, and wants consistent names.)
Nikodemus Siivola [Sat, 16 May 2009 12:23:13 +0000 (12:23 +0000)]
1.0.28.51: better MAKE-ARRAY transforms
* Add a source transform for MAKE-ARRAY that declaims LIST and VECTOR
as NOTINLINE, so the the MAKE-ARRAY deftransforms are able to pick
them apart (for DIMENSIONS and :INITIAL-CONTENTS.)
* INITIALIZE-VECTOR is a new magic function with a IR2-CONVERT
transform. It's purpose is to allow open coding :INITIAL-CONTENTS
initialization without inhibiting stack allocation.
* Turns out that making stack allocation decisions during locall
analysis is not enough since optimization iterates: if a transform
occurs and introduces new LVARs that would be good for DX after
the locall analysis has run for the combination, the new LVARs
will not get their share of stacky goodness. Therefore, after
a transform propagate DX information to the new functional
explicitly (see MAYBE-PROPAGATE-DYNAMIC-EXTENT.)
* The new logic is in TRANSFORM-MAKE-ARRAY-VECTOR, which handles
all the cases of vector allocation with a known element type:
** :INITIAL-CONTENTS (LIST ...), (VECTOR ...) and (BACKQ-LIST ...)
are picked apart when the length matches the vector length,
and their arguments are spliced into the call.
Constant :INITIAL-CONTENTS is picked apart as well.
Initialization is done using INITIALIZE-VECTOR.
** Otherwise :INITIAL-CONTENTS is splatted in place using
REPLACE after we have checked that the length matches.
** :INITIAL-ELEMENT not EQL to the default element uses
FILL.
** Otherwise the default initialization is fine.
Some additional hair here, since MAYBE-PROPAGATE-DYNAMIC-EXTENT
cannot deal with OPTIONAL-DISPATCH functionals. So to ensure we get
full benefit of it, make sure the lambdas we transform to have only
required arguments -- courtesy of new ELIMINATE-KEYWORD-ARGUMENT
utility. (Note: it might be worth it to do something like this for
many cases automatically, to reduce the number of lambdas the
compiler generates. For inline lambdas we could do the whole &key
handling _before_ the lambda is converted...)
* Identify the case of (LIST N) as dimensions as being a vector,
and delegate to TRANSFORM-MAKE-ARRAY-VECTOR.
* More efficient allocation of simple multidimensional arrays in
the presence of :INITIAL-CONTENTS (still slow, though) and
:INITIAL-ELEMENT (not bad.)
* Fix the source transform for VECTOR so that it too can stack
allocate.
* Updates tests and docs.
Nikodemus Siivola [Sat, 16 May 2009 11:26:36 +0000 (11:26 +0000)]
1.0.28.50: better source locations for failure-to-stack-allocate notes
Nikodemus Siivola [Sat, 16 May 2009 11:24:29 +0000 (11:24 +0000)]
1.0.28.49: allow stack allocation for arguments of FILL and REPLACE
FUN-INFO-RESULT-ARG is either NIL, or the index of the argument
that is EQ to the result of the function. Use LVAR-GOOD-FOR-DX-P
with the argument lvar that is the result argument.
Other arguments are for DX as well: if the result can be stack
allocated then unless the other arguments are otherwise accessible
they too can be stack allocated -- and if they are otherwise accessible
then DX analysis should refuse to stack allocate.
Nikodemus Siivola [Fri, 15 May 2009 21:11:44 +0000 (21:11 +0000)]
1.0.28.48: fix regressions from 1.0.28.47
* Assert the declared element-type in the
HAIRY-DATA-VECTOR-(REF|SET)/CHECK-BOUNDS transform, since
HAIRY-DATA-VECTOR-(REF|SET) transforms no longer fire for
non-simple arrays.
* Turns out that %DATA-VECTOR-AND-INDEX was the only place where the
index was checked being non-negative on some code paths -- not
taking that route meant that type check weakening from INDEX to
FIXNUM allowed negative indexes to slip in under the the radar in
SAFETY 1 code.
While this follows what we say in the manual, being more careful
about bounds checks is probably a good idea, so be more
conservative about weakenin integer types: collapse unions of
intervals into a single interval, but dont' eliminate the most
extreme bounds.
Adjust one test that checked for the old behaviour, and
update documentation.
Nikodemus Siivola [Thu, 14 May 2009 10:23:47 +0000 (10:23 +0000)]
1.0.28.47: depessimize accesses to maybe non-simple arrays with known element types
The transforms for HAIRY-DATA-VECTOR-(REF|SET) which inserted a call
to %DATA-VECTOR-AND-INDEX were never a win unless the array was
known to be simple: the element type dispatch is quite effcient, and
the slow path has an open coded WITH-ARRAY-DATA which performs
better.
For simple arrays the transforms remain a win, since
%DATA-VECTOR-AND-INDEX will be open coded: at most one dereference
is ever necessary.
Unfortunately declaring the element type of a non-simple array remains
a loss -- just a less drastic one then before.
Nikodemus Siivola [Wed, 13 May 2009 18:13:48 +0000 (18:13 +0000)]
1.0.28.46: implement os_restore_fp_control() for OpenBSD x86
Fixes problems with the floating point modes being forgotten. Also
fixes one of the float tests by clearing the exception flags first,
insuring that the right exception is raised.
Patch by Josh Elsasser.
Nikodemus Siivola [Wed, 13 May 2009 17:56:31 +0000 (17:56 +0000)]
1.0.28.45: better generic function lambda-lists
Add a few &REST arguments with documentary value, and use better
argument names.
Nikodemus Siivola [Wed, 13 May 2009 13:58:31 +0000 (13:58 +0000)]
1.0.28.44: better MACHINE-VERSION answers on BSD'ish platforms
Also reduce OAOOMity of GET-MACHINE-VERSION.
Patch by Josh Elsasser.
Nikodemus Siivola [Tue, 12 May 2009 11:00:13 +0000 (11:00 +0000)]
1.0.28.43: QUIT related work
* SAVE-LISP-AND-DIE :TOPLEVEL can return, just call QUIT if it does.
* --script should not override QUIT called by user with its own exit status.
(reported by Hubert Kauker)
Nikodemus Siivola [Tue, 12 May 2009 09:58:45 +0000 (09:58 +0000)]
1.0.28.42: pretty-printing LOOP forms
Thanks to Tobias Ritterweiler.
Update NEWS a bit while at it.
Nikodemus Siivola [Tue, 12 May 2009 09:11:39 +0000 (09:11 +0000)]
1.0.28.41: make MAKE-ARRAY transforms co-operate with FILL better
When the transform for FILL fires, and the type of initial-element
has not yet been propagated, so VECTOR-FILL* fires instead of a more
specific transform (which currently exist only for
SIMPLE-BASE-STRINGs and SIMPLE-BIT-VECTORs.)
Annotate the type with THE and the SAETP-SPECIFIER so the most
specific transform can fire.
Reported by Stas Boukarev.