[squeak-dev] The Trunk: Kernel-nice.1394.mcz

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Sun May 2 19:26:44 UTC 2021


Hi Jaromir,

Le dim. 2 mai 2021 à 15:36, Jaromir Matas <m at jaromir.net> a écrit :
>
> Hi Nicolas,
>
> This is a huge work! :) I've suggested a tiny change of #resignalAs in
> http://forum.world.st/The-Inbox-Kernel-jar-1398-mcz-td5129369.html: I think
> the exception should unwind straight to the signal context before
> resignalling. Resuming would break the #outer behavior - also see the test
> in http://forum.world.st/The-Inbox-Tests-jar-461-mcz-td5129368.html.
>

Ah yes, absolutely, I did not take enough time to think of it.
Indentation is a bit misleading, but the test is good.
Thanks for it!

> If you approve the change, Exception>>resumeEvaluating will become obsolete
> and could be removed.
>

Sure, we should do so ASAP, less code = me happier :)

> Thanks,
> Jaromir

No, thank you!

>
>
> commits-2 wrote
> > Item was changed:
> >   ----- Method: Exception>>resignalAs: (in category 'handling') -----
> >   resignalAs: replacementException
> >   "Signal an alternative exception in place of the receiver."
> >
> > + self resumeEvaluating: [replacementException signal]!
> > - self reactivateHandlers.
> > - self resumeUnchecked: replacementException signal!
> >
> >
> > Item was added:
> > + ----- Method: Exception>>resumeEvaluating: (in category 'handling')
> > -----
> > + resumeEvaluating: aBlock
> > + "Return result of evaluating aBlock as the value of #signal, unless this
> > was called after an #outer message, then return resumptionValue as the
> > value of #outer.
> > + The block is only evaluated after unwinding the stack."
> > +
> > + | ctxt |
> > + outerContext ifNil: [
> > + signalContext returnEvaluating: aBlock
> > + ] ifNotNil: [
> > + ctxt := outerContext.
> > + outerContext := ctxt tempAt: 1. "prevOuterContext in #outer"
> > + ctxt returnEvaluating: aBlock
> > + ].
> > + !
>
>
>
>
>
> -----
> ^[^ Jaromir
> --
> Sent from: http://forum.world.st/Squeak-Dev-f45488.html
>


More information about the Squeak-dev mailing list