Title | Pool generations don't refer to the generation they belong to |
Status | closed |
Priority | nice |
Assigned user | Gareth Rees |
Organization | Ravenbrook |
Description | A pool generation belongs to a generation (via a ring in the generation). But it does not have a reference to the generation! Instead it has a reference to a chain and a generation number. The generation number is either an index into the array of generations in the chain, or else it is one more than the highest generation in the chain, in which case it is the arena top generation. See the GenDesc and PoolGen structures in chain.h [1]. This is unnecessarily complex: every time you want to look up the generation that a pool generation belongs to, you have to remember the top generation logic. So this logic is repeated in several places in locus.c. [2] |
Analysis | It would be simpler and clearer is a pool generation referenced its generation directly. The logic for associating a pool generation with the arena’s top generation would then only appear in one place (the new function ChainGen). |
How found | inspection |
Evidence | [1] <https://info.ravenbrook.com/project/mps/master/code/chain.h >[2] < https://info.ravenbrook.com/project/mps/master/code/locus.c > |
Created by | Gareth Rees |
Created on | 2014-04-30 10:15:37 |
Last modified by | Gareth Rees |
Last modified on | 2014-05-19 15:56:52 |
History | 2014-04-30 GDR Created. |
Change | Effect | Date | User | Description |
---|---|---|---|---|
186190 | closed | 2014-05-19 15:56:49 | Gareth Rees | Merge branch/2014-04-30/poolgen into the master sources. |