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.
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.
Chris Hanson [Fri, 4 Jan 2019 05:16:54 +0000 (00:16 -0500)]
Tweak equality-predicate-property to accept a default-value argument.
Chris Hanson [Fri, 4 Jan 2019 04:44:26 +0000 (23:44 -0500)]
Don't use general predicate relations for record predicates.
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
Chris Hanson [Wed, 2 Jan 2019 06:30:06 +0000 (01:30 -0500)]
Fix problem with crashing in Emacs interface.
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.
Taylor R Campbell [Wed, 2 Jan 2019 05:50:16 +0000 (05:50 +0000)]
Implement position for string input ports.
Taylor R Campbell [Wed, 2 Jan 2019 05:50:06 +0000 (05:50 +0000)]
Export binary-port-length too.
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!
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.
Taylor R Campbell [Wed, 2 Jan 2019 02:16:36 +0000 (02:16 +0000)]
Integrate string operations for order of magnitude speedup.
Taylor R Campbell [Wed, 2 Jan 2019 02:16:28 +0000 (02:16 +0000)]
ucd-slc-value &c. return chars, not fixnums.
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.
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.
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.
Taylor R Campbell [Tue, 11 Dec 2018 16:40:51 +0000 (16:40 +0000)]
Add some more release notes.
Chris Hanson [Thu, 27 Dec 2018 21:22:32 +0000 (16:22 -0500)]
Fix whitespace change ignored by magit.
Chris Hanson [Thu, 27 Dec 2018 01:01:24 +0000 (20:01 -0500)]
Move .dir-locals.el from src/ to top level dir.
Chris Hanson [Thu, 27 Dec 2018 01:00:55 +0000 (20:00 -0500)]
Split test data out of "test-string-normalization".
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.
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.
Chris Hanson [Tue, 11 Dec 2018 07:30:37 +0000 (23:30 -0800)]
Fix bug in inverting empty character set.
Chris Hanson [Mon, 10 Dec 2018 07:00:55 +0000 (23:00 -0800)]
Fix bug in string-copy!.
Chris Hanson [Mon, 10 Dec 2018 07:00:18 +0000 (23:00 -0800)]
Add tests for string-copy!, which has a bug.
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.
Chris Hanson [Mon, 10 Dec 2018 04:39:37 +0000 (20:39 -0800)]
Eliminate use of TC_LEGACY_STRING for symbol names.
Chris Hanson [Sun, 9 Dec 2018 05:02:07 +0000 (21:02 -0800)]
Change all string operations that accept chars to work for any char.
They dump the bucky bits as needed to make this work.
Chris Hanson [Sun, 9 Dec 2018 02:26:45 +0000 (18:26 -0800)]
Implement char->bitless-char.
Matt Birkholz [Sat, 8 Dec 2018 19:57:24 +0000 (12:57 -0700)]
x11/Makefile.am: Fix packaging, TAGS.
(Re)define c_sources so they appear in TAGS. Include compile.scm in
EXTRA_DIST. Punt empty un/install hooks and unnecessary overrides.
Matt Birkholz [Sat, 8 Dec 2018 20:07:32 +0000 (13:07 -0700)]
runtime/rfc2822-headers: Watch out for eof-object.
And leave parse-error calls in tail position, so as not to frustrate a
debugger expecting to return the correct answer.
Matt Birkholz [Sat, 8 Dec 2018 19:21:06 +0000 (12:21 -0700)]
ffi/build: Mixing strings and pathnames is problematic.
In this case rewrite-compressed-file expected a string. It probably
should expect a pathname, but it is just going to get weird with it.
Chris Hanson [Sat, 8 Dec 2018 08:23:06 +0000 (00:23 -0800)]
Update test-syntax-rename to work with syntax changes.
Chris Hanson [Sat, 8 Dec 2018 08:19:31 +0000 (00:19 -0800)]
Add param:trace-syntax? to help debugging syntax expansion.
Chris Hanson [Sat, 8 Dec 2018 06:24:59 +0000 (22:24 -0800)]
Add print method to quoted-identifier.
Chris Hanson [Thu, 6 Dec 2018 15:04:35 +0000 (07:04 -0800)]
Fix: allow compiler to be compiled with current release.
Chris Hanson [Thu, 6 Dec 2018 07:48:31 +0000 (23:48 -0800)]
Tweak all the syntax tests now that they are fixed.
Chris Hanson [Thu, 6 Dec 2018 07:47:01 +0000 (23:47 -0800)]
Add assertion that does pattern matching; useful for syntax testing.
Chris Hanson [Thu, 6 Dec 2018 07:46:45 +0000 (23:46 -0800)]
Eliminate now-unnecessary exports.
Chris Hanson [Thu, 6 Dec 2018 07:46:03 +0000 (23:46 -0800)]
Rewrite environment implementation to clear up ambiguities.
See the extensive note at the beginning for details.
Chris Hanson [Thu, 6 Dec 2018 07:43:41 +0000 (23:43 -0800)]
Implement spar-funcall to call a procedure and ignore its value.
Chris Hanson [Thu, 6 Dec 2018 07:43:05 +0000 (23:43 -0800)]
Eliminate unnecessary use of strip-syntactic-closures.
Chris Hanson [Thu, 6 Dec 2018 07:42:49 +0000 (23:42 -0800)]
Fix some minor bugs in syntax renaming.
Chris Hanson [Thu, 6 Dec 2018 07:41:37 +0000 (23:41 -0800)]
In er-macro-transformer, guarantee that two renames of a symbol are eq?.
Chris Hanson [Thu, 6 Dec 2018 07:40:36 +0000 (23:40 -0800)]
Syntax renaming now handles declarations correctly.
Chris Hanson [Tue, 4 Dec 2018 04:47:55 +0000 (20:47 -0800)]
Eliminate inaccurate comment.
Chris Hanson [Fri, 30 Nov 2018 06:45:50 +0000 (22:45 -0800)]
syntax-rules: eliminate use of rename for creating new identifiers.
This confusion is one of several that has resulted from long-term muddy thinking
on my part, and is a contributor to the bug that was filed.
Also, clean up the code a bit in preparation for further changes required by
R7RS.
Taylor R Campbell [Fri, 7 Dec 2018 17:11:07 +0000 (17:11 +0000)]
Use the parser state, not the value produced, to determine success.
Taylor R Campbell [Fri, 7 Dec 2018 17:10:38 +0000 (17:10 +0000)]
More polar screw cases.
Taylor R Campbell [Fri, 7 Dec 2018 17:03:02 +0000 (17:03 +0000)]
Pass the _type_ of complex component through the parser.
Restores polar notation.
Taylor R Campbell [Fri, 7 Dec 2018 16:57:01 +0000 (16:57 +0000)]
Oops, this broke polar notation.
Taylor R Campbell [Fri, 7 Dec 2018 16:51:48 +0000 (16:51 +0000)]
Reject multiple zero real components by parse states.
Rejecting on a zero real part of parsing an imaginary suffix was cute
but leads to wacky quirks in accepted notation.
Taylor R Campbell [Fri, 7 Dec 2018 16:42:30 +0000 (16:42 +0000)]
Add some more screw cases.
Taylor R Campbell [Fri, 7 Dec 2018 16:00:07 +0000 (16:00 +0000)]
Reject inf and NaN with #e notation.
There is no exact infinity or exact NaN.
Taylor R Campbell [Fri, 7 Dec 2018 15:51:28 +0000 (15:51 +0000)]
Provide notation for NaN payload and signalling NaN.
Reader has various edge cases we fail to make errors still.
Taylor R Campbell [Fri, 7 Dec 2018 15:45:43 +0000 (15:45 +0000)]
string->number returns false on error.
Taylor R Campbell [Fri, 7 Dec 2018 04:48:47 +0000 (04:48 +0000)]
Make this unreachable case an error.
Taylor R Campbell [Fri, 7 Dec 2018 04:48:34 +0000 (04:48 +0000)]
Fix printing NaN sign.
Taylor R Campbell [Fri, 7 Dec 2018 04:45:33 +0000 (04:45 +0000)]
More tests for signed NaN notation.
Only the positive quiet NaN with payload 0 is read/write invariant so
far.
Taylor R Campbell [Fri, 7 Dec 2018 04:42:29 +0000 (04:42 +0000)]
Fix sign of NaN in reader.
Taylor R Campbell [Fri, 7 Dec 2018 04:38:20 +0000 (04:38 +0000)]
Expand test-numpar.scm a little with some bugs.
Taylor R Campbell [Fri, 7 Dec 2018 04:16:41 +0000 (04:16 +0000)]
Make flo:nan.0 reliably return a `positive' quiet NaN with payload 0.
Taylor R Campbell [Fri, 7 Dec 2018 04:12:03 +0000 (04:12 +0000)]
Fix bug in flo:make-nan error reporting.
error_bad_range_arg takes argument number, not argument value.
Taylor R Campbell [Fri, 7 Dec 2018 04:11:01 +0000 (04:11 +0000)]
flo:make-nan error reporting is busted.
Taylor R Campbell [Fri, 7 Dec 2018 03:55:05 +0000 (03:55 +0000)]
Confirm #i works with inf and nan.
Taylor R Campbell [Fri, 7 Dec 2018 03:54:00 +0000 (03:54 +0000)]
There is no exact infinity or NaN, so #e should reject them.
But we produce them anyway.
Taylor R Campbell [Wed, 5 Dec 2018 05:56:55 +0000 (05:56 +0000)]
x86 push can take a memory reference operand.
Conveniently, it evaluates rsp before modifying it too.
Shaves about 1% off the runtime.
Taylor R Campbell [Wed, 5 Dec 2018 05:58:07 +0000 (05:58 +0000)]
Print newline in debugging-printer primitive.
Taylor R Campbell [Tue, 4 Dec 2018 06:15:17 +0000 (06:15 +0000)]
Disable allocator open coders.
These don't actually do anything useful. What they do is open-code a
type check -- and then branch to the same primitive call whether the
type check passed or failed. So they serve only to expand the code.
This appears to have been an aborted experiment in the HP PA-RISC back
end from 1993.
Taylor R Campbell [Mon, 3 Dec 2018 09:19:01 +0000 (09:19 +0000)]
Add missing type checks to some bit string operations.
Taylor R Campbell [Mon, 3 Dec 2018 09:18:13 +0000 (09:18 +0000)]
Bit string primitives are missing type checks.
Taylor R Campbell [Sun, 2 Dec 2018 03:32:42 +0000 (03:32 +0000)]
Teach pp to respect custom print methods for tagged vectors.
Taylor R Campbell [Sun, 2 Dec 2018 03:29:16 +0000 (03:29 +0000)]
pp doesn't respect custom print methods for tagged vectors.
Taylor R Campbell [Sun, 2 Dec 2018 02:45:35 +0000 (02:45 +0000)]
Rework vector tag printer methods so they work again.
XXX Needs tests, but these are a pain to construct...
Taylor R Campbell [Sun, 2 Dec 2018 02:08:58 +0000 (02:08 +0000)]
pp _is_ busted after all but it takes a hairier example.
Taylor R Campbell [Sun, 2 Dec 2018 02:00:17 +0000 (02:00 +0000)]
pp is not busted; I just didn't know about pp-avoid-circularity.
TIL.
Taylor R Campbell [Sun, 2 Dec 2018 01:56:52 +0000 (01:56 +0000)]
Make pp's job easier in this test. (Still busted.)
Taylor R Campbell [Sun, 2 Dec 2018 01:55:45 +0000 (01:55 +0000)]
Fix find-shared-objects. pp is still busted.
Taylor R Campbell [Sun, 2 Dec 2018 01:53:02 +0000 (01:53 +0000)]
find-shared-objects is busted for multiple references.
Taylor R Campbell [Sun, 2 Dec 2018 01:35:04 +0000 (01:35 +0000)]
pp is busted on circular data structures.
Taylor R Campbell [Sun, 2 Dec 2018 01:34:41 +0000 (01:34 +0000)]
Allow the full form of FLUID-LET with ACCESS.
Taylor R Campbell [Sun, 2 Dec 2018 01:33:44 +0000 (01:33 +0000)]
FLUID-LET of ACCESS broke.
(Yes, I know it's legacy, but I need it for another test at the
moment.)
Taylor R Campbell [Sun, 2 Dec 2018 01:00:20 +0000 (01:00 +0000)]
Tickled a bug in connectivity analysis with arity error.
Taylor R Campbell [Sun, 2 Dec 2018 00:14:53 +0000 (00:14 +0000)]
Compiler chokes on a variable named |#[continuation]|.
Taylor R Campbell [Sat, 1 Dec 2018 23:04:19 +0000 (23:04 +0000)]
Open-code some flonum predicates on amd64.
- flonum-is-equal?
- flonum-is-finite?
- flonum-is-infinite?
- flonum-is-nan?
- flonum-is-normal?
- flonum-is-zero?
Taylor R Campbell [Sat, 1 Dec 2018 22:50:22 +0000 (22:50 +0000)]
Teach sf about flo:safe-zero? and flo:safe=.
Taylor R Campbell [Sat, 1 Dec 2018 22:50:07 +0000 (22:50 +0000)]
Speed this up a little at the expense of coverage.
Taylor R Campbell [Sat, 1 Dec 2018 22:49:17 +0000 (22:49 +0000)]
Add some more spot checks. Zero is not exact here, for sign.
Taylor R Campbell [Sat, 1 Dec 2018 22:44:17 +0000 (22:44 +0000)]
Test some more edge cases and exception flags.
Taylor R Campbell [Sat, 1 Dec 2018 22:41:56 +0000 (22:41 +0000)]
Teach Scheme about the floating-point subnormal-operand exception.
Taylor R Campbell [Sat, 1 Dec 2018 22:39:12 +0000 (22:39 +0000)]
Make flo:clear-exceptions! register interest in fp env.
Not sure why I made it conditional before. Makes sense for
flo:raise-exceptions! for functions whose callers might or might not
want them, but usually you do flo:clear-exceptions! only if you are
actually going to use them afterward.
Taylor R Campbell [Sat, 1 Dec 2018 22:34:55 +0000 (22:34 +0000)]
Earlier change to flo:clear-exceptions! is busted.
In particular, the pattern
(flo:preserving-environment
(lambda ()
(flo:clear-exceptions! (flo:supported-exceptions))
...))
ought to give you an environment where the exceptions are cleared,
but it doesn't.
Taylor R Campbell [Sat, 1 Dec 2018 15:32:48 +0000 (15:32 +0000)]
Teach the compiler about more boolean and function primitives.
Taylor R Campbell [Sat, 1 Dec 2018 15:16:49 +0000 (15:16 +0000)]
Recursively integrate after substitution.
The declarations in this context may have changed. This way, you can
get a lot of straight-line floating-point arithmetic like so:
(define (flo:sinh-taylor19 x)
(declare (no-type-checks))
(let* ((x^2 (flo:* x x))
(t8 (flo:/ 1.
121645100408832000.))
(t7 (flo:+ (flo:/ 1.
355687428096000.) (flo:* x^2 t8)))
(t6 (flo:+ (flo:/ 1.
1307674368000.) (flo:* x^2 t7)))
(t5 (flo:+ (flo:/ 1.
6227020800.) (flo:* x^2 t6)))
(t4 (flo:+ (flo:/ 1.
39916800.) (flo:* x^2 t5)))
(t3 (flo:+ (flo:/ 1. 362880.) (flo:* x^2 t4)))
(t2 (flo:+ (flo:/ 1. 5040.) (flo:* x^2 t3)))
(t1 (flo:+ (flo:/ 1. 120.) (flo:* x^2 t2)))
(t0 (flo:+ (flo:/ 1. 6.) (flo:* x^2 t1))))
(declare (integrate t0 t1 t2 t3 t4 t5 t6 t7 t8 x^2))
(flo:* x (flo:+ 1. (flo:* x^2 t0)))))
Previously, the number of variables in this sequence that would be
integrated depended on the number of surrounding integrated calls in
the body of the let (!).
Taylor R Campbell [Sat, 1 Dec 2018 14:53:19 +0000 (14:53 +0000)]
Restore parallel compilation of compiler.
Taylor R Campbell [Sat, 1 Dec 2018 14:34:07 +0000 (14:34 +0000)]
Fix thinko.
Taylor R Campbell [Sat, 1 Dec 2018 02:09:21 +0000 (02:09 +0000)]
Use real:abs, real:copysign.
These aren't guaranteed to be flonums here.
Mixed-exactness complex numbers are pretty silly.
Taylor R Campbell [Sat, 1 Dec 2018 02:07:03 +0000 (02:07 +0000)]
Sqrt is busted on sone mixed-infinite/exact cases.
Taylor R Campbell [Sat, 1 Dec 2018 02:05:40 +0000 (02:05 +0000)]
Make ieee754-binary-hex-string follow IEEE 754-2008.
Taylor R Campbell [Fri, 30 Nov 2018 18:31:20 +0000 (18:31 +0000)]
New procedure (flo:logb x) gives the integer exponent of x.