VM Maker: VMMaker.oscog-eem.2965.mcz

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

VM Maker: VMMaker.oscog-eem.2965.mcz

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

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

Name: VMMaker.oscog-eem.2965
Author: eem
Time: 27 May 2021, 8:19:40.639111 pm
UUID: 1856cb21-d33c-4bb0-a610-2379ae8ffa4f
Ancestors: VMMaker.oscog-eem.2964

Make stSizeOf: easier to optimize. Correct the comment for SpurMemoryManager>>slotSizeOf:.

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

Item was changed:
  ----- Method: SpurMemoryManager>>slotSizeOf: (in category 'object access') -----
  slotSizeOf: oop
  "*DO NOT CONFUSE THIS WITH numSlotsOf:.
  This is an ObjectMemory compatibility method with questionable semantics.
  Answers the number of slots in the receiver.
  If the receiver is a byte object, return the number of bytes.
+ If the receiver is a short object, return the number of shorts.
+ If the receiver is a word object, return the number of words.
+ If the receiver is a double word object, return the number of double words.
+ Otherwise return the number of pointers."
- Otherwise return the number of words."
  (self isImmediate: oop) ifTrue: [^0].
  ^self lengthOf: oop!

Item was changed:
  ----- Method: StackInterpreter>>stSizeOf: (in category 'indexing primitive support') -----
  stSizeOf: oop
+ "Answer the number of indexable fields in the given object. (i.e., what Smalltalk would return for <obj> size)."
+ "Note: Assume oop is not an immediate!!"
- "Return the number of indexable fields in the given object. (i.e., what Smalltalk would return for <obj> size)."
- "Note: Assume oop is not a SmallInteger!!"
 
  | hdr fmt totalLength fixedFields |
  <inline: false>
  hdr := objectMemory baseHeader: oop.
  fmt := objectMemory formatOfHeader: hdr.
  totalLength := objectMemory lengthOf: oop baseHeader: hdr format: fmt.
+ (objectMemory isPureBitsFormat: fmt) ifTrue:
+ [^totalLength].
  fixedFields := objectMemory fixedFieldsOf: oop format: fmt length: totalLength.
  fmt = objectMemory indexablePointersFormat ifTrue:
  [self assert: (objectMemory isContextHeader: hdr) not].
  ^totalLength - fixedFields!