Kernel-Objects.deploy.js 127 KB

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