mit-scheme.git
5 years agoGenerate the trivial constructor in the objdir, not srcdir.
Taylor R Campbell [Mon, 7 Jan 2019 00:25:26 +0000 (00:25 +0000)]
Generate the trivial constructor in the objdir, not srcdir.

Define cref/source-root and cref/object-root in host-adapter.scm so
we can still load compiler.sf into old Schemes, which will never have
this distinction.

5 years agoTeach cref and sf about separate source and object directories.
Taylor R Campbell [Sun, 6 Jan 2019 17:01:34 +0000 (17:01 +0000)]
Teach cref and sf about separate source and object directories.

5 years agoExpose fasl-format:x86-64 as another name for the amd64 format.
Taylor R Campbell [Sun, 6 Jan 2019 23:17:58 +0000 (23:17 +0000)]
Expose fasl-format:x86-64 as another name for the amd64 format.

Relevant because MIT_SCHEME_NATIVE_CODE gets set to x86-64, and gets
plopped into `fasl-format:@MIT_SCHEME_NATIVE_CODE' in the makefile.

5 years agoChange identify-world to show a very brief summary.
Chris Hanson [Mon, 7 Jan 2019 07:50:47 +0000 (23:50 -0800)]
Change identify-world to show a very brief summary.

* Remove versions from all of the subsystems, except the release.
* Remove microcode and runtime subsystems entirely.

5 years agoGeneralize list-like printing, and support list-breadth limit properly.
Chris Hanson [Mon, 7 Jan 2019 07:32:15 +0000 (23:32 -0800)]
Generalize list-like printing, and support list-breadth limit properly.

5 years agoClean up wording around bitless characters.
Chris Hanson [Mon, 7 Jan 2019 00:32:57 +0000 (16:32 -0800)]
Clean up wording around bitless characters.

5 years agoRemove unused and unexported guarantee-FOO procedures.
Chris Hanson [Mon, 7 Jan 2019 00:32:41 +0000 (16:32 -0800)]
Remove unused and unexported guarantee-FOO procedures.

5 years agoChange most places that use bitless-char? to just throw away the bucket bits.
Chris Hanson [Mon, 7 Jan 2019 00:19:59 +0000 (16:19 -0800)]
Change most places that use bitless-char? to just throw away the bucket bits.

5 years agoDo the annual copyright update.
Chris Hanson [Sun, 6 Jan 2019 06:58:28 +0000 (22:58 -0800)]
Do the annual copyright update.

5 years agoIn update-copyright, replace use of old regexp with regsexp.
Chris Hanson [Sun, 6 Jan 2019 06:56:22 +0000 (22:56 -0800)]
In update-copyright, replace use of old regexp with regsexp.

Also adjust the various filename patterns to reflect the current directory
structure.

5 years agoClean the compiler subdir too.
Chris Hanson [Sun, 6 Jan 2019 06:41:18 +0000 (22:41 -0800)]
Clean the compiler subdir too.

5 years agoAllow alist->bundle to accept #F as predicate.
Chris Hanson [Sun, 6 Jan 2019 02:28:40 +0000 (18:28 -0800)]
Allow alist->bundle to accept #F as predicate.

Also beef up bundle tests a bit.

5 years agoFix problem with using bundle? as a bundle predicate.
Chris Hanson [Sun, 6 Jan 2019 02:12:26 +0000 (18:12 -0800)]
Fix problem with using bundle? as a bundle predicate.

5 years agoNew printer parameter param:print-hash-number-in-objects?.
Chris Hanson [Sun, 6 Jan 2019 01:52:10 +0000 (17:52 -0800)]
New printer parameter param:print-hash-number-in-objects?.

5 years agoUse dispatch-tag-print-name.
Chris Hanson [Sun, 6 Jan 2019 01:47:40 +0000 (17:47 -0800)]
Use dispatch-tag-print-name.

5 years agoExport dispatch-tag-print-name for convenience.
Chris Hanson [Sun, 6 Jan 2019 01:46:52 +0000 (17:46 -0800)]
Export dispatch-tag-print-name for convenience.

5 years agoEliminate obsolete comment from user manual.
Chris Hanson [Sun, 6 Jan 2019 01:46:17 +0000 (17:46 -0800)]
Eliminate obsolete comment from user manual.

5 years agoSave file used to test gc table correctness.
Chris Hanson [Fri, 4 Jan 2019 05:19:44 +0000 (00:19 -0500)]
Save file used to test gc table correctness.

5 years agoDetect trivial infinite recursion in promises.
Taylor R Campbell [Thu, 3 Jan 2019 16:35:11 +0000 (16:35 +0000)]
Detect trivial infinite recursion in promises.

Obviously this can be fooled, like

(force (let loop () (delay-force (loop))))

or any non-halting Turing machine, but this is an easy case to detect
with negligible cost.

5 years agoTest detectable screw case of delay-force infinite recursion.
Taylor R Campbell [Thu, 3 Jan 2019 16:33:31 +0000 (16:33 +0000)]
Test detectable screw case of delay-force infinite recursion.

5 years agoIntegrate %promise-parts.
Taylor R Campbell [Thu, 3 Jan 2019 16:23:05 +0000 (16:23 +0000)]
Integrate %promise-parts.

Shaves another 20% off time for test-promise.scm.

5 years agoUse another indirection for representation of promises.
Taylor R Campbell [Thu, 3 Jan 2019 07:17:32 +0000 (07:17 +0000)]
Use another indirection for representation of promises.

The pairs never change, so merely loading the pair object from the
cell indirection gives us an atomic snapshot of it.  This way, there
is no need for without-interrupts in promise-forced?.

This makes each promise cost one more word (previously: one word to
represent plus three words of heap space; now one word to represent
plus four words of heap space), but reducing without-interrupts is a
big win -- this halves the time of test-promise.scm on my machine.

Of course, on a parallel system, the without-interrupts in %force is
still not enough (and we'll need the cell-contentses to be
load-acquire operations, not just loads).

5 years agoFix nested promises.
Taylor R Campbell [Thu, 3 Jan 2019 05:36:58 +0000 (05:36 +0000)]
Fix nested promises.

5 years agoAdd promise tests. Nested promises are busted.
Taylor R Campbell [Thu, 3 Jan 2019 05:36:07 +0000 (05:36 +0000)]
Add promise tests. Nested promises are busted.

5 years agoOpen-code cell operations.
Taylor R Campbell [Thu, 3 Jan 2019 05:11:20 +0000 (05:11 +0000)]
Open-code cell operations.

5 years agoRestore sf predicates, not scode predicates.
Taylor R Campbell [Thu, 3 Jan 2019 16:10:04 +0000 (16:10 +0000)]
Restore sf predicates, not scode predicates.

Various parts of sf were silently disabled in the overly aggressive
change

   commit 816b9122751c9b60b85f9ce3db0df8a516f763cb
   Author: Chris Hanson <org/chris-hanson/cph>
   Date:   Wed Jan 24 00:07:59 2018 -0800

       Greatly simplify SCode abstraction and change names to contain "scode".

       Also remove all FOO-components and FOO-subexpressions procedures.
       More work remains: the lambda abstraction is an unholy mess and needs to be
       cleaned up.  The scan-defines stuff also merits some consideration.

which kinda reflects on the sensibility of using disjoint type
predicates across domains like this as one does in Scheme.

5 years agoMerge branch 'cross-fasdump-v2'
Taylor R Campbell [Fri, 4 Jan 2019 06:59:33 +0000 (06:59 +0000)]
Merge branch 'cross-fasdump-v2'

- Introduces a portable fasdumper that the compiler can use for
  cross-compiling.

- Adapt the build system to use it.  This form is not final: we
  should really be using GNU configure's build/host/target form.

- Fix up the i386 back end, particularly floating-point stuff.

- Split svm1 into four architectures: svm1-32be, svm1-32le,
  svm1-64be, svm1-64le.  This way you can, e.g., use your x86 laptop
  to cross-build an svm1-32le system to run on an arm32 machine.

- Various minor other fixes for cross-compilation.

5 years agoUse integrated %dispatch-tag-ref in record type predicates.
Taylor R Campbell [Fri, 4 Jan 2019 05:09:26 +0000 (05:09 +0000)]
Use integrated %dispatch-tag-ref in record type predicates.

These show up hot in profiles, so this makes a difference.

5 years agoIntegrate string.scm operations in symbol.scm.
Taylor R Campbell [Fri, 4 Jan 2019 05:08:58 +0000 (05:08 +0000)]
Integrate string.scm operations in symbol.scm.

Integrating, e.g., cp1-ref makes a huge difference.

5 years agoTweak equality-predicate-property to accept a default-value argument.
Chris Hanson [Fri, 4 Jan 2019 05:16:54 +0000 (00:16 -0500)]
Tweak equality-predicate-property to accept a default-value argument.

5 years agoDon't use general predicate relations for record predicates.
Chris Hanson [Fri, 4 Jan 2019 04:44:26 +0000 (23:44 -0500)]
Don't use general predicate relations for record predicates.

5 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/mit-scheme
Chris Hanson [Wed, 2 Jan 2019 06:30:44 +0000 (01:30 -0500)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/mit-scheme

5 years agoFix problem with crashing in Emacs interface.
Chris Hanson [Wed, 2 Jan 2019 06:30:06 +0000 (01:30 -0500)]
Fix problem with crashing in Emacs interface.

5 years agoUse runtime's string ports.
Taylor R Campbell [Wed, 2 Jan 2019 05:50:59 +0000 (05:50 +0000)]
Use runtime's string ports.

Also read file in one swell foop, rather than character by character
in a slow painful chain of indirections thousands of times slower.

We'll use legacy strings here because this code was all written under
the assumption that `string' meant byte vector, and legacy strings
still have that semantics.

