[Vm-dev] VM Maker: VMMaker.oscog-eem.368.mcz
commits at source.squeak.org
commits at source.squeak.org
Wed Sep 11 05:55:30 UTC 2013
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.368.mcz
==================== Summary ====================
Name: VMMaker.oscog-eem.368
Author: eem
Time: 10 September 2013, 10:48:47.026 pm
UUID: efaf3f91-544f-4f65-bd73-eeb67f2889f6
Ancestors: VMMaker.oscog-eem.367
Add missing case for arrayFormat to instantiateClass:indexableSize:.
Include arrayFormat in isIndexableFormat:
=============== Diff against VMMaker.oscog-eem.367 ===============
Item was changed:
----- Method: Spur32BitMemoryManager>>instantiateClass:indexableSize: (in category 'allocation') -----
instantiateClass: classObj indexableSize: nElements
| instSpec classFormat numSlots classIndex newObj fillValue |
classFormat := self formatOfClass: classObj.
instSpec := self instSpecOfClassFormat: classFormat.
fillValue := 0.
instSpec caseOf: {
+ [self arrayFormat] ->
+ [numSlots := nElements.
+ fillValue := nilObj].
[self indexablePointersFormat] ->
[numSlots := (self fixedFieldsOfClassFormat: classFormat) + nElements.
fillValue := nilObj].
[self sixtyFourBitIndexableFormat] ->
[numSlots := nElements * 2].
[self firstLongFormat] ->
[numSlots := nElements].
[self firstShortFormat] ->
[numSlots := nElements + 1 // 2.
instSpec := instSpec + (nElements bitAnd: 1)].
[self firstByteFormat] ->
[numSlots := nElements + 3 // 4.
instSpec := instSpec + (nElements bitAnd: 3)].
[self firstCompiledMethodFormat] ->
[numSlots := nElements + 3 // 4.
instSpec := instSpec + (nElements bitAnd: 3)] }
otherwise: [^nil]. "non-indexable"
classIndex := self hashBitsOf: classObj.
classIndex = 0 ifTrue:
[(self enterIntoClassTable: classObj) ifFalse:
[^nil].
classIndex := self hashBitsOf: classObj].
newObj := self allocateSlots: numSlots format: instSpec classIndex: classIndex.
newObj ifNotNil:
[self fillObj: newObj numSlots: numSlots with: fillValue].
^newObj!
Item was changed:
----- Method: Spur64BitMemoryManager>>instantiateClass:indexableSize: (in category 'allocation') -----
instantiateClass: classObj indexableSize: nElements
| instSpec classFormat numSlots classIndex newObj fillValue |
classFormat := self formatOfClass: classObj.
instSpec := self instSpecOfClassFormat: classFormat.
fillValue := 0.
instSpec caseOf: {
+ [self arrayFormat] ->
+ [numSlots := nElements.
+ fillValue := nilObj].
[self indexablePointersFormat] ->
[numSlots := (self fixedFieldsOfClassFormat: classFormat) + nElements.
fillValue := nilObj].
[self sixtyFourBitIndexableFormat] ->
[numSlots := nElements].
[self firstLongFormat] ->
[numSlots := nElements + 1 // 2.
instSpec := instSpec + (nElements bitAnd: 1)].
[self firstShortFormat] ->
[numSlots := nElements + 3 // 4.
instSpec := instSpec + (nElements bitAnd: 3)].
[self firstByteFormat] ->
[numSlots := nElements + 7 // 8.
instSpec := instSpec + (nElements bitAnd: 7)].
[self firstCompiledMethodFormat] ->
[numSlots := nElements + 7 // 8.
instSpec := instSpec + (nElements bitAnd: 7)] }
otherwise: [^nil]. "non-indexable"
classIndex := self hashBitsOf: classObj.
classIndex = 0 ifTrue:
[(self enterIntoClassTable: classObj) ifFalse:
[^nil].
classIndex := self hashBitsOf: classObj].
newObj := self allocateSlots: numSlots format: instSpec classIndex: classIndex.
newObj ifNotNil:
[self fillObj: newObj numSlots: numSlots with: fillValue].
^newObj!
Item was changed:
----- Method: SpurMemoryManager>>isIndexable: (in category 'object testing') -----
isIndexable: objOop
+ | fmt |
+ fmt := self formatOf: objOop.
+ ^self isIndexableFormat: fmt!
- ^(self formatOf: objOop) >= self sixtyFourBitIndexableFormat!
Item was changed:
----- Method: SpurMemoryManager>>isIndexableFormat: (in category 'object testing') -----
isIndexableFormat: format
+ ^format >= self arrayFormat
+ and: [format <= self indexablePointersFormat
+ or: [format >= self sixtyFourBitIndexableFormat]]!
- ^format >= self sixtyFourBitIndexableFormat!
More information about the Vm-dev
mailing list