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

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Mon Apr 19 09:57:27 UTC 2021


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:

[cid:f1a64b9d-78f4-4480-bacf-75cff8b29d45]

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/0bc07749/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 151341 bytes
Desc: image.png
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20210419/0bc07749/attachment-0001.png>


More information about the Squeak-dev mailing list