[Vm-dev] VM Maker: VMMaker.oscog-eem.639.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Mar 12 19:32:07 UTC 2014


Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.639.mcz

==================== Summary ====================

Name: VMMaker.oscog-eem.639
Author: eem
Time: 12 March 2014, 12:29:11.345 pm
UUID: 4e650b80-cb7f-46c0-9fd4-3dc205b1b262
Ancestors: VMMaker.oscog-eem.638

Update primitiveSizeInBytesOfInstance to work with
CompiledMethods.

=============== Diff against VMMaker.oscog-eem.638 ===============

Item was added:
+ ----- Method: Spur32BitMemoryManager>>bytesPerOop (in category 'accessing') -----
+ bytesPerOop
+ 	^4!

Item was added:
+ ----- Method: Spur64BitMemoryManager>>bytesPerOop (in category 'accessing') -----
+ bytesPerOop
+ 	^8!

Item was changed:
  ----- Method: SpurMemoryManager>>byteSizeOfInstanceOf:withIndexableSlots: (in category 'indexing primitive support') -----
  byteSizeOfInstanceOf: classObj withIndexableSlots: nElements
  	| instSpec classFormat numSlots |
  	classFormat := self formatOfClass: classObj.
  	instSpec := self instSpecOfClassFormat: classFormat.
  	instSpec caseOf: {
  		[self arrayFormat]	->
  			[numSlots := nElements].
  		[self indexablePointersFormat]	->
  			[numSlots := (self fixedFieldsOfClassFormat: classFormat) + nElements].
  		[self weakArrayFormat]	->
  			[numSlots := (self fixedFieldsOfClassFormat: classFormat) + nElements].
  		[self sixtyFourBitIndexableFormat]	->
+ 			[numSlots := self bytesPerSlot = 4 ifTrue: [nElements * 2] ifFalse: [nElements]].
- 			[numSlots := self wordSize = 4 ifTrue: [nElements * 2] ifFalse: [nElements]].
  		[self firstLongFormat]	->
+ 			[numSlots := self bytesPerSlot = 4 ifTrue: [nElements] ifFalse: [nElements + 1 // 2]].
- 			[numSlots := self wordSize = 4 ifTrue: [nElements] ifFalse: [nElements + 1 // 2]].
  		[self firstShortFormat]	->
+ 			[numSlots := self bytesPerSlot = 4 ifTrue: [nElements + 1 // 2] ifFalse: [nElements + 3 // 4]].
- 			[numSlots := self wordSize = 4 ifTrue: [nElements + 1 // 2] ifFalse: [nElements + 3 // 4]].
  		[self firstByteFormat]	->
+ 			[numSlots := nElements + (self bytesPerSlot - 1) // self bytesPerSlot].
+ 		[self firstCompiledMethodFormat]	-> "Assume nElements is derived from CompiledMethod>>basicSize."
+ 			[numSlots := nElements + (self bytesPerSlot - 1) // self bytesPerSlot] }
+ 		otherwise: [^PrimErrBadReceiver negated]. "non-indexable"
- 			[numSlots := nElements + (self wordSize - 1) // self wordSize] }
- 		otherwise: [^PrimErrBadReceiver negated]. "non-indexable or CompiledMethod"
  	^self objectBytesForSlots: numSlots!



More information about the Vm-dev mailing list