1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-03-26 08:41:47 -07:00
Commit graph

64 commits

Author SHA1 Message Date
Gareth Rees
f35be3c83e New test case for weak hash tables (doesn't pass yet).
Copied from Perforce
 Change: 180291
 ServerID: perforce.ravenbrook.com
2012-11-02 17:35:39 +00:00
Gareth Rees
ec1375852d Refactor test code now that we can load it.
Copied from Perforce
 Change: 180290
 ServerID: perforce.ravenbrook.com
2012-11-02 17:35:05 +00:00
Gareth Rees
d4fbbdfb6d Merge scheme.c changes (load, eqv) into scheme-advanced.c.
Improve weak hash table interface.
Fix a couple of bugs in handling of dependent objects.

Copied from Perforce
 Change: 180289
 ServerID: perforce.ravenbrook.com
2012-11-02 17:34:49 +00:00
Gareth Rees
73f266ef56 Integrate load from scheme-malloc.c.
Copied from Perforce
 Change: 180288
 ServerID: perforce.ravenbrook.com
2012-11-02 16:40:22 +00:00
Gareth Rees
fb09e1a364 Implement load.
Copied from Perforce
 Change: 180287
 ServerID: perforce.ravenbrook.com
2012-11-02 16:38:44 +00:00
Gareth Rees
0756e9d42a Integrate eq-hash and eqv-hash from scheme-malloc.c.
Copied from Perforce
 Change: 180285
 ServerID: perforce.ravenbrook.com
2012-11-02 16:04:06 +00:00
Gareth Rees
ef98f2a9c6 Support more kinds of hashtable via make-hashtable.
Fix bug in eqv (character objects now test equal if they represent the same character).

Copied from Perforce
 Change: 180284
 ServerID: perforce.ravenbrook.com
2012-11-02 16:02:05 +00:00
Gareth Rees
4922259f66 Integrate string=?, make-eqv-hashtable, and make-hashtable.
Copied from Perforce
 Change: 180283
 ServerID: perforce.ravenbrook.com
2012-11-02 15:54:41 +00:00
Gareth Rees
05dacb91bb Integrate string=?, make-eqv-hashtable, make-hashtable from scheme-malloc.c.
Copied from Perforce
 Change: 180282
 ServerID: perforce.ravenbrook.com
2012-11-02 15:43:07 +00:00
Gareth Rees
d984d32588 New constructor make_bool avoids boilerplate.
Hash function takes a length so that it (1) it can support strings containing NULs; (2) it doesn't have to check for NULs so runs a bit faster; and (3) it performs OK on addresses (which often contain zero bytes).
Hash tables have hash and comparison functions.
Implement string=?, make-eqv-hashtable and make-hashtable.

Copied from Perforce
 Change: 180281
 ServerID: perforce.ravenbrook.com
2012-11-02 15:39:19 +00:00
Gareth Rees
979961ecd7 Fix the dependent object.
Copied from Perforce
 Change: 180279
 ServerID: perforce.ravenbrook.com
2012-11-02 14:25:09 +00:00
Gareth Rees
64b873a2bc New test case for leaf objects.
Copied from Perforce
 Change: 180276
 ServerID: perforce.ravenbrook.com
2012-11-02 13:40:20 +00:00
Gareth Rees
90e19d01b9 Merge change from scheme.c (implementation apply).
Share generation chain between pools.
No need for leaf_fmt at the moment.

Copied from Perforce
 Change: 180275
 ServerID: perforce.ravenbrook.com
2012-11-02 13:40:08 +00:00
Gareth Rees
9d47c8fd46 Integrate apply from scheme-malloc.c.
Copied from Perforce
 Change: 180270
 ServerID: perforce.ravenbrook.com
2012-11-02 12:45:22 +00:00
Gareth Rees
74494e0a38 Implement apply.
Copied from Perforce
 Change: 180269
 ServerID: perforce.ravenbrook.com
2012-11-02 12:44:20 +00:00
Gareth Rees
10b15a188c Integrate references to documentation.
Copied from Perforce
 Change: 180258
 ServerID: perforce.ravenbrook.com
2012-11-02 11:58:38 +00:00
Gareth Rees
42755dedcc Add references to documentation.
Copied from Perforce
 Change: 180256
 ServerID: perforce.ravenbrook.com
2012-11-02 11:57:16 +00:00
Gareth Rees
ddb4cc823c Merge changes from scheme.c into scheme-advanced.c:
1. Deletion of keys in hash tables.
2. Forwarding of character objects on 64-bit platforms.
3. Fix to hash table probe sequence.
4. Comments in Scheme source.
5. Fix to define (implicit begin).
6. Extend equal? to vectors and strings.
7. Add references to R4RS documentation.
8. Implement list-tail, list-ref, open-output-file, close-input-port, close-output-port, write, write-string, newline, hashtable?, hashtable-size, hashtable-delete!, hashtable-contains?, hashtable-keys.
9. Fix bug (buckets might be scanned before dependent object is set).
10. Non-interactive mode.

Copied from Perforce
 Change: 180255
 ServerID: perforce.ravenbrook.com
2012-11-02 11:50:33 +00:00
Gareth Rees
6c7e10b9aa Integrate changes from scheme-malloc to scheme.
Add test target to Makefile.

Copied from Perforce
 Change: 180253
 ServerID: perforce.ravenbrook.com
2012-11-02 11:19:45 +00:00
Gareth Rees
1c7c0acc5c Make sure that probe sequence visits all buckets in the hash table by (a) ensuring that hash tables are a power of 2 in size; (b) ensuring that the probe step is odd.
Copied from Perforce
 Change: 180252
 ServerID: perforce.ravenbrook.com
2012-11-02 11:16:10 +00:00
Gareth Rees
54da8d4bc3 Chatter only if interactive.
Copied from Perforce
 Change: 180251
 ServerID: perforce.ravenbrook.com
2012-11-02 10:58:29 +00:00
Gareth Rees
efe5998a62 Add non-interactive execution.
Implement list-tail and list-ref.

Copied from Perforce
 Change: 180249
 ServerID: perforce.ravenbrook.com
2012-11-02 10:24:39 +00:00
Gareth Rees
daf132a970 Implement string-hash and correct error messages.
Copied from Perforce
 Change: 180244
 ServerID: perforce.ravenbrook.com
2012-11-01 22:07:33 +00:00
Gareth Rees
4245b9766f Merge changes from scheme-malloc.c to scheme.c.
Copied from Perforce
 Change: 180242
 ServerID: perforce.ravenbrook.com
2012-11-01 19:16:34 +00:00
Gareth Rees
a8a6b4ab5c Segregate leaf objects into an amcz pool.
Copied from Perforce
 Change: 180240
 ServerID: perforce.ravenbrook.com
2012-11-01 18:14:41 +00:00
Gareth Rees
f8d48677d0 Fix bug in "define": no implied "begin" around function body.
Implement open-output-file, close-input-port, close-output-port, write, write-string, and newline.
Add Scheme test cases.

Copied from Perforce
 Change: 180238
 ServerID: perforce.ravenbrook.com
2012-11-01 18:05:34 +00:00
Gareth Rees
768d4870bb Merge new hashtable stuff from scheme-malloc.c.
Fix bug in scheme.c (characters were only 8 bytes on 64-bit platforms, so can't be forwarded).

Copied from Perforce
 Change: 180231
 ServerID: perforce.ravenbrook.com
2012-11-01 15:37:43 +00:00
Gareth Rees
9f43a0a241 Add more hashtable features, including deletion (which we'll need for weak hashtables).
Copied from Perforce
 Change: 180225
 ServerID: perforce.ravenbrook.com
2012-11-01 14:37:45 +00:00
Gareth Rees
8cdceed6da Try segregating leaf objects.
Copied from Perforce
 Change: 180209
 ServerID: perforce.ravenbrook.com
2012-10-31 22:52:39 +00:00
Gareth Rees
37c725f76b Weak hash tables in scheme-advanced.c.
Copied from Perforce
 Change: 180208
 ServerID: perforce.ravenbrook.com
2012-10-31 22:13:46 +00:00
Gareth Rees
38a47fdecd Branch scheme.c to scheme-advanced.c.
Copied from Perforce
 Change: 180204
 ServerID: perforce.ravenbrook.com
2012-10-31 19:10:58 +00:00
Gareth Rees
07782b09d6 Move old scheme to example/scheme/scheme-malloc.c
Provide instructions to build it.

Copied from Perforce
 Change: 180185
 ServerID: perforce.ravenbrook.com
2012-10-31 12:02:11 +00:00
Gareth Rees
57846b3f16 Improve the scheme example hashtable implementation:
1. Follow R6RS for naming of functions and arguments.
2. Grow the hashtable when half full.

Copied from Perforce
 Change: 180184
 ServerID: perforce.ravenbrook.com
2012-10-31 11:54:25 +00:00
Gareth Rees
ba1c150cba Put explanations of the location dependency code into scheme.c. also, add lots of cross-references to the manual.
Copied from Perforce
 Change: 180121
 ServerID: perforce.ravenbrook.com
2012-10-28 19:13:56 +00:00
Gareth Rees
5828766a9a Simplify scheme hash table implementation by folding the hash into buckets_find.
Copied from Perforce
 Change: 180086
 ServerID: perforce.ravenbrook.com
2012-10-25 21:18:40 +01:00
Gareth Rees
6f00a2f8bd Write location chapter.
Copied from Perforce
 Change: 180080
 ServerID: perforce.ravenbrook.com
2012-10-25 17:58:49 +01:00
Gareth Rees
c41b4d2761 Simple address-based (eq?) hash table implementation without location dependency.
Copied from Perforce
 Change: 180079
 ServerID: perforce.ravenbrook.com
2012-10-25 16:03:35 +01:00
Gareth Rees
1603f60954 (gc) takes no arguments, so check this.
Copied from Perforce
 Change: 180075
 ServerID: perforce.ravenbrook.com
2012-10-25 14:03:07 +01:00
Gareth Rees
f7cf9e366c Be clear about the need to reserve lots of address space in a virtual memory arena.
Copied from Perforce
 Change: 180071
 ServerID: perforce.ravenbrook.com
2012-10-25 11:34:45 +01:00
Gareth Rees
6675558167 Complete actions from meeting with rb.
Copied from Perforce
 Change: 180056
 ServerID: perforce.ravenbrook.com
2012-10-24 16:25:19 +01:00
Gareth Rees
399c0253c1 R4rs is the "one true scheme" according to rb, so refer to that.
Copied from Perforce
 Change: 180033
 ServerID: perforce.ravenbrook.com
2012-10-23 17:35:51 +01:00
Gareth Rees
bbfd48355f Give correct reference for open-input-file (it's in the standard library, not the language).
Remove string-set! (was removed in R6RS).

Copied from Perforce
 Change: 180019
 ServerID: perforce.ravenbrook.com
2012-10-22 23:09:37 +01:00
Gareth Rees
3e9ad7ed80 Enable finalization messages.
Rename entry_open_in to entry_open_input for consistency.
Add comments with specification from R6RS.

Copied from Perforce
 Change: 180008
 ServerID: perforce.ravenbrook.com
2012-10-22 15:54:20 +01:00
Gareth Rees
e18c4fda16 Fix bug in append when the first argument is nil.
Copied from Perforce
 Change: 180004
 ServerID: perforce.ravenbrook.com
2012-10-22 12:54:35 +01:00
Gareth Rees
640765f1d7 Implement procedure?, char?, char->integer, integer->char, string->list, and list->string.
Copied from Perforce
 Change: 179991
 ServerID: perforce.ravenbrook.com
2012-10-21 20:38:27 +01:00
Gareth Rees
750a1a4c28 Implement some string procedures: string?, make-string, string, string-length, string-ref, string-set!, substring, string-append, string-copy.
Copied from Perforce
 Change: 179990
 ServerID: perforce.ravenbrook.com
2012-10-21 19:59:47 +01:00
Gareth Rees
65f88af86c Propagate changes from scheme-after.c to scheme.c; the former is no longer needed.
Convert license.txt and built.txt to reStructuredText and include them directly in the manual.

Copied from Perforce
 Change: 179957
 ServerID: perforce.ravenbrook.com
2012-10-19 11:26:25 +01:00
Gareth Rees
9b5960fbd0 Make sure that errors can be reported during initialization.
Fix cross-reference (now "start", not "main").

Copied from Perforce
 Change: 179902
 ServerID: perforce.ravenbrook.com
2012-10-16 16:22:45 +01:00
Gareth Rees
fa54a2706f Fix url.
Copied from Perforce
 Change: 179896
 ServerID: perforce.ravenbrook.com
2012-10-16 12:17:19 +01:00
Richard Brooksby
d8902d2237 Improving the start-up message on the scheme example as suggested by gdr.
Copied from Perforce
 Change: 179576
 ServerID: perforce.ravenbrook.com
2012-09-20 08:56:00 +01:00