MPS issue job004065

TitleScan area functions not flexible enough
Statusclosed
Priorityoptional
Assigned userDavid Lovemore
OrganizationRavenbrook
DescriptionClasp has a pool(s) with pointer tag bits 0?1, that is, both 001 and 011 represent pointers [1]. The reason there are two tags, is there is one for pointers and one specifically for cons cells. This is not handled by existing area scanning functions.
AnalysisThe area scanning functions in the MPS use the same mask for masking out the tag bits to make a reference and comparing the tag bits. This doesn't allow for tag bits that can be unspecified. Either we add in this specific functionality (two different masks), or add a more general modification to allow one to specify a more general way of testing tag bits, e.g. by specifiying a function to call for the test.

The MPS Reference [2] says, "Various functions in the MPS interface accept area scanners as arguments so that the client program can specify how to scan special areas such as the control stack. The MPS provides some area scanners for common situations but the client program can provide its own. If you want to develop your own area scanner you can start by adapting the scanners, found in scan.c in the MPS source code."

So in this case I think it is fine for Clasp to provide its own area scanning function based on the code in scan.c. This code is implemented using only the MPS public interface so that clients can use it as a basis for their own scanners.
How foundcustomer
Evidence[1] https://info.ravenbrook.com/mail/2018/06/13/09-35-02/0/
[2] https://www.ravenbrook.com/project/mps.../html/topic/scanning.html#area-scanners
Created byDavid Lovemore
Created on2018-06-13 10:40:52
Last modified byGareth Rees
Last modified on2018-08-28 11:14:19
History2018-06-13 DL Created.
2018-06-15 GDR Closed as explained in the Analysis.