On 5/23/2012 20:51, Eliot Miranda wrote:
So given that the Interpreter VM now supports the mirror primitives, does anyone object if I add the debugger changes to trunk that use the mirror primitives and hence make accurate debugging of proxies possible? The downside of doing this is that the debugger will be broken on older VMs.
It should be possible to write the mirror prims relatively safely, e.g.:
object: anObject instVarAt: anIndex "Primitive. Answer a fixed variable in an object. The numbering of the variables corresponds to the named instance variables. Fail if the index is not an Integer or is not the index of a fixed variable. Essential for the debugger. See Object documentation whatIsAPrimitive."
<primitive: 73> anIndex <= (self objectClass: anObject) instSize ifTrue:["Assume mirror primitives are missing" ^anObject instVarAt: index] ifFalse:["Access beyond fixed variables." ^self object: anObject basicAt: anIndex - (self objectClass: anObject) instSize].
Cheers, - Andreas