commits | 10 Feb 00:55
Favicon

Daily Commit Log

Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours:

http://lists.squeakfoundation.org/pipermail/packages/2010-February/002606.html

Name: Morphic-nice.330
Ancestors: Morphic-nice.329

Let indent/outdent work in case of LF

=============================================

http://lists.squeakfoundation.org/pipermail/packages/2010-February/002607.html

Name: ST80-nice.97
Ancestors: ST80-nice.96

Let indent/outdent work in case of LF

=============================================

http://lists.squeakfoundation.org/pipermail/packages/2010-February/002608.html

Name: Tools-nice.171
Ancestors: Tools-dtl.170

remove useless temps
avoid unnecessary non local return

=============================================

(Continue reading)

Eliot Miranda | 9 Feb 22:34
Picon

OT: compressing log files

Hi All,


    I've just needed to make sense of a very long log file generated by strace.  The log file is full of entries like:

--- SIGALRM (Alarm clock) <at> 0 (0) ---
gettimeofday({1265744804, 491238}, NULL) = 0
sigreturn()                             = ? (mask now [])
ioctl(8, 0x80045530, 0xbfd4fe70)        = 0
ioctl(8, 0xc1205531, 0xbfd4fb80)        = 0
ioctl(8, 0x80045530, 0xbfd4fe70)        = 0
ioctl(8, 0xc1205531, 0xbfd4fb80)        = 0
ioctl(8, 0x80045530, 0xbfd4fe70)        = 0
ioctl(8, 0xc1205531, 0xbfd4fb80)        = 0
ioctl(8, 0x80045530, 0xbfd4fe70)        = 0
ioctl(8, 0xc1205531, 0xbfd4fb80)        = 0
ioctl(8, 0x80045530, 0xbfd4fe70)        = 0
ioctl(8, 0xc1205531, 0xbfd4fb80)        = 0
ioctl(8, 0x80045530, 0xbfd4fe70)        = 0
ioctl(8, 0xc1205531, 0xbfd4fb80)        = 0
ioctl(8, 0x80045530, 0xbfd4fe70)        = 0
ioctl(8, 0xc1205531, 0xbfd4fb80)        = 0
ioctl(8, 0x80045530, 0xbfd4fe70)        = 0
ioctl(8, 0xc1205531, 0xbfd4fb80)        = 0
ioctl(8, 0x80045530, 0xbfd4fe70)        = 0
ioctl(8, 0xc1205531, 0xbfd4fb80)        = 0
ioctl(8, 0x80045530, 0xbfd4fe70)        = 0
ioctl(8, 0xc1205531, 0xbfd4fb80)        = 0
ioctl(8, 0x80045530, 0xbfd4fe70)        = 0
ioctl(8, 0xc1205531, 0xbfd4fb80)        = 0
ioctl(8, 0x80045530, 0xbfd4fe70)        = 0
ioctl(8, 0xc1205531, 0xbfd4fb80)        = 0
ioctl(8, 0x80045530, 0xbfd4fe70)        = 0
ioctl(8, 0xc1205531, 0xbfd4fb80)        = 0
ioctl(8, 0x80045530, 0xbfd4fe70)        = 0
ioctl(8, 0xc1205531, 0xbfd4fb80)        = 0
ioctl(8, 0x80045530, 0xbfd4fe70)        = 0

and my workspace script reduces these to e.g.

--- SIGALRM (Alarm clock) <at> 0 (0) ---
gettimeofday({1265744797, 316183}, NULL) = 0
sigreturn()                             = ? (mask now [])
NEXT 2 LINES REPEAT 715 TIMES
ioctl(8, 0xc1205531, 0xbfd4fb80)        = 0
ioctl(8, 0x80045530, 0xbfd4fe70)        = 0
ioctl(8, 0xc1205531, 0xbfd4fb80)        = 0
--- SIGALRM (Alarm clock) <at> 0 (0) ---
gettimeofday({1265744797, 317189}, NULL) = 0
sigreturn()                             = ? (mask now [])


