Matt Birkholz [Thu, 8 May 2014 04:22:58 +0000 (21:22 -0700)]
ffi: Punt AUXDIR from shim-config.scm.
Procedures like compile-shim need to use the first directory in
MITSCHEME_LIBRARY_PATH (not the installation directory) so that the
FFI test can override it, getting the not-yet-installed configuration
from the build directory.
Symlink shim-config.scm to src/lib/ and generate it during `make all',
not `make install', so that it is available to the test FFI (during
`make check').
Fix FFI test NOT to use with-notification around `make', which cannot
use fresh-line. Just write whole lines to notification-output-port.
Matt Birkholz [Wed, 7 May 2014 06:19:42 +0000 (23:19 -0700)]
configure: Move check for __x86_64__.
Move AC_CHECK_DECL(__x86_64__) before AC_MSG_CHECKING([for native-code
support]) so that the former's progress note does not arrive in the
middle of the latter's, like this:
checking for native-code support... checking whether __x86_64__ is declared... no
yes, for i386
Matt Birkholz [Tue, 6 May 2014 02:23:06 +0000 (19:23 -0700)]
ffi: Update Makefile for prhello example.
Use the generate-shim, compile-shim, link-shim and install-shim
procedures. Move to a separate file included via @verbatiminclude,
for more convenient testing.
Matt Birkholz [Tue, 6 May 2014 01:51:40 +0000 (18:51 -0700)]
Add FFI to doc/info-dir and reformat.
Renamed the dir entries for consistency, and so that they sort
together in a large category like "Programming Languages". Updated
the @direntry in each toplevel .texinfo to match.
Not hooked up to anything, but these have been floating around my
disk for months and were likely to get lost. Feel free to hook these
up and start using them. If you do, you should start by writing some
automatic tests.
Matt Birkholz [Fri, 25 Apr 2014 23:47:06 +0000 (16:47 -0700)]
Call verify_heap before GC to scan for bogosities.
Trap recovery (on Unix) occasionally fails the assert in
linkage_section_type when its scan of the heap encounters non-marked
words that are not "hidden" by a non-marked vector header.
The new verify_heap function scans the heap in the same way, and
complains on stderr about any invalid linkage section types, object
types, etc. If the GC_Debug flag is set, verify_heap is called by the
garbage-collect primitive to scan maximal heap.
The new dump_heap_at function can be used to inspect the heap around a
reported bogosity.
Temporary kludge: bake a fresh runtime into the toolchain.
This is practically necessary for now because of the SEQUENCE-2 mess.
It may continue to be necessary in the future until we have proper
cross-compilation tools that can handle macros and fasdump format
changes sanely.
We previously used `ANSI' char image strings, which really meant
Windows-1252 for some reason. Now we use ISO-8859-1 so things get
displayed correctly in X at least. Some characters may not display
*nicely* on Windows, but they will display *correctly* (with an octal
escape).
Matt Birkholz [Fri, 29 Nov 2013 18:26:29 +0000 (11:26 -0700)]
svm: Fix the disassembler.
Re-wrote it with a "cursor" that wraps up the block and offset and
symbol-table previously passed around and/or fluid-bound to *block,
*current-offset, *symbol-table, etc.
Matt Birkholz [Tue, 26 Nov 2013 17:08:59 +0000 (10:08 -0700)]
svm: Convert program_counter from a static variable to an argument.
This seems to speed the machine up 20%. Before this patch, the
compile-everything phase ("Use the new machine and compiler to
re-compile everything.") took ~67 minutes on a 3.2GHz Core i3-550.
After applying this patch, that phase took ~53 minutes (21% less).
This conversion was incomplete in the original implementation (in 6ae556b). I backed it out in order to get a simpler machine working.
Matt Birkholz [Sun, 13 Oct 2013 08:03:15 +0000 (01:03 -0700)]
Fix LIAR/svm build to cross from 9.1.1.
As for LIAR/C, do not cross compile host .bins containing sequence-3s.
Chuck them to STAGEX/ and re-syntax with cross runtime. And syntax
compiler/base/crsend AFTER said chucking.
Matt Birkholz [Sun, 13 Oct 2013 01:17:44 +0000 (18:17 -0700)]
Fix new build to cross from 9.1.1.
On a 9.1.1 host, the new build dies while compiling the compiler.
; Generating SCode for file: "fggen/canon.scm" => "fggen/canon.bin"...
;MICROCODE-TYPE: Unknown name sequence
The usual remedies did not suffice. In fact now the temporary code in
cref/make.scm is not needed. The compiler is compiled with a cross
runtime that provides the necessary patch via its utabs.scm, where
access to type-aliases and returns-aliases is easy, though
insufficient to train the host. 9.1.1 still needs the training in
runtime.sf.
Unlike a cross compile, a cross runtime was not used by this build(?).
Use a new compile-cross-runtime target and --fasl make.com to make
tools/syntaxer.com. Make syntax-cross-cref and syntax-cross-sf
dependent on syntax-cross-runtime for its runtime.pkd (pinching off a
little parallelism, but allowing them to proceed while the runtime
compiles). Did not try to syntax anything but the new compiler with
the new star-parser.
In COMPILE-SYSTEM, load the bin if cross-compiling too.
XXX COMPILE-SYSTEM is completely wrong; it needs to be eliminated in
favour of a principled way to identify macro dependencies, like in
Scheme48 and Racket.
`Bootstrap toolchain' sounds like something that is useful only to
bootstrap MIT Scheme, when in fact the object of the exercise is to
make it a general-purpose cross-compilation toolchain application
that you can use to cross-compile anything.