Richard Brooksby
3dd201bf47
Turning pool init methods the right way in, so that they each call the next method up the class hierarchy.
...
Copied from Perforce
Change: 190858
ServerID: perforce.ravenbrook.com
2016-04-10 17:49:08 +01:00
Richard Brooksby
5a0c818945
Explicitly making inststruct the prefix of instances, eliminating pointer punning of class pointers, and reducing likelihood of editing errors.
...
Copied from Perforce
Change: 190830
ServerID: perforce.ravenbrook.com
2016-04-08 17:51:21 +01:00
Richard Brooksby
1025b28674
Eliminating withreservoirpermit and all its variants.
...
Copied from Perforce
Change: 190005
ServerID: perforce.ravenbrook.com
2016-03-13 21:04:01 +00:00
Gareth Rees
66dfd1a69a
Improved assertion messages when a required keyword argument is not found. instead of "unreachable code", the assertion message is the name of the missing key.
...
Copied from Perforce
Change: 187267
ServerID: perforce.ravenbrook.com
2014-10-14 22:05:30 +01:00
Gareth Rees
5f35b7f792
Use the method suffix only for methods in classes; use visitor or function for other kinds of functions.
...
New document guide.impl.c.naming sets out the rules for naming.
Copied from Perforce
Change: 187159
ServerID: perforce.ravenbrook.com
2014-10-07 23:48:55 +01:00
Gareth Rees
1b7de24015
Some assertions with && crept back in. split them up so that we get as much information as possible from an assertion failure.
...
Copied from Perforce
Change: 186577
ServerID: perforce.ravenbrook.com
2014-06-13 15:52:50 +01:00
Gareth Rees
0901340862
Ensure that the macro versions of shieldexpose and shieldcover are used.
...
Copied from Perforce
Change: 186464
ServerID: perforce.ravenbrook.com
2014-06-09 19:53:37 +01:00
Gareth Rees
7489f4d284
Fix compilation on fri3gc: need readonlyaddradd macro to avoid warning.
...
Copied from Perforce
Change: 186442
ServerID: perforce.ravenbrook.com
2014-06-08 17:15:54 +01:00
Gareth Rees
331d260bfd
Catch-up merge from master sources @186436 to branch/2014-04-08/align.
...
Copied from Perforce
Change: 186439
ServerID: perforce.ravenbrook.com
2014-06-08 16:30:53 +01:00
Gareth Rees
4ce7746f6b
New type readonlyaddr for managed address that an interface promises only to read through.
...
Use ReadonlyAddr for debugging pool fenceTemplate and freeTemplate, so that we can restore -Wwrite-strings option for GCC.
Copied from Perforce
Change: 186434
ServerID: perforce.ravenbrook.com
2014-06-08 14:53:17 +01:00
Gareth Rees
da9d6f10fa
Specification for patterniterate(). dereference visitor.
...
Copied from Perforce
Change: 186433
ServerID: perforce.ravenbrook.com
2014-06-08 14:37:46 +01:00
Gareth Rees
f193a8be5c
Tidy comments.
...
Copied from Perforce
Change: 186430
ServerID: perforce.ravenbrook.com
2014-06-08 13:48:31 +01:00
Richard Brooksby
b987c2a7b1
Lifting duplicate code hazard in patterncopy and patterncheck. see < https://info.ravenbrook.com/mail/2014/06/04/14-41-06/0/ >.
...
Copied from Perforce
Change: 186420
ServerID: perforce.ravenbrook.com
2014-06-05 13:40:05 +01:00
Richard Brooksby
491e54d14c
Removing assumption that segnext returns segments in address order. see < https://info.ravenbrook.com/mail/2014/06/04/14-41-06/0/ >.
...
Copied from Perforce
Change: 186417
ServerID: perforce.ravenbrook.com
2014-06-05 13:14:09 +01:00
Gareth Rees
b5fa39ff39
Check meaning of extend_by and remove fixme.
...
Copied from Perforce
Change: 186148
ServerID: perforce.ravenbrook.com
2014-05-17 00:26:34 +01:00
Gareth Rees
6b4cfb5263
Avoid "cast discards const qualifier from pointer target type" error from gcc.
...
Copied from Perforce
Change: 185491
ServerID: perforce.ravenbrook.com
2014-04-13 19:23:33 +01:00
Gareth Rees
f7dd0b6c46
Provide a default value for mps_key_pool_debug_options.
...
Don't use const in the types of the debugging templates: it's infectious!
Copied from Perforce
Change: 185489
ServerID: perforce.ravenbrook.com
2014-04-13 18:02:10 +01:00
Gareth Rees
02e0595e2f
Comment is no longer true: now handle blocks that span segments.
...
Copied from Perforce
Change: 185487
ServerID: perforce.ravenbrook.com
2014-04-13 10:28:19 +01:00
Gareth Rees
814595296d
Remove claim ".fence.size guarantees the template is larger" since this is no longer true. update debugging pool design to record the newly discovered portability requirement.
...
Copied from Perforce
Change: 185411
ServerID: perforce.ravenbrook.com
2014-04-09 19:00:50 +01:00
Gareth Rees
a5a1a9e03f
Avoid "cast discards const qualifier from pointer target type" from gcc.
...
Copied from Perforce
Change: 185406
ServerID: perforce.ravenbrook.com
2014-04-09 17:58:09 +01:00
Gareth Rees
ae8e213a3b
Mvff debug now supports alloc/free of large objects (by exposing and covering all segments which the object overlaps)
...
Copied from Perforce
Change: 185386
ServerID: perforce.ravenbrook.com
2014-04-09 13:30:36 +01:00
Gareth Rees
e7a9e1e244
Make debugging pool implementation more flexible -- there's no longer a requirement for fencesize to be a multiple of the pool alignment, nor for freesize to be a divisor of the pool alignment. this makes it easy to write simple and portable debug options structures without having to mess about with mps_pf_align.
...
Copied from Perforce
Change: 185379
ServerID: perforce.ravenbrook.com
2014-04-09 13:00:52 +01:00
Gareth Rees
bcea6812fc
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
f970e9d82c
Must check against treeempty, not null.
...
Copied from Perforce
Change: 185261
ServerID: perforce.ravenbrook.com
2014-04-06 21:50:56 +01:00
Richard Brooksby
c861919d7f
Catch-up merge from masters.
...
Copied from Perforce
Change: 184728
ServerID: perforce.ravenbrook.com
2014-03-11 16:13:39 +00:00
Richard Brooksby
0cb5069ea8
Responding to code review < https://info.ravenbrook.com/mail/2014/03/07/22-40-36/0/ >.
...
Using TREE_ELT where appropriate.
Using AVERT consistently on Tree, but see job003691.
Copied from Perforce
Change: 184724
ServerID: perforce.ravenbrook.com
2014-03-11 15:46:51 +00:00
Gareth Rees
32d10cd02a
Make mps_args_done obsolete.
...
Copied from Perforce
Change: 184543
ServerID: perforce.ravenbrook.com
2014-02-26 12:47:27 +00:00
Richard Brooksby
a7451a424a
Adding a signature to splay tree structure. miscellaneous documentation and naming clean-up.
...
Copied from Perforce
Change: 184448
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
2a60898a04
Eliminating redundant passing of tree keys by adding a method to extract the key from a tree node.
...
Copied from Perforce
Change: 184440
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
8fccc81c82
Avoiding general compare when searching for first and last nodes in a tree.
...
Copied from Perforce
Change: 184435
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
a97757482b
Fixing abuses of res and resfail in the splay tree interface.
...
Copied from Perforce
Change: 184432
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
0b3372d1d2
Distinguishing tree keys (treekey) from generic void *.
...
Copied from Perforce
Change: 184429
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
07ece0b4b3
Unifying splaycomparemethod with treecompare.
...
Copied from Perforce
Change: 184428
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
a0435161f2
Simplifying splay tree update prototype and removing special null case.
...
Copied from Perforce
Change: 184427
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
8a7f2671f4
Replacing splaynode with tree generally.
...
Copied from Perforce
Change: 184426
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
b5f1710b3b
Replacing splaynodestruct with treestruct and basic tree navigation operations in the splay tree implementation.
...
Copied from Perforce
Change: 184425
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Gareth Rees
10c13b2a54
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
Richard Brooksby
b4e1f173db
Changing required keyword arguments to cause an assertion rather than return a status code, and removing repetition in how this is expressed.
...
Copied from Perforce
Change: 181674
ServerID: perforce.ravenbrook.com
2013-05-09 15:15:40 +01:00
Richard Brooksby
09dba7b95a
Converting a fixme to a todo because it's a longer term change.
...
Copied from Perforce
Change: 181670
ServerID: perforce.ravenbrook.com
2013-05-09 14:58:32 +01:00
Richard Brooksby
b18ec007a9
Adding macros to make keyword argument list formation more convenient and robust.
...
Copied from Perforce
Change: 181666
ServerID: perforce.ravenbrook.com
2013-05-09 14:04:23 +01:00
Richard Brooksby
82cf26a55d
Consolidating common pool keywords.
...
Copied from Perforce
Change: 181649
ServerID: perforce.ravenbrook.com
2013-05-09 00:06:07 +01:00
Richard Brooksby
0206eb695b
Implementing configurable maximum argument list length.
...
Copied from Perforce
Change: 181648
ServerID: perforce.ravenbrook.com
2013-05-08 23:47:38 +01:00
Richard Brooksby
3ab047467f
Macroizing keyword definitions and adding more keyword argument checking methods.
...
Copied from Perforce
Change: 181647
ServerID: perforce.ravenbrook.com
2013-05-08 23:40:40 +01:00
Richard Brooksby
a8afd8e6f4
Converting pools to use keyword arguments, mostly, and so far inconsistently, but at least it compiles.
...
Copied from Perforce
Change: 181635
ServerID: perforce.ravenbrook.com
2013-05-08 16:21:12 +01:00
Richard Brooksby
6db2c18143
Fixing type puns discovered by gcc 4.2.1 on freebsd with -o3.
...
Copied from Perforce
Change: 179356
ServerID: perforce.ravenbrook.com
2012-09-07 22:03:41 +01:00
Richard Brooksby
4c1aad625f
Suppressing warnings revealed by increased level of optimisation and building the mps from mps.c
...
Copied from Perforce
Change: 179192
ServerID: perforce.ravenbrook.com
2012-09-03 13:15:34 +01:00
Richard Brooksby
19a5cb4d08
Fixing up warnings caused by higher levels of optimisation.
...
Copied from Perforce
Change: 179178
ServerID: perforce.ravenbrook.com
2012-09-03 00:29:21 +01:00
Richard Brooksby
bb747e8e33
Renaming some check* macros with more accurate names, making remaining check* macros similar in function.
...
Copied from Perforce
Change: 179155
ServerID: perforce.ravenbrook.com
2012-09-01 10:18:08 +01:00
Richard Brooksby
33db57fe2e
Fixed various tagging and cross-referencing errors.
...
Copied from Perforce
Change: 30455
ServerID: perforce.ravenbrook.com
2002-06-24 13:16:30 +01:00
Richard Brooksby
667f82dbc4
Changing global graphics copyright notice to say "portions copyright" to avoid confusion.
...
Copied from Perforce
Change: 30258
ServerID: perforce.ravenbrook.com
2002-06-18 16:28:41 +01:00