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

commits at source.squeak.org commits at source.squeak.org
Sun Nov 6 13:21:39 UTC 2011


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

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

Name: VMMaker-dtl.257
Author: dtl
Time: 6 November 2011, 9:20:54.941 am
UUID: 68fde856-8649-4c2a-b28e-01b51d5a317b
Ancestors: VMMaker-dtl.256

VMMaker 4.7.14

Remove obsolete primitives from SoundGenerationPlugin (obsolete since 2001). This also eliminates the need to compile support code in platforms/Cross/plugins/SoundGenerationPlugin, which consist of generated sources saved in 1998 that no longer work since removal of successFlag for return status.

Remove obsoleteIndexedPrimitiveTable and obsoleteNamedPrimitiveTable from Interpreter. These were no longer referenced and did not appear in generated code, thus may be safely removed.

Adopt better variable declaration for primitiveFunctionPointer, fix for Interpreter adopted from StackInterpreter.

Add #fileValueOf: to requiredMethodNames for FilePlugin because the DropPlugin platform support code references fileValueOf(), which it expects to have been generated by FilePlugin and visible by virtue of both plugins having been built internal. However, FilePlugin>>fileValueOf: may be fully inlined, in which case the function will be missing.

=============== Diff against VMMaker-dtl.256 ===============

Item was added:
+ ----- Method: FilePlugin class>>requiredMethodNames (in category 'translation') -----
+ requiredMethodNames
+ 	"return the list of method names that should be retained for export or other support reasons"
+ 	"just which methods?"
+ 	^#( fileValueOf: ) "referenced by DropPlugin support code"!

Item was changed:
  ----- Method: Interpreter class>>declareCVarsIn: (in category 'translation') -----
  declareCVarsIn: aCCodeGenerator
  	aCCodeGenerator addHeaderFile:'<setjmp.h>'.
  	aCCodeGenerator 
  		var: #interpreterProxy 
  		type: #'struct VirtualMachine*'.
  	aCCodeGenerator
  		var: #primitiveTable
  		declareC: 'void *primitiveTable[', (MaxPrimitiveIndex +2) printString, '] = ',	self primitiveTableString.
  	aCCodeGenerator
  		var: #primitiveFunctionPointer
+ 		declareC: 'void (*primitiveFunctionPointer)()'.
- 		declareC: 'void *primitiveFunctionPointer'				.		"xxxx FIX THIS STUPIDITY xxxx - ikp. What he means is use a better type than void *, apparently - tpr"
  	aCCodeGenerator
  		var: #methodCache
  		declareC: 'long methodCache[', (MethodCacheSize + 1) printString, ']'.
  	aCCodeGenerator
  		var: #atCache
  		declareC: 'sqInt atCache[', (AtCacheTotalSize + 1) printString, ']'.
  	aCCodeGenerator var: #statGCTime type: #'sqLong'.
  	aCCodeGenerator var: #statFullGCMSecs type: #'sqLong'.
  	aCCodeGenerator var: #statIGCDeltaTime type: #'sqLong'.
  	aCCodeGenerator var: #statIncrGCMSecs type: #'sqLong'.
  	aCCodeGenerator var: #localIP type: #'char*'.
  	aCCodeGenerator var: #localSP type: #'char*'.
  	aCCodeGenerator var: #showSurfaceFn type: #'void*'.
  	aCCodeGenerator var: 'semaphoresToSignalA'
  		declareC: 'sqInt semaphoresToSignalA[', (SemaphoresToSignalSize + 1) printString, ']'.
  	aCCodeGenerator var: 'semaphoresToSignalB'
  		declareC: 'sqInt semaphoresToSignalB[', (SemaphoresToSignalSize + 1) printString, ']'.
  	aCCodeGenerator
  		var: #compilerHooks
  		declareC: 'sqInt (*compilerHooks[', (CompilerHooksSize + 1) printString, '])()'.
  	aCCodeGenerator
  		var: #interpreterVersion
  		declareC: 'const char *interpreterVersion = "', SmalltalkImage current datedVersion, ' [', SmalltalkImage current lastUpdateString,']"'.
  	aCCodeGenerator
