sbcl-cvs-import Log


Commit Date  
[71bc8b] by Nikodemus Siivola Nikodemus Siivola

1.0.48.31: WITH-LOCKED-SYSTEM-TABLE

Instead of disabling interrupts in user code that needs
WITH-LOCKED-HASH-TABLE, have a separate WITH-LOCKED-SYSTEM-TABLE
that does so.

Use it instead of WITH-LOCKED-HASH-TABLE for all internals.

2011-05-29 21:49:45 Tree
[a97406] by Nikodemus Siivola Nikodemus Siivola

1.0.48.30: adjust DOCUMENTATION and SB-INTROSPECT

Now that non-standard special operators can also have macro
definitions for consumption by code walkers, make sure we get the
special operator source location and documentation instead of the
ones for the dummy macro.

2011-05-29 21:13:40 Tree
[f486d6] by Nikodemus Siivola Nikodemus Siivola

1.0.48.29: better end-of-the-world handling

* Implicit QUIT.

* Make sure we have %END-OF-THE-WORLD visible while doing cleanups.

* Handle errors from cleanups.

* Disable interrupts in places where the environment might now be up to
handling them yet/anymore.

* If user calls QUIT, and exit hooks run without serious trouble, report the
exit status requested even if there is trouble later flushing streams, etc.

* Also make SAVE-LISP-AND-DIE signal an error if SAVE returns. (When there is
eg. a file with the desired name but insufficient permissions.)

2011-05-28 15:23:28 Tree
[a7a4ca] by Nikodemus Siivola Nikodemus Siivola

1.0.48.28: make TRULY-THE macroexpandable

lp#771673

* MACRO-FUNCTION no longer checks :FUNCTION :KIND, allowing us to have
special operators with macro-expansions in the first place.

* Add %MACROEXPAND and %MACROEXPAND which are careful not to expand special
forms, and use them in place of SB!XC:MACROEXPAND.

* Set the :FUNCTION :MACRO-FUNCTION into an expander that just converts
it to THE. This only happens when someone explicitly calls MACROEXPAND
or uses MACRO-FUNCTION directly -- never in the compiler.

* Also add a SETF-expander.

2011-05-28 12:27:36 Tree
[ffb003] by Nikodemus Siivola Nikodemus Siivola

1.0.48.27: sb-posix: make syscall errors report the failing function

Also add a declaim for the SYSCALL-ERROR ftype so the failing function will
not be tail-merged is SYSCALL-ERROR appears in tail position.

2011-05-27 10:55:11 Tree
[f7de89] by Nikodemus Siivola Nikodemus Siivola

1.0.48.26: sb-posix: export WNOHANG and WUNTRACED

EOM.

2011-05-27 10:39:13 Tree
[e8011f] by Nikodemus Siivola Nikodemus Siivola

1.0.48.25: automatic &rest to &more conversion

lp#504575

Automatically convert

(values-list rest-arg)
to
(%more-arg-values more-context 0 more-count)

when possible, making functions such as

(defun foo (f1 f2 &rest args)
(apply f1 args)
(apply f2 args))

non-consing.

The conversion is done iff:

* The rest arg is never assigned to.

* The rest arg only appears in VALUES-LIST (incl. APPLY)
calls.

* Those calls are all in either the same lambda that
allocates the rest-list, or one that has been declared
dynamic extent. (Conservative guess re. escaping.)

The way this works is as follows:

1. When we convert a lambda with a non-ignored &rest argument, as add
more-context and more-count arguments to the function, and
stick their lambda-vars into arg-info-default of the &rest arg.

2. When we source-transform a values-list form, we check if its argument is
a &rest argument for which context and count are available. If so, we
source-transform into

(%values-list-or-context list context count)

3. When we are optimizing, a deftransform fires for the form above. It
checks if all the necessary conditions hold and converts into either
%more-arg-values or values-list.

The reason for this roundabout way of doing things lies in locall analysis:
unless the extra context and count argument are used nontrivially when it
runs, they get deleted -- and we don't know if we want them or not until the
entire function has been converted. Absent a convenient pass between
conversion and locall analysis, we must therefore do things in two stages.

2011-05-25 23:02:28 Tree
[b16362] by Nikodemus Siivola Nikodemus Siivola

1.0.48.24: fix performance / type derivation regression from 1.0.48.14

