MPS issue job001151

TitleFormat methods can't look at other data
Statusopen
Priorityoptional
Assigned userRichard Brooksby
OrganizationRavenbrook
DescriptionFormat methods are restricted to only looking at the object under consideration, because they run under special circumstances within the MPS (i.e. during a trace, within the shield, etc.). This is inconvenient for common object formats which use wrappers or class objects to encode format information. We solved this in Dylan by putting the wrappers in a special place and preventing them from being protected or moving, but this is inflexible. We should provide a better mechanism.
AnalysisThe format methods could look at data other than the object provided that they somehow tell the MPS that they are doing so. This would allow the MPS to lower the shield and prevent horrors such as recursive exceptions. The details of this need to be worked out and documented, and an interface designed that will be both convenient and fast for format methods (especially scanners) to use.

One solution is to give client access to ShieldExpose and ShieldCover. We might have to beef up the checking and diagnostics from the shield, because mistakes with these are going to be hard to debug. Better would be to give client access to ArenaPeek and ArenaPoke -- those are easier to use safely.

See also job003357.
How foundunknown
EvidenceRaw notes from Configura workshop <http://info.ravenbrook.com/mail/2005/02/28/12-40-49/0.txt>.
Observed in1.105.0
Created byRichard Brooksby
Created on2005-03-09 18:18:24
Last modified byGareth Rees
Last modified on2020-09-06 18:50:27
History2005-03-09 RB Created.
2013-05-25 RB Added suggested solution using ShieldExpose and ShieldCover.
2013-06-16 RB Downgraded to "optional" as it is not affecting anyone yet.