Nikodemus Siivola [Thu, 8 Dec 2011 15:54:39 +0000 (17:54 +0200)]
robustify ONLY-ONE-BOXED-CONSTANT-FOR-MULTIPLE-USES test
Was broken on x86 due to test fragility.
Nikodemus Siivola [Thu, 8 Dec 2011 15:50:58 +0000 (17:50 +0200)]
use COMPONENT-TOPLEVELISH-P in CHECK-CONSISTENCY
Fixes lp#308921 -- bug was in the consistency checking, not the compiler
itself.
Luis Oliveira [Thu, 8 Dec 2011 14:56:01 +0000 (16:56 +0200)]
explicit :BIG-ENDIAN feature
Instead of implying big-endianness by lack of the :LITTLE-ENDIAN feature,
make it explicit.
Stas Boukarev [Thu, 8 Dec 2011 15:22:12 +0000 (19:22 +0400)]
Fix transform for SEARCH on vectors with :form-end t.
When from-end is specified, start2 becomes end2 and the other way
around, so return star2 or end2 accordingly when testing for an empty
subsequence.
Stas Boukarev [Thu, 8 Dec 2011 14:42:20 +0000 (18:42 +0400)]
Fix transform for SEARCH on vectors.
An empty first sequence means that (= start1 end1) and it will match
the second sequence anywhere starting from start2, so return start2
in case of (= start1 end1).
Nikodemus Siivola [Thu, 8 Dec 2011 12:12:48 +0000 (14:12 +0200)]
missing NEWS for the last few commits
Nikodemus Siivola [Wed, 7 Dec 2011 17:48:39 +0000 (19:48 +0200)]
run-program leaked a pipe per call
exec-failure detection neglected to close the other side of the pipe.
Nikodemus Siivola [Wed, 7 Dec 2011 10:24:54 +0000 (12:24 +0200)]
gencgc: bogus memory fault handling
Add more debugging information when a bogus memory fault occurs,
and two control variables:
continue_after_memoryfault_on_unprotected_page
ignore_memoryfaults_on_unprotected_pages
The first just prevents us from lose()ing. Set it in darwin_init() as we
genuinely appear to get bogus memory faults in threaded code from the kernel,
which point to unprotected boxed pages. They are possibly something we could
filter out in catch_exception_raise... but don't see how. Experimentally
continuing after such them seems harmless, so let's try that but make it
noisy.
The second one silences the debugging output completely. Not set currently at
all.
Nikodemus Siivola [Wed, 7 Dec 2011 14:21:15 +0000 (16:21 +0200)]
better deadlock reporting
Print the cycle properly, so it makes sense even after the deadlock is gone,
which is now case always by the time it is reported.
Since we now break deadlocks before signaling the error, don't barf to
stderr anymore.
Nikodemus Siivola [Wed, 7 Dec 2011 13:41:45 +0000 (15:41 +0200)]
darwin: dladdr can deadlock the GC
Needs to be always called inside WITHOUT-GCING since it grabs locks, and is
/sometimes/ called inside WITHOUT-GCING.
Nikodemus Siivola [Wed, 7 Dec 2011 07:06:46 +0000 (09:06 +0200)]
avoid recursive errors from broken standard streams on debugger entry
Handle STREAM-ERORRS in FLUSH-STANDARD-OUTPUT-STREAMS.
Nikodemus Siivola [Tue, 6 Dec 2011 00:07:24 +0000 (02:07 +0200)]
DESCRIBE improvements
* Nicer DESCRIBE for type designators. Use TYPEXPAND-1 to get it done right.
* Bind *PRINT-CIRCLE* to NIL around lambda-list printing, but compensate with
*PRINT-LEVEL* and *PRINT-LENGTH* for sanity's sake.
Jim Wise [Tue, 6 Dec 2011 16:22:51 +0000 (11:22 -0500)]
Document --fancy.
While here, put list of features set by --fancy into $FANCY_FEATURES,
so documentation doesn't fall out of sync with what option does.
Alastair Bridgewater [Tue, 6 Dec 2011 16:05:53 +0000 (11:05 -0500)]
Add :CHENEYGC feature to non-GENCGC targets.
* When I wrote
14fd5afbac525e7a2e86903070afa0e94dfa14f7 I was
under the impression that there was a :CHENEYGC feature used on
plaforms that used the cheney collector. This was logical, but
incorrect.
* The two ways forward were to back out the use of :CHENEYGC
as a feature when checking compatibility or to move forward and
add :CHENEYGC and use it in preference to (NOT :GENCGC) where
appropriate, opening the door to a third GC option.
* This is the minimal fix, adding :cheneygc to the non-gencgc
targets in make-config.sh.
Alastair Bridgewater [Tue, 6 Dec 2011 16:00:56 +0000 (11:00 -0500)]
Add src/runtime/TAGS to .gitignore.
* We build TAGS by default now, so make it not show up in git.
Nikodemus Siivola [Mon, 5 Dec 2011 23:55:30 +0000 (01:55 +0200)]
fix ONLY-ONE-BOXED-CONSTANT-FOR-MULTIPLE-USES test
Feh.
Nikodemus Siivola [Mon, 5 Dec 2011 23:14:22 +0000 (01:14 +0200)]
don't stack-allocate specialized vectors on non-conservtive control stacks
...cos that would be bad. Currently affects only MIPS.
Nikodemus Siivola [Mon, 5 Dec 2011 22:36:51 +0000 (00:36 +0200)]
fix doubled unboxed constants when there is no immediate representation
The recent changes to handling of boxed constants indvertently cause them to
be duplicated when there was not immediate representation at all, and both an
unboxed and a boxed representaion would have been desirable.
Alastair Bridgewater [Thu, 1 Dec 2011 22:03:26 +0000 (17:03 -0500)]
Improved undefined-function backtrace on PPC.
When there is an existing stack frame (either for a large number
of arguments or for a tail-call), undefined_tramp triggers a
strange case in build_fake_control_stack_frames() that can leave
the OCFP and LRA slots uninitialized, causing a truncated
backtrace.
* Alter undefined_tramp to always allocate and initialize a
stack frame.
* While we're here, tighten up the reg_CODE initialization
sequence.
Alastair Bridgewater [Wed, 30 Nov 2011 16:41:55 +0000 (11:41 -0500)]
Improved undefined-function backtrace on non-x86oids.
* Instead of "bogus stack frame", present undefined function
frames as "undefined function".
* Implement this by checking specifically for the undefined
function trampoline function object (which otherwise fails
pointer validation) in MAKE-LISP-OBJ, and allowing the existing
logic to do what it was always supposed to do.
* Tested on PPC only, but should work on the other affected
targets.
Alastair Bridgewater [Wed, 30 Nov 2011 15:32:40 +0000 (10:32 -0500)]
Improved undefined-function backtrace on x86oids.
* Instead of "bogus stack frame", present undefined function
frames as "undefined function".
* Implement this by checking specifically for escaped frames
with the program counter within the range between the start of
undefined_tramp and the start of whichever function follows it
in $ARCH-assem.S.
Manfred Gahr [Mon, 5 Dec 2011 21:37:53 +0000 (23:37 +0200)]
fix make.sh --dynamic-space-size option handling
!CONFIGURE-DYNAMIC-SPACE-END actually ignored the number it read.
Nikodemus Siivola [Mon, 5 Dec 2011 17:39:57 +0000 (19:39 +0200)]
fix threaded PPC build, refactor new semaphore code
Refactor the recent semaphore code into nicer shape.
* No point in having these functions as inline functions.
* Move shared logic to os-common.c, and conditionalize it on
CANNOT_USE_POSIX_SEM_T, which platform specific headers can define if they
implement their own versions. (Darwin now, Windows in the future.)
* PPC needs genesis/thread.h in assembly, not thread.h.
Nikodemus Siivola [Mon, 5 Dec 2011 18:33:08 +0000 (20:33 +0200)]
fix unthreaded non-x86oid builds
Better representation selection for constants broke things, since it assumed
that IMMEDIATE is the only immediate boxed SC -- which is true only on
x86oids: elsewhere there is also NULL and ZERO.
Add new VM support routine: BOXED-IMMEDIATE-SC-P.
Nikodemus Siivola [Sun, 4 Dec 2011 17:19:33 +0000 (19:19 +0200)]
enable previously-broken thread tests on Darwin
WIN!?
I have not been able to make threaded SBCL on Darwin croak yet with the
semaphore implementation in the previous commit, so ... maybe.
I suspect the sb-concurrency tests can now be enabled on SunOS as well, but
since I don't have a box to test that hypothesis on, leaving them disabled
for now.
Nikodemus Siivola [Fri, 18 Nov 2011 20:37:22 +0000 (22:37 +0200)]
semaphores in the runtime
Trivial refactorings:
* Rename STATE_SUSPENDED STATE_STOPPED for elegance. (Spells with the same
number of letters as STATE_RUNNING, things line up nicer.)
* Re-express make_fixnum in terms of MAKE_FIXNUM so that we can use the
latter to define STATE_* names in a manner acceptable to use in
switch-statements.
* Move Mach exception handling initialization to darwin_init from
create_initial_thread so that current_mach_task gets initialized before
the first thread struct is initialized.
The Beef:
Replace condition variables in the runtime with semaphores.
On most platforms use sem_t, but on Darwin use semaphore_t. Hide the
difference behind, os_sem_t, os_sem_init, os_sem_destroy, os_sem_post, and
os_sem_wait.
POSIX realtime semaphores are supposedly safe to use in signal handlers,
unlike condition variables -- and experimentally at least Mach semaphores
on Darwin are a lot less prone to problems.
(Our pthread mutex usage isn't quite kosher either, but it's the
pthread_cond_wait and pthread_cond_broadcast pair that seemed to be
causing most of the trouble.)
Alastair Bridgewater [Mon, 5 Dec 2011 14:35:53 +0000 (09:35 -0500)]
tests: fix :skipped-on clause for weak hash-table tests.
* During the original addition of :skipped-on, the condition for
skipping the weak hash-table tests was changed from "non-threaded
x86oids" to "everything but threaded non-x86oids". The actual
condition should be "non-threaded conservatively-scavenged-stack".
Alastair Bridgewater [Mon, 5 Dec 2011 14:33:43 +0000 (09:33 -0500)]
tests: Add --report-skipped-tests option to the test runner.
* It is occasionally useful to see precisely which tests are
skipped on a given target, and there was no obvious way to so do.
Alastair Bridgewater [Mon, 5 Dec 2011 14:30:09 +0000 (09:30 -0500)]
Fail early when building with known-incompatible features.
* Essentially, fail as soon as we have the final shebang feature
list available.
* Only checks a small number of "obvious" cases for now.
Stas Boukarev [Mon, 5 Dec 2011 11:47:13 +0000 (15:47 +0400)]
Fix my previous commit on setf expansions.
Fix the case when `default' in (setf (getf x y default) z) isn't provided.
Add tests.
Nikodemus Siivola [Mon, 5 Dec 2011 11:18:08 +0000 (13:18 +0200)]
adjust the new MALLOC-FAILURE test for 32-bit builds
...where malloc of (1- array-total-size-limit) bytes may actually
succeed initially.
Stas Boukarev [Mon, 5 Dec 2011 11:22:53 +0000 (15:22 +0400)]
Remove unused variable warnings in some setf expansions.
(let (list) (setf (getf list 'x 0) 10)) produced a style-warning on a
temporary variable for holding 0, which is unused.
Fixes lp#492071.
Nikodemus Siivola [Sun, 23 Oct 2011 13:04:36 +0000 (16:04 +0300)]
allow coercion of large fixnums to floats outside x86
The reason we need guard against this on x86 is due to the FPU there always
using double-precision internally, which can lead to us deriving an
inconsistent type unless the fixnum is exactly represented by a single-float.
However, no such danger exists outside x86.
(Test-suite already contains tests for this.)
Nikodemus Siivola [Sat, 3 Dec 2011 09:01:25 +0000 (11:01 +0200)]
add support for package::form-read-in-package syntax
sb-c::(csubtypep (specifier-type 'fixnum) (specifier-type 'integer))
Isn't that lovely? The superbly fantasic thing is that this even works
*right* with package locks:
(in-package :cl-user)
sb-c::(defun some-internal-bit ...)
causes a package lock violation since the current package is back to CL-USER
by the type the code is executed.
Robert Brown [Fri, 2 Dec 2011 15:07:20 +0000 (17:07 +0200)]
printing specialized arrays readably
When *READ-EVAL* is true, use #. based syntax to print them.
lp#803665.
Nikodemus Siivola [Sun, 4 Dec 2011 10:40:07 +0000 (12:40 +0200)]
use *SUPPRESS-PRINT-ERRORS* for backtraces and DESCRIBE
The suppression mechanism is a bit more informative than the old #<error
printing object> marker for BACKTRACE, and DESCRIBE didn't really have
anything before this.
Also bind *PRINT-CIRCLE* to T for BACKTRACE, and use the PRINT-UNREADABLY
restart for PRINT-NOT-READABLE errors.
Attila Lendvai [Fri, 28 Jan 2011 15:09:47 +0000 (16:09 +0100)]
add SB-EXT:*SUPPRESS-PRINT-ERRORS* modelled after *BREAK-ON-SIGNALS*
When non-NIL, OUTPUT-OBJECT (our main entry to the printer) binds a handler
that handles conditions of the specified type by printing an error marker
instead of signaling an error.
WRITE also accepts :SUPPRESS-ERRORS, and WITH-STANDARD-IO-SYNTAX binds it to
NIL.
Calls SIGNAL before handling the condition so outer handlers get a chance to
use restarts, etc.
Nikodemus Siivola [Fri, 2 Dec 2011 12:20:08 +0000 (14:20 +0200)]
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
Nikodemus Siivola [Fri, 2 Dec 2011 11:18:00 +0000 (13:18 +0200)]
define SB-EXT:PRINT-UNREADABLY as a function
So
(handler-bind ((print-not-readable #'print-unreadably))
...)
works.
Nikodemus Siivola [Thu, 1 Dec 2011 18:45:19 +0000 (20:45 +0200)]
silent non-toplevel DEFSTRUCT
Use TRULY-THE in the constructor inline expansion only if the compiler knows
the layout: using it for the lazy version doesn't help, and only causes a
STYLE-WARNING.
Nikodemus Siivola [Thu, 1 Dec 2011 19:05:43 +0000 (21:05 +0200)]
don't simplify (LET () ..) => (LOCALLY ...) in the simple evalutor
If LET is at toplevel its subforms are not.
If LOCALLY is at toplevel its subforms are also at toplevel.
Nikodemus Siivola [Thu, 1 Dec 2011 09:53:32 +0000 (11:53 +0200)]
less rebindings in defmethods
PCL needs to rebind DEFMETHOD arguments when they are assigned to:
* CALL-NEXT-METHOD needs the originals.
* We apply an implicit declaration to the original from the specializer,
which an assignment can violate.
There is, however, no need to bind everything simply because /something/ is
assigned to.
Fixed lp#898331.
Nikodemus Siivola [Wed, 30 Nov 2011 10:21:05 +0000 (12:21 +0200)]
more conservative subtypep test for classoids
* Give NIL, NIL for invalid classoids with forward-referenced superclasses
instead of signaling an error during SUBTYPEP.
* If we can't tell it's a subtype and either has a forward-referenced
superclass we can't tell for sure it isn't -- meaning NIL, NIL instead of
NIL, T.
Fixes the second half of lp#888630.
Nikodemus Siivola [Mon, 28 Nov 2011 12:15:31 +0000 (14:15 +0200)]
MAKE-ALIEN improvements
* Move more of the bytes-calculation to macroexpansion time.
* Change %MAKE-ALIEN to take bytes instead of bits, so that --in theory at
least-- chunks upto ARRAY-DIMENSION-LIMIT-1 bytes can be allocated.
* Use ALIEN-FUNCALL-SAVES-FP-AND-PC 0.
* Detect malloc() failure and signal a storage-condition for it. Fixes
lp#891268.
Nikodemus Siivola [Mon, 28 Nov 2011 11:59:34 +0000 (13:59 +0200)]
stricter handling of declarations in DEFGENERIC
Warn about unrecognized declarations.
lp#894202
Nikodemus Siivola [Mon, 28 Nov 2011 11:35:54 +0000 (13:35 +0200)]
fix style-warnings for condition slot-accessors used in :REPORT
Previously condition slot accessors used in :REPORT option signaled
a style-warning under EVAL and LOAD (as source): the compiler saw
the lambda before the accessor had been proclaimed as functions.
Fixes lp#896379.
Nikodemus Siivola [Mon, 5 Dec 2011 09:06:40 +0000 (11:06 +0200)]
use boxed constants for full calls
If a constant is being used in a full call, use a boxed representation
instead of an inline one which must then be boxed at runtime. Also arrange
to have both an immediate unboxed and a boxed representation when
advantageous.
(There might be other cases besides full calls where we should prefer boxed
representations, but that's for later.)
Nikodemus Siivola [Wed, 30 Nov 2011 10:05:25 +0000 (12:05 +0200)]
no need for BOOT-MAKE-WRAPPER on target
Rename it !BOOT-MAKE-WRAPPER.
Nikodemus Siivola [Sat, 29 Oct 2011 12:35:57 +0000 (15:35 +0300)]
change an AVER to CERROR 'bug
Hopefully making it easier to debug.
Nikodemus Siivola [Mon, 28 Nov 2011 10:54:54 +0000 (12:54 +0200)]
improve the SB-EXT:GC docstring(s)
Nikodemus Siivola [Thu, 1 Dec 2011 15:43:49 +0000 (17:43 +0200)]
fix misoptimization of TRUNCATE
Reported by Eric Marsden on sbcl-devel 2011-12-01.
"illegal instruction on PowerPC"
We check for result type being a VALUES-TYPE-P when deciding if to compute
the second value for TRUNCATE or not -- but *WILD-TYPE* isn't a values type.
Make VALUES-TYPE-P return true for it from now on. What could possibly go
wrong? Just two other places need to change, it seems.
Nikodemus Siivola [Thu, 1 Dec 2011 11:30:41 +0000 (13:30 +0200)]
fix bug in typechecking calls with non-constant keywords
Reported by Eric Marsden on sbcl-devel 2011-12-01.
Nikodemus Siivola [Wed, 30 Nov 2011 13:34:30 +0000 (15:34 +0200)]
fix treatment of signed zeroes in INTERVAL-DIV
Fixes bug reported by Eric Marsden on sbcl-devel: type derivation going wrong
due to one signed zeroes: (/ 0.0 -neg) derives correctly as -0.0, but (/ 0
-neg) derives as 0.0, causing the intersection to be empty causing badness.
Simply remove special casing of division of zero from INTERVAL-DIV:
BOUND-BINOP handles signed zeroes correctly, so no sense complicating the
code by adding handling for them in I-D.
Nikodemus Siivola [Mon, 5 Dec 2011 09:25:51 +0000 (11:25 +0200)]
oops. actually stop when seeing --with-foo and customize-target-features.lisp
...instead of just complaining to the stdout.
Nikodemus Siivola [Mon, 28 Nov 2011 17:45:16 +0000 (19:45 +0200)]
more robust deadlock detection
Lock around building the deadlock chain using WITH-CAS-LOCK after the
tentative deadlock has been detected, and break the deadlock chain before
signaling the error.
This means that a single deadlock is reported only in a single thread.
Fixes occasional failures of deadlock-detection.1 due to a bogus vicious
metacircle. (Two threads detecting the same deadlock, then racing to report
the error detected as another deadlock, the reporting of which in turn looked
like a metacircle to CLOS if PRINT-OBJECT didn't yet have the right method in
cache.)
Nikodemus Siivola [Wed, 8 Jun 2011 12:22:46 +0000 (15:22 +0300)]
build runtime/TAGS by default
Getting tired of needing to build it manually all the time.
Nikodemus Siivola [Fri, 2 Dec 2011 12:25:47 +0000 (14:25 +0200)]
add --fancy option to make.sh
Enables threads, core compression, xref for internals, and
after-xc-core. (The last one for convenience, even though it's not user
visible.)
Nikodemus Siivola [Thu, 1 Dec 2011 17:33:14 +0000 (19:33 +0200)]
add --with-<feature> and --without-<feature> support to make.sh
customize-target-features.lisp still works, but the system refuses to mix it
with --with[out] options to avoid confusion.
Nikodemus Siivola [Wed, 30 Nov 2011 16:55:04 +0000 (18:55 +0200)]
add --arch option to make.sh
Not for full-blown cross compilation, though.
Nikodemus Siivola [Sun, 4 Dec 2011 08:32:47 +0000 (10:32 +0200)]
make make.sh run clean.sh
Since eg. trying to build for different arches without cleaning
in the middle will just break things.
slam.sh is for those in a hurry.
Juho Snellman [Sun, 4 Dec 2011 23:09:00 +0000 (00:09 +0100)]
1.0.54: will be tagged as "sbcl-1.0.54"
Juho Snellman [Sun, 4 Dec 2011 19:42:04 +0000 (20:42 +0100)]
:backtrace-interrupted-condition-wait fails on x86 Linux
Nikodemus Siivola [Fri, 2 Dec 2011 22:23:12 +0000 (00:23 +0200)]
remove a stray debugging PRINT
...there since 1.0.48.21! Wow.
Nikodemus Siivola [Thu, 1 Dec 2011 09:16:09 +0000 (11:16 +0200)]
fix bug in semaphore notification objects on TRY-SEMAPHORE
It's not notifiction.
Stas Boukarev [Thu, 1 Dec 2011 14:34:37 +0000 (18:34 +0400)]
Fix clos.impure.lisp DOCUMENTATION test on #-sb-doc.
Don't rely on docstrings being present on standard functions
when testing DOCUMENTATION.
Alastair Bridgewater [Wed, 30 Nov 2011 16:35:32 +0000 (11:35 -0500)]
tests: Skip stream.impure.lisp / BUG-657183 on non-unicode.
* For some reason, #\GREEK_SMALL_LETTER_LAMDA isn't a valid
character name on non-unicode builds. Who knew?
Joshua Elsasser [Wed, 30 Nov 2011 05:29:58 +0000 (21:29 -0800)]
Oops, remove a debugging printenv which snuck in.
Joshua Elsasser [Tue, 29 Nov 2011 17:18:00 +0000 (09:18 -0800)]
Work around excessive consing via ROOM by turning off
alien-funcall-saves-fp-and-pc.
Nikodemus Siivola [Mon, 28 Nov 2011 10:41:52 +0000 (12:41 +0200)]
try to robustify test for bug-309448
We've been getting intermittent reports of it failing, but I've been unable
to reproduce so far. The test in question is a compiler scaling test, which
compares times it takes to compile different things. Brittle, indeed.
Other than non-SBCL causes the only thing I can think of right now is GCs
from other tests getting accounted against one of the supposed-to-be-fast
runs. So, run GC :FULL T before getting the timings to make things more
consistent.
Nikodemus Siivola [Mon, 28 Nov 2011 16:00:02 +0000 (18:00 +0200)]
gencgc: fix regression from
137ba2db2d362f03754ccd080ddbe96f7e3c5dc7
Turned loop conditions into asserts in faith that they always hold.
Turns out this is not the case after all.
Nikodemus Siivola [Mon, 28 Nov 2011 12:18:12 +0000 (14:18 +0200)]
update ASDF to 2.019
Nikodemus Siivola [Mon, 28 Nov 2011 10:19:19 +0000 (12:19 +0200)]
NEWS prettification
Wrap to 78, upcase symbol names, move one more item under the "GC-related"
section and use more consistent phrasing there.
Nikodemus Siivola [Sun, 27 Nov 2011 14:53:20 +0000 (16:53 +0200)]
tweak NAME-CONTEXT
On platforms without UNWIND-TO-FRAME-AND-CALL vops we introduce an extra
block, which then shows up there in the function names for eg. lambdas
defined at the toplevel in high debug code. Fix that.
CATCH also introduces a block. Filter those out too.
Nikodemus Siivola [Sun, 27 Nov 2011 13:04:00 +0000 (05:04 -0800)]
make PPC/Linux buildable on ppc64 hosts
Nikodemus Siivola [Sun, 27 Nov 2011 13:24:42 +0000 (05:24 -0800)]
fix unthreaded builds with sb-futex in target *features*
Nikodemus Siivola [Sun, 27 Nov 2011 12:26:37 +0000 (14:26 +0200)]
missing NEWS
Nikodemus Siivola [Sun, 27 Nov 2011 12:23:35 +0000 (14:23 +0200)]
refactor PRINT-NOT-READABLE condition signaling
SB-INT:PRINT-NOT-READABLE-ERROR both signals the condition,
and binds the restarts.
Nikodemus Siivola [Sun, 27 Nov 2011 12:19:59 +0000 (14:19 +0200)]
we have read-evaluated-form, kill read-replacement-character and -string
...and fix read-evaluated-form to flush its output.
Nikodemus Siivola [Wed, 23 Nov 2011 18:27:38 +0000 (20:27 +0200)]
marginally prettier native debugger banner
Add a conditional newline before printing the thread object.
Nikodemus Siivola [Fri, 25 Nov 2011 16:09:49 +0000 (18:09 +0200)]
cleanup: refactor copy_large_unboxed_object and copy_large_object
They're virtually identical. Implement both in terms of a new function,
general_copy_large_object.
gc_quick_alloc_large and gc_quick_alloc_large_unboxed become unused, delete
them.
...and sort out the types while at it. (long still in the interface)
Nikodemus Siivola [Fri, 25 Nov 2011 15:23:12 +0000 (17:23 +0200)]
cleanup: pacify GCC with an extra pair of parens
Meh. What a stupid warning.
Nikodemus Siivola [Fri, 25 Nov 2011 15:19:29 +0000 (17:19 +0200)]
cleanup: use OS_VM_SIZE_FMT in collect_garbage
One warning less on 32-bit builds.
Nikodemus Siivola [Fri, 25 Nov 2011 14:57:13 +0000 (16:57 +0200)]
cleanup: types in load_core_file
Don't abuse lispobj for things which aren't. Instead new type word_t for
"random binary gunk" in unsigned word-sized slices.
Also define WORD_FMTX.
Nikodemus Siivola [Fri, 25 Nov 2011 14:35:18 +0000 (16:35 +0200)]
cleanup: os_vm_size_t for large_object_size
Nikodemus Siivola [Fri, 25 Nov 2011 14:34:05 +0000 (16:34 +0200)]
cleanup: types in gc_alloc_large
Still keeping the long in the interface.
Nikodemus Siivola [Fri, 25 Nov 2011 14:31:17 +0000 (16:31 +0200)]
cleanup: types in gc_alloc_update_page_tables
Nikodemus Siivola [Fri, 25 Nov 2011 14:30:17 +0000 (16:30 +0200)]
cleanup: void_diff returns os_vm_size_t
Nikodemus Siivola [Fri, 25 Nov 2011 12:55:45 +0000 (14:55 +0200)]
cleanup: os_vm_size_t in gc_alloc_new_region
Same as before, long remains in the interface for a while yet.
Nikodemus Siivola [Fri, 25 Nov 2011 12:53:22 +0000 (14:53 +0200)]
cleanup: #define and use OS_VM_SIZE_FMT in write_generation_stats
Nikodemus Siivola [Fri, 25 Nov 2011 14:24:35 +0000 (16:24 +0200)]
cleanup: unused variable in gc_free_heap
Nikodemus Siivola [Fri, 25 Nov 2011 12:52:39 +0000 (14:52 +0200)]
cleanup: use os_vm_size_t in gc_find_freeish_pages and for granularity
long remains in the signature for now, getting to it soon.
Nikodemus Siivola [Fri, 25 Nov 2011 12:42:49 +0000 (14:42 +0200)]
cleanup: use os_vm_size_t in count_generation_bytes_allocated
Nikodemus Siivola [Fri, 25 Nov 2011 12:40:43 +0000 (14:40 +0200)]
cleanup: use os_vm_size_t in npage_bytes
Nikodemus Siivola [Fri, 25 Nov 2011 12:39:25 +0000 (14:39 +0200)]
cleanup: struct page member types
.region_start_offset is os_vm_size_t
.bytes_used is page_bytes_t (new typedef)
Also add a compile-time check to guard against GENCGC_CARD_BYTES greater
than UINT_MAX.
Nikodemus Siivola [Thu, 24 Nov 2011 15:47:58 +0000 (17:47 +0200)]
cleanup: page_index_t canonicalization
Also define PAGE_INDEX_FTM.
After this I /think/ everything that should be page_index_t, is.
NOTE FOR OUR NEW TYPEDEF OVERLORDS: page_index_t itself is still signed
long, which is probably wrong for Win64.
Alastair Bridgewater [Fri, 11 Nov 2011 14:00:46 +0000 (09:00 -0500)]
Don't scrub the C stack from C.
* The C version of the stack scrubber was picking an address to
start scrubbing by taking the address of a variable in the current
stack frame and subtracting one, clearly dependent on the frame
layout supplied by the compiler.
* Fix, by rewriting the stack scrubber in assembly when
LISP_FEATURE_C_STACK_IS_CONTROL_STACK. This way, we know what the
stack frame layout is, and don't have to worry about red zones and
other such compiler-dependent noise.
* Lightly tested on linux/x86, linux/x86-64, darwin/x86, and
darwin/x86-64.
Lutz Euler [Wed, 23 Nov 2011 19:31:09 +0000 (20:31 +0100)]
Tighter floating-point type constraints in some cases
CONSTRAIN-FLOAT-TYPE used to return a closed bound in some cases where
the corresponding (tighter) open bound would have been derivable,
leading to missed optimisation opportunities. For example the compiler
did not derive that x is not zero in the following call to LOG:
(defun foo (x)
(declare (type (single-float 0.0) x))
(when (> x 0.0)
(log x)))
Fix CONSTRAIN-FLOAT-TYPE so that it returns the tightest possible result
in all cases.
See lp#894498 for details.
Alastair Bridgewater [Wed, 23 Nov 2011 15:55:51 +0000 (10:55 -0500)]
Reduce random casting in looks_like_valid_lisp_pointer_p().
* The casts are ugly, and obscure the logic.
* The casts are WRONG on systems with 64-bit pointers and 32-bit
long integers (thanks to akovalenko for pointing this out).
* We already have utility functions to do most-to-all of what
we're doing with casts.
* And we never use one of our (lispobj *) parameters as an actual
pointer, we always cast it all over the place instead.
* So, take a lispobj instead of a (lispobj *), and use utility
functions from runtime.h instead of inline casting and random
pointer arithmetic.
Nikodemus Siivola [Sun, 23 Oct 2011 09:37:42 +0000 (12:37 +0300)]
tweak tail merging logic
TAIL-ANNOTATE used MERGE-TAIL-CALLS policy (which is an integer) as a
boolean, instead of comparing it to zero. Oops. This means that we always did
TCO when possible.
Since adding a debug-catch-tag effectively prevents TCO, and the policy
controlling that looks just like what we would like to have in
MERGE-TAIL-CALLS if TAIL-ANNOTATE were to use it correctly... just deprecate
MERGE-TAIL-CALLS instead.
Joshua Elsasser [Wed, 23 Nov 2011 07:29:13 +0000 (23:29 -0800)]
Insure that the test for bug 881445 runs with a large enough dynamic space.