mit-scheme.git
6 years agoDon't generate keyword-value-item except at top level.
Chris Hanson [Fri, 2 Feb 2018 05:55:33 +0000 (21:55 -0800)]
Don't generate keyword-value-item except at top level.

They aren't needed for internal environments.

6 years agoHandle define-syntax better when unsyntaxing.
Chris Hanson [Fri, 2 Feb 2018 05:55:07 +0000 (21:55 -0800)]
Handle define-syntax better when unsyntaxing.

6 years agoFix test broken by earlier change.
Chris Hanson [Fri, 2 Feb 2018 05:54:55 +0000 (21:54 -0800)]
Fix test broken by earlier change.

6 years agoEliminate another empty file.
Chris Hanson [Thu, 1 Feb 2018 08:02:24 +0000 (00:02 -0800)]
Eliminate another empty file.

6 years agoSimplify how runtime syntactic environments are created.
Chris Hanson [Thu, 1 Feb 2018 07:00:33 +0000 (23:00 -0800)]
Simplify how runtime syntactic environments are created.

No more layering of top-level environments over one another, or of top-level
environments over runtime environments -- a top-level environment IS a runtime
environment.

6 years agoDon't use syntactic enviroment to indirectly bind global macros.
Chris Hanson [Thu, 1 Feb 2018 07:00:26 +0000 (23:00 -0800)]
Don't use syntactic enviroment to indirectly bind global macros.

6 years agoRemove empty file.
Chris Hanson [Thu, 1 Feb 2018 07:00:16 +0000 (23:00 -0800)]
Remove empty file.

6 years agoAdd bindings for the block-declaration renames.
Chris Hanson [Tue, 30 Jan 2018 06:54:14 +0000 (22:54 -0800)]
Add bindings for the block-declaration renames.

6 years agoChange declaration processing to decouple it from open blocks.
Chris Hanson [Tue, 30 Jan 2018 06:32:09 +0000 (22:32 -0800)]
Change declaration processing to decouple it from open blocks.

6 years agoRename block-declaration -> scode-block-declaration and move to "scode".
Chris Hanson [Tue, 30 Jan 2018 05:43:28 +0000 (21:43 -0800)]
Rename block-declaration -> scode-block-declaration and move to "scode".

6 years agoChange seq-item to flatten its arguments.
Chris Hanson [Tue, 30 Jan 2018 05:32:43 +0000 (21:32 -0800)]
Change seq-item to flatten its arguments.

Also rename flatten-seq-items to flatten-items.

6 years agoA large number of renames for syntax items.
Chris Hanson [Tue, 30 Jan 2018 05:08:54 +0000 (21:08 -0800)]
A large number of renames for syntax items.

6 years agoEliminate unnecessary condition.
Chris Hanson [Tue, 30 Jan 2018 04:22:56 +0000 (20:22 -0800)]
Eliminate unnecessary condition.

6 years agoDon't use binding-item for LET bindings.
Chris Hanson [Tue, 30 Jan 2018 03:24:31 +0000 (19:24 -0800)]
Don't use binding-item for LET bindings.

6 years agoChange syntactic environments to be records rather than bundles.
Chris Hanson [Mon, 29 Jan 2018 00:47:37 +0000 (16:47 -0800)]
Change syntactic environments to be records rather than bundles.

It's not using the bundle functionality so there's no advantage.

6 years agoChange define-bundle-interface to use quote-identifier.
Chris Hanson [Mon, 29 Jan 2018 00:47:12 +0000 (16:47 -0800)]
Change define-bundle-interface to use quote-identifier.

6 years agoImplement quote-identifier, which is needed for macro-generating macros.
Chris Hanson [Sun, 28 Jan 2018 23:36:17 +0000 (15:36 -0800)]
Implement quote-identifier, which is needed for macro-generating macros.

I'm not entirely happy with this; it feels like a wart.  But I don't see an
alternative at the moment.

