[Cuis-dev] Resuming on BlockCannotReturn exception

Juan Vuletich juan at cuis.st
Fri Dec 1 12:39:32 PST 2023


Hi Jaromir,

On 12/1/2023 4:31 PM, Jaromir Matas via Cuis-dev wrote:
> Hi Juan,
>
> Many thanks!
>
> > edit Cuis-Smalltalk-Dev/UserPrefs.txt to your liking
>
> perfect
>
> > You could do ./pullAllRepos.sh.
>
> that didn't help but having been encouraged I tried 
> ./clonePackageRepos.sh and then all core packages loaded
>
> > Anyway, unless you really want to load 'CorePackages', I'd just skip 
> that step.
>
> What I really wanted was BaseImageTests to access the tests. Normally 
> I don't do any Feature require - unless I need the tests. Is this 
> actually the right/easiest way to get there?

For that you only need the main Cuis-Smalltalk-Dev repo, and just 
evaluate `Feature require: 'BaseImageTests'`. Much quicker and simpler. 
And no breackage in optional packages will affect you.

> I'm enclosing the updated changesets.

Thanks. Just integrated them and pushed to GitHub.

> Two more unrelated questions:
>
> 1) I've noticed all underscore assignments in 
> #runUntilErrorOrReturnFrom have been replaced with ':=' - have I 
> missed something?

We are switching to saving all code in files with ':=' ANSI assignments, 
to help with interoperability with other Smalltalk dialects, but also 
for a better experience when viewing code with external tools. They are 
still displayed as a left arrow inside the image by default.

> 2) I'm a bit hesitant to ask but what is a "quick return"? I haven't 
> come across this term until Facundo updated the 
> #runUntilErrorOrReturnFrom: method.
>
> I can see
>
>         "Quick Push Const Methods"
>         (256 nil) "primitivePushSelf"
>         (257 nil) "primitivePushTrue"
>         (258 nil) "primitivePushFalse"
>         (259 nil) "primitivePushNil"
>         (260 nil) "primitivePushMinusOne"
>         (261 nil) "primitivePushZero"
>         (262 nil) "primitivePushOne"
>         (263 nil) "primitivePushTwo"
>
>         "Quick Push Inst Var Methods"
>         (264 519 nil) "primitiveLoadInstVar 0 - 255"
>
> but it still doesn't ring any bell why "quick return" ;)

Just do Show... / byteCodes in any browser on a method whose only code 
is to return self, true, false, nil, -1, 0, 1, 2 or an instance 
variable. This is done via those primitives you listed, meaning that 
there is no real method activation. It is an optimization that comes (I 
believe) from Smalltalk-80. See #isQuick, #isReturnSpecial, 
#isReturnField and #longPrintOn:indent: .

> Thanks again,
> best
> Jaromir
>
>

Thank you.
Cheers!

-- 
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/20231201/68c1a3a4/attachment.htm>


More information about the Cuis-dev mailing list