Eventually this should all be adapted to use bytevectors instead for
storage, and interpret things as strings only as necessary for text
processing beyond mail data formats.

5 years agoImplement position for string input ports.
Taylor R Campbell [Wed, 2 Jan 2019 05:50:16 +0000 (05:50 +0000)]
Implement position for string input ports.

5 years agoExport binary-port-length too.
Taylor R Campbell [Wed, 2 Jan 2019 05:50:06 +0000 (05:50 +0000)]
Export binary-port-length too.

5 years agoFix binary-port-position for output ports.
Taylor R Campbell [Sat, 8 Dec 2018 14:19:46 +0000 (14:19 +0000)]
Fix binary-port-position for output ports.

Not sure if it'll DTRT for combined i/o ports; need more tests!

5 years agoExport binary-port-position and set-binary-port-position!.
Taylor R Campbell [Sat, 8 Dec 2018 14:10:14 +0000 (14:10 +0000)]
Export binary-port-position and set-binary-port-position!.

Currently busted for output ports.

5 years agoIntegrate string operations for order of magnitude speedup.
Taylor R Campbell [Wed, 2 Jan 2019 02:16:36 +0000 (02:16 +0000)]
Integrate string operations for order of magnitude speedup.

5 years agoucd-slc-value &c. return chars, not fixnums.
Taylor R Campbell [Wed, 2 Jan 2019 02:16:28 +0000 (02:16 +0000)]
ucd-slc-value &c. return chars, not fixnums.

