<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">2013/12/18 Chris Muller <span dir="ltr"><<a href="mailto:asqueaker@gmail.com" target="_blank">asqueaker@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
This was the change I made to "suspend" RecentMessages when loading<br>
packages but, at the time, it created a VM crash during trunk update<br>
due to class shape-change while on the stack.<br>
<br>
So, we rolled back the #suspendWhile: [...] in this method, but we<br>
still have the new isSuspended instVar which is now unused.<br>
<br>
But I just noticed we never put the suspendWhile: back, and yet,<br>
somehow, SystemChangeNotifier is no longer notifying RecentMessages<br>
of loaded methods.<br>
<br>
It's not immediately obvious to me why. Is this related to your<br>
logging API work Nicolas?<br></blockquote><div><br></div><div>No, I just changed the implementation, not the behavior.<br></div><div>It will be easier to move logging support out of Compiler when we want to, but it's not yet done.<br>
<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
On Thu, Oct 3, 2013 at 4:40 PM, <<a href="mailto:commits@source.squeak.org">commits@source.squeak.org</a>> wrote:<br>
> Chris Muller uploaded a new version of Monticello to project The Trunk:<br>
> <a href="http://source.squeak.org/trunk/Monticello-cmm.573.mcz" target="_blank">http://source.squeak.org/trunk/Monticello-cmm.573.mcz</a><br>
><br>
> ==================== Summary ====================<br>
><br>
> Name: Monticello-cmm.573<br>
> Author: cmm<br>
> Time: 3 October 2013, 4:39:53.815 pm<br>
> UUID: c3383883-707a-4bc1-b3ea-3b2ca97053d7<br>
> Ancestors: Monticello-fbs.572<br>
><br>
> - Factor out cacheAllFilenames and flushAllFilenames to support special-case caching.<br>
> - Stop obliterating Recent Messages when loading MC packages.<br>
><br>
> =============== Diff against Monticello-fbs.572 ===============<br>
><br>
> Item was changed:<br>
> ----- Method: MCFileBasedRepository>>cacheAllFileNamesDuring: (in category 'private') -----<br>
> + cacheAllFileNamesDuring: aBlock<br>
> - cacheAllFileNamesDuring: aBlock<br>
> "Cache the result of #allFileNames and #allVersionNames during aBlock"<br>
> + allFileNamesCache ifNotNil: [ ^ aBlock value ].<br>
> + self cacheAllFilenames.<br>
> + ^ aBlock ensure: [ self flushAllFilenames ]!<br>
> -<br>
> - allFileNamesCache ifNotNil: [ ^aBlock value ].<br>
> - allFileNamesCache := self allFileNames.<br>
> - allVersionNamesCache := self allVersionNames.<br>
> - ^aBlock ensure: [ allFileNamesCache := allVersionNamesCache := nil ]!<br>
><br>
> Item was added:<br>
> + ----- Method: MCFileBasedRepository>>cacheAllFilenames (in category 'private') -----<br>
> + cacheAllFilenames<br>
> + allFileNamesCache ifNil:<br>
> + [ allFileNamesCache := self allFileNames.<br>
> + allVersionNamesCache := self allVersionNames ]!<br>
><br>
> Item was added:<br>
> + ----- Method: MCFileBasedRepository>>flushAllFilenames (in category 'private') -----<br>
> + flushAllFilenames<br>
> + allFileNamesCache := allVersionNamesCache := nil!<br>
><br>
> Item was changed:<br>
> ----- Method: MCFileBasedRepository>>flushCache (in category 'private') -----<br>
> flushCache<br>
> + self flushAllFilenames.<br>
> + cache := nil!<br>
> -<br>
> - cache := allFileNamesCache := allVersionNamesCache := nil!<br>
><br>
> Item was changed:<br>
> ----- Method: MCPackageLoader>>basicLoad (in category 'private') -----<br>
> basicLoad<br>
> "Load the contents of some package. This is the core loading method<br>
> in Monticello. Be wary about modifying it unless you understand the details<br>
> and dependencies of the various entities being modified."<br>
> | pkgName |<br>
> errorDefinitions := OrderedCollection new.<br>
> "Obviously this isn't the package name but we don't have anything else<br>
> to use here. ChangeSet current name will generally work since a CS is<br>
> usually installed prior to installation."<br>
> pkgName := ChangeSet current name.<br>
> preamble ifNotNil: [ChangeSet current preambleString: (self preambleAsCommentNamed: pkgName)].<br>
><br>
> + RecentMessages default suspendWhile: [<br>
> [CurrentReadOnlySourceFiles cacheDuring: [[<br>
> "Pass 1: Load everything but the methods, which are collected in methodAdditions."<br>
> additions do: [:ea |<br>
> ea isMethodDefinition<br>
> ifTrue:[methodAdditions add: ea asMethodAddition]<br>
> ifFalse:[[ea load]on: Error do: [errorDefinitions add: ea]].<br>
> ] displayingProgress: 'Reshaping ', pkgName.<br>
><br>
> "Try again any delayed definitions"<br>
> self shouldWarnAboutErrors ifTrue: [self warnAboutErrors].<br>
> errorDefinitions do: [:ea | ea load]<br>
> displayingProgress: 'Reloading ', pkgName.<br>
><br>
> "Pass 2: We compile new / changed methods"<br>
> methodAdditions do:[:ea| ea createCompiledMethod]<br>
> displayingProgress: 'Compiling ', pkgName.<br>
><br>
> 'Installing ', pkgName displayProgressFrom: 0 to: 2 during:[:bar|<br>
> "There is no progress *during* installation since a progress bar update<br>
> will redraw the world and potentially call methods that we're just trying to install."<br>
> bar value: 1.<br>
><br>
> "Pass 3: Install the new / changed methods<br>
> (this is a separate pass to allow compiler changes to be loaded)"<br>
> methodAdditions do:[:ea| ea installMethod].<br>
><br>
> "Pass 4: Remove the obsolete methods"<br>
> removals do:[:ea| ea unload].<br>
> ].<br>
><br>
> "Finally, notify observers for the method additions"<br>
> methodAdditions do: [:each | each notifyObservers]<br>
> "the message is fake but actually telling people how much time we spend<br>
> in the notifications is embarrassing so lie instead"<br>
> displayingProgress: 'Installing ', pkgName.<br>
><br>
> additions do: [:ea | ea postloadOver: (self obsoletionFor: ea)]<br>
> displayingProgress: 'Initializing ', pkgName.<br>
><br>
> ] on: InMidstOfFileinNotification do: [:n | n resume: true]<br>
> + ]] ensure: [self flushChangesFile]<br>
> + ]!<br>
> - ]] ensure: [self flushChangesFile]!<br>
><br>
> Item was added:<br>
> + ----- Method: MCRepository>>cacheAllFilenames (in category 'private') -----<br>
> + cacheAllFilenames<br>
> + "No-op by default. Subclasses override for performance."!<br>
><br>
> Item was added:<br>
> + ----- Method: MCRepository>>flushAllFilenames (in category 'private') -----<br>
> + flushAllFilenames<br>
> + "No-op. Subclasses override if necessary."!<br>
><br>
><br>
<br>
</blockquote></div><br></div></div>