Kernel-Objects.deploy.js 133 KB

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