[squeak-dev] Request for feedback: mirrors

Colin Putney colin at wiresong.com
Thu May 24 00:34:56 UTC 2012


On Wed, May 23, 2012 at 5:13 PM, Igor Stasenko <siguctua at gmail.com> wrote:
> ok, i checked your implementation and now i see where you doing lookup

[snip]

> ObjectVmMirror>>fixedAt: anInteger
>        ^ self execute: GetFixedSlotMethod
>                arguments: {anInteger}
>
> where GetFixedSlotMethod is a class variable holding an appropriate
> CompiledMethod instance,
> which you can initialize just once at class initialization (and
> reinitialize if it changes).
>
> and #execute:arguments: is method which using prim 188 for executing
> given method
> with object as receiver.

Sure, that would be cleaner and a bit faster. I'll make that change, thanks.

I don't think it'll please Eliot though - we still have to get the
CompiledMethod from *somewhere* even if it's a class variable.

Colin


More information about the Squeak-dev mailing list