sbcl Log


Commit Date  
[4e815e] (41.0 kB) by Douglas Katzman Douglas Katzman

Assign thread-local storage indices at load-time on x86-64

This also includes a disassembler enhancement.

2014-04-03 05:31:54 View
Download
[d62e48] (40.9 kB) by Douglas Katzman Douglas Katzman

Threadsafe FIND-OR-CREATE-FDEFINITION.

2014-03-31 23:50:42 View
Download
[1b08fd] (40.0 kB) by Douglas Katzman Douglas Katzman

Clean up some detritus from globaldb

2014-03-24 06:06:41 View
Download
[fee129] (39.5 kB) by Douglas Katzman Douglas Katzman

Workaround a problem in building SBCL under ABCL.

This issue is logged as http://abcl.org/trac/ticket/351

2014-03-23 19:17:46 View
Download
[d8422a] (39.4 kB) by Douglas Katzman Douglas Katzman

Use a single hashtable for the globaldb's complicated names.

The volatile/compact environment structures are hereby deleted.

2014-03-20 05:12:41 View
Download
[4560b0] (60.7 kB) by Douglas Katzman Douglas Katzman

Define CALL-WITH-EACH-GLOBALDB-NAME as the replacement for DO-INFO.

2014-03-20 03:50:42 View
Download
[2be67a] (59.3 kB) by Douglas Katzman Douglas Katzman

Repair build using CLISP as cross-compilation host.

Fixes lp# 1292811

2014-03-17 06:01:49 View
Download
[2c42e7] (59.3 kB) by Douglas Katzman Douglas Katzman

Invert the lookup mechanism for metainfo about info :class :type.

This stems from a discovery that we held info-class objects on symbol-plists
as a memoization layer, but reverted to a hashtable when unmemoized.
We could have just stored things on symbol-plist, eschewing a hashtable,
as sb-fasl and sb-pcl do, however it's possibly dangerous to expose
system plists to users who might impolitely smash them. And since info classes
are keywords, the lists are easily discoverable, and the damage potential high.
So it being that the hashtable had a kind of wrong/redundant feel to it,
now the INFO mechanism is metacircularly used to store its own metadata.

Also, as the class/type distinction was largely pointless, info classes
no longer exist as objects in their own right. Metainfo for (:<class> :<type>)
is found using the <type> as the primary axis, and resolved secondarily using
<class> as the minor axis, but it's basically irrelevant which contains which.

2014-03-14 03:20:36 View
Download
[125910] (63.9 kB) by Douglas Katzman Douglas Katzman

Generalize the optimization to packed-info-insert.

2014-03-12 16:16:35 View
Download
[c3fa76] (63.7 kB) by Douglas Katzman Douglas Katzman

Slight improvement to UPDATE-SYMBOL-INFO

2014-03-10 03:39:28 View
Download
[d76fbf] (65.7 kB) by Douglas Katzman Douglas Katzman

Refactor SYMBOL-FUNCTION and %COERCE-CALLABLE-TO-FUN for performance.

This change replaces %COERCE-CALLABLE-TO-FUN's XEP type-check with
type-based dispatch, which neither ameiliorates nor worsens the
unfortunate discrepancy between what the runtime accepts vs. what
the compiler accepts in contexts expecting a function designator.