My question is has anyone looked at this issue in any depth and perhaps come up with something not as crude as the below and possibly even recursive.  i.e. the above would ideally be reduced to e.g.

NEXT 7 LINES REPEAT 123456 TIMES
--- SIGALRM (Alarm clock) <at> 0 (0) ---
gettimeofday({1265744797, 316183}, NULL) = 0
sigreturn()                             = ? (mask now [])
NEXT 2 LINES REPEAT BETWEEN 500 AND 800 TIMES
ioctl(8, 0xc1205531, 0xbfd4fb80)        = 0
ioctl(8, 0x80045530, 0xbfd4fe70)        = 0
ioctl(8, 0xc1205531, 0xbfd4fb80)        = 0
--- SIGALRM (Alarm clock) <at> 0 (0) ---
gettimeofday({1265744797, 317189}, NULL) = 0
sigreturn()                             = ? (mask now [])



Here's my quick hack that I ran in vw7.7nc:

| f o lines maxrun repeats range |
f := '../Cog/squeak.strace.log' asFilename readStream.
o := 'compressed.log' asFilename writeStream.
lines := OrderedCollection new.
maxrun := 50.
repeats := 0.
range := nil.
[[f atEnd] whileFalse:
[lines size > maxrun ifTrue:
[repeats > 0
ifTrue:
[1 to: range first - 1 do:
[:i| o nextPutAll: (lines at: i); cr].
o nextPutAll: 'NEXT '; print: range size; nextPutAll: ' LINES REPEAT '; print: repeats + 1; nextPutAll: ' TIMES'; cr.
range do:
[:i| o nextPutAll: (lines at: i); cr].
lines removeFirst: range last.
repeats := 0]
ifFalse:
[o nextPutAll: lines removeFirst; cr; flush].
range := nil].
lines addLast: (f upTo: Character cr).
[:exit|
1 to: lines size do:
[:i| | line repeat |
line := lines at: i.
repeat := lines nextIndexOf: line from: i + 1 to: lines size.
(repeat ~~ nil
and: [lines size >= (repeat - i * 2 + i)
and: [(i to: repeat - 1) allSatisfy: [:j| (lines at: j) = (lines at: j - i + repeat)]]]) ifTrue:
[repeats := repeats + 1.
range isNil
ifTrue: [range := i to: repeat - 1]
ifFalse:
[range = (i to: repeat - 1) ifTrue:
[range do: [:ignore| lines removeAtIndex: repeat].
exit value]]]]] valueWithExit]]
ensure: [f close. o close].
repeats

Forgive the cross post.  I expect deep expertise in each newsgroup posted to.

best
Eliot

David T. Lewis | 10 Feb 00:44
Picon
Favicon

Re: OT: compressing log files

A bit of a strain on the old garbage collector, but a Bag is good
for that kind of analysis:

  f := FileStream fileNamed: 'strace.txt'.
  lines := Bag new.
  [[f atEnd] whileFalse: [lines add: (f upTo: Character lf)]]
      ensure: [f close].
  lines sortedCounts inspect

Dave

On Tue, Feb 09, 2010 at 01:34:19PM -0800, Eliot Miranda wrote:

