[Vm-dev] VM Maker: VMMaker.oscog-eem.2184.mcz
commits at source.squeak.org
commits at source.squeak.org
Sat Mar 25 19:44:40 UTC 2017
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2184.mcz
==================== Summary ====================
Name: VMMaker.oscog-eem.2184
Author: eem
Time: 25 March 2017, 12:43:46.696507 pm
UUID: aa9725c6-233f-4e84-9a79-79af2f5465d3
Ancestors: VMMaker.oscog-eem.2183
Answer MiscPrimitivePlugin's translated primitives based on what merhods are available. Using PharoVM (either a compile-time or a simulation-time variable) is the wrong thing to do.
=============== Diff against VMMaker.oscog-eem.2183 ===============
Item was changed:
----- Method: MiscPrimitivePlugin class>>translatedPrimitives (in category 'translation') -----
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:))].
- PharoVM ifTrue: [ ^ self translatedPrimitivesForPharo ].
^#(
(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:)
)
"| tps |
'This opens a list browser on all translated primitives in the image'.
tps := (SystemNavigation default allImplementorsOf: #translatedPrimitives)
inject: Set new
into: [:tp :mr|
tp addAll: (mr actualClass theNonMetaClass translatedPrimitives collect:
[:pair|
MethodReference
class: (((Smalltalk at: pair first) canUnderstand: pair last)
ifTrue: [Smalltalk at: pair first]
ifFalse: [(Smalltalk at: pair first) class])
selector: pair last]);
yourself].
SystemNavigation default browseMessageList: tps asArray sort name: 'Translated Primitives' "!
Item was removed:
- ----- Method: MiscPrimitivePlugin class>>translatedPrimitivesForPharo (in category 'translation') -----
- translatedPrimitivesForPharo
- ^#(
- (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:)
- )!
More information about the Vm-dev
mailing list