The Inbox: Kernel-ul.1270.mcz

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

The Inbox: Kernel-ul.1270.mcz

commits-2
Levente Uzonyi uploaded a new version of Kernel to project The Inbox:
http://source.squeak.org/inbox/Kernel-ul.1270.mcz

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

Name: Kernel-ul.1270
Author: ul
Time: 1 October 2019, 12:57:10.938369 pm
UUID: a05d4cc6-2b21-4ae3-90ad-68d18accd34f
Ancestors: Kernel-mt.1269

Context and InstructionStream:
- moved Debugger specific extension methods to Tools
- recategorized a few methods

=============== Diff against Kernel-mt.1269 ===============

Item was changed:
+ ----- Method: Context>>methodClass (in category 'accessing') -----
- ----- Method: Context>>methodClass (in category 'debugger access') -----
  methodClass
  "Answer the class in which the receiver's method was found."
 
  ^self method methodClass ifNil: [self objectClass: self receiver].!

Item was removed:
- ----- Method: Context>>namedTempAt: (in category 'debugger access') -----
- namedTempAt: index
- "Answer the value of the temp at index in the receiver's sequence of tempNames."
- ^self debuggerMap namedTempAt: index in: self!

Item was removed:
- ----- Method: Context>>namedTempAt:put: (in category 'debugger access') -----
- namedTempAt: index put: aValue
- "Set the value of the temp at index in the receiver's sequence of tempNames.
- (Note that if the value is a copied value it is also set out along the lexical chain,
-  but alas not in along the lexical chain.)."
- ^self debuggerMap namedTempAt: index put: aValue in: self!

Item was changed:
+ ----- Method: Context>>pc (in category 'accessing') -----
- ----- Method: Context>>pc (in category 'debugger access') -----
  pc
  "Answer the index of the next bytecode to be executed."
 
  ^pc!