To clarify: %coerce-callable-to-fun looked like it took general names
due to the use of %COERCE-NAME-TO-FUN which *does* allow conses,
e.g. (%coerce-name-to-fun '(setf car)) => #<FUNCTION (SETF CAR)>
but looks are deceiving, because %COERCE-CALLABLE- was DEFKNOWNed
to accept only (OR FUNCTION SYMBOL).

However in places where the compiler is able to resolve a name to an
fdefinition, such as (MULTIPLE-VALUE-CALL '(SETF FROB) ...),
it accepts an "extended function designator".
This was brought up on sbcl-devel last October.

The result of this patch plus elimination of hash-based lookup
brings speed of FUNCALL via a symbol within a small factor of calling
a function object, as in the following quick-and-dirty test:

(defun try-known (f) (funcall (truly-the function f) 'baz))
(defun try-either (f) (funcall f 'baz))
(time (loop repeat 1000000 do (try-known #'identity))) ; .008 sec, 15 Mcyc
(time (loop repeat 1000000 do (try-either #'identity))) ; .008 sec, 16 Mcyc
(time (loop repeat 1000000 do (try-either 'identity))) ; .014 sec, 28 Mcyc

Previously, the 'try-either' test performed thusly:
(time (loop repeat 1000000 do (try-either #'identity))) ; .012 sec, 24 Mcyc
(time (loop repeat 1000000 do (try-either 'identity))) ; .102 sec, 205 Mcyc

2014-03-08 22:52:19 View
Download
[66d35e] (66.2 kB) by Douglas Katzman Douglas Katzman

Lock-free implementation of FIND-CLASSOID-CELL

No more hashtable nor mutex, and ~100% faster

2014-03-08 03:57:14 View
Download
[a7dd95] (66.1 kB) by Douglas Katzman Douglas Katzman

Improve GLOBALDB-SXHASHOID

2014-03-07 20:10:52 View
Download
[0fb6f8] (66.2 kB) by Douglas Katzman Douglas Katzman

Initial reimplementation of globaldb - fast INFO and (SETF INFO).

The main idea is that info values are stored in a vector attached to
each symbol when possible. When not possible, the storage reverts
to the volatile [sic] environment, but still using a vector as the
payload instead of the chained hashing/alist approach.

This strives to be very fast at lookup at the expense of some added
complexity during updates. Performance testing suggests that it is
at least 2x to 3x faster at (INFO :class :type name), and FBOUNDP
is almost 4x faster. In a repeatable test, a file that took 1.8 seconds
to compile now takes 1.7 seconds but with more consing (as expected).

sbcl.core itself increases in size by <1% for 64-bit architecture,
and less for 32-bit architecture because there is proportionaly less
wasted space. A compact environment's table is effectively the
concatenation of all info vectors into one, so the added overhead is
in vector headers. However the fallback hash is now smaller,
so there used to be more wasted cells in the compact env.

Eventually the compact and volatile environments will both go away,
but not until the quasi-lockfree hashtable bootstraps properly.
The problem is an inability to use raw slots in early cold init.
It's actually not a problem of using them - the compiled code is ok -
but cold-init drops into 'ldb' due to how defstruct expands.

Among the bugs fixed by this (not straightforwardly testable) is that
the compact environment would hold into symbols that became otherwise
inaccessible. It no longer does, but still holds onto other names.

This patch builds with CCL as host, and for 32-on-64 and vice-versa,
so nothing seems terribly broken in terms of assumptions made.

2014-03-07 17:51:29 View
Download
[0b497a] (57.6 kB) by Douglas Katzman Douglas Katzman

Give CLEAR-INFO unsurprising behavior in a dumped & restored core.

This fixes a bug mentioned in email to sbcl-devel ca. 9/11/2013
("Globaldb screwyness because of purify").

2014-03-05 03:07:52 View
Download
[611711] (55.9 kB) by Douglas Katzman Douglas Katzman

A batch of globaldb changes.

* Eliminate verbiage from and improve hygiene of DEFINE-INFO-TYPE.
The :DEFAULT option, if a function, is called to produce
a default. If not a function, it is treated as literal data.

* All values placed into globaldb are type-checked.
Reading a value incurs no type-check.

* A list of proclaimed declarations for SB-CLTL2 is maintained
without reference to info environments.

* :xc-constant-value is no longer handled through globaldb.

2014-03-04 21:13:06 View
Download
[9c8fec] (55.5 kB) by Douglas Katzman Douglas Katzman

Fix regression of TYPE-INFO-VALIDATE-FUNCTION.

The INFO transforms of revision 19088e27 silently made the
sanity test a no-op due to a stray apostrophe and no assertions.

2014-03-03 13:22:24 View
Download
[a4a6ac] (55.4 kB) by Douglas Katzman Douglas Katzman

Implement DEFINE-LOAD-TIME-GLOBAL.

This is the patch proposed on sbcl-devel (ca. November 2013)
with alterations for 2 out of 3 concerns raised by Nikodemus.

Indeed users can not roll their own equivalent of the new macro
using just the new proclamation. It's confusing to expose the
feature, as it would mean introducing another thing like
(DECLAIM (EVENTUALLY-ALWAYS-BOUND X)) ; *HYPOTHETICAL*
and then explaining how compilation "times" a/k/a "situations" are
not quite the same as "now" and "eventually", and why 2N choices
exist for one concept. YAGNI/Occam's Razor come to mind.

Were a user to try something like
(eval-when (:load-toplevel) (proclaim '(always-bound x)))
it can not possibly have any unusual effect due to PROCLAIM being
an ordinary function, whereas eval-when :compile-toplevel of same
certainly means that X is right now always bound.
So only the new macro is documented, not its implementation.

Closes lp#1253688

2014-02-03 05:29:12 View
Download
[a42d98] (55.4 kB) by Douglas Katzman Douglas Katzman

Remove ASSIGN-SETF-MACRO's secondary test for fboundness of SETF fun.

The new code is behaviorally different in a subtle way. The old didn't
didn't warn if a setf function was defined earlier in the same file
unless in eval-when :compile-toplevel. Whereas if (SETF F) had come
from a previously loaded file, you did get a style-warning upon
definition of the macro. Now either way style-warns.

There is no change in the signaling of a full warning if the compiler
has *assumed* a setf function to exist when the macroish setter is
defined, because that suggests something was compiled wrong.

This is almost but not entirely like the patch I proposed on sbcl-devel.
The unanticipated problems were mainly during xc because :where-from
changes what it reports for a function name that has no binding.
This might possibly warn about a few things in xc that it didn't before.

2014-02-03 01:18:40 View
Download
[f575dd] (56.1 kB) by Nikodemus Siivola Nikodemus Siivola

support for deprecating special variables

Use DEFINE-DEPRECATED-VARIABLE to deprecate them.

2013-02-01 20:30:11 View
Download
[390073] (56.0 kB) by Nikodemus Siivola Nikodemus Siivola , pushed by Nikodemus Siivola Nikodemus Siivola

globaldb: remove ENV-LIST arguments from INFO functions

Unused except by %DEFKNOWN, which passed in *INFO-ENVIRONMENT* anyways.

2012-04-24 08:42:01 View
Download
[19088e] (56.5 kB) by Nikodemus Siivola Nikodemus Siivola

globaldb: add source-transforms for INFO functions on host

Regular compiler macros defined on host do not take effect when XC is
building the target -- so INFO calls in the build before globaldb got the
slow path up to now. Using source-transforms we get the fast path for all
INFO calls on target.

Speeds up globaldb bound functions like FDEFINITION by 20% or so.

2012-04-24 08:41:55 View
Download
[e5b685] (56.5 kB) by Nikodemus Siivola Nikodemus Siivola

muffle style-warnings for INFO :FUNCTION :TYPE

Even if the function object's type contains unknown types, this is not the
right place to complain about them.

lp#806243

2011-12-05 10:21:18 View
Download
[46fd9f] (56.5 kB) by Nikodemus Siivola Nikodemus Siivola

1.0.36.7: fix SB-C::CLASS-INFO printing

Launchpad bug #514762

2010-02-28 19:40:40 View
Download
[15ea57] (56.5 kB) by Nikodemus Siivola Nikodemus Siivola

1.0.32.35: SB-POSIX:FORK guards against forking with multiple threads

* It wasn't going to work right in any case, so better to refuse up
front.

* Remove invalid FIXME from globaldb.lisp: DO-INFO is also used by
SB-INTROSPECT.

2009-11-20 11:48:12 View
Download
Older >