> Hi All, > > I've just needed to make sense of a very long log file generated by > strace. The log file is full of entries like: > > --- SIGALRM (Alarm clock) @ 0 (0) --- > gettimeofday({1265744804, 491238}, NULL) = 0 > sigreturn() = ? (mask now []) > ioctl(8, 0x80045530, 0xbfd4fe70) = 0 > ioctl(8, 0xc1205531, 0xbfd4fb80) = 0 > ioctl(8, 0x80045530, 0xbfd4fe70) = 0 > ioctl(8, 0xc1205531, 0xbfd4fb80) = 0 > ioctl(8, 0x80045530, 0xbfd4fe70) = 0 > ioctl(8, 0xc1205531, 0xbfd4fb80) = 0 > ioctl(8, 0x80045530, 0xbfd4fe70) = 0 > ioctl(8, 0xc1205531, 0xbfd4fb80) = 0 > ioctl(8, 0x80045530, 0xbfd4fe70) = 0 > ioctl(8, 0xc1205531, 0xbfd4fb80) = 0 > ioctl(8, 0x80045530, 0xbfd4fe70) = 0 > ioctl(8, 0xc1205531, 0xbfd4fb80) = 0 > ioctl(8, 0x80045530, 0xbfd4fe70) = 0 > ioctl(8, 0xc1205531, 0xbfd4fb80) = 0 > ioctl(8, 0x80045530, 0xbfd4fe70) = 0 > ioctl(8, 0xc1205531, 0xbfd4fb80) = 0 > ioctl(8, 0x80045530, 0xbfd4fe70) = 0 > ioctl(8, 0xc1205531, 0xbfd4fb80) = 0 > ioctl(8, 0x80045530, 0xbfd4fe70) = 0 > ioctl(8, 0xc1205531, 0xbfd4fb80) = 0 > ioctl(8, 0x80045530, 0xbfd4fe70) = 0 > ioctl(8, 0xc1205531, 0xbfd4fb80) = 0 > ioctl(8, 0x80045530, 0xbfd4fe70) = 0 > ioctl(8, 0xc1205531, 0xbfd4fb80) = 0 > ioctl(8, 0x80045530, 0xbfd4fe70) = 0 > ioctl(8, 0xc1205531, 0xbfd4fb80) = 0 > ioctl(8, 0x80045530, 0xbfd4fe70) = 0 > ioctl(8, 0xc1205531, 0xbfd4fb80) = 0 > ioctl(8, 0x80045530, 0xbfd4fe70) = 0 > > and my workspace script reduces these to e.g. > > --- SIGALRM (Alarm clock) @ 0 (0) --- > gettimeofday({1265744797, 316183}, NULL) = 0 > sigreturn() = ? (mask now []) > NEXT 2 LINES REPEAT 715 TIMES > ioctl(8, 0xc1205531, 0xbfd4fb80) = 0 > ioctl(8, 0x80045530, 0xbfd4fe70) = 0 > ioctl(8, 0xc1205531, 0xbfd4fb80) = 0 > --- SIGALRM (Alarm clock) @ 0 (0) --- > gettimeofday({1265744797, 317189}, NULL) = 0 > sigreturn() = ? (mask now []) > > > My question is has anyone looked at this issue in any depth and perhaps come > up with something not as crude as the below and possibly even recursive. > i.e. the above would ideally be reduced to e.g. > > NEXT 7 LINES REPEAT 123456 TIMES > --- SIGALRM (Alarm clock) @ 0 (0) --- > gettimeofday({1265744797, 316183}, NULL) = 0 > sigreturn() = ? (mask now []) > NEXT 2 LINES REPEAT BETWEEN 500 AND 800 TIMES > ioctl(8, 0xc1205531, 0xbfd4fb80) = 0 > ioctl(8, 0x80045530, 0xbfd4fe70) = 0 > ioctl(8, 0xc1205531, 0xbfd4fb80) = 0 > --- SIGALRM (Alarm clock) @ 0 (0) --- > gettimeofday({1265744797, 317189}, NULL) = 0 > sigreturn() = ? (mask now []) > > > > Here's my quick hack that I ran in vw7.7nc: > > | f o lines maxrun repeats range | > f := '../Cog/squeak.strace.log' asFilename readStream. > o := 'compressed.log' asFilename writeStream. > lines := OrderedCollection new. > maxrun := 50. > repeats := 0. > range := nil. > [[f atEnd] whileFalse: > [lines size > maxrun ifTrue: > [repeats > 0 > ifTrue: > [1 to: range first - 1 do: > [:i| o nextPutAll: (lines at: i); cr]. > o nextPutAll: 'NEXT '; print: range size; nextPutAll: ' LINES REPEAT '; > print: repeats + 1; nextPutAll: ' TIMES'; cr. > range do: > [:i| o nextPutAll: (lines at: i); cr]. > lines removeFirst: range last. > repeats := 0] > ifFalse: > [o nextPutAll: lines removeFirst; cr; flush]. > range := nil]. > lines addLast: (f upTo: Character cr). > [:exit| > 1 to: lines size do: > [:i| | line repeat | > line := lines at: i. > repeat := lines nextIndexOf: line from: i + 1 to: lines size. > (repeat ~~ nil > and: [lines size >= (repeat - i * 2 + i) > and: [(i to: repeat - 1) allSatisfy: [:j| (lines at: j) = (lines at: j - i > + repeat)]]]) ifTrue: > [repeats := repeats + 1. > range isNil > ifTrue: [range := i to: repeat - 1] > ifFalse: > [range = (i to: repeat - 1) ifTrue: > [range do: [:ignore| lines removeAtIndex: repeat]. > exit value]]]]] valueWithExit]] > ensure: [f close. o close]. > repeats > > Forgive the cross post. I expect deep expertise in each newsgroup posted > to. > > best > Eliot >
commits | 9 Feb 01:00
Favicon

