Kernel-Objects.deploy.js 126 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184
  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('Environment', smalltalk.Object, [], 'Kernel-Objects');
  1437. smalltalk.addMethod(
  1438. smalltalk.method({
  1439. selector: "addInstVarNamed:to:",
  1440. fn: function (aString,aClass){
  1441. var self=this;
  1442. return smalltalk.withContext(function($ctx1) {
  1443. var $1,$2;
  1444. $1=_st(_st(aClass)._instanceVariableNames())._copy();
  1445. _st($1)._add_(aString);
  1446. $2=_st($1)._yourself();
  1447. _st(self._classBuilder())._addSubclassOf_named_instanceVariableNames_package_(_st(aClass)._superclass(),_st(aClass)._name(),$2,_st(_st(aClass)._package())._name());
  1448. return self}, function($ctx1) {$ctx1.fill(self,"addInstVarNamed:to:",{aString:aString,aClass:aClass},smalltalk.Environment)})},
  1449. messageSends: ["addSubclassOf:named:instanceVariableNames:package:", "superclass", "name", "add:", "copy", "instanceVariableNames", "yourself", "package", "classBuilder"]}),
  1450. smalltalk.Environment);
  1451. smalltalk.addMethod(
  1452. smalltalk.method({
  1453. selector: "allSelectors",
  1454. fn: function (){
  1455. var self=this;
  1456. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1457. return smalltalk.withContext(function($ctx1) {
  1458. var $1;
  1459. $1=_st(_st(_st($Smalltalk())._current())._at_("allSelectors"))._value();
  1460. return $1;
  1461. }, function($ctx1) {$ctx1.fill(self,"allSelectors",{},smalltalk.Environment)})},
  1462. messageSends: ["value", "at:", "current"]}),
  1463. smalltalk.Environment);
  1464. smalltalk.addMethod(
  1465. smalltalk.method({
  1466. selector: "availableClassNames",
  1467. fn: function (){
  1468. var self=this;
  1469. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1470. return smalltalk.withContext(function($ctx1) {
  1471. var $1;
  1472. $1=_st(_st(_st($Smalltalk())._current())._classes())._collect_((function(each){
  1473. return smalltalk.withContext(function($ctx2) {
  1474. return _st(each)._name();
  1475. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  1476. return $1;
  1477. }, function($ctx1) {$ctx1.fill(self,"availableClassNames",{},smalltalk.Environment)})},
  1478. messageSends: ["collect:", "name", "classes", "current"]}),
  1479. smalltalk.Environment);
  1480. smalltalk.addMethod(
  1481. smalltalk.method({
  1482. selector: "availablePackageNames",
  1483. fn: function (){
  1484. var self=this;
  1485. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1486. return smalltalk.withContext(function($ctx1) {
  1487. var $1;
  1488. $1=_st(_st(_st($Smalltalk())._current())._packages())._collect_((function(each){
  1489. return smalltalk.withContext(function($ctx2) {
  1490. return _st(each)._name();
  1491. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  1492. return $1;
  1493. }, function($ctx1) {$ctx1.fill(self,"availablePackageNames",{},smalltalk.Environment)})},
  1494. messageSends: ["collect:", "name", "packages", "current"]}),
  1495. smalltalk.Environment);
  1496. smalltalk.addMethod(
  1497. smalltalk.method({
  1498. selector: "availableProtocolsFor:",
  1499. fn: function (aClass){
  1500. var self=this;
  1501. var protocols;
  1502. return smalltalk.withContext(function($ctx1) {
  1503. var $1,$2;
  1504. protocols=_st(aClass)._protocols();
  1505. $1=_st(aClass)._superclass();
  1506. if(($receiver = $1) == nil || $receiver == undefined){
  1507. $1;
  1508. } else {
  1509. _st(protocols)._addAll_(self._availableProtocolsFor_(_st(aClass)._superclass()));
  1510. };
  1511. $2=_st(_st(protocols)._asSet())._asArray();
  1512. return $2;
  1513. }, function($ctx1) {$ctx1.fill(self,"availableProtocolsFor:",{aClass:aClass,protocols:protocols},smalltalk.Environment)})},
  1514. messageSends: ["protocols", "ifNotNil:", "addAll:", "availableProtocolsFor:", "superclass", "asArray", "asSet"]}),
  1515. smalltalk.Environment);
  1516. smalltalk.addMethod(
  1517. smalltalk.method({
  1518. selector: "classBuilder",
  1519. fn: function (){
  1520. var self=this;
  1521. function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
  1522. return smalltalk.withContext(function($ctx1) {
  1523. var $1;
  1524. $1=_st($ClassBuilder())._new();
  1525. return $1;
  1526. }, function($ctx1) {$ctx1.fill(self,"classBuilder",{},smalltalk.Environment)})},
  1527. messageSends: ["new"]}),
  1528. smalltalk.Environment);
  1529. smalltalk.addMethod(
  1530. smalltalk.method({
  1531. selector: "classNamed:",
  1532. fn: function (aString){
  1533. var self=this;
  1534. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1535. return smalltalk.withContext(function($ctx1) {
  1536. var $2,$1;
  1537. $2=_st(_st($Smalltalk())._current())._at_(_st(aString)._asSymbol());
  1538. if(($receiver = $2) == nil || $receiver == undefined){
  1539. $1=self._error_("Invalid class name");
  1540. } else {
  1541. $1=$2;
  1542. };
  1543. return $1;
  1544. }, function($ctx1) {$ctx1.fill(self,"classNamed:",{aString:aString},smalltalk.Environment)})},
  1545. messageSends: ["ifNil:", "error:", "at:", "asSymbol", "current"]}),
  1546. smalltalk.Environment);
  1547. smalltalk.addMethod(
  1548. smalltalk.method({
  1549. selector: "classes",
  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($Smalltalk())._current())._classes();
  1556. return $1;
  1557. }, function($ctx1) {$ctx1.fill(self,"classes",{},smalltalk.Environment)})},
  1558. messageSends: ["classes", "current"]}),
  1559. smalltalk.Environment);
  1560. smalltalk.addMethod(
  1561. smalltalk.method({
  1562. selector: "commitPackage:",
  1563. fn: function (aPackage){
  1564. var self=this;
  1565. return smalltalk.withContext(function($ctx1) {
  1566. _st(aPackage)._commit();
  1567. return self}, function($ctx1) {$ctx1.fill(self,"commitPackage:",{aPackage:aPackage},smalltalk.Environment)})},
  1568. messageSends: ["commit"]}),
  1569. smalltalk.Environment);
  1570. smalltalk.addMethod(
  1571. smalltalk.method({
  1572. selector: "compileClassComment:for:",
  1573. fn: function (aString,aClass){
  1574. var self=this;
  1575. return smalltalk.withContext(function($ctx1) {
  1576. _st(aClass)._comment_(aString);
  1577. return self}, function($ctx1) {$ctx1.fill(self,"compileClassComment:for:",{aString:aString,aClass:aClass},smalltalk.Environment)})},
  1578. messageSends: ["comment:"]}),
  1579. smalltalk.Environment);
  1580. smalltalk.addMethod(
  1581. smalltalk.method({
  1582. selector: "compileClassDefinition:",
  1583. fn: function (aString){
  1584. var self=this;
  1585. function $DoIt(){return smalltalk.DoIt||(typeof DoIt=="undefined"?nil:DoIt)}
  1586. return smalltalk.withContext(function($ctx1) {
  1587. self._eval_on_(aString,_st($DoIt())._new());
  1588. return self}, function($ctx1) {$ctx1.fill(self,"compileClassDefinition:",{aString:aString},smalltalk.Environment)})},
  1589. messageSends: ["eval:on:", "new"]}),
  1590. smalltalk.Environment);
  1591. smalltalk.addMethod(
  1592. smalltalk.method({
  1593. selector: "compileMethod:for:protocol:",
  1594. fn: function (sourceCode,class_,protocol){
  1595. var self=this;
  1596. return smalltalk.withContext(function($ctx1) {
  1597. var $1;
  1598. $1=_st(class_)._compile_category_(sourceCode,protocol);
  1599. return $1;
  1600. }, function($ctx1) {$ctx1.fill(self,"compileMethod:for:protocol:",{sourceCode:sourceCode,class_:class_,protocol:protocol},smalltalk.Environment)})},
  1601. messageSends: ["compile:category:"]}),
  1602. smalltalk.Environment);
  1603. smalltalk.addMethod(
  1604. smalltalk.method({
  1605. selector: "copyClass:to:",
  1606. fn: function (aClass,aClassName){
  1607. var self=this;
  1608. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1609. function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
  1610. return smalltalk.withContext(function($ctx1) {
  1611. var $1;
  1612. $1=_st(_st($Smalltalk())._current())._at_(aClassName);
  1613. if(($receiver = $1) == nil || $receiver == undefined){
  1614. $1;
  1615. } else {
  1616. self._error_(_st("A class named ".__comma(aClassName)).__comma(" already exists"));
  1617. };
  1618. _st(_st($ClassBuilder())._new())._copyClass_named_(aClass,aClassName);
  1619. return self}, function($ctx1) {$ctx1.fill(self,"copyClass:to:",{aClass:aClass,aClassName:aClassName},smalltalk.Environment)})},
  1620. messageSends: ["ifNotNil:", "error:", ",", "at:", "current", "copyClass:named:", "new"]}),
  1621. smalltalk.Environment);
  1622. smalltalk.addMethod(
  1623. smalltalk.method({
  1624. selector: "eval:on:",
  1625. fn: function (aString,aReceiver){
  1626. var self=this;
  1627. var compiler;
  1628. function $Compiler(){return smalltalk.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}
  1629. function $Error(){return smalltalk.Error||(typeof Error=="undefined"?nil:Error)}
  1630. return smalltalk.withContext(function($ctx1) {
  1631. var $1,$2;
  1632. var $early={};
  1633. try {
  1634. compiler=_st($Compiler())._new();
  1635. _st((function(){
  1636. return smalltalk.withContext(function($ctx2) {
  1637. return _st(compiler)._parseExpression_(aString);
  1638. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._on_do_($Error(),(function(ex){
  1639. return smalltalk.withContext(function($ctx2) {
  1640. $1=_st(window)._alert_(_st(ex)._messageText());
  1641. throw $early=[$1];
  1642. }, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1)})}));
  1643. $2=_st(compiler)._evaluateExpression_on_(aString,aReceiver);
  1644. return $2;
  1645. }
  1646. catch(e) {if(e===$early)return e[0]; throw e}
  1647. }, function($ctx1) {$ctx1.fill(self,"eval:on:",{aString:aString,aReceiver:aReceiver,compiler:compiler},smalltalk.Environment)})},
  1648. messageSends: ["new", "on:do:", "alert:", "messageText", "parseExpression:", "evaluateExpression:on:"]}),
  1649. smalltalk.Environment);
  1650. smalltalk.addMethod(
  1651. smalltalk.method({
  1652. selector: "evaluate:on:do:",
  1653. fn: function (aBlock,anErrorClass,exceptionBlock){
  1654. var self=this;
  1655. return smalltalk.withContext(function($ctx1) {
  1656. var $1;
  1657. self._try_catch_(aBlock,(function(exception){
  1658. return smalltalk.withContext(function($ctx2) {
  1659. $1=_st(exception)._isKindOf_(self._classNamed_(_st(anErrorClass)._name()));
  1660. if(smalltalk.assert($1)){
  1661. return _st(exceptionBlock)._value_(exception);
  1662. } else {
  1663. return _st(exception)._signal();
  1664. };
  1665. }, function($ctx2) {$ctx2.fillBlock({exception:exception},$ctx1)})}));
  1666. return self}, function($ctx1) {$ctx1.fill(self,"evaluate:on:do:",{aBlock:aBlock,anErrorClass:anErrorClass,exceptionBlock:exceptionBlock},smalltalk.Environment)})},
  1667. messageSends: ["try:catch:", "ifTrue:ifFalse:", "value:", "signal", "isKindOf:", "classNamed:", "name"]}),
  1668. smalltalk.Environment);
  1669. smalltalk.addMethod(
  1670. smalltalk.method({
  1671. selector: "inspect:",
  1672. fn: function (anObject){
  1673. var self=this;
  1674. function $InspectorHandler(){return smalltalk.InspectorHandler||(typeof InspectorHandler=="undefined"?nil:InspectorHandler)}
  1675. return smalltalk.withContext(function($ctx1) {
  1676. _st(_st($InspectorHandler())._inspector())._inspect_(anObject);
  1677. return self}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},smalltalk.Environment)})},
  1678. messageSends: ["inspect:", "inspector"]}),
  1679. smalltalk.Environment);
  1680. smalltalk.addMethod(
  1681. smalltalk.method({
  1682. selector: "moveClass:toPackage:",
  1683. fn: function (aClass,aPackageName){
  1684. var self=this;
  1685. var package_;
  1686. function $Package(){return smalltalk.Package||(typeof Package=="undefined"?nil:Package)}
  1687. return smalltalk.withContext(function($ctx1) {
  1688. var $1,$2,$3;
  1689. package_=_st($Package())._named_(aPackageName);
  1690. $1=package_;
  1691. if(($receiver = $1) == nil || $receiver == undefined){
  1692. self._error_("Invalid package name");
  1693. } else {
  1694. $1;
  1695. };
  1696. $2=_st(package_).__eq_eq(_st(aClass)._package());
  1697. if(smalltalk.assert($2)){
  1698. $3=self;
  1699. return $3;
  1700. };
  1701. _st(aClass)._package_(package_);
  1702. return self}, function($ctx1) {$ctx1.fill(self,"moveClass:toPackage:",{aClass:aClass,aPackageName:aPackageName,package_:package_},smalltalk.Environment)})},
  1703. messageSends: ["named:", "ifNil:", "error:", "ifTrue:", "==", "package", "package:"]}),
  1704. smalltalk.Environment);
  1705. smalltalk.addMethod(
  1706. smalltalk.method({
  1707. selector: "moveMethod:toClass:",
  1708. fn: function (aMethod,aClassName){
  1709. var self=this;
  1710. var destinationClass;
  1711. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1712. return smalltalk.withContext(function($ctx1) {
  1713. var $1,$2,$3;
  1714. destinationClass=_st(_st($Smalltalk())._current())._at_(_st(aClassName)._asSymbol());
  1715. $1=destinationClass;
  1716. if(($receiver = $1) == nil || $receiver == undefined){
  1717. self._error_("Invalid class name");
  1718. } else {
  1719. $1;
  1720. };
  1721. $2=_st(destinationClass).__eq_eq(_st(aMethod)._methodClass());
  1722. if(smalltalk.assert($2)){
  1723. $3=self;
  1724. return $3;
  1725. };
  1726. _st(destinationClass)._compile_category_(_st(aMethod)._source(),_st(aMethod)._protocol());
  1727. _st(_st(aMethod)._methodClass())._removeCompiledMethod_(aMethod);
  1728. return self}, function($ctx1) {$ctx1.fill(self,"moveMethod:toClass:",{aMethod:aMethod,aClassName:aClassName,destinationClass:destinationClass},smalltalk.Environment)})},
  1729. messageSends: ["at:", "asSymbol", "current", "ifNil:", "error:", "ifTrue:", "==", "methodClass", "compile:category:", "source", "protocol", "removeCompiledMethod:"]}),
  1730. smalltalk.Environment);
  1731. smalltalk.addMethod(
  1732. smalltalk.method({
  1733. selector: "moveMethod:toProtocol:",
  1734. fn: function (aMethod,aProtocol){
  1735. var self=this;
  1736. return smalltalk.withContext(function($ctx1) {
  1737. _st(aMethod)._category_(aProtocol);
  1738. return self}, function($ctx1) {$ctx1.fill(self,"moveMethod:toProtocol:",{aMethod:aMethod,aProtocol:aProtocol},smalltalk.Environment)})},
  1739. messageSends: ["category:"]}),
  1740. smalltalk.Environment);
  1741. smalltalk.addMethod(
  1742. smalltalk.method({
  1743. selector: "packages",
  1744. fn: function (){
  1745. var self=this;
  1746. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1747. return smalltalk.withContext(function($ctx1) {
  1748. var $1;
  1749. $1=_st(_st($Smalltalk())._current())._packages();
  1750. return $1;
  1751. }, function($ctx1) {$ctx1.fill(self,"packages",{},smalltalk.Environment)})},
  1752. messageSends: ["packages", "current"]}),
  1753. smalltalk.Environment);
  1754. smalltalk.addMethod(
  1755. smalltalk.method({
  1756. selector: "registerErrorHandler:",
  1757. fn: function (anErrorHandler){
  1758. var self=this;
  1759. function $ErrorHandler(){return smalltalk.ErrorHandler||(typeof ErrorHandler=="undefined"?nil:ErrorHandler)}
  1760. return smalltalk.withContext(function($ctx1) {
  1761. _st($ErrorHandler())._setCurrent_(anErrorHandler);
  1762. return self}, function($ctx1) {$ctx1.fill(self,"registerErrorHandler:",{anErrorHandler:anErrorHandler},smalltalk.Environment)})},
  1763. messageSends: ["setCurrent:"]}),
  1764. smalltalk.Environment);
  1765. smalltalk.addMethod(
  1766. smalltalk.method({
  1767. selector: "registerInspector:",
  1768. fn: function (anInspector){
  1769. var self=this;
  1770. function $InspectorHandler(){return smalltalk.InspectorHandler||(typeof InspectorHandler=="undefined"?nil:InspectorHandler)}
  1771. return smalltalk.withContext(function($ctx1) {
  1772. _st($InspectorHandler())._register_(anInspector);
  1773. return self}, function($ctx1) {$ctx1.fill(self,"registerInspector:",{anInspector:anInspector},smalltalk.Environment)})},
  1774. messageSends: ["register:"]}),
  1775. smalltalk.Environment);
  1776. smalltalk.addMethod(
  1777. smalltalk.method({
  1778. selector: "registerProgressHandler:",
  1779. fn: function (aProgressHandler){
  1780. var self=this;
  1781. function $ProgressHandler(){return smalltalk.ProgressHandler||(typeof ProgressHandler=="undefined"?nil:ProgressHandler)}
  1782. return smalltalk.withContext(function($ctx1) {
  1783. _st($ProgressHandler())._setCurrent_(aProgressHandler);
  1784. return self}, function($ctx1) {$ctx1.fill(self,"registerProgressHandler:",{aProgressHandler:aProgressHandler},smalltalk.Environment)})},
  1785. messageSends: ["setCurrent:"]}),
  1786. smalltalk.Environment);
  1787. smalltalk.addMethod(
  1788. smalltalk.method({
  1789. selector: "removeClass:",
  1790. fn: function (aClass){
  1791. var self=this;
  1792. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1793. return smalltalk.withContext(function($ctx1) {
  1794. _st(_st($Smalltalk())._current())._removeClass_(aClass);
  1795. return self}, function($ctx1) {$ctx1.fill(self,"removeClass:",{aClass:aClass},smalltalk.Environment)})},
  1796. messageSends: ["removeClass:", "current"]}),
  1797. smalltalk.Environment);
  1798. smalltalk.addMethod(
  1799. smalltalk.method({
  1800. selector: "removeMethod:",
  1801. fn: function (aMethod){
  1802. var self=this;
  1803. return smalltalk.withContext(function($ctx1) {
  1804. _st(_st(aMethod)._methodClass())._removeCompiledMethod_(aMethod);
  1805. return self}, function($ctx1) {$ctx1.fill(self,"removeMethod:",{aMethod:aMethod},smalltalk.Environment)})},
  1806. messageSends: ["removeCompiledMethod:", "methodClass"]}),
  1807. smalltalk.Environment);
  1808. smalltalk.addMethod(
  1809. smalltalk.method({
  1810. selector: "removeProtocol:from:",
  1811. fn: function (aString,aClass){
  1812. var self=this;
  1813. return smalltalk.withContext(function($ctx1) {
  1814. _st(_st(_st(aClass)._methods())._select_((function(each){
  1815. return smalltalk.withContext(function($ctx2) {
  1816. return _st(_st(each)._protocol()).__eq(aString);
  1817. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._do_((function(each){
  1818. return smalltalk.withContext(function($ctx2) {
  1819. return _st(aClass)._removeCompiledMethod_(each);
  1820. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  1821. return self}, function($ctx1) {$ctx1.fill(self,"removeProtocol:from:",{aString:aString,aClass:aClass},smalltalk.Environment)})},
  1822. messageSends: ["do:", "removeCompiledMethod:", "select:", "=", "protocol", "methods"]}),
  1823. smalltalk.Environment);
  1824. smalltalk.addMethod(
  1825. smalltalk.method({
  1826. selector: "renameClass:to:",
  1827. fn: function (aClass,aClassName){
  1828. var self=this;
  1829. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1830. function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
  1831. return smalltalk.withContext(function($ctx1) {
  1832. var $1;
  1833. $1=_st(_st($Smalltalk())._current())._at_(aClassName);
  1834. if(($receiver = $1) == nil || $receiver == undefined){
  1835. $1;
  1836. } else {
  1837. self._error_(_st("A class named ".__comma(aClassName)).__comma(" already exists"));
  1838. };
  1839. _st(_st($ClassBuilder())._new())._renameClass_to_(aClass,aClassName);
  1840. return self}, function($ctx1) {$ctx1.fill(self,"renameClass:to:",{aClass:aClass,aClassName:aClassName},smalltalk.Environment)})},
  1841. messageSends: ["ifNotNil:", "error:", ",", "at:", "current", "renameClass:to:", "new"]}),
  1842. smalltalk.Environment);
  1843. smalltalk.addMethod(
  1844. smalltalk.method({
  1845. selector: "renameProtocol:to:in:",
  1846. fn: function (aString,anotherString,aClass){
  1847. var self=this;
  1848. return smalltalk.withContext(function($ctx1) {
  1849. _st(_st(_st(aClass)._methods())._select_((function(each){
  1850. return smalltalk.withContext(function($ctx2) {
  1851. return _st(_st(each)._protocol()).__eq(aString);
  1852. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._do_((function(each){
  1853. return smalltalk.withContext(function($ctx2) {
  1854. return _st(each)._protocol_(anotherString);
  1855. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  1856. return self}, function($ctx1) {$ctx1.fill(self,"renameProtocol:to:in:",{aString:aString,anotherString:anotherString,aClass:aClass},smalltalk.Environment)})},
  1857. messageSends: ["do:", "protocol:", "select:", "=", "protocol", "methods"]}),
  1858. smalltalk.Environment);
  1859. smalltalk.addMethod(
  1860. smalltalk.method({
  1861. selector: "setClassCommentOf:to:",
  1862. fn: function (aClass,aString){
  1863. var self=this;
  1864. return smalltalk.withContext(function($ctx1) {
  1865. _st(aClass)._comment_(aString);
  1866. return self}, function($ctx1) {$ctx1.fill(self,"setClassCommentOf:to:",{aClass:aClass,aString:aString},smalltalk.Environment)})},
  1867. messageSends: ["comment:"]}),
  1868. smalltalk.Environment);
  1869. smalltalk.addMethod(
  1870. smalltalk.method({
  1871. selector: "systemAnnouncer",
  1872. fn: function (){
  1873. var self=this;
  1874. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1875. return smalltalk.withContext(function($ctx1) {
  1876. var $1;
  1877. $1=_st(_st(_st($Smalltalk())._current())._at_("SystemAnnouncer"))._current();
  1878. return $1;
  1879. }, function($ctx1) {$ctx1.fill(self,"systemAnnouncer",{},smalltalk.Environment)})},
  1880. messageSends: ["current", "at:"]}),
  1881. smalltalk.Environment);
  1882. smalltalk.addClass('InspectorHandler', smalltalk.Object, [], 'Kernel-Objects');
  1883. smalltalk.InspectorHandler.klass.iVarNames = ['inspector'];
  1884. smalltalk.addMethod(
  1885. smalltalk.method({
  1886. selector: "inspect:",
  1887. fn: function (anObject){
  1888. var self=this;
  1889. return smalltalk.withContext(function($ctx1) {
  1890. var $1;
  1891. $1=_st(self._inspector())._inspect_(anObject);
  1892. return $1;
  1893. }, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},smalltalk.InspectorHandler.klass)})},
  1894. messageSends: ["inspect:", "inspector"]}),
  1895. smalltalk.InspectorHandler.klass);
  1896. smalltalk.addMethod(
  1897. smalltalk.method({
  1898. selector: "inspector",
  1899. fn: function (){
  1900. var self=this;
  1901. function $Transcript(){return smalltalk.Transcript||(typeof Transcript=="undefined"?nil:Transcript)}
  1902. return smalltalk.withContext(function($ctx1) {
  1903. var $2,$1;
  1904. $2=self["@inspector"];
  1905. if(($receiver = $2) == nil || $receiver == undefined){
  1906. self["@inspector"]=$Transcript();
  1907. $1=self["@inspector"];
  1908. } else {
  1909. $1=$2;
  1910. };
  1911. return $1;
  1912. }, function($ctx1) {$ctx1.fill(self,"inspector",{},smalltalk.InspectorHandler.klass)})},
  1913. messageSends: ["ifNil:"]}),
  1914. smalltalk.InspectorHandler.klass);
  1915. smalltalk.addMethod(
  1916. smalltalk.method({
  1917. selector: "register:",
  1918. fn: function (anInspector){
  1919. var self=this;
  1920. return smalltalk.withContext(function($ctx1) {
  1921. self["@inspector"]=anInspector;
  1922. return self}, function($ctx1) {$ctx1.fill(self,"register:",{anInspector:anInspector},smalltalk.InspectorHandler.klass)})},
  1923. messageSends: []}),
  1924. smalltalk.InspectorHandler.klass);
  1925. smalltalk.addClass('JSObjectProxy', smalltalk.Object, ['jsObject'], 'Kernel-Objects');
  1926. smalltalk.addMethod(
  1927. smalltalk.method({
  1928. selector: "addObjectVariablesTo:",
  1929. fn: function (aDictionary){
  1930. var self=this;
  1931. return smalltalk.withContext(function($ctx1) {
  1932. for(var i in self['@jsObject']) {
  1933. aDictionary._at_put_(i, self['@jsObject'][i]);
  1934. }
  1935. ;
  1936. return self}, function($ctx1) {$ctx1.fill(self,"addObjectVariablesTo:",{aDictionary:aDictionary},smalltalk.JSObjectProxy)})},
  1937. messageSends: []}),
  1938. smalltalk.JSObjectProxy);
  1939. smalltalk.addMethod(
  1940. smalltalk.method({
  1941. selector: "at:",
  1942. fn: function (aString){
  1943. var self=this;
  1944. return smalltalk.withContext(function($ctx1) {
  1945. return self['@jsObject'][aString];
  1946. return self}, function($ctx1) {$ctx1.fill(self,"at:",{aString:aString},smalltalk.JSObjectProxy)})},
  1947. messageSends: []}),
  1948. smalltalk.JSObjectProxy);
  1949. smalltalk.addMethod(
  1950. smalltalk.method({
  1951. selector: "at:ifAbsent:",
  1952. fn: function (aString,aBlock){
  1953. var self=this;
  1954. return smalltalk.withContext(function($ctx1) {
  1955. var obj = self['@jsObject'];
  1956. return aString in obj ? obj[aString] : aBlock._value();
  1957. ;
  1958. return self}, function($ctx1) {$ctx1.fill(self,"at:ifAbsent:",{aString:aString,aBlock:aBlock},smalltalk.JSObjectProxy)})},
  1959. messageSends: []}),
  1960. smalltalk.JSObjectProxy);
  1961. smalltalk.addMethod(
  1962. smalltalk.method({
  1963. selector: "at:ifPresent:",
  1964. fn: function (aString,aBlock){
  1965. var self=this;
  1966. return smalltalk.withContext(function($ctx1) {
  1967. var obj = self['@jsObject'];
  1968. return aString in obj ? aBlock._value_(obj[aString]) : nil;
  1969. ;
  1970. return self}, function($ctx1) {$ctx1.fill(self,"at:ifPresent:",{aString:aString,aBlock:aBlock},smalltalk.JSObjectProxy)})},
  1971. messageSends: []}),
  1972. smalltalk.JSObjectProxy);
  1973. smalltalk.addMethod(
  1974. smalltalk.method({
  1975. selector: "at:ifPresent:ifAbsent:",
  1976. fn: function (aString,aBlock,anotherBlock){
  1977. var self=this;
  1978. return smalltalk.withContext(function($ctx1) {
  1979. var obj = self['@jsObject'];
  1980. return aString in obj ? aBlock._value_(obj[aString]) : anotherBlock._value();
  1981. ;
  1982. return self}, function($ctx1) {$ctx1.fill(self,"at:ifPresent:ifAbsent:",{aString:aString,aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.JSObjectProxy)})},
  1983. messageSends: []}),
  1984. smalltalk.JSObjectProxy);
  1985. smalltalk.addMethod(
  1986. smalltalk.method({
  1987. selector: "at:put:",
  1988. fn: function (aString,anObject){
  1989. var self=this;
  1990. return smalltalk.withContext(function($ctx1) {
  1991. self['@jsObject'][aString] = anObject;
  1992. return self}, function($ctx1) {$ctx1.fill(self,"at:put:",{aString:aString,anObject:anObject},smalltalk.JSObjectProxy)})},
  1993. messageSends: []}),
  1994. smalltalk.JSObjectProxy);
  1995. smalltalk.addMethod(
  1996. smalltalk.method({
  1997. selector: "doesNotUnderstand:",
  1998. fn: function (aMessage){
  1999. var self=this;
  2000. return smalltalk.withContext(function($ctx1) {
  2001. var $2,$1;
  2002. $2=self._lookupProperty_(_st(_st(aMessage)._selector())._asJavaScriptSelector());
  2003. if(($receiver = $2) == nil || $receiver == undefined){
  2004. $1=smalltalk.Object.fn.prototype._doesNotUnderstand_.apply(_st(self), [aMessage]);
  2005. } else {
  2006. var jsSelector;
  2007. jsSelector=$receiver;
  2008. $1=self._forwardMessage_withArguments_(jsSelector,_st(aMessage)._arguments());
  2009. };
  2010. return $1;
  2011. }, function($ctx1) {$ctx1.fill(self,"doesNotUnderstand:",{aMessage:aMessage},smalltalk.JSObjectProxy)})},
  2012. messageSends: ["ifNil:ifNotNil:", "doesNotUnderstand:", "forwardMessage:withArguments:", "arguments", "lookupProperty:", "asJavaScriptSelector", "selector"]}),
  2013. smalltalk.JSObjectProxy);
  2014. smalltalk.addMethod(
  2015. smalltalk.method({
  2016. selector: "forwardMessage:withArguments:",
  2017. fn: function (aString,anArray){
  2018. var self=this;
  2019. return smalltalk.withContext(function($ctx1) {
  2020. return smalltalk.send(self._jsObject(), aString, anArray);
  2021. ;
  2022. return self}, function($ctx1) {$ctx1.fill(self,"forwardMessage:withArguments:",{aString:aString,anArray:anArray},smalltalk.JSObjectProxy)})},
  2023. messageSends: []}),
  2024. smalltalk.JSObjectProxy);
  2025. smalltalk.addMethod(
  2026. smalltalk.method({
  2027. selector: "inspectOn:",
  2028. fn: function (anInspector){
  2029. var self=this;
  2030. var variables;
  2031. function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  2032. return smalltalk.withContext(function($ctx1) {
  2033. variables=_st($Dictionary())._new();
  2034. _st(variables)._at_put_("#self",self._jsObject());
  2035. _st(anInspector)._setLabel_(self._printString());
  2036. self._addObjectVariablesTo_(variables);
  2037. _st(anInspector)._setVariables_(variables);
  2038. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},smalltalk.JSObjectProxy)})},
  2039. messageSends: ["new", "at:put:", "jsObject", "setLabel:", "printString", "addObjectVariablesTo:", "setVariables:"]}),
  2040. smalltalk.JSObjectProxy);
  2041. smalltalk.addMethod(
  2042. smalltalk.method({
  2043. selector: "jsObject",
  2044. fn: function (){
  2045. var self=this;
  2046. return smalltalk.withContext(function($ctx1) {
  2047. var $1;
  2048. $1=self["@jsObject"];
  2049. return $1;
  2050. }, function($ctx1) {$ctx1.fill(self,"jsObject",{},smalltalk.JSObjectProxy)})},
  2051. messageSends: []}),
  2052. smalltalk.JSObjectProxy);
  2053. smalltalk.addMethod(
  2054. smalltalk.method({
  2055. selector: "jsObject:",
  2056. fn: function (aJSObject){
  2057. var self=this;
  2058. return smalltalk.withContext(function($ctx1) {
  2059. self["@jsObject"]=aJSObject;
  2060. return self}, function($ctx1) {$ctx1.fill(self,"jsObject:",{aJSObject:aJSObject},smalltalk.JSObjectProxy)})},
  2061. messageSends: []}),
  2062. smalltalk.JSObjectProxy);
  2063. smalltalk.addMethod(
  2064. smalltalk.method({
  2065. selector: "keysAndValuesDo:",
  2066. fn: function (aBlock){
  2067. var self=this;
  2068. return smalltalk.withContext(function($ctx1) {
  2069. var o = self['@jsObject'];
  2070. for(var i in o) {
  2071. aBlock._value_value_(i, o[i]);
  2072. }
  2073. ;
  2074. return self}, function($ctx1) {$ctx1.fill(self,"keysAndValuesDo:",{aBlock:aBlock},smalltalk.JSObjectProxy)})},
  2075. messageSends: []}),
  2076. smalltalk.JSObjectProxy);
  2077. smalltalk.addMethod(
  2078. smalltalk.method({
  2079. selector: "lookupProperty:",
  2080. fn: function (aString){
  2081. var self=this;
  2082. return smalltalk.withContext(function($ctx1) {
  2083. return aString in self._jsObject() ? aString : nil;
  2084. return self}, function($ctx1) {$ctx1.fill(self,"lookupProperty:",{aString:aString},smalltalk.JSObjectProxy)})},
  2085. messageSends: []}),
  2086. smalltalk.JSObjectProxy);
  2087. smalltalk.addMethod(
  2088. smalltalk.method({
  2089. selector: "printOn:",
  2090. fn: function (aStream){
  2091. var self=this;
  2092. return smalltalk.withContext(function($ctx1) {
  2093. _st(aStream)._nextPutAll_(_st(self._jsObject())._toString());
  2094. return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.JSObjectProxy)})},
  2095. messageSends: ["nextPutAll:", "toString", "jsObject"]}),
  2096. smalltalk.JSObjectProxy);
  2097. smalltalk.addMethod(
  2098. smalltalk.method({
  2099. selector: "value",
  2100. fn: function (){
  2101. var self=this;
  2102. return smalltalk.withContext(function($ctx1) {
  2103. var $1;
  2104. $1=self._at_ifAbsent_("value",(function(){
  2105. return smalltalk.withContext(function($ctx2) {
  2106. return smalltalk.Object.fn.prototype._value.apply(_st(self), []);
  2107. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2108. return $1;
  2109. }, function($ctx1) {$ctx1.fill(self,"value",{},smalltalk.JSObjectProxy)})},
  2110. messageSends: ["at:ifAbsent:", "value"]}),
  2111. smalltalk.JSObjectProxy);
  2112. smalltalk.addMethod(
  2113. smalltalk.method({
  2114. selector: "on:",
  2115. fn: function (aJSObject){
  2116. var self=this;
  2117. return smalltalk.withContext(function($ctx1) {
  2118. var $2,$3,$1;
  2119. $2=self._new();
  2120. _st($2)._jsObject_(aJSObject);
  2121. $3=_st($2)._yourself();
  2122. $1=$3;
  2123. return $1;
  2124. }, function($ctx1) {$ctx1.fill(self,"on:",{aJSObject:aJSObject},smalltalk.JSObjectProxy.klass)})},
  2125. messageSends: ["jsObject:", "new", "yourself"]}),
  2126. smalltalk.JSObjectProxy.klass);
  2127. smalltalk.addClass('Number', smalltalk.Object, [], 'Kernel-Objects');
  2128. smalltalk.addMethod(
  2129. smalltalk.method({
  2130. selector: "&",
  2131. fn: function (aNumber){
  2132. var self=this;
  2133. return smalltalk.withContext(function($ctx1) {
  2134. return self & aNumber;
  2135. return self}, function($ctx1) {$ctx1.fill(self,"&",{aNumber:aNumber},smalltalk.Number)})},
  2136. messageSends: []}),
  2137. smalltalk.Number);
  2138. smalltalk.addMethod(
  2139. smalltalk.method({
  2140. selector: "*",
  2141. fn: function (aNumber){
  2142. var self=this;
  2143. return smalltalk.withContext(function($ctx1) {
  2144. return self * aNumber;
  2145. return self}, function($ctx1) {$ctx1.fill(self,"*",{aNumber:aNumber},smalltalk.Number)})},
  2146. messageSends: []}),
  2147. smalltalk.Number);
  2148. smalltalk.addMethod(
  2149. smalltalk.method({
  2150. selector: "+",
  2151. fn: function (aNumber){
  2152. var self=this;
  2153. return smalltalk.withContext(function($ctx1) {
  2154. return self + aNumber;
  2155. return self}, function($ctx1) {$ctx1.fill(self,"+",{aNumber:aNumber},smalltalk.Number)})},
  2156. messageSends: []}),
  2157. smalltalk.Number);
  2158. smalltalk.addMethod(
  2159. smalltalk.method({
  2160. selector: "-",
  2161. fn: function (aNumber){
  2162. var self=this;
  2163. return smalltalk.withContext(function($ctx1) {
  2164. return self - aNumber;
  2165. return self}, function($ctx1) {$ctx1.fill(self,"-",{aNumber:aNumber},smalltalk.Number)})},
  2166. messageSends: []}),
  2167. smalltalk.Number);
  2168. smalltalk.addMethod(
  2169. smalltalk.method({
  2170. selector: "/",
  2171. fn: function (aNumber){
  2172. var self=this;
  2173. return smalltalk.withContext(function($ctx1) {
  2174. return self / aNumber;
  2175. return self}, function($ctx1) {$ctx1.fill(self,"/",{aNumber:aNumber},smalltalk.Number)})},
  2176. messageSends: []}),
  2177. smalltalk.Number);
  2178. smalltalk.addMethod(
  2179. smalltalk.method({
  2180. selector: "<",
  2181. fn: function (aNumber){
  2182. var self=this;
  2183. return smalltalk.withContext(function($ctx1) {
  2184. return self < aNumber;
  2185. return self}, function($ctx1) {$ctx1.fill(self,"<",{aNumber:aNumber},smalltalk.Number)})},
  2186. messageSends: []}),
  2187. smalltalk.Number);
  2188. smalltalk.addMethod(
  2189. smalltalk.method({
  2190. selector: "<=",
  2191. fn: function (aNumber){
  2192. var self=this;
  2193. return smalltalk.withContext(function($ctx1) {
  2194. return self <= aNumber;
  2195. return self}, function($ctx1) {$ctx1.fill(self,"<=",{aNumber:aNumber},smalltalk.Number)})},
  2196. messageSends: []}),
  2197. smalltalk.Number);
  2198. smalltalk.addMethod(
  2199. smalltalk.method({
  2200. selector: "=",
  2201. fn: function (aNumber){
  2202. var self=this;
  2203. return smalltalk.withContext(function($ctx1) {
  2204. if(! aNumber._isNumber || ! aNumber._isNumber()) {
  2205. return false;
  2206. }
  2207. return Number(self) == aNumber
  2208. ;
  2209. return self}, function($ctx1) {$ctx1.fill(self,"=",{aNumber:aNumber},smalltalk.Number)})},
  2210. messageSends: []}),
  2211. smalltalk.Number);
  2212. smalltalk.addMethod(
  2213. smalltalk.method({
  2214. selector: ">",
  2215. fn: function (aNumber){
  2216. var self=this;
  2217. return smalltalk.withContext(function($ctx1) {
  2218. return self > aNumber;
  2219. return self}, function($ctx1) {$ctx1.fill(self,">",{aNumber:aNumber},smalltalk.Number)})},
  2220. messageSends: []}),
  2221. smalltalk.Number);
  2222. smalltalk.addMethod(
  2223. smalltalk.method({
  2224. selector: ">=",
  2225. fn: function (aNumber){
  2226. var self=this;
  2227. return smalltalk.withContext(function($ctx1) {
  2228. return self >= aNumber;
  2229. return self}, function($ctx1) {$ctx1.fill(self,">=",{aNumber:aNumber},smalltalk.Number)})},
  2230. messageSends: []}),
  2231. smalltalk.Number);
  2232. smalltalk.addMethod(
  2233. smalltalk.method({
  2234. selector: "@",
  2235. fn: function (aNumber){
  2236. var self=this;
  2237. function $Point(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}
  2238. return smalltalk.withContext(function($ctx1) {
  2239. var $1;
  2240. $1=_st($Point())._x_y_(self,aNumber);
  2241. return $1;
  2242. }, function($ctx1) {$ctx1.fill(self,"@",{aNumber:aNumber},smalltalk.Number)})},
  2243. messageSends: ["x:y:"]}),
  2244. smalltalk.Number);
  2245. smalltalk.addMethod(
  2246. smalltalk.method({
  2247. selector: "\x5c\x5c",
  2248. fn: function (aNumber){
  2249. var self=this;
  2250. return smalltalk.withContext(function($ctx1) {
  2251. return self % aNumber;
  2252. return self}, function($ctx1) {$ctx1.fill(self,"\x5c\x5c",{aNumber:aNumber},smalltalk.Number)})},
  2253. messageSends: []}),
  2254. smalltalk.Number);
  2255. smalltalk.addMethod(
  2256. smalltalk.method({
  2257. selector: "abs",
  2258. fn: function (){
  2259. var self=this;
  2260. return smalltalk.withContext(function($ctx1) {
  2261. return Math.abs(self);;
  2262. return self}, function($ctx1) {$ctx1.fill(self,"abs",{},smalltalk.Number)})},
  2263. messageSends: []}),
  2264. smalltalk.Number);
  2265. smalltalk.addMethod(
  2266. smalltalk.method({
  2267. selector: "asJSON",
  2268. fn: function (){
  2269. var self=this;
  2270. return smalltalk.withContext(function($ctx1) {
  2271. var $1;
  2272. $1=self;
  2273. return $1;
  2274. }, function($ctx1) {$ctx1.fill(self,"asJSON",{},smalltalk.Number)})},
  2275. messageSends: []}),
  2276. smalltalk.Number);
  2277. smalltalk.addMethod(
  2278. smalltalk.method({
  2279. selector: "asJavascript",
  2280. fn: function (){
  2281. var self=this;
  2282. return smalltalk.withContext(function($ctx1) {
  2283. var $1;
  2284. $1=_st("(".__comma(self._printString())).__comma(")");
  2285. return $1;
  2286. }, function($ctx1) {$ctx1.fill(self,"asJavascript",{},smalltalk.Number)})},
  2287. messageSends: [",", "printString"]}),
  2288. smalltalk.Number);
  2289. smalltalk.addMethod(
  2290. smalltalk.method({
  2291. selector: "asPoint",
  2292. fn: function (){
  2293. var self=this;
  2294. function $Point(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}
  2295. return smalltalk.withContext(function($ctx1) {
  2296. var $1;
  2297. $1=_st($Point())._x_y_(self,self);
  2298. return $1;
  2299. }, function($ctx1) {$ctx1.fill(self,"asPoint",{},smalltalk.Number)})},
  2300. messageSends: ["x:y:"]}),
  2301. smalltalk.Number);
  2302. smalltalk.addMethod(
  2303. smalltalk.method({
  2304. selector: "asString",
  2305. fn: function (){
  2306. var self=this;
  2307. return smalltalk.withContext(function($ctx1) {
  2308. return String(self) ;
  2309. return self}, function($ctx1) {$ctx1.fill(self,"asString",{},smalltalk.Number)})},
  2310. messageSends: []}),
  2311. smalltalk.Number);
  2312. smalltalk.addMethod(
  2313. smalltalk.method({
  2314. selector: "atRandom",
  2315. fn: function (){
  2316. var self=this;
  2317. function $Random(){return smalltalk.Random||(typeof Random=="undefined"?nil:Random)}
  2318. return smalltalk.withContext(function($ctx1) {
  2319. var $1;
  2320. $1=_st(_st(_st(_st(_st($Random())._new())._next()).__star(self))._truncated()).__plus((1));
  2321. return $1;
  2322. }, function($ctx1) {$ctx1.fill(self,"atRandom",{},smalltalk.Number)})},
  2323. messageSends: ["+", "truncated", "*", "next", "new"]}),
  2324. smalltalk.Number);
  2325. smalltalk.addMethod(
  2326. smalltalk.method({
  2327. selector: "copy",
  2328. fn: function (){
  2329. var self=this;
  2330. return smalltalk.withContext(function($ctx1) {
  2331. var $1;
  2332. $1=self;
  2333. return $1;
  2334. }, function($ctx1) {$ctx1.fill(self,"copy",{},smalltalk.Number)})},
  2335. messageSends: []}),
  2336. smalltalk.Number);
  2337. smalltalk.addMethod(
  2338. smalltalk.method({
  2339. selector: "deepCopy",
  2340. fn: function (){
  2341. var self=this;
  2342. return smalltalk.withContext(function($ctx1) {
  2343. var $1;
  2344. $1=self._copy();
  2345. return $1;
  2346. }, function($ctx1) {$ctx1.fill(self,"deepCopy",{},smalltalk.Number)})},
  2347. messageSends: ["copy"]}),
  2348. smalltalk.Number);
  2349. smalltalk.addMethod(
  2350. smalltalk.method({
  2351. selector: "even",
  2352. fn: function (){
  2353. var self=this;
  2354. return smalltalk.withContext(function($ctx1) {
  2355. var $1;
  2356. $1=(0).__eq(self.__backslash_backslash((2)));
  2357. return $1;
  2358. }, function($ctx1) {$ctx1.fill(self,"even",{},smalltalk.Number)})},
  2359. messageSends: ["=", "\x5c\x5c"]}),
  2360. smalltalk.Number);
  2361. smalltalk.addMethod(
  2362. smalltalk.method({
  2363. selector: "identityHash",
  2364. fn: function (){
  2365. var self=this;
  2366. return smalltalk.withContext(function($ctx1) {
  2367. var $1;
  2368. $1=_st(self._asString()).__comma("n");
  2369. return $1;
  2370. }, function($ctx1) {$ctx1.fill(self,"identityHash",{},smalltalk.Number)})},
  2371. messageSends: [",", "asString"]}),
  2372. smalltalk.Number);
  2373. smalltalk.addMethod(
  2374. smalltalk.method({
  2375. selector: "isImmutable",
  2376. fn: function (){
  2377. var self=this;
  2378. return smalltalk.withContext(function($ctx1) {
  2379. return true;
  2380. }, function($ctx1) {$ctx1.fill(self,"isImmutable",{},smalltalk.Number)})},
  2381. messageSends: []}),
  2382. smalltalk.Number);
  2383. smalltalk.addMethod(
  2384. smalltalk.method({
  2385. selector: "isNumber",
  2386. fn: function (){
  2387. var self=this;
  2388. return smalltalk.withContext(function($ctx1) {
  2389. return true;
  2390. }, function($ctx1) {$ctx1.fill(self,"isNumber",{},smalltalk.Number)})},
  2391. messageSends: []}),
  2392. smalltalk.Number);
  2393. smalltalk.addMethod(
  2394. smalltalk.method({
  2395. selector: "isZero",
  2396. fn: function (){
  2397. var self=this;
  2398. return smalltalk.withContext(function($ctx1) {
  2399. var $1;
  2400. $1=self.__eq((0));
  2401. return $1;
  2402. }, function($ctx1) {$ctx1.fill(self,"isZero",{},smalltalk.Number)})},
  2403. messageSends: ["="]}),
  2404. smalltalk.Number);
  2405. smalltalk.addMethod(
  2406. smalltalk.method({
  2407. selector: "max:",
  2408. fn: function (aNumber){
  2409. var self=this;
  2410. return smalltalk.withContext(function($ctx1) {
  2411. return Math.max(self, aNumber);;
  2412. return self}, function($ctx1) {$ctx1.fill(self,"max:",{aNumber:aNumber},smalltalk.Number)})},
  2413. messageSends: []}),
  2414. smalltalk.Number);
  2415. smalltalk.addMethod(
  2416. smalltalk.method({
  2417. selector: "min:",
  2418. fn: function (aNumber){
  2419. var self=this;
  2420. return smalltalk.withContext(function($ctx1) {
  2421. return Math.min(self, aNumber);;
  2422. return self}, function($ctx1) {$ctx1.fill(self,"min:",{aNumber:aNumber},smalltalk.Number)})},
  2423. messageSends: []}),
  2424. smalltalk.Number);
  2425. smalltalk.addMethod(
  2426. smalltalk.method({
  2427. selector: "negated",
  2428. fn: function (){
  2429. var self=this;
  2430. return smalltalk.withContext(function($ctx1) {
  2431. var $1;
  2432. $1=(0).__minus(self);
  2433. return $1;
  2434. }, function($ctx1) {$ctx1.fill(self,"negated",{},smalltalk.Number)})},
  2435. messageSends: ["-"]}),
  2436. smalltalk.Number);
  2437. smalltalk.addMethod(
  2438. smalltalk.method({
  2439. selector: "negative",
  2440. fn: function (){
  2441. var self=this;
  2442. return smalltalk.withContext(function($ctx1) {
  2443. var $1;
  2444. $1=self.__lt((0));
  2445. return $1;
  2446. }, function($ctx1) {$ctx1.fill(self,"negative",{},smalltalk.Number)})},
  2447. messageSends: ["<"]}),
  2448. smalltalk.Number);
  2449. smalltalk.addMethod(
  2450. smalltalk.method({
  2451. selector: "odd",
  2452. fn: function (){
  2453. var self=this;
  2454. return smalltalk.withContext(function($ctx1) {
  2455. var $1;
  2456. $1=_st(self._even())._not();
  2457. return $1;
  2458. }, function($ctx1) {$ctx1.fill(self,"odd",{},smalltalk.Number)})},
  2459. messageSends: ["not", "even"]}),
  2460. smalltalk.Number);
  2461. smalltalk.addMethod(
  2462. smalltalk.method({
  2463. selector: "positive",
  2464. fn: function (){
  2465. var self=this;
  2466. return smalltalk.withContext(function($ctx1) {
  2467. var $1;
  2468. $1=self.__gt_eq((0));
  2469. return $1;
  2470. }, function($ctx1) {$ctx1.fill(self,"positive",{},smalltalk.Number)})},
  2471. messageSends: [">="]}),
  2472. smalltalk.Number);
  2473. smalltalk.addMethod(
  2474. smalltalk.method({
  2475. selector: "printOn:",
  2476. fn: function (aStream){
  2477. var self=this;
  2478. return smalltalk.withContext(function($ctx1) {
  2479. _st(aStream)._nextPutAll_(self._asString());
  2480. return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.Number)})},
  2481. messageSends: ["nextPutAll:", "asString"]}),
  2482. smalltalk.Number);
  2483. smalltalk.addMethod(
  2484. smalltalk.method({
  2485. selector: "printShowingDecimalPlaces:",
  2486. fn: function (placesDesired){
  2487. var self=this;
  2488. return smalltalk.withContext(function($ctx1) {
  2489. return self.toFixed(placesDesired);
  2490. return self}, function($ctx1) {$ctx1.fill(self,"printShowingDecimalPlaces:",{placesDesired:placesDesired},smalltalk.Number)})},
  2491. messageSends: []}),
  2492. smalltalk.Number);
  2493. smalltalk.addMethod(
  2494. smalltalk.method({
  2495. selector: "rounded",
  2496. fn: function (){
  2497. var self=this;
  2498. return smalltalk.withContext(function($ctx1) {
  2499. return Math.round(self);;
  2500. return self}, function($ctx1) {$ctx1.fill(self,"rounded",{},smalltalk.Number)})},
  2501. messageSends: []}),
  2502. smalltalk.Number);
  2503. smalltalk.addMethod(
  2504. smalltalk.method({
  2505. selector: "sqrt",
  2506. fn: function (){
  2507. var self=this;
  2508. return smalltalk.withContext(function($ctx1) {
  2509. return Math.sqrt(self);
  2510. return self}, function($ctx1) {$ctx1.fill(self,"sqrt",{},smalltalk.Number)})},
  2511. messageSends: []}),
  2512. smalltalk.Number);
  2513. smalltalk.addMethod(
  2514. smalltalk.method({
  2515. selector: "squared",
  2516. fn: function (){
  2517. var self=this;
  2518. return smalltalk.withContext(function($ctx1) {
  2519. var $1;
  2520. $1=self.__star(self);
  2521. return $1;
  2522. }, function($ctx1) {$ctx1.fill(self,"squared",{},smalltalk.Number)})},
  2523. messageSends: ["*"]}),
  2524. smalltalk.Number);
  2525. smalltalk.addMethod(
  2526. smalltalk.method({
  2527. selector: "timesRepeat:",
  2528. fn: function (aBlock){
  2529. var self=this;
  2530. var count;
  2531. return smalltalk.withContext(function($ctx1) {
  2532. count=(1);
  2533. _st((function(){
  2534. return smalltalk.withContext(function($ctx2) {
  2535. return _st(count).__gt(self);
  2536. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileFalse_((function(){
  2537. return smalltalk.withContext(function($ctx2) {
  2538. _st(aBlock)._value();
  2539. count=_st(count).__plus((1));
  2540. return count;
  2541. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2542. return self}, function($ctx1) {$ctx1.fill(self,"timesRepeat:",{aBlock:aBlock,count:count},smalltalk.Number)})},
  2543. messageSends: ["whileFalse:", "value", "+", ">"]}),
  2544. smalltalk.Number);
  2545. smalltalk.addMethod(
  2546. smalltalk.method({
  2547. selector: "to:",
  2548. fn: function (aNumber){
  2549. var self=this;
  2550. var array,first,last,count;
  2551. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  2552. return smalltalk.withContext(function($ctx1) {
  2553. var $1;
  2554. first=self._truncated();
  2555. last=_st(_st(aNumber)._truncated()).__plus((1));
  2556. count=(1);
  2557. array=_st($Array())._new();
  2558. _st(_st(last).__minus(first))._timesRepeat_((function(){
  2559. return smalltalk.withContext(function($ctx2) {
  2560. _st(array)._at_put_(count,first);
  2561. count=_st(count).__plus((1));
  2562. count;
  2563. first=_st(first).__plus((1));
  2564. return first;
  2565. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2566. $1=array;
  2567. return $1;
  2568. }, function($ctx1) {$ctx1.fill(self,"to:",{aNumber:aNumber,array:array,first:first,last:last,count:count},smalltalk.Number)})},
  2569. messageSends: ["truncated", "+", "new", "timesRepeat:", "at:put:", "-"]}),
  2570. smalltalk.Number);
  2571. smalltalk.addMethod(
  2572. smalltalk.method({
  2573. selector: "to:by:",
  2574. fn: function (stop,step){
  2575. var self=this;
  2576. var array,value,pos;
  2577. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  2578. return smalltalk.withContext(function($ctx1) {
  2579. var $1,$2,$3;
  2580. value=self;
  2581. array=_st($Array())._new();
  2582. pos=(1);
  2583. $1=_st(step).__eq((0));
  2584. if(smalltalk.assert($1)){
  2585. self._error_("step must be non-zero");
  2586. };
  2587. $2=_st(step).__lt((0));
  2588. if(smalltalk.assert($2)){
  2589. _st((function(){
  2590. return smalltalk.withContext(function($ctx2) {
  2591. return _st(value).__gt_eq(stop);
  2592. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileTrue_((function(){
  2593. return smalltalk.withContext(function($ctx2) {
  2594. _st(array)._at_put_(pos,value);
  2595. pos=_st(pos).__plus((1));
  2596. pos;
  2597. value=_st(value).__plus(step);
  2598. return value;
  2599. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2600. } else {
  2601. _st((function(){
  2602. return smalltalk.withContext(function($ctx2) {
  2603. return _st(value).__lt_eq(stop);
  2604. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileTrue_((function(){
  2605. return smalltalk.withContext(function($ctx2) {
  2606. _st(array)._at_put_(pos,value);
  2607. pos=_st(pos).__plus((1));
  2608. pos;
  2609. value=_st(value).__plus(step);
  2610. return value;
  2611. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2612. };
  2613. $3=array;
  2614. return $3;
  2615. }, function($ctx1) {$ctx1.fill(self,"to:by:",{stop:stop,step:step,array:array,value:value,pos:pos},smalltalk.Number)})},
  2616. messageSends: ["new", "ifTrue:", "error:", "=", "ifTrue:ifFalse:", "whileTrue:", "at:put:", "+", ">=", "<=", "<"]}),
  2617. smalltalk.Number);
  2618. smalltalk.addMethod(
  2619. smalltalk.method({
  2620. selector: "to:by:do:",
  2621. fn: function (stop,step,aBlock){
  2622. var self=this;
  2623. var value;
  2624. return smalltalk.withContext(function($ctx1) {
  2625. var $1,$2;
  2626. value=self;
  2627. $1=_st(step).__eq((0));
  2628. if(smalltalk.assert($1)){
  2629. self._error_("step must be non-zero");
  2630. };
  2631. $2=_st(step).__lt((0));
  2632. if(smalltalk.assert($2)){
  2633. _st((function(){
  2634. return smalltalk.withContext(function($ctx2) {
  2635. return _st(value).__gt_eq(stop);
  2636. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileTrue_((function(){
  2637. return smalltalk.withContext(function($ctx2) {
  2638. _st(aBlock)._value_(value);
  2639. value=_st(value).__plus(step);
  2640. return value;
  2641. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2642. } else {
  2643. _st((function(){
  2644. return smalltalk.withContext(function($ctx2) {
  2645. return _st(value).__lt_eq(stop);
  2646. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileTrue_((function(){
  2647. return smalltalk.withContext(function($ctx2) {
  2648. _st(aBlock)._value_(value);
  2649. value=_st(value).__plus(step);
  2650. return value;
  2651. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2652. };
  2653. return self}, function($ctx1) {$ctx1.fill(self,"to:by:do:",{stop:stop,step:step,aBlock:aBlock,value:value},smalltalk.Number)})},
  2654. messageSends: ["ifTrue:", "error:", "=", "ifTrue:ifFalse:", "whileTrue:", "value:", "+", ">=", "<=", "<"]}),
  2655. smalltalk.Number);
  2656. smalltalk.addMethod(
  2657. smalltalk.method({
  2658. selector: "to:do:",
  2659. fn: function (stop,aBlock){
  2660. var self=this;
  2661. var nextValue;
  2662. return smalltalk.withContext(function($ctx1) {
  2663. nextValue=self;
  2664. _st((function(){
  2665. return smalltalk.withContext(function($ctx2) {
  2666. return _st(nextValue).__lt_eq(stop);
  2667. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileTrue_((function(){
  2668. return smalltalk.withContext(function($ctx2) {
  2669. _st(aBlock)._value_(nextValue);
  2670. nextValue=_st(nextValue).__plus((1));
  2671. return nextValue;
  2672. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2673. return self}, function($ctx1) {$ctx1.fill(self,"to:do:",{stop:stop,aBlock:aBlock,nextValue:nextValue},smalltalk.Number)})},
  2674. messageSends: ["whileTrue:", "value:", "+", "<="]}),
  2675. smalltalk.Number);
  2676. smalltalk.addMethod(
  2677. smalltalk.method({
  2678. selector: "truncated",
  2679. fn: function (){
  2680. var self=this;
  2681. return smalltalk.withContext(function($ctx1) {
  2682. if(self >= 0) {
  2683. return Math.floor(self);
  2684. } else {
  2685. return Math.floor(self * (-1)) * (-1);
  2686. };
  2687. ;
  2688. return self}, function($ctx1) {$ctx1.fill(self,"truncated",{},smalltalk.Number)})},
  2689. messageSends: []}),
  2690. smalltalk.Number);
  2691. smalltalk.addMethod(
  2692. smalltalk.method({
  2693. selector: "|",
  2694. fn: function (aNumber){
  2695. var self=this;
  2696. return smalltalk.withContext(function($ctx1) {
  2697. return self | aNumber;
  2698. return self}, function($ctx1) {$ctx1.fill(self,"|",{aNumber:aNumber},smalltalk.Number)})},
  2699. messageSends: []}),
  2700. smalltalk.Number);
  2701. smalltalk.addMethod(
  2702. smalltalk.method({
  2703. selector: "heliosClass",
  2704. fn: function (){
  2705. var self=this;
  2706. return smalltalk.withContext(function($ctx1) {
  2707. return "magnitude";
  2708. }, function($ctx1) {$ctx1.fill(self,"heliosClass",{},smalltalk.Number.klass)})},
  2709. messageSends: []}),
  2710. smalltalk.Number.klass);
  2711. smalltalk.addMethod(
  2712. smalltalk.method({
  2713. selector: "pi",
  2714. fn: function (){
  2715. var self=this;
  2716. return smalltalk.withContext(function($ctx1) {
  2717. return Math.PI;
  2718. return self}, function($ctx1) {$ctx1.fill(self,"pi",{},smalltalk.Number.klass)})},
  2719. messageSends: []}),
  2720. smalltalk.Number.klass);
  2721. smalltalk.addClass('Organizer', smalltalk.Object, [], 'Kernel-Objects');
  2722. smalltalk.addMethod(
  2723. smalltalk.method({
  2724. selector: "addElement:",
  2725. fn: function (anObject){
  2726. var self=this;
  2727. return smalltalk.withContext(function($ctx1) {
  2728. self.elements.addElement(anObject);
  2729. return self}, function($ctx1) {$ctx1.fill(self,"addElement:",{anObject:anObject},smalltalk.Organizer)})},
  2730. messageSends: []}),
  2731. smalltalk.Organizer);
  2732. smalltalk.addMethod(
  2733. smalltalk.method({
  2734. selector: "elements",
  2735. fn: function (){
  2736. var self=this;
  2737. return smalltalk.withContext(function($ctx1) {
  2738. var $1;
  2739. $1=_st(self._basicAt_("elements"))._copy();
  2740. return $1;
  2741. }, function($ctx1) {$ctx1.fill(self,"elements",{},smalltalk.Organizer)})},
  2742. messageSends: ["copy", "basicAt:"]}),
  2743. smalltalk.Organizer);
  2744. smalltalk.addMethod(
  2745. smalltalk.method({
  2746. selector: "removeElement:",
  2747. fn: function (anObject){
  2748. var self=this;
  2749. return smalltalk.withContext(function($ctx1) {
  2750. self.elements.removeElement(anObject);
  2751. return self}, function($ctx1) {$ctx1.fill(self,"removeElement:",{anObject:anObject},smalltalk.Organizer)})},
  2752. messageSends: []}),
  2753. smalltalk.Organizer);
  2754. smalltalk.addClass('ClassOrganizer', smalltalk.Organizer, [], 'Kernel-Objects');
  2755. smalltalk.addMethod(
  2756. smalltalk.method({
  2757. selector: "addElement:",
  2758. fn: function (aString){
  2759. var self=this;
  2760. function $ProtocolAdded(){return smalltalk.ProtocolAdded||(typeof ProtocolAdded=="undefined"?nil:ProtocolAdded)}
  2761. function $SystemAnnouncer(){return smalltalk.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}
  2762. return smalltalk.withContext(function($ctx1) {
  2763. var $1,$2;
  2764. smalltalk.Organizer.fn.prototype._addElement_.apply(_st(self), [aString]);
  2765. $1=_st($ProtocolAdded())._new();
  2766. _st($1)._protocol_(aString);
  2767. _st($1)._theClass_(self._theClass());
  2768. $2=_st($1)._yourself();
  2769. _st(_st($SystemAnnouncer())._current())._announce_($2);
  2770. return self}, function($ctx1) {$ctx1.fill(self,"addElement:",{aString:aString},smalltalk.ClassOrganizer)})},
  2771. messageSends: ["addElement:", "announce:", "protocol:", "new", "theClass:", "theClass", "yourself", "current"]}),
  2772. smalltalk.ClassOrganizer);
  2773. smalltalk.addMethod(
  2774. smalltalk.method({
  2775. selector: "removeElement:",
  2776. fn: function (aString){
  2777. var self=this;
  2778. function $ProtocolRemoved(){return smalltalk.ProtocolRemoved||(typeof ProtocolRemoved=="undefined"?nil:ProtocolRemoved)}
  2779. function $SystemAnnouncer(){return smalltalk.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}
  2780. return smalltalk.withContext(function($ctx1) {
  2781. var $1,$2;
  2782. smalltalk.Organizer.fn.prototype._removeElement_.apply(_st(self), [aString]);
  2783. $1=_st($ProtocolRemoved())._new();
  2784. _st($1)._protocol_(aString);
  2785. _st($1)._theClass_(self._theClass());
  2786. $2=_st($1)._yourself();
  2787. _st(_st($SystemAnnouncer())._current())._announce_($2);
  2788. return self}, function($ctx1) {$ctx1.fill(self,"removeElement:",{aString:aString},smalltalk.ClassOrganizer)})},
  2789. messageSends: ["removeElement:", "announce:", "protocol:", "new", "theClass:", "theClass", "yourself", "current"]}),
  2790. smalltalk.ClassOrganizer);
  2791. smalltalk.addMethod(
  2792. smalltalk.method({
  2793. selector: "theClass",
  2794. fn: function (){
  2795. var self=this;
  2796. return smalltalk.withContext(function($ctx1) {
  2797. return self.theClass ;
  2798. return self}, function($ctx1) {$ctx1.fill(self,"theClass",{},smalltalk.ClassOrganizer)})},
  2799. messageSends: []}),
  2800. smalltalk.ClassOrganizer);
  2801. smalltalk.addClass('PackageOrganizer', smalltalk.Organizer, [], 'Kernel-Objects');
  2802. smalltalk.addClass('Package', smalltalk.Object, ['extension'], 'Kernel-Objects');
  2803. smalltalk.addMethod(
  2804. smalltalk.method({
  2805. selector: "classes",
  2806. fn: function (){
  2807. var self=this;
  2808. return smalltalk.withContext(function($ctx1) {
  2809. var $1;
  2810. $1=_st(self._organization())._elements();
  2811. return $1;
  2812. }, function($ctx1) {$ctx1.fill(self,"classes",{},smalltalk.Package)})},
  2813. messageSends: ["elements", "organization"]}),
  2814. smalltalk.Package);
  2815. smalltalk.addMethod(
  2816. smalltalk.method({
  2817. selector: "isPackage",
  2818. fn: function (){
  2819. var self=this;
  2820. return smalltalk.withContext(function($ctx1) {
  2821. return true;
  2822. }, function($ctx1) {$ctx1.fill(self,"isPackage",{},smalltalk.Package)})},
  2823. messageSends: []}),
  2824. smalltalk.Package);
  2825. smalltalk.addMethod(
  2826. smalltalk.method({
  2827. selector: "name",
  2828. fn: function (){
  2829. var self=this;
  2830. return smalltalk.withContext(function($ctx1) {
  2831. return self.pkgName;
  2832. return self}, function($ctx1) {$ctx1.fill(self,"name",{},smalltalk.Package)})},
  2833. messageSends: []}),
  2834. smalltalk.Package);
  2835. smalltalk.addMethod(
  2836. smalltalk.method({
  2837. selector: "name:",
  2838. fn: function (aString){
  2839. var self=this;
  2840. return smalltalk.withContext(function($ctx1) {
  2841. self.pkgName = aString;
  2842. return self}, function($ctx1) {$ctx1.fill(self,"name:",{aString:aString},smalltalk.Package)})},
  2843. messageSends: []}),
  2844. smalltalk.Package);
  2845. smalltalk.addMethod(
  2846. smalltalk.method({
  2847. selector: "organization",
  2848. fn: function (){
  2849. var self=this;
  2850. return smalltalk.withContext(function($ctx1) {
  2851. var $1;
  2852. $1=self._basicAt_("organization");
  2853. return $1;
  2854. }, function($ctx1) {$ctx1.fill(self,"organization",{},smalltalk.Package)})},
  2855. messageSends: ["basicAt:"]}),
  2856. smalltalk.Package);
  2857. smalltalk.addMethod(
  2858. smalltalk.method({
  2859. selector: "printOn:",
  2860. fn: function (aStream){
  2861. var self=this;
  2862. return smalltalk.withContext(function($ctx1) {
  2863. var $1,$2;
  2864. smalltalk.Object.fn.prototype._printOn_.apply(_st(self), [aStream]);
  2865. $1=aStream;
  2866. _st($1)._nextPutAll_(" (");
  2867. _st($1)._nextPutAll_(self._name());
  2868. $2=_st($1)._nextPutAll_(")");
  2869. return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.Package)})},
  2870. messageSends: ["printOn:", "nextPutAll:", "name"]}),
  2871. smalltalk.Package);
  2872. smalltalk.addMethod(
  2873. smalltalk.method({
  2874. selector: "setupClasses",
  2875. fn: function (){
  2876. var self=this;
  2877. function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
  2878. return smalltalk.withContext(function($ctx1) {
  2879. var $1,$2;
  2880. $1=self._classes();
  2881. _st($1)._do_((function(each){
  2882. return smalltalk.withContext(function($ctx2) {
  2883. return _st(_st($ClassBuilder())._new())._setupClass_(each);
  2884. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  2885. $2=_st($1)._do_((function(each){
  2886. return smalltalk.withContext(function($ctx2) {
  2887. return _st(each)._initialize();
  2888. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  2889. return self}, function($ctx1) {$ctx1.fill(self,"setupClasses",{},smalltalk.Package)})},
  2890. messageSends: ["do:", "setupClass:", "new", "classes", "initialize"]}),
  2891. smalltalk.Package);
  2892. smalltalk.addMethod(
  2893. smalltalk.method({
  2894. selector: "sortedClasses",
  2895. fn: function (){
  2896. var self=this;
  2897. return smalltalk.withContext(function($ctx1) {
  2898. var $1;
  2899. $1=_st(self._class())._sortedClasses_(self._classes());
  2900. return $1;
  2901. }, function($ctx1) {$ctx1.fill(self,"sortedClasses",{},smalltalk.Package)})},
  2902. messageSends: ["sortedClasses:", "classes", "class"]}),
  2903. smalltalk.Package);
  2904. smalltalk.Package.klass.iVarNames = ['defaultCommitPathJs','defaultCommitPathSt'];
  2905. smalltalk.addMethod(
  2906. smalltalk.method({
  2907. selector: "load:",
  2908. fn: function (aPackageName){
  2909. var self=this;
  2910. return smalltalk.withContext(function($ctx1) {
  2911. self._load_prefix_(aPackageName,_st(self._defaultCommitPathJs()).__comma("/"));
  2912. return self}, function($ctx1) {$ctx1.fill(self,"load:",{aPackageName:aPackageName},smalltalk.Package.klass)})},
  2913. messageSends: ["load:prefix:", ",", "defaultCommitPathJs"]}),
  2914. smalltalk.Package.klass);
  2915. smalltalk.addMethod(
  2916. smalltalk.method({
  2917. selector: "load:prefix:",
  2918. fn: function (aPackageName,aPrefix){
  2919. var self=this;
  2920. function $Package(){return smalltalk.Package||(typeof Package=="undefined"?nil:Package)}
  2921. return smalltalk.withContext(function($ctx1) {
  2922. _st(jQuery)._getScript_onSuccess_(_st(_st(aPrefix).__comma(aPackageName)).__comma(".js"),(function(){
  2923. return smalltalk.withContext(function($ctx2) {
  2924. return _st(_st($Package())._named_(aPackageName))._setupClasses();
  2925. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2926. return self}, function($ctx1) {$ctx1.fill(self,"load:prefix:",{aPackageName:aPackageName,aPrefix:aPrefix},smalltalk.Package.klass)})},
  2927. messageSends: ["getScript:onSuccess:", ",", "setupClasses", "named:"]}),
  2928. smalltalk.Package.klass);
  2929. smalltalk.addMethod(
  2930. smalltalk.method({
  2931. selector: "named:",
  2932. fn: function (aPackageName){
  2933. var self=this;
  2934. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  2935. return smalltalk.withContext(function($ctx1) {
  2936. var $1;
  2937. $1=_st(_st($Smalltalk())._current())._packageAt_(aPackageName);
  2938. return $1;
  2939. }, function($ctx1) {$ctx1.fill(self,"named:",{aPackageName:aPackageName},smalltalk.Package.klass)})},
  2940. messageSends: ["packageAt:", "current"]}),
  2941. smalltalk.Package.klass);
  2942. smalltalk.addMethod(
  2943. smalltalk.method({
  2944. selector: "named:ifAbsent:",
  2945. fn: function (aPackageName,aBlock){
  2946. var self=this;
  2947. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  2948. return smalltalk.withContext(function($ctx1) {
  2949. var $1;
  2950. $1=_st(_st($Smalltalk())._current())._packageAt_ifAbsent_(aPackageName,aBlock);
  2951. return $1;
  2952. }, function($ctx1) {$ctx1.fill(self,"named:ifAbsent:",{aPackageName:aPackageName,aBlock:aBlock},smalltalk.Package.klass)})},
  2953. messageSends: ["packageAt:ifAbsent:", "current"]}),
  2954. smalltalk.Package.klass);
  2955. smalltalk.addMethod(
  2956. smalltalk.method({
  2957. selector: "sortedClasses:",
  2958. fn: function (classes){
  2959. var self=this;
  2960. var children,others,nodes,expandedClasses;
  2961. function $ClassSorterNode(){return smalltalk.ClassSorterNode||(typeof ClassSorterNode=="undefined"?nil:ClassSorterNode)}
  2962. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  2963. return smalltalk.withContext(function($ctx1) {
  2964. var $1,$2;
  2965. children=[];
  2966. others=[];
  2967. _st(classes)._do_((function(each){
  2968. return smalltalk.withContext(function($ctx2) {
  2969. $1=_st(classes)._includes_(_st(each)._superclass());
  2970. if(smalltalk.assert($1)){
  2971. return _st(others)._add_(each);
  2972. } else {
  2973. return _st(children)._add_(each);
  2974. };
  2975. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  2976. nodes=_st(children)._collect_((function(each){
  2977. return smalltalk.withContext(function($ctx2) {
  2978. return _st($ClassSorterNode())._on_classes_level_(each,others,(0));
  2979. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  2980. nodes=_st(nodes)._sorted_((function(a,b){
  2981. return smalltalk.withContext(function($ctx2) {
  2982. return _st(_st(_st(a)._theClass())._name()).__lt_eq(_st(_st(b)._theClass())._name());
  2983. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1)})}));
  2984. expandedClasses=_st($Array())._new();
  2985. _st(nodes)._do_((function(aNode){
  2986. return smalltalk.withContext(function($ctx2) {
  2987. return _st(aNode)._traverseClassesWith_(expandedClasses);
  2988. }, function($ctx2) {$ctx2.fillBlock({aNode:aNode},$ctx1)})}));
  2989. $2=expandedClasses;
  2990. return $2;
  2991. }, function($ctx1) {$ctx1.fill(self,"sortedClasses:",{classes:classes,children:children,others:others,nodes:nodes,expandedClasses:expandedClasses},smalltalk.Package.klass)})},
  2992. messageSends: ["do:", "ifFalse:ifTrue:", "add:", "includes:", "superclass", "collect:", "on:classes:level:", "sorted:", "<=", "name", "theClass", "new", "traverseClassesWith:"]}),
  2993. smalltalk.Package.klass);
  2994. smalltalk.addClass('Point', smalltalk.Object, ['x', 'y'], 'Kernel-Objects');
  2995. smalltalk.addMethod(
  2996. smalltalk.method({
  2997. selector: "*",
  2998. fn: function (aPoint){
  2999. var self=this;
  3000. function $Point(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}
  3001. return smalltalk.withContext(function($ctx1) {
  3002. var $1;
  3003. $1=_st($Point())._x_y_(_st(self._x()).__star(_st(_st(aPoint)._asPoint())._x()),_st(self._y()).__star(_st(_st(aPoint)._asPoint())._y()));
  3004. return $1;
  3005. }, function($ctx1) {$ctx1.fill(self,"*",{aPoint:aPoint},smalltalk.Point)})},
  3006. messageSends: ["x:y:", "*", "x", "asPoint", "y"]}),
  3007. smalltalk.Point);
  3008. smalltalk.addMethod(
  3009. smalltalk.method({
  3010. selector: "+",
  3011. fn: function (aPoint){
  3012. var self=this;
  3013. function $Point(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}
  3014. return smalltalk.withContext(function($ctx1) {
  3015. var $1;
  3016. $1=_st($Point())._x_y_(_st(self._x()).__plus(_st(_st(aPoint)._asPoint())._x()),_st(self._y()).__plus(_st(_st(aPoint)._asPoint())._y()));
  3017. return $1;
  3018. }, function($ctx1) {$ctx1.fill(self,"+",{aPoint:aPoint},smalltalk.Point)})},
  3019. messageSends: ["x:y:", "+", "x", "asPoint", "y"]}),
  3020. smalltalk.Point);
  3021. smalltalk.addMethod(
  3022. smalltalk.method({
  3023. selector: "-",
  3024. fn: function (aPoint){
  3025. var self=this;
  3026. function $Point(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}
  3027. return smalltalk.withContext(function($ctx1) {
  3028. var $1;
  3029. $1=_st($Point())._x_y_(_st(self._x()).__minus(_st(_st(aPoint)._asPoint())._x()),_st(self._y()).__minus(_st(_st(aPoint)._asPoint())._y()));
  3030. return $1;
  3031. }, function($ctx1) {$ctx1.fill(self,"-",{aPoint:aPoint},smalltalk.Point)})},
  3032. messageSends: ["x:y:", "-", "x", "asPoint", "y"]}),
  3033. smalltalk.Point);
  3034. smalltalk.addMethod(
  3035. smalltalk.method({
  3036. selector: "/",
  3037. fn: function (aPoint){
  3038. var self=this;
  3039. function $Point(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}
  3040. return smalltalk.withContext(function($ctx1) {
  3041. var $1;
  3042. $1=_st($Point())._x_y_(_st(self._x()).__slash(_st(_st(aPoint)._asPoint())._x()),_st(self._y()).__slash(_st(_st(aPoint)._asPoint())._y()));
  3043. return $1;
  3044. }, function($ctx1) {$ctx1.fill(self,"/",{aPoint:aPoint},smalltalk.Point)})},
  3045. messageSends: ["x:y:", "/", "x", "asPoint", "y"]}),
  3046. smalltalk.Point);
  3047. smalltalk.addMethod(
  3048. smalltalk.method({
  3049. selector: "=",
  3050. fn: function (aPoint){
  3051. var self=this;
  3052. return smalltalk.withContext(function($ctx1) {
  3053. var $1;
  3054. $1=_st(_st(_st(aPoint)._class()).__eq(self._class()))._and_((function(){
  3055. return smalltalk.withContext(function($ctx2) {
  3056. return _st(_st(_st(aPoint)._x()).__eq(self._x())).__and(_st(_st(aPoint)._y()).__eq(self._y()));
  3057. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3058. return $1;
  3059. }, function($ctx1) {$ctx1.fill(self,"=",{aPoint:aPoint},smalltalk.Point)})},
  3060. messageSends: ["and:", "&", "=", "y", "x", "class"]}),
  3061. smalltalk.Point);
  3062. smalltalk.addMethod(
  3063. smalltalk.method({
  3064. selector: "asPoint",
  3065. fn: function (){
  3066. var self=this;
  3067. return smalltalk.withContext(function($ctx1) {
  3068. var $1;
  3069. $1=self;
  3070. return $1;
  3071. }, function($ctx1) {$ctx1.fill(self,"asPoint",{},smalltalk.Point)})},
  3072. messageSends: []}),
  3073. smalltalk.Point);
  3074. smalltalk.addMethod(
  3075. smalltalk.method({
  3076. selector: "printOn:",
  3077. fn: function (aStream){
  3078. var self=this;
  3079. return smalltalk.withContext(function($ctx1) {
  3080. var $1;
  3081. _st(self["@x"])._printOn_(aStream);
  3082. _st(aStream)._nextPutAll_("@");
  3083. $1=_st(_st(self["@y"])._notNil())._and_((function(){
  3084. return smalltalk.withContext(function($ctx2) {
  3085. return _st(self["@y"])._negative();
  3086. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3087. if(smalltalk.assert($1)){
  3088. _st(aStream)._space();
  3089. };
  3090. _st(self["@y"])._printOn_(aStream);
  3091. return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.Point)})},
  3092. messageSends: ["printOn:", "nextPutAll:", "ifTrue:", "space", "and:", "negative", "notNil"]}),
  3093. smalltalk.Point);
  3094. smalltalk.addMethod(
  3095. smalltalk.method({
  3096. selector: "translateBy:",
  3097. fn: function (delta){
  3098. var self=this;
  3099. return smalltalk.withContext(function($ctx1) {
  3100. var $1;
  3101. $1=_st(_st(_st(delta)._x()).__plus(self["@x"])).__at(_st(_st(delta)._y()).__plus(self["@y"]));
  3102. return $1;
  3103. }, function($ctx1) {$ctx1.fill(self,"translateBy:",{delta:delta},smalltalk.Point)})},
  3104. messageSends: ["@", "+", "y", "x"]}),
  3105. smalltalk.Point);
  3106. smalltalk.addMethod(
  3107. smalltalk.method({
  3108. selector: "x",
  3109. fn: function (){
  3110. var self=this;
  3111. return smalltalk.withContext(function($ctx1) {
  3112. var $1;
  3113. $1=self["@x"];
  3114. return $1;
  3115. }, function($ctx1) {$ctx1.fill(self,"x",{},smalltalk.Point)})},
  3116. messageSends: []}),
  3117. smalltalk.Point);
  3118. smalltalk.addMethod(
  3119. smalltalk.method({
  3120. selector: "x:",
  3121. fn: function (aNumber){
  3122. var self=this;
  3123. return smalltalk.withContext(function($ctx1) {
  3124. self["@x"]=aNumber;
  3125. return self}, function($ctx1) {$ctx1.fill(self,"x:",{aNumber:aNumber},smalltalk.Point)})},
  3126. messageSends: []}),
  3127. smalltalk.Point);
  3128. smalltalk.addMethod(
  3129. smalltalk.method({
  3130. selector: "y",
  3131. fn: function (){
  3132. var self=this;
  3133. return smalltalk.withContext(function($ctx1) {
  3134. var $1;
  3135. $1=self["@y"];
  3136. return $1;
  3137. }, function($ctx1) {$ctx1.fill(self,"y",{},smalltalk.Point)})},
  3138. messageSends: []}),
  3139. smalltalk.Point);
  3140. smalltalk.addMethod(
  3141. smalltalk.method({
  3142. selector: "y:",
  3143. fn: function (aNumber){
  3144. var self=this;
  3145. return smalltalk.withContext(function($ctx1) {
  3146. self["@y"]=aNumber;
  3147. return self}, function($ctx1) {$ctx1.fill(self,"y:",{aNumber:aNumber},smalltalk.Point)})},
  3148. messageSends: []}),
  3149. smalltalk.Point);
  3150. smalltalk.addMethod(
  3151. smalltalk.method({
  3152. selector: "heliosClass",
  3153. fn: function (){
  3154. var self=this;
  3155. return smalltalk.withContext(function($ctx1) {
  3156. return "magnitude";
  3157. }, function($ctx1) {$ctx1.fill(self,"heliosClass",{},smalltalk.Point.klass)})},
  3158. messageSends: []}),
  3159. smalltalk.Point.klass);
  3160. smalltalk.addMethod(
  3161. smalltalk.method({
  3162. selector: "x:y:",
  3163. fn: function (aNumber,anotherNumber){
  3164. var self=this;
  3165. return smalltalk.withContext(function($ctx1) {
  3166. var $2,$3,$1;
  3167. $2=self._new();
  3168. _st($2)._x_(aNumber);
  3169. _st($2)._y_(anotherNumber);
  3170. $3=_st($2)._yourself();
  3171. $1=$3;
  3172. return $1;
  3173. }, function($ctx1) {$ctx1.fill(self,"x:y:",{aNumber:aNumber,anotherNumber:anotherNumber},smalltalk.Point.klass)})},
  3174. messageSends: ["x:", "new", "y:", "yourself"]}),
  3175. smalltalk.Point.klass);
  3176. smalltalk.addClass('ProgressHandler', smalltalk.Object, [], 'Kernel-Objects');
  3177. smalltalk.addMethod(
  3178. smalltalk.method({
  3179. selector: "do:on:displaying:",
  3180. fn: function (aBlock,aCollection,aString){
  3181. var self=this;
  3182. return smalltalk.withContext(function($ctx1) {
  3183. _st(aCollection)._do_(aBlock);
  3184. return self}, function($ctx1) {$ctx1.fill(self,"do:on:displaying:",{aBlock:aBlock,aCollection:aCollection,aString:aString},smalltalk.ProgressHandler)})},
  3185. messageSends: ["do:"]}),
  3186. smalltalk.ProgressHandler);
  3187. smalltalk.ProgressHandler.klass.iVarNames = ['current'];
  3188. smalltalk.addMethod(
  3189. smalltalk.method({
  3190. selector: "current",
  3191. fn: function (){
  3192. var self=this;
  3193. return smalltalk.withContext(function($ctx1) {
  3194. var $2,$1;
  3195. $2=self["@current"];
  3196. if(($receiver = $2) == nil || $receiver == undefined){
  3197. self["@current"]=self._new();
  3198. $1=self["@current"];
  3199. } else {
  3200. $1=$2;
  3201. };
  3202. return $1;
  3203. }, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.ProgressHandler.klass)})},
  3204. messageSends: ["ifNil:", "new"]}),
  3205. smalltalk.ProgressHandler.klass);
  3206. smalltalk.addMethod(
  3207. smalltalk.method({
  3208. selector: "initialize",
  3209. fn: function (){
  3210. var self=this;
  3211. return smalltalk.withContext(function($ctx1) {
  3212. self._register();
  3213. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.ProgressHandler.klass)})},
  3214. messageSends: ["register"]}),
  3215. smalltalk.ProgressHandler.klass);
  3216. smalltalk.addMethod(
  3217. smalltalk.method({
  3218. selector: "register",
  3219. fn: function (){
  3220. var self=this;
  3221. function $ProgressHandler(){return smalltalk.ProgressHandler||(typeof ProgressHandler=="undefined"?nil:ProgressHandler)}
  3222. return smalltalk.withContext(function($ctx1) {
  3223. _st($ProgressHandler())._setCurrent_(self._new());
  3224. return self}, function($ctx1) {$ctx1.fill(self,"register",{},smalltalk.ProgressHandler.klass)})},
  3225. messageSends: ["setCurrent:", "new"]}),
  3226. smalltalk.ProgressHandler.klass);
  3227. smalltalk.addMethod(
  3228. smalltalk.method({
  3229. selector: "setCurrent:",
  3230. fn: function (anHandler){
  3231. var self=this;
  3232. return smalltalk.withContext(function($ctx1) {
  3233. self["@current"]=anHandler;
  3234. return self}, function($ctx1) {$ctx1.fill(self,"setCurrent:",{anHandler:anHandler},smalltalk.ProgressHandler.klass)})},
  3235. messageSends: []}),
  3236. smalltalk.ProgressHandler.klass);
  3237. smalltalk.addClass('Random', smalltalk.Object, [], 'Kernel-Objects');
  3238. smalltalk.addMethod(
  3239. smalltalk.method({
  3240. selector: "next",
  3241. fn: function (){
  3242. var self=this;
  3243. return smalltalk.withContext(function($ctx1) {
  3244. return Math.random();
  3245. return self}, function($ctx1) {$ctx1.fill(self,"next",{},smalltalk.Random)})},
  3246. messageSends: []}),
  3247. smalltalk.Random);
  3248. smalltalk.addMethod(
  3249. smalltalk.method({
  3250. selector: "next:",
  3251. fn: function (anInteger){
  3252. var self=this;
  3253. return smalltalk.withContext(function($ctx1) {
  3254. var $1;
  3255. $1=_st((1)._to_(anInteger))._collect_((function(each){
  3256. return smalltalk.withContext(function($ctx2) {
  3257. return self._next();
  3258. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  3259. return $1;
  3260. }, function($ctx1) {$ctx1.fill(self,"next:",{anInteger:anInteger},smalltalk.Random)})},
  3261. messageSends: ["collect:", "next", "to:"]}),
  3262. smalltalk.Random);
  3263. smalltalk.addClass('Smalltalk', smalltalk.Object, [], 'Kernel-Objects');
  3264. smalltalk.addMethod(
  3265. smalltalk.method({
  3266. selector: "addGlobalJsVariable:",
  3267. fn: function (aString){
  3268. var self=this;
  3269. return smalltalk.withContext(function($ctx1) {
  3270. _st(self._globalJsVariables())._add_(aString);
  3271. return self}, function($ctx1) {$ctx1.fill(self,"addGlobalJsVariable:",{aString:aString},smalltalk.Smalltalk)})},
  3272. messageSends: ["add:", "globalJsVariables"]}),
  3273. smalltalk.Smalltalk);
  3274. smalltalk.addMethod(
  3275. smalltalk.method({
  3276. selector: "asSmalltalkException:",
  3277. fn: function (anObject){
  3278. var self=this;
  3279. function $JavaScriptException(){return smalltalk.JavaScriptException||(typeof JavaScriptException=="undefined"?nil:JavaScriptException)}
  3280. function $Error(){return smalltalk.Error||(typeof Error=="undefined"?nil:Error)}
  3281. return smalltalk.withContext(function($ctx1) {
  3282. var $2,$1;
  3283. $2=_st(self._isSmalltalkObject_(anObject))._and_((function(){
  3284. return smalltalk.withContext(function($ctx2) {
  3285. return _st(anObject)._isKindOf_($Error());
  3286. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3287. if(smalltalk.assert($2)){
  3288. $1=anObject;
  3289. } else {
  3290. $1=_st($JavaScriptException())._on_(anObject);
  3291. };
  3292. return $1;
  3293. }, function($ctx1) {$ctx1.fill(self,"asSmalltalkException:",{anObject:anObject},smalltalk.Smalltalk)})},
  3294. messageSends: ["ifTrue:ifFalse:", "on:", "and:", "isKindOf:", "isSmalltalkObject:"]}),
  3295. smalltalk.Smalltalk);
  3296. smalltalk.addMethod(
  3297. smalltalk.method({
  3298. selector: "at:",
  3299. fn: function (aString){
  3300. var self=this;
  3301. return smalltalk.withContext(function($ctx1) {
  3302. return self[aString];
  3303. return self}, function($ctx1) {$ctx1.fill(self,"at:",{aString:aString},smalltalk.Smalltalk)})},
  3304. messageSends: []}),
  3305. smalltalk.Smalltalk);
  3306. smalltalk.addMethod(
  3307. smalltalk.method({
  3308. selector: "basicParse:",
  3309. fn: function (aString){
  3310. var self=this;
  3311. return smalltalk.withContext(function($ctx1) {
  3312. return smalltalk.parser.parse(aString);
  3313. return self}, function($ctx1) {$ctx1.fill(self,"basicParse:",{aString:aString},smalltalk.Smalltalk)})},
  3314. messageSends: []}),
  3315. smalltalk.Smalltalk);
  3316. smalltalk.addMethod(
  3317. smalltalk.method({
  3318. selector: "classes",
  3319. fn: function (){
  3320. var self=this;
  3321. return smalltalk.withContext(function($ctx1) {
  3322. return self.classes();
  3323. return self}, function($ctx1) {$ctx1.fill(self,"classes",{},smalltalk.Smalltalk)})},
  3324. messageSends: []}),
  3325. smalltalk.Smalltalk);
  3326. smalltalk.addMethod(
  3327. smalltalk.method({
  3328. selector: "createPackage:",
  3329. fn: function (packageName){
  3330. var self=this;
  3331. return smalltalk.withContext(function($ctx1) {
  3332. return smalltalk.addPackage(packageName);
  3333. return self}, function($ctx1) {$ctx1.fill(self,"createPackage:",{packageName:packageName},smalltalk.Smalltalk)})},
  3334. messageSends: []}),
  3335. smalltalk.Smalltalk);
  3336. smalltalk.addMethod(
  3337. smalltalk.method({
  3338. selector: "createPackage:properties:",
  3339. fn: function (packageName,aDict){
  3340. var self=this;
  3341. return smalltalk.withContext(function($ctx1) {
  3342. var $1,$2;
  3343. self._deprecatedAPI();
  3344. $1=_st(aDict)._isEmpty();
  3345. if(! smalltalk.assert($1)){
  3346. self._error_("createPackage:properties: called with nonempty properties");
  3347. };
  3348. $2=self._createPackage_(packageName);
  3349. return $2;
  3350. }, function($ctx1) {$ctx1.fill(self,"createPackage:properties:",{packageName:packageName,aDict:aDict},smalltalk.Smalltalk)})},
  3351. messageSends: ["deprecatedAPI", "ifFalse:", "error:", "isEmpty", "createPackage:"]}),
  3352. smalltalk.Smalltalk);
  3353. smalltalk.addMethod(
  3354. smalltalk.method({
  3355. selector: "deleteClass:",
  3356. fn: function (aClass){
  3357. var self=this;
  3358. return smalltalk.withContext(function($ctx1) {
  3359. self.removeClass(aClass);
  3360. return self}, function($ctx1) {$ctx1.fill(self,"deleteClass:",{aClass:aClass},smalltalk.Smalltalk)})},
  3361. messageSends: []}),
  3362. smalltalk.Smalltalk);
  3363. smalltalk.addMethod(
  3364. smalltalk.method({
  3365. selector: "deleteGlobalJsVariable:",
  3366. fn: function (aString){
  3367. var self=this;
  3368. return smalltalk.withContext(function($ctx1) {
  3369. _st(self._globalJsVariables())._remove_ifAbsent_(aString,(function(){
  3370. return smalltalk.withContext(function($ctx2) {
  3371. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3372. return self}, function($ctx1) {$ctx1.fill(self,"deleteGlobalJsVariable:",{aString:aString},smalltalk.Smalltalk)})},
  3373. messageSends: ["remove:ifAbsent:", "globalJsVariables"]}),
  3374. smalltalk.Smalltalk);
  3375. smalltalk.addMethod(
  3376. smalltalk.method({
  3377. selector: "deletePackage:",
  3378. fn: function (packageName){
  3379. var self=this;
  3380. return smalltalk.withContext(function($ctx1) {
  3381. delete smalltalk.packages[packageName];
  3382. return self}, function($ctx1) {$ctx1.fill(self,"deletePackage:",{packageName:packageName},smalltalk.Smalltalk)})},
  3383. messageSends: []}),
  3384. smalltalk.Smalltalk);
  3385. smalltalk.addMethod(
  3386. smalltalk.method({
  3387. selector: "globalJsVariables",
  3388. fn: function (){
  3389. var self=this;
  3390. return smalltalk.withContext(function($ctx1) {
  3391. return self.globalJsVariables;
  3392. return self}, function($ctx1) {$ctx1.fill(self,"globalJsVariables",{},smalltalk.Smalltalk)})},
  3393. messageSends: []}),
  3394. smalltalk.Smalltalk);
  3395. smalltalk.addMethod(
  3396. smalltalk.method({
  3397. selector: "isSmalltalkObject:",
  3398. fn: function (anObject){
  3399. var self=this;
  3400. return smalltalk.withContext(function($ctx1) {
  3401. return typeof anObject.klass !== 'undefined';
  3402. return self}, function($ctx1) {$ctx1.fill(self,"isSmalltalkObject:",{anObject:anObject},smalltalk.Smalltalk)})},
  3403. messageSends: []}),
  3404. smalltalk.Smalltalk);
  3405. smalltalk.addMethod(
  3406. smalltalk.method({
  3407. selector: "packageAt:",
  3408. fn: function (packageName){
  3409. var self=this;
  3410. return smalltalk.withContext(function($ctx1) {
  3411. return self.packages[packageName];
  3412. return self}, function($ctx1) {$ctx1.fill(self,"packageAt:",{packageName:packageName},smalltalk.Smalltalk)})},
  3413. messageSends: []}),
  3414. smalltalk.Smalltalk);
  3415. smalltalk.addMethod(
  3416. smalltalk.method({
  3417. selector: "packageAt:ifAbsent:",
  3418. fn: function (packageName,aBlock){
  3419. var self=this;
  3420. return smalltalk.withContext(function($ctx1) {
  3421. var $2,$1;
  3422. $2=self._packageAt_(packageName);
  3423. $1=_st($2)._ifNil_(aBlock);
  3424. return $1;
  3425. }, function($ctx1) {$ctx1.fill(self,"packageAt:ifAbsent:",{packageName:packageName,aBlock:aBlock},smalltalk.Smalltalk)})},
  3426. messageSends: ["ifNil:", "packageAt:"]}),
  3427. smalltalk.Smalltalk);
  3428. smalltalk.addMethod(
  3429. smalltalk.method({
  3430. selector: "packages",
  3431. fn: function (){
  3432. var self=this;
  3433. return smalltalk.withContext(function($ctx1) {
  3434. return self.packages.all();
  3435. return self}, function($ctx1) {$ctx1.fill(self,"packages",{},smalltalk.Smalltalk)})},
  3436. messageSends: []}),
  3437. smalltalk.Smalltalk);
  3438. smalltalk.addMethod(
  3439. smalltalk.method({
  3440. selector: "parse:",
  3441. fn: function (aString){
  3442. var self=this;
  3443. var result;
  3444. return smalltalk.withContext(function($ctx1) {
  3445. var $2,$3,$1;
  3446. self._try_catch_((function(){
  3447. return smalltalk.withContext(function($ctx2) {
  3448. result=self._basicParse_(aString);
  3449. return result;
  3450. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(function(ex){
  3451. return smalltalk.withContext(function($ctx2) {
  3452. return _st(self._parseError_parsing_(ex,aString))._signal();
  3453. }, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1)})}));
  3454. $2=result;
  3455. _st($2)._source_(aString);
  3456. $3=_st($2)._yourself();
  3457. $1=$3;
  3458. return $1;
  3459. }, function($ctx1) {$ctx1.fill(self,"parse:",{aString:aString,result:result},smalltalk.Smalltalk)})},
  3460. messageSends: ["try:catch:", "basicParse:", "signal", "parseError:parsing:", "source:", "yourself"]}),
  3461. smalltalk.Smalltalk);
  3462. smalltalk.addMethod(
  3463. smalltalk.method({
  3464. selector: "parseError:parsing:",
  3465. fn: function (anException,aString){
  3466. var self=this;
  3467. function $ParseError(){return smalltalk.ParseError||(typeof ParseError=="undefined"?nil:ParseError)}
  3468. return smalltalk.withContext(function($ctx1) {
  3469. var $1;
  3470. $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")));
  3471. return $1;
  3472. }, function($ctx1) {$ctx1.fill(self,"parseError:parsing:",{anException:anException,aString:aString},smalltalk.Smalltalk)})},
  3473. messageSends: ["messageText:", ",", "basicAt:", "new"]}),
  3474. smalltalk.Smalltalk);
  3475. smalltalk.addMethod(
  3476. smalltalk.method({
  3477. selector: "pseudoVariableNames",
  3478. fn: function (){
  3479. var self=this;
  3480. return smalltalk.withContext(function($ctx1) {
  3481. var $1;
  3482. $1=["self", "super", "nil", "true", "false", "thisContext"];
  3483. return $1;
  3484. }, function($ctx1) {$ctx1.fill(self,"pseudoVariableNames",{},smalltalk.Smalltalk)})},
  3485. messageSends: []}),
  3486. smalltalk.Smalltalk);
  3487. smalltalk.addMethod(
  3488. smalltalk.method({
  3489. selector: "readJSObject:",
  3490. fn: function (anObject){
  3491. var self=this;
  3492. return smalltalk.withContext(function($ctx1) {
  3493. return self.readJSObject(anObject);
  3494. return self}, function($ctx1) {$ctx1.fill(self,"readJSObject:",{anObject:anObject},smalltalk.Smalltalk)})},
  3495. messageSends: []}),
  3496. smalltalk.Smalltalk);
  3497. smalltalk.addMethod(
  3498. smalltalk.method({
  3499. selector: "removeClass:",
  3500. fn: function (aClass){
  3501. var self=this;
  3502. function $ClassRemoved(){return smalltalk.ClassRemoved||(typeof ClassRemoved=="undefined"?nil:ClassRemoved)}
  3503. function $SystemAnnouncer(){return smalltalk.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}
  3504. return smalltalk.withContext(function($ctx1) {
  3505. var $1,$2,$3;
  3506. $1=_st(aClass)._isMetaclass();
  3507. if(smalltalk.assert($1)){
  3508. self._error_(_st(_st(aClass)._asString()).__comma(" is a Metaclass and cannot be removed!"));
  3509. };
  3510. self._deleteClass_(aClass);
  3511. $2=_st($ClassRemoved())._new();
  3512. _st($2)._theClass_(aClass);
  3513. $3=_st($2)._yourself();
  3514. _st(_st($SystemAnnouncer())._current())._announce_($3);
  3515. return self}, function($ctx1) {$ctx1.fill(self,"removeClass:",{aClass:aClass},smalltalk.Smalltalk)})},
  3516. messageSends: ["ifTrue:", "error:", ",", "asString", "isMetaclass", "deleteClass:", "announce:", "theClass:", "new", "yourself", "current"]}),
  3517. smalltalk.Smalltalk);
  3518. smalltalk.addMethod(
  3519. smalltalk.method({
  3520. selector: "removePackage:",
  3521. fn: function (packageName){
  3522. var self=this;
  3523. var pkg;
  3524. return smalltalk.withContext(function($ctx1) {
  3525. pkg=self._packageAt_ifAbsent_(packageName,(function(){
  3526. return smalltalk.withContext(function($ctx2) {
  3527. return self._error_("Missing package: ".__comma(packageName));
  3528. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3529. _st(_st(pkg)._classes())._do_((function(each){
  3530. return smalltalk.withContext(function($ctx2) {
  3531. return self._removeClass_(each);
  3532. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  3533. self._deletePackage_(packageName);
  3534. return self}, function($ctx1) {$ctx1.fill(self,"removePackage:",{packageName:packageName,pkg:pkg},smalltalk.Smalltalk)})},
  3535. messageSends: ["packageAt:ifAbsent:", "error:", ",", "do:", "removeClass:", "classes", "deletePackage:"]}),
  3536. smalltalk.Smalltalk);
  3537. smalltalk.addMethod(
  3538. smalltalk.method({
  3539. selector: "renamePackage:to:",
  3540. fn: function (packageName,newName){
  3541. var self=this;
  3542. var pkg;
  3543. return smalltalk.withContext(function($ctx1) {
  3544. var $1;
  3545. pkg=self._packageAt_ifAbsent_(packageName,(function(){
  3546. return smalltalk.withContext(function($ctx2) {
  3547. return self._error_("Missing package: ".__comma(packageName));
  3548. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3549. $1=self._packageAt_(newName);
  3550. if(($receiver = $1) == nil || $receiver == undefined){
  3551. $1;
  3552. } else {
  3553. self._error_("Already exists a package called: ".__comma(newName));
  3554. };
  3555. _st(self._basicAt_("packages"))._at_put_(newName,pkg);
  3556. _st(pkg)._name_(newName);
  3557. self._deletePackage_(packageName);
  3558. return self}, function($ctx1) {$ctx1.fill(self,"renamePackage:to:",{packageName:packageName,newName:newName,pkg:pkg},smalltalk.Smalltalk)})},
  3559. messageSends: ["packageAt:ifAbsent:", "error:", ",", "ifNotNil:", "packageAt:", "at:put:", "basicAt:", "name:", "deletePackage:"]}),
  3560. smalltalk.Smalltalk);
  3561. smalltalk.addMethod(
  3562. smalltalk.method({
  3563. selector: "reservedWords",
  3564. fn: function (){
  3565. var self=this;
  3566. return smalltalk.withContext(function($ctx1) {
  3567. return self.reservedWords;
  3568. return self}, function($ctx1) {$ctx1.fill(self,"reservedWords",{},smalltalk.Smalltalk)})},
  3569. messageSends: []}),
  3570. smalltalk.Smalltalk);
  3571. smalltalk.addMethod(
  3572. smalltalk.method({
  3573. selector: "version",
  3574. fn: function (){
  3575. var self=this;
  3576. return smalltalk.withContext(function($ctx1) {
  3577. return "0.11.0";
  3578. }, function($ctx1) {$ctx1.fill(self,"version",{},smalltalk.Smalltalk)})},
  3579. messageSends: []}),
  3580. smalltalk.Smalltalk);
  3581. smalltalk.Smalltalk.klass.iVarNames = ['current'];
  3582. smalltalk.addMethod(
  3583. smalltalk.method({
  3584. selector: "current",
  3585. fn: function (){
  3586. var self=this;
  3587. return smalltalk.withContext(function($ctx1) {
  3588. return smalltalk;
  3589. return self}, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.Smalltalk.klass)})},
  3590. messageSends: []}),
  3591. smalltalk.Smalltalk.klass);
  3592. smalltalk.addClass('Timeout', smalltalk.Object, ['rawTimeout'], 'Kernel-Objects');
  3593. smalltalk.addMethod(
  3594. smalltalk.method({
  3595. selector: "clearInterval",
  3596. fn: function (){
  3597. var self=this;
  3598. return smalltalk.withContext(function($ctx1) {
  3599. var interval = self["@rawTimeout"];
  3600. clearInterval(interval);
  3601. ;
  3602. return self}, function($ctx1) {$ctx1.fill(self,"clearInterval",{},smalltalk.Timeout)})},
  3603. messageSends: []}),
  3604. smalltalk.Timeout);
  3605. smalltalk.addMethod(
  3606. smalltalk.method({
  3607. selector: "clearTimeout",
  3608. fn: function (){
  3609. var self=this;
  3610. return smalltalk.withContext(function($ctx1) {
  3611. var timeout = self["@rawTimeout"];
  3612. clearTimeout(timeout);
  3613. ;
  3614. return self}, function($ctx1) {$ctx1.fill(self,"clearTimeout",{},smalltalk.Timeout)})},
  3615. messageSends: []}),
  3616. smalltalk.Timeout);
  3617. smalltalk.addMethod(
  3618. smalltalk.method({
  3619. selector: "rawTimeout:",
  3620. fn: function (anObject){
  3621. var self=this;
  3622. return smalltalk.withContext(function($ctx1) {
  3623. self["@rawTimeout"]=anObject;
  3624. return self}, function($ctx1) {$ctx1.fill(self,"rawTimeout:",{anObject:anObject},smalltalk.Timeout)})},
  3625. messageSends: []}),
  3626. smalltalk.Timeout);
  3627. smalltalk.addMethod(
  3628. smalltalk.method({
  3629. selector: "on:",
  3630. fn: function (anObject){
  3631. var self=this;
  3632. return smalltalk.withContext(function($ctx1) {
  3633. var $2,$3,$1;
  3634. $2=self._new();
  3635. _st($2)._rawTimeout_(anObject);
  3636. $3=_st($2)._yourself();
  3637. $1=$3;
  3638. return $1;
  3639. }, function($ctx1) {$ctx1.fill(self,"on:",{anObject:anObject},smalltalk.Timeout.klass)})},
  3640. messageSends: ["rawTimeout:", "new", "yourself"]}),
  3641. smalltalk.Timeout.klass);
  3642. smalltalk.addClass('UndefinedObject', smalltalk.Object, [], 'Kernel-Objects');
  3643. smalltalk.addMethod(
  3644. smalltalk.method({
  3645. selector: "asJSON",
  3646. fn: function (){
  3647. var self=this;
  3648. return smalltalk.withContext(function($ctx1) {
  3649. var $1;
  3650. $1=null;
  3651. return $1;
  3652. }, function($ctx1) {$ctx1.fill(self,"asJSON",{},smalltalk.UndefinedObject)})},
  3653. messageSends: []}),
  3654. smalltalk.UndefinedObject);
  3655. smalltalk.addMethod(
  3656. smalltalk.method({
  3657. selector: "deepCopy",
  3658. fn: function (){
  3659. var self=this;
  3660. return smalltalk.withContext(function($ctx1) {
  3661. var $1;
  3662. $1=self;
  3663. return $1;
  3664. }, function($ctx1) {$ctx1.fill(self,"deepCopy",{},smalltalk.UndefinedObject)})},
  3665. messageSends: []}),
  3666. smalltalk.UndefinedObject);
  3667. smalltalk.addMethod(
  3668. smalltalk.method({
  3669. selector: "ifNil:",
  3670. fn: function (aBlock){
  3671. var self=this;
  3672. return smalltalk.withContext(function($ctx1) {
  3673. var $2,$1;
  3674. $2=self;
  3675. $1=_st($2)._ifNil_ifNotNil_(aBlock,(function(){
  3676. return smalltalk.withContext(function($ctx2) {
  3677. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3678. return $1;
  3679. }, function($ctx1) {$ctx1.fill(self,"ifNil:",{aBlock:aBlock},smalltalk.UndefinedObject)})},
  3680. messageSends: ["ifNil:ifNotNil:"]}),
  3681. smalltalk.UndefinedObject);
  3682. smalltalk.addMethod(
  3683. smalltalk.method({
  3684. selector: "ifNil:ifNotNil:",
  3685. fn: function (aBlock,anotherBlock){
  3686. var self=this;
  3687. return smalltalk.withContext(function($ctx1) {
  3688. var $1;
  3689. $1=_st(aBlock)._value();
  3690. return $1;
  3691. }, function($ctx1) {$ctx1.fill(self,"ifNil:ifNotNil:",{aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.UndefinedObject)})},
  3692. messageSends: ["value"]}),
  3693. smalltalk.UndefinedObject);
  3694. smalltalk.addMethod(
  3695. smalltalk.method({
  3696. selector: "ifNotNil:",
  3697. fn: function (aBlock){
  3698. var self=this;
  3699. return smalltalk.withContext(function($ctx1) {
  3700. var $1;
  3701. $1=self;
  3702. return $1;
  3703. }, function($ctx1) {$ctx1.fill(self,"ifNotNil:",{aBlock:aBlock},smalltalk.UndefinedObject)})},
  3704. messageSends: []}),
  3705. smalltalk.UndefinedObject);
  3706. smalltalk.addMethod(
  3707. smalltalk.method({
  3708. selector: "ifNotNil:ifNil:",
  3709. fn: function (aBlock,anotherBlock){
  3710. var self=this;
  3711. return smalltalk.withContext(function($ctx1) {
  3712. var $1;
  3713. $1=_st(anotherBlock)._value();
  3714. return $1;
  3715. }, function($ctx1) {$ctx1.fill(self,"ifNotNil:ifNil:",{aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.UndefinedObject)})},
  3716. messageSends: ["value"]}),
  3717. smalltalk.UndefinedObject);
  3718. smalltalk.addMethod(
  3719. smalltalk.method({
  3720. selector: "isImmutable",
  3721. fn: function (){
  3722. var self=this;
  3723. return smalltalk.withContext(function($ctx1) {
  3724. return true;
  3725. }, function($ctx1) {$ctx1.fill(self,"isImmutable",{},smalltalk.UndefinedObject)})},
  3726. messageSends: []}),
  3727. smalltalk.UndefinedObject);
  3728. smalltalk.addMethod(
  3729. smalltalk.method({
  3730. selector: "isNil",
  3731. fn: function (){
  3732. var self=this;
  3733. return smalltalk.withContext(function($ctx1) {
  3734. return true;
  3735. }, function($ctx1) {$ctx1.fill(self,"isNil",{},smalltalk.UndefinedObject)})},
  3736. messageSends: []}),
  3737. smalltalk.UndefinedObject);
  3738. smalltalk.addMethod(
  3739. smalltalk.method({
  3740. selector: "notNil",
  3741. fn: function (){
  3742. var self=this;
  3743. return smalltalk.withContext(function($ctx1) {
  3744. return false;
  3745. }, function($ctx1) {$ctx1.fill(self,"notNil",{},smalltalk.UndefinedObject)})},
  3746. messageSends: []}),
  3747. smalltalk.UndefinedObject);
  3748. smalltalk.addMethod(
  3749. smalltalk.method({
  3750. selector: "printOn:",
  3751. fn: function (aStream){
  3752. var self=this;
  3753. return smalltalk.withContext(function($ctx1) {
  3754. _st(aStream)._nextPutAll_("nil");
  3755. return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.UndefinedObject)})},
  3756. messageSends: ["nextPutAll:"]}),
  3757. smalltalk.UndefinedObject);
  3758. smalltalk.addMethod(
  3759. smalltalk.method({
  3760. selector: "shallowCopy",
  3761. fn: function (){
  3762. var self=this;
  3763. return smalltalk.withContext(function($ctx1) {
  3764. var $1;
  3765. $1=self;
  3766. return $1;
  3767. }, function($ctx1) {$ctx1.fill(self,"shallowCopy",{},smalltalk.UndefinedObject)})},
  3768. messageSends: []}),
  3769. smalltalk.UndefinedObject);
  3770. smalltalk.addMethod(
  3771. smalltalk.method({
  3772. selector: "subclass:instanceVariableNames:",
  3773. fn: function (aString,anotherString){
  3774. var self=this;
  3775. return smalltalk.withContext(function($ctx1) {
  3776. var $1;
  3777. $1=self._subclass_instanceVariableNames_package_(aString,anotherString,nil);
  3778. return $1;
  3779. }, function($ctx1) {$ctx1.fill(self,"subclass:instanceVariableNames:",{aString:aString,anotherString:anotherString},smalltalk.UndefinedObject)})},
  3780. messageSends: ["subclass:instanceVariableNames:package:"]}),
  3781. smalltalk.UndefinedObject);
  3782. smalltalk.addMethod(
  3783. smalltalk.method({
  3784. selector: "subclass:instanceVariableNames:category:",
  3785. fn: function (aString,aString2,aString3){
  3786. var self=this;
  3787. return smalltalk.withContext(function($ctx1) {
  3788. var $1;
  3789. self._deprecatedAPI();
  3790. $1=self._subclass_instanceVariableNames_package_(aString,aString2,aString3);
  3791. return $1;
  3792. }, function($ctx1) {$ctx1.fill(self,"subclass:instanceVariableNames:category:",{aString:aString,aString2:aString2,aString3:aString3},smalltalk.UndefinedObject)})},
  3793. messageSends: ["deprecatedAPI", "subclass:instanceVariableNames:package:"]}),
  3794. smalltalk.UndefinedObject);
  3795. smalltalk.addMethod(
  3796. smalltalk.method({
  3797. selector: "subclass:instanceVariableNames:package:",
  3798. fn: function (aString,aString2,aString3){
  3799. var self=this;
  3800. function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
  3801. return smalltalk.withContext(function($ctx1) {
  3802. var $1;
  3803. $1=_st(_st($ClassBuilder())._new())._superclass_subclass_instanceVariableNames_package_(self,_st(aString)._asString(),aString2,aString3);
  3804. return $1;
  3805. }, function($ctx1) {$ctx1.fill(self,"subclass:instanceVariableNames:package:",{aString:aString,aString2:aString2,aString3:aString3},smalltalk.UndefinedObject)})},
  3806. messageSends: ["superclass:subclass:instanceVariableNames:package:", "asString", "new"]}),
  3807. smalltalk.UndefinedObject);
  3808. smalltalk.addMethod(
  3809. smalltalk.method({
  3810. selector: "new",
  3811. fn: function (){
  3812. var self=this;
  3813. return smalltalk.withContext(function($ctx1) {
  3814. self._error_("You cannot create new instances of UndefinedObject. Use nil");
  3815. return self}, function($ctx1) {$ctx1.fill(self,"new",{},smalltalk.UndefinedObject.klass)})},
  3816. messageSends: ["error:"]}),
  3817. smalltalk.UndefinedObject.klass);
  3818. smalltalk.addMethod(
  3819. smalltalk.method({
  3820. selector: "asJavaScriptSelector",
  3821. fn: function (){
  3822. var self=this;
  3823. return smalltalk.withContext(function($ctx1) {
  3824. var $1;
  3825. $1=self._replace_with_("^([a-zA-Z0-9]*).*$","$1");
  3826. return $1;
  3827. }, function($ctx1) {$ctx1.fill(self,"asJavaScriptSelector",{},smalltalk.String)})},
  3828. messageSends: ["replace:with:"]}),
  3829. smalltalk.String);
  3830. })(global_smalltalk,global_nil,global__st);