Kernel-Collections.deploy.js 126 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981
  1. smalltalk.addPackage('Kernel-Collections');
  2. smalltalk.addClass('Association', smalltalk.Object, ['key', 'value'], 'Kernel-Collections');
  3. smalltalk.addMethod(
  4. "__eq",
  5. smalltalk.method({
  6. selector: "=",
  7. fn: function (anAssociation){
  8. var self=this;
  9. return smalltalk.withContext(function($ctx1) { var $1;
  10. $1=_st(_st(_st(self)._class()).__eq(_st(anAssociation)._class()))._and_((function(){
  11. return smalltalk.withContext(function($ctx2) { return _st(_st(_st(self)._key()).__eq(_st(anAssociation)._key()))._and_((function(){
  12. return smalltalk.withContext(function($ctx3) { return _st(_st(self)._value()).__eq(_st(anAssociation)._value());
  13. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  14. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  15. return $1;
  16. }, function($ctx1) {$ctx1.fill(self,"=",{anAssociation:anAssociation},smalltalk.Association)})},
  17. messageSends: ["and:", "=", "value", "key", "class"]}),
  18. smalltalk.Association);
  19. smalltalk.addMethod(
  20. "_key",
  21. smalltalk.method({
  22. selector: "key",
  23. fn: function (){
  24. var self=this;
  25. return smalltalk.withContext(function($ctx1) { var $1;
  26. $1=self["@key"];
  27. return $1;
  28. }, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.Association)})},
  29. messageSends: []}),
  30. smalltalk.Association);
  31. smalltalk.addMethod(
  32. "_key_",
  33. smalltalk.method({
  34. selector: "key:",
  35. fn: function (aKey){
  36. var self=this;
  37. return smalltalk.withContext(function($ctx1) { self["@key"]=aKey;
  38. return self}, function($ctx1) {$ctx1.fill(self,"key:",{aKey:aKey},smalltalk.Association)})},
  39. messageSends: []}),
  40. smalltalk.Association);
  41. smalltalk.addMethod(
  42. "_printOn_",
  43. smalltalk.method({
  44. selector: "printOn:",
  45. fn: function (aStream){
  46. var self=this;
  47. return smalltalk.withContext(function($ctx1) { _st(_st(self)._key())._printOn_(aStream);
  48. _st(aStream)._nextPutAll_(" -> ");
  49. _st(_st(self)._value())._printOn_(aStream);
  50. return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.Association)})},
  51. messageSends: ["printOn:", "key", "nextPutAll:", "value"]}),
  52. smalltalk.Association);
  53. smalltalk.addMethod(
  54. "_value",
  55. smalltalk.method({
  56. selector: "value",
  57. fn: function (){
  58. var self=this;
  59. return smalltalk.withContext(function($ctx1) { var $1;
  60. $1=self["@value"];
  61. return $1;
  62. }, function($ctx1) {$ctx1.fill(self,"value",{},smalltalk.Association)})},
  63. messageSends: []}),
  64. smalltalk.Association);
  65. smalltalk.addMethod(
  66. "_value_",
  67. smalltalk.method({
  68. selector: "value:",
  69. fn: function (aValue){
  70. var self=this;
  71. return smalltalk.withContext(function($ctx1) { self["@value"]=aValue;
  72. return self}, function($ctx1) {$ctx1.fill(self,"value:",{aValue:aValue},smalltalk.Association)})},
  73. messageSends: []}),
  74. smalltalk.Association);
  75. smalltalk.addMethod(
  76. "_key_value_",
  77. smalltalk.method({
  78. selector: "key:value:",
  79. fn: function (aKey,aValue){
  80. var self=this;
  81. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  82. $2=_st(self)._new();
  83. _st($2)._key_(aKey);
  84. _st($2)._value_(aValue);
  85. $3=_st($2)._yourself();
  86. $1=$3;
  87. return $1;
  88. }, function($ctx1) {$ctx1.fill(self,"key:value:",{aKey:aKey,aValue:aValue},smalltalk.Association.klass)})},
  89. messageSends: ["key:", "new", "value:", "yourself"]}),
  90. smalltalk.Association.klass);
  91. smalltalk.addClass('Collection', smalltalk.Object, [], 'Kernel-Collections');
  92. smalltalk.addMethod(
  93. "__comma",
  94. smalltalk.method({
  95. selector: ",",
  96. fn: function (aCollection){
  97. var self=this;
  98. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  99. $2=_st(self)._copy();
  100. _st($2)._addAll_(aCollection);
  101. $3=_st($2)._yourself();
  102. $1=$3;
  103. return $1;
  104. }, function($ctx1) {$ctx1.fill(self,",",{aCollection:aCollection},smalltalk.Collection)})},
  105. messageSends: ["addAll:", "copy", "yourself"]}),
  106. smalltalk.Collection);
  107. smalltalk.addMethod(
  108. "_add_",
  109. smalltalk.method({
  110. selector: "add:",
  111. fn: function (anObject){
  112. var self=this;
  113. return smalltalk.withContext(function($ctx1) { _st(self)._subclassResponsibility();
  114. return self}, function($ctx1) {$ctx1.fill(self,"add:",{anObject:anObject},smalltalk.Collection)})},
  115. messageSends: ["subclassResponsibility"]}),
  116. smalltalk.Collection);
  117. smalltalk.addMethod(
  118. "_addAll_",
  119. smalltalk.method({
  120. selector: "addAll:",
  121. fn: function (aCollection){
  122. var self=this;
  123. return smalltalk.withContext(function($ctx1) { var $1;
  124. _st(aCollection)._do_((function(each){
  125. return smalltalk.withContext(function($ctx2) { return _st(self)._add_(each);
  126. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  127. $1=aCollection;
  128. return $1;
  129. }, function($ctx1) {$ctx1.fill(self,"addAll:",{aCollection:aCollection},smalltalk.Collection)})},
  130. messageSends: ["do:", "add:"]}),
  131. smalltalk.Collection);
  132. smalltalk.addMethod(
  133. "_asArray",
  134. smalltalk.method({
  135. selector: "asArray",
  136. fn: function (){
  137. var self=this;
  138. return smalltalk.withContext(function($ctx1) { var $1;
  139. $1=_st((smalltalk.Array || Array))._withAll_(self);
  140. return $1;
  141. }, function($ctx1) {$ctx1.fill(self,"asArray",{},smalltalk.Collection)})},
  142. messageSends: ["withAll:"]}),
  143. smalltalk.Collection);
  144. smalltalk.addMethod(
  145. "_asJSON",
  146. smalltalk.method({
  147. selector: "asJSON",
  148. fn: function (){
  149. var self=this;
  150. return smalltalk.withContext(function($ctx1) { var $1;
  151. $1=_st(_st(self)._asArray())._collect_((function(each){
  152. return smalltalk.withContext(function($ctx2) { return _st(each)._asJSON();
  153. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  154. return $1;
  155. }, function($ctx1) {$ctx1.fill(self,"asJSON",{},smalltalk.Collection)})},
  156. messageSends: ["collect:", "asJSON", "asArray"]}),
  157. smalltalk.Collection);
  158. smalltalk.addMethod(
  159. "_asOrderedCollection",
  160. smalltalk.method({
  161. selector: "asOrderedCollection",
  162. fn: function (){
  163. var self=this;
  164. return smalltalk.withContext(function($ctx1) { var $1;
  165. $1=_st(self)._asArray();
  166. return $1;
  167. }, function($ctx1) {$ctx1.fill(self,"asOrderedCollection",{},smalltalk.Collection)})},
  168. messageSends: ["asArray"]}),
  169. smalltalk.Collection);
  170. smalltalk.addMethod(
  171. "_asSet",
  172. smalltalk.method({
  173. selector: "asSet",
  174. fn: function (){
  175. var self=this;
  176. return smalltalk.withContext(function($ctx1) { var $1;
  177. $1=_st((smalltalk.Set || Set))._withAll_(self);
  178. return $1;
  179. }, function($ctx1) {$ctx1.fill(self,"asSet",{},smalltalk.Collection)})},
  180. messageSends: ["withAll:"]}),
  181. smalltalk.Collection);
  182. smalltalk.addMethod(
  183. "_collect_",
  184. smalltalk.method({
  185. selector: "collect:",
  186. fn: function (aBlock){
  187. var self=this;
  188. var stream;
  189. return smalltalk.withContext(function($ctx1) { var $1;
  190. stream=_st(_st(_st(self)._class())._new())._writeStream();
  191. _st(self)._do_((function(each){
  192. return smalltalk.withContext(function($ctx2) { return _st(stream)._nextPut_(_st(aBlock)._value_(each));
  193. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  194. $1=_st(stream)._contents();
  195. return $1;
  196. }, function($ctx1) {$ctx1.fill(self,"collect:",{aBlock:aBlock,stream:stream},smalltalk.Collection)})},
  197. messageSends: ["writeStream", "new", "class", "do:", "nextPut:", "value:", "contents"]}),
  198. smalltalk.Collection);
  199. smalltalk.addMethod(
  200. "_copyWith_",
  201. smalltalk.method({
  202. selector: "copyWith:",
  203. fn: function (anObject){
  204. var self=this;
  205. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  206. $2=_st(self)._copy();
  207. _st($2)._add_(anObject);
  208. $3=_st($2)._yourself();
  209. $1=$3;
  210. return $1;
  211. }, function($ctx1) {$ctx1.fill(self,"copyWith:",{anObject:anObject},smalltalk.Collection)})},
  212. messageSends: ["add:", "copy", "yourself"]}),
  213. smalltalk.Collection);
  214. smalltalk.addMethod(
  215. "_copyWithAll_",
  216. smalltalk.method({
  217. selector: "copyWithAll:",
  218. fn: function (aCollection){
  219. var self=this;
  220. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  221. $2=_st(self)._copy();
  222. _st($2)._addAll_(aCollection);
  223. $3=_st($2)._yourself();
  224. $1=$3;
  225. return $1;
  226. }, function($ctx1) {$ctx1.fill(self,"copyWithAll:",{aCollection:aCollection},smalltalk.Collection)})},
  227. messageSends: ["addAll:", "copy", "yourself"]}),
  228. smalltalk.Collection);
  229. smalltalk.addMethod(
  230. "_copyWithoutAll_",
  231. smalltalk.method({
  232. selector: "copyWithoutAll:",
  233. fn: function (aCollection){
  234. var self=this;
  235. return smalltalk.withContext(function($ctx1) { var $1;
  236. $1=_st(self)._reject_((function(each){
  237. return smalltalk.withContext(function($ctx2) { return _st(aCollection)._includes_(each);
  238. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  239. return $1;
  240. }, function($ctx1) {$ctx1.fill(self,"copyWithoutAll:",{aCollection:aCollection},smalltalk.Collection)})},
  241. messageSends: ["reject:", "includes:"]}),
  242. smalltalk.Collection);
  243. smalltalk.addMethod(
  244. "_detect_",
  245. smalltalk.method({
  246. selector: "detect:",
  247. fn: function (aBlock){
  248. var self=this;
  249. return smalltalk.withContext(function($ctx1) { var $1;
  250. $1=_st(self)._detect_ifNone_(aBlock,(function(){
  251. return smalltalk.withContext(function($ctx2) { return _st(self)._errorNotFound();
  252. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  253. return $1;
  254. }, function($ctx1) {$ctx1.fill(self,"detect:",{aBlock:aBlock},smalltalk.Collection)})},
  255. messageSends: ["detect:ifNone:", "errorNotFound"]}),
  256. smalltalk.Collection);
  257. smalltalk.addMethod(
  258. "_detect_ifNone_",
  259. smalltalk.method({
  260. selector: "detect:ifNone:",
  261. fn: function (aBlock,anotherBlock){
  262. var self=this;
  263. return smalltalk.withContext(function($ctx1) { _st(self)._subclassResponsibility();
  264. return self}, function($ctx1) {$ctx1.fill(self,"detect:ifNone:",{aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.Collection)})},
  265. messageSends: ["subclassResponsibility"]}),
  266. smalltalk.Collection);
  267. smalltalk.addMethod(
  268. "_do_",
  269. smalltalk.method({
  270. selector: "do:",
  271. fn: function (aBlock){
  272. var self=this;
  273. return smalltalk.withContext(function($ctx1) { _st(self)._subclassResponsibility();
  274. return self}, function($ctx1) {$ctx1.fill(self,"do:",{aBlock:aBlock},smalltalk.Collection)})},
  275. messageSends: ["subclassResponsibility"]}),
  276. smalltalk.Collection);
  277. smalltalk.addMethod(
  278. "_do_separatedBy_",
  279. smalltalk.method({
  280. selector: "do:separatedBy:",
  281. fn: function (aBlock,anotherBlock){
  282. var self=this;
  283. var actionBeforeElement;
  284. return smalltalk.withContext(function($ctx1) { actionBeforeElement=(function(){
  285. return smalltalk.withContext(function($ctx2) { actionBeforeElement=anotherBlock;
  286. return actionBeforeElement;
  287. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
  288. _st(self)._do_((function(each){
  289. return smalltalk.withContext(function($ctx2) { _st(actionBeforeElement)._value();
  290. return _st(aBlock)._value_(each);
  291. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  292. return self}, function($ctx1) {$ctx1.fill(self,"do:separatedBy:",{aBlock:aBlock,anotherBlock:anotherBlock,actionBeforeElement:actionBeforeElement},smalltalk.Collection)})},
  293. messageSends: ["do:", "value", "value:"]}),
  294. smalltalk.Collection);
  295. smalltalk.addMethod(
  296. "_errorNotFound",
  297. smalltalk.method({
  298. selector: "errorNotFound",
  299. fn: function (){
  300. var self=this;
  301. return smalltalk.withContext(function($ctx1) { _st(self)._error_("Object is not in the collection");
  302. return self}, function($ctx1) {$ctx1.fill(self,"errorNotFound",{},smalltalk.Collection)})},
  303. messageSends: ["error:"]}),
  304. smalltalk.Collection);
  305. smalltalk.addMethod(
  306. "_ifEmpty_",
  307. smalltalk.method({
  308. selector: "ifEmpty:",
  309. fn: function (aBlock){
  310. var self=this;
  311. return smalltalk.withContext(function($ctx1) { var $2,$1;
  312. $2=_st(self)._isEmpty();
  313. if(smalltalk.assert($2)){
  314. $1=_st(aBlock)._value();
  315. } else {
  316. $1=self;
  317. };
  318. return $1;
  319. }, function($ctx1) {$ctx1.fill(self,"ifEmpty:",{aBlock:aBlock},smalltalk.Collection)})},
  320. messageSends: ["ifTrue:ifFalse:", "value", "isEmpty"]}),
  321. smalltalk.Collection);
  322. smalltalk.addMethod(
  323. "_ifNotEmpty_",
  324. smalltalk.method({
  325. selector: "ifNotEmpty:",
  326. fn: function (aBlock){
  327. var self=this;
  328. return smalltalk.withContext(function($ctx1) { var $1;
  329. $1=_st(self)._notEmpty();
  330. _st($1)._ifTrue_(aBlock);
  331. return self}, function($ctx1) {$ctx1.fill(self,"ifNotEmpty:",{aBlock:aBlock},smalltalk.Collection)})},
  332. messageSends: ["ifTrue:", "notEmpty"]}),
  333. smalltalk.Collection);
  334. smalltalk.addMethod(
  335. "_includes_",
  336. smalltalk.method({
  337. selector: "includes:",
  338. fn: function (anObject){
  339. var self=this;
  340. var sentinel;
  341. return smalltalk.withContext(function($ctx1) { var $1;
  342. sentinel=_st((smalltalk.Object || Object))._new();
  343. $1=_st(_st(self)._detect_ifNone_((function(each){
  344. return smalltalk.withContext(function($ctx2) { return _st(each).__eq(anObject);
  345. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
  346. return smalltalk.withContext(function($ctx2) { return sentinel;
  347. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))).__tild_eq(sentinel);
  348. return $1;
  349. }, function($ctx1) {$ctx1.fill(self,"includes:",{anObject:anObject,sentinel:sentinel},smalltalk.Collection)})},
  350. messageSends: ["new", "~=", "detect:ifNone:", "="]}),
  351. smalltalk.Collection);
  352. smalltalk.addMethod(
  353. "_inject_into_",
  354. smalltalk.method({
  355. selector: "inject:into:",
  356. fn: function (anObject,aBlock){
  357. var self=this;
  358. var result;
  359. return smalltalk.withContext(function($ctx1) { var $1;
  360. result=anObject;
  361. _st(self)._do_((function(each){
  362. return smalltalk.withContext(function($ctx2) { result=_st(aBlock)._value_value_(result,each);
  363. return result;
  364. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  365. $1=result;
  366. return $1;
  367. }, function($ctx1) {$ctx1.fill(self,"inject:into:",{anObject:anObject,aBlock:aBlock,result:result},smalltalk.Collection)})},
  368. messageSends: ["do:", "value:value:"]}),
  369. smalltalk.Collection);
  370. smalltalk.addMethod(
  371. "_intersection_",
  372. smalltalk.method({
  373. selector: "intersection:",
  374. fn: function (aCollection){
  375. var self=this;
  376. var set,outputSet;
  377. return smalltalk.withContext(function($ctx1) { var $1,$2;
  378. set=_st(self)._asSet();
  379. outputSet=_st((smalltalk.Set || Set))._new();
  380. _st(aCollection)._do_((function(each){
  381. return smalltalk.withContext(function($ctx2) { $1=_st(_st(set)._includes_(each))._and_((function(){
  382. return smalltalk.withContext(function($ctx3) { return _st(_st(outputSet)._includes_(each))._not();
  383. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  384. if(smalltalk.assert($1)){
  385. return _st(outputSet)._add_(each);
  386. };
  387. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  388. $2=_st(_st(self)._class())._withAll_(_st(outputSet)._asArray());
  389. return $2;
  390. }, function($ctx1) {$ctx1.fill(self,"intersection:",{aCollection:aCollection,set:set,outputSet:outputSet},smalltalk.Collection)})},
  391. messageSends: ["asSet", "new", "do:", "ifTrue:", "add:", "and:", "not", "includes:", "withAll:", "asArray", "class"]}),
  392. smalltalk.Collection);
  393. smalltalk.addMethod(
  394. "_isEmpty",
  395. smalltalk.method({
  396. selector: "isEmpty",
  397. fn: function (){
  398. var self=this;
  399. return smalltalk.withContext(function($ctx1) { var $1;
  400. $1=_st(_st(self)._size()).__eq((0));
  401. return $1;
  402. }, function($ctx1) {$ctx1.fill(self,"isEmpty",{},smalltalk.Collection)})},
  403. messageSends: ["=", "size"]}),
  404. smalltalk.Collection);
  405. smalltalk.addMethod(
  406. "_notEmpty",
  407. smalltalk.method({
  408. selector: "notEmpty",
  409. fn: function (){
  410. var self=this;
  411. return smalltalk.withContext(function($ctx1) { var $1;
  412. $1=_st(_st(self)._isEmpty())._not();
  413. return $1;
  414. }, function($ctx1) {$ctx1.fill(self,"notEmpty",{},smalltalk.Collection)})},
  415. messageSends: ["not", "isEmpty"]}),
  416. smalltalk.Collection);
  417. smalltalk.addMethod(
  418. "_occurrencesOf_",
  419. smalltalk.method({
  420. selector: "occurrencesOf:",
  421. fn: function (anObject){
  422. var self=this;
  423. var tally;
  424. return smalltalk.withContext(function($ctx1) { var $1,$2;
  425. tally=(0);
  426. _st(self)._do_((function(each){
  427. return smalltalk.withContext(function($ctx2) { $1=_st(anObject).__eq(each);
  428. if(smalltalk.assert($1)){
  429. tally=_st(tally).__plus((1));
  430. return tally;
  431. };
  432. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  433. $2=tally;
  434. return $2;
  435. }, function($ctx1) {$ctx1.fill(self,"occurrencesOf:",{anObject:anObject,tally:tally},smalltalk.Collection)})},
  436. messageSends: ["do:", "ifTrue:", "+", "="]}),
  437. smalltalk.Collection);
  438. smalltalk.addMethod(
  439. "_putOn_",
  440. smalltalk.method({
  441. selector: "putOn:",
  442. fn: function (aStream){
  443. var self=this;
  444. return smalltalk.withContext(function($ctx1) { _st(self)._do_((function(each){
  445. return smalltalk.withContext(function($ctx2) { return _st(each)._putOn_(aStream);
  446. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  447. return self}, function($ctx1) {$ctx1.fill(self,"putOn:",{aStream:aStream},smalltalk.Collection)})},
  448. messageSends: ["do:", "putOn:"]}),
  449. smalltalk.Collection);
  450. smalltalk.addMethod(
  451. "_reject_",
  452. smalltalk.method({
  453. selector: "reject:",
  454. fn: function (aBlock){
  455. var self=this;
  456. return smalltalk.withContext(function($ctx1) { var $1;
  457. $1=_st(self)._select_((function(each){
  458. return smalltalk.withContext(function($ctx2) { return _st(_st(aBlock)._value_(each)).__eq(false);
  459. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  460. return $1;
  461. }, function($ctx1) {$ctx1.fill(self,"reject:",{aBlock:aBlock},smalltalk.Collection)})},
  462. messageSends: ["select:", "=", "value:"]}),
  463. smalltalk.Collection);
  464. smalltalk.addMethod(
  465. "_remove_",
  466. smalltalk.method({
  467. selector: "remove:",
  468. fn: function (anObject){
  469. var self=this;
  470. return smalltalk.withContext(function($ctx1) { var $1;
  471. $1=_st(self)._remove_ifAbsent_(anObject,(function(){
  472. return smalltalk.withContext(function($ctx2) { return _st(self)._errorNotFound();
  473. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  474. return $1;
  475. }, function($ctx1) {$ctx1.fill(self,"remove:",{anObject:anObject},smalltalk.Collection)})},
  476. messageSends: ["remove:ifAbsent:", "errorNotFound"]}),
  477. smalltalk.Collection);
  478. smalltalk.addMethod(
  479. "_remove_ifAbsent_",
  480. smalltalk.method({
  481. selector: "remove:ifAbsent:",
  482. fn: function (anObject,aBlock){
  483. var self=this;
  484. return smalltalk.withContext(function($ctx1) { _st(self)._subclassResponsibility();
  485. return self}, function($ctx1) {$ctx1.fill(self,"remove:ifAbsent:",{anObject:anObject,aBlock:aBlock},smalltalk.Collection)})},
  486. messageSends: ["subclassResponsibility"]}),
  487. smalltalk.Collection);
  488. smalltalk.addMethod(
  489. "_select_",
  490. smalltalk.method({
  491. selector: "select:",
  492. fn: function (aBlock){
  493. var self=this;
  494. var stream;
  495. return smalltalk.withContext(function($ctx1) { var $1,$2;
  496. stream=_st(_st(_st(self)._class())._new())._writeStream();
  497. _st(self)._do_((function(each){
  498. return smalltalk.withContext(function($ctx2) { $1=_st(aBlock)._value_(each);
  499. if(smalltalk.assert($1)){
  500. return _st(stream)._nextPut_(each);
  501. };
  502. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  503. $2=_st(stream)._contents();
  504. return $2;
  505. }, function($ctx1) {$ctx1.fill(self,"select:",{aBlock:aBlock,stream:stream},smalltalk.Collection)})},
  506. messageSends: ["writeStream", "new", "class", "do:", "ifTrue:", "nextPut:", "value:", "contents"]}),
  507. smalltalk.Collection);
  508. smalltalk.addMethod(
  509. "_size",
  510. smalltalk.method({
  511. selector: "size",
  512. fn: function (){
  513. var self=this;
  514. return smalltalk.withContext(function($ctx1) { _st(self)._subclassResponsibility();
  515. return self}, function($ctx1) {$ctx1.fill(self,"size",{},smalltalk.Collection)})},
  516. messageSends: ["subclassResponsibility"]}),
  517. smalltalk.Collection);
  518. smalltalk.addMethod(
  519. "_new_",
  520. smalltalk.method({
  521. selector: "new:",
  522. fn: function (anInteger){
  523. var self=this;
  524. return smalltalk.withContext(function($ctx1) { var $1;
  525. $1=_st(self)._new();
  526. return $1;
  527. }, function($ctx1) {$ctx1.fill(self,"new:",{anInteger:anInteger},smalltalk.Collection.klass)})},
  528. messageSends: ["new"]}),
  529. smalltalk.Collection.klass);
  530. smalltalk.addMethod(
  531. "_with_",
  532. smalltalk.method({
  533. selector: "with:",
  534. fn: function (anObject){
  535. var self=this;
  536. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  537. $2=_st(self)._new();
  538. _st($2)._add_(anObject);
  539. $3=_st($2)._yourself();
  540. $1=$3;
  541. return $1;
  542. }, function($ctx1) {$ctx1.fill(self,"with:",{anObject:anObject},smalltalk.Collection.klass)})},
  543. messageSends: ["add:", "new", "yourself"]}),
  544. smalltalk.Collection.klass);
  545. smalltalk.addMethod(
  546. "_with_with_",
  547. smalltalk.method({
  548. selector: "with:with:",
  549. fn: function (anObject,anotherObject){
  550. var self=this;
  551. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  552. $2=_st(self)._new();
  553. _st($2)._add_(anObject);
  554. _st($2)._add_(anotherObject);
  555. $3=_st($2)._yourself();
  556. $1=$3;
  557. return $1;
  558. }, function($ctx1) {$ctx1.fill(self,"with:with:",{anObject:anObject,anotherObject:anotherObject},smalltalk.Collection.klass)})},
  559. messageSends: ["add:", "new", "yourself"]}),
  560. smalltalk.Collection.klass);
  561. smalltalk.addMethod(
  562. "_with_with_with_",
  563. smalltalk.method({
  564. selector: "with:with:with:",
  565. fn: function (firstObject,secondObject,thirdObject){
  566. var self=this;
  567. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  568. $2=_st(self)._new();
  569. _st($2)._add_(firstObject);
  570. _st($2)._add_(secondObject);
  571. _st($2)._add_(thirdObject);
  572. $3=_st($2)._yourself();
  573. $1=$3;
  574. return $1;
  575. }, function($ctx1) {$ctx1.fill(self,"with:with:with:",{firstObject:firstObject,secondObject:secondObject,thirdObject:thirdObject},smalltalk.Collection.klass)})},
  576. messageSends: ["add:", "new", "yourself"]}),
  577. smalltalk.Collection.klass);
  578. smalltalk.addMethod(
  579. "_withAll_",
  580. smalltalk.method({
  581. selector: "withAll:",
  582. fn: function (aCollection){
  583. var self=this;
  584. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  585. $2=_st(self)._new();
  586. _st($2)._addAll_(aCollection);
  587. $3=_st($2)._yourself();
  588. $1=$3;
  589. return $1;
  590. }, function($ctx1) {$ctx1.fill(self,"withAll:",{aCollection:aCollection},smalltalk.Collection.klass)})},
  591. messageSends: ["addAll:", "new", "yourself"]}),
  592. smalltalk.Collection.klass);
  593. smalltalk.addClass('IndexableCollection', smalltalk.Collection, [], 'Kernel-Collections');
  594. smalltalk.addMethod(
  595. "_at_",
  596. smalltalk.method({
  597. selector: "at:",
  598. fn: function (anIndex){
  599. var self=this;
  600. return smalltalk.withContext(function($ctx1) { var $1;
  601. $1=_st(self)._at_ifAbsent_(anIndex,(function(){
  602. return smalltalk.withContext(function($ctx2) { return _st(self)._errorNotFound();
  603. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  604. return $1;
  605. }, function($ctx1) {$ctx1.fill(self,"at:",{anIndex:anIndex},smalltalk.IndexableCollection)})},
  606. messageSends: ["at:ifAbsent:", "errorNotFound"]}),
  607. smalltalk.IndexableCollection);
  608. smalltalk.addMethod(
  609. "_at_ifAbsent_",
  610. smalltalk.method({
  611. selector: "at:ifAbsent:",
  612. fn: function (anIndex,aBlock){
  613. var self=this;
  614. return smalltalk.withContext(function($ctx1) { _st(self)._subclassReponsibility();
  615. return self}, function($ctx1) {$ctx1.fill(self,"at:ifAbsent:",{anIndex:anIndex,aBlock:aBlock},smalltalk.IndexableCollection)})},
  616. messageSends: ["subclassReponsibility"]}),
  617. smalltalk.IndexableCollection);
  618. smalltalk.addMethod(
  619. "_at_ifPresent_",
  620. smalltalk.method({
  621. selector: "at:ifPresent:",
  622. fn: function (anIndex,aBlock){
  623. var self=this;
  624. return smalltalk.withContext(function($ctx1) { var $1;
  625. $1=_st(self)._at_ifPresent_ifAbsent_(anIndex,aBlock,(function(){
  626. return smalltalk.withContext(function($ctx2) { return nil;
  627. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  628. return $1;
  629. }, function($ctx1) {$ctx1.fill(self,"at:ifPresent:",{anIndex:anIndex,aBlock:aBlock},smalltalk.IndexableCollection)})},
  630. messageSends: ["at:ifPresent:ifAbsent:"]}),
  631. smalltalk.IndexableCollection);
  632. smalltalk.addMethod(
  633. "_at_ifPresent_ifAbsent_",
  634. smalltalk.method({
  635. selector: "at:ifPresent:ifAbsent:",
  636. fn: function (anIndex,aBlock,anotherBlock){
  637. var self=this;
  638. return smalltalk.withContext(function($ctx1) { _st(self)._subclassReponsibility();
  639. return self}, function($ctx1) {$ctx1.fill(self,"at:ifPresent:ifAbsent:",{anIndex:anIndex,aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.IndexableCollection)})},
  640. messageSends: ["subclassReponsibility"]}),
  641. smalltalk.IndexableCollection);
  642. smalltalk.addMethod(
  643. "_at_put_",
  644. smalltalk.method({
  645. selector: "at:put:",
  646. fn: function (anIndex,anObject){
  647. var self=this;
  648. return smalltalk.withContext(function($ctx1) { _st(self)._subclassReponsibility();
  649. return self}, function($ctx1) {$ctx1.fill(self,"at:put:",{anIndex:anIndex,anObject:anObject},smalltalk.IndexableCollection)})},
  650. messageSends: ["subclassReponsibility"]}),
  651. smalltalk.IndexableCollection);
  652. smalltalk.addMethod(
  653. "_indexOf_",
  654. smalltalk.method({
  655. selector: "indexOf:",
  656. fn: function (anObject){
  657. var self=this;
  658. return smalltalk.withContext(function($ctx1) { var $1;
  659. $1=_st(self)._indexOf_ifAbsent_(anObject,(function(){
  660. return smalltalk.withContext(function($ctx2) { return _st(self)._errorNotFound();
  661. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  662. return $1;
  663. }, function($ctx1) {$ctx1.fill(self,"indexOf:",{anObject:anObject},smalltalk.IndexableCollection)})},
  664. messageSends: ["indexOf:ifAbsent:", "errorNotFound"]}),
  665. smalltalk.IndexableCollection);
  666. smalltalk.addMethod(
  667. "_indexOf_ifAbsent_",
  668. smalltalk.method({
  669. selector: "indexOf:ifAbsent:",
  670. fn: function (anObject,aBlock){
  671. var self=this;
  672. return smalltalk.withContext(function($ctx1) { _st(self)._subclassResponsibility();
  673. return self}, function($ctx1) {$ctx1.fill(self,"indexOf:ifAbsent:",{anObject:anObject,aBlock:aBlock},smalltalk.IndexableCollection)})},
  674. messageSends: ["subclassResponsibility"]}),
  675. smalltalk.IndexableCollection);
  676. smalltalk.addMethod(
  677. "_with_do_",
  678. smalltalk.method({
  679. selector: "with:do:",
  680. fn: function (anotherCollection,aBlock){
  681. var self=this;
  682. return smalltalk.withContext(function($ctx1) { _st(self)._withIndexDo_((function(each,index){
  683. return smalltalk.withContext(function($ctx2) { return _st(aBlock)._value_value_(each,_st(anotherCollection)._at_(index));
  684. }, function($ctx2) {$ctx2.fillBlock({each:each,index:index},$ctx1)})}));
  685. return self}, function($ctx1) {$ctx1.fill(self,"with:do:",{anotherCollection:anotherCollection,aBlock:aBlock},smalltalk.IndexableCollection)})},
  686. messageSends: ["withIndexDo:", "value:value:", "at:"]}),
  687. smalltalk.IndexableCollection);
  688. smalltalk.addMethod(
  689. "_withIndexDo_",
  690. smalltalk.method({
  691. selector: "withIndexDo:",
  692. fn: function (aBlock){
  693. var self=this;
  694. return smalltalk.withContext(function($ctx1) { _st(self)._subclassReponsibility();
  695. return self}, function($ctx1) {$ctx1.fill(self,"withIndexDo:",{aBlock:aBlock},smalltalk.IndexableCollection)})},
  696. messageSends: ["subclassReponsibility"]}),
  697. smalltalk.IndexableCollection);
  698. smalltalk.addClass('HashedCollection', smalltalk.IndexableCollection, [], 'Kernel-Collections');
  699. smalltalk.addMethod(
  700. "__comma",
  701. smalltalk.method({
  702. selector: ",",
  703. fn: function (aCollection){
  704. var self=this;
  705. return smalltalk.withContext(function($ctx1) { _st(self)._shouldNotImplement();
  706. return self}, function($ctx1) {$ctx1.fill(self,",",{aCollection:aCollection},smalltalk.HashedCollection)})},
  707. messageSends: ["shouldNotImplement"]}),
  708. smalltalk.HashedCollection);
  709. smalltalk.addMethod(
  710. "__eq",
  711. smalltalk.method({
  712. selector: "=",
  713. fn: function (aHashedCollection){
  714. var self=this;
  715. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  716. $1=_st(_st(self)._class()).__eq(_st(aHashedCollection)._class());
  717. if(! smalltalk.assert($1)){
  718. return false;
  719. };
  720. $2=_st(_st(self)._size()).__eq(_st(aHashedCollection)._size());
  721. if(! smalltalk.assert($2)){
  722. return false;
  723. };
  724. $3=_st(_st(self)._associations()).__eq(_st(aHashedCollection)._associations());
  725. return $3;
  726. }, function($ctx1) {$ctx1.fill(self,"=",{aHashedCollection:aHashedCollection},smalltalk.HashedCollection)})},
  727. messageSends: ["ifFalse:", "=", "class", "size", "associations"]}),
  728. smalltalk.HashedCollection);
  729. smalltalk.addMethod(
  730. "_add_",
  731. smalltalk.method({
  732. selector: "add:",
  733. fn: function (anAssociation){
  734. var self=this;
  735. return smalltalk.withContext(function($ctx1) { _st(self)._at_put_(_st(anAssociation)._key(),_st(anAssociation)._value());
  736. return self}, function($ctx1) {$ctx1.fill(self,"add:",{anAssociation:anAssociation},smalltalk.HashedCollection)})},
  737. messageSends: ["at:put:", "key", "value"]}),
  738. smalltalk.HashedCollection);
  739. smalltalk.addMethod(
  740. "_addAll_",
  741. smalltalk.method({
  742. selector: "addAll:",
  743. fn: function (aHashedCollection){
  744. var self=this;
  745. return smalltalk.withContext(function($ctx1) { var $1;
  746. smalltalk.IndexableCollection.fn.prototype._addAll_.apply(_st(self), [_st(aHashedCollection)._associations()]);
  747. $1=aHashedCollection;
  748. return $1;
  749. }, function($ctx1) {$ctx1.fill(self,"addAll:",{aHashedCollection:aHashedCollection},smalltalk.HashedCollection)})},
  750. messageSends: ["addAll:", "associations"]}),
  751. smalltalk.HashedCollection);
  752. smalltalk.addMethod(
  753. "_asDictionary",
  754. smalltalk.method({
  755. selector: "asDictionary",
  756. fn: function (){
  757. var self=this;
  758. return smalltalk.withContext(function($ctx1) { var $1;
  759. $1=_st((smalltalk.Dictionary || Dictionary))._fromPairs_(_st(self)._associations());
  760. return $1;
  761. }, function($ctx1) {$ctx1.fill(self,"asDictionary",{},smalltalk.HashedCollection)})},
  762. messageSends: ["fromPairs:", "associations"]}),
  763. smalltalk.HashedCollection);
  764. smalltalk.addMethod(
  765. "_asJSON",
  766. smalltalk.method({
  767. selector: "asJSON",
  768. fn: function (){
  769. var self=this;
  770. var c;
  771. return smalltalk.withContext(function($ctx1) { var $1;
  772. c=_st(_st(self)._class())._new();
  773. _st(self)._keysAndValuesDo_((function(key,value){
  774. return smalltalk.withContext(function($ctx2) { return _st(c)._at_put_(key,_st(value)._asJSON());
  775. }, function($ctx2) {$ctx2.fillBlock({key:key,value:value},$ctx1)})}));
  776. $1=c;
  777. return $1;
  778. }, function($ctx1) {$ctx1.fill(self,"asJSON",{c:c},smalltalk.HashedCollection)})},
  779. messageSends: ["new", "class", "keysAndValuesDo:", "at:put:", "asJSON"]}),
  780. smalltalk.HashedCollection);
  781. smalltalk.addMethod(
  782. "_associations",
  783. smalltalk.method({
  784. selector: "associations",
  785. fn: function (){
  786. var self=this;
  787. var associations;
  788. return smalltalk.withContext(function($ctx1) { var $1;
  789. associations=[];
  790. _st(self)._associationsDo_((function(each){
  791. return smalltalk.withContext(function($ctx2) { return _st(associations)._add_(each);
  792. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  793. $1=associations;
  794. return $1;
  795. }, function($ctx1) {$ctx1.fill(self,"associations",{associations:associations},smalltalk.HashedCollection)})},
  796. messageSends: ["associationsDo:", "add:"]}),
  797. smalltalk.HashedCollection);
  798. smalltalk.addMethod(
  799. "_associationsDo_",
  800. smalltalk.method({
  801. selector: "associationsDo:",
  802. fn: function (aBlock){
  803. var self=this;
  804. return smalltalk.withContext(function($ctx1) { _st(self)._keysAndValuesDo_((function(key,value){
  805. return smalltalk.withContext(function($ctx2) { return _st(aBlock)._value_(_st((smalltalk.Association || Association))._key_value_(key,value));
  806. }, function($ctx2) {$ctx2.fillBlock({key:key,value:value},$ctx1)})}));
  807. return self}, function($ctx1) {$ctx1.fill(self,"associationsDo:",{aBlock:aBlock},smalltalk.HashedCollection)})},
  808. messageSends: ["keysAndValuesDo:", "value:", "key:value:"]}),
  809. smalltalk.HashedCollection);
  810. smalltalk.addMethod(
  811. "_at_ifAbsent_",
  812. smalltalk.method({
  813. selector: "at:ifAbsent:",
  814. fn: function (aKey,aBlock){
  815. var self=this;
  816. return smalltalk.withContext(function($ctx1) { var $2,$1;
  817. $2=_st(self)._includesKey_(aKey);
  818. $1=_st($2)._ifTrue_ifFalse_((function(){
  819. return smalltalk.withContext(function($ctx2) { return _st(self)._basicAt_(aKey);
  820. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),aBlock);
  821. return $1;
  822. }, function($ctx1) {$ctx1.fill(self,"at:ifAbsent:",{aKey:aKey,aBlock:aBlock},smalltalk.HashedCollection)})},
  823. messageSends: ["ifTrue:ifFalse:", "basicAt:", "includesKey:"]}),
  824. smalltalk.HashedCollection);
  825. smalltalk.addMethod(
  826. "_at_ifAbsentPut_",
  827. smalltalk.method({
  828. selector: "at:ifAbsentPut:",
  829. fn: function (aKey,aBlock){
  830. var self=this;
  831. return smalltalk.withContext(function($ctx1) { var $1;
  832. $1=_st(self)._at_ifAbsent_(aKey,(function(){
  833. return smalltalk.withContext(function($ctx2) { return _st(self)._at_put_(aKey,_st(aBlock)._value());
  834. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  835. return $1;
  836. }, function($ctx1) {$ctx1.fill(self,"at:ifAbsentPut:",{aKey:aKey,aBlock:aBlock},smalltalk.HashedCollection)})},
  837. messageSends: ["at:ifAbsent:", "at:put:", "value"]}),
  838. smalltalk.HashedCollection);
  839. smalltalk.addMethod(
  840. "_at_ifPresent_ifAbsent_",
  841. smalltalk.method({
  842. selector: "at:ifPresent:ifAbsent:",
  843. fn: function (aKey,aBlock,anotherBlock){
  844. var self=this;
  845. return smalltalk.withContext(function($ctx1) { var $2,$1;
  846. $2=_st(self)._includesKey_(aKey);
  847. $1=_st($2)._ifTrue_ifFalse_((function(){
  848. return smalltalk.withContext(function($ctx2) { return _st(aBlock)._value_(_st(self)._at_(aKey));
  849. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),anotherBlock);
  850. return $1;
  851. }, function($ctx1) {$ctx1.fill(self,"at:ifPresent:ifAbsent:",{aKey:aKey,aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.HashedCollection)})},
  852. messageSends: ["ifTrue:ifFalse:", "value:", "at:", "includesKey:"]}),
  853. smalltalk.HashedCollection);
  854. smalltalk.addMethod(
  855. "_at_put_",
  856. smalltalk.method({
  857. selector: "at:put:",
  858. fn: function (aKey,aValue){
  859. var self=this;
  860. return smalltalk.withContext(function($ctx1) { var $1;
  861. $1=_st(self)._basicAt_put_(aKey,aValue);
  862. return $1;
  863. }, function($ctx1) {$ctx1.fill(self,"at:put:",{aKey:aKey,aValue:aValue},smalltalk.HashedCollection)})},
  864. messageSends: ["basicAt:put:"]}),
  865. smalltalk.HashedCollection);
  866. smalltalk.addMethod(
  867. "_collect_",
  868. smalltalk.method({
  869. selector: "collect:",
  870. fn: function (aBlock){
  871. var self=this;
  872. var newDict;
  873. return smalltalk.withContext(function($ctx1) { var $1;
  874. newDict=_st(_st(self)._class())._new();
  875. _st(self)._keysAndValuesDo_((function(key,value){
  876. return smalltalk.withContext(function($ctx2) { return _st(newDict)._at_put_(key,_st(aBlock)._value_(value));
  877. }, function($ctx2) {$ctx2.fillBlock({key:key,value:value},$ctx1)})}));
  878. $1=newDict;
  879. return $1;
  880. }, function($ctx1) {$ctx1.fill(self,"collect:",{aBlock:aBlock,newDict:newDict},smalltalk.HashedCollection)})},
  881. messageSends: ["new", "class", "keysAndValuesDo:", "at:put:", "value:"]}),
  882. smalltalk.HashedCollection);
  883. smalltalk.addMethod(
  884. "_deepCopy",
  885. smalltalk.method({
  886. selector: "deepCopy",
  887. fn: function (){
  888. var self=this;
  889. var copy;
  890. return smalltalk.withContext(function($ctx1) { var $1;
  891. copy=_st(_st(self)._class())._new();
  892. _st(self)._keysAndValuesDo_((function(key,value){
  893. return smalltalk.withContext(function($ctx2) { return _st(copy)._at_put_(key,_st(value)._deepCopy());
  894. }, function($ctx2) {$ctx2.fillBlock({key:key,value:value},$ctx1)})}));
  895. $1=copy;
  896. return $1;
  897. }, function($ctx1) {$ctx1.fill(self,"deepCopy",{copy:copy},smalltalk.HashedCollection)})},
  898. messageSends: ["new", "class", "keysAndValuesDo:", "at:put:", "deepCopy"]}),
  899. smalltalk.HashedCollection);
  900. smalltalk.addMethod(
  901. "_detect_ifNone_",
  902. smalltalk.method({
  903. selector: "detect:ifNone:",
  904. fn: function (aBlock,anotherBlock){
  905. var self=this;
  906. return smalltalk.withContext(function($ctx1) { var $1;
  907. $1=_st(_st(self)._values())._detect_ifNone_(aBlock,anotherBlock);
  908. return $1;
  909. }, function($ctx1) {$ctx1.fill(self,"detect:ifNone:",{aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.HashedCollection)})},
  910. messageSends: ["detect:ifNone:", "values"]}),
  911. smalltalk.HashedCollection);
  912. smalltalk.addMethod(
  913. "_do_",
  914. smalltalk.method({
  915. selector: "do:",
  916. fn: function (aBlock){
  917. var self=this;
  918. return smalltalk.withContext(function($ctx1) { _st(self)._valuesDo_(aBlock);
  919. return self}, function($ctx1) {$ctx1.fill(self,"do:",{aBlock:aBlock},smalltalk.HashedCollection)})},
  920. messageSends: ["valuesDo:"]}),
  921. smalltalk.HashedCollection);
  922. smalltalk.addMethod(
  923. "_includes_",
  924. smalltalk.method({
  925. selector: "includes:",
  926. fn: function (anObject){
  927. var self=this;
  928. return smalltalk.withContext(function($ctx1) { var $1;
  929. $1=_st(_st(self)._values())._includes_(anObject);
  930. return $1;
  931. }, function($ctx1) {$ctx1.fill(self,"includes:",{anObject:anObject},smalltalk.HashedCollection)})},
  932. messageSends: ["includes:", "values"]}),
  933. smalltalk.HashedCollection);
  934. smalltalk.addMethod(
  935. "_includesKey_",
  936. smalltalk.method({
  937. selector: "includesKey:",
  938. fn: function (aKey){
  939. var self=this;
  940. return smalltalk.withContext(function($ctx1) { return self.hasOwnProperty(aKey);
  941. return self}, function($ctx1) {$ctx1.fill(self,"includesKey:",{aKey:aKey},smalltalk.HashedCollection)})},
  942. messageSends: []}),
  943. smalltalk.HashedCollection);
  944. smalltalk.addMethod(
  945. "_indexOf_ifAbsent_",
  946. smalltalk.method({
  947. selector: "indexOf:ifAbsent:",
  948. fn: function (anObject,aBlock){
  949. var self=this;
  950. return smalltalk.withContext(function($ctx1) { var $1;
  951. $1=_st(_st(self)._keys())._detect_ifNone_((function(each){
  952. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._at_(each)).__eq(anObject);
  953. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),aBlock);
  954. return $1;
  955. }, function($ctx1) {$ctx1.fill(self,"indexOf:ifAbsent:",{anObject:anObject,aBlock:aBlock},smalltalk.HashedCollection)})},
  956. messageSends: ["detect:ifNone:", "=", "at:", "keys"]}),
  957. smalltalk.HashedCollection);
  958. smalltalk.addMethod(
  959. "_keys",
  960. smalltalk.method({
  961. selector: "keys",
  962. fn: function (){
  963. var self=this;
  964. return smalltalk.withContext(function($ctx1) {
  965. if ('function'===typeof Object.keys) return Object.keys(self);
  966. var keys = [];
  967. for(var i in self) {
  968. if(self.hasOwnProperty(i)) {
  969. keys.push(i);
  970. }
  971. };
  972. return keys;
  973. ;
  974. return self}, function($ctx1) {$ctx1.fill(self,"keys",{},smalltalk.HashedCollection)})},
  975. messageSends: []}),
  976. smalltalk.HashedCollection);
  977. smalltalk.addMethod(
  978. "_keysAndValuesDo_",
  979. smalltalk.method({
  980. selector: "keysAndValuesDo:",
  981. fn: function (aBlock){
  982. var self=this;
  983. return smalltalk.withContext(function($ctx1) { _st(self)._keysDo_((function(each){
  984. return smalltalk.withContext(function($ctx2) { return _st(aBlock)._value_value_(each,_st(self)._at_(each));
  985. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  986. return self}, function($ctx1) {$ctx1.fill(self,"keysAndValuesDo:",{aBlock:aBlock},smalltalk.HashedCollection)})},
  987. messageSends: ["keysDo:", "value:value:", "at:"]}),
  988. smalltalk.HashedCollection);
  989. smalltalk.addMethod(
  990. "_keysDo_",
  991. smalltalk.method({
  992. selector: "keysDo:",
  993. fn: function (aBlock){
  994. var self=this;
  995. return smalltalk.withContext(function($ctx1) { _st(_st(self)._keys())._do_(aBlock);
  996. return self}, function($ctx1) {$ctx1.fill(self,"keysDo:",{aBlock:aBlock},smalltalk.HashedCollection)})},
  997. messageSends: ["do:", "keys"]}),
  998. smalltalk.HashedCollection);
  999. smalltalk.addMethod(
  1000. "_printOn_",
  1001. smalltalk.method({
  1002. selector: "printOn:",
  1003. fn: function (aStream){
  1004. var self=this;
  1005. return smalltalk.withContext(function($ctx1) { smalltalk.IndexableCollection.fn.prototype._printOn_.apply(_st(self), [aStream]);
  1006. _st(aStream)._nextPutAll_(" (");
  1007. _st(_st(self)._associations())._do_separatedBy_((function(each){
  1008. return smalltalk.withContext(function($ctx2) { return _st(each)._printOn_(aStream);
  1009. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
  1010. return smalltalk.withContext(function($ctx2) { return _st(aStream)._nextPutAll_(" , ");
  1011. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1012. _st(aStream)._nextPutAll_(")");
  1013. return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.HashedCollection)})},
  1014. messageSends: ["printOn:", "nextPutAll:", "do:separatedBy:", "associations"]}),
  1015. smalltalk.HashedCollection);
  1016. smalltalk.addMethod(
  1017. "_remove_ifAbsent_",
  1018. smalltalk.method({
  1019. selector: "remove:ifAbsent:",
  1020. fn: function (aKey,aBlock){
  1021. var self=this;
  1022. return smalltalk.withContext(function($ctx1) { var $1;
  1023. $1=_st(self)._removeKey_ifAbsent_(aKey,aBlock);
  1024. return $1;
  1025. }, function($ctx1) {$ctx1.fill(self,"remove:ifAbsent:",{aKey:aKey,aBlock:aBlock},smalltalk.HashedCollection)})},
  1026. messageSends: ["removeKey:ifAbsent:"]}),
  1027. smalltalk.HashedCollection);
  1028. smalltalk.addMethod(
  1029. "_removeKey_",
  1030. smalltalk.method({
  1031. selector: "removeKey:",
  1032. fn: function (aKey){
  1033. var self=this;
  1034. return smalltalk.withContext(function($ctx1) { var $1;
  1035. $1=_st(self)._remove_(aKey);
  1036. return $1;
  1037. }, function($ctx1) {$ctx1.fill(self,"removeKey:",{aKey:aKey},smalltalk.HashedCollection)})},
  1038. messageSends: ["remove:"]}),
  1039. smalltalk.HashedCollection);
  1040. smalltalk.addMethod(
  1041. "_removeKey_ifAbsent_",
  1042. smalltalk.method({
  1043. selector: "removeKey:ifAbsent:",
  1044. fn: function (aKey,aBlock){
  1045. var self=this;
  1046. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1047. $2=_st(self)._includesKey_(aKey);
  1048. if(smalltalk.assert($2)){
  1049. $1=_st(self)._basicDelete_(aKey);
  1050. } else {
  1051. $1=_st(aBlock)._value();
  1052. };
  1053. return $1;
  1054. }, function($ctx1) {$ctx1.fill(self,"removeKey:ifAbsent:",{aKey:aKey,aBlock:aBlock},smalltalk.HashedCollection)})},
  1055. messageSends: ["ifFalse:ifTrue:", "value", "basicDelete:", "includesKey:"]}),
  1056. smalltalk.HashedCollection);
  1057. smalltalk.addMethod(
  1058. "_select_",
  1059. smalltalk.method({
  1060. selector: "select:",
  1061. fn: function (aBlock){
  1062. var self=this;
  1063. var newDict;
  1064. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1065. newDict=_st(_st(self)._class())._new();
  1066. _st(self)._keysAndValuesDo_((function(key,value){
  1067. return smalltalk.withContext(function($ctx2) { $1=_st(aBlock)._value_(value);
  1068. if(smalltalk.assert($1)){
  1069. return _st(newDict)._at_put_(key,value);
  1070. };
  1071. }, function($ctx2) {$ctx2.fillBlock({key:key,value:value},$ctx1)})}));
  1072. $2=newDict;
  1073. return $2;
  1074. }, function($ctx1) {$ctx1.fill(self,"select:",{aBlock:aBlock,newDict:newDict},smalltalk.HashedCollection)})},
  1075. messageSends: ["new", "class", "keysAndValuesDo:", "ifTrue:", "at:put:", "value:"]}),
  1076. smalltalk.HashedCollection);
  1077. smalltalk.addMethod(
  1078. "_shallowCopy",
  1079. smalltalk.method({
  1080. selector: "shallowCopy",
  1081. fn: function (){
  1082. var self=this;
  1083. var copy;
  1084. return smalltalk.withContext(function($ctx1) { var $1;
  1085. copy=_st(_st(self)._class())._new();
  1086. _st(self)._keysAndValuesDo_((function(key,value){
  1087. return smalltalk.withContext(function($ctx2) { return _st(copy)._at_put_(key,value);
  1088. }, function($ctx2) {$ctx2.fillBlock({key:key,value:value},$ctx1)})}));
  1089. $1=copy;
  1090. return $1;
  1091. }, function($ctx1) {$ctx1.fill(self,"shallowCopy",{copy:copy},smalltalk.HashedCollection)})},
  1092. messageSends: ["new", "class", "keysAndValuesDo:", "at:put:"]}),
  1093. smalltalk.HashedCollection);
  1094. smalltalk.addMethod(
  1095. "_size",
  1096. smalltalk.method({
  1097. selector: "size",
  1098. fn: function (){
  1099. var self=this;
  1100. return smalltalk.withContext(function($ctx1) { var $1;
  1101. $1=_st(_st(self)._keys())._size();
  1102. return $1;
  1103. }, function($ctx1) {$ctx1.fill(self,"size",{},smalltalk.HashedCollection)})},
  1104. messageSends: ["size", "keys"]}),
  1105. smalltalk.HashedCollection);
  1106. smalltalk.addMethod(
  1107. "_values",
  1108. smalltalk.method({
  1109. selector: "values",
  1110. fn: function (){
  1111. var self=this;
  1112. return smalltalk.withContext(function($ctx1) { var $1;
  1113. $1=_st(_st(self)._keys())._collect_((function(each){
  1114. return smalltalk.withContext(function($ctx2) { return _st(self)._at_(each);
  1115. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  1116. return $1;
  1117. }, function($ctx1) {$ctx1.fill(self,"values",{},smalltalk.HashedCollection)})},
  1118. messageSends: ["collect:", "at:", "keys"]}),
  1119. smalltalk.HashedCollection);
  1120. smalltalk.addMethod(
  1121. "_valuesDo_",
  1122. smalltalk.method({
  1123. selector: "valuesDo:",
  1124. fn: function (aBlock){
  1125. var self=this;
  1126. return smalltalk.withContext(function($ctx1) { _st(self)._keysAndValuesDo_((function(key,value){
  1127. return smalltalk.withContext(function($ctx2) { return _st(aBlock)._value_(value);
  1128. }, function($ctx2) {$ctx2.fillBlock({key:key,value:value},$ctx1)})}));
  1129. return self}, function($ctx1) {$ctx1.fill(self,"valuesDo:",{aBlock:aBlock},smalltalk.HashedCollection)})},
  1130. messageSends: ["keysAndValuesDo:", "value:"]}),
  1131. smalltalk.HashedCollection);
  1132. smalltalk.addMethod(
  1133. "_withIndexDo_",
  1134. smalltalk.method({
  1135. selector: "withIndexDo:",
  1136. fn: function (aBlock){
  1137. var self=this;
  1138. return smalltalk.withContext(function($ctx1) { _st(self)._keysAndValuesDo_((function(key,value){
  1139. return smalltalk.withContext(function($ctx2) { return _st(aBlock)._value_value_(value,key);
  1140. }, function($ctx2) {$ctx2.fillBlock({key:key,value:value},$ctx1)})}));
  1141. return self}, function($ctx1) {$ctx1.fill(self,"withIndexDo:",{aBlock:aBlock},smalltalk.HashedCollection)})},
  1142. messageSends: ["keysAndValuesDo:", "value:value:"]}),
  1143. smalltalk.HashedCollection);
  1144. smalltalk.addMethod(
  1145. "_fromPairs_",
  1146. smalltalk.method({
  1147. selector: "fromPairs:",
  1148. fn: function (aCollection){
  1149. var self=this;
  1150. var dict;
  1151. return smalltalk.withContext(function($ctx1) { var $1;
  1152. dict=_st(self)._new();
  1153. _st(aCollection)._do_((function(each){
  1154. return smalltalk.withContext(function($ctx2) { return _st(dict)._add_(each);
  1155. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  1156. $1=dict;
  1157. return $1;
  1158. }, function($ctx1) {$ctx1.fill(self,"fromPairs:",{aCollection:aCollection,dict:dict},smalltalk.HashedCollection.klass)})},
  1159. messageSends: ["new", "do:", "add:"]}),
  1160. smalltalk.HashedCollection.klass);
  1161. smalltalk.addClass('Dictionary', smalltalk.HashedCollection, ['keys', 'values'], 'Kernel-Collections');
  1162. smalltalk.addMethod(
  1163. "_asHashedCollection",
  1164. smalltalk.method({
  1165. selector: "asHashedCollection",
  1166. fn: function (){
  1167. var self=this;
  1168. return smalltalk.withContext(function($ctx1) { var $1;
  1169. $1=_st((smalltalk.HashedCollection || HashedCollection))._fromPairs_(_st(self)._associations());
  1170. return $1;
  1171. }, function($ctx1) {$ctx1.fill(self,"asHashedCollection",{},smalltalk.Dictionary)})},
  1172. messageSends: ["fromPairs:", "associations"]}),
  1173. smalltalk.Dictionary);
  1174. smalltalk.addMethod(
  1175. "_asJSON",
  1176. smalltalk.method({
  1177. selector: "asJSON",
  1178. fn: function (){
  1179. var self=this;
  1180. return smalltalk.withContext(function($ctx1) { var $1;
  1181. $1=_st(_st(self)._asHashedCollection())._asJSON();
  1182. return $1;
  1183. }, function($ctx1) {$ctx1.fill(self,"asJSON",{},smalltalk.Dictionary)})},
  1184. messageSends: ["asJSON", "asHashedCollection"]}),
  1185. smalltalk.Dictionary);
  1186. smalltalk.addMethod(
  1187. "_at_ifAbsent_",
  1188. smalltalk.method({
  1189. selector: "at:ifAbsent:",
  1190. fn: function (aKey,aBlock){
  1191. var self=this;
  1192. return smalltalk.withContext(function($ctx1) {
  1193. var index = self._positionOfKey_(aKey);
  1194. return index >=0 ? self['@values'][index] : aBlock();
  1195. ;
  1196. return self}, function($ctx1) {$ctx1.fill(self,"at:ifAbsent:",{aKey:aKey,aBlock:aBlock},smalltalk.Dictionary)})},
  1197. messageSends: []}),
  1198. smalltalk.Dictionary);
  1199. smalltalk.addMethod(
  1200. "_at_put_",
  1201. smalltalk.method({
  1202. selector: "at:put:",
  1203. fn: function (aKey,aValue){
  1204. var self=this;
  1205. return smalltalk.withContext(function($ctx1) {
  1206. var index = self._positionOfKey_(aKey);
  1207. if(index === -1) {
  1208. var keys = self['@keys'];
  1209. index = keys.length;
  1210. keys.push(aKey);
  1211. }
  1212. return self['@values'][index] = aValue;
  1213. ;
  1214. return self}, function($ctx1) {$ctx1.fill(self,"at:put:",{aKey:aKey,aValue:aValue},smalltalk.Dictionary)})},
  1215. messageSends: []}),
  1216. smalltalk.Dictionary);
  1217. smalltalk.addMethod(
  1218. "_includesKey_",
  1219. smalltalk.method({
  1220. selector: "includesKey:",
  1221. fn: function (aKey){
  1222. var self=this;
  1223. return smalltalk.withContext(function($ctx1) { return self._positionOfKey_(aKey) >= 0; ;
  1224. return self}, function($ctx1) {$ctx1.fill(self,"includesKey:",{aKey:aKey},smalltalk.Dictionary)})},
  1225. messageSends: []}),
  1226. smalltalk.Dictionary);
  1227. smalltalk.addMethod(
  1228. "_indexOf_ifAbsent_",
  1229. smalltalk.method({
  1230. selector: "indexOf:ifAbsent:",
  1231. fn: function (anObject,aBlock){
  1232. var self=this;
  1233. var index;
  1234. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1235. index=_st(self["@values"])._indexOf_ifAbsent_(anObject,(function(){
  1236. return smalltalk.withContext(function($ctx2) { return (0);
  1237. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1238. $2=_st(index).__eq((0));
  1239. if(smalltalk.assert($2)){
  1240. $1=_st(aBlock)._value();
  1241. } else {
  1242. $1=_st(self["@keys"])._at_(index);
  1243. };
  1244. return $1;
  1245. }, function($ctx1) {$ctx1.fill(self,"indexOf:ifAbsent:",{anObject:anObject,aBlock:aBlock,index:index},smalltalk.Dictionary)})},
  1246. messageSends: ["indexOf:ifAbsent:", "ifTrue:ifFalse:", "value", "at:", "="]}),
  1247. smalltalk.Dictionary);
  1248. smalltalk.addMethod(
  1249. "_initialize",
  1250. smalltalk.method({
  1251. selector: "initialize",
  1252. fn: function (){
  1253. var self=this;
  1254. return smalltalk.withContext(function($ctx1) { smalltalk.HashedCollection.fn.prototype._initialize.apply(_st(self), []);
  1255. self["@keys"]=[];
  1256. self["@values"]=[];
  1257. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.Dictionary)})},
  1258. messageSends: ["initialize"]}),
  1259. smalltalk.Dictionary);
  1260. smalltalk.addMethod(
  1261. "_keys",
  1262. smalltalk.method({
  1263. selector: "keys",
  1264. fn: function (){
  1265. var self=this;
  1266. return smalltalk.withContext(function($ctx1) { var $1;
  1267. $1=_st(self["@keys"])._copy();
  1268. return $1;
  1269. }, function($ctx1) {$ctx1.fill(self,"keys",{},smalltalk.Dictionary)})},
  1270. messageSends: ["copy"]}),
  1271. smalltalk.Dictionary);
  1272. smalltalk.addMethod(
  1273. "_keysAndValuesDo_",
  1274. smalltalk.method({
  1275. selector: "keysAndValuesDo:",
  1276. fn: function (aBlock){
  1277. var self=this;
  1278. return smalltalk.withContext(function($ctx1) { var $1;
  1279. $1=_st(self["@keys"])._with_do_(self["@values"],aBlock);
  1280. return $1;
  1281. }, function($ctx1) {$ctx1.fill(self,"keysAndValuesDo:",{aBlock:aBlock},smalltalk.Dictionary)})},
  1282. messageSends: ["with:do:"]}),
  1283. smalltalk.Dictionary);
  1284. smalltalk.addMethod(
  1285. "_keysDo_",
  1286. smalltalk.method({
  1287. selector: "keysDo:",
  1288. fn: function (aBlock){
  1289. var self=this;
  1290. return smalltalk.withContext(function($ctx1) { var $1;
  1291. $1=_st(self["@keys"])._do_(aBlock);
  1292. return $1;
  1293. }, function($ctx1) {$ctx1.fill(self,"keysDo:",{aBlock:aBlock},smalltalk.Dictionary)})},
  1294. messageSends: ["do:"]}),
  1295. smalltalk.Dictionary);
  1296. smalltalk.addMethod(
  1297. "_positionOfKey_",
  1298. smalltalk.method({
  1299. selector: "positionOfKey:",
  1300. fn: function (anObject){
  1301. var self=this;
  1302. return smalltalk.withContext(function($ctx1) {
  1303. var keys = self['@keys'];
  1304. for(var i=0;i<keys.length;i++){
  1305. if(keys[i].__eq(anObject)) { return i;}
  1306. }
  1307. return -1;
  1308. ;
  1309. return self}, function($ctx1) {$ctx1.fill(self,"positionOfKey:",{anObject:anObject},smalltalk.Dictionary)})},
  1310. messageSends: []}),
  1311. smalltalk.Dictionary);
  1312. smalltalk.addMethod(
  1313. "_removeKey_ifAbsent_",
  1314. smalltalk.method({
  1315. selector: "removeKey:ifAbsent:",
  1316. fn: function (aKey,aBlock){
  1317. var self=this;
  1318. return smalltalk.withContext(function($ctx1) {
  1319. var index = self._positionOfKey_(aKey);
  1320. if(index === -1) {
  1321. return aBlock()
  1322. } else {
  1323. var keys = self['@keys'], values = self['@values'];
  1324. var value = values[index], l = keys.length;
  1325. keys[index] = keys[l-1];
  1326. keys.pop();
  1327. values[index] = values[l-1];
  1328. values.pop();
  1329. return value;
  1330. }
  1331. ;
  1332. return self}, function($ctx1) {$ctx1.fill(self,"removeKey:ifAbsent:",{aKey:aKey,aBlock:aBlock},smalltalk.Dictionary)})},
  1333. messageSends: []}),
  1334. smalltalk.Dictionary);
  1335. smalltalk.addMethod(
  1336. "_values",
  1337. smalltalk.method({
  1338. selector: "values",
  1339. fn: function (){
  1340. var self=this;
  1341. return smalltalk.withContext(function($ctx1) { var $1;
  1342. $1=_st(self["@values"])._copy();
  1343. return $1;
  1344. }, function($ctx1) {$ctx1.fill(self,"values",{},smalltalk.Dictionary)})},
  1345. messageSends: ["copy"]}),
  1346. smalltalk.Dictionary);
  1347. smalltalk.addMethod(
  1348. "_valuesDo_",
  1349. smalltalk.method({
  1350. selector: "valuesDo:",
  1351. fn: function (aBlock){
  1352. var self=this;
  1353. return smalltalk.withContext(function($ctx1) { var $1;
  1354. $1=_st(self["@values"])._do_(aBlock);
  1355. return $1;
  1356. }, function($ctx1) {$ctx1.fill(self,"valuesDo:",{aBlock:aBlock},smalltalk.Dictionary)})},
  1357. messageSends: ["do:"]}),
  1358. smalltalk.Dictionary);
  1359. smalltalk.addClass('SequenceableCollection', smalltalk.IndexableCollection, [], 'Kernel-Collections');
  1360. smalltalk.addMethod(
  1361. "__eq",
  1362. smalltalk.method({
  1363. selector: "=",
  1364. fn: function (aCollection){
  1365. var self=this;
  1366. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1367. var $early={};
  1368. try {
  1369. $1=_st(_st(_st(self)._class()).__eq(_st(aCollection)._class()))._and_((function(){
  1370. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._size()).__eq(_st(aCollection)._size());
  1371. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1372. if(! smalltalk.assert($1)){
  1373. return false;
  1374. };
  1375. _st(self)._withIndexDo_((function(each,i){
  1376. return smalltalk.withContext(function($ctx2) { $2=_st(_st(aCollection)._at_(i)).__eq(each);
  1377. if(! smalltalk.assert($2)){
  1378. throw $early=[false];
  1379. };
  1380. }, function($ctx2) {$ctx2.fillBlock({each:each,i:i},$ctx1)})}));
  1381. return true;
  1382. }
  1383. catch(e) {if(e===$early)return e[0]; throw e}
  1384. }, function($ctx1) {$ctx1.fill(self,"=",{aCollection:aCollection},smalltalk.SequenceableCollection)})},
  1385. messageSends: ["ifFalse:", "and:", "=", "size", "class", "withIndexDo:", "at:"]}),
  1386. smalltalk.SequenceableCollection);
  1387. smalltalk.addMethod(
  1388. "_addLast_",
  1389. smalltalk.method({
  1390. selector: "addLast:",
  1391. fn: function (anObject){
  1392. var self=this;
  1393. return smalltalk.withContext(function($ctx1) { _st(self)._add_(anObject);
  1394. return self}, function($ctx1) {$ctx1.fill(self,"addLast:",{anObject:anObject},smalltalk.SequenceableCollection)})},
  1395. messageSends: ["add:"]}),
  1396. smalltalk.SequenceableCollection);
  1397. smalltalk.addMethod(
  1398. "_allButFirst",
  1399. smalltalk.method({
  1400. selector: "allButFirst",
  1401. fn: function (){
  1402. var self=this;
  1403. return smalltalk.withContext(function($ctx1) { var $1;
  1404. $1=_st(self)._copyFrom_to_((2),_st(self)._size());
  1405. return $1;
  1406. }, function($ctx1) {$ctx1.fill(self,"allButFirst",{},smalltalk.SequenceableCollection)})},
  1407. messageSends: ["copyFrom:to:", "size"]}),
  1408. smalltalk.SequenceableCollection);
  1409. smalltalk.addMethod(
  1410. "_allButLast",
  1411. smalltalk.method({
  1412. selector: "allButLast",
  1413. fn: function (){
  1414. var self=this;
  1415. return smalltalk.withContext(function($ctx1) { var $1;
  1416. $1=_st(self)._copyFrom_to_((1),_st(_st(self)._size()).__minus((1)));
  1417. return $1;
  1418. }, function($ctx1) {$ctx1.fill(self,"allButLast",{},smalltalk.SequenceableCollection)})},
  1419. messageSends: ["copyFrom:to:", "-", "size"]}),
  1420. smalltalk.SequenceableCollection);
  1421. smalltalk.addMethod(
  1422. "_atRandom",
  1423. smalltalk.method({
  1424. selector: "atRandom",
  1425. fn: function (){
  1426. var self=this;
  1427. return smalltalk.withContext(function($ctx1) { var $1;
  1428. $1=_st(self)._at_(_st(_st(self)._size())._atRandom());
  1429. return $1;
  1430. }, function($ctx1) {$ctx1.fill(self,"atRandom",{},smalltalk.SequenceableCollection)})},
  1431. messageSends: ["at:", "atRandom", "size"]}),
  1432. smalltalk.SequenceableCollection);
  1433. smalltalk.addMethod(
  1434. "_copyFrom_to_",
  1435. smalltalk.method({
  1436. selector: "copyFrom:to:",
  1437. fn: function (anIndex,anotherIndex){
  1438. var self=this;
  1439. var range,newCollection;
  1440. return smalltalk.withContext(function($ctx1) { var $1;
  1441. range=_st(anIndex)._to_(anotherIndex);
  1442. newCollection=_st(_st(self)._class())._new_(_st(range)._size());
  1443. _st(range)._withIndexDo_((function(each,i){
  1444. return smalltalk.withContext(function($ctx2) { return _st(newCollection)._at_put_(i,_st(self)._at_(each));
  1445. }, function($ctx2) {$ctx2.fillBlock({each:each,i:i},$ctx1)})}));
  1446. $1=newCollection;
  1447. return $1;
  1448. }, function($ctx1) {$ctx1.fill(self,"copyFrom:to:",{anIndex:anIndex,anotherIndex:anotherIndex,range:range,newCollection:newCollection},smalltalk.SequenceableCollection)})},
  1449. messageSends: ["to:", "new:", "size", "class", "withIndexDo:", "at:put:", "at:"]}),
  1450. smalltalk.SequenceableCollection);
  1451. smalltalk.addMethod(
  1452. "_deepCopy",
  1453. smalltalk.method({
  1454. selector: "deepCopy",
  1455. fn: function (){
  1456. var self=this;
  1457. var newCollection;
  1458. return smalltalk.withContext(function($ctx1) { var $1;
  1459. newCollection=_st(_st(self)._class())._new_(_st(self)._size());
  1460. _st(self)._withIndexDo_((function(each,index){
  1461. return smalltalk.withContext(function($ctx2) { return _st(newCollection)._at_put_(index,_st(each)._deepCopy());
  1462. }, function($ctx2) {$ctx2.fillBlock({each:each,index:index},$ctx1)})}));
  1463. $1=newCollection;
  1464. return $1;
  1465. }, function($ctx1) {$ctx1.fill(self,"deepCopy",{newCollection:newCollection},smalltalk.SequenceableCollection)})},
  1466. messageSends: ["new:", "size", "class", "withIndexDo:", "at:put:", "deepCopy"]}),
  1467. smalltalk.SequenceableCollection);
  1468. smalltalk.addMethod(
  1469. "_detect_ifNone_",
  1470. smalltalk.method({
  1471. selector: "detect:ifNone:",
  1472. fn: function (aBlock,anotherBlock){
  1473. var self=this;
  1474. return smalltalk.withContext(function($ctx1) {
  1475. for(var i = 0; i < self.length; i++)
  1476. if(aBlock(self[i]))
  1477. return self[i];
  1478. return anotherBlock();
  1479. ;
  1480. return self}, function($ctx1) {$ctx1.fill(self,"detect:ifNone:",{aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.SequenceableCollection)})},
  1481. messageSends: []}),
  1482. smalltalk.SequenceableCollection);
  1483. smalltalk.addMethod(
  1484. "_do_",
  1485. smalltalk.method({
  1486. selector: "do:",
  1487. fn: function (aBlock){
  1488. var self=this;
  1489. return smalltalk.withContext(function($ctx1) { for(var i=0;i<self.length;i++){aBlock(self[i]);};
  1490. return self}, function($ctx1) {$ctx1.fill(self,"do:",{aBlock:aBlock},smalltalk.SequenceableCollection)})},
  1491. messageSends: []}),
  1492. smalltalk.SequenceableCollection);
  1493. smalltalk.addMethod(
  1494. "_first",
  1495. smalltalk.method({
  1496. selector: "first",
  1497. fn: function (){
  1498. var self=this;
  1499. return smalltalk.withContext(function($ctx1) { var $1;
  1500. $1=_st(self)._at_((1));
  1501. return $1;
  1502. }, function($ctx1) {$ctx1.fill(self,"first",{},smalltalk.SequenceableCollection)})},
  1503. messageSends: ["at:"]}),
  1504. smalltalk.SequenceableCollection);
  1505. smalltalk.addMethod(
  1506. "_first_",
  1507. smalltalk.method({
  1508. selector: "first:",
  1509. fn: function (n){
  1510. var self=this;
  1511. return smalltalk.withContext(function($ctx1) { var $1;
  1512. $1=_st(self)._copyFrom_to_((1),n);
  1513. return $1;
  1514. }, function($ctx1) {$ctx1.fill(self,"first:",{n:n},smalltalk.SequenceableCollection)})},
  1515. messageSends: ["copyFrom:to:"]}),
  1516. smalltalk.SequenceableCollection);
  1517. smalltalk.addMethod(
  1518. "_fourth",
  1519. smalltalk.method({
  1520. selector: "fourth",
  1521. fn: function (){
  1522. var self=this;
  1523. return smalltalk.withContext(function($ctx1) { var $1;
  1524. $1=_st(self)._at_((4));
  1525. return $1;
  1526. }, function($ctx1) {$ctx1.fill(self,"fourth",{},smalltalk.SequenceableCollection)})},
  1527. messageSends: ["at:"]}),
  1528. smalltalk.SequenceableCollection);
  1529. smalltalk.addMethod(
  1530. "_includes_",
  1531. smalltalk.method({
  1532. selector: "includes:",
  1533. fn: function (anObject){
  1534. var self=this;
  1535. return smalltalk.withContext(function($ctx1) { var $1;
  1536. $1=_st(_st(self)._indexOf_ifAbsent_(anObject,(function(){
  1537. return smalltalk.withContext(function($ctx2) { return nil;
  1538. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})))._notNil();
  1539. return $1;
  1540. }, function($ctx1) {$ctx1.fill(self,"includes:",{anObject:anObject},smalltalk.SequenceableCollection)})},
  1541. messageSends: ["notNil", "indexOf:ifAbsent:"]}),
  1542. smalltalk.SequenceableCollection);
  1543. smalltalk.addMethod(
  1544. "_indexOf_ifAbsent_",
  1545. smalltalk.method({
  1546. selector: "indexOf:ifAbsent:",
  1547. fn: function (anObject,aBlock){
  1548. var self=this;
  1549. return smalltalk.withContext(function($ctx1) {
  1550. for(var i=0;i<self.length;i++) {
  1551. if(self[i].__eq(anObject)) {return i+1}
  1552. };
  1553. return aBlock();
  1554. ;
  1555. return self}, function($ctx1) {$ctx1.fill(self,"indexOf:ifAbsent:",{anObject:anObject,aBlock:aBlock},smalltalk.SequenceableCollection)})},
  1556. messageSends: []}),
  1557. smalltalk.SequenceableCollection);
  1558. smalltalk.addMethod(
  1559. "_indexOf_startingAt_",
  1560. smalltalk.method({
  1561. selector: "indexOf:startingAt:",
  1562. fn: function (anObject,start){
  1563. var self=this;
  1564. return smalltalk.withContext(function($ctx1) { var $1;
  1565. $1=_st(self)._indexOf_startingAt_ifAbsent_(anObject,start,(function(){
  1566. return smalltalk.withContext(function($ctx2) { return (0);
  1567. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1568. return $1;
  1569. }, function($ctx1) {$ctx1.fill(self,"indexOf:startingAt:",{anObject:anObject,start:start},smalltalk.SequenceableCollection)})},
  1570. messageSends: ["indexOf:startingAt:ifAbsent:"]}),
  1571. smalltalk.SequenceableCollection);
  1572. smalltalk.addMethod(
  1573. "_indexOf_startingAt_ifAbsent_",
  1574. smalltalk.method({
  1575. selector: "indexOf:startingAt:ifAbsent:",
  1576. fn: function (anObject,start,aBlock){
  1577. var self=this;
  1578. return smalltalk.withContext(function($ctx1) {
  1579. for(var i=start-1;i<self.length;i++){
  1580. if(self[i].__eq(anObject)) {return i+1}
  1581. }
  1582. return aBlock();
  1583. ;
  1584. return self}, function($ctx1) {$ctx1.fill(self,"indexOf:startingAt:ifAbsent:",{anObject:anObject,start:start,aBlock:aBlock},smalltalk.SequenceableCollection)})},
  1585. messageSends: []}),
  1586. smalltalk.SequenceableCollection);
  1587. smalltalk.addMethod(
  1588. "_last",
  1589. smalltalk.method({
  1590. selector: "last",
  1591. fn: function (){
  1592. var self=this;
  1593. return smalltalk.withContext(function($ctx1) { var $1;
  1594. $1=_st(self)._at_(_st(self)._size());
  1595. return $1;
  1596. }, function($ctx1) {$ctx1.fill(self,"last",{},smalltalk.SequenceableCollection)})},
  1597. messageSends: ["at:", "size"]}),
  1598. smalltalk.SequenceableCollection);
  1599. smalltalk.addMethod(
  1600. "_newStream",
  1601. smalltalk.method({
  1602. selector: "newStream",
  1603. fn: function (){
  1604. var self=this;
  1605. return smalltalk.withContext(function($ctx1) { var $1;
  1606. $1=_st(_st(self)._streamClass())._on_(self);
  1607. return $1;
  1608. }, function($ctx1) {$ctx1.fill(self,"newStream",{},smalltalk.SequenceableCollection)})},
  1609. messageSends: ["on:", "streamClass"]}),
  1610. smalltalk.SequenceableCollection);
  1611. smalltalk.addMethod(
  1612. "_readStream",
  1613. smalltalk.method({
  1614. selector: "readStream",
  1615. fn: function (){
  1616. var self=this;
  1617. return smalltalk.withContext(function($ctx1) { var $1;
  1618. $1=_st(self)._stream();
  1619. return $1;
  1620. }, function($ctx1) {$ctx1.fill(self,"readStream",{},smalltalk.SequenceableCollection)})},
  1621. messageSends: ["stream"]}),
  1622. smalltalk.SequenceableCollection);
  1623. smalltalk.addMethod(
  1624. "_removeLast",
  1625. smalltalk.method({
  1626. selector: "removeLast",
  1627. fn: function (){
  1628. var self=this;
  1629. return smalltalk.withContext(function($ctx1) { _st(self)._remove_(_st(self)._last());
  1630. return self}, function($ctx1) {$ctx1.fill(self,"removeLast",{},smalltalk.SequenceableCollection)})},
  1631. messageSends: ["remove:", "last"]}),
  1632. smalltalk.SequenceableCollection);
  1633. smalltalk.addMethod(
  1634. "_reversed",
  1635. smalltalk.method({
  1636. selector: "reversed",
  1637. fn: function (){
  1638. var self=this;
  1639. return smalltalk.withContext(function($ctx1) { _st(self)._subclassResponsibility();
  1640. return self}, function($ctx1) {$ctx1.fill(self,"reversed",{},smalltalk.SequenceableCollection)})},
  1641. messageSends: ["subclassResponsibility"]}),
  1642. smalltalk.SequenceableCollection);
  1643. smalltalk.addMethod(
  1644. "_second",
  1645. smalltalk.method({
  1646. selector: "second",
  1647. fn: function (){
  1648. var self=this;
  1649. return smalltalk.withContext(function($ctx1) { var $1;
  1650. $1=_st(self)._at_((2));
  1651. return $1;
  1652. }, function($ctx1) {$ctx1.fill(self,"second",{},smalltalk.SequenceableCollection)})},
  1653. messageSends: ["at:"]}),
  1654. smalltalk.SequenceableCollection);
  1655. smalltalk.addMethod(
  1656. "_shallowCopy",
  1657. smalltalk.method({
  1658. selector: "shallowCopy",
  1659. fn: function (){
  1660. var self=this;
  1661. var newCollection;
  1662. return smalltalk.withContext(function($ctx1) { var $1;
  1663. newCollection=_st(_st(self)._class())._new_(_st(self)._size());
  1664. _st(self)._withIndexDo_((function(each,index){
  1665. return smalltalk.withContext(function($ctx2) { return _st(newCollection)._at_put_(index,each);
  1666. }, function($ctx2) {$ctx2.fillBlock({each:each,index:index},$ctx1)})}));
  1667. $1=newCollection;
  1668. return $1;
  1669. }, function($ctx1) {$ctx1.fill(self,"shallowCopy",{newCollection:newCollection},smalltalk.SequenceableCollection)})},
  1670. messageSends: ["new:", "size", "class", "withIndexDo:", "at:put:"]}),
  1671. smalltalk.SequenceableCollection);
  1672. smalltalk.addMethod(
  1673. "_stream",
  1674. smalltalk.method({
  1675. selector: "stream",
  1676. fn: function (){
  1677. var self=this;
  1678. return smalltalk.withContext(function($ctx1) { var $1;
  1679. $1=_st(self)._newStream();
  1680. return $1;
  1681. }, function($ctx1) {$ctx1.fill(self,"stream",{},smalltalk.SequenceableCollection)})},
  1682. messageSends: ["newStream"]}),
  1683. smalltalk.SequenceableCollection);
  1684. smalltalk.addMethod(
  1685. "_streamClass",
  1686. smalltalk.method({
  1687. selector: "streamClass",
  1688. fn: function (){
  1689. var self=this;
  1690. return smalltalk.withContext(function($ctx1) { var $1;
  1691. $1=_st(_st(self)._class())._streamClass();
  1692. return $1;
  1693. }, function($ctx1) {$ctx1.fill(self,"streamClass",{},smalltalk.SequenceableCollection)})},
  1694. messageSends: ["streamClass", "class"]}),
  1695. smalltalk.SequenceableCollection);
  1696. smalltalk.addMethod(
  1697. "_third",
  1698. smalltalk.method({
  1699. selector: "third",
  1700. fn: function (){
  1701. var self=this;
  1702. return smalltalk.withContext(function($ctx1) { var $1;
  1703. $1=_st(self)._at_((3));
  1704. return $1;
  1705. }, function($ctx1) {$ctx1.fill(self,"third",{},smalltalk.SequenceableCollection)})},
  1706. messageSends: ["at:"]}),
  1707. smalltalk.SequenceableCollection);
  1708. smalltalk.addMethod(
  1709. "_with_do_",
  1710. smalltalk.method({
  1711. selector: "with:do:",
  1712. fn: function (anotherCollection,aBlock){
  1713. var self=this;
  1714. return smalltalk.withContext(function($ctx1) { for(var i=0;i<self.length;i++){aBlock(self[i], anotherCollection[i]);};
  1715. return self}, function($ctx1) {$ctx1.fill(self,"with:do:",{anotherCollection:anotherCollection,aBlock:aBlock},smalltalk.SequenceableCollection)})},
  1716. messageSends: []}),
  1717. smalltalk.SequenceableCollection);
  1718. smalltalk.addMethod(
  1719. "_withIndexDo_",
  1720. smalltalk.method({
  1721. selector: "withIndexDo:",
  1722. fn: function (aBlock){
  1723. var self=this;
  1724. return smalltalk.withContext(function($ctx1) { for(var i=0;i<self.length;i++){aBlock(self[i], i+1);};
  1725. return self}, function($ctx1) {$ctx1.fill(self,"withIndexDo:",{aBlock:aBlock},smalltalk.SequenceableCollection)})},
  1726. messageSends: []}),
  1727. smalltalk.SequenceableCollection);
  1728. smalltalk.addMethod(
  1729. "_writeStream",
  1730. smalltalk.method({
  1731. selector: "writeStream",
  1732. fn: function (){
  1733. var self=this;
  1734. return smalltalk.withContext(function($ctx1) { var $1;
  1735. $1=_st(self)._stream();
  1736. return $1;
  1737. }, function($ctx1) {$ctx1.fill(self,"writeStream",{},smalltalk.SequenceableCollection)})},
  1738. messageSends: ["stream"]}),
  1739. smalltalk.SequenceableCollection);
  1740. smalltalk.addMethod(
  1741. "_streamClass",
  1742. smalltalk.method({
  1743. selector: "streamClass",
  1744. fn: function (){
  1745. var self=this;
  1746. return smalltalk.withContext(function($ctx1) { var $1;
  1747. $1=(smalltalk.Stream || Stream);
  1748. return $1;
  1749. }, function($ctx1) {$ctx1.fill(self,"streamClass",{},smalltalk.SequenceableCollection.klass)})},
  1750. messageSends: []}),
  1751. smalltalk.SequenceableCollection.klass);
  1752. smalltalk.addMethod(
  1753. "_streamContents_",
  1754. smalltalk.method({
  1755. selector: "streamContents:",
  1756. fn: function (aBlock){
  1757. var self=this;
  1758. var stream;
  1759. return smalltalk.withContext(function($ctx1) { var $1;
  1760. stream=_st(_st(self)._streamClass())._on_(_st(self)._new());
  1761. _st(aBlock)._value_(stream);
  1762. $1=_st(stream)._contents();
  1763. return $1;
  1764. }, function($ctx1) {$ctx1.fill(self,"streamContents:",{aBlock:aBlock,stream:stream},smalltalk.SequenceableCollection.klass)})},
  1765. messageSends: ["on:", "new", "streamClass", "value:", "contents"]}),
  1766. smalltalk.SequenceableCollection.klass);
  1767. smalltalk.addClass('Array', smalltalk.SequenceableCollection, [], 'Kernel-Collections');
  1768. smalltalk.addMethod(
  1769. "_add_",
  1770. smalltalk.method({
  1771. selector: "add:",
  1772. fn: function (anObject){
  1773. var self=this;
  1774. return smalltalk.withContext(function($ctx1) { self.push(anObject); return anObject;;
  1775. return self}, function($ctx1) {$ctx1.fill(self,"add:",{anObject:anObject},smalltalk.Array)})},
  1776. messageSends: []}),
  1777. smalltalk.Array);
  1778. smalltalk.addMethod(
  1779. "_asJavascript",
  1780. smalltalk.method({
  1781. selector: "asJavascript",
  1782. fn: function (){
  1783. var self=this;
  1784. return smalltalk.withContext(function($ctx1) { var $1;
  1785. $1=_st(_st("[").__comma(_st(_st(self)._collect_((function(each){
  1786. return smalltalk.withContext(function($ctx2) { return _st(each)._asJavascript();
  1787. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._join_(", "))).__comma("]");
  1788. return $1;
  1789. }, function($ctx1) {$ctx1.fill(self,"asJavascript",{},smalltalk.Array)})},
  1790. messageSends: [",", "join:", "collect:", "asJavascript"]}),
  1791. smalltalk.Array);
  1792. smalltalk.addMethod(
  1793. "_at_ifAbsent_",
  1794. smalltalk.method({
  1795. selector: "at:ifAbsent:",
  1796. fn: function (anIndex,aBlock){
  1797. var self=this;
  1798. return smalltalk.withContext(function($ctx1) {
  1799. if((anIndex < 1) || (self.length < anIndex)) {return aBlock()};
  1800. return self[anIndex - 1];
  1801. ;
  1802. return self}, function($ctx1) {$ctx1.fill(self,"at:ifAbsent:",{anIndex:anIndex,aBlock:aBlock},smalltalk.Array)})},
  1803. messageSends: []}),
  1804. smalltalk.Array);
  1805. smalltalk.addMethod(
  1806. "_at_put_",
  1807. smalltalk.method({
  1808. selector: "at:put:",
  1809. fn: function (anIndex,anObject){
  1810. var self=this;
  1811. return smalltalk.withContext(function($ctx1) { return self[anIndex - 1] = anObject;
  1812. return self}, function($ctx1) {$ctx1.fill(self,"at:put:",{anIndex:anIndex,anObject:anObject},smalltalk.Array)})},
  1813. messageSends: []}),
  1814. smalltalk.Array);
  1815. smalltalk.addMethod(
  1816. "_join_",
  1817. smalltalk.method({
  1818. selector: "join:",
  1819. fn: function (aString){
  1820. var self=this;
  1821. return smalltalk.withContext(function($ctx1) { return self.join(aString);
  1822. return self}, function($ctx1) {$ctx1.fill(self,"join:",{aString:aString},smalltalk.Array)})},
  1823. messageSends: []}),
  1824. smalltalk.Array);
  1825. smalltalk.addMethod(
  1826. "_printOn_",
  1827. smalltalk.method({
  1828. selector: "printOn:",
  1829. fn: function (aStream){
  1830. var self=this;
  1831. return smalltalk.withContext(function($ctx1) { smalltalk.SequenceableCollection.fn.prototype._printOn_.apply(_st(self), [aStream]);
  1832. _st(aStream)._nextPutAll_(" (");
  1833. _st(self)._do_separatedBy_((function(each){
  1834. return smalltalk.withContext(function($ctx2) { return _st(each)._printOn_(aStream);
  1835. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
  1836. return smalltalk.withContext(function($ctx2) { return _st(aStream)._nextPutAll_(" ");
  1837. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1838. _st(aStream)._nextPutAll_(")");
  1839. return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.Array)})},
  1840. messageSends: ["printOn:", "nextPutAll:", "do:separatedBy:"]}),
  1841. smalltalk.Array);
  1842. smalltalk.addMethod(
  1843. "_remove_ifAbsent_",
  1844. smalltalk.method({
  1845. selector: "remove:ifAbsent:",
  1846. fn: function (anObject,aBlock){
  1847. var self=this;
  1848. return smalltalk.withContext(function($ctx1) {
  1849. for(var i=0;i<self.length;i++) {
  1850. if(self[i] == anObject) {
  1851. self.splice(i,1);
  1852. return self;
  1853. }
  1854. };
  1855. aBlock._value();
  1856. ;
  1857. return self}, function($ctx1) {$ctx1.fill(self,"remove:ifAbsent:",{anObject:anObject,aBlock:aBlock},smalltalk.Array)})},
  1858. messageSends: []}),
  1859. smalltalk.Array);
  1860. smalltalk.addMethod(
  1861. "_removeFrom_to_",
  1862. smalltalk.method({
  1863. selector: "removeFrom:to:",
  1864. fn: function (aNumber,anotherNumber){
  1865. var self=this;
  1866. return smalltalk.withContext(function($ctx1) { self.splice(aNumber - 1,anotherNumber - 1);
  1867. return self}, function($ctx1) {$ctx1.fill(self,"removeFrom:to:",{aNumber:aNumber,anotherNumber:anotherNumber},smalltalk.Array)})},
  1868. messageSends: []}),
  1869. smalltalk.Array);
  1870. smalltalk.addMethod(
  1871. "_reversed",
  1872. smalltalk.method({
  1873. selector: "reversed",
  1874. fn: function (){
  1875. var self=this;
  1876. return smalltalk.withContext(function($ctx1) { return self._copy().reverse();
  1877. return self}, function($ctx1) {$ctx1.fill(self,"reversed",{},smalltalk.Array)})},
  1878. messageSends: []}),
  1879. smalltalk.Array);
  1880. smalltalk.addMethod(
  1881. "_size",
  1882. smalltalk.method({
  1883. selector: "size",
  1884. fn: function (){
  1885. var self=this;
  1886. return smalltalk.withContext(function($ctx1) { return self.length;
  1887. return self}, function($ctx1) {$ctx1.fill(self,"size",{},smalltalk.Array)})},
  1888. messageSends: []}),
  1889. smalltalk.Array);
  1890. smalltalk.addMethod(
  1891. "_sort",
  1892. smalltalk.method({
  1893. selector: "sort",
  1894. fn: function (){
  1895. var self=this;
  1896. return smalltalk.withContext(function($ctx1) { var $1;
  1897. $1=_st(self)._basicPerform_("sort");
  1898. return $1;
  1899. }, function($ctx1) {$ctx1.fill(self,"sort",{},smalltalk.Array)})},
  1900. messageSends: ["basicPerform:"]}),
  1901. smalltalk.Array);
  1902. smalltalk.addMethod(
  1903. "_sort_",
  1904. smalltalk.method({
  1905. selector: "sort:",
  1906. fn: function (aBlock){
  1907. var self=this;
  1908. return smalltalk.withContext(function($ctx1) {
  1909. return self.sort(function(a, b) {
  1910. if(aBlock(a,b)) {return -1} else {return 1}
  1911. })
  1912. ;
  1913. return self}, function($ctx1) {$ctx1.fill(self,"sort:",{aBlock:aBlock},smalltalk.Array)})},
  1914. messageSends: []}),
  1915. smalltalk.Array);
  1916. smalltalk.addMethod(
  1917. "_sorted",
  1918. smalltalk.method({
  1919. selector: "sorted",
  1920. fn: function (){
  1921. var self=this;
  1922. return smalltalk.withContext(function($ctx1) { var $1;
  1923. $1=_st(_st(self)._copy())._sort();
  1924. return $1;
  1925. }, function($ctx1) {$ctx1.fill(self,"sorted",{},smalltalk.Array)})},
  1926. messageSends: ["sort", "copy"]}),
  1927. smalltalk.Array);
  1928. smalltalk.addMethod(
  1929. "_sorted_",
  1930. smalltalk.method({
  1931. selector: "sorted:",
  1932. fn: function (aBlock){
  1933. var self=this;
  1934. return smalltalk.withContext(function($ctx1) { var $1;
  1935. $1=_st(_st(self)._copy())._sort_(aBlock);
  1936. return $1;
  1937. }, function($ctx1) {$ctx1.fill(self,"sorted:",{aBlock:aBlock},smalltalk.Array)})},
  1938. messageSends: ["sort:", "copy"]}),
  1939. smalltalk.Array);
  1940. smalltalk.addMethod(
  1941. "_new_",
  1942. smalltalk.method({
  1943. selector: "new:",
  1944. fn: function (anInteger){
  1945. var self=this;
  1946. return smalltalk.withContext(function($ctx1) { return new Array(anInteger);
  1947. return self}, function($ctx1) {$ctx1.fill(self,"new:",{anInteger:anInteger},smalltalk.Array.klass)})},
  1948. messageSends: []}),
  1949. smalltalk.Array.klass);
  1950. smalltalk.addMethod(
  1951. "_with_",
  1952. smalltalk.method({
  1953. selector: "with:",
  1954. fn: function (anObject){
  1955. var self=this;
  1956. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  1957. $2=_st(self)._new_((1));
  1958. _st($2)._at_put_((1),anObject);
  1959. $3=_st($2)._yourself();
  1960. $1=$3;
  1961. return $1;
  1962. }, function($ctx1) {$ctx1.fill(self,"with:",{anObject:anObject},smalltalk.Array.klass)})},
  1963. messageSends: ["at:put:", "new:", "yourself"]}),
  1964. smalltalk.Array.klass);
  1965. smalltalk.addMethod(
  1966. "_with_with_",
  1967. smalltalk.method({
  1968. selector: "with:with:",
  1969. fn: function (anObject,anObject2){
  1970. var self=this;
  1971. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  1972. $2=_st(self)._new_((2));
  1973. _st($2)._at_put_((1),anObject);
  1974. _st($2)._at_put_((2),anObject2);
  1975. $3=_st($2)._yourself();
  1976. $1=$3;
  1977. return $1;
  1978. }, function($ctx1) {$ctx1.fill(self,"with:with:",{anObject:anObject,anObject2:anObject2},smalltalk.Array.klass)})},
  1979. messageSends: ["at:put:", "new:", "yourself"]}),
  1980. smalltalk.Array.klass);
  1981. smalltalk.addMethod(
  1982. "_with_with_with_",
  1983. smalltalk.method({
  1984. selector: "with:with:with:",
  1985. fn: function (anObject,anObject2,anObject3){
  1986. var self=this;
  1987. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  1988. $2=_st(self)._new_((3));
  1989. _st($2)._at_put_((1),anObject);
  1990. _st($2)._at_put_((2),anObject2);
  1991. _st($2)._at_put_((3),anObject3);
  1992. $3=_st($2)._yourself();
  1993. $1=$3;
  1994. return $1;
  1995. }, function($ctx1) {$ctx1.fill(self,"with:with:with:",{anObject:anObject,anObject2:anObject2,anObject3:anObject3},smalltalk.Array.klass)})},
  1996. messageSends: ["at:put:", "new:", "yourself"]}),
  1997. smalltalk.Array.klass);
  1998. smalltalk.addMethod(
  1999. "_withAll_",
  2000. smalltalk.method({
  2001. selector: "withAll:",
  2002. fn: function (aCollection){
  2003. var self=this;
  2004. var instance,index;
  2005. return smalltalk.withContext(function($ctx1) { var $1;
  2006. index=(1);
  2007. instance=_st(self)._new_(_st(aCollection)._size());
  2008. _st(aCollection)._do_((function(each){
  2009. return smalltalk.withContext(function($ctx2) { _st(instance)._at_put_(index,each);
  2010. index=_st(index).__plus((1));
  2011. return index;
  2012. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  2013. $1=instance;
  2014. return $1;
  2015. }, function($ctx1) {$ctx1.fill(self,"withAll:",{aCollection:aCollection,instance:instance,index:index},smalltalk.Array.klass)})},
  2016. messageSends: ["new:", "size", "do:", "at:put:", "+"]}),
  2017. smalltalk.Array.klass);
  2018. smalltalk.addClass('CharacterArray', smalltalk.SequenceableCollection, [], 'Kernel-Collections');
  2019. smalltalk.addMethod(
  2020. "__comma",
  2021. smalltalk.method({
  2022. selector: ",",
  2023. fn: function (aString){
  2024. var self=this;
  2025. return smalltalk.withContext(function($ctx1) { var $1;
  2026. $1=_st(_st(self)._asString()).__comma(_st(aString)._asString());
  2027. return $1;
  2028. }, function($ctx1) {$ctx1.fill(self,",",{aString:aString},smalltalk.CharacterArray)})},
  2029. messageSends: [",", "asString"]}),
  2030. smalltalk.CharacterArray);
  2031. smalltalk.addMethod(
  2032. "_add_",
  2033. smalltalk.method({
  2034. selector: "add:",
  2035. fn: function (anObject){
  2036. var self=this;
  2037. return smalltalk.withContext(function($ctx1) { _st(self)._errorReadOnly();
  2038. return self}, function($ctx1) {$ctx1.fill(self,"add:",{anObject:anObject},smalltalk.CharacterArray)})},
  2039. messageSends: ["errorReadOnly"]}),
  2040. smalltalk.CharacterArray);
  2041. smalltalk.addMethod(
  2042. "_asLowercase",
  2043. smalltalk.method({
  2044. selector: "asLowercase",
  2045. fn: function (){
  2046. var self=this;
  2047. return smalltalk.withContext(function($ctx1) { var $1;
  2048. $1=_st(_st(self)._class())._fromString_(_st(_st(self)._asString())._asLowercase());
  2049. return $1;
  2050. }, function($ctx1) {$ctx1.fill(self,"asLowercase",{},smalltalk.CharacterArray)})},
  2051. messageSends: ["fromString:", "asLowercase", "asString", "class"]}),
  2052. smalltalk.CharacterArray);
  2053. smalltalk.addMethod(
  2054. "_asNumber",
  2055. smalltalk.method({
  2056. selector: "asNumber",
  2057. fn: function (){
  2058. var self=this;
  2059. return smalltalk.withContext(function($ctx1) { var $1;
  2060. $1=_st(_st(self)._asString())._asNumber();
  2061. return $1;
  2062. }, function($ctx1) {$ctx1.fill(self,"asNumber",{},smalltalk.CharacterArray)})},
  2063. messageSends: ["asNumber", "asString"]}),
  2064. smalltalk.CharacterArray);
  2065. smalltalk.addMethod(
  2066. "_asString",
  2067. smalltalk.method({
  2068. selector: "asString",
  2069. fn: function (){
  2070. var self=this;
  2071. return smalltalk.withContext(function($ctx1) { var $1;
  2072. $1=_st(self)._subclassResponsibility();
  2073. return $1;
  2074. }, function($ctx1) {$ctx1.fill(self,"asString",{},smalltalk.CharacterArray)})},
  2075. messageSends: ["subclassResponsibility"]}),
  2076. smalltalk.CharacterArray);
  2077. smalltalk.addMethod(
  2078. "_asSymbol",
  2079. smalltalk.method({
  2080. selector: "asSymbol",
  2081. fn: function (){
  2082. var self=this;
  2083. return smalltalk.withContext(function($ctx1) { var $1;
  2084. $1=_st(self)._asString();
  2085. return $1;
  2086. }, function($ctx1) {$ctx1.fill(self,"asSymbol",{},smalltalk.CharacterArray)})},
  2087. messageSends: ["asString"]}),
  2088. smalltalk.CharacterArray);
  2089. smalltalk.addMethod(
  2090. "_asUppercase",
  2091. smalltalk.method({
  2092. selector: "asUppercase",
  2093. fn: function (){
  2094. var self=this;
  2095. return smalltalk.withContext(function($ctx1) { var $1;
  2096. $1=_st(_st(self)._class())._fromString_(_st(_st(self)._asString())._asUppercase());
  2097. return $1;
  2098. }, function($ctx1) {$ctx1.fill(self,"asUppercase",{},smalltalk.CharacterArray)})},
  2099. messageSends: ["fromString:", "asUppercase", "asString", "class"]}),
  2100. smalltalk.CharacterArray);
  2101. smalltalk.addMethod(
  2102. "_at_put_",
  2103. smalltalk.method({
  2104. selector: "at:put:",
  2105. fn: function (anIndex,anObject){
  2106. var self=this;
  2107. return smalltalk.withContext(function($ctx1) { _st(self)._errorReadOnly();
  2108. return self}, function($ctx1) {$ctx1.fill(self,"at:put:",{anIndex:anIndex,anObject:anObject},smalltalk.CharacterArray)})},
  2109. messageSends: ["errorReadOnly"]}),
  2110. smalltalk.CharacterArray);
  2111. smalltalk.addMethod(
  2112. "_errorReadOnly",
  2113. smalltalk.method({
  2114. selector: "errorReadOnly",
  2115. fn: function (){
  2116. var self=this;
  2117. return smalltalk.withContext(function($ctx1) { _st(self)._error_("Object is read-only");
  2118. return self}, function($ctx1) {$ctx1.fill(self,"errorReadOnly",{},smalltalk.CharacterArray)})},
  2119. messageSends: ["error:"]}),
  2120. smalltalk.CharacterArray);
  2121. smalltalk.addMethod(
  2122. "_printOn_",
  2123. smalltalk.method({
  2124. selector: "printOn:",
  2125. fn: function (aStream){
  2126. var self=this;
  2127. return smalltalk.withContext(function($ctx1) { _st(_st(self)._asString())._printOn_(aStream);
  2128. return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.CharacterArray)})},
  2129. messageSends: ["printOn:", "asString"]}),
  2130. smalltalk.CharacterArray);
  2131. smalltalk.addMethod(
  2132. "_putOn_",
  2133. smalltalk.method({
  2134. selector: "putOn:",
  2135. fn: function (aStream){
  2136. var self=this;
  2137. return smalltalk.withContext(function($ctx1) { _st(aStream)._nextPutString_(self);
  2138. return self}, function($ctx1) {$ctx1.fill(self,"putOn:",{aStream:aStream},smalltalk.CharacterArray)})},
  2139. messageSends: ["nextPutString:"]}),
  2140. smalltalk.CharacterArray);
  2141. smalltalk.addMethod(
  2142. "_remove_",
  2143. smalltalk.method({
  2144. selector: "remove:",
  2145. fn: function (anObject){
  2146. var self=this;
  2147. return smalltalk.withContext(function($ctx1) { _st(self)._errorReadOnly();
  2148. return self}, function($ctx1) {$ctx1.fill(self,"remove:",{anObject:anObject},smalltalk.CharacterArray)})},
  2149. messageSends: ["errorReadOnly"]}),
  2150. smalltalk.CharacterArray);
  2151. smalltalk.addMethod(
  2152. "_fromString_",
  2153. smalltalk.method({
  2154. selector: "fromString:",
  2155. fn: function (aString){
  2156. var self=this;
  2157. return smalltalk.withContext(function($ctx1) { _st(self)._subclassResponsibility();
  2158. return self}, function($ctx1) {$ctx1.fill(self,"fromString:",{aString:aString},smalltalk.CharacterArray.klass)})},
  2159. messageSends: ["subclassResponsibility"]}),
  2160. smalltalk.CharacterArray.klass);
  2161. smalltalk.addClass('String', smalltalk.CharacterArray, [], 'Kernel-Collections');
  2162. smalltalk.addMethod(
  2163. "__comma",
  2164. smalltalk.method({
  2165. selector: ",",
  2166. fn: function (aString){
  2167. var self=this;
  2168. return smalltalk.withContext(function($ctx1) { return self + aString;
  2169. return self}, function($ctx1) {$ctx1.fill(self,",",{aString:aString},smalltalk.String)})},
  2170. messageSends: []}),
  2171. smalltalk.String);
  2172. smalltalk.addMethod(
  2173. "__lt",
  2174. smalltalk.method({
  2175. selector: "<",
  2176. fn: function (aString){
  2177. var self=this;
  2178. return smalltalk.withContext(function($ctx1) { return String(self) < aString._asString();
  2179. return self}, function($ctx1) {$ctx1.fill(self,"<",{aString:aString},smalltalk.String)})},
  2180. messageSends: []}),
  2181. smalltalk.String);
  2182. smalltalk.addMethod(
  2183. "__lt_eq",
  2184. smalltalk.method({
  2185. selector: "<=",
  2186. fn: function (aString){
  2187. var self=this;
  2188. return smalltalk.withContext(function($ctx1) { return String(self) <= aString._asString();
  2189. return self}, function($ctx1) {$ctx1.fill(self,"<=",{aString:aString},smalltalk.String)})},
  2190. messageSends: []}),
  2191. smalltalk.String);
  2192. smalltalk.addMethod(
  2193. "__eq",
  2194. smalltalk.method({
  2195. selector: "=",
  2196. fn: function (aString){
  2197. var self=this;
  2198. return smalltalk.withContext(function($ctx1) {
  2199. if(! aString._isString || ! aString._isString()) {
  2200. return false;
  2201. }
  2202. return String(self) === String(aString)
  2203. ;
  2204. return self}, function($ctx1) {$ctx1.fill(self,"=",{aString:aString},smalltalk.String)})},
  2205. messageSends: []}),
  2206. smalltalk.String);
  2207. smalltalk.addMethod(
  2208. "__eq_eq",
  2209. smalltalk.method({
  2210. selector: "==",
  2211. fn: function (aString){
  2212. var self=this;
  2213. return smalltalk.withContext(function($ctx1) { var $1;
  2214. $1=_st(self).__eq(aString);
  2215. return $1;
  2216. }, function($ctx1) {$ctx1.fill(self,"==",{aString:aString},smalltalk.String)})},
  2217. messageSends: ["="]}),
  2218. smalltalk.String);
  2219. smalltalk.addMethod(
  2220. "__gt",
  2221. smalltalk.method({
  2222. selector: ">",
  2223. fn: function (aString){
  2224. var self=this;
  2225. return smalltalk.withContext(function($ctx1) { return String(self) > aString._asString();
  2226. return self}, function($ctx1) {$ctx1.fill(self,">",{aString:aString},smalltalk.String)})},
  2227. messageSends: []}),
  2228. smalltalk.String);
  2229. smalltalk.addMethod(
  2230. "__gt_eq",
  2231. smalltalk.method({
  2232. selector: ">=",
  2233. fn: function (aString){
  2234. var self=this;
  2235. return smalltalk.withContext(function($ctx1) { return String(self) >= aString._asString();
  2236. return self}, function($ctx1) {$ctx1.fill(self,">=",{aString:aString},smalltalk.String)})},
  2237. messageSends: []}),
  2238. smalltalk.String);
  2239. smalltalk.addMethod(
  2240. "_asJSON",
  2241. smalltalk.method({
  2242. selector: "asJSON",
  2243. fn: function (){
  2244. var self=this;
  2245. return smalltalk.withContext(function($ctx1) { var $1;
  2246. $1=self;
  2247. return $1;
  2248. }, function($ctx1) {$ctx1.fill(self,"asJSON",{},smalltalk.String)})},
  2249. messageSends: []}),
  2250. smalltalk.String);
  2251. smalltalk.addMethod(
  2252. "_asJavaScriptSelector",
  2253. smalltalk.method({
  2254. selector: "asJavaScriptSelector",
  2255. fn: function (){
  2256. var self=this;
  2257. return smalltalk.withContext(function($ctx1) { var $1;
  2258. $1=_st(_st(_st(self)._asSelector())._replace_with_("^_",""))._replace_with_("_.*","");
  2259. return $1;
  2260. }, function($ctx1) {$ctx1.fill(self,"asJavaScriptSelector",{},smalltalk.String)})},
  2261. messageSends: ["replace:with:", "asSelector"]}),
  2262. smalltalk.String);
  2263. smalltalk.addMethod(
  2264. "_asJavascript",
  2265. smalltalk.method({
  2266. selector: "asJavascript",
  2267. fn: function (){
  2268. var self=this;
  2269. return smalltalk.withContext(function($ctx1) {
  2270. if(self.search(/^[a-zA-Z0-9_:.$ ]*$/) == -1)
  2271. return "\"" + self.replace(/[\x00-\x1f"\\\x7f-\x9f]/g, function(ch){var c=ch.charCodeAt(0);return "\\x"+("0"+c.toString(16)).slice(-2)}) + "\"";
  2272. else
  2273. return "\"" + self + "\"";
  2274. ;
  2275. return self}, function($ctx1) {$ctx1.fill(self,"asJavascript",{},smalltalk.String)})},
  2276. messageSends: []}),
  2277. smalltalk.String);
  2278. smalltalk.addMethod(
  2279. "_asLowercase",
  2280. smalltalk.method({
  2281. selector: "asLowercase",
  2282. fn: function (){
  2283. var self=this;
  2284. return smalltalk.withContext(function($ctx1) { return self.toLowerCase();
  2285. return self}, function($ctx1) {$ctx1.fill(self,"asLowercase",{},smalltalk.String)})},
  2286. messageSends: []}),
  2287. smalltalk.String);
  2288. smalltalk.addMethod(
  2289. "_asNumber",
  2290. smalltalk.method({
  2291. selector: "asNumber",
  2292. fn: function (){
  2293. var self=this;
  2294. return smalltalk.withContext(function($ctx1) { return Number(self);
  2295. return self}, function($ctx1) {$ctx1.fill(self,"asNumber",{},smalltalk.String)})},
  2296. messageSends: []}),
  2297. smalltalk.String);
  2298. smalltalk.addMethod(
  2299. "_asRegexp",
  2300. smalltalk.method({
  2301. selector: "asRegexp",
  2302. fn: function (){
  2303. var self=this;
  2304. return smalltalk.withContext(function($ctx1) { var $1;
  2305. $1=_st((smalltalk.RegularExpression || RegularExpression))._fromString_(self);
  2306. return $1;
  2307. }, function($ctx1) {$ctx1.fill(self,"asRegexp",{},smalltalk.String)})},
  2308. messageSends: ["fromString:"]}),
  2309. smalltalk.String);
  2310. smalltalk.addMethod(
  2311. "_asSelector",
  2312. smalltalk.method({
  2313. selector: "asSelector",
  2314. fn: function (){
  2315. var self=this;
  2316. return smalltalk.withContext(function($ctx1) { return smalltalk.selector(self);
  2317. return self}, function($ctx1) {$ctx1.fill(self,"asSelector",{},smalltalk.String)})},
  2318. messageSends: []}),
  2319. smalltalk.String);
  2320. smalltalk.addMethod(
  2321. "_asString",
  2322. smalltalk.method({
  2323. selector: "asString",
  2324. fn: function (){
  2325. var self=this;
  2326. return smalltalk.withContext(function($ctx1) { var $1;
  2327. $1=self;
  2328. return $1;
  2329. }, function($ctx1) {$ctx1.fill(self,"asString",{},smalltalk.String)})},
  2330. messageSends: []}),
  2331. smalltalk.String);
  2332. smalltalk.addMethod(
  2333. "_asSymbol",
  2334. smalltalk.method({
  2335. selector: "asSymbol",
  2336. fn: function (){
  2337. var self=this;
  2338. return smalltalk.withContext(function($ctx1) { var $1;
  2339. $1=self;
  2340. return $1;
  2341. }, function($ctx1) {$ctx1.fill(self,"asSymbol",{},smalltalk.String)})},
  2342. messageSends: []}),
  2343. smalltalk.String);
  2344. smalltalk.addMethod(
  2345. "_asUppercase",
  2346. smalltalk.method({
  2347. selector: "asUppercase",
  2348. fn: function (){
  2349. var self=this;
  2350. return smalltalk.withContext(function($ctx1) { return self.toUpperCase();
  2351. return self}, function($ctx1) {$ctx1.fill(self,"asUppercase",{},smalltalk.String)})},
  2352. messageSends: []}),
  2353. smalltalk.String);
  2354. smalltalk.addMethod(
  2355. "_asciiValue",
  2356. smalltalk.method({
  2357. selector: "asciiValue",
  2358. fn: function (){
  2359. var self=this;
  2360. return smalltalk.withContext(function($ctx1) { return self.charCodeAt(0);;
  2361. return self}, function($ctx1) {$ctx1.fill(self,"asciiValue",{},smalltalk.String)})},
  2362. messageSends: []}),
  2363. smalltalk.String);
  2364. smalltalk.addMethod(
  2365. "_at_ifAbsent_",
  2366. smalltalk.method({
  2367. selector: "at:ifAbsent:",
  2368. fn: function (anIndex,aBlock){
  2369. var self=this;
  2370. return smalltalk.withContext(function($ctx1) { return String(self).charAt(anIndex - 1) || aBlock();
  2371. return self}, function($ctx1) {$ctx1.fill(self,"at:ifAbsent:",{anIndex:anIndex,aBlock:aBlock},smalltalk.String)})},
  2372. messageSends: []}),
  2373. smalltalk.String);
  2374. smalltalk.addMethod(
  2375. "_copyFrom_to_",
  2376. smalltalk.method({
  2377. selector: "copyFrom:to:",
  2378. fn: function (anIndex,anotherIndex){
  2379. var self=this;
  2380. return smalltalk.withContext(function($ctx1) { return self.substring(anIndex - 1, anotherIndex);
  2381. return self}, function($ctx1) {$ctx1.fill(self,"copyFrom:to:",{anIndex:anIndex,anotherIndex:anotherIndex},smalltalk.String)})},
  2382. messageSends: []}),
  2383. smalltalk.String);
  2384. smalltalk.addMethod(
  2385. "_deepCopy",
  2386. smalltalk.method({
  2387. selector: "deepCopy",
  2388. fn: function (){
  2389. var self=this;
  2390. return smalltalk.withContext(function($ctx1) { var $1;
  2391. $1=_st(self)._shallowCopy();
  2392. return $1;
  2393. }, function($ctx1) {$ctx1.fill(self,"deepCopy",{},smalltalk.String)})},
  2394. messageSends: ["shallowCopy"]}),
  2395. smalltalk.String);
  2396. smalltalk.addMethod(
  2397. "_do_",
  2398. smalltalk.method({
  2399. selector: "do:",
  2400. fn: function (aBlock){
  2401. var self=this;
  2402. return smalltalk.withContext(function($ctx1) { for(var i=0;i<self.length;i++){aBlock(self.charAt(i));};
  2403. return self}, function($ctx1) {$ctx1.fill(self,"do:",{aBlock:aBlock},smalltalk.String)})},
  2404. messageSends: []}),
  2405. smalltalk.String);
  2406. smalltalk.addMethod(
  2407. "_escaped",
  2408. smalltalk.method({
  2409. selector: "escaped",
  2410. fn: function (){
  2411. var self=this;
  2412. return smalltalk.withContext(function($ctx1) { return escape(self);
  2413. return self}, function($ctx1) {$ctx1.fill(self,"escaped",{},smalltalk.String)})},
  2414. messageSends: []}),
  2415. smalltalk.String);
  2416. smalltalk.addMethod(
  2417. "_includesSubString_",
  2418. smalltalk.method({
  2419. selector: "includesSubString:",
  2420. fn: function (subString){
  2421. var self=this;
  2422. return smalltalk.withContext(function($ctx1) { return self.indexOf(subString) != -1 ;
  2423. return self}, function($ctx1) {$ctx1.fill(self,"includesSubString:",{subString:subString},smalltalk.String)})},
  2424. messageSends: []}),
  2425. smalltalk.String);
  2426. smalltalk.addMethod(
  2427. "_isImmutable",
  2428. smalltalk.method({
  2429. selector: "isImmutable",
  2430. fn: function (){
  2431. var self=this;
  2432. return smalltalk.withContext(function($ctx1) { return true;
  2433. }, function($ctx1) {$ctx1.fill(self,"isImmutable",{},smalltalk.String)})},
  2434. messageSends: []}),
  2435. smalltalk.String);
  2436. smalltalk.addMethod(
  2437. "_isString",
  2438. smalltalk.method({
  2439. selector: "isString",
  2440. fn: function (){
  2441. var self=this;
  2442. return smalltalk.withContext(function($ctx1) { return true;
  2443. }, function($ctx1) {$ctx1.fill(self,"isString",{},smalltalk.String)})},
  2444. messageSends: []}),
  2445. smalltalk.String);
  2446. smalltalk.addMethod(
  2447. "_isVowel",
  2448. smalltalk.method({
  2449. selector: "isVowel",
  2450. fn: function (){
  2451. var self=this;
  2452. return smalltalk.withContext(function($ctx1) { var $1;
  2453. $1=_st(_st(_st(self)._size()).__eq((1)))._and_((function(){
  2454. return smalltalk.withContext(function($ctx2) { return _st("aeiou")._includes_(_st(self)._asLowercase());
  2455. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2456. return $1;
  2457. }, function($ctx1) {$ctx1.fill(self,"isVowel",{},smalltalk.String)})},
  2458. messageSends: ["and:", "includes:", "asLowercase", "=", "size"]}),
  2459. smalltalk.String);
  2460. smalltalk.addMethod(
  2461. "_join_",
  2462. smalltalk.method({
  2463. selector: "join:",
  2464. fn: function (aCollection){
  2465. var self=this;
  2466. return smalltalk.withContext(function($ctx1) { var $1;
  2467. $1=_st((smalltalk.String || String))._streamContents_((function(stream){
  2468. return smalltalk.withContext(function($ctx2) { return _st(aCollection)._do_separatedBy_((function(each){
  2469. return smalltalk.withContext(function($ctx3) { return _st(stream)._nextPutAll_(_st(each)._asString());
  2470. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}),(function(){
  2471. return smalltalk.withContext(function($ctx3) { return _st(stream)._nextPutAll_(self);
  2472. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2473. }, function($ctx2) {$ctx2.fillBlock({stream:stream},$ctx1)})}));
  2474. return $1;
  2475. }, function($ctx1) {$ctx1.fill(self,"join:",{aCollection:aCollection},smalltalk.String)})},
  2476. messageSends: ["streamContents:", "do:separatedBy:", "nextPutAll:", "asString"]}),
  2477. smalltalk.String);
  2478. smalltalk.addMethod(
  2479. "_lineIndicesDo_",
  2480. smalltalk.method({
  2481. selector: "lineIndicesDo:",
  2482. fn: function (aBlock){
  2483. var self=this;
  2484. var cr,lf,start,sz,nextLF,nextCR;
  2485. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  2486. var $early={};
  2487. try {
  2488. start=(1);
  2489. sz=_st(self)._size();
  2490. cr=_st((smalltalk.String || String))._cr();
  2491. nextCR=_st(self)._indexOf_startingAt_(cr,(1));
  2492. lf=_st((smalltalk.String || String))._lf();
  2493. nextLF=_st(self)._indexOf_startingAt_(lf,(1));
  2494. _st((function(){
  2495. return smalltalk.withContext(function($ctx2) { return _st(start).__lt_eq(sz);
  2496. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileTrue_((function(){
  2497. return smalltalk.withContext(function($ctx2) { $1=_st(_st(nextLF).__eq((0)))._and_((function(){
  2498. return smalltalk.withContext(function($ctx3) { return _st(nextCR).__eq((0));
  2499. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2500. if(smalltalk.assert($1)){
  2501. _st(aBlock)._value_value_value_(start,sz,sz);
  2502. $2=self;
  2503. throw $early=[$2];
  2504. };
  2505. $3=_st(_st(nextCR).__eq((0)))._or_((function(){
  2506. return smalltalk.withContext(function($ctx3) { return _st(_st((0)).__lt(nextLF))._and_((function(){
  2507. return smalltalk.withContext(function($ctx4) { return _st(nextLF).__lt(nextCR);
  2508. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  2509. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2510. if(smalltalk.assert($3)){
  2511. _st(aBlock)._value_value_value_(start,_st(nextLF).__minus((1)),nextLF);
  2512. start=_st((1)).__plus(nextLF);
  2513. start;
  2514. nextLF=_st(self)._indexOf_startingAt_(lf,start);
  2515. return nextLF;
  2516. } else {
  2517. $4=_st(_st((1)).__plus(nextCR)).__eq(nextLF);
  2518. if(smalltalk.assert($4)){
  2519. _st(aBlock)._value_value_value_(start,_st(nextCR).__minus((1)),nextLF);
  2520. start=_st((1)).__plus(nextLF);
  2521. start;
  2522. nextCR=_st(self)._indexOf_startingAt_(cr,start);
  2523. nextCR;
  2524. nextLF=_st(self)._indexOf_startingAt_(lf,start);
  2525. return nextLF;
  2526. } else {
  2527. _st(aBlock)._value_value_value_(start,_st(nextCR).__minus((1)),nextCR);
  2528. start=_st((1)).__plus(nextCR);
  2529. start;
  2530. nextCR=_st(self)._indexOf_startingAt_(cr,start);
  2531. return nextCR;
  2532. };
  2533. };
  2534. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2535. return self}
  2536. catch(e) {if(e===$early)return e[0]; throw e}
  2537. }, function($ctx1) {$ctx1.fill(self,"lineIndicesDo:",{aBlock:aBlock,cr:cr,lf:lf,start:start,sz:sz,nextLF:nextLF,nextCR:nextCR},smalltalk.String)})},
  2538. messageSends: ["size", "cr", "indexOf:startingAt:", "lf", "whileTrue:", "ifTrue:", "value:value:value:", "and:", "=", "ifTrue:ifFalse:", "-", "+", "or:", "<", "<="]}),
  2539. smalltalk.String);
  2540. smalltalk.addMethod(
  2541. "_lineNumber_",
  2542. smalltalk.method({
  2543. selector: "lineNumber:",
  2544. fn: function (anIndex){
  2545. var self=this;
  2546. var lineCount;
  2547. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2548. var $early={};
  2549. try {
  2550. lineCount=(0);
  2551. _st(self)._lineIndicesDo_((function(start,endWithoutDelimiters,end){
  2552. return smalltalk.withContext(function($ctx2) { lineCount=_st(lineCount).__plus((1));
  2553. $1=_st(lineCount).__eq(anIndex);
  2554. if(smalltalk.assert($1)){
  2555. $2=_st(self)._copyFrom_to_(start,endWithoutDelimiters);
  2556. throw $early=[$2];
  2557. };
  2558. }, function($ctx2) {$ctx2.fillBlock({start:start,endWithoutDelimiters:endWithoutDelimiters,end:end},$ctx1)})}));
  2559. return nil;
  2560. }
  2561. catch(e) {if(e===$early)return e[0]; throw e}
  2562. }, function($ctx1) {$ctx1.fill(self,"lineNumber:",{anIndex:anIndex,lineCount:lineCount},smalltalk.String)})},
  2563. messageSends: ["lineIndicesDo:", "ifTrue:", "copyFrom:to:", "=", "+"]}),
  2564. smalltalk.String);
  2565. smalltalk.addMethod(
  2566. "_lines",
  2567. smalltalk.method({
  2568. selector: "lines",
  2569. fn: function (){
  2570. var self=this;
  2571. var lines;
  2572. return smalltalk.withContext(function($ctx1) { var $1;
  2573. lines=_st((smalltalk.Array || Array))._new();
  2574. _st(self)._linesDo_((function(aLine){
  2575. return smalltalk.withContext(function($ctx2) { return _st(lines)._add_(aLine);
  2576. }, function($ctx2) {$ctx2.fillBlock({aLine:aLine},$ctx1)})}));
  2577. $1=lines;
  2578. return $1;
  2579. }, function($ctx1) {$ctx1.fill(self,"lines",{lines:lines},smalltalk.String)})},
  2580. messageSends: ["new", "linesDo:", "add:"]}),
  2581. smalltalk.String);
  2582. smalltalk.addMethod(
  2583. "_linesDo_",
  2584. smalltalk.method({
  2585. selector: "linesDo:",
  2586. fn: function (aBlock){
  2587. var self=this;
  2588. return smalltalk.withContext(function($ctx1) { _st(self)._lineIndicesDo_((function(start,endWithoutDelimiters,end){
  2589. return smalltalk.withContext(function($ctx2) { return _st(aBlock)._value_(_st(self)._copyFrom_to_(start,endWithoutDelimiters));
  2590. }, function($ctx2) {$ctx2.fillBlock({start:start,endWithoutDelimiters:endWithoutDelimiters,end:end},$ctx1)})}));
  2591. return self}, function($ctx1) {$ctx1.fill(self,"linesDo:",{aBlock:aBlock},smalltalk.String)})},
  2592. messageSends: ["lineIndicesDo:", "value:", "copyFrom:to:"]}),
  2593. smalltalk.String);
  2594. smalltalk.addMethod(
  2595. "_match_",
  2596. smalltalk.method({
  2597. selector: "match:",
  2598. fn: function (aRegexp){
  2599. var self=this;
  2600. return smalltalk.withContext(function($ctx1) { return self.search(aRegexp) != -1;
  2601. return self}, function($ctx1) {$ctx1.fill(self,"match:",{aRegexp:aRegexp},smalltalk.String)})},
  2602. messageSends: []}),
  2603. smalltalk.String);
  2604. smalltalk.addMethod(
  2605. "_matchesOf_",
  2606. smalltalk.method({
  2607. selector: "matchesOf:",
  2608. fn: function (aRegularExpression){
  2609. var self=this;
  2610. return smalltalk.withContext(function($ctx1) { return self.match(aRegularExpression);
  2611. return self}, function($ctx1) {$ctx1.fill(self,"matchesOf:",{aRegularExpression:aRegularExpression},smalltalk.String)})},
  2612. messageSends: []}),
  2613. smalltalk.String);
  2614. smalltalk.addMethod(
  2615. "_printNl",
  2616. smalltalk.method({
  2617. selector: "printNl",
  2618. fn: function (){
  2619. var self=this;
  2620. return smalltalk.withContext(function($ctx1) { console.log(self);
  2621. return self}, function($ctx1) {$ctx1.fill(self,"printNl",{},smalltalk.String)})},
  2622. messageSends: []}),
  2623. smalltalk.String);
  2624. smalltalk.addMethod(
  2625. "_printOn_",
  2626. smalltalk.method({
  2627. selector: "printOn:",
  2628. fn: function (aStream){
  2629. var self=this;
  2630. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2631. $1=aStream;
  2632. _st($1)._nextPutAll_("'");
  2633. _st($1)._nextPutAll_(self);
  2634. $2=_st($1)._nextPutAll_("'");
  2635. return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.String)})},
  2636. messageSends: ["nextPutAll:"]}),
  2637. smalltalk.String);
  2638. smalltalk.addMethod(
  2639. "_replace_with_",
  2640. smalltalk.method({
  2641. selector: "replace:with:",
  2642. fn: function (aString,anotherString){
  2643. var self=this;
  2644. return smalltalk.withContext(function($ctx1) { var $1;
  2645. $1=_st(self)._replaceRegexp_with_(_st((smalltalk.RegularExpression || RegularExpression))._fromString_flag_(aString,"g"),anotherString);
  2646. return $1;
  2647. }, function($ctx1) {$ctx1.fill(self,"replace:with:",{aString:aString,anotherString:anotherString},smalltalk.String)})},
  2648. messageSends: ["replaceRegexp:with:", "fromString:flag:"]}),
  2649. smalltalk.String);
  2650. smalltalk.addMethod(
  2651. "_replaceRegexp_with_",
  2652. smalltalk.method({
  2653. selector: "replaceRegexp:with:",
  2654. fn: function (aRegexp,aString){
  2655. var self=this;
  2656. return smalltalk.withContext(function($ctx1) { return self.replace(aRegexp, aString);
  2657. return self}, function($ctx1) {$ctx1.fill(self,"replaceRegexp:with:",{aRegexp:aRegexp,aString:aString},smalltalk.String)})},
  2658. messageSends: []}),
  2659. smalltalk.String);
  2660. smalltalk.addMethod(
  2661. "_reversed",
  2662. smalltalk.method({
  2663. selector: "reversed",
  2664. fn: function (){
  2665. var self=this;
  2666. return smalltalk.withContext(function($ctx1) { return self.split("").reverse().join("");
  2667. return self}, function($ctx1) {$ctx1.fill(self,"reversed",{},smalltalk.String)})},
  2668. messageSends: []}),
  2669. smalltalk.String);
  2670. smalltalk.addMethod(
  2671. "_shallowCopy",
  2672. smalltalk.method({
  2673. selector: "shallowCopy",
  2674. fn: function (){
  2675. var self=this;
  2676. return smalltalk.withContext(function($ctx1) { var $1;
  2677. $1=_st(_st(self)._class())._fromString_(self);
  2678. return $1;
  2679. }, function($ctx1) {$ctx1.fill(self,"shallowCopy",{},smalltalk.String)})},
  2680. messageSends: ["fromString:", "class"]}),
  2681. smalltalk.String);
  2682. smalltalk.addMethod(
  2683. "_size",
  2684. smalltalk.method({
  2685. selector: "size",
  2686. fn: function (){
  2687. var self=this;
  2688. return smalltalk.withContext(function($ctx1) { return self.length;
  2689. return self}, function($ctx1) {$ctx1.fill(self,"size",{},smalltalk.String)})},
  2690. messageSends: []}),
  2691. smalltalk.String);
  2692. smalltalk.addMethod(
  2693. "_tokenize_",
  2694. smalltalk.method({
  2695. selector: "tokenize:",
  2696. fn: function (aString){
  2697. var self=this;
  2698. return smalltalk.withContext(function($ctx1) { return self.split(aString);
  2699. return self}, function($ctx1) {$ctx1.fill(self,"tokenize:",{aString:aString},smalltalk.String)})},
  2700. messageSends: []}),
  2701. smalltalk.String);
  2702. smalltalk.addMethod(
  2703. "_trimBoth",
  2704. smalltalk.method({
  2705. selector: "trimBoth",
  2706. fn: function (){
  2707. var self=this;
  2708. return smalltalk.withContext(function($ctx1) { var $1;
  2709. $1=_st(self)._trimBoth_("\x5cs");
  2710. return $1;
  2711. }, function($ctx1) {$ctx1.fill(self,"trimBoth",{},smalltalk.String)})},
  2712. messageSends: ["trimBoth:"]}),
  2713. smalltalk.String);
  2714. smalltalk.addMethod(
  2715. "_trimBoth_",
  2716. smalltalk.method({
  2717. selector: "trimBoth:",
  2718. fn: function (separators){
  2719. var self=this;
  2720. return smalltalk.withContext(function($ctx1) { var $1;
  2721. $1=_st(_st(self)._trimLeft_(separators))._trimRight_(separators);
  2722. return $1;
  2723. }, function($ctx1) {$ctx1.fill(self,"trimBoth:",{separators:separators},smalltalk.String)})},
  2724. messageSends: ["trimRight:", "trimLeft:"]}),
  2725. smalltalk.String);
  2726. smalltalk.addMethod(
  2727. "_trimLeft",
  2728. smalltalk.method({
  2729. selector: "trimLeft",
  2730. fn: function (){
  2731. var self=this;
  2732. return smalltalk.withContext(function($ctx1) { var $1;
  2733. $1=_st(self)._trimLeft_("\x5cs");
  2734. return $1;
  2735. }, function($ctx1) {$ctx1.fill(self,"trimLeft",{},smalltalk.String)})},
  2736. messageSends: ["trimLeft:"]}),
  2737. smalltalk.String);
  2738. smalltalk.addMethod(
  2739. "_trimLeft_",
  2740. smalltalk.method({
  2741. selector: "trimLeft:",
  2742. fn: function (separators){
  2743. var self=this;
  2744. return smalltalk.withContext(function($ctx1) { var $1;
  2745. $1=_st(self)._replaceRegexp_with_(_st((smalltalk.RegularExpression || RegularExpression))._fromString_flag_(_st(_st("^[").__comma(separators)).__comma("]+"),"g"),"");
  2746. return $1;
  2747. }, function($ctx1) {$ctx1.fill(self,"trimLeft:",{separators:separators},smalltalk.String)})},
  2748. messageSends: ["replaceRegexp:with:", "fromString:flag:", ","]}),
  2749. smalltalk.String);
  2750. smalltalk.addMethod(
  2751. "_trimRight",
  2752. smalltalk.method({
  2753. selector: "trimRight",
  2754. fn: function (){
  2755. var self=this;
  2756. return smalltalk.withContext(function($ctx1) { var $1;
  2757. $1=_st(self)._trimRight_("\x5cs");
  2758. return $1;
  2759. }, function($ctx1) {$ctx1.fill(self,"trimRight",{},smalltalk.String)})},
  2760. messageSends: ["trimRight:"]}),
  2761. smalltalk.String);
  2762. smalltalk.addMethod(
  2763. "_trimRight_",
  2764. smalltalk.method({
  2765. selector: "trimRight:",
  2766. fn: function (separators){
  2767. var self=this;
  2768. return smalltalk.withContext(function($ctx1) { var $1;
  2769. $1=_st(self)._replaceRegexp_with_(_st((smalltalk.RegularExpression || RegularExpression))._fromString_flag_(_st(_st("[").__comma(separators)).__comma("]+$"),"g"),"");
  2770. return $1;
  2771. }, function($ctx1) {$ctx1.fill(self,"trimRight:",{separators:separators},smalltalk.String)})},
  2772. messageSends: ["replaceRegexp:with:", "fromString:flag:", ","]}),
  2773. smalltalk.String);
  2774. smalltalk.addMethod(
  2775. "_unescaped",
  2776. smalltalk.method({
  2777. selector: "unescaped",
  2778. fn: function (){
  2779. var self=this;
  2780. return smalltalk.withContext(function($ctx1) { return unescape(self);
  2781. return self}, function($ctx1) {$ctx1.fill(self,"unescaped",{},smalltalk.String)})},
  2782. messageSends: []}),
  2783. smalltalk.String);
  2784. smalltalk.addMethod(
  2785. "_withIndexDo_",
  2786. smalltalk.method({
  2787. selector: "withIndexDo:",
  2788. fn: function (aBlock){
  2789. var self=this;
  2790. return smalltalk.withContext(function($ctx1) { for(var i=0;i<self.length;i++){aBlock(self.charAt(i), i+1);};
  2791. return self}, function($ctx1) {$ctx1.fill(self,"withIndexDo:",{aBlock:aBlock},smalltalk.String)})},
  2792. messageSends: []}),
  2793. smalltalk.String);
  2794. smalltalk.addMethod(
  2795. "_cr",
  2796. smalltalk.method({
  2797. selector: "cr",
  2798. fn: function (){
  2799. var self=this;
  2800. return smalltalk.withContext(function($ctx1) { return '\r';
  2801. return self}, function($ctx1) {$ctx1.fill(self,"cr",{},smalltalk.String.klass)})},
  2802. messageSends: []}),
  2803. smalltalk.String.klass);
  2804. smalltalk.addMethod(
  2805. "_crlf",
  2806. smalltalk.method({
  2807. selector: "crlf",
  2808. fn: function (){
  2809. var self=this;
  2810. return smalltalk.withContext(function($ctx1) { return '\r\n';
  2811. return self}, function($ctx1) {$ctx1.fill(self,"crlf",{},smalltalk.String.klass)})},
  2812. messageSends: []}),
  2813. smalltalk.String.klass);
  2814. smalltalk.addMethod(
  2815. "_fromCharCode_",
  2816. smalltalk.method({
  2817. selector: "fromCharCode:",
  2818. fn: function (anInteger){
  2819. var self=this;
  2820. return smalltalk.withContext(function($ctx1) { return String.fromCharCode(anInteger);
  2821. return self}, function($ctx1) {$ctx1.fill(self,"fromCharCode:",{anInteger:anInteger},smalltalk.String.klass)})},
  2822. messageSends: []}),
  2823. smalltalk.String.klass);
  2824. smalltalk.addMethod(
  2825. "_fromString_",
  2826. smalltalk.method({
  2827. selector: "fromString:",
  2828. fn: function (aString){
  2829. var self=this;
  2830. return smalltalk.withContext(function($ctx1) { return String(aString);
  2831. return self}, function($ctx1) {$ctx1.fill(self,"fromString:",{aString:aString},smalltalk.String.klass)})},
  2832. messageSends: []}),
  2833. smalltalk.String.klass);
  2834. smalltalk.addMethod(
  2835. "_lf",
  2836. smalltalk.method({
  2837. selector: "lf",
  2838. fn: function (){
  2839. var self=this;
  2840. return smalltalk.withContext(function($ctx1) { return '\n';
  2841. return self}, function($ctx1) {$ctx1.fill(self,"lf",{},smalltalk.String.klass)})},
  2842. messageSends: []}),
  2843. smalltalk.String.klass);
  2844. smalltalk.addMethod(
  2845. "_random",
  2846. smalltalk.method({
  2847. selector: "random",
  2848. fn: function (){
  2849. var self=this;
  2850. return smalltalk.withContext(function($ctx1) { return (Math.random()*(22/32)+(10/32)).toString(32).slice(2);;
  2851. return self}, function($ctx1) {$ctx1.fill(self,"random",{}, smalltalk.String.klass)})},
  2852. messageSends: []}),
  2853. smalltalk.String.klass);
  2854. smalltalk.addMethod(
  2855. "_randomNotIn_",
  2856. smalltalk.method({
  2857. selector: "randomNotIn:",
  2858. fn: function (aString){
  2859. var self=this;
  2860. var result;
  2861. return smalltalk.withContext(function($ctx1) { var $1;
  2862. _st((function(){
  2863. return smalltalk.withContext(function($ctx2) { result=_st(self)._random();
  2864. result;
  2865. return _st(aString)._includesSubString_(result);
  2866. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileTrue();
  2867. $1=result;
  2868. return $1;
  2869. }, function($ctx1) {$ctx1.fill(self,"randomNotIn:",{aString:aString,result:result}, smalltalk.String.klass)})},
  2870. messageSends: ["whileTrue", "random", "includesSubString:"]}),
  2871. smalltalk.String.klass);
  2872. smalltalk.addMethod(
  2873. "_space",
  2874. smalltalk.method({
  2875. selector: "space",
  2876. fn: function (){
  2877. var self=this;
  2878. return smalltalk.withContext(function($ctx1) { return ' ';
  2879. return self}, function($ctx1) {$ctx1.fill(self,"space",{},smalltalk.String.klass)})},
  2880. messageSends: []}),
  2881. smalltalk.String.klass);
  2882. smalltalk.addMethod(
  2883. "_streamClass",
  2884. smalltalk.method({
  2885. selector: "streamClass",
  2886. fn: function (){
  2887. var self=this;
  2888. return smalltalk.withContext(function($ctx1) { var $1;
  2889. $1=(smalltalk.StringStream || StringStream);
  2890. return $1;
  2891. }, function($ctx1) {$ctx1.fill(self,"streamClass",{},smalltalk.String.klass)})},
  2892. messageSends: []}),
  2893. smalltalk.String.klass);
  2894. smalltalk.addMethod(
  2895. "_tab",
  2896. smalltalk.method({
  2897. selector: "tab",
  2898. fn: function (){
  2899. var self=this;
  2900. return smalltalk.withContext(function($ctx1) { return '\t';
  2901. return self}, function($ctx1) {$ctx1.fill(self,"tab",{},smalltalk.String.klass)})},
  2902. messageSends: []}),
  2903. smalltalk.String.klass);
  2904. smalltalk.addMethod(
  2905. "_value_",
  2906. smalltalk.method({
  2907. selector: "value:",
  2908. fn: function (aUTFCharCode){
  2909. var self=this;
  2910. return smalltalk.withContext(function($ctx1) { return String.fromCharCode(aUTFCharCode);;
  2911. return self}, function($ctx1) {$ctx1.fill(self,"value:",{aUTFCharCode:aUTFCharCode},smalltalk.String.klass)})},
  2912. messageSends: []}),
  2913. smalltalk.String.klass);
  2914. smalltalk.addClass('Set', smalltalk.Collection, ['elements'], 'Kernel-Collections');
  2915. smalltalk.addMethod(
  2916. "__eq",
  2917. smalltalk.method({
  2918. selector: "=",
  2919. fn: function (aCollection){
  2920. var self=this;
  2921. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  2922. var $early={};
  2923. try {
  2924. $1=_st(_st(self)._class()).__eq(_st(aCollection)._class());
  2925. if(! smalltalk.assert($1)){
  2926. return false;
  2927. };
  2928. $2=_st(_st(self)._size()).__eq(_st(aCollection)._size());
  2929. if(! smalltalk.assert($2)){
  2930. return false;
  2931. };
  2932. _st(self)._do_((function(each){
  2933. return smalltalk.withContext(function($ctx2) { $3=_st(aCollection)._includes_(each);
  2934. if(! smalltalk.assert($3)){
  2935. throw $early=[false];
  2936. };
  2937. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  2938. return true;
  2939. }
  2940. catch(e) {if(e===$early)return e[0]; throw e}
  2941. }, function($ctx1) {$ctx1.fill(self,"=",{aCollection:aCollection},smalltalk.Set)})},
  2942. messageSends: ["ifFalse:", "=", "class", "size", "do:", "includes:"]}),
  2943. smalltalk.Set);
  2944. smalltalk.addMethod(
  2945. "_add_",
  2946. smalltalk.method({
  2947. selector: "add:",
  2948. fn: function (anObject){
  2949. var self=this;
  2950. return smalltalk.withContext(function($ctx1) {
  2951. var found;
  2952. for(var i=0; i < self['@elements'].length; i++) {
  2953. if(anObject == self['@elements'][i]) {
  2954. found = true;
  2955. break;
  2956. }
  2957. }
  2958. if(!found) {self['@elements'].push(anObject)}
  2959. ;
  2960. return self}, function($ctx1) {$ctx1.fill(self,"add:",{anObject:anObject},smalltalk.Set)})},
  2961. messageSends: []}),
  2962. smalltalk.Set);
  2963. smalltalk.addMethod(
  2964. "_asArray",
  2965. smalltalk.method({
  2966. selector: "asArray",
  2967. fn: function (){
  2968. var self=this;
  2969. return smalltalk.withContext(function($ctx1) { var $1;
  2970. $1=_st(self["@elements"])._copy();
  2971. return $1;
  2972. }, function($ctx1) {$ctx1.fill(self,"asArray",{},smalltalk.Set)})},
  2973. messageSends: ["copy"]}),
  2974. smalltalk.Set);
  2975. smalltalk.addMethod(
  2976. "_collect_",
  2977. smalltalk.method({
  2978. selector: "collect:",
  2979. fn: function (aBlock){
  2980. var self=this;
  2981. return smalltalk.withContext(function($ctx1) { var $1;
  2982. $1=_st(_st(self)._class())._withAll_(_st(self["@elements"])._collect_(aBlock));
  2983. return $1;
  2984. }, function($ctx1) {$ctx1.fill(self,"collect:",{aBlock:aBlock},smalltalk.Set)})},
  2985. messageSends: ["withAll:", "collect:", "class"]}),
  2986. smalltalk.Set);
  2987. smalltalk.addMethod(
  2988. "_detect_ifNone_",
  2989. smalltalk.method({
  2990. selector: "detect:ifNone:",
  2991. fn: function (aBlock,anotherBlock){
  2992. var self=this;
  2993. return smalltalk.withContext(function($ctx1) { var $1;
  2994. $1=_st(self["@elements"])._detect_ifNone_(aBlock,anotherBlock);
  2995. return $1;
  2996. }, function($ctx1) {$ctx1.fill(self,"detect:ifNone:",{aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.Set)})},
  2997. messageSends: ["detect:ifNone:"]}),
  2998. smalltalk.Set);
  2999. smalltalk.addMethod(
  3000. "_do_",
  3001. smalltalk.method({
  3002. selector: "do:",
  3003. fn: function (aBlock){
  3004. var self=this;
  3005. return smalltalk.withContext(function($ctx1) { _st(self["@elements"])._do_(aBlock);
  3006. return self}, function($ctx1) {$ctx1.fill(self,"do:",{aBlock:aBlock},smalltalk.Set)})},
  3007. messageSends: ["do:"]}),
  3008. smalltalk.Set);
  3009. smalltalk.addMethod(
  3010. "_includes_",
  3011. smalltalk.method({
  3012. selector: "includes:",
  3013. fn: function (anObject){
  3014. var self=this;
  3015. return smalltalk.withContext(function($ctx1) { var $1;
  3016. $1=_st(self["@elements"])._includes_(anObject);
  3017. return $1;
  3018. }, function($ctx1) {$ctx1.fill(self,"includes:",{anObject:anObject},smalltalk.Set)})},
  3019. messageSends: ["includes:"]}),
  3020. smalltalk.Set);
  3021. smalltalk.addMethod(
  3022. "_initialize",
  3023. smalltalk.method({
  3024. selector: "initialize",
  3025. fn: function (){
  3026. var self=this;
  3027. return smalltalk.withContext(function($ctx1) { smalltalk.Collection.fn.prototype._initialize.apply(_st(self), []);
  3028. self["@elements"]=[];
  3029. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.Set)})},
  3030. messageSends: ["initialize"]}),
  3031. smalltalk.Set);
  3032. smalltalk.addMethod(
  3033. "_printOn_",
  3034. smalltalk.method({
  3035. selector: "printOn:",
  3036. fn: function (aStream){
  3037. var self=this;
  3038. return smalltalk.withContext(function($ctx1) { smalltalk.Collection.fn.prototype._printOn_.apply(_st(self), [aStream]);
  3039. _st(aStream)._nextPutAll_(" (");
  3040. _st(self)._do_separatedBy_((function(each){
  3041. return smalltalk.withContext(function($ctx2) { return _st(each)._printOn_(aStream);
  3042. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
  3043. return smalltalk.withContext(function($ctx2) { return _st(aStream)._nextPutAll_(" ");
  3044. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3045. _st(aStream)._nextPutAll_(")");
  3046. return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.Set)})},
  3047. messageSends: ["printOn:", "nextPutAll:", "do:separatedBy:"]}),
  3048. smalltalk.Set);
  3049. smalltalk.addMethod(
  3050. "_remove_",
  3051. smalltalk.method({
  3052. selector: "remove:",
  3053. fn: function (anObject){
  3054. var self=this;
  3055. return smalltalk.withContext(function($ctx1) { _st(self["@elements"])._remove_(anObject);
  3056. return self}, function($ctx1) {$ctx1.fill(self,"remove:",{anObject:anObject},smalltalk.Set)})},
  3057. messageSends: ["remove:"]}),
  3058. smalltalk.Set);
  3059. smalltalk.addMethod(
  3060. "_select_",
  3061. smalltalk.method({
  3062. selector: "select:",
  3063. fn: function (aBlock){
  3064. var self=this;
  3065. var collection;
  3066. return smalltalk.withContext(function($ctx1) { var $1,$2;
  3067. collection=_st(_st(self)._class())._new();
  3068. _st(self)._do_((function(each){
  3069. return smalltalk.withContext(function($ctx2) { $1=_st(aBlock)._value_(each);
  3070. if(smalltalk.assert($1)){
  3071. return _st(collection)._add_(each);
  3072. };
  3073. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  3074. $2=collection;
  3075. return $2;
  3076. }, function($ctx1) {$ctx1.fill(self,"select:",{aBlock:aBlock,collection:collection},smalltalk.Set)})},
  3077. messageSends: ["new", "class", "do:", "ifTrue:", "add:", "value:"]}),
  3078. smalltalk.Set);
  3079. smalltalk.addMethod(
  3080. "_size",
  3081. smalltalk.method({
  3082. selector: "size",
  3083. fn: function (){
  3084. var self=this;
  3085. return smalltalk.withContext(function($ctx1) { var $1;
  3086. $1=_st(self["@elements"])._size();
  3087. return $1;
  3088. }, function($ctx1) {$ctx1.fill(self,"size",{},smalltalk.Set)})},
  3089. messageSends: ["size"]}),
  3090. smalltalk.Set);
  3091. smalltalk.addClass('Queue', smalltalk.Object, ['read', 'readIndex', 'write'], 'Kernel-Collections');
  3092. smalltalk.addMethod(
  3093. "_back_",
  3094. smalltalk.method({
  3095. selector: "back:",
  3096. fn: function (anObject){
  3097. var self=this;
  3098. return smalltalk.withContext(function($ctx1) { _st(self["@write"])._add_(anObject);
  3099. return self}, function($ctx1) {$ctx1.fill(self,"back:",{anObject:anObject},smalltalk.Queue)})},
  3100. messageSends: ["add:"]}),
  3101. smalltalk.Queue);
  3102. smalltalk.addMethod(
  3103. "_front",
  3104. smalltalk.method({
  3105. selector: "front",
  3106. fn: function (){
  3107. var self=this;
  3108. return smalltalk.withContext(function($ctx1) { var $1;
  3109. $1=_st(self)._frontIfAbsent_((function(){
  3110. return smalltalk.withContext(function($ctx2) { return _st(self)._error_("Cannot read from empty Queue.");
  3111. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3112. return $1;
  3113. }, function($ctx1) {$ctx1.fill(self,"front",{},smalltalk.Queue)})},
  3114. messageSends: ["frontIfAbsent:", "error:"]}),
  3115. smalltalk.Queue);
  3116. smalltalk.addMethod(
  3117. "_frontIfAbsent_",
  3118. smalltalk.method({
  3119. selector: "frontIfAbsent:",
  3120. fn: function (aBlock){
  3121. var self=this;
  3122. var result;
  3123. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  3124. var $early={};
  3125. try {
  3126. result=_st(self["@read"])._at_ifAbsent_(self["@readIndex"],(function(){
  3127. return smalltalk.withContext(function($ctx2) { $1=_st(self["@write"])._isEmpty();
  3128. if(smalltalk.assert($1)){
  3129. $2=_st(self["@readIndex"]).__gt((1));
  3130. if(smalltalk.assert($2)){
  3131. self["@read"]=[];
  3132. self["@read"];
  3133. self["@readIndex"]=(1);
  3134. self["@readIndex"];
  3135. };
  3136. $3=_st(aBlock)._value();
  3137. throw $early=[$3];
  3138. };
  3139. self["@read"]=self["@write"];
  3140. self["@read"];
  3141. self["@readIndex"]=(1);
  3142. self["@readIndex"];
  3143. self["@write"]=_st((smalltalk.OrderedCollection || OrderedCollection))._new();
  3144. self["@write"];
  3145. return _st(self["@read"])._first();
  3146. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3147. _st(self["@read"])._at_put_(self["@readIndex"],nil);
  3148. self["@readIndex"]=_st(self["@readIndex"]).__plus((1));
  3149. $4=result;
  3150. return $4;
  3151. }
  3152. catch(e) {if(e===$early)return e[0]; throw e}
  3153. }, function($ctx1) {$ctx1.fill(self,"frontIfAbsent:",{aBlock:aBlock,result:result},smalltalk.Queue)})},
  3154. messageSends: ["at:ifAbsent:", "ifTrue:", ">", "value", "isEmpty", "new", "first", "at:put:", "+"]}),
  3155. smalltalk.Queue);
  3156. smalltalk.addMethod(
  3157. "_initialize",
  3158. smalltalk.method({
  3159. selector: "initialize",
  3160. fn: function (){
  3161. var self=this;
  3162. return smalltalk.withContext(function($ctx1) { smalltalk.Object.fn.prototype._initialize.apply(_st(self), []);
  3163. self["@read"]=_st((smalltalk.OrderedCollection || OrderedCollection))._new();
  3164. self["@write"]=_st((smalltalk.OrderedCollection || OrderedCollection))._new();
  3165. self["@readIndex"]=(1);
  3166. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.Queue)})},
  3167. messageSends: ["initialize", "new"]}),
  3168. smalltalk.Queue);
  3169. smalltalk.addClass('RegularExpression', smalltalk.Object, [], 'Kernel-Collections');
  3170. smalltalk.addMethod(
  3171. "_compile_",
  3172. smalltalk.method({
  3173. selector: "compile:",
  3174. fn: function (aString){
  3175. var self=this;
  3176. return smalltalk.withContext(function($ctx1) { return self.compile(aString);
  3177. return self}, function($ctx1) {$ctx1.fill(self,"compile:",{aString:aString},smalltalk.RegularExpression)})},
  3178. messageSends: []}),
  3179. smalltalk.RegularExpression);
  3180. smalltalk.addMethod(
  3181. "_exec_",
  3182. smalltalk.method({
  3183. selector: "exec:",
  3184. fn: function (aString){
  3185. var self=this;
  3186. return smalltalk.withContext(function($ctx1) { return self.exec(aString) || nil;
  3187. return self}, function($ctx1) {$ctx1.fill(self,"exec:",{aString:aString},smalltalk.RegularExpression)})},
  3188. messageSends: []}),
  3189. smalltalk.RegularExpression);
  3190. smalltalk.addMethod(
  3191. "_test_",
  3192. smalltalk.method({
  3193. selector: "test:",
  3194. fn: function (aString){
  3195. var self=this;
  3196. return smalltalk.withContext(function($ctx1) { return self.test(aString);
  3197. return self}, function($ctx1) {$ctx1.fill(self,"test:",{aString:aString},smalltalk.RegularExpression)})},
  3198. messageSends: []}),
  3199. smalltalk.RegularExpression);
  3200. smalltalk.addMethod(
  3201. "_fromString_",
  3202. smalltalk.method({
  3203. selector: "fromString:",
  3204. fn: function (aString){
  3205. var self=this;
  3206. return smalltalk.withContext(function($ctx1) { var $1;
  3207. $1=_st(self)._fromString_flag_(aString,"");
  3208. return $1;
  3209. }, function($ctx1) {$ctx1.fill(self,"fromString:",{aString:aString},smalltalk.RegularExpression.klass)})},
  3210. messageSends: ["fromString:flag:"]}),
  3211. smalltalk.RegularExpression.klass);
  3212. smalltalk.addMethod(
  3213. "_fromString_flag_",
  3214. smalltalk.method({
  3215. selector: "fromString:flag:",
  3216. fn: function (aString,anotherString){
  3217. var self=this;
  3218. return smalltalk.withContext(function($ctx1) { return new RegExp(aString, anotherString);
  3219. return self}, function($ctx1) {$ctx1.fill(self,"fromString:flag:",{aString:aString,anotherString:anotherString},smalltalk.RegularExpression.klass)})},
  3220. messageSends: []}),
  3221. smalltalk.RegularExpression.klass);
  3222. smalltalk.addClass('Stream', smalltalk.Object, ['collection', 'position', 'streamSize'], 'Kernel-Collections');
  3223. smalltalk.addMethod(
  3224. "__lt_lt",
  3225. smalltalk.method({
  3226. selector: "<<",
  3227. fn: function (anObject){
  3228. var self=this;
  3229. return smalltalk.withContext(function($ctx1) { _st(self)._write_(anObject);
  3230. return self}, function($ctx1) {$ctx1.fill(self,"<<",{anObject:anObject},smalltalk.Stream)})},
  3231. messageSends: ["write:"]}),
  3232. smalltalk.Stream);
  3233. smalltalk.addMethod(
  3234. "_atEnd",
  3235. smalltalk.method({
  3236. selector: "atEnd",
  3237. fn: function (){
  3238. var self=this;
  3239. return smalltalk.withContext(function($ctx1) { var $1;
  3240. $1=_st(_st(self)._position()).__eq(_st(self)._size());
  3241. return $1;
  3242. }, function($ctx1) {$ctx1.fill(self,"atEnd",{},smalltalk.Stream)})},
  3243. messageSends: ["=", "size", "position"]}),
  3244. smalltalk.Stream);
  3245. smalltalk.addMethod(
  3246. "_atStart",
  3247. smalltalk.method({
  3248. selector: "atStart",
  3249. fn: function (){
  3250. var self=this;
  3251. return smalltalk.withContext(function($ctx1) { var $1;
  3252. $1=_st(_st(self)._position()).__eq((0));
  3253. return $1;
  3254. }, function($ctx1) {$ctx1.fill(self,"atStart",{},smalltalk.Stream)})},
  3255. messageSends: ["=", "position"]}),
  3256. smalltalk.Stream);
  3257. smalltalk.addMethod(
  3258. "_close",
  3259. smalltalk.method({
  3260. selector: "close",
  3261. fn: function (){
  3262. var self=this;
  3263. return smalltalk.withContext(function($ctx1) { return self}, function($ctx1) {$ctx1.fill(self,"close",{},smalltalk.Stream)})},
  3264. messageSends: []}),
  3265. smalltalk.Stream);
  3266. smalltalk.addMethod(
  3267. "_collection",
  3268. smalltalk.method({
  3269. selector: "collection",
  3270. fn: function (){
  3271. var self=this;
  3272. return smalltalk.withContext(function($ctx1) { var $1;
  3273. $1=self["@collection"];
  3274. return $1;
  3275. }, function($ctx1) {$ctx1.fill(self,"collection",{},smalltalk.Stream)})},
  3276. messageSends: []}),
  3277. smalltalk.Stream);
  3278. smalltalk.addMethod(
  3279. "_contents",
  3280. smalltalk.method({
  3281. selector: "contents",
  3282. fn: function (){
  3283. var self=this;
  3284. return smalltalk.withContext(function($ctx1) { var $1;
  3285. $1=_st(_st(self)._collection())._copyFrom_to_((1),_st(self)._streamSize());
  3286. return $1;
  3287. }, function($ctx1) {$ctx1.fill(self,"contents",{},smalltalk.Stream)})},
  3288. messageSends: ["copyFrom:to:", "streamSize", "collection"]}),
  3289. smalltalk.Stream);
  3290. smalltalk.addMethod(
  3291. "_do_",
  3292. smalltalk.method({
  3293. selector: "do:",
  3294. fn: function (aBlock){
  3295. var self=this;
  3296. return smalltalk.withContext(function($ctx1) { _st((function(){
  3297. return smalltalk.withContext(function($ctx2) { return _st(self)._atEnd();
  3298. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileFalse_((function(){
  3299. return smalltalk.withContext(function($ctx2) { return _st(aBlock)._value_(_st(self)._next());
  3300. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3301. return self}, function($ctx1) {$ctx1.fill(self,"do:",{aBlock:aBlock},smalltalk.Stream)})},
  3302. messageSends: ["whileFalse:", "value:", "next", "atEnd"]}),
  3303. smalltalk.Stream);
  3304. smalltalk.addMethod(
  3305. "_flush",
  3306. smalltalk.method({
  3307. selector: "flush",
  3308. fn: function (){
  3309. var self=this;
  3310. return smalltalk.withContext(function($ctx1) { return self}, function($ctx1) {$ctx1.fill(self,"flush",{},smalltalk.Stream)})},
  3311. messageSends: []}),
  3312. smalltalk.Stream);
  3313. smalltalk.addMethod(
  3314. "_isEmpty",
  3315. smalltalk.method({
  3316. selector: "isEmpty",
  3317. fn: function (){
  3318. var self=this;
  3319. return smalltalk.withContext(function($ctx1) { var $1;
  3320. $1=_st(_st(self)._size()).__eq((0));
  3321. return $1;
  3322. }, function($ctx1) {$ctx1.fill(self,"isEmpty",{},smalltalk.Stream)})},
  3323. messageSends: ["=", "size"]}),
  3324. smalltalk.Stream);
  3325. smalltalk.addMethod(
  3326. "_next",
  3327. smalltalk.method({
  3328. selector: "next",
  3329. fn: function (){
  3330. var self=this;
  3331. return smalltalk.withContext(function($ctx1) { var $2,$1;
  3332. $2=_st(self)._atEnd();
  3333. if(smalltalk.assert($2)){
  3334. $1=nil;
  3335. } else {
  3336. _st(self)._position_(_st(_st(self)._position()).__plus((1)));
  3337. $1=_st(self["@collection"])._at_(_st(self)._position());
  3338. };
  3339. return $1;
  3340. }, function($ctx1) {$ctx1.fill(self,"next",{},smalltalk.Stream)})},
  3341. messageSends: ["ifTrue:ifFalse:", "position:", "+", "position", "at:", "atEnd"]}),
  3342. smalltalk.Stream);
  3343. smalltalk.addMethod(
  3344. "_next_",
  3345. smalltalk.method({
  3346. selector: "next:",
  3347. fn: function (anInteger){
  3348. var self=this;
  3349. var tempCollection;
  3350. return smalltalk.withContext(function($ctx1) { var $1,$2;
  3351. tempCollection=_st(_st(_st(self)._collection())._class())._new();
  3352. _st(anInteger)._timesRepeat_((function(){
  3353. return smalltalk.withContext(function($ctx2) { $1=_st(self)._atEnd();
  3354. if(! smalltalk.assert($1)){
  3355. return _st(tempCollection)._add_(_st(self)._next());
  3356. };
  3357. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3358. $2=tempCollection;
  3359. return $2;
  3360. }, function($ctx1) {$ctx1.fill(self,"next:",{anInteger:anInteger,tempCollection:tempCollection},smalltalk.Stream)})},
  3361. messageSends: ["new", "class", "collection", "timesRepeat:", "ifFalse:", "add:", "next", "atEnd"]}),
  3362. smalltalk.Stream);
  3363. smalltalk.addMethod(
  3364. "_nextPut_",
  3365. smalltalk.method({
  3366. selector: "nextPut:",
  3367. fn: function (anObject){
  3368. var self=this;
  3369. return smalltalk.withContext(function($ctx1) { _st(self)._position_(_st(_st(self)._position()).__plus((1)));
  3370. _st(_st(self)._collection())._at_put_(_st(self)._position(),anObject);
  3371. _st(self)._setStreamSize_(_st(_st(self)._streamSize())._max_(_st(self)._position()));
  3372. return self}, function($ctx1) {$ctx1.fill(self,"nextPut:",{anObject:anObject},smalltalk.Stream)})},
  3373. messageSends: ["position:", "+", "position", "at:put:", "collection", "setStreamSize:", "max:", "streamSize"]}),
  3374. smalltalk.Stream);
  3375. smalltalk.addMethod(
  3376. "_nextPutAll_",
  3377. smalltalk.method({
  3378. selector: "nextPutAll:",
  3379. fn: function (aCollection){
  3380. var self=this;
  3381. return smalltalk.withContext(function($ctx1) { _st(aCollection)._do_((function(each){
  3382. return smalltalk.withContext(function($ctx2) { return _st(self)._nextPut_(each);
  3383. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  3384. return self}, function($ctx1) {$ctx1.fill(self,"nextPutAll:",{aCollection:aCollection},smalltalk.Stream)})},
  3385. messageSends: ["do:", "nextPut:"]}),
  3386. smalltalk.Stream);
  3387. smalltalk.addMethod(
  3388. "_nextPutString_",
  3389. smalltalk.method({
  3390. selector: "nextPutString:",
  3391. fn: function (aString){
  3392. var self=this;
  3393. return smalltalk.withContext(function($ctx1) { _st(self)._nextPut_(aString);
  3394. return self}, function($ctx1) {$ctx1.fill(self,"nextPutString:",{aString:aString},smalltalk.Stream)})},
  3395. messageSends: ["nextPut:"]}),
  3396. smalltalk.Stream);
  3397. smalltalk.addMethod(
  3398. "_peek",
  3399. smalltalk.method({
  3400. selector: "peek",
  3401. fn: function (){
  3402. var self=this;
  3403. return smalltalk.withContext(function($ctx1) { var $2,$1;
  3404. $2=_st(self)._atEnd();
  3405. if(! smalltalk.assert($2)){
  3406. $1=_st(_st(self)._collection())._at_(_st(_st(self)._position()).__plus((1)));
  3407. };
  3408. return $1;
  3409. }, function($ctx1) {$ctx1.fill(self,"peek",{},smalltalk.Stream)})},
  3410. messageSends: ["ifFalse:", "at:", "+", "position", "collection", "atEnd"]}),
  3411. smalltalk.Stream);
  3412. smalltalk.addMethod(
  3413. "_position",
  3414. smalltalk.method({
  3415. selector: "position",
  3416. fn: function (){
  3417. var self=this;
  3418. return smalltalk.withContext(function($ctx1) { var $2,$1;
  3419. $2=self["@position"];
  3420. if(($receiver = $2) == nil || $receiver == undefined){
  3421. self["@position"]=(0);
  3422. $1=self["@position"];
  3423. } else {
  3424. $1=$2;
  3425. };
  3426. return $1;
  3427. }, function($ctx1) {$ctx1.fill(self,"position",{},smalltalk.Stream)})},
  3428. messageSends: ["ifNil:"]}),
  3429. smalltalk.Stream);
  3430. smalltalk.addMethod(
  3431. "_position_",
  3432. smalltalk.method({
  3433. selector: "position:",
  3434. fn: function (anInteger){
  3435. var self=this;
  3436. return smalltalk.withContext(function($ctx1) { self["@position"]=anInteger;
  3437. return self}, function($ctx1) {$ctx1.fill(self,"position:",{anInteger:anInteger},smalltalk.Stream)})},
  3438. messageSends: []}),
  3439. smalltalk.Stream);
  3440. smalltalk.addMethod(
  3441. "_reset",
  3442. smalltalk.method({
  3443. selector: "reset",
  3444. fn: function (){
  3445. var self=this;
  3446. return smalltalk.withContext(function($ctx1) { _st(self)._position_((0));
  3447. return self}, function($ctx1) {$ctx1.fill(self,"reset",{},smalltalk.Stream)})},
  3448. messageSends: ["position:"]}),
  3449. smalltalk.Stream);
  3450. smalltalk.addMethod(
  3451. "_resetContents",
  3452. smalltalk.method({
  3453. selector: "resetContents",
  3454. fn: function (){
  3455. var self=this;
  3456. return smalltalk.withContext(function($ctx1) { _st(self)._reset();
  3457. _st(self)._setStreamSize_((0));
  3458. return self}, function($ctx1) {$ctx1.fill(self,"resetContents",{},smalltalk.Stream)})},
  3459. messageSends: ["reset", "setStreamSize:"]}),
  3460. smalltalk.Stream);
  3461. smalltalk.addMethod(
  3462. "_setCollection_",
  3463. smalltalk.method({
  3464. selector: "setCollection:",
  3465. fn: function (aCollection){
  3466. var self=this;
  3467. return smalltalk.withContext(function($ctx1) { self["@collection"]=aCollection;
  3468. return self}, function($ctx1) {$ctx1.fill(self,"setCollection:",{aCollection:aCollection},smalltalk.Stream)})},
  3469. messageSends: []}),
  3470. smalltalk.Stream);
  3471. smalltalk.addMethod(
  3472. "_setStreamSize_",
  3473. smalltalk.method({
  3474. selector: "setStreamSize:",
  3475. fn: function (anInteger){
  3476. var self=this;
  3477. return smalltalk.withContext(function($ctx1) { self["@streamSize"]=anInteger;
  3478. return self}, function($ctx1) {$ctx1.fill(self,"setStreamSize:",{anInteger:anInteger},smalltalk.Stream)})},
  3479. messageSends: []}),
  3480. smalltalk.Stream);
  3481. smalltalk.addMethod(
  3482. "_setToEnd",
  3483. smalltalk.method({
  3484. selector: "setToEnd",
  3485. fn: function (){
  3486. var self=this;
  3487. return smalltalk.withContext(function($ctx1) { _st(self)._position_(_st(self)._size());
  3488. return self}, function($ctx1) {$ctx1.fill(self,"setToEnd",{},smalltalk.Stream)})},
  3489. messageSends: ["position:", "size"]}),
  3490. smalltalk.Stream);
  3491. smalltalk.addMethod(
  3492. "_size",
  3493. smalltalk.method({
  3494. selector: "size",
  3495. fn: function (){
  3496. var self=this;
  3497. return smalltalk.withContext(function($ctx1) { var $1;
  3498. $1=_st(self)._streamSize();
  3499. return $1;
  3500. }, function($ctx1) {$ctx1.fill(self,"size",{},smalltalk.Stream)})},
  3501. messageSends: ["streamSize"]}),
  3502. smalltalk.Stream);
  3503. smalltalk.addMethod(
  3504. "_skip_",
  3505. smalltalk.method({
  3506. selector: "skip:",
  3507. fn: function (anInteger){
  3508. var self=this;
  3509. return smalltalk.withContext(function($ctx1) { _st(self)._position_(_st(_st(_st(self)._position()).__plus(anInteger))._min_max_(_st(self)._size(),(0)));
  3510. return self}, function($ctx1) {$ctx1.fill(self,"skip:",{anInteger:anInteger},smalltalk.Stream)})},
  3511. messageSends: ["position:", "min:max:", "size", "+", "position"]}),
  3512. smalltalk.Stream);
  3513. smalltalk.addMethod(
  3514. "_streamSize",
  3515. smalltalk.method({
  3516. selector: "streamSize",
  3517. fn: function (){
  3518. var self=this;
  3519. return smalltalk.withContext(function($ctx1) { var $1;
  3520. $1=self["@streamSize"];
  3521. return $1;
  3522. }, function($ctx1) {$ctx1.fill(self,"streamSize",{},smalltalk.Stream)})},
  3523. messageSends: []}),
  3524. smalltalk.Stream);
  3525. smalltalk.addMethod(
  3526. "_write_",
  3527. smalltalk.method({
  3528. selector: "write:",
  3529. fn: function (anObject){
  3530. var self=this;
  3531. return smalltalk.withContext(function($ctx1) { _st(anObject)._putOn_(self);
  3532. return self}, function($ctx1) {$ctx1.fill(self,"write:",{anObject:anObject},smalltalk.Stream)})},
  3533. messageSends: ["putOn:"]}),
  3534. smalltalk.Stream);
  3535. smalltalk.addMethod(
  3536. "_on_",
  3537. smalltalk.method({
  3538. selector: "on:",
  3539. fn: function (aCollection){
  3540. var self=this;
  3541. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  3542. $2=_st(self)._new();
  3543. _st($2)._setCollection_(aCollection);
  3544. _st($2)._setStreamSize_(_st(aCollection)._size());
  3545. $3=_st($2)._yourself();
  3546. $1=$3;
  3547. return $1;
  3548. }, function($ctx1) {$ctx1.fill(self,"on:",{aCollection:aCollection},smalltalk.Stream.klass)})},
  3549. messageSends: ["setCollection:", "new", "setStreamSize:", "size", "yourself"]}),
  3550. smalltalk.Stream.klass);
  3551. smalltalk.addClass('StringStream', smalltalk.Stream, [], 'Kernel-Collections');
  3552. smalltalk.addMethod(
  3553. "_cr",
  3554. smalltalk.method({
  3555. selector: "cr",
  3556. fn: function (){
  3557. var self=this;
  3558. return smalltalk.withContext(function($ctx1) { var $1;
  3559. $1=_st(self)._nextPutAll_(_st((smalltalk.String || String))._cr());
  3560. return $1;
  3561. }, function($ctx1) {$ctx1.fill(self,"cr",{},smalltalk.StringStream)})},
  3562. messageSends: ["nextPutAll:", "cr"]}),
  3563. smalltalk.StringStream);
  3564. smalltalk.addMethod(
  3565. "_crlf",
  3566. smalltalk.method({
  3567. selector: "crlf",
  3568. fn: function (){
  3569. var self=this;
  3570. return smalltalk.withContext(function($ctx1) { var $1;
  3571. $1=_st(self)._nextPutAll_(_st((smalltalk.String || String))._crlf());
  3572. return $1;
  3573. }, function($ctx1) {$ctx1.fill(self,"crlf",{},smalltalk.StringStream)})},
  3574. messageSends: ["nextPutAll:", "crlf"]}),
  3575. smalltalk.StringStream);
  3576. smalltalk.addMethod(
  3577. "_lf",
  3578. smalltalk.method({
  3579. selector: "lf",
  3580. fn: function (){
  3581. var self=this;
  3582. return smalltalk.withContext(function($ctx1) { var $1;
  3583. $1=_st(self)._nextPutAll_(_st((smalltalk.String || String))._lf());
  3584. return $1;
  3585. }, function($ctx1) {$ctx1.fill(self,"lf",{},smalltalk.StringStream)})},
  3586. messageSends: ["nextPutAll:", "lf"]}),
  3587. smalltalk.StringStream);
  3588. smalltalk.addMethod(
  3589. "_next_",
  3590. smalltalk.method({
  3591. selector: "next:",
  3592. fn: function (anInteger){
  3593. var self=this;
  3594. var tempCollection;
  3595. return smalltalk.withContext(function($ctx1) { var $1,$2;
  3596. tempCollection=_st(_st(_st(self)._collection())._class())._new();
  3597. _st(anInteger)._timesRepeat_((function(){
  3598. return smalltalk.withContext(function($ctx2) { $1=_st(self)._atEnd();
  3599. if(! smalltalk.assert($1)){
  3600. tempCollection=_st(tempCollection).__comma(_st(self)._next());
  3601. return tempCollection;
  3602. };
  3603. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3604. $2=tempCollection;
  3605. return $2;
  3606. }, function($ctx1) {$ctx1.fill(self,"next:",{anInteger:anInteger,tempCollection:tempCollection},smalltalk.StringStream)})},
  3607. messageSends: ["new", "class", "collection", "timesRepeat:", "ifFalse:", ",", "next", "atEnd"]}),
  3608. smalltalk.StringStream);
  3609. smalltalk.addMethod(
  3610. "_nextPut_",
  3611. smalltalk.method({
  3612. selector: "nextPut:",
  3613. fn: function (aString){
  3614. var self=this;
  3615. return smalltalk.withContext(function($ctx1) { _st(self)._nextPutAll_(aString);
  3616. return self}, function($ctx1) {$ctx1.fill(self,"nextPut:",{aString:aString},smalltalk.StringStream)})},
  3617. messageSends: ["nextPutAll:"]}),
  3618. smalltalk.StringStream);
  3619. smalltalk.addMethod(
  3620. "_nextPutAll_",
  3621. smalltalk.method({
  3622. selector: "nextPutAll:",
  3623. fn: function (aString){
  3624. var self=this;
  3625. var pre,post;
  3626. return smalltalk.withContext(function($ctx1) { var $1;
  3627. $1=_st(self)._atEnd();
  3628. if(smalltalk.assert($1)){
  3629. _st(self)._setCollection_(_st(_st(self)._collection()).__comma(aString));
  3630. } else {
  3631. pre=_st(_st(self)._collection())._copyFrom_to_((1),_st(self)._position());
  3632. pre;
  3633. post=_st(_st(self)._collection())._copyFrom_to_(_st(_st(_st(self)._position()).__plus((1))).__plus(_st(aString)._size()),_st(_st(self)._collection())._size());
  3634. post;
  3635. _st(self)._setCollection_(_st(_st(pre).__comma(aString)).__comma(post));
  3636. };
  3637. _st(self)._position_(_st(_st(self)._position()).__plus(_st(aString)._size()));
  3638. _st(self)._setStreamSize_(_st(_st(self)._streamSize())._max_(_st(self)._position()));
  3639. return self}, function($ctx1) {$ctx1.fill(self,"nextPutAll:",{aString:aString,pre:pre,post:post},smalltalk.StringStream)})},
  3640. messageSends: ["ifTrue:ifFalse:", "setCollection:", ",", "collection", "copyFrom:to:", "position", "+", "size", "atEnd", "position:", "setStreamSize:", "max:", "streamSize"]}),
  3641. smalltalk.StringStream);
  3642. smalltalk.addMethod(
  3643. "_nextPutString_",
  3644. smalltalk.method({
  3645. selector: "nextPutString:",
  3646. fn: function (aString){
  3647. var self=this;
  3648. return smalltalk.withContext(function($ctx1) { _st(self)._nextPutAll_(aString);
  3649. return self}, function($ctx1) {$ctx1.fill(self,"nextPutString:",{aString:aString},smalltalk.StringStream)})},
  3650. messageSends: ["nextPutAll:"]}),
  3651. smalltalk.StringStream);
  3652. smalltalk.addMethod(
  3653. "_space",
  3654. smalltalk.method({
  3655. selector: "space",
  3656. fn: function (){
  3657. var self=this;
  3658. return smalltalk.withContext(function($ctx1) { _st(self)._nextPut_(" ");
  3659. return self}, function($ctx1) {$ctx1.fill(self,"space",{},smalltalk.StringStream)})},
  3660. messageSends: ["nextPut:"]}),
  3661. smalltalk.StringStream);
  3662. smalltalk.addMethod(
  3663. "_tab",
  3664. smalltalk.method({
  3665. selector: "tab",
  3666. fn: function (){
  3667. var self=this;
  3668. return smalltalk.withContext(function($ctx1) { var $1;
  3669. $1=_st(self)._nextPutAll_(_st((smalltalk.String || String))._tab());
  3670. return $1;
  3671. }, function($ctx1) {$ctx1.fill(self,"tab",{},smalltalk.StringStream)})},
  3672. messageSends: ["nextPutAll:", "tab"]}),
  3673. smalltalk.StringStream);