VM Maker: VMMaker.oscog-eem.2964.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.2964.mcz

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

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

Name: VMMaker.oscog-eem.2964
Author: eem
Time: 27 May 2021, 11:05:14.535182 am
UUID: ba494336-b0c6-40f4-a0ed-be2b024f274d
Ancestors: VMMaker.oscog-eem.2963

Fix a slip in primitiveSetOrHasIdentityHash (a primitive fail didn't return) & a speeling rorre.

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

Item was changed:
  ----- Method: InterpreterPrimitives>>primitiveSetOrHasIdentityHash (in category 'object access primitives') -----
  primitiveSetOrHasIdentityHash
  | hash oldHash thisReceiver isReceiverAClass |
  argumentCount = 0 ifTrue:
  [| hasHash |
  hasHash := (objectMemory isNonImmediate: self stackTop)
  and: [objectMemory hasIdentityHash: self stackTop].
+ self pop: 1 thenPushBool: hasHash.
- self pop: argumentCount + 1 thenPushBool: hasHash.
  ^self].
  argumentCount = 2
  ifTrue:
  [isReceiverAClass := self booleanValueOf: self stackTop.
+ self successful ifFalse:
+ [^self primitiveFailFor: PrimErrBadArgument]]
- self successful ifFalse: [self primitiveFailFor: PrimErrBadArgument] ]
  ifFalse: [isReceiverAClass := false].
  hash := self stackIntegerValue: argumentCount - 1.
  thisReceiver := self stackObjectValue: argumentCount.
  self successful ifTrue:
  [oldHash := objectMemory hashBitsOf: thisReceiver.
  objectMemory setHashBitsOf: thisReceiver to: hash.
+ (isReceiverAClass and: [objectMemory hasSpurMemoryManagerAPI]) ifTrue:
+ [objectMemory classAtIndex: hash put: thisReceiver.
+ "this figures out if the index is ambiguous and fixes all the instances if needed"
+ objectMemory allInstancesOf: thisReceiver].
+ self methodReturnInteger: oldHash]!
- (isReceiverAClass and: [objectMemory hasSpurMemoryManagerAPI]) ifTrue:
- [objectMemory classAtIndex: hash put: thisReceiver.
- "next line figures out if the index is anbiguous and fix all the instances if needed"
- objectMemory allInstancesOf: thisReceiver].
- self pop: argumentCount + 1 thenPushInteger: oldHash]!