On Sat, Dec 30, 2017 at 5:35 AM, Bert Freudenberg <bert@freudenbergs.de> wrote:
 
On Sat, Dec 23, 2017 at 10:49 PM, Levente Uzonyi <leves@caesar.elte.hu> wrote:
 
On Fri, 22 Dec 2017, Clément Bera wrote:

Hi all,

snip

1. translate: aString from: start  to: stop  table: table

This primitive seems to be unused. I suggest we move it from a primitive
to plain Smalltalk code.

That primitive is currently used to convert ByteStrings to lower and upper case, and it's also used to convert between cr and lf line endings. The primitive fails in Pharo for some reason, but it's still used in the 6.0 image I have.
It works properly in Squeak and Cuis.

​Indeed.

Also, the primitive is a lot faster for non-jit VMs. E.g. the Stack interpreter for iOS, where no JIT compiler is allowed.

We should keep those primitives, in some form.

I agree.
 
One idea would be to rewrite MiscPrimitivePlugin as a plain plugin, and only keep the few primitives that are not moved elsewhere.

I like this.  It shouldn't be hard.  The parse trees from the translated primitives are good starting points.  I take Clément's point that these are optional primitives but don't like the idea of a significant performance regression. And if MiscPrimitivePlugin is external then there's no overhead for the VM itself.

- Bert -​

_,,,^..^,,,_
best, Eliot