[squeak-dev] Re: [Vm-dev] About primitive for cleaning compiled
method cache
Igor Stasenko
siguctua at gmail.com
Thu Mar 14 02:18:03 UTC 2013
as a follow-up.. given the implementation of at:put:
i expected that following would work correctly:
| x y |
B methodDict removeKey: #foo ifAbsent: [ ].
x := B new bar.
B methodDict at: #foo put: (B>>#zork).
B methodDict at: #foo put: (B>>#zork).
y := B new bar.
{ x. y }
(a second at:put: shall trigger flushing the cache)..
yet it gives same answer:
#('foo' 'foo')
Conclusion: primitive 116 is NOT enough.
While method's comment says otherwise:
flushCache
"Tell the interpreter to remove all references to this method from
its method lookup cache, if it has one. This primitive must be called
whenever a method is redefined or removed.
NOTE: Only one of two selective flush methods (Symbol or
CompiledMethod) needs to be used."
<primitive: 116>
--
Best regards,
Igor Stasenko.
More information about the Squeak-dev
mailing list
|