Kernel-Objects.js 127 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790
  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.addMethod(
  3002. unescape('_subclass_instanceVariableNames_'),
  3003. smalltalk.method({
  3004. selector: unescape('subclass%3AinstanceVariableNames%3A'),
  3005. category: 'class creation',
  3006. fn: function (aString, anotherString){
  3007. var self=this;
  3008. return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, anotherString, nil]);
  3009. return self;},
  3010. args: ["aString", "anotherString"],
  3011. source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20anotherString%0A%09%5Eself%20subclass%3A%20aString%20instanceVariableNames%3A%20anotherString%20package%3A%20nil'),
  3012. messageSends: ["subclass:instanceVariableNames:package:"],
  3013. referencedClasses: []
  3014. }),
  3015. smalltalk.UndefinedObject);
  3016. smalltalk.addMethod(
  3017. unescape('_subclass_instanceVariableNames_category_'),
  3018. smalltalk.method({
  3019. selector: unescape('subclass%3AinstanceVariableNames%3Acategory%3A'),
  3020. category: 'class creation',
  3021. fn: function (aString, aString2, aString3){
  3022. var self=this;
  3023. smalltalk.send(self, "_deprecatedAPI", []);
  3024. return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, aString2, aString3]);
  3025. return self;},
  3026. args: ["aString", "aString2", "aString3"],
  3027. 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'),
  3028. messageSends: ["deprecatedAPI", "subclass:instanceVariableNames:package:"],
  3029. referencedClasses: []
  3030. }),
  3031. smalltalk.UndefinedObject);
  3032. smalltalk.addMethod(
  3033. unescape('_shallowCopy'),
  3034. smalltalk.method({
  3035. selector: unescape('shallowCopy'),
  3036. category: 'copying',
  3037. fn: function (){
  3038. var self=this;
  3039. return self;
  3040. return self;},
  3041. args: [],
  3042. source: unescape('shallowCopy%0A%09%5Eself'),
  3043. messageSends: [],
  3044. referencedClasses: []
  3045. }),
  3046. smalltalk.UndefinedObject);
  3047. smalltalk.addMethod(
  3048. unescape('_deepCopy'),
  3049. smalltalk.method({
  3050. selector: unescape('deepCopy'),
  3051. category: 'copying',
  3052. fn: function (){
  3053. var self=this;
  3054. return self;
  3055. return self;},
  3056. args: [],
  3057. source: unescape('deepCopy%0A%09%5Eself'),
  3058. messageSends: [],
  3059. referencedClasses: []
  3060. }),
  3061. smalltalk.UndefinedObject);
  3062. smalltalk.addMethod(
  3063. unescape('_ifNil_'),
  3064. smalltalk.method({
  3065. selector: unescape('ifNil%3A'),
  3066. category: 'testing',
  3067. fn: function (aBlock){
  3068. var self=this;
  3069. return smalltalk.send(self, "_ifNil_ifNotNil_", [aBlock, (function(){return nil;})]);
  3070. return self;},
  3071. args: ["aBlock"],
  3072. source: unescape('ifNil%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5Eself%20ifNil%3A%20aBlock%20ifNotNil%3A%20%5B%5D'),
  3073. messageSends: ["ifNil:ifNotNil:"],
  3074. referencedClasses: []
  3075. }),
  3076. smalltalk.UndefinedObject);
  3077. smalltalk.addMethod(
  3078. unescape('_ifNotNil_'),
  3079. smalltalk.method({
  3080. selector: unescape('ifNotNil%3A'),
  3081. category: 'testing',
  3082. fn: function (aBlock){
  3083. var self=this;
  3084. return self;
  3085. return self;},
  3086. args: ["aBlock"],
  3087. source: unescape('ifNotNil%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5Eself'),
  3088. messageSends: [],
  3089. referencedClasses: []
  3090. }),
  3091. smalltalk.UndefinedObject);
  3092. smalltalk.addMethod(
  3093. unescape('_ifNil_ifNotNil_'),
  3094. smalltalk.method({
  3095. selector: unescape('ifNil%3AifNotNil%3A'),
  3096. category: 'testing',
  3097. fn: function (aBlock, anotherBlock){
  3098. var self=this;
  3099. return smalltalk.send(aBlock, "_value", []);
  3100. return self;},
  3101. args: ["aBlock", "anotherBlock"],
  3102. source: unescape('ifNil%3A%20aBlock%20ifNotNil%3A%20anotherBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5EaBlock%20value'),
  3103. messageSends: ["value"],
  3104. referencedClasses: []
  3105. }),
  3106. smalltalk.UndefinedObject);
  3107. smalltalk.addMethod(
  3108. unescape('_ifNotNil_ifNil_'),
  3109. smalltalk.method({
  3110. selector: unescape('ifNotNil%3AifNil%3A'),
  3111. category: 'testing',
  3112. fn: function (aBlock, anotherBlock){
  3113. var self=this;
  3114. return smalltalk.send(anotherBlock, "_value", []);
  3115. return self;},
  3116. args: ["aBlock", "anotherBlock"],
  3117. source: unescape('ifNotNil%3A%20aBlock%20ifNil%3A%20anotherBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5EanotherBlock%20value'),
  3118. messageSends: ["value"],
  3119. referencedClasses: []
  3120. }),
  3121. smalltalk.UndefinedObject);
  3122. smalltalk.addMethod(
  3123. unescape('_isNil'),
  3124. smalltalk.method({
  3125. selector: unescape('isNil'),
  3126. category: 'testing',
  3127. fn: function (){
  3128. var self=this;
  3129. return true;
  3130. return self;},
  3131. args: [],
  3132. source: unescape('isNil%0A%09%5Etrue'),
  3133. messageSends: [],
  3134. referencedClasses: []
  3135. }),
  3136. smalltalk.UndefinedObject);
  3137. smalltalk.addMethod(
  3138. unescape('_notNil'),
  3139. smalltalk.method({
  3140. selector: unescape('notNil'),
  3141. category: 'testing',
  3142. fn: function (){
  3143. var self=this;
  3144. return false;
  3145. return self;},
  3146. args: [],
  3147. source: unescape('notNil%0A%09%5Efalse'),
  3148. messageSends: [],
  3149. referencedClasses: []
  3150. }),
  3151. smalltalk.UndefinedObject);
  3152. smalltalk.addMethod(
  3153. unescape('_printString'),
  3154. smalltalk.method({
  3155. selector: unescape('printString'),
  3156. category: 'printing',
  3157. fn: function (){
  3158. var self=this;
  3159. return "nil";
  3160. return self;},
  3161. args: [],
  3162. source: unescape('printString%0A%20%20%20%20%5E%27nil%27'),
  3163. messageSends: [],
  3164. referencedClasses: []
  3165. }),
  3166. smalltalk.UndefinedObject);
  3167. smalltalk.addMethod(
  3168. unescape('_subclass_instanceVariableNames_package_'),
  3169. smalltalk.method({
  3170. selector: unescape('subclass%3AinstanceVariableNames%3Apackage%3A'),
  3171. category: 'class creation',
  3172. fn: function (aString, aString2, aString3){
  3173. var self=this;
  3174. return smalltalk.send(smalltalk.send((smalltalk.ClassBuilder || ClassBuilder), "_new", []), "_superclass_subclass_instanceVariableNames_package_", [self, aString, aString2, aString3]);
  3175. return self;},
  3176. args: ["aString", "aString2", "aString3"],
  3177. 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'),
  3178. messageSends: ["superclass:subclass:instanceVariableNames:package:", "new"],
  3179. referencedClasses: ["ClassBuilder"]
  3180. }),
  3181. smalltalk.UndefinedObject);
  3182. smalltalk.addMethod(
  3183. unescape('_new'),
  3184. smalltalk.method({
  3185. selector: unescape('new'),
  3186. category: 'instance creation',
  3187. fn: function (){
  3188. var self=this;
  3189. smalltalk.send(self, "_error_", ["You cannot create new instances of UndefinedObject. Use nil"]);
  3190. return self;},
  3191. args: [],
  3192. source: unescape('new%0A%09%20%20%20%20self%20error%3A%20%27You%20cannot%20create%20new%20instances%20of%20UndefinedObject.%20Use%20nil%27'),
  3193. messageSends: ["error:"],
  3194. referencedClasses: []
  3195. }),
  3196. smalltalk.UndefinedObject.klass);
  3197. smalltalk.addClass('Random', smalltalk.Object, [], 'Kernel-Objects');
  3198. 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')
  3199. smalltalk.addMethod(
  3200. unescape('_next'),
  3201. smalltalk.method({
  3202. selector: unescape('next'),
  3203. category: 'accessing',
  3204. fn: function (){
  3205. var self=this;
  3206. return Math.random();
  3207. return self;},
  3208. args: [],
  3209. source: unescape('next%0A%09%3Creturn%20Math.random%28%29%3E'),
  3210. messageSends: [],
  3211. referencedClasses: []
  3212. }),
  3213. smalltalk.Random);
  3214. smalltalk.addMethod(
  3215. unescape('_next_'),
  3216. smalltalk.method({
  3217. selector: unescape('next%3A'),
  3218. category: 'accessing',
  3219. fn: function (anInteger){
  3220. var self=this;
  3221. return smalltalk.send(smalltalk.send((1), "_to_", [anInteger]), "_collect_", [(function(each){return smalltalk.send(self, "_next", []);})]);
  3222. return self;},
  3223. args: ["anInteger"],
  3224. 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'),
  3225. messageSends: ["collect:", "to:", "next"],
  3226. referencedClasses: []
  3227. }),
  3228. smalltalk.Random);
  3229. smalltalk.addClass('Point', smalltalk.Object, ['x', 'y'], 'Kernel-Objects');
  3230. smalltalk.addMethod(
  3231. unescape('_x'),
  3232. smalltalk.method({
  3233. selector: unescape('x'),
  3234. category: 'accessing',
  3235. fn: function (){
  3236. var self=this;
  3237. return self['@x'];
  3238. return self;},
  3239. args: [],
  3240. source: unescape('x%0A%09%5Ex'),
  3241. messageSends: [],
  3242. referencedClasses: []
  3243. }),
  3244. smalltalk.Point);
  3245. smalltalk.addMethod(
  3246. unescape('_y'),
  3247. smalltalk.method({
  3248. selector: unescape('y'),
  3249. category: 'accessing',
  3250. fn: function (){
  3251. var self=this;
  3252. return self['@y'];
  3253. return self;},
  3254. args: [],
  3255. source: unescape('y%0A%09%5Ey'),
  3256. messageSends: [],
  3257. referencedClasses: []
  3258. }),
  3259. smalltalk.Point);
  3260. smalltalk.addMethod(
  3261. unescape('_y_'),
  3262. smalltalk.method({
  3263. selector: unescape('y%3A'),
  3264. category: 'accessing',
  3265. fn: function (aNumber){
  3266. var self=this;
  3267. self['@y']=aNumber;
  3268. return self;},
  3269. args: ["aNumber"],
  3270. source: unescape('y%3A%20aNumber%0A%09y%20%3A%3D%20aNumber'),
  3271. messageSends: [],
  3272. referencedClasses: []
  3273. }),
  3274. smalltalk.Point);
  3275. smalltalk.addMethod(
  3276. unescape('_x_'),
  3277. smalltalk.method({
  3278. selector: unescape('x%3A'),
  3279. category: 'accessing',
  3280. fn: function (aNumber){
  3281. var self=this;
  3282. self['@x']=aNumber;
  3283. return self;},
  3284. args: ["aNumber"],
  3285. source: unescape('x%3A%20aNumber%0A%09x%20%3A%3D%20aNumber'),
  3286. messageSends: [],
  3287. referencedClasses: []
  3288. }),
  3289. smalltalk.Point);
  3290. smalltalk.addMethod(
  3291. unescape('__star'),
  3292. smalltalk.method({
  3293. selector: unescape('*'),
  3294. category: 'arithmetic',
  3295. fn: function (aPoint){
  3296. var self=this;
  3297. 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", [])]))]);
  3298. return self;},
  3299. args: ["aPoint"],
  3300. source: unescape('*%20aPoint%0A%09%5EPoint%20x%3A%20self%20x%20*%20aPoint%20asPoint%20x%20y%3A%20self%20y%20*%20aPoint%20asPoint%20y'),
  3301. messageSends: ["x:y:", unescape("*"), "x", "asPoint", "y"],
  3302. referencedClasses: ["Point"]
  3303. }),
  3304. smalltalk.Point);
  3305. smalltalk.addMethod(
  3306. unescape('__plus'),
  3307. smalltalk.method({
  3308. selector: unescape('+'),
  3309. category: 'arithmetic',
  3310. fn: function (aPoint){
  3311. var self=this;
  3312. 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", [])]))]);
  3313. return self;},
  3314. args: ["aPoint"],
  3315. source: unescape('+%20aPoint%0A%09%5EPoint%20x%3A%20self%20x%20+%20aPoint%20asPoint%20x%20y%3A%20self%20y%20+%20aPoint%20asPoint%20y'),
  3316. messageSends: ["x:y:", unescape("+"), "x", "asPoint", "y"],
  3317. referencedClasses: ["Point"]
  3318. }),
  3319. smalltalk.Point);
  3320. smalltalk.addMethod(
  3321. unescape('__minus'),
  3322. smalltalk.method({
  3323. selector: unescape('-'),
  3324. category: 'arithmetic',
  3325. fn: function (aPoint){
  3326. var self=this;
  3327. 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", [])]))]);
  3328. return self;},
  3329. args: ["aPoint"],
  3330. source: unescape('-%20aPoint%0A%09%5EPoint%20x%3A%20self%20x%20-%20aPoint%20asPoint%20x%20y%3A%20self%20y%20-%20aPoint%20asPoint%20y'),
  3331. messageSends: ["x:y:", unescape("-"), "x", "asPoint", "y"],
  3332. referencedClasses: ["Point"]
  3333. }),
  3334. smalltalk.Point);
  3335. smalltalk.addMethod(
  3336. unescape('__slash'),
  3337. smalltalk.method({
  3338. selector: unescape('/'),
  3339. category: 'arithmetic',
  3340. fn: function (aPoint){
  3341. var self=this;
  3342. 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", [])]))]);
  3343. return self;},
  3344. args: ["aPoint"],
  3345. source: unescape('/%20aPoint%0A%09%5EPoint%20x%3A%20self%20x%20/%20aPoint%20asPoint%20x%20y%3A%20self%20y%20/%20aPoint%20asPoint%20y'),
  3346. messageSends: ["x:y:", unescape("/"), "x", "asPoint", "y"],
  3347. referencedClasses: ["Point"]
  3348. }),
  3349. smalltalk.Point);
  3350. smalltalk.addMethod(
  3351. unescape('_asPoint'),
  3352. smalltalk.method({
  3353. selector: unescape('asPoint'),
  3354. category: 'converting',
  3355. fn: function (){
  3356. var self=this;
  3357. return self;
  3358. return self;},
  3359. args: [],
  3360. source: unescape('asPoint%0A%09%5Eself'),
  3361. messageSends: [],
  3362. referencedClasses: []
  3363. }),
  3364. smalltalk.Point);
  3365. smalltalk.addMethod(
  3366. unescape('__eq'),
  3367. smalltalk.method({
  3368. selector: unescape('%3D'),
  3369. category: 'arithmetic',
  3370. fn: function (aPoint){
  3371. var self=this;
  3372. 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", [])])]);})]);
  3373. return self;},
  3374. args: ["aPoint"],
  3375. 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'),
  3376. messageSends: ["and:", unescape("%3D"), "class", unescape("%26"), "x", "y"],
  3377. referencedClasses: []
  3378. }),
  3379. smalltalk.Point);
  3380. smalltalk.addMethod(
  3381. unescape('_x_y_'),
  3382. smalltalk.method({
  3383. selector: unescape('x%3Ay%3A'),
  3384. category: 'instance creation',
  3385. fn: function (aNumber, anotherNumber){
  3386. var self=this;
  3387. return (function($rec){smalltalk.send($rec, "_x_", [aNumber]);smalltalk.send($rec, "_y_", [anotherNumber]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  3388. return self;},
  3389. args: ["aNumber", "anotherNumber"],
  3390. 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'),
  3391. messageSends: ["x:", "y:", "yourself", "new"],
  3392. referencedClasses: []
  3393. }),
  3394. smalltalk.Point.klass);
  3395. smalltalk.addClass('JSObjectProxy', smalltalk.Object, ['jsObject'], 'Kernel-Objects');
  3396. 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.')
  3397. smalltalk.addMethod(
  3398. unescape('_jsObject_'),
  3399. smalltalk.method({
  3400. selector: unescape('jsObject%3A'),
  3401. category: 'accessing',
  3402. fn: function (aJSObject){
  3403. var self=this;
  3404. self['@jsObject']=aJSObject;
  3405. return self;},
  3406. args: ["aJSObject"],
  3407. source: unescape('jsObject%3A%20aJSObject%0A%09jsObject%20%3A%3D%20aJSObject'),
  3408. messageSends: [],
  3409. referencedClasses: []
  3410. }),
  3411. smalltalk.JSObjectProxy);
  3412. smalltalk.addMethod(
  3413. unescape('_jsObject'),
  3414. smalltalk.method({
  3415. selector: unescape('jsObject'),
  3416. category: 'accessing',
  3417. fn: function (){
  3418. var self=this;
  3419. return self['@jsObject'];
  3420. return self;},
  3421. args: [],
  3422. source: unescape('jsObject%0A%09%5EjsObject'),
  3423. messageSends: [],
  3424. referencedClasses: []
  3425. }),
  3426. smalltalk.JSObjectProxy);
  3427. smalltalk.addMethod(
  3428. unescape('_printString'),
  3429. smalltalk.method({
  3430. selector: unescape('printString'),
  3431. category: 'proxy',
  3432. fn: function (){
  3433. var self=this;
  3434. return smalltalk.send(smalltalk.send(self, "_jsObject", []), "_toString", []);
  3435. return self;},
  3436. args: [],
  3437. source: unescape('printString%0A%09%5Eself%20jsObject%20toString'),
  3438. messageSends: ["toString", "jsObject"],
  3439. referencedClasses: []
  3440. }),
  3441. smalltalk.JSObjectProxy);
  3442. smalltalk.addMethod(
  3443. unescape('_inspectOn_'),
  3444. smalltalk.method({
  3445. selector: unescape('inspectOn%3A'),
  3446. category: 'proxy',
  3447. fn: function (anInspector){
  3448. var self=this;
  3449. var variables=nil;
  3450. variables=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []);
  3451. smalltalk.send(variables, "_at_put_", [unescape("%23self"), smalltalk.send(self, "_jsObject", [])]);
  3452. smalltalk.send(anInspector, "_setLabel_", [smalltalk.send(self, "_printString", [])]);
  3453. for(var i in self['@jsObject']) {
  3454. variables._at_put_(i, self['@jsObject'][i]);
  3455. };
  3456. smalltalk.send(anInspector, "_setVariables_", [variables]);
  3457. return self;},
  3458. args: ["anInspector"],
  3459. 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'),
  3460. messageSends: ["new", "at:put:", "jsObject", "setLabel:", "printString", "setVariables:"],
  3461. referencedClasses: ["Dictionary"]
  3462. }),
  3463. smalltalk.JSObjectProxy);
  3464. smalltalk.addMethod(
  3465. unescape('_doesNotUnderstand_'),
  3466. smalltalk.method({
  3467. selector: unescape('doesNotUnderstand%3A'),
  3468. category: 'proxy',
  3469. fn: function (aMessage){
  3470. var self=this;
  3471. var obj=nil;
  3472. var selector=nil;
  3473. var jsSelector=nil;
  3474. var arguments=nil;
  3475. obj=smalltalk.send(self, "_jsObject", []);
  3476. selector=smalltalk.send(aMessage, "_selector", []);
  3477. jsSelector=smalltalk.send(selector, "_asJavaScriptSelector", []);
  3478. arguments=smalltalk.send(aMessage, "_arguments", []);
  3479. if(obj[jsSelector] != undefined) {return smalltalk.send(obj, jsSelector, arguments)};
  3480. smalltalk.send(self, "_doesNotUnderstand_", [aMessage], smalltalk.Object);
  3481. return self;},
  3482. args: ["aMessage"],
  3483. 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'),
  3484. messageSends: ["jsObject", "selector", "asJavaScriptSelector", "arguments", "doesNotUnderstand:"],
  3485. referencedClasses: []
  3486. }),
  3487. smalltalk.JSObjectProxy);
  3488. smalltalk.addMethod(
  3489. unescape('_at_'),
  3490. smalltalk.method({
  3491. selector: unescape('at%3A'),
  3492. category: 'accessing',
  3493. fn: function (aSymbol){
  3494. var self=this;
  3495. var attr=nil;
  3496. attr=smalltalk.send(aSymbol, "_asString", []);
  3497. return self['@jsObject'][attr];
  3498. return self;},
  3499. args: ["aSymbol"],
  3500. 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'),
  3501. messageSends: ["asString"],
  3502. referencedClasses: []
  3503. }),
  3504. smalltalk.JSObjectProxy);
  3505. smalltalk.addMethod(
  3506. unescape('_at_put_'),
  3507. smalltalk.method({
  3508. selector: unescape('at%3Aput%3A'),
  3509. category: 'accessing',
  3510. fn: function (aSymbol, anObject){
  3511. var self=this;
  3512. var attr=nil;
  3513. attr=smalltalk.send(aSymbol, "_asString", []);
  3514. self['@jsObject'][attr] = anObject;
  3515. return self;},
  3516. args: ["aSymbol", "anObject"],
  3517. 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'),
  3518. messageSends: ["asString"],
  3519. referencedClasses: []
  3520. }),
  3521. smalltalk.JSObjectProxy);
  3522. smalltalk.addMethod(
  3523. unescape('_on_'),
  3524. smalltalk.method({
  3525. selector: unescape('on%3A'),
  3526. category: 'instance creation',
  3527. fn: function (aJSObject){
  3528. var self=this;
  3529. return (function($rec){smalltalk.send($rec, "_jsObject_", [aJSObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  3530. return self;},
  3531. args: ["aJSObject"],
  3532. source: unescape('on%3A%20aJSObject%0A%09%5Eself%20new%0A%09%09jsObject%3A%20aJSObject%3B%0A%09%09yourself'),
  3533. messageSends: ["jsObject:", "yourself", "new"],
  3534. referencedClasses: []
  3535. }),
  3536. smalltalk.JSObjectProxy.klass);