[squeak-dev] The Trunk: Kernel-bf.730.mcz

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Fri Jan 11 21:39:11 UTC 2013


2013/1/11 Bert Freudenberg <bert at freudenbergs.de>:
>
> On 11.01.2013, at 12:37, Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com> wrote:
>
>> Having to spread these cacheDuring: all around client code does not
>> sound bright to my personal taste...
>>
>> Nicolas
>
> Agreed, but it's all we have for now.  Got a better idea?
>
> - Bert -
>

Nothing yet, It would be in the inbox ;)

>>
>> 2013/1/11  <commits at source.squeak.org>:
>>> Bert Freudenberg uploaded a new version of Kernel to project The Trunk:
>>> http://source.squeak.org/trunk/Kernel-bf.730.mcz
>>>
>>> ==================== Summary ====================
>>>
>>> Name: Kernel-bf.730
>>> Author: bf
>>> Time: 11 January 2013, 12:10:54.539 pm
>>> UUID: 287d829c-b04d-4165-abc5-e045d037bd6d
>>> Ancestors: Kernel-nice.729
>>>
>>> Cache source files during class mutation for noticeable speedup with larger hierarchies.
>>>
>>> =============== Diff against Kernel-nice.729 ===============
>>>
>>> Item was changed:
>>>  ----- Method: ClassBuilder>>recompile:from:to:mutate: (in category 'class definition') -----
>>>  recompile: force from: oldClass to: newClass mutate: forceMutation
>>>        "Do the necessary recompilation after changine oldClass to newClass.
>>>        If required (e.g., when oldClass ~~ newClass) mutate oldClass to newClass
>>>        and all its subclasses. If forceMutation is true force a mutation even
>>>        if oldClass and newClass are the same."
>>>
>>>        oldClass == nil ifTrue:[^ newClass].
>>>
>>>        (newClass == oldClass and:[force not and:[forceMutation not]]) ifTrue:[
>>>                ^newClass].
>>>
>>>        currentClassIndex := 0.
>>>        maxClassIndex := oldClass withAllSubclasses size.
>>>
>>>        (oldClass == newClass and:[forceMutation not]) ifTrue:[
>>>                "Recompile from newClass without mutating"
>>>                self informUserDuring:[
>>>                        newClass isSystemDefined ifFalse:[progress := nil].
>>> +                       CurrentReadOnlySourceFiles cacheDuring: [
>>> +                               newClass withAllSubclassesDo:[:cl|
>>> +                                       self showProgressFor: cl.
>>> +                                       cl compileAll]]].
>>> -                       newClass withAllSubclassesDo:[:cl|
>>> -                               self showProgressFor: cl.
>>> -                               cl compileAll]].
>>>                ^newClass].
>>>        "Recompile and mutate oldClass to newClass"
>>>        self informUserDuring:[
>>>                newClass isSystemDefined ifFalse:[progress := nil].
>>> +               CurrentReadOnlySourceFiles cacheDuring: [
>>> +                       self mutate: oldClass to: newClass].
>>> -               self mutate: oldClass to: newClass.
>>>        ].
>>>        ^oldClass "now mutated to newClass"!
>>>
>>>
>>
>
>


More information about the Squeak-dev mailing list