[Vm-dev] Numbered primitives (was: Cog Primitive Performance)
bera.clement at gmail.com
Wed Apr 19 00:57:46 UTC 2017
On Tue, Apr 18, 2017 at 3:41 PM, David T. Lewis <lewis at mail.msen.com> wrote:
> On Tue, Apr 18, 2017 at 09:57:54AM -0700, Cl??ment Bera wrote:
> > For each primitive, we need to evaluate the performance with and without
> > the primitive. In each case, we either move the primitive to numbered
> > primitive or we just use normal Smalltalk code.
> Please no more numbered primitives. We should be eliminating numbered
> not adding more.
> The only justification I can see for a numbered primitive today is to
> it as one of the small number of primitives that absolutely must be
> when porting the VM to a new platform, especially if that platform may not
> easily support the loading of functions by name. Aside from that, we should
> insist that /all/ primitives be named primitives.
The problem is that right now the JIT compiles to machine code only
numbered primitives (in fact only numbered primitives specifically
annotated in the primitive descriptors of Cogit). Other primitives require
the VM to switch to the interpreter C stack to be called. If someone
extends the JIT to compile named primitive then we could consider doing it
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Vm-dev