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

Jaromir Matas m at jaromir.net
Sun May 2 13:36:26 UTC 2021


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.

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

Thanks,
Jaromir


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