Kernel-Objects.deploy.js 132 KB

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