소스 검색

adds Array >> #addFirst:

Nicolas Petton 11 년 전
부모
커밋
447224770b
3개의 변경된 파일103개의 추가작업 그리고 72개의 파일을 삭제
  1. 47 36
      js/Kernel-Collections.deploy.js
  2. 52 36
      js/Kernel-Collections.js
  3. 4 0
      st/Kernel-Collections.st

+ 47 - 36
js/Kernel-Collections.deploy.js

@@ -16,7 +16,7 @@ return _st(self._value()).__eq(_st(anAssociation)._value());
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"=",{anAssociation:anAssociation},smalltalk.Association)})},
-messageSends: ["and:", "=", "value", "key", "class"]}),
+messageSends: ["and:", "=", "class", "key", "value"]}),
 smalltalk.Association);
 
 smalltalk.addMethod(
@@ -171,7 +171,7 @@ return _st(each)._asJSON();
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"asJSON",{},smalltalk.Collection)})},
-messageSends: ["collect:", "asJSON", "asArray"]}),
+messageSends: ["collect:", "asArray", "asJSON"]}),
 smalltalk.Collection);
 
 smalltalk.addMethod(
@@ -376,7 +376,7 @@ $1=self;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"ifEmpty:",{aBlock:aBlock},smalltalk.Collection)})},
-messageSends: ["ifTrue:ifFalse:", "value", "isEmpty"]}),
+messageSends: ["ifTrue:ifFalse:", "isEmpty", "value"]}),
 smalltalk.Collection);
 
 smalltalk.addMethod(
@@ -458,7 +458,7 @@ return _st(outputSet)._add_(each);
 $2=_st(self._class())._withAll_(_st(outputSet)._asArray());
 return $2;
 }, function($ctx1) {$ctx1.fill(self,"intersection:",{aCollection:aCollection,set:set,outputSet:outputSet},smalltalk.Collection)})},
-messageSends: ["asSet", "new", "do:", "ifTrue:", "add:", "and:", "not", "includes:", "withAll:", "asArray", "class"]}),
+messageSends: ["asSet", "new", "do:", "ifTrue:", "and:", "includes:", "not", "add:", "withAll:", "class", "asArray"]}),
 smalltalk.Collection);
 
 smalltalk.addMethod(
@@ -507,7 +507,7 @@ return tally;
 $2=tally;
 return $2;
 }, function($ctx1) {$ctx1.fill(self,"occurrencesOf:",{anObject:anObject,tally:tally},smalltalk.Collection)})},
-messageSends: ["do:", "ifTrue:", "+", "="]}),
+messageSends: ["do:", "ifTrue:", "=", "+"]}),
 smalltalk.Collection);
 
 smalltalk.addMethod(
@@ -586,7 +586,7 @@ return _st(stream)._nextPut_(each);
 $2=_st(stream)._contents();
 return $2;
 }, function($ctx1) {$ctx1.fill(self,"select:",{aBlock:aBlock,stream:stream},smalltalk.Collection)})},
-messageSends: ["writeStream", "new", "class", "do:", "ifTrue:", "nextPut:", "value:", "contents"]}),
+messageSends: ["writeStream", "new", "class", "do:", "ifTrue:", "value:", "nextPut:", "contents"]}),
 smalltalk.Collection);
 
 smalltalk.addMethod(
@@ -952,7 +952,7 @@ return self._basicAt_(aKey);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),aBlock);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"at:ifAbsent:",{aKey:aKey,aBlock:aBlock},smalltalk.HashedCollection)})},
-messageSends: ["ifTrue:ifFalse:", "basicAt:", "includesKey:"]}),
+messageSends: ["ifTrue:ifFalse:", "includesKey:", "basicAt:"]}),
 smalltalk.HashedCollection);
 
 smalltalk.addMethod(
@@ -985,7 +985,7 @@ return _st(aBlock)._value_(self._at_(aKey));
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),anotherBlock);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"at:ifPresent:ifAbsent:",{aKey:aKey,aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.HashedCollection)})},
-messageSends: ["ifTrue:ifFalse:", "value:", "at:", "includesKey:"]}),
+messageSends: ["ifTrue:ifFalse:", "includesKey:", "value:", "at:"]}),
 smalltalk.HashedCollection);
 
 smalltalk.addMethod(
@@ -1100,7 +1100,7 @@ return _st(self._at_(each)).__eq(anObject);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),aBlock);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"indexOf:ifAbsent:",{anObject:anObject,aBlock:aBlock},smalltalk.HashedCollection)})},
-messageSends: ["detect:ifNone:", "=", "at:", "keys"]}),
+messageSends: ["detect:ifNone:", "keys", "=", "at:"]}),
 smalltalk.HashedCollection);
 
 smalltalk.addMethod(
@@ -1209,7 +1209,7 @@ $1=_st(aBlock)._value();
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"removeKey:ifAbsent:",{aKey:aKey,aBlock:aBlock},smalltalk.HashedCollection)})},
-messageSends: ["ifFalse:ifTrue:", "value", "basicDelete:", "includesKey:"]}),
+messageSends: ["ifFalse:ifTrue:", "includesKey:", "value", "basicDelete:"]}),
 smalltalk.HashedCollection);
 
 smalltalk.addMethod(
@@ -1231,7 +1231,7 @@ return _st(newDict)._at_put_(key,value);
 $2=newDict;
 return $2;
 }, function($ctx1) {$ctx1.fill(self,"select:",{aBlock:aBlock,newDict:newDict},smalltalk.HashedCollection)})},
