Gareth Rees
2b313decf1
Catch-up merge from master sources @186519 to branch/2014-05-17/chunk-tree.
...
Copied from Perforce
Change: 186520
ServerID: perforce.ravenbrook.com
2014-06-12 11:43:56 +01:00
Gareth Rees
6e72fe4da3
Synchronize stdout and stderr (for the benefit of windows).
...
Copied from Perforce
Change: 186519
ServerID: perforce.ravenbrook.com
2014-06-12 11:37:50 +01:00
Gareth Rees
e93033f289
Must fflush stderr too--it's buffered on windows!
...
Copied from Perforce
Change: 186517
ServerID: perforce.ravenbrook.com
2014-06-12 11:28:41 +01:00
Gareth Rees
e79e0ee1dd
Need to synchronize stdout and stdin for the benefit of windows.
...
Copied from Perforce
Change: 186516
ServerID: perforce.ravenbrook.com
2014-06-12 11:22:55 +01:00
Gareth Rees
4dc70cba7c
All versions of the scheme interpreter now take multiple files on the command line.
...
Integrate change 186243 to scheme-{advanced,malloc,boehm}.c.
Copied from Perforce
Change: 186244
ServerID: perforce.ravenbrook.com
2014-05-22 13:16:29 +01:00
Gareth Rees
a066764cc8
Add -m command-line option to the scheme example so that we can test it with different initial arena sizes.
...
Copied from Perforce
Change: 186243
ServerID: perforce.ravenbrook.com
2014-05-22 13:05:40 +01:00
Gareth Rees
f025b00534
Turn on -wunreachable-code for gcc and clang.
...
Remove unreachable code:
* No need to have different debug options or structured allocation classes for different platforms.
* Don't use STATISTIC_BEGIN, use STATISTIC_STAT.
* #ifdef away the unused code in zmess.c for testing ControlAlloc failure.
* Remove unused code from the example Scheme interpreter.
Copied from Perforce
Change: 185089
ServerID: perforce.ravenbrook.com
2014-03-30 14:26:02 +01:00
Gareth Rees
6971bee496
Make mps_args_done obsolete.
...
Copied from Perforce
Change: 184543
ServerID: perforce.ravenbrook.com
2014-02-26 12:47:27 +00:00
Gareth Rees
426561a8b3
Avoid "discard qualifiers" error from xcode.
...
Copied from Perforce
Change: 184401
ServerID: perforce.ravenbrook.com
2014-02-20 14:45:10 +00:00
Gareth Rees
b9b8bdd231
Avoid warnings from xcode when compiling scheme.c.
...
Copied from Perforce
Change: 184399
ServerID: perforce.ravenbrook.com
2014-02-20 14:38:53 +00:00
Richard Brooksby
59808b800d
Adding const qualifier to various strings as required by xcode.
...
Copied from Perforce
Change: 184105
ServerID: perforce.ravenbrook.com
2014-01-24 15:07:33 +00:00
Gareth Rees
dd7a13e5cb
Rename align_up and align macros in the scheme example as align_word and align_obj respectively.
...
Copied from Perforce
Change: 183392
ServerID: perforce.ravenbrook.com
2013-09-05 08:15:56 +01:00
Gareth Rees
2cf1861e8d
Improvements to clarity of weak hash table implementation:
...
* TAG_SIZE was changed to TAG_COUNT in the code, so make the corresponding change in the manual.
* Avoid the "+= 2" hack: use TAG_COUNT(UNTAG_COUNT(...) + 1). Clarity is more important than speed here.
* Use obj_unused for unused hash table entries so that there can be no confusion between NULL meaning "unused" and NULL meaning "splatted by the garbage collector".
* Add references from the example code to the notes.
Copied from Perforce
Change: 182804
ServerID: perforce.ravenbrook.com
2013-06-19 12:59:49 +01:00
Richard Brooksby
e1eaef56c8
Additional merges accidentally left out of changelist 182578. oops.
...
Copied from Perforce
Change: 182580
ServerID: perforce.ravenbrook.com
2013-06-06 15:11:45 +01:00
Richard Brooksby
d14b8bbc81
Merging branch/2013-05-01/keyword-arguments to pick up keyword arguments for object formats.
...
Copied from Perforce
Change: 182562
ServerID: perforce.ravenbrook.com
2013-06-06 12:55:04 +01:00
Gareth Rees
37e3e2dfac
Suppress "variable may be used uninitialized" warnings.
...
Copied from Perforce
Change: 182545
ServerID: perforce.ravenbrook.com
2013-06-05 16:44:35 +01:00
Gareth Rees
aaf6e8b13b
New public function mps_fmt_create_k creates an object format using the keyword argument interface.
...
Deprecate the format variant structures (mps_fmt_A_s, mps_fmt_B_s, mps_fmt_auto_header_s, mps_fmt_fixed_s) and the old interface (mps_fmt_create_A, mps_fmt_create_B, mps_fmt_create_auto_header, mps_fmt_create_fixed).
Copied from Perforce
Change: 182277
ServerID: perforce.ravenbrook.com
2013-05-28 16:10:08 +01:00
Gareth Rees
7972a386c9
Document the way to safely destroy automatically managed pools.
...
Copied from Perforce
Change: 182166
ServerID: perforce.ravenbrook.com
2013-05-24 16:17:51 +01:00
Gareth Rees
56b78ef7b9
Remove mps_arg from mps.h.
...
Use MPS_ARGS_BEGIN etc in the Scheme example and in the manual.
Use MPS_BEGIN and MPS_END instead of BEGIN and END.
The _FIELD macros don't need to be function-like macros.
Restore TODO comments in mps.h.
Scheme example compiles with -std=c89.
Copied from Perforce
Change: 181749
ServerID: perforce.ravenbrook.com
2013-05-13 21:01:38 +01:00
Gareth Rees
cce6ee29c8
New macro mps_arg and revised macro mps_args_add mean that client programs no longer need to know which keyword argument goes in which field. revise documentation accordingly.
...
Copied from Perforce
Change: 181736
ServerID: perforce.ravenbrook.com
2013-05-12 17:21:03 +01:00
Gareth Rees
5c2019e386
Use the new keyword argument interface in the example scheme interpreter.
...
Copied from Perforce
Change: 181724
ServerID: perforce.ravenbrook.com
2013-05-11 19:24:41 +01:00
Gareth Rees
84237a2b79
Clarify comment about why the 'start' function call is necessary.
...
Copied from Perforce
Change: 181452
ServerID: perforce.ravenbrook.com
2013-04-25 20:19:34 +01:00
Gareth Rees
720fe3cc59
Fix typo.
...
Copied from Perforce
Change: 181392
ServerID: perforce.ravenbrook.com
2013-04-15 14:06:32 +01:00
Gareth Rees
0caf9a76f9
Integrate removal of $id$ from scheme-malloc.c to scheme-boehm.c and scheme.c
...
Copied from Perforce
Change: 181166
ServerID: perforce.ravenbrook.com
2013-03-18 15:12:13 +00:00
Richard Brooksby
88ad39840e
Deprecating the mps trampoline by using vectored exception handling on windows.
...
Copied from Perforce
Change: 180961
ServerID: perforce.ravenbrook.com
2013-02-20 12:11:40 +00:00
Richard Brooksby
0ff56c73fd
Fixing typos in comments.
...
Copied from Perforce
Change: 180959
ServerID: perforce.ravenbrook.com
2013-02-19 16:52:44 +00:00
Richard Brooksby
5e26931702
Corrected statement about forwarding objects being used for padding.
...
Copied from Perforce
Change: 180914
ServerID: perforce.ravenbrook.com
2013-02-05 16:17:40 +00:00
Gareth Rees
af8e1aad91
Integrate gcc compatibility from scheme-malloc.c to scheme.c and scheme-boehm.c.
...
Copied from Perforce
Change: 180475
ServerID: perforce.ravenbrook.com
2012-11-15 11:39:08 +00:00
Gareth Rees
323e12294f
Merge documentation changes.
...
Copied from Perforce
Change: 180445
ServerID: perforce.ravenbrook.com
2012-11-11 20:44:19 +00:00
Gareth Rees
717c7e32e4
Merge "do" implementation into scheme-boehm.c and scheme.c.
...
Copied from Perforce
Change: 180442
ServerID: perforce.ravenbrook.com
2012-11-11 19:40:17 +00:00
Gareth Rees
efb6eb325a
Oops, forgot to scan and skip promises!
...
Copied from Perforce
Change: 180415
ServerID: perforce.ravenbrook.com
2012-11-08 15:20:11 +00:00
Gareth Rees
7e08dab17c
Integrate "apply" fix into scheme-boehm.c and scheme.c.
...
Copied from Perforce
Change: 180408
ServerID: perforce.ravenbrook.com
2012-11-08 13:55:43 +00:00
Gareth Rees
675a07679e
Avoid type pun.
...
Copied from Perforce
Change: 180364
ServerID: perforce.ravenbrook.com
2012-11-06 12:16:46 +00:00
Gareth Rees
62ec3013e8
Need to check hash table for staleness when deleting a key.
...
Copied from Perforce
Change: 180354
ServerID: perforce.ravenbrook.com
2012-11-05 23:29:23 +00:00
Gareth Rees
248fc6690b
Fix typo in make_port.
...
Hash tables only depend on the location of keys if they are hashed by address.
Port objects are registered for finalization when created, and definalized when closed.
New function load handles loading a file in both cases (and calls mps_chat to ensure finalization).
Avoid calling fclose multiple times on a file handle.
Merge main loop improvements from scheme-malloc.c.
Copied from Perforce
Change: 180301
ServerID: perforce.ravenbrook.com
2012-11-03 17:30:25 +00:00
Gareth Rees
0130b9fe05
Integrate quasiquote improvements.
...
Copied from Perforce
Change: 180296
ServerID: perforce.ravenbrook.com
2012-11-02 22:39:26 +00:00
Gareth Rees
d18dd95c1f
Integrate error implementation from scheme-malloc.c.
...
Copied from Perforce
Change: 180293
ServerID: perforce.ravenbrook.com
2012-11-02 19:12:58 +00:00
Gareth Rees
186cafaa5c
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
7bca0dfad5
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
1b5fffe0dc
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
aaf7920007
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
045c45a18c
Add references to documentation.
...
Copied from Perforce
Change: 180256
ServerID: perforce.ravenbrook.com
2012-11-02 11:57:16 +00:00
Gareth Rees
0d17ceb416
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
d3d7372e88
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
f9acc18caa
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
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
d894dd466a
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
6f01e17f9f
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
d4e3e73d9f
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
300a183b5b
Write location chapter.
...
Copied from Perforce
Change: 180080
ServerID: perforce.ravenbrook.com
2012-10-25 17:58:49 +01:00