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

commits at source.squeak.org commits at source.squeak.org
Fri Feb 6 19:21:15 UTC 2015


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

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

Name: VMMaker.oscog-eem.1047
Author: eem
Time: 6 February 2015, 11:19:56.126 am
UUID: 602b03c8-5b48-4e59-b0f3-e58c72344c7e
Ancestors: VMMaker.oscog-eem.1046

Spur:
Have lengthOf: answer 0 for ephemerons and
something sensible for 64-bit indexable on 32-bits.

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

Item was added:
+ ----- Method: Spur32BitMemoryManager>>lengthOf:format: (in category 'object access') -----
+ lengthOf: objOop format: fmt
+ 	"Answer the number of indexable units in the given object.
+ 	 For a CompiledMethod, the size of the method header (in bytes)
+ 	 should be subtracted from the result of this method."
+ 	| numSlots |
+ 	<inline: true>
+ 	numSlots := self numSlotsOfAny: objOop. "don't let forwarders freak us out..."
+ 	fmt <= self ephemeronFormat ifTrue:
+ 		[^numSlots].
+ 	fmt >= self firstByteFormat ifTrue: "bytes, including CompiledMethod"
+ 		[^numSlots << self shiftForWord - (fmt bitAnd: 7)].
+ 	fmt >= self firstShortFormat ifTrue:
+ 		[^numSlots << (self shiftForWord - 1) - (fmt bitAnd: 3)].
+ 	fmt >= self firstLongFormat ifTrue:
+ 		[^numSlots << (self shiftForWord - 2) - (fmt bitAnd: 1)].
+ 	fmt = self sixtyFourBitIndexableFormat ifTrue:
+ 		[^numSlots >> 1].
+ 	"fmt = self forwardedFormat"
+ 	^0!

Item was added:
+ ----- Method: Spur64BitMemoryManager>>lengthOf:format: (in category 'object access') -----
+ lengthOf: objOop format: fmt
+ 	"Answer the number of indexable units in the given object.
+ 	 For a CompiledMethod, the size of the method header (in bytes)
+ 	 should be subtracted from the result of this method."
+ 	| numSlots |
+ 	<inline: true>
+ 	numSlots := self numSlotsOfAny: objOop. "don't let forwarders freak us out..."
+ 	fmt <= self ephemeronFormat ifTrue:
+ 		[^numSlots].
+ 	fmt >= self firstByteFormat ifTrue: "bytes, including CompiledMethod"
+ 		[^numSlots << self shiftForWord - (fmt bitAnd: 7)].
+ 	fmt >= self firstShortFormat ifTrue:
+ 		[^numSlots << (self shiftForWord - 1) - (fmt bitAnd: 3)].
+ 	fmt >= self firstLongFormat ifTrue:
+ 		[^numSlots << (self shiftForWord - 2) - (fmt bitAnd: 1)].
+ 	fmt = self sixtyFourBitIndexableFormat ifTrue:
+ 		[^numSlots].
+ 	"fmt = self forwardedFormat"
+ 	^0!

Item was changed:
  ----- Method: SpurMemoryManager>>lengthOf:format: (in category 'object access') -----
  lengthOf: objOop format: fmt
  	"Answer the number of indexable units in the given object.
  	 For a CompiledMethod, the size of the method header (in bytes)
  	 should be subtracted from the result of this method."
+ 	^self subclassResponsibility!
- 	| numSlots |
- 	<inline: true>
- 	numSlots := self numSlotsOfAny: objOop. "don't let forwarders freak us out..."
- 	fmt <= self sixtyFourBitIndexableFormat ifTrue:
- 		[^numSlots].
- 	fmt >= self firstByteFormat ifTrue: "bytes, including CompiledMethod"
- 		[^numSlots << self shiftForWord - (fmt bitAnd: 7)].
- 	fmt >= self firstShortFormat ifTrue:
- 		[^numSlots << (self shiftForWord - 1) - (fmt bitAnd: 3)].
- 	"fmt >= self firstLongFormat"
- 	^numSlots << (self shiftForWord - 2) - (fmt bitAnd: 1)!



More information about the Vm-dev mailing list