The Trunk: Kernel-eem.1145.mcz

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

The Trunk: Kernel-eem.1145.mcz

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

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

Name: Kernel-eem.1145
Author: eem
Time: 12 January 2018, 3:33:18.61074 pm
UUID: f591fb75-2cc4-41e4-8d9e-f9f72219c0a6
Ancestors: Kernel-eem.1144

Full blokc support for decompileWithTemps

=============== Diff against Kernel-eem.1144 ===============

Item was added:
+ ----- Method: BlockClosure>>homeMethod (in category 'accessing') -----
+ homeMethod
+ ^outerContext method!

Item was changed:
  ----- Method: CompiledCode>>decompileWithTemps (in category 'decompiling') -----
  decompileWithTemps
  "Answer the decompiled parse tree that represents self, but with the temp names obtained
  either by compiling the source code, or directly if the method has temps in its trailer."
 
+ ^self homeMethod decompileWithTemps!
- ^self method decompileWithTemps!

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."
 
  | class selector tempNames source |
  class := self methodClass ifNil: [Object].
  selector := self selector ifNil: [self defaultSelector].
 
  self holdsTempNames
  ifTrue: [tempNames := self tempNamesString]
  ifFalse:
+ [| compiler |
+ "No source file or no source (e.g. doits) and no temp names
- ["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].
+ compiler := class newCompiler.
+ compiler parser encoderClass: self encoderClass.
+ tempNames := (compiler
+ parse: source asString
+ in: class
+ notifying: nil)
+ generate: CompiledMethodTrailer empty;
+ schematicTempNamesString].
- tempNames := (class newCompiler
- parse: source asString
- in: class
- notifying: nil)
- generate: CompiledMethodTrailer empty;
- schematicTempNamesString].
 
  ^(self decompilerClass new withTempNames: tempNames)
  decompile: selector
  in: class
  method: self methodForDecompile!

Item was added:
+ ----- Method: FullBlockClosure>>homeMethod (in category 'accessing') -----
+ homeMethod
+ ^self compiledBlock homeMethod!