- 		var: #obsoleteIndexedPrimitiveTable
- 		declareC: 'char* obsoleteIndexedPrimitiveTable[][3] = ', self obsoleteIndexedPrimitiveTableString.
- 	aCCodeGenerator
- 		var: #obsoleteNamedPrimitiveTable
- 		declareC: 'const char* obsoleteNamedPrimitiveTable[][3] = ', self obsoleteNamedPrimitiveTableString.
- 	aCCodeGenerator
  		var: #externalPrimitiveTable
  		declareC: 'void *externalPrimitiveTable[', (MaxExternalPrimitiveTableSize + 1) printString, ']'.
  
  	self declareCAsOop: {
  			#instructionPointer .
  			#method .
  			#newMethod .
  			#activeContext .
  			#theHomeContext .
  			#stackPointer }
  		in: aCCodeGenerator.
  		
  	aCCodeGenerator
  		var: #jmpBuf
  		declareC: 'jmp_buf jmpBuf[', (MaxJumpBuf + 1) printString, ']'.
  	aCCodeGenerator
  		var: #suspendedCallbacks
  		declareC: 'sqInt suspendedCallbacks[', (MaxJumpBuf + 1) printString, ']'.
  	aCCodeGenerator
  		var: #suspendedMethods
  		declareC: 'sqInt suspendedMethods[', (MaxJumpBuf + 1) printString, ']'.
  
  	"Reinitialized at interpreter entry by #initializeImageFormatVersion"
  	aCCodeGenerator
  		var: #imageFormatVersionNumber
  		declareC: 'sqInt imageFormatVersionNumber = 0'.
  	"Declared here to prevent inclusion in foo struct by CCodeGeneratorGlobalStructure"
  	aCCodeGenerator
  		var: #imageFormatInitialVersion
  		declareC: 'sqInt imageFormatInitialVersion = 0'
  !

Item was removed:
- ----- Method: Interpreter class>>obsoleteIndexedPrimitiveTable (in category 'initialization') -----
- obsoleteIndexedPrimitiveTable
- 	"Interpreter obsoleteIndexedPrimitiveTableString"
- 	"Initialize the links from the (now obsolete) indexed primitives to
- 	the new named primitives."
- 	| table |
- 	table := Array new: MaxPrimitiveIndex+1.
- 	#(
- 		(96	(BitBltPlugin primitiveCopyBits))
- 		(104 (BitBltPlugin primitiveDrawLoop))
- 		(147 (BitBltPlugin primitiveWarpBits))
- 
- 		(146 (JoystickTabletPlugin primitiveReadJoystick))
- 
- 		"File Primitives (150-169)"
- 		(150 (FilePlugin primitiveFileAtEnd))
- 		(151 (FilePlugin primitiveFileClose))
- 		(152 (FilePlugin primitiveFileGetPosition))
- 		(153 (FilePlugin primitiveFileOpen))
- 		(154 (FilePlugin primitiveFileRead))
- 		(155 (FilePlugin primitiveFileSetPosition))
- 		(156 (FilePlugin primitiveFileDelete))
- 		(157 (FilePlugin primitiveFileSize))
- 		(158 (FilePlugin primitiveFileWrite))
- 		(159 (FilePlugin primitiveFileRename))
- 		(160 (FilePlugin primitiveDirectoryCreate))
- 		(161 (FilePlugin primitiveDirectoryDelimitor))
- 		(162 (FilePlugin primitiveDirectoryLookup))
- 		(163 (FilePlugin primitiveDirectoryDelete))
- 		(164 (FilePlugin primitiveDirectoryGetMacTypeAndCreator))
- 		(169 (FilePlugin primitiveDirectorySetMacTypeAndCreator))
- 
- 		"Sound Primitives (170-199)"
- 		(170 (SoundPlugin primitiveSoundStart))
- 		(171 (SoundPlugin primitiveSoundStartWithSemaphore))
- 		(172 (SoundPlugin primitiveSoundStop))
- 		(173 (SoundPlugin primitiveSoundAvailableSpace))
- 		(174 (SoundPlugin primitiveSoundPlaySamples))
- 		(175 (SoundPlugin primitiveSoundPlaySilence))
- 
- 		(176 (SoundGenerationPlugin primitiveWaveTableSoundMix))
- 		(177 (SoundGenerationPlugin primitiveFMSoundMix))
- 		(178 (SoundGenerationPlugin primitivePluckedSoundMix))
- 		(179 (SoundGenerationPlugin primitiveSampledSoundMix))
- 		(180 (SoundGenerationPlugin primitiveMixFMSound))
- 		(181 (SoundGenerationPlugin primitiveMixPluckedSound))
- 		(182 (SoundGenerationPlugin primitiveOldSampledSoundMix))
- 		(183 (SoundGenerationPlugin primitiveApplyReverb))
- 		(184 (SoundGenerationPlugin primitiveMixLoopedSampledSound))
- 		(185 (SoundGenerationPlugin primitiveMixSampledSound))
- 
- 		(189 (SoundPlugin primitiveSoundInsertSamples))
- 		(190 (SoundPlugin primitiveSoundStartRecording))
- 		(191 (SoundPlugin primitiveSoundStopRecording))
- 		(192 (SoundPlugin primitiveSoundGetRecordingSampleRate))
- 		(193 (SoundPlugin primitiveSoundRecordSamples))
- 		(194 (SoundPlugin primitiveSoundSetRecordLevel))
- 
- 		"Networking Primitives (200-229)"
- 		(200 (SocketPlugin primitiveInitializeNetwork))
- 		(201 (SocketPlugin primitiveResolverStartNameLookup))
- 		(202 (SocketPlugin primitiveResolverNameLookupResult))
- 		(203 (SocketPlugin primitiveResolverStartAddressLookup))
- 		(204 (SocketPlugin primitiveResolverAddressLookupResult))
- 		(205 (SocketPlugin primitiveResolverAbortLookup))
- 		(206 (SocketPlugin primitiveResolverLocalAddress))
- 		(207 (SocketPlugin primitiveResolverStatus))
- 		(208 (SocketPlugin primitiveResolverError))
- 		(209 (SocketPlugin primitiveSocketCreate))
- 		(210 (SocketPlugin primitiveSocketDestroy))
- 		(211 (SocketPlugin primitiveSocketConnectionStatus))
- 		(212 (SocketPlugin primitiveSocketError))
- 		(213 (SocketPlugin primitiveSocketLocalAddress))
- 		(214 (SocketPlugin primitiveSocketLocalPort))
- 		(215 (SocketPlugin primitiveSocketRemoteAddress))
- 		(216 (SocketPlugin primitiveSocketRemotePort))
- 		(217 (SocketPlugin primitiveSocketConnectToPort))
- 		(218 (SocketPlugin primitiveSocketListenWithOrWithoutBacklog))
- 		(219 (SocketPlugin primitiveSocketCloseConnection))
- 		(220 (SocketPlugin primitiveSocketAbortConnection))
- 		(221 (SocketPlugin primitiveSocketReceiveDataBufCount))
- 		(222 (SocketPlugin primitiveSocketReceiveDataAvailable))
- 		(223 (SocketPlugin primitiveSocketSendDataBufCount))
- 		(224 (SocketPlugin primitiveSocketSendDone))
- 		(225 (SocketPlugin primitiveSocketAccept))
- 
- 		"Other Primitives (230-249)"
- 		(234 (MiscPrimitivePlugin primitiveDecompressFromByteArray))
- 		(235 (MiscPrimitivePlugin primitiveCompareString))
- 		(236 (MiscPrimitivePlugin primitiveConvert8BitSigned))
- 		(237 (MiscPrimitivePlugin primitiveCompressToByteArray))
- 		(238 (SerialPlugin primitiveSerialPortOpen))
- 		(239 (SerialPlugin primitiveSerialPortClose))
- 		(240 (SerialPlugin primitiveSerialPortWrite))
- 		(241 (SerialPlugin primitiveSerialPortRead))
- 
- 		(243 (MiscPrimitivePlugin primitiveTranslateStringWithTable))
- 		(244 (MiscPrimitivePlugin primitiveFindFirstInString))
- 		(245 (MiscPrimitivePlugin primitiveIndexOfAsciiInString))
- 		(246 (MiscPrimitivePlugin primitiveFindSubstring))
- 
- 		"MIDI Primitives (521-539)"
- 		(521 (MIDIPlugin primitiveMIDIClosePort))
- 		(522 (MIDIPlugin primitiveMIDIGetClock))
- 		(523 (MIDIPlugin primitiveMIDIGetPortCount))
- 		(524 (MIDIPlugin primitiveMIDIGetPortDirectionality))
- 		(525 (MIDIPlugin primitiveMIDIGetPortName))
- 		(526 (MIDIPlugin primitiveMIDIOpenPort))
- 		(527 (MIDIPlugin primitiveMIDIParameterGetOrSet))
- 		(528 (MIDIPlugin primitiveMIDIRead))
- 		(529 (MIDIPlugin primitiveMIDIWrite))
- 
- 		"Experimental Asynchrous File Primitives"
- 		(540 (AsynchFilePlugin primitiveAsyncFileClose))
- 		(541 (AsynchFilePlugin primitiveAsyncFileOpen))
- 		(542 (AsynchFilePlugin primitiveAsyncFileReadResult))
- 		(543 (AsynchFilePlugin primitiveAsyncFileReadStart))
- 		(544 (AsynchFilePlugin primitiveAsyncFileWriteResult))
- 		(545 (AsynchFilePlugin primitiveAsyncFileWriteStart))
- 
- 		"Pen Tablet Primitives"
- 		(548 (JoystickTabletPlugin primitiveGetTabletParameters))
- 		(549 (JoystickTabletPlugin primitiveReadTablet))
- 
- 		"Sound Codec Primitives"
- 
- 		(550 (ADPCMCodecPlugin primitiveDecodeMono))
- 		(551 (ADPCMCodecPlugin primitiveDecodeStereo))	
- 		(552 (ADPCMCodecPlugin primitiveEncodeMono))	
- 		(553 (ADPCMCodecPlugin primitiveEncodeStereo))
- 
- 	) do:[:spec| table at: spec first+1 put: spec second].
- 	^table!