5 years agoUse 32-bit xor rather than 64-bit xor for zeroing.
Taylor R Campbell [Sun, 30 Dec 2018 23:33:21 +0000 (23:33 +0000)]
Use 32-bit xor rather than 64-bit xor for zeroing.

5 years agoSplit deeply nested expressions into named and typed temporaries.
Taylor R Campbell [Sat, 29 Dec 2018 21:56:47 +0000 (21:56 +0000)]
Split deeply nested expressions into named and typed temporaries.

No functional change intended, just makes stepping through with a
debugger easier.

5 years agoFix misparenthesization.
Taylor R Campbell [Mon, 31 Dec 2018 21:41:51 +0000 (21:41 +0000)]
Fix misparenthesization.

5 years agoConfirm that a couple screw cases in closure analysis work.
Taylor R Campbell [Sat, 15 Dec 2018 03:21:44 +0000 (03:21 +0000)]
Confirm that a couple screw cases in closure analysis work.

Once upon a time the Y combinator and U combinator would crash the
compiler.  It's been fixed now but let's at least immortalize the
code I had lying around that crashed it so it doesn't happen again.

5 years agoAdd some more release notes.
Taylor R Campbell [Tue, 11 Dec 2018 16:40:51 +0000 (16:40 +0000)]
Add some more release notes.