6 years agoRename combinator-substitution -> list-substitution.
Chris Hanson [Sun, 28 Jan 2018 22:50:33 +0000 (14:50 -0800)]
Rename combinator-substitution -> list-substitution.

6 years agoFix but: top-level definition names must be symbols.
Chris Hanson [Sun, 28 Jan 2018 01:18:11 +0000 (17:18 -0800)]
Fix but: top-level definition names must be symbols.

6 years agoDisallow runtime environments in make-syntactic-environment.
Chris Hanson [Sat, 27 Jan 2018 05:42:35 +0000 (21:42 -0800)]
Disallow runtime environments in make-syntactic-environment.

6 years agoSimplify the rename-db implementation.
Chris Hanson [Sat, 27 Jan 2018 05:09:40 +0000 (21:09 -0800)]
Simplify the rename-db implementation.

6 years agoEliminate synthetic identifiers.
Chris Hanson [Sat, 27 Jan 2018 04:36:16 +0000 (20:36 -0800)]
Eliminate synthetic identifiers.

Now identifiers are either symbols or closures over symbols.  Any operation on a
closed identifier redirects to the appropriate environment, rather than trying
to bind and/or lookup the closure itself in the environment.

This greatly simplifies the identifier model, and makes the operation of the
syntax processor much clearer.

6 years agoChange compile-item/expression to be a predicate dispatcher.
Chris Hanson [Fri, 26 Jan 2018 07:14:31 +0000 (23:14 -0800)]
Change compile-item/expression to be a predicate dispatcher.

Also, a bunch of small changes, mostly cleanups and simplification.

6 years agoSimplify interface to syntax renaming.
Chris Hanson [Fri, 26 Jan 2018 06:16:26 +0000 (22:16 -0800)]
Simplify interface to syntax renaming.

6 years agoReorganize the code within syntax-rename. No other changes.
Chris Hanson [Fri, 26 Jan 2018 06:11:02 +0000 (22:11 -0800)]
Reorganize the code within syntax-rename.  No other changes.

6 years agoSplit renaming mechanism out of syntax-output.
Chris Hanson [Fri, 26 Jan 2018 06:06:00 +0000 (22:06 -0800)]
Split renaming mechanism out of syntax-output.

6 years agoEliminate open-block-components and rename other procedures to include "scode".
Chris Hanson [Fri, 26 Jan 2018 05:52:16 +0000 (21:52 -0800)]
Eliminate open-block-components and rename other procedures to include "scode".

6 years agoRefactor the syntax-output codewalkers to use predicate dispatchers.
Chris Hanson [Fri, 26 Jan 2018 04:56:45 +0000 (20:56 -0800)]
Refactor the syntax-output codewalkers to use predicate dispatchers.

6 years agoMake sure the open-block tag is computed correctly.
Chris Hanson [Fri, 26 Jan 2018 04:32:11 +0000 (20:32 -0800)]
Make sure the open-block tag is computed correctly.

6 years agoUse keyword syntactic environment to implement keywords.
Chris Hanson [Fri, 26 Jan 2018 04:07:40 +0000 (20:07 -0800)]
Use keyword syntactic environment to implement keywords.

6 years agoIntroduce syntactic-environment/reserve to handle common case.
Chris Hanson [Fri, 26 Jan 2018 04:05:28 +0000 (20:05 -0800)]
Introduce syntactic-environment/reserve to handle common case.

This also means that syntactic-environment/define is only used for keyword
items.

6 years agoRename accessors for syntactic closures.
Chris Hanson [Fri, 26 Jan 2018 03:57:18 +0000 (19:57 -0800)]
Rename accessors for syntactic closures.

6 years agoMake sure that scode object tags are correctly computed.
Chris Hanson [Fri, 26 Jan 2018 03:52:19 +0000 (19:52 -0800)]
Make sure that scode object tags are correctly computed.

6 years agoAdd missing rename to host-adapter. Thanks Joe Marshall for another catch.
Chris Hanson [Thu, 25 Jan 2018 21:57:51 +0000 (13:57 -0800)]
Add missing rename to host-adapter. Thanks Joe Marshall for another catch.