Item was removed:
- ----- Method: Interpreter class>>obsoleteIndexedPrimitiveTableString (in category 'initialization') -----
- obsoleteIndexedPrimitiveTableString
- 	"Interpreter obsoleteIndexedPrimitiveTableString"
- 	"Initialize the links from the (now obsolete) indexed primitives 
- 	to the new named primitives."
- 	| table |
- 	table := self obsoleteIndexedPrimitiveTable.
- 	^ String streamContents: [:s | 
- 			s nextPutAll: '{';
- 				 cr.
- 			table doWithIndex: [:primSpec :idx | 
- 					primSpec
- 						ifNil: [s nextPutAll: '{ NULL, NULL, NULL }']
- 						ifNotNil: [s nextPutAll: '{ "';
- 								 nextPutAll: primSpec first;
- 								 nextPutAll: '", "';
- 								 nextPutAll: primSpec last;
- 								 nextPutAll: '", NULL }'].
- 					idx < table size
- 						ifTrue: [s nextPut: $,;
- 								 cr]].
- 			s cr; nextPutAll: '}']!

Item was removed:
- ----- Method: Interpreter class>>obsoleteNamedPrimitiveTable (in category 'initialization') -----
- obsoleteNamedPrimitiveTable
- 	"Interpreter obsoleteNamedPrimitiveTableString"
- 	"Initialize the links from the (now obsolete) named primitives to
- 	the new named primitives."
- 	^#(
- 		(gePrimitiveMergeFillFrom B2DPlugin primitiveMergeFillFrom)
- 		(gePrimitiveSetClipRect B2DPlugin primitiveSetClipRect)
- 		(gePrimitiveDoProfileStats B2DPlugin primitiveDoProfileStats)
- 		(gePrimitiveAddCompressedShape B2DPlugin primitiveAddCompressedShape)
- 		(gePrimitiveFinishedProcessing B2DPlugin primitiveFinishedProcessing)
- 		(gePrimitiveGetBezierStats B2DPlugin primitiveGetBezierStats)
- 		(gePrimitiveSetDepth B2DPlugin primitiveSetDepth)
- 		(gePrimitiveAbortProcessing B2DPlugin primitiveAbortProcessing)
- 		(gePrimitiveGetTimes B2DPlugin primitiveGetTimes)
- 		(gePrimitiveNextActiveEdgeEntry B2DPlugin primitiveNextActiveEdgeEntry)
- 		(gePrimitiveAddBezier B2DPlugin primitiveAddBezier)
- 		(gePrimitiveRenderScanline B2DPlugin primitiveRenderScanline)
- 		(gePrimitiveAddBezierShape B2DPlugin primitiveAddBezierShape)
- 		(gePrimitiveAddLine B2DPlugin primitiveAddLine)
- 		(gePrimitiveRenderImage B2DPlugin primitiveRenderImage)
- 		(gePrimitiveGetAALevel B2DPlugin primitiveGetAALevel)
- 		(gePrimitiveRegisterExternalEdge B2DPlugin primitiveRegisterExternalEdge)
- 		(gePrimitiveInitializeBuffer B2DPlugin primitiveInitializeBuffer)
- 		(gePrimitiveAddRect B2DPlugin primitiveAddRect)
- 		(gePrimitiveInitializeProcessing B2DPlugin primitiveInitializeProcessing)
- 		(gePrimitiveAddBitmapFill B2DPlugin primitiveAddBitmapFill)
- 		(gePrimitiveGetClipRect B2DPlugin primitiveGetClipRect)
- 		(gePrimitiveGetFailureReason B2DPlugin primitiveGetFailureReason)
- 		(gePrimitiveNextGlobalEdgeEntry B2DPlugin primitiveNextGlobalEdgeEntry)
- 		(gePrimitiveNextFillEntry B2DPlugin primitiveNextFillEntry)
- 		(gePrimitiveSetColorTransform B2DPlugin primitiveSetColorTransform)
- 		(gePrimitiveDisplaySpanBuffer B2DPlugin primitiveDisplaySpanBuffer)
- 		(gePrimitiveGetOffset B2DPlugin primitiveGetOffset)
- 		(gePrimitiveAddPolygon B2DPlugin primitiveAddPolygon)
- 		(gePrimitiveNeedsFlush B2DPlugin primitiveNeedsFlush)
- 		(gePrimitiveAddOval B2DPlugin primitiveAddOval)
- 		(gePrimitiveSetAALevel B2DPlugin primitiveSetAALevel)
- 		(gePrimitiveCopyBuffer B2DPlugin primitiveCopyBuffer)
- 		(gePrimitiveAddActiveEdgeEntry B2DPlugin primitiveAddActiveEdgeEntry)
- 		(gePrimitiveGetCounts B2DPlugin primitiveGetCounts)
- 		(gePrimitiveSetOffset B2DPlugin primitiveSetOffset)
- 		(gePrimitiveAddGradientFill B2DPlugin primitiveAddGradientFill)
- 		(gePrimitiveChangedActiveEdgeEntry B2DPlugin primitiveChangedActiveEdgeEntry)
- 		(gePrimitiveRegisterExternalFill B2DPlugin primitiveRegisterExternalFill)
- 		(gePrimitiveGetDepth B2DPlugin primitiveGetDepth)
- 		(gePrimitiveSetEdgeTransform B2DPlugin primitiveSetEdgeTransform)
- 		(gePrimitiveNeedsFlushPut B2DPlugin primitiveNeedsFlushPut)
- 
- 		(primitiveFloatArrayAt FloatArrayPlugin primitiveAt)
- 		(primitiveFloatArrayMulFloatArray FloatArrayPlugin primitiveMulFloatArray)
- 		(primitiveFloatArrayAddScalar FloatArrayPlugin primitiveAddScalar)
- 		(primitiveFloatArrayDivFloatArray FloatArrayPlugin primitiveDivFloatArray)
- 		(primitiveFloatArrayDivScalar FloatArrayPlugin primitiveDivScalar)
- 		(primitiveFloatArrayHash FloatArrayPlugin primitiveHashArray)
- 		(primitiveFloatArrayAtPut FloatArrayPlugin primitiveAtPut)
- 		(primitiveFloatArrayMulScalar FloatArrayPlugin primitiveMulScalar)
- 		(primitiveFloatArrayAddFloatArray FloatArrayPlugin primitiveAddFloatArray)
- 		(primitiveFloatArraySubScalar FloatArrayPlugin primitiveSubScalar)
- 		(primitiveFloatArraySubFloatArray FloatArrayPlugin primitiveSubFloatArray)
- 		(primitiveFloatArrayEqual FloatArrayPlugin primitiveEqual)
- 		(primitiveFloatArrayDotProduct FloatArrayPlugin primitiveDotProduct)
- 
- 		(m23PrimitiveInvertRectInto Matrix2x3Plugin primitiveInvertRectInto)
- 		(m23PrimitiveTransformPoint Matrix2x3Plugin primitiveTransformPoint)
- 		(m23PrimitiveIsPureTranslation Matrix2x3Plugin primitiveIsPureTranslation)
- 		(m23PrimitiveComposeMatrix Matrix2x3Plugin primitiveComposeMatrix)
- 		(m23PrimitiveTransformRectInto Matrix2x3Plugin primitiveTransformRectInto)
- 		(m23PrimitiveIsIdentity Matrix2x3Plugin primitiveIsIdentity)
- 		(m23PrimitiveInvertPoint Matrix2x3Plugin primitiveInvertPoint)
- 
- 		(primitiveDeflateBlock ZipPlugin primitiveDeflateBlock)
- 		(primitiveDeflateUpdateHashTable ZipPlugin primitiveDeflateUpdateHashTable)
- 		(primitiveUpdateGZipCrc32 ZipPlugin primitiveUpdateGZipCrc32)
- 		(primitiveInflateDecompressBlock ZipPlugin primitiveInflateDecompressBlock)
- 		(primitiveZipSendBlock ZipPlugin primitiveZipSendBlock)
- 
- 		(primitiveFFTTransformData FFTPlugin primitiveFFTTransformData)
- 		(primitiveFFTScaleData FFTPlugin primitiveFFTScaleData)
- 		(primitiveFFTPermuteData FFTPlugin primitiveFFTPermuteData)
- 	)!

