[Vm-dev] 'Run object as method' is flawed in VM

Michael van der Gulik mikevdg at gmail.com
Wed Dec 9 20:10:40 UTC 2009

On Wed, Dec 9, 2009 at 6:39 PM, Igor Stasenko <siguctua at gmail.com> wrote:
> I tried to play with this feature and found that if i install a
> smallinteger into method dictionary as a method
> and then try to invoke that method, my VM is crashing.
> testCrashWithSmallInt
>        self class methodDict at: #answer10 put: 10.
>        self should: [self answer10] raise: MessageNotUnderstood.
>        self class basicRemoveSelector: #answer10.

Is this a feature that I don't know about? What is the expected behaviour?

I'd expect the VM to crash or fail if it tries to execute an object
rather than bytecodes.



More information about the Vm-dev mailing list