mit-scheme.git
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.

6 years agoUse macro to speed up implementations of record accessors.
Chris Hanson [Thu, 11 Jan 2018 07:54:03 +0000 (23:54 -0800)]
Use macro to speed up implementations of record accessors.

6 years agoRemove documentation for now-obsolete generic-procedure dispatch.
Chris Hanson [Thu, 11 Jan 2018 07:24:10 +0000 (23:24 -0800)]
Remove documentation for now-obsolete generic-procedure dispatch.

6 years agoSimplify predicate-tagging so that it provides only the essentials.
Chris Hanson [Thu, 11 Jan 2018 07:15:31 +0000 (23:15 -0800)]
Simplify predicate-tagging so that it provides only the essentials.

This too is subject to change.  The tagging strategy idea needs to be revisited
in a larger context since it doesn't account complex structures like records.

6 years agoEliminate record-entity names and support.
Chris Hanson [Thu, 11 Jan 2018 04:03:17 +0000 (20:03 -0800)]
Eliminate record-entity names and support.

6 years agoDelete some unnecessary procedures.
Chris Hanson [Thu, 11 Jan 2018 03:37:47 +0000 (19:37 -0800)]
Delete some unnecessary procedures.

6 years agoTweak dispatch-tag slightly.
Chris Hanson [Thu, 11 Jan 2018 03:19:58 +0000 (19:19 -0800)]
Tweak dispatch-tag slightly.

6 years agoPush definition of register-predicate! to beginning of cold load.
Chris Hanson [Wed, 10 Jan 2018 06:00:39 +0000 (22:00 -0800)]
Push definition of register-predicate! to beginning of cold load.

6 years agoEliminate use of record-specific printing registration.
Chris Hanson [Wed, 10 Jan 2018 05:02:06 +0000 (21:02 -0800)]
Eliminate use of record-specific printing registration.

6 years agoClean up the ad hoc handling of boot-time predicate registrations.
Chris Hanson [Wed, 10 Jan 2018 04:47:55 +0000 (20:47 -0800)]
Clean up the ad hoc handling of boot-time predicate registrations.

6 years agoUse weak hash tables for predicate lattice.
Chris Hanson [Wed, 10 Jan 2018 04:30:12 +0000 (20:30 -0800)]
Use weak hash tables for predicate lattice.

6 years agoEliminate unused (and not fully thought out) unregister-predicate!.
Chris Hanson [Wed, 10 Jan 2018 04:25:25 +0000 (20:25 -0800)]
Eliminate unused (and not fully thought out) unregister-predicate!.

6 years agoFix cold-load initialization so that predicate tag tables are built right.
Chris Hanson [Wed, 10 Jan 2018 04:06:58 +0000 (20:06 -0800)]
Fix cold-load initialization so that predicate tag tables are built right.

6 years agoThanks Joe! Fix thinko in code generation for define-structure.
Chris Hanson [Wed, 10 Jan 2018 04:06:27 +0000 (20:06 -0800)]
Thanks Joe!  Fix thinko in code generation for define-structure.

6 years agoRemove some unused and undocumented record-type accessors.
Chris Hanson [Tue, 9 Jan 2018 04:00:15 +0000 (23:00 -0500)]
Remove some unused and undocumented record-type accessors.

Included are record-type-extension, set-record-type-extension!,
set-record-type-default-inits!, and %set-record-type-default-inits!.

6 years agoMove srfi-1 support to beginning of cold load.
Chris Hanson [Tue, 9 Jan 2018 03:50:17 +0000 (22:50 -0500)]
Move srfi-1 support to beginning of cold load.

6 years agoMinor simplification.
Chris Hanson [Tue, 9 Jan 2018 03:05:52 +0000 (22:05 -0500)]
Minor simplification.

6 years agoMove dispatch-tag print method into gentag.scm.
Chris Hanson [Tue, 9 Jan 2018 03:01:58 +0000 (22:01 -0500)]
Move dispatch-tag print method into gentag.scm.