5 years agoFix whitespace change ignored by magit.
Chris Hanson [Thu, 27 Dec 2018 21:22:32 +0000 (16:22 -0500)]
Fix whitespace change ignored by magit.

5 years agoMove .dir-locals.el from src/ to top level dir.
Chris Hanson [Thu, 27 Dec 2018 01:01:24 +0000 (20:01 -0500)]
Move .dir-locals.el from src/ to top level dir.

5 years agoSplit test data out of "test-string-normalization".
Chris Hanson [Thu, 27 Dec 2018 01:00:55 +0000 (20:00 -0500)]
Split test data out of "test-string-normalization".

6 years agoConvert char to unsigned char before using islower/toupper.
Taylor R Campbell [Sun, 16 Dec 2018 01:11:58 +0000 (01:11 +0000)]
Convert char to unsigned char before using islower/toupper.

Failure to do so is undefined behaviour for any negative char values.

6 years agoUse push with memory reference on i386 too.
Taylor R Campbell [Sun, 16 Dec 2018 00:45:06 +0000 (00:45 +0000)]
Use push with memory reference on i386 too.

6 years agoMove comment to cover all the primitives disabled for this reason.
Taylor R Campbell [Sun, 16 Dec 2018 00:33:14 +0000 (00:33 +0000)]
Move comment to cover all the primitives disabled for this reason.

6 years agoOpen-code unordered comparison primitives on i386.
Taylor R Campbell [Sat, 15 Dec 2018 23:22:40 +0000 (23:22 +0000)]
Open-code unordered comparison primitives on i386.

6 years agoMark some more primitives as machine-dependent and thus non-foldable.
Taylor R Campbell [Sat, 15 Dec 2018 22:45:25 +0000 (22:45 +0000)]
Mark some more primitives as machine-dependent and thus non-foldable.

6 years agoExclude exceptions not in FE_ALL_EXCEPT.
Taylor R Campbell [Sat, 15 Dec 2018 21:44:39 +0000 (21:44 +0000)]
Exclude exceptions not in FE_ALL_EXCEPT.

Some buggy libms omit some FE_* from FE_ALL_EXCEPT, apparently, oops.
When they cease to be relevant to me we can remove this.

6 years agoMake primitives raise exceptions on signalling NaN too.
Taylor R Campbell [Sat, 15 Dec 2018 21:03:16 +0000 (21:03 +0000)]
Make primitives raise exceptions on  signalling NaN too.

6 years agoFix mistaken expansion of flo:<> as flonum-is-less-or-greater?.
Taylor R Campbell [Sat, 15 Dec 2018 20:38:48 +0000 (20:38 +0000)]
Fix mistaken expansion of flo:<> as flonum-is-less-or-greater?.

Global flo:<> is the ordered version, which raises exception on qNaN;
primitive flonum-is-less-or-greater? is the unordered version, which
returns false on qNaN.

6 years agoTest ordered and unordered comparisons with sNaN raise exceptions.
Taylor R Campbell [Sat, 15 Dec 2018 03:48:26 +0000 (03:48 +0000)]
Test ordered and unordered comparisons with sNaN raise exceptions.

6 years agoNormalize significand in flo:random-unit-open even on 32-bit.
Taylor R Campbell [Fri, 14 Dec 2018 17:20:49 +0000 (17:20 +0000)]
Normalize significand in flo:random-unit-open even on 32-bit.

6 years agoFix sign error and mask size in fix:bitcount16.
Taylor R Campbell [Fri, 14 Dec 2018 17:05:50 +0000 (17:05 +0000)]
Fix sign error and mask size in fix:bitcount16.

6 years agoAvoid undefined behaviour with large right shifts.
Taylor R Campbell [Fri, 14 Dec 2018 16:48:00 +0000 (16:48 +0000)]
Avoid undefined behaviour with large right shifts.

6 years agoShift-right is busted on large shifts.
Taylor R Campbell [Fri, 14 Dec 2018 16:44:12 +0000 (16:44 +0000)]
Shift-right is busted on large shifts.

6 years agoDisable FLONUM-EXP open-coding on i386.
Taylor R Campbell [Fri, 14 Dec 2018 16:24:58 +0000 (16:24 +0000)]
Disable FLONUM-EXP open-coding on i386.

