* microcode/returns.h (RC_MULTIPLE_VALUES): New return code.
* microcode/interp.c: Interpret new return code.
* runtime/conpar.scm: Parse new stack frame type.
* runtime/boot.scm (values call-with-values with-values): Assign
these bindings earlier in the boot. They are no longer inlined by the
scode optimizer and cannot be assigned later.
* runtime/global.scm: Remove old definitions.
* runtime/runtime.pkg: Move declarations.
Matt Birkholz [Fri, 3 Feb 2017 23:56:48 +0000 (16:56 -0700)]
Exit with non-zero status when Aborting!: out of memory...
...in --batch-mode. This is basically 93d3d5c, which was mistakenly
undone by 85c1fb4 because it assumed the abort resulted in an error
that would stop the REPL. Signaling an error after the restart and
cleanup is... tricky... so just %exit.
Matt Birkholz [Wed, 1 Feb 2017 07:30:11 +0000 (00:30 -0700)]
tests/unit-testing.scm: Add expectation to assert-error failure.
Recently bytevector-u8-ref did not signal a range error but returned a
random value. The failure report only said "value <random>". Now it
also includes the expected condition type(s).
Chris Hanson [Mon, 30 Jan 2017 09:42:20 +0000 (01:42 -0800)]
Rework the UTF-8 codecs:
* Allow any scalar value to be used, as required by Unicode.
* Implement strict decoding as described in Unicode document.
* Change test cases to match new behavior.
Chris Hanson [Mon, 30 Jan 2017 02:40:53 +0000 (18:40 -0800)]
Refactor the character set abstraction:
* Clarify the use of "code point" versus "scalar value".
* Rename well-formed-scalar-value-list? to code-point-list? and broaden its
scope to allow characters, strings, and character sets.
* Rename scalar-values->char-set to char-set* and broaden its domain to include
any code-point-list?.
* Rename char-set->scalar-values to char-set->code-points.
* Implement char-in-set? which is char-member? with the args reversed. This
makes it consistent with scalar-value-in-char-set?. Deprecate char-member?.
* Implement char-set-union* and char-set-intersection*.
* Eliminate all of the "alphabet" names which are obsolete.
* Eliminate guarantee-char-set and error:not-char-set.
Chris Hanson [Sat, 28 Jan 2017 11:15:42 +0000 (03:15 -0800)]
Improve the unit-testing framework in a few ways.
* Simplified the creation of new assertions.
* Added ability to have templated failure messages.
* Made it easy to make negated assertions.
* Added a handful of new assertions.
Chris Hanson [Fri, 27 Jan 2017 10:31:37 +0000 (02:31 -0800)]
Major refactor to use ustring in important places.
There is much more work to do but this converts all the textual I/O, parser
buffers, pathnames, URIs, and a bunch of the XML code. The older Unicode
support in (runtime unicode) is completely gone now. Outside of Edwin, it
should be fairly safe to assume that legacy strings are *NOT* UTF-8 encoded.
Some specific work items remaining:
* Eliminate symbol-name, which violates the non-utf8-legacy rule.
* Finish converting the XML code to consistently use ustrings.
* Implement real Unicode casing, ordering, and character sets.
* Change the parser to use the R7RS-defined character classes.
* Isolate Edwin from the runtime system's string implementation, since porting
it to Unicode is not worth the trouble. It should be frozen to use only
ASCII, not ISO 8859-1 as at present.
And last of all:
* Once Edwin is isolated, convert the runtime system to use ustrings everywhere,
then rename them from "ustring" to "string".
Chris Hanson [Fri, 27 Jan 2017 06:08:09 +0000 (22:08 -0800)]
Implement converters between utf8-string and ustring.
These are temporary: both utf8-string and wide-string are going to be
eliminated. Until then, we need some scaffolding to incrementally rewrite code
that uses them.
Chris Hanson [Fri, 27 Jan 2017 00:30:33 +0000 (16:30 -0800)]
Refactor symbol implementation to use UTF-8 bytevectors for names.
Primitives handle this correctly since they accept either a legacy string or a
bytevector. As long as no one peeks behind the abstraction this should be
transparent.
However, symbols with non-ASCII names will produce non-legacy strings when
asked. AFAIK there are none currently in use.