Richard Brooksby
07987ab579
Eliminating withreservoirpermit and all its variants.
...
Copied from Perforce
Change: 190005
ServerID: perforce.ravenbrook.com
2016-03-13 21:04:01 +00:00
Richard Brooksby
ca7dcd913e
Basic removal of the reservoir pool from code and design.
...
Copied from Perforce
Change: 190000
ServerID: perforce.ravenbrook.com
2016-03-13 20:32:24 +00:00
Richard Brooksby
6a1b956a73
Expanding tabs.
...
Copied from Perforce
Change: 189516
ServerID: perforce.ravenbrook.com
2016-03-02 08:58:45 +00:00
Richard Brooksby
07a1290f3e
Eliminating closure_size from area scanners and root registration functions, as it isn't all that useful.
...
Copied from Perforce
Change: 189491
ServerID: perforce.ravenbrook.com
2016-03-01 15:59:06 +00:00
Richard Brooksby
cce61c51de
Removing assumption that area scanners take pointers to words. the client is at liberty to encode references in other ways.
...
Copied from Perforce
Change: 189484
ServerID: perforce.ravenbrook.com
2016-03-01 13:57:13 +00:00
Richard Brooksby
2f025ea5d2
Deprecating table roots.
...
Copied from Perforce
Change: 189483
ServerID: perforce.ravenbrook.com
2016-03-01 13:36:30 +00:00
Richard Brooksby
b771a2112a
Implementing mps_root_create_area_tagged as documented.
...
Copied from Perforce
Change: 189324
ServerID: perforce.ravenbrook.com
2016-02-19 00:23:54 +00:00
Richard Brooksby
266228be7c
Renaming "bottom" and "top" of stack to "cold" and "hot" end, to prevent confusion about descending stacks.
...
Correcting design documentation relating to stacks.
Referencing hot and cold end concepts from glossary entry for control stacks.
Copied from Perforce
Change: 189320
ServerID: perforce.ravenbrook.com
2016-02-18 23:49:58 +00:00
Richard Brooksby
44664b7cc7
Removing check that pattern fits within mask, as this restricts the generality of scan_area.
...
Copied from Perforce
Change: 189312
ServerID: perforce.ravenbrook.com
2016-02-18 20:49:21 +00:00
Richard Brooksby
0f8bee3762
Detabifying code and restructuredtext files.
...
Copied from Perforce
Change: 189309
ServerID: perforce.ravenbrook.com
2016-02-18 19:58:13 +00:00
Richard Brooksby
855719a568
Documenting mps_root_create_area and mps_root_create_area_tagged.
...
Copied from Perforce
Change: 189243
ServerID: perforce.ravenbrook.com
2016-02-16 16:03:28 +00:00
Richard Brooksby
553093f3ed
Documenting thread root registration functions.
...
Copied from Perforce
Change: 189207
ServerID: perforce.ravenbrook.com
2016-02-16 00:34:10 +00:00
Richard Brooksby
525e7dc95b
Making mps_root_create_thread a convenience function for the common case.
...
Copied from Perforce
Change: 189205
ServerID: perforce.ravenbrook.com
2016-02-15 23:30:12 +00:00
Richard Brooksby
8140fab4dd
Creating general mps_root_create_thread and renaming mps_root_create_stack as a specialised version of it, mps_root_create_thread_tagged.
...
Copied from Perforce
Change: 189198
ServerID: perforce.ravenbrook.com
2016-02-15 19:12:59 +00:00
Richard Brooksby
a759889048
Reimplementing mps_root_create_reg in terms of rootcreatethreadtagged and abolishing rootreg. yay!
...
Copied from Perforce
Change: 189197
ServerID: perforce.ravenbrook.com
2016-02-15 18:19:30 +00:00
Richard Brooksby
53ce574bfe
Renaming rootreg_masked to rootthread_tagged with corresponding changes to other identifiers.
...
Copied from Perforce
Change: 189196
ServerID: perforce.ravenbrook.com
2016-02-15 17:57:06 +00:00
Richard Brooksby
2ad27f73b1
Lifting stack and register area scanner into mps interface to allow generalisation of stack format.
...
Copied from Perforce
Change: 189195
ServerID: perforce.ravenbrook.com
2016-02-15 17:46:45 +00:00
Richard Brooksby
b04dbd8677
Generalising roottable to rootarea and using it to implement mps_root_create_table_* and mps_root_create_area.
...
Copied from Perforce
Change: 189193
ServerID: perforce.ravenbrook.com
2016-02-15 17:30:45 +00:00
Richard Brooksby
3b33c0808b
Generalising roottable_masked to rootarea_tagged and lifting scanner assumption.
...
Copied from Perforce
Change: 189192
ServerID: perforce.ravenbrook.com
2016-02-15 16:56:42 +00:00
Richard Brooksby
6b7c5f3d74
Lifting assumptions about area scanners closer to interface.
...
Copied from Perforce
Change: 189191
ServerID: perforce.ravenbrook.com
2016-02-15 16:46:09 +00:00
Richard Brooksby
a3fdda4678
Lifting and generalising area scanners to allow flexible tagging schemes.
...
Copied from Perforce
Change: 189189
ServerID: perforce.ravenbrook.com
2016-02-15 15:30:08 +00:00
Richard Brooksby
9c0c184728
Adding mps_root_create_table_tagged as an interface to more generally tagged roots.
...
Deprecating the less general mps_root_create_table_masked.
Copied from Perforce
Change: 189131
ServerID: perforce.ravenbrook.com
2016-02-11 20:28:39 +00:00
Gareth Rees
7d43cfa380
Rename mps_root_create_reg_masked to mps_root_create_stack, and deprecate mps_root_create_reg, as suggested in review by nb < https://info.ravenbrook.com/mail/2015/09/09/16-18-10/0/ >.
...
Copied from Perforce
Change: 188312
ServerID: perforce.ravenbrook.com
2015-09-14 20:16:14 +01:00
Gareth Rees
881c594458
Correct type for rootcreateregmasked.
...
Copied from Perforce
Change: 188233
ServerID: perforce.ravenbrook.com
2015-09-04 12:28:49 +01:00
Gareth Rees
edf30c06b4
New function mps_root_create_reg_masked applies a mask and pattern test to all words in registers and on the stack when scanning them. this supports tagged references in these locations.
...
Consistently use the type "Word *" for pointers into the stack or into saved registers.
Remove TraceScanAreaTagged.
Copied from Perforce
Change: 188231
ServerID: perforce.ravenbrook.com
2015-09-04 12:22:03 +01:00
Gareth Rees
38f07daa3d
Fix broken link to design/thread-safety
...
Copied from Perforce
Change: 188158
ServerID: perforce.ravenbrook.com
2015-08-21 11:20:20 +01:00
Gareth Rees
55b13ab5b5
The stack pointer passed to mps_root_create_reg must be word-aligned.
...
Copied from Perforce
Change: 187946
ServerID: perforce.ravenbrook.com
2015-06-15 22:11:48 +01:00
Gareth Rees
5315baa846
The "remember" parameters to arenaexposeremember is a boolean, not an integer.
...
Copied from Perforce
Change: 187467
ServerID: perforce.ravenbrook.com
2014-11-06 12:03:18 +00:00
Gareth Rees
5afa5a492b
Use pointeradd to express the condition in mps_commit -- it expands to the same code, and better conveys the intention.
...
Copied from Perforce
Change: 187242
ServerID: perforce.ravenbrook.com
2014-10-13 17:36:44 +01:00
Gareth Rees
4348937862
Don't use avert unless the arena lock is held (it's not thread-safe in all varieties). add design explaining this.
...
Copied from Perforce
Change: 187238
ServerID: perforce.ravenbrook.com
2014-10-13 14:36:15 +01:00
Gareth Rees
c968255f1e
Ensure that code of the form if (condition) statement; is split over two lines, so that it is possible to set a breakpoint on the statement in a debugger.
...
This change was agreed in 1997 (see <https://info.ravenbrook.com/project/mps/mail/1997/08/19/13-44/0.txt >), so it's about time it was implemented.
Copied from Perforce
Change: 187071
ServerID: perforce.ravenbrook.com
2014-09-27 22:57:02 +01:00
Gareth Rees
21f6addf6c
Rename mps_class_t to mps_pool_class_t for clarity.
...
Retain a typedef for mps_class_t for backwards compatibility.
Copied from Perforce
Change: 187065
ServerID: perforce.ravenbrook.com
2014-09-27 13:37:38 +01:00
Gareth Rees
981a266642
New public functions mps_pool_total_size and mps_pool_free_size.
...
Old (undocumented) functions mps_{mv,mvff,mvt}_size and mps_{mv,mvff,mvt}_free_size are now macros for the new public functions.
New pool methods PoolTotalSize and PoolFreeSize, with implementations for public pool classes except SNC.
Coverage of the new functions in apss and mpmss for the manual pool classes, and in finaltest for the automatic pool classes.
Copied from Perforce
Change: 186118
ServerID: perforce.ravenbrook.com
2014-05-15 17:01:59 +01:00
Gareth Rees
e50f28afeb
The mps_args_add_field and mps_args_done now check that the number of arguments is in bounds.
...
Copied from Perforce
Change: 185938
ServerID: perforce.ravenbrook.com
2014-05-02 11:34:38 +01:00
Gareth Rees
7620c6fcd1
Fix rash build on os x by adding the unused attribute to functions declared static that are not called in the rash variety.
...
Copied from Perforce
Change: 185915
ServerID: perforce.ravenbrook.com
2014-05-01 12:18:00 +01:00
Gareth Rees
3bdf7fc878
All prottramp implementations are now the same, so there is no need for separate implementations.
...
Copied from Perforce
Change: 185901
ServerID: perforce.ravenbrook.com
2014-04-30 16:29:42 +01:00
Gareth Rees
d3d2795fce
Improve control over checking:
...
1. Where Type is a pointer type with a signature, replace CHECKL(TypeCheck(val)) with CHECKD(Type, val).
2. Where Type is a pointer type with no signature, replace CHECKL(TypeCheck(val)) with CHECKD_NOSIG(Type, val).
3. Where Type is a pointer type with a signature, but the structure is not visible at point of checking, replace CHECKL(TypeCheck(val)) with CHECKD_NOSIG(Type, val). Reference <design/check/#.hidden-type>
4. Make BTCheck extern and use it where possible.
5. Replace AVER(TypeCheck(val)) with AVERT(Type, val).
Copied from Perforce
Change: 185263
ServerID: perforce.ravenbrook.com
2014-04-06 22:51:05 +01:00
Gareth Rees
c2383c4ec9
Remove unneeded headers.
...
Copied from Perforce
Change: 185248
ServerID: perforce.ravenbrook.com
2014-04-06 15:53:54 +01:00
Gareth Rees
9d5266c0cc
Improved support for pelles c:
...
* Refactor nmake files so that a compiler-specific makefile is included; move Microsoft Visual C-specific options to mv.nmk.
* Add nmake files for Pelles (w3i3pc.nmk and pc.nmk).
* Rename spw3i3mv.c to spw3i3.c and spw3i6mv.c to spw3i6.c since these are also used by Pelles C.
* Make reasonable changes to the source code to avoid warnings from Pelles C:
** check results of function calls;
** avoid useless return values;
** undef max before defining it;
** ensure printf formats are checkable;
** move notreached() assertions to the end of blocks;
** suppress warnings in cases where the code shouldn't be changed ("Unreachable code", "Inline assembly code is not portable", "Structured Exception Handling is not portable").
Copied from Perforce
Change: 184977
ServerID: perforce.ravenbrook.com
2014-03-24 18:23:29 +00: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
Richard Brooksby
2efd201955
Declaring result codes using a relational macro, so that tests can print more meaningful output, and to eliminate redundant code.
...
Copied from Perforce
Change: 184382
ServerID: perforce.ravenbrook.com
2014-02-19 11:55:43 +00:00
Gareth Rees
e88bcc5184
Document the intention behind mps_ld_isstale rather than the implementation: it captures the intention of testing whether a particular dependency is stale (even though the implementation in fact tests whether any dependency is stale). add new function mps_ls_isstale_any for expressing the intention of testing whether any dependencey is stale. the two functions have the same implementation at present, but the separation gives us the freedom to return a more precise result from mps_ld_isstale in future.
...
Copied from Perforce
Change: 182816
ServerID: perforce.ravenbrook.com
2013-06-20 16:25:08 +01:00
Gareth Rees
25bfea8ba8
Move the poolhasrange test to pool.c so that all frees (including internal ones) get the check.
...
Copied from Perforce
Change: 182783
ServerID: perforce.ravenbrook.com
2013-06-17 17:52:25 +01:00
Richard Brooksby
56645cdc0c
Merging branch/2013-05-17/emergency with major rework of mvt, mvff, and cbs.
...
Some parts of this are still ragged, and would not normally pass review, but this is a massive improvement to the existing code.
Copied from Perforce
Change: 182614
ServerID: perforce.ravenbrook.com
2013-06-08 10:57:57 +01:00
Gareth Rees
509ebcb215
Check that all addresses in the freed range belong to the pool, not just the base of the range.
...
Copied from Perforce
Change: 182602
ServerID: perforce.ravenbrook.com
2013-06-07 13:20:20 +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
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
3c48eff730
On platform lii6gc, the mps needs a bunch of symbols which are not defined if the -ansi option is given to gcc. these can be enabled by defining features like _gnu_source, but all headers share a common set of features (via <feature.h>) and so all sources in the same compilation unit must turn on the same set of features. make sure this happens by turning on the features in config.h (not mpstd.h).
...
Remove <string.h> from mpsi.h (not needed).
Copied from Perforce
Change: 182124
ServerID: perforce.ravenbrook.com
2013-05-23 19:35:47 +01:00
Gareth Rees
ef4c41df55
Ensure the emergency branch compiles and runs on lii6gc:
...
No need for <string.h> in mpsi.c (this defines a function "index" on Linux).
Need more headers in range.c so that it will compile on its own.
Need UNUSED() declarations for some variables in cbstest.c.
Copied from Perforce
Change: 182113
ServerID: perforce.ravenbrook.com
2013-05-23 13:42:08 +01:00
Richard Brooksby
8acbc5780b
Quietly eliminating varargs to mps_alloc. they were never documented.
...
Copied from Perforce
Change: 181843
ServerID: perforce.ravenbrook.com
2013-05-16 03:07:50 +01:00