The Trunk: System-eem.985.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: System-eem.985.mcz

commits-2
Eliot Miranda uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-eem.985.mcz

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

Name: System-eem.985
Author: eem
Time: 15 December 2017, 12:39:23.474652 pm
UUID: ab9f2a41-0c2e-43b9-a6e5-666d9ffb9a10
Ancestors: System-eem.984

For loading 32-bit projects on 64-bits allocateObject:classIndex:slots: must be implemented in Spur32BitImageSegmentLoader and the delta for CompiledCode computed correctly.

=============== Diff against System-eem.984 ===============

Item was changed:
  ----- Method: Spur32BitImageSegmentLoader>>allocateCompiledCode:size: (in category 'reading') -----
  allocateCompiledCode: class size: nBytes
  "Allocate a CompiledCode object.  nBytes must be reduced
  by the number of objects in the method (header and literals)."
  | header delta |
  class isCompiledMethodClass ifFalse:
  [self error: 'compiled code class expected'].
  header := self readOop.
+ delta := (header bitAnd: 32767) + 1 * 4.
- delta := (header bitAnd: 32767) + 1 * 8.
  ^class newMethod: nBytes - delta header: header!

Item was added:
+ ----- Method: Spur32BitImageSegmentLoader>>allocateObject:classIndex:slots: (in category 'reading') -----
+ allocateObject: format classIndex: classIndex slots: numSlots
+ "Allocate an instance of the class referenced by classIndex, with the size computed from numSlots and format."
+ | class |
+ class := (self classIndexInOutPointers: classIndex)
+ ifTrue: [outPointers at: (self outPointerIndexForClassIndex: classIndex)]
+ ifFalse: [oopMap at: (self oopIndexForClassIndex: classIndex)].
+ (format <= 1 or: [format = 5"ephemerons"]) ifTrue:
+ [^self allocateFixedSizeObject: class size: numSlots].
+ format = 2 ifTrue:
+ [^self allocateVariableSizeObject: class size: numSlots].
+ (format between: 3 and: 4) ifTrue:
+ [^self allocateFixedAndVariableObject: class size: numSlots].
+ format >= 16 ifTrue:
+ [| nBytes |
+ nBytes := numSlots * 4 - (format bitAnd: 3).
+ format >= 24 ifTrue:
+ [^self allocateCompiledCode: class size: nBytes].
+ ^self allocate8BitObject: class size: nBytes].
+ format >= 12 ifTrue:
+ [| nShorts |
+ nShorts := numSlots * 2 - (format bitAnd: 1).
+ ^self allocate16BitObject: class size: nShorts].
+ format >= 10 ifTrue:
+ [^self allocate32BitObject: class size: numSlots].
+ format = 9 ifTrue:
+ [^self allocate64BitObject: class size: numSlots * 2].
+ format = 33 ifTrue:
+ [^self allocateAndPartFillClassObject: class size: numSlots].
+ self error: 'Unknown object format'!

Item was added:
+ ----- Method: Spur64BitImageSegmentLoader>>allocateObject:classIndex:slots: (in category 'reading') -----
+ allocateObject: format classIndex: classIndex slots: numSlots
+ "Allocate an instance of the class referenced by classIndex, with the size computed from numSlots and format."
+ | class |
+ class := (self classIndexInOutPointers: classIndex)
+ ifTrue: [outPointers at: (self outPointerIndexForClassIndex: classIndex)]
+ ifFalse: [oopMap at: (self oopIndexForClassIndex: classIndex)].
+ (format <= 1 or: [format = 5"ephemerons"]) ifTrue:
+ [^self allocateFixedSizeObject: class size: numSlots].
+ format = 2 ifTrue:
+ [^self allocateVariableSizeObject: class size: numSlots].
+ (format between: 3 and: 4) ifTrue:
+ [^self allocateFixedAndVariableObject: class size: numSlots].
+ format >= 16 ifTrue:
+ [| nBytes |
+ nBytes := numSlots * 8 - (format bitAnd: 7).
+ format >= 24 ifTrue:
+ [^self allocateCompiledCode: class size: nBytes].
+ ^self allocate8BitObject: class size: nBytes].
+ format >= 12 ifTrue:
+ [| nShorts |
+ nShorts := numSlots * 4 - (format bitAnd: 3).
+ ^self allocate16BitObject: class size: nShorts].
+ format >= 10 ifTrue:
+ [| nWords |
+ nWords := numSlots * 2 - (format bitAnd: 1).
+ ^self allocate32BitObject: class size: nWords].
+ format = 9 ifTrue:
+ [^self allocate64BitObject: class size: numSlots].
+ format = 33 ifTrue:
+ [^self allocateAndPartFillClassObject: class size: numSlots].
+ self error: 'Unknown object format'!

Item was changed:
  ----- Method: SpurImageSegmentLoader>>allocateObject:classIndex:slots: (in category 'reading') -----
  allocateObject: format classIndex: classIndex slots: numSlots
+ "Allocate an instance of the class referenced by classIndex, with the size computed from numSlots and format."
+ self subclassResponsibility!
- | class |
- class := (self classIndexInOutPointers: classIndex)
- ifTrue: [outPointers at: (self outPointerIndexForClassIndex: classIndex)]
- ifFalse: [oopMap at: (self oopIndexForClassIndex: classIndex)].
- (format <= 1 or: [format = 5"ephemerons"]) ifTrue:
- [^self allocateFixedSizeObject: class size: numSlots].
- format = 2 ifTrue:
- [^self allocateVariableSizeObject: class size: numSlots].
- (format between: 3 and: 4) ifTrue:
- [^self allocateFixedAndVariableObject: class size: numSlots].
- format >= 16 ifTrue:
- [| nBytes |
- nBytes := numSlots * 8 - (format bitAnd: 7).
- format >= 24 ifTrue:
- [^self allocateCompiledCode: class size: nBytes].
- ^self allocate8BitObject: class size: nBytes].
- format >= 12 ifTrue:
- [| nShorts |
- nShorts := numSlots * 4 - (format bitAnd: 3).
- ^self allocate16BitObject: class size: nShorts].
- format >= 10 ifTrue:
- [| nWords |
- nWords := numSlots * 2 - (format bitAnd: 1).
- ^self allocate32BitObject: class size: nWords].
- format = 9 ifTrue:
- [^self allocate64BitObject: class size: numSlots].
- format = 33 ifTrue:
- [^self allocateAndPartFillClassObject: class size: numSlots].
- self error: 'Unknown object format'!