Primitive archeaology (was: VM Maker: VMMaker-dtl.391.mcz)

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

Primitive archeaology (was: VM Maker: VMMaker-dtl.391.mcz)

David T. Lewis
Moving this from vm-dev to squeak-dev because the interest (and knowledge) probably
resides here.

The SqueakJS VM can support older images back to Squeak 1.13, and the logic
for doing this is now being back-ported into the old interpreter VM. Mainly
this involves identifying the old primitive calls that were referenced as
numbered primitives in the old images, and then installing them into a table
of numbered primitives whenever the VM runs an old image.

This all works fine, but just to tie up some loose ends I want to ask about
a fow ancient primitives that were used in the earliest Squeak images. There
are five sound primitives that I am not sure about, as mentioned in a recent
update on vm-dev:

On Fri, Jan 06, 2017 at 12:35:29AM +0000, [hidden email] wrote:

> Old image support: Rescue five sound primitive assignments for updatePrimitiveTable for primitives that should be loaded from SouondGenerationPlugin, not from SoundPlugin.
> The following ancient primitives are still not loadable into the primitiive table for old image support:
>   #primWaveTableSoundmixSampleCountintostartingAtpan
>   #primFMSoundmixSampleCountintostartingAtpan
>   #primPluckedSoundmixSampleCountintostartingAtpan
>   #primSampledSoundmixSampleCountintostartingAtpan
>   #oldprimSampledSoundmixSampleCountintostartingAtleftVolrightVol

I think that these primitives were originally implemented in hand-written
code that was (circa Squeak 1.13) stored in the image in method
InterpreterSupportCode class>>macSoundFile, and later (circa Squeak 1.31)
as InterpreterSupportCode class>>squeakOldSoundPrimsFile.

Later, as numbered primitives were replaced by named primitives and loadable
VM plugins, the original InterpreterSupportCode class was abandoned, and the
various sound primitives were reimplemented in Smalltalk ("slang"). The old
sound primitives (with 'pan' in the names, and input parameters for left/right
panning) were abandoned as no longer relevant.


- Is the above more or less right?

- Am I right in thinking that the five primitives above are of minor historical
interest, and there would be no point in providing an implemention in current VMs?