mit-scheme.git
6 years agoAdd some atan tests.
Taylor R Campbell [Sun, 18 Nov 2018 05:17:32 +0000 (05:17 +0000)]
Add some atan tests.

Currently (atan -2i) is broken because of an unfortunate consequence
of exact Scheme arithmetic failing to propagate sign changes through
zero like floating-point does.

6 years agoAdd note about signed zero in complex notation.
Taylor R Campbell [Sun, 18 Nov 2018 04:11:50 +0000 (04:11 +0000)]
Add note about signed zero in complex notation.

6 years agoFix printing signed zero imaginary part.
Taylor R Campbell [Sun, 18 Nov 2018 04:09:23 +0000 (04:09 +0000)]
Fix printing signed zero imaginary part.

6 years agoMore signed zero screw cases in complex numbers.
Taylor R Campbell [Sun, 18 Nov 2018 04:04:59 +0000 (04:04 +0000)]
More signed zero screw cases in complex numbers.

6 years agoSome more cases.
Taylor R Campbell [Sun, 18 Nov 2018 04:00:17 +0000 (04:00 +0000)]
Some more cases.

6 years agoRespect signed zero in complex real part.
Taylor R Campbell [Sun, 18 Nov 2018 03:58:40 +0000 (03:58 +0000)]
Respect signed zero in complex real part.

6 years agoTest some complex cases. We lose on signed zero (again).
Taylor R Campbell [Sun, 18 Nov 2018 03:56:31 +0000 (03:56 +0000)]
Test some complex cases.  We lose on signed zero (again).

6 years agoAdd note about <= and >= fix.
Taylor R Campbell [Sun, 18 Nov 2018 03:38:52 +0000 (03:38 +0000)]
Add note about <= and >= fix.

6 years agoTeach (log1p x) to return complex results for real x < -1.
Taylor R Campbell [Sun, 18 Nov 2018 03:36:52 +0000 (03:36 +0000)]
Teach (log1p x) to return complex results for real x < -1.

6 years agoAdd some log1p edge cases, not all working.
Taylor R Campbell [Sun, 18 Nov 2018 03:35:43 +0000 (03:35 +0000)]
Add some log1p edge cases, not all working.

6 years agoTest all of the comparison procedures without SF's help.
Taylor R Campbell [Sun, 18 Nov 2018 03:34:32 +0000 (03:34 +0000)]
Test all of the comparison procedures without SF's help.

6 years agoRemove buggy `optimization' of (<= x y) into (not (> x y)).
Taylor R Campbell [Sun, 18 Nov 2018 03:33:15 +0000 (03:33 +0000)]
Remove buggy `optimization' of (<= x y) into (not (> x y)).

6 years agoTest without the sf fakeout, xfail for now.
Taylor R Campbell [Sun, 18 Nov 2018 03:29:10 +0000 (03:29 +0000)]
Test without the sf fakeout, xfail for now.

6 years ago(<= x y) is not (not (> x y)) in the presence of NaN.
Taylor R Campbell [Sun, 18 Nov 2018 03:26:52 +0000 (03:26 +0000)]
(<= x y) is not (not (> x y)) in the presence of NaN.

6 years agoFake out sf so we actually test the <= and >= procedures here.
Taylor R Campbell [Sun, 18 Nov 2018 03:25:17 +0000 (03:25 +0000)]
Fake out sf so we actually test the <= and >= procedures here.

6 years agoTest equality and ordering of various things with NaN.
Taylor R Campbell [Sun, 18 Nov 2018 03:10:04 +0000 (03:10 +0000)]
Test equality and ordering of various things with NaN.

Alas, <= and >= are broken.

6 years agoEmpty out host-adapter now that the release is out.
Chris Hanson [Sat, 17 Nov 2018 07:07:17 +0000 (23:07 -0800)]
Empty out host-adapter now that the release is out.

6 years agoTweak note to note how to get human-readable names.
Taylor R Campbell [Sun, 18 Nov 2018 02:10:28 +0000 (02:10 +0000)]
Tweak note to note how to get human-readable names.

6 years agoNote more floating-point edge case bug fixes.
Taylor R Campbell [Sun, 18 Nov 2018 01:48:24 +0000 (01:48 +0000)]
Note more floating-point edge case bug fixes.

