We're working with Hernan Wilkinson on the Live Typing VM implementation
and have recently found a very strange behaviour. We are trying to capture
the type of objects stored within an OrderedCollection by intercepting the
at:put: method of Object, since that's what ends up being executed
internally by the OrderedCollection using an internal Array. To identify
whether the at:put: is being executed from that OrderCollection context we
inspect the MethodContext nesting.
So far we have intercepted the StackInterpreter commonAtPut: to execute our
logic, which attempts to retrieve the current MethodContext, analyse up to
4 levels up looking for an OrderedCollection receiver and in that case
store the type information.
The problem is that our code never executes on a regular execution but does
while debugging. In fact, it works as expected when we simply hit "Proceed"
but fails when we hit "Over" instead, which is quite unexpected.
We would like to know if there's anything we might be missing here about
the execution of primitives like at:put: or acquiring the current
MethodContext from the VM side.