[Vm-dev] Pragmas in VMMaker (was: Cryptography plugins

David T. Lewis lewis at mail.msen.com
Thu Jul 22 03:26:33 UTC 2010


On Wed, Jul 21, 2010 at 07:48:22PM -0700, Eliot Miranda wrote:
>  
> On Wed, Jul 21, 2010 at 6:56 PM, David T. Lewis <lewis at mail.msen.com> wrote:
> >
> > Certainly for most of the folks on this list, doing VM work in
> > a recent Squeak, Pharo, or Cuis image is a reasonable expectation.
> > On the other hand, there may still be people who for various reasons
> > prefer to use other images, and it would be nice if the most up to
> > date VMMaker remains loadable in those images where possible.
> >
> 
> I don't see the rationale.  If one wants to produce a VM for an older image
> I don't see why one needs to be able to run the VMMaker in that image.  What
> am I missing?

I sincerely do not know. It may not matter to anyone at all, in which
case it will be best to move SqueakVM the pragma declarations. But if
it *does* matter, I want to ask and find out about it now, rather than
try to undo it later.

> > If anyone on the list *does* know of a need for VMMaker to work
> > on images that do not support pragmas, please speak up now so we
> > do not cause unnecessary problems.
> >
> > I am also curious about the motivation for using method annotations
> > here. Is it a style preference, or is there a functional benefit?
> >
> 
> They're much neater in that they need no associated implementation, and in
> the VMMaker's case since they're purely used for communicating with Slang
> that's goodness (I think pragmas having implementations is a good thing in a
> Smalltalk context, e.g. preferences, menu building etc).  It means the
> simulator doesn't execute them.  It means less work for Slang to extract
> them.  They're much easier to browse and analyse because the arguments are
> immediately available; with messages in bytecode one needs to compile the
> method and walk the parse tree to extract arguments.
> 
> I added quite a few pragmas, doNotGenerate, doNotGenerate: api api:
> asmLabel: cmacro: volatile, and it was much easier to do than the fake
> method in object, parse tree walk approach necessitated by the old scheme.
>  In short, leaner 'n meaner.
> 
> But the Slang in Cog does support the older source annotations.  TMethod &
> SmartSyntaxPluginTMethod recordDeclarations still walk the parse tree to
> check for old annotations, so the Cog Slang should, fingers crossed, still
> translate the current VMMaker Interpreter.  That would be a worth-while
> experiment to see if it produces a functional interpreter.
> 
> If you do think of moving forward to pragmas I have some scripts I used to
> convert the VMMaker to pragmas wen I started on Cog, but I think Lukas'
> Squeak/Pharo rewrite editor from the refactoring browser is a much better
> way of doing it.  I've recently taken the Cog interpreter out from under
> ObjectMemory using Lukas' fork of the rewrite editor.  Let me know and I can
> lend a hand developing a script to convert from null messages to pragmas.

Thanks for the explanation and for the offer to help. Let's let the matter
rest for a week or two and see if anyone has any objections, then do the
change. If you can provide the conversion scripts that you used for Cog,
that would be great.

Dave



More information about the Vm-dev mailing list