[Pkg] The Trunk: Compiler-nice.130.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Mar 2 00:28:59 UTC 2010

Nicolas Cellier uploaded a new version of Compiler to project The Trunk:

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

Name: Compiler-nice.130
Author: nice
Time: 2 March 2010, 1:28:40.263 am
UUID: cdff6f07-1e9b-f746-a7b1-2cd22feb03b4
Ancestors: Compiler-nice.129

Provide a better fix for http://source.squeak.org/trunk/Compiler-nice.129.mcz

BlockNode>>#addRemoteTemp: rootNode:
was always sent to the TempVariableNode definingScope...

But BlockNode>>#optimizedBlockHoistTempsInto:
might already have moved the temporaries to next upper unoptimized BlockNode (definingBlock actualScope).
This operation does not update the TempVariableNode definingScope (should it ?)

Thus, only when definingScope temporaries does not include the TempVariableNode,
should we attempt to remove it from actualScope temporaries....

Note: this does not solve (EventSensor>>#eventTickler) decompileWithTemps

=============== Diff against Compiler-nice.129 ===============

Item was changed:
  ----- Method: BlockNode>>addRemoteTemp:rootNode: (in category 'code generation (closures)') -----
  addRemoteTemp: aTempVariableNode rootNode: rootNode "<MethodNode>"
  	"Add aTempVariableNode to my actualScope's sequence of
  	 remote temps.  If I am an optimized block then the actual
  	 scope is my actualScopeIfOptimized, otherwise it is myself."
  	remoteTempNode == nil ifTrue:
  		[remoteTempNode := RemoteTempVectorNode new
  								name: self remoteTempNodeName
  								index: arguments size + temporaries size
  								type: LdTempType
  								scope: 0.
  				[self addTempNode: remoteTempNode.
  				 remoteTempNode definingScope: self]
  			ifNotNil: [actualScopeIfOptimized addHoistedTemps: { remoteTempNode }]].
  	remoteTempNode addRemoteTemp: aTempVariableNode encoder: rootNode encoder.
  	"use remove:ifAbsent: because the deferred analysis for optimized
  	 loops can result in the temp has already been hoised into the root."
+ 	self removeTempNode: aTempVariableNode ifAbsent: [
+ 		self actualScope removeTempNode: aTempVariableNode ifAbsent: ["should not happen"]].
- 	self actualScope removeTempNode: aTempVariableNode ifAbsent: [].

More information about the Packages mailing list