Gareth Rees
44b734b3a0
Separate the interactive and non-interactive loops for clarity.
...
New function "load" loads a file; call this in the non-interactive case.
Fix bug: close file handle after loading (if no error).
Copied from Perforce
Change: 180299
ServerID: perforce.ravenbrook.com
2012-11-03 15:49:59 +00:00
Gareth Rees
fef5178a3a
Improve quasiquote implementation.
...
Copied from Perforce
Change: 180295
ServerID: perforce.ravenbrook.com
2012-11-02 22:38:05 +00:00
Gareth Rees
99d142ffd6
Implement "error".
...
Copied from Perforce
Change: 180292
ServerID: perforce.ravenbrook.com
2012-11-02 19:07:55 +00:00
Gareth Rees
5225f07f06
Implement load.
...
Copied from Perforce
Change: 180287
ServerID: perforce.ravenbrook.com
2012-11-02 16:38:44 +00:00
Gareth Rees
3dcc9800ad
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
700291e07c
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
a33c71a346
Implement apply.
...
Copied from Perforce
Change: 180269
ServerID: perforce.ravenbrook.com
2012-11-02 12:44:20 +00:00
Gareth Rees
e42bab4f76
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
bf1480c169
Chatter only if interactive.
...
Copied from Perforce
Change: 180251
ServerID: perforce.ravenbrook.com
2012-11-02 10:58:29 +00:00
Gareth Rees
879231be2d
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
b68fc45c4a
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
5b50c401c3
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
5e275103ed
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
13af2f01a4
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
5e62407261
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