Eliot Miranda uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-eem.739.mcz
==================== Summary ====================
Name: System-eem.739
Author: eem
Time: 29 May 2015, 4:06:02.935 pm
UUID: 0b6049b8-02b1-4f6e-97eb-8776c9604f3e
Ancestors: System-cmm.738
Support for condensing sources and changes while
preserving direct history.
=============== Diff against System-cmm.738 ===============
Item was added:
+ ----- Method: ChangeRecord>>file (in category 'access') -----
+ file
+ ^file!
Item was added:
+ ----- Method: ChangeRecord>>position: (in category 'access') -----
+ position: anInteger
+ "Set the position. Dangerous!! Used in condenseChanges implementation by a very knowledgeable client!!"
+ position := anInteger!
Item was added:
+ ----- Method: ChangeSet class>>directAncestryOfVersions: (in category 'scanning') -----
+ directAncestryOfVersions: changeRecords
+ "Take a sequence of ChangeRecords as answered by scanVersionsOf:class:meta:category:selector:
+ and answer a filtered subsequence consisting only of direct ancestors. For example, if the input is
+ eem 7/7/2009 20:06 7 July 2009 8:06 pm
+ eem 6/18/2009 19:21 18 June 2009 7:21 pm
+ eem 5/5/2009 12:16 5 May 2009 12:16 pm
+ eem 6/18/2009 19:19 18 June 2009 7:19 pm
+ eem 6/18/2009 18:57 18 June 2009 6:57 pm
+ eem 5/5/2009 12:16 5 May 2009 12:16 pm
+ eem 6/18/2009 18:17 18 June 2009 6:17 pm
+ eem 6/18/2009 18:14 18 June 2009 6:14 pm
+ eem 6/18/2009 18:06 18 June 2009 6:06 pm
+ eem 5/5/2009 12:16 5 May 2009 12:16 pm
+ eem 5/4/2009 19:19 4 May 2009 7:19 pm
+ the output should be
+ eem 7/7/2009 20:06 7 July 2009 8:06 pm
+ eem 6/18/2009 19:21 18 June 2009 7:21 pm
+ eem 5/5/2009 12:16 5 May 2009 12:16 pm
+ eem 5/4/2009 19:19 4 May 2009 7:19 pm"
+
+ | filtered i last |
+ filtered := OrderedCollection new.
+ i := 1.
+ [i <= changeRecords size] whileTrue:
+ [filtered addLast: (changeRecords at: i).
+ last := changeRecords
+ findLast: [:chgRec| filtered last stamp = chgRec stamp and: [filtered last position = chgRec position]]
+ startingAt: i.
+ i := last = 0 ifTrue: [i + 1] ifFalse: [last + 1]].
+ ^filtered!
Eliot Miranda uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-eem.739.mcz
==================== Summary ====================
Name: System-eem.739
Author: eem
Time: 29 May 2015, 4:06:02.935 pm
UUID: 0b6049b8-02b1-4f6e-97eb-8776c9604f3e
Ancestors: System-cmm.738
Support for condensing sources and changes while
preserving direct history.
=============== Diff against System-cmm.738 ===============
Item was added:
+ ----- Method: ChangeRecord>>file (in category 'access') -----
+ file
+ ^file!
Item was added:
+ ----- Method: ChangeRecord>>position: (in category 'access') -----
+ position: anInteger
+ "Set the position. Dangerous!! Used in condenseChanges implementation by a very knowledgeable client!!"
+ position := anInteger!
Item was added:
+ ----- Method: ChangeSet class>>directAncestryOfVersions: (in category 'scanning') -----
+ directAncestryOfVersions: changeRecords
+ "Take a sequence of ChangeRecords as answered by scanVersionsOf:class:meta:category:selector:
+ and answer a filtered subsequence consisting only of direct ancestors. For example, if the input is
+ eem 7/7/2009 20:06 7 July 2009 8:06 pm
+ eem 6/18/2009 19:21 18 June 2009 7:21 pm
+ eem 5/5/2009 12:16 5 May 2009 12:16 pm
+ eem 6/18/2009 19:19 18 June 2009 7:19 pm
+ eem 6/18/2009 18:57 18 June 2009 6:57 pm
+ eem 5/5/2009 12:16 5 May 2009 12:16 pm
+ eem 6/18/2009 18:17 18 June 2009 6:17 pm
+ eem 6/18/2009 18:14 18 June 2009 6:14 pm
+ eem 6/18/2009 18:06 18 June 2009 6:06 pm
+ eem 5/5/2009 12:16 5 May 2009 12:16 pm
+ eem 5/4/2009 19:19 4 May 2009 7:19 pm
+ the output should be
+ eem 7/7/2009 20:06 7 July 2009 8:06 pm
+ eem 6/18/2009 19:21 18 June 2009 7:21 pm
+ eem 5/5/2009 12:16 5 May 2009 12:16 pm
+ eem 5/4/2009 19:19 4 May 2009 7:19 pm"
+
+ | filtered i last |
+ filtered := OrderedCollection new.
+ i := 1.
+ [i <= changeRecords size] whileTrue:
+ [filtered addLast: (changeRecords at: i).
+ last := changeRecords
+ findLast: [:chgRec| filtered last stamp = chgRec stamp and: [filtered last position = chgRec position]]
+ startingAt: i.
+ i := last = 0 ifTrue: [i + 1] ifFalse: [last + 1]].
+ ^filtered!
Eliot Miranda uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-eem.636.mcz
==================== Summary ====================
Name: Collections-eem.636
Author: eem
Time: 29 May 2015, 4:03:27.101 pm
UUID: 0ccecc27-ca23-41aa-be79-584dbc53e4d0
Ancestors: Collections-mt.635
findLast:startingAt: dual for findFirst:startingAt:
=============== Diff against Collections-mt.635 ===============
Item was added:
+ ----- Method: SequenceableCollection>>findLast:startingAt: (in category 'enumerating') -----
+ findLast: aBlock startingAt: i
+ "Return the index of my last element with index >= i for which aBlock evaluates as true."
+
+ | index |
+ index := self size + 1.
+ [(index := index - 1) >= i] whileTrue:
+ [(aBlock value: (self at: index)) ifTrue: [^index]].
+ ^ 0!
Eliot Miranda uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-eem.636.mcz
==================== Summary ====================
Name: Collections-eem.636
Author: eem
Time: 29 May 2015, 4:03:27.101 pm
UUID: 0ccecc27-ca23-41aa-be79-584dbc53e4d0
Ancestors: Collections-mt.635
findLast:startingAt: dual for findFirst:startingAt:
=============== Diff against Collections-mt.635 ===============
Item was added:
+ ----- Method: SequenceableCollection>>findLast:startingAt: (in category 'enumerating') -----
+ findLast: aBlock startingAt: i
+ "Return the index of my last element with index >= i for which aBlock evaluates as true."
+
+ | index |
+ index := self size + 1.
+ [(index := index - 1) >= i] whileTrue:
+ [(aBlock value: (self at: index)) ifTrue: [^index]].
+ ^ 0!
Eliot Miranda uploaded a new version of Compiler to project The Trunk:
http://source.squeak.org/trunk/Compiler-eem.300.mcz
==================== Summary ====================
Name: Compiler-eem.300
Author: eem
Time: 29 May 2015, 3:31:40.184 pm
UUID: 538f90f4-71d3-4f00-ac34-348700471a82
Ancestors: Compiler-eem.299
Use the size/emitPushNClosureTemps: api in
block generation.
=============== Diff against Compiler-eem.299 ===============
Item was changed:
----- Method: BlockNode>>emitCodeForEvaluatedClosureValue:encoder: (in category 'code generation (closures)') -----
emitCodeForEvaluatedClosureValue: stack encoder: encoder
| position |
position := stack position.
stack position: arguments size + copiedValues size.
+ encoder genPushNClosureTemps: temporaries size.
- temporaries size timesRepeat:
- [NodeNil emitCodeForValue: stack encoder: encoder].
self
reindexingLocalsDo: [self emitCodeForEvaluatedValue: stack encoder: encoder]
encoder: encoder.
self returns ifFalse:
[encoder genReturnTopToCaller.
pc := encoder methodStreamPosition].
stack position: position!
Item was changed:
----- Method: BlockNode>>sizeCodeForEvaluatedClosureValue: (in category 'code generation (closures)') -----
sizeCodeForEvaluatedClosureValue: encoder
"The closure value primitives push the arguments and the copied values.
The compiler guarantees that any copied values come before all local temps.
So on closure activation we only need to push nils for the remaining temporaries."
+ ^(encoder sizePushNClosureTemps: temporaries size)
- ^temporaries size * (NodeNil sizeCodeForValue: encoder)
+ (self
reindexingLocalsDo: [self sizeCodeForEvaluatedValue: encoder]
encoder: nil "don't store temps yet")
+ (self returns ifTrue: [0] ifFalse: [encoder sizeReturnTopToCaller])!
Eliot Miranda uploaded a new version of Compiler to project The Trunk:
http://source.squeak.org/trunk/Compiler-eem.300.mcz
==================== Summary ====================
Name: Compiler-eem.300
Author: eem
Time: 29 May 2015, 3:31:40.184 pm
UUID: 538f90f4-71d3-4f00-ac34-348700471a82
Ancestors: Compiler-eem.299
Use the size/emitPushNClosureTemps: api in
block generation.
=============== Diff against Compiler-eem.299 ===============
Item was changed:
----- Method: BlockNode>>emitCodeForEvaluatedClosureValue:encoder: (in category 'code generation (closures)') -----
emitCodeForEvaluatedClosureValue: stack encoder: encoder
| position |
position := stack position.
stack position: arguments size + copiedValues size.
+ encoder genPushNClosureTemps: temporaries size.
- temporaries size timesRepeat:
- [NodeNil emitCodeForValue: stack encoder: encoder].
self
reindexingLocalsDo: [self emitCodeForEvaluatedValue: stack encoder: encoder]
encoder: encoder.
self returns ifFalse:
[encoder genReturnTopToCaller.
pc := encoder methodStreamPosition].
stack position: position!
Item was changed:
----- Method: BlockNode>>sizeCodeForEvaluatedClosureValue: (in category 'code generation (closures)') -----
sizeCodeForEvaluatedClosureValue: encoder
"The closure value primitives push the arguments and the copied values.
The compiler guarantees that any copied values come before all local temps.
So on closure activation we only need to push nils for the remaining temporaries."
+ ^(encoder sizePushNClosureTemps: temporaries size)
- ^temporaries size * (NodeNil sizeCodeForValue: encoder)
+ (self
reindexingLocalsDo: [self sizeCodeForEvaluatedValue: encoder]
encoder: nil "don't store temps yet")
+ (self returns ifTrue: [0] ifFalse: [encoder sizeReturnTopToCaller])!