[Vm-dev] VM Maker: VMMaker.oscog-dtl.3123.mcz
David T. Lewis
lewis at mail.msen.com
Mon Jan 3 03:32:23 UTC 2022
On Sun, Jan 02, 2022 at 01:17:02PM -0800, Eliot Miranda wrote:
> On Sat, Jan 1, 2022 at 1:07 PM David T. Lewis <lewis at mail.msen.com> wrote:
> > I put VMMaker.oscog-dtl.3124 in the VMM inbox, which includes your
> > recommendations along with a few unit tests to cover the format number
> > handling.
> Cool. The definition and initialization of the new
> StackInterpreter multipleBytecodeSetsActive inst var is missing. I'm
> assuming it is an inst var. How should it be initialized? From
> MULTIPLEBYTECODESETS or left false by default?
multipleBytecodeSetsActive (an inst var in InterpreterPrimitives) is
initialized in StackInterpreter>>imageFormatVersionFromSnapshot:
while reading the image file header. Otherwise it is only updated by
The inst var might also need to be initialized to MULTIPLEBYTECODESETS in
simulation (I did not do that). In the three new tests in FormatNumberTests,
I called #imageFormatVersionFromSnapshot: to set up the test data.
The primitiveMultipleBytecodeSetsActive inst var tells us what the
image claims to be requiring, as opposed to MULTIPLEBYTECODESETS
which is what the VM is actually capable of supporting. It is used
only for reading and writing the image format number and has no other
effect on the VM itself.
More information about the Vm-dev