6 years agoTest (make-polar nan 0) is nan.
Taylor R Campbell [Sun, 18 Nov 2018 01:47:06 +0000 (01:47 +0000)]
Test (make-polar nan 0) is nan.

6 years agoMake (make-polar magnitude 0) return magnitude.
Taylor R Campbell [Sun, 18 Nov 2018 01:44:49 +0000 (01:44 +0000)]
Make (make-polar magnitude 0) return magnitude.

6 years ago(make-polar mag 0) should always be mag even if infinite.
Taylor R Campbell [Sun, 18 Nov 2018 01:42:55 +0000 (01:42 +0000)]
(make-polar mag 0) should always be mag even if infinite.

6 years agoFix 0 * inf.
Taylor R Campbell [Sun, 18 Nov 2018 01:38:28 +0000 (01:38 +0000)]
Fix 0 * inf.

6 years agoBug: 0 * inf should be NaN, but if the 0 is exact it gives 0.
Taylor R Campbell [Sun, 18 Nov 2018 01:36:25 +0000 (01:36 +0000)]
Bug: 0 * inf should be NaN, but if the 0 is exact it gives 0.

6 years agoFix release note on floating-point exceptions.
Taylor R Campbell [Sun, 18 Nov 2018 01:19:30 +0000 (01:19 +0000)]
Fix release note on floating-point exceptions.

6 years agoNote bug with reading and printing nonfinite complex parts.
Taylor R Campbell [Sat, 17 Nov 2018 23:33:41 +0000 (23:33 +0000)]
Note bug with reading and printing nonfinite complex parts.

6 years agoParse and print nonfinite parts in rectangular complex numbers.
Taylor R Campbell [Sat, 17 Nov 2018 23:31:56 +0000 (23:31 +0000)]
Parse and print nonfinite parts in rectangular complex numbers.

6 years agoAdd some more nonfinite complex screw cases.
Taylor R Campbell [Sat, 17 Nov 2018 23:21:57 +0000 (23:21 +0000)]
Add some more nonfinite complex screw cases.

6 years agoRevert "Remove workaround for 9.2 compiler bug."
Taylor R Campbell [Sat, 17 Nov 2018 09:15:26 +0000 (09:15 +0000)]
Revert "Remove workaround for 9.2 compiler bug."

This reverts commit 7828111b77fb53e34b365abc775148f49eabe1d2.

Can't keep this change until a new release has a compiler without
the bug.

6 years agoAdd a directory of pending release notes.
Taylor R Campbell [Sat, 17 Nov 2018 09:14:14 +0000 (09:14 +0000)]
Add a directory of pending release notes.

These are in separate files in no particular order so that we don't
have merge conflicts when people merge branches with their own
release notes.

When a release goes out we can just clear the directory and start
over.

Some of these actually went out in 10.1 but didn't make it into the
release notes (and a couple may have been slightly broken in 10.1
anyway).

6 years agoAdd some complex infinite screw cases, xfail.
Taylor R Campbell [Sat, 17 Nov 2018 09:13:21 +0000 (09:13 +0000)]
Add some complex infinite screw cases, xfail.

6 years agoEliminate more string-copy calls.
Chris Hanson [Sat, 17 Nov 2018 06:45:20 +0000 (22:45 -0800)]
Eliminate more string-copy calls.

6 years agoEliminate now-unnecessary string-copy calls.
Chris Hanson [Sat, 17 Nov 2018 04:44:44 +0000 (20:44 -0800)]
Eliminate now-unnecessary string-copy calls.

6 years agogcnote: When heap runs low, abort just the current/console thread.
Matt Birkholz [Fri, 16 Nov 2018 02:14:56 +0000 (19:14 -0700)]
gcnote: When heap runs low, abort just the current/console thread.

6 years agoruntime/gcdemn: Update daemon descriptions.
Matt Birkholz [Fri, 16 Nov 2018 02:09:36 +0000 (19:09 -0700)]
runtime/gcdemn: Update daemon descriptions.

