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

commits at source.squeak.org commits at source.squeak.org
Fri Nov 15 23:45:37 UTC 2019

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

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

Name: VMMaker.oscog-eem.2582
Author: eem
Time: 15 November 2019, 3:45:10.376795 pm
UUID: 0ebe26fd-934b-4a0e-8d53-fd9f30a3246b
Ancestors: VMMaker.oscog-eem.2581

Slang: avoid generating gcc3x-validImage.c.  Including sqGnu.h only benefits something that has an interpret method.

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

Item was changed:
  ----- Method: VMMaker>>generateInterpreterFile (in category 'generate sources') -----
  	"Translate the Smalltalk description of the virtual machine into C.  If 'self doInlining' is true, small method bodies are inlined to reduce procedure call overhead.  On the PPC, this results in a factor of three speedup with only 30% increase in code size.  Subclasses can use specialised versions of CCodeGenerator and interpreterClass."
  	| cg vmHeaderContents |
  	cg := [self buildCodeGeneratorForInterpreter]
  			on: Notification
  			do: [:ex|
  				ex tag == #getVMMaker
  					ifTrue: [ex resume: self]
  					ifFalse: [(ex respondsTo: #rearmHandlerDuring:)
  								ifTrue: [ex rearmHandlerDuring: [ex pass]]
  								ifFalse: [ex pass]]].
  	self reinitializeWordSizeFrom: cg.
  	self interpreterClass additionalHeadersDo:
  		[:headerName :headerContents| | filePath |
  		 filePath := self coreVMDirectory fullNameFor: headerName.
  		 (cg needToGenerateHeader: headerName file: filePath contents: headerContents) ifTrue:
  			 [cg storeHeaderOnFile: filePath contents: headerContents]].
  	self needsToRegenerateInterpreterFile ifFalse: [^nil].
  	cg inferTypesForImplicitlyTypedVariablesAndMethods.
  	self interpreterClass preGenerationHook: cg.
  	vmHeaderContents := cg vmHeaderContentsWithBytesPerWord: self wordSize.
  	(cg needToGenerateHeader: self interpreterHeaderName file: self interpreterHeaderPath contents: vmHeaderContents) ifTrue:
  		[cg storeHeaderOnFile: self interpreterHeaderPath contents: vmHeaderContents].
  	cg storeCodeOnFile: (self sourceFilePathFor: self interpreterClass sourceFileName) doInlining: self doInlining.
  	self interpreterClass apiExportHeaderName ifNotNil:
  		[cg storeAPIExportHeader: self interpreterClass apiExportHeaderName
  			OnFile: (self sourceFilePathFor: self interpreterClass apiExportHeaderName)].
+ 	(cg methodNamed: #interpret) ifNotNil:
+ 		[self gnuifyInterpreterFile]!
- 	self gnuifyInterpreterFile!

More information about the Vm-dev mailing list