[Vm-dev] VM Maker: VMMaker.oscog-EstebanLorenzano.1376.mcz

Esteban Lorenzano estebanlm at gmail.com
Tue Jun 23 12:51:31 UTC 2015


> On 23 Jun 2015, at 13:44, Henrik Johansen <henrik.s.johansen at veloxit.no> wrote:
> 
> 
> Ugh, instead of restricting the type of VM one can build to specific images, can't the check for where to find the methods to do primitive translation of be decided by what image VMMaker has been loaded into?

Could be… but:
- I didn’t see anywhere in the VMMaker a reference to the platform in execution (they can be there, but I didn’t see it). Then, I do not want to introduce that kind of distinctions.
- So far, bootstrap of Pharo-spur cannot be done in squeak anyway

Why is so important to ask for PharoVM or Pharo image?

in any case, I wait for Eliot’s verdict :)

Esteban


> 
> Cheers,
> Henry
> 
>> On 23 Jun 2015, at 9:44 , commits at source.squeak.org wrote:
>> 
>> 
>> Esteban Lorenzano uploaded a new version of VMMaker to project VM Maker:
>> http://source.squeak.org/VMMaker/VMMaker.oscog-EstebanLorenzano.1376.mcz
>> 
>> ==================== Summary ====================
>> 
>> Name: VMMaker.oscog-EstebanLorenzano.1376
>> Author: EstebanLorenzano
>> Time: 23 June 2015, 11:43:50.383921 am
>> UUID: 96f873b1-3c5f-4b42-aaed-a1a370b8d2af
>> Ancestors: VMMaker.oscog-rmacnak.1375
>> 
>> MiscPrimitivePlugin class>>#translatedPrimitives is slightly different for Pharo. Answering a different version if PharoVM = true.
>> 
>> =============== Diff against VMMaker.oscog-rmacnak.1375 ===============
>> 
>> Item was changed:
>> + SystemOrganization addCategory: #VMMaker!
>> + SystemOrganization addCategory: 'VMMaker-Building'!
>> + SystemOrganization addCategory: 'VMMaker-Interpreter'!
>> + SystemOrganization addCategory: 'VMMaker-InterpreterSimulation'!
>> + SystemOrganization addCategory: 'VMMaker-InterpreterSimulation-Morphic'!
>> + SystemOrganization addCategory: 'VMMaker-JIT'!
>> + SystemOrganization addCategory: 'VMMaker-JITSimulation'!
>> + SystemOrganization addCategory: 'VMMaker-Multithreading'!
>> + SystemOrganization addCategory: 'VMMaker-Plugins'!
>> + SystemOrganization addCategory: 'VMMaker-Plugins-Alien'!
>> + SystemOrganization addCategory: 'VMMaker-Plugins-IOS'!
>> + SystemOrganization addCategory: 'VMMaker-PostProcessing'!
>> + SystemOrganization addCategory: 'VMMaker-SmartSyntaxPlugins'!
>> + SystemOrganization addCategory: 'VMMaker-SpurMemoryManager'!
>> + SystemOrganization addCategory: 'VMMaker-SpurMemoryManagerSimulation'!
>> + SystemOrganization addCategory: 'VMMaker-Support'!
>> + SystemOrganization addCategory: 'VMMaker-Tests'!
>> + SystemOrganization addCategory: 'VMMaker-Translation to C'!
>> - SystemOrganization addCategory: #'VMMaker-Building'!
>> - SystemOrganization addCategory: #'VMMaker-Interpreter'!
>> - SystemOrganization addCategory: #'VMMaker-InterpreterSimulation'!
>> - SystemOrganization addCategory: #'VMMaker-InterpreterSimulation-Morphic'!
>> - SystemOrganization addCategory: #'VMMaker-JIT'!
>> - SystemOrganization addCategory: #'VMMaker-JITSimulation'!
>> - SystemOrganization addCategory: #'VMMaker-Multithreading'!
>> - SystemOrganization addCategory: #'VMMaker-Plugins'!
>> - SystemOrganization addCategory: #'VMMaker-Plugins-Alien'!
>> - SystemOrganization addCategory: #'VMMaker-Plugins-IOS'!
>> - SystemOrganization addCategory: #'VMMaker-PostProcessing'!
>> - SystemOrganization addCategory: #'VMMaker-SmartSyntaxPlugins'!
>> - SystemOrganization addCategory: #'VMMaker-SpurMemoryManager'!
>> - SystemOrganization addCategory: #'VMMaker-SpurMemoryManagerSimulation'!
>> - SystemOrganization addCategory: #'VMMaker-Support'!
>> - SystemOrganization addCategory: #'VMMaker-Tests'!
>> - SystemOrganization addCategory: #'VMMaker-Translation to C'!
>> 
>> Item was changed:
>> ----- Method: MiscPrimitivePlugin class>>translatedPrimitives (in category 'translation') -----
>> translatedPrimitives
>> 	"an assorted list of various primitives"
>> + 	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 added:
>> + ----- 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:)
>> + 	)!
>> 
>> Item was changed:
>> ----- Method: OutOfLineLiteralsManager>>storeObjRef:inClosedPICAt: (in category 'garbage collection') -----
>> storeObjRef: literal inClosedPICAt: address
>> 	<var: #address type: #usqInt>
>> 	<inline: true>
>> 	objectMemory longAt: address put: literal!
>> 
>> Item was changed:
>> ----- Method: StackInterpreter>>accessModifierOfMethod: (in category 'compiled methods') -----
>> accessModifierOfMethod: methodObj
>> 	<option: #NewspeakVM>
>> 	^self accessModifierOfMethodHeader: (objectMemory methodHeaderOf: methodObj)!
>> 
>> Item was changed:
>> ----- Method: TAssignmentNode>>emitCCodeAsExpressionOn:level:generator: (in category 'C code generation') -----
>> emitCCodeAsExpressionOn: aStream level: level generator: aCodeGen
>> 	aStream nextPut: $(.
>> 	self emitCCodeOn: aStream level: level generator: aCodeGen.
>> 	aStream nextPut: $)!
>> 
>> Item was changed:
>> ----- Method: TParseNode>>emitCCodeAsArgumentOn:level:generator: (in category 'C code generation') -----
>> emitCCodeAsArgumentOn: aStream level: level generator: aCodeGen
>> 	^self emitCCodeOn: aStream level: level generator: aCodeGen!
>> 
>> Item was changed:
>> ----- Method: TParseNode>>emitCCodeAsExpressionOn:level:generator: (in category 'C code generation') -----
>> emitCCodeAsExpressionOn: aStream level: level generator: aCodeGen
>> 	^self emitCCodeOn: aStream level: level generator: aCodeGen!
>> 
>> Item was changed:
>> ----- Method: TSendNode>>emitCCodeAsExpressionOn:level:generator: (in category 'C code generation') -----
>> emitCCodeAsExpressionOn: aStream level: level generator: aCodeGen
>> 	^self emitCCodeAsArgumentOn: aStream level: level generator: aCodeGen!
>> 
> 



More information about the Vm-dev mailing list