1
0

Kernel-Objects.deploy.js 118 KB

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