OpenSmalltalk / opensmalltalk-vm

Cross-platform virtual machine for Squeak, Pharo, Cuis, and Newspeak.

Home Page:http://opensmalltalk.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Method dispatch for `ProtoObject`s is wrong

LinqLover opened this issue · comments

Observations in a current Trunk image with the latest VM RC:

  • Compiler evaluate: 'super foo' for: ProtoObject new.
    • expected: ⚡ MessageNotUnderstood: ProtoObject>>foo
    • actual: ⚡ MessageNotUnderstood: SmallInteger>>foo
  • Compiler evaluate: 'super bitCountOfByte' for: ProtoObject new.
    • expected: ⚡ MessageNotUnderstood: ProtoObject>>bitCountOfByte
    • actual: ⚡ MessageNotUnderstood: ProtoObject>>+ from ProtoObject(SmallInteger)>>bitCountOfByte

Note that in the image-side simulator, method lookup for ProtoObject may lead to crashes at the moment:

  • Compiler evaluate: 'super foo' for: ProtoObject new. (simulated)
    • ⚡ MessageNotUnderstood: UndefinedObject>>lookupSelector: from Context>>send:to:with:lookupIn:

I will happy to fix the image-side bugs to align them to the VM behavior. As for the VM side, it would be an interesting task, but would require more familiarization for me. 😉