[Vm-dev] VM Maker: VMMaker-dtl.284.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Aug 3 05:14:09 UTC 2012

David T. Lewis uploaded a new version of VMMaker to project VM Maker:

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

Name: VMMaker-dtl.284
Author: dtl
Time: 3 August 2012, 1:11:01.543 am
UUID: dcf2bd17-a89f-4aa4-a19c-b972928c07ac
Ancestors: VMMaker-dtl.283

VMMaker 4.9.9

Revert incorrect change to #pushClosureCopyCopiedValuesBytecode to restore original code that sets the imageFormatVersionNumber. This is still required for saving image files with the correct magic number.

VMMaker-dtl.283 contains the incorrect version of #pushClosureCopyCopiedValuesBytecode and should not be used.

=============== Diff against VMMaker-dtl.283 ===============

Item was changed:
  ----- Method: Interpreter>>pushClosureCopyCopiedValuesBytecode (in category 'stack bytecodes') -----
  	"The compiler has pushed the values to be copied, if any.  Find numArgs and numCopied in the byte following.
  	 Create a Closure with space for the copiedValues and pop numCopied values off the stack into the closure.
  	 Set numArgs as specified, and set startpc to the pc following the block size and jump over that code."
  	| newClosure numArgsNumCopied numArgs numCopied blockSize |
+ 	objectMemory bytesPerWord == 4
+ 		ifTrue: [imageFormatVersionNumber := 6504]
+ 		ifFalse: [imageFormatVersionNumber := 68002].
  	numArgsNumCopied := self fetchByte.
  	numArgs := numArgsNumCopied bitAnd: 16rF.
  	numCopied := numArgsNumCopied bitShift: -4.
  	"Split blockSize := (self fetchByte * 256) + self fetchByte. into two because evaluation order in C is undefined."
  	blockSize := self fetchByte << 8.
  	blockSize := blockSize + self fetchByte.
  	self externalizeIPandSP. "This is a pain."
  	newClosure := self
  					closureNumArgs: numArgs
  					instructionPointer: ((objectMemory oopForPointer: localIP) + 2 - (method + objectMemory baseHeaderSize))
  					numCopiedValues: numCopied.
  	self internalizeIPandSP.
  	"Assume: have just allocated a new closure; it must be young. Thus, can use unchecked stores."
  	objectMemory storePointerUnchecked: ClosureOuterContextIndex ofObject: newClosure withValue: activeContext.
  	reclaimableContextCount := 0. "The closure refers to thisContext so it can't be reclaimed."
  	numCopied > 0 ifTrue:
  		[0 to: numCopied - 1 do:
  			"Assume: have just allocated a new BlockClosure; it must be young.
  			 Thus, can use unchecked stores."
  			 objectMemory storePointerUnchecked: i + ClosureFirstCopiedValueIndex
  				ofObject: newClosure
  				withValue: (self internalStackValue: numCopied - i - 1)].
  		 self internalPop: numCopied].
  	localIP := localIP + blockSize.
  	self fetchNextBytecode.
  	self internalPush: newClosure!

Item was changed:
  ----- Method: VMMaker class>>versionString (in category 'version testing') -----
  	"VMMaker versionString"
+ 	^'4.9.9'!
- 	^'4.9.8'!

More information about the Vm-dev mailing list