Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-mt.1200.mcz
==================== Summary ====================
Name: System-mt.1200
Author: mt
Time: 17 December 2020, 6:27:01.501895 pm
UUID: 0ff20c8c-9b07-c546-a2fe-c8310bc4c019
Ancestors: System-mt.1199
One more tweak for SpaceTally: It does not make sense to reuse the set of seen objects when enumerating the classes. Only reuse a set when enumerating each class' instances. Now the order of classes provided for #spaceTally: does not matter anymore.
=============== Diff against System-mt.1199 ===============
Item was changed:
----- Method: SpaceTally>>computeSpaceUsage (in category 'class analysis') -----
computeSpaceUsage
- | seenObjects |
- seenObjects := self depth > 0 ifTrue: [IdentitySet new].
results
do: [ :entry |
| class instanceSpaceAndCount |
class := self class environment at: entry analyzedClassName.
Smalltalk garbageCollectMost.
+ instanceSpaceAndCount := self spaceForInstancesOf: class depth: self depth.
- instanceSpaceAndCount := self spaceForInstancesOf: class depth: self depth seen: seenObjects.
entry
codeSize: class spaceUsed;
instanceCount: instanceSpaceAndCount second;
spaceForInstances: instanceSpaceAndCount first;
depthOfSpace: self depth ]
displayingProgress: 'Taking statistics...'!
Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-mt.1199.mcz
==================== Summary ====================
Name: System-mt.1199
Author: mt
Time: 17 December 2020, 6:15:09.310895 pm
UUID: 00f96e57-9bc5-d044-bcb7-2dd90b55507b
Ancestors: System-mt.1198
Fixes SpaceTally. Only enumerate objects in variable classes, not bytes or words. Thus, avoid to create LargePositiveIntegers while counting.
=============== Diff against System-mt.1198 ===============
Item was changed:
Object subclass: #SpaceTally
instanceVariableNames: 'results depth'
classVariableNames: ''
poolDictionaries: ''
category: 'System-Tools'!
!SpaceTally commentStamp: '<historical>' prior: 0!
I'm responsible to help getting information about system space usage. The information I compute is represented by a spaceTallyItem.
Here are some examples to inspect:
SpaceTally new spaceTally: (Array with: TextMorph with: Point).
SpaceTally new systemWideSpaceTally.
SpaceTally new depth: 2; spaceTally: (PackageInfo named: #Morphic) classes.
SpaceTally new depth: 1; spaceTally: (PackageInfo named: #Monticello) classes. "Includes cached source code"
+ SpaceTally new spaceForInstancesOf: Form depth: 1. "Includes footprint for bitmaps"!
- SpaceTally new spaceForInstancesOf: Form depth: 2. "Includes bitmaps and large integers"!
Item was changed:
----- Method: SpaceTally>>spaceForInstance:depth:seen: (in category 'instance size') -----
spaceForInstance: anObject depth: anInteger seen: seenObjectsOrNil
| ctxt class basicSize depth total |
seenObjectsOrNil ifNotNil: [
(seenObjectsOrNil ifAbsentAdd: anObject) ifFalse: [^ 0]].
ctxt := thisContext.
class := ctxt objectClass: anObject.
basicSize := 0.
total := class isVariable
ifTrue: [class byteSizeOfInstanceOfSize: (basicSize := ctxt objectSize: anObject)]
ifFalse: [class isImmediateClass ifTrue: [0] ifFalse: [class byteSizeOfInstance]].
(depth := anInteger - 1) >= 0 ifTrue: [
anObject isCompiledCode
ifTrue: [
anObject literalsDo: [:literal |
total := total + (self spaceForInstance: literal depth: depth seen: seenObjectsOrNil)]]
ifFalse: [
+ (class instSpec between: 2 and: 4) ifTrue: [ "only indexable objects, no bytes etc."
+ 1 to: basicSize do: [:index |
+ total := total + (self spaceForInstance: (ctxt object: anObject basicAt: index) depth: depth seen: seenObjectsOrNil)]].
- 1 to: basicSize do: [:index |
- total := total + (self spaceForInstance: (ctxt object: anObject basicAt: index) depth: depth seen: seenObjectsOrNil)].
1 to: class instSize do: [:index |
total := total + (self spaceForInstance: (ctxt object: anObject instVarAt: index) depth: depth seen: seenObjectsOrNil)]]].
^ total!
Item was changed:
----- Method: SpaceTally>>spaceForInstancesOf:depth:seen: (in category 'instance size') -----
spaceForInstancesOf: aClass depth: anInteger seen: seenObjects
"Answer a pair of the number of bytes consumed by all instances of the given class, including their object headers, and the number of instances. Follow each instance's fields up to the given depth. Beware of cycles to shared objects, which will tamper the resulting numbers.
SpaceTally new spaceForInstancesOf: Form depth: 0. --- Same as #spaceForInstancesOf:
SpaceTally new spaceForInstancesOf: Form depth: 1. --- Includes memory footprint for bits etc.
- SpaceTally new spaceForInstancesOf: Form depth: 2. --- Also includes LargePositiveIntegers in bitmaps ;-)
"
| instances total |
instances := aClass allInstances.
instances isEmpty ifTrue: [^#(0 0)].
total := 0.
instances do: [:each | total := total + (self spaceForInstance: each depth: anInteger seen: seenObjects)].
^{ total. instances size }!
Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-mt.1175.mcz
==================== Summary ====================
Name: System-mt.1175
Author: mt
Time: 29 September 2020, 1:16:45.233157 pm
UUID: f0acc060-a48b-2c4f-8b56-aaf2f55601b4
Ancestors: System-topa.1174
Adds a way to compute a space tally for objects up to a certain depth.
Questions:
- Is the interface (i.e. "depth" and "seen") OK?
- Is the use of IdentitySet OK?
- Can we speed this up somehow?
- Do we need depth-messages for the "class analysis" protocol, too?
=============== Diff against System-topa.1174 ===============
Item was added:
+ ----- Method: SpaceTally>>spaceForInstance:depth: (in category 'instance size') -----
+ spaceForInstance: anObject depth: anInteger
+
+ ^ self spaceForInstance: anObject depth: anInteger seen: IdentitySet new!
Item was added:
+ ----- Method: SpaceTally>>spaceForInstance:depth:seen: (in category 'instance size') -----
+ spaceForInstance: anObject depth: anInteger seen: someObjects
+
+ | class depth total |
+ (someObjects includes: anObject) ifTrue: [^ 0].
+ someObjects add: anObject.
+ class := anObject class.
+ depth := anInteger - 1.
+ total := class isVariable
+ ifTrue: [class byteSizeOfInstanceOfSize: anObject basicSize]
+ ifFalse: [class isImmediateClass ifTrue: [0] ifFalse: [class byteSizeOfInstance]].
+ depth >= 0 ifTrue: [
+ anObject isCompiledCode
+ ifTrue: [
+ anObject literalsDo: [:literal |
+ total := total + (self spaceForInstance: literal depth: depth seen: someObjects)]]
+ ifFalse: [
+ 1 to: anObject basicSize do: [:index |
+ total := total + (self spaceForInstance: (anObject basicAt: index) depth: depth seen: someObjects)].
+ 1 to: class instSize do: [:index |
+ total := total + (self spaceForInstance: (anObject instVarAt: index) depth: depth seen: someObjects)]]].
+ ^ total!
Item was added:
+ ----- Method: SpaceTally>>spaceForInstancesOf:depth: (in category 'instance size') -----
+ spaceForInstancesOf: aClass depth: aNumber
+ "Answer a pair of the number of bytes consumed by all instances of the given class, including their object headers, and the number of instances. Follow each instance's fields up to the given depth. Beware of cycles to shared objects, which will tamper the resulting numbers.
+
+ SpaceTally new spaceForInstancesOf: Form depth: 0. --- Same as #spaceForInstanecsOf:
+ SpaceTally new spaceForInstancesOf: Form depth: 1. --- Includes memory footprint for bits etc.
+ SpaceTally new spaceForInstancesOf: Form depth: 2. --- Also includes LargePositiveIntegers in bitmaps ;-)
+ "
+
+ | instances total sub depth |
+ instances := aClass allInstances.
+ instances isEmpty ifTrue: [^#(0 0)].
+ total := 0.
+ instances do: [:each | total := total + (self spaceForInstance: each depth: aNumber)].
+ ^{ total. instances size }!
Marcel Taeumel uploaded a new version of MorphicExtras to project The Trunk:
http://source.squeak.org/trunk/MorphicExtras-mt.281.mcz
==================== Summary ====================
Name: MorphicExtras-mt.281
Author: mt
Time: 16 December 2020, 12:30:12.371306 pm
UUID: bf976862-6782-48d3-a408-0bc2229d9e3f
Ancestors: MorphicExtras-mt.280
(Recovers contents from inaccessible MorphicExtras-ct.2?82 from Inbox.)
Adds Workspace examples for demonstration of Editor and Text.Reuploaded to fix bad dependency in #extraExample1 (it has to be #asTextFromHtml instead of #asHtmlText). Replaces MorphicExtras-ct.276, which can be moved to the treated inbox.
This commit is part of reconstruction of Objectland (also known as "The Worlds of Squeak"). For more information, see: http://forum.world.st/The-Inbox-MorphicExtras-ct-267-mcz-td5104764.html
=============== Diff against MorphicExtras-mt.280 ===============
Item was added:
+ ----- Method: Workspace class>>extraExample1 (in category '*MorphicExtras-examples') -----
+ extraExample1
+ "ToolBuilder open: Workspace extraExample1"
+
+ | quoteAttributes |
+ quoteAttributes := {TextEmphasis bold. TextColor color: Color mocha}.
+ ^ Workspace new
+ contents: (Text streamContents: [:stream | ({
+ '<i>"When in doubt, try it out!!"</i>' asTextFromHtml
+ addAllAttributes: quoteAttributes;
+ yourself.
+ '-- Dan Ingalls' asText
+ addAllAttributes: quoteAttributes;
+ addAttribute: TextAlignment rightFlush;
+ yourself.
+ String empty. }
+ , ((self class sourceCodeAt: #extraExampleContents1) asString lines allButFirst: 3)
+ do: [:line | stream nextPutAll: line]
+ separatedBy: [stream cr])]);
+ shouldStyle: false;
+ yourself!
Item was added:
+ ----- Method: Workspace class>>extraExample2 (in category '*MorphicExtras-examples') -----
+ extraExample2
+ "ToolBuilder open: Workspace extraExample2"
+
+ ^ self new
+ contents: (((self class sourceCodeAt: #extraExampleContents2)
+ asString lines allButFirst: 3)
+ joinSeparatedBy: Character cr);
+ yourself!
Item was added:
+ ----- Method: Workspace class>>extraExampleContents1 (in category '*MorphicExtras-examples') -----
+ extraExampleContents1
+ "This is example code for #extraExample1"
+
+ "Run the following lines by pressing <cmd>d:"
+ Transcript showln: 'Hello world!!'.
+ self inform: 'This is a dialog box. Quite easy, isn''t it?'.
+
+ "Print the result of an expression using <cmd>p"
+ 6 * 7.
+ Float pi i exp stringForReadout.
+ (16 factorial + 1) isPrime.
+ (Smalltalk allClasses gather: #selectors) size.!
Item was added:
+ ----- Method: Workspace class>>extraExampleContents2 (in category '*MorphicExtras-examples') -----
+ extraExampleContents2
+ "This is example code for #extraExample2"
+
+ "Inspect any (sub)expression result by pressing <cmd>i"
+ (20 to: 40 by: 2) asOrderedCollection
+ addFirst: 16;
+ addLast: 42;
+ sort: [:x | x \\ 3] descending;
+ yourself.
+
+ "Explore any (sub)expression result by pressing <cmd>I"
+ Project current world.
+
+ "Debug any (sub)expression using <cmd>D"
+ (1 to: 9) join asNumber sqrt truncateTo: 1e-3.
+ (SystemWindow windowsIn: ActiveWorld)
+ select: [:window | window bounds isWide]
+ thenDo: [:window | window color: window color negated].!
Patrick Rein uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/EToys-pre.415.mcz
==================== Summary ====================
Name: EToys-pre.415
Author: pre
Time: 16 December 2020, 10:31:09.027215 am
UUID: be5a3ed4-ef3d-b746-a38f-1811f5a439a1
Ancestors: EToys-mt.414
Deprecates an already deprecated method in SugarLauncher.
=============== Diff against EToys-mt.414 ===============
Item was removed:
- ----- Method: SugarLauncher class>>welcomeProjectName (in category 'accessing') -----
- welcomeProjectName
- "Deprecated"
- ^Project home ifNotNil: [:p | p name]!
Patrick Rein uploaded a new version of Network to project The Trunk:
http://source.squeak.org/trunk/Network-pre.244.mcz
==================== Summary ====================
Name: Network-pre.244
Author: pre
Time: 16 December 2020, 10:29:54.830215 am
UUID: 12c7ade8-62d1-324d-b902-f9e561617100
Ancestors: Network-mt.243
Deprecates a private (already deprecated) method in SocketStream.
=============== Diff against Network-mt.243 ===============
Item was removed:
- ----- Method: SocketStream>>receiveDataIfAvailable (in category 'private-socket') -----
- receiveDataIfAvailable
- "Deprecated. Use #receiveAvailableData instead"
-
- ^self receiveAvailableData!
Patrick Rein uploaded a new version of SMBase to project The Trunk:
http://source.squeak.org/trunk/SMBase-pre.144.mcz
==================== Summary ====================
Name: SMBase-pre.144
Author: pre
Time: 16 December 2020, 10:27:25.663215 am
UUID: 422ce975-bd0c-e24d-95b1-aa060a1e5770
Ancestors: SMBase-nice.143
Deprecates two methods in SMPackage.
=============== Diff against SMBase-nice.143 ===============
Item was removed:
- ----- Method: SMPackage>>maintainer (in category 'accessing') -----
- maintainer
- "Deprecated"
-
- ^self owner!
Item was removed:
- ----- Method: SMPackage>>modulePath:moduleVersion:moduleTag:versionComment: (in category 'deprecated') -----
- modulePath: p moduleVersion: v moduleTag: t versionComment: vc
- "Deprecated. Only kept for migration from SM 1.0x.
- Method used when recreating from storeOn: format."
-
- self isReleased ifTrue: [self lastRelease note: vc]!
Patrick Rein uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-pre.1197.mcz
==================== Summary ====================
Name: System-pre.1197
Author: pre
Time: 16 December 2020, 10:19:29.678215 am
UUID: 2a693e37-3279-b24e-87b6-c277ffbcf2ad
Ancestors: System-mt.1196
Deprecates two methods in Preferences and rewrites one method in SARInstaller to not use a deprecated method.
=============== Diff against System-mt.1196 ===============
Item was removed:
- ----- Method: Preferences class>>parameterAt:default: (in category 'parameters') -----
- parameterAt: aKey default: defaultValueBlock
- "Deprecated interface; no surviving senders in the released image, but clients probably still use"
-
- ^ self parameterAt: aKey ifAbsentPut: defaultValueBlock!
Item was changed:
+ ----- Method: Preferences class>>useFormsInPaintBox (in category 'standard queries') -----
- ----- Method: Preferences class>>useFormsInPaintBox (in category 'prefs - misc') -----
useFormsInPaintBox
+ ^ self
+ valueOfFlag: #useFormsInPaintBox
+ ifAbsent: [false]!
-
- ^ self valueOfFlag: #useFormsInPaintBox!
Item was changed:
----- Method: SARInstaller class>>newCardForSqueakMap: (in category 'SqueakMap') -----
newCardForSqueakMap: aSqueakMap
"Answer a new card."
+ | newCard |
+ newCard := (aSqueakMap newCardWithId: self squeakMapPackageID)
+ created: 3236292323
+ updated:3236292323
+ name: 'SARInstaller for 3.6'
+ currentVersion:'16'
+ summary: 'Lets you load SAR (Squeak ARchive) files from SqueakMap and the File List. For 3.6 and later images.'
+ description:'Support for installing SAR (Squeak ARchive) packages from SqueakMap and the File List.
+ For 3.6 and later images.
- ^(aSqueakMap newCardWithId: self squeakMapPackageID)
- created: 3236292323
- updated:3236292323
- name: 'SARInstaller for 3.6'
- currentVersion:'16'
- summary: 'Lets you load SAR (Squeak ARchive) files from SqueakMap and the File List. For 3.6 and later images.'
- description:'Support for installing SAR (Squeak ARchive) packages from SqueakMap and the File List.
- For 3.6 and later images.
+ SMSARInstaller will use this if it''s present to load SAR packages.
- SMSARInstaller will use this if it''s present to load SAR packages.
+ Use SARBuilder for making these packages easily.'
+ url: 'http://bike-nomad.com/squeak/'
+ downloadUrl:'http://bike-nomad.com/squeak/SARInstallerFor36-nk.16.cs.gz'
+ author: 'Ned Konz <ned(a)bike-nomad.com>'
+ maintainer:'Ned Konz <ned(a)bike-nomad.com>'
+ registrator:'Ned Konz <ned(a)bike-nomad.com>'
+ password:240495131608326995113451940367316491071470713347
+ categories: #('6ba57b6e-946a-4009-beaa-0ac93c08c5d1' '94277ca9-4d8f-4f0e-a0cb-57f4b48f1c8a' 'a71a6233-c7a5-4146-b5e3-30f28e4d3f6b' '8209da9b-8d6e-40dd-b23a-eb7e05d4677b' );
+ yourself.
+ newCard lastRelease note: 'v16: same as v16 of SARInstaller for 3.4 but doesn''t include any classes other than SARInstaller.
- Use SARBuilder for making these packages easily.'
- url: 'http://bike-nomad.com/squeak/'
- downloadUrl:'http://bike-nomad.com/squeak/SARInstallerFor36-nk.16.cs.gz'
- author: 'Ned Konz <ned(a)bike-nomad.com>'
- maintainer:'Ned Konz <ned(a)bike-nomad.com>'
- registrator:'Ned Konz <ned(a)bike-nomad.com>'
- password:240495131608326995113451940367316491071470713347
- categories: #('6ba57b6e-946a-4009-beaa-0ac93c08c5d1' '94277ca9-4d8f-4f0e-a0cb-57f4b48f1c8a' 'a71a6233-c7a5-4146-b5e3-30f28e4d3f6b' '8209da9b-8d6e-40dd-b23a-eb7e05d4677b' );
- modulePath: ''
- moduleVersion:''
- moduleTag:''
- versionComment:'v16: same as v16 of SARInstaller for 3.4 but doesn''t include any classes other than SARInstaller.
To be loaded into 3.6 images only. Will de-register the 3.4 version if it''s registered.
Added a default (DWIM) mode in which SAR files that are missing both a preamble and postscript have all their members loaded in a default manner.
Changed the behavior of #extractMemberWithoutPath: to use the same directory as the SAR itself.
Added #extractMemberWithoutPath:inDirectory:
Moved several change set methods to the class side.
Made change set methods work with 3.5 or 3.6a/b
Now supports the following file types:
Projects (with or without construction of a ViewMorph)
Genie gesture dictionaries
Change sets
DVS packages
Monticello packages
Graphics files (loaded as SketchMorphs)
Text files (loaded as text editor windows)
Morph(s) in files
+ Now keeps track of installed members.'.
+
+ ^ newCard!
- Now keeps track of installed members.'!
Patrick Rein uploaded a new version of 60Deprecated to project The Trunk:
http://source.squeak.org/trunk/60Deprecated-pre.86.mcz
==================== Summary ====================
Name: 60Deprecated-pre.86
Author: pre
Time: 16 December 2020, 10:02:51.427215 am
UUID: 83016811-05f2-c04f-a169-6ac3c8a222d1
Ancestors: 60Deprecated-dtl.85
Deprecates several methods already marked as deprecated in comments.
=============== Diff against 60Deprecated-dtl.85 ===============
Item was added:
+ ----- Method: Preferences class>>parameterAt:default: (in category '*60Deprecated-parameters') -----
+ parameterAt: aKey default: defaultValueBlock
+ "Deprecated interface; no surviving senders in the released image, but clients probably still use"
+ self deprecated: 'Use #parameterAt:ifAbsentPut: instead'.
+ ^ self parameterAt: aKey ifAbsentPut: defaultValueBlock!
Item was added:
+ ----- Method: SMPackage>>maintainer (in category '*60Deprecated-accessing') -----
+ maintainer
+
+ self deprecated: 'Use #owner or #maintainers instead'.
+ ^self owner!
Item was added:
+ ----- Method: SMPackage>>modulePath:moduleVersion:moduleTag:versionComment: (in category '*60Deprecated-deprecated') -----
+ modulePath: p moduleVersion: v moduleTag: t versionComment: vc
+ "Deprecated. Only kept for migration from SM 1.0x.
+ Method used when recreating from storeOn: format."
+
+ self deprecated.
+ self isReleased ifTrue: [self lastRelease note: vc]!
Item was added:
+ ----- Method: SocketStream>>receiveDataIfAvailable (in category '*60Deprecated-private-socket') -----
+ receiveDataIfAvailable
+
+ self deprecated: 'Use #receiveAvailableData instead'.
+ ^ self receiveAvailableData!
Item was added:
+ ----- Method: SugarLauncher class>>welcomeProjectName (in category '*60Deprecated-accessing') -----
+ welcomeProjectName
+ "Deprecated"
+ ^Project home ifNotNil: [:p | p name]!