[squeak-dev] The Trunk: Kernel-eem.674.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Mar 19 19:54:31 UTC 2012


Eliot Miranda uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-eem.674.mcz

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

Name: Kernel-eem.674
Author: eem
Time: 19 March 2012, 12:53:33.739 pm
UUID: b866b3fd-2e22-4188-a09a-6292ff0eb8b4
Ancestors: Kernel-bf.673

Make the improved decompileWithTemps function in the abandoned sources case (where a method holdsTempNames).

=============== Diff against Kernel-bf.673 ===============

Item was changed:
  ----- Method: CompiledMethod>>decompileWithTemps (in category 'decompiling') -----
  decompileWithTemps
+ 	"Return the decompiled parse tree that represents self, but with the temp names
+ 	 either by compiling the sourcecode, or direct if the method has temps in its trailer."
- 	"Return the decompiled parse tree that represents self, but get the temp names
- 	 by compiling the sourcecode..."
  
  	|  class selector tempNames |
  	class := self methodClass ifNil: [Object].
  	selector := self selector ifNil: [self defaultSelector].
  
+ 	(self fileIndex > 0 and: [(SourceFiles at: self fileIndex) isNil]) ifTrue:
+ 		"Emergency or no source file -- decompile without temp names "
+ 		[^self decompile].
+ 
+ 	tempNames := self holdsTempNames
+ 					ifTrue: [self tempNamesString]
+ 					ifFalse: [(class newCompiler
- 	(self fileIndex > 0 and: [(SourceFiles at: self fileIndex) isNil]) ifTrue: [
- 			"Emergency or no source file -- decompile without temp names "
- 			^self decompile.
- 	].
- 	tempNames := (class newCompiler
  									parse: self getSourceFromFile asString
  									in: class
  									notifying: nil)
  										generate: CompiledMethodTrailer defaultMethodTrailer;
+ 										schematicTempNamesString].
+ 	^(self decompilerClass new withTempNames: tempNames)
+ 		decompile: selector
+ 		in: class
+ 		method: self methodForDecompile!
- 										schematicTempNamesString.
- 	^((self decompilerClass new withTempNames: tempNames)
- 						decompile: selector
- 						in: class
- 						method: self methodForDecompile)!



More information about the Squeak-dev mailing list