[Cuis-dev] Code duplication around unwinding
Jaromir Matas
mail at jaromir.net
Wed Mar 1 05:19:36 PST 2023
Hi Juan,
> A quick review of the code doesn't obviously seem equivalent (at least in Cuis).
I only meant the code should have the same common return and exception return *semantics*. The algorithm is more general and hence a bit more complicated and in theory may have some side effects compared to using plain #value.
> Still, if you see value here, I can devote more time to try to understand the differences.
Not yet; the only reason I posted the changeset was to get rid of the code duplicities and made the code a bit more readable. It brings *no real benefit* yet. I don’t really know if there’s more to gain but the idea to extend the common and exception return unwind semantics similarly as has been done with the termination unwind semantics is still on my list.
Best,
Jaromir
From: Juan Vuletich via Cuis-dev<mailto:cuis-dev at lists.cuis.st>
Sent: Tuesday, February 28, 2023 19:37
To: Discussion of Cuis Smalltalk<mailto:cuis-dev at lists.cuis.st>
Cc: Juan Vuletich<mailto:juan at cuis.st>; Jaromir Matas<mailto:mail at jaromir.net>; Hernán Wilkinson<mailto:hernan.wilkinson at 10pines.com>
Subject: Re: [Cuis-dev] Code duplication around unwinding
On 2/24/2023 7:16 PM, Jaromir Matas via Cuis-dev wrote:
Hi Juan,
this is the latest Squeak trunk version replacing all duplicate unwind code with #unwindTo:safely: (sent already as part of the other changeset with #terminate).
The modified version of #unwindTo: just adds a Boolean distinguishing between the "old" unwind semantics, i.e. only evaluating unwind blocks that haven't started executing yet, and the "new" unwind semantics applied in #terminate (safely: true enables the new semantics).
As a bonus we can experiment with setting safely: true even for "normal" returns, extending the unwind semantics for non-local returns and exceptions. It's more or less working but haven't been tested properly so this is my project for later this year :)
Best regards,
Jaromir
--
Jaromír Matas
mail at jaromir.net<mailto:mail at jaromir.net>
Hi Jaromir,
A quick review of the code doesn't obviously seem equivalent (at least in Cuis).
Still, if you see value here, I can devote more time to try to understand the differences.
Thanks,
--
Juan Vuletich
cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
linkedin.com/in/juan-vuletich-75611b3
twitter.com/JuanVuletich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20230301/f3b5a422/attachment-0001.htm>
More information about the Cuis-dev
mailing list