Kernel-Objects.deploy.js 107 KB

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