The instruction sequence we had was not very good, e.g. (exp -708)
was off by far more than 1ulp.  It can be done that way, but we need
to use 64-bit precision for it, and setting the i387 precision here
is getting a bit far afield from open-coding.

6 years agoRelax expm1 tests; i387 in 53-bit precision won't guarantee 0.5ulp.
Taylor R Campbell [Fri, 14 Dec 2018 16:12:09 +0000 (16:12 +0000)]
Relax expm1 tests; i387 in 53-bit precision won't guarantee 0.5ulp.

6 years agoGuard against loading any NaN into double here.
Taylor R Campbell [Fri, 14 Dec 2018 15:58:27 +0000 (15:58 +0000)]
Guard against loading any NaN into double here.

The i387 floating-point unit raises an exception if you even load
sNaN into the floating-point stack.

6 years agoClear exceptions before enabling traps.
Taylor R Campbell [Fri, 14 Dec 2018 15:43:07 +0000 (15:43 +0000)]
Clear exceptions before enabling traps.

6 years agoUse integer bit tests in FLONUM-IS-NEGATIVE?.
Taylor R Campbell [Fri, 14 Dec 2018 15:18:04 +0000 (15:18 +0000)]
Use integer bit tests in FLONUM-IS-NEGATIVE?.

Otherwise this raises an exception for sNaN on i387.

6 years agoProvide hokey alternatives if no SSE or i387.
Taylor R Campbell [Fri, 14 Dec 2018 15:17:47 +0000 (15:17 +0000)]
Provide hokey alternatives if no SSE or i387.

6 years agoRe-enable the SSE instructions in i386.
Taylor R Campbell [Fri, 14 Dec 2018 15:11:44 +0000 (15:11 +0000)]
Re-enable the SSE instructions in i386.

We don't generate SSE code in the compiler but we need to maintain
the mxcsr in the floating-point environment.

6 years agoDisable open-coding of flonum-copysign/abs/negate on i386 for now.
Taylor R Campbell [Fri, 14 Dec 2018 13:42:18 +0000 (13:42 +0000)]
Disable open-coding of flonum-copysign/abs/negate on i386 for now.

Requires too much work to get these to handle signalling NaN
correctly at the moment.

6 years agoRewrite flonum-copysign/abs/negate primitives using integer masks.
Taylor R Campbell [Thu, 13 Dec 2018 00:13:09 +0000 (00:13 +0000)]
Rewrite flonum-copysign/abs/negate primitives using integer masks.

Otherwise these spuriously raise exceptions on i387 because merely
loading a signalling NaN onto the fp stack does so.

6 years agoMake flonum comparison primitives raise exceptions in ucode.
Taylor R Campbell [Wed, 12 Dec 2018 22:33:34 +0000 (22:33 +0000)]
Make flonum comparison primitives raise exceptions in ucode.

6 years agoSet indent-tabs-mode to t in this directory.
Chris Hanson [Sat, 15 Dec 2018 21:48:47 +0000 (13:48 -0800)]
Set indent-tabs-mode to t in this directory.

This has been true historically.  I'd like to eventually eliminate the use of
tabs in our code base.

6 years agoUse FCOM, not FUCOM, for ordered comparisons.
Taylor R Campbell [Wed, 12 Dec 2018 22:33:57 +0000 (22:33 +0000)]
Use FCOM, not FUCOM, for ordered comparisons.

6 years agoRewrite NaN primitives in terms of integer data.
Taylor R Campbell [Wed, 12 Dec 2018 23:46:48 +0000 (23:46 +0000)]
Rewrite NaN primitives in terms of integer data.

On i387, merely loading and storing a double is enough to turn a
signalling NaN into a quiet NaN, so load and store uint64_t instead.

6 years agoCall the primitives directly.
Taylor R Campbell [Wed, 12 Dec 2018 22:07:09 +0000 (22:07 +0000)]
Call the primitives directly.

These are no longer integrated, so we can't make a compound procedure
call if they are interpreted -- the interpreter will stomp all over
Free while we're in the middle of allocating the string, leading to
mayhem.  But it is safe to call the primitive, even though it is no
longer open-coded.

