[squeak-dev] The Trunk: Compiler-mt.487.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Jan 16 09:35:36 UTC 2023


Marcel Taeumel uploaded a new version of Compiler to project The Trunk:
http://source.squeak.org/trunk/Compiler-mt.487.mcz

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

Name: Compiler-mt.487
Author: mt
Time: 16 January 2023, 10:35:36.534631 am
UUID: 489386d6-d1c2-aa45-bed3-08589ba4f210
Ancestors: Compiler-tpr.486

Removes duplicated code.

Note that I was not able to trigger this code path at all because "encoder" is typically an instance of Parser where #bindTemp:in: simply returns the name to be bound.

Note that that extra check "requestor interactive" should not make any difference here.

=============== Diff against Compiler-tpr.486 ===============

Item was changed:
  ----- Method: Encoder>>bindTemp:in: (in category 'temps') -----
  bindTemp: name in: methodSelector
+ 	
+ 	^ self bindTemp: name!
- 	"Declare a temporary; error not if a field or class variable."
- 	scopeTable at: name ifPresent:[:node|
- 		"When non-interactive raise the error only if its a duplicate"
- 		(node isTemp or:[requestor interactive])
- 			ifTrue:[^self notify:'Name already used in this method']
- 			ifFalse:[Transcript 
- 				show: '(', name, ' is shadowed in "' , cue getClass printString , '>>' , methodSelector printString , '")']].
- 	^self reallyBind: name!



More information about the Squeak-dev mailing list