[squeak-dev] The Trunk: Kernel-ar.356.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Dec 31 13:32:47 UTC 2009


Andreas Raab uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-ar.356.mcz

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

Name: Kernel-ar.356
Author: ar
Time: 30 December 2009, 2:12:47 am
UUID: b39efe07-b842-5d4f-813e-47f315bd4fdf
Ancestors: Kernel-ar.355

Temporarily disable warning about class redefinition to remove unused ivars from traits.

=============== Diff against Kernel-ar.353 ===============

Item was added:
+ ----- Method: Class>>shouldNotBeRedefined (in category 'initialize-release') -----
+ shouldNotBeRedefined
+ 	"temporarily, since I know what I'm doing"
+ 	^false!

Item was changed:
  ----- Method: CompiledMethod>>getSourceFor:in: (in category 'source code management') -----
  getSourceFor: selector in: class
  	"Retrieve or reconstruct the source code for this method."
  	| trailer source |
  	trailer := self trailer.
  
  	trailer tempNames ifNotNil: [:namesString | 
  		"Magic sources -- decompile with temp names"
  		^ ((class decompilerClass new withTempNames: namesString)
  				decompile: selector in: class method: self)
  			decompileString].
  	
  	trailer sourceCode ifNotNil: [:code | ^ code ].
  	
  	trailer hasSourcePointer ifFalse: [
  		"No source pointer -- decompile without temp names"
  		^ (class decompilerClass new decompile: selector in: class method: self)
  			decompileString].
  
  	"Situation normal;  read the sourceCode from the file"
  	source := [self getSourceFromFile]
  				on: Error
  		"An error can happen here if, for example, the changes file has been truncated by an aborted download.  The present solution is to ignore the error and fall back on the decompiler.  A more thorough solution should probably trigger a systematic invalidation of all source pointers past the end of the changes file.  Consider that, as time goes on, the changes file will eventually grow large enough to cover the lost code, and then instead of falling into this error case, random source code will get returned."
  				do: [ :ex | ex return: nil].
  		
+ 	^source ifNil: [
- 	^source
- 		ifNotNil: [
- 			| sourceSelector |
- 			"I think this is something to do with the traits system.  It would be ncie if someone
- 			 documented this.  It looks like an egregious hack to me. eem 9/5/2009 09:04"
- 			(class isAliasSelector: selector)
- 				ifFalse: [ source ]
- 				ifTrue: [ "Only alias selectors need this replacement"
- 					 sourceSelector := Parser parserClass new parseSelector: source.
- 					 sourceSelector = selector
- 						ifTrue: [ source ]
- 						ifFalse: [ self replace: sourceSelector with: selector in: source ] ] ]
- 		ifNil: [
  			"Something really wrong -- decompile blind (no temps)"
  			 (class decompilerClass new decompile: selector in: class method: self)
  				decompileString]!

Item was removed:
- ----- Method: Metaclass>>traitComposition (in category 'accessing') -----
- traitComposition
- 	"Vector the creation through ClassDescription to support alternative traits"
- 	^traitComposition ifNil: [traitComposition := ClassDescription newTraitComposition].!

Item was removed:
- ----- Method: Class>>traitComposition: (in category 'accessing') -----
- traitComposition: aTraitComposition
- 	super traitComposition: aTraitComposition.
- 	traitComposition := aTraitComposition!

Item was removed:
- ----- Method: Metaclass>>traitComposition: (in category 'accessing') -----
- traitComposition: aTraitComposition
- 	super traitComposition: aTraitComposition.
- 	traitComposition := aTraitComposition!

Item was removed:
- ----- Method: Class>>traitComposition (in category 'accessing') -----
- traitComposition
- 	"Vector the creation through ClassDescription to support alternative traits"
- 	^traitComposition ifNil: [traitComposition := ClassDescription newTraitComposition].!




More information about the Squeak-dev mailing list