Levente Uzonyi uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-ul.896.mcz ==================== Summary ==================== Name: Tools-ul.896 Author: ul Time: 1 October 2019, 12:54:40.751477 pm UUID: 928d41e7-79f9-46e0-bbb6-5e5b37adff69 Ancestors: Tools-mt.895 - moved Debugger specific extension methods of Context and InstructionStream to this package =============== Diff against Tools-mt.895 =============== Item was added: + ----- Method: Context>>namedTempAt: (in category '*Tools-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 added: + ----- Method: Context>>namedTempAt:put: (in category '*Tools-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 added: + ----- Method: Context>>print:on: (in category '*Tools-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 added: + ----- Method: Context>>tempNames (in category '*Tools-debugger access') ----- + tempNames + "Answer a SequenceableCollection of the names of the receiver's temporary + variables, which are strings." + + ^ self debuggerMap tempNamesForContext: self! Item was added: + ----- Method: Context>>tempsAndValues (in category '*Tools-debugger access') ----- + tempsAndValues + "Return a string of the temporary variables and their current values" + ^self debuggerMap tempsAndValuesForContext: self! Item was added: + ----- Method: Context>>tempsAndValuesLimitedTo:indent: (in category '*Tools-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 added: + ----- Method: InstructionStream>>abstractPC (in category '*Tools-Debugger-support') ----- + abstractPC + ^self method abstractPCForConcretePC: pc! Item was added: + ----- Method: InstructionStream>>debuggerMap (in category '*Tools-Debugger-support') ----- + debuggerMap + ^self method debuggerMap! |
Free forum by Nabble | Edit this page |