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

Jaromir Matas m at jaromir.net
Mon May 3 13:52:06 UTC 2021


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