[Vm-dev] dangerous translation of MiscPrimitivePlugin code

David T. Lewis lewis at mail.msen.com
Fri Jul 8 23:30:53 UTC 2016


On Fri, Jul 08, 2016 at 03:00:58PM -0700, tim Rowledge wrote:
> 
> 
> > On 08-07-2016, at 1:49 PM, Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com> wrote:
> > 
> > Hi,
> > I don't know if it was reported yet, but we've got some nasty UB detected by C Compiler warning in primitiveFindSubstring:
> 
> A long, long, time ago when Andreas & I were first making the plugins stuff we were determined that miscprimitiveplugin should be a very short-lived thing. Anyone feeling the urge to cleanup/out that ugliness should please do so asap.
>

It's probably time for doing this. The included methods are a nice way to
show the concept of Smalltalk methods being translated to C for efficiency,
but they are rather inconvenient with regard to version control.

In addition to MiscPrimitivePlugin, we also have SoundGeneratorPlugin and
ADPCMCodecPlugin that use included methods. IncludedMethodsTest in VMMaker
is my attempt to keep track of these.

I presume that the sensible thing to do would be to just copy the necessary
methods directly into the plugins under different names and generate them
directly as with any other primitive. As Sista makes the primitives redundant,
just stop calling them.

Dave



More information about the Vm-dev mailing list