sbcl-cvs-import Log

Commit Date  
[1100ef] by Nikodemus Siivola Nikodemus Siivola MAKE-ALIEN-STRING

An easy way to copy lisp strings to malloc'ed memory.

I can't believe we didn't have this before. ...just seems
insane. I keep expecting to find a nice way to do this
squirreled away somewhere in SB-ALIEN. Here's hoping I won't
embarrass myself by finding one.

Also fix the OAOOM in MAKE-ALIEN and FREE-ALIEN documentation: make
the docstrings the canonical versions, and include them in the

2011-05-30 11:59:18 Tree
[4993cd] by Nikodemus Siivola Nikodemus Siivola --script bits and pieces

* Leaving out the script name means to read the script from standard
input. In this case the shebang line is _not_ handle -- simply
because I ran out steam. (Our shebang line processing assumes a
seekable stream.)

* Stream errors on standard streams cause scripts to exit silently.

* Scripts no longer us *TTY* for *TERMINAL-IO*, but make up a two-way
stream from *STDIN* and *STDOUT*. Similarly for *DEBUG-IO* but
using *STDERR*. This means that backtraces from errors are now
neatly captured in the standard error stream.

2011-05-30 00:21:03 Tree
[9fc4b4] by Nikodemus Siivola Nikodemus Siivola NEWS

Wrap to 78 cols, add the missing entries for .31 and .23.

2011-05-29 22:01:50 Tree
[71bc8b] by Nikodemus Siivola Nikodemus Siivola WITH-LOCKED-SYSTEM-TABLE

Instead of disabling interrupts in user code that needs
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 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 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 make TRULY-THE macroexpandable


* 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 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 sb-posix: export WNOHANG and WUNTRACED


2011-05-27 10:39:13 Tree
[e8011f] by Nikodemus Siivola Nikodemus Siivola automatic &rest to &more conversion


Automatically convert

(values-list rest-arg)
(%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))


The conversion is done iff:

* The rest arg is never assigned to.

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

* 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 fix performance / type derivation regression from

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 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 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 explicitly indefinite-extent leaves, safer dynamic-extent &REST

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 fix mv-call regression from

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 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 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 hopefully fix build on win32

Regression from Add missing S_IFMT macro wrappers to win32

(Untested on win32 as of yet.)

2011-05-14 09:43:28 Tree
[94b4d5] by Nikodemus Siivola Nikodemus Siivola 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 fix null broadcast-streams as RUN-PROGRAM output streams

Regression from

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

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

2011-05-12 17:07:01 Tree
[dd9f2a] by Nikodemus Siivola Nikodemus Siivola 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

* 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 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

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 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 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 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
Older >

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks