1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-25 15:00:45 -08:00
Commit graph

87 commits

Author SHA1 Message Date
Gareth Rees
2b3fbbb8d3 New pool method poolsegpoolgen gets the pool generation for a segment. (this allows the segment whiten and reclaim methods not to need to know the pool class.)
Copied from Perforce
 Change: 193084
 ServerID: perforce.ravenbrook.com
2017-03-31 13:28:25 +01:00
Gareth Rees
178c269987 Move alignshift to pool structure allows us to eliminate duplicate code between awl and lo.
Copied from Perforce
 Change: 193071
 ServerID: perforce.ravenbrook.com
2017-03-31 08:41:14 +01:00
Gareth Rees
d02a8f277e Check that segment classes override sets of related methods.
Add missing finish functions amcSegFinish, mrgLinkSegFinish, mrgRefSegFinish, sncSegFinish.
Check all class constructor results.

Copied from Perforce
 Change: 193055
 ServerID: perforce.ravenbrook.com
2017-03-30 11:37:41 +01:00
Gareth Rees
dd1b5b2f27 No need for poolclassmixinscan and abstractscanpool.
Copied from Perforce
 Change: 193045
 ServerID: perforce.ravenbrook.com
2017-03-30 10:23:15 +01:00
Gareth Rees
b295670a76 Changing segnowalk to segtrivwalk avoids the need for attrfmt (now we can walk all segments).
Copied from Perforce
 Change: 193044
 ServerID: perforce.ravenbrook.com
2017-03-30 10:18:22 +01:00
Gareth Rees
4c9f14729f Move access method from pool class to segment class.
Copied from Perforce
 Change: 193039
 ServerID: perforce.ravenbrook.com
2017-03-30 09:55:37 +01:00
Gareth Rees
109dabad27 Move walk method from pool class to segment class.
Copied from Perforce
 Change: 193028
 ServerID: perforce.ravenbrook.com
2017-03-30 08:54:35 +01:00
Gareth Rees
45e05c62cd Move fix and fixemergency methods from pool class to segment class.
Copied from Perforce
 Change: 193023
 ServerID: perforce.ravenbrook.com
2017-03-30 08:09:14 +01:00
Gareth Rees
1cb3265e80 Move scan method from pool class to segment class.
Copied from Perforce
 Change: 193012
 ServerID: perforce.ravenbrook.com
2017-03-29 19:17:17 +01:00
Gareth Rees
de269de563 Move reclaim method from pool class to segment class.
Copied from Perforce
 Change: 193007
 ServerID: perforce.ravenbrook.com
2017-03-29 17:13:45 +01:00
Gareth Rees
bfe43c367e Move whiten method from pool class to segment class.
Copied from Perforce
 Change: 193002
 ServerID: perforce.ravenbrook.com
2017-03-29 16:22:14 +01:00
Gareth Rees
826b74a030 Move greyen method from pool class to segment class.
Copied from Perforce
 Change: 192997
 ServerID: perforce.ravenbrook.com
2017-03-29 15:58:32 +01:00
Gareth Rees
6dabd6de2b Move the blacken method from the pool class to the segment class.
Copied from Perforce
 Change: 192994
 ServerID: perforce.ravenbrook.com
2017-03-29 15:32:17 +01:00
Gareth Rees
577b32d481 Cherry-pick change 192595 from custom/cet/main, removing mps_addr_object. this function failed to solve the problem of decoding the stack on 64-bit windows, because the stack may need to be decoded after an mps assertion failure, in which case the arena lock is held and mps_addr_object cannot be called. we eventually solved the problem in a different way (using mps_arena_postmortem) and mps_addr_object is no longer used.
Copied from Perforce
 Change: 192637
 ServerID: perforce.ravenbrook.com
2016-10-19 14:13:38 +01:00
Gareth Rees
9f505c501d Remove unused pool class methods tracebegin and traceend.
Remove unused event AMCTraceEnd.
The fixEmergency method must have the same type as the fix method because of how they are used.

Copied from Perforce
 Change: 192636
 ServerID: perforce.ravenbrook.com
2016-10-19 14:07:20 +01:00
Gareth Rees
1a04431cff New modulefile prmcw3.c avoids duplication of code between prmcw3i3.c and prmcw3i6.c.
Implement MutatorContextCheck on Windows. Add AVERT(MutatorContext, context) in PoolAccess and other functions.
Document initialization functions MutatorContextInitFault and MutatorContextInitThread and implement them on Windows.
Add a union discriminator to MutatorContextStruct on Windows so that we don't accidentally try to get the stack pointer from a fault context, or the exception address from a thread context.

Copied from Perforce
 Change: 192567
 ServerID: perforce.ravenbrook.com
2016-10-14 11:53:26 +01:00
Gareth Rees
b4a3d0824b Rename the "protection mutator context" module to "mutator context" (this module handles mutator context decoding for both the protection module and the thread module).
Rename functions Prot{Can,}StepInstruction to MutatorContext{Can,}StepInstruction so that they follow the naming convention in guide.implc.naming.prefix.program.
Move mutator context declarations out of prot.h into new header prmc.h.
Correct .assume.null in a couple of places -- it's not safe for MutatorContextStepInstruction to return ResUNIMPL, instead MutatorContextCanStepInstruction should return FALSE.

Copied from Perforce
 Change: 192528
 ServerID: perforce.ravenbrook.com
2016-10-13 15:06:14 +01:00
Gareth Rees
437bf9c6a4 Rename mutatorfaultcontext to mutatorcontext because this data structure is not only used to store the context of a fault, but also to store the context of a thread that has been suspended.
Copied from Perforce
 Change: 192523
 ServerID: perforce.ravenbrook.com
2016-10-13 14:23:39 +01:00
Richard Brooksby
bda168dfb8 Renaming class fields called "protocol" to "instclassstruct" in line with usual mps convention.
Copied from Perforce
 Change: 191685
 ServerID: perforce.ravenbrook.com
2016-04-27 14:25:54 +01:00
Richard Brooksby
de1f3907cc Converting pool finish methods to specialize instfinish, and fixing up quite a few calls to use nextmethod.
Copied from Perforce
 Change: 191605
 ServerID: perforce.ravenbrook.com
2016-04-23 15:37:12 +01:00
Richard Brooksby
6217b5b3a5 Converting pool describe methods to specialise instdescribe.
Copied from Perforce
 Change: 191604
 ServerID: perforce.ravenbrook.com
2016-04-23 15:37:12 +01:00
Richard Brooksby
b765128003 Turning pool describe methods the right way in, so that they call next-method.
Copied from Perforce
 Change: 191587
 ServerID: perforce.ravenbrook.com
2016-04-23 00:22:46 +01:00
Richard Brooksby
65a770e91f Avoid using "class" as an identifier, since tools like lldb parse expressions as c++, and it can't be named.
Copied from Perforce
 Change: 191304
 ServerID: perforce.ravenbrook.com
2016-04-19 23:00:02 +01:00
Richard Brooksby
1c0704e3c8 Catch-up merge from master sources to branch/2016-04-08/protidying.
Copied from Perforce
 Change: 191251
 ServerID: perforce.ravenbrook.com
2016-04-19 16:37:51 +01:00
Gareth Rees
77b12d3ee7 Catch-up merge from master sources to branch/2014-10-11/snc.
Copied from Perforce
 Change: 191065
 ServerID: perforce.ravenbrook.com
2016-04-13 13:07:19 +01:00
Richard Brooksby
217642758d Interning strings for all classes to the event system, not just the hacky one for pool classes.
Copied from Perforce
 Change: 191071
 ServerID: perforce.ravenbrook.com
2016-04-12 18:44:05 +01:00
Richard Brooksby
a8483f5163 Moving pool format argument picking into abstract pool initialization, so that code is shared.
Copied from Perforce
 Change: 191004
 ServerID: perforce.ravenbrook.com
2016-04-12 15:07:26 +01:00
Richard Brooksby
30cd64730a Automatically setting pool->fix on first fix, to avoid tricky initialization.
Copied from Perforce
 Change: 190986
 ServerID: perforce.ravenbrook.com
2016-04-12 12:44:54 +01:00
Richard Brooksby
87aed22778 Clearing up various fixmes by making the type naming inconsistency clearly visible and intentional.
Copied from Perforce
 Change: 190980
 ServerID: perforce.ravenbrook.com
2016-04-12 10:51:41 +01:00
Richard Brooksby
b4fbe7ba92 Making classes into instances of kinds, allowing subclass tests to be used to validate classes as well.
Copied from Perforce
 Change: 190958
 ServerID: perforce.ravenbrook.com
2016-04-11 20:58:39 +01:00
Richard Brooksby
5a5c0f2138 Removing various fixed fixmes.
Copied from Perforce
 Change: 190957
 ServerID: perforce.ravenbrook.com
2016-04-11 18:58:36 +01:00
Richard Brooksby
ef6e2970ca Eliminating generated classof* and setclassof* functions in favour of checked poly macros.
Copied from Perforce
 Change: 190938
 ServerID: perforce.ravenbrook.com
2016-04-11 18:06:47 +01:00
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
1400111767 Class init functions get called before the arena is initialized, so make sure they initialize the event logger before logging anything.
Copied from Perforce
 Change: 190883
 ServerID: perforce.ravenbrook.com
2016-04-10 23:35:34 +01:00
Richard Brooksby
d303ed0aeb 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
7d83a6432c Fixing nulls in class methods revealed by more thoroughly applying class checking functions.
Copied from Perforce
 Change: 190842
 ServerID: perforce.ravenbrook.com
2016-04-08 20:00:23 +01:00
Richard Brooksby
24a1aaa4d8 Generating type-safe functions for getting and setting the class of instances.
Fixing warning revealed by GCC that I wasn't actually checking classes after init.
Fixing abstract classes so that they pass their own checks!

Copied from Perforce
 Change: 190837
 ServerID: perforce.ravenbrook.com
2016-04-08 19:50:12 +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
d3d57e828d Renaming protocolinst to inst and protocolclass to instclass to make naming consistent with other classes.
Copied from Perforce
 Change: 190822
 ServerID: perforce.ravenbrook.com
2016-04-08 17:51:20 +01:00
Richard Brooksby
484d3b77bf Removing always-zero offset from pool class structure.
Copied from Perforce
 Change: 190819
 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
Gareth Rees
6521d927eb Add accesssetcheck and check accessset arguments.
Copied from Perforce
 Change: 188251
 ServerID: perforce.ravenbrook.com
2015-09-04 20:15:36 +01:00
Gareth Rees
9dc8bd1e70 Because of the requirement to make popped objects dead in a timely fashion, we can only implement lightweight pops to an address in the buffer. in particular we can't support pending pops, which means that there's no need for the fields in the allocation point that support pending pops.
Copied from Perforce
 Change: 187232
 ServerID: perforce.ravenbrook.com
2014-10-13 12:46:28 +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
8b012960dc 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
5e11b7034a Catch-up merge from master sources @186536 to branch/2014-05-15/size.
Copied from Perforce
 Change: 186539
 ServerID: perforce.ravenbrook.com
2014-06-12 16:46:36 +01:00
Gareth Rees
00a5b8e436 Fix problems noted by rb in review <https://info.ravenbrook.com/mail/2014/06/11/15-16-51/0/>.
Copied from Perforce
 Change: 186537
 ServerID: perforce.ravenbrook.com
2014-06-12 16:24:39 +01:00