The Trunk: Collections-cmm.803.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Collections-cmm.803.mcz

commits-2
Chris Muller uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-cmm.803.mcz

==================== Summary ====================

Name: Collections-cmm.803
Author: cmm
Time: 26 July 2018, 4:01:33.780963 pm
UUID: d6d9dcd4-56c1-4242-9bf8-18d2caa66516
Ancestors: Collections-dtl.802, Collections-cmm.801

Merge.

=============== Diff against Collections-dtl.802 ===============

Item was changed:
  ----- Method: Text class>>string:runs: (in category 'private') -----
  string: aString runs: anArray
   
+ ^self basicNew setString: aString setRuns: anArray!
- ^self basicNew setString: aString setRunsChecking: anArray!

Item was changed:
  ----- Method: Text>>setString:setRunsChecking: (in category 'private') -----
  setString: aString setRunsChecking: aRunArray
+ "Check runs and do the best you can to make them fit..."
+
- | stringSize runsSize |
  string := aString.
+ "check the runs"
  aRunArray ifNil: [^ aString asText].
+ (aRunArray isKindOf: RunArray) ifFalse: [^ aString asText].
+ aRunArray runs size = aRunArray values size ifFalse: [^ aString asText].
+ aRunArray size = aString size ifFalse: [^ aString asText].
 
+ runs := aRunArray.!
- "Check runs and do the best you can to make them fit..."
- aRunArray runs size = aRunArray values size ifFalse: [^ aString asText]. "raise error here?"
- runsSize := aRunArray size.
- stringSize := string size.
- runs := stringSize = runsSize
- ifTrue: [aRunArray]
- ifFalse: [ stringSize > runsSize
- ifTrue: [aRunArray  addLast: {} times: stringSize - runsSize]
- ifFalse: [aRunArray copyFrom: 1 to: stringSize]].!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Collections-cmm.803.mcz

Chris Muller-3
Woops.  LOL!

Deleted.

On Thu, Jul 26, 2018 at 4:01 PM,  <[hidden email]> wrote:

> Chris Muller uploaded a new version of Collections to project The Trunk:
> http://source.squeak.org/trunk/Collections-cmm.803.mcz
>
> ==================== Summary ====================
>
> Name: Collections-cmm.803
> Author: cmm
> Time: 26 July 2018, 4:01:33.780963 pm
> UUID: d6d9dcd4-56c1-4242-9bf8-18d2caa66516
> Ancestors: Collections-dtl.802, Collections-cmm.801
>
> Merge.
>
> =============== Diff against Collections-dtl.802 ===============
>
> Item was changed:
>   ----- Method: Text class>>string:runs: (in category 'private') -----
>   string: aString runs: anArray
>
> +       ^self basicNew setString: aString setRuns: anArray!
> -       ^self basicNew setString: aString setRunsChecking: anArray!
>
> Item was changed:
>   ----- Method: Text>>setString:setRunsChecking: (in category 'private') -----
>   setString: aString setRunsChecking: aRunArray
> +       "Check runs and do the best you can to make them fit..."
> +
> -       | stringSize runsSize |
>         string := aString.
> +       "check the runs"
>         aRunArray ifNil: [^ aString asText].
> +       (aRunArray isKindOf: RunArray) ifFalse: [^ aString asText].
> +       aRunArray runs size = aRunArray values size ifFalse: [^ aString asText].
> +       aRunArray size = aString size ifFalse: [^ aString asText].
>
> +       runs := aRunArray.!
> -       "Check runs and do the best you can to make them fit..."
> -       aRunArray runs size = aRunArray values size ifFalse: [^ aString asText]. "raise error here?"
> -       runsSize := aRunArray size.
> -       stringSize := string size.
> -       runs := stringSize = runsSize
> -                               ifTrue: [aRunArray]
> -                               ifFalse: [ stringSize > runsSize
> -                                               ifTrue: [aRunArray  addLast: {} times: stringSize - runsSize]
> -                                               ifFalse: [aRunArray copyFrom: 1 to: stringSize]].!
>
>