The Trunk: Collections-nice.299.mcz

Nicolas Cellier uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-nice.299.mcz

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

Name: Collections-nice.299
Author: nice
Time: 9 February 2010, 8:58:48.298 pm
UUID: 8084774f-138c-4be0-9ce6-e1bfff093403
Ancestors: Collections-nice.298

Add fix from Grease: (2 to: 1) anyOne should fail because empty.

=============== Diff against Collections-nice.298 ===============

Item was added:
+ ----- Method: Interval>>anyOne (in category 'accessing') -----
+ anyOne
+ 	"This message will fail for an empty Interval, super would not."
+ 	^self at: 1!

commits | 9 Feb 01:00
Favicon

The Trunk: CollectionsTests-nice.142.mcz

Nicolas Cellier uploaded a new version of CollectionsTests to project The Trunk:
http://source.squeak.org/trunk/CollectionsTests-nice.142.mcz

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

Name: CollectionsTests-nice.142
Author: nice
Time: 9 February 2010, 8:47:11.722 pm
UUID: 902c9aec-5059-4d51-87ee-7676b8a0485f
Ancestors: CollectionsTests-ul.141

Add test from Grease: (2 to: 1) anyOne should fail because empty.

=============== Diff against CollectionsTests-ul.141 ===============

Item was added:
+ ----- Method: IntervalTest>>testAnyOne (in category 'tests') -----
+ testAnyOne
+ 	self assert: ((2 to: 5) includes: (2 to: 5) anyOne).
+ 	self should: [(2 to: 1) anyOne] raise: Error description: 'This interval is empty'!

commits | 9 Feb 01:00
Favicon

The Trunk: Tools-nice.174.mcz

Nicolas Cellier uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-nice.174.mcz

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

Name: Tools-nice.174
Author: nice
Time: 9 February 2010, 3:26:58.031 pm
UUID: ee5319af-8e72-b246-96c9-c5d5af3348f7
Ancestors: Tools-dtl.173

Workaround to avoid a bug in MessageNames finder update logic:
In method #inheritanceButtonColor, currentCompiledMethod becomes undefined when selecting an
un-implemented message.
Apparently, inheritanceButtonColor seems to be called several times, the first one with a non nil
instance which is changed to nil before method finishes...

=============== Diff against Tools-dtl.173 ===============

Item was changed:
  ----- Method: CodeHolder>>inheritanceButtonColor (in category 'toolbuilder') -----
  inheritanceButtonColor
  	"Check to see if the currently-viewed method has a super send or an override, and if so, change screen
feedback, unless the #decorateBrowserButtons says not to."

