sbcl.git
11 years ago1.1.5: will be tagged as "sbcl-1.1.5"
Christophe Rhodes [Tue, 26 Feb 2013 11:42:11 +0000 (11:42 +0000)]
1.1.5: will be tagged as "sbcl-1.1.5"

11 years agoRevert "upgrade asdf to 2.29, per request by Faré (sbcl-devel 2013-02-16)"
Christophe Rhodes [Mon, 25 Feb 2013 10:25:32 +0000 (10:25 +0000)]
Revert "upgrade asdf to 2.29, per request by Faré (sbcl-devel 2013-02-16)"

This reverts commit 5bf941f419b6cd275feb3ee44ca264596fbd9e8e.

11 years agoprohibit adding name of a package to itself as a local nickname
Nikodemus Siivola [Thu, 21 Feb 2013 11:18:34 +0000 (13:18 +0200)]
prohibit adding name of a package to itself as a local nickname

  Seems useless, confusing, and probably unintentional. Make it a
  continuable error, though. Thanks to Rudi Schlatte for thinking
  about this.

  So, NO MORE:

   (in-package :foo)
   (add-package-local-nickname :foo :bar)
   'foo::x ; => BAR::X

11 years agosuffix PACKAGE-LOCALLY-NICKNAMED-BY with -LIST
Nikodemus Siivola [Thu, 21 Feb 2013 10:46:07 +0000 (12:46 +0200)]
suffix PACKAGE-LOCALLY-NICKNAMED-BY with -LIST

  Less confusing, and more in line with PACKAGED-NICKNAMED-BY-LIST &co.

  (Thanks to Rudi Schlatte for heads-up.)

11 years agoupgrade asdf to 2.29, per request by Faré (sbcl-devel 2013-02-16)
Christophe Rhodes [Wed, 20 Feb 2013 11:49:48 +0000 (11:49 +0000)]
upgrade asdf to 2.29, per request by Faré (sbcl-devel 2013-02-16)

11 years agoupdate LIST-QUEUE-CONTENTS docstring, add note
Nikodemus Siivola [Fri, 8 Feb 2013 00:45:18 +0000 (19:45 -0500)]
update LIST-QUEUE-CONTENTS docstring, add note

11 years agoReplace sb-concurrency:queue implementation.
James M. Lawrence [Wed, 14 Nov 2012 00:18:43 +0000 (19:18 -0500)]
Replace sb-concurrency:queue implementation.

Singly-linked queue is faster and conses less.

11 years agoit's print-read consistency, not read/print consistency
Nikodemus Siivola [Thu, 7 Feb 2013 20:16:47 +0000 (22:16 +0200)]
it's print-read consistency, not read/print consistency

  Doesn't really matter, I guess, but let's not confuse terminology if
  we can avoid it. (Kudos to Zach Beane for pointing this out.)

11 years agofix manual build
Nikodemus Siivola [Mon, 4 Feb 2013 16:49:36 +0000 (18:49 +0200)]
fix manual build

11 years agoFix (setf documentation) regression.
Stas Boukarev [Tue, 5 Feb 2013 15:25:46 +0000 (19:25 +0400)]
Fix (setf documentation) regression.

When built with sb-doc enabled (the default), it crashes the build
because it uses a not yet defined function, sb-impl::fun-name.

Reported by Janis Dzerins.

11 years agoTest-suite results colorization.
Stas Boukarev [Tue, 5 Feb 2013 10:53:06 +0000 (14:53 +0400)]
Test-suite results colorization.

Failures in red, unexpected success in green. Works on Windows and on
terminals with ANSI escape code support.
Can be disabled with --no-color.

11 years agoFix (documentation closure) test.
Stas Boukarev [Mon, 4 Feb 2013 12:08:07 +0000 (16:08 +0400)]
Fix (documentation closure) test.