6 years agoruntime/http-io: request body can be #f
Matt Birkholz [Sun, 11 Nov 2018 19:05:48 +0000 (12:05 -0700)]
runtime/http-io: request body can be #f

6 years agomcrypt/configure.ac: typo
Matt Birkholz [Sun, 11 Nov 2018 16:03:49 +0000 (09:03 -0700)]
mcrypt/configure.ac: typo

6 years agoffi/build: typo, free variable
Matt Birkholz [Sat, 10 Nov 2018 19:56:47 +0000 (12:56 -0700)]
ffi/build: typo, free variable

6 years agoRevert "Revert "Remove workaround for 9.2 compiler bug.""
Taylor R Campbell [Fri, 16 Nov 2018 17:01:39 +0000 (17:01 +0000)]
Revert "Revert "Remove workaround for 9.2 compiler bug.""

This reverts commit 690adab07f3f98ccc53d38a75347f184e8811248.

Let's try this again.

6 years agoMake flo:integer? answer true only for finite inputs.
Taylor R Campbell [Fri, 16 Nov 2018 17:00:10 +0000 (17:00 +0000)]
Make flo:integer? answer true only for finite inputs.

6 years agoAdd tests for integer?.
Taylor R Campbell [Fri, 16 Nov 2018 16:57:59 +0000 (16:57 +0000)]
Add tests for integer?.

It incorrectly reports infinities as integers, so xfail.

6 years agoConfirm that complex flonum components survive read/write in hex.
Taylor R Campbell [Fri, 16 Nov 2018 16:48:00 +0000 (16:48 +0000)]
Confirm that complex flonum components survive read/write in hex.

6 years agoTeach the printer to print inexacts and complexes in hexadecimal.
Taylor R Campbell [Fri, 16 Nov 2018 16:46:08 +0000 (16:46 +0000)]
Teach the printer to print inexacts and complexes in hexadecimal.

6 years agoAdd some more tests for read/write invariance with hex.
Taylor R Campbell [Fri, 16 Nov 2018 16:39:50 +0000 (16:39 +0000)]
Add some more tests for read/write invariance with hex.

Printer doesn't yet understand how to print flonums in hex, so xfail.

6 years agoDon't add the #x marker in flo:->string / number->string.
Taylor R Campbell [Fri, 16 Nov 2018 16:38:36 +0000 (16:38 +0000)]
Don't add the #x marker in flo:->string / number->string.

We'll add it in the printer downstream.

6 years agoUse a make macro with $(MAKE) to make in subdirs, with + modifier.
Taylor R Campbell [Fri, 16 Nov 2018 09:18:19 +0000 (09:18 +0000)]
Use a make macro with $(MAKE) to make in subdirs, with + modifier.

- Avoids relying on `make' to execute the right make.
- Works with `make -n'.

6 years agoFix case that wasn't adequately exercised.
Taylor R Campbell [Fri, 16 Nov 2018 09:09:40 +0000 (09:09 +0000)]
Fix case that wasn't adequately exercised.

6 years agoTickle error case that I missed.
Taylor R Campbell [Fri, 16 Nov 2018 09:08:43 +0000 (09:08 +0000)]
Tickle error case that I missed.

6 years agoRevert "Remove workaround for 9.2 compiler bug."
Taylor R Campbell [Fri, 16 Nov 2018 08:35:42 +0000 (08:35 +0000)]
Revert "Remove workaround for 9.2 compiler bug."

This reverts commit 7828111b77fb53e34b365abc775148f49eabe1d2.

I haven't tracked this down because the stack trace is full of frames
in the compiler for which we don't install debug data but the symptom
is:

;  Compiling file: "./floenv.bin" => "./floenv.com"...
;The object +inf.0, passed as the first argument to flonum-normalize, is not the correct type.

First few frames suggest this is in flo:->rational called by something
in RTL CSE.

6 years agoTeach (number->string x 16) to use radix 16, base 2 exponent notation.
Taylor R Campbell [Fri, 16 Nov 2018 08:02:22 +0000 (08:02 +0000)]
Teach (number->string x 16) to use radix 16, base 2 exponent notation.

6 years agoFix export list of (runtime ieee754).
Taylor R Campbell [Fri, 16 Nov 2018 07:44:50 +0000 (07:44 +0000)]
Fix export list of (runtime ieee754).

