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

commits at source.squeak.org commits at source.squeak.org
Thu Aug 2 01:22:49 UTC 2012


David T. Lewis uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker-dtl.283.mcz

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

Name: VMMaker-dtl.283
Author: dtl
Time: 1 August 2012, 9:21:25.424 pm
UUID: 33489311-5d53-4e24-b4ff-f7f20244535f
Ancestors: VMMaker-bf.282

Add the Scratch plugins as external plugins in defaultUnixSpec for "VMMakerTool forUnix".

Interpreter>>pushClosureCopyCopiedValuesBytecode no longer needs to set bytesPerWord.

Fix ObjectMemorySimulator>>firstIndexableField: refactoring bug, send #lengthOf:hdr:fmt: to interpreter not to self.

=============== Diff against VMMaker-bf.282 ===============

Item was changed:
  ----- Method: Interpreter>>pushClosureCopyCopiedValuesBytecode (in category 'stack bytecodes') -----
  pushClosureCopyCopiedValuesBytecode
  	"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:
  			[:i|
  			"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: ObjectMemorySimulator>>firstIndexableField: (in category 'memory access') -----
  firstIndexableField: oop
  	"NOTE: overridden from Interpreter to add coercion to CArray"
  
  	| hdr fmt totalLength fixedFields |
  	self returnTypeC: 'void *'.
  	hdr := self baseHeader: oop.
  	fmt := (hdr >> 8) bitAnd: 16rF.
+ 	totalLength := interpreter lengthOf: oop baseHeader: hdr format: fmt.
- 	totalLength := self lengthOf: oop baseHeader: hdr format: fmt.
  	fixedFields := self fixedFieldsOf: oop format: fmt length: totalLength.
  	fmt < 8 ifTrue:
  		[fmt = 6 ifTrue:
  			["32 bit field objects"
  			^ self cCoerce: (self pointerForOop: oop + self baseHeaderSize + (fixedFields << 2)) to: 'int *'].
  		"full word objects (pointer or bits)"
  		^ self cCoerce: (self pointerForOop: oop + self baseHeaderSize + (fixedFields << self shiftForWord)) to: 'oop *']
  		ifFalse:
  		["Byte objects"
  		^ self cCoerce: (self pointerForOop: oop + self baseHeaderSize + fixedFields) to: 'char *']!

Item was changed:
  ----- Method: VMMakerTool class>>defaultUnixSpec (in category 'configurations') -----
  defaultUnixSpec
  	"Typical VMMaker spec for a unix/linux target platform"
  
  	"VMMakerTool defaultUnixSpec"
  
  	^#(
  		#(	"internal plugins"
  			#ADPCMCodecPlugin
  			#AsynchFilePlugin
  			#BMPReadWriterPlugin
  			#BalloonEnginePlugin
  			#BitBltSimulation
  			#CroquetPlugin
  			#DSAPlugin
  			#DeflatePlugin
  			#DropPlugin
  			#FFTPlugin
  			#FT2Plugin
  			#FilePlugin
  			#FloatArrayPlugin
  			#FloatMathPlugin
  			#GeniePlugin
  			#JPEGReadWriter2Plugin
  			#JPEGReaderPlugin
  			#JoystickTabletPlugin
  			#KlattSynthesizerPlugin
  			#LargeIntegersPlugin
  			#LocalePlugin
  			#MD5Plugin
  			#Matrix2x3Plugin
  			#MiscPrimitivePlugin
  			#RandPlugin
  			#RePlugin
  			#SHA256Plugin
  			#SecurityPlugin
  			#SerialPlugin
  			#SlangTestPlugin
  			#SlangTestSupportPlugin
  			#SocketPlugin
  			#SoundCodecPlugin
  			#SoundGenerationPlugin
  			#SoundPlugin
  			#StarSqueakPlugin
  			#SurfacePlugin
  		)
  		#(	"external plugins"
  			#B3DAcceleratorPlugin
  			#B3DEnginePlugin
  			#ClipboardExtendedPlugin
  			#DBusPlugin
  			#FFIPlugin
  			#FileCopyPlugin
  			#GStreamerPlugin
  			#HostWindowPlugin
  			#KedamaPlugin
  			#KedamaPlugin2
  			#MIDIPlugin
  			#Mpeg3Plugin
  			#RomePlugin
  			#UUIDPlugin
  			#UnixAioPlugin
  			#UnixOSProcessPlugin
  			#XDisplayControlPlugin
+ 			#CameraPlugin
+ 			#ScratchPlugin
+ 			#UnicodePlugin
+ 			#WeDoPlugin
  		)
  		true			"inline flag"
  		false			"forBrowser flag"
  		'unix'			"platform"
  		'src'			"source directory for generated sources"
  		'platforms'		"path to platform sources"
  		4				"unused, was bytesPerWord which is now a compile time definition"
  		true			"unused, was flag for source directtory pathname is relative"
  		true			"unused, was flag for platforms directory path is relative"
  		'Interpreter'	"interpreter class name"
  	)!



More information about the Vm-dev mailing list