Skip to content

Commit ef0bacc

Browse files
authored
Merge pull request #16 from marschall/sync-2016-08-25
Sync 2016-08-25
2 parents 70f0154 + 05383e1 commit ef0bacc

File tree

98 files changed

+438
-116
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+438
-116
lines changed

.travis.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
language: smalltalk
22
sudo: false
33
smalltalk:
4+
- Pharo-6.0
45
- Pharo-5.0
56
- Pharo-4.0
67
- Pharo-3.0
7-
- Squeak-4.5
8+
- Squeak-5.1
89
- Squeak-5.0
10+
- Squeak-4.6
11+
- Squeak-4.5
912
- GemStone-3.1.0.6
1013
- GemStone-3.2.12
1114
- GemStone-3.3.0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
accessing
1+
adding
22
add: anAssociation
33
self privateAt: anAssociation key put: anAssociation value.
44
^ anAssociation
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
adding
2+
addAll: aDictionary
3+
aDictionary keysAndValuesDo: [ :key :value |
4+
self privateAt: key put: value ].
5+
^ aDictionary
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
accessing
22
allAt: aKey
3-
^ Array streamContents: [ :stream |
4-
1 to: size do: [ :index |
5-
(keys at: index) = aKey
6-
ifTrue: [ stream nextPut: (values at: index) ] ] ]
3+
^ self privateAllAt: aKey startingAt: 1

repository/Grease-Core.package/GROrderedMultiMap.class/instance/at.add..st

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
accessing
1+
adding
22
at: aKey add: aValue
33
"Add an association between aKey and aValue. Do not replace existing
44
values with the same key."
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
enumerating
2+
keysAndAllValuesDo: aTwoArgumentBlock
3+
| seenKeys |
4+
seenKeys := GRSmallOrderedSet new.
5+
1 to: size * 2 - 1 by: 2 do: [ :index |
6+
| key |
7+
key := table at: index.
8+
(seenKeys includes: key) ifFalse: [
9+
aTwoArgumentBlock
10+
value: key
11+
value: (self privateAllAt: key startingAt: index).
12+
seenKeys add: key ] ]
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
private
2+
privateAllAt: aKey startingAt: index
3+
^ Array new: 2 streamContents: [ :stream |
4+
index to: size * 2 - 1 by: 2 do: [ :i |
5+
(table at: i) = aKey
6+
ifTrue: [ stream nextPut: (table at: i + 1) ] ] ]

repository/Grease-Core.package/GROrderedMultiMap.class/instance/removeKey.ifAbsent..st

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
accessing
1+
removing
22
removeKey: aKey ifAbsent: aBlock
33
"Remove aKey from the receiver, evaluate aBlock if the element is missing."
44

55
"This is inefficient and could be optimized."
66
| removed |
7-
removed := Array streamContents: [ :stream |
7+
removed := Array new: 2 streamContents: [ :stream |
88
| index |
99
[ (index := self findIndexFor: aKey) = 0 ] whileFalse: [
1010
stream nextPut: (self removeIndex: index) ] ].

repository/Grease-Core.package/GROrderedMultiMap.class/methodProperties.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
},
44
"instance" : {
55
"add:" : "lr 7/25/2011 19:52",
6-
"allAt:" : "jf 2/15/2010 15:39",
6+
"addAll:" : "pmm 8/25/2016 12:32",
7+
"allAt:" : "pmm 8/25/2016 15:09",
78
"allAt:ifAbsent:" : "jf 2/15/2010 15:39",
89
"at:add:" : "jf 2/15/2010 13:24",
9-
"removeKey:ifAbsent:" : "jf 2/15/2010 14:43" } }
10+
"keysAndAllValuesDo:" : "pmm 8/25/2016 15:12",
11+
"privateAllAt:startingAt:" : "pmm 8/25/2016 15:08",
12+
"removeKey:ifAbsent:" : "pmm 8/22/2016 12:10" } }

repository/Grease-Core.package/GRPackage.class/instance/resolveWith..st

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,8 @@ resolveWith: aDictionary
1313
aDictionary at: (each copyReplaceAll: '-Pharo-' with: '-Pharo40-') ifAbsent: [
1414
"try -Pharo50-"
1515
aDictionary at: (each copyReplaceAll: '-Pharo-' with: '-Pharo50-') ifAbsent: [
16-
self error: self name printString , ' depends on unknown package ' , each printString ] ] ] ] ] ] ]
16+
"try -Squeak-"
17+
aDictionary at: (each copyReplaceAll: '-Pharo-' with: '-Squeak-') ifAbsent: [
18+
"try -Squeak5-"
19+
aDictionary at: (each copyReplaceAll: '-Pharo-' with: '-Squeak5-') ifAbsent: [
20+
self error: self name printString , ' depends on unknown package ' , each printString ] ] ] ] ] ] ] ] ]

0 commit comments

Comments
 (0)