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.
Nikodemus Siivola [Tue, 12 May 2009 08:21:12 +0000 (08:21 +0000)]
1.0.28.40: hopefully fix Win32 build
* Broken by 1.0.28.37.
Nikodemus Siivola [Mon, 11 May 2009 19:41:48 +0000 (19:41 +0000)]
1.0.28.39: more error reporting tweakery
* Now that *CURRENT-PATH* is bound first by PROCESS-TOPLEVEL-FORM
make FIND-ERROR-CONTEXT prefer NODE-SOURCE-PATH *CURRENT-PATH* --
otherwise the more accurate source path in the node is never used.
(Experimentally it seems that *CURRENT-PATH* is never more
accurate.)
Everything seems OK, but the whole source path mechanism could
probably us an audit, and possibly some refactoring.
* ADD-TEST-CONSTRAINTS should bind *COMPILER-ERROR-CONTEXT* around
the call to SPECIALIZER-TYPE in case of undefined types. (Left out
from last patch by accident.)
Nikodemus Siivola [Mon, 11 May 2009 15:44:11 +0000 (15:44 +0000)]
1.0.28.38: undefined warning and compilation unit summary tweaking
* Signal a full warning for undefined types when the name is in the
COMMON-LISP package.
* Explain probable source of error when the name of an undefined type
is a quoted object.
* When same original source form is responsible for multiple
undefined warnings, only signal the first: otherwise we may signal
a boatload of identical warnings for a single source form just
because the compiler tries so very hard to make sense of it.
* Don't summarize the names of undefined things by signalling new
warnings for them, instead include the names in the compilation
unit summary.
Gabor Melis [Mon, 11 May 2009 13:24:34 +0000 (13:24 +0000)]
1.0.28.37: resignal signals received in foreign threads
Signals delivered to threads started from foreign land (read: directly
by pthread_create, not by MAKE-THREAD) are redirected to a Lisp thread
by blocking all signals and resignalling.
Nikodemus Siivola [Mon, 11 May 2009 11:17:51 +0000 (11:17 +0000)]
1.0.28.36: better logic for failure-to-stack-allocate notes
* Elide if the use is a REF, not if the source form is a symbol.
* Tests.
Nikodemus Siivola [Mon, 11 May 2009 10:21:20 +0000 (10:21 +0000)]
1.0.28.35: compiler notes for failure to stack allocate
* Emit a compiler note when stack allocation was requested, but could
not be provided.
Nathan Froyd [Sat, 9 May 2009 13:00:29 +0000 (13:00 +0000)]
1.0.28.34: convert once-used DEFMACROs to EVAL-WHEN'd SB!XC:DEFMACROs
There were a couple FIXMEs lurking about this. Fixing themm is easy enough
and reduces the core size slightly.
Nikodemus Siivola [Sat, 9 May 2009 09:27:07 +0000 (09:27 +0000)]
1.0.28.33: minor post-DEFGLOBAL cleanups
* Call array-accessor dispatch tables %%foo%% instead of **foo** to
warn off the unwary.
* Set their size to (1+ widetag-mask) -- this should not really matter
since we check for other-pointer-lowtag before stripping the widetag,
as widetag are always immediate objects, so the low bit is zero.
...but this is more obviously correct, and costs us, what 4 words
of storage.
* Mark one FIXME/KLUDGE more, since people have been so busy getting
rid of them...
* Restore the imperative tone in DEFVAR docstring.
* Oops, left one FLUSHABLE too many in last commit.
Nikodemus Siivola [Sat, 9 May 2009 08:58:21 +0000 (08:58 +0000)]
1.0.28.32: move FLUSHABLE back to SB!ASSEM
* Broke Sparc build, and maybe others.
Nathan Froyd [Fri, 8 May 2009 20:58:23 +0000 (20:58 +0000)]
1.0.28.31: remove :PREFIX/:SUFFIX from DEFENUM for MORE GREPPABILITY
Searching for useful things like even-fixnum-lowtag in the source won't
find the actual definition due to cleverness with DEFENUM. This cleverness
is the source of several FIXMEs throughout the code. I can personally
remember being baffled at the magic of even-fixnum-lowtag and friends
magically springing into existence when I could not easily grep for their
definitions. In the interest of clarity, remove the cleverness and update
all relevent DEFENUMs.
In the interest of OAOO, move TRACE-TABLE-* constants to generic code while
we're at it, too. Doing the same thing for the *-TRAP constants is left
as an exercise for another day.
Nikodemus Siivola [Fri, 8 May 2009 19:08:07 +0000 (19:08 +0000)]
1.0.28.30: DEFGLOBAL, ALWAYS-BOUND, GLOBAL, SYMBOL-GLOBAL-VALUE
* ALWAYS-BOUND allows the compiler to elide boundness checks
for symbol value access, and prohibits MAKUNBOUND. This is
handled via a new globaldb entry.
GLOBAL makes the compiler elide TLS checking for symbol
values access, and prohibits rebinding. This is handled via
new globaldb :variable :type, namely :global.
DEFGLOBAL is build on top of these. Global variables are mainly an
efficiency measure on threaded builds, but can also express
intention as they prohibit rebinding.
* Add %SET-SYMBOL-GLOBAL-VALUE, FAST-SYMBOL-GLOBAL-VALUE, and
SYMBOL-GLOBAL-VALUE VOPs to all backends. On unithreaded
builds these are trivial copies of the non-global versions.
* Tell SB-CLTL2 about both GLOBAL and ALWAYS-BOUND declarations too.
* Document in the Efficiency chapter of the manual.
* Prohibit declaring constants special.
* Tests.
Later: use these new features inside SBCL itself. For now there is
only a single DEFGLOBAL used, but more could well be.
Nikodemus Siivola [Fri, 8 May 2009 09:32:28 +0000 (09:32 +0000)]
1.0.28.29: some manual love
Updates, light reorganization and a touch of prettification.
Also warn about the dangers of dynamic environment as it pertains to
timers.
Nathan Froyd [Fri, 8 May 2009 03:00:25 +0000 (03:00 +0000)]
1.0.28.28: delete %RAW-BITS and %SET-RAW-BITS
%VECTOR-RAW-BITS and %SET-VECTOR-RAW-BITS are exactly the same functionality
without the weird dancing with SB!VM:VECTOR-DATA-OFFSET.
Nikodemus Siivola [Thu, 7 May 2009 18:06:12 +0000 (18:06 +0000)]
1.0.28.27: move FLUSHABLE to SB-C, export UNSAFELY-FLUSHABLE for consistency
EOM
Nikodemus Siivola [Thu, 7 May 2009 17:44:09 +0000 (17:44 +0000)]
1.0.28.26: Mr. ATOMIC-INCF/SYMBOL, meet Mr. AX
Given the chop as as dangerous if the symbol-value happens to be
anything else but a fixnum. If this are still desired, ATOMIC-INCF
can be extended to support symbols proclaimed FIXNUM -- but that too
will lose on unbound symbols.
Was only used in a single test, replace with a structure and
ATOMIC-INCF there.