Alex Smith [Thu, 2 Sep 2010 23:31:30 +0000 (00:31 +0100)]
Add chipspec.txt back to the repository
There's no obvious reason why it was removed; it seems to have been
deleted by mistake around C-INTERCAL 0.28. Also add it back to the
distribution tarball.
Alex Smith [Thu, 2 Sep 2010 20:24:47 +0000 (21:24 +0100)]
Fix type mismatch between oil.h, dekludge.c
Wow was this one subtle. "bool" was somehow defined as 8-bit in
dekludge.c, but 32-bit in oil.h, due to include files being included
differently, and this was causing boolean-valued checks to fail
silently.
Alex Smith [Thu, 2 Sep 2010 19:52:26 +0000 (20:52 +0100)]
Fix bugs in file-finding logic
This is both a logic error (an incomplete change from ICKDATADIR to
ICKSYSDIR/ICKCSKELDIR), and a simple typo that was preventing the
skeleton file from being found in an installed setup.
Alex Smith [Thu, 2 Sep 2010 18:39:31 +0000 (19:39 +0100)]
Boolean fixes + autoconfiscation of booleans
Cleaning up ick_bool.h to work even on systems with an insane
stdbool.h; fixing oil.y to use the new booleans throughout;
integrating ick_bool.h into the autoconf system.
Alex Smith [Wed, 1 Sep 2010 20:27:34 +0000 (21:27 +0100)]
Remove generated files from the repository, change build system to match
A new shell script buildaux/regenerate-build-system.sh will regenerate
the build system from scratch, which is needed to run a repository
version. (The contents of distribution tarballs are unchanged.) Many
build system changes are needed to make everything work correctly,
including the integration of the pit and src makefiles (the pit
makefile needs to know where the pit actually /is/); make distcheck
now passes.
Eric S. Raymond [Tue, 31 Aug 2010 09:20:09 +0000 (05:20 -0400)]
Drastic simplification of the build system.
The build system as I found it had several interrelated flaws: (1) it
kept generated files such as aclocal.m4 and configure in the repo,
causing many spurious diffs when they were rebuilt, (2) it did a lot of
grubby copying of source files into the root directory, (3) it was
generally overcomplicated, playing strange games with GNU tools that
are already difficult to understand.
Most of the problems were readily solved by the modern practice of
having a autogen.sh script to bootstrap the build from a state of no
Makefile and no configure. The whole buildaux directory is gone
except for Makefile.am and ylwrap; those now live in the top-level
directory. Makefile.am is now much simpler, as is configure.ac.
To make running the compiler in place for regression-testing continue
working, I had to split the ICKDATADIR variable; it's now ICKSYSDIR
for INTERCAL system libraries and ICKCSKELDIR for the skeleton and
yuk-related files. Both will still point at /usr/local/share by
default.
I've probably broken the DESTDIR/build-directory logic; that will need
to be fixed. Relatedly, more could probably be done to stop the
build from crapping all over the distribution toplevel directory. Also,
the directory variables need to be re-thought and probably renamed.
But this is a good start.
Alex Smith [Tue, 31 Aug 2010 07:25:13 +0000 (08:25 +0100)]
Better fuzztest coverage, and move the fuzzer to etc/
The fuzztest now looks at idiotism.oil and tries to generate things
that look vaguely like the LHSes there, in addition to the normal
huge dose of randomness expected in a fuzztest. This makes it catch a
lot more bugs (i.e. it catches a greater proportion of bugs on each
run); it has found several optimizer bugs already, by the look of
things (although unfortunately fuzztests make it hard to track down
exactly where the bug is).
Alex Smith [Fri, 27 Aug 2010 01:01:49 +0000 (02:01 +0100)]
Fix pit makefile
tpk needed compiling; fft needs an explicit ./ in order to work
on systems with an executable called "fft" or without . in $PATH
(which is recommended and default).
Alex Smith [Thu, 26 Aug 2010 20:30:49 +0000 (21:30 +0100)]
Change optimiser policy, and fix optimiser bugs
This includes a change in optimiser policy, such that optimising a
run-time error into a compile-time error is considered a bug (which
probably should have been the rule all along); the documentation was
inconsistent on this before now. This is also needed for the
testsuite to work with the optimiser.
The specific bugs: constant folding could make a mingle guaranteed
to overflow at runtime if the line was ever reached into a compile-
time error; and folding an and into an or was occasionally an
unchecked no-op, which causes the optimiser to enter an infinite
loop (it's now checked that it's not a no-op in advance).
Eric S. Raymond [Thu, 26 Aug 2010 18:01:53 +0000 (14:01 -0400)]
Association of magic line ranges to system libraries is noe declarative.
Rather than being hard-coded in logic, there's now a table in perpet.c that
maps numeric-label ranges to system library file basenames. The sytem library
takes 1000-1999; the first new library to get this treatment is floatlib,
range 5000-5999. The test for this is the ability to compile the pit's
fft.i program, which requires both syslib and floatlib.
Note that whenever you add a new library to this table, the build system
will need to be tweaked to add the library to the list of those copied to
the build directory.