1
0

Kernel-Objects.deploy.js 104 KB

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