[squeak-dev] Idioms | How to send messages in Context?

Marcel Taeumel marcel.taeumel at hpi.de
Mon Apr 19 10:46:44 UTC 2021


Hi Christoph,

makes sense. Thank you!

Best,
Marcel
Am 19.04.2021 11:57:39 schrieb Thiede, Christoph <christoph.thiede at student.hpi.uni-potsdam.de>:
Hi Marcel,

#cannotReturn: is put onto the stack of the process being executed/simulated. #send:to:with: is part of the simulation protocol. Analogously, #resume:through: will appear on the executed process stack whereas #return:from: is used by the simulator as stated in the comment. :-) I think these methods are already arranged in two different protocols, which are "controlling" for the execution perspective and "instruction decoding" for the simulation perspective.

Best,
Christoph
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Taeumel, Marcel
Gesendet: Montag, 19. April 2021 11:32:53
An: squeak-dev
Betreff: [squeak-dev] Idioms | How to send messages in Context?
 
Hi all!

Take a look at this:



When would a context use #send:to:with: and when just directly send it?

self send: #cannotReturn: to: self with: {value}.
self cannotReturn: value.

self send: #cannotReturn:to: to: self with: {value. self}.

self cannotReturn: value to: self.

There are other examples. See:
Context >> #jump:if:
Context >> #return:from:

Best,
Marcel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20210419/d8cff045/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 151341 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20210419/d8cff045/attachment-0001.png>


More information about the Squeak-dev mailing list