heads-up on sqVirtualMachine harmonization

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

heads-up on sqVirtualMachine harmonization

Eliot Miranda-2
 
Hi All, but especially vm-devs,

    recently Andreas has started merging trunk's plugin code with Cog's plugin code, by making Cog's platforms/Cross/plugins and platforms/win32/plugins svn external references to the corresponding directories in trunk, which IMO is exactly the right thing to do.  Alas, it broke the Cog build since in trunk's platforms/Cross/plugins/IA32ABI (the Alien plugin) are special versions of sqVirtualMachine.[ch] which have support for the Alien plugin not present in trunk's platforms/Cross/vm/sqVirtualMachine.[ch], and these special versions are obsolete, the versions in Cog's platforms/Cross/vm/sqVirtualMachine.[ch] being the necessary ones.

The correct fix for Cog is to delete the obsolete special versions of sqVirtualMachine.[ch] in platforms/Cross/plugins/IA32ABI.  Doing this, however, would break the trunk build since trunk's  platforms/Cross/vm/sqVirtualMachine.[ch] is lacking support for the IA32ABI/Alien plugin, being VM_PROXY_MINOR = 8, whereas Cog's is VM_PROXY_MINOR = 12.

So how to fix this?  One can't simply replace trunk's VM_PROXY_MINOR = 8 one with Cog's VM_PROXY_MINOR = 12 one since the trunk interpreter lacks the necessary new support functions (e.g. such as sendInvokeCallbackContext, see everything selected by #if VM_PROXY_MINOR > 8 et al in http://www.squeakvm.org/svn/squeak/branches/Cog/platforms/Cross/vm/sqVirtualMachine.h).  hence doing so will break the trunk build.  But it /is/ safe to use Cog's sqVirtualMachine.[ch] provided that #define VM_PROXY_MINOR 8 is in effect.  So what we want is for #define VM_PROXY_MINOR 8 to be in effect for trunk and #define VM_PROXY_MINOR 12 to be in effect for Cog.  This could be done on the command line, but that would break people's in place builds, require lots of effort to configs etc, etc.

The better way is to define VM_PROXY_MINOR in interp.h and include interp.h in sqVirtualMachine.h.  That way the base Interpreter can state it only supports version 8 of the protocol, and the files in platforms/Cross/plugins/IA32ABI can test VM_PROXY_MINOR to ifdef out code that requires VM_PROXY_MINOR > 8.  The define in sqVirtualMachine.h needs to default to VM_PROXY_MINOR = 8 since the current VMMaker packages don't generate an interp.h that contains a define for VM_PROXY_MINOR.

So the heads up is that today I will attempt to
a) merge Cog's platforms/Cross/vm/sqVirtualMachine.[ch] into trunk's platforms/Cross/vm/sqVirtualMachine.[ch], with VM_PROXY_MINOR defaulting to 8, and sqVirtualMachine.h including interp.h.
b) update Cog's VMMaker to generate a src/vm/interp.h that includes #define VM_PROXY_MINOR 12.
c) update trunk's VMMaker to generate a src/vm/interp.h that includes #define VM_PROXY_MINOR 8.

OK?

best
Eliot
Reply | Threaded
Open this post in threaded view
|

Re: heads-up on sqVirtualMachine harmonization

Eliot Miranda-2
 


On Thu, Jun 16, 2011 at 12:06 PM, Eliot Miranda <[hidden email]> wrote:
Hi All, but especially vm-devs,

    recently Andreas has started merging trunk's plugin code with Cog's plugin code, by making Cog's platforms/Cross/plugins and platforms/win32/plugins svn external references to the corresponding directories in trunk, which IMO is exactly the right thing to do.  Alas, it broke the Cog build since in trunk's platforms/Cross/plugins/IA32ABI (the Alien plugin) are special versions of sqVirtualMachine.[ch] which have support for the Alien plugin not present in trunk's platforms/Cross/vm/sqVirtualMachine.[ch], and these special versions are obsolete, the versions in Cog's platforms/Cross/vm/sqVirtualMachine.[ch] being the necessary ones.

The correct fix for Cog is to delete the obsolete special versions of sqVirtualMachine.[ch] in platforms/Cross/plugins/IA32ABI.  Doing this, however, would break the trunk build since trunk's  platforms/Cross/vm/sqVirtualMachine.[ch] is lacking support for the IA32ABI/Alien plugin, being VM_PROXY_MINOR = 8, whereas Cog's is VM_PROXY_MINOR = 12.