+ 	| flags aColor cm |
+ 	cm := currentCompiledMethod.
+ 	((cm isKindOf: CompiledMethod) and: [Preferences decorateBrowserButtons])
- 	| flags aColor |
- 	((currentCompiledMethod isKindOf: CompiledMethod) and: [Preferences decorateBrowserButtons])
  		ifFalse: [^Color transparent].

  	"This table duplicates the old logic, but adds two new colors for the cases where there is a superclass
definition, but this method doesn't call it."

  	flags := 0.
  	self isThisAnOverride ifTrue: [ flags := flags bitOr: 4 ].
+ 	cm sendsToSuper ifTrue: [ flags := flags bitOr: 2 ].
- 	currentCompiledMethod sendsToSuper ifTrue: [ flags := flags bitOr: 2 ].
  	self isThereAnOverride ifTrue: [ flags := flags bitOr: 1 ].
  	aColor := {
  		Color transparent.
  		Color tan lighter.
  		Color green muchLighter.
  		Color blue muchLighter.
  		Color red muchLighter.	"has super but doesn't call it"
  		(Color r: 0.94 g: 0.823 b: 0.673).	"has sub; has super but doesn't call it"
  		Color green muchLighter.
  		Color blue muchLighter.
  	} at: flags + 1.

  	^aColor!

Torsten Bergmann | 9 Feb 14:58
Picon
Picon

Empty categories

In Boolean there is now an empty category "*eToys-*morphic".
Either it could be removed - or a failure while packaging
(dont know how Monticello behaves with two *).

Any comments?

Shouldnt we run a script on trunk to remove empty 
categories to clean up a little bit?

Thx
T.

--

-- 
NEU: Mit GMX DSL über 1000,- ¿ sparen!
http://portal.gmx.net/de/go/dsl02

Andreas Raab | 9 Feb 18:13
Picon
Picon

Re: Empty categories


Torsten Bergmann wrote: > In Boolean there is now an empty category "*eToys-*morphic". > Either it could be removed - or a failure while packaging > (dont know how Monticello behaves with two *). > > Any comments? > > Shouldnt we run a script on trunk to remove empty > categories to clean up a little bit?
Absolutely. Does anyone know where all of these empty *Etoys and *MorphicExtras categories come from? Cheers, - Andreas
Edgar J. De Cleene | 9 Feb 20:20
Picon

Re: Empty categories


On 2/9/10 11:58 AM, "Torsten Bergmann" <astares <at> gmx.de> wrote:


> Shouldnt we run a script on trunk to remove empty > categories to clean up a little bit?
Trying to see if the cleanup I have was in Squeak3.11-8931-alpha.image originate the attached walkback The error was with the .cs via drag and drop and selecting code browser Using message names tool I see no cleanup in image, so I copy paste here. Come from original code of Ramon Leon and IMHO should be used before any image go to ftp !SmalltalkImage methodsFor: 'image cleanup' stamp: 'edc 12/13/2009 08:34'! cleanup "SmalltalkImage current cleanup" | tasks | Transcript open. tasks := OrderedCollection new add: [Smalltalk removeEmptyMessageCategories]; add: [Workspace allSubInstancesDo: [:each | each setBindings: Dictionary new]]; add: [Undeclared removeUnreferencedKeys]; add: [Categorizer sortAllCategories]; add: [Symbol compactSymbolTable]; add: [#(#TheWorldMenu #FileServices #AppRegistry #Preferences #FileList ) do: [:cl | (Smalltalk at: cl) removeObsolete]]; add: [Flaps freshFlapsStart]; add: [MCFileBasedRepository flushAllCaches]; add: [HandMorph releaseCachedState; initForEvents. self fixObsoleteReferences]; add: [Smalltalk forgetDoIts. DataStream initialize. Behavior flushObsoleteSubclasses. "The pointer to currentMethod is not realy needed (anybody care to fix this) and often holds on to obsolete bindings" MethodChangeRecord allInstancesDo: [:each | each noteNewMethod: nil]. Smalltalk garbageCollectMost]; yourself. Utilities informUserDuring: [:bar | tasks do: [:block | bar value: block printString. [block value] on: Error do: [:error | Transcript show: error; cr]]]. SystemNavigation default obsoleteClasses isEmpty ifTrue: [SmalltalkImage current saveSession] ifFalse: [SystemNavigation default obsoleteClasses do: [:each | self halt. [PointerFinder on: each] on: Error do: [:error | Transcript show: error; cr]]]! ! Edgar
MessageNotUnderstood: Array>>isByteString
9 February 2010 5:07:38.355 pm

VM: Mac OS - a
SmalltalkImage
Image: Squeak3.11alpha [latest update: #8931]

SecurityManager
state:
Restricted: false
FileAccess: true
SocketAccess: true
Working Dir
/Users/edgar/SqueakDevelop/imagesZip/Squeak3.11-8931-alpha
Trusted Dir
/foobar/tooBar/forSqueak/bogus
Untrusted Dir
/Users/edgar/Library/Preferences/Squeak/Internet/My
Squeak

Array(Object)>>doesNotUnderstand: #isByteString
	Receiver:
#('*MinimalMorphic-changeset utilities' #basicNewChangeSet: #changeSetNamed:)
	Arguments and
temporary variables: 
		aMessage: 	isByteString
		exception: 	MessageNotUnderstood:
Array>>isByteString
		resumeValue: 	nil
	Receiver's instance variables:

#('*MinimalMorphic-changeset utilities' #basicNewChangeSet:
#changeSetNamed:)
ByteSymbol(String)>>compare:with:collated:
	Receiver:
#SmalltalkImage
	Arguments and temporary variables: 
		string1: 	#SmalltalkImage
		string2:
	#('*MinimalMorphic-changeset utilities' #basicNewChangeSet: #changeSet...etc...
		order:
	#[0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26...etc...
	Receiver's instance variables:

#SmalltalkImage
ByteSymbol(String)>>>=
	Receiver: #SmalltalkImage
	Arguments and temporary
variables: 
		aString: 	#('*MinimalMorphic-changeset utilities' #basicNewChangeSet:
#changeSet...etc...
	Receiver's instance variables:

#SmalltalkImage
SystemOrganizer(Categorizer)>>classify:under:suppressIfDefault:
	Receiver:
<<error during printing>>
	Arguments and temporary variables: 
		element:
	#SmalltalkImage
		heading: 	'7253SmalltalkImage-cleanup.1.cs'
		aBoolean: 	true
		catName:
	nil
		catIndex: 	1
		elemIndex: 	1
		realHeading: 	#'7253SmalltalkImage-cleanup.1.cs'
		i:
	nil
		iLimiT: 	nil
	Receiver's instance variables: 
		categoryArray:
	#(#'7253SmalltalkImage-cleanup.1.cs')
		categoryStops: 	#(1)
		elementArray:
	#(#('*MinimalMorphic-changeset utilities' #basicNewChangeSet: #ch...etc...


--- The full
stack ---
Array(Object)>>doesNotUnderstand:
#isByteString
ByteSymbol(String)>>compare:with:collated:
ByteSymbol(String)>>>=
SystemOrganizer(Categorizer)>>classify:under:suppressIfDefault:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SystemOrganizer(Categorizer)>>classify:under:
[] in
SystemOrganizer(Categorizer)>>classifyAll:under:
Array(SequenceableCollection)>>do:
SystemOrganizer(Categorizer)>>classifyAll:under:
[]
in FileContentsBrowser
class>>browseStream:named:
BlockClosure>>ensure:
CursorWithMask(Cursor)>>showWhile:
FileContentsBrowser
class>>browseStream:named:
FileContentsBrowser
class>>browseStream:
SimpleServiceEntry>>performServiceFor:
[] in ExternalDropHandler
class>>lookupServiceBasedHandler:
ExternalDropHandler>>handle:in:dropEvent:
[] in
PasteUpMorph>>dropFiles:
BlockClosure>>ensure:
PasteUpMorph>>dropFiles:
PasteUpMorph(Morph)>>handleDropFiles:
DropFilesEvent>>sentTo:
PasteUpMorph(Morph)>>handleEvent:
MorphicEventDispatcher>>dispatchDefault:with:
MorphicEventDispatcher>>dispatchEvent:with:
PasteUpMorph(Morph)>>processEvent:using:
PasteUpMorph>>processEvent:using:
PasteUpMorph(Morph)>>processEvent:
HandMorph>>sendEvent:focus:clear:
HandMorph>>sendEvent:focus:
HandMorph>>handleEvent:
HandMorph>>processEvents
[]
in
WorldState>>doOneCycleNowFor:
Array(SequenceableCollection)>>do:
WorldState>>handsDo:
WorldState>>doOneCycleNowFor:
WorldState>>doOneCycleFor:
PasteUpMorph>>doOneCycle
[]
in Project class>>spawnNewProcess
[] in BlockClosure>>newProcess

Andreas Raab | 9 Feb 21:30
Picon
Picon

Re: Empty categories

Thanks, Edgar! That's a really useful script.

Cheers,
   - Andreas

Edgar J. De Cleene wrote:

> > > On 2/9/10 11:58 AM, "Torsten Bergmann" <astares <at> gmx.de> wrote: > >> Shouldnt we run a script on trunk to remove empty >> categories to clean up a little bit? > > Trying to see if the cleanup I have was in Squeak3.11-8931-alpha.image > originate the attached walkback > > The error was with the .cs via drag and drop and selecting code browser > Using message names tool I see no cleanup in image, so I copy paste here. > Come from original code of Ramon Leon and IMHO should be used before any > image go to ftp > > !SmalltalkImage methodsFor: 'image cleanup' stamp: 'edc 12/13/2009 08:34'! > cleanup > "SmalltalkImage current cleanup" > | tasks | > Transcript open. > tasks := OrderedCollection new > add: [Smalltalk removeEmptyMessageCategories]; > > add: [Workspace > allSubInstancesDo: [:each | each setBindings: > Dictionary new]]; > > add: [Undeclared removeUnreferencedKeys]; > > add: [Categorizer sortAllCategories]; > > add: [Symbol compactSymbolTable]; > > add: [#(#TheWorldMenu #FileServices #AppRegistry > #Preferences #FileList ) > do: [:cl | (Smalltalk at: cl) removeObsolete]]; > > add: [Flaps freshFlapsStart]; > > add: [MCFileBasedRepository flushAllCaches]; > > add: [HandMorph releaseCachedState; initForEvents. > self fixObsoleteReferences]; > > add: [Smalltalk forgetDoIts. > DataStream initialize. > Behavior flushObsoleteSubclasses. > "The pointer to currentMethod is not realy needed > (anybody care to fix this) and often holds on to > obsolete bindings" > MethodChangeRecord > allInstancesDo: [:each | each noteNewMethod: nil]. > Smalltalk garbageCollectMost]; > yourself. > Utilities > informUserDuring: [:bar | tasks > do: [:block | > bar value: block printString. > [block value] > on: Error > do: [:error | Transcript show: error; > cr]]]. > SystemNavigation default obsoleteClasses isEmpty > ifTrue: [SmalltalkImage current saveSession] > ifFalse: [SystemNavigation default obsoleteClasses > do: [:each | > self halt. > [PointerFinder on: each] > on: Error > do: [:error | Transcript show: error; > cr]]]! ! > > Edgar > > > > ------------------------------------------------------------------------ > >
Edgar J. De Cleene | 9 Feb 21:02
Picon

Re: Re: Empty categories


On 2/9/10 6:30 PM, "Andreas Raab" <andreas.raab <at> gmx.de> wrote:


> Thanks, Edgar! That's a really useful script. > > Cheers, > - Andreas
I think I send before, but maybe not... Any idea why drag and drop a .cs into the image raise the error? Edgar

Gmane