6 years agoEliminate special support for defstruct printers.
Chris Hanson [Tue, 9 Jan 2018 02:58:48 +0000 (21:58 -0500)]
Eliminate special support for defstruct printers.

In future just use define-unparser-method.

6 years agoSearch for root-level "build" directory when finding STAGE0.
Chris Hanson [Tue, 9 Jan 2018 02:06:30 +0000 (21:06 -0500)]
Search for root-level "build" directory when finding STAGE0.

6 years agoAdd optional argument to specify build directory.
Chris Hanson [Tue, 9 Jan 2018 02:00:30 +0000 (21:00 -0500)]
Add optional argument to specify build directory.

6 years agoImplement simple script to show all of the .crf files.
Chris Hanson [Tue, 9 Jan 2018 01:57:33 +0000 (20:57 -0500)]
Implement simple script to show all of the .crf files.

6 years agoMove all of the generic-procedure support from runtime into sos.
Chris Hanson [Tue, 9 Jan 2018 01:31:07 +0000 (20:31 -0500)]
Move all of the generic-procedure support from runtime into sos.

It's slated to be entirely replaced by predicate dispatchers.

6 years agoIgnore build directory called "build".
Chris Hanson [Mon, 8 Jan 2018 05:00:17 +0000 (00:00 -0500)]
Ignore build directory called "build".

6 years agoMake sure that a record's type name is an immutable string.
Chris Hanson [Sun, 7 Jan 2018 20:36:18 +0000 (15:36 -0500)]
Make sure that a record's type name is an immutable string.

6 years agoImplement string->immutable.
Chris Hanson [Sun, 7 Jan 2018 20:32:33 +0000 (15:32 -0500)]
Implement string->immutable.

6 years agoClean up handling of entities with records as extra.
Chris Hanson [Sun, 7 Jan 2018 20:28:40 +0000 (15:28 -0500)]
Clean up handling of entities with records as extra.

Implement record-entity? and record-entity-predicate.
Also clean up printing support for these.

6 years agoConvert record support to use new predicate dispatchers.
Chris Hanson [Sun, 7 Jan 2018 20:09:33 +0000 (15:09 -0500)]
Convert record support to use new predicate dispatchers.

6 years agoImplement real define-pp-describer.
Chris Hanson [Sun, 7 Jan 2018 19:45:40 +0000 (14:45 -0500)]
Implement real define-pp-describer.

6 years agoImplement real define-unparser-method.
Chris Hanson [Sun, 7 Jan 2018 19:38:44 +0000 (14:38 -0500)]
Implement real define-unparser-method.

6 years agoImplement define-unparser-method and define-pp-describer as deferred actions.
Chris Hanson [Sun, 7 Jan 2018 19:33:02 +0000 (14:33 -0500)]
Implement define-unparser-method and define-pp-describer as deferred actions.

6 years agoChange record to use predicate dispatchers instead of generics.
Chris Hanson [Sun, 7 Jan 2018 05:31:38 +0000 (00:31 -0500)]
Change record to use predicate dispatchers instead of generics.

6 years agoTweak.
Chris Hanson [Sun, 7 Jan 2018 04:48:55 +0000 (23:48 -0500)]
Tweak.

6 years agoChange predicate-dispatcher to be an entity.
Chris Hanson [Sun, 7 Jan 2018 04:36:05 +0000 (23:36 -0500)]
Change predicate-dispatcher to be an entity.

6 years agoFix compiler warning.
Chris Hanson [Sun, 7 Jan 2018 04:35:57 +0000 (23:35 -0500)]
Fix compiler warning.

6 years agoAdd two tests that were missing from known-tests.
Chris Hanson [Sun, 7 Jan 2018 04:35:07 +0000 (23:35 -0500)]
Add two tests that were missing from known-tests.

6 years agoImplement deferred boot actions and use them for the record.scm actions.
Chris Hanson [Sat, 6 Jan 2018 22:47:46 +0000 (17:47 -0500)]
Implement deferred boot actions and use them for the record.scm actions.

