Richard Brooksby
8484e7f184
Reducing boilerplate code using mustbea.
...
Copied from Perforce
Change: 190970
ServerID: perforce.ravenbrook.com
2016-04-12 00:58:04 +01:00
Richard Brooksby
c38a6a6d12
Removing a fixed fixme.
...
Copied from Perforce
Change: 190969
ServerID: perforce.ravenbrook.com
2016-04-12 00:57:49 +01:00
Richard Brooksby
c3068a987b
Fixing instclass initialisation of its own class.
...
Properly bracketing cast expression in CouldBeA.
Copied from Perforce
Change: 190968
ServerID: perforce.ravenbrook.com
2016-04-12 00:57:00 +01:00
Richard Brooksby
9719646f07
Commentary and design document improvements.
...
Copied from Perforce
Change: 190967
ServerID: perforce.ravenbrook.com
2016-04-12 00:09:17 +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
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
309fb8ec64
Implementing nextmethod and replacing all uses of superclass with it.
...
Copied from Perforce
Change: 190935
ServerID: perforce.ravenbrook.com
2016-04-11 16:54:39 +01:00
Richard Brooksby
bfa333b5c0
Making all static next-method calls look similar.
...
Copied from Perforce
Change: 190934
ServerID: perforce.ravenbrook.com
2016-04-11 16:35:43 +01:00
Richard Brooksby
aa4036fbfd
Implementing mustbea_critical and elision of mustbea assertions in different varieties.
...
Copied from Perforce
Change: 190925
ServerID: perforce.ravenbrook.com
2016-04-11 16:09:29 +01:00
Richard Brooksby
690df6974a
Using mustbea and couldbea when calling inst functions.
...
Copied from Perforce
Change: 190924
ServerID: perforce.ravenbrook.com
2016-04-11 15:17:24 +01:00
Richard Brooksby
72753f4484
Using mustbea to reduce boilerplate in client arenas, fotest, and the amc pool.
...
Copied from Perforce
Change: 190906
ServerID: perforce.ravenbrook.com
2016-04-11 14:57:38 +01:00
Richard Brooksby
8cd935ba7b
Using mustbea to reduce boilerplate in amcbuf and sncbuf methods.
...
Copied from Perforce
Change: 190905
ServerID: perforce.ravenbrook.com
2016-04-11 14:27:38 +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
538b18430f
Using superclass init and finish in the arena bootstrap and teardown.
...
Copied from Perforce
Change: 190895
ServerID: perforce.ravenbrook.com
2016-04-11 13:35:16 +01:00
Richard Brooksby
a71067ad72
Removing class typedefs made redundant by kinds.
...
Copied from Perforce
Change: 190894
ServerID: perforce.ravenbrook.com
2016-04-11 09:54:29 +01:00
Richard Brooksby
c06af39ff1
Turning buffer init methods the right way in, so that they each call the next method up the class hierarchy.
...
Copied from Perforce
Change: 190888
ServerID: perforce.ravenbrook.com
2016-04-11 07:10:15 +01:00
Richard Brooksby
d0d32eadbb
Fixing initialisation in segment splitting to use instinit.
...
Copied from Perforce
Change: 190887
ServerID: perforce.ravenbrook.com
2016-04-11 06:37:02 +01:00
Richard Brooksby
781457ad4e
Noting potential optimisation of superclass.
...
Copied from Perforce
Change: 190886
ServerID: perforce.ravenbrook.com
2016-04-11 06:36:28 +01:00
Richard Brooksby
d234a1f1a7
Minor tidying.
...
Copied from Perforce
Change: 190885
ServerID: perforce.ravenbrook.com
2016-04-10 23:48:13 +01:00
Richard Brooksby
7b73bba6e9
Removing obsolete comment about prime numbers.
...
Copied from Perforce
Change: 190884
ServerID: perforce.ravenbrook.com
2016-04-10 23:46:06 +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
429347256d
Turning segment init methods the right way in, so that they each call the next method up the class hierarchy.
...
Copied from Perforce
Change: 190882
ServerID: perforce.ravenbrook.com
2016-04-10 23:23:49 +01:00
Richard Brooksby
50fd841553
Checking in a classdef.h that matches the sources.
...
Copied from Perforce
Change: 190870
ServerID: perforce.ravenbrook.com
2016-04-10 19:37:31 +01:00
Richard Brooksby
64640669f9
Adding classdef.h. oops.
...
Copied from Perforce
Change: 190865
ServerID: perforce.ravenbrook.com
2016-04-10 19:20:32 +01:00
Richard Brooksby
c4b08f2f52
Demonstrating use of mustbea to remove boilerplate in pooln.
...
Copied from Perforce
Change: 190864
ServerID: perforce.ravenbrook.com
2016-04-10 18:10:30 +01:00
Richard Brooksby
cbe65b637e
Adding note about how amcinit should work.
...
Copied from Perforce
Change: 190859
ServerID: perforce.ravenbrook.com
2016-04-10 17:57:25 +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
b6219b10a6
Fixing level of instclass so that class checks work properly.
...
Copied from Perforce
Change: 190851
ServerID: perforce.ravenbrook.com
2016-04-10 12:33:47 +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
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
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
fc269fd07a
Using common code for class getters and setters.
...
Copied from Perforce
Change: 190836
ServerID: perforce.ravenbrook.com
2016-04-08 18:33:34 +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
dad08f0000
Eliminating issubclasspoly and replacing with compile-time constant test.
...
Copied from Perforce
Change: 190829
ServerID: perforce.ravenbrook.com
2016-04-08 17:51:21 +01:00
Richard Brooksby
65bbea0f0d
Replacing prime factor subclass test with array-based test, because the type ids were overflowing 32 bits.
...
Copied from Perforce
Change: 190828
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
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
f0cf348dc4
Adding an assert that can be used in expressions.
...
Copied from Perforce
Change: 190821
ServerID: perforce.ravenbrook.com
2016-04-08 17:51:20 +01:00
Richard Brooksby
cc725ee45b
Adding class-based checking macros.
...
Copied from Perforce
Change: 190820
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
313fd5d5da
Removing unused offset field in arena classes.
...
Copied from Perforce
Change: 190818
ServerID: perforce.ravenbrook.com
2016-04-08 17:51:19 +01:00