[BUG] Block arguments are shared across blocks

Lukas Renggli renggli at gmail.com
Thu Aug 24 10:02:26 UTC 2006


> Yes. And if the compiler/parser where running on a COMPUTER, an
> appropriate error message could be issued: 'arg name cannot be resused' ;-)

It doesn't make sense that the two arguments that are declared in
different scopes are mapped to the same memory slot, even-tough they
have the same name.

Sorry, if this has been already reported before. I know that is is
probably difficult to fix in the old compiler, I just wanted to make
people aware of it. There are other critical concurrency issues in
Squeak I reported before, this is just another one my friends
discovered yesterday. This morning I wrote a test for it, so that the
community knows when it is fixed.

I would suggest to add such tests to the collection of Kernel Tests
even if there are no fixes to be expected soon, so that everybody is
aware that there are things in Squeak that are simply broken (by
design).

> >> Isn't this a direct consequence of the fact that block arguments are
> >> just temps in disguise?

Exactly, if you have a look at the byte-code it reads the same
temp-var. In VisualWorks it is using a different temp-var and this is,
I think, what everybody would expect.

Lukas

-- 
Lukas Renggli
http://www.lukas-renggli.ch



More information about the Squeak-dev mailing list