Kernel-Objects.deploy.js 126 KB

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