1
0

Kernel-Objects.deploy.js 117 KB

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