Title | wasMarked protocol is unnecessarily complex |
Status | closed |
Priority | nice |
Assigned user | Gareth Rees |
Organization | Ravenbrook |
Description | The protocol for using the wasMarked field of the ScanState structure is described in design.mps.fix [1]. The protocol is overly complex. |
Analysis | The protocol requires "all pool-specific fix methods must set the wasMarked field". This is unnecessary since the only place that this field is consulted is in MRGRefSegScan, and this stes wasMarked to TRUE before every fix. This means that it is only necessary for fix methods to set it to FALSE in the cases where the reference was not previously marked.
This results in most pool classes having a pointless dance where they set wasMarked to TRUE on entry and then clear it to FALSE if it is discovered not to be marked. |
How found | inspection |
Evidence | [1] https://www.ravenbrook.com/project/mps/master/design/fix |
Created by | Gareth Rees |
Created on | 2018-06-18 17:06:23 |
Last modified by | Gareth Rees |
Last modified on | 2018-06-28 16:52:17 |
History | 2018-06-18 GDR Created. |