Commits on May 27, 2007
  1. 1.0.6: release, will be tagged as sbcl_1_0_6

    William Harold Newman committed May 27, 2007
Commits on May 20, 2007
  1. conditionally re-enable interrupts interrupting current thread

     * New variable: *IN-INTERRUPTION* is true IFF we're being called inside
       *IN-INTERRUPTION* and there are no intervening WITHOUT-INTERRUPTS.
     * INTERRUPT-THREAD calls the interrupt function inside WITH-INTERRUPTS
       when interrupting the current thread IFF *IN-INTERRUPTION* is true.
     * Remove bogus FIXME by yours truly from INVOKE-INTERRUPTION and
       properly explain what is going on -- and add another FIXME in its
     This makes nested SIGINTs DTRT.
    nikodemus committed May 20, 2007
  2. interrupt safe REFILL-BUFFER/FD

     * Check for blocking / wait for new input before touching the stream.
     * Check that the SAP is still there after the wait, in case an interrupt
       handler or an FD handler closed the stream from under us.
     * Wrap the main action in WITHOUT-INTERRUPTS to prevent asynch unwinds
       from leaving the stream in an inconsistent state. (Since the read
       is going to be non-blocking it should be over soon enough.)
     * Arrange to signal errors outside the WITHOUT-INTERRUPTS.
    nikodemus committed May 20, 2007
