Title | RankAMBIG is misleadingly used to mean "minimum rank" |
Status | closed |
Priority | nice |
Assigned user | Gareth Rees |
Organization | Ravenbrook |
Description | GRM [1]: "We have the concept of the maximum rank (RankMAX), and we often use the minimum rank, but assume it to be RankAMBIG. This is storing up serious problems for the future. We should have a RankMIN, and change uses of RankAMBIG as appropriate." |
Analysis | The cases where RankMIN needs be used are as follows: traceFlip: for(rank = RankAMBIG; rank <= RankEXACT; ++rank) { TraceCreate: trace->band = RankAMBIG; /* Required to be the earliest rank. */ ArenaRootsWalk: for(rank = RankAMBIG; rank < RankLIMIT; ++rank) { traceFindGrey: /* then successively earlier ones. Slight hack: We never */ /* expect to find any segments of RankAMBIG, so we use */ /* this as a terminating condition for the loop. */ for(rank = band; rank > RankAMBIG; --rank) { TraceRankForAccess: band = RankAMBIG; /* initialize band to avoid warning */ |
How found | inspection |
Evidence | [1] https://info.ravenbrook.com/project/mp...2001-11-05/mmprevol/request/mps/160097/ |
Created by | Gareth Rees |
Created on | 2014-10-01 20:09:36 |
Last modified by | Gareth Rees |
Last modified on | 2014-10-07 22:31:12 |
History | 2014-10-01 GDR Created. |
Change | Effect | Date | User | Description |
---|---|---|---|---|
187156 | closed | 2014-10-07 22:31:12 | Gareth Rees | New constant RankMIN gives the minimum rank. Use this (rather than 0 or RankAMBIG) to better express the intention. |