1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-13 09:30:24 -08:00
Commit graph

131 commits

Author SHA1 Message Date
Richard Brooksby
a148490cfa Adding classname for use in describe methods.
Fixing error path to use class destroy in ArenaCreate.
Using MustBeA to reduce boiler plate in land classes.

Copied from Perforce
 Change: 190904
 ServerID: perforce.ravenbrook.com
2016-04-11 14:06:28 +01:00
Richard Brooksby
6a732464b3 Repairing superclass by taking a kind, which can later be checked.
Copied from Perforce
 Change: 190850
 ServerID: perforce.ravenbrook.com
2016-04-10 12:28:51 +01:00
Richard Brooksby
c92bf9505a 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
c4bcc24759 Generating a static superclass mapping and eliminating other superclass macros.
Copied from Perforce
 Change: 190827
 ServerID: perforce.ravenbrook.com
2016-04-08 17:51:20 +01:00
Richard Brooksby
aab7cc0a18 Implementing isa, mustbea, couldbea, and reshaping the land classes to put the init, finish, and describe methods the right way in.
Copied from Perforce
 Change: 190826
 ServerID: perforce.ravenbrook.com
2016-04-08 17:51:20 +01:00
Richard Brooksby
4207b9ebf8 Eliminating the concept of "alias classes" in favour of "kinds".
Copied from Perforce
 Change: 190825
 ServerID: perforce.ravenbrook.com
2016-04-08 17:51:20 +01:00
Richard Brooksby
e5efe2849f Referring to classes by their base identifiers.
Copied from Perforce
 Change: 190823
 ServerID: perforce.ravenbrook.com
2016-04-08 17:51:20 +01:00
Richard Brooksby
590c23a935 Moving common fields into the base class, starting with the class name.
Copied from Perforce
 Change: 190816
 ServerID: perforce.ravenbrook.com
2016-04-08 17:51:19 +01:00
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
aa0412e071 Removing the mostly unused size component of the closure convention.
Copied from Perforce
 Change: 189503
 ServerID: perforce.ravenbrook.com
2016-03-01 17:20:50 +00:00
Gareth Rees
1710a3bb97 Prefer avert(type, value) to aver(typecheck(value)).
Copied from Perforce
 Change: 188157
 ServerID: perforce.ravenbrook.com
2015-08-21 11:14:27 +01:00
Gareth Rees
00229b0479 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
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
1608519fe2 Fix problems identified by nb in review <https://info.ravenbrook.com/mail/2014/07/24/12-21-04/0/>.
Copied from Perforce
 Change: 186945
 ServerID: perforce.ravenbrook.com
2014-08-06 16:18:34 +01:00
Gareth Rees
5268331bdd Add landiterateanddelete method for the cbs land classes.
Use this to check that all memory has been returned to the arena in MVFFFinish.

Copied from Perforce
 Change: 186616
 ServerID: perforce.ravenbrook.com
2014-06-14 12:44:11 +01:00
Gareth Rees
9268a0adc8 Catch-up merge from master sources @186528 to branch/2014-04-15/mvffnoseg.
Copied from Perforce
 Change: 186534
 ServerID: perforce.ravenbrook.com
2014-06-12 15:59:39 +01:00
Gareth Rees
cb629746ea Catch-up merge from masters sources @186519 to branch/2014-04-17/describe.
Copied from Perforce
 Change: 186526
 ServerID: perforce.ravenbrook.com
2014-06-12 13:45:22 +01:00
Gareth Rees
8eb003846d Fix problems identified by rb in review <https://info.ravenbrook.com/mail/2014/06/04/15-13-24/0/>.
Copied from Perforce
 Change: 186449
 ServerID: perforce.ravenbrook.com
2014-06-08 20:28:33 +01:00
Gareth Rees
3704522c58 Catch-up merge from master sources @186352 to branch/2014-04-15/mvffnoseg.
Copied from Perforce
 Change: 186355
 ServerID: perforce.ravenbrook.com
2014-05-29 16:03:34 +01:00
Gareth Rees
51e39dc087 Pass and check special closure values unused_pointer, unused_size instead of null, 0.
Copied from Perforce
 Change: 186352
 ServerID: perforce.ravenbrook.com
2014-05-29 15:28:33 +01:00
Gareth Rees
8e4721db4c Fix problems identified by rb in review <https://info.ravenbrook.com/mail/2014/05/29/13-01-02/0/>.
Copied from Perforce
 Change: 186347
 ServerID: perforce.ravenbrook.com
2014-05-29 14:50:36 +01:00
Gareth Rees
fd57486106 Fix problems identified by dl in review <https://info.ravenbrook.com/mail/2014/05/23/12-44-54/0/>.
Copied from Perforce
 Change: 186300
 ServerID: perforce.ravenbrook.com
2014-05-25 20:49:22 +01:00
Gareth Rees
181767e4db Split land iteration into two functions, one which deletes ranges, the other which does not.
Copied from Perforce
 Change: 186298
 ServerID: perforce.ravenbrook.com
2014-05-25 19:26:48 +01:00
Gareth Rees
bb21449097 Landiterate now returns a bool indicating whether all visitor calls returned true.
Copied from Perforce
 Change: 186165
 ServerID: perforce.ravenbrook.com
2014-05-18 22:46:16 +01:00
Gareth Rees
7cd4759316 Catch-up merge from branch/2014-03-30/addrset to branch/2014-04-15/mvffnoseg.
Copied from Perforce
 Change: 186082
 ServerID: perforce.ravenbrook.com
2014-05-13 16:27:17 +01:00
Gareth Rees
34cc9d49e4 Catch-up merge from master sources @186077 to branch/2014-03-30/addrset.
Copied from Perforce
 Change: 186081
 ServerID: perforce.ravenbrook.com
2014-05-13 16:21:39 +01:00
Gareth Rees
f4a4f1e250 Merge branch/2014-02-23/mvff-tune into branch/2014-04-15/mvffnoseg.
Copied from Perforce
 Change: 186079
 ServerID: perforce.ravenbrook.com
2014-05-13 16:10:51 +01:00
Gareth Rees
8e72725b5b Assert that size > 0 in cbsfindlargest. (merged from change 184496.)
Copied from Perforce
 Change: 186075
 ServerID: perforce.ravenbrook.com
2014-05-13 13:44:42 +01:00
Gareth Rees
7985175687 Fixed a bug in cbsfindlargest where it always deleted the entire range found even when finddeletelow or finddeletehigh were passed. (merged from change 184493.)
Copied from Perforce
 Change: 186074
 ServerID: perforce.ravenbrook.com
2014-05-13 13:33:46 +01:00
Gareth Rees
58b2d71836 Bug fix. ensuring cbsfinddeleterange returns oldrangereturn even if it doesn’t delete a block. (merged from change 184485.)
Copied from Perforce
 Change: 186070
 ServerID: perforce.ravenbrook.com
2014-05-13 12:30:23 +01:00
Gareth Rees
3a1ce9493f Remove mps_key_cbs_extend_by and mfsextendself keyword arguments to cbsinit. these were unused and obsoleted by cbsblockpool.
Copied from Perforce
 Change: 186006
 ServerID: perforce.ravenbrook.com
2014-05-11 19:09:44 +01:00
Gareth Rees
30f37732a9 Catch-up merge from master sources @185999 to branch/2014-04-17/describe.
Copied from Perforce
 Change: 186003
 ServerID: perforce.ravenbrook.com
2014-05-11 18:33:02 +01:00
Gareth Rees
c77c91056d Consistent order stream, depth.
Copied from Perforce
 Change: 186001
 ServerID: perforce.ravenbrook.com
2014-05-11 18:30:23 +01:00
Gareth Rees
2493f121dc Correct indentation of describe output by passing depth parameter to describe functions and to writef.
Call Describe functions from test cases so that we get coverage.

Copied from Perforce
 Change: 186000
 ServerID: perforce.ravenbrook.com
2014-05-11 18:20:38 +01:00
Gareth Rees
d1b44a4f05 Back out change 185626 (violates the design.mps.writef.snazzy).
Copied from Perforce
 Change: 185941
 ServerID: perforce.ravenbrook.com
2014-05-02 12:44:31 +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
6721c2b913 Correct indentation of describe output.
Copied from Perforce
 Change: 185626
 ServerID: perforce.ravenbrook.com
2014-04-17 13:36:42 +01:00
Gareth Rees
29035a7f67 Put cbsfindinzones back where it was (moving it broke the build).
Copied from Perforce
 Change: 185584
 ServerID: perforce.ravenbrook.com
2014-04-16 11:19:55 +01:00
Gareth Rees
b3a3b0b8fc Move cbsfindinzones so that diff is cleaner.
Copied from Perforce
 Change: 185578
 ServerID: perforce.ravenbrook.com
2014-04-16 10:24:26 +01:00
Gareth Rees
87b3880405 New generic function landsize returns the total size of ranges in a land (if the land supports it). implement it for all land classes.
The MVFF pool class doesn't have to maintain its free size any more: it can just call LandSize.
Move re-entrancy protection from CBS to Land. This allows us to remove some CBS functions. (But requires some adjustment in failoverDelete.)
In MVFF, do more checking of mvff->total.

Copied from Perforce
 Change: 185569
 ServerID: perforce.ravenbrook.com
2014-04-15 16:35:34 +01:00
Gareth Rees
42f18f93af Catch-up merge from master/...@185556 to branch/2014-03-30/addrset.
Copied from Perforce
 Change: 185563
 ServerID: perforce.ravenbrook.com
2014-04-15 13:14:50 +01:00
Gareth Rees
9c8713f51b Fix problems found by coverity. see <https://info.ravenbrook.com/mail/2014/04/10/23-23-42/0/> for full analysis.
Copied from Perforce
 Change: 185445
 ServerID: perforce.ravenbrook.com
2014-04-11 00:26:48 +01:00
Gareth Rees
b90f8b9bcd Use cbs subclasses to implement the fast-find and find-in-zones features. this avoids the need to control behaviour by passing booleans, and it means that there is no wasted space in the cbs block structure when these features are not used.
Bring splay tree design up to date; add missing diagrams; move it to the "current" section of the manual.

Copied from Perforce
 Change: 185294
 ServerID: perforce.ravenbrook.com
2014-04-07 15:36:18 +01:00
Gareth Rees
4b5d396792 Catch-up merge from master sources to branch/2014-03-30/addrset.
Copied from Perforce
 Change: 185288
 ServerID: perforce.ravenbrook.com
2014-04-07 15:02:09 +01:00
Gareth Rees
f2776dc0b4 Can't use checkd_nosig(tree, ...) because treeempty is null.
arena->enabledMessageTypes might be NULL.

Copied from Perforce
 Change: 185271
 ServerID: perforce.ravenbrook.com
2014-04-07 10:14:40 +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
ce6b34aa8f Test the failover module (both always and never failing over).
Fix result code bug in failoverInsert.
Test all result codes in fotest.
Tidy up code and documentation.

Copied from Perforce
 Change: 185207
 ServerID: perforce.ravenbrook.com
2014-04-03 14:46:58 +01:00
Gareth Rees
0b159dc650 New module failover implements a fail-over allocator as a land class.
Use Failover in MVT and MVFF.
Test Failover in landtest.
Implementation of LandFindInZones for Freelist (untested).
Remove signature from RangeStruct so we can embed it without a space cost.

Copied from Perforce
 Change: 185196
 ServerID: perforce.ravenbrook.com
2014-04-03 12:52:23 +01:00
Gareth Rees
b409ae89f6 Turn freelist into a land class.
Copied from Perforce
 Change: 185155
 ServerID: perforce.ravenbrook.com
2014-04-02 14:01:18 +01:00
Gareth Rees
d2cbfda452 First pass at implementation of lands (collections of address ranges). 100% boilerplate!
Copied from Perforce
 Change: 185131
 ServerID: perforce.ravenbrook.com
2014-04-01 19:51:55 +01:00