Commits on May 19, 2007
  1. fix thinko in src/code/array.lisp

    	* thanks to Eric Marsden
    Nathan Froyd committed May 19, 2007
  2. cleanup LOAD-TYPE macros

    	* when the LOAD-TYPE macros in the various backends hardcoded '3',
    	  they really meant (1- N-WORD-BYTES)--a little reflection on
    	  widetags, lowtags, and endian orderings should make this clear
    	  (we don't have a 64-bit big-endian port to drive it home, though);
    	* catch the spread of magic constants in code/array.lisp.
    Nathan Froyd committed May 19, 2007
  3. fix #!-sb-unicode build problems on x86-64

    	* just a few uncopied things from the x86 version...
    Nathan Froyd committed May 19, 2007
Commits on May 17, 2007
  1. fixed mixed up commit

     * Missing tests.
     * Whitespace.
     * jugglery
       This path breaks on x86/Darwin even without
       touching it, indicative of still lingering Darwin issues. Any
       number of changes can mask this breakage: adding SAFE- prefix to
       SIMPLE-VECTOR-COMPARE-AND-SWAP is enough to make
       pass again, but so is adding a sneaky --eval nil in there as well
       -- among other things.
       Pain. Hate. Pain. See commentary in
       This time the issue doesn't seem to be foreign stack alignment
       related, though: forcing the compiler to use the fast call-out path
       always doesn't make the "small" case pass.
    nikodemus committed May 17, 2007
  2. some compare-and-swap changes

     * Since we have a non-threaded %INSTANCE-COMPARE-AND-SWAP on all
       platforms, define DEFINE-STRUCTURE-SLOT-COMPARE-AND-SWAP on
       non-threaded builds as well.
     * Bounds checking SIMPLE-VECTOR-COMPARE-AND-SWAP, plus tests.
    nikodemus committed May 17, 2007
Commits on May 15, 2007
  1. interrupt & GC & PA handling

     * On all FOREIGN_FUNCTION_CALL_FLAG platforms arch_pseudo_atomic_atomic is
       always accompanied by !foreign_function_call_active.
       For clarity move checking it to the a_p_a_a definitions on platforms that
       need it.
       TEST ALERT: This touches all the non-x86oid platforms, but I have
       not been able to test on them -- so a thinko/typo build-breakage is
       not impossible.
     * If we somehow ended up in interrupt_handle_pending in the middle of a PA
       section we might GC in the middle of it, or lose PA interrupted flags.
       Now we punt straight up if we get there in the middle of PA.
     * If we handled a pending interrupt outside GC-INHIBIT, but inside a PA
       section, with both GC_PENDING and SIG_STOP_FOR_GC_PENDING was true, we
       would be left running with GC_PENDING cleared without actually taking any
       The previous item actually fixes this, but for clarity make
       sig_stop_for_gc_handler clear the GC_PENDING and SIG_STOP_FOR_GC_PENDING
       iff it actually stops the thread.
     * The single UWP implementation for WITHOUT-GCING was incorrect: if
       we had a GC but no interrupts pending when checking for pending
       interrupts and GCs, and caught an asynch unwind at that point we
       could be left running with the GC pending (and/or related signals
       Due to the increased cost of WITHOUT-GCING, check first if GC is
       already disabled before taking the UWP code path.
    nikodemus committed May 15, 2007
  2. Git friendly

     * Ignore .git.
    nikodemus committed May 15, 2007
Commits on May 11, 2007
  1. cacheability of EMFs from methods with non-standard special…

    	... the second return value from
    	first return value can be cached.  It doesn't promise that an
    	arbitrary computation on the specializers will work, so we need
    	not to go down that codepath.
    	... so refuse to build dispatch discriminating functions if any
    	method of the generic function has a non-standard
            (non-PCL-native) specializer, as operations such as
    	will fail on such specializers
    	... rework SPECIALIZER-CLASS-OR-NIL to call the new function
    	... test case.
    csrhodes committed May 11, 2007
Commits on May 10, 2007
  1. improve handling of non-standard subclasses of SB-MOP:SPECI…

    	and adjust RAISE-METATYPE to handle NIL return values.
    	... add commentary around RAISE-METATYPE to explain what all the
    	metatypes actually mean.
    	... EMIT-FETCH-WRAPPER was missing a CONDITION-INSTANCE case,
    	and further drew fine distinctions where there were none...
    	... so delete BUILT-IN-OR-STRUCTURE-WRAPPER, and call WRAPPER-OF
    	instead.  (But leave in the GC safety bug reported sbcl-devel
    	for CLASS-EQ specializers on built-in-classes.
    csrhodes committed May 10, 2007
  2. metatypes-related refactor

    	Many of the dlisp functions took (metatypes applyp) arguments,
    	when in fact all they were using was the length of the metatypes
    	argument and the applyp boolean.  Make this explicit, to assist
    	in understanding when the identity of metatypes actually
    csrhodes committed May 10, 2007
Commits on May 9, 2007
  1. fix reading of a suppressed #. in sb-cover

             * Suppressing of #. in the source location recording read-table was
               implemented incorrectly. (Reported by James Knight)
             * Don't silently ignore read errors.
             * Use a dummy source location map for top level forms for which
               an error was signaled, rather than NIL. Otherwise the compiler's
               and sb-cover's tlf numbering could get out of sync.
    jsnell committed May 9, 2007
Commits on May 8, 2007
  1. change memory layout on FreeBSD

    * Move read-only-space and neighbours to lower space to avoid
      potential conflicts with runtime user space.
    * Move dynamic-space to higher space so that kern.maxdsiz can be
      increased at least 1GB.
    Brief memory layout of FreeBSD:
    +------------+ -- 0x00000000
    |    free    |
    +------------+ -- 0x08000000
    | user space |
    +------------+ -- brk (grows downward)
    ~            ~
    +------------+ -- 0x28000000 (0x08000000 + maxdsiz)
    | mmap,shlib |
    ~            ~
    +----------- + -- stack top (grows upward)
    | stack space|
    +------------+ -- 0xC0000000
    |   kernel   |
    +------------+ -- 0xFFFFFFFF
    NIIMI Satoshi committed May 8, 2007
Commits on May 7, 2007
  1. fix (setf aref) on single-float vectors

              Obvious patch by Christophe, reported by Eric Marsden.
    Nathan Froyd committed May 7, 2007
  2. 10.CVS: -----------------------------------------------------------…

    Nathan Froyd committed May 7, 2007
Commits on May 6, 2007
  1. probably fix win32 build

             * sb!unix::micro-seconds-per-internal-time-unit was defined in a
               #-win32 block
             * Reported by Yaroslav Kavenchuk
    jsnell committed May 6, 2007
  2. sb-sprof call counting

             * Add support for deterministically tracking the amount of times
               that certain functions were called during a sb-sprof profiling
             * The goal is to allow people to easily see whether a lot of time
               is spent in function X due to it being called often, or due to
               the average call being slow.
             * The benefit over using sb-profile is that a) the reporting
               of the call counts is integrated into the normal sb-sprof
               interface and b) there's a lot less overhead, since we're just
               counting calls, not tracking cpu usage / consing.
    jsnell committed May 6, 2007
  3. PCL cache-lookup code emission refactoring

     * Pass cache-variable name explicitly to EMIT-DLAP.
     * Use a gensym for the miss-tag.
     * Factor cache lookup code emission to a separate function EMIT-CACHE-LOOKUP.
    nikodemus committed May 6, 2007
  4. cleanup a small thinko from previous x86-assem.S refactoring

     * EBP is available to use in ALLOC, so use it.
    nikodemus committed May 6, 2007
  5. x86 allocation cleanup

     * Ensure stack alignmenment on calls to alloc() on Darwin.
     * Ensure that DF is cleared on calls to alloc().
     * Preprocessorize the alloc_foo definitions.
    nikodemus committed May 6, 2007
  6. stack alignment on x86/Darwin, once more

     * Stack alignment cannot be changed after arguments have been pushed
       on stack: ALLOCATE-NUMBER-STACK-SPACE is the place to do this, and
       nowhere else.
     * Use the RESET-STACK-POINTER logic on all x86 platforms for
     * Factor out the alignment logic to ALIGN-STACK-POINTER.
     * Clear DF unconditionally when calling out, which means that Solaris
       doesn't need to switch it back and forth. (Darwin, Solaris, and Win32
       all need DF cleared for call-out.)
    nikodemus committed May 6, 2007
  7. faster STRING-TO-OCTETS for unibyte and UTF-8 encodings

    	* redo DEFINE-UNIBYTE-MAPPER to use a lookup table instead of
    	  a big CASE statement (optimizes for the common (?) case of
    	  mostly ASCII characters and gives smaller code);
    	* STRING->LATIN% now optimistically assumes that there are
    	  no encoding errors in the string and allocates an
    	  appropriately-sized octet vector upfront, falling back to
    	  the slower path if an encoding error is detected;
    	* do more or less the same thing for UTF-8 encoding, except
    	  that there is no slow path (since UTF-8 can encode all
    	  characters, unlike unibyte encodings)
    	* we have a ton of external formats; use a hash table for
    	  *EXTERNAL-FORMAT-FUNCTIONS* rather than a list to cut down
    	  on lookup time (this alone is worth ~10% without the other
    	  optimizations above...).
    	Code cleanups:
    	* use string package names like every other source file;
    	* properly separate function names from arglists;
    	* don't pass END parameters when we don't use them.
    	End result is ~20-30x speedup for unibyte encodings (depending
            on the encoding--LATIN-1 is ~20x, whereas something like CP857
            is ~30x) when encoding ASCII strings; smaller but still
            significant speedups when encoding non-ASCII strings.  UTF-8
            encoding is ~5-6x faster, which also means that we're faster
            than TRIVIAL-UTF-8 for encoding now (decoding is an entirely
            different matter).
    Nathan Froyd committed May 6, 2007
