Fear and loathing of the "perification" of Smalltalk
Klaus D. Witzel
klaus.witzel at cobss.com
Thu Sep 13 13:38:45 UTC 2007
Hi Igor,
on Thu, 13 Sep 2007 14:36:11 +0200, you wrote:
> I don't see how [...] values can be implemented without modifying VM.
> You need to call some primitive to activate a block and execute
> statements. Of course, having a source(or parse tree) , you can parse
> it and then convert each statement in separate block and execute them
> one by one. Then you don't need to modify VM code. But speed ...
What you describe is the implementation of {} sans VM mod, it's inlined by
the current compiler, and also the Decompiler knows how to decypher that.
> Also, some use patterns don't fit the purpose and can lead to errors
> and undefined behavior.
> Consider following:
>
> block := [ | temp | temp := 1. temp:= temp+1. temp ].
>
> and somewhere later:
>
> result := block doInParralell
... which is not the same as #values above and the latter can always be
inlined, no?
> Suppose you sending #doInParralell message to some unknown block
> (which contents is unknown at compile time).
... have a Smalltalk example of aBlock which contents is unknown at
compile time?
/Klaus
> It's very interesting
> what results will be.
>
More information about the Squeak-dev
mailing list
|