So how to fix this?  One can't simply replace trunk's VM_PROXY_MINOR = 8 one with Cog's VM_PROXY_MINOR = 12 one since the trunk interpreter lacks the necessary new support functions (e.g. such as sendInvokeCallbackContext, see everything selected by #if VM_PROXY_MINOR > 8 et al in http://www.squeakvm.org/svn/squeak/branches/Cog/platforms/Cross/vm/sqVirtualMachine.h).  hence doing so will break the trunk build.  But it /is/ safe to use Cog's sqVirtualMachine.[ch] provided that #define VM_PROXY_MINOR 8 is in effect.  So what we want is for #define VM_PROXY_MINOR 8 to be in effect for trunk and #define VM_PROXY_MINOR 12 to be in effect for Cog.  This could be done on the command line, but that would break people's in place builds, require lots of effort to configs etc, etc.

The better way is to define VM_PROXY_MINOR in interp.h and include interp.h in sqVirtualMachine.h.  That way the base Interpreter can state it only supports version 8 of the protocol, and the files in platforms/Cross/plugins/IA32ABI can test VM_PROXY_MINOR to ifdef out code that requires VM_PROXY_MINOR > 8.  The define in sqVirtualMachine.h needs to default to VM_PROXY_MINOR = 8 since the current VMMaker packages don't generate an interp.h that contains a define for VM_PROXY_MINOR.

So the heads up is that today I will attempt to
a) merge Cog's platforms/Cross/vm/sqVirtualMachine.[ch] into trunk's platforms/Cross/vm/sqVirtualMachine.[ch], with VM_PROXY_MINOR defaulting to 8, and sqVirtualMachine.h including interp.h.
b) update Cog's VMMaker to generate a src/vm/interp.h that includes #define VM_PROXY_MINOR 12.
c) update trunk's VMMaker to generate a src/vm/interp.h that includes #define VM_PROXY_MINOR 8.

and
  e) nuke <a href="http://squeakvm.org/svn/squeak/trunk/platforms/Cross/plugins/IA32ABI/sqVirtualMachine.[ch]">http://squeakvm.org/svn/squeak/trunk/platforms/Cross/plugins/IA32ABI/sqVirtualMachine.[ch]
  f) make trunk's platforms/Cross/plugins/IA32ABI/ia32abicc.c compile, albeit with reduced functionality, if VM_PROXY_MINOR = 8.
 
OK?

best,
Eliot

OK?

best
Eliot

Reply | Threaded
Open this post in threaded view
|

Re: heads-up on sqVirtualMachine harmonization

David T. Lewis
 
On Thu, Jun 16, 2011 at 12:13:04PM -0700, Eliot Miranda wrote:

