sbcl Log


Commit Date  
[77d889] (sbcl-1.0.57) by Juho Snellman Juho Snellman

1.0.57: will be tagged as "sbcl-1.0.57"

2012-05-20 18:55:37 Tree
[29fe19] by Stas Boukarev Stas Boukarev

Fix build on windows.

* Include sbcl.h before LISP_FEATURE_WIN32 is used in coreparse.c
* Include stub for _exit.

2012-05-17 21:10:13 Tree
[d833d6] by Stas Boukarev Stas Boukarev

define-condition: return the name of the defined condition.

2012-05-16 22:51:51 Tree
[36d913] by Stas Boukarev Stas Boukarev

Better error for malformed type declarations.

Give proper error messages for things like
(declare (type (integer 1 . 2) a)).

2012-05-16 16:30:04 Tree
[01cc99] by Stas Boukarev Stas Boukarev

Better error message for malformed IGNORE declarations.

Give better errors for things like (ignore (a)) and
(ignore (function . b)).

Fixes lp#1000239.

2012-05-16 15:04:21 Tree
[4b25bb] by Stas Boukarev Stas Boukarev

Optimize copy-tree.

copy-tree used to always call itself, even on linear lists, which
caused stack exhaustion on long lists. Make it copy linear lists
linearly, and recur only when necessary. This also makes it somewhat
faster.
Fixes lp#98926.

2012-05-14 01:12:45 Tree
[e0aff9] by Christophe Rhodes Christophe Rhodes

open intervals and type derivation

