[Vm-dev] Re: heads-up on sqVirtualMachine harmonization
Eliot Miranda
eliot.miranda at gmail.com
Thu Jun 16 19:13:04 UTC 2011
On Thu, Jun 16, 2011 at 12:06 PM, Eliot Miranda <eliot.miranda at gmail.com>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
>
> OK?
>
> best
> Eliot
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20110616/75726ce8/attachment.htm
More information about the Vm-dev
mailing list