[Vm-dev] VM Maker: VMMaker.oscog-eem.2947.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Mar 16 19:56:21 UTC 2021

Eliot Miranda uploaded a new version of VMMaker to project VM Maker:

==================== 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') -----
  	"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]])
  			[self primitiveFailFor: PrimErrBadArgument]
  			[self pop: argumentCount + 1 thenPushBool: thisObject = otherObject]!

Item was changed:
  ----- Method: StackInterpreterSimulator>>primitiveDoPrimitiveWithArgs (in category 'debugging traps') -----
+ 	| 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!

More information about the Vm-dev mailing list