opensmalltalk-vm icon indicating copy to clipboard operation
opensmalltalk-vm copied to clipboard

Method dispatch for `ProtoObject`s is wrong

Open LinqLover opened this issue 3 years ago • 0 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. 😉

LinqLover avatar Apr 28 '22 17:04 LinqLover