Take into account the idea that
(setf (documentation #'function t) "doc")
(setf (documentation 'function 'function) "doc")

should do the same.

11 years agoBuild on newer glibc.
Stas Boukarev [Mon, 4 Feb 2013 12:06:22 +0000 (16:06 +0400)]
Build on newer glibc.

Newer glibc don't like the usage of #define __USE_GNU, use _GNU_SOURCE
instead.
Fixes lp#1095036

11 years agoFix (documentation #'function t)
Stas Boukarev [Mon, 4 Feb 2013 11:21:22 +0000 (15:21 +0400)]
Fix (documentation #'function t)

(defun test () "xx" nil)
(setf (documentation 'test 'function) "test")
(list (documentation #'test t) (documentation 'test 'function)))
returned ("xx" "test").

11 years agoRemove a style-warning from sb-bsd-sockets.asd when #-sb-testing-contrib.
Francois-Rene Rideau [Tue, 1 Jan 2013 21:35:05 +0000 (16:35 -0500)]
Remove a style-warning from sb-bsd-sockets.asd when #-sb-testing-contrib.

11 years agoadd SB-POSIX:MAP-ANON
Nikodemus Siivola [Thu, 24 Nov 2011 12:36:15 +0000 (14:36 +0200)]
add SB-POSIX:MAP-ANON

11 years agotypo fix in sb-sprof.
Christophe Rhodes [Sun, 3 Feb 2013 14:14:55 +0000 (14:14 +0000)]
typo fix in sb-sprof.

Also update NEWS for fix of #1113859

11 years agograb-bag of SB-SPROF improvements.
Nikodemus Siivola [Sun, 3 Feb 2013 10:28:32 +0000 (12:28 +0200)]
grab-bag of SB-SPROF improvements.

 (1) Thread distribution handler must not check *SAMPLING*, as it
     is thread-local.

 (2) Return the values from the final round when looping.

 (3) Better warning on no sampling process: list the reasons users can
     do something about.

 (4) Update WITH-PROFILING docstring to reflect reality.

 (5) When printing *SAMPLES*, don't print the array.

11 years agomake SB-SPROF:WITH-PROFILING not loop by default
Attila Lendvai [Tue, 6 Apr 2010 15:24:54 +0000 (17:24 +0200)]
make SB-SPROF:WITH-PROFILING not loop by default

 ...and in non-loop mode it properly returns the result values of the
 macro body.

11 years agomention :TIME in *SAMPLING-MODE* docstring
Nikodemus Siivola [Sun, 3 Feb 2013 09:03:12 +0000 (11:03 +0200)]
mention :TIME in *SAMPLING-MODE* docstring

11 years agorestart-case: Spurious unused variable warnings.
Stas Boukarev [Sun, 3 Feb 2013 09:38:29 +0000 (13:38 +0400)]
restart-case: Spurious unused variable warnings.

restart-case without any restart clauses used to signal an unused
variable warning, add ignorable declaration.
Fixes lp#1113859

11 years agoremove bogus IGNORE declaration from XC version of WITH-FAST-READ-BYTE
Nikodemus Siivola [Fri, 1 Feb 2013 22:17:36 +0000 (00:17 +0200)]
remove bogus IGNORE declaration from XC version of WITH-FAST-READ-BYTE

11 years agomake %COERCE-TO-CALLABLE compilers notes make sense
Nikodemus Siivola [Wed, 23 May 2012 06:53:34 +0000 (09:53 +0300)]
make %COERCE-TO-CALLABLE compilers notes make sense

  Get the cause and the problem right.

11 years agoexport MAP-DIRECTORY from SB-EXT
Nikodemus Siivola [Fri, 1 Feb 2013 20:35:21 +0000 (22:35 +0200)]
export MAP-DIRECTORY from SB-EXT

  It's proven itself a capable and stable interface.

11 years agoprettier backtraces
Nikodemus Siivola [Mon, 15 Nov 2010 15:21:25 +0000 (17:21 +0200)]
prettier backtraces

  Introduce PRINT-BACKTRACE and LIST-BACKTRACE as forward compatible
  replacements for BACKTRACE and BACKTRACE-AS-LIST. (Not yet deprecated.)

  *SHOW-ENTRY-POINT-DETAILS* is also deprecated. Function names and
  lambda-lists are now always cleaned, but the details that were
  previously available via the debug name are now provided as part of
  the auxilliary frame info.

  *METHOD-FRAME-STYLE* can be :MINIMAL, :NORMAL, or :FULL, defaulting to
  :NORMAL.

11 years agosupport for deprecating special variables
Nikodemus Siivola [Thu, 18 Nov 2010 15:19:50 +0000 (17:19 +0200)]
support for deprecating special variables

  Use DEFINE-DEPRECATED-VARIABLE to deprecate them.

11 years agocross-compiler OAOOM ugliness
Nikodemus Siivola [Tue, 12 Jun 2012 20:49:09 +0000 (23:49 +0300)]
cross-compiler OAOOM ugliness

  Couple of conditions for easier debugging of
  the build.

11 years agobetter debug name for secondary GF dispatch functions
Nikodemus Siivola [Sat, 26 Jan 2013 21:14:02 +0000 (23:14 +0200)]
better debug name for secondary GF dispatch functions

 Fixes lp#503081

11 years agoUse CryptGenRandom as a random seed on Windows.
Stas Boukarev [Fri, 1 Feb 2013 11:57:41 +0000 (19:57 +0800)]
Use CryptGenRandom as a random seed on Windows.

Patch by Anton Kovalenko.
Fixes lp#1102748

11 years agofix NEWS: oops, one item was wrong, one item not in place yet
Nikodemus Siivola [Fri, 1 Feb 2013 19:54:09 +0000 (21:54 +0200)]
fix NEWS: oops, one item was wrong, one item not in place yet

11 years agoFix win32-foreign-stack-unwind.impure test.
Stas Boukarev [Fri, 1 Feb 2013 11:51:58 +0000 (19:51 +0800)]
Fix win32-foreign-stack-unwind.impure test.

Don't pass -mno-cygwin to gcc, it doesn't work with MinGW.

11 years agorestore old behaviour as the default for package variance
Nikodemus Siivola [Fri, 1 Feb 2013 18:13:31 +0000 (20:13 +0200)]
restore old behaviour as the default for package variance

  Use *on-package-variance* to adjust.

  Hint:

    (setf *on-package-variance* '(:warn (:swank :swank-backend) :error t))

11 years agooops, it's :package-local-nicknams, not :local-nicknames
Nikodemus Siivola [Fri, 1 Feb 2013 16:40:23 +0000 (18:40 +0200)]
oops, it's :package-local-nicknams, not :local-nicknames

  Also mention it in the manual.

  ...just couldn't get it right the first time.

11 years agopackage local nicknames
Nikodemus Siivola [Tue, 22 Jan 2013 02:04:49 +0000 (04:04 +0200)]
package local nicknames

  Example terminal session using Linedit:

    * (defpackage :foo (:use :cl) (:local-nicknames (:sb :sb-ext)))

    #<PACKAGE "FOO">
    * (in-package :foo)

    #<PACKAGE "FOO">
    * (sb:posix-
    sb:posix-environ  sb:posix-getenv
    * (sb:posix-getenv "USER")

    "nikodemus"

  API:

    function PACKAGE-LOCAL-NICKNAMES package
    function PACKAGE-LOCALLY-NICKNAMED-BY package
    function ADD-PACKAGE-LOCAL-NICKNAME nick global &optional package
    function REMOVE-PACKAGE-LOCAL-NICKNAME old-nick &optional package

    DEFPACKAGE option: (:local-nicknames {(local-nick global-name)}*)

    :PACKAGE-LOCAL-NICKNAMES in *FEATURES*

  Design issues and considerations:

   * "CL", "COMMON-LISP", and "KEYWORD" signal a continuable error
     when used as local nicknames. I think this is good for sanity,
     but not strictly required. Because of the way (find-package
     :keyword) is idiomatically used to guarantee print/read
     consistency across packages, I think it at least should be
     protected.

   * To preserve read/print consistency, we use package local nicknames
     as prefixes when printing.

   * The hook into FIND-PACKAGE is invisible, but built on top of
     FIND-PACKAGE-USING-PACKAGE -- undocumented and unexported, but
     waiting to be turned into something interesting by Christophe.

   * Local nicknames are protected by package locks.

   * If you want to bypass nicknames, you need to first get into
     a known package without nicknames. There could be an explicit
     way as well, but not sure if that's needed or a good idea.

  Random crap mixed in:

     Re-order DEFPACKAGE option docs in rough order of usefulness.

11 years agoupdate NEWS
Nikodemus Siivola [Fri, 1 Feb 2013 13:01:30 +0000 (15:01 +0200)]
update NEWS

11 years agoremove deleted packages from implementation-packages list of other packages
Nikodemus Siivola [Fri, 1 Feb 2013 13:01:11 +0000 (15:01 +0200)]
remove deleted packages from implementation-packages list of other packages

11 years agoDEFPACKAGE at variance restarts
Nikodemus Siivola [Fri, 1 Feb 2013 12:49:41 +0000 (14:49 +0200)]
DEFPACKAGE at variance restarts

  Signal a full error on variances, in each case offering the user the
  choice of keeping the old stuff or dropping it.

  Fixes lp#891351.

11 years agonicer name-conflict restarts for common cases
Nikodemus Siivola [Tue, 29 Jan 2013 09:27:34 +0000 (11:27 +0200)]
nicer name-conflict restarts for common cases

  For IMPORT: offer option to SHADOWING-IMPORT the new symbol or skip
  importing.

  For EXPORT: offer option to KEEP-OLD or TAKE-NEW. (Shadowing or
  uninterning the other one.)

  For USE-PACKAGE: offer option to KEEP-OLD or TAKE-NEW. (Shadowing or
  uninterning the other ones.)

11 years ago1.1.4: will be tagged as "sbcl-1.1.4"
Christophe Rhodes [Wed, 30 Jan 2013 19:28:03 +0000 (19:28 +0000)]
1.1.4: will be tagged as "sbcl-1.1.4"

11 years agodisable the other sb-sprof test on darwin as well *sigh*
Nikodemus Siivola [Sat, 26 Jan 2013 15:34:35 +0000 (17:34 +0200)]
disable the other sb-sprof test on darwin as well *sigh*

11 years agoSlightly improve random seed on Windows.
Stas Boukarev [Wed, 23 Jan 2013 10:33:08 +0000 (14:33 +0400)]
Slightly improve random seed on Windows.

Use unix-getpid on Windows too.

11 years agoAdapt cheneygc.c to type changes in gc-internal.h
Christoph Egger [Wed, 23 Jan 2013 05:02:59 +0000 (06:02 +0100)]
Adapt cheneygc.c to type changes in gc-internal.h

11 years agodisable sb-sprof test on darwin
Cyrus Harmon [Mon, 21 Jan 2013 01:24:24 +0000 (17:24 -0800)]
disable sb-sprof test on darwin

  restore buildability by disabling failing test for the moment.

11 years agobetter initial value for LOOP variables of-type CHARACTER
Nikodemus Siivola [Sun, 20 Jan 2013 11:28:43 +0000 (13:28 +0200)]
better initial value for LOOP variables of-type CHARACTER

11 years agonote FIRST fix in NEWS, fix stupid typo in tests
Nikodemus Siivola [Sun, 20 Jan 2013 11:16:31 +0000 (13:16 +0200)]
note FIRST fix in NEWS, fix stupid typo in tests

11 years agofix open coding of FIRST
Nikodemus Siivola [Sun, 20 Jan 2013 09:36:56 +0000 (11:36 +0200)]
fix open coding of FIRST

  Regression from 373df66df093e8c1771069dcc30c2ec32598af6a:
  "more funky &REST smartness".

  Make the source-transform of FIRST never decline, falling back on
  CAR if the argument is not a &REST list.

11 years agofix constant-list-related initargs in CTOR optimization
Christophe Rhodes [Wed, 16 Jan 2013 13:51:19 +0000 (13:51 +0000)]
fix constant-list-related initargs in CTOR optimization

lp#1099708, reported by Derek Baldwin; also test for _3b's #sbcl irc insight
that this would break non-EQLity of distinct but EQUAL list constants

Also deal with pathnames, bit-vectors and strings, which are precisely the
types EQUAL descends into.

(The general problem of function names being looked up using EQUAL remains
a problem, though with fewer observable consequences: for example, methods
with EQUAL eql-specializers will have their function names collide with
each other, though since in CLOS the functions are looked up through the
method objects this is less serious than with CTORs.

11 years agoformat: ~R should check a type only if base is not supplied.
Stas Boukarev [Fri, 11 Jan 2013 03:38:13 +0000 (07:38 +0400)]
format: ~R should check a type only if base is not supplied.

(format t "~2r" 1/2) is valid.

11 years agoformat: Check types for ~C and ~R.
Stas Boukarev [Thu, 10 Jan 2013 20:26:32 +0000 (00:26 +0400)]
format: Check types for ~C and ~R.

Both require arguments to be characters and integers respectively.

11 years agosb-sprof.lisp: Remove trailing white-spaces.
Stas Boukarev [Sat, 5 Jan 2013 17:09:52 +0000 (21:09 +0400)]
sb-sprof.lisp: Remove trailing white-spaces.

11 years agoadjust-array: Make sure that :initial-element is used.
Stas Boukarev [Sat, 5 Jan 2013 15:43:05 +0000 (19:43 +0400)]
adjust-array: Make sure that :initial-element is used.

Adjust-array ignored :initial-element for arrays of type T.

Fixes lp#1096359.

11 years agosb-sprof: Define pthread-kill only on +sb-thread.
Stas Boukarev [Fri, 4 Jan 2013 12:59:01 +0000 (16:59 +0400)]
sb-sprof: Define pthread-kill only on +sb-thread.

pthread_kill alien is not present on -sb-thread, because libpthread is
not loaded, and it results in unnecessary style warnings.

11 years agoFix reading `#3(x).
Stas Boukarev [Fri, 4 Jan 2013 12:46:43 +0000 (16:46 +0400)]
Fix reading `#3(x).

Previously it returned #(x), while it should be #(x x x).

Fixes lp#1095918.

11 years agoDo not traverse long constant lists when expanding DOLIST
Paul Khuong [Thu, 3 Jan 2013 15:31:09 +0000 (10:31 -0500)]
Do not traverse long constant lists when expanding DOLIST

* Only gather type information on the list contents' if it's short
  (at most 20 elements); otherwise, do not derive type information.

* Thanks to Douglas Katzman for the bug report (lp#1095488).

11 years ago1.1.3: will be tagged as "sbcl-1.1.3"
Christophe Rhodes [Mon, 31 Dec 2012 21:29:02 +0000 (21:29 +0000)]
1.1.3: will be tagged as "sbcl-1.1.3"

11 years agoFix attach_thread to allocate a TLS index for *gc-inhibit* if needed
David Lichteblau [Wed, 26 Dec 2012 14:39:34 +0000 (15:39 +0100)]
Fix attach_thread to allocate a TLS index for *gc-inhibit* if needed

Instead of occasionally setting a global value for this variable...

Thanks to Stas Boukarev for the bug report.

11 years agoUpdate NEWS
David Lichteblau [Fri, 21 Dec 2012 20:29:23 +0000 (21:29 +0100)]
Update NEWS

11 years agoPreserve superclass structure accessors in infodb
David Lichteblau [Mon, 17 Dec 2012 17:33:43 +0000 (18:33 +0100)]
Preserve superclass structure accessors in infodb

Do not overwrite inherited structure accessor entries in infodb when
a sub-structure-class gets defined with same conc-name.

Fixes CAS access to slots of direct superclass instances in this
case (and in particular, non-futex safepoint builds).

11 years agoSet a console Ctrl handler for Windows
David Lichteblau [Mon, 10 Dec 2012 12:56:17 +0000 (13:56 +0100)]
Set a console Ctrl handler for Windows

Install a Lisp callback using SetConsoleCtrlHandler, allowing users
to interrupt SBCL using C-c in the Windows console.

We cannot currently control the size of the stack available to us in
this handler, but since we are mainly only calling INTERRUPT-THREAD,
even a small stack might be sufficient for our purposes.

Thanks to Anton Kovalenko.

11 years agoAdd STDCALL alien convention support for Windows
David Lichteblau [Fri, 9 Nov 2012 13:54:19 +0000 (14:54 +0100)]
Add STDCALL alien convention support for Windows

Thanks to Anton Kovalenko.

11 years agoSupport building without PSEUDO-ATOMIC on POSIX safepoints
David Lichteblau [Wed, 5 Dec 2012 18:08:23 +0000 (19:08 +0100)]
Support building without PSEUDO-ATOMIC on POSIX safepoints

  - Mark Lisp signal handlers with a flag `synchronous' to indicate
    whether we can (and must) handle them immediately.  Conversely,
    we understand this flag to imply a guarantee that the signal
    does not occur during allocation.

  - Any signal with a Lisp handler that is not synchronous is
    implemented in the runtime using a trampoline, which (instead of
    invoking Lisp code directly) first spawns a new pthread, which
    only then calls back into Lisp to invoke the handler function
    (with a fake signal context).

  - Used in particular for SIGINT.

  - For SIGPROF, introduce a second per-thread allocation region,
    which gets swapped with the usual region around the call into
    SIGPROF-HANDLER.  This handler is a special case, because it is
    careful not to trigger GC nor non-local unwinds, and we can
    safely return to the original region afterwards.

  - Add a new subclass SIGNAL-HANDLER-THREAD for this purpose,
    making it easy to identify these threads (e.g. in the test
    driver).

  - Run sprof tests while building the contrib.  Add a test stressing
    time profiling of allocation sequences.

Enable using :SB-SAFEPOINT-STRICTLY on features.

Quite usable already on x86 and x86-64; PPC still has more prominent
issues, e.g. in threads.impure.lisp.

11 years agoForeign callbacks
David Lichteblau [Wed, 12 Dec 2012 13:30:52 +0000 (14:30 +0100)]
Foreign callbacks

Allow alien callbacks to be invoked in pthreads created outside of
the Lisp runtime:

Add new runtime functions attach_os_thread, detach_os_thread
allowing such threads to acquire a `struct thread' temporarily,
turning them into Lisp threads.

In a main deviation from the Windows branch (which has a similar
feature), this mechanism does not involve user-land thread (fiber)
mechanisms to switch between stacks.  Instead, Lisp code merely runs
on the existing pthread's stack.

Currently a safepoint-only feature, because only safepoint-based
builds already go through a convenient trampoline function for
callbacks, but a backport of this feature to non-safepoint builds
might be straightforward.

11 years agoRe-complicate all_threads check in arch_os_get_current_thread
David Lichteblau [Fri, 21 Dec 2012 19:27:33 +0000 (20:27 +0100)]
Re-complicate all_threads check in arch_os_get_current_thread

This check used to be x86-only, and apparently for good reason.
Make it so again.

11 years agoadjust DATA-VECTOR-FROM-INITS to avoid full calls to MAKE-ARRAY when possible
Nathan Froyd [Thu, 20 Dec 2012 04:31:23 +0000 (23:31 -0500)]
adjust DATA-VECTOR-FROM-INITS to avoid full calls to MAKE-ARRAY when possible

We don't need to do full calls to MAKE-ARRAY in certain cases for
ADJUST-ARRAY now, which avoids calls to SUBTYPEP and friends.  This
change significantly speeds up ADJUST-ARRAY for common cases, like the
calls made by VECTOR-PUSH-EXTEND.

11 years agofactor out ALLOCATE-VECTOR-WITH-WIDETAG function from MAKE-ARRAY
Nathan Froyd [Thu, 20 Dec 2012 04:27:32 +0000 (23:27 -0500)]
factor out ALLOCATE-VECTOR-WITH-WIDETAG function from MAKE-ARRAY

11 years agoadjust call to REPLACE inside ADJUST-ARRAY
Nathan Froyd [Thu, 20 Dec 2012 04:16:01 +0000 (23:16 -0500)]
adjust call to REPLACE inside ADJUST-ARRAY

The more information we can provide, the better.

11 years agodon't check SUBTYPEP of ELEMENT-TYPE in ADJUST-ARRAY unnecessarily
Nathan Froyd [Thu, 20 Dec 2012 04:13:47 +0000 (23:13 -0500)]
don't check SUBTYPEP of ELEMENT-TYPE in ADJUST-ARRAY unnecessarily

11 years agolazily compute MIN-EXTENSION for VECTOR-PUSH-EXTEND
Nathan Froyd [Thu, 20 Dec 2012 04:10:42 +0000 (23:10 -0500)]
lazily compute MIN-EXTENSION for VECTOR-PUSH-EXTEND

This change avoids a full call to LENGTH on every call to VECTOR-PUSH-EXTEND.

11 years agoFix a typo in the previous commit.
Stas Boukarev [Tue, 18 Dec 2012 17:51:09 +0000 (21:51 +0400)]
Fix a typo in the previous commit.

-1 should be ~S.

11 years agoBetter error message for SLEEP.
Stas Boukarev [Tue, 18 Dec 2012 17:38:24 +0000 (21:38 +0400)]
Better error message for SLEEP.

Add explicit-check to defknown, sleep already explicitly checks the
argument.
Slightly improve the produced error message.

11 years agomake.sh --help no longer runs clean.sh
Stas Boukarev [Tue, 18 Dec 2012 15:04:15 +0000 (19:04 +0400)]
make.sh --help no longer runs clean.sh

Fixes lp#937001

11 years agosb-rotate-byte: Don't use :if-component-dep-fails.
Stas Boukarev [Mon, 17 Dec 2012 19:07:22 +0000 (23:07 +0400)]
sb-rotate-byte: Don't use :if-component-dep-fails.

Newer ASDF doesn't support it anymore.

11 years agoIn x86 arch_os_get_current_thread(), do not load from %fs
David Lichteblau [Wed, 12 Dec 2012 13:12:50 +0000 (14:12 +0100)]
In x86 arch_os_get_current_thread(), do not load from %fs

Simplify arch_os_get_current_thread() such that %fs is not being
loaded directly even on platforms which preserve it reliably (in
particular, Linux/x86 and Solaris/x86).

Aside from a code simplification and reduction of cross-platform
differences, this change is an improvement in the following way:

If arch_os_get_current_thread() gets called in a non-Lisp pthread,
it now returns NULL cleanly even on the platforms mentioned above.

On the other platforms, keep the support for restoring %fs, but
refactor to remove code duplication with arch_os_thread_init().
Coalesce the two differently-spelled Lisp features for this case
into one.

11 years agoSplit up new_thread_trampoline
David Lichteblau [Wed, 5 Dec 2012 17:36:10 +0000 (18:36 +0100)]
Split up new_thread_trampoline

Refactor it into two independent pieces for initialization and
deinitialization around the point of its central funcall.

11 years agoFactor INITIAL-THREAD-FUNCTION out of MAKE-THREAD
David Lichteblau [Wed, 5 Dec 2012 17:05:06 +0000 (18:05 +0100)]
Factor INITIAL-THREAD-FUNCTION out of MAKE-THREAD

11 years agoFix a typo.
Stas Boukarev [Mon, 17 Dec 2012 13:35:05 +0000 (17:35 +0400)]
Fix a typo.

In the previous commit, varaibles -> variables.

Adjust NEWS by adding lp#n.

11 years agoWarn about misconfigured locale.
Stas Boukarev [Sun, 16 Dec 2012 17:10:08 +0000 (21:10 +0400)]
Warn about misconfigured locale.

Check the return value of setlocale(3) and inform about values of
relevant environment variables.
Fixes lp#727625

11 years agoRemove a few :FAILS-ON test flags for Windows
David Lichteblau [Mon, 26 Nov 2012 15:30:35 +0000 (16:30 +0100)]
Remove a few :FAILS-ON test flags for Windows

11 years agoSupport long file names on Windows; more CRT function avoidance
David Lichteblau [Mon, 26 Nov 2012 13:53:17 +0000 (14:53 +0100)]
Support long file names on Windows; more CRT function avoidance

  - Use native namestrings of the form \\?\ and \\?\UNC\ as required.

  - UNC pathnames now represented using the keyword :UNC in the device.
    This aspect of the implementation is user-visible, but considered
    subject to change.

  - Update a few final holdouts among the file system routines which
    were still using CRT functions and replace them with native versions:
    FILE-LENGTH, QUERY-FILE-SYSTEM, DELETE-FILE, DELETE-DIRECTORY.

  - Sneakily include a getenv change, technically unrelated.

Thanks to Anton Kovalenko.

11 years agoMore Windows Installer tweaks
David Lichteblau [Mon, 26 Nov 2012 16:38:34 +0000 (17:38 +0100)]
More Windows Installer tweaks

  - look for version 3.7 or 3.5 automatically

  - make the "start menu" shortcut optional

  - suppress "test-output" directory

11 years agoUpgrade to Windows Installer XML 3.5
David Lichteblau [Mon, 26 Nov 2012 15:34:07 +0000 (16:34 +0100)]
Upgrade to Windows Installer XML 3.5

Includes miscellaneous installer improvements from the Windows branch.

Thanks to Dmitry Kalyanov and Anton Kovalenko.

11 years agosb-bsd-sockets: Implement NON-BLOCKING-MODE on Windows
David Lichteblau [Fri, 23 Nov 2012 17:15:31 +0000 (18:15 +0100)]
sb-bsd-sockets: Implement NON-BLOCKING-MODE on Windows

Thanks to Anton Kovalenko.

11 years agowin32 pathname host: Switch to :lower canonical case
David Lichteblau [Fri, 23 Nov 2012 17:10:13 +0000 (18:10 +0100)]
win32 pathname host: Switch to :lower canonical case

11 years agoSome support for platforms whose libraries do not maintain a frame pointer
David Lichteblau [Mon, 12 Nov 2012 19:13:09 +0000 (20:13 +0100)]
Some support for platforms whose libraries do not maintain a frame pointer

For platforms on which system libraries are built with the
equivalent of -fomit-frame-pointer, i.e. do not maintain EBP, save
it in the thread structure upon entry to an exception handler, and
restore the register during call_into_lisp.

Currently for Windows on x86-64 only, where it is required.
Analogous changes had been implemented for x86, but are not included
here.

Thanks to Anton Kovalenko.

11 years agoUpdate tests for 64 bit Windows builds
David Lichteblau [Mon, 19 Nov 2012 13:49:27 +0000 (14:49 +0100)]
Update tests for 64 bit Windows builds

11 years agoPort to x86-64 versions of Windows
David Lichteblau [Mon, 12 Nov 2012 16:32:51 +0000 (17:32 +0100)]
Port to x86-64 versions of Windows

  - Microsoft x86-64 calling convention differences compared to the
    the System V ABI: Argument passing registers; shadow space.
  - Inform gcc that we are using the System V ABI for a few functions.
  - Define long, unsigned-long to be 32 bit.  This change just falls
    into place now, since incompatible code had been adjusted earlier.
  - Use VEH, not SEH.
  - No pseudo atomic needed around inline allocation, but tweak alloc().
  - Use the gencgc space alignment that also works on win32 x86.
  - Factor "function end breakpoint" handling out of the sigtrap handler.

Beware known bugs, manifested as hangs during threads.impure.lisp,
happening rather frequently with 64 bit builds and at least much
less frequently (or not at all) with 32 bit binaries on the same
version of Windows, tested on Server 2012.  (All credit for features
goes to Anton, all bugs are my fault.)

Thanks to Anton Kovalenko.

11 years agoSpill XMM registers in alloc_tramp
David Lichteblau [Fri, 9 Nov 2012 14:34:32 +0000 (15:34 +0100)]
Spill XMM registers in alloc_tramp

Thanks to Anton Kovalenko.

11 years agofix a bug in signed modular arithmetic
Christophe Rhodes [Tue, 4 Dec 2012 20:50:12 +0000 (20:50 +0000)]
fix a bug in signed modular arithmetic

Sadly not the ones that Eric gently reminds us of every month or so, but
a far more basic one.  If something is a (signed-byte x), its integer-length
will be at most (1- x).  Search appropriately for a signed arithmetic
variant.

11 years agofix direct execution of (shebanged) fasls
Christophe Rhodes [Tue, 4 Dec 2012 20:19:23 +0000 (20:19 +0000)]
fix direct execution of (shebanged) fasls

Broken since 4993cd5, when fasl-header-p stopped working on bivalent
streams.  Make it work on bivalent streams, as long as they're
seekable (i.e. don't sniff stdin for a fasl header; bad things happen).

11 years agoSuppress warnings about possible slot name conflicts with slots from SB-PCL.
Stas Boukarev [Sat, 1 Dec 2012 19:44:37 +0000 (23:44 +0400)]
Suppress warnings about possible slot name conflicts with slots from SB-PCL.

When inheriting from STANDARD-CLASS and using common slot names, like
SLOTS or NAME, SBCL signals a style-warning about possible package
problems with slots with the same name from SB-PCL, which is unlikely
to ever cause a problem.

11 years agoupdate release.sh to my version of reality
Christophe Rhodes [Sat, 1 Dec 2012 14:32:25 +0000 (14:32 +0000)]
update release.sh to my version of reality

Mostly removing features and writing FIXMEs about what isn't yet
working for me.

11 years ago1.1.2: will be tagged as "sbcl-1.1.2"
Christophe Rhodes [Sat, 1 Dec 2012 11:32:29 +0000 (11:32 +0000)]
1.1.2: will be tagged as "sbcl-1.1.2"

11 years agoLLP64: replace use of unsigned long with size_t in parse_size_arg
David Lichteblau [Mon, 12 Nov 2012 16:33:47 +0000 (17:33 +0100)]
LLP64: replace use of unsigned long with size_t in parse_size_arg

Thanks to Anton Kovalenko.

11 years agoAdd mswin.def
David Lichteblau [Fri, 23 Nov 2012 14:05:52 +0000 (15:05 +0100)]
Add mswin.def

Fixes the build on Windows.

11 years agoNEWS tweaks
David Lichteblau [Mon, 19 Nov 2012 19:25:57 +0000 (20:25 +0100)]
NEWS tweaks

11 years agoLLP64: change signed long to sword_t
David Lichteblau [Mon, 12 Nov 2012 17:19:47 +0000 (18:19 +0100)]
LLP64: change signed long to sword_t

Adjust uses of `long' in the C runtime for LLP64 platforms:
Replace `long' with `sword_t' where applicable.

Thanks to Anton Kovalenko.

11 years agoLLP64: change UNSIGNED-LONG to UNSIGNED
David Lichteblau [Fri, 9 Nov 2012 13:25:42 +0000 (14:25 +0100)]
LLP64: change UNSIGNED-LONG to UNSIGNED

Adjust references to alien types within Lisp code for LLP64 platforms,
replacing UNSIGNED-LONG with UNSIGNED.

UNSIGNED-LONG is currently used when pointer-size values are desirable,
but does not have that meaning on LLP64 platforms.

Note: UNSIGNED does not in general refer to C's `unsigned'; rather it
means (UNSIGNED N-WORD-BITS).  UNSIGNED-LONG actually means `unsigned
long'.  The implication is that

  32 <= sizeof(UNSIGNED-LONG) <= sizeof(UNSIGNED) <= 64

and not, as one might have expected, the other way around.  Existing
platforms were assuming these two types to be the same.

Thanks to Anton Kovalenko.

11 years agoLLP64: change unsigned long to uword_t
David Lichteblau [Mon, 12 Nov 2012 15:35:23 +0000 (16:35 +0100)]
LLP64: change unsigned long to uword_t

Adjust uses of `unsigned long' in the C runtime for LLP64 platforms:
Replace with `uword_t' where applicable.

Thanks to Anton Kovalenko.

11 years agoLLP64: replace uses of sizeof(long) where pointer size is meant
David Lichteblau [Mon, 12 Nov 2012 15:11:28 +0000 (16:11 +0100)]
LLP64: replace uses of sizeof(long) where pointer size is meant

Thanks to Anton Kovalenko.

11 years agoLLP64: adjust calls to printf-like functions with pointer arguments
David Lichteblau [Mon, 12 Nov 2012 15:19:58 +0000 (16:19 +0100)]
LLP64: adjust calls to printf-like functions with pointer arguments

For the benefit of LLP64 platforms, do not cast to long when printing a
pointer, and use %p instead of %lx.  If casting is required, cast to
a pointer-sized unsigned integer, not signed long.

Thanks to Anton Kovalenko.