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
28814fc67c
Avoid "result of 32-bit shift implicitly converted to 64 bits" warning from visual c.
...
Check AWL pool generation.
Update design.
Copied from Perforce
Change: 193076
ServerID: perforce.ravenbrook.com
2017-03-31 09:03:38 +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
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
0f4564a71b
Merge design.mps.class-interface into design.mps.pool (as suggested by pekka p. pirinen on 1999-07-20).
...
Bring pool class method descriptions up to date.
Document bufferClass, bufferFill, bufferEmpty, totalSize, freeSize methods.
Document generic instance methods at design.mps.protocol.method.
Copied from Perforce
Change: 192642
ServerID: perforce.ravenbrook.com
2016-10-19 15:34:35 +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
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
Gareth Rees
20e756ada8
Catch-up merge from master sources to branch/2016-04-21/amswalk.
...
Copied from Perforce
Change: 192181
ServerID: perforce.ravenbrook.com
2016-09-05 15:48:47 +01:00
Gareth Rees
c898410a63
Catch-up merge from the master sources to branch/2016-04-23/inst-methods.
...
Copied from Perforce
Change: 192176
ServerID: perforce.ravenbrook.com
2016-09-05 15:31:34 +01:00
Gareth Rees
e3951fca1e
Add _critical to assertions on the critical path for manual-allocation-bound programs using mvff. this brings the hot/rash ratio for "djbench mvff" down from over 150% to about 130%.
...
Copied from Perforce
Change: 192148
ServerID: perforce.ravenbrook.com
2016-09-04 19:20:05 +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
Gareth Rees
67e11c96e5
Catch-up merge from master sources to branch/2016-04-21/amswalk.
...
Copied from Perforce
Change: 191531
ServerID: perforce.ravenbrook.com
2016-04-21 20:56:05 +01:00
Gareth Rees
82690aa532
Untabify.
...
Copied from Perforce
Change: 191528
ServerID: perforce.ravenbrook.com
2016-04-21 20:50:45 +01:00
Richard Brooksby
4be15a5b0b
Catch-up merge from master sources to branch/2016-04-08/protidying.
...
Copied from Perforce
Change: 191471
ServerID: perforce.ravenbrook.com
2016-04-21 14:46:10 +01:00
Richard Brooksby
d249780b2d
Enforcing rules about class overrides that were dropped in changelist 190837.
...
Copied from Perforce
Change: 191453
ServerID: perforce.ravenbrook.com
2016-04-21 13:41:27 +01:00
Richard Brooksby
d618f77b2e
Removing unused (and useless) poolfix macro.
...
Copied from Perforce
Change: 191407
ServerID: perforce.ravenbrook.com
2016-04-21 08:59:52 +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
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
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
8d776db4f2
Converting many uses of classof* to method macros.
...
Copied from Perforce
Change: 190937
ServerID: perforce.ravenbrook.com
2016-04-11 17:59:36 +01:00
Richard Brooksby
6d8d4373c9
Checking that classes are the right kind using signatures.
...
Copied from Perforce
Change: 190936
ServerID: perforce.ravenbrook.com
2016-04-11 17:38: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
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
907494aa56
Adding instinit and instfinish and using them as next methods in seginit, segfinish, etc.
...
Copied from Perforce
Change: 190857
ServerID: perforce.ravenbrook.com
2016-04-10 15:33:17 +01:00
Richard Brooksby
cf29dcc98d
Making arenas properly inherit from instances, and converting remaining method calls to use the method macro, while noting uses which are inside-out.
...
Copied from Perforce
Change: 190856
ServerID: perforce.ravenbrook.com
2016-04-10 14:00:55 +01:00
Richard Brooksby
9480adaf7c
Fixing mustbea to not return a void *.
...
Copied from Perforce
Change: 190849
ServerID: perforce.ravenbrook.com
2016-04-08 20:29:33 +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
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
9583c0f68a
Merging branch mps/branch/2016-03-13/without-reservation into master sources.
...
Copied from Perforce
Change: 190106
ServerID: perforce.ravenbrook.com
2016-03-15 13:19:27 +00:00