Item was removed:
- ----- Method: Context>>print:on: (in category 'debugger access') -----
- print: anObject on: aStream
- "Safely print anObject in the face of direct ProtoObject subclasses."
- | objClass title |
- objClass := self objectClass: anObject.
- (objClass canUnderstand: #printOn:) ifTrue:
- [^anObject printOn: aStream].
- title := objClass name.
- aStream
- nextPutAll: (title first isVowel ifTrue: ['an '] ifFalse: ['a ']);
- nextPutAll: title!

Item was changed:
+ ----- Method: Context>>selector (in category 'accessing') -----
- ----- Method: Context>>selector (in category 'debugger access') -----
  selector
  "Answer the selector of the method that created the receiver."
 
  ^self method selector ifNil: [self method defaultSelector].!

Item was changed:
+ ----- Method: Context>>sender (in category 'accessing') -----
- ----- Method: Context>>sender (in category 'debugger access') -----
  sender
  "Answer the context that sent the message that created the receiver."
 
  ^sender!

Item was changed:
+ ----- Method: Context>>sourceCode (in category 'accessing') -----
- ----- Method: Context>>sourceCode (in category 'debugger access') -----
  sourceCode
  ^self method getSource.
 
  "Note: The above is a bit safer than
  ^ methodClass sourceCodeAt: selector
  which may fail if the receiver's method has been changed in
  the debugger (e.g., the method is no longer in the methodDict
  and thus the above selector is something like #Doit:with:with:with:)
  but the source code is still available."!

Item was removed:
- ----- Method: Context>>tempNames (in category 'debugger access') -----
- tempNames
- "Answer a SequenceableCollection of the names of the receiver's temporary
- variables, which are strings."
-
- ^ self debuggerMap tempNamesForContext: self!

Item was removed:
- ----- Method: Context>>tempsAndValues (in category 'debugger access') -----
- tempsAndValues
- "Return a string of the temporary variables and their current values"
- ^self debuggerMap tempsAndValuesForContext: self!

Item was removed:
- ----- Method: Context>>tempsAndValuesLimitedTo:indent: (in category 'debugger access') -----
- tempsAndValuesLimitedTo: sizeLimit indent: indent
- "Return a string of the temporary variabls and their current values"
-
- | aStream |
- aStream := WriteStream on: (String new: 100).
- self tempNames
- doWithIndex: [:title :index |
- indent timesRepeat: [aStream tab].
- aStream nextPutAll: title; nextPut: $:; space; tab.
- aStream nextPutAll:
- ((self tempAt: index) printStringLimitedTo: (sizeLimit -3 -title size max: 1)).
- aStream cr].
- ^aStream contents!

Item was removed:
- ----- Method: InstructionStream>>abstractPC (in category 'debugger access') -----
- abstractPC
- ^self method abstractPCForConcretePC: pc!

Item was removed:
- ----- Method: InstructionStream>>debuggerMap (in category 'debugger access') -----
- debuggerMap
- ^self method debuggerMap!


Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Kernel-ul.1270.mcz

marcel.taeumel
+1 Thanks!

Best,
Marcel

Am 01.10.2019 12:58:33 schrieb [hidden email] <[hidden email]>:

Levente Uzonyi uploaded a new version of Kernel to project The Inbox:
http://source.squeak.org/inbox/Kernel-ul.1270.mcz

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

Name: Kernel-ul.1270
Author: ul
Time: 1 October 2019, 12:57:10.938369 pm
UUID: a05d4cc6-2b21-4ae3-90ad-68d18accd34f
Ancestors: Kernel-mt.1269

Context and InstructionStream:
- moved Debugger specific extension methods to Tools
- recategorized a few methods

=============== Diff against Kernel-mt.1269 ===============

Item was changed:
+ ----- Method: Context>>methodClass (in category 'accessing') -----
- ----- Method: Context>>methodClass (in category 'debugger access') -----
methodClass
"Answer the class in which the receiver's method was found."

^self method methodClass ifNil: [self objectClass: self receiver].!

Item was removed:
- ----- Method: Context>>namedTempAt: (in category 'debugger access') -----
- namedTempAt: index
- "Answer the value of the temp at index in the receiver's sequence of tempNames."
- ^self debuggerMap namedTempAt: index in: self!

Item was removed:
- ----- Method: Context>>namedTempAt:put: (in category 'debugger access') -----
- namedTempAt: index put: aValue
- "Set the value of the temp at index in the receiver's sequence of tempNames.
- (Note that if the value is a copied value it is also set out along the lexical chain,
- but alas not in along the lexical chain.)."
- ^self debuggerMap namedTempAt: index put: aValue in: self!

Item was changed:
+ ----- Method: Context>>pc (in category 'accessing') -----
- ----- Method: Context>>pc (in category 'debugger access') -----
pc
"Answer the index of the next bytecode to be executed."

^pc!

Item was removed:
- ----- Method: Context>>print:on: (in category 'debugger access') -----
- print: anObject on: aStream
- "Safely print anObject in the face of direct ProtoObject subclasses."
- | objClass title |
- objClass := self objectClass: anObject.
- (objClass canUnderstand: #printOn:) ifTrue:
- [^anObject printOn: aStream].
- title := objClass name.
- aStream
- nextPutAll: (title first isVowel ifTrue: ['an '] ifFalse: ['a ']);
- nextPutAll: title!

Item was changed:
+ ----- Method: Context>>selector (in category 'accessing') -----
- ----- Method: Context>>selector (in category 'debugger access') -----
selector
"Answer the selector of the method that created the receiver."

^self method selector ifNil: [self method defaultSelector].!

Item was changed:
+ ----- Method: Context>>sender (in category 'accessing') -----
- ----- Method: Context>>sender (in category 'debugger access') -----
sender
"Answer the context that sent the message that created the receiver."

^sender!

Item was changed:
+ ----- Method: Context>>sourceCode (in category 'accessing') -----
- ----- Method: Context>>sourceCode (in category 'debugger access') -----
sourceCode
^self method getSource.

"Note: The above is a bit safer than
^ methodClass sourceCodeAt: selector
which may fail if the receiver's method has been changed in
the debugger (e.g., the method is no longer in the methodDict
and thus the above selector is something like #Doit:with:with:with:)
but the source code is still available."!

Item was removed:
- ----- Method: Context>>tempNames (in category 'debugger access') -----
- tempNames
- "Answer a SequenceableCollection of the names of the receiver's temporary
- variables, which are strings."
-
- ^ self debuggerMap tempNamesForContext: self!

Item was removed:
- ----- Method: Context>>tempsAndValues (in category 'debugger access') -----
- tempsAndValues
- "Return a string of the temporary variables and their current values"
- ^self debuggerMap tempsAndValuesForContext: self!

Item was removed:
- ----- Method: Context>>tempsAndValuesLimitedTo:indent: (in category 'debugger access') -----
- tempsAndValuesLimitedTo: sizeLimit indent: indent
- "Return a string of the temporary variabls and their current values"
-
- | aStream |
- aStream := WriteStream on: (String new: 100).
- self tempNames
- doWithIndex: [:title :index |
- indent timesRepeat: [aStream tab].
- aStream nextPutAll: title; nextPut: $:; space; tab.
- aStream nextPutAll:
- ((self tempAt: index) printStringLimitedTo: (sizeLimit -3 -title size max: 1)).
- aStream cr].
- ^aStream contents!

Item was removed:
- ----- Method: InstructionStream>>abstractPC (in category 'debugger access') -----
- abstractPC
- ^self method abstractPCForConcretePC: pc!

Item was removed:
- ----- Method: InstructionStream>>debuggerMap (in category 'debugger access') -----
- debuggerMap
- ^self method debuggerMap!