[squeak-dev] The Trunk: Monticello-cmm.573.mcz

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Wed Dec 18 17:26:54 UTC 2013


2013/12/18 Chris Muller <asqueaker at gmail.com>

> This was the change I made to "suspend" RecentMessages when loading
> packages but, at the time, it created a VM crash during trunk update
> due to class shape-change while on the stack.
>
> So, we rolled back the #suspendWhile: [...] in this method, but we
> still have the new isSuspended instVar which is now unused.
>
> But I just noticed we never put the suspendWhile: back, and yet,
> somehow, SystemChangeNotifier is no  longer notifying RecentMessages
> of loaded methods.
>
> It's not immediately obvious to me why.  Is this related to your
> logging API work Nicolas?
>

No, I just changed the implementation, not the behavior.
It will be easier to move logging support out of Compiler when we want to,
but it's not yet done.


>
>
> On Thu, Oct 3, 2013 at 4:40 PM,  <commits at source.squeak.org> wrote:
> > Chris Muller uploaded a new version of Monticello to project The Trunk:
> > http://source.squeak.org/trunk/Monticello-cmm.573.mcz
> >
> > ==================== Summary ====================
> >
> > Name: Monticello-cmm.573
> > Author: cmm
> > Time: 3 October 2013, 4:39:53.815 pm
> > UUID: c3383883-707a-4bc1-b3ea-3b2ca97053d7
> > Ancestors: Monticello-fbs.572
> >
> > - Factor out cacheAllFilenames and flushAllFilenames to support
> special-case caching.
> > - Stop obliterating Recent Messages when loading MC packages.
> >
> > =============== Diff against Monticello-fbs.572 ===============
> >
> > Item was changed:
> >   ----- Method: MCFileBasedRepository>>cacheAllFileNamesDuring: (in
> category 'private') -----
> > + cacheAllFileNamesDuring: aBlock
> > - cacheAllFileNamesDuring: aBlock
> >         "Cache the result of #allFileNames and #allVersionNames during
> aBlock"
> > +       allFileNamesCache ifNotNil: [ ^ aBlock value ].
> > +       self cacheAllFilenames.
> > +       ^ aBlock ensure: [ self flushAllFilenames ]!
> > -
> > -       allFileNamesCache ifNotNil: [ ^aBlock value ].
> > -       allFileNamesCache := self allFileNames.
> > -       allVersionNamesCache := self allVersionNames.
> > -       ^aBlock ensure: [ allFileNamesCache := allVersionNamesCache :=
> nil ]!
> >
> > Item was added:
> > + ----- Method: MCFileBasedRepository>>cacheAllFilenames (in category
> 'private') -----
> > + cacheAllFilenames
> > +       allFileNamesCache ifNil:
> > +               [ allFileNamesCache := self allFileNames.
> > +               allVersionNamesCache := self allVersionNames ]!
> >
> > Item was added:
> > + ----- Method: MCFileBasedRepository>>flushAllFilenames (in category
> 'private') -----
> > + flushAllFilenames
> > +       allFileNamesCache := allVersionNamesCache := nil!
> >
> > Item was changed:
> >   ----- Method: MCFileBasedRepository>>flushCache (in category
> 'private') -----
> >   flushCache
> > +       self flushAllFilenames.
> > +       cache := nil!
> > -
> > -       cache := allFileNamesCache := allVersionNamesCache := nil!
> >
> > Item was changed:
> >   ----- Method: MCPackageLoader>>basicLoad (in category 'private') -----
> >   basicLoad
> >         "Load the contents of some package. This is the core loading
> method
> >         in Monticello. Be wary about modifying it unless you understand
> the details
> >         and dependencies of the various entities being modified."
> >         | pkgName |
> >         errorDefinitions := OrderedCollection new.
> >         "Obviously this isn't the package name but we don't have
> anything else
> >         to use here. ChangeSet current name will generally work since a
> CS is
> >         usually installed prior to installation."
> >         pkgName := ChangeSet current name.
> >         preamble ifNotNil: [ChangeSet current preambleString: (self
> preambleAsCommentNamed: pkgName)].
> >
> > + RecentMessages default suspendWhile: [
> >         [CurrentReadOnlySourceFiles cacheDuring: [[
> >         "Pass 1: Load everything but the methods,  which are collected
> in methodAdditions."
> >         additions do: [:ea |
> >                 ea isMethodDefinition
> >                         ifTrue:[methodAdditions add: ea asMethodAddition]
> >                         ifFalse:[[ea load]on: Error do:
> [errorDefinitions add: ea]].
> >         ] displayingProgress: 'Reshaping ', pkgName.
> >
> >         "Try again any delayed definitions"
> >         self shouldWarnAboutErrors ifTrue: [self warnAboutErrors].
> >         errorDefinitions do: [:ea | ea load]
> >                 displayingProgress: 'Reloading ', pkgName.
> >
> >         "Pass 2: We compile new / changed methods"
> >         methodAdditions do:[:ea| ea createCompiledMethod]
> >                 displayingProgress: 'Compiling ', pkgName.
> >
> >         'Installing ', pkgName displayProgressFrom: 0 to: 2 during:[:bar|
> >                 "There is no progress *during* installation since a
> progress bar update
> >                 will redraw the world and potentially call methods that
> we're just trying to install."
> >                 bar value: 1.
> >
> >                 "Pass 3: Install the new / changed methods
> >                 (this is a separate pass to allow compiler changes to be
> loaded)"
> >                 methodAdditions do:[:ea| ea installMethod].
> >
> >                 "Pass 4: Remove the obsolete methods"
> >                 removals do:[:ea| ea unload].
> >         ].
> >
> >         "Finally, notify observers for the method additions"
> >         methodAdditions do: [:each | each notifyObservers]
> >                 "the message is fake but actually telling people how
> much time we spend
> >                 in the notifications is embarrassing so lie instead"
> >                 displayingProgress: 'Installing ', pkgName.
> >
> >         additions do: [:ea | ea postloadOver: (self obsoletionFor: ea)]
> >                 displayingProgress: 'Initializing ', pkgName.
> >
> >         ] on: InMidstOfFileinNotification do: [:n | n resume: true]
> > +       ]] ensure: [self flushChangesFile]
> > + ]!
> > -       ]] ensure: [self flushChangesFile]!
> >
> > Item was added:
> > + ----- Method: MCRepository>>cacheAllFilenames (in category 'private')
> -----
> > + cacheAllFilenames
> > +       "No-op by default.  Subclasses override for performance."!
> >
> > Item was added:
> > + ----- Method: MCRepository>>flushAllFilenames (in category 'private')
> -----
> > + flushAllFilenames
> > +       "No-op.  Subclasses override if necessary."!
> >
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20131218/db7cf31b/attachment.htm


More information about the Squeak-dev mailing list