Kernel-Objects.deploy.js 89 KB

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