6 years agoFix definition of flo:largest-positive-normal.
Taylor R Campbell [Fri, 16 Nov 2018 07:41:53 +0000 (07:41 +0000)]
Fix definition of flo:largest-positive-normal.

6 years agoTest a couple edge cases for hexadecimal floating-point parsing.
Taylor R Campbell [Fri, 16 Nov 2018 07:41:19 +0000 (07:41 +0000)]
Test a couple edge cases for hexadecimal floating-point parsing.

One is xfail right now because I defined flo:largest-positive-normal
wrong -- oops!

6 years agoAdd support for parsing non-decimal radix points and binary exponents.
Taylor R Campbell [Fri, 16 Nov 2018 07:39:47 +0000 (07:39 +0000)]
Add support for parsing non-decimal radix points and binary exponents.

6 years agoAdd some trivial string->number tests.
Taylor R Campbell [Fri, 16 Nov 2018 07:22:25 +0000 (07:22 +0000)]
Add some trivial string->number tests.

6 years agoDon't transform (- x) into (- 0 x).
Taylor R Campbell [Fri, 16 Nov 2018 07:05:17 +0000 (07:05 +0000)]
Don't transform (- x) into (- 0 x).

The transformation is wrong for floating-point signed zero.

6 years agoAdd an explicit test for negating zero with (- x).
Taylor R Campbell [Fri, 16 Nov 2018 07:08:07 +0000 (07:08 +0000)]
Add an explicit test for negating zero with (- x).

Currently xfail for some cases because of incorrect optimization in
sf.

6 years agoRemove workaround for 9.2 compiler bug.
Chris Hanson [Fri, 16 Nov 2018 07:27:17 +0000 (23:27 -0800)]
Remove workaround for 9.2 compiler bug.

6 years agoRemove workaround for 9.2 compiler bug.
Chris Hanson [Fri, 16 Nov 2018 07:26:21 +0000 (23:26 -0800)]
Remove workaround for 9.2 compiler bug.

6 years agoEliminate support for old types in debugging info.
Chris Hanson [Fri, 16 Nov 2018 07:24:00 +0000 (23:24 -0800)]
Eliminate support for old types in debugging info.

6 years agoEliminate obsolete record-type-dispatch-tag.
Chris Hanson [Fri, 16 Nov 2018 07:19:35 +0000 (23:19 -0800)]
Eliminate obsolete record-type-dispatch-tag.

6 years agoRemove no-longer-needed comment.
Chris Hanson [Fri, 16 Nov 2018 07:08:04 +0000 (23:08 -0800)]
Remove no-longer-needed comment.

6 years agoImplement new-make-define-structure-type without the obsolete argument.
Chris Hanson [Fri, 16 Nov 2018 07:06:35 +0000 (23:06 -0800)]
Implement new-make-define-structure-type without the obsolete argument.

Temporarily preserve make-define-structure-type which ignores the arg.

6 years agoChange plugins to use the already-compiled toolchain.
Chris Hanson [Fri, 16 Nov 2018 07:03:45 +0000 (23:03 -0800)]
Change plugins to use the already-compiled toolchain.

6 years agoEliminate structure-type/unparser-method and its dependents.
Chris Hanson [Fri, 16 Nov 2018 05:36:02 +0000 (21:36 -0800)]
Eliminate structure-type/unparser-method and its dependents.

6 years agoEliminate old version of make-record-type.
Chris Hanson [Fri, 16 Nov 2018 05:31:22 +0000 (21:31 -0800)]
Eliminate old version of make-record-type.

6 years agoAdd patch from internet to enable/disable FP traps on macOS.
Chris Hanson [Thu, 15 Nov 2018 05:19:09 +0000 (21:19 -0800)]
Add patch from internet to enable/disable FP traps on macOS.

6 years agoBig round of changes to UCD tables, no longer need runtime conversion.
Chris Hanson [Wed, 14 Nov 2018 07:06:20 +0000 (23:06 -0800)]
Big round of changes to UCD tables, no longer need runtime conversion.

