VM Maker: Cog-eem.97.mcz

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

VM Maker: Cog-eem.97.mcz

commits-2
 
Eliot Miranda uploaded a new version of Cog to project VM Maker:
http://source.squeak.org/VMMaker/Cog-eem.97.mcz

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

Name: Cog-eem.97
Author: eem
Time: 21 September 2013, 7:37:46.803 am
UUID: afadf03b-6e6a-4c2c-9bf1-b398b50369e5
Ancestors: Cog-eem.96

SpurBootstrap:
Add ^self versions for all Character copy methods.
Add correct Behavior>>instSpec method

=============== Diff against Cog-eem.96 ===============

Item was added:
+ ----- Method: SpurBootstrap class>>BehaviorPROTOTYPEinstSpec (in category 'method prototypes') -----
+ BehaviorPROTOTYPEinstSpec
+ "Answer the instance specification part of the format that defines what kind of object
+ an instance of the receiver is.  The formats are0 = 0 sized objects (UndefinedObject True False et al)
+ 1 = non-indexable objects with inst vars (Point et al)
+ 2 = indexable objects with no inst vars (Array et al)
+ 3 = indexable objects with inst vars (MethodContext AdditionalMethodState et al)
+ 4 = weak indexable objects with inst vars (WeakArray et al)
+ 5 = weak non-indexable objects with inst vars (ephemerons) (Ephemeron)
+ 6 unused, reserved for exotic pointer objects?
+ 7 reserved by the VM
+ 8 unused, reserved for exotic non-pointer objects?
+ 9 (?) 64-bit indexable
+ 10 - 11 32-bit indexable
+ 12 - 15 16-bit indexable
+ 16 - 23 byte indexable
+ 24 - 31 compiled method"
+ ^(format bitShift: -16) bitAnd: 16r1F!

Item was added:
+ ----- Method: SpurBootstrap class>>CharacterPROTOTYPEclone (in category 'method prototypes') -----
+ CharacterPROTOTYPEclone
+ ^self!

Item was added:
+ ----- Method: SpurBootstrap class>>CharacterPROTOTYPEcopy (in category 'method prototypes') -----
+ CharacterPROTOTYPEcopy
+ ^self!

Item was added:
+ ----- Method: SpurBootstrap class>>CharacterPROTOTYPEdeepCopy (in category 'method prototypes') -----
+ CharacterPROTOTYPEdeepCopy
+ ^self!

Item was added:
+ ----- Method: SpurBootstrap class>>CharacterPROTOTYPEshallowCopy (in category 'method prototypes') -----
+ CharacterPROTOTYPEshallowCopy
+ ^self!

Item was added:
+ ----- Method: SpurBootstrap class>>CharacterPROTOTYPEveryDeepCopyWith: (in category 'method prototypes') -----
+ CharacterPROTOTYPEveryDeepCopyWith: deepCopier
+ ^self!

Item was changed:
  ----- Method: SpurBootstrap>>validate (in category 'bootstrap image') -----
  validate
  | p n duplicates maxClassIndex |
  self assert: (reverseMap at: newHeap specialObjectsOop) = oldHeap specialObjectsOop.
  self assert: (map at: oldHeap specialObjectsOop) = newHeap specialObjectsOop.
  self assert: (reverseMap at: newHeap classTableRootObj ifAbsent: []) isNil.
 
  duplicates := { 3. newHeap arrayClassIndexPun. newHeap weakArrayClassIndexPun }.
  maxClassIndex := classToIndex inject: 0 into: [:a :b| a max: b].
  self assert: ((newHeap arrayClassIndexPun to: maxClassIndex) select:
  [:idx| | classObj |
  (classObj := newHeap classAtIndex: idx) ~= newHeap nilObject
  and: [(newHeap classIndexOf: classObj) = (newHeap rawHashBitsOf: classObj)]]) isEmpty.
  0 to: maxClassIndex do:
  [:index| | classObj |
  (index <= newHeap tagMask
  and: [index > newHeap isForwardedObjectClassIndexPun]) ifTrue:
  [(classObj := newHeap classAtIndex: index) = newHeap nilObject
  ifTrue:
  [self assert: (classToIndex keyAtValue: index ifAbsent: []) isNil]
  ifFalse:
  [self assert: (newHeap classIndexOf: classObj) ~= (newHeap rawHashBitsOf: classObj).
  (duplicates includes: index) ifFalse:
  [self assert: (newHeap rawHashBitsOf: classObj) = index]]]].
  classToIndex keysAndValuesDo:
  [:oldClass :idx|
  self assert: (newHeap rawHashBitsOf: (map at: oldClass)) = idx.
  self assert: oldClass = (reverseMap at: (newHeap classAtIndex: idx))].
  n := 0.
  newHeap allObjectsDo:
  [:o|
  (o <= newHeap trueObject
  or: [o > lastClassTablePage]) ifTrue:
  [self assert: (reverseMap includesKey: o).
  self assert: (newHeap fetchClassOfNonImm: o) = (map at: (oldHeap fetchClassOfNonImm: (reverseMap at: o)))].
  n := n + 1.
  p := o].
  p class.
+ self assert: (n between: map size and: map size + 5). "+ 5 is room for classTable"
+
+ "check some class properties to ensure the format changes are correct"
+ self assert: (newHeap fixedFieldsOfClassFormat: (newHeap formatOfClass: newHeap classArray)) = 0.
+ self assert: (newHeap instSpecOfClassFormat: (newHeap formatOfClass: newHeap classArray)) = newHeap arrayFormat!
- self assert: (n between: map size and: map size + 5) "+ 5 is room for classTable"!

Reply | Threaded
Open this post in threaded view
|

Re: VM Maker: Cog-eem.97.mcz

Frank Shearar-3
 
On 21 September 2013 15:37,  <[hidden email]> wrote:

>
> Eliot Miranda uploaded a new version of Cog to project VM Maker:
> http://source.squeak.org/VMMaker/Cog-eem.97.mcz
>
> ==================== Summary ====================
>
> Name: Cog-eem.97
> Author: eem
> Time: 21 September 2013, 7:37:46.803 am
> UUID: afadf03b-6e6a-4c2c-9bf1-b398b50369e5
> Ancestors: Cog-eem.96
>
> SpurBootstrap:
> Add ^self versions for all Character copy methods.
> Add correct Behavior>>instSpec method
>
> =============== Diff against Cog-eem.96 ===============
>
> Item was added:
> + ----- Method: SpurBootstrap class>>BehaviorPROTOTYPEinstSpec (in category 'method prototypes') -----
> + BehaviorPROTOTYPEinstSpec
> +       "Answer the instance specification part of the format that defines what kind of object
> +        an instance of the receiver is.  The formats are0 = 0 sized objects (UndefinedObject True False et al)

It's a trivial nit, but you probably want a newline between 'are' and '0 = '.

frank