Next: , Previous: , Up: CompiledMethod   [Index]

1.40.9 CompiledMethod: invoking

valueWithReceiver: anObject withArguments: args

Execute the method within anObject, passing the elements of the args Array as parameters. The method need not reside on the hierarchy from the receiver’s class to Object – it need not reside at all in a MethodDictionary, in fact – but doing bad things will compromise stability of the Smalltalk virtual machine (and don’t blame anybody but yourself).

If the flags field of the method header is 6, this method instead provides a hook from which the virtual machine can call back whenever execution of the method is requested. In this case, invoking the method would cause an infinite loop (the VM asks the method to run, the method asks the VM to invoke it, and so on), so this method fails with a #subclassResponsibility error.