<br><br><div class="gmail_quote">On Thu, Mar 14, 2013 at 10:46 AM, Nicolas Cellier <span dir="ltr"><<a href="mailto:nicolas.cellier.aka.nice@gmail.com" target="_blank">nicolas.cellier.aka.nice@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">2013/3/14 Eliot Miranda <<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>>:<br>
<div><div class="h5">><br>
><br>
> On Thu, Mar 14, 2013 at 3:00 AM, Frank Shearar <<a href="mailto:frank.shearar@gmail.com">frank.shearar@gmail.com</a>><br>
> wrote:<br>
>><br>
>> On 13 March 2013 22:41, Eliot Miranda <<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>> wrote:<br>
>> ><br>
>> ><br>
>> > On Tue, Mar 12, 2013 at 2:13 PM, Nicolas Cellier<br>
>> > <<a href="mailto:nicolas.cellier.aka.nice@gmail.com">nicolas.cellier.aka.nice@gmail.com</a>> wrote:<br>
>> >><br>
>> >> It seems that this one would pass after a Compiler recompileAll, maybe<br>
>> >> we should add some postInstall action somewhere after environments<br>
>> >> changes...<br>
>> ><br>
>> ><br>
>> > Yes, but a simple recompile will result in lots of unbound methods. We<br>
>> > need<br>
>> > to do something more principled that I thought ReleaseBuilder did.<br>
>> > Frank,<br>
>> > you were working on this right?<br>
>><br>
>> Yes, but this is _before_ the ReleaseBuilderFor4dot5 kicks in. The<br>
>> tests are failing in the SqueakTrunk job, and it's only<br>
>> ReleaseSqueakTrunk that does all this (specifically, `Compile<br>
>> recompileAll`). And of course it's a one-way trip;<br>
>> ReleaseSqueakTrunk's artifact isn't fed back into SqueakTrunk. (And it<br>
>> shouldn't, because ReleaseSqueakTrunk is supposed to take an<br>
>> ever-shrinking trunk core and add expected goodies to produce a<br>
>> standard image.)<br>
>><br>
>> Er, unless I miss the point: are you asking if we do any better than<br>
>> `Compiler recompileAll`?<br>
><br>
><br>
> No. I'm saying that if an update causes the need for a recompilation then<br>
> we need to do better than Compiler recompileAll because the naive Compiler<br>
> recompileAll creates lots of unbound methods. We need to follow Compiler<br>
> recompileAll with the relevant release magic to restart processes holding<br>
> onto now obsolete methods etc. So that release magic ought to be in the<br>
> base image as a facility. e.g. Smalltalk recompileAll might be much smarter<br>
> than Compiler recompileAll.<br>
<br>
</div></div>Note that not only processes might point to an unbound CompiledMethod,<br>
every object pointing to a blockClosure does, and that may include<br>
some GUI elements.<br></blockquote><div><br></div><div>Exactly. e.g. in the Squeak4.3 base image:</div><div><br></div><div><div>CompiledMethod allInstances select:</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>[:m|</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>m ~~ thisContext method</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>and: [m methodClass isNil</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>or: [m selector isNil</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>or: [m ~~ (m methodClass >> m selector)]]]]</div><div>=> #()</div></div><div><br></div><div><div>But</div><div><br></div><div>Compiler recompileAll.</div>
<div>Smalltalk garbageCollect.</div><div>((CompiledMethod allInstances select:</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>[:m|</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>m ~~ thisContext method</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>and: [m methodClass isNil</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>or: [m selector isNil</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>or: [m ~~ (m methodClass >> m selector)]]]]) asSortedCollection: [:m1 :m2| m1 methodClass name < m2 methodClass name or: [m1 methodClass = m2 methodClass and: [m1 selector < m2 selector]]]) asArray</div>
<div>=> {(BlockClosure>>#newProcess "a CompiledMethod(3143)") . (BlockClosure>>#on:do: "a CompiledMethod(2372)") . (Compiler>>#evaluate:in:to:notifying:ifFail:logged: "a CompiledMethod(3380)") . (Compiler>>#translate:noPattern:ifFail: "a CompiledMethod(718)") . (Delay class>>#runTimerEventLoop "a CompiledMethod(84)") . (Delay class>>#startTimerEventLoop "a CompiledMethod(3416)") . (EventSensor>>#eventTickler "a CompiledMethod(350)") . (EventSensor>>#installEventTickler "a CompiledMethod(3857)") . (ExternalDropHandler class>>#registerStandardExternalDropHandlers "a CompiledMethod(2523)") . (GradientFillStyle class>>#initPixelRampCache "a CompiledMethod(1023)") . (HandMorph>>#handleEvent: "a CompiledMethod(2487)") . (HandMorph>>#processEvents "a CompiledMethod(3865)") . (HandMorph>>#sendEvent:focus:clear: "a CompiledMethod(3217)") . (HandMorph>>#sendFocusEvent:to:clear: "a CompiledMethod(2182)") . (HandMorph>>#sendKeyboardEvent: "a CompiledMethod(1440)") . (InputSensor>>#installInterruptWatcher "a CompiledMethod(145)") . (InputSensor>>#userInterruptWatcher "a CompiledMethod(2885)") . (KeyboardEvent>>#sentTo: "a CompiledMethod(2261)") . (Morph>>#handleEvent: "a CompiledMethod(2284)") . (Morph>>#handleFocusEvent: "a CompiledMethod(2176)") . (PasteUpMorph>>#becomeActiveDuring: "a CompiledMethod(2232)") . (PasteUpMorph>>#doOneCycle "a CompiledMethod(2078)") . (ProcessBrowser class>>#registerWellKnownProcess:label:allowStop:allowDebug: "a CompiledMethod(3997)") . (ProcessBrowser class>>#registerWellKnownProcesses "a CompiledMethod(1889)") . (ProcessorScheduler class>>#idleProcess "a CompiledMethod(1512)") . (ProcessorScheduler class>>#startUp "a CompiledMethod(2171)") . (Project class>>#spawnNewProcess "a CompiledMethod(510)") . (ScrollBar class>>#createArrowImagesCache "a CompiledMethod(2003)") . (ScrollBar class>>#createBoxImagesCache "a CompiledMethod(2713)") . (SequenceableCollection>>#do: "a CompiledMethod(4002)") . (ServiceAction class>>#id:text:button:description:action: "a CompiledMethod(3545)") . (ServiceAction class>>#text:button:description:action: "a CompiledMethod(2391)") . (ServiceCategory class>>#text:button:description: "a CompiledMethod(3931)") . (ServiceShortcuts class>>#insertPrefShortcut: "a CompiledMethod(3566)") . (SmalltalkImage>>#installLowSpaceWatcher "a CompiledMethod(522)") . (SmalltalkImage>>#lowSpaceWatcher "a CompiledMethod(832)") . (StandardToolSet class>>#codeCompletionAround:textMorph:keyStroke: "a CompiledMethod(1053)") . (TextEditor>>#dispatchOnKeyboardEvent: "a CompiledMethod(3157)") . (TextEditor>>#evaluateSelectionAndDo: "a CompiledMethod(4000)") . (TextEditor>>#keyStroke: "a CompiledMethod(332)") . (TextEditor>>#printIt "a CompiledMethod(815)") . (TextEditor>>#printIt: "a CompiledMethod(1977)") . (TextMorph>>#handleInteraction:fromEvent: "a CompiledMethod(933)") . (TextMorph>>#handleKeystroke: "a CompiledMethod(2806)") . (TextMorph>>#keyStroke: "a CompiledMethod(3260)") . (TextMorphForEditView>>#handleInteraction:fromEvent: "a CompiledMethod(1848)") . (TextMorphForEditView>>#keyStroke: "a CompiledMethod(296)") . (TheWorldMainDockingBar>>#showWelcomeText:label:in: "a CompiledMethod(3390)") . (TheWorldMainDockingBar>>#toggleFullScreenOn: "a CompiledMethod(1194)") . (ToolSet class>>#codeCompletionAround:textMorph:keyStroke: "a CompiledMethod(3438)") . (VariableNode class>>#initialize "a CompiledMethod(2215)") . (Vocabulary class>>#newPublicVocabulary "a CompiledMethod(1353)") . (WeakArray class>>#finalizationProcess "a CompiledMethod(1063)") . (WeakArray class>>#restartFinalizationProcess "a CompiledMethod(3742)") . (WeakRegistry>>#installFinalizer "a CompiledMethod(78)") . (WorldMenuProvider>>#closeTopWindow "a CompiledMethod(2095)") . (WorldMenuProvider>>#createNewService "a CompiledMethod(3640)") . (WorldMenuProvider>>#helpOnServices "a CompiledMethod(2200)") . (WorldMenuProvider>>#nextWindow "a CompiledMethod(2644)") . (WorldMenuProvider>>#preferencesBrowser "a CompiledMethod(2193)") . (WorldMenuProvider>>#rebuildRegistry "a CompiledMethod(2191)") . (WorldMenuProvider>>#servicesBrowser "a CompiledMethod(1893)") . (WorldState>>#doOneCycleFor: "a CompiledMethod(817)") . (WorldState>>#doOneCycleNowFor: "a CompiledMethod(3386)") . (WorldState>>#handsDo: "a CompiledMethod(2792)") . (WorldState>>#stepListSortBlock "a CompiledMethod(2016)")}</div>
</div><div><br></div><div><br></div><div>We want e.g.</div><div><br></div><div><div><span class="Apple-style-span">Smalltalk </span>recompileAll<span class="Apple-style-span">.</span></div><div>(CompiledMethod allInstances select:</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>[:m|</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>m ~~ thisContext method</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>and: [m methodClass isNil</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>or: [m selector isNil</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>or: [m ~~ (m methodClass >> m selector)]]]]</div></div>
<div>=> #()</div><div><br></div><div>But I don't see how to get near this:</div><div>1. lots of GUI stuff can only be cleared by closing windows. Can we export the morphs and bring them back in?</div><div>2. (quite easy) we need to save and restart to restart a number of processes</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="HOEnZb"><font color="#888888"><br>
Nicolas<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
>><br>
>><br>
>> frank<br>
>><br>
>> >><br>
>> >> <a href="http://build.squeak.org/job/SqueakTrunk/223/testReport/Tests.Compiler/MethodHighlightingTests/testMethodHighlighting/" target="_blank">http://build.squeak.org/job/SqueakTrunk/223/testReport/Tests.Compiler/MethodHighlightingTests/testMethodHighlighting/</a><br>
>> >><br>
>> >> Nicolas<br>
>> >><br>
>> ><br>
>> ><br>
>> ><br>
>> > --<br>
>> > best,<br>
>> > Eliot<br>
>> ><br>
>> ><br>
>> ><br>
>><br>
><br>
><br>
><br>
> --<br>
> best,<br>
> Eliot<br>
><br>
><br>
><br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div>