Item was removed:
- ----- Method: Interpreter class>>obsoleteNamedPrimitiveTableString (in category 'initialization') -----
- obsoleteNamedPrimitiveTableString
- 	"Interpreter obsoleteNamedPrimitiveTableString"
- 	"Initialize the links from the (now obsolete) indexed primitives 
- 	to the new named primitives."
- 	| table |
- 	table := self obsoleteNamedPrimitiveTable.
- 	^ String streamContents: [:s | 
- 			s nextPutAll: '{';
- 				 cr.
- 			table do: [:primSpec | s nextPutAll: '{ "';
- 						 nextPutAll: primSpec first;
- 						 nextPutAll: '", "';
- 						 nextPutAll: primSpec second;
- 						 nextPutAll: '", "';
- 						 nextPutAll: primSpec third;
- 						 nextPutAll: '" },';
- 						 cr].
- 			s nextPutAll: '{ NULL, NULL, NULL }'.
- 			s cr; nextPutAll: '}']!

Item was removed:
- ----- Method: SoundGenerationPlugin>>primitiveFMSoundMix (in category 'obsolete primitives') -----
- primitiveFMSoundMix
- 	<export: true>
- 	^self primFMSoundmixSampleCountintostartingAtpan!

Item was removed:
- ----- Method: SoundGenerationPlugin>>primitiveOldSampledSoundMix (in category 'obsolete primitives') -----
- primitiveOldSampledSoundMix
- 	<export: true>
- 	^self oldprimSampledSoundmixSampleCountintostartingAtleftVolrightVol!

Item was removed:
- ----- Method: SoundGenerationPlugin>>primitivePluckedSoundMix (in category 'obsolete primitives') -----
- primitivePluckedSoundMix
- 	<export: true>
- 	^self primPluckedSoundmixSampleCountintostartingAtpan!

Item was removed:
- ----- Method: SoundGenerationPlugin>>primitiveSampledSoundMix (in category 'obsolete primitives') -----
- primitiveSampledSoundMix
- 	<export: true>
- 	^self primSampledSoundmixSampleCountintostartingAtpan!

Item was removed:
- ----- Method: SoundGenerationPlugin>>primitiveWaveTableSoundMix (in category 'obsolete primitives') -----
- primitiveWaveTableSoundMix
- 	<export: true>
- 	^self primWaveTableSoundmixSampleCountintostartingAtpan!

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



More information about the Vm-dev mailing list