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

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Mon May 3 18:46:55 UTC 2021


Good analysis, thanks, and done !

Le lun. 3 mai 2021 à 15:52, Jaromir Matas <m at jaromir.net> a écrit :
>
> Hi Nicolas,
>
> >> If you approve the change, Exception>>resumeEvaluating will become
> >> obsolete
> >> and could be removed.
> >>
>
> > Sure, we should do so ASAP, less code = me happier :)
>
> I overlooked your use of #resumeEvaluating in ProgressInitiationException...
> so can't be removed.
>
> In that case #resumeEvaluating should probably incorporate the fix for
> #outer behavior as per #resumeUnchecked.
>
> 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"
> --add---->              handlerContext := ctxt tempAt: 2. "currHandlerContext in #outer"
>                 ctxt returnEvaluating: aBlock
>         ].
>
> To avoid code duplication it might make sense to just run #resumeUnchecked
> through #resumeEvaluating like this:
>
> resumeUnchecked: resumptionValue
>
>         self resumeEvaluating: [resumptionValue]
>
> best,
>
>
>
> -----
> ^[^ Jaromir
> --
> Sent from: http://forum.world.st/Squeak-Dev-f45488.html
>


More information about the Squeak-dev mailing list