Kernel-Objects.deploy.js 125 KB

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