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

squeak-dev-noreply at lists.squeakfoundation.org squeak-dev-noreply at lists.squeakfoundation.org
Sat Jun 5 20:39:55 UTC 2010


Dave Lewis uploaded a new version of VMMaker to project VM Maker:
http://www.squeaksource.com/VMMaker/VMMaker-dtl.179.mcz

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

Name: VMMaker-dtl.179
Author: dtl
Time: 5 June 2010, 2:37:39 am
UUID: f0fae3c6-e4df-43b1-bfa7-4d30370d7d95
Ancestors: VMMaker-dtl.178

VMMaker 4.2.4
Fix an obscure bug in the slang inliner, in which type declarations from an inlined method were incorrectly applied to a variable in the sender two levels up.

Reference Mantis 7543, which includes a change set to illustrate the problem.

=============== Diff against VMMaker-dtl.178 ===============

Item was changed:
  ----- Method: VMMaker>>generateInterpreterFile (in category 'generate sources') -----
  generateInterpreterFile
  	"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 cls |
- 	| cg |
  	self needsToRegenerateInterpreterFile ifFalse: [^nil].
  	self interpreterClass initialize.
  	ObjectMemory initializeConstants.
+ 	cg := self createCodeGenerator.
+ 	cls := self interpreterClass.
+ 	[cls == Object]
+ 		whileFalse:
+ 			[cg addClass: cls.
+ 			cls := cls superclass].
- 	cg := self createCodeGenerator
- 		addClass: self interpreterClass;
- 		addClass: ObjectMemory.
- 	(Smalltalk classNamed: #MemoryAccess) ifNotNilDo: [:ma |
- 		ma isEnabled ifTrue: [cg addClass: ma]].
  	cg storeHeaderOnFile: self interpreterHeaderPath.
  	cg storeCodeOnFile: self interpreterFilePath doInlining: self doInlining!

Item was changed:
  ----- Method: TMethod>>inlineFunctionCall:in: (in category 'inlining') -----
  inlineFunctionCall: aSendNode in: aCodeGen
  	"Answer the body of the called function, substituting the actual parameters for the formal argument variables in the method body."
  	"Assume caller has established that:
  		1. the method arguments are all substitutable nodes, and
  		2. the method to be inlined contains no additional embedded returns."
  
  	| sel meth substitutionDict |
  	sel := aSendNode selector.
  	meth := (aCodeGen methodNamed: sel) copy.
  	meth renameVarsForInliningInto: self in: aCodeGen.
  	meth renameLabelsForInliningInto: self.
  	self addVarsDeclarationsAndLabelsOf: meth.
  	substitutionDict := Dictionary new: 100.
  	meth args with: aSendNode args do: [ :argName :exprNode |
  		substitutionDict at: argName put: exprNode.
+ 		locals remove: argName.
+ 		declarations removeKey: argName ifAbsent: []].
- 		locals remove: argName].
  	meth parseTree bindVariablesIn: substitutionDict.
  	^ meth statements first expression!

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



More information about the Vm-dev mailing list