Kernel-Objects.deploy.js 107 KB

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