The Trunk: Kernel-eem.675.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Kernel-eem.675.mcz

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

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

Name: Kernel-eem.675
Author: eem
Time: 19 March 2012, 2:51:13.711 pm
UUID: 44dbc698-62dc-4f6b-afd0-c987fdadb1f7
Ancestors: Kernel-eem.674

Fix the improved decompileWithTempNames for doits
without temp names. 673 breaks e.g.
        DecompilerTests new testRemoteTemp

=============== Diff against Kernel-eem.674 ===============

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


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Kernel-eem.675.mcz

Bert Freudenberg
Mea culpa! But thank you :)

- Bert -

On 19.03.2012, at 21:51, [hidden email] wrote:

> Eliot Miranda uploaded a new version of Kernel to project The Trunk:
> http://source.squeak.org/trunk/Kernel-eem.675.mcz
>
> ==================== Summary ====================
>
> Name: Kernel-eem.675
> Author: eem
> Time: 19 March 2012, 2:51:13.711 pm
> UUID: 44dbc698-62dc-4f6b-afd0-c987fdadb1f7
> Ancestors: Kernel-eem.674
>
> Fix the improved decompileWithTempNames for doits
> without temp names. 673 breaks e.g.
> DecompilerTests new testRemoteTemp
>
> =============== Diff against Kernel-eem.674 ===============
>
> Item was changed:
>  ----- Method: CompiledMethod>>decompileWithTemps (in category 'decompiling') -----
>  decompileWithTemps
> + "Return the decompiled parse tree that represents self, but with the temp names obtained
> + either by compiling the sourcecode, or directly if the method has temps in its trailer."
> - "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."
>
> + | class selector tempNames source |
> - |  class selector tempNames |
>   class := self methodClass ifNil: [Object].
>   selector := self selector ifNil: [self defaultSelector].
>
> + self holdsTempNames
> + ifTrue: [tempNames := self tempNamesString]
> + ifFalse:
> + ["No source file or no source (e.g. doits) and no temp names
> + -- decompile without temp names "
> + ((self fileIndex > 0 and: [(SourceFiles at: self fileIndex) isNil])
> + or: [(source := self getSourceFromFile) isNil]) ifTrue:
> + [^self decompile].
> + tempNames := (class newCompiler
> + parse: source asString
> - (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
> - parse: self getSourceFromFile asString
>   in: class
>   notifying: nil)
>   generate: CompiledMethodTrailer defaultMethodTrailer;
>   schematicTempNamesString].
> +
>   ^(self decompilerClass new withTempNames: tempNames)
>   decompile: selector
>   in: class
>   method: self methodForDecompile!
>
>




Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Kernel-eem.675.mcz

Eliot Miranda-2


On Mon, Mar 19, 2012 at 3:17 PM, Bert Freudenberg <[hidden email]> wrote:
Mea culpa! But thank you :)

you're most welcome :)
 

- Bert -

On 19.03.2012, at 21:51, [hidden email] wrote:

> Eliot Miranda uploaded a new version of Kernel to project The Trunk:
> http://source.squeak.org/trunk/Kernel-eem.675.mcz
>
> ==================== Summary ====================
>
> Name: Kernel-eem.675
> Author: eem
> Time: 19 March 2012, 2:51:13.711 pm
> UUID: 44dbc698-62dc-4f6b-afd0-c987fdadb1f7
> Ancestors: Kernel-eem.674
>
> Fix the improved decompileWithTempNames for doits
> without temp names. 673 breaks e.g.
>       DecompilerTests new testRemoteTemp
>
> =============== Diff against Kernel-eem.674 ===============
>
> Item was changed:
>  ----- Method: CompiledMethod>>decompileWithTemps (in category 'decompiling') -----
>  decompileWithTemps
> +     "Return the decompiled parse tree that represents self, but with the temp names obtained
> +      either by compiling the sourcecode, or directly if the method has temps in its trailer."
> -     "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."
>
> +     | class selector tempNames source |
> -     |  class selector tempNames |
>       class := self methodClass ifNil: [Object].
>       selector := self selector ifNil: [self defaultSelector].
>
> +     self holdsTempNames
> +             ifTrue: [tempNames := self tempNamesString]
> +             ifFalse:
> +                     ["No source file or no source (e.g. doits) and no temp names
> +                      -- decompile without temp names "
> +                     ((self fileIndex > 0 and: [(SourceFiles at: self fileIndex) isNil])
> +                     or: [(source := self getSourceFromFile) isNil]) ifTrue:
> +                             [^self decompile].
> +                     tempNames := (class newCompiler
> +                                                                     parse: source asString
> -     (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
> -                                                                     parse: self getSourceFromFile asString
>                                                                       in: class
>                                                                       notifying: nil)
>                                                                               generate: CompiledMethodTrailer defaultMethodTrailer;
>                                                                               schematicTempNamesString].
> +
>       ^(self decompilerClass new withTempNames: tempNames)
>               decompile: selector
>               in: class
>               method: self methodForDecompile!
>
>







--
best,
Eliot