translatedPrimitives
"an assorted list of various primitives"
(ByteString compiledMethodAt: #findSubstringViaPrimitive:in:startingAt:matchTable: ifAbsent: []) ifNotNil:
[^#("Pharo uses findSubstringViaPrimitive:in:startingAt:matchTable:"
(Bitmap compress:toByteArray:)
(Bitmap decompress:fromByteArray:at:)
(Bitmap encodeBytesOf:in:at:)
(Bitmap encodeInt:in:at:)
(ByteString compare:with:collated:)
(ByteString translate:from:to:table:)
(ByteString findFirstInString:inSet:startingAt:)
(ByteString indexOfAscii:inString:startingAt:)
(String findSubstringViaPrimitive:in:startingAt:matchTable:)
(ByteArray hashBytes:startingWith:)
(SampledSound convert8bitSignedFrom:to16Bit:))].
^#(
(Bitmap compress:toByteArray:)
(Bitmap decompress:fromByteArray:at:)
(Bitmap encodeBytesOf:in:at:)
(Bitmap encodeInt:in:at:)
(ByteString compare:with:collated:)
(ByteString translate:from:to:table:)
(ByteString findFirstInString:inSet:startingAt:)
(ByteString indexOfAscii:inString:startingAt:)
(ByteString findSubstring:in:startingAt:matchTable:)
(ByteArray hashBytes:startingWith:)
(SampledSound convert8bitSignedFrom:to16Bit:)
)
means that Pharo uses #indSubstringViaPrimitive:in:startingAt:matchTable: while squeak uses #findSubstring:in:startingAt:matchTable:.
Now, there is a bug there (because source is in String and not in ByteString), and I can fix that by asking correctly, but:
1) this means that sources for pharo and squeak will be different and pharo needs to be generated in pharo. This is contrary to what we are trying to do with the VM: we want all sources to be the same, and differences should come from compilation flags and/or the presence of certain plugins (this is because is a lot easier to debug the VM like that).
2) I wonder��� why we are using this primitive an squeak is not? maybe we need to deprecate the use?
this is the important thing, I think��� so��� why can���t we use that instead the other one?