Kernel-Objects.deploy.js 108 KB

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