[squeak-dev] The Trunk: Tools-eem.993.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Oct 2 19:36:06 UTC 2020


Eliot Miranda uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-eem.993.mcz

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

Name: Tools-eem.993
Author: eem
Time: 2 October 2020, 12:35:57.69654 pm
UUID: 0d492fb7-b306-4024-9a98-e18603f5d338
Ancestors: Tools-eem.992

Go a little further in speeding up stepping in the debugger. Cache the translation of 'all inst vars' in In szpector.  Consequently move CurrentLocale up to Inspector form ContextInspector.  Now stepping is pretty good, but even on my 2.9 GHz Core i9 MPB I can click faster than it can keep up, but it doesn't get further than a couple fo sends behind.  That's still  too slow; it *must* keep up for the debugger to feel comfortable.  But we are hopefully only one more source of slow down away now.

=============== Diff against Tools-eem.992 ===============

Item was changed:
  Inspector subclass: #ContextInspector
  	instanceVariableNames: ''
+ 	classVariableNames: 'CachedStackTopLabel CachedTempVarsLabel'
- 	classVariableNames: 'CachedStackTopLabel CachedTempVarsLabel CurrentLocale'
  	poolDictionaries: ''
  	category: 'Tools-Inspector'!
  
  !ContextInspector commentStamp: 'ct 1/12/2020 15:26' prior: 0!
  I am an Inspector that is specialized for inspecting Contexts.!

Item was changed:
  StringHolder subclass: #Inspector
  	instanceVariableNames: 'object context fields customFields selectionIndex expression contentsTyped fieldListStyler shouldStyleValuePane selectionUpdateTime'
+ 	classVariableNames: 'CachedAllInstVarsLabel CurrentLocale'
- 	classVariableNames: ''
  	poolDictionaries: ''
  	category: 'Tools-Inspector'!
  
  !Inspector commentStamp: 'mt 4/6/2020 15:16' prior: 0!
  I am a tool that allows to inspect and modify the internal representation of an object. As a StringHolder, the string I represent is the value of the currently selected inspector field, which may be an instance variable, of the observed object.
  
  Beside the #contents in my value pane, I have an extra code pane that holds an #expression to be evaluated on the inspected object -- not the currently selected inspector field.
  
  Take a look at my "fields ..." protocols as well as InspectorField.
  
  (Note that the idea of "elements" from the CollectionInspector bleeds a little bit down into this interface to simplify the implementation of field truncation as well as #inspectOne. Sorry for that. Usually, the inspected object will only produce "fields" to display, and maybe "items" in a pop-up menu. Only collections have "elements".)!

Item was added:
+ ----- Method: Inspector>>allInstVarsTranslated (in category 'private') -----
+ allInstVarsTranslated
+ 	"Alas translation is slow enough that we notice the slow down in trying to step in the debugger..."
+ 	(CurrentLocale ~= Locale current
+ 	 or: [CachedAllInstVarsLabel isNil]) ifTrue:
+ 		[CurrentLocale := Locale current.
+ 		 CachedAllInstVarsLabel :=  'all inst vars' translated].
+ 	^CachedAllInstVarsLabel!

Item was changed:
  ----- Method: Inspector>>fieldAllInstVars (in category 'fields') -----
  fieldAllInstVars
  
  	^ (self newFieldForType: #all key: #allInstVars)
+ 		name: self allInstVarsTranslated; emphasizeName;
- 		name: 'all inst vars' translated; emphasizeName;
  		valueGetter: [:object | object longPrintString]; printValueAsIs;
  		yourself!



More information about the Squeak-dev mailing list