This fixes primitive 83 (primitivePerform), primitive 84 (primitivePerformWithArgs), and primitive 100 (primitivePerformWithArgsInSuperclass) for the following cases:
handle excess arguments and missing arguments correctly: properly fail the primitive and do not mess up the stack
handle #doesNotUnderstand:/#cannotInterpret: correctly: do not mess up the stack/arguments
handle mirror invocation correctly: do not send #doesNotUnderstand: to the mirror receiver
There were two underlying issues:
missing argCount check of the found method
findSelectorInClass confusingly manipulates the stack itself in the event of an irregular lookup (i.e., #doesNotUnderstand:/#cannotReturn:). This was not properly reflected in the perform primitives.
These changes, together with #158, fix the corresponding primitive tests in ContextTest as of KernelTests-ct.455 (Squeak 6.1Alpha).
This fixes primitive 83 (primitivePerform), primitive 84 (primitivePerformWithArgs), and primitive 100 (primitivePerformWithArgsInSuperclass) for the following cases:
There were two underlying issues:
These changes, together with #158, fix the corresponding primitive tests in ContextTest as of KernelTests-ct.455 (Squeak 6.1Alpha).