6 years agoEstablish an explicit booting? flag that controls boot inits.
Chris Hanson [Sat, 6 Jan 2018 22:45:59 +0000 (17:45 -0500)]
Establish an explicit booting? flag that controls boot inits.

6 years agoChange boot-time deferrals to use variable-setter.
Chris Hanson [Sat, 6 Jan 2018 21:29:19 +0000 (16:29 -0500)]
Change boot-time deferrals to use variable-setter.

6 years agoImplement variable-setter macro.
Chris Hanson [Sat, 6 Jan 2018 21:29:08 +0000 (16:29 -0500)]
Implement variable-setter macro.

6 years agoMust load host-adapter for syntax definitions when compiling.
Chris Hanson [Sat, 6 Jan 2018 21:28:38 +0000 (16:28 -0500)]
Must load host-adapter for syntax definitions when compiling.

6 years agoReorganize boot.scm into logical sections.
Chris Hanson [Sat, 6 Jan 2018 21:05:09 +0000 (16:05 -0500)]
Reorganize boot.scm into logical sections.

In preparation for new support to be added.

6 years agoEliminate less-than-useful comment.
Chris Hanson [Sat, 6 Jan 2018 04:18:50 +0000 (23:18 -0500)]
Eliminate less-than-useful comment.

6 years agoRewrite the bundle machinery to separate interface and predicate.
Chris Hanson [Sat, 6 Jan 2018 02:58:26 +0000 (21:58 -0500)]
Rewrite the bundle machinery to separate interface and predicate.

Change define-bundle-interface to require its definition names to be
spelled out in the definition rather than being constructed by the macro; the
result is much like define-record-type.

Change the bundle lookup to use a binary search rather than a linear search,
which will help when using large bundles.  Although we might want to have a more
flexible search strategy since it's not exposed to the end user.

Add support for pretty-printing bundles similarly to records.

6 years agoFix typo.
Chris Hanson [Sat, 6 Jan 2018 02:58:08 +0000 (21:58 -0500)]
Fix typo.

6 years agoRefactor record implementation to support setting descriptions during boot.
Chris Hanson [Sat, 6 Jan 2018 02:56:47 +0000 (21:56 -0500)]
Refactor record implementation to support setting descriptions during boot.

Also clean up the way boot deferrals are done to make this simpler.

6 years agoReimplement bundle printers to be more like other printers.
Chris Hanson [Fri, 5 Jan 2018 20:19:42 +0000 (15:19 -0500)]
Reimplement bundle printers to be more like other printers.

6 years agoSome name changes and small cleanups.
Chris Hanson [Fri, 5 Jan 2018 07:34:28 +0000 (02:34 -0500)]
Some name changes and small cleanups.

6 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/mit-scheme
Chris Hanson [Fri, 5 Jan 2018 07:12:22 +0000 (02:12 -0500)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/mit-scheme

6 years agoFirst draft of "bundle" support.
Chris Hanson [Fri, 5 Jan 2018 07:11:29 +0000 (02:11 -0500)]
First draft of "bundle" support.

6 years agoAllow set-record-type-entity-unparser-method! to be used during cold load.
Chris Hanson [Fri, 5 Jan 2018 07:10:45 +0000 (02:10 -0500)]
Allow set-record-type-entity-unparser-method! to be used during cold load.

6 years agoFix emacs interface breakage caused by string rewrite.
Chris Hanson [Fri, 5 Jan 2018 07:10:08 +0000 (02:10 -0500)]
Fix emacs interface breakage caused by string rewrite.

6 years agoEliminate non-hygienic-macro-transformer.
Chris Hanson [Tue, 26 Dec 2017 19:03:52 +0000 (14:03 -0500)]
Eliminate non-hygienic-macro-transformer.

6 years agoEliminate unused inerly files.
Chris Hanson [Tue, 26 Dec 2017 06:23:52 +0000 (01:23 -0500)]
Eliminate unused inerly files.

6 years agoEliminate unused and unneeded definition-environment in syntaxer.
Chris Hanson [Tue, 26 Dec 2017 05:09:51 +0000 (00:09 -0500)]
Eliminate unused and unneeded definition-environment in syntaxer.