When dealing with open intervals, preserving the openness of a bound in
a result depends on the operation being strictly monotonic, rather than
merely monotonic. However, many operations which at first sight seem
strictly monotonic are in fact not, including:
- squaring (expt least-positive-double-float 2) = (expt 0d0 2)
- coercion (coerce (1+ double-float-epsilon) 'single-float)
= (coerce 1d0 'single-float)

Modify various coercion and interval functions to include conservatism
in these situations. (Fixes lp#997528)

2012-05-12 12:40:24 Tree
[d47b2f] by Stas Boukarev Stas Boukarev

Fix --dynamic-space-size 1GB on x86.

Use unsigned longs instead of signed longs for handling
--dynamic-space-size, on x86 it can easily be exhausted.

2012-05-09 22:47:03 Tree
[2892e3] by Stas Boukarev Stas Boukarev

Optimize truncate, ceiling and friends when divisor is 1 or -1.

If divisor is 1, return (values x 0), if it's -1 (values (- x) 0). If
it's a floating point truncation, like ftruncate or fceiling,
(values (- (float x)) 0).

2012-05-07 12:18:33 Tree
[4e168f] by Stas Boukarev Stas Boukarev

Update ASDF to 2.21.

Fixes lp#982286.

2012-05-05 09:38:21 Tree
[335643] by Nikodemus Siivola Nikodemus Siivola

don't unconditionally unparse CHARACTER-SET types into MEMBER types

Doing so means dumping a list containing most of unicode for each
function that return something like

(code-char (+ <const> <(integer 0)>))

which has a derived type (CHARACTER-SET ((<const> . 1114111))).

Instead, pick whichever is more compact, using number of characters
vs number of character code ranges as the deciding factor.

This means that users can see SB-KERNEL:CHARACTER-SET types in
eg. output from DESCRIBE or as return values from
SB-INTROSPECT:FUNCTION-TYPE -- which is suboptimal, but less bad
than such types slowing us down as horribly as they do prior to this
change.

At some point, however, we should document and export SB-EXT:CHARSET
or something -- but I don't want to think of the issues associated
with a public interface right now.

2012-05-04 10:58:32 Tree
[8a3305] by Nikodemus Siivola Nikodemus Siivola

better timeout handling in EXIT and %EXIT-OTHER-THREADS

Account the timeout against all the threads being joined, not each
separately.

Also move handling of "main thread exiting even though another
thread got the call" handling to %EXIT.

...and one missing #!+sb-doc

2012-05-04 08:04:11 Tree
[11802a] by Nikodemus Siivola Nikodemus Siivola , pushed by Nikodemus Siivola Nikodemus Siivola

more deprecation

* Add "Deprecated Interfaces" chapter to the manual.

* Add list of deprecated interfaces along with a policy note to a
comment near DEFINE-DEPRECATED-FUNCTION.

* Add a proper deprecation warning for SB-C::MERGE-TAIL-CALLS.

* Fix the deprecation warning for WITH-SPINLOCK. (Accidentally
referred to WITH-RECURSIVE-SPINLOCK before.)

2012-05-02 18:07:36 Tree
[760de0] by Nikodemus Siivola Nikodemus Siivola

sb-posix: abort(3), exit(3), and _exit(2)

Also fix docstring of SB-EXT:EXIT, which referred to exit as being section 2.

2012-05-02 14:13:59 Tree
[2bfd70] by Stas Boukarev Stas Boukarev

runtime clean up.

coreparse.c: Move #define _BSD_SOURCE up, so that it won't conflict
with subsequent files, and #undef it after it's used to
include sys/mman.h

search.c(search_for_type): Remove unused variable addr.

interrupt.c: Remove double parentheses in if((x==y)).

run-program.c: Include sys/wait.h

2012-05-01 17:21:50 Tree
[436b2a] by Lutz Euler Lutz Euler

Better equidistributed and faster/less consing integer RANDOM.

Up to now the implementation of RANDOM with an integer argument just
generated a few more random bits than the length of the argument and
took this value MOD the argument. This led to a slightly uneven
distribution of the possible values unless the argument was a power of
two. Moreover, for bignums, the algorithm was quadratic both in time and
space dependent on the number of bits of the argument.

Instead generate random integers using an accept-reject loop and change
the bignum implementation to an algorithm that is linear in time and
space.

I took some inspiration from WHN's attempt at an accept-reject loop
implementation in commit 0a7604d54581d2c846838c26ce6a7993629586fa and
following.

Thanks to Christophe Rhodes for reviewing this patch!

Some details:

The implementation works correctly with both a random chunk size equal
to the word size and equal to half the word size. This is currently
necessary as a 32-bit pseudo random generator is used both under 32 and
under 64 bit word size.

In the generic RANDOM case, fixnum and bignum limits are differentiated:

With a fixnum limit an accept-reject loop on a masked random chunk is
always used. Under 64 bit word size two random chunks are used only if
the limit is so large that one doesn't suffice. This never conses.

With a bignum limit four cases are differentiated to minimize consing.
If just one random chunk is needed to supply a sufficient number of bits
the implementation only conses if the result is indeed a bignum:
* If the limit is a power of two, a chunk is generated and shifted to
get the correct number of bits.
* If the limit is not a power of two an accept-reject loop with shifting
is used.
If more than one random chunk is needed, a bignum is always consed even
if it happens to normalize to a fixnum:
* If the limit is a power of two a straightforward algorithm is used to
fill a newly created bignum with random bits.
* If the limit is not a power of two an accept-reject loop is used that
detects rejection early by starting from the most significant bits,
thus generating on the average only one random chunk more than needed
to fill the result once.
The test for power of two is non-consing, too.

In the case of a compile-time constant integer argument (of at most word
size) a DEFTRANSFORM triggers, that, in the general case, compiles an
accept-reject loop. For values of the limit where this sufficiently
reduces the rejection probability the largest multiple of the limit
fitting in one or two random chunks is used instead inside the loop.
To bring the result in the correct range a division is then necessary
(which the compiler converts into a multiplication). Powers of two are
optimized by leaving out the rejection test. In those cases where a word
has more bits than a random chunk, the generated expression uses two
chunks only if necessary.

2012-05-01 16:59:12 Tree
[fa1f81] by Lutz Euler Lutz Euler

Add some tests for basic RANDOM functionality.

There are currently few, if any, such tests, so ahead of profound
changes to integer RANDOM add some. They are neither systematic nor
comprehensive but should be better than nothing.

2012-05-01 16:07:14 Tree
[189116] by Lutz Euler Lutz Euler

Fix the DEFTRANSFORM of RANDOM for hairy integer types.

With integer types that are neither an interval nor a single known value
the DEFTRANSFORM used to generate an expression that had two problems:
First, it yielded very uneven distributions of random values for most
arguments to RANDOM that are not very small. Second, it used a too small
RANDOM-CHUNK under 64 bits word size thus never generating numbers
larger than (1- (EXPT 2 32)) even if RANDOM's argument was larger than
(EXPT 2 32).

Fix this by giving up the transform in these cases.

Add a new file "tests/random.pure.lisp" containing tests for this.

2012-05-01 13:57:03 Tree
[ef61e6] by Nikodemus Siivola Nikodemus Siivola

add SB-UNIX:UNIX-EXIT back, use the deprecation framwork for it and SB-EXT:QUIT

Also extend the deprecation framwork to support multiple replacements:
SB-EXT:QUIT should be replaced either by SB-EXT:EXIT or SB-EXT:ABORT-THREAD,
depending on the way it was being used.

2012-05-01 12:13:50 Tree
[f0da2f] by Nikodemus Siivola Nikodemus Siivola

redesign exiting SBCL

Deprecate QUIT. It occupies an uncomfortable niche between processes
and threads, and doesn't actually do what it says on the tin unless
you call it from the main thread.

SIGTERM now uses EXIT, and doesn't depend on sessions.

WITH-DEADLINE (:SECONDS NIL :OVERRIDE T) can now be used to ignore
deadlines.

JOIN-THREAD on the main thread now blocks indefinitely instead of
claiming the thread did not exit normally.

New functions:

* SB-EXT:EXIT. Always exits the process. Takes keywords :CODE,
:ABORT, and :TIMEOUT. Code is the exit status. Abort controls if
the exit is clean (unwind, exit-hooks, terminate other threads) or
dirty. Timeout controls how long to wait for other threads to
finish.

* SB-THREAD:RETURN-FROM-THREAD. Normal termination for current
thread -- equivalent to return from the thread function with the
specified values. Takes keyword :ALLOW-EXIT, which determines if
returning from the main thread is an error, or equivalent to
calling EXIT :CODE 0.

* SB-THREAD:ABORT-THREAD. Abnormal termination for current thread --
equivalent to invoking the initial ABORT restart estabilished by
MAKE-THREAD (previously known as TERMINATE-THREAD, but ANSI
recommends there to always be an ABORT restart.) Takes keyword
:ALLOW-EXIT, which determines if aborting the main thread is an
error, or equivalent to calling EXIT :CODE 1.

* SB-THREAD:MAIN-THREAD-P. Let's you determine if a given thread is
the main thread of the process. This is important for some
functions on some operating systems -- and RETURN-FROM-THREAD and
ABORT-THREAD also need it.

* SB-THREAD:MAIN-THREAD. Returns the main thread object. Convenient
for when you need to eg. load a foreign library in the main
thread.

2012-04-29 18:18:53 Tree
[4ce962] by Nikodemus Siivola Nikodemus Siivola

tune bug-981106 test based on the heap size

Fixes lp#983807.

2012-04-29 17:55:35 Tree
[661bcd] by Nikodemus Siivola Nikodemus Siivola

gencgc: scale generation.bytes_consed_between_gc to number of gens

This means we have by default 5% of total heap usable in the nursery
between GCs, and another 5% of the total heap split between all the
generations -- and roughly matches the nursery/old generation sizes
relations from before the dynamic-space-size based scaling.

Fixes lp#991293, regression since
6848a92fd4af23d0695eeaaed9efcbdfd9e1d9e5.

2012-04-29 17:32:19 Tree
[f1f283] by Stas Boukarev Stas Boukarev

Better error messages to condition signalling functions.

2012-04-27 23:54:47 Tree
[1a104e] by Nikodemus Siivola Nikodemus Siivola

gencgc: i in add_new_area needs to be signed

Regression from 7be8d1462a207bda809cd7553c5d76c6ebc4dda2,
broke finalize.test.sh on x86 builds.

Fixes lp#989958.

2012-04-27 17:48:00 Tree
[b61897] by Nikodemus Siivola Nikodemus Siivola

fix compiler reader error reporting

Stream slot was left unbound along one leg, which is bad because
READER-ERROR is a subtype of STREAM-ERROR.

2012-04-27 15:15:33 Tree
Older >