Callback Entry Points
As mentioned above, when the VM's generic callback entry point is called from a callback thunk, the VM sends a message to the Processor object, i.e. the singleton instance of ProcessorScheduler. In the case of normal callbacks the message with selector callback:withArgumentsAt:cookie:is set, and in the case of COM/virtual method invocations, #comCallback:id:subid:withArgumentsAt:cookie: is sent. The callbacks are translated into a normal Smalltalk message send to either the ExternalCallback object, or COMObjectStub, respectively, with object arguments being instantiated to wrap the raw C data types on the stack.