Commits on May 5, 2007
  1. fix botched commit partial fix for DISASSEMBLE bu…

      * Test for >= length, not > length.
      * Record the remaining WARNING in BUGS.
    nikodemus committed May 5, 2007
  2. partial fix for DISASSEMBLE bug reported by Peter Graves

      * Test for >= length, not > length.
      * Record the remaining WARNING in BUGS.
    nikodemus committed May 5, 2007
Commits on May 4, 2007
  1. Make sb-introspect's FUNCTION-ARGLIST safer

    	... less likely to read off some random word in memory
    	as an arglist.
    csrhodes committed May 4, 2007
  2. small PCL re-organization

     * Move some non-cache code from src/pcl/cache.lisp to wrapper.lisp and
     No functional changes.
    nikodemus committed May 4, 2007
  3. fix a race-condition in deadline.impure.lisp

     * The thread that is supposed to hold the mutex might no yet have
       grabbed it.
    nikodemus committed May 4, 2007
Commits on May 3, 2007
  1. new contrib: sb-cover, a code coverage tool

             Still somewhat experimental, so it might be changed incompatibly once
             people start actually using it. Or maybe even removed, if it's not
             found to be useful in practice. More documentation on interpreting
             the output and on the limitations of the coverage tool will be
             committed later.
             * Compiler
               * Instrument all forms found in the original source code
                 when the store-coverage-data optimization quality is larger
                 than 1.
               * The instrumentation is fairly lightweight; just literal conses that
                 are modified when the form is executed.
               * This requires hacking the compiler to allow modifying literals
                 when we know what we're doing.
               * Add some extra source location tracking capabilities to handle
                 non-cons source forms better (though still not perfectly).
             * Contrib
               * Get the instrumentation data from the compiler, and create
                 a aggregate report + pretty annotate source code reports
                 (as html) from it.
               * The latter uses a modified version of the source code tracking
                 read-table from Swank, written by Helmut Eller.
    jsnell committed May 3, 2007
Commits on May 2, 2007
  1. Stepper support for MIPS.

    Thiemo Seufer committed May 2, 2007
  2. Whitespacing.

    Thiemo Seufer committed May 2, 2007

    	Fix argument signedness format.
    Thiemo Seufer committed May 2, 2007

    	Silence compiler warning.
    Thiemo Seufer committed May 2, 2007

    	Fix spelling.
    Thiemo Seufer committed May 2, 2007