6 years agoSkip constant-folding MD primitives when cross-compiling.
Taylor R Campbell [Wed, 12 Dec 2018 20:18:39 +0000 (20:18 +0000)]
Skip constant-folding MD primitives when cross-compiling.

6 years agoDistinguish bytes-per-object from target-bytes-per-object.
Taylor R Campbell [Wed, 12 Dec 2018 19:33:05 +0000 (19:33 +0000)]
Distinguish bytes-per-object from target-bytes-per-object.

This is a kludge for now until we have a syntactic tower where we can
use distinct environments at each level of syntax expansion.

6 years agoMissed some .bin spots.
Taylor R Campbell [Wed, 12 Dec 2018 16:25:59 +0000 (16:25 +0000)]
Missed some .bin spots.

6 years agoFix floating-point alignment stuff.
Taylor R Campbell [Wed, 12 Dec 2018 16:19:16 +0000 (16:19 +0000)]
Fix floating-point alignment stuff.

- Allow fasdump-storage of #f for alignment.
- Use only one mechanism for alignment, not two competing ones that
  step on each other's toes.

6 years agoMore line breaks for clarity.
Taylor R Campbell [Tue, 11 Dec 2018 23:50:41 +0000 (23:50 +0000)]
More line breaks for clarity.

6 years agoFix environment this test runs in.
Taylor R Campbell [Tue, 11 Dec 2018 23:50:07 +0000 (23:50 +0000)]
Fix environment this test runs in.

6 years agoRestore separation of syntax-* and compile-* targets.
Taylor R Campbell [Tue, 11 Dec 2018 22:35:20 +0000 (22:35 +0000)]
Restore separation of syntax-* and compile-* targets.

This gives better parallelism; no need to wait for the runtime .com
files when we just need the .pkd from the .bin files for cref.

6 years agoMake these tests run on svm1.
Taylor R Campbell [Tue, 11 Dec 2018 22:28:17 +0000 (22:28 +0000)]
Make these tests run on svm1.

6 years agoFix fixnum range.
Taylor R Campbell [Tue, 11 Dec 2018 22:01:18 +0000 (22:01 +0000)]
Fix fixnum range.

6 years agoExercise some more fasdump cases. Fix missing definition.
Taylor R Campbell [Tue, 11 Dec 2018 21:58:52 +0000 (21:58 +0000)]
Exercise some more fasdump cases.  Fix missing definition.

Small bignums are busted.

6 years agoTeach `make cross-host' to convert .nib -> .bin &c.
Taylor R Campbell [Tue, 11 Dec 2018 15:59:30 +0000 (15:59 +0000)]
Teach `make cross-host' to convert .nib -> .bin &c.

This is more expedient for now than finding all the places in SF/CREF
that fasdump anything to fasdump both the .nib and the .bin file.

6 years agoNew make target install-toolchain just installs the toolchain.
Taylor R Campbell [Tue, 11 Dec 2018 15:54:48 +0000 (15:54 +0000)]
New make target install-toolchain just installs the toolchain.

Useful for working on the cross-compiler when we don't need Edwin &c.

6 years agoMake `make all-toolchain' also build sos, ssp, and xml.
Taylor R Campbell [Tue, 11 Dec 2018 15:57:32 +0000 (15:57 +0000)]
Make `make all-toolchain' also build sos, ssp, and xml.

These are needed in the cross-compiler during cross-host.

6 years agoDo all-compiler/sf/cref only in cross-host, not in cross-target.
Taylor R Campbell [Tue, 11 Dec 2018 15:55:42 +0000 (15:55 +0000)]
Do all-compiler/sf/cref only in cross-host, not in cross-target.

In the cross-compiled system when doing cross-target, which depends
on runtime.com and all.com, the dependencies of runtime.com and
all.com were already made by cross-host.

6 years agoTeach cross-SF/CREF to dump/load in .nib, .txe, .dkp.
Taylor R Campbell [Tue, 11 Dec 2018 15:52:07 +0000 (15:52 +0000)]
Teach cross-SF/CREF to dump/load in .nib, .txe, .dkp.

These correspond to .bin, .ext, .pkd.  LOAD-OPTION still loads from
.bin, .ext, .pkd (and .com) for libraries that are installed and are
not macro definitions of subsystems being cross-compiled.

