Kernel-Objects.js 127 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791
  1. smalltalk.addPackage('Kernel-Objects', {});
  2. smalltalk.addClass('Object', smalltalk.nil, [], 'Kernel-Objects');
  3. smalltalk.Object.comment=unescape('*Object%20is%20the%20root%20of%20the%20Smalltalk%20class%20system*.%20All%20classes%20in%20the%20system%20are%20subclasses%20of%20Object.%0A%0AObject%20provides%20default%20behavior%20common%20to%20all%20normal%20objects%2C%20such%20as%3A%20%0A%0A-%20access%0A-%20copying%0A-%20comparison%0A-%20error%20handling%0A-%20message%20sending%0A-%20reflection%0A%0AAlso%20utility%20messages%20that%20all%20objects%20should%20respond%20to%20are%20defined%20here.%0A%0AObject%20has%20no%20instance%20variable.%0A%0A%23%23Access%0A%0AInstance%20variables%20can%20be%20accessed%20with%20%60%23instVarAt%3A%60%20and%20%60%23instVarAt%3Aput%3A%60.%20%60Object%20%3E%3E%20instanceVariableNames%60%20answers%20a%20collection%20of%20all%20instance%20variable%20names.%0AAccessing%20JavaScript%20properties%20of%20an%20object%20is%20done%20through%20%60%23basicAt%3A%60%2C%20%60%23basicAt%3Aput%3A%60%20and%20%60basicDelete%3A%60.%0A%0A%23%23Copying%0A%0ACopying%20an%20object%20is%20handled%20by%20%60%23copy%60%20and%20%60%23deepCopy%60.%20The%20first%20one%20performs%20a%20shallow%20copy%20of%20the%20receiver%2C%20while%20the%20second%20one%20performs%20a%20deep%20copy.%0AThe%20hook%20method%20%60%23postCopy%60%20can%20be%20overriden%20in%20subclasses%20to%20copy%20fields%20as%20necessary%20to%20complete%20the%20full%20copy.%20It%20will%20be%20sent%20by%20the%20copy%20of%20the%20receiver.%0A%0A%23%23Comparison%0A%0AObjects%20understand%20equality%20%20%60%23%3D%60%20and%20identity%20%60%23%3D%3D%60%20comparison.%0A%0A%23%23Error%20handling%0A%0A-%20%60%23halt%60%20is%20the%20typical%20message%20to%20use%20for%20inserting%20breakpoints%20during%20debugging.%0A-%20%60%23error%3A%60%20throws%20a%20generic%20error%20exception%0A-%20%60%23doesNotUnderstand%3A%60%20handles%20the%20fact%20that%20there%20was%20an%20attempt%20to%20send%20the%20given%20message%20to%20the%20receiver%20but%20the%20receiver%20does%20not%20understand%20this%20message.%0A%20%20Overriding%20this%20message%20can%20be%20useful%20to%20implement%20proxies%20for%20example.')
  4. smalltalk.addMethod(
  5. unescape('__eq'),
  6. smalltalk.method({
  7. selector: unescape('%3D'),
  8. category: 'comparing',
  9. fn: function (anObject){
  10. var self=this;
  11. return smalltalk.send(self, "__eq_eq", [anObject]);
  12. return self;},
  13. args: ["anObject"],
  14. source: unescape('%3D%20anObject%0A%09%5Eself%20%3D%3D%20anObject'),
  15. messageSends: [unescape("%3D%3D")],
  16. referencedClasses: []
  17. }),
  18. smalltalk.Object);
  19. smalltalk.addMethod(
  20. unescape('_%7E_eq'),
  21. smalltalk.method({
  22. selector: unescape('%7E%3D'),
  23. category: 'comparing',
  24. fn: function (anObject){
  25. var self=this;
  26. return smalltalk.send(smalltalk.send(self, "__eq", [anObject]), "__eq", [false]);
  27. return self;},
  28. args: ["anObject"],
  29. source: unescape('%7E%3D%20anObject%0A%09%5E%28self%20%3D%20anObject%29%20%3D%20false'),
  30. messageSends: [unescape("%3D")],
  31. referencedClasses: []
  32. }),
  33. smalltalk.Object);
  34. smalltalk.addMethod(
  35. unescape('_initialize'),
  36. smalltalk.method({
  37. selector: unescape('initialize'),
  38. category: 'initialization',
  39. fn: function (){
  40. var self=this;
  41. return self;},
  42. args: [],
  43. source: unescape('initialize'),
  44. messageSends: [],
  45. referencedClasses: []
  46. }),
  47. smalltalk.Object);
  48. smalltalk.addMethod(
  49. unescape('_yourself'),
  50. smalltalk.method({
  51. selector: unescape('yourself'),
  52. category: 'accessing',
  53. fn: function (){
  54. var self=this;
  55. return self;
  56. return self;},
  57. args: [],
  58. source: unescape('yourself%0A%09%5Eself'),
  59. messageSends: [],
  60. referencedClasses: []
  61. }),
  62. smalltalk.Object);
  63. smalltalk.addMethod(
  64. unescape('_class'),
  65. smalltalk.method({
  66. selector: unescape('class'),
  67. category: 'accessing',
  68. fn: function (){
  69. var self=this;
  70. return self.klass;
  71. return self;},
  72. args: [],
  73. source: unescape('class%0A%09%3Creturn%20self.klass%3E'),
  74. messageSends: [],
  75. referencedClasses: []
  76. }),
  77. smalltalk.Object);
  78. smalltalk.addMethod(
  79. unescape('_size'),
  80. smalltalk.method({
  81. selector: unescape('size'),
  82. category: 'accessing',
  83. fn: function (){
  84. var self=this;
  85. smalltalk.send(self, "_error_", ["Object not indexable"]);
  86. return self;},
  87. args: [],
  88. source: unescape('size%0A%09self%20error%3A%20%27Object%20not%20indexable%27'),
  89. messageSends: ["error:"],
  90. referencedClasses: []
  91. }),
  92. smalltalk.Object);
  93. smalltalk.addMethod(
  94. unescape('_copy'),
  95. smalltalk.method({
  96. selector: unescape('copy'),
  97. category: 'copying',
  98. fn: function (){
  99. var self=this;
  100. return smalltalk.send(smalltalk.send(self, "_shallowCopy", []), "_postCopy", []);
  101. return self;},
  102. args: [],
  103. source: unescape('copy%0A%09%5Eself%20shallowCopy%20postCopy'),
  104. messageSends: ["postCopy", "shallowCopy"],
  105. referencedClasses: []
  106. }),
  107. smalltalk.Object);
  108. smalltalk.addMethod(
  109. unescape('_shallowCopy'),
  110. smalltalk.method({
  111. selector: unescape('shallowCopy'),
  112. category: 'copying',
  113. fn: function (){
  114. var self=this;
  115. var copy = self.klass._new();
  116. for(var i in self) {
  117. if(/^@.+/.test(i)) {
  118. copy[i] = self[i];
  119. }
  120. }
  121. return copy;
  122. ;
  123. return self;},
  124. args: [],
  125. source: unescape('shallowCopy%0A%09%3C%0A%09%20%20%20%20var%20copy%20%3D%20self.klass._new%28%29%3B%0A%09%20%20%20%20for%28var%20i%20in%20self%29%20%7B%0A%09%09if%28/%5E@.+/.test%28i%29%29%20%7B%0A%09%09%20%20%20%20copy%5Bi%5D%20%3D%20self%5Bi%5D%3B%0A%09%09%7D%0A%09%20%20%20%20%7D%0A%09%20%20%20%20return%20copy%3B%0A%09%3E'),
  126. messageSends: [],
  127. referencedClasses: []
  128. }),
  129. smalltalk.Object);
  130. smalltalk.addMethod(
  131. unescape('_deepCopy'),
  132. smalltalk.method({
  133. selector: unescape('deepCopy'),
  134. category: 'copying',
  135. fn: function (){
  136. var self=this;
  137. var copy = self.klass._new();
  138. for(var i in self) {
  139. if(/^@.+/.test(i)) {
  140. copy[i] = self[i]._deepCopy();
  141. }
  142. }
  143. return copy;
  144. ;
  145. return self;},
  146. args: [],
  147. source: unescape('deepCopy%0A%09%3C%20%20%20%20%0A%09%20%20%20%20var%20copy%20%3D%20self.klass._new%28%29%3B%0A%09%20%20%20%20for%28var%20i%20in%20self%29%20%7B%0A%09%09if%28/%5E@.+/.test%28i%29%29%20%7B%0A%09%09%20%20%20%20copy%5Bi%5D%20%3D%20self%5Bi%5D._deepCopy%28%29%3B%0A%09%09%7D%0A%09%20%20%20%20%7D%0A%09%20%20%20%20return%20copy%3B%0A%09%3E'),
  148. messageSends: [],
  149. referencedClasses: []
  150. }),
  151. smalltalk.Object);
  152. smalltalk.addMethod(
  153. unescape('_postCopy'),
  154. smalltalk.method({
  155. selector: unescape('postCopy'),
  156. category: 'copying',
  157. fn: function (){
  158. var self=this;
  159. return self;},
  160. args: [],
  161. source: unescape('postCopy'),
  162. messageSends: [],
  163. referencedClasses: []
  164. }),
  165. smalltalk.Object);
  166. smalltalk.addMethod(
  167. unescape('__minus_gt'),
  168. smalltalk.method({
  169. selector: unescape('-%3E'),
  170. category: 'converting',
  171. fn: function (anObject){
  172. var self=this;
  173. return smalltalk.send((smalltalk.Association || Association), "_key_value_", [self, anObject]);
  174. return self;},
  175. args: ["anObject"],
  176. source: unescape('-%3E%20anObject%0A%09%5EAssociation%20key%3A%20self%20value%3A%20anObject'),
  177. messageSends: ["key:value:"],
  178. referencedClasses: ["Association"]
  179. }),
  180. smalltalk.Object);
  181. smalltalk.addMethod(
  182. unescape('_asString'),
  183. smalltalk.method({
  184. selector: unescape('asString'),
  185. category: 'converting',
  186. fn: function (){
  187. var self=this;
  188. return smalltalk.send(self, "_printString", []);
  189. return self;},
  190. args: [],
  191. source: unescape('asString%0A%09%5Eself%20printString'),
  192. messageSends: ["printString"],
  193. referencedClasses: []
  194. }),
  195. smalltalk.Object);
  196. smalltalk.addMethod(
  197. unescape('_asJavascript'),
  198. smalltalk.method({
  199. selector: unescape('asJavascript'),
  200. category: 'converting',
  201. fn: function (){
  202. var self=this;
  203. return smalltalk.send(self, "_asString", []);
  204. return self;},
  205. args: [],
  206. source: unescape('asJavascript%0A%09%5Eself%20asString'),
  207. messageSends: ["asString"],
  208. referencedClasses: []
  209. }),
  210. smalltalk.Object);
  211. smalltalk.addMethod(
  212. unescape('_perform_'),
  213. smalltalk.method({
  214. selector: unescape('perform%3A'),
  215. category: 'message handling',
  216. fn: function (aSymbol){
  217. var self=this;
  218. return smalltalk.send(self, "_perform_withArguments_", [aSymbol, []]);
  219. return self;},
  220. args: ["aSymbol"],
  221. source: unescape('perform%3A%20aSymbol%0A%09%5Eself%20perform%3A%20aSymbol%20withArguments%3A%20%23%28%29'),
  222. messageSends: ["perform:withArguments:"],
  223. referencedClasses: []
  224. }),
  225. smalltalk.Object);
  226. smalltalk.addMethod(
  227. unescape('_perform_withArguments_'),
  228. smalltalk.method({
  229. selector: unescape('perform%3AwithArguments%3A'),
  230. category: 'message handling',
  231. fn: function (aSymbol, aCollection){
  232. var self=this;
  233. return smalltalk.send(self, "_basicPerform_withArguments_", [smalltalk.send(aSymbol, "_asSelector", []), aCollection]);
  234. return self;},
  235. args: ["aSymbol", "aCollection"],
  236. source: unescape('perform%3A%20aSymbol%20withArguments%3A%20aCollection%0A%09%5Eself%20basicPerform%3A%20aSymbol%20asSelector%20withArguments%3A%20aCollection'),
  237. messageSends: ["basicPerform:withArguments:", "asSelector"],
  238. referencedClasses: []
  239. }),
  240. smalltalk.Object);
  241. smalltalk.addMethod(
  242. unescape('_instVarAt_'),
  243. smalltalk.method({
  244. selector: unescape('instVarAt%3A'),
  245. category: 'accessing',
  246. fn: function (aSymbol){
  247. var self=this;
  248. var varname=nil;
  249. varname=smalltalk.send(aSymbol, "_asString", []);
  250. return self['@'+varname];
  251. return self;},
  252. args: ["aSymbol"],
  253. source: unescape('instVarAt%3A%20aSymbol%0A%09%7C%20varname%20%7C%0A%09varname%20%3A%3D%20aSymbol%20asString.%0A%09%3Creturn%20self%5B%27@%27+varname%5D%3E'),
  254. messageSends: ["asString"],
  255. referencedClasses: []
  256. }),
  257. smalltalk.Object);
  258. smalltalk.addMethod(
  259. unescape('_instVarAt_put_'),
  260. smalltalk.method({
  261. selector: unescape('instVarAt%3Aput%3A'),
  262. category: 'accessing',
  263. fn: function (aSymbol, anObject){
  264. var self=this;
  265. var varname=nil;
  266. varname=smalltalk.send(aSymbol, "_asString", []);
  267. self['@' + varname] = anObject;
  268. return self;},
  269. args: ["aSymbol", "anObject"],
  270. source: unescape('instVarAt%3A%20aSymbol%20put%3A%20anObject%0A%09%7C%20varname%20%7C%0A%09varname%20%3A%3D%20aSymbol%20asString.%0A%09%3Cself%5B%27@%27%20+%20varname%5D%20%3D%20anObject%3E'),
  271. messageSends: ["asString"],
  272. referencedClasses: []
  273. }),
  274. smalltalk.Object);
  275. smalltalk.addMethod(
  276. unescape('_basicAt_'),
  277. smalltalk.method({
  278. selector: unescape('basicAt%3A'),
  279. category: 'accessing',
  280. fn: function (aString){
  281. var self=this;
  282. return self[aString];
  283. return self;},
  284. args: ["aString"],
  285. source: unescape('basicAt%3A%20aString%0A%09%3Creturn%20self%5BaString%5D%3E'),
  286. messageSends: [],
  287. referencedClasses: []
  288. }),
  289. smalltalk.Object);
  290. smalltalk.addMethod(
  291. unescape('_basicAt_put_'),
  292. smalltalk.method({
  293. selector: unescape('basicAt%3Aput%3A'),
  294. category: 'accessing',
  295. fn: function (aString, anObject){
  296. var self=this;
  297. return self[aString] = anObject;
  298. return self;},
  299. args: ["aString", "anObject"],
  300. source: unescape('basicAt%3A%20aString%20put%3A%20anObject%0A%09%3Creturn%20self%5BaString%5D%20%3D%20anObject%3E'),
  301. messageSends: [],
  302. referencedClasses: []
  303. }),
  304. smalltalk.Object);
  305. smalltalk.addMethod(
  306. unescape('_error_'),
  307. smalltalk.method({
  308. selector: unescape('error%3A'),
  309. category: 'error handling',
  310. fn: function (aString){
  311. var self=this;
  312. smalltalk.send((smalltalk.Error || Error), "_signal_", [aString]);
  313. return self;},
  314. args: ["aString"],
  315. source: unescape('error%3A%20aString%0A%09Error%20signal%3A%20aString'),
  316. messageSends: ["signal:"],
  317. referencedClasses: ["Error"]
  318. }),
  319. smalltalk.Object);
  320. smalltalk.addMethod(
  321. unescape('_subclassResponsibility'),
  322. smalltalk.method({
  323. selector: unescape('subclassResponsibility'),
  324. category: 'error handling',
  325. fn: function (){
  326. var self=this;
  327. smalltalk.send(self, "_error_", ["This method is a responsibility of a subclass"]);
  328. return self;},
  329. args: [],
  330. source: unescape('subclassResponsibility%0A%09self%20error%3A%20%27This%20method%20is%20a%20responsibility%20of%20a%20subclass%27'),
  331. messageSends: ["error:"],
  332. referencedClasses: []
  333. }),
  334. smalltalk.Object);
  335. smalltalk.addMethod(
  336. unescape('_shouldNotImplement'),
  337. smalltalk.method({
  338. selector: unescape('shouldNotImplement'),
  339. category: 'error handling',
  340. fn: function (){
  341. var self=this;
  342. smalltalk.send(self, "_error_", [smalltalk.send("This method should not be implemented in ", "__comma", [smalltalk.send(smalltalk.send(self, "_class", []), "_name", [])])]);
  343. return self;},
  344. args: [],
  345. source: unescape('shouldNotImplement%0A%09self%20error%3A%20%27This%20method%20should%20not%20be%20implemented%20in%20%27%2C%20self%20class%20name'),
  346. messageSends: ["error:", unescape("%2C"), "name", "class"],
  347. referencedClasses: []
  348. }),
  349. smalltalk.Object);
  350. smalltalk.addMethod(
  351. unescape('_try_catch_'),
  352. smalltalk.method({
  353. selector: unescape('try%3Acatch%3A'),
  354. category: 'error handling',
  355. fn: function (aBlock, anotherBlock){
  356. var self=this;
  357. try{result = aBlock()} catch(e) {result = anotherBlock(e)};
  358. return result;;
  359. return self;},
  360. args: ["aBlock", "anotherBlock"],
  361. source: unescape('try%3A%20aBlock%20catch%3A%20anotherBlock%0A%09%3Ctry%7Bresult%20%3D%20aBlock%28%29%7D%20catch%28e%29%20%7Bresult%20%3D%20anotherBlock%28e%29%7D%3B%0A%09return%20result%3B%3E'),
  362. messageSends: [],
  363. referencedClasses: []
  364. }),
  365. smalltalk.Object);
  366. smalltalk.addMethod(
  367. unescape('_printString'),
  368. smalltalk.method({
  369. selector: unescape('printString'),
  370. category: 'printing',
  371. fn: function (){
  372. var self=this;
  373. return smalltalk.send("a ", "__comma", [smalltalk.send(smalltalk.send(self, "_class", []), "_name", [])]);
  374. return self;},
  375. args: [],
  376. source: unescape('printString%0A%09%5E%27a%20%27%2C%20self%20class%20name'),
  377. messageSends: [unescape("%2C"), "name", "class"],
  378. referencedClasses: []
  379. }),
  380. smalltalk.Object);
  381. smalltalk.addMethod(
  382. unescape('_printNl'),
  383. smalltalk.method({
  384. selector: unescape('printNl'),
  385. category: 'printing',
  386. fn: function (){
  387. var self=this;
  388. console.log(self);
  389. return self;},
  390. args: [],
  391. source: unescape('printNl%0A%09%3Cconsole.log%28self%29%3E'),
  392. messageSends: [],
  393. referencedClasses: []
  394. }),
  395. smalltalk.Object);
  396. smalltalk.addMethod(
  397. unescape('_isKindOf_'),
  398. smalltalk.method({
  399. selector: unescape('isKindOf%3A'),
  400. category: 'testing',
  401. fn: function (aClass){
  402. var self=this;
  403. return ((($receiver = smalltalk.send(self, "_isMemberOf_", [aClass])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return true;})() : (function(){return smalltalk.send(smalltalk.send(self, "_class", []), "_inheritsFrom_", [aClass]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return true;}), (function(){return smalltalk.send(smalltalk.send(self, "_class", []), "_inheritsFrom_", [aClass]);})]));
  404. return self;},
  405. args: ["aClass"],
  406. source: unescape('isKindOf%3A%20aClass%0A%09%5E%28self%20isMemberOf%3A%20aClass%29%0A%09%20%20%20%20ifTrue%3A%20%5Btrue%5D%0A%09%20%20%20%20ifFalse%3A%20%5Bself%20class%20inheritsFrom%3A%20aClass%5D'),
  407. messageSends: ["ifTrue:ifFalse:", "isMemberOf:", "inheritsFrom:", "class"],
  408. referencedClasses: []
  409. }),
  410. smalltalk.Object);
  411. smalltalk.addMethod(
  412. unescape('_isMemberOf_'),
  413. smalltalk.method({
  414. selector: unescape('isMemberOf%3A'),
  415. category: 'testing',
  416. fn: function (aClass){
  417. var self=this;
  418. return smalltalk.send(smalltalk.send(self, "_class", []), "__eq", [aClass]);
  419. return self;},
  420. args: ["aClass"],
  421. source: unescape('isMemberOf%3A%20aClass%0A%09%5Eself%20class%20%3D%20aClass'),
  422. messageSends: [unescape("%3D"), "class"],
  423. referencedClasses: []
  424. }),
  425. smalltalk.Object);
  426. smalltalk.addMethod(
  427. unescape('_ifNil_'),
  428. smalltalk.method({
  429. selector: unescape('ifNil%3A'),
  430. category: 'testing',
  431. fn: function (aBlock){
  432. var self=this;
  433. return self;
  434. return self;},
  435. args: ["aBlock"],
  436. source: unescape('ifNil%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5Eself'),
  437. messageSends: [],
  438. referencedClasses: []
  439. }),
  440. smalltalk.Object);
  441. smalltalk.addMethod(
  442. unescape('_ifNil_ifNotNil_'),
  443. smalltalk.method({
  444. selector: unescape('ifNil%3AifNotNil%3A'),
  445. category: 'testing',
  446. fn: function (aBlock, anotherBlock){
  447. var self=this;
  448. return smalltalk.send(anotherBlock, "_value", []);
  449. return self;},
  450. args: ["aBlock", "anotherBlock"],
  451. source: unescape('ifNil%3A%20aBlock%20ifNotNil%3A%20anotherBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5EanotherBlock%20value'),
  452. messageSends: ["value"],
  453. referencedClasses: []
  454. }),
  455. smalltalk.Object);
  456. smalltalk.addMethod(
  457. unescape('_ifNotNil_'),
  458. smalltalk.method({
  459. selector: unescape('ifNotNil%3A'),
  460. category: 'testing',
  461. fn: function (aBlock){
  462. var self=this;
  463. return smalltalk.send(aBlock, "_value", []);
  464. return self;},
  465. args: ["aBlock"],
  466. source: unescape('ifNotNil%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5EaBlock%20value'),
  467. messageSends: ["value"],
  468. referencedClasses: []
  469. }),
  470. smalltalk.Object);
  471. smalltalk.addMethod(
  472. unescape('_ifNotNil_ifNil_'),
  473. smalltalk.method({
  474. selector: unescape('ifNotNil%3AifNil%3A'),
  475. category: 'testing',
  476. fn: function (aBlock, anotherBlock){
  477. var self=this;
  478. return smalltalk.send(aBlock, "_value", []);
  479. return self;},
  480. args: ["aBlock", "anotherBlock"],
  481. source: unescape('ifNotNil%3A%20aBlock%20ifNil%3A%20anotherBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5EaBlock%20value'),
  482. messageSends: ["value"],
  483. referencedClasses: []
  484. }),
  485. smalltalk.Object);
  486. smalltalk.addMethod(
  487. unescape('_isNil'),
  488. smalltalk.method({
  489. selector: unescape('isNil'),
  490. category: 'testing',
  491. fn: function (){
  492. var self=this;
  493. return false;
  494. return self;},
  495. args: [],
  496. source: unescape('isNil%0A%09%5Efalse'),
  497. messageSends: [],
  498. referencedClasses: []
  499. }),
  500. smalltalk.Object);
  501. smalltalk.addMethod(
  502. unescape('_notNil'),
  503. smalltalk.method({
  504. selector: unescape('notNil'),
  505. category: 'testing',
  506. fn: function (){
  507. var self=this;
  508. return smalltalk.send(smalltalk.send(self, "_isNil", []), "_not", []);
  509. return self;},
  510. args: [],
  511. source: unescape('notNil%0A%09%5Eself%20isNil%20not'),
  512. messageSends: ["not", "isNil"],
  513. referencedClasses: []
  514. }),
  515. smalltalk.Object);
  516. smalltalk.addMethod(
  517. unescape('_isClass'),
  518. smalltalk.method({
  519. selector: unescape('isClass'),
  520. category: 'testing',
  521. fn: function (){
  522. var self=this;
  523. return false;
  524. return self;},
  525. args: [],
  526. source: unescape('isClass%0A%09%5Efalse'),
  527. messageSends: [],
  528. referencedClasses: []
  529. }),
  530. smalltalk.Object);
  531. smalltalk.addMethod(
  532. unescape('_isMetaclass'),
  533. smalltalk.method({
  534. selector: unescape('isMetaclass'),
  535. category: 'testing',
  536. fn: function (){
  537. var self=this;
  538. return false;
  539. return self;},
  540. args: [],
  541. source: unescape('isMetaclass%0A%09%5Efalse'),
  542. messageSends: [],
  543. referencedClasses: []
  544. }),
  545. smalltalk.Object);
  546. smalltalk.addMethod(
  547. unescape('_isNumber'),
  548. smalltalk.method({
  549. selector: unescape('isNumber'),
  550. category: 'testing',
  551. fn: function (){
  552. var self=this;
  553. return false;
  554. return self;},
  555. args: [],
  556. source: unescape('isNumber%0A%09%5Efalse'),
  557. messageSends: [],
  558. referencedClasses: []
  559. }),
  560. smalltalk.Object);
  561. smalltalk.addMethod(
  562. unescape('_isString'),
  563. smalltalk.method({
  564. selector: unescape('isString'),
  565. category: 'testing',
  566. fn: function (){
  567. var self=this;
  568. return false;
  569. return self;},
  570. args: [],
  571. source: unescape('isString%0A%09%5Efalse'),
  572. messageSends: [],
  573. referencedClasses: []
  574. }),
  575. smalltalk.Object);
  576. smalltalk.addMethod(
  577. unescape('_isParseFailure'),
  578. smalltalk.method({
  579. selector: unescape('isParseFailure'),
  580. category: 'testing',
  581. fn: function (){
  582. var self=this;
  583. return false;
  584. return self;},
  585. args: [],
  586. source: unescape('isParseFailure%0A%09%5Efalse'),
  587. messageSends: [],
  588. referencedClasses: []
  589. }),
  590. smalltalk.Object);
  591. smalltalk.addMethod(
  592. unescape('_basicPerform_'),
  593. smalltalk.method({
  594. selector: unescape('basicPerform%3A'),
  595. category: 'message handling',
  596. fn: function (aSymbol){
  597. var self=this;
  598. return smalltalk.send(self, "_basicPerform_withArguments_", [aSymbol, []]);
  599. return self;},
  600. args: ["aSymbol"],
  601. source: unescape('basicPerform%3A%20aSymbol%20%0A%09%5Eself%20basicPerform%3A%20aSymbol%20withArguments%3A%20%23%28%29'),
  602. messageSends: ["basicPerform:withArguments:"],
  603. referencedClasses: []
  604. }),
  605. smalltalk.Object);
  606. smalltalk.addMethod(
  607. unescape('_basicPerform_withArguments_'),
  608. smalltalk.method({
  609. selector: unescape('basicPerform%3AwithArguments%3A'),
  610. category: 'message handling',
  611. fn: function (aSymbol, aCollection){
  612. var self=this;
  613. return self[aSymbol].apply(self, aCollection);;
  614. return self;},
  615. args: ["aSymbol", "aCollection"],
  616. source: unescape('basicPerform%3A%20aSymbol%20withArguments%3A%20aCollection%0A%09%3Creturn%20self%5BaSymbol%5D.apply%28self%2C%20aCollection%29%3B%3E'),
  617. messageSends: [],
  618. referencedClasses: []
  619. }),
  620. smalltalk.Object);
  621. smalltalk.addMethod(
  622. unescape('_basicDelete_'),
  623. smalltalk.method({
  624. selector: unescape('basicDelete%3A'),
  625. category: 'accessing',
  626. fn: function (aString){
  627. var self=this;
  628. delete self[aString]; return aString;
  629. return self;},
  630. args: ["aString"],
  631. source: unescape('basicDelete%3A%20aString%0A%20%20%20%20%3Cdelete%20self%5BaString%5D%3B%20return%20aString%3E'),
  632. messageSends: [],
  633. referencedClasses: []
  634. }),
  635. smalltalk.Object);
  636. smalltalk.addMethod(
  637. unescape('_doesNotUnderstand_'),
  638. smalltalk.method({
  639. selector: unescape('doesNotUnderstand%3A'),
  640. category: 'error handling',
  641. fn: function (aMessage){
  642. var self=this;
  643. (function($rec){smalltalk.send($rec, "_receiver_", [self]);smalltalk.send($rec, "_message_", [aMessage]);return smalltalk.send($rec, "_signal", []);})(smalltalk.send((smalltalk.MessageNotUnderstood || MessageNotUnderstood), "_new", []));
  644. return self;},
  645. args: ["aMessage"],
  646. source: unescape('doesNotUnderstand%3A%20aMessage%0A%09MessageNotUnderstood%20new%0A%09%09receiver%3A%20self%3B%0A%09%09message%3A%20aMessage%3B%0A%09%09signal'),
  647. messageSends: ["receiver:", "message:", "signal", "new"],
  648. referencedClasses: ["MessageNotUnderstood"]
  649. }),
  650. smalltalk.Object);
  651. smalltalk.addMethod(
  652. unescape('_asJSON'),
  653. smalltalk.method({
  654. selector: unescape('asJSON'),
  655. category: 'converting',
  656. fn: function (){
  657. var self=this;
  658. return smalltalk.send((smalltalk.JSON || JSON), "_parse_", [smalltalk.send(self, "_asJSONString", [])]);
  659. return self;},
  660. args: [],
  661. source: unescape('asJSON%0A%09%5EJSON%20parse%3A%20self%20asJSONString'),
  662. messageSends: ["parse:", "asJSONString"],
  663. referencedClasses: ["JSON"]
  664. }),
  665. smalltalk.Object);
  666. smalltalk.addMethod(
  667. unescape('_halt'),
  668. smalltalk.method({
  669. selector: unescape('halt'),
  670. category: 'error handling',
  671. fn: function (){
  672. var self=this;
  673. smalltalk.send(self, "_error_", ["Halt encountered"]);
  674. return self;},
  675. args: [],
  676. source: unescape('halt%0A%09self%20error%3A%20%27Halt%20encountered%27'),
  677. messageSends: ["error:"],
  678. referencedClasses: []
  679. }),
  680. smalltalk.Object);
  681. smalltalk.addMethod(
  682. unescape('_log_block_'),
  683. smalltalk.method({
  684. selector: unescape('log%3Ablock%3A'),
  685. category: 'printing',
  686. fn: function (aString, aBlock){
  687. var self=this;
  688. var result=nil;
  689. smalltalk.send((typeof console == 'undefined' ? nil : console), "_log_", [smalltalk.send(smalltalk.send(aString, "__comma", [" time: "]), "__comma", [smalltalk.send(smalltalk.send((smalltalk.Date || Date), "_millisecondsToRun_", [(function(){return result=smalltalk.send(aBlock, "_value", []);})]), "_printString", [])])]);
  690. return result;
  691. return self;},
  692. args: ["aString", "aBlock"],
  693. source: unescape('log%3A%20aString%20block%3A%20aBlock%0A%0A%09%7C%20result%20%7C%0A%09console%20log%3A%20%20aString%2C%20%20%27%20time%3A%20%27%2C%20%28Date%20millisecondsToRun%3A%20%5Bresult%20%3A%3D%20aBlock%20value%5D%29%20printString.%0A%09%5Eresult'),
  694. messageSends: ["log:", unescape("%2C"), "printString", "millisecondsToRun:", "value"],
  695. referencedClasses: ["Date"]
  696. }),
  697. smalltalk.Object);
  698. smalltalk.addMethod(
  699. unescape('__eq_eq'),
  700. smalltalk.method({
  701. selector: unescape('%3D%3D'),
  702. category: 'comparing',
  703. fn: function (anObject){
  704. var self=this;
  705. return smalltalk.send(smalltalk.send(self, "_identityHash", []), "__eq", [smalltalk.send(anObject, "_identityHash", [])]);
  706. return self;},
  707. args: ["anObject"],
  708. source: unescape('%3D%3D%20anObject%0A%09%5Eself%20identityHash%20%3D%20anObject%20identityHash'),
  709. messageSends: [unescape("%3D"), "identityHash"],
  710. referencedClasses: []
  711. }),
  712. smalltalk.Object);
  713. smalltalk.addMethod(
  714. unescape('_%7E%7E'),
  715. smalltalk.method({
  716. selector: unescape('%7E%7E'),
  717. category: 'comparing',
  718. fn: function (anObject){
  719. var self=this;
  720. return smalltalk.send(smalltalk.send(self, "__eq_eq", [anObject]), "__eq", [false]);
  721. return self;},
  722. args: ["anObject"],
  723. source: unescape('%7E%7E%20anObject%0A%09%5E%28self%20%3D%3D%20anObject%29%20%3D%20false'),
  724. messageSends: [unescape("%3D"), unescape("%3D%3D")],
  725. referencedClasses: []
  726. }),
  727. smalltalk.Object);
  728. smalltalk.addMethod(
  729. unescape('_deprecatedAPI'),
  730. smalltalk.method({
  731. selector: unescape('deprecatedAPI'),
  732. category: 'error handling',
  733. fn: function (){
  734. var self=this;
  735. smalltalk.send((typeof console == 'undefined' ? nil : console), "_warn_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.getThisContext()), "_home", []), "_asString", []), "__comma", [unescape("%20is%20deprecated%21%20%28in%20")]), "__comma", [smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.getThisContext()), "_home", []), "_home", []), "_asString", [])]), "__comma", [unescape("%29")])]);
  736. return self;},
  737. args: [],
  738. source: unescape('deprecatedAPI%0A%09%22Just%20a%20simple%20way%20to%20deprecate%20methods.%0A%09%23deprecatedAPI%20is%20in%20the%20%27error%20handling%27%20protocol%20even%20if%20it%20doesn%27t%20throw%20an%20error%2C%0A%09but%20it%20could%20in%20the%20future.%22%0A%09console%20warn%3A%20thisContext%20home%20asString%2C%20%27%20is%20deprecated%21%20%28in%20%27%2C%20thisContext%20home%20home%20asString%2C%20%27%29%27'),
  739. messageSends: ["warn:", unescape("%2C"), "asString", "home"],
  740. referencedClasses: []
  741. }),
  742. smalltalk.Object);
  743. smalltalk.addMethod(
  744. unescape('_storeString'),
  745. smalltalk.method({
  746. selector: unescape('storeString'),
  747. category: 'printing',
  748. fn: function (){
  749. var self=this;
  750. return smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(s){return smalltalk.send(self, "_storeOn_", [s]);})]);
  751. return self;},
  752. args: [],
  753. source: unescape('storeString%0A%09%22Answer%20a%20String%20representation%20of%20the%20receiver%20from%20which%20the%20receiver%20%0A%09can%20be%20reconstructed.%22%0A%0A%09%5E%20String%20streamContents%3A%20%5B%3As%20%7C%20self%20storeOn%3A%20s%5D'),
  754. messageSends: ["streamContents:", "storeOn:"],
  755. referencedClasses: ["String"]
  756. }),
  757. smalltalk.Object);
  758. smalltalk.addMethod(
  759. unescape('_storeOn_'),
  760. smalltalk.method({
  761. selector: unescape('storeOn%3A'),
  762. category: 'printing',
  763. fn: function (aStream){
  764. var self=this;
  765. smalltalk.send(aStream, "_nextPutAll_", [smalltalk.send(self, "_printString", [])]);
  766. return self;},
  767. args: ["aStream"],
  768. source: unescape('storeOn%3A%20aStream%0A%09aStream%20nextPutAll%3A%20self%20printString'),
  769. messageSends: ["nextPutAll:", "printString"],
  770. referencedClasses: []
  771. }),
  772. smalltalk.Object);
  773. smalltalk.addMethod(
  774. unescape('_asJSONString'),
  775. smalltalk.method({
  776. selector: unescape('asJSONString'),
  777. category: 'converting',
  778. fn: function (){
  779. var self=this;
  780. return smalltalk.send((smalltalk.JSON || JSON), "_stringify_", [self]);
  781. return self;},
  782. args: [],
  783. source: unescape('asJSONString%0A%09%5EJSON%20stringify%3A%20self'),
  784. messageSends: ["stringify:"],
  785. referencedClasses: ["JSON"]
  786. }),
  787. smalltalk.Object);
  788. smalltalk.addMethod(
  789. unescape('_identityHash'),
  790. smalltalk.method({
  791. selector: unescape('identityHash'),
  792. category: 'accessing',
  793. fn: function (){
  794. var self=this;
  795. return self.identityHash || (self.identityHash = smalltalk.nextId());;
  796. return self;},
  797. args: [],
  798. source: unescape('identityHash%0A%09%3Creturn%20self.identityHash%20%7C%7C%20%28self.identityHash%20%3D%20smalltalk.nextId%28%29%29%3B%3E'),
  799. messageSends: [],
  800. referencedClasses: []
  801. }),
  802. smalltalk.Object);
  803. smalltalk.addMethod(
  804. unescape('_isSymbol'),
  805. smalltalk.method({
  806. selector: unescape('isSymbol'),
  807. category: 'testing',
  808. fn: function (){
  809. var self=this;
  810. return false;
  811. return self;},
  812. args: [],
  813. source: unescape('isSymbol%0A%09%5Efalse'),
  814. messageSends: [],
  815. referencedClasses: []
  816. }),
  817. smalltalk.Object);
  818. smalltalk.addMethod(
  819. unescape('_initialize'),
  820. smalltalk.method({
  821. selector: unescape('initialize'),
  822. category: 'initialization',
  823. fn: function (){
  824. var self=this;
  825. return self;},
  826. args: [],
  827. source: unescape('initialize%0A%09%22no%20op%22'),
  828. messageSends: [],
  829. referencedClasses: []
  830. }),
  831. smalltalk.Object.klass);
  832. smalltalk.addClass('Smalltalk', smalltalk.Object, [], 'Kernel-Objects');
  833. smalltalk.addMethod(
  834. unescape('_classes'),
  835. smalltalk.method({
  836. selector: unescape('classes'),
  837. category: 'accessing',
  838. fn: function (){
  839. var self=this;
  840. return self.classes();
  841. return self;},
  842. args: [],
  843. source: unescape('classes%0A%09%3Creturn%20self.classes%28%29%3E'),
  844. messageSends: [],
  845. referencedClasses: []
  846. }),
  847. smalltalk.Smalltalk);
  848. smalltalk.addMethod(
  849. unescape('_at_'),
  850. smalltalk.method({
  851. selector: unescape('at%3A'),
  852. category: 'accessing',
  853. fn: function (aString){
  854. var self=this;
  855. return self[aString];
  856. return self;},
  857. args: ["aString"],
  858. source: unescape('at%3A%20aString%0A%09%3Creturn%20self%5BaString%5D%3E'),
  859. messageSends: [],
  860. referencedClasses: []
  861. }),
  862. smalltalk.Smalltalk);
  863. smalltalk.addMethod(
  864. unescape('_removeClass_'),
  865. smalltalk.method({
  866. selector: unescape('removeClass%3A'),
  867. category: 'classes',
  868. fn: function (aClass){
  869. var self=this;
  870. ((($receiver = smalltalk.send(aClass, "_isMetaclass", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_error_", [smalltalk.send(smalltalk.send(aClass, "_asString", []), "__comma", [unescape("%20is%20a%20Metaclass%20and%20cannot%20be%20removed%21")])]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(self, "_error_", [smalltalk.send(smalltalk.send(aClass, "_asString", []), "__comma", [unescape("%20is%20a%20Metaclass%20and%20cannot%20be%20removed%21")])]);})]));
  871. smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_methodDictionary", []), "_values", []), "_do_", [(function(each){return smalltalk.send(aClass, "_removeCompiledMethod_", [each]);})]);
  872. smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_class", []), "_methodDictionary", []), "_values", []), "_do_", [(function(each){return smalltalk.send(smalltalk.send(aClass, "_class", []), "_removeCompiledMethod_", [each]);})]);
  873. smalltalk.send(self, "_basicDelete_", [smalltalk.send(aClass, "_name", [])]);
  874. return self;},
  875. args: ["aClass"],
  876. source: unescape('removeClass%3A%20aClass%0A%09aClass%20isMetaclass%20ifTrue%3A%20%5Bself%20error%3A%20aClass%20asString%2C%20%27%20is%20a%20Metaclass%20and%20cannot%20be%20removed%21%27%5D.%0A%09aClass%20methodDictionary%20values%20do%3A%20%5B%3Aeach%20%7C%0A%09%09aClass%20removeCompiledMethod%3A%20each%5D.%0A%09aClass%20class%20methodDictionary%20values%20do%3A%20%5B%3Aeach%20%7C%0A%09%09aClass%20class%20removeCompiledMethod%3A%20each%5D.%0A%09self%20basicDelete%3A%20aClass%20name'),
  877. messageSends: ["ifTrue:", "isMetaclass", "error:", unescape("%2C"), "asString", "do:", "values", "methodDictionary", "removeCompiledMethod:", "class", "basicDelete:", "name"],
  878. referencedClasses: []
  879. }),
  880. smalltalk.Smalltalk);
  881. smalltalk.addMethod(
  882. unescape('_basicParse_'),
  883. smalltalk.method({
  884. selector: unescape('basicParse%3A'),
  885. category: 'accessing',
  886. fn: function (aString){
  887. var self=this;
  888. return smalltalk.parser.parse(aString);
  889. return self;},
  890. args: ["aString"],
  891. source: unescape('basicParse%3A%20aString%0A%09%3Creturn%20smalltalk.parser.parse%28aString%29%3E'),
  892. messageSends: [],
  893. referencedClasses: []
  894. }),
  895. smalltalk.Smalltalk);
  896. smalltalk.addMethod(
  897. unescape('_parse_'),
  898. smalltalk.method({
  899. selector: unescape('parse%3A'),
  900. category: 'accessing',
  901. fn: function (aString){
  902. var self=this;
  903. var result=nil;
  904. smalltalk.send(self, "_try_catch_", [(function(){return result=smalltalk.send(self, "_basicParse_", [aString]);}), (function(ex){return smalltalk.send(smalltalk.send(self, "_parseError_parsing_", [ex, aString]), "_signal", []);})]);
  905. return result;
  906. return self;},
  907. args: ["aString"],
  908. source: unescape('parse%3A%20aString%0A%09%7C%20result%20%7C%20%0A%09self%20try%3A%20%5Bresult%20%3A%3D%20self%20basicParse%3A%20aString%5D%20catch%3A%20%5B%3Aex%20%7C%20%28self%20parseError%3A%20ex%20parsing%3A%20aString%29%20signal%5D.%0A%09%5Eresult'),
  909. messageSends: ["try:catch:", "basicParse:", "signal", "parseError:parsing:"],
  910. referencedClasses: []
  911. }),
  912. smalltalk.Smalltalk);
  913. smalltalk.addMethod(
  914. unescape('_parseError_parsing_'),
  915. smalltalk.method({
  916. selector: unescape('parseError%3Aparsing%3A'),
  917. category: 'accessing',
  918. fn: function (anException, aString){
  919. var self=this;
  920. var row=nil;
  921. var col=nil;
  922. var message=nil;
  923. var lines=nil;
  924. var badLine=nil;
  925. var code=nil;
  926. row = anException.line;
  927. col = anException.column;
  928. message = anException.message;;
  929. lines=smalltalk.send(aString, "_lines", []);
  930. badLine=smalltalk.send(lines, "_at_", [row]);
  931. badLine=smalltalk.send(smalltalk.send(smalltalk.send(badLine, "_copyFrom_to_", [(1), ((($receiver = col).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)]))]), "__comma", [unescape("%20%3D%3D%3D%3E")]), "__comma", [smalltalk.send(badLine, "_copyFrom_to_", [col, smalltalk.send(badLine, "_size", [])])]);
  932. smalltalk.send(lines, "_at_put_", [row, badLine]);
  933. code=smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(s){return smalltalk.send(lines, "_withIndexDo_", [(function(l, i){return smalltalk.send(s, "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(i, "_asString", []), "__comma", [": "]), "__comma", [l]), "__comma", [smalltalk.send((smalltalk.String || String), "_lf", [])])]);})]);})]);
  934. return smalltalk.send(smalltalk.send((smalltalk.Error || Error), "_new", []), "_messageText_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("Parse error on line ", "__comma", [row]), "__comma", [" column "]), "__comma", [col]), "__comma", [" : "]), "__comma", [message]), "__comma", [unescape("%20Below%20is%20code%20with%20line%20numbers%20and%20%3D%3D%3D%3E%20marker%20inserted%3A")]), "__comma", [smalltalk.send((smalltalk.String || String), "_lf", [])]), "__comma", [code])]);
  935. return self;},
  936. args: ["anException", "aString"],
  937. source: unescape('parseError%3A%20anException%20parsing%3A%20aString%0A%09%7C%20row%20col%20message%20lines%20badLine%20code%20%7C%0A%09%3Crow%20%3D%20anException.line%3B%0A%09col%20%3D%20anException.column%3B%0A%09message%20%3D%20anException.message%3B%3E.%0A%09lines%20%3A%3D%20aString%20lines.%0A%09badLine%20%3A%3D%20lines%20at%3A%20row.%0A%09badLine%20%3A%3D%20%28badLine%20copyFrom%3A%201%20to%3A%20col%20-%201%29%2C%20%27%20%3D%3D%3D%3E%27%2C%20%28badLine%20copyFrom%3A%20%20col%20to%3A%20badLine%20size%29.%0A%09lines%20at%3A%20row%20put%3A%20badLine.%0A%09code%20%3A%3D%20String%20streamContents%3A%20%5B%3As%20%7C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20lines%20withIndexDo%3A%20%5B%3Al%20%3Ai%20%7C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20s%20nextPutAll%3A%20i%20asString%2C%20%27%3A%20%27%2C%20l%2C%20String%20lf%5D%5D.%0A%09%5E%20Error%20new%20messageText%3A%20%28%27Parse%20error%20on%20line%20%27%20%2C%20row%20%2C%20%27%20column%20%27%20%2C%20col%20%2C%20%27%20%3A%20%27%20%2C%20message%20%2C%20%27%20Below%20is%20code%20with%20line%20numbers%20and%20%3D%3D%3D%3E%20marker%20inserted%3A%27%20%2C%20String%20lf%2C%20code%29'),
  938. messageSends: ["lines", "at:", unescape("%2C"), "copyFrom:to:", unescape("-"), "size", "at:put:", "streamContents:", "withIndexDo:", "nextPutAll:", "asString", "lf", "messageText:", "new"],
  939. referencedClasses: ["String", "Error"]
  940. }),
  941. smalltalk.Smalltalk);
  942. smalltalk.addMethod(
  943. unescape('_packages'),
  944. smalltalk.method({
  945. selector: unescape('packages'),
  946. category: 'packages',
  947. fn: function (){
  948. var self=this;
  949. return self.packages.all();
  950. return self;},
  951. args: [],
  952. source: unescape('packages%0A%09%22Return%20all%20Package%20instances%20in%20the%20system.%22%0A%0A%09%3Creturn%20self.packages.all%28%29%3E'),
  953. messageSends: [],
  954. referencedClasses: []
  955. }),
  956. smalltalk.Smalltalk);
  957. smalltalk.addMethod(
  958. unescape('_packageAt_'),
  959. smalltalk.method({
  960. selector: unescape('packageAt%3A'),
  961. category: 'packages',
  962. fn: function (packageName){
  963. var self=this;
  964. return self.packages[packageName];
  965. return self;},
  966. args: ["packageName"],
  967. source: unescape('packageAt%3A%20packageName%0A%20%20%20%20%20%20%20%3Creturn%20self.packages%5BpackageName%5D%3E'),
  968. messageSends: [],
  969. referencedClasses: []
  970. }),
  971. smalltalk.Smalltalk);
  972. smalltalk.addMethod(
  973. unescape('_packageAt_ifAbsent_'),
  974. smalltalk.method({
  975. selector: unescape('packageAt%3AifAbsent%3A'),
  976. category: 'packages',
  977. fn: function (packageName, aBlock){
  978. var self=this;
  979. return smalltalk.send(smalltalk.send(self, "_packageAt_", [packageName]), "_ifNil_", [aBlock]);
  980. return self;},
  981. args: ["packageName", "aBlock"],
  982. source: unescape('packageAt%3A%20packageName%20ifAbsent%3A%20aBlock%0A%20%20%20%20%20%20%20%5E%28self%20packageAt%3A%20packageName%29%20ifNil%3A%20aBlock'),
  983. messageSends: ["ifNil:", "packageAt:"],
  984. referencedClasses: []
  985. }),
  986. smalltalk.Smalltalk);
  987. smalltalk.addMethod(
  988. unescape('_createPackage_'),
  989. smalltalk.method({
  990. selector: unescape('createPackage%3A'),
  991. category: 'private',
  992. fn: function (packageName){
  993. var self=this;
  994. return smalltalk.addPackage(packageName, nil);
  995. return self;},
  996. args: ["packageName"],
  997. source: unescape('createPackage%3A%20packageName%0A%09%22Create%20and%20bind%20a%20new%20package%20with%20given%20name%20and%20return%20it.%22%0A%0A%20%20%20%20%20%20%3Creturn%20smalltalk.addPackage%28packageName%2C%20nil%29%3E'),
  998. messageSends: [],
  999. referencedClasses: []
  1000. }),
  1001. smalltalk.Smalltalk);
  1002. smalltalk.addMethod(
  1003. unescape('_deletePackage_'),
  1004. smalltalk.method({
  1005. selector: unescape('deletePackage%3A'),
  1006. category: 'private',
  1007. fn: function (packageName){
  1008. var self=this;
  1009. delete smalltalk.packages[packageName];
  1010. return self;},
  1011. args: ["packageName"],
  1012. source: unescape('deletePackage%3A%20packageName%0A%09%22Deletes%20a%20package%20by%20deleting%20its%20binding%2C%20but%20does%20not%20check%20if%20it%20contains%20classes%20etc.%0A%09To%20remove%20a%20package%2C%20use%20%23removePackage%20instead.%22%0A%0A%20%20%20%20%20%20%20%3Cdelete%20smalltalk.packages%5BpackageName%5D%3E'),
  1013. messageSends: [],
  1014. referencedClasses: []
  1015. }),
  1016. smalltalk.Smalltalk);
  1017. smalltalk.addMethod(
  1018. unescape('_removePackage_'),
  1019. smalltalk.method({
  1020. selector: unescape('removePackage%3A'),
  1021. category: 'packages',
  1022. fn: function (packageName){
  1023. var self=this;
  1024. var pkg=nil;
  1025. pkg=smalltalk.send(self, "_packageAt_ifAbsent_", [packageName, (function(){return smalltalk.send(self, "_error_", [smalltalk.send("Missing package: ", "__comma", [packageName])]);})]);
  1026. smalltalk.send(smalltalk.send(pkg, "_classes", []), "_do_", [(function(each){return smalltalk.send(self, "_removeClass_", [each]);})]);
  1027. smalltalk.send(self, "_deletePackage_", [packageName]);
  1028. return self;},
  1029. args: ["packageName"],
  1030. source: unescape('removePackage%3A%20packageName%0A%09%22Removes%20a%20package%20and%20all%20its%20classes.%22%0A%0A%09%7C%20pkg%20%7C%0A%09pkg%20%3A%3D%20self%20packageAt%3A%20packageName%20ifAbsent%3A%20%5Bself%20error%3A%20%27Missing%20package%3A%20%27%2C%20packageName%5D.%0A%09pkg%20classes%20do%3A%20%5B%3Aeach%20%7C%0A%20%20%20%20%20%20%20%20%09self%20removeClass%3A%20each%5D.%0A%09self%20deletePackage%3A%20packageName'),
  1031. messageSends: ["packageAt:ifAbsent:", "error:", unescape("%2C"), "do:", "classes", "removeClass:", "deletePackage:"],
  1032. referencedClasses: []
  1033. }),
  1034. smalltalk.Smalltalk);
  1035. smalltalk.addMethod(
  1036. unescape('_renamePackage_to_'),
  1037. smalltalk.method({
  1038. selector: unescape('renamePackage%3Ato%3A'),
  1039. category: 'packages',
  1040. fn: function (packageName, newName){
  1041. var self=this;
  1042. var pkg=nil;
  1043. pkg=smalltalk.send(self, "_packageAt_ifAbsent_", [packageName, (function(){return smalltalk.send(self, "_error_", [smalltalk.send("Missing package: ", "__comma", [packageName])]);})]);
  1044. (($receiver = smalltalk.send(self, "_packageAt_", [newName])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_error_", [smalltalk.send("Already exists a package called: ", "__comma", [newName])]);})() : nil;
  1045. smalltalk.packages[newName] = smalltalk.packages[packageName];
  1046. smalltalk.send(pkg, "_name_", [newName]);
  1047. smalltalk.send(self, "_deletePackage_", [packageName]);
  1048. return self;},
  1049. args: ["packageName", "newName"],
  1050. source: unescape('renamePackage%3A%20packageName%20to%3A%20newName%0A%09%22Rename%20a%20package.%22%0A%0A%09%7C%20pkg%20%7C%0A%09pkg%20%3A%3D%20self%20packageAt%3A%20packageName%20ifAbsent%3A%20%5Bself%20error%3A%20%27Missing%20package%3A%20%27%2C%20packageName%5D.%0A%09%28self%20packageAt%3A%20newName%29%20ifNotNil%3A%20%5Bself%20error%3A%20%27Already%20exists%20a%20package%20called%3A%20%27%2C%20newName%5D.%0A%09%3Csmalltalk.packages%5BnewName%5D%20%3D%20smalltalk.packages%5BpackageName%5D%3E.%0A%09pkg%20name%3A%20newName.%0A%09self%20deletePackage%3A%20packageName.'),
  1051. messageSends: ["packageAt:ifAbsent:", "error:", unescape("%2C"), "ifNotNil:", "packageAt:", "name:", "deletePackage:"],
  1052. referencedClasses: []
  1053. }),
  1054. smalltalk.Smalltalk);
  1055. smalltalk.addMethod(
  1056. unescape('_reservedWords'),
  1057. smalltalk.method({
  1058. selector: unescape('reservedWords'),
  1059. category: 'accessing',
  1060. fn: function (){
  1061. var self=this;
  1062. return self.reservedWords;
  1063. return self;},
  1064. args: [],
  1065. source: unescape('reservedWords%0A%09%22JavaScript%20reserved%20words%22%0A%09%3Creturn%20self.reservedWords%3E'),
  1066. messageSends: [],
  1067. referencedClasses: []
  1068. }),
  1069. smalltalk.Smalltalk);
  1070. smalltalk.addMethod(
  1071. unescape('_createPackage_properties_'),
  1072. smalltalk.method({
  1073. selector: unescape('createPackage%3Aproperties%3A'),
  1074. category: 'private',
  1075. fn: function (packageName, aDict){
  1076. var self=this;
  1077. var object=nil;
  1078. object = {};;
  1079. smalltalk.send(aDict, "_keysAndValuesDo_", [(function(key, value){return object[key] = value;})]);
  1080. return smalltalk.addPackage(packageName, object);
  1081. return self;},
  1082. args: ["packageName", "aDict"],
  1083. source: unescape('createPackage%3A%20packageName%20properties%3A%20aDict%0A%09%22Create%20and%20bind%20a%20new%20package%20with%20given%20name%20and%20return%20it.%22%0A%0A%09%7C%20object%20%7C%0A%09%3Cobject%20%3D%20%7B%7D%3B%3E.%0A%09aDict%20keysAndValuesDo%3A%20%5B%3Akey%20%3Avalue%20%7C%0A%09%09%3Cobject%5Bkey%5D%20%3D%20value%3E.%0A%09%5D.%0A%20%20%20%20%20%20%20%3Creturn%20smalltalk.addPackage%28packageName%2C%20object%29%3E'),
  1084. messageSends: ["keysAndValuesDo:"],
  1085. referencedClasses: []
  1086. }),
  1087. smalltalk.Smalltalk);
  1088. smalltalk.addMethod(
  1089. unescape('_readJSObject_'),
  1090. smalltalk.method({
  1091. selector: unescape('readJSObject%3A'),
  1092. category: 'accessing',
  1093. fn: function (anObject){
  1094. var self=this;
  1095. return self.readJSObject(anObject);
  1096. return self;},
  1097. args: ["anObject"],
  1098. source: unescape('readJSObject%3A%20anObject%0A%09%3Creturn%20self.readJSObject%28anObject%29%3E'),
  1099. messageSends: [],
  1100. referencedClasses: []
  1101. }),
  1102. smalltalk.Smalltalk);
  1103. smalltalk.Smalltalk.klass.iVarNames = ['current'];
  1104. smalltalk.addMethod(
  1105. unescape('_current'),
  1106. smalltalk.method({
  1107. selector: unescape('current'),
  1108. category: 'accessing',
  1109. fn: function (){
  1110. var self=this;
  1111. return smalltalk;
  1112. return self;},
  1113. args: [],
  1114. source: unescape('current%0A%09%3Creturn%20smalltalk%3E'),
  1115. messageSends: [],
  1116. referencedClasses: []
  1117. }),
  1118. smalltalk.Smalltalk.klass);
  1119. smalltalk.addClass('Package', smalltalk.Object, ['commitPathJs', 'commitPathSt'], 'Kernel-Objects');
  1120. smalltalk.Package.comment=unescape('A%20Package%20is%20similar%20to%20a%20%22class%20category%22%20typically%20found%20in%20other%20Smalltalks%20like%20Pharo%20or%20Squeak.%20Amber%20does%20not%20have%20class%20categories%20anymore%2C%20it%20had%20in%20the%20beginning%20but%20now%20each%20class%20in%20the%20system%20knows%20which%20package%20it%20belongs%20to.%0A%0AA%20Package%20has%20a%20name%2C%20an%20Array%20of%20%22requires%22%2C%20a%20comment%20and%20a%20Dictionary%20with%20other%20optional%20key%20value%20attributes.%20A%20Package%20can%20also%20be%20queried%20for%20its%20classes%2C%20but%20it%20will%20then%20resort%20to%20a%20reverse%20scan%20of%20all%20classes%20to%20find%20them.%0APackages%20are%20manipulated%20through%20%22Smalltalk%20current%22%2C%20like%20for%20example%20finding%20one%20based%20on%20a%20name%3A%0A%0A%09Smalltalk%20current%20packageAt%3A%20%27Kernel%27%0A%0A...but%20you%20can%20also%20use%3A%0A%0A%09Package%20named%3A%20%27Kernel%27%0A%0AA%20Package%20differs%20slightly%20from%20a%20Monticello%20package%20which%20can%20span%20multiple%20class%20categories%20using%20a%20naming%20convention%20based%20on%20hyphenation.%20But%20just%20as%20in%20Monticello%20a%20Package%20supports%20%22class%20extensions%22%20so%20a%20Package%0Acan%20define%20behaviors%20in%20foreign%20classes%20using%20a%20naming%20convention%20for%20method%20categories%20where%20the%20category%20starts%20with%20an%20asterisk%20and%20then%20the%20name%20of%20the%20owning%20package%20follows.%20This%20can%20easily%20be%20seen%20in%20for%20example%20class%0AString%20where%20the%20method%20category%20%22*IDE%22%20defines%20%23inspectOn%3A%20which%20thus%20is%20a%20method%20belonging%20to%20the%20IDE%20package.%0A%0AYou%20can%20fetch%20a%20package%20from%20the%20server%3A%0A%0A%09Package%20fetch%3A%20%27Additional-Examples%27')
  1121. smalltalk.addMethod(
  1122. unescape('_name'),
  1123. smalltalk.method({
  1124. selector: unescape('name'),
  1125. category: 'accessing',
  1126. fn: function (){
  1127. var self=this;
  1128. return self.pkgName;
  1129. return self;},
  1130. args: [],
  1131. source: unescape('name%0A%09%3Creturn%20self.pkgName%3E'),
  1132. messageSends: [],
  1133. referencedClasses: []
  1134. }),
  1135. smalltalk.Package);
  1136. smalltalk.addMethod(
  1137. unescape('_name_'),
  1138. smalltalk.method({
  1139. selector: unescape('name%3A'),
  1140. category: 'accessing',
  1141. fn: function (aString){
  1142. var self=this;
  1143. self.pkgName = aString;
  1144. return self;},
  1145. args: ["aString"],
  1146. source: unescape('name%3A%20aString%0A%09%3Cself.pkgName%20%3D%20aString%3E'),
  1147. messageSends: [],
  1148. referencedClasses: []
  1149. }),
  1150. smalltalk.Package);
  1151. smalltalk.addMethod(
  1152. unescape('_classes'),
  1153. smalltalk.method({
  1154. selector: unescape('classes'),
  1155. category: 'classes',
  1156. fn: function (){
  1157. var self=this;
  1158. return smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_classes", []), "_select_", [(function(c){return smalltalk.send(smalltalk.send(c, "_package", []), "__eq_eq", [self]);})]);
  1159. return self;},
  1160. args: [],
  1161. source: unescape('classes%0A%09%22We%20need%20to%20do%20a%20reverse%20scan.%22%0A%09%5ESmalltalk%20current%20classes%20select%3A%20%5B%3Ac%20%7C%20c%20package%20%3D%3D%20self%5D'),
  1162. messageSends: ["select:", "classes", "current", unescape("%3D%3D"), "package"],
  1163. referencedClasses: ["Smalltalk"]
  1164. }),
  1165. smalltalk.Package);
  1166. smalltalk.addMethod(
  1167. unescape('_printString'),
  1168. smalltalk.method({
  1169. selector: unescape('printString'),
  1170. category: 'printing',
  1171. fn: function (){
  1172. var self=this;
  1173. return smalltalk.send(self, "_name", []);
  1174. return self;},
  1175. args: [],
  1176. source: unescape('printString%0A%09%5Eself%20name'),
  1177. messageSends: ["name"],
  1178. referencedClasses: []
  1179. }),
  1180. smalltalk.Package);
  1181. smalltalk.addMethod(
  1182. unescape('_dependencies'),
  1183. smalltalk.method({
  1184. selector: unescape('dependencies'),
  1185. category: 'accessing',
  1186. fn: function (){
  1187. var self=this;
  1188. return smalltalk.send(self, "_propertyAt_ifAbsent_", ["dependencies", (function(){return [];})]);
  1189. return self;},
  1190. args: [],
  1191. source: unescape('dependencies%0A%09%5Eself%20propertyAt%3A%20%27dependencies%27%20ifAbsent%3A%20%5B%23%28%29%5D'),
  1192. messageSends: ["propertyAt:ifAbsent:"],
  1193. referencedClasses: []
  1194. }),
  1195. smalltalk.Package);
  1196. smalltalk.addMethod(
  1197. unescape('_dependencies_'),
  1198. smalltalk.method({
  1199. selector: unescape('dependencies%3A'),
  1200. category: 'accessing',
  1201. fn: function (anArray){
  1202. var self=this;
  1203. return smalltalk.send(self, "_propertyAt_put_", ["dependencies", anArray]);
  1204. return self;},
  1205. args: ["anArray"],
  1206. source: unescape('dependencies%3A%20anArray%0A%09%5Eself%20propertyAt%3A%20%27dependencies%27%20put%3A%20anArray'),
  1207. messageSends: ["propertyAt:put:"],
  1208. referencedClasses: []
  1209. }),
  1210. smalltalk.Package);
  1211. smalltalk.addMethod(
  1212. unescape('_properties'),
  1213. smalltalk.method({
  1214. selector: unescape('properties'),
  1215. category: 'accessing',
  1216. fn: function (){
  1217. var self=this;
  1218. return smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_readJSObject_", [smalltalk.send(self, "_basicAt_", ["properties"])]);
  1219. return self;},
  1220. args: [],
  1221. source: unescape('properties%0A%09%5ESmalltalk%20current%20readJSObject%3A%20%28self%20basicAt%3A%20%27properties%27%29'),
  1222. messageSends: ["readJSObject:", "current", "basicAt:"],
  1223. referencedClasses: ["Smalltalk"]
  1224. }),
  1225. smalltalk.Package);
  1226. smalltalk.addMethod(
  1227. unescape('_propertiesAsJSON'),
  1228. smalltalk.method({
  1229. selector: unescape('propertiesAsJSON'),
  1230. category: 'private',
  1231. fn: function (){
  1232. var self=this;
  1233. return JSON.stringify(self.properties);
  1234. return self;},
  1235. args: [],
  1236. source: unescape('propertiesAsJSON%0A%09%3Creturn%20JSON.stringify%28self.properties%29%3E'),
  1237. messageSends: [],
  1238. referencedClasses: []
  1239. }),
  1240. smalltalk.Package);
  1241. smalltalk.addMethod(
  1242. unescape('_properties_'),
  1243. smalltalk.method({
  1244. selector: unescape('properties%3A'),
  1245. category: 'accessing',
  1246. fn: function (aDict){
  1247. var self=this;
  1248. var object=nil;
  1249. object = {};;
  1250. smalltalk.send(aDict, "_keysAndValuesDo_", [(function(key, value){return object[key] = value;})]);
  1251. return self.properties = object;
  1252. return self;},
  1253. args: ["aDict"],
  1254. source: unescape('properties%3A%20aDict%0A%09%22We%20store%20it%20as%20a%20javascript%20object.%22%0A%09%0A%09%7C%20object%20%7C%0A%09%3Cobject%20%3D%20%7B%7D%3B%3E.%0A%09aDict%20keysAndValuesDo%3A%20%5B%3Akey%20%3Avalue%20%7C%0A%09%09%3Cobject%5Bkey%5D%20%3D%20value%3E.%0A%09%5D.%0A%09%3Creturn%20self.properties%20%3D%20object%3E'),
  1255. messageSends: ["keysAndValuesDo:"],
  1256. referencedClasses: []
  1257. }),
  1258. smalltalk.Package);
  1259. smalltalk.addMethod(
  1260. unescape('_jsProperties'),
  1261. smalltalk.method({
  1262. selector: unescape('jsProperties'),
  1263. category: 'private',
  1264. fn: function (){
  1265. var self=this;
  1266. return self.properties;
  1267. return self;},
  1268. args: [],
  1269. source: unescape('jsProperties%0A%09%3Creturn%20self.properties%3E'),
  1270. messageSends: [],
  1271. referencedClasses: []
  1272. }),
  1273. smalltalk.Package);
  1274. smalltalk.addMethod(
  1275. unescape('_jsProperties_'),
  1276. smalltalk.method({
  1277. selector: unescape('jsProperties%3A'),
  1278. category: 'private',
  1279. fn: function (aJSObject){
  1280. var self=this;
  1281. return self.properties = aJSObject;
  1282. return self;},
  1283. args: ["aJSObject"],
  1284. source: unescape('jsProperties%3A%20aJSObject%0A%09%3Creturn%20self.properties%20%3D%20aJSObject%3E'),
  1285. messageSends: [],
  1286. referencedClasses: []
  1287. }),
  1288. smalltalk.Package);
  1289. smalltalk.addMethod(
  1290. unescape('_propertyAt_'),
  1291. smalltalk.method({
  1292. selector: unescape('propertyAt%3A'),
  1293. category: 'properties',
  1294. fn: function (key){
  1295. var self=this;
  1296. return self.properties[key];
  1297. return self;},
  1298. args: ["key"],
  1299. source: unescape('propertyAt%3A%20key%0A%0A%09%3Creturn%20self.properties%5Bkey%5D%3E'),
  1300. messageSends: [],
  1301. referencedClasses: []
  1302. }),
  1303. smalltalk.Package);
  1304. smalltalk.addMethod(
  1305. unescape('_propertyAt_put_'),
  1306. smalltalk.method({
  1307. selector: unescape('propertyAt%3Aput%3A'),
  1308. category: 'properties',
  1309. fn: function (key, value){
  1310. var self=this;
  1311. return self.properties[key] = value;
  1312. return self;},
  1313. args: ["key", "value"],
  1314. source: unescape('propertyAt%3A%20key%20put%3A%20value%0A%0A%09%3Creturn%20self.properties%5Bkey%5D%20%3D%20value%3E'),
  1315. messageSends: [],
  1316. referencedClasses: []
  1317. }),
  1318. smalltalk.Package);
  1319. smalltalk.addMethod(
  1320. unescape('_propertyAt_ifAbsent_'),
  1321. smalltalk.method({
  1322. selector: unescape('propertyAt%3AifAbsent%3A'),
  1323. category: 'properties',
  1324. fn: function (key, block){
  1325. var self=this;
  1326. return (($receiver = smalltalk.send(self, "_propertyAt_", [key])) == nil || $receiver == undefined) ? (function(){return smalltalk.send(block, "_value", []);})() : $receiver;
  1327. return self;},
  1328. args: ["key", "block"],
  1329. source: unescape('propertyAt%3A%20key%20ifAbsent%3A%20block%0A%0A%09%5E%28self%20propertyAt%3A%20key%29%20ifNil%3A%20%5Bblock%20value%5D'),
  1330. messageSends: ["ifNil:", "propertyAt:", "value"],
  1331. referencedClasses: []
  1332. }),
  1333. smalltalk.Package);
  1334. smalltalk.addMethod(
  1335. unescape('_commitPathJs'),
  1336. smalltalk.method({
  1337. selector: unescape('commitPathJs'),
  1338. category: 'accessing',
  1339. fn: function (){
  1340. var self=this;
  1341. return (($receiver = self['@commitPathJs']) == nil || $receiver == undefined) ? (function(){return smalltalk.send(smalltalk.send(self, "_class", []), "_defaultCommitPathJs", []);})() : $receiver;
  1342. return self;},
  1343. args: [],
  1344. source: unescape('commitPathJs%0A%09%5E%20commitPathJs%20ifNil%3A%20%5Bself%20class%20defaultCommitPathJs%5D'),
  1345. messageSends: ["ifNil:", "defaultCommitPathJs", "class"],
  1346. referencedClasses: []
  1347. }),
  1348. smalltalk.Package);
  1349. smalltalk.addMethod(
  1350. unescape('_commitPathJs_'),
  1351. smalltalk.method({
  1352. selector: unescape('commitPathJs%3A'),
  1353. category: 'accessing',
  1354. fn: function (aString){
  1355. var self=this;
  1356. self['@commitPathJs']=aString;
  1357. return self;},
  1358. args: ["aString"],
  1359. source: unescape('commitPathJs%3A%20aString%0A%09commitPathJs%A0%3A%3D%20aString'),
  1360. messageSends: [],
  1361. referencedClasses: []
  1362. }),
  1363. smalltalk.Package);
  1364. smalltalk.addMethod(
  1365. unescape('_commitPathSt'),
  1366. smalltalk.method({
  1367. selector: unescape('commitPathSt'),
  1368. category: 'accessing',
  1369. fn: function (){
  1370. var self=this;
  1371. return (($receiver = self['@commitPathSt']) == nil || $receiver == undefined) ? (function(){return smalltalk.send(smalltalk.send(self, "_class", []), "_defaultCommitPathSt", []);})() : $receiver;
  1372. return self;},
  1373. args: [],
  1374. source: unescape('commitPathSt%0A%09%5E%20commitPathSt%20ifNil%3A%20%5Bself%20class%20defaultCommitPathSt%5D'),
  1375. messageSends: ["ifNil:", "defaultCommitPathSt", "class"],
  1376. referencedClasses: []
  1377. }),
  1378. smalltalk.Package);
  1379. smalltalk.addMethod(
  1380. unescape('_commitPathSt_'),
  1381. smalltalk.method({
  1382. selector: unescape('commitPathSt%3A'),
  1383. category: 'accessing',
  1384. fn: function (aString){
  1385. var self=this;
  1386. self['@commitPathSt']=aString;
  1387. return self;},
  1388. args: ["aString"],
  1389. source: unescape('commitPathSt%3A%20aString%0A%09commitPathSt%A0%3A%3D%20aString'),
  1390. messageSends: [],
  1391. referencedClasses: []
  1392. }),
  1393. smalltalk.Package);
  1394. smalltalk.Package.klass.iVarNames = ['defaultCommitPathJs','defaultCommitPathSt'];
  1395. smalltalk.addMethod(
  1396. unescape('_named_'),
  1397. smalltalk.method({
  1398. selector: unescape('named%3A'),
  1399. category: 'not yet classified',
  1400. fn: function (aPackageName){
  1401. var self=this;
  1402. return smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_packageAt_", [aPackageName]);
  1403. return self;},
  1404. args: ["aPackageName"],
  1405. source: unescape('named%3A%20aPackageName%0A%0A%09%5ESmalltalk%20current%20packageAt%3A%20aPackageName'),
  1406. messageSends: ["packageAt:", "current"],
  1407. referencedClasses: ["Smalltalk"]
  1408. }),
  1409. smalltalk.Package.klass);
  1410. smalltalk.addMethod(
  1411. unescape('_named_ifAbsent_'),
  1412. smalltalk.method({
  1413. selector: unescape('named%3AifAbsent%3A'),
  1414. category: 'not yet classified',
  1415. fn: function (aPackageName, aBlock){
  1416. var self=this;
  1417. return smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_packageAt_ifAbsent_", [aPackageName, aBlock]);
  1418. return self;},
  1419. args: ["aPackageName", "aBlock"],
  1420. source: unescape('named%3A%20aPackageName%20ifAbsent%3A%20aBlock%0A%0A%09%5ESmalltalk%20current%20packageAt%3A%20aPackageName%20ifAbsent%3A%20aBlock'),
  1421. messageSends: ["packageAt:ifAbsent:", "current"],
  1422. referencedClasses: ["Smalltalk"]
  1423. }),
  1424. smalltalk.Package.klass);
  1425. smalltalk.addMethod(
  1426. unescape('_defaultCommitPathJs'),
  1427. smalltalk.method({
  1428. selector: unescape('defaultCommitPathJs'),
  1429. category: 'commit paths',
  1430. fn: function (){
  1431. var self=this;
  1432. return (($receiver = self['@defaultCommitPathJs']) == nil || $receiver == undefined) ? (function(){return self['@defaultCommitPathJs']="js";})() : $receiver;
  1433. return self;},
  1434. args: [],
  1435. source: unescape('defaultCommitPathJs%0A%09%5E%20defaultCommitPathJs%20ifNil%3A%20%5B%20defaultCommitPathJs%20%3A%3D%20%27js%27%5D'),
  1436. messageSends: ["ifNil:"],
  1437. referencedClasses: []
  1438. }),
  1439. smalltalk.Package.klass);
  1440. smalltalk.addMethod(
  1441. unescape('_defaultCommitPathJs_'),
  1442. smalltalk.method({
  1443. selector: unescape('defaultCommitPathJs%3A'),
  1444. category: 'commit paths',
  1445. fn: function (aString){
  1446. var self=this;
  1447. self['@defaultCommitPathJs']=aString;
  1448. return self;},
  1449. args: ["aString"],
  1450. source: unescape('defaultCommitPathJs%3A%20aString%0A%09defaultCommitPathJs%20%3A%3D%20aString'),
  1451. messageSends: [],
  1452. referencedClasses: []
  1453. }),
  1454. smalltalk.Package.klass);
  1455. smalltalk.addMethod(
  1456. unescape('_defaultCommitPathSt'),
  1457. smalltalk.method({
  1458. selector: unescape('defaultCommitPathSt'),
  1459. category: 'commit paths',
  1460. fn: function (){
  1461. var self=this;
  1462. return (($receiver = self['@defaultCommitPathSt']) == nil || $receiver == undefined) ? (function(){return self['@defaultCommitPathSt']="st";})() : $receiver;
  1463. return self;},
  1464. args: [],
  1465. source: unescape('defaultCommitPathSt%0A%09%5E%20defaultCommitPathSt%20ifNil%3A%20%5B%20defaultCommitPathSt%20%3A%3D%20%27st%27%5D'),
  1466. messageSends: ["ifNil:"],
  1467. referencedClasses: []
  1468. }),
  1469. smalltalk.Package.klass);
  1470. smalltalk.addMethod(
  1471. unescape('_defaultCommitPathSt_'),
  1472. smalltalk.method({
  1473. selector: unescape('defaultCommitPathSt%3A'),
  1474. category: 'commit paths',
  1475. fn: function (aString){
  1476. var self=this;
  1477. self['@defaultCommitPathSt']=aString;
  1478. return self;},
  1479. args: ["aString"],
  1480. source: unescape('defaultCommitPathSt%3A%20aString%0A%09defaultCommitPathSt%20%3A%3D%20aString'),
  1481. messageSends: [],
  1482. referencedClasses: []
  1483. }),
  1484. smalltalk.Package.klass);
  1485. smalltalk.addMethod(
  1486. unescape('_resetCommitPaths'),
  1487. smalltalk.method({
  1488. selector: unescape('resetCommitPaths'),
  1489. category: 'commit paths',
  1490. fn: function (){
  1491. var self=this;
  1492. self['@defaultCommitPathJs']=nil;
  1493. self['@defaultCommitPathSt']=nil;
  1494. return self;},
  1495. args: [],
  1496. source: unescape('resetCommitPaths%0A%20%20%20%20%20%20%20%20defaultCommitPathJs%20%3A%3D%20nil.%0A%20%20%20%20%20%20%20%20defaultCommitPathSt%20%3A%3D%20nil.'),
  1497. messageSends: [],
  1498. referencedClasses: []
  1499. }),
  1500. smalltalk.Package.klass);
  1501. smalltalk.addMethod(
  1502. unescape('_fetch_prefix_'),
  1503. smalltalk.method({
  1504. selector: unescape('fetch%3Aprefix%3A'),
  1505. category: 'loading-storing',
  1506. fn: function (aPackageName, aPrefix){
  1507. var self=this;
  1508. smalltalk.send((typeof jQuery == 'undefined' ? nil : jQuery), "_getScript_onSuccess_", [smalltalk.send(smalltalk.send(aPrefix, "__comma", [aPackageName]), "__comma", [".js"]), (function(){return smalltalk.send((smalltalk.Package || Package), "_init_", [aPackageName]);})]);
  1509. return self;},
  1510. args: ["aPackageName", "aPrefix"],
  1511. source: unescape('fetch%3A%20aPackageName%20prefix%3A%20aPrefix%0A%09jQuery%20getScript%3A%20%28aPrefix%20%2C%20aPackageName%20%2C%20%27.js%27%29%20onSuccess%3A%20%5B%20Package%20init%3A%20aPackageName%20%5D'),
  1512. messageSends: ["getScript:onSuccess:", unescape("%2C"), "init:"],
  1513. referencedClasses: ["Package"]
  1514. }),
  1515. smalltalk.Package.klass);
  1516. smalltalk.addMethod(
  1517. unescape('_fetch_'),
  1518. smalltalk.method({
  1519. selector: unescape('fetch%3A'),
  1520. category: 'loading-storing',
  1521. fn: function (aPackageName){
  1522. var self=this;
  1523. smalltalk.send(self, "_fetch_prefix_", [aPackageName, smalltalk.send(smalltalk.send(self, "_defaultCommitPathJs", []), "__comma", [unescape("/")])]);
  1524. return self;},
  1525. args: ["aPackageName"],
  1526. source: unescape('fetch%3A%20aPackageName%0A%09self%20fetch%3A%20aPackageName%20prefix%3A%20self%20defaultCommitPathJs%2C%20%27/%27'),
  1527. messageSends: ["fetch:prefix:", unescape("%2C"), "defaultCommitPathJs"],
  1528. referencedClasses: []
  1529. }),
  1530. smalltalk.Package.klass);
  1531. smalltalk.addMethod(
  1532. unescape('_commitToLocalStorage_'),
  1533. smalltalk.method({
  1534. selector: unescape('commitToLocalStorage%3A'),
  1535. category: 'loading-storing',
  1536. fn: function (aPackageName){
  1537. var self=this;
  1538. var key=nil;
  1539. var sourceCode=nil;
  1540. key=smalltalk.send("smalltalk.packages.", "__comma", [aPackageName]);
  1541. sourceCode=smalltalk.send(smalltalk.send((smalltalk.Exporter || Exporter), "_new", []), "_exportPackage_", [aPackageName]);
  1542. localStorage[key] = escape(sourceCode);
  1543. return self;},
  1544. args: ["aPackageName"],
  1545. source: unescape('commitToLocalStorage%3A%20aPackageName%0A%09%7C%20key%20sourceCode%20%7C%0A%09key%20%3A%3D%20%27smalltalk.packages.%27%20%2C%20aPackageName.%0A%09sourceCode%20%3A%3D%20Exporter%20new%20exportPackage%3A%20aPackageName.%0A%09%3ClocalStorage%5Bkey%5D%20%3D%20escape%28sourceCode%29%3E'),
  1546. messageSends: [unescape("%2C"), "exportPackage:", "new"],
  1547. referencedClasses: ["Exporter"]
  1548. }),
  1549. smalltalk.Package.klass);
  1550. smalltalk.addMethod(
  1551. unescape('_init_'),
  1552. smalltalk.method({
  1553. selector: unescape('init%3A'),
  1554. category: 'loading-storing',
  1555. fn: function (aPackageName){
  1556. var self=this;
  1557. (function($rec){smalltalk.send($rec, "_do_", [(function(each){return smalltalk.init(each);})]);return smalltalk.send($rec, "_do_", [(function(each){return smalltalk.send(each, "_initialize", []);})]);})(smalltalk.send(smalltalk.send((typeof smalltalk == 'undefined' ? nil : smalltalk), "_classes", []), "_select_", [(function(each){return each.pkg.pkgName == aPackageName;})]));
  1558. return self;},
  1559. args: ["aPackageName"],
  1560. source: unescape('init%3A%20aPackageName%0A%09%28smalltalk%20classes%20select%3A%20%5B%20%3Aeach%20%7C%20%3Ceach.pkg.pkgName%20%3D%3D%20aPackageName%3E%20%5D%29%0A%09%09do%3A%20%5B%20%3Aeach%20%7C%20%3Csmalltalk.init%28each%29%3E%20%5D%3B%0A%09%09do%3A%20%5B%20%3Aeach%20%7C%20each%20initialize%20%5D'),
  1561. messageSends: ["do:", "initialize", "select:", "classes"],
  1562. referencedClasses: []
  1563. }),
  1564. smalltalk.Package.klass);
  1565. smalltalk.addClass('Number', smalltalk.Object, [], 'Kernel-Objects');
  1566. smalltalk.addMethod(
  1567. unescape('__eq'),
  1568. smalltalk.method({
  1569. selector: unescape('%3D'),
  1570. category: 'comparing',
  1571. fn: function (aNumber){
  1572. var self=this;
  1573. try{((($receiver = smalltalk.send(aNumber, "_isNumber", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})]));
  1574. return Number(self) == aNumber;
  1575. return self;
  1576. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq'){return e.fn()} throw(e)}},
  1577. args: ["aNumber"],
  1578. source: unescape('%3D%20aNumber%0A%09aNumber%20isNumber%20ifFalse%3A%20%5B%5Efalse%5D.%20%0A%09%3Creturn%20Number%28self%29%20%3D%3D%20aNumber%3E'),
  1579. messageSends: ["ifFalse:", "isNumber"],
  1580. referencedClasses: []
  1581. }),
  1582. smalltalk.Number);
  1583. smalltalk.addMethod(
  1584. unescape('__gt'),
  1585. smalltalk.method({
  1586. selector: unescape('%3E'),
  1587. category: 'comparing',
  1588. fn: function (aNumber){
  1589. var self=this;
  1590. return self > aNumber;
  1591. return self;},
  1592. args: ["aNumber"],
  1593. source: unescape('%3E%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20%3E%3E%20aNumber%3E'),
  1594. messageSends: [],
  1595. referencedClasses: []
  1596. }),
  1597. smalltalk.Number);
  1598. smalltalk.addMethod(
  1599. unescape('__lt'),
  1600. smalltalk.method({
  1601. selector: unescape('%3C'),
  1602. category: 'comparing',
  1603. fn: function (aNumber){
  1604. var self=this;
  1605. return self < aNumber;
  1606. return self;},
  1607. args: ["aNumber"],
  1608. source: unescape('%3C%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20%3C%20aNumber%3E'),
  1609. messageSends: [],
  1610. referencedClasses: []
  1611. }),
  1612. smalltalk.Number);
  1613. smalltalk.addMethod(
  1614. unescape('__gt_eq'),
  1615. smalltalk.method({
  1616. selector: unescape('%3E%3D'),
  1617. category: 'comparing',
  1618. fn: function (aNumber){
  1619. var self=this;
  1620. return self >= aNumber;
  1621. return self;},
  1622. args: ["aNumber"],
  1623. source: unescape('%3E%3D%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20%3E%3E%3D%20aNumber%3E'),
  1624. messageSends: [],
  1625. referencedClasses: []
  1626. }),
  1627. smalltalk.Number);
  1628. smalltalk.addMethod(
  1629. unescape('__lt_eq'),
  1630. smalltalk.method({
  1631. selector: unescape('%3C%3D'),
  1632. category: 'comparing',
  1633. fn: function (aNumber){
  1634. var self=this;
  1635. return self <= aNumber;
  1636. return self;},
  1637. args: ["aNumber"],
  1638. source: unescape('%3C%3D%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20%3C%3D%20aNumber%3E'),
  1639. messageSends: [],
  1640. referencedClasses: []
  1641. }),
  1642. smalltalk.Number);
  1643. smalltalk.addMethod(
  1644. unescape('__plus'),
  1645. smalltalk.method({
  1646. selector: unescape('+'),
  1647. category: 'arithmetic',
  1648. fn: function (aNumber){
  1649. var self=this;
  1650. return self + aNumber;
  1651. return self;},
  1652. args: ["aNumber"],
  1653. source: unescape('+%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20+%20aNumber%3E'),
  1654. messageSends: [],
  1655. referencedClasses: []
  1656. }),
  1657. smalltalk.Number);
  1658. smalltalk.addMethod(
  1659. unescape('__minus'),
  1660. smalltalk.method({
  1661. selector: unescape('-'),
  1662. category: 'arithmetic',
  1663. fn: function (aNumber){
  1664. var self=this;
  1665. return self - aNumber;
  1666. return self;},
  1667. args: ["aNumber"],
  1668. source: unescape('-%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20-%20aNumber%3E'),
  1669. messageSends: [],
  1670. referencedClasses: []
  1671. }),
  1672. smalltalk.Number);
  1673. smalltalk.addMethod(
  1674. unescape('__star'),
  1675. smalltalk.method({
  1676. selector: unescape('*'),
  1677. category: 'arithmetic',
  1678. fn: function (aNumber){
  1679. var self=this;
  1680. return self * aNumber;
  1681. return self;},
  1682. args: ["aNumber"],
  1683. source: unescape('*%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20*%20aNumber%3E'),
  1684. messageSends: [],
  1685. referencedClasses: []
  1686. }),
  1687. smalltalk.Number);
  1688. smalltalk.addMethod(
  1689. unescape('__slash'),
  1690. smalltalk.method({
  1691. selector: unescape('/'),
  1692. category: 'arithmetic',
  1693. fn: function (aNumber){
  1694. var self=this;
  1695. return self / aNumber;
  1696. return self;},
  1697. args: ["aNumber"],
  1698. source: unescape('/%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20/%20aNumber%3E'),
  1699. messageSends: [],
  1700. referencedClasses: []
  1701. }),
  1702. smalltalk.Number);
  1703. smalltalk.addMethod(
  1704. unescape('_max_'),
  1705. smalltalk.method({
  1706. selector: unescape('max%3A'),
  1707. category: 'arithmetic',
  1708. fn: function (aNumber){
  1709. var self=this;
  1710. return Math.max(self, aNumber);;
  1711. return self;},
  1712. args: ["aNumber"],
  1713. source: unescape('max%3A%20aNumber%0A%09%3Creturn%20Math.max%28self%2C%20aNumber%29%3B%3E'),
  1714. messageSends: [],
  1715. referencedClasses: []
  1716. }),
  1717. smalltalk.Number);
  1718. smalltalk.addMethod(
  1719. unescape('_min_'),
  1720. smalltalk.method({
  1721. selector: unescape('min%3A'),
  1722. category: 'arithmetic',
  1723. fn: function (aNumber){
  1724. var self=this;
  1725. return Math.min(self, aNumber);;
  1726. return self;},
  1727. args: ["aNumber"],
  1728. source: unescape('min%3A%20aNumber%0A%09%3Creturn%20Math.min%28self%2C%20aNumber%29%3B%3E'),
  1729. messageSends: [],
  1730. referencedClasses: []
  1731. }),
  1732. smalltalk.Number);
  1733. smalltalk.addMethod(
  1734. unescape('_rounded'),
  1735. smalltalk.method({
  1736. selector: unescape('rounded'),
  1737. category: 'converting',
  1738. fn: function (){
  1739. var self=this;
  1740. return Math.round(self);;
  1741. return self;},
  1742. args: [],
  1743. source: unescape('rounded%0A%09%3Creturn%20Math.round%28self%29%3B%3E'),
  1744. messageSends: [],
  1745. referencedClasses: []
  1746. }),
  1747. smalltalk.Number);
  1748. smalltalk.addMethod(
  1749. unescape('_truncated'),
  1750. smalltalk.method({
  1751. selector: unescape('truncated'),
  1752. category: 'converting',
  1753. fn: function (){
  1754. var self=this;
  1755. var result=nil;
  1756. ((($receiver = self >= (0)).klass === smalltalk.Boolean) ? ($receiver ? (function(){return result = Math.floor(self);;})() : (function(){return result = (Math.floor(self * (-1)) * (-1));;})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return result = Math.floor(self);;}), (function(){return result = (Math.floor(self * (-1)) * (-1));;})]));
  1757. return result;
  1758. return self;},
  1759. args: [],
  1760. source: unescape('truncated%0A%7Cresult%7C%0A%0A%20%20%20%20self%20%3E%3D%200%20%0A%20%20%20%20%20%20%20%20ifTrue%3A%20%5B%3Cresult%20%3D%20Math.floor%28self%29%3B%3E%5D%0A%20%20%20%20%20%20%20%20ifFalse%3A%20%5B%3Cresult%20%3D%20%28Math.floor%28self%20*%20%28-1%29%29%20*%20%28-1%29%29%3B%3E%5D.%0A%0A%20%20%20%20%5E%20result'),
  1761. messageSends: ["ifTrue:ifFalse:", unescape("%3E%3D")],
  1762. referencedClasses: []
  1763. }),
  1764. smalltalk.Number);
  1765. smalltalk.addMethod(
  1766. unescape('_to_'),
  1767. smalltalk.method({
  1768. selector: unescape('to%3A'),
  1769. category: 'converting',
  1770. fn: function (aNumber){
  1771. var self=this;
  1772. var array=nil;
  1773. var first=nil;
  1774. var last=nil;
  1775. var count=nil;
  1776. first=smalltalk.send(self, "_truncated", []);
  1777. last=((($receiver = smalltalk.send(aNumber, "_truncated", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));
  1778. count=(1);
  1779. array=smalltalk.send((smalltalk.Array || Array), "_new", []);
  1780. smalltalk.send(((($receiver = last).klass === smalltalk.Number) ? $receiver -first : smalltalk.send($receiver, "__minus", [first])), "_timesRepeat_", [(function(){smalltalk.send(array, "_at_put_", [count, first]);count=((($receiver = count).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));return first=((($receiver = first).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));})]);
  1781. return array;
  1782. return self;},
  1783. args: ["aNumber"],
  1784. source: unescape('to%3A%20aNumber%0A%09%7C%20array%20first%20last%20count%20%7C%0A%09first%20%3A%3D%20self%20truncated.%0A%09last%20%3A%3D%20aNumber%20truncated%20+%201.%0A%09count%20%3A%3D%201.%0A%09array%20%3A%3D%20Array%20new.%0A%09%28last%20-%20first%29%20timesRepeat%3A%20%5B%0A%09%20%20%20%20array%20at%3A%20count%20put%3A%20first.%0A%09%20%20%20%20count%20%3A%3D%20count%20+%201.%0A%09%20%20%20%20first%20%3A%3D%20first%20+%201%5D.%0A%09%5Earray'),
  1785. messageSends: ["truncated", unescape("+"), "new", "timesRepeat:", unescape("-"), "at:put:"],
  1786. referencedClasses: ["Array"]
  1787. }),
  1788. smalltalk.Number);
  1789. smalltalk.addMethod(
  1790. unescape('_timesRepeat_'),
  1791. smalltalk.method({
  1792. selector: unescape('timesRepeat%3A'),
  1793. category: 'enumerating',
  1794. fn: function (aBlock){
  1795. var self=this;
  1796. var integer=nil;
  1797. var count=nil;
  1798. integer=smalltalk.send(self, "_truncated", []);
  1799. count=(1);
  1800. (function(){while(!(function(){return ((($receiver = count).klass === smalltalk.Number) ? $receiver >self : smalltalk.send($receiver, "__gt", [self]));})()) {(function(){smalltalk.send(aBlock, "_value", []);return count=((($receiver = count).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));})()}})();
  1801. return self;},
  1802. args: ["aBlock"],
  1803. source: unescape('timesRepeat%3A%20aBlock%0A%09%7C%20integer%20count%20%7C%0A%09integer%20%3A%3D%20self%20truncated.%0A%09count%20%3A%3D%201.%0A%09%5Bcount%20%3E%20self%5D%20whileFalse%3A%20%5B%0A%09%20%20%20%20aBlock%20value.%0A%09%20%20%20%20count%20%3A%3D%20count%20+%201%5D'),
  1804. messageSends: ["truncated", "whileFalse:", unescape("%3E"), "value", unescape("+")],
  1805. referencedClasses: []
  1806. }),
  1807. smalltalk.Number);
  1808. smalltalk.addMethod(
  1809. unescape('_to_do_'),
  1810. smalltalk.method({
  1811. selector: unescape('to%3Ado%3A'),
  1812. category: 'enumerating',
  1813. fn: function (stop, aBlock){
  1814. var self=this;
  1815. var nextValue=nil;
  1816. nextValue=self;
  1817. (function(){while((function(){return ((($receiver = nextValue).klass === smalltalk.Number) ? $receiver <=stop : smalltalk.send($receiver, "__lt_eq", [stop]));})()) {(function(){smalltalk.send(aBlock, "_value_", [nextValue]);return nextValue=((($receiver = nextValue).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));})()}})();
  1818. return self;},
  1819. args: ["stop", "aBlock"],
  1820. source: unescape('to%3A%20stop%20do%3A%20aBlock%0A%09%22Evaluate%20aBlock%20for%20each%20number%20from%20self%20to%20aNumber.%22%0A%09%7C%20nextValue%20%7C%0A%09nextValue%20%3A%3D%20self.%0A%09%5BnextValue%20%3C%3D%20stop%5D%0A%09%09whileTrue%3A%20%0A%09%09%09%5BaBlock%20value%3A%20nextValue.%0A%09%09%09nextValue%20%3A%3D%20nextValue%20+%201%5D'),
  1821. messageSends: ["whileTrue:", unescape("%3C%3D"), "value:", unescape("+")],
  1822. referencedClasses: []
  1823. }),
  1824. smalltalk.Number);
  1825. smalltalk.addMethod(
  1826. unescape('_asString'),
  1827. smalltalk.method({
  1828. selector: unescape('asString'),
  1829. category: 'converting',
  1830. fn: function (){
  1831. var self=this;
  1832. return smalltalk.send(self, "_printString", []);
  1833. return self;},
  1834. args: [],
  1835. source: unescape('asString%0A%09%5Eself%20printString'),
  1836. messageSends: ["printString"],
  1837. referencedClasses: []
  1838. }),
  1839. smalltalk.Number);
  1840. smalltalk.addMethod(
  1841. unescape('_asJavascript'),
  1842. smalltalk.method({
  1843. selector: unescape('asJavascript'),
  1844. category: 'converting',
  1845. fn: function (){
  1846. var self=this;
  1847. return smalltalk.send(smalltalk.send(unescape("%28"), "__comma", [smalltalk.send(self, "_printString", [])]), "__comma", [unescape("%29")]);
  1848. return self;},
  1849. args: [],
  1850. source: unescape('asJavascript%0A%09%5E%27%28%27%2C%20self%20printString%2C%20%27%29%27'),
  1851. messageSends: [unescape("%2C"), "printString"],
  1852. referencedClasses: []
  1853. }),
  1854. smalltalk.Number);
  1855. smalltalk.addMethod(
  1856. unescape('_printString'),
  1857. smalltalk.method({
  1858. selector: unescape('printString'),
  1859. category: 'printing',
  1860. fn: function (){
  1861. var self=this;
  1862. return String(self);
  1863. return self;},
  1864. args: [],
  1865. source: unescape('printString%0A%09%3Creturn%20String%28self%29%3E'),
  1866. messageSends: [],
  1867. referencedClasses: []
  1868. }),
  1869. smalltalk.Number);
  1870. smalltalk.addMethod(
  1871. unescape('_isNumber'),
  1872. smalltalk.method({
  1873. selector: unescape('isNumber'),
  1874. category: 'testing',
  1875. fn: function (){
  1876. var self=this;
  1877. return true;
  1878. return self;},
  1879. args: [],
  1880. source: unescape('isNumber%0A%09%5Etrue'),
  1881. messageSends: [],
  1882. referencedClasses: []
  1883. }),
  1884. smalltalk.Number);
  1885. smalltalk.addMethod(
  1886. unescape('_atRandom'),
  1887. smalltalk.method({
  1888. selector: unescape('atRandom'),
  1889. category: 'converting',
  1890. fn: function (){
  1891. var self=this;
  1892. return ((($receiver = smalltalk.send(((($receiver = smalltalk.send(smalltalk.send((smalltalk.Random || Random), "_new", []), "_next", [])).klass === smalltalk.Number) ? $receiver *self : smalltalk.send($receiver, "__star", [self])), "_truncated", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));
  1893. return self;},
  1894. args: [],
  1895. source: unescape('atRandom%0A%20%20%20%20%5E%28Random%20new%20next%20*%20self%29%20truncated%20+%201'),
  1896. messageSends: [unescape("+"), "truncated", unescape("*"), "next", "new"],
  1897. referencedClasses: ["Random"]
  1898. }),
  1899. smalltalk.Number);
  1900. smalltalk.addMethod(
  1901. unescape('__at'),
  1902. smalltalk.method({
  1903. selector: unescape('@'),
  1904. category: 'converting',
  1905. fn: function (aNumber){
  1906. var self=this;
  1907. return smalltalk.send((smalltalk.Point || Point), "_x_y_", [self, aNumber]);
  1908. return self;},
  1909. args: ["aNumber"],
  1910. source: unescape('@%20aNumber%0A%09%5EPoint%20x%3A%20self%20y%3A%20aNumber'),
  1911. messageSends: ["x:y:"],
  1912. referencedClasses: ["Point"]
  1913. }),
  1914. smalltalk.Number);
  1915. smalltalk.addMethod(
  1916. unescape('_asPoint'),
  1917. smalltalk.method({
  1918. selector: unescape('asPoint'),
  1919. category: 'converting',
  1920. fn: function (){
  1921. var self=this;
  1922. return smalltalk.send((smalltalk.Point || Point), "_x_y_", [self, self]);
  1923. return self;},
  1924. args: [],
  1925. source: unescape('asPoint%0A%09%5EPoint%20x%3A%20self%20y%3A%20self'),
  1926. messageSends: ["x:y:"],
  1927. referencedClasses: ["Point"]
  1928. }),
  1929. smalltalk.Number);
  1930. smalltalk.addMethod(
  1931. unescape('_clearInterval'),
  1932. smalltalk.method({
  1933. selector: unescape('clearInterval'),
  1934. category: 'timeouts/intervals',
  1935. fn: function (){
  1936. var self=this;
  1937. clearInterval(Number(self));
  1938. return self;},
  1939. args: [],
  1940. source: unescape('clearInterval%0A%09%3CclearInterval%28Number%28self%29%29%3E'),
  1941. messageSends: [],
  1942. referencedClasses: []
  1943. }),
  1944. smalltalk.Number);
  1945. smalltalk.addMethod(
  1946. unescape('_clearTimeout'),
  1947. smalltalk.method({
  1948. selector: unescape('clearTimeout'),
  1949. category: 'timeouts/intervals',
  1950. fn: function (){
  1951. var self=this;
  1952. clearTimeout(Number(self));
  1953. return self;},
  1954. args: [],
  1955. source: unescape('clearTimeout%0A%09%3CclearTimeout%28Number%28self%29%29%3E'),
  1956. messageSends: [],
  1957. referencedClasses: []
  1958. }),
  1959. smalltalk.Number);
  1960. smalltalk.addMethod(
  1961. unescape('_even'),
  1962. smalltalk.method({
  1963. selector: unescape('even'),
  1964. category: 'testing',
  1965. fn: function (){
  1966. var self=this;
  1967. return smalltalk.send((0), "__eq", [smalltalk.send(self, "_\\\\", [(2)])]);
  1968. return self;},
  1969. args: [],
  1970. source: unescape('even%0A%09%5E%200%20%3D%20%28self%20%5C%5C%202%29'),
  1971. messageSends: [unescape("%3D"), unescape("%5C%5C%5C%5C")],
  1972. referencedClasses: []
  1973. }),
  1974. smalltalk.Number);
  1975. smalltalk.addMethod(
  1976. unescape('_odd'),
  1977. smalltalk.method({
  1978. selector: unescape('odd'),
  1979. category: 'testing',
  1980. fn: function (){
  1981. var self=this;
  1982. return smalltalk.send(smalltalk.send(self, "_even", []), "_not", []);
  1983. return self;},
  1984. args: [],
  1985. source: unescape('odd%0A%09%5E%20self%20even%20not'),
  1986. messageSends: ["not", "even"],
  1987. referencedClasses: []
  1988. }),
  1989. smalltalk.Number);
  1990. smalltalk.addMethod(
  1991. unescape('_negated'),
  1992. smalltalk.method({
  1993. selector: unescape('negated'),
  1994. category: 'arithmetic',
  1995. fn: function (){
  1996. var self=this;
  1997. return (0) - self;
  1998. return self;},
  1999. args: [],
  2000. source: unescape('negated%0A%09%5E0%20-%20self'),
  2001. messageSends: [unescape("-")],
  2002. referencedClasses: []
  2003. }),
  2004. smalltalk.Number);
  2005. smalltalk.addMethod(
  2006. unescape('_printShowingDecimalPlaces_'),
  2007. smalltalk.method({
  2008. selector: unescape('printShowingDecimalPlaces%3A'),
  2009. category: 'printing',
  2010. fn: function (placesDesired){
  2011. var self=this;
  2012. return self.toFixed(placesDesired);
  2013. return self;},
  2014. args: ["placesDesired"],
  2015. source: unescape('printShowingDecimalPlaces%3A%20placesDesired%0A%09%3Creturn%20self.toFixed%28placesDesired%29%3E'),
  2016. messageSends: [],
  2017. referencedClasses: []
  2018. }),
  2019. smalltalk.Number);
  2020. smalltalk.addMethod(
  2021. unescape('_%5C'),
  2022. smalltalk.method({
  2023. selector: unescape('%5C'),
  2024. category: '',
  2025. fn: function (aNumber){
  2026. var self=this;
  2027. return self % aNumber;
  2028. return self;},
  2029. args: ["aNumber"],
  2030. source: unescape(''),
  2031. messageSends: [],
  2032. referencedClasses: []
  2033. }),
  2034. smalltalk.Number);
  2035. smalltalk.addMethod(
  2036. unescape('_to_by_'),
  2037. smalltalk.method({
  2038. selector: unescape('to%3Aby%3A'),
  2039. category: 'converting',
  2040. fn: function (stop, step){
  2041. var self=this;
  2042. var array=nil;
  2043. var value=nil;
  2044. var pos=nil;
  2045. value=self;
  2046. array=smalltalk.send((smalltalk.Array || Array), "_new", []);
  2047. pos=(1);
  2048. ((($receiver = smalltalk.send(step, "__eq", [(0)])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_error_", [unescape("step%20must%20be%20non-zero")]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(self, "_error_", [unescape("step%20must%20be%20non-zero")]);})]));
  2049. ((($receiver = ((($receiver = step).klass === smalltalk.Number) ? $receiver <(0) : smalltalk.send($receiver, "__lt", [(0)]))).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (function(){while((function(){return ((($receiver = value).klass === smalltalk.Number) ? $receiver >=stop : smalltalk.send($receiver, "__gt_eq", [stop]));})()) {(function(){smalltalk.send(array, "_at_put_", [pos, value]);pos=((($receiver = pos).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));return value=((($receiver = value).klass === smalltalk.Number) ? $receiver +step : smalltalk.send($receiver, "__plus", [step]));})()}})();})() : (function(){return (function(){while((function(){return ((($receiver = value).klass === smalltalk.Number) ? $receiver <=stop : smalltalk.send($receiver, "__lt_eq", [stop]));})()) {(function(){smalltalk.send(array, "_at_put_", [pos, value]);pos=((($receiver = pos).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));return value=((($receiver = value).klass === smalltalk.Number) ? $receiver +step : smalltalk.send($receiver, "__plus", [step]));})()}})();})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return (function(){while((function(){return ((($receiver = value).klass === smalltalk.Number) ? $receiver >=stop : smalltalk.send($receiver, "__gt_eq", [stop]));})()) {(function(){smalltalk.send(array, "_at_put_", [pos, value]);pos=((($receiver = pos).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));return value=((($receiver = value).klass === smalltalk.Number) ? $receiver +step : smalltalk.send($receiver, "__plus", [step]));})()}})();}), (function(){return (function(){while((function(){return ((($receiver = value).klass === smalltalk.Number) ? $receiver <=stop : smalltalk.send($receiver, "__lt_eq", [stop]));})()) {(function(){smalltalk.send(array, "_at_put_", [pos, value]);pos=((($receiver = pos).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));return value=((($receiver = value).klass === smalltalk.Number) ? $receiver +step : smalltalk.send($receiver, "__plus", [step]));})()}})();})]));
  2050. return array;
  2051. return self;},
  2052. args: ["stop", "step"],
  2053. source: unescape('to%3A%20stop%20by%3A%20step%0A%09%7C%20array%20value%20pos%20%7C%0A%09value%20%3A%3D%20self.%0A%09array%20%3A%3D%20Array%20new.%0A%09pos%20%3A%3D%201.%0A%09step%20%3D%200%20ifTrue%3A%20%5Bself%20error%3A%20%27step%20must%20be%20non-zero%27%5D.%0A%09step%20%3C%200%0A%09%09ifTrue%3A%20%5B%5B%20value%20%3E%3D%20stop%20%5D%20whileTrue%3A%20%5B%0A%09%20%20%20%20%09%09%09array%20at%3A%20pos%20put%3A%20value.%0A%09%20%20%20%20%09%09%09pos%20%3A%3D%20pos%20+%201.%0A%09%20%20%20%20%09%09%09value%20%3A%3D%20value%20+%20step%5D%5D%0A%09%09ifFalse%3A%20%5B%5B%20value%20%3C%3D%20stop%20%5D%20whileTrue%3A%20%5B%0A%09%20%20%20%20%09%09%09array%20at%3A%20pos%20put%3A%20value.%0A%09%20%20%09%09%09pos%20%3A%3D%20pos%20+%201.%0A%09%20%20%20%20%09%09%09value%20%3A%3D%20value%20+%20step%5D%5D.%0A%09%5Earray'),
  2054. messageSends: ["new", "ifTrue:", unescape("%3D"), "error:", "ifTrue:ifFalse:", unescape("%3C"), "whileTrue:", unescape("%3E%3D"), "at:put:", unescape("+"), unescape("%3C%3D")],
  2055. referencedClasses: ["Array"]
  2056. }),
  2057. smalltalk.Number);
  2058. smalltalk.addMethod(
  2059. unescape('_to_by_do_'),
  2060. smalltalk.method({
  2061. selector: unescape('to%3Aby%3Ado%3A'),
  2062. category: 'enumerating',
  2063. fn: function (stop, step, aBlock){
  2064. var self=this;
  2065. var value=nil;
  2066. value=self;
  2067. ((($receiver = smalltalk.send(step, "__eq", [(0)])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_error_", [unescape("step%20must%20be%20non-zero")]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(self, "_error_", [unescape("step%20must%20be%20non-zero")]);})]));
  2068. ((($receiver = ((($receiver = step).klass === smalltalk.Number) ? $receiver <(0) : smalltalk.send($receiver, "__lt", [(0)]))).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (function(){while((function(){return ((($receiver = value).klass === smalltalk.Number) ? $receiver >=stop : smalltalk.send($receiver, "__gt_eq", [stop]));})()) {(function(){smalltalk.send(aBlock, "_value_", [value]);return value=((($receiver = value).klass === smalltalk.Number) ? $receiver +step : smalltalk.send($receiver, "__plus", [step]));})()}})();})() : (function(){return (function(){while((function(){return ((($receiver = value).klass === smalltalk.Number) ? $receiver <=stop : smalltalk.send($receiver, "__lt_eq", [stop]));})()) {(function(){smalltalk.send(aBlock, "_value_", [value]);return value=((($receiver = value).klass === smalltalk.Number) ? $receiver +step : smalltalk.send($receiver, "__plus", [step]));})()}})();})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return (function(){while((function(){return ((($receiver = value).klass === smalltalk.Number) ? $receiver >=stop : smalltalk.send($receiver, "__gt_eq", [stop]));})()) {(function(){smalltalk.send(aBlock, "_value_", [value]);return value=((($receiver = value).klass === smalltalk.Number) ? $receiver +step : smalltalk.send($receiver, "__plus", [step]));})()}})();}), (function(){return (function(){while((function(){return ((($receiver = value).klass === smalltalk.Number) ? $receiver <=stop : smalltalk.send($receiver, "__lt_eq", [stop]));})()) {(function(){smalltalk.send(aBlock, "_value_", [value]);return value=((($receiver = value).klass === smalltalk.Number) ? $receiver +step : smalltalk.send($receiver, "__plus", [step]));})()}})();})]));
  2069. return self;},
  2070. args: ["stop", "step", "aBlock"],
  2071. source: unescape('to%3A%20stop%20by%3A%20step%20do%3A%20aBlock%0A%09%7C%20value%20%7C%0A%09value%20%3A%3D%20self.%0A%09step%20%3D%200%20ifTrue%3A%20%5Bself%20error%3A%20%27step%20must%20be%20non-zero%27%5D.%0A%09step%20%3C%200%0A%09%09ifTrue%3A%20%5B%5B%20value%20%3E%3D%20stop%20%5D%20whileTrue%3A%20%5B%0A%09%20%20%20%20%09%09%09aBlock%20value%3A%20value.%0A%09%20%20%20%20%09%09%09value%20%3A%3D%20value%20+%20step%5D%5D%0A%09%09ifFalse%3A%20%5B%5B%20value%20%3C%3D%20stop%20%5D%20whileTrue%3A%20%5B%0A%09%20%20%20%20%09%09%09aBlock%20value%3A%20value.%0A%09%20%20%20%20%09%09%09value%20%3A%3D%20value%20+%20step%5D%5D'),
  2072. messageSends: ["ifTrue:", unescape("%3D"), "error:", "ifTrue:ifFalse:", unescape("%3C"), "whileTrue:", unescape("%3E%3D"), "value:", unescape("+"), unescape("%3C%3D")],
  2073. referencedClasses: []
  2074. }),
  2075. smalltalk.Number);
  2076. smalltalk.addMethod(
  2077. unescape('_deepCopy'),
  2078. smalltalk.method({
  2079. selector: unescape('deepCopy'),
  2080. category: 'copying',
  2081. fn: function (){
  2082. var self=this;
  2083. return smalltalk.send(self, "_copy", []);
  2084. return self;},
  2085. args: [],
  2086. source: unescape('deepCopy%0A%09%5Eself%20copy'),
  2087. messageSends: ["copy"],
  2088. referencedClasses: []
  2089. }),
  2090. smalltalk.Number);
  2091. smalltalk.addMethod(
  2092. unescape('_copy'),
  2093. smalltalk.method({
  2094. selector: unescape('copy'),
  2095. category: 'copying',
  2096. fn: function (){
  2097. var self=this;
  2098. return self;
  2099. return self;},
  2100. args: [],
  2101. source: unescape('copy%0A%09%5Eself'),
  2102. messageSends: [],
  2103. referencedClasses: []
  2104. }),
  2105. smalltalk.Number);
  2106. smalltalk.addMethod(
  2107. unescape('_%5C%5C'),
  2108. smalltalk.method({
  2109. selector: unescape('%5C%5C'),
  2110. category: 'arithmetic',
  2111. fn: function (aNumber){
  2112. var self=this;
  2113. return self % aNumber;
  2114. return self;},
  2115. args: ["aNumber"],
  2116. source: unescape('%5C%5C%20aNumber%0A%09%3Creturn%20self%20%25%20aNumber%3E'),
  2117. messageSends: [],
  2118. referencedClasses: []
  2119. }),
  2120. smalltalk.Number);
  2121. smalltalk.addMethod(
  2122. unescape('_sqrt'),
  2123. smalltalk.method({
  2124. selector: unescape('sqrt'),
  2125. category: 'arithmetic',
  2126. fn: function (){
  2127. var self=this;
  2128. return Math.sqrt(self);
  2129. return self;},
  2130. args: [],
  2131. source: unescape('sqrt%0A%09%3Creturn%20Math.sqrt%28self%29%3E'),
  2132. messageSends: [],
  2133. referencedClasses: []
  2134. }),
  2135. smalltalk.Number);
  2136. smalltalk.addMethod(
  2137. unescape('_squared'),
  2138. smalltalk.method({
  2139. selector: unescape('squared'),
  2140. category: 'arithmetic',
  2141. fn: function (){
  2142. var self=this;
  2143. return self * self;
  2144. return self;},
  2145. args: [],
  2146. source: unescape('squared%0A%09%5Eself%20*%20self'),
  2147. messageSends: [unescape("*")],
  2148. referencedClasses: []
  2149. }),
  2150. smalltalk.Number);
  2151. smalltalk.addMethod(
  2152. unescape('_identityHash'),
  2153. smalltalk.method({
  2154. selector: unescape('identityHash'),
  2155. category: 'accessing',
  2156. fn: function (){
  2157. var self=this;
  2158. return smalltalk.send(smalltalk.send(self, "_asString", []), "__comma", ["n"]);
  2159. return self;},
  2160. args: [],
  2161. source: unescape('identityHash%0A%09%5Eself%20asString%2C%20%27n%27'),
  2162. messageSends: [unescape("%2C"), "asString"],
  2163. referencedClasses: []
  2164. }),
  2165. smalltalk.Number);
  2166. smalltalk.addMethod(
  2167. unescape('_pi'),
  2168. smalltalk.method({
  2169. selector: unescape('pi'),
  2170. category: 'instance creation',
  2171. fn: function (){
  2172. var self=this;
  2173. return Math.PI;
  2174. return self;},
  2175. args: [],
  2176. source: unescape('pi%0A%09%3Creturn%20Math.PI%3E'),
  2177. messageSends: [],
  2178. referencedClasses: []
  2179. }),
  2180. smalltalk.Number.klass);
  2181. smalltalk.addClass('Boolean', smalltalk.Object, [], 'Kernel-Objects');
  2182. smalltalk.Boolean.comment=unescape('Boolean%20wraps%20the%20JavaScript%20%60Boolean%28%29%60%20constructor.%20The%20%60true%60%20and%20%60false%60%20objects%20are%20the%20JavaScript%20boolean%20objects.%0A%0ABoolean%20defines%20the%20protocol%20for%20logic%20testing%20operations%20and%20conditional%20control%20structures%20for%20the%20logical%20values.%0ABoolean%20instances%20are%20weither%20%60true%60%20or%20%60false%60.')
  2183. smalltalk.addMethod(
  2184. unescape('__eq'),
  2185. smalltalk.method({
  2186. selector: unescape('%3D'),
  2187. category: 'comparing',
  2188. fn: function (aBoolean){
  2189. var self=this;
  2190. try{((($receiver = smalltalk.send(smalltalk.send(aBoolean, "_class", []), "__eq", [smalltalk.send(self, "_class", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})]));
  2191. return Boolean(self == true) == aBoolean;
  2192. return self;
  2193. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq'){return e.fn()} throw(e)}},
  2194. args: ["aBoolean"],
  2195. source: unescape('%3D%20aBoolean%0A%09aBoolean%20class%20%3D%20self%20class%20ifFalse%3A%20%5B%5Efalse%5D.%0A%09%3Creturn%20Boolean%28self%20%3D%3D%20true%29%20%3D%3D%20aBoolean%3E'),
  2196. messageSends: ["ifFalse:", unescape("%3D"), "class"],
  2197. referencedClasses: []
  2198. }),
  2199. smalltalk.Boolean);
  2200. smalltalk.addMethod(
  2201. unescape('_shallowCopy'),
  2202. smalltalk.method({
  2203. selector: unescape('shallowCopy'),
  2204. category: 'copying',
  2205. fn: function (){
  2206. var self=this;
  2207. return self;
  2208. return self;},
  2209. args: [],
  2210. source: unescape('shallowCopy%0A%09%5Eself'),
  2211. messageSends: [],
  2212. referencedClasses: []
  2213. }),
  2214. smalltalk.Boolean);
  2215. smalltalk.addMethod(
  2216. unescape('_deepCopy'),
  2217. smalltalk.method({
  2218. selector: unescape('deepCopy'),
  2219. category: 'copying',
  2220. fn: function (){
  2221. var self=this;
  2222. return self;
  2223. return self;},
  2224. args: [],
  2225. source: unescape('deepCopy%0A%09%5Eself'),
  2226. messageSends: [],
  2227. referencedClasses: []
  2228. }),
  2229. smalltalk.Boolean);
  2230. smalltalk.addMethod(
  2231. unescape('_ifTrue_'),
  2232. smalltalk.method({
  2233. selector: unescape('ifTrue%3A'),
  2234. category: 'controlling',
  2235. fn: function (aBlock){
  2236. var self=this;
  2237. return smalltalk.send(self, "_ifTrue_ifFalse_", [aBlock, (function(){return nil;})]);
  2238. return self;},
  2239. args: ["aBlock"],
  2240. source: unescape('ifTrue%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5Eself%20ifTrue%3A%20aBlock%20ifFalse%3A%20%5B%5D'),
  2241. messageSends: ["ifTrue:ifFalse:"],
  2242. referencedClasses: []
  2243. }),
  2244. smalltalk.Boolean);
  2245. smalltalk.addMethod(
  2246. unescape('_ifFalse_'),
  2247. smalltalk.method({
  2248. selector: unescape('ifFalse%3A'),
  2249. category: 'controlling',
  2250. fn: function (aBlock){
  2251. var self=this;
  2252. return smalltalk.send(self, "_ifTrue_ifFalse_", [(function(){return nil;}), aBlock]);
  2253. return self;},
  2254. args: ["aBlock"],
  2255. source: unescape('ifFalse%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5Eself%20ifTrue%3A%20%5B%5D%20ifFalse%3A%20aBlock'),
  2256. messageSends: ["ifTrue:ifFalse:"],
  2257. referencedClasses: []
  2258. }),
  2259. smalltalk.Boolean);
  2260. smalltalk.addMethod(
  2261. unescape('_ifFalse_ifTrue_'),
  2262. smalltalk.method({
  2263. selector: unescape('ifFalse%3AifTrue%3A'),
  2264. category: 'controlling',
  2265. fn: function (aBlock, anotherBlock){
  2266. var self=this;
  2267. return smalltalk.send(self, "_ifTrue_ifFalse_", [anotherBlock, aBlock]);
  2268. return self;},
  2269. args: ["aBlock", "anotherBlock"],
  2270. source: unescape('ifFalse%3A%20aBlock%20ifTrue%3A%20anotherBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5Eself%20ifTrue%3A%20anotherBlock%20ifFalse%3A%20aBlock'),
  2271. messageSends: ["ifTrue:ifFalse:"],
  2272. referencedClasses: []
  2273. }),
  2274. smalltalk.Boolean);
  2275. smalltalk.addMethod(
  2276. unescape('_ifTrue_ifFalse_'),
  2277. smalltalk.method({
  2278. selector: unescape('ifTrue%3AifFalse%3A'),
  2279. category: 'controlling',
  2280. fn: function (aBlock, anotherBlock){
  2281. var self=this;
  2282. if(self == true) {
  2283. return aBlock();
  2284. } else {
  2285. return anotherBlock();
  2286. }
  2287. ;
  2288. return self;},
  2289. args: ["aBlock", "anotherBlock"],
  2290. source: unescape('ifTrue%3A%20aBlock%20ifFalse%3A%20anotherBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%3C%0A%09%20%20%20%20if%28self%20%3D%3D%20true%29%20%7B%0A%09%09return%20aBlock%28%29%3B%0A%09%20%20%20%20%7D%20else%20%7B%0A%09%09return%20anotherBlock%28%29%3B%0A%09%20%20%20%20%7D%0A%09%3E'),
  2291. messageSends: [],
  2292. referencedClasses: []
  2293. }),
  2294. smalltalk.Boolean);
  2295. smalltalk.addMethod(
  2296. unescape('_and_'),
  2297. smalltalk.method({
  2298. selector: unescape('and%3A'),
  2299. category: 'controlling',
  2300. fn: function (aBlock){
  2301. var self=this;
  2302. return smalltalk.send(smalltalk.send(self, "__eq", [true]), "_ifTrue_ifFalse_", [aBlock, (function(){return false;})]);
  2303. return self;},
  2304. args: ["aBlock"],
  2305. source: unescape('and%3A%20aBlock%0A%09%5Eself%20%3D%20true%0A%09%20%20%20%20ifTrue%3A%20aBlock%0A%09%20%20%20%20ifFalse%3A%20%5Bfalse%5D'),
  2306. messageSends: ["ifTrue:ifFalse:", unescape("%3D")],
  2307. referencedClasses: []
  2308. }),
  2309. smalltalk.Boolean);
  2310. smalltalk.addMethod(
  2311. unescape('_or_'),
  2312. smalltalk.method({
  2313. selector: unescape('or%3A'),
  2314. category: 'controlling',
  2315. fn: function (aBlock){
  2316. var self=this;
  2317. return smalltalk.send(smalltalk.send(self, "__eq", [true]), "_ifTrue_ifFalse_", [(function(){return true;}), aBlock]);
  2318. return self;},
  2319. args: ["aBlock"],
  2320. source: unescape('or%3A%20aBlock%0A%09%5Eself%20%3D%20true%0A%09%20%20%20%20ifTrue%3A%20%5Btrue%5D%0A%09%20%20%20%20ifFalse%3A%20aBlock'),
  2321. messageSends: ["ifTrue:ifFalse:", unescape("%3D")],
  2322. referencedClasses: []
  2323. }),
  2324. smalltalk.Boolean);
  2325. smalltalk.addMethod(
  2326. unescape('_not'),
  2327. smalltalk.method({
  2328. selector: unescape('not'),
  2329. category: 'controlling',
  2330. fn: function (){
  2331. var self=this;
  2332. return smalltalk.send(self, "__eq", [false]);
  2333. return self;},
  2334. args: [],
  2335. source: unescape('not%0A%09%5Eself%20%3D%20false'),
  2336. messageSends: [unescape("%3D")],
  2337. referencedClasses: []
  2338. }),
  2339. smalltalk.Boolean);
  2340. smalltalk.addMethod(
  2341. unescape('_printString'),
  2342. smalltalk.method({
  2343. selector: unescape('printString'),
  2344. category: 'printing',
  2345. fn: function (){
  2346. var self=this;
  2347. return self.toString();
  2348. return self;},
  2349. args: [],
  2350. source: unescape('printString%0A%09%3Creturn%20self.toString%28%29%3E'),
  2351. messageSends: [],
  2352. referencedClasses: []
  2353. }),
  2354. smalltalk.Boolean);
  2355. smalltalk.addMethod(
  2356. unescape('_%26'),
  2357. smalltalk.method({
  2358. selector: unescape('%26'),
  2359. category: 'controlling',
  2360. fn: function (aBoolean){
  2361. var self=this;
  2362. if(self == true) {
  2363. return aBoolean;
  2364. } else {
  2365. return false;
  2366. }
  2367. ;
  2368. return self;},
  2369. args: ["aBoolean"],
  2370. source: unescape('%26%20aBoolean%0A%09%3C%0A%09%20%20%20%20if%28self%20%3D%3D%20true%29%20%7B%0A%09%09return%20aBoolean%3B%0A%09%20%20%20%20%7D%20else%20%7B%0A%09%09return%20false%3B%0A%09%20%20%20%20%7D%0A%09%3E'),
  2371. messageSends: [],
  2372. referencedClasses: []
  2373. }),
  2374. smalltalk.Boolean);
  2375. smalltalk.addMethod(
  2376. unescape('_%7C'),
  2377. smalltalk.method({
  2378. selector: unescape('%7C'),
  2379. category: 'controlling',
  2380. fn: function (aBoolean){
  2381. var self=this;
  2382. if(self == true) {
  2383. return true;
  2384. } else {
  2385. return aBoolean;
  2386. }
  2387. ;
  2388. return self;},
  2389. args: ["aBoolean"],
  2390. source: unescape('%7C%20aBoolean%0A%09%3C%0A%09%20%20%20%20if%28self%20%3D%3D%20true%29%20%7B%0A%09%09return%20true%3B%0A%09%20%20%20%20%7D%20else%20%7B%0A%09%09return%20aBoolean%3B%0A%09%20%20%20%20%7D%0A%09%3E'),
  2391. messageSends: [],
  2392. referencedClasses: []
  2393. }),
  2394. smalltalk.Boolean);
  2395. smalltalk.addClass('Date', smalltalk.Object, [], 'Kernel-Objects');
  2396. smalltalk.Date.comment=unescape('The%20Date%20class%20is%20used%20to%20work%20with%20dates%20and%20times.%20Therefore%20%60Date%20today%60%20and%20%60Date%20now%60%20are%20both%20valid%20in%0AAmber%20and%20answer%20the%20same%20date%20object.%0A%0ADate%20wraps%20the%20%60Date%28%29%60%20JavaScript%20constructor%2C%20and%20Smalltalk%20date%20objects%20are%20JavaScript%20date%20objects.')
  2397. smalltalk.addMethod(
  2398. unescape('_year'),
  2399. smalltalk.method({
  2400. selector: unescape('year'),
  2401. category: 'accessing',
  2402. fn: function (){
  2403. var self=this;
  2404. return self.getFullYear();
  2405. return self;},
  2406. args: [],
  2407. source: unescape('year%0A%09%3Creturn%20self.getFullYear%28%29%3E'),
  2408. messageSends: [],
  2409. referencedClasses: []
  2410. }),
  2411. smalltalk.Date);
  2412. smalltalk.addMethod(
  2413. unescape('_month'),
  2414. smalltalk.method({
  2415. selector: unescape('month'),
  2416. category: 'accessing',
  2417. fn: function (){
  2418. var self=this;
  2419. return self.getMonth() + 1;
  2420. return self;},
  2421. args: [],
  2422. source: unescape('month%0A%09%3Creturn%20self.getMonth%28%29%20+%201%3E'),
  2423. messageSends: [],
  2424. referencedClasses: []
  2425. }),
  2426. smalltalk.Date);
  2427. smalltalk.addMethod(
  2428. unescape('_month_'),
  2429. smalltalk.method({
  2430. selector: unescape('month%3A'),
  2431. category: 'accessing',
  2432. fn: function (aNumber){
  2433. var self=this;
  2434. self.setMonth(aNumber - 1);
  2435. return self;},
  2436. args: ["aNumber"],
  2437. source: unescape('month%3A%20aNumber%0A%09%3Cself.setMonth%28aNumber%20-%201%29%3E'),
  2438. messageSends: [],
  2439. referencedClasses: []
  2440. }),
  2441. smalltalk.Date);
  2442. smalltalk.addMethod(
  2443. unescape('_day'),
  2444. smalltalk.method({
  2445. selector: unescape('day'),
  2446. category: 'accessing',
  2447. fn: function (){
  2448. var self=this;
  2449. return smalltalk.send(self, "_dayOfWeek", []);
  2450. return self;},
  2451. args: [],
  2452. source: unescape('day%0A%09%5Eself%20dayOfWeek'),
  2453. messageSends: ["dayOfWeek"],
  2454. referencedClasses: []
  2455. }),
  2456. smalltalk.Date);
  2457. smalltalk.addMethod(
  2458. unescape('_dayOfWeek'),
  2459. smalltalk.method({
  2460. selector: unescape('dayOfWeek'),
  2461. category: 'accessing',
  2462. fn: function (){
  2463. var self=this;
  2464. return self.getDay() + 1;
  2465. return self;},
  2466. args: [],
  2467. source: unescape('dayOfWeek%0A%09%3Creturn%20self.getDay%28%29%20+%201%3E'),
  2468. messageSends: [],
  2469. referencedClasses: []
  2470. }),
  2471. smalltalk.Date);
  2472. smalltalk.addMethod(
  2473. unescape('_dayOfWeek_'),
  2474. smalltalk.method({
  2475. selector: unescape('dayOfWeek%3A'),
  2476. category: 'accessing',
  2477. fn: function (aNumber){
  2478. var self=this;
  2479. return self.setDay(aNumber - 1);
  2480. return self;},
  2481. args: ["aNumber"],
  2482. source: unescape('dayOfWeek%3A%20aNumber%0A%09%3Creturn%20self.setDay%28aNumber%20-%201%29%3E'),
  2483. messageSends: [],
  2484. referencedClasses: []
  2485. }),
  2486. smalltalk.Date);
  2487. smalltalk.addMethod(
  2488. unescape('_day_'),
  2489. smalltalk.method({
  2490. selector: unescape('day%3A'),
  2491. category: 'accessing',
  2492. fn: function (aNumber){
  2493. var self=this;
  2494. smalltalk.send(self, "_day_", [aNumber]);
  2495. return self;},
  2496. args: ["aNumber"],
  2497. source: unescape('day%3A%20aNumber%0A%09self%20day%3A%20aNumber'),
  2498. messageSends: ["day:"],
  2499. referencedClasses: []
  2500. }),
  2501. smalltalk.Date);
  2502. smalltalk.addMethod(
  2503. unescape('_year_'),
  2504. smalltalk.method({
  2505. selector: unescape('year%3A'),
  2506. category: 'accessing',
  2507. fn: function (aNumber){
  2508. var self=this;
  2509. self.setFullYear(aNumber);
  2510. return self;},
  2511. args: ["aNumber"],
  2512. source: unescape('year%3A%20aNumber%0A%09%3Cself.setFullYear%28aNumber%29%3E'),
  2513. messageSends: [],
  2514. referencedClasses: []
  2515. }),
  2516. smalltalk.Date);
  2517. smalltalk.addMethod(
  2518. unescape('_dayOfMonth'),
  2519. smalltalk.method({
  2520. selector: unescape('dayOfMonth'),
  2521. category: 'accessing',
  2522. fn: function (){
  2523. var self=this;
  2524. return self.getDate();
  2525. return self;},
  2526. args: [],
  2527. source: unescape('dayOfMonth%0A%09%3Creturn%20self.getDate%28%29%3E'),
  2528. messageSends: [],
  2529. referencedClasses: []
  2530. }),
  2531. smalltalk.Date);
  2532. smalltalk.addMethod(
  2533. unescape('_dayOfMonth_'),
  2534. smalltalk.method({
  2535. selector: unescape('dayOfMonth%3A'),
  2536. category: 'accessing',
  2537. fn: function (aNumber){
  2538. var self=this;
  2539. self.setDate(aNumber);
  2540. return self;},
  2541. args: ["aNumber"],
  2542. source: unescape('dayOfMonth%3A%20aNumber%0A%09%3Cself.setDate%28aNumber%29%3E'),
  2543. messageSends: [],
  2544. referencedClasses: []
  2545. }),
  2546. smalltalk.Date);
  2547. smalltalk.addMethod(
  2548. unescape('_asString'),
  2549. smalltalk.method({
  2550. selector: unescape('asString'),
  2551. category: 'converting',
  2552. fn: function (){
  2553. var self=this;
  2554. return self.toString();
  2555. return self;},
  2556. args: [],
  2557. source: unescape('asString%0A%09%3Creturn%20self.toString%28%29%3E'),
  2558. messageSends: [],
  2559. referencedClasses: []
  2560. }),
  2561. smalltalk.Date);
  2562. smalltalk.addMethod(
  2563. unescape('_printString'),
  2564. smalltalk.method({
  2565. selector: unescape('printString'),
  2566. category: 'printing',
  2567. fn: function (){
  2568. var self=this;
  2569. return smalltalk.send(self, "_asString", []);
  2570. return self;},
  2571. args: [],
  2572. source: unescape('printString%0A%09%5Eself%20asString'),
  2573. messageSends: ["asString"],
  2574. referencedClasses: []
  2575. }),
  2576. smalltalk.Date);
  2577. smalltalk.addMethod(
  2578. unescape('_asMilliseconds'),
  2579. smalltalk.method({
  2580. selector: unescape('asMilliseconds'),
  2581. category: 'converting',
  2582. fn: function (){
  2583. var self=this;
  2584. return smalltalk.send(self, "_time", []);
  2585. return self;},
  2586. args: [],
  2587. source: unescape('asMilliseconds%0A%09%5Eself%20time'),
  2588. messageSends: ["time"],
  2589. referencedClasses: []
  2590. }),
  2591. smalltalk.Date);
  2592. smalltalk.addMethod(
  2593. unescape('_time'),
  2594. smalltalk.method({
  2595. selector: unescape('time'),
  2596. category: 'accessing',
  2597. fn: function (){
  2598. var self=this;
  2599. return self.getTime();
  2600. return self;},
  2601. args: [],
  2602. source: unescape('time%0A%09%3Creturn%20self.getTime%28%29%3E'),
  2603. messageSends: [],
  2604. referencedClasses: []
  2605. }),
  2606. smalltalk.Date);
  2607. smalltalk.addMethod(
  2608. unescape('_time_'),
  2609. smalltalk.method({
  2610. selector: unescape('time%3A'),
  2611. category: 'accessing',
  2612. fn: function (aNumber){
  2613. var self=this;
  2614. self.setTime(aNumber);
  2615. return self;},
  2616. args: ["aNumber"],
  2617. source: unescape('time%3A%20aNumber%0A%09%3Cself.setTime%28aNumber%29%3E'),
  2618. messageSends: [],
  2619. referencedClasses: []
  2620. }),
  2621. smalltalk.Date);
  2622. smalltalk.addMethod(
  2623. unescape('_asDateString'),
  2624. smalltalk.method({
  2625. selector: unescape('asDateString'),
  2626. category: 'converting',
  2627. fn: function (){
  2628. var self=this;
  2629. return self.toDateString();
  2630. return self;},
  2631. args: [],
  2632. source: unescape('asDateString%0A%09%3Creturn%20self.toDateString%28%29%3E'),
  2633. messageSends: [],
  2634. referencedClasses: []
  2635. }),
  2636. smalltalk.Date);
  2637. smalltalk.addMethod(
  2638. unescape('_asTimeString'),
  2639. smalltalk.method({
  2640. selector: unescape('asTimeString'),
  2641. category: 'converting',
  2642. fn: function (){
  2643. var self=this;
  2644. return self.toTimeString();
  2645. return self;},
  2646. args: [],
  2647. source: unescape('asTimeString%0A%09%3Creturn%20self.toTimeString%28%29%3E'),
  2648. messageSends: [],
  2649. referencedClasses: []
  2650. }),
  2651. smalltalk.Date);
  2652. smalltalk.addMethod(
  2653. unescape('_asLocaleString'),
  2654. smalltalk.method({
  2655. selector: unescape('asLocaleString'),
  2656. category: 'converting',
  2657. fn: function (){
  2658. var self=this;
  2659. return self.toLocaleString();
  2660. return self;},
  2661. args: [],
  2662. source: unescape('asLocaleString%0A%09%3Creturn%20self.toLocaleString%28%29%3E'),
  2663. messageSends: [],
  2664. referencedClasses: []
  2665. }),
  2666. smalltalk.Date);
  2667. smalltalk.addMethod(
  2668. unescape('_asNumber'),
  2669. smalltalk.method({
  2670. selector: unescape('asNumber'),
  2671. category: 'converting',
  2672. fn: function (){
  2673. var self=this;
  2674. return smalltalk.send(self, "_asMilliseconds", []);
  2675. return self;},
  2676. args: [],
  2677. source: unescape('asNumber%0A%09%5Eself%20asMilliseconds'),
  2678. messageSends: ["asMilliseconds"],
  2679. referencedClasses: []
  2680. }),
  2681. smalltalk.Date);
  2682. smalltalk.addMethod(
  2683. unescape('_hours_'),
  2684. smalltalk.method({
  2685. selector: unescape('hours%3A'),
  2686. category: 'accessing',
  2687. fn: function (aNumber){
  2688. var self=this;
  2689. self.setHours(aNumber);
  2690. return self;},
  2691. args: ["aNumber"],
  2692. source: unescape('hours%3A%20aNumber%0A%09%3Cself.setHours%28aNumber%29%3E'),
  2693. messageSends: [],
  2694. referencedClasses: []
  2695. }),
  2696. smalltalk.Date);
  2697. smalltalk.addMethod(
  2698. unescape('_minutes_'),
  2699. smalltalk.method({
  2700. selector: unescape('minutes%3A'),
  2701. category: 'accessing',
  2702. fn: function (aNumber){
  2703. var self=this;
  2704. self.setMinutes(aNumber);
  2705. return self;},
  2706. args: ["aNumber"],
  2707. source: unescape('minutes%3A%20aNumber%0A%09%3Cself.setMinutes%28aNumber%29%3E'),
  2708. messageSends: [],
  2709. referencedClasses: []
  2710. }),
  2711. smalltalk.Date);
  2712. smalltalk.addMethod(
  2713. unescape('_seconds_'),
  2714. smalltalk.method({
  2715. selector: unescape('seconds%3A'),
  2716. category: 'accessing',
  2717. fn: function (aNumber){
  2718. var self=this;
  2719. self.setSeconds(aNumber);
  2720. return self;},
  2721. args: ["aNumber"],
  2722. source: unescape('seconds%3A%20aNumber%0A%09%3Cself.setSeconds%28aNumber%29%3E'),
  2723. messageSends: [],
  2724. referencedClasses: []
  2725. }),
  2726. smalltalk.Date);
  2727. smalltalk.addMethod(
  2728. unescape('_milliseconds_'),
  2729. smalltalk.method({
  2730. selector: unescape('milliseconds%3A'),
  2731. category: 'accessing',
  2732. fn: function (aNumber){
  2733. var self=this;
  2734. self.setMilliseconds(aNumber);
  2735. return self;},
  2736. args: ["aNumber"],
  2737. source: unescape('milliseconds%3A%20aNumber%0A%09%3Cself.setMilliseconds%28aNumber%29%3E'),
  2738. messageSends: [],
  2739. referencedClasses: []
  2740. }),
  2741. smalltalk.Date);
  2742. smalltalk.addMethod(
  2743. unescape('_hours'),
  2744. smalltalk.method({
  2745. selector: unescape('hours'),
  2746. category: 'accessing',
  2747. fn: function (){
  2748. var self=this;
  2749. return self.getHours();
  2750. return self;},
  2751. args: [],
  2752. source: unescape('hours%0A%09%3Creturn%20self.getHours%28%29%3E'),
  2753. messageSends: [],
  2754. referencedClasses: []
  2755. }),
  2756. smalltalk.Date);
  2757. smalltalk.addMethod(
  2758. unescape('_minutes'),
  2759. smalltalk.method({
  2760. selector: unescape('minutes'),
  2761. category: 'accessing',
  2762. fn: function (){
  2763. var self=this;
  2764. return self.getMinutes();
  2765. return self;},
  2766. args: [],
  2767. source: unescape('minutes%0A%09%3Creturn%20self.getMinutes%28%29%3E'),
  2768. messageSends: [],
  2769. referencedClasses: []
  2770. }),
  2771. smalltalk.Date);
  2772. smalltalk.addMethod(
  2773. unescape('_seconds'),
  2774. smalltalk.method({
  2775. selector: unescape('seconds'),
  2776. category: 'accessing',
  2777. fn: function (){
  2778. var self=this;
  2779. return self.getSeconds();
  2780. return self;},
  2781. args: [],
  2782. source: unescape('seconds%0A%09%3Creturn%20self.getSeconds%28%29%3E'),
  2783. messageSends: [],
  2784. referencedClasses: []
  2785. }),
  2786. smalltalk.Date);
  2787. smalltalk.addMethod(
  2788. unescape('_milliseconds'),
  2789. smalltalk.method({
  2790. selector: unescape('milliseconds'),
  2791. category: 'accessing',
  2792. fn: function (){
  2793. var self=this;
  2794. return self.getMilliseconds();
  2795. return self;},
  2796. args: [],
  2797. source: unescape('milliseconds%0A%09%3Creturn%20self.getMilliseconds%28%29%3E'),
  2798. messageSends: [],
  2799. referencedClasses: []
  2800. }),
  2801. smalltalk.Date);
  2802. smalltalk.addMethod(
  2803. unescape('__lt'),
  2804. smalltalk.method({
  2805. selector: unescape('%3C'),
  2806. category: 'comparing',
  2807. fn: function (aDate){
  2808. var self=this;
  2809. return self < aDate;
  2810. return self;},
  2811. args: ["aDate"],
  2812. source: unescape('%3C%20aDate%0A%09%3Creturn%20self%20%3C%20aDate%3E'),
  2813. messageSends: [],
  2814. referencedClasses: []
  2815. }),
  2816. smalltalk.Date);
  2817. smalltalk.addMethod(
  2818. unescape('__gt'),
  2819. smalltalk.method({
  2820. selector: unescape('%3E'),
  2821. category: 'comparing',
  2822. fn: function (aDate){
  2823. var self=this;
  2824. return self > aDate;
  2825. return self;},
  2826. args: ["aDate"],
  2827. source: unescape('%3E%20aDate%0A%09%3Creturn%20self%20%3E%3E%20aDate%3E'),
  2828. messageSends: [],
  2829. referencedClasses: []
  2830. }),
  2831. smalltalk.Date);
  2832. smalltalk.addMethod(
  2833. unescape('__lt_eq'),
  2834. smalltalk.method({
  2835. selector: unescape('%3C%3D'),
  2836. category: 'comparing',
  2837. fn: function (aDate){
  2838. var self=this;
  2839. return self <= aDate;
  2840. return self;},
  2841. args: ["aDate"],
  2842. source: unescape('%3C%3D%20aDate%0A%09%3Creturn%20self%20%3C%3D%20aDate%3E'),
  2843. messageSends: [],
  2844. referencedClasses: []
  2845. }),
  2846. smalltalk.Date);
  2847. smalltalk.addMethod(
  2848. unescape('__gt_eq'),
  2849. smalltalk.method({
  2850. selector: unescape('%3E%3D'),
  2851. category: 'comparing',
  2852. fn: function (aDate){
  2853. var self=this;
  2854. return self >= aDate;
  2855. return self;},
  2856. args: ["aDate"],
  2857. source: unescape('%3E%3D%20aDate%0A%09%3Creturn%20self%20%3E%3E%3D%20aDate%3E'),
  2858. messageSends: [],
  2859. referencedClasses: []
  2860. }),
  2861. smalltalk.Date);
  2862. smalltalk.addMethod(
  2863. unescape('__minus'),
  2864. smalltalk.method({
  2865. selector: unescape('-'),
  2866. category: 'arithmetic',
  2867. fn: function (aDate){
  2868. var self=this;
  2869. return self - aDate;
  2870. return self;},
  2871. args: ["aDate"],
  2872. source: unescape('-%20aDate%0A%09%3Creturn%20self%20-%20aDate%3E'),
  2873. messageSends: [],
  2874. referencedClasses: []
  2875. }),
  2876. smalltalk.Date);
  2877. smalltalk.addMethod(
  2878. unescape('__plus'),
  2879. smalltalk.method({
  2880. selector: unescape('+'),
  2881. category: 'arithmetic',
  2882. fn: function (aDate){
  2883. var self=this;
  2884. return self + aDate;
  2885. return self;},
  2886. args: ["aDate"],
  2887. source: unescape('+%20aDate%0A%09%3Creturn%20self%20+%20aDate%3E'),
  2888. messageSends: [],
  2889. referencedClasses: []
  2890. }),
  2891. smalltalk.Date);
  2892. smalltalk.addMethod(
  2893. unescape('_new_'),
  2894. smalltalk.method({
  2895. selector: unescape('new%3A'),
  2896. category: 'instance creation',
  2897. fn: function (anObject){
  2898. var self=this;
  2899. return new Date(anObject);
  2900. return self;},
  2901. args: ["anObject"],
  2902. source: unescape('new%3A%20anObject%0A%09%3Creturn%20new%20Date%28anObject%29%3E'),
  2903. messageSends: [],
  2904. referencedClasses: []
  2905. }),
  2906. smalltalk.Date.klass);
  2907. smalltalk.addMethod(
  2908. unescape('_fromString_'),
  2909. smalltalk.method({
  2910. selector: unescape('fromString%3A'),
  2911. category: 'instance creation',
  2912. fn: function (aString){
  2913. var self=this;
  2914. return smalltalk.send(self, "_new_", [aString]);
  2915. return self;},
  2916. args: ["aString"],
  2917. source: unescape('fromString%3A%20aString%0A%09%22Example%3A%20Date%20fromString%28%272011/04/15%2000%3A00%3A00%27%29%22%0A%09%5Eself%20new%3A%20aString'),
  2918. messageSends: ["new:"],
  2919. referencedClasses: []
  2920. }),
  2921. smalltalk.Date.klass);
  2922. smalltalk.addMethod(
  2923. unescape('_fromSeconds_'),
  2924. smalltalk.method({
  2925. selector: unescape('fromSeconds%3A'),
  2926. category: 'instance creation',
  2927. fn: function (aNumber){
  2928. var self=this;
  2929. return smalltalk.send(self, "_fromMilliseconds_", [((($receiver = aNumber).klass === smalltalk.Number) ? $receiver *(1000) : smalltalk.send($receiver, "__star", [(1000)]))]);
  2930. return self;},
  2931. args: ["aNumber"],
  2932. source: unescape('fromSeconds%3A%20aNumber%0A%09%5Eself%20fromMilliseconds%3A%20aNumber%20*%201000'),
  2933. messageSends: ["fromMilliseconds:", unescape("*")],
  2934. referencedClasses: []
  2935. }),
  2936. smalltalk.Date.klass);
  2937. smalltalk.addMethod(
  2938. unescape('_fromMilliseconds_'),
  2939. smalltalk.method({
  2940. selector: unescape('fromMilliseconds%3A'),
  2941. category: 'instance creation',
  2942. fn: function (aNumber){
  2943. var self=this;
  2944. return smalltalk.send(self, "_new_", [aNumber]);
  2945. return self;},
  2946. args: ["aNumber"],
  2947. source: unescape('fromMilliseconds%3A%20aNumber%0A%09%5Eself%20new%3A%20aNumber'),
  2948. messageSends: ["new:"],
  2949. referencedClasses: []
  2950. }),
  2951. smalltalk.Date.klass);
  2952. smalltalk.addMethod(
  2953. unescape('_today'),
  2954. smalltalk.method({
  2955. selector: unescape('today'),
  2956. category: 'instance creation',
  2957. fn: function (){
  2958. var self=this;
  2959. return smalltalk.send(self, "_new", []);
  2960. return self;},
  2961. args: [],
  2962. source: unescape('today%0A%09%5Eself%20new'),
  2963. messageSends: ["new"],
  2964. referencedClasses: []
  2965. }),
  2966. smalltalk.Date.klass);
  2967. smalltalk.addMethod(
  2968. unescape('_now'),
  2969. smalltalk.method({
  2970. selector: unescape('now'),
  2971. category: 'instance creation',
  2972. fn: function (){
  2973. var self=this;
  2974. return smalltalk.send(self, "_today", []);
  2975. return self;},
  2976. args: [],
  2977. source: unescape('now%0A%09%5Eself%20today'),
  2978. messageSends: ["today"],
  2979. referencedClasses: []
  2980. }),
  2981. smalltalk.Date.klass);
  2982. smalltalk.addMethod(
  2983. unescape('_millisecondsToRun_'),
  2984. smalltalk.method({
  2985. selector: unescape('millisecondsToRun%3A'),
  2986. category: 'instance creation',
  2987. fn: function (aBlock){
  2988. var self=this;
  2989. var t=nil;
  2990. t=smalltalk.send((smalltalk.Date || Date), "_now", []);
  2991. smalltalk.send(aBlock, "_value", []);
  2992. return ((($receiver = smalltalk.send((smalltalk.Date || Date), "_now", [])).klass === smalltalk.Number) ? $receiver -t : smalltalk.send($receiver, "__minus", [t]));
  2993. return self;},
  2994. args: ["aBlock"],
  2995. source: unescape('millisecondsToRun%3A%20aBlock%0A%09%7C%20t%20%7C%0A%09t%20%3A%3D%20Date%20now.%0A%09aBlock%20value.%0A%09%5EDate%20now%20-%20t'),
  2996. messageSends: ["now", "value", unescape("-")],
  2997. referencedClasses: ["Date"]
  2998. }),
  2999. smalltalk.Date.klass);
  3000. smalltalk.addClass('UndefinedObject', smalltalk.Object, [], 'Kernel-Objects');
  3001. smalltalk.UndefinedObject.comment=unescape('UndefinedObject%20describes%20the%20behavior%20of%20its%20sole%20instance%2C%20%60nil%60.%20%60nil%60%20represents%20a%20prior%20value%20for%20variables%20that%20have%20not%20been%20initialized%2C%20or%20for%20results%20which%20are%20meaningless.%0A%0A%60nil%60%20is%20the%20Smalltalk%20representation%20of%20the%20%60undefined%60%20JavaScript%20object.')
  3002. smalltalk.addMethod(
  3003. unescape('_subclass_instanceVariableNames_'),
  3004. smalltalk.method({
  3005. selector: unescape('subclass%3AinstanceVariableNames%3A'),
  3006. category: 'class creation',
  3007. fn: function (aString, anotherString){
  3008. var self=this;
  3009. return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, anotherString, nil]);
  3010. return self;},
  3011. args: ["aString", "anotherString"],
  3012. source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20anotherString%0A%09%5Eself%20subclass%3A%20aString%20instanceVariableNames%3A%20anotherString%20package%3A%20nil'),
  3013. messageSends: ["subclass:instanceVariableNames:package:"],
  3014. referencedClasses: []
  3015. }),
  3016. smalltalk.UndefinedObject);
  3017. smalltalk.addMethod(
  3018. unescape('_subclass_instanceVariableNames_category_'),
  3019. smalltalk.method({
  3020. selector: unescape('subclass%3AinstanceVariableNames%3Acategory%3A'),
  3021. category: 'class creation',
  3022. fn: function (aString, aString2, aString3){
  3023. var self=this;
  3024. smalltalk.send(self, "_deprecatedAPI", []);
  3025. return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, aString2, aString3]);
  3026. return self;},
  3027. args: ["aString", "aString2", "aString3"],
  3028. source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20category%3A%20aString3%0A%09%22Kept%20for%20compatibility.%22%0A%09self%20deprecatedAPI.%0A%09%5Eself%20subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20package%3A%20aString3'),
  3029. messageSends: ["deprecatedAPI", "subclass:instanceVariableNames:package:"],
  3030. referencedClasses: []
  3031. }),
  3032. smalltalk.UndefinedObject);
  3033. smalltalk.addMethod(
  3034. unescape('_shallowCopy'),
  3035. smalltalk.method({
  3036. selector: unescape('shallowCopy'),
  3037. category: 'copying',
  3038. fn: function (){
  3039. var self=this;
  3040. return self;
  3041. return self;},
  3042. args: [],
  3043. source: unescape('shallowCopy%0A%09%5Eself'),
  3044. messageSends: [],
  3045. referencedClasses: []
  3046. }),
  3047. smalltalk.UndefinedObject);
  3048. smalltalk.addMethod(
  3049. unescape('_deepCopy'),
  3050. smalltalk.method({
  3051. selector: unescape('deepCopy'),
  3052. category: 'copying',
  3053. fn: function (){
  3054. var self=this;
  3055. return self;
  3056. return self;},
  3057. args: [],
  3058. source: unescape('deepCopy%0A%09%5Eself'),
  3059. messageSends: [],
  3060. referencedClasses: []
  3061. }),
  3062. smalltalk.UndefinedObject);
  3063. smalltalk.addMethod(
  3064. unescape('_ifNil_'),
  3065. smalltalk.method({
  3066. selector: unescape('ifNil%3A'),
  3067. category: 'testing',
  3068. fn: function (aBlock){
  3069. var self=this;
  3070. return smalltalk.send(self, "_ifNil_ifNotNil_", [aBlock, (function(){return nil;})]);
  3071. return self;},
  3072. args: ["aBlock"],
  3073. source: unescape('ifNil%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5Eself%20ifNil%3A%20aBlock%20ifNotNil%3A%20%5B%5D'),
  3074. messageSends: ["ifNil:ifNotNil:"],
  3075. referencedClasses: []
  3076. }),
  3077. smalltalk.UndefinedObject);
  3078. smalltalk.addMethod(
  3079. unescape('_ifNotNil_'),
  3080. smalltalk.method({
  3081. selector: unescape('ifNotNil%3A'),
  3082. category: 'testing',
  3083. fn: function (aBlock){
  3084. var self=this;
  3085. return self;
  3086. return self;},
  3087. args: ["aBlock"],
  3088. source: unescape('ifNotNil%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5Eself'),
  3089. messageSends: [],
  3090. referencedClasses: []
  3091. }),
  3092. smalltalk.UndefinedObject);
  3093. smalltalk.addMethod(
  3094. unescape('_ifNil_ifNotNil_'),
  3095. smalltalk.method({
  3096. selector: unescape('ifNil%3AifNotNil%3A'),
  3097. category: 'testing',
  3098. fn: function (aBlock, anotherBlock){
  3099. var self=this;
  3100. return smalltalk.send(aBlock, "_value", []);
  3101. return self;},
  3102. args: ["aBlock", "anotherBlock"],
  3103. source: unescape('ifNil%3A%20aBlock%20ifNotNil%3A%20anotherBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5EaBlock%20value'),
  3104. messageSends: ["value"],
  3105. referencedClasses: []
  3106. }),
  3107. smalltalk.UndefinedObject);
  3108. smalltalk.addMethod(
  3109. unescape('_ifNotNil_ifNil_'),
  3110. smalltalk.method({
  3111. selector: unescape('ifNotNil%3AifNil%3A'),
  3112. category: 'testing',
  3113. fn: function (aBlock, anotherBlock){
  3114. var self=this;
  3115. return smalltalk.send(anotherBlock, "_value", []);
  3116. return self;},
  3117. args: ["aBlock", "anotherBlock"],
  3118. source: unescape('ifNotNil%3A%20aBlock%20ifNil%3A%20anotherBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5EanotherBlock%20value'),
  3119. messageSends: ["value"],
  3120. referencedClasses: []
  3121. }),
  3122. smalltalk.UndefinedObject);
  3123. smalltalk.addMethod(
  3124. unescape('_isNil'),
  3125. smalltalk.method({
  3126. selector: unescape('isNil'),
  3127. category: 'testing',
  3128. fn: function (){
  3129. var self=this;
  3130. return true;
  3131. return self;},
  3132. args: [],
  3133. source: unescape('isNil%0A%09%5Etrue'),
  3134. messageSends: [],
  3135. referencedClasses: []
  3136. }),
  3137. smalltalk.UndefinedObject);
  3138. smalltalk.addMethod(
  3139. unescape('_notNil'),
  3140. smalltalk.method({
  3141. selector: unescape('notNil'),
  3142. category: 'testing',
  3143. fn: function (){
  3144. var self=this;
  3145. return false;
  3146. return self;},
  3147. args: [],
  3148. source: unescape('notNil%0A%09%5Efalse'),
  3149. messageSends: [],
  3150. referencedClasses: []
  3151. }),
  3152. smalltalk.UndefinedObject);
  3153. smalltalk.addMethod(
  3154. unescape('_printString'),
  3155. smalltalk.method({
  3156. selector: unescape('printString'),
  3157. category: 'printing',
  3158. fn: function (){
  3159. var self=this;
  3160. return "nil";
  3161. return self;},
  3162. args: [],
  3163. source: unescape('printString%0A%20%20%20%20%5E%27nil%27'),
  3164. messageSends: [],
  3165. referencedClasses: []
  3166. }),
  3167. smalltalk.UndefinedObject);
  3168. smalltalk.addMethod(
  3169. unescape('_subclass_instanceVariableNames_package_'),
  3170. smalltalk.method({
  3171. selector: unescape('subclass%3AinstanceVariableNames%3Apackage%3A'),
  3172. category: 'class creation',
  3173. fn: function (aString, aString2, aString3){
  3174. var self=this;
  3175. return smalltalk.send(smalltalk.send((smalltalk.ClassBuilder || ClassBuilder), "_new", []), "_superclass_subclass_instanceVariableNames_package_", [self, aString, aString2, aString3]);
  3176. return self;},
  3177. args: ["aString", "aString2", "aString3"],
  3178. source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20package%3A%20aString3%0A%09%5EClassBuilder%20new%0A%09%20%20%20%20superclass%3A%20self%20subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20package%3A%20aString3'),
  3179. messageSends: ["superclass:subclass:instanceVariableNames:package:", "new"],
  3180. referencedClasses: ["ClassBuilder"]
  3181. }),
  3182. smalltalk.UndefinedObject);
  3183. smalltalk.addMethod(
  3184. unescape('_new'),
  3185. smalltalk.method({
  3186. selector: unescape('new'),
  3187. category: 'instance creation',
  3188. fn: function (){
  3189. var self=this;
  3190. smalltalk.send(self, "_error_", ["You cannot create new instances of UndefinedObject. Use nil"]);
  3191. return self;},
  3192. args: [],
  3193. source: unescape('new%0A%09%20%20%20%20self%20error%3A%20%27You%20cannot%20create%20new%20instances%20of%20UndefinedObject.%20Use%20nil%27'),
  3194. messageSends: ["error:"],
  3195. referencedClasses: []
  3196. }),
  3197. smalltalk.UndefinedObject.klass);
  3198. smalltalk.addClass('Random', smalltalk.Object, [], 'Kernel-Objects');
  3199. smalltalk.Random.comment=unescape('Random%20is%20just%20a%20wrapper%20around%20javascript%20Math.random%28%29%20and%20is%20trivially%20used%20like%20this%3A%0A%0A%09Random%20new%20next%0A%0AThis%20will%20return%20a%20float%20x%20where%20x%20%3C%201%20and%20x%20%3E%200.%20If%20you%20want%20a%20random%20integer%20between%201%20and%2010%20you%20can%20use%20%23atRandom%0A%0A%0910%20atRandom%0A%0A...which%20is%20also%20implemented%20in%20SequencableCollection%20so%20you%20can%20easy%20pick%20an%20element%20at%20random%3A%0A%0A%09%23%28%27a%27%20%27b%27%20%27c%27%29%20atRandom')
  3200. smalltalk.addMethod(
  3201. unescape('_next'),
  3202. smalltalk.method({
  3203. selector: unescape('next'),
  3204. category: 'accessing',
  3205. fn: function (){
  3206. var self=this;
  3207. return Math.random();
  3208. return self;},
  3209. args: [],
  3210. source: unescape('next%0A%09%3Creturn%20Math.random%28%29%3E'),
  3211. messageSends: [],
  3212. referencedClasses: []
  3213. }),
  3214. smalltalk.Random);
  3215. smalltalk.addMethod(
  3216. unescape('_next_'),
  3217. smalltalk.method({
  3218. selector: unescape('next%3A'),
  3219. category: 'accessing',
  3220. fn: function (anInteger){
  3221. var self=this;
  3222. return smalltalk.send(smalltalk.send((1), "_to_", [anInteger]), "_collect_", [(function(each){return smalltalk.send(self, "_next", []);})]);
  3223. return self;},
  3224. args: ["anInteger"],
  3225. source: unescape('next%3A%20anInteger%0A%20%20%20%20%5E%281%20to%3A%20anInteger%29%20collect%3A%20%5B%3Aeach%20%7C%20self%20next%5D'),
  3226. messageSends: ["collect:", "to:", "next"],
  3227. referencedClasses: []
  3228. }),
  3229. smalltalk.Random);
  3230. smalltalk.addClass('Point', smalltalk.Object, ['x', 'y'], 'Kernel-Objects');
  3231. smalltalk.addMethod(
  3232. unescape('_x'),
  3233. smalltalk.method({
  3234. selector: unescape('x'),
  3235. category: 'accessing',
  3236. fn: function (){
  3237. var self=this;
  3238. return self['@x'];
  3239. return self;},
  3240. args: [],
  3241. source: unescape('x%0A%09%5Ex'),
  3242. messageSends: [],
  3243. referencedClasses: []
  3244. }),
  3245. smalltalk.Point);
  3246. smalltalk.addMethod(
  3247. unescape('_y'),
  3248. smalltalk.method({
  3249. selector: unescape('y'),
  3250. category: 'accessing',
  3251. fn: function (){
  3252. var self=this;
  3253. return self['@y'];
  3254. return self;},
  3255. args: [],
  3256. source: unescape('y%0A%09%5Ey'),
  3257. messageSends: [],
  3258. referencedClasses: []
  3259. }),
  3260. smalltalk.Point);
  3261. smalltalk.addMethod(
  3262. unescape('_y_'),
  3263. smalltalk.method({
  3264. selector: unescape('y%3A'),
  3265. category: 'accessing',
  3266. fn: function (aNumber){
  3267. var self=this;
  3268. self['@y']=aNumber;
  3269. return self;},
  3270. args: ["aNumber"],
  3271. source: unescape('y%3A%20aNumber%0A%09y%20%3A%3D%20aNumber'),
  3272. messageSends: [],
  3273. referencedClasses: []
  3274. }),
  3275. smalltalk.Point);
  3276. smalltalk.addMethod(
  3277. unescape('_x_'),
  3278. smalltalk.method({
  3279. selector: unescape('x%3A'),
  3280. category: 'accessing',
  3281. fn: function (aNumber){
  3282. var self=this;
  3283. self['@x']=aNumber;
  3284. return self;},
  3285. args: ["aNumber"],
  3286. source: unescape('x%3A%20aNumber%0A%09x%20%3A%3D%20aNumber'),
  3287. messageSends: [],
  3288. referencedClasses: []
  3289. }),
  3290. smalltalk.Point);
  3291. smalltalk.addMethod(
  3292. unescape('__star'),
  3293. smalltalk.method({
  3294. selector: unescape('*'),
  3295. category: 'arithmetic',
  3296. fn: function (aPoint){
  3297. var self=this;
  3298. return smalltalk.send((smalltalk.Point || Point), "_x_y_", [((($receiver = smalltalk.send(self, "_x", [])).klass === smalltalk.Number) ? $receiver *smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", []) : smalltalk.send($receiver, "__star", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", [])])), ((($receiver = smalltalk.send(self, "_y", [])).klass === smalltalk.Number) ? $receiver *smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", []) : smalltalk.send($receiver, "__star", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", [])]))]);
  3299. return self;},
  3300. args: ["aPoint"],
  3301. source: unescape('*%20aPoint%0A%09%5EPoint%20x%3A%20self%20x%20*%20aPoint%20asPoint%20x%20y%3A%20self%20y%20*%20aPoint%20asPoint%20y'),
  3302. messageSends: ["x:y:", unescape("*"), "x", "asPoint", "y"],
  3303. referencedClasses: ["Point"]
  3304. }),
  3305. smalltalk.Point);
  3306. smalltalk.addMethod(
  3307. unescape('__plus'),
  3308. smalltalk.method({
  3309. selector: unescape('+'),
  3310. category: 'arithmetic',
  3311. fn: function (aPoint){
  3312. var self=this;
  3313. return smalltalk.send((smalltalk.Point || Point), "_x_y_", [((($receiver = smalltalk.send(self, "_x", [])).klass === smalltalk.Number) ? $receiver +smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", []) : smalltalk.send($receiver, "__plus", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", [])])), ((($receiver = smalltalk.send(self, "_y", [])).klass === smalltalk.Number) ? $receiver +smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", []) : smalltalk.send($receiver, "__plus", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", [])]))]);
  3314. return self;},
  3315. args: ["aPoint"],
  3316. source: unescape('+%20aPoint%0A%09%5EPoint%20x%3A%20self%20x%20+%20aPoint%20asPoint%20x%20y%3A%20self%20y%20+%20aPoint%20asPoint%20y'),
  3317. messageSends: ["x:y:", unescape("+"), "x", "asPoint", "y"],
  3318. referencedClasses: ["Point"]
  3319. }),
  3320. smalltalk.Point);
  3321. smalltalk.addMethod(
  3322. unescape('__minus'),
  3323. smalltalk.method({
  3324. selector: unescape('-'),
  3325. category: 'arithmetic',
  3326. fn: function (aPoint){
  3327. var self=this;
  3328. return smalltalk.send((smalltalk.Point || Point), "_x_y_", [((($receiver = smalltalk.send(self, "_x", [])).klass === smalltalk.Number) ? $receiver -smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", []) : smalltalk.send($receiver, "__minus", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", [])])), ((($receiver = smalltalk.send(self, "_y", [])).klass === smalltalk.Number) ? $receiver -smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", []) : smalltalk.send($receiver, "__minus", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", [])]))]);
  3329. return self;},
  3330. args: ["aPoint"],
  3331. source: unescape('-%20aPoint%0A%09%5EPoint%20x%3A%20self%20x%20-%20aPoint%20asPoint%20x%20y%3A%20self%20y%20-%20aPoint%20asPoint%20y'),
  3332. messageSends: ["x:y:", unescape("-"), "x", "asPoint", "y"],
  3333. referencedClasses: ["Point"]
  3334. }),
  3335. smalltalk.Point);
  3336. smalltalk.addMethod(
  3337. unescape('__slash'),
  3338. smalltalk.method({
  3339. selector: unescape('/'),
  3340. category: 'arithmetic',
  3341. fn: function (aPoint){
  3342. var self=this;
  3343. return smalltalk.send((smalltalk.Point || Point), "_x_y_", [((($receiver = smalltalk.send(self, "_x", [])).klass === smalltalk.Number) ? $receiver /smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", []) : smalltalk.send($receiver, "__slash", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", [])])), ((($receiver = smalltalk.send(self, "_y", [])).klass === smalltalk.Number) ? $receiver /smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", []) : smalltalk.send($receiver, "__slash", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", [])]))]);
  3344. return self;},
  3345. args: ["aPoint"],
  3346. source: unescape('/%20aPoint%0A%09%5EPoint%20x%3A%20self%20x%20/%20aPoint%20asPoint%20x%20y%3A%20self%20y%20/%20aPoint%20asPoint%20y'),
  3347. messageSends: ["x:y:", unescape("/"), "x", "asPoint", "y"],
  3348. referencedClasses: ["Point"]
  3349. }),
  3350. smalltalk.Point);
  3351. smalltalk.addMethod(
  3352. unescape('_asPoint'),
  3353. smalltalk.method({
  3354. selector: unescape('asPoint'),
  3355. category: 'converting',
  3356. fn: function (){
  3357. var self=this;
  3358. return self;
  3359. return self;},
  3360. args: [],
  3361. source: unescape('asPoint%0A%09%5Eself'),
  3362. messageSends: [],
  3363. referencedClasses: []
  3364. }),
  3365. smalltalk.Point);
  3366. smalltalk.addMethod(
  3367. unescape('__eq'),
  3368. smalltalk.method({
  3369. selector: unescape('%3D'),
  3370. category: 'arithmetic',
  3371. fn: function (aPoint){
  3372. var self=this;
  3373. return smalltalk.send(smalltalk.send(smalltalk.send(aPoint, "_class", []), "__eq", [smalltalk.send(self, "_class", [])]), "_and_", [(function(){return smalltalk.send(smalltalk.send(smalltalk.send(aPoint, "_x", []), "__eq", [smalltalk.send(self, "_x", [])]), "_&", [smalltalk.send(smalltalk.send(aPoint, "_y", []), "__eq", [smalltalk.send(self, "_y", [])])]);})]);
  3374. return self;},
  3375. args: ["aPoint"],
  3376. source: unescape('%3D%20aPoint%0A%09%5EaPoint%20class%20%3D%20self%20class%20and%3A%20%5B%0A%09%09%28aPoint%20x%20%3D%20self%20x%29%20%26%20%28aPoint%20y%20%3D%20self%20y%29%5D'),
  3377. messageSends: ["and:", unescape("%3D"), "class", unescape("%26"), "x", "y"],
  3378. referencedClasses: []
  3379. }),
  3380. smalltalk.Point);
  3381. smalltalk.addMethod(
  3382. unescape('_x_y_'),
  3383. smalltalk.method({
  3384. selector: unescape('x%3Ay%3A'),
  3385. category: 'instance creation',
  3386. fn: function (aNumber, anotherNumber){
  3387. var self=this;
  3388. return (function($rec){smalltalk.send($rec, "_x_", [aNumber]);smalltalk.send($rec, "_y_", [anotherNumber]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  3389. return self;},
  3390. args: ["aNumber", "anotherNumber"],
  3391. source: unescape('x%3A%20aNumber%20y%3A%20anotherNumber%0A%09%5Eself%20new%0A%09%09x%3A%20aNumber%3B%0A%09%09y%3A%20anotherNumber%3B%0A%09%09yourself'),
  3392. messageSends: ["x:", "y:", "yourself", "new"],
  3393. referencedClasses: []
  3394. }),
  3395. smalltalk.Point.klass);
  3396. smalltalk.addClass('JSObjectProxy', smalltalk.Object, ['jsObject'], 'Kernel-Objects');
  3397. smalltalk.JSObjectProxy.comment=unescape('JSObjectProxy%20handles%20sending%20messages%20to%20JavaScript%20object%2C%20therefore%20accessing%20JavaScript%20objects%20from%20Amber%20is%20transparent.%0AJSOjbectProxy%20makes%20intensive%20use%20of%20%60%23doesNotUnderstand%3A%60.%0A%0A%23%23%20Examples%0A%0AJSObjectProxy%20objects%20are%20instanciated%20by%20Amber%20when%20a%20Smalltalk%20message%20is%20sent%20to%20a%20JavaScript%20object.%0A%0A%20%20%20%20window%20alert%3A%20%27hello%20world%27.%0A%20%20%20%20window%20inspect.%0A%20%20%20%20%28window%20jQuery%3A%20%27body%27%29%20append%3A%20%27hello%20world%27%0A%0ASmalltalk%20messages%20sends%20are%20converted%20to%20JavaScript%20function%20calls%20or%20object%20property%20access%20_%28in%20this%20order%29_.%20If%20n%20one%20of%20them%20match%2C%20a%20%60MessageNotUnderstood%60%20error%20will%20be%20thrown.%20%0A%0A%23%23%20Message%20conversion%20rules%0A%0A-%20%60someUser%20name%60%20becomes%20%20%60someUser.name%60%0A-%20%60someUser%20name%3A%20%27John%27%60%20becomes%20%60someUser%20name%20%3D%20%22John%22%60%0A-%20%60console%20log%3A%20%27hello%20world%27%60%20becomes%20%60console.log%28%27hello%20world%27%29%60%0A-%20%60%28window%20jQuery%3A%20%27foo%27%29%20css%3A%20%27background%27%20color%3A%20%27red%27%60%20becomes%20%60window.jQuery%28%27foo%27%29.css%28%27background%27%2C%20%27red%27%29%60%0A%0A__Note%3A__%20For%20keyword-based%20messages%2C%20only%20the%20first%20keyword%20is%20kept%3A%20%60window%20foo%3A%201%20bar%3A%202%60%20is%20equivalent%20to%20%60window%20foo%3A%201%20baz%3A%202%60.')
  3398. smalltalk.addMethod(
  3399. unescape('_jsObject_'),
  3400. smalltalk.method({
  3401. selector: unescape('jsObject%3A'),
  3402. category: 'accessing',
  3403. fn: function (aJSObject){
  3404. var self=this;
  3405. self['@jsObject']=aJSObject;
  3406. return self;},
  3407. args: ["aJSObject"],
  3408. source: unescape('jsObject%3A%20aJSObject%0A%09jsObject%20%3A%3D%20aJSObject'),
  3409. messageSends: [],
  3410. referencedClasses: []
  3411. }),
  3412. smalltalk.JSObjectProxy);
  3413. smalltalk.addMethod(
  3414. unescape('_jsObject'),
  3415. smalltalk.method({
  3416. selector: unescape('jsObject'),
  3417. category: 'accessing',
  3418. fn: function (){
  3419. var self=this;
  3420. return self['@jsObject'];
  3421. return self;},
  3422. args: [],
  3423. source: unescape('jsObject%0A%09%5EjsObject'),
  3424. messageSends: [],
  3425. referencedClasses: []
  3426. }),
  3427. smalltalk.JSObjectProxy);
  3428. smalltalk.addMethod(
  3429. unescape('_printString'),
  3430. smalltalk.method({
  3431. selector: unescape('printString'),
  3432. category: 'proxy',
  3433. fn: function (){
  3434. var self=this;
  3435. return smalltalk.send(smalltalk.send(self, "_jsObject", []), "_toString", []);
  3436. return self;},
  3437. args: [],
  3438. source: unescape('printString%0A%09%5Eself%20jsObject%20toString'),
  3439. messageSends: ["toString", "jsObject"],
  3440. referencedClasses: []
  3441. }),
  3442. smalltalk.JSObjectProxy);
  3443. smalltalk.addMethod(
  3444. unescape('_inspectOn_'),
  3445. smalltalk.method({
  3446. selector: unescape('inspectOn%3A'),
  3447. category: 'proxy',
  3448. fn: function (anInspector){
  3449. var self=this;
  3450. var variables=nil;
  3451. variables=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []);
  3452. smalltalk.send(variables, "_at_put_", [unescape("%23self"), smalltalk.send(self, "_jsObject", [])]);
  3453. smalltalk.send(anInspector, "_setLabel_", [smalltalk.send(self, "_printString", [])]);
  3454. for(var i in self['@jsObject']) {
  3455. variables._at_put_(i, self['@jsObject'][i]);
  3456. };
  3457. smalltalk.send(anInspector, "_setVariables_", [variables]);
  3458. return self;},
  3459. args: ["anInspector"],
  3460. source: unescape('inspectOn%3A%20anInspector%0A%09%7C%20variables%20%7C%0A%09variables%20%3A%3D%20Dictionary%20new.%0A%09variables%20at%3A%20%27%23self%27%20put%3A%20self%20jsObject.%0A%09anInspector%20setLabel%3A%20self%20printString.%0A%09%3Cfor%28var%20i%20in%20self%5B%27@jsObject%27%5D%29%20%7B%0A%09%09variables._at_put_%28i%2C%20self%5B%27@jsObject%27%5D%5Bi%5D%29%3B%0A%09%7D%3E.%0A%09anInspector%20setVariables%3A%20variables'),
  3461. messageSends: ["new", "at:put:", "jsObject", "setLabel:", "printString", "setVariables:"],
  3462. referencedClasses: ["Dictionary"]
  3463. }),
  3464. smalltalk.JSObjectProxy);
  3465. smalltalk.addMethod(
  3466. unescape('_doesNotUnderstand_'),
  3467. smalltalk.method({
  3468. selector: unescape('doesNotUnderstand%3A'),
  3469. category: 'proxy',
  3470. fn: function (aMessage){
  3471. var self=this;
  3472. var obj=nil;
  3473. var selector=nil;
  3474. var jsSelector=nil;
  3475. var arguments=nil;
  3476. obj=smalltalk.send(self, "_jsObject", []);
  3477. selector=smalltalk.send(aMessage, "_selector", []);
  3478. jsSelector=smalltalk.send(selector, "_asJavaScriptSelector", []);
  3479. arguments=smalltalk.send(aMessage, "_arguments", []);
  3480. if(obj[jsSelector] != undefined) {return smalltalk.send(obj, jsSelector, arguments)};
  3481. smalltalk.send(self, "_doesNotUnderstand_", [aMessage], smalltalk.Object);
  3482. return self;},
  3483. args: ["aMessage"],
  3484. source: unescape('doesNotUnderstand%3A%20aMessage%0A%09%7C%20obj%20selector%20jsSelector%20arguments%20%7C%0A%09obj%20%3A%3D%20self%20jsObject.%0A%09selector%20%3A%3D%20aMessage%20selector.%0A%09jsSelector%20%3A%3D%20selector%20asJavaScriptSelector.%0A%09arguments%20%3A%3D%20aMessage%20arguments.%0A%09%3Cif%28obj%5BjsSelector%5D%20%21%3D%20undefined%29%20%7Breturn%20smalltalk.send%28obj%2C%20jsSelector%2C%20arguments%29%7D%3E.%0A%09super%20doesNotUnderstand%3A%20aMessage'),
  3485. messageSends: ["jsObject", "selector", "asJavaScriptSelector", "arguments", "doesNotUnderstand:"],
  3486. referencedClasses: []
  3487. }),
  3488. smalltalk.JSObjectProxy);
  3489. smalltalk.addMethod(
  3490. unescape('_at_'),
  3491. smalltalk.method({
  3492. selector: unescape('at%3A'),
  3493. category: 'accessing',
  3494. fn: function (aSymbol){
  3495. var self=this;
  3496. var attr=nil;
  3497. attr=smalltalk.send(aSymbol, "_asString", []);
  3498. return self['@jsObject'][attr];
  3499. return self;},
  3500. args: ["aSymbol"],
  3501. source: unescape('at%3A%20aSymbol%0A%09%7C%20attr%20%7C%0A%09attr%20%3A%3D%20aSymbol%20asString.%0A%09%3Creturn%20self%5B%27@jsObject%27%5D%5Battr%5D%3E'),
  3502. messageSends: ["asString"],
  3503. referencedClasses: []
  3504. }),
  3505. smalltalk.JSObjectProxy);
  3506. smalltalk.addMethod(
  3507. unescape('_at_put_'),
  3508. smalltalk.method({
  3509. selector: unescape('at%3Aput%3A'),
  3510. category: 'accessing',
  3511. fn: function (aSymbol, anObject){
  3512. var self=this;
  3513. var attr=nil;
  3514. attr=smalltalk.send(aSymbol, "_asString", []);
  3515. self['@jsObject'][attr] = anObject;
  3516. return self;},
  3517. args: ["aSymbol", "anObject"],
  3518. source: unescape('at%3A%20aSymbol%20put%3A%20anObject%0A%09%7C%20attr%20%7C%0A%09attr%20%3A%3D%20aSymbol%20asString.%0A%09%3Cself%5B%27@jsObject%27%5D%5Battr%5D%20%3D%20anObject%3E'),
  3519. messageSends: ["asString"],
  3520. referencedClasses: []
  3521. }),
  3522. smalltalk.JSObjectProxy);
  3523. smalltalk.addMethod(
  3524. unescape('_on_'),
  3525. smalltalk.method({
  3526. selector: unescape('on%3A'),
  3527. category: 'instance creation',
  3528. fn: function (aJSObject){
  3529. var self=this;
  3530. return (function($rec){smalltalk.send($rec, "_jsObject_", [aJSObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  3531. return self;},
  3532. args: ["aJSObject"],
  3533. source: unescape('on%3A%20aJSObject%0A%09%5Eself%20new%0A%09%09jsObject%3A%20aJSObject%3B%0A%09%09yourself'),
  3534. messageSends: ["jsObject:", "yourself", "new"],
  3535. referencedClasses: []
  3536. }),
  3537. smalltalk.JSObjectProxy.klass);