Eliot Miranda uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-eem.1415.mcz
==================== Summary ====================
Name: System-eem.1415
Author: eem
Time: 6 June 2023, 11:36:51.136681 am
UUID: 8e9c1e20-e023-4821-abc3-49779f11630e
Ancestors: System-ct.1414
Smalltalk platformName is evaluated in may places, (e.g. even in each event input; see EventSensor>>#processEvent:). It's a slow primitive and does an allocation. So since it doesn't change within a single run, cache it just as endianness is cached. Fix the nilling of the endianness cache to be after running the shutdown list, not before. There's nothing to preclude something in the shutdown list wanting to know endianness and/or platform name info.
=============== Diff against System-ct.1414 ===============
Item was changed:
Object subclass: #SmalltalkImage
instanceVariableNames: 'globals'
+ classVariableNames: 'EndianCache LastImageName LastQuitLogPosition LastStats LowSpaceProcess LowSpaceSemaphore MemoryHogs PlatformNameCache ShutDownList SourceFileVersionString StartUpList StartupStamp VMMakerVersion WordSize'
- classVariableNames: 'EndianCache LastImageName LastQuitLogPosition LastStats LowSpaceProcess LowSpaceSemaphore MemoryHogs ShutDownList SourceFileVersionString StartUpList StartupStamp VMMakerVersion WordSize'
poolDictionaries: ''
category: 'System-Support'!
!SmalltalkImage commentStamp: 'dtl 3/6/2010 14:00' prior: 0!
I represent the current image and runtime environment, including system organization, the virtual machine, object memory, plugins and source files. My instance variable #globals is a reference to the system dictionary of global variables and class names.
My singleton instance is called Smalltalk.!
Item was changed:
----- Method: SmalltalkImage>>platformName (in category 'os') -----
platformName
+ "Answer the name of the platform we're running on."
- "Return the name of the platform we're running on."
"Smalltalk os platformName"
+ ^PlatformNameCache ifNil: [PlatformNameCache := self getSystemAttribute: 1001]!
- ^self getSystemAttribute: 1001!
Item was changed:
----- Method: SmalltalkImage>>processShutDownList: (in category 'snapshot and quit') -----
processShutDownList: quitting
"Send #shutDown to each class that needs to wrap up before a snapshot.
+ Also void the various caches; this can't safely be done on start-up because
- Also void the endianness chace; this can't safely be done on start-up because
Smalltalk is too late in the start-up sequence."
+ self send: #shutDown: toClassesNamedIn: ShutDownList with: quitting.
+ EndianCache := PlatformNameCache := nil!
- EndianCache := nil.
- self send: #shutDown: toClassesNamedIn: ShutDownList with: quitting!
Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-ct.1217.mcz
==================== Summary ====================
Name: Tools-ct.1217
Author: ct
Time: 3 June 2023, 10:27:19.522136 pm
UUID: 0c2e8345-da8a-b74d-a527-510fdf8c7ce5
Ancestors: Tools-ct.1216
Fixes change logging for methods that are recompiled from a browser without its existing category being selected. Previously, this kept the organization in the image intact but logged a {nil} category to the change set and to the changes file.
=============== Diff against Tools-ct.1216 ===============
Item was changed:
----- Method: Browser>>defineMessageFrom:notifying: (in category 'message functions') -----
defineMessageFrom: aString notifying: aController
"Compile the expressions in aString. Notify aController if a syntax error occurs. Install the compiled method in the selected class classified under the currently selected message category name. Answer the selector obtained if compilation succeeds, nil otherwise."
| currentSelector selector category oldMessageList selectedClassOrMetaClass |
currentSelector := self selectedMessageName.
oldMessageList := self messageList.
selectedClassOrMetaClass := self selectedClassOrMetaClass.
contents := nil.
selector := (selectedClassOrMetaClass newParser parseSelector: aString).
(self metaClassIndicated
and: [(selectedClassOrMetaClass includesSelector: selector) not
and: [Metaclass isScarySelector: selector]])
ifTrue: ["A first-time definition overlaps the protocol of Metaclasses"
(self confirm: ((selector , ' is used in the existing class system.
Overriding it could cause serious problems.
Is this really what you want to do?') asText makeBoldFrom: 1 to: selector size))
ifFalse: [^nil]].
category := currentSelector
+ ifNil: [ self selectedMessageCategoryName ifNil: [ selectedClassOrMetaClass whichCategoryIncludesSelector: selector ] ]
- ifNil: [ self selectedMessageCategoryName ]
ifNotNil: [ (selectedClassOrMetaClass >> selectedMessageName) methodReference ifNotNil: [ : ref | ref category ]].
selector := selectedClassOrMetaClass
compile: aString
classified: category
notifying: aController.
selector ifNil: [^ nil].
contents := aString copy.
self changed: #messageCategoryList. "Because the 'as yet unclassified' might just appear."
self changed: #messageList. "Because we have code-dependent list formatting by now such as #isDeprecated."
selector ~~ currentSelector
ifTrue:
[category = ClassOrganizer nullCategory
ifTrue: [self changed: #classSelectionChanged.
self changed: #classList.
self messageCategoryListIndex: 1].
self setClassOrganizer. "In case organization not cached"
(oldMessageList includes: selector)
ifFalse: [self changed: #messageList].
self messageListIndex: (self messageList indexOf: selector)].
^ selector!
Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-ct.1214.mcz
==================== Summary ====================
Name: Tools-ct.1214
Author: ct
Time: 3 June 2023, 6:52:38.283136 pm
UUID: b37182a9-07fd-6045-a122-9e5c2458c589
Ancestors: Tools-ct.1213
Proposal: Sort classes in ClassListBrowser, analogously to SystemNavigation>>#allMethodsSelect:.
=============== Diff against Tools-ct.1213 ===============
Item was changed:
----- Method: ClassListBrowser class>>browseClassesSatisfying:title: (in category 'instance creation') -----
browseClassesSatisfying: classBlock title: aTitle
"Put up a ClassListBrowser showing all classes that satisfy the classBlock."
self newOnClassesNamed:
(self systemNavigation allClasses select: [:c | (classBlock value: c) == true]
+ thenCollect: [:c | c name]) sorted
- thenCollect: [:c | c name])
label: aTitle!
Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-mt.1219.mcz
==================== Summary ====================
Name: Tools-mt.1219
Author: mt
Time: 5 June 2023, 11:21:12.203422 am
UUID: 5b8b6246-fc9b-8f4e-b048-a8bc93db5f1f
Ancestors: Tools-ct.1218, Tools-ct.1214, Tools-ct.1215, Tools-ct.1217
Merge, merge, merge.
Tools-ct.1214:
Proposal: Sort classes in ClassListBrowser, analogously to SystemNavigation>>#allMethodsSelect:.
Tools-ct.1215:
Proposal: Double-click a class or trait in hierarchy tree browser to switch the central class.
Tools-ct.1217:
Fixes change logging for methods that are recompiled from a browser without its existing category being selected. Previously, this kept the organization in the image intact but logged a {nil} category to the change set and to the changes file.
=============== Diff against Tools-ct.1218 ===============
Item was changed:
----- Method: Browser>>defineMessageFrom:notifying: (in category 'message functions') -----
defineMessageFrom: aString notifying: aController
"Compile the expressions in aString. Notify aController if a syntax error occurs. Install the compiled method in the selected class classified under the currently selected message category name. Answer the selector obtained if compilation succeeds, nil otherwise."
| currentSelector selector category oldMessageList selectedClassOrMetaClass |
currentSelector := self selectedMessageName.
oldMessageList := self messageList.
selectedClassOrMetaClass := self selectedClassOrMetaClass.
contents := nil.
selector := (selectedClassOrMetaClass newParser parseSelector: aString).
(self metaClassIndicated
and: [(selectedClassOrMetaClass includesSelector: selector) not
and: [Metaclass isScarySelector: selector]])
ifTrue: ["A first-time definition overlaps the protocol of Metaclasses"
(self confirm: ((selector , ' is used in the existing class system.
Overriding it could cause serious problems.
Is this really what you want to do?') asText makeBoldFrom: 1 to: selector size))
ifFalse: [^nil]].
category := currentSelector
+ ifNil: [ self selectedMessageCategoryName ifNil: [ selectedClassOrMetaClass whichCategoryIncludesSelector: selector ] ]
- ifNil: [ self selectedMessageCategoryName ]
ifNotNil: [ (selectedClassOrMetaClass >> selectedMessageName) methodReference ifNotNil: [ : ref | ref category ]].
selector := selectedClassOrMetaClass
compile: aString
classified: category
notifying: aController.
selector ifNil: [^ nil].
contents := aString copy.
self changed: #messageCategoryList. "Because the 'as yet unclassified' might just appear."
self changed: #messageList. "Because we have code-dependent list formatting by now such as #isDeprecated."
selector ~~ currentSelector
ifTrue:
[category = ClassOrganizer nullCategory
ifTrue: [self changed: #classSelectionChanged.
self changed: #classList.
self messageCategoryListIndex: 1].
self setClassOrganizer. "In case organization not cached"
(oldMessageList includes: selector)
ifFalse: [self changed: #messageList].
self messageListIndex: (self messageList indexOf: selector)].
^ selector!
Item was changed:
----- Method: ClassListBrowser class>>browseClassesSatisfying:title: (in category 'instance creation') -----
browseClassesSatisfying: classBlock title: aTitle
"Put up a ClassListBrowser showing all classes that satisfy the classBlock."
self newOnClassesNamed:
(self systemNavigation allClasses select: [:c | (classBlock value: c) == true]
+ thenCollect: [:c | c name]) sorted
- thenCollect: [:c | c name])
label: aTitle!
Item was changed:
----- Method: TreeBrowser>>buildClassListWith: (in category 'toolbuilder') -----
buildClassListWith: builder
| tree |
tree := builder pluggableTreeSpec new.
tree
model: self;
roots: #classRoots;
label: #classLabel:;
getChildren: #classChildren:;
hasChildren: #classHasChildren:;
autoExpand: #classTreeExpanded;
help: #classHelpAt:;
getSelectedPath: #classPath;
getSelected: #classChild;
setSelected: #classChild:;
+ doubleClick: #doubleClickClassChild:;
icon: #classIcon:;
menu: #classListMenu:shifted:;
keyPress: #classListKey:from:;
filterMode: #visible; "not #all bc. class-tree is too deep, which makes filtering slow"
searchMode: #depthFirst.
SystemBrowser browseWithDragNDrop ifTrue: [
tree
dragItem: #dragFromClassTree:;
dragType: #dragTypeForClassTreeAt:].
^ tree!
Item was added:
+ ----- Method: TreeBrowser>>doubleClickClassChild: (in category 'class tree - support') -----
+ doubleClickClassChild: aClassNotMeta
+
+ self isHierarchy ifFalse: [^ false].
+ self hasClassSelected ifFalse: [^ false].
+ self initHierarchyFor: self selectedClassOrMetaClass.
+ ^ true!