Stas Boukarev [Tue, 18 Dec 2012 17:51:09 +0000 (21:51 +0400)]
Fix a typo in the previous commit.
-1 should be ~S.
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.
Stas Boukarev [Tue, 18 Dec 2012 15:04:15 +0000 (19:04 +0400)]
make.sh --help no longer runs clean.sh
Fixes lp#937001
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.
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.
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.
David Lichteblau [Wed, 5 Dec 2012 17:05:06 +0000 (18:05 +0100)]
Factor INITIAL-THREAD-FUNCTION out of MAKE-THREAD
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.
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
David Lichteblau [Mon, 26 Nov 2012 15:30:35 +0000 (16:30 +0100)]
Remove a few :FAILS-ON test flags for Windows
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.
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
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.
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.
David Lichteblau [Fri, 23 Nov 2012 17:10:13 +0000 (18:10 +0100)]
win32 pathname host: Switch to :lower canonical case
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.
David Lichteblau [Mon, 19 Nov 2012 13:49:27 +0000 (14:49 +0100)]
Update tests for 64 bit Windows builds
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.
David Lichteblau [Fri, 9 Nov 2012 14:34:32 +0000 (15:34 +0100)]
Spill XMM registers in alloc_tramp
Thanks to Anton Kovalenko.
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.
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).
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.
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.
Christophe Rhodes [Sat, 1 Dec 2012 11:32:29 +0000 (11:32 +0000)]
1.1.2: will be tagged as "sbcl-1.1.2"
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.
David Lichteblau [Fri, 23 Nov 2012 14:05:52 +0000 (15:05 +0100)]
Add mswin.def
Fixes the build on Windows.
David Lichteblau [Mon, 19 Nov 2012 19:25:57 +0000 (20:25 +0100)]
NEWS tweaks
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.
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.
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.
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.
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.
David Lichteblau [Mon, 12 Nov 2012 16:01:08 +0000 (17:01 +0100)]
LLP64: change long to uword_t (thereby flipping signedness)
Replace `long' with `uword_t' in the runtime where applicable.
In these cases, signed long could have been translated literally as
sword_t to support LLP64 platforms, but uword_t seems clearer.
Thanks to Anton Kovalenko.
David Lichteblau [Thu, 8 Nov 2012 16:04:03 +0000 (17:04 +0100)]
New types uword_t, sword_t
First commit in a series of changes for LLP64 platform support.
We have been using `(un)signed long' assuming that it is an integer
of the same size as a pointer. On Windows x64 this assumption does
not hold, and `(un)signed long long' is required for the same
purpose.
Code will be updated to use our own types uword_t, sword_t instead,
which are defined to be synonyms of uintptr_t and intptr_t, respectively.
Note that uword_t is also synonymous with our older type
pointer_sized_uint_t, and technically (albeit not conceptually) the
same as lispobj.
Thanks to Anton Kovalenko.
David Lichteblau [Mon, 19 Nov 2012 16:54:58 +0000 (17:54 +0100)]
Add a lock to io_end_interruptible, win32_maybe_interrupt_io
Fixes hangs in test :INTERRUPT-IO-UNNAMED-PIPE.
Joshua Elsasser [Sun, 18 Nov 2012 22:38:16 +0000 (14:38 -0800)]
Unbreak ppc builds with 4k *backend-page-bytes*
Joshua Elsasser [Sun, 18 Nov 2012 21:27:17 +0000 (13:27 -0800)]
Only try frlock.1 test on #+sb-thread
Stas Boukarev [Wed, 14 Nov 2012 14:22:50 +0000 (18:22 +0400)]
Update ASDF to 2.26.
David Lichteblau [Tue, 13 Nov 2012 17:13:08 +0000 (18:13 +0100)]
Forcibly fail frlock.1 on Windows by means of a timeout
Presumably due to windows sb-thread bugs, this test often hangs on
Windows. For now, establish a timeout, and mark the test as a known
failure on this platform.
David Lichteblau [Mon, 5 Nov 2012 13:36:31 +0000 (14:36 +0100)]
Further work towards use of win32 file HANDLEs
Expose the fact that we are working with file handles (not simulated
file descriptors), and directly store those handles in fd-streams.
Represent them as integers (not SAPs) to avoid needless
incompatibilities between POSIX and Windows builds. However, adjust
types so as to remove fixnum assumptions.
Includes some further tweaks to file-related foreign definitions
(and run-program in particular), to remove remaining uses of CRT
when possible.
Does not add any `feature' to help user code distinguish between
this SBCL and versions prior to this change using read-time
conditionals, since the changes are, in principle, not considered
user-visible. (We are now unconditionally running the equivalent of
what is marked #!+fds-are-windows-handles on the Windows branch.)
To avoid breaking any user code that might have learned to retrieve
handles from our streams previously, preserve "osf handle"
conversion functions as trivial identity definitions for a while.
Thanks to Anton Kovalenko.
David Lichteblau [Mon, 1 Oct 2012 18:10:44 +0000 (20:10 +0200)]
PowerPC safepoints
"I saw it almost pass tests once. Ship it."
Rough PowerPC port of sb-safepoint and related features. Occasional
issues remain (see comment in test suite).
- Sprinkle fake_foreign_function_call fairy dust over safepoint code.
- Use the CSP page for synchronization, but not for its value.
- No altstack, hence no tricks to escape from it.
- Remove workarounds related to the SIGALRM handler; but keep
SIGINT happy for now, with a somewhat less questionable check.
Alastair Bridgewater [Sat, 9 Jun 2012 15:50:49 +0000 (11:50 -0400)]
mips: Revert remaining badness from 0.9.1.45.
* There were two pieces of badness in 0.9.1.45, both to do with
the call_into_lisp LRA handling, and each compensated for the other
to a limited extent. One change (since reverted) was to decrease
the alignment requirement on positioning the LRA header, allowing
it to be placed on a non-doubleword boundary. The second change
(being reverted here) was to change the LRA address calculation to
subtract the entry point offset from the address of the header
instead of adding OTHER_POINTER_LOWTAG. If the header wound up on
a doubleword boundary (the correct alignment) then the LRA computed
would have LIST_POINTER_LOWTAG, leading to badness when doing a
backtrace. In any event, typechecking the resulting LRA would
fail, and actually attempting to return to it would also fail.
* Revert to computing the LRA by adding OTHER_POINTER_LOWTAG to
the address of the header, bringing MIPS inline with all of the
other RETURN-PC-HEADER (LRA) using backends.
Alastair Bridgewater [Thu, 8 Nov 2012 23:32:36 +0000 (18:32 -0500)]
runtime/thread.h: Fix non-thread binding and control stack pointer access.
* In the non-threaded case, these macros used to break up into two
groups, one for x86oids and one for everything else. This is wrong
just as soon as a non-x86oid port uses a static symbol for the binding
stack pointer.
* Reorganize the non-threaded cases to parallel the structure of the
threaded case, dispatching on the presense of the static symbol for
binding stack access and specifically detecting non-x86oids for the
control frame pointer access.
Alastair Bridgewater [Thu, 8 Nov 2012 23:32:29 +0000 (18:32 -0500)]
runtime/cheneygc.c: Use binding-stack-pointer access macro.
* Rather than access current_binding_stack_pointer (a global
variable) directly, use access_binding_stack_pointer() (a macro
defined in thread.h).
Alastair Bridgewater [Tue, 23 Oct 2012 17:47:27 +0000 (13:47 -0400)]
Thou shalt not MAKE-OTHER-IMMEDIATE-TYPE.
* Really, it's only ever used to make unbound-markers, for which
we have MAKE-UNBOUND-MARKER, which produces more optimal code in
the first place, has a shorter invocation, and reveals intention
far better than using MAKE-OTHER-IMMEDIATE-TYPE.
* Rewrite all uses of MAKE-OTHER-IMMEDIATE-TYPE, excise the VOPs
from all of the backends, and remove the symbol name from package-
data.
* And add DESCRIPTOR-REG to the permitted SCs for
MAKE-UNBOUND-MARKER, since it now must be legal to use a TN of
primitive-type T.
Alastair Bridgewater [Sun, 4 Nov 2012 17:43:27 +0000 (12:43 -0500)]
compiler/generic/genesis: Report FDEFN addresses for undefined functions.
* In order to make debugging bootstrapping problems easier,
include the address of FDEFNs which have not been defined in the
cold-sbcl.map file. This address is what shows up in ldb when
such an FDEFN is invoked.
Alastair Bridgewater [Thu, 8 Nov 2012 23:18:28 +0000 (18:18 -0500)]
compiler/sparc/arith: Fix SCs for FAST-EQL{,-C}/FIXNUM.
* There's a KLUDGE in build-order.lisp-expr wherein failures
when building this file are ignored.
* The failures are specifically an SC vs. arg-type mismatch for
the FAST-EQL/FIXNUM and FAST-EQL-C/FIXNUM VOPs.
* Fix the mismatch by altering the VOP definitions to match what
the MIPS backend uses (since it doesn't have the failure).
* And remove SPARC from the reader conditional on the KLUDGE.
Cyrus Harmon [Mon, 15 Oct 2012 06:12:58 +0000 (23:12 -0700)]
alien type improvement: handle offsets in unparse-alien-record-type
Previously, when recomputing the offset to struct fields we would
ignore the offset and attempt to recompute it, occasionally getting it
wrong. Now store the offset in uparse-alien-record-field and use in
parse-alien-record-fields.
Also, fix some comment typos.
Nikodemus Siivola [Mon, 8 Oct 2012 07:09:53 +0000 (10:09 +0300)]
sb-concurrency: frlocks
David Lichteblau [Wed, 31 Oct 2012 17:06:00 +0000 (18:06 +0100)]
Safepoint protocol upgrade
Upgrade to the new stop-the-world protocol from the Windows branch,
dating back to late 2011, an all-in-one readability and correctness
improvement.
Replace per-thread qrl locks with one process-wide lock for all
operations relating to GC state and the threads' CSP area. Use
condition variables for notifications on GC state changes.
Thanks to Anton Kovalenko.
David Lichteblau [Tue, 30 Oct 2012 13:51:26 +0000 (14:51 +0100)]
Update NEWS; explain Windows system requirements
David Lichteblau [Tue, 23 Oct 2012 19:55:02 +0000 (21:55 +0200)]
Extend use of the linkage table to static symbols
- Formerly static symbols are static no more:
- Always use the linkage table, even in cross compilation. The
runtime retrieves the resulting list of foreign symbols and installs
linkage table entries before calling into Lisp for the first time.
- Simplify/remove various win32 foreign symbol special cases.
- Almost remove scratch().
Conditional on feature SB-DYNAMIC-CORE; required on Windows and optional
on other platforms supporting the linkage table.
With this feature, changes to src/runtime can be built using make,
without requiring a slam.sh step to update core files.
For LINKAGE-TABLE platforms only. Currently supported on x86 and
x86-64. (PowerPC does not yet work.) In the interest of simplicity,
disable this feature permanently on non-SB-THREAD platforms, because
these would require unpleasant changes to allocation macros.
Thanks to Anton Kovalenko.
David Lichteblau [Mon, 29 Oct 2012 12:43:07 +0000 (13:43 +0100)]
Move the global safepoint to one page before static space
New attempt at finding an optimal location for the global safepoint
page. Hopefully this solution will cover all our use cases for
the foreseeable future.
- Relative to static space for architectures with small immediates.
- Also addresses the requirements of sb-dynamic-core, which needs
the safepoint to have an absolute address on x86(-64).
Hence, a new macro !gencgc-space-setup -- tweaks space parameters to
squeeze in the safepoint page, while also simplifying parms.lisp for
some platforms.
David Lichteblau [Mon, 22 Oct 2012 15:04:38 +0000 (17:04 +0200)]
Windows console I/O overhaul
- Make non-interruptible I/O interruptable by means of a
background thread.
- Fixes lp#308923.
- Use Unicode in stdio streams.
Thanks to Anton Kovalenko.
David Lichteblau [Fri, 5 Oct 2012 20:10:53 +0000 (22:10 +0200)]
Allow synchronous win32 I/O to be interrupted, too
... if and only if running on a version of Windows new enough to
support doing so. Two scenarios come to mind where synchronous (i.e.
non-overlapped) I/O might matter:
- There is one kind of HANDLE which is never overlapped: Unnamed
pipes. Unlike named pipes, the feature added by this commit is
our only option of interrupting I/O on the former.
- User code might pass in a HANDLE through MAKE-FD-STREAM without
the right flag set. In principle, non-interruptibily of such a
HANDLE is a bug in said user code, but it doesn't hurt to deal
with these correctly as a side benefit. (The only Windows
releases which support re-opening of a HANDLE with the right
flag also have the functions needed by this commit.)
One downside for users might be an element of surprise, in that the
same SBCL binary will exhibit the presence or lack of features,
respectively, when started on recent Windows or old Windows. However,
the advantages of offering the feature seem to me to outweigh that
disadvantage.
Thanks to Anton Kovalenko.
Christophe Rhodes [Fri, 2 Nov 2012 09:42:04 +0000 (09:42 +0000)]
1.1.1: will be tagged as "sbcl-1.1.1"
David Lichteblau [Fri, 26 Oct 2012 17:35:17 +0000 (19:35 +0200)]
Fix the single-threaded Windows build
For this release, we purport to support Windows without threads as
an option. Make it so.
David Lichteblau [Thu, 25 Oct 2012 12:49:08 +0000 (14:49 +0200)]
Do not assert that the integer returned by UNIX-ISATTY is a BIT
David Lichteblau [Mon, 22 Oct 2012 14:20:15 +0000 (16:20 +0200)]
Fix build on MinGW (again)
Remove -mno-cygwin, re-added by mistake earlier.
nyef [Thu, 11 Oct 2012 19:55:56 +0000 (19:55 +0000)]
.gitignore: Add src/runtime/sparc-funcdef.h
* Just another auto-generated file for a rarely-maintained
target.
nyef [Thu, 11 Oct 2012 18:28:13 +0000 (18:28 +0000)]
Disable an SB-INTROSPECT test on GENCGC SPARC.
* Test ALLOCATION-INFORMATION.4 is known to be flaky at best on
GENCGC PPC, and has been observed to fail on GENCGC SPARC. Since
it's been marked :FAILS-ON for GENCGC PPC, mark it as failing for
GENCGC SPARC as well.
nyef [Thu, 11 Oct 2012 18:18:59 +0000 (18:18 +0000)]
GENCGC on SPARC/Linux
* Tweak make-config.sh to automatically select GENCGC, and to
update the fallback message for those poor bsd-using folks.
* Copied the gencgc memory map from the SunOS version to use for
Linux (the cheneygc maps were identical, we may as well keep the
parallelism).
* Also tweaked the linker flags to match. Not because it was
required to build, but because I don't know why they were changed
for SunOS, and in the absence of such knowledge I'd rather keep
things more or less parallel.
nyef [Thu, 11 Oct 2012 18:13:02 +0000 (18:13 +0000)]
src/runtime/sparc-arch.c: Use si_addr in arch_get_bad_addr().
* Since the sparc port was first merged, arch_get_bad_addr() has
only worked when the program counter is within read-only or the
current dynamic space.
* This is fragile simply because of the existance of static
space and PURIFY. It is WORSE when you add GENCGC to the mix (to
the point where SunOS with GENCGC doesn't even call
arch_get_bad_addr() anymore).
* The existing implementation looks like it predates the switch
to sigaction(2) style signal handlers. SBCL uses si_addr on all
other backends save Alpha (long undermaintained) and HPPA (even
longer undermaintained). Clearly, this approach works on SunOS.
From testing, it works on at least linux-2.6.32. We might as well
run with it, since we need it for GENCGC anyway, and we can easily
concoct a test case that would cause a failure using CHENEYGC.
* So, implementation patterned on any of the other backends, but
leaving the old code in place, conditional-compiled out, as a bit
of a historical note / warning to future historians.
David Lichteblau [Tue, 18 Sep 2012 15:11:40 +0000 (17:11 +0200)]
Update NEWS, make-config.sh
David Lichteblau [Mon, 24 Sep 2012 16:48:34 +0000 (18:48 +0200)]
sb-bsd-sockets: Add a test for interruptible I/O
Test TCP sockets even without :internet-available, albeit only on
threaded builds. Check that INTERRUPT-THREAD works in a timely
fashion on threads currently blocked in I/O on a socket.
David Lichteblau [Tue, 18 Sep 2012 15:12:19 +0000 (17:12 +0200)]
Windows: Use overlapped I/O, CreateFile
Overlapped I/O is win32's asynchronous I/O mechanism, which allows
us to start an I/O operation and explicitly wait for it to finish at
a time of our choosing, such that we can simultaneously await other
events instead of blocking unconditionally.
- Support for overlapped I/O is a per-HANDLE flag specified at
file opening time, necessitating a switch to win32's CreateFile
and away from the CRT's _open.
- Wrap win32 file operations in POSIX-compatible functions, so
that UNIX-OPEN, UNIX-READ, UNIX-WRITE, UNIX-CLOSE continue to
work as before. Under the hood, these now call our Lisp or C
functions instead of versions from CRT.
- For now, these functions still return and expect what passes as
file descriptors in CRT.
- INTERRUPT-THREAD is now capable of performing the interruption
in a target thread blocked in socket I/O, indicated using an
errno of "EINTR". Minor changes in FD streams to retry the I/O
operation explicitly in that case.
Does not yet include changes for console I/O, and instead still
falls back to _read and _write in that case. Also not yet included
is interruptible non-overlapped I/O, e.g. for unnamed pipes.
Thanks to Anton Kovalenko.
Lutz Euler [Wed, 17 Oct 2012 19:05:58 +0000 (21:05 +0200)]
Improve basic block ordering for some loops.
Currently the compiler rotates most loops to minimize branching costs,
but for some loops this actually has the opposite effect (i.e., larger
and slower code being generated), namely for those that already have the
termination test at the end.
So, inhibit loop rotation if such a loop is detected. The decision is
based upon whether the loop's back edge starts with a conditional branch
(don't rotate) or an unconditional branch (do rotate). This heuristic is
correct in simple cases but may err, e.g. if a loop has multiple back
edges. As we didn't try before and don't try now to analyse complex
loops to aid the decision whether to rotate or not, or even how far,
hopefully any differences introduced here will cancel on average with
respect to their impact on performance and code size.
(Loops consisting of only one basic block -- which necessarily have the
termination test at the end -- were (obviously) treated correctly
already. But even small loops can easily consist of multiple blocks, for
example if the loop body contains code from inlining a function call.)
Lutz Euler [Sat, 13 Oct 2012 19:11:43 +0000 (21:11 +0200)]
Typo and other small fixes in the manuals and the man page
That is, in the texinfo files of the user manual, the internals manual,
and in sbcl.1. Fix spelling and grammar errors, put sufficiently many
dots in abbreviations and consistently write "SBCL" in all caps in
prose. Also, SIGABORT should be SIGABRT.
Nikodemus Siivola [Mon, 8 Oct 2012 05:49:41 +0000 (08:49 +0300)]
allow SB-CONTRIB operation without explicitly set CC
Fall back to "cc" with a style-warning.
Nikodemus Siivola [Sun, 7 Oct 2012 12:20:21 +0000 (15:20 +0300)]
don't close runtime dlhandle on Darwin
On newish Darwin it works, but some people still run old enough
version that it won't work. As long as we're not explicitly checking
for "Darwin new enough?", let's try not to break...
Fixes lp#957385
Francois-Rene Rideau [Sat, 14 Apr 2012 16:09:46 +0000 (12:09 -0400)]
make it possible to run tests on an installed SBCL
Allow override of SBCL location via TEST_SBCL_HOME,
TEST_SBCL_RUNTIME, and TEST_SBCL_CORE.
Allow override of temporary file location via TEST_DIRECTORY. (Some
tests still write to /tmp, though -- so user beware!)
Small unrelated whitespace / style-warning fixes.
Nikodemus Siivola [Sun, 7 Oct 2012 11:12:59 +0000 (14:12 +0300)]
teach NODE-CONSERVATIVE-TYPE about union types
Conservative type of STRING is STRING -- and this makes it so.
Fixes lp#1050768 (but also future-proof ARRAY-IN-BOUNDS-P against
'*) explicitly.
Lutz Euler [Sat, 6 Oct 2012 18:36:10 +0000 (20:36 +0200)]
Kill a build warning about unreachable code in MAKE-SEQUENCE.
Drop the T clause in a TYPECASE testing for ATOM, CONS and T as ATOM is
specified to be (NOT CONS) which the compiler well knows.
Break some overly long lines.
Lutz Euler [Sat, 6 Oct 2012 16:56:19 +0000 (18:56 +0200)]
Fix some tests for builds without sb-eval.
Conditionalize on #+SB-EVAL test parts that bind *EVALUATOR-MODE* to
:INTERPRET. The affected tests are:
- compiler.pure.lisp / :multiple-args-to-function
- eval.impure.lisp / (eval :empty-let-is-not-toplevel)
Nikodemus Siivola [Fri, 5 Oct 2012 05:26:47 +0000 (08:26 +0300)]
untangle WITH-IR1-NAMESPACE and WITH-COMPILATION-VALUES
* Move the first out from the latter, and put parts of the first that
belong in the latter there. They're sufficiently unrelated that
it's just confusing. Also clarify why some stuff is in W-C-V and
not W-IR1-N.
* Places that need W-IR1-N: %COMPILE, COMPILE-LOAD-TIME-STUFF,
CONVERT-AND-MAYBE-COMPILE. These are our topmost entry points into
the convert & compile dance.
...and PROCESS-TOPLEVEL-LOCALLY, which needs to process
declarations. We really should separate environment handling and
compiler.
* This also removes the unsightly (REMHASH NAME *FREE-FUNS*) hack
from couple of places.
* Move *SOURCE-PATHS* binding to WITH-SOURCE-PATHS (new), also
sufficiently unrelated to be confusing.
(This fixes the compiler.test.sh regression I managed to introduce.)
Nikodemus Siivola [Thu, 4 Oct 2012 21:01:43 +0000 (00:01 +0300)]
use SB-EXT:EXIT in expect.sh instead of QUIT
Nikodemus Siivola [Thu, 4 Oct 2012 19:39:35 +0000 (22:39 +0300)]
fix PARSE-NATIVE-NAMESTRING :JUNK-ALLOWED T
(and word-wrap NEWS)
SANO Masatoshi [Wed, 3 Oct 2012 19:11:17 +0000 (22:11 +0300)]
fix GC-LOGFILE when none has been set
...and the return value from (SETF GC-LOGFILE).
Nikodemus Siivola [Wed, 3 Oct 2012 20:40:01 +0000 (23:40 +0300)]
make walker tests happier
Our improved handling of specials in the walker broke a few tests,
investigation of which revealed a few further bogosities -- patch
over the worst of them, partially in the walker, partially by fixing
tests which expected bogus results.
LET* walking is still slightly broken when it comes to specials,
since it isn't properly recursive the way it has to be. Mark the
test as expected to fail for now -- fixing it ASAP properly.
(I must have managed to run tests in the wrong tree once again,
since I didn't catch this before the last push. Sorry!)
Nikodemus Siivola [Thu, 27 Sep 2012 07:18:33 +0000 (10:18 +0300)]
fix structure stack allocation for high-debug code
* Allow values to flow through casts in good-for-dx analysis.
* Let-convert main-entry points for already inlined optional
dispatches.
* Don't preserve single-use debug vars in system-lambdas, no
matter what the policy says.
* Don't add INDEFINITE-EXTENT declarations to hairy entries without
&REST arguments.
* SB-C::REST-CONVERSION optimization declaration was pretty
pointless, take it out.
* Test our DX stuff in high-debug code as well.
Nathan Froyd [Sat, 6 Oct 2012 04:04:25 +0000 (00:04 -0400)]
x86-64: micro-optimize LEA DWORD-REG,EA
If we are loading a DWORD EA into a DWORD register, we may not need the
REX prefix. Unlikely to occur in current SBCL code, but does come up
when you're writing your own VOPs for 32-bit operations.
David Lichteblau [Tue, 18 Sep 2012 15:12:13 +0000 (17:12 +0200)]
Update tests for threaded windows builds
As with previous changes to the test keywords, some tests are marked
as expected failures or skipped, but merely to keep test suite
output clean; these failures are not expected to be permament and
shall be improved upon later.
David Lichteblau [Tue, 18 Sep 2012 15:12:11 +0000 (17:12 +0200)]
Use futexes on windows
David Lichteblau [Tue, 18 Sep 2012 15:12:09 +0000 (17:12 +0200)]
Preliminary work towards threads on win32
* Implement SB-THREAD
* Support WITH-TIMEOUT, etc.
Implementation details:
* Implement pthreads, futex API on top of Win32.
* Adds support for the timer facility using sb-wtimer.
* Implement an interruptable `nanosleep' using waitable timers.
* Threading on Windows uses safepoints to stop the world.
On this platform, either all or none of :SB-THREAD, :SB-SAFEPOINT,
:SB-THRUPT, and :SB-WTIMER need to be enabled together.
* On this platform, INTERRUPT-THREAD will not run interruptions
in a target thread that is executing foreign code, even though
the POSIX version of sb-thrupt still allows this (potentially
unsafe) form of signalling by default.
Does not yet include interruptible I/O, which will be made available
separately. Slime users are requested to build SBCL without threads
until then.
Note that these changes alone are not yet sufficient to make SBCL on
Windows an ideal backend. Users looking for a particularly stable
or thread-enabled version of SBCL for Windows are still advised to
use the well-known Windows branch instead.
This is a merge of features developed earlier by Dmitry Kalyanov and
Anton Kovalenko.
David Lichteblau [Wed, 13 Jul 2011 16:01:45 +0000 (18:01 +0200)]
Port WITH-TLS-EA and other remaining FS prefix uses to Windows.
- current-thread-offset-sap
- emit-single-step-test
- Allocation routines
- Disable PSEUDO-ATOMIC on threaded Windows entirely instead of
changing TLS uses of pseudo-atomic-bits. We would need a
temporary register for those changes, and Windows threading is all
safepoint-based, without the need to support asynchronous signals.
Thanks to Dmitry Kalyanov and Anton Kovalenko.
David Lichteblau [Fri, 5 Oct 2012 17:56:45 +0000 (19:56 +0200)]
Do not trash registers in tests/win32-stack-unwind.c
David Lichteblau [Fri, 5 Oct 2012 17:37:28 +0000 (19:37 +0200)]
Run sb-bsd-sockets tests on windows
Previously, we did not attempt tests for this contrib on Windows at
all, presumably because this (otherwise functional) contrib would
have failed some tests and hence would not have been installed.
Instead, mark the remaining failures as expected, so that they get
reported without preventing installation of the contrib.
David Lichteblau [Fri, 5 Oct 2012 16:40:38 +0000 (18:40 +0200)]
Reenable ALLOCATION-INFORMATION.4, mark as known failure
It seems unlikely to me that the combination of features currently
identified as problematic is truly accurate. More plausible seems
that ALLOCATION-INFORMATION is broken and needs a bug fix. Yet the
warning now given should be clear enough and allow users to report
this issue.
David Lichteblau [Mon, 24 Sep 2012 16:48:47 +0000 (18:48 +0200)]
Allow use of SB-RT's mechanism for expected test failures in contribs
... In RT, use the list of expected test failures not just for
debugging output, but return as a primary result only whether
there are unexpected failures, with additional result values for
details on expected failures.
... Tweak make-target-contrib.sh so that the `test-passed' file, if
non-empty, can indicate a `successful' build of the contrib with
only known failures.
This mechanism is meant to follow in the footsteps of SBCL's main
test suite's mechanism for known failures, and is arguably not in
the original spirit of contribs as user contributions that must
build perfectly or fail to install entirely. However, for parts of
contrib/ which are very commonly used as a part of SBCL, it is hoped
that this new mechanism will aid work toward bug fixes in those
contribs rather than de-emphasize it.
David Lichteblau [Fri, 28 Sep 2012 18:51:21 +0000 (20:51 +0200)]
SPARC gencgc
Based on Raymond Toy's work.
David Lichteblau [Fri, 5 Oct 2012 13:21:44 +0000 (15:21 +0200)]
PPC, SPARC cross-type build fix
Thanks to Christophe Rhodes.
Nikodemus Siivola [Wed, 3 Oct 2012 06:22:59 +0000 (09:22 +0300)]
update NEWS
Nikodemus Siivola [Sun, 30 Sep 2012 12:33:23 +0000 (15:33 +0300)]
fix walker handling of LET* bindings shadowing symbol macros
Don't remove variable bindings from lexenv, which would cause
symbol-macros to be unshadowed.
Also treat special bindings correctly -- this comes mostly down to
processing declarations from the body before processing variable
bindings.
Nikodemus Siivola [Sun, 30 Sep 2012 12:34:03 +0000 (15:34 +0300)]
more debug output for the once-in-a-blue-moon cache flushing problem
...was stupidly printing only 1/3rd of the intended amount of
information. *sigh*
Nikodemus Siivola [Tue, 25 Sep 2012 11:16:16 +0000 (14:16 +0300)]
bind and clear *CONTINUATION-NUMBERS* &co in WITH-COMPILATION-VALUES
This leaves CLEAR-STUFF empty, so delete it. \o/
Nikodemus Siivola [Tue, 25 Sep 2012 11:01:31 +0000 (14:01 +0300)]
bind and clear *LIST-CONFLICTS-TABLE* in LIST-CONFLICTS
Nikodemus Siivola [Tue, 25 Sep 2012 10:52:23 +0000 (13:52 +0300)]
bind and clear *SEEN-FUNS* and *SEEN-BLOCKS* in CHECK-IR1-CONSISTENCY
Nikodemus Siivola [Tue, 25 Sep 2012 10:39:25 +0000 (13:39 +0300)]
move clearing of *FREE-FUNS* &co to WITH-IR1-NAMESPACE where they're bound
Nikodemus Siivola [Tue, 25 Sep 2012 10:30:59 +0000 (13:30 +0300)]
remove world-lock from WITH-COMPILATION-UNIT
Add it to SUB-COMPILE-FILE and ACTUALLY-COMPILE instead.
Christophe Rhodes [Thu, 20 Sep 2012 18:38:46 +0000 (19:38 +0100)]
sort *features*ish variable values for repeatability