>  
> On Thu, Jun 16, 2011 at 12:06 PM, Eliot Miranda <[hidden email]>wrote:
>
> > Hi All, but especially vm-devs,
> >
> >     recently Andreas has started merging trunk's plugin code with Cog's
> > plugin code, by making Cog's platforms/Cross/plugins and
> > platforms/win32/plugins svn external references to the corresponding
> > directories in trunk, which IMO is exactly the right thing to do.  Alas, it
> > broke the Cog build since in trunk's platforms/Cross/plugins/IA32ABI (the
> > Alien plugin) are special versions of sqVirtualMachine.[ch] which have
> > support for the Alien plugin not present in trunk's
> > platforms/Cross/vm/sqVirtualMachine.[ch], and these special versions are
> > obsolete, the versions in Cog's platforms/Cross/vm/sqVirtualMachine.[ch]
> > being the necessary ones.
> >
> > The correct fix for Cog is to delete the obsolete special versions of
> > sqVirtualMachine.[ch] in platforms/Cross/plugins/IA32ABI.  Doing this,
> > however, would break the trunk build since
> > trunk's  platforms/Cross/vm/sqVirtualMachine.[ch] is lacking support for the
> > IA32ABI/Alien plugin, being VM_PROXY_MINOR = 8, whereas Cog's
> > is VM_PROXY_MINOR = 12.
> >
> > So how to fix this?  One can't simply replace trunk's VM_PROXY_MINOR = 8
> > one with Cog's VM_PROXY_MINOR = 12 one since the trunk interpreter lacks the
> > necessary new support functions (e.g. such as sendInvokeCallbackContext, see
> > everything selected by #if VM_PROXY_MINOR > 8 et al in
> > http://www.squeakvm.org/svn/squeak/branches/Cog/platforms/Cross/vm/sqVirtualMachine.h).
> >  hence doing so will break the trunk build.  But it /is/ safe to use
> > Cog's sqVirtualMachine.[ch] provided that #define VM_PROXY_MINOR 8 is in
> > effect.  So what we want is for #define VM_PROXY_MINOR 8 to be in effect for
> > trunk and #define VM_PROXY_MINOR 12 to be in effect for Cog.  This could be
> > done on the command line, but that would break people's in place builds,
> > require lots of effort to configs etc, etc.
> >
> > The better way is to define VM_PROXY_MINOR in interp.h and include interp.h
> > in sqVirtualMachine.h.  That way the base Interpreter can state it only
> > supports version 8 of the protocol, and the files
> > in platforms/Cross/plugins/IA32ABI can test VM_PROXY_MINOR to ifdef out code
> > that requires VM_PROXY_MINOR > 8.  The define in sqVirtualMachine.h needs to
> > default to VM_PROXY_MINOR = 8 since the current VMMaker packages don't
> > generate an interp.h that contains a define for VM_PROXY_MINOR.
> >
> > So the heads up is that today I will attempt to
> > a) merge Cog's platforms/Cross/vm/sqVirtualMachine.[ch] into
> > trunk's platforms/Cross/vm/sqVirtualMachine.[ch], with VM_PROXY_MINOR
> > defaulting to 8, and sqVirtualMachine.h including interp.h.
> > b) update Cog's VMMaker to generate a src/vm/interp.h that includes #define
> > VM_PROXY_MINOR 12.
> > c) update trunk's VMMaker to generate a src/vm/interp.h that
> > includes #define VM_PROXY_MINOR 8.
> > d) update  http://www.squeakvm.org/svn/squeak/branches/Cog/src/vm/interp.hbased on b)
> >
>
> and
>   e) nuke
> http://squeakvm.org/svn/squeak/trunk/platforms/Cross/plugins/IA32ABI/sqVirtualMachine.[ch]
>   f) make trunk's platforms/Cross/plugins/IA32ABI/ia32abicc.c compile,
> albeit with reduced functionality, if VM_PROXY_MINOR = 8.
>
> OK?
>
> best,
> Eliot

That all sounds reasonable to me, although I'm not able to look at the
code right now. For me the litmus test is whether I can compile and run
a trunk interpreter VM on unix/linux using latest trunk SVN and VMMaker
(and/or fix the problems preventing one from doing so). As long as that
is the case I will be happy.

Getting rid of the odd variants in Cross/plugins/IA32ABI would definitely
be a good thing.

