Kernel-Objects.deploy.js 120 KB

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