[squeak-dev] The Trunk: Tools-mt.643.mcz

Chris Muller asqueaker at gmail.com
Wed Oct 21 14:44:17 UTC 2015


Does this not render the code below the ifTrue:ifFalse: unreachable?
It looks like a unconditional return, which should be factored out to
the outer level (which would allow the Compiler would be able to tell
you..)..

On Wed, Oct 21, 2015 at 2:33 AM,  <commits at source.squeak.org> wrote:
> Marcel Taeumel uploaded a new version of Tools to project The Trunk:
> http://source.squeak.org/trunk/Tools-mt.643.mcz
>
> ==================== Summary ====================
>
> Name: Tools-mt.643
> Author: mt
> Time: 21 October 2015, 9:32:57.533 am
> UUID: bab4a899-da58-a849-893a-e974390d7253
> Ancestors: Tools-cmm.642
>
> If there is nothing to pretty-diff, show at least the pretty-printed version of the code to avoid confusion.
>
> =============== Diff against Tools-cmm.642 ===============
>
> Item was changed:
>   ----- Method: ChangeList>>diffedVersionContents (in category 'viewing access') -----
>   diffedVersionContents
>         "Answer diffed version contents, maybe pretty maybe not"
>
>         | change class earlier later |
>         (listIndex = 0
>                         or: [changeList size < listIndex])
>                 ifTrue: [^ ''].
>         change := changeList at: listIndex.
>         later := change text.
>         class := change methodClass.
>         (listIndex == changeList size or: [class == nil])
> +               ifTrue: [^ (self showingPrettyDiffs and: [class notNil])
> +                       ifTrue: [class prettyPrinterClass format: later in: class notifying: nil]
> +                       ifFalse: [later]].
> -               ifTrue: [^ later].
>
>         earlier := (changeList at: listIndex + 1) text.
>
>         ^ TextDiffBuilder buildDisplayPatchFrom: earlier to: later inClass: class prettyDiffs: self showingPrettyDiffs!
>
>


More information about the Squeak-dev mailing list