Kernel-Objects.deploy.js 130 KB

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