6 years agoGreatly simplify SCode abstraction and change names to contain "scode".
Chris Hanson [Wed, 24 Jan 2018 08:07:59 +0000 (00:07 -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.

6 years agoEliminate unused import from compiler C backend.
Chris Hanson [Tue, 23 Jan 2018 08:13:22 +0000 (00:13 -0800)]
Eliminate unused import from compiler C backend.

6 years agoRename file "ustring" to "string" and update package name too.
Chris Hanson [Tue, 23 Jan 2018 08:11:39 +0000 (00:11 -0800)]
Rename file "ustring" to "string" and update package name too.

6 years agoLarge number of file renames.
Chris Hanson [Tue, 23 Jan 2018 08:06:06 +0000 (00:06 -0800)]
Large number of file renames.

Also deletes a few unused files.

6 years agoMerge gensym into symbol and add mutex for its counter.
Chris Hanson [Tue, 23 Jan 2018 06:43:03 +0000 (22:43 -0800)]
Merge gensym into symbol and add mutex for its counter.

6 years agoDon't use vertical brackets when unparsing uninterned symbol.
Chris Hanson [Tue, 23 Jan 2018 06:42:09 +0000 (22:42 -0800)]
Don't use vertical brackets when unparsing uninterned symbol.

6 years agoMove fixart and thread-low to earlier in the cold load.
Chris Hanson [Tue, 23 Jan 2018 06:40:58 +0000 (22:40 -0800)]
Move fixart and thread-low to earlier in the cold load.

6 years agoEliminate long-obsolete starbase support.
Chris Hanson [Tue, 23 Jan 2018 02:33:59 +0000 (18:33 -0800)]
Eliminate long-obsolete starbase support.

6 years agoAdd a few missing subdirs into Tags.sh computation.
Chris Hanson [Tue, 23 Jan 2018 02:32:44 +0000 (18:32 -0800)]
Add a few missing subdirs into Tags.sh computation.

6 years agoRewrite syntax-environment to use bundles.
Chris Hanson [Mon, 22 Jan 2018 03:16:56 +0000 (19:16 -0800)]
Rewrite syntax-environment to use bundles.

6 years agoAllow bare symbols as elements in bundle-interface specification.
Chris Hanson [Mon, 22 Jan 2018 01:06:03 +0000 (17:06 -0800)]
Allow bare symbols as elements in bundle-interface specification.

6 years agoFix bug: bundle-interface predicates can't use dispatch-tag<= during cold load.
Chris Hanson [Sun, 21 Jan 2018 23:56:03 +0000 (15:56 -0800)]
Fix bug: bundle-interface predicates can't use dispatch-tag<= during cold load.

I don't think they need to do this anyway, since inheritance isn't part of this
design.

6 years agoPush yet more predicate machinery into boot.
Chris Hanson [Sun, 21 Jan 2018 23:40:16 +0000 (15:40 -0800)]
Push yet more predicate machinery into boot.

6 years agoRename value-binder to variable-binder.
Chris Hanson [Sun, 21 Jan 2018 22:04:17 +0000 (14:04 -0800)]
Rename value-binder to variable-binder.

6 years agoMove bundle implementation to early in the cold load.
Chris Hanson [Sun, 21 Jan 2018 22:01:03 +0000 (14:01 -0800)]
Move bundle implementation to early in the cold load.

6 years agoAdd unparser for variable items.
Chris Hanson [Sun, 21 Jan 2018 21:27:16 +0000 (13:27 -0800)]
Add unparser for variable items.

6 years agoAvoid shift of negative, which is undefined in C.
Taylor R Campbell [Sun, 21 Jan 2018 15:52:51 +0000 (15:52 +0000)]
Avoid shift of negative, which is undefined in C.

6 years agoEliminate unnecessary implementation note.
Chris Hanson [Sun, 21 Jan 2018 09:30:29 +0000 (01:30 -0800)]
Eliminate unnecessary implementation note.

I may change the implementation in the near future.

6 years agoDefer enabling runtime handling of errors until end of cold load.
Chris Hanson [Sun, 21 Jan 2018 09:28:41 +0000 (01:28 -0800)]
Defer enabling runtime handling of errors until end of cold load.

Otherwise, once the error system is initialized, a subsequent cold-load error
causes an infinite loop.  At least this way there's some information about what
went wrong.

6 years agoFix typo reported by jmarshall.
Chris Hanson [Sat, 20 Jan 2018 21:01:00 +0000 (13:01 -0800)]
Fix typo reported by jmarshall.

6 years agoTweak bundle index lookup; fix bundle tests.
Chris Hanson [Sat, 20 Jan 2018 05:36:13 +0000 (21:36 -0800)]
Tweak bundle index lookup; fix bundle tests.

6 years agoRefactor the bundle implementation.
Chris Hanson [Sat, 20 Jan 2018 05:23:08 +0000 (21:23 -0800)]
Refactor the bundle implementation.

* The interface is now the predicate rather than the tag.
* New procedures bundle-constructor and bundle-accessor.
* define-bundle-interface generates a BOA constructor and uses it.

6 years agoRewrite define-like and let-like syntax for simplicity.
Chris Hanson [Sat, 20 Jan 2018 04:01:56 +0000 (20:01 -0800)]
Rewrite define-like and let-like syntax for simplicity.

6 years agoTwo small simplifications.
Chris Hanson [Sat, 20 Jan 2018 04:01:40 +0000 (20:01 -0800)]
Two small simplifications.

6 years agoEliminate null-binding-item.
Chris Hanson [Sat, 20 Jan 2018 04:01:25 +0000 (20:01 -0800)]
Eliminate null-binding-item.

6 years agoFix bug: Can't call output/sequence with an empty list.
Chris Hanson [Sat, 20 Jan 2018 04:00:52 +0000 (20:00 -0800)]
Fix bug: Can't call output/sequence with an empty list.

6 years agoRewrite define-bundle-interface to do renaming manually.
Chris Hanson [Sat, 20 Jan 2018 03:58:48 +0000 (19:58 -0800)]
Rewrite define-bundle-interface to do renaming manually.

Automatic renamer was clumsy and error-prone.

6 years agoFix bug: trace was depending on a string being mutable when it wasn't.
Chris Hanson [Sat, 20 Jan 2018 03:58:07 +0000 (19:58 -0800)]
Fix bug: trace was depending on a string being mutable when it wasn't.

6 years agoBe a little more honest about unsyntaxing macro definitions.
Chris Hanson [Fri, 19 Jan 2018 04:58:14 +0000 (20:58 -0800)]
Be a little more honest about unsyntaxing macro definitions.

6 years agoRefactor bundle interfaces to be dispatch tags.
Chris Hanson [Fri, 19 Jan 2018 02:26:32 +0000 (18:26 -0800)]
Refactor bundle interfaces to be dispatch tags.

Also add some unit tests.

6 years agoFix bug in macro expansion for define-bundle-interface.
Chris Hanson [Fri, 19 Jan 2018 02:25:54 +0000 (18:25 -0800)]
Fix bug in macro expansion for define-bundle-interface.

6 years agoAdd extra tests to make sure that tagging dispatches right.
Chris Hanson [Thu, 18 Jan 2018 05:14:03 +0000 (21:14 -0800)]
Add extra tests to make sure that tagging dispatches right.

6 years agoMerge predicate-metadata and predicate-lattice into predicate.
Chris Hanson [Thu, 18 Jan 2018 05:10:40 +0000 (21:10 -0800)]
Merge predicate-metadata and predicate-lattice into predicate.

6 years agoAdd Tags.sh to tests directory.
Chris Hanson [Thu, 18 Jan 2018 05:05:45 +0000 (21:05 -0800)]
Add Tags.sh to tests directory.

6 years agoMove set-{dispatch-tag,predicate}<=! into boot for use in cold load.
Chris Hanson [Thu, 18 Jan 2018 04:38:24 +0000 (20:38 -0800)]
Move set-{dispatch-tag,predicate}<=! into boot for use in cold load.

6 years agoEliminate remaining differences between record tags and types.
Chris Hanson [Thu, 18 Jan 2018 04:20:52 +0000 (20:20 -0800)]
Eliminate remaining differences between record tags and types.

Also simplify internals of record a bit as a consequence.

6 years agoStrip angle brackets off of dispatch-tag names when printing.
Chris Hanson [Thu, 18 Jan 2018 04:04:21 +0000 (20:04 -0800)]
Strip angle brackets off of dispatch-tag names when printing.

6 years agoChange strip-angle-brackets to work on symbols too.
Chris Hanson [Thu, 18 Jan 2018 04:02:06 +0000 (20:02 -0800)]
Change strip-angle-brackets to work on symbols too.

6 years agoReplace record-type with the associated dispatch tag.
Chris Hanson [Thu, 18 Jan 2018 03:52:07 +0000 (19:52 -0800)]
Replace record-type with the associated dispatch tag.

6 years agoAdd EXPRESSION clauses to boolean assertions in test-parametric-predicate.
Chris Hanson [Thu, 18 Jan 2018 03:38:00 +0000 (19:38 -0800)]
Add EXPRESSION clauses to boolean assertions in test-parametric-predicate.

Otherwise it's too hard to figure out what went wrong.

6 years agoFix typo in earlier refactor.
Chris Hanson [Thu, 18 Jan 2018 03:37:46 +0000 (19:37 -0800)]
Fix typo in earlier refactor.

6 years agoRename "tag" to "dispatch-tag" and move bindings to global env.
Chris Hanson [Thu, 18 Jan 2018 02:02:58 +0000 (18:02 -0800)]
Rename "tag" to "dispatch-tag" and move bindings to global env.

This name is at least somewhat specific, so it should be OK in global.

6 years agoMerge dispatch-tags and tags into a single implementation.
Chris Hanson [Wed, 17 Jan 2018 06:40:36 +0000 (22:40 -0800)]
Merge dispatch-tags and tags into a single implementation.

6 years agoFix bug: forgot to initialize record conditions.
Chris Hanson [Wed, 17 Jan 2018 05:17:15 +0000 (21:17 -0800)]
Fix bug: forgot to initialize record conditions.

6 years agoChange tag representation so extra field is always a vector.
Chris Hanson [Tue, 16 Jan 2018 06:48:18 +0000 (22:48 -0800)]
Change tag representation so extra field is always a vector.

The original reason for using records in that field is no longer relevant now
that we have metatags to identify the tag type.

6 years agoRefactor tag implementation to use "metatags".
Chris Hanson [Tue, 16 Jan 2018 06:40:57 +0000 (22:40 -0800)]
Refactor tag implementation to use "metatags".

This allows predicate dispatch to differentiate between different kinds of
tags.  Otherwise all tags look the same, even if they are functionally
different.

Of course now it's not possible to differentiate between metatags, because they
all of the same tag; but that shouldn't be a problem.

6 years agoFix bug: record-type-type-tag was missing a tag.
Chris Hanson [Tue, 16 Jan 2018 06:07:58 +0000 (22:07 -0800)]
Fix bug: record-type-type-tag was missing a tag.

6 years agoMove weak sets from predicate-metadata to boot.
Chris Hanson [Tue, 16 Jan 2018 04:24:48 +0000 (20:24 -0800)]
Move weak sets from predicate-metadata to boot.

Also flesh out slightly for future use.

6 years agoEliminate predicate-description.
Chris Hanson [Tue, 16 Jan 2018 04:12:20 +0000 (20:12 -0800)]
Eliminate predicate-description.

6 years agoPut guarantee and friends into "boot" for cold-load access.
Chris Hanson [Tue, 16 Jan 2018 04:05:18 +0000 (20:05 -0800)]
Put guarantee and friends into "boot" for cold-load access.

6 years agoImplement simple weak sets.
Chris Hanson [Tue, 16 Jan 2018 04:02:20 +0000 (20:02 -0800)]
Implement simple weak sets.

6 years agoblowfish: Doco typo.
Matt Birkholz [Mon, 15 Jan 2018 17:38:52 +0000 (10:38 -0700)]
blowfish: Doco typo.

6 years agogdbm: Doco typos.
Matt Birkholz [Mon, 15 Jan 2018 17:36:56 +0000 (10:36 -0700)]
gdbm: Doco typos.

6 years agoffi: Missing alienate_float_environment causes foreigners to SIGFPE.
Matt Birkholz [Mon, 15 Jan 2018 17:27:01 +0000 (10:27 -0700)]
ffi: Missing alienate_float_environment causes foreigners to SIGFPE.

6 years agoRefactor handling of explicit tag supersets.
Chris Hanson [Sun, 14 Jan 2018 04:16:52 +0000 (20:16 -0800)]
Refactor handling of explicit tag supersets.

Was hash table, now is weak list.

6 years agoImplement weak-pair procedures as primitives and open-code them.
Chris Hanson [Sun, 14 Jan 2018 03:32:53 +0000 (19:32 -0800)]
Implement weak-pair procedures as primitives and open-code them.

Also put the primitives in "boot" so they are available early.

6 years agoEliminate tagging strategies altogether.
Chris Hanson [Sat, 13 Jan 2018 21:30:07 +0000 (13:30 -0800)]
Eliminate tagging strategies altogether.

The structure of the tagged data belongs outside of the core code.

6 years agoFix test: was depending on tagging strategy to differentiate datum tests.
Chris Hanson [Sat, 13 Jan 2018 21:29:13 +0000 (13:29 -0800)]
Fix test: was depending on tagging strategy to differentiate datum tests.

6 years agoFix bug: two copies of unicode-char? were causing confusion.
Chris Hanson [Sat, 13 Jan 2018 21:07:38 +0000 (13:07 -0800)]
Fix bug: two copies of unicode-char? were causing confusion.

6 years agoAdd "assertion number" to failure reports.
Chris Hanson [Sat, 13 Jan 2018 21:06:23 +0000 (13:06 -0800)]
Add "assertion number" to failure reports.

This is clumsy but better than nothing.

6 years agoEliminate tagged-object-{tag,datum} since they're identical to the % ones.
Chris Hanson [Sat, 13 Jan 2018 19:13:38 +0000 (11:13 -0800)]
Eliminate tagged-object-{tag,datum} since they're identical to the % ones.

6 years agoDo stupid macrology to work around lack of vector-ish open coding.
Chris Hanson [Sat, 13 Jan 2018 07:16:13 +0000 (23:16 -0800)]
Do stupid macrology to work around lack of vector-ish open coding.

6 years agoFix open-coding of default-object?.
Chris Hanson [Sat, 13 Jan 2018 06:28:54 +0000 (22:28 -0800)]
Fix open-coding of default-object?.

Not sure why this makes any difference, but it seems to.

6 years agoFix bug in compilation of %record with 0 or 1 arguments.
Chris Hanson [Sat, 13 Jan 2018 05:44:59 +0000 (21:44 -0800)]
Fix bug in compilation of %record with 0 or 1 arguments.

6 years agoImplement tagged-object primitives and open-code them in compiler.
Chris Hanson [Sat, 13 Jan 2018 05:03:03 +0000 (21:03 -0800)]
Implement tagged-object primitives and open-code them in compiler.

Also push record and tagged-object primitives into "boot" so they are available
early in the cold load.

6 years agoSimplify the story of tagging strategy.
Chris Hanson [Fri, 12 Jan 2018 07:47:18 +0000 (23:47 -0800)]
Simplify the story of tagging strategy.

It's still not quite right, but it is at least somewhat closer.