[squeak-dev] stepping over non local return in a protected block

Jaromir Matas m at jaromir.net
Mon May 17 19:29:53 UTC 2021


Hi Christoph,


Christoph Thiede wrote
> Hi Jaromir,
> 
> thanks for the feedback. \2 and \3 were both minor slips which I have
> corrected in version 7 of the changeset, see:
> http://forum.world.st/BUG-REGRESSION-while-debugging-Generator-nextPut-tp5108125p5129807.html
> 
> \1: Fair question. I think I stumbled upon some situation where stepping
> *over* #runUntilErrorOrReturnFrom: has not worked for me without these
> lines. I just had inserted the "push: nil" without thinking about it in
> detail, just because it had also worked for me in Context class >>
> #contextEnsure: and #contextOn:do: in the last year (this was also a very
> interesting bug, you can read the full story in the mailing archives if
> you
> are interested). But yes, that is suspicious, I need to recheck this
> because
> I cannot reproduce the need for this patch.

I've updated
http://forum.world.st/BUG-s-in-Context-control-jump-runUntilErrorOrReturnFrom-td5107263.html
with my explanation why I /think/ #runUntilErrorOrReturnFrom: works
correctly.


Christoph Thiede wrote
> \2: This was indeed a slip because I forgot to update the image. I have
> moved my patch to #findNextHandlerContext - it makes the method robust
> against bottom-contexts that do not have a sender (i.e., sender is nil).

The changeset still seems to have the old version of
#runUntilErrorOrReturnFrom: and #nextHandlerContext nixing Nicolas's changes
made in the meantime... 


Christoph Thiede wrote
> \3: Ah, in this case, the unwind context was already marked as complete.
> :-)
> Since we appear to need the debugger information anyway, I have moved the
> #informDebuggerAboutContextSwitchTo: in #resume:through: before the check
> so
> your example now should work, too.

Yes!, my non-local examples work OK now, your scenarios as well; I'll keep
it in my images to give it a ride :) As for the general approach - I look
forward to learning from experts ;)

later,




-----
^[^ Jaromir
--
Sent from: http://forum.world.st/Squeak-Dev-f45488.html


More information about the Squeak-dev mailing list