MPS issue job004073

TitlewasMarked protocol is unnecessarily complex
Assigned userGareth Rees
DescriptionThe protocol for using the wasMarked field of the ScanState structure is described in design.mps.fix [1]. The protocol is overly complex.
AnalysisThe 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 foundinspection
Created byGareth Rees
Created on2018-06-18 17:06:23
Last modified byGareth Rees
Last modified on2018-06-28 16:52:17
History2018-06-18 GDR Created.


Change Effect Date User Description
193940 closed 2018-06-18 20:03:13 Gareth Rees Simplify the wasMarked protocol.