Since global/special variables are now always converted using
SYMBOL-VALUE / SYMBOL-GLOBAL-VALUE, we temporarily lost type
information for them.

Remedy this by adding a DERIVE-TYPE optimizer for both.

2011-05-24 11:02:33 Tree
[54d68c] by Nikodemus Siivola Nikodemus Siivola

1.0.48.23: faster with-arguments CALL-NEXT-METHOD

* Make the correctness-checking code for changed arguments in safe
code check required arguments pairwise with EQL first -- if they
match, the applicable methods must be the same and we can elide the
expensive computation.

This makes things like (apply #'call-next-method r1 r2 :foo foo rest)
not suck horribly in safe code.

Could still be better, but this much was quick and easy.

* Make the &REST list in CALL-NEXT-METHOD dynamic-extent. This helps
normal safety code as well.

2011-05-24 10:09:18 Tree
[fb712f] by Nikodemus Siivola Nikodemus Siivola

1.0.48.22: optimize GENERIC-FUN-INFO

This isn't a huge bottleneck, but it does get called
enough that going over metatypes twice -- esp. once with
unoptimized COUNT-IF -- is noticeable in a few places.

2011-05-24 09:47:49 Tree
[edb7ac] by Nikodemus Siivola Nikodemus Siivola

1.0.48.21: explicitly indefinite-extent leaves, safer dynamic-extent &REST

Change LEAF-DYNAMIC-EXTENT to LEAF-EXTENT. Setting it to :INDEFINITE stops
dynamic-extent propagation through the leaf.

Use this in CONVERT-MORE-CALL / CONVERT-HAIRY-FUN-ENTRY by proclaiming the
variables in the open-coded &REST list as having indefinite-extent.

The upshot is that dynamic-extent &REST will only stack allocate the spine
of the rest list, making it easier and safer to use.

Document this in the manual and attach appropriate caveats re. portability.

2011-05-24 08:49:45 Tree
[99eca0] by Nikodemus Siivola Nikodemus Siivola

1.0.48.20: fix mv-call regression from 1.0.43.57

Don't assert untrusted types when the values flow into an mv-call.

Reported by Martin Kielhorn on sbcl-bugs 2011-05-21.

2011-05-21 11:26:36 Tree
[152c97] by Nikodemus Siivola Nikodemus Siivola

1.0.48.19: another go at fixing the win32 build

Roll back the last attempt, that was not only incomplete, but
somewhat ill adviced.

Instead, put in :UNKNOWN as FD-STREAM-FD-TYPE if we need to serve
events, and :REGULAR otherwise.

2011-05-15 08:20:08 Tree
[5385e8] by Nikodemus Siivola Nikodemus Siivola

1.0.48.18: ASDF 2.015.3

Let's hope this one is good enough for a while. :)

2011-05-14 10:12:13 Tree
[12a0ad] by Nikodemus Siivola Nikodemus Siivola

1.0.48.17: hopefully fix build on win32

Regression from 1.0.48.7. Add missing S_IFMT macro wrappers to win32
build.

(Untested on win32 as of yet.)

2011-05-14 09:43:28 Tree
[94b4d5] by Nikodemus Siivola Nikodemus Siivola

1.0.48.16: deadlock detection fixes

* The same deadlock may be reported in multiple threads: adjust tests
to account for that.

* CHECK-DEADLOCK/DEADLOCK-CHAIN could signal an error if the deadlock
had disappeared between its detection and building up the chain due
to one of the involved threads unwinding.

To flush out issues like this a bit better, added looping to some
of the deadlock tests.

2011-05-14 09:14:54 Tree
[6bc7c1] by Nikodemus Siivola Nikodemus Siivola

1.0.48.15: fix null broadcast-streams as RUN-PROGRAM output streams

Regression from 1.0.48.4.

Since they have element-type T, COPY-DESCRIPTOR-TO-STREAM complains
about them -- but it's more efficient to special-case them to the
null device anyways.

Also add a missing error message about unknown element types for input
streams.

...and fix numbering of RUN-PROGRAM-CAT-* tests.

2011-05-12 17:07:01 Tree
[dd9f2a] by Nikodemus Siivola Nikodemus Siivola

1.0.48.14: more conservative global variable conversion

Based on patch by Roman Marynchak.

Fixes lp#722734.

* Modify IR1-CONVERT-VAR to emit SYMBOL-VALUE wrapper
for all global variables except those which are
ALWAYS-BOUND.

* Modify IR1-STEP-FORM-P to return false for SYMBOL-VALUE
with constant argument, now that virtually all global
variables are accessed with a function call (which gets
converted via a VOP, so the final machine code remains
the same.)

2011-05-12 10:42:20 Tree
[f71445] by Nikodemus Siivola Nikodemus Siivola

1.0.48.13: SET-SYNTAX-FROM-CHAR and dispatch-macro characterness

Previously when the to-char was a dispatch-macro character in to-readtable,
but from-char wasn't one in from-readtable, SET-SYNTAX-FROM-CHAR didn't do
anything.

CLHS says "If the character is a dispatching macro character, its entire
dispatch table of reader macro functions is copied." which *can* be taken to
mean that dispatch table should not be removed even if it doesn't exist at
all in the from-readtable, but that interpretation doesn't really match with
the rest of the description or the exhortation to copy the syntax type -- I
read it as an instruction to copy the whole dispatch table, not just the
fact that the character is a dispatching macro character.

2011-05-12 10:02:27 Tree
[564b82] by Nikodemus Siivola Nikodemus Siivola

1.0.48.12: fix bugs in deadlock detection and tests

* No timeouts on mutexes on lutex builds: so don't mark the wait as
having one.

* No timeouts on spinlocks, so don't mark the wait as having one even
if there is a deadline.

* More tests.

2011-05-11 19:42:35 Tree
[620e42] by Nikodemus Siivola Nikodemus Siivola

1.0.48.11: update ASDF to 2.015.2

2.015 and .1 had an unfortunate interaction with Quicklisp.

2011-05-11 18:45:51 Tree
[23e319] by Nikodemus Siivola Nikodemus Siivola

1.0.48.10: add deadlock detection to spinlocks and mutexes

Each thread gets a WAITING-FOR slot which holds the lock it is
currently trying to acquire.

After initial try at lock acquisition fails, we check for deadlocks:
we look at the thread that owns the lock we want -> lock it is
waiting for, etc, recursively, until we either bottom out or find
someone waiting for us.

Print thread as having state WAITING if it is waiting for a lock.

Add a PRINT-OBJECT methods for MUTEXes and SPINLOCKs.

SB-THREAD:THREAD-DEADLOCK-CYCLE contains a list of the
threads and locks involved, so that the situation can be
analyzed even afer a handler has broken the deadlock.

2011-05-11 16:48:37 Tree
[a1a34a] by Nikodemus Siivola Nikodemus Siivola

1.0.48.9: better source information for compile-time type errors

Compile-time warning: in addition to the context, also tell exactly
which form produces the value that is not of the expected type.

Run-time error: include both the error context and exact form in the
error message.

Delete VALUES-TYPE-ERROR, and use SIMPLE-TYPE-ERROR for both legs in
%COMPILE-TIME-TYPE-ERROR.

2011-05-11 11:15:43 Tree
[5b96a0] by Nikodemus Siivola Nikodemus Siivola

1.0.48.8: better binary stream support in RUN-PROGRAM

* In COPY-DESCRIPTOR-TO-STREAM, decode octets only if the stream has
a character element type.

For :DEFAULT and (UNSIGNED-BYTE 8) just copy the octets over
directly.

For others, signal an error. (Would be nice to support, but not a
high priority.)

* Similarly for copying to temporary files from non-fd input
streams.

2011-05-10 20:41:51 Tree
[b67c2d] by Nikodemus Siivola Nikodemus Siivola

1.0.48.7: add FD-STREAM-FD-TYPE, use it to decide when to poll the fd

1.0.42.43 introduced a regression that caused reads from non-regular files
to potentially block in an uninterruptible state, as WAIT-UNTIL-FD-USABLE
started being called only when there was a timeout or events to serve.

This was a win for regular files, because filling the input buffer then
required one syscall less.

...but since uninterruptible blocking reads aren't fun for anyone, let's
make things a bit smarter:

* When creating an FD-STREAM, use fstat() to get the type of the fd, and
store a keyword describing it in the FD-STREAM.

* REFILL-INPUT-BUFFER now calls SYSREAD-MAY-BLOCK-P always if the file
anything but :REGULAR -- so pipes and sockets and whatnot get their
select() calls, and a read from a stream to one can no longer cause
SBCL to hang.

2011-05-10 20:05:25 Tree
Older >