Kernel-Objects.deploy.js 130 KB

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