[squeak-dev] Re: New Window VM (Closures, FT2Plugin, Large Cursors)
Klaus D. Witzel
klaus.witzel at cobss.com
Tue Mar 10 08:48:20 UTC 2009
Hi Eliot,
On Tue, 10 Mar 2009 01:04:29 +0100, Eliot Miranda wrote:
> Hi Klaus,
>
> On Mon, Mar 9, 2009 at 11:04 AM, Klaus D. Witzel wrote:
...
>> I've seen that one of the differences between the Encoder*XYZ's is
>> #supportsClosureOpcodes being true/false but also #generateAsClosure
>> plays a
>> role. So the *Closures suffix is short for *EmitClosuresBytecode? Also,
>> blocks are never emitted the old (non-closure) way?
>
>
> The scheme is that by choosing the encoder one can choose the type of
> code generated. So that e.g. if you say
>
> (Parser new
> encoderClass: EncoderForV3PlusClosures;
> parse: someString readStream class: MyClass)
> generate: #(0 0 0 0)
>
> you'll get closure code and if you say
>
> (Parser new
> encoderClass: EncoderForV3;
> parse: someString readStream class: MyClass)
> generate: #(0 0 0 0)
>
> you'll get pre-closure old-block code.
Okay thanks, perfectly clear now.
...
> And on the wrong VM it'll crash. Only the CLosure VM that people are
> providing right now can run both new and old code. The StackVM we have
> in
> Qwaq (that I hope will be released sometime) will only run Closure code
> and die horribly if given old block code.
This implies that any test*ABC method which compiles source code and
passes the wrong Encoder*XYZ to Parser can crash its VM. So one has to
check, in such tests, what VM type is running. How can the VM be queried
for that?
/Klaus
--
"If at first, the idea is not absurd, then there is no hope for it".
Albert Einstein
More information about the Squeak-dev
mailing list
|