If you update the trunk VMMaker, please edit VMMaker class>>versionString
and give it some new value (probably change from '4.5.4' to '4.6.0' given
that it's a fairly noteworthy change).

I'll try to get caught up and help with any testing you may need as soon
as time permits.

Dave

Reply | Threaded
Open this post in threaded view
|

Re: heads-up on sqVirtualMachine harmonization

ccrraaiigg
In reply to this post by Eliot Miranda-2
 

     Sounds good, especially having a single sqVirtualMachine.h.


-C

--
Craig Latta
www.netjam.org/resume
+31   6 2757 7177
+ 1 415  287 3547


Reply | Threaded
Open this post in threaded view
|

Re: heads-up on sqVirtualMachine harmonization

Igor Stasenko
 
yeah.. harmonization, it would be good, Eliot if you take a look of
changes made in
VMMaker-oscog-MarianoMartinezPeck.66
and integrate them, so we will use common version.

They have a common ancestor -
VMMaker-oscog.54

Without this all of the following work will be lost:

Name: VMMaker-oscog-IgorStasenko.54
Author: IgorStasenko
Time: 23 March 2011, 5:30:42 pm
UUID: c98a0b6c-7f68-4af7-9012-85d3dfdf29ae
Ancestors: VMMaker-oscog-IgorStasenko.53

- added disabling module loading support


Name: VMMaker-oscog.dtl.56
Author: dtl
Time: 4 April 2011, 10:06:00.292 pm
UUID: c1d30608-00e8-53b7-209a-34f7a46c1508
Ancestors: VMMaker-IgorStasenko.55

Add tests from VMMaker trunk to document various issues and verify
presence of primitives.

Name: VMMaker-oscog.dtl.57
Author: dtl
Time: 11 April 2011, 10:13:51.668 pm
UUID: c1d30608-04dd-53b7-209a-34f7a46c1508
Ancestors: VMMaker-oscog.dtl.56

Generate C code for #repeat.
Implementation by Igor Stasenko and Nicolas Cellier.

Name: VMMaker-oscog-dtl.58
Author: dtl
Time: 17 April 2011, 10:22:12.174 pm
UUID: c1d30608-04b3-a5b7-20ca-2bf7a46c1508
Ancestors: VMMaker-oscog-dtl.57, VMMaker-oscog.dtl.57

Merge VMMaker-oscog.dtl.57

Generate C code for #repeat.
Implementation by Igor Stasenko and Nicolas Cellier.

Name: VMMaker-oscog-dtl.59
Author: dtl
Time: 17 April 2011, 10:32:55.018 pm
UUID: c1d30608-042d-4bb7-20ca-2bf7a46c1508
Ancestors: VMMaker-oscog-dtl.58

Merge VMMaker-oscog.dtl.58, and add #primitiveImageFormatVersion

Add primitiveMillisecondClockMask, an optional named primitive used in
conjunction with primitiveMillisecondClock for duration calculations.
The image assumes a value for this constant that is assumed to
correspond to the actual value used in the VM. This primitive permits
the VM to report the actual value being used.

Add primitiveImageFormatVersion, an optional named primitive answering
the image format number of the current image. This is the value stored
in the first word of an image file header when the image is saved, and
possibly modified on image load if the VM adds or removes capabilities
for the running image. This primitive was added to VMMaker trunk in
VMMaker-dtl.169. Rationale: supports float word order handing for
image segments, reference
http://lists.squeakfoundation.org/pipermail/vm-dev/2011-April/007712.html

Name: VMMaker-oscog-dtl.64
Author: dtl
Time: 21 April 2011, 8:24:32.46 pm
UUID: c1d30608-30ec-50b7-208a-31f7a46c1508
Ancestors: VMMaker-oscog-dtl.59

Re-save from VMMaker-oscog-EstebanLorenzano.62 because
VMMaker-oscog-dtl.61 and VMMaker-oscog-dtl.60 were saved without
correct ancestry. This version incorporates the changes from
VMMaker-oscog-EstebanLorenzano.62, VMMaker-oscog-dtl.61, and
VMMaker-oscog-dtl.60.

Name: VMMaker-oscog-EstebanLorenzano.62
-added ClipboardExtendedPlugin as a regular plugin (taken from the
InterpreterVM branch)
I don't know if it works right now, but at least it compiles :)

Name: VMMaker-oscog-dtl.61
A second batch of updates from VMM trunk, primarily cosmetic but also
a class comment update and a couple of methods that had not previously
been pragmatized in oscog.

Name: VMMaker-oscog-dtl.60
These changes are methods from the main VMM branch for which
<#var:#type:> declarations have been formatted with proper spacing. By
updating these in the oscog branch, all of these methods are identical
in both branches. All changes are cosmetic (no functional changes to
the methods).

Name: VMMaker-oscog-MarianoMartinezPeck.65
Author: MarianoMartinezPeck
Time: 23 April 2011, 1:50:19 pm
UUID: 944f5c54-f2f5-4cc7-b693-b4db9320cff8
Ancestors: VMMaker-oscog-dtl.64

blah

Name: VMMaker-oscog-MarianoMartinezPeck.66
Author: MarianoMartinezPeck
Time: 23 April 2011, 2:17:26 pm
UUID: 97bab5b0-51d6-4deb-8b58-5bcedd4747dc
Ancestors: VMMaker-oscog-MarianoMartinezPeck.65

Adapt VMMakerTool so that it doesnt try to register in the menu if
TheWorldMenu is not present, like the case of Pharo. This change was
already integrated in the main trunk of VMMaker but since Eliot forked
VMMaker-oscog before that, it was not there.

It doesn't affect Squeak


--
Best regards,
Igor Stasenko AKA sig.