Previous tables had to be compiled using 9.2, and couldn't use bytevector,
unicode string syntax, or R7RS char/string escapes.  Now they do that which
results in some small space savings and less work at cold load.

Additionally I changed the representation of multiple-code-point values from
strings to vectors.  The old representation depended on the fact that
vector->string didn't do normalization, so those strings can't be constructed at
compile time (they'll be normalized) and anyway it's not good to depend on that
feature of vector->string.

6 years agoChange default port char-set to ASCII.
Chris Hanson [Wed, 14 Nov 2018 04:47:46 +0000 (20:47 -0800)]
Change default port char-set to ASCII.

6 years agoAdd char-set operation to string output ports, using Unicode.
Chris Hanson [Wed, 14 Nov 2018 04:47:17 +0000 (20:47 -0800)]
Add char-set operation to string output ports, using Unicode.

6 years agoSpeed up the ieee754.scm tests a tiny bit.
Taylor R Campbell [Tue, 13 Nov 2018 07:26:27 +0000 (07:26 +0000)]
Speed up the ieee754.scm tests a tiny bit.

6 years agoSimplify enumerated tests here.
Taylor R Campbell [Tue, 13 Nov 2018 07:26:05 +0000 (07:26 +0000)]
Simplify enumerated tests here.

6 years agoSkip floating-point trap tests if the host doesn't support them.
Taylor R Campbell [Tue, 13 Nov 2018 07:25:36 +0000 (07:25 +0000)]
Skip floating-point trap tests if the host doesn't support them.

6 years agoIgnore .fni and .moc files too.
Taylor R Campbell [Tue, 13 Nov 2018 06:25:27 +0000 (06:25 +0000)]
Ignore .fni and .moc files too.

6 years agoMissed a spot: 64-bit architecture is effectively heap-in-low-memory.
Taylor R Campbell [Tue, 13 Nov 2018 06:03:06 +0000 (06:03 +0000)]
Missed a spot: 64-bit architecture is effectively heap-in-low-memory.

6 years agoTeach the ucode to build on NetBSD/aarch64.
Taylor R Campbell [Tue, 13 Nov 2018 05:56:28 +0000 (05:56 +0000)]
Teach the ucode to build on NetBSD/aarch64.

6 years agoCull configure checks for unused functions.
Taylor R Campbell [Tue, 13 Nov 2018 05:55:56 +0000 (05:55 +0000)]
Cull configure checks for unused functions.

6 years agoExport flo:random-unit-{closed,open} and deprecate flo:random-unit.
Chris Hanson [Mon, 12 Nov 2018 07:03:27 +0000 (23:03 -0800)]
Export flo:random-unit-{closed,open} and deprecate flo:random-unit.

6 years agoFix bug: couldn't compile random.scm on a 32-bit system.
Chris Hanson [Mon, 12 Nov 2018 07:01:46 +0000 (23:01 -0800)]
Fix bug: couldn't compile random.scm on a 32-bit system.

The problem is that it was trying to represent the constant #x55555555 as a
fixnum, which won't work.  I added more selective macro-expansion to enable only
those parts of the code relevant for the different word sizes.

6 years agoFix bug: -Werror means FOO_length_in_bits won't compile on 32-bit gcc.
Chris Hanson [Mon, 12 Nov 2018 06:59:33 +0000 (22:59 -0800)]
Fix bug: -Werror means FOO_length_in_bits won't compile on 32-bit gcc.

Before it just issued a warning.  I rewrote it so that it works.

6 years agoDisable -Winline.
Taylor R Campbell [Sun, 11 Nov 2018 02:44:06 +0000 (02:44 +0000)]
Disable -Winline.

Not really generally useful unless you're tuning particular code;
highly compiler-dependent.  Currently breaks -Os.

6 years agoCheck for overflow in int, not size_t.
Taylor R Campbell [Sat, 10 Nov 2018 18:01:00 +0000 (18:01 +0000)]
Check for overflow in int, not size_t.

6 years agoUse -Wl,-export-dynamic to pass -export-dynamic to the linker.
Taylor R Campbell [Sat, 10 Nov 2018 18:00:42 +0000 (18:00 +0000)]
Use -Wl,-export-dynamic to pass -export-dynamic to the linker.

6 years agoDisable -Wunreachable-code for now, too many false positives.
Taylor R Campbell [Sat, 10 Nov 2018 18:00:00 +0000 (18:00 +0000)]
Disable -Wunreachable-code for now, too many false positives.

6 years agoUse -frounding-math since we change the rounding mode.
Taylor R Campbell [Thu, 8 Nov 2018 18:56:40 +0000 (18:56 +0000)]
Use -frounding-math since we change the rounding mode.

6 years agoFix problems when trying to compile under macOS.
Chris Hanson [Sat, 10 Nov 2018 07:03:30 +0000 (23:03 -0800)]
Fix problems when trying to compile under macOS.

6 years agoBump version number so it's different from release.
Chris Hanson [Fri, 9 Nov 2018 06:37:04 +0000 (22:37 -0800)]
Bump version number so it's different from release.

6 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/mit-scheme
Chris Hanson [Fri, 9 Nov 2018 06:46:09 +0000 (22:46 -0800)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/mit-scheme

6 years agoAllow --enable-debugging to have a third value.
Chris Hanson [Fri, 9 Nov 2018 06:44:51 +0000 (22:44 -0800)]
Allow --enable-debugging to have a third value.

Anything other than "yes" or "no" will be interpreted as setting the C compiler
to generate debugging symbols, but not turn on all of the debugging helpers in
the microcode.

6 years agoShow the expression too.
Taylor R Campbell [Thu, 8 Nov 2018 18:30:27 +0000 (18:30 +0000)]
Show the expression too.

6 years agoUse multiple tests rather than an iterated test to get all results.
Taylor R Campbell [Thu, 8 Nov 2018 17:59:19 +0000 (17:59 +0000)]
Use multiple tests rather than an iterated test to get all results.

6 years agoParanoia (and gcc warning suppression): Avoid arithmetic overflow.
Taylor R Campbell [Thu, 8 Nov 2018 17:25:14 +0000 (17:25 +0000)]
Paranoia (and gcc warning suppression): Avoid arithmetic overflow.

6 years agoDisable -Wstringop-truncation.
Taylor R Campbell [Thu, 8 Nov 2018 17:09:47 +0000 (17:09 +0000)]
Disable -Wstringop-truncation.

We use strncpy in very limited ways, one of which is for struct
sockaddr_un, for which strncpy truncation is correct.

6 years agoExplain why we don't do -Wmissing-prototypes yet.
Taylor R Campbell [Thu, 8 Nov 2018 16:19:03 +0000 (16:19 +0000)]
Explain why we don't do -Wmissing-prototypes yet.

6 years agoAdd -Wunreachable-code and -Wwrite-strings.
Taylor R Campbell [Thu, 8 Nov 2018 16:17:41 +0000 (16:17 +0000)]
Add -Wunreachable-code and -Wwrite-strings.

6 years agoMerge all the warning flags into the same list.
Taylor R Campbell [Thu, 8 Nov 2018 16:16:25 +0000 (16:16 +0000)]
Merge all the warning flags into the same list.

6 years agoSubscribe to particular warning flags, not to -Wextra.
Taylor R Campbell [Thu, 8 Nov 2018 16:13:32 +0000 (16:13 +0000)]
Subscribe to particular warning flags, not to -Wextra.

-Wextra now entails -Wcast-function-type, which is incompatible with
various Unix APIs like sigaction.

6 years agoFix reader NaN notation: -nan.0/+nan.0, not just nan.0.
Taylor R Campbell [Thu, 8 Nov 2018 16:02:09 +0000 (16:02 +0000)]
Fix reader NaN notation: -nan.0/+nan.0, not just nan.0.

6 years agoSome trivial tests for read/write invariance.
Taylor R Campbell [Thu, 8 Nov 2018 15:44:43 +0000 (15:44 +0000)]
Some trivial tests for read/write invariance.

One xfail: The `nan.0' notation reads as NaN, not as a symbol, and
`+nan.0' is not recognized.

6 years agoMore atan2 edge cases.
Taylor R Campbell [Thu, 8 Nov 2018 08:22:51 +0000 (08:22 +0000)]
More atan2 edge cases.