The Trunk: Kernel-eem.1070.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.1070.mcz

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

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

Name: Kernel-eem.1070
Author: eem
Time: 23 March 2017, 11:32:43.949379 am
UUID: 1b8bfbce-9034-46cb-9ac9-631f9d57ae80
Ancestors: Kernel-eem.1069

Move some source and decompilation related methods up from CompiledMethod to CompiledCode.  provide method on CompiledCode to allow simple forwarding to the CompiledMehtod from CompiledBlock via outerCode.

Correct a comment.

=============== Diff against Kernel-eem.1069 ===============

Item was added:
+ ----- Method: CompiledCode>>decompile (in category 'decompiling') -----
+ decompile
+ "Return the decompiled parse tree that represents self"
+
+ |  class selector |
+ class := self methodClass ifNil: [Object].
+ selector := self selector ifNil: [self defaultSelector].
+ ^class decompilerClass new decompile: selector in: class method: self methodForDecompile!

Item was added:
+ ----- 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 method decompileWithTemps!

Item was added:
+ ----- Method: CompiledCode>>getSource (in category 'source code management') -----
+ getSource
+ ^ self getSourceFor: self selector in:self methodClass.!

Item was added:
+ ----- Method: CompiledCode>>getSourceFor:in: (in category 'source code management') -----
+ getSourceFor: selector in: class
+ "Retrieve or reconstruct the source code for this method."
+
+ ^self method getSourceFor: selector in: class!

Item was added:
+ ----- Method: CompiledCode>>method (in category 'accessing') -----
+ method
+ "Answer the home method associated with the receiver."
+
+ ^self subclassResponsibility!

Item was added:
+ ----- Method: CompiledCode>>printReferenceOn: (in category 'printing') -----
+ printReferenceOn: aStream
+ "Print a string that can be used to access the currently installed method."
+ aStream print: self methodClass;
+ nextPutAll: '>>';
+ nextPutAll: self selector storeString!

Item was added:
+ ----- Method: CompiledCode>>printSignatureOn: (in category 'printing') -----
+ printSignatureOn: aStream
+ "Print a string that can be used to access the currently installed method."
+ aStream print: self methodClass;
+ nextPutAll: '>>';
+ nextPutAll: self selector storeString!

Item was added:
+ ----- Method: CompiledCode>>selector (in category 'accessing') -----
+ selector
+ ^self subclassResponsibility!

Item was removed:
- ----- Method: CompiledMethod>>decompile (in category 'decompiling') -----
- decompile
- "Return the decompiled parse tree that represents self"
-
- |  class selector |
- class := self methodClass ifNil: [Object].
- selector := self selector ifNil: [self defaultSelector].
- ^class decompilerClass new decompile: selector in: class method: self methodForDecompile!

Item was removed:
- ----- Method: CompiledMethod>>getSource (in category 'source code management') -----
- getSource
- ^ self getSourceFor: self selector in:self methodClass.!

Item was added:
+ ----- Method: CompiledMethod>>method (in category 'accessing') -----
+ method
+ "Answer the home method associated with the receiver.
+ This is polymorphic with closure, CompiledBlock, Context etc"
+
+ ^self!

Item was removed:
- ----- Method: CompiledMethod>>printReferenceOn: (in category 'printing') -----
- printReferenceOn: aStream
- "Print a string that can be used to access the currently installed method."
- aStream print: self methodClass;
- nextPutAll: '>>';
- nextPutAll: self selector storeString!

Item was removed:
- ----- Method: CompiledMethod>>printSignatureOn: (in category 'printing') -----
- printSignatureOn: aStream
- "Print a string that can be used to access the currently installed method."
- aStream print: self methodClass;
- nextPutAll: '>>';
- nextPutAll: self selector storeString!

Item was changed:
  ----- Method: CompiledMethod>>selector (in category 'accessing') -----
  selector
  "Answer a method's selector.  This is either the penultimate literal,
  or, if the method has any properties or pragmas, the selector of
+ the AdditionalMethodState stored in the penultimate literal."
- the MethodProperties stored in the penultimate literal."
  | penultimateLiteral |
  ^(penultimateLiteral := self penultimateLiteral) isMethodProperties
  ifTrue: [penultimateLiteral selector]
  ifFalse: [penultimateLiteral]!