On Wed, May 23, 2012 at 11:54 AM, Eliot Miranda eliot.miranda@gmail.com wrote:
To not address your core questions, use of 188 is I think clunky. Instead, implementing the mirror primitives in the mirrors seems simple and efficient.
You find it clunky because you can't just call the primitive, you have to do a manual lookup to find the appropriate CompiledMethod first? Fair enough. I don't think it's an issue with mirrors, because the mirror encapsulates that clunky lookup behaviour, and lets us make us of it through a clean and simple protocol. I prefer a smaller, more general VM/image interface, with as much of the logic as possible in the image.
But 188 does have the following practical advantages:
- it's present in older VMs that are already out there - in the future we'll be able to make changes at the image level, rather than having to ship new VMs
The other thread on your debugger improvements would be moot if they had been based on 188 instead of custom primitives.
Putting the mirror primitives in ContextPart is insecure, since anyone can to thisContext object: foo instVarAt: n. But fixing this means a major design overhaul of the system re debugging and mirrors, so it can stand for now. (After all anyone can do instVarAt: now, so we're a ways away from a secure Newspeak-style sandbox).
Agreed.
Colin