[Vm-dev] primitiveTranslateStringWithTable

Florin Mateoc florin.mateoc at gmail.com
Tue Apr 20 23:16:38 UTC 2021


While looking at some of the more exotic primitives, I stumbled upon this
little gem.
I think it's bad enough that it modifies strings in place (some of those
could be method literals), but it even modifies symbols in place, without
adding them to the symbol table.

I would say this is a bug, I don't think symbols should be modified in
place (other than by the #intern: method), but this does not look
unintentional - apparently ByteSymbol class >> #translate:from:to:table:
was added specifically to make the primitive work on symbols too.

Does anybody have any insight into this, is this functionality (modifying
symbols in place) used anywhere?

Thank you,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20210420/26f2c7b0/attachment-0001.html>

More information about the Vm-dev mailing list