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

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

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

Name: VMMaker.oscog-eem.2947
Author: eem
Time: 16 March 2021, 12:55:58.857415 pm
UUID: 009d2db3-059e-4852-8a76-567d6ee0e2d2
Ancestors: VMMaker.oscog-eem.2946

Fix a dreadful slip in InterpreterPrimitives>>primitiveIdentical.  In the one argument case the old implementation checked the receiver for being forwarded rather than the argument.  This means that the interpreter and/or the debugger will answer the wrong value for e.g. ObjectTest testBecomeForward pt3 == pt2.

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

Item was changed:
  ----- Method: InterpreterPrimitives>>primitiveIdentical (in category 'object access primitives') -----
  primitiveIdentical
  "is the receiver/first argument the same object as the (last) argument?.
  pop argumentCount because this can be used as a mirror primitive."
  | thisObject otherObject |
+ thisObject := self stackValue: 1.
+ otherObject := self stackTop.
- otherObject := self stackValue: 1.
- thisObject := self stackTop.
  ((objectMemory isOopForwarded: otherObject)
  or: [argumentCount > 1
  and: [objectMemory isOopForwarded: thisObject]])
  ifTrue:
  [self primitiveFailFor: PrimErrBadArgument]
  ifFalse:
  [self pop: argumentCount + 1 thenPushBool: thisObject = otherObject]!

Item was changed:
  ----- Method: StackInterpreterSimulator>>primitiveDoPrimitiveWithArgs (in category 'debugging traps') -----
  primitiveDoPrimitiveWithArgs
+ | primIndex |
+ primIndex := objectMemory integerValueOf: (self stackValue: 1).
+ NewspeakVM ifFalse:
+ [transcript nextPutAll: 'DO PRIMITIVE: '; print: (self functionPointerFor: primIndex inClass: nil); cr; flush].
+ (#(110) includes: primIndex) ifTrue:
+ [self halt].
- NewspeakVM ifFalse: [self halt].
  ^super primitiveDoPrimitiveWithArgs!