This backwards suffix business is getting a little out of hand.
Possible partial alternatives:

- .xbin/.xext/.xpkd

- invent a static linker in the toolchain that can run on the cross
  host rather than using make.scm and disk-save in the cross target

- devise a portable fasload that sf/cref can use in the cross host

- use a machine-independent file format for .bin/.ext/.pkd

6 years agoMove fasl version check earlier.
Taylor R Campbell [Tue, 11 Dec 2018 15:48:03 +0000 (15:48 +0000)]
Move fasl version check earlier.

This breaks INHIBIT_FASL_VERSION_CHECK -- but that was already broken
so that Scheme would abort (!) before even getting to the check,
because of the conditional in fasl_object_address which is called by
decode_fasl_header.

If someone wants to revive INHIBIT_FASL_VERSION_CHECK, be my guest,
though it might be easier to do whatever you're trying to do with the
portable fasdumper instead.

6 years agoSplit svm1 into four architectures: svm1 x {32,64} x {be,le}.
Taylor R Campbell [Tue, 11 Dec 2018 15:44:19 +0000 (15:44 +0000)]
Split svm1 into four architectures: svm1 x {32,64} x {be,le}.

--with-cross-target must specify exactly which one to use for now.

--enable-native-code=svm1 or svm1-le or svm1-64 will fill in the
remaining parameters (word size, byte order) from the host system
characteristics.

6 years agoMake `make cross-target' work in three stages.
Taylor R Campbell [Tue, 11 Dec 2018 15:35:34 +0000 (15:35 +0000)]
Make `make cross-target' work in three stages.

1. moc->com in runtime, so the next stages can use a compiled runtime
2. moc->com in the whole tree
3. fni->inf in the whole tree

XXX Maybe the latter stages can be combined; for now this change just
splits the first two apart.  Even better, maybe we can nix this step
altogether and teach the cross-fasdumper to do this part itself.
Wouldn't be hard to teach the cross-fasdumper to do the relocation
that currently requires sketchy with-absolutely-no-interrupts crap.
For compile-scode, could maybe just fasdump to a bytevector in memory
and invent a primitive to fasload from that.

6 years agoTweak fasdumper to null-terminate bytevectors too.
Taylor R Campbell [Tue, 11 Dec 2018 15:32:34 +0000 (15:32 +0000)]
Tweak fasdumper to null-terminate bytevectors too.

find_primitive relies on symbol names (which were formerly `strings',
i.e. `vector-8b' or TC_CHARACTER_STRING, and are now `bytevectors')
to be null-terminated.

Rather than try to figure out which ones are primitive names and
which ones are not, we'll just null-terminate all of them.

We can undo this if we change find_primitive.  (We need to change the
compile-time tool findprim.c anyway because its strcmp_ci misuses
islower/toupper.)

6 years agoMerge remote-tracking branch 'origin/master' into cross-fasdump-v2
Taylor R Campbell [Tue, 11 Dec 2018 15:17:33 +0000 (15:17 +0000)]
Merge remote-tracking branch 'origin/master' into cross-fasdump-v2

6 years agoGenerate char sets for each UCD general category and numeric type.
Chris Hanson [Tue, 11 Dec 2018 07:31:15 +0000 (23:31 -0800)]
Generate char sets for each UCD general category and numeric type.

And use these to avoid expensive computations in ucd-glue.

6 years agoFix bug in inverting empty character set.
Chris Hanson [Tue, 11 Dec 2018 07:30:37 +0000 (23:30 -0800)]
Fix bug in inverting empty character set.

6 years agoFix bug in string-copy!.
Chris Hanson [Mon, 10 Dec 2018 07:00:55 +0000 (23:00 -0800)]
Fix bug in string-copy!.

6 years agoAdd tests for string-copy!, which has a bug.
Chris Hanson [Mon, 10 Dec 2018 07:00:18 +0000 (23:00 -0800)]
Add tests for string-copy!, which has a bug.

6 years agoAdd support for 'expect-failure? property on assertions.
Chris Hanson [Mon, 10 Dec 2018 06:58:55 +0000 (22:58 -0800)]
Add support for 'expect-failure? property on assertions.

This allows an individual assertion to be marked as broken.  When the problem is
fixed, the property can be removed.