Planet SBCL

July 1, 2009

SBCL Commits1.0.29.54.rc2: two more CTOR optimization issues (Nikodemus Siivola)

1.0.29.54.rc2: two more CTOR optimization issues

* Invalid calls of the form (MAKE-INSTANCE ''QUUX) or similar reported
  hard to understand errors instead of using the NO-APPLICABLE-METHOD
  machinery. (reported by Gabor Melis)

* Runtime generation of new CTORs for the inline cache was not thread
  safe: grab *WORLD-LOCK* to ansure that (1) all CTORs end up in
  *ALL-CTORS* (2) we don't construct a CTOR with the same name twice.
  Also initialize the new CTOR with the initial constructor before
  setting its FDEFINITION: this is strictly speaking not needed given
  the lock, but more clearly correct. No test-case, as I was unable to
  actually provoke problem in real code.
  • [DH] NEWS
  • [DH] src/pcl/ctor.lisp
  • [DH] tests/ctor.impure.lisp
  • [DH] version.lisp-expr
 

June 29, 2009

SBCL Commits1.0.29.54.rc1: pre-release freeze start (Nikodemus Siivola)

1.0.29.54.rc1: pre-release freeze start
  • [DH] NEWS
  • [DH] version.lisp-expr
 

June 28, 2009

SBCL Commits1.0.29.54: Inline unboxed constants on x86[-64] (Paul Khuong)

1.0.29.54: Inline unboxed constants on x86[-64]

* New build-time feature: inline-constants, which specifies that SB!C
  and SB!VM implement a protocol described in base-target-features.lisp-expr.
  Backends implementing that feature are able to load constants from code
  components, in a section that follows the actual executable code.

* Implement the protocol on x86 and x86-64, and use it for float constants,
  and, on x86-64 only, mid-sized (> 2^(29-32), but still machine-sized)
  integers.

* Use the new feature in integer and float arithmetic VOPs.

* Adjust a few test cases to take newly consing situations into account.

* Clean-up:
  - New build-time feature: float-eql-vops, which disable rewriting EQL
    of single and double floats in terms of foo-float*-bits.
  - Fix a typo (unused variable lookup) in TWO-ARG-+/-
  • [DH] NEWS
  • [DH] base-target-features.lisp-expr
  • [DH] make-config.sh
  • [DH] package-data-list.lisp-expr
  • [DH] src/code/numbers.lisp
  • [DH] src/compiler/codegen.lisp
  • [DH] src/compiler/early-c.lisp
  • [DH] src/compiler/generic/vm-macs.lisp
  • [DH] src/compiler/generic/vm-tran.lisp
  • [DH] src/compiler/main.lisp
  • [DH] src/compiler/x86-64/arith.lisp
  • [DH] src/compiler/x86-64/float.lisp
  • [DH] src/compiler/x86-64/insts.lisp
  • [DH] src/compiler/x86-64/vm.lisp
  • [DH] src/compiler/x86/float.lisp
  • [DH] src/compiler/x86/insts.lisp
  • [DH] src/compiler/x86/vm.lisp
  • [DH] tests/arith.pure.lisp
  • [DH] tests/compiler.impure.lisp
  • [DH] tests/dynamic-extent.impure.lisp
  • [DH] tests/float.pure.lisp
  • [DH] version.lisp-expr
 

SBCL Commits1.0.29.53: ...really this time... (Nikodemus Siivola)

1.0.29.53: ...really this time...

 (Missed version.lisp-expr and tests/compiler-test-util.lisp)
  • [DH] tests/compiler-test-util.lisp
  • [DH] version.lisp-expr
 

SBCL Commits1.0.29.53: some LOAD-TIME-VALUE smartness (Nikodemus Siivola)

1.0.29.53: some LOAD-TIME-VALUE smartness

* Implicit READ-ONLY-P for obviously immutable values.

* Annotate the result with a derived type -- in practice
  the obvious declarared type of the function, if any.

* In the test suite organize compiler tests a bit:

  ** compiler-test-util.lisp has some general-purpose
     tools for determining if the compiled code passes muster.

  ** Move some pure tests from compiler.impure.lisp to the pure
     file: they were in the impure file because they defined
     utils which are now in the COMPILER-TEST-UTIL (aka CUA)
     package.
  • [DH] NEWS
  • [DH] src/compiler/ltv.lisp
  • [DH] tests/compiler.impure-cload.lisp
  • [DH] tests/compiler.impure.lisp
  • [DH] tests/compiler.pure.lisp
  • [DH] tests/ctor.impure.lisp
 

SBCL Commits1.0.29.52: small UCD optimizations and related cleanups (Nikodemus Siivola)

1.0.29.52: small UCD optimizations and related cleanups

* Fix "optimization failure with anything using
  SB-IMPL::UCD-GENERAL-CATEGORY" reported by Lynn Quam
  (https://bugs.launchpad.net/sbcl/+bug/392206) and related
  performance issues.

  ** Declare returns types of UCD accessors where it seems to matter.

  ** Make the character database a global variable, not special.

* Delete stale header comments from target-char.lisp: not just ASCII
  for quite a while now.

* Delete references to fonts and bits from docstrings everywhere but
  in CHAR-INT and canonicalize docstring indentation.

(The patch is a bit noisy because moving the definition of the
character database inside the macrolet messed up a whole bunch of
indentation -- sorry about that.)
  • [DH] NEWS
  • [DH] src/code/target-char.lisp
  • [DH] tests/compiler.pure.lisp
  • [DH] version.lisp-expr
 

SBCL Commits1.0.29.51: correctly compute default initargs for FAST-MAKE-INSTANCE (Nikodemus Siivola)

1.0.29.51: correctly compute default initargs for FAST-MAKE-INSTANCE

* Ooops, can't use DEFAULT-INITARGS, since calling it executes the
  initforms. Define and use CTOR-DEFAULT-INITARGS.

* A better test-case.

* Reported by Leslie P. Polzer.
  • [DH] src/pcl/ctor.lisp
  • [DH] tests/ctor.impure.lisp
  • [DH] version.lisp-expr
 

June 27, 2009

SBCL Commits1.0.29.50: update ASDF (Nikodemus Siivola)

1.0.29.50: update ASDF

* Not from cclan anymore, but http://common-lisp.net/project/asdf/asdf.git
  • [DH] contrib/asdf/LICENSE
  • [DH] contrib/asdf/Makefile
  • [DH] contrib/asdf/README.SBCL
  • [DH] contrib/asdf/asdf.lisp
  • [DH] version.lisp-expr
 

SBCL Commits1.0.29.49: silence compiler note for type-checks from MAKE-INSTANCE in safe code (Nikodemus Siivola)

1.0.29.49: silence compiler note for type-checks from MAKE-INSTANCE in safe code

* Reported by Samium Gromoff.
  • [DH] NEWS
  • [DH] src/pcl/ctor.lisp
  • [DH] tests/ctor.impure.lisp
  • [DH] version.lisp-expr
 

June 26, 2009

SBCL Commits1.0.29.48: compute default initargs for SB-PCL::FAST-MAKE-INSTANCE (Nikodemus Siivola)

1.0.29.48: compute default initargs for SB-PCL::FAST-MAKE-INSTANCE

* Reported by Lars Rune Nøstdal.

* SB-PCL::DEFAULT-INITARGS doesn't have to be a generic function.

* Test-case.
  • [DH] NEWS
  • [DH] src/pcl/ctor.lisp
  • [DH] src/pcl/generic-functions.lisp
  • [DH] src/pcl/init.lisp
  • [DH] src/pcl/time.lisp
  • [DH] tests/ctor.impure.lisp
  • [DH] version.lisp-expr
 

SBCL Commits1.0.29.47: Floating point correctness improvement (Paul Khuong)

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.
  • [DH] NEWS
  • [DH] src/code/numbers.lisp
  • [DH] src/compiler/srctran.lisp
  • [DH] tests/float.pure.lisp
  • [DH] version.lisp-expr
 

SBCL Commits1.0.29.46: export SB-POSIX:FILENAME and SB-POSIX:FILE-DESCRIPTOR (Nikodemus Siivola)

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.
  • [DH] NEWS
  • [DH] contrib/sb-posix/defpackage.lisp
  • [DH] contrib/sb-posix/designator.lisp
  • [DH] contrib/sb-posix/macros.lisp
  • [DH] contrib/sb-posix/sb-posix.texinfo
  • [DH] version.lisp-expr
 

June 25, 2009

SBCL Commits1.0.29.45: another CTOR optimization (Nikodemus Siivola)

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.
  • [DH] NEWS
  • [DH] src/pcl/ctor.lisp
  • [DH] version.lisp-expr
 

SBCL Commits1.0.29.44: Complex float improvements (Paul Khuong)

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.
  • [DH] base-target-features.lisp-expr
  • [DH] make-config.sh
  • [DH] package-data-list.lisp-expr
  • [DH] src/compiler/assem.lisp
  • [DH] src/compiler/float-tran.lisp
  • [DH] src/compiler/generic/genesis.lisp
  • [DH] src/compiler/generic/objdef.lisp
  • [DH] src/compiler/generic/vm-tran.lisp
  • [DH] src/compiler/srctran.lisp
  • [DH] src/compiler/x86-64/array.lisp
  • [DH] src/compiler/x86-64/cell.lisp
  • [DH] src/compiler/x86-64/float.lisp
  • [DH] src/compiler/x86-64/insts.lisp
  • [DH] src/compiler/x86-64/macros.lisp
  • [DH] src/compiler/x86-64/vm.lisp
  • [DH] src/runtime/print.c
  • [DH] tests/arith.pure.lisp
  • [DH] tests/float.pure.lisp
 

SBCL Commits1.0.29.43: SSE{1,2} instruction definitions on x86-64 (Paul Khuong)

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.
  • [DH] src/compiler/x86-64/insts.lisp
  • [DH] version.lisp-expr
 

SBCL Commits1.0.29.42: small fixoid for the EXPT optimization from 1.0.29.40 (Nikodemus Siivola)

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.
  • [DH] src/compiler/srctran.lisp
  • [DH] version.lisp-expr
 

SBCL Commits1.0.29.41: inline CTOR caches for MAKE-INSTANCE (Nikodemus Siivola)

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.
  • [DH] NEWS
  • [DH] contrib/sb-queue/test-queue.lisp
  • [DH] src/pcl/cache.lisp
  • [DH] src/pcl/compiler-support.lisp
  • [DH] src/pcl/ctor.lisp
  • [DH] src/pcl/low.lisp
  • [DH] src/pcl/print-object.lisp
  • [DH] tests/ctor.impure.lisp
  • [DH] version.lisp-expr
 

SBCL Commits1.0.29.40: more (EXPT MINUS-ONE INTEGER) optimization (Nikodemus Siivola)

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.
  • [DH] NEWS
  • [DH] src/compiler/float-tran.lisp
  • [DH] src/compiler/srctran.lisp
  • [DH] tests/compiler.impure.lisp
  • [DH] version.lisp-expr
 

SBCL Commits1.0.29.39: SLEEP on large integers (Nikodemus Siivola)

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.
  • [DH] NEWS
  • [DH] src/code/toplevel.lisp
  • [DH] src/compiler/main.lisp
  • [DH] tests/interface.pure.lisp
  • [DH] version.lisp-expr
 

SBCL Commits1.0.29.38: better DESCRIBE (Nikodemus Siivola)

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.
  • [DH] NEWS
  • [DH] src/code/condition.lisp
  • [DH] src/code/describe.lisp
  • [DH] src/code/typedefs.lisp
  • [DH] src/cold/warm.lisp
  • [DH] src/compiler/compiler-deftype.lisp
  • [DH] src/compiler/main.lisp
  • [DH] src/pcl/describe.lisp
  • [DH] src/pcl/documentation.lisp
  • [DH] tests/interface.impure.lisp
  • [DH] version.lisp-expr
 

June 24, 2009

SBCL Commits1.0.29.37: fix control stack exhuastion regression on x86 darwin (Gabor Melis)

1.0.29.37: fix control stack exhuastion regression on x86 darwin

... caused by 1.0.29.32.

https://bugs.launchpad.net/bugs/391620
  • [DH] src/runtime/interrupt.c
  • [DH] src/runtime/interrupt.h
  • [DH] src/runtime/thread.h
  • [DH] src/runtime/x86-64-darwin-os.c
  • [DH] src/runtime/x86-darwin-os.c
  • [DH] version.lisp-expr
 

SBCL Commits1.0.29.36: another regression from 1.0.29.27 (Nikodemus Siivola)

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.
  • [DH] src/code/target-load.lisp
  • [DH] tests/load.impure.lisp
  • [DH] version.lisp-expr
 

SBCL Commits1.0.29.35: regression from 1.0.29.27 (Nikodemus Siivola)

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.
  • [DH] src/code/common-os.lisp
  • [DH] version.lisp-expr
 

June 22, 2009

SBCL Commits1.0.29.34: hopefully thread-safe SB-PROFILE (Nikodemus Siivola)

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.
  • [DH] build-order.lisp-expr
  • [DH] doc/manual/profiling.texinfo
  • [DH] package-data-list.lisp-expr
  • [DH] src/code/early-pcounter.lisp
  • [DH] src/code/pcounter.lisp
  • [DH] src/code/profile.lisp
  • [DH] src/compiler/fndb.lisp
  • [DH] tests/profile.impure.lisp
  • [DH] version.lisp-expr
 

SBCL Commits1.0.29.33: fix compilation with QSHOW_SIGNAL_SAFE on win32 (Gabor Melis)

1.0.29.33: fix compilation with QSHOW_SIGNAL_SAFE on win32
  • [DH] src/runtime/runtime.h
  • [DH] src/runtime/thread.h
  • [DH] version.lisp-expr
 

SBCL Commits1.0.29.32: SCRUB-CONTROL-STACK related changes (Gabor Melis)

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
  • [DH] src/code/exhaust.lisp
  • [DH] src/code/gc.lisp
  • [DH] src/code/toplevel.lisp
  • [DH] src/compiler/generic/objdef.lisp
  • [DH] src/runtime/cheneygc.c
  • [DH] src/runtime/gc-common.c
  • [DH] src/runtime/gc-internal.h
  • [DH] src/runtime/interrupt.c
  • [DH] src/runtime/thread.c
  • [DH] src/runtime/validate.c
  • [DH] version.lisp-expr
 

SBCL Commits1.0.29.31: new contrib: SB-QUEUE (Nikodemus Siivola)

1.0.29.31: new contrib: SB-QUEUE

* Lockless thread-safe FIFO queue.
  • [DH] NEWS
  • [DH] contrib/sb-queue/Makefile
  • [DH] contrib/sb-queue/sb-queue.lisp
  • [DH] contrib/sb-queue/sb-queue.texinfo
  • [DH] contrib/sb-queue/test-queue.lisp
  • [DH] doc/manual/Makefile
  • [DH] doc/manual/contrib-modules.texinfo
  • [DH] version.lisp-expr
 

SBCL Commits1.0.29.30: oops, get documentation for built-in macros right (Nikodemus Siivola)

1.0.29.30: oops, get documentation for built-in macros right

* Reported by Harald Hanche-Olsen.
  • [DH] src/code/defmacro.lisp
  • [DH] src/code/macros.lisp
  • [DH] src/compiler/info-functions.lisp
  • [DH] src/pcl/documentation.lisp
  • [DH] tests/interface.impure.lisp
  • [DH] version.lisp-expr
 

June 21, 2009

SBCL Commits1.0.29.29: (one more)^3 DIRECTORY regression (Nikodemus Siivola)

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...
  • [DH] NEWS
  • [DH] src/code/filesys.lisp
  • [DH] tests/filesys.test.sh
  • [DH] version.lisp-expr
 

SBCL Commits1.0.29.28: optimize (EXPT -1 INTEGER) (Nikodemus Siivola)

1.0.29.28: optimize (EXPT -1 INTEGER)

* Patch by Stas Boukarev.
  • [DH] NEWS
  • [DH] src/compiler/float-tran.lisp
  • [DH] version.lisp-expr
 



Last updated: July 1, 2009 03:13 PM