Kernel-Objects.deploy.js 126 KB

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