1
0

Kernel-Objects.deploy.js 131 KB

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