[squeak-dev] The Trunk: Compiler-ul.208.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Jun 10 21:10:55 UTC 2011


Levente Uzonyi uploaded a new version of Compiler to project The Trunk:
http://source.squeak.org/trunk/Compiler-ul.208.mcz

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

Name: Compiler-ul.208
Author: ul
Time: 10 June 2011, 11:00:02.811 pm
UUID: 2bc142b2-8022-8d40-b4ca-f0bc566738ed
Ancestors: Compiler-nice.207

- added a pragma preference for #allowBlockArgumentAssignment. Migration code is in the postscript.
- updated code using #allowBlockArgumentAssignment
- removed Parser class >> #initialize which just installed now obsolete preferences

=============== Diff against Compiler-nice.207 ===============

Item was removed:
- ----- Method: Parser class>>initialize (in category 'class initialization') -----
- initialize
- 	Preferences
- 		addBooleanPreference: #allowUnderscoreAssignment 
- 		category: #compiler 
- 		default: false
- 		balloonHelp: 'If enabled, the compiler will accept _ (underscore) for assignment.\This provides backward compatibility with the pre-ANSI compiler.' withCRs.
- 	Preferences
- 		addBooleanPreference: #allowBlockArgumentAssignment 
- 		category: #compiler 
- 		default: false
- 		balloonHelp: 'If enabled, the compiler will allow assignment into block arguments.\This provides backward compatibility with the pre-closure compiler.' withCRs.!

Item was added:
+ ----- Method: Scanner class>>allowBlockArgumentAssignment (in category 'preferences') -----
+ allowBlockArgumentAssignment
+ 	"Accessor for the system-wide preference"
+ 	
+ 	<preference: 'Allow block argument assignment.'
+ 		category: 'Compiler'
+ 		description: 'If enabled, the compiler will allow assignment into block arguments.
+ This provides backward compatibility with the pre-closure compiler.'
+ 		type: #Boolean>
+ 	^AllowBlockArgumentAssignment ifNil: [ false ]!

Item was added:
+ ----- Method: Scanner class>>allowBlockArgumentAssignment: (in category 'preferences') -----
+ allowBlockArgumentAssignment: aBoolean
+ 	"Accessor for the system-wide preference"
+ 	
+ 	AllowBlockArgumentAssignment := aBoolean!

Item was changed:
  ----- Method: TempVariableNode>>assignmentCheck:at: (in category 'testing') -----
  assignmentCheck: encoder at: location
+ 	^((self isBlockArg and: [Scanner allowBlockArgumentAssignment not])
- 	^((self isBlockArg and: [Preferences allowBlockArgumentAssignment not])
  	    or: [self isMethodArg])
  			ifTrue: [location]
  			ifFalse: [-1]!

Item was changed:
+ (PackageInfo named: 'Compiler') postscript: '"Migrate preference value"
+ Scanner allowBlockArgumentAssignment: Preferences allowBlockArgumentAssignment'!
- (PackageInfo named: 'Compiler') postscript: '"Recompile methods which send #repeat."
- CurrentReadOnlySourceFiles cacheDuring: [
- 	(SystemNavigation default allCallsOn: #repeat) do: [ :methodReference |
- 		methodReference actualClass recompile:  methodReference selector ] ]'!




More information about the Squeak-dev mailing list