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

commits at source.squeak.org commits at source.squeak.org
Fri Jan 9 19:16:09 UTC 2015


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

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

Name: VMMaker.oscog-eem.1009
Author: eem
Time: 3 January 2015, 12:26:13.686 pm
UUID: b7476b8c-cba9-42a5-8b0d-676775d111ef
Ancestors: VMMaker.oscog-eem.1008

Fix slip in primitivePin.

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

Item was changed:
  ----- Method: InterpreterPrimitives>>primitivePin (in category 'memory space primitives') -----
  primitivePin
  	"Pin or unpin the receiver, i.e. make it immobile or mobile, based on the argument.
  	 Answer whether the object was already pinned. N.B. pinning does *not* prevent
  	 an object from being garbage collected."
  	| obj boolean wasPinned |
  	objectMemory hasSpurMemoryManagerAPI ifFalse:
  		[^self primitiveFailFor: PrimErrUnsupported].
  
  	obj := self stackValue: 1.
  	((objectMemory isImmediate: obj)
  	 or: [(objectMemory isForwarded: obj)
  	 or: [(objectMemory isContext: obj)
  		and: [self isStillMarriedContext: obj]]]) ifTrue:
  		[^self primitiveFailFor: PrimErrBadReceiver].
  	boolean := self stackTop.
  	(boolean = objectMemory falseObject
  	 or: [boolean = objectMemory trueObject]) ifFalse:
  		[^self primitiveFailFor: PrimErrBadArgument].
  
  	(objectMemory isPinned: obj)
  		ifTrue:
  			[wasPinned := objectMemory trueObject.
  			 objectMemory setIsPinnedOf: obj to: boolean = objectMemory trueObject]
  		ifFalse:
  			[wasPinned := objectMemory falseObject.
  			 (boolean = objectMemory trueObject
+ 			  and: [(objectMemory pinObject: obj) = 0]) ifTrue:
- 			  and: [objectMemory pinObject: obj]) = 0 ifTrue:
  				[^self primitiveFailFor: PrimErrNoMemory]].
  	
  	self pop: argumentCount + 1 thenPush: wasPinned!



More information about the Vm-dev mailing list