-messageSends: ["new", "class", "keysAndValuesDo:", "ifTrue:", "at:put:", "value:"]}),
+messageSends: ["new", "class", "keysAndValuesDo:", "ifTrue:", "value:", "at:put:"]}),
 smalltalk.HashedCollection);
 
 smalltalk.addMethod(
@@ -1279,7 +1279,7 @@ return self._at_(each);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"values",{},smalltalk.HashedCollection)})},
-messageSends: ["collect:", "at:", "keys"]}),
+messageSends: ["collect:", "keys", "at:"]}),
 smalltalk.HashedCollection);
 
 smalltalk.addMethod(
@@ -1424,7 +1424,7 @@ $1=_st(self["@keys"])._at_(index);
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"indexOf:ifAbsent:",{anObject:anObject,aBlock:aBlock,index:index},smalltalk.Dictionary)})},
-messageSends: ["indexOf:ifAbsent:", "ifTrue:ifFalse:", "value", "at:", "="]}),
+messageSends: ["indexOf:ifAbsent:", "ifTrue:ifFalse:", "=", "value", "at:"]}),
 smalltalk.Dictionary);
 
 smalltalk.addMethod(
@@ -1576,7 +1576,7 @@ return true;
 }
 catch(e) {if(e===$early)return e[0]; throw e}
 }, function($ctx1) {$ctx1.fill(self,"=",{aCollection:aCollection},smalltalk.SequenceableCollection)})},
-messageSends: ["ifFalse:", "and:", "=", "size", "class", "withIndexDo:", "at:"]}),
+messageSends: ["ifFalse:", "and:", "=", "class", "size", "withIndexDo:", "at:"]}),
 smalltalk.SequenceableCollection);
 
 smalltalk.addMethod(
@@ -1646,7 +1646,7 @@ return _st(newCollection)._at_put_(i,self._at_(each));
 $1=newCollection;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"copyFrom:to:",{anIndex:anIndex,anotherIndex:anotherIndex,range:range,newCollection:newCollection},smalltalk.SequenceableCollection)})},
-messageSends: ["to:", "new:", "size", "class", "withIndexDo:", "at:put:", "at:"]}),
+messageSends: ["to:", "new:", "class", "size", "withIndexDo:", "at:put:", "at:"]}),
 smalltalk.SequenceableCollection);
 
 smalltalk.addMethod(
@@ -1665,7 +1665,7 @@ return _st(newCollection)._at_put_(index,_st(each)._deepCopy());
 $1=newCollection;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"deepCopy",{newCollection:newCollection},smalltalk.SequenceableCollection)})},
-messageSends: ["new:", "size", "class", "withIndexDo:", "at:put:", "deepCopy"]}),
+messageSends: ["new:", "class", "size", "withIndexDo:", "at:put:", "deepCopy"]}),
 smalltalk.SequenceableCollection);
 
 smalltalk.addMethod(
@@ -1900,7 +1900,7 @@ return _st(newCollection)._at_put_(index,each);
 $1=newCollection;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"shallowCopy",{newCollection:newCollection},smalltalk.SequenceableCollection)})},
-messageSends: ["new:", "size", "class", "withIndexDo:", "at:put:"]}),
+messageSends: ["new:", "class", "size", "withIndexDo:", "at:put:"]}),
 smalltalk.SequenceableCollection);
 
 smalltalk.addMethod(
@@ -2005,7 +2005,7 @@ _st(aBlock)._value_(stream);
 $1=_st(stream)._contents();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"streamContents:",{aBlock:aBlock,stream:stream},smalltalk.SequenceableCollection.klass)})},
-messageSends: ["on:", "new", "streamClass", "value:", "contents"]}),
+messageSends: ["on:", "streamClass", "new", "value:", "contents"]}),
 smalltalk.SequenceableCollection.klass);
 
 
@@ -2021,6 +2021,17 @@ return self}, function($ctx1) {$ctx1.fill(self,"add:",{anObject:anObject},smallt
 messageSends: []}),
 smalltalk.Array);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "addFirst:",
+fn: function (anObject){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+self.unshift(anObject); return anObject;;
+return self}, function($ctx1) {$ctx1.fill(self,"addFirst:",{anObject:anObject},smalltalk.Array)})},
+messageSends: []}),
+smalltalk.Array);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "asJavascript",
@@ -2331,7 +2342,7 @@ var $1;
 $1=_st(self._class())._fromString_(_st(self._asString())._asLowercase());
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"asLowercase",{},smalltalk.CharacterArray)})},
-messageSends: ["fromString:", "asLowercase", "asString", "class"]}),
+messageSends: ["fromString:", "class", "asLowercase", "asString"]}),
 smalltalk.CharacterArray);
 
 smalltalk.addMethod(
@@ -2383,7 +2394,7 @@ var $1;
 $1=_st(self._class())._fromString_(_st(self._asString())._asUppercase());
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"asUppercase",{},smalltalk.CharacterArray)})},
-messageSends: ["fromString:", "asUppercase", "asString", "class"]}),
+messageSends: ["fromString:", "class", "asUppercase", "asString"]}),
 smalltalk.CharacterArray);
 
 smalltalk.addMethod(
@@ -2722,7 +2733,7 @@ var $1;
 $1=_st(self._lines())._join_(_st($String())._lf());
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"crlfSanitized",{},smalltalk.String)})},
-messageSends: ["join:", "lf", "lines"]}),
+messageSends: ["join:", "lines", "lf"]}),
 smalltalk.String);
 
 smalltalk.addMethod(
@@ -2806,7 +2817,7 @@ return "aeiou"._includes_(self._asLowercase());
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"isVowel",{},smalltalk.String)})},
-messageSends: ["and:", "includes:", "asLowercase", "=", "size"]}),
+messageSends: ["and:", "=", "size", "includes:", "asLowercase"]}),
 smalltalk.String);
 
 smalltalk.addMethod(
@@ -2898,7 +2909,7 @@ return nextCR;
 return self}
 catch(e) {if(e===$early)return e[0]; throw e}
 }, function($ctx1) {$ctx1.fill(self,"lineIndicesDo:",{aBlock:aBlock,cr:cr,lf:lf,start:start,sz:sz,nextLF:nextLF,nextCR:nextCR},smalltalk.String)})},
-messageSends: ["size", "cr", "indexOf:startingAt:", "lf", "whileTrue:", "ifTrue:", "value:value:value:", "and:", "=", "ifTrue:ifFalse:", "-", "+", "or:", "<", "<="]}),
+messageSends: ["size", "cr", "indexOf:startingAt:", "lf", "whileTrue:", "<=", "ifTrue:", "and:", "=", "value:value:value:", "ifTrue:ifFalse:", "or:", "<", "-", "+"]}),
 smalltalk.String);
 
 smalltalk.addMethod(
@@ -2925,7 +2936,7 @@ return nil;
 }
 catch(e) {if(e===$early)return e[0]; throw e}
 }, function($ctx1) {$ctx1.fill(self,"lineNumber:",{anIndex:anIndex,lineCount:lineCount},smalltalk.String)})},
-messageSends: ["lineIndicesDo:", "ifTrue:", "copyFrom:to:", "=", "+"]}),
+messageSends: ["lineIndicesDo:", "ifTrue:", "=", "+", "copyFrom:to:"]}),
 smalltalk.String);
 
 smalltalk.addMethod(
@@ -3406,7 +3417,7 @@ var $1;
 $1=_st(self._class())._withAll_(_st(self["@elements"])._collect_(aBlock));
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"collect:",{aBlock:aBlock},smalltalk.Set)})},
-messageSends: ["withAll:", "collect:", "class"]}),
+messageSends: ["withAll:", "class", "collect:"]}),
 smalltalk.Set);
 
 smalltalk.addMethod(
@@ -3519,7 +3530,7 @@ return _st(collection)._add_(each);
 $2=collection;
 return $2;
 }, function($ctx1) {$ctx1.fill(self,"select:",{aBlock:aBlock,collection:collection},smalltalk.Set)})},
-messageSends: ["new", "class", "do:", "ifTrue:", "add:", "value:"]}),
+messageSends: ["new", "class", "do:", "ifTrue:", "value:", "add:"]}),
 smalltalk.Set);
 
 smalltalk.addMethod(
@@ -3609,7 +3620,7 @@ return $4;
 }
 catch(e) {if(e===$early)return e[0]; throw e}
 }, function($ctx1) {$ctx1.fill(self,"nextIfAbsent:",{aBlock:aBlock,result:result},smalltalk.Queue)})},
-messageSends: ["at:ifAbsent:", "ifTrue:", ">", "value", "isEmpty", "new", "first", "at:put:", "+"]}),
+messageSends: ["at:ifAbsent:", "ifTrue:", "isEmpty", ">", "value", "new", "first", "at:put:", "+"]}),
 smalltalk.Queue);
 
 smalltalk.addMethod(
@@ -3707,7 +3718,7 @@ var $1;
 $1=_st(self._position()).__eq(self._size());
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"atEnd",{},smalltalk.Stream)})},
-messageSends: ["=", "size", "position"]}),
+messageSends: ["=", "position", "size"]}),
 smalltalk.Stream);
 
 smalltalk.addMethod(
@@ -3756,7 +3767,7 @@ var $1;
 $1=_st(self._collection())._copyFrom_to_((1),self._streamSize());
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"contents",{},smalltalk.Stream)})},
-messageSends: ["copyFrom:to:", "streamSize", "collection"]}),
+messageSends: ["copyFrom:to:", "collection", "streamSize"]}),
 smalltalk.Stream);
 
 smalltalk.addMethod(
@@ -3773,7 +3784,7 @@ return smalltalk.withContext(function($ctx2) {
 return _st(aBlock)._value_(self._next());
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"do:",{aBlock:aBlock},smalltalk.Stream)})},
-messageSends: ["whileFalse:", "value:", "next", "atEnd"]}),
+messageSends: ["whileFalse:", "atEnd", "value:", "next"]}),
 smalltalk.Stream);
 
 smalltalk.addMethod(
@@ -3815,7 +3826,7 @@ $1=_st(self["@collection"])._at_(self._position());
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"next",{},smalltalk.Stream)})},
-messageSends: ["ifTrue:ifFalse:", "position:", "+", "position", "at:", "atEnd"]}),
+messageSends: ["ifTrue:ifFalse:", "atEnd", "position:", "+", "position", "at:"]}),
 smalltalk.Stream);
 
 smalltalk.addMethod(
@@ -3837,7 +3848,7 @@ return _st(tempCollection)._add_(self._next());
 $2=tempCollection;
 return $2;
 }, function($ctx1) {$ctx1.fill(self,"next:",{anInteger:anInteger,tempCollection:tempCollection},smalltalk.Stream)})},
-messageSends: ["new", "class", "collection", "timesRepeat:", "ifFalse:", "add:", "next", "atEnd"]}),
+messageSends: ["new", "class", "collection", "timesRepeat:", "ifFalse:", "atEnd", "add:", "next"]}),
 smalltalk.Stream);
 
 smalltalk.addMethod(
@@ -3891,7 +3902,7 @@ $1=_st(self._collection())._at_(_st(self._position()).__plus((1)));
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"peek",{},smalltalk.Stream)})},
-messageSends: ["ifFalse:", "at:", "+", "position", "collection", "atEnd"]}),
+messageSends: ["ifFalse:", "atEnd", "at:", "collection", "+", "position"]}),
 smalltalk.Stream);
 
 smalltalk.addMethod(
@@ -4001,7 +4012,7 @@ var self=this;
 return smalltalk.withContext(function($ctx1) { 
 self._position_(_st(_st(self._position()).__plus(anInteger))._min_max_(self._size(),(0)));
 return self}, function($ctx1) {$ctx1.fill(self,"skip:",{anInteger:anInteger},smalltalk.Stream)})},
-messageSends: ["position:", "min:max:", "size", "+", "position"]}),
+messageSends: ["position:", "min:max:", "+", "position", "size"]}),
 smalltalk.Stream);
 
 smalltalk.addMethod(
@@ -4110,7 +4121,7 @@ return tempCollection;
 $2=tempCollection;
 return $2;
 }, function($ctx1) {$ctx1.fill(self,"next:",{anInteger:anInteger,tempCollection:tempCollection},smalltalk.StringStream)})},
-messageSends: ["new", "class", "collection", "timesRepeat:", "ifFalse:", ",", "next", "atEnd"]}),
+messageSends: ["new", "class", "collection", "timesRepeat:", "ifFalse:", "atEnd", ",", "next"]}),
 smalltalk.StringStream);
 
 smalltalk.addMethod(
@@ -4145,7 +4156,7 @@ self._setCollection_(_st(_st(pre).__comma(aString)).__comma(post));
 self._position_(_st(self._position()).__plus(_st(aString)._size()));
 self._setStreamSize_(_st(self._streamSize())._max_(self._position()));
 return self}, function($ctx1) {$ctx1.fill(self,"nextPutAll:",{aString:aString,pre:pre,post:post},smalltalk.StringStream)})},
-messageSends: ["ifTrue:ifFalse:", "setCollection:", ",", "collection", "copyFrom:to:", "position", "+", "size", "atEnd", "position:", "setStreamSize:", "max:", "streamSize"]}),
+messageSends: ["ifTrue:ifFalse:", "atEnd", "setCollection:", ",", "collection", "copyFrom:to:", "position", "+", "size", "position:", "setStreamSize:", "max:", "streamSize"]}),
 smalltalk.StringStream);
 
 smalltalk.addMethod(

+ 52 - 36
js/Kernel-Collections.js

@@ -20,7 +20,7 @@ return $1;
 }, function($ctx1) {$ctx1.fill(self,"=",{anAssociation:anAssociation},smalltalk.Association)})},
 args: ["anAssociation"],
 source: "= anAssociation\x0a\x09^self class = anAssociation class and: [\x0a\x09\x09self key = anAssociation key and: [\x0a\x09\x09self value = anAssociation value]]",
-messageSends: ["and:", "=", "value", "key", "class"],
+messageSends: ["and:", "=", "class", "key", "value"],
 referencedClasses: []
 }),
 smalltalk.Association);
@@ -231,7 +231,7 @@ return $1;
 }, function($ctx1) {$ctx1.fill(self,"asJSON",{},smalltalk.Collection)})},
 args: [],
 source: "asJSON\x0a\x09^self asArray collect: [:each | each asJSON]",
-messageSends: ["collect:", "asJSON", "asArray"],
+messageSends: ["collect:", "asArray", "asJSON"],
 referencedClasses: []
 }),
 smalltalk.Collection);
@@ -501,7 +501,7 @@ return $1;
 }, function($ctx1) {$ctx1.fill(self,"ifEmpty:",{aBlock:aBlock},smalltalk.Collection)})},
 args: ["aBlock"],
 source: "ifEmpty: aBlock\x0a\x09\x22Evaluate the given block with the receiver as argument, answering its value if the receiver is empty, otherwise answer the receiver. Note that the fact that this method returns its argument in case the receiver is not empty allows one to write expressions like the following ones: self classifyMethodAs:\x0a\x09\x09(myProtocol ifEmpty: ['As yet unclassified'])\x22\x0a\x09^ self isEmpty\x0a\x09\x09ifTrue: [ aBlock value ]\x0a\x09\x09ifFalse: [ self ]",
-messageSends: ["ifTrue:ifFalse:", "value", "isEmpty"],
+messageSends: ["ifTrue:ifFalse:", "isEmpty", "value"],
 referencedClasses: []
 }),
 smalltalk.Collection);
@@ -603,7 +603,7 @@ return $2;
 }, function($ctx1) {$ctx1.fill(self,"intersection:",{aCollection:aCollection,set:set,outputSet:outputSet},smalltalk.Collection)})},
 args: ["aCollection"],
 source: "intersection: aCollection\x0a\x09\x22Answer the set theoretic intersection of two collections.\x22\x0a\x0a\x09| set outputSet |\x0a\x09\x0a\x09set := self asSet.\x0a\x09outputSet := Set new.\x0a\x09\x0a\x09aCollection do: [ :each |\x0a\x09\x09((set includes: each) and: [(outputSet includes: each) not])\x0a\x09\x09\x09ifTrue: [\x0a\x09\x09\x09\x09outputSet add: each]].\x0a\x09\x09\x0a\x09^ self class withAll: outputSet asArray",
-messageSends: ["asSet", "new", "do:", "ifTrue:", "add:", "and:", "not", "includes:", "withAll:", "asArray", "class"],
+messageSends: ["asSet", "new", "do:", "ifTrue:", "and:", "includes:", "not", "add:", "withAll:", "class", "asArray"],
 referencedClasses: ["Set"]
 }),
 smalltalk.Collection);
@@ -667,7 +667,7 @@ return $2;
 }, function($ctx1) {$ctx1.fill(self,"occurrencesOf:",{anObject:anObject,tally:tally},smalltalk.Collection)})},
 args: ["anObject"],
 source: "occurrencesOf: anObject\x0a\x09\x22Answer how many of the receiver's elements are equal to anObject.\x22\x0a\x0a\x09| tally |\x0a\x09tally := 0.\x0a\x09self do: [:each | anObject = each ifTrue: [tally := tally + 1]].\x0a\x09^tally",
-messageSends: ["do:", "ifTrue:", "+", "="],
+messageSends: ["do:", "ifTrue:", "=", "+"],
 referencedClasses: []
 }),
 smalltalk.Collection);
@@ -771,7 +771,7 @@ return $2;
 }, function($ctx1) {$ctx1.fill(self,"select:",{aBlock:aBlock,stream:stream},smalltalk.Collection)})},
 args: ["aBlock"],
 source: "select: aBlock\x0a\x09| stream |\x0a\x09stream := self class new writeStream.\x0a\x09self do: [:each |\x0a\x09\x09(aBlock value: each) ifTrue: [\x0a\x09\x09stream nextPut: each]].\x0a\x09^stream contents",
-messageSends: ["writeStream", "new", "class", "do:", "ifTrue:", "nextPut:", "value:", "contents"],
+messageSends: ["writeStream", "new", "class", "do:", "ifTrue:", "value:", "nextPut:", "contents"],
 referencedClasses: []
 }),
 smalltalk.Collection);
@@ -1264,7 +1264,7 @@ return $1;
 }, function($ctx1) {$ctx1.fill(self,"at:ifAbsent:",{aKey:aKey,aBlock:aBlock},smalltalk.HashedCollection)})},
 args: ["aKey", "aBlock"],
 source: "at: aKey ifAbsent: aBlock\x0a\x09^(self includesKey: aKey)\x0a\x09\x09ifTrue: [self basicAt: aKey]\x0a\x09\x09ifFalse: aBlock",
-messageSends: ["ifTrue:ifFalse:", "basicAt:", "includesKey:"],
+messageSends: ["ifTrue:ifFalse:", "includesKey:", "basicAt:"],
 referencedClasses: []
 }),
 smalltalk.HashedCollection);
@@ -1307,7 +1307,7 @@ return $1;
 }, function($ctx1) {$ctx1.fill(self,"at:ifPresent:ifAbsent:",{aKey:aKey,aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.HashedCollection)})},
 args: ["aKey", "aBlock", "anotherBlock"],
 source: "at: aKey ifPresent: aBlock ifAbsent: anotherBlock\x0a\x09\x22Lookup the given key in the receiver.\x0a\x09If it is present, answer the value of evaluating the oneArgBlock with the value associated with the key,\x0a\x09otherwise answer the value of absentBlock.\x22\x0a\x09^(self includesKey: aKey)\x0a\x09\x09ifTrue: [ aBlock value: (self at: aKey) ]\x0a\x09\x09ifFalse: anotherBlock",
-messageSends: ["ifTrue:ifFalse:", "value:", "at:", "includesKey:"],
+messageSends: ["ifTrue:ifFalse:", "includesKey:", "value:", "at:"],
 referencedClasses: []
 }),
 smalltalk.HashedCollection);
@@ -1462,7 +1462,7 @@ return $1;
 }, function($ctx1) {$ctx1.fill(self,"indexOf:ifAbsent:",{anObject:anObject,aBlock:aBlock},smalltalk.HashedCollection)})},
 args: ["anObject", "aBlock"],
 source: "indexOf: anObject ifAbsent: aBlock\x0a\x0a\x09^ self keys detect: [ :each | (self at: each) = anObject ] ifNone: aBlock",
-messageSends: ["detect:ifNone:", "=", "at:", "keys"],
+messageSends: ["detect:ifNone:", "keys", "=", "at:"],
 referencedClasses: []
 }),
 smalltalk.HashedCollection);
@@ -1606,7 +1606,7 @@ return $1;
 }, function($ctx1) {$ctx1.fill(self,"removeKey:ifAbsent:",{aKey:aKey,aBlock:aBlock},smalltalk.HashedCollection)})},
 args: ["aKey", "aBlock"],
 source: "removeKey: aKey ifAbsent: aBlock\x0a\x09^(self includesKey: aKey)\x0a\x09\x09ifFalse: [aBlock value]\x0a\x09\x09ifTrue: [self basicDelete: aKey]",
-messageSends: ["ifFalse:ifTrue:", "value", "basicDelete:", "includesKey:"],
+messageSends: ["ifFalse:ifTrue:", "includesKey:", "value", "basicDelete:"],
 referencedClasses: []
 }),
 smalltalk.HashedCollection);
@@ -1633,7 +1633,7 @@ return $2;
 }, function($ctx1) {$ctx1.fill(self,"select:",{aBlock:aBlock,newDict:newDict},smalltalk.HashedCollection)})},
 args: ["aBlock"],
 source: "select: aBlock\x0a\x09| newDict |\x0a\x09newDict := self class new.\x0a\x09self keysAndValuesDo: [:key :value |\x0a\x09\x09(aBlock value: value) ifTrue: [newDict at: key put: value]].\x0a\x09^newDict",
-messageSends: ["new", "class", "keysAndValuesDo:", "ifTrue:", "at:put:", "value:"],
+messageSends: ["new", "class", "keysAndValuesDo:", "ifTrue:", "value:", "at:put:"],
 referencedClasses: []
 }),
 smalltalk.HashedCollection);
@@ -1696,7 +1696,7 @@ return $1;
 }, function($ctx1) {$ctx1.fill(self,"values",{},smalltalk.HashedCollection)})},
 args: [],
 source: "values\x0a\x09^self keys collect: [:each | self at: each]",
-messageSends: ["collect:", "at:", "keys"],
+messageSends: ["collect:", "keys", "at:"],
 referencedClasses: []
 }),
 smalltalk.HashedCollection);
@@ -1887,7 +1887,7 @@ return $1;
 }, function($ctx1) {$ctx1.fill(self,"indexOf:ifAbsent:",{anObject:anObject,aBlock:aBlock,index:index},smalltalk.Dictionary)})},
 args: ["anObject", "aBlock"],
 source: "indexOf: anObject ifAbsent: aBlock\x0a\x0a\x09| index |\x0a\x09index := values indexOf: anObject ifAbsent: [0].\x0a\x09^ index = 0 ifTrue: [ aBlock value ] ifFalse: [ keys at: index ]",
-messageSends: ["indexOf:ifAbsent:", "ifTrue:ifFalse:", "value", "at:", "="],
+messageSends: ["indexOf:ifAbsent:", "ifTrue:ifFalse:", "=", "value", "at:"],
 referencedClasses: []
 }),
 smalltalk.Dictionary);
@@ -2085,7 +2085,7 @@ catch(e) {if(e===$early)return e[0]; throw e}
 }, function($ctx1) {$ctx1.fill(self,"=",{aCollection:aCollection},smalltalk.SequenceableCollection)})},
 args: ["aCollection"],
 source: "= aCollection\x0a\x09(self class = aCollection class and: [\x0a\x09\x09self size = aCollection size]) ifFalse: [^false].\x0a\x09self withIndexDo: [:each :i |\x0a\x09\x09\x09\x09(aCollection at: i) = each ifFalse: [^false]].\x0a\x09^true",
-messageSends: ["ifFalse:", "and:", "=", "size", "class", "withIndexDo:", "at:"],
+messageSends: ["ifFalse:", "and:", "=", "class", "size", "withIndexDo:", "at:"],
 referencedClasses: []
 }),
 smalltalk.SequenceableCollection);
@@ -2180,7 +2180,7 @@ return $1;
 }, function($ctx1) {$ctx1.fill(self,"copyFrom:to:",{anIndex:anIndex,anotherIndex:anotherIndex,range:range,newCollection:newCollection},smalltalk.SequenceableCollection)})},
 args: ["anIndex", "anotherIndex"],
 source: "copyFrom: anIndex to: anotherIndex\x0a\x09| range newCollection |\x0a\x09range := anIndex to: anotherIndex.\x0a\x09newCollection := self class new: range size.\x0a\x09range withIndexDo: [:each :i |\x0a\x09\x09newCollection at: i put: (self at: each)].\x0a\x09^newCollection",
-messageSends: ["to:", "new:", "size", "class", "withIndexDo:", "at:put:", "at:"],
+messageSends: ["to:", "new:", "class", "size", "withIndexDo:", "at:put:", "at:"],
 referencedClasses: []
 }),
 smalltalk.SequenceableCollection);
@@ -2204,7 +2204,7 @@ return $1;
 }, function($ctx1) {$ctx1.fill(self,"deepCopy",{newCollection:newCollection},smalltalk.SequenceableCollection)})},
 args: [],
 source: "deepCopy\x0a\x09| newCollection |\x0a\x09newCollection := self class new: self size.\x0a\x09self withIndexDo: [:each :index |\x0a\x09\x09newCollection at: index put: each deepCopy].\x0a\x09^newCollection",
-messageSends: ["new:", "size", "class", "withIndexDo:", "at:put:", "deepCopy"],
+messageSends: ["new:", "class", "size", "withIndexDo:", "at:put:", "deepCopy"],
 referencedClasses: []
 }),
 smalltalk.SequenceableCollection);
@@ -2524,7 +2524,7 @@ return $1;
 }, function($ctx1) {$ctx1.fill(self,"shallowCopy",{newCollection:newCollection},smalltalk.SequenceableCollection)})},
 args: [],
 source: "shallowCopy\x0a\x09| newCollection |\x0a\x09newCollection := self class new: self size.\x0a\x09self withIndexDo: [ :each :index |\x0a\x09\x09newCollection at: index put: each].\x0a\x09^newCollection",
-messageSends: ["new:", "size", "class", "withIndexDo:", "at:put:"],
+messageSends: ["new:", "class", "size", "withIndexDo:", "at:put:"],
 referencedClasses: []
 }),
 smalltalk.SequenceableCollection);
@@ -2669,7 +2669,7 @@ return $1;
 }, function($ctx1) {$ctx1.fill(self,"streamContents:",{aBlock:aBlock,stream:stream},smalltalk.SequenceableCollection.klass)})},
 args: ["aBlock"],
 source: "streamContents: aBlock\x0a\x09| stream |\x0a\x09stream := (self streamClass on: self new).\x0a\x09aBlock value: stream.\x0a\x09^ stream contents",
-messageSends: ["on:", "new", "streamClass", "value:", "contents"],
+messageSends: ["on:", "streamClass", "new", "value:", "contents"],
 referencedClasses: []
 }),
 smalltalk.SequenceableCollection.klass);
@@ -2693,6 +2693,22 @@ referencedClasses: []
 }),
 smalltalk.Array);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "addFirst:",
+category: 'adding/removing',
+fn: function (anObject){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+self.unshift(anObject); return anObject;;
+return self}, function($ctx1) {$ctx1.fill(self,"addFirst:",{anObject:anObject},smalltalk.Array)})},
+args: ["anObject"],
+source: "addFirst: anObject\x0a\x09<self.unshift(anObject); return anObject;>",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.Array);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "asJavascript",
@@ -3112,7 +3128,7 @@ return $1;
 }, function($ctx1) {$ctx1.fill(self,"asLowercase",{},smalltalk.CharacterArray)})},
 args: [],
 source: "asLowercase\x0a\x09^self class fromString: self asString asLowercase",
-messageSends: ["fromString:", "asLowercase", "asString", "class"],
+messageSends: ["fromString:", "class", "asLowercase", "asString"],
 referencedClasses: []
 }),
 smalltalk.CharacterArray);
@@ -3184,7 +3200,7 @@ return $1;
 }, function($ctx1) {$ctx1.fill(self,"asUppercase",{},smalltalk.CharacterArray)})},
 args: [],
 source: "asUppercase\x0a\x09^self class fromString: self asString asUppercase",
-messageSends: ["fromString:", "asUppercase", "asString", "class"],
+messageSends: ["fromString:", "class", "asUppercase", "asString"],
 referencedClasses: []
 }),
 smalltalk.CharacterArray);
@@ -3664,7 +3680,7 @@ return $1;
 }, function($ctx1) {$ctx1.fill(self,"crlfSanitized",{},smalltalk.String)})},
 args: [],
 source: "crlfSanitized\x0a\x09^self lines join: String lf",
-messageSends: ["join:", "lf", "lines"],
+messageSends: ["join:", "lines", "lf"],
 referencedClasses: ["String"]
 }),
 smalltalk.String);
@@ -3783,7 +3799,7 @@ return $1;
 }, function($ctx1) {$ctx1.fill(self,"isVowel",{},smalltalk.String)})},
 args: [],
 source: "isVowel\x0a\x09\x22Answer true if the receiver is a one character string containing a voyel\x22\x0a\x09\x0a\x09^ self size = 1 and: [ 'aeiou' includes: self asLowercase ]",
-messageSends: ["and:", "includes:", "asLowercase", "=", "size"],
+messageSends: ["and:", "=", "size", "includes:", "asLowercase"],
 referencedClasses: []
 }),
 smalltalk.String);
@@ -3885,7 +3901,7 @@ catch(e) {if(e===$early)return e[0]; throw e}
 }, function($ctx1) {$ctx1.fill(self,"lineIndicesDo:",{aBlock:aBlock,cr:cr,lf:lf,start:start,sz:sz,nextLF:nextLF,nextCR:nextCR},smalltalk.String)})},
 args: ["aBlock"],
 source: "lineIndicesDo: aBlock\x0a\x09\x22execute aBlock with 3 arguments for each line:\x0a\x09- start index of line\x0a\x09- end index of line without line delimiter\x0a\x09- end index of line including line delimiter(s) CR, LF or CRLF\x22\x0a\x09\x0a\x09| cr lf start sz nextLF nextCR |\x0a\x09start := 1.\x0a\x09sz := self size.\x0a\x09cr := String cr.\x0a\x09nextCR := self indexOf: cr startingAt: 1.\x0a\x09lf := String lf.\x0a\x09nextLF := self indexOf: lf startingAt: 1.\x0a\x09[ start <= sz ] whileTrue: [\x0a\x09\x09(nextLF = 0 and: [ nextCR = 0 ])\x0a\x09\x09\x09ifTrue: [ \x22No more CR, nor LF, the string is over\x22\x0a\x09\x09\x09\x09\x09aBlock value: start value: sz value: sz.\x0a\x09\x09\x09\x09\x09^self ].\x0a\x09\x09(nextCR = 0 or: [ 0 < nextLF and: [ nextLF < nextCR ] ])\x0a\x09\x09\x09ifTrue: [ \x22Found a LF\x22\x0a\x09\x09\x09\x09\x09aBlock value: start value: nextLF - 1 value: nextLF.\x0a\x09\x09\x09\x09\x09start := 1 + nextLF.\x0a\x09\x09\x09\x09\x09nextLF := self indexOf: lf startingAt: start ]\x0a\x09\x09\x09ifFalse: [ 1 + nextCR = nextLF\x0a\x09\x09\x09\x09ifTrue: [ \x22Found a CR-LF pair\x22\x0a\x09\x09\x09\x09\x09aBlock value: start value: nextCR - 1 value: nextLF.\x0a\x09\x09\x09\x09\x09start := 1 + nextLF.\x0a\x09\x09\x09\x09\x09nextCR := self indexOf: cr startingAt: start.\x0a\x09\x09\x09\x09\x09nextLF := self indexOf: lf startingAt: start ]\x0a\x09\x09\x09\x09ifFalse: [ \x22Found a CR\x22\x0a\x09\x09\x09\x09\x09aBlock value: start value: nextCR - 1 value: nextCR.\x0a\x09\x09\x09\x09\x09start := 1 + nextCR.\x0a\x09\x09\x09\x09\x09nextCR := self indexOf: cr startingAt: start ]]]",
-messageSends: ["size", "cr", "indexOf:startingAt:", "lf", "whileTrue:", "ifTrue:", "value:value:value:", "and:", "=", "ifTrue:ifFalse:", "-", "+", "or:", "<", "<="],
+messageSends: ["size", "cr", "indexOf:startingAt:", "lf", "whileTrue:", "<=", "ifTrue:", "and:", "=", "value:value:value:", "ifTrue:ifFalse:", "or:", "<", "-", "+"],
 referencedClasses: ["String"]
 }),
 smalltalk.String);
@@ -3917,7 +3933,7 @@ catch(e) {if(e===$early)return e[0]; throw e}
 }, function($ctx1) {$ctx1.fill(self,"lineNumber:",{anIndex:anIndex,lineCount:lineCount},smalltalk.String)})},
 args: ["anIndex"],
 source: "lineNumber: anIndex\x0a\x09\x22Answer a string containing the characters in the given line number.\x22\x0a\x0a\x09| lineCount |\x0a\x09lineCount := 0.\x0a\x09self lineIndicesDo: [:start :endWithoutDelimiters :end |\x0a\x09\x09(lineCount := lineCount + 1) = anIndex ifTrue: [^self copyFrom: start to: endWithoutDelimiters]].\x0a\x09^nil",
-messageSends: ["lineIndicesDo:", "ifTrue:", "copyFrom:to:", "=", "+"],
+messageSends: ["lineIndicesDo:", "ifTrue:", "=", "+", "copyFrom:to:"],
 referencedClasses: []
 }),
 smalltalk.String);
@@ -4579,7 +4595,7 @@ return $1;
 }, function($ctx1) {$ctx1.fill(self,"collect:",{aBlock:aBlock},smalltalk.Set)})},
 args: ["aBlock"],
 source: "collect: aBlock\x0a\x09^self class withAll: (elements collect: aBlock)",
-messageSends: ["withAll:", "collect:", "class"],
+messageSends: ["withAll:", "class", "collect:"],
 referencedClasses: []
 }),
 smalltalk.Set);
@@ -4732,7 +4748,7 @@ return $2;
 }, function($ctx1) {$ctx1.fill(self,"select:",{aBlock:aBlock,collection:collection},smalltalk.Set)})},
 args: ["aBlock"],
 source: "select: aBlock\x0a\x09| collection |\x0a\x09collection := self class new.\x0a\x09self do: [:each |\x0a\x09\x09(aBlock value: each) ifTrue: [\x0a\x09\x09\x09collection add: each]].\x0a\x09^collection",
-messageSends: ["new", "class", "do:", "ifTrue:", "add:", "value:"],
+messageSends: ["new", "class", "do:", "ifTrue:", "value:", "add:"],
 referencedClasses: []
 }),
 smalltalk.Set);
@@ -4843,7 +4859,7 @@ catch(e) {if(e===$early)return e[0]; throw e}
 }, function($ctx1) {$ctx1.fill(self,"nextIfAbsent:",{aBlock:aBlock,result:result},smalltalk.Queue)})},
 args: ["aBlock"],
 source: "nextIfAbsent: aBlock\x0a\x09| result |\x0a\x09result := read at: readIndex ifAbsent: [\x0a\x09\x09write isEmpty ifTrue: [\x0a\x09\x09\x09readIndex > 1 ifTrue: [ read := #(). readIndex := 1 ].\x0a\x09\x09\x09^aBlock value ].\x0a\x09\x09read := write.\x0a\x09\x09readIndex := 1.\x0a\x09\x09write := OrderedCollection new.\x0a\x09\x09read first ].\x0a\x09read at: readIndex put: nil.\x0a\x09readIndex := readIndex + 1.\x0a\x09^result",
-messageSends: ["at:ifAbsent:", "ifTrue:", ">", "value", "isEmpty", "new", "first", "at:put:", "+"],
+messageSends: ["at:ifAbsent:", "ifTrue:", "isEmpty", ">", "value", "new", "first", "at:put:", "+"],
 referencedClasses: ["OrderedCollection"]
 }),
 smalltalk.Queue);
@@ -4983,7 +4999,7 @@ return $1;
 }, function($ctx1) {$ctx1.fill(self,"atEnd",{},smalltalk.Stream)})},
 args: [],
 source: "atEnd\x0a\x09^self position = self size",
-messageSends: ["=", "size", "position"],
+messageSends: ["=", "position", "size"],
 referencedClasses: []
 }),
 smalltalk.Stream);
@@ -5052,7 +5068,7 @@ return $1;
 }, function($ctx1) {$ctx1.fill(self,"contents",{},smalltalk.Stream)})},
 args: [],
 source: "contents\x0a\x09^self collection\x0a\x09\x09copyFrom: 1\x0a\x09\x09to: self streamSize",
-messageSends: ["copyFrom:to:", "streamSize", "collection"],
+messageSends: ["copyFrom:to:", "collection", "streamSize"],
 referencedClasses: []
 }),
 smalltalk.Stream);
@@ -5074,7 +5090,7 @@ return _st(aBlock)._value_(self._next());
 return self}, function($ctx1) {$ctx1.fill(self,"do:",{aBlock:aBlock},smalltalk.Stream)})},
 args: ["aBlock"],
 source: "do: aBlock\x0a\x09[self atEnd] whileFalse: [aBlock value: self next]",
-messageSends: ["whileFalse:", "value:", "next", "atEnd"],
+messageSends: ["whileFalse:", "atEnd", "value:", "next"],
 referencedClasses: []
 }),
 smalltalk.Stream);
@@ -5131,7 +5147,7 @@ return $1;
 }, function($ctx1) {$ctx1.fill(self,"next",{},smalltalk.Stream)})},
 args: [],
 source: "next\x0a\x09^self atEnd\x0a\x09\x09ifTrue: [nil]\x0a\x09\x09ifFalse: [\x0a\x09\x09\x09self position: self position + 1.\x0a\x09\x09\x09collection at: self position]",
-messageSends: ["ifTrue:ifFalse:", "position:", "+", "position", "at:", "atEnd"],
+messageSends: ["ifTrue:ifFalse:", "atEnd", "position:", "+", "position", "at:"],
 referencedClasses: []
 }),
 smalltalk.Stream);
@@ -5158,7 +5174,7 @@ return $2;
 }, function($ctx1) {$ctx1.fill(self,"next:",{anInteger:anInteger,tempCollection:tempCollection},smalltalk.Stream)})},
 args: ["anInteger"],
 source: "next: anInteger\x0a\x09| tempCollection |\x0a\x09tempCollection := self collection class new.\x0a\x09anInteger timesRepeat: [\x0a\x09\x09self atEnd ifFalse: [\x0a\x09\x09tempCollection add: self next]].\x0a\x09^tempCollection",
-messageSends: ["new", "class", "collection", "timesRepeat:", "ifFalse:", "add:", "next", "atEnd"],
+messageSends: ["new", "class", "collection", "timesRepeat:", "ifFalse:", "atEnd", "add:", "next"],
 referencedClasses: []
 }),
 smalltalk.Stream);
@@ -5232,7 +5248,7 @@ return $1;
 }, function($ctx1) {$ctx1.fill(self,"peek",{},smalltalk.Stream)})},
 args: [],
 source: "peek\x0a\x09^self atEnd ifFalse: [\x0a\x09\x09self collection at: self position + 1]",
-messageSends: ["ifFalse:", "at:", "+", "position", "collection", "atEnd"],
+messageSends: ["ifFalse:", "atEnd", "at:", "collection", "+", "position"],
 referencedClasses: []
 }),
 smalltalk.Stream);
@@ -5387,7 +5403,7 @@ self._position_(_st(_st(self._position()).__plus(anInteger))._min_max_(self._siz
 return self}, function($ctx1) {$ctx1.fill(self,"skip:",{anInteger:anInteger},smalltalk.Stream)})},
 args: ["anInteger"],
 source: "skip: anInteger\x0a\x09self position: ((self position + anInteger) min: self size max: 0)",
-messageSends: ["position:", "min:max:", "size", "+", "position"],
+messageSends: ["position:", "min:max:", "+", "position", "size"],
 referencedClasses: []
 }),
 smalltalk.Stream);
@@ -5532,7 +5548,7 @@ return $2;
 }, function($ctx1) {$ctx1.fill(self,"next:",{anInteger:anInteger,tempCollection:tempCollection},smalltalk.StringStream)})},
 args: ["anInteger"],
 source: "next: anInteger\x0a\x09| tempCollection |\x0a\x09tempCollection := self collection class new.\x0a\x09anInteger timesRepeat: [\x0a\x09\x09self atEnd ifFalse: [\x0a\x09\x09tempCollection := tempCollection, self next]].\x0a\x09^tempCollection",
-messageSends: ["new", "class", "collection", "timesRepeat:", "ifFalse:", ",", "next", "atEnd"],
+messageSends: ["new", "class", "collection", "timesRepeat:", "ifFalse:", "atEnd", ",", "next"],
 referencedClasses: []
 }),
 smalltalk.StringStream);
@@ -5577,7 +5593,7 @@ self._setStreamSize_(_st(self._streamSize())._max_(self._position()));
 return self}, function($ctx1) {$ctx1.fill(self,"nextPutAll:",{aString:aString,pre:pre,post:post},smalltalk.StringStream)})},
 args: ["aString"],
 source: "nextPutAll: aString\x0a\x09| pre post |\x0a\x09self atEnd ifTrue: [ self setCollection: self collection, aString ] ifFalse: [\x0a\x09\x09pre := self collection copyFrom: 1 to: self position.\x0a\x09\x09post := self collection copyFrom: (self position + 1 + aString size) to: self collection size.\x0a\x09\x09self setCollection: pre, aString, post\x0a\x09].\x0a\x09self position: self position + aString size.\x0a\x09self setStreamSize: (self streamSize max: self position)",
-messageSends: ["ifTrue:ifFalse:", "setCollection:", ",", "collection", "copyFrom:to:", "position", "+", "size", "atEnd", "position:", "setStreamSize:", "max:", "streamSize"],
+messageSends: ["ifTrue:ifFalse:", "atEnd", "setCollection:", ",", "collection", "copyFrom:to:", "position", "+", "size", "position:", "setStreamSize:", "max:", "streamSize"],
 referencedClasses: []
 }),
 smalltalk.StringStream);

+ 4 - 0
st/Kernel-Collections.st

@@ -938,6 +938,10 @@ add: anObject
 	<self.push(anObject); return anObject;>
 !
 
+addFirst: anObject
+	<self.unshift(anObject); return anObject;>
+!
+
 remove: anObject ifAbsent: aBlock
 	<
 		for(var i=0;i<self.length;i++) {