Kernel-Objects.deploy.js 105 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612
  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('JSObjectProxy', smalltalk.Object, ['jsObject'], 'Kernel-Objects');
  1367. smalltalk.addMethod(
  1368. smalltalk.method({
  1369. selector: "addObjectVariablesTo:",
  1370. fn: function (aDictionary){
  1371. var self=this;
  1372. return smalltalk.withContext(function($ctx1) {
  1373. for(var i in self['@jsObject']) {
  1374. aDictionary._at_put_(i, self['@jsObject'][i]);
  1375. }
  1376. ;
  1377. return self}, function($ctx1) {$ctx1.fill(self,"addObjectVariablesTo:",{aDictionary:aDictionary},smalltalk.JSObjectProxy)})},
  1378. messageSends: []}),
  1379. smalltalk.JSObjectProxy);
  1380. smalltalk.addMethod(
  1381. smalltalk.method({
  1382. selector: "at:",
  1383. fn: function (aString){
  1384. var self=this;
  1385. return smalltalk.withContext(function($ctx1) {
  1386. return self['@jsObject'][aString];
  1387. return self}, function($ctx1) {$ctx1.fill(self,"at:",{aString:aString},smalltalk.JSObjectProxy)})},
  1388. messageSends: []}),
  1389. smalltalk.JSObjectProxy);
  1390. smalltalk.addMethod(
  1391. smalltalk.method({
  1392. selector: "at:ifAbsent:",
  1393. fn: function (aString,aBlock){
  1394. var self=this;
  1395. return smalltalk.withContext(function($ctx1) {
  1396. var obj = self['@jsObject'];
  1397. return aString in obj ? obj[aString] : aBlock();
  1398. ;
  1399. return self}, function($ctx1) {$ctx1.fill(self,"at:ifAbsent:",{aString:aString,aBlock:aBlock},smalltalk.JSObjectProxy)})},
  1400. messageSends: []}),
  1401. smalltalk.JSObjectProxy);
  1402. smalltalk.addMethod(
  1403. smalltalk.method({
  1404. selector: "at:ifPresent:",
  1405. fn: function (aString,aBlock){
  1406. var self=this;
  1407. return smalltalk.withContext(function($ctx1) {
  1408. var obj = self['@jsObject'];
  1409. return aString in obj ? aBlock(obj[aString]) : nil;
  1410. ;
  1411. return self}, function($ctx1) {$ctx1.fill(self,"at:ifPresent:",{aString:aString,aBlock:aBlock},smalltalk.JSObjectProxy)})},
  1412. messageSends: []}),
  1413. smalltalk.JSObjectProxy);
  1414. smalltalk.addMethod(
  1415. smalltalk.method({
  1416. selector: "at:ifPresent:ifAbsent:",
  1417. fn: function (aString,aBlock,anotherBlock){
  1418. var self=this;
  1419. return smalltalk.withContext(function($ctx1) {
  1420. var obj = self['@jsObject'];
  1421. return aString in obj ? aBlock(obj[aString]) : anotherBlock();
  1422. ;
  1423. return self}, function($ctx1) {$ctx1.fill(self,"at:ifPresent:ifAbsent:",{aString:aString,aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.JSObjectProxy)})},
  1424. messageSends: []}),
  1425. smalltalk.JSObjectProxy);
  1426. smalltalk.addMethod(
  1427. smalltalk.method({
  1428. selector: "at:put:",
  1429. fn: function (aString,anObject){
  1430. var self=this;
  1431. return smalltalk.withContext(function($ctx1) {
  1432. self['@jsObject'][aString] = anObject;
  1433. return self}, function($ctx1) {$ctx1.fill(self,"at:put:",{aString:aString,anObject:anObject},smalltalk.JSObjectProxy)})},
  1434. messageSends: []}),
  1435. smalltalk.JSObjectProxy);
  1436. smalltalk.addMethod(
  1437. smalltalk.method({
  1438. selector: "doesNotUnderstand:",
  1439. fn: function (aMessage){
  1440. var self=this;
  1441. return smalltalk.withContext(function($ctx1) {
  1442. var $2,$1;
  1443. $2=_st(self)._lookupProperty_(_st(_st(aMessage)._selector())._asJavaScriptSelector());
  1444. if(($receiver = $2) == nil || $receiver == undefined){
  1445. $1=smalltalk.Object.fn.prototype._doesNotUnderstand_.apply(_st(self), [aMessage]);
  1446. } else {
  1447. var jsSelector;
  1448. jsSelector=$receiver;
  1449. $1=_st(self)._forwardMessage_withArguments_(jsSelector,_st(aMessage)._arguments());
  1450. };
  1451. return $1;
  1452. }, function($ctx1) {$ctx1.fill(self,"doesNotUnderstand:",{aMessage:aMessage},smalltalk.JSObjectProxy)})},
  1453. messageSends: ["ifNil:ifNotNil:", "doesNotUnderstand:", "forwardMessage:withArguments:", "arguments", "lookupProperty:", "asJavaScriptSelector", "selector"]}),
  1454. smalltalk.JSObjectProxy);
  1455. smalltalk.addMethod(
  1456. smalltalk.method({
  1457. selector: "forwardMessage:withArguments:",
  1458. fn: function (aString,anArray){
  1459. var self=this;
  1460. return smalltalk.withContext(function($ctx1) {
  1461. return smalltalk.send(self._jsObject(), aString, anArray);
  1462. ;
  1463. return self}, function($ctx1) {$ctx1.fill(self,"forwardMessage:withArguments:",{aString:aString,anArray:anArray},smalltalk.JSObjectProxy)})},
  1464. messageSends: []}),
  1465. smalltalk.JSObjectProxy);
  1466. smalltalk.addMethod(
  1467. smalltalk.method({
  1468. selector: "inspectOn:",
  1469. fn: function (anInspector){
  1470. var self=this;
  1471. var variables;
  1472. function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  1473. return smalltalk.withContext(function($ctx1) {
  1474. variables=_st($Dictionary())._new();
  1475. _st(variables)._at_put_("#self",_st(self)._jsObject());
  1476. _st(anInspector)._setLabel_(_st(self)._printString());
  1477. _st(self)._addObjectVariablesTo_(variables);
  1478. _st(anInspector)._setVariables_(variables);
  1479. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},smalltalk.JSObjectProxy)})},
  1480. messageSends: ["new", "at:put:", "jsObject", "setLabel:", "printString", "addObjectVariablesTo:", "setVariables:"]}),
  1481. smalltalk.JSObjectProxy);
  1482. smalltalk.addMethod(
  1483. smalltalk.method({
  1484. selector: "jsObject",
  1485. fn: function (){
  1486. var self=this;
  1487. return smalltalk.withContext(function($ctx1) {
  1488. var $1;
  1489. $1=self["@jsObject"];
  1490. return $1;
  1491. }, function($ctx1) {$ctx1.fill(self,"jsObject",{},smalltalk.JSObjectProxy)})},
  1492. messageSends: []}),
  1493. smalltalk.JSObjectProxy);
  1494. smalltalk.addMethod(
  1495. smalltalk.method({
  1496. selector: "jsObject:",
  1497. fn: function (aJSObject){
  1498. var self=this;
  1499. return smalltalk.withContext(function($ctx1) {
  1500. self["@jsObject"]=aJSObject;
  1501. return self}, function($ctx1) {$ctx1.fill(self,"jsObject:",{aJSObject:aJSObject},smalltalk.JSObjectProxy)})},
  1502. messageSends: []}),
  1503. smalltalk.JSObjectProxy);
  1504. smalltalk.addMethod(
  1505. smalltalk.method({
  1506. selector: "keysAndValuesDo:",
  1507. fn: function (aBlock){
  1508. var self=this;
  1509. return smalltalk.withContext(function($ctx1) {
  1510. var o = self['@jsObject'];
  1511. for(var i in o) {
  1512. aBlock(i, o[i]);
  1513. }
  1514. ;
  1515. return self}, function($ctx1) {$ctx1.fill(self,"keysAndValuesDo:",{aBlock:aBlock},smalltalk.JSObjectProxy)})},
  1516. messageSends: []}),
  1517. smalltalk.JSObjectProxy);
  1518. smalltalk.addMethod(
  1519. smalltalk.method({
  1520. selector: "lookupProperty:",
  1521. fn: function (aString){
  1522. var self=this;
  1523. return smalltalk.withContext(function($ctx1) {
  1524. return aString in self._jsObject() ? aString : nil;
  1525. return self}, function($ctx1) {$ctx1.fill(self,"lookupProperty:",{aString:aString},smalltalk.JSObjectProxy)})},
  1526. messageSends: []}),
  1527. smalltalk.JSObjectProxy);
  1528. smalltalk.addMethod(
  1529. smalltalk.method({
  1530. selector: "printOn:",
  1531. fn: function (aStream){
  1532. var self=this;
  1533. return smalltalk.withContext(function($ctx1) {
  1534. _st(aStream)._nextPutAll_(_st(_st(self)._jsObject())._toString());
  1535. return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.JSObjectProxy)})},
  1536. messageSends: ["nextPutAll:", "toString", "jsObject"]}),
  1537. smalltalk.JSObjectProxy);
  1538. smalltalk.addMethod(
  1539. smalltalk.method({
  1540. selector: "value",
  1541. fn: function (){
  1542. var self=this;
  1543. return smalltalk.withContext(function($ctx1) {
  1544. var $1;
  1545. $1=_st(self)._at_ifAbsent_("value",(function(){
  1546. return smalltalk.withContext(function($ctx2) {
  1547. return smalltalk.Object.fn.prototype._value.apply(_st(self), []);
  1548. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1549. return $1;
  1550. }, function($ctx1) {$ctx1.fill(self,"value",{},smalltalk.JSObjectProxy)})},
  1551. messageSends: ["at:ifAbsent:", "value"]}),
  1552. smalltalk.JSObjectProxy);
  1553. smalltalk.addMethod(
  1554. smalltalk.method({
  1555. selector: "on:",
  1556. fn: function (aJSObject){
  1557. var self=this;
  1558. return smalltalk.withContext(function($ctx1) {
  1559. var $2,$3,$1;
  1560. $2=_st(self)._new();
  1561. _st($2)._jsObject_(aJSObject);
  1562. $3=_st($2)._yourself();
  1563. $1=$3;
  1564. return $1;
  1565. }, function($ctx1) {$ctx1.fill(self,"on:",{aJSObject:aJSObject},smalltalk.JSObjectProxy.klass)})},
  1566. messageSends: ["jsObject:", "new", "yourself"]}),
  1567. smalltalk.JSObjectProxy.klass);
  1568. smalltalk.addClass('Number', smalltalk.Object, [], 'Kernel-Objects');
  1569. smalltalk.addMethod(
  1570. smalltalk.method({
  1571. selector: "&",
  1572. fn: function (aNumber){
  1573. var self=this;
  1574. return smalltalk.withContext(function($ctx1) {
  1575. return self & aNumber;
  1576. return self}, function($ctx1) {$ctx1.fill(self,"&",{aNumber:aNumber},smalltalk.Number)})},
  1577. messageSends: []}),
  1578. smalltalk.Number);
  1579. smalltalk.addMethod(
  1580. smalltalk.method({
  1581. selector: "*",
  1582. fn: function (aNumber){
  1583. var self=this;
  1584. return smalltalk.withContext(function($ctx1) {
  1585. return self * aNumber;
  1586. return self}, function($ctx1) {$ctx1.fill(self,"*",{aNumber:aNumber},smalltalk.Number)})},
  1587. messageSends: []}),
  1588. smalltalk.Number);
  1589. smalltalk.addMethod(
  1590. smalltalk.method({
  1591. selector: "+",
  1592. fn: function (aNumber){
  1593. var self=this;
  1594. return smalltalk.withContext(function($ctx1) {
  1595. return self + aNumber;
  1596. return self}, function($ctx1) {$ctx1.fill(self,"+",{aNumber:aNumber},smalltalk.Number)})},
  1597. messageSends: []}),
  1598. smalltalk.Number);
  1599. smalltalk.addMethod(
  1600. smalltalk.method({
  1601. selector: "-",
  1602. fn: function (aNumber){
  1603. var self=this;
  1604. return smalltalk.withContext(function($ctx1) {
  1605. return self - aNumber;
  1606. return self}, function($ctx1) {$ctx1.fill(self,"-",{aNumber:aNumber},smalltalk.Number)})},
  1607. messageSends: []}),
  1608. smalltalk.Number);
  1609. smalltalk.addMethod(
  1610. smalltalk.method({
  1611. selector: "/",
  1612. fn: function (aNumber){
  1613. var self=this;
  1614. return smalltalk.withContext(function($ctx1) {
  1615. return self / aNumber;
  1616. return self}, function($ctx1) {$ctx1.fill(self,"/",{aNumber:aNumber},smalltalk.Number)})},
  1617. messageSends: []}),
  1618. smalltalk.Number);
  1619. smalltalk.addMethod(
  1620. smalltalk.method({
  1621. selector: "<",
  1622. fn: function (aNumber){
  1623. var self=this;
  1624. return smalltalk.withContext(function($ctx1) {
  1625. return self < aNumber;
  1626. return self}, function($ctx1) {$ctx1.fill(self,"<",{aNumber:aNumber},smalltalk.Number)})},
  1627. messageSends: []}),
  1628. smalltalk.Number);
  1629. smalltalk.addMethod(
  1630. smalltalk.method({
  1631. selector: "<=",
  1632. fn: function (aNumber){
  1633. var self=this;
  1634. return smalltalk.withContext(function($ctx1) {
  1635. return self <= aNumber;
  1636. return self}, function($ctx1) {$ctx1.fill(self,"<=",{aNumber:aNumber},smalltalk.Number)})},
  1637. messageSends: []}),
  1638. smalltalk.Number);
  1639. smalltalk.addMethod(
  1640. smalltalk.method({
  1641. selector: "=",
  1642. fn: function (aNumber){
  1643. var self=this;
  1644. return smalltalk.withContext(function($ctx1) {
  1645. if(! aNumber._isNumber || ! aNumber._isNumber()) {
  1646. return false;
  1647. }
  1648. return Number(self) == aNumber
  1649. ;
  1650. return self}, function($ctx1) {$ctx1.fill(self,"=",{aNumber:aNumber},smalltalk.Number)})},
  1651. messageSends: []}),
  1652. smalltalk.Number);
  1653. smalltalk.addMethod(
  1654. smalltalk.method({
  1655. selector: ">",
  1656. fn: function (aNumber){
  1657. var self=this;
  1658. return smalltalk.withContext(function($ctx1) {
  1659. return self > aNumber;
  1660. return self}, function($ctx1) {$ctx1.fill(self,">",{aNumber:aNumber},smalltalk.Number)})},
  1661. messageSends: []}),
  1662. smalltalk.Number);
  1663. smalltalk.addMethod(
  1664. smalltalk.method({
  1665. selector: ">=",
  1666. fn: function (aNumber){
  1667. var self=this;
  1668. return smalltalk.withContext(function($ctx1) {
  1669. return self >= aNumber;
  1670. return self}, function($ctx1) {$ctx1.fill(self,">=",{aNumber:aNumber},smalltalk.Number)})},
  1671. messageSends: []}),
  1672. smalltalk.Number);
  1673. smalltalk.addMethod(
  1674. smalltalk.method({
  1675. selector: "@",
  1676. fn: function (aNumber){
  1677. var self=this;
  1678. function $Point(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}
  1679. return smalltalk.withContext(function($ctx1) {
  1680. var $1;
  1681. $1=_st($Point())._x_y_(self,aNumber);
  1682. return $1;
  1683. }, function($ctx1) {$ctx1.fill(self,"@",{aNumber:aNumber},smalltalk.Number)})},
  1684. messageSends: ["x:y:"]}),
  1685. smalltalk.Number);
  1686. smalltalk.addMethod(
  1687. smalltalk.method({
  1688. selector: "IsImmutable",
  1689. fn: function (){
  1690. var self=this;
  1691. return smalltalk.withContext(function($ctx1) {
  1692. return true;
  1693. }, function($ctx1) {$ctx1.fill(self,"IsImmutable",{},smalltalk.Number)})},
  1694. messageSends: []}),
  1695. smalltalk.Number);
  1696. smalltalk.addMethod(
  1697. smalltalk.method({
  1698. selector: "\x5c\x5c",
  1699. fn: function (aNumber){
  1700. var self=this;
  1701. return smalltalk.withContext(function($ctx1) {
  1702. return self % aNumber;
  1703. return self}, function($ctx1) {$ctx1.fill(self,"\x5c\x5c",{aNumber:aNumber},smalltalk.Number)})},
  1704. messageSends: []}),
  1705. smalltalk.Number);
  1706. smalltalk.addMethod(
  1707. smalltalk.method({
  1708. selector: "abs",
  1709. fn: function (){
  1710. var self=this;
  1711. return smalltalk.withContext(function($ctx1) {
  1712. return Math.abs(self);;
  1713. return self}, function($ctx1) {$ctx1.fill(self,"abs",{},smalltalk.Number)})},
  1714. messageSends: []}),
  1715. smalltalk.Number);
  1716. smalltalk.addMethod(
  1717. smalltalk.method({
  1718. selector: "asJSON",
  1719. fn: function (){
  1720. var self=this;
  1721. return smalltalk.withContext(function($ctx1) {
  1722. var $1;
  1723. $1=self;
  1724. return $1;
  1725. }, function($ctx1) {$ctx1.fill(self,"asJSON",{},smalltalk.Number)})},
  1726. messageSends: []}),
  1727. smalltalk.Number);
  1728. smalltalk.addMethod(
  1729. smalltalk.method({
  1730. selector: "asJavascript",
  1731. fn: function (){
  1732. var self=this;
  1733. return smalltalk.withContext(function($ctx1) {
  1734. var $1;
  1735. $1=_st(_st("(").__comma(_st(self)._printString())).__comma(")");
  1736. return $1;
  1737. }, function($ctx1) {$ctx1.fill(self,"asJavascript",{},smalltalk.Number)})},
  1738. messageSends: [",", "printString"]}),
  1739. smalltalk.Number);
  1740. smalltalk.addMethod(
  1741. smalltalk.method({
  1742. selector: "asPoint",
  1743. fn: function (){
  1744. var self=this;
  1745. function $Point(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}
  1746. return smalltalk.withContext(function($ctx1) {
  1747. var $1;
  1748. $1=_st($Point())._x_y_(self,self);
  1749. return $1;
  1750. }, function($ctx1) {$ctx1.fill(self,"asPoint",{},smalltalk.Number)})},
  1751. messageSends: ["x:y:"]}),
  1752. smalltalk.Number);
  1753. smalltalk.addMethod(
  1754. smalltalk.method({
  1755. selector: "asString",
  1756. fn: function (){
  1757. var self=this;
  1758. return smalltalk.withContext(function($ctx1) {
  1759. return String(self) ;
  1760. return self}, function($ctx1) {$ctx1.fill(self,"asString",{},smalltalk.Number)})},
  1761. messageSends: []}),
  1762. smalltalk.Number);
  1763. smalltalk.addMethod(
  1764. smalltalk.method({
  1765. selector: "atRandom",
  1766. fn: function (){
  1767. var self=this;
  1768. function $Random(){return smalltalk.Random||(typeof Random=="undefined"?nil:Random)}
  1769. return smalltalk.withContext(function($ctx1) {
  1770. var $1;
  1771. $1=_st(_st(_st(_st(_st($Random())._new())._next()).__star(self))._truncated()).__plus((1));
  1772. return $1;
  1773. }, function($ctx1) {$ctx1.fill(self,"atRandom",{},smalltalk.Number)})},
  1774. messageSends: ["+", "truncated", "*", "next", "new"]}),
  1775. smalltalk.Number);
  1776. smalltalk.addMethod(
  1777. smalltalk.method({
  1778. selector: "copy",
  1779. fn: function (){
  1780. var self=this;
  1781. return smalltalk.withContext(function($ctx1) {
  1782. var $1;
  1783. $1=self;
  1784. return $1;
  1785. }, function($ctx1) {$ctx1.fill(self,"copy",{},smalltalk.Number)})},
  1786. messageSends: []}),
  1787. smalltalk.Number);
  1788. smalltalk.addMethod(
  1789. smalltalk.method({
  1790. selector: "deepCopy",
  1791. fn: function (){
  1792. var self=this;
  1793. return smalltalk.withContext(function($ctx1) {
  1794. var $1;
  1795. $1=_st(self)._copy();
  1796. return $1;
  1797. }, function($ctx1) {$ctx1.fill(self,"deepCopy",{},smalltalk.Number)})},
  1798. messageSends: ["copy"]}),
  1799. smalltalk.Number);
  1800. smalltalk.addMethod(
  1801. smalltalk.method({
  1802. selector: "even",
  1803. fn: function (){
  1804. var self=this;
  1805. return smalltalk.withContext(function($ctx1) {
  1806. var $1;
  1807. $1=_st((0)).__eq(_st(self).__backslash_backslash((2)));
  1808. return $1;
  1809. }, function($ctx1) {$ctx1.fill(self,"even",{},smalltalk.Number)})},
  1810. messageSends: ["=", "\x5c\x5c"]}),
  1811. smalltalk.Number);
  1812. smalltalk.addMethod(
  1813. smalltalk.method({
  1814. selector: "identityHash",
  1815. fn: function (){
  1816. var self=this;
  1817. return smalltalk.withContext(function($ctx1) {
  1818. var $1;
  1819. $1=_st(_st(self)._asString()).__comma("n");
  1820. return $1;
  1821. }, function($ctx1) {$ctx1.fill(self,"identityHash",{},smalltalk.Number)})},
  1822. messageSends: [",", "asString"]}),
  1823. smalltalk.Number);
  1824. smalltalk.addMethod(
  1825. smalltalk.method({
  1826. selector: "isNumber",
  1827. fn: function (){
  1828. var self=this;
  1829. return smalltalk.withContext(function($ctx1) {
  1830. return true;
  1831. }, function($ctx1) {$ctx1.fill(self,"isNumber",{},smalltalk.Number)})},
  1832. messageSends: []}),
  1833. smalltalk.Number);
  1834. smalltalk.addMethod(
  1835. smalltalk.method({
  1836. selector: "isZero",
  1837. fn: function (){
  1838. var self=this;
  1839. return smalltalk.withContext(function($ctx1) {
  1840. var $1;
  1841. $1=_st(self).__eq((0));
  1842. return $1;
  1843. }, function($ctx1) {$ctx1.fill(self,"isZero",{},smalltalk.Number)})},
  1844. messageSends: ["="]}),
  1845. smalltalk.Number);
  1846. smalltalk.addMethod(
  1847. smalltalk.method({
  1848. selector: "max:",
  1849. fn: function (aNumber){
  1850. var self=this;
  1851. return smalltalk.withContext(function($ctx1) {
  1852. return Math.max(self, aNumber);;
  1853. return self}, function($ctx1) {$ctx1.fill(self,"max:",{aNumber:aNumber},smalltalk.Number)})},
  1854. messageSends: []}),
  1855. smalltalk.Number);
  1856. smalltalk.addMethod(
  1857. smalltalk.method({
  1858. selector: "min:",
  1859. fn: function (aNumber){
  1860. var self=this;
  1861. return smalltalk.withContext(function($ctx1) {
  1862. return Math.min(self, aNumber);;
  1863. return self}, function($ctx1) {$ctx1.fill(self,"min:",{aNumber:aNumber},smalltalk.Number)})},
  1864. messageSends: []}),
  1865. smalltalk.Number);
  1866. smalltalk.addMethod(
  1867. smalltalk.method({
  1868. selector: "negated",
  1869. fn: function (){
  1870. var self=this;
  1871. return smalltalk.withContext(function($ctx1) {
  1872. var $1;
  1873. $1=_st((0)).__minus(self);
  1874. return $1;
  1875. }, function($ctx1) {$ctx1.fill(self,"negated",{},smalltalk.Number)})},
  1876. messageSends: ["-"]}),
  1877. smalltalk.Number);
  1878. smalltalk.addMethod(
  1879. smalltalk.method({
  1880. selector: "negative",
  1881. fn: function (){
  1882. var self=this;
  1883. return smalltalk.withContext(function($ctx1) {
  1884. var $1;
  1885. $1=_st(self).__lt((0));
  1886. return $1;
  1887. }, function($ctx1) {$ctx1.fill(self,"negative",{},smalltalk.Number)})},
  1888. messageSends: ["<"]}),
  1889. smalltalk.Number);
  1890. smalltalk.addMethod(
  1891. smalltalk.method({
  1892. selector: "odd",
  1893. fn: function (){
  1894. var self=this;
  1895. return smalltalk.withContext(function($ctx1) {
  1896. var $1;
  1897. $1=_st(_st(self)._even())._not();
  1898. return $1;
  1899. }, function($ctx1) {$ctx1.fill(self,"odd",{},smalltalk.Number)})},
  1900. messageSends: ["not", "even"]}),
  1901. smalltalk.Number);
  1902. smalltalk.addMethod(
  1903. smalltalk.method({
  1904. selector: "positive",
  1905. fn: function (){
  1906. var self=this;
  1907. return smalltalk.withContext(function($ctx1) {
  1908. var $1;
  1909. $1=_st(self).__gt_eq((0));
  1910. return $1;
  1911. }, function($ctx1) {$ctx1.fill(self,"positive",{},smalltalk.Number)})},
  1912. messageSends: [">="]}),
  1913. smalltalk.Number);
  1914. smalltalk.addMethod(
  1915. smalltalk.method({
  1916. selector: "printOn:",
  1917. fn: function (aStream){
  1918. var self=this;
  1919. return smalltalk.withContext(function($ctx1) {
  1920. _st(aStream)._nextPutAll_(_st(self)._asString());
  1921. return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.Number)})},
  1922. messageSends: ["nextPutAll:", "asString"]}),
  1923. smalltalk.Number);
  1924. smalltalk.addMethod(
  1925. smalltalk.method({
  1926. selector: "printShowingDecimalPlaces:",
  1927. fn: function (placesDesired){
  1928. var self=this;
  1929. return smalltalk.withContext(function($ctx1) {
  1930. return self.toFixed(placesDesired);
  1931. return self}, function($ctx1) {$ctx1.fill(self,"printShowingDecimalPlaces:",{placesDesired:placesDesired},smalltalk.Number)})},
  1932. messageSends: []}),
  1933. smalltalk.Number);
  1934. smalltalk.addMethod(
  1935. smalltalk.method({
  1936. selector: "rounded",
  1937. fn: function (){
  1938. var self=this;
  1939. return smalltalk.withContext(function($ctx1) {
  1940. return Math.round(self);;
  1941. return self}, function($ctx1) {$ctx1.fill(self,"rounded",{},smalltalk.Number)})},
  1942. messageSends: []}),
  1943. smalltalk.Number);
  1944. smalltalk.addMethod(
  1945. smalltalk.method({
  1946. selector: "sqrt",
  1947. fn: function (){
  1948. var self=this;
  1949. return smalltalk.withContext(function($ctx1) {
  1950. return Math.sqrt(self);
  1951. return self}, function($ctx1) {$ctx1.fill(self,"sqrt",{},smalltalk.Number)})},
  1952. messageSends: []}),
  1953. smalltalk.Number);
  1954. smalltalk.addMethod(
  1955. smalltalk.method({
  1956. selector: "squared",
  1957. fn: function (){
  1958. var self=this;
  1959. return smalltalk.withContext(function($ctx1) {
  1960. var $1;
  1961. $1=_st(self).__star(self);
  1962. return $1;
  1963. }, function($ctx1) {$ctx1.fill(self,"squared",{},smalltalk.Number)})},
  1964. messageSends: ["*"]}),
  1965. smalltalk.Number);
  1966. smalltalk.addMethod(
  1967. smalltalk.method({
  1968. selector: "timesRepeat:",
  1969. fn: function (aBlock){
  1970. var self=this;
  1971. var count;
  1972. return smalltalk.withContext(function($ctx1) {
  1973. count=(1);
  1974. _st((function(){
  1975. return smalltalk.withContext(function($ctx2) {
  1976. return _st(count).__gt(self);
  1977. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileFalse_((function(){
  1978. return smalltalk.withContext(function($ctx2) {
  1979. _st(aBlock)._value();
  1980. count=_st(count).__plus((1));
  1981. return count;
  1982. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1983. return self}, function($ctx1) {$ctx1.fill(self,"timesRepeat:",{aBlock:aBlock,count:count},smalltalk.Number)})},
  1984. messageSends: ["whileFalse:", "value", "+", ">"]}),
  1985. smalltalk.Number);
  1986. smalltalk.addMethod(
  1987. smalltalk.method({
  1988. selector: "to:",
  1989. fn: function (aNumber){
  1990. var self=this;
  1991. var array,first,last,count;
  1992. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  1993. return smalltalk.withContext(function($ctx1) {
  1994. var $1;
  1995. first=_st(self)._truncated();
  1996. last=_st(_st(aNumber)._truncated()).__plus((1));
  1997. count=(1);
  1998. array=_st($Array())._new();
  1999. _st(_st(last).__minus(first))._timesRepeat_((function(){
  2000. return smalltalk.withContext(function($ctx2) {
  2001. _st(array)._at_put_(count,first);
  2002. count=_st(count).__plus((1));
  2003. count;
  2004. first=_st(first).__plus((1));
  2005. return first;
  2006. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2007. $1=array;
  2008. return $1;
  2009. }, function($ctx1) {$ctx1.fill(self,"to:",{aNumber:aNumber,array:array,first:first,last:last,count:count},smalltalk.Number)})},
  2010. messageSends: ["truncated", "+", "new", "timesRepeat:", "at:put:", "-"]}),
  2011. smalltalk.Number);
  2012. smalltalk.addMethod(
  2013. smalltalk.method({
  2014. selector: "to:by:",
  2015. fn: function (stop,step){
  2016. var self=this;
  2017. var array,value,pos;
  2018. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  2019. return smalltalk.withContext(function($ctx1) {
  2020. var $1,$2,$3;
  2021. value=self;
  2022. array=_st($Array())._new();
  2023. pos=(1);
  2024. $1=_st(step).__eq((0));
  2025. if(smalltalk.assert($1)){
  2026. _st(self)._error_("step must be non-zero");
  2027. };
  2028. $2=_st(step).__lt((0));
  2029. if(smalltalk.assert($2)){
  2030. _st((function(){
  2031. return smalltalk.withContext(function($ctx2) {
  2032. return _st(value).__gt_eq(stop);
  2033. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileTrue_((function(){
  2034. return smalltalk.withContext(function($ctx2) {
  2035. _st(array)._at_put_(pos,value);
  2036. pos=_st(pos).__plus((1));
  2037. pos;
  2038. value=_st(value).__plus(step);
  2039. return value;
  2040. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2041. } else {
  2042. _st((function(){
  2043. return smalltalk.withContext(function($ctx2) {
  2044. return _st(value).__lt_eq(stop);
  2045. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileTrue_((function(){
  2046. return smalltalk.withContext(function($ctx2) {
  2047. _st(array)._at_put_(pos,value);
  2048. pos=_st(pos).__plus((1));
  2049. pos;
  2050. value=_st(value).__plus(step);
  2051. return value;
  2052. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2053. };
  2054. $3=array;
  2055. return $3;
  2056. }, function($ctx1) {$ctx1.fill(self,"to:by:",{stop:stop,step:step,array:array,value:value,pos:pos},smalltalk.Number)})},
  2057. messageSends: ["new", "ifTrue:", "error:", "=", "ifTrue:ifFalse:", "whileTrue:", "at:put:", "+", ">=", "<=", "<"]}),
  2058. smalltalk.Number);
  2059. smalltalk.addMethod(
  2060. smalltalk.method({
  2061. selector: "to:by:do:",
  2062. fn: function (stop,step,aBlock){
  2063. var self=this;
  2064. var value;
  2065. return smalltalk.withContext(function($ctx1) {
  2066. var $1,$2;
  2067. value=self;
  2068. $1=_st(step).__eq((0));
  2069. if(smalltalk.assert($1)){
  2070. _st(self)._error_("step must be non-zero");
  2071. };
  2072. $2=_st(step).__lt((0));
  2073. if(smalltalk.assert($2)){
  2074. _st((function(){
  2075. return smalltalk.withContext(function($ctx2) {
  2076. return _st(value).__gt_eq(stop);
  2077. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileTrue_((function(){
  2078. return smalltalk.withContext(function($ctx2) {
  2079. _st(aBlock)._value_(value);
  2080. value=_st(value).__plus(step);
  2081. return value;
  2082. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2083. } else {
  2084. _st((function(){
  2085. return smalltalk.withContext(function($ctx2) {
  2086. return _st(value).__lt_eq(stop);
  2087. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileTrue_((function(){
  2088. return smalltalk.withContext(function($ctx2) {
  2089. _st(aBlock)._value_(value);
  2090. value=_st(value).__plus(step);
  2091. return value;
  2092. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2093. };
  2094. return self}, function($ctx1) {$ctx1.fill(self,"to:by:do:",{stop:stop,step:step,aBlock:aBlock,value:value},smalltalk.Number)})},
  2095. messageSends: ["ifTrue:", "error:", "=", "ifTrue:ifFalse:", "whileTrue:", "value:", "+", ">=", "<=", "<"]}),
  2096. smalltalk.Number);
  2097. smalltalk.addMethod(
  2098. smalltalk.method({
  2099. selector: "to:do:",
  2100. fn: function (stop,aBlock){
  2101. var self=this;
  2102. var nextValue;
  2103. return smalltalk.withContext(function($ctx1) {
  2104. nextValue=self;
  2105. _st((function(){
  2106. return smalltalk.withContext(function($ctx2) {
  2107. return _st(nextValue).__lt_eq(stop);
  2108. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileTrue_((function(){
  2109. return smalltalk.withContext(function($ctx2) {
  2110. _st(aBlock)._value_(nextValue);
  2111. nextValue=_st(nextValue).__plus((1));
  2112. return nextValue;
  2113. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2114. return self}, function($ctx1) {$ctx1.fill(self,"to:do:",{stop:stop,aBlock:aBlock,nextValue:nextValue},smalltalk.Number)})},
  2115. messageSends: ["whileTrue:", "value:", "+", "<="]}),
  2116. smalltalk.Number);
  2117. smalltalk.addMethod(
  2118. smalltalk.method({
  2119. selector: "truncated",
  2120. fn: function (){
  2121. var self=this;
  2122. return smalltalk.withContext(function($ctx1) {
  2123. if(self >= 0) {
  2124. return Math.floor(self);
  2125. } else {
  2126. return Math.floor(self * (-1)) * (-1);
  2127. };
  2128. ;
  2129. return self}, function($ctx1) {$ctx1.fill(self,"truncated",{},smalltalk.Number)})},
  2130. messageSends: []}),
  2131. smalltalk.Number);
  2132. smalltalk.addMethod(
  2133. smalltalk.method({
  2134. selector: "|",
  2135. fn: function (aNumber){
  2136. var self=this;
  2137. return smalltalk.withContext(function($ctx1) {
  2138. return self | aNumber;
  2139. return self}, function($ctx1) {$ctx1.fill(self,"|",{aNumber:aNumber},smalltalk.Number)})},
  2140. messageSends: []}),
  2141. smalltalk.Number);
  2142. smalltalk.addMethod(
  2143. smalltalk.method({
  2144. selector: "pi",
  2145. fn: function (){
  2146. var self=this;
  2147. return smalltalk.withContext(function($ctx1) {
  2148. return Math.PI;
  2149. return self}, function($ctx1) {$ctx1.fill(self,"pi",{},smalltalk.Number.klass)})},
  2150. messageSends: []}),
  2151. smalltalk.Number.klass);
  2152. smalltalk.addClass('Organizer', smalltalk.Object, [], 'Kernel-Objects');
  2153. smalltalk.addMethod(
  2154. smalltalk.method({
  2155. selector: "addElement:",
  2156. fn: function (anObject){
  2157. var self=this;
  2158. return smalltalk.withContext(function($ctx1) {
  2159. self.elements.addElement(anObject);
  2160. return self}, function($ctx1) {$ctx1.fill(self,"addElement:",{anObject:anObject},smalltalk.Organizer)})},
  2161. messageSends: []}),
  2162. smalltalk.Organizer);
  2163. smalltalk.addMethod(
  2164. smalltalk.method({
  2165. selector: "elements",
  2166. fn: function (){
  2167. var self=this;
  2168. return smalltalk.withContext(function($ctx1) {
  2169. var $1;
  2170. $1=_st(_st(self)._basicAt_("elements"))._copy();
  2171. return $1;
  2172. }, function($ctx1) {$ctx1.fill(self,"elements",{},smalltalk.Organizer)})},
  2173. messageSends: ["copy", "basicAt:"]}),
  2174. smalltalk.Organizer);
  2175. smalltalk.addMethod(
  2176. smalltalk.method({
  2177. selector: "removeElement:",
  2178. fn: function (anObject){
  2179. var self=this;
  2180. return smalltalk.withContext(function($ctx1) {
  2181. self.elements.removeElement(anObject);
  2182. return self}, function($ctx1) {$ctx1.fill(self,"removeElement:",{anObject:anObject},smalltalk.Organizer)})},
  2183. messageSends: []}),
  2184. smalltalk.Organizer);
  2185. smalltalk.addClass('ClassOrganizer', smalltalk.Organizer, [], 'Kernel-Objects');
  2186. smalltalk.addMethod(
  2187. smalltalk.method({
  2188. selector: "addElement:",
  2189. fn: function (aString){
  2190. var self=this;
  2191. function $ProtocolAdded(){return smalltalk.ProtocolAdded||(typeof ProtocolAdded=="undefined"?nil:ProtocolAdded)}
  2192. function $SystemAnnouncer(){return smalltalk.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}
  2193. return smalltalk.withContext(function($ctx1) {
  2194. var $1,$2;
  2195. smalltalk.Organizer.fn.prototype._addElement_.apply(_st(self), [aString]);
  2196. $1=_st($ProtocolAdded())._new();
  2197. _st($1)._protocol_(aString);
  2198. _st($1)._theClass_(_st(self)._theClass());
  2199. $2=_st($1)._yourself();
  2200. _st(_st($SystemAnnouncer())._current())._announce_($2);
  2201. return self}, function($ctx1) {$ctx1.fill(self,"addElement:",{aString:aString},smalltalk.ClassOrganizer)})},
  2202. messageSends: ["addElement:", "announce:", "protocol:", "new", "theClass:", "theClass", "yourself", "current"]}),
  2203. smalltalk.ClassOrganizer);
  2204. smalltalk.addMethod(
  2205. smalltalk.method({
  2206. selector: "removeElement:",
  2207. fn: function (aString){
  2208. var self=this;
  2209. function $ProtocolRemoved(){return smalltalk.ProtocolRemoved||(typeof ProtocolRemoved=="undefined"?nil:ProtocolRemoved)}
  2210. function $SystemAnnouncer(){return smalltalk.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}
  2211. return smalltalk.withContext(function($ctx1) {
  2212. var $1,$2;
  2213. smalltalk.Organizer.fn.prototype._removeElement_.apply(_st(self), [aString]);
  2214. $1=_st($ProtocolRemoved())._new();
  2215. _st($1)._protocol_(aString);
  2216. _st($1)._theClass_(_st(self)._theClass());
  2217. $2=_st($1)._yourself();
  2218. _st(_st($SystemAnnouncer())._current())._announce_($2);
  2219. return self}, function($ctx1) {$ctx1.fill(self,"removeElement:",{aString:aString},smalltalk.ClassOrganizer)})},
  2220. messageSends: ["removeElement:", "announce:", "protocol:", "new", "theClass:", "theClass", "yourself", "current"]}),
  2221. smalltalk.ClassOrganizer);
  2222. smalltalk.addMethod(
  2223. smalltalk.method({
  2224. selector: "theClass",
  2225. fn: function (){
  2226. var self=this;
  2227. return smalltalk.withContext(function($ctx1) {
  2228. return self.theClass ;
  2229. return self}, function($ctx1) {$ctx1.fill(self,"theClass",{},smalltalk.ClassOrganizer)})},
  2230. messageSends: []}),
  2231. smalltalk.ClassOrganizer);
  2232. smalltalk.addClass('PackageOrganizer', smalltalk.Organizer, [], 'Kernel-Objects');
  2233. smalltalk.addClass('Package', smalltalk.Object, ['commitPathJs', 'commitPathSt'], 'Kernel-Objects');
  2234. smalltalk.addMethod(
  2235. smalltalk.method({
  2236. selector: "classes",
  2237. fn: function (){
  2238. var self=this;
  2239. return smalltalk.withContext(function($ctx1) {
  2240. var $1;
  2241. $1=_st(_st(self)._organization())._elements();
  2242. return $1;
  2243. }, function($ctx1) {$ctx1.fill(self,"classes",{},smalltalk.Package)})},
  2244. messageSends: ["elements", "organization"]}),
  2245. smalltalk.Package);
  2246. smalltalk.addMethod(
  2247. smalltalk.method({
  2248. selector: "commitPathJs",
  2249. fn: function (){
  2250. var self=this;
  2251. return smalltalk.withContext(function($ctx1) {
  2252. var $2,$1;
  2253. $2=self["@commitPathJs"];
  2254. if(($receiver = $2) == nil || $receiver == undefined){
  2255. $1=_st(_st(self)._class())._defaultCommitPathJs();
  2256. } else {
  2257. $1=$2;
  2258. };
  2259. return $1;
  2260. }, function($ctx1) {$ctx1.fill(self,"commitPathJs",{},smalltalk.Package)})},
  2261. messageSends: ["ifNil:", "defaultCommitPathJs", "class"]}),
  2262. smalltalk.Package);
  2263. smalltalk.addMethod(
  2264. smalltalk.method({
  2265. selector: "commitPathJs:",
  2266. fn: function (aString){
  2267. var self=this;
  2268. return smalltalk.withContext(function($ctx1) {
  2269. self["@commitPathJs"]=aString;
  2270. return self}, function($ctx1) {$ctx1.fill(self,"commitPathJs:",{aString:aString},smalltalk.Package)})},
  2271. messageSends: []}),
  2272. smalltalk.Package);
  2273. smalltalk.addMethod(
  2274. smalltalk.method({
  2275. selector: "commitPathSt",
  2276. fn: function (){
  2277. var self=this;
  2278. return smalltalk.withContext(function($ctx1) {
  2279. var $2,$1;
  2280. $2=self["@commitPathSt"];
  2281. if(($receiver = $2) == nil || $receiver == undefined){
  2282. $1=_st(_st(self)._class())._defaultCommitPathSt();
  2283. } else {
  2284. $1=$2;
  2285. };
  2286. return $1;
  2287. }, function($ctx1) {$ctx1.fill(self,"commitPathSt",{},smalltalk.Package)})},
  2288. messageSends: ["ifNil:", "defaultCommitPathSt", "class"]}),
  2289. smalltalk.Package);
  2290. smalltalk.addMethod(
  2291. smalltalk.method({
  2292. selector: "commitPathSt:",
  2293. fn: function (aString){
  2294. var self=this;
  2295. return smalltalk.withContext(function($ctx1) {
  2296. self["@commitPathSt"]=aString;
  2297. return self}, function($ctx1) {$ctx1.fill(self,"commitPathSt:",{aString:aString},smalltalk.Package)})},
  2298. messageSends: []}),
  2299. smalltalk.Package);
  2300. smalltalk.addMethod(
  2301. smalltalk.method({
  2302. selector: "isPackage",
  2303. fn: function (){
  2304. var self=this;
  2305. return smalltalk.withContext(function($ctx1) {
  2306. return true;
  2307. }, function($ctx1) {$ctx1.fill(self,"isPackage",{},smalltalk.Package)})},
  2308. messageSends: []}),
  2309. smalltalk.Package);
  2310. smalltalk.addMethod(
  2311. smalltalk.method({
  2312. selector: "name",
  2313. fn: function (){
  2314. var self=this;
  2315. return smalltalk.withContext(function($ctx1) {
  2316. return self.pkgName;
  2317. return self}, function($ctx1) {$ctx1.fill(self,"name",{},smalltalk.Package)})},
  2318. messageSends: []}),
  2319. smalltalk.Package);
  2320. smalltalk.addMethod(
  2321. smalltalk.method({
  2322. selector: "name:",
  2323. fn: function (aString){
  2324. var self=this;
  2325. return smalltalk.withContext(function($ctx1) {
  2326. self.pkgName = aString;
  2327. return self}, function($ctx1) {$ctx1.fill(self,"name:",{aString:aString},smalltalk.Package)})},
  2328. messageSends: []}),
  2329. smalltalk.Package);
  2330. smalltalk.addMethod(
  2331. smalltalk.method({
  2332. selector: "organization",
  2333. fn: function (){
  2334. var self=this;
  2335. return smalltalk.withContext(function($ctx1) {
  2336. var $1;
  2337. $1=_st(self)._basicAt_("organization");
  2338. return $1;
  2339. }, function($ctx1) {$ctx1.fill(self,"organization",{},smalltalk.Package)})},
  2340. messageSends: ["basicAt:"]}),
  2341. smalltalk.Package);
  2342. smalltalk.addMethod(
  2343. smalltalk.method({
  2344. selector: "printOn:",
  2345. fn: function (aStream){
  2346. var self=this;
  2347. return smalltalk.withContext(function($ctx1) {
  2348. var $1,$2;
  2349. smalltalk.Object.fn.prototype._printOn_.apply(_st(self), [aStream]);
  2350. $1=aStream;
  2351. _st($1)._nextPutAll_(" (");
  2352. _st($1)._nextPutAll_(_st(self)._name());
  2353. $2=_st($1)._nextPutAll_(")");
  2354. return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.Package)})},
  2355. messageSends: ["printOn:", "nextPutAll:", "name"]}),
  2356. smalltalk.Package);
  2357. smalltalk.addMethod(
  2358. smalltalk.method({
  2359. selector: "setupClasses",
  2360. fn: function (){
  2361. var self=this;
  2362. function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
  2363. return smalltalk.withContext(function($ctx1) {
  2364. var $1,$2;
  2365. $1=_st(self)._classes();
  2366. _st($1)._do_((function(each){
  2367. return smalltalk.withContext(function($ctx2) {
  2368. return _st(_st($ClassBuilder())._new())._setupClass_(each);
  2369. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  2370. $2=_st($1)._do_((function(each){
  2371. return smalltalk.withContext(function($ctx2) {
  2372. return _st(each)._initialize();
  2373. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  2374. return self}, function($ctx1) {$ctx1.fill(self,"setupClasses",{},smalltalk.Package)})},
  2375. messageSends: ["do:", "setupClass:", "new", "classes", "initialize"]}),
  2376. smalltalk.Package);
  2377. smalltalk.addMethod(
  2378. smalltalk.method({
  2379. selector: "sortedClasses",
  2380. fn: function (){
  2381. var self=this;
  2382. return smalltalk.withContext(function($ctx1) {
  2383. var $1;
  2384. $1=_st(_st(self)._class())._sortedClasses_(_st(self)._classes());
  2385. return $1;
  2386. }, function($ctx1) {$ctx1.fill(self,"sortedClasses",{},smalltalk.Package)})},
  2387. messageSends: ["sortedClasses:", "classes", "class"]}),
  2388. smalltalk.Package);
  2389. smalltalk.Package.klass.iVarNames = ['defaultCommitPathJs','defaultCommitPathSt'];
  2390. smalltalk.addMethod(
  2391. smalltalk.method({
  2392. selector: "commitPathsFromLoader",
  2393. fn: function (){
  2394. var self=this;
  2395. return smalltalk.withContext(function($ctx1) {
  2396. var commitPath = typeof amber !== 'undefined' && amber.commitPath;
  2397. if (!commitPath) return;
  2398. if (commitPath.js) self._defaultCommitPathJs_(commitPath.js);
  2399. if (commitPath.st) self._defaultCommitPathSt_(commitPath.st);
  2400. ;
  2401. return self}, function($ctx1) {$ctx1.fill(self,"commitPathsFromLoader",{},smalltalk.Package.klass)})},
  2402. messageSends: []}),
  2403. smalltalk.Package.klass);
  2404. smalltalk.addMethod(
  2405. smalltalk.method({
  2406. selector: "defaultCommitPathJs",
  2407. fn: function (){
  2408. var self=this;
  2409. return smalltalk.withContext(function($ctx1) {
  2410. var $2,$1;
  2411. $2=self["@defaultCommitPathJs"];
  2412. if(($receiver = $2) == nil || $receiver == undefined){
  2413. self["@defaultCommitPathJs"]="js";
  2414. $1=self["@defaultCommitPathJs"];
  2415. } else {
  2416. $1=$2;
  2417. };
  2418. return $1;
  2419. }, function($ctx1) {$ctx1.fill(self,"defaultCommitPathJs",{},smalltalk.Package.klass)})},
  2420. messageSends: ["ifNil:"]}),
  2421. smalltalk.Package.klass);
  2422. smalltalk.addMethod(
  2423. smalltalk.method({
  2424. selector: "defaultCommitPathJs:",
  2425. fn: function (aString){
  2426. var self=this;
  2427. return smalltalk.withContext(function($ctx1) {
  2428. self["@defaultCommitPathJs"]=aString;
  2429. return self}, function($ctx1) {$ctx1.fill(self,"defaultCommitPathJs:",{aString:aString},smalltalk.Package.klass)})},
  2430. messageSends: []}),
  2431. smalltalk.Package.klass);
  2432. smalltalk.addMethod(
  2433. smalltalk.method({
  2434. selector: "defaultCommitPathSt",
  2435. fn: function (){
  2436. var self=this;
  2437. return smalltalk.withContext(function($ctx1) {
  2438. var $2,$1;
  2439. $2=self["@defaultCommitPathSt"];
  2440. if(($receiver = $2) == nil || $receiver == undefined){
  2441. self["@defaultCommitPathSt"]="st";
  2442. $1=self["@defaultCommitPathSt"];
  2443. } else {
  2444. $1=$2;
  2445. };
  2446. return $1;
  2447. }, function($ctx1) {$ctx1.fill(self,"defaultCommitPathSt",{},smalltalk.Package.klass)})},
  2448. messageSends: ["ifNil:"]}),
  2449. smalltalk.Package.klass);
  2450. smalltalk.addMethod(
  2451. smalltalk.method({
  2452. selector: "defaultCommitPathSt:",
  2453. fn: function (aString){
  2454. var self=this;
  2455. return smalltalk.withContext(function($ctx1) {
  2456. self["@defaultCommitPathSt"]=aString;
  2457. return self}, function($ctx1) {$ctx1.fill(self,"defaultCommitPathSt:",{aString:aString},smalltalk.Package.klass)})},
  2458. messageSends: []}),
  2459. smalltalk.Package.klass);
  2460. smalltalk.addMethod(
  2461. smalltalk.method({
  2462. selector: "initialize",
  2463. fn: function (){
  2464. var self=this;
  2465. return smalltalk.withContext(function($ctx1) {
  2466. smalltalk.Object.klass.fn.prototype._initialize.apply(_st(self), []);
  2467. _st(self)._commitPathsFromLoader();
  2468. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.Package.klass)})},
  2469. messageSends: ["initialize", "commitPathsFromLoader"]}),
  2470. smalltalk.Package.klass);
  2471. smalltalk.addMethod(
  2472. smalltalk.method({
  2473. selector: "load:",
  2474. fn: function (aPackageName){
  2475. var self=this;
  2476. return smalltalk.withContext(function($ctx1) {
  2477. _st(self)._load_prefix_(aPackageName,_st(_st(self)._defaultCommitPathJs()).__comma("/"));
  2478. return self}, function($ctx1) {$ctx1.fill(self,"load:",{aPackageName:aPackageName},smalltalk.Package.klass)})},
  2479. messageSends: ["load:prefix:", ",", "defaultCommitPathJs"]}),
  2480. smalltalk.Package.klass);
  2481. smalltalk.addMethod(
  2482. smalltalk.method({
  2483. selector: "load:prefix:",
  2484. fn: function (aPackageName,aPrefix){
  2485. var self=this;
  2486. function $Package(){return smalltalk.Package||(typeof Package=="undefined"?nil:Package)}
  2487. return smalltalk.withContext(function($ctx1) {
  2488. _st(jQuery)._getScript_onSuccess_(_st(_st(aPrefix).__comma(aPackageName)).__comma(".js"),(function(){
  2489. return smalltalk.withContext(function($ctx2) {
  2490. return _st(_st($Package())._named_(aPackageName))._setupClasses();
  2491. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2492. return self}, function($ctx1) {$ctx1.fill(self,"load:prefix:",{aPackageName:aPackageName,aPrefix:aPrefix},smalltalk.Package.klass)})},
  2493. messageSends: ["getScript:onSuccess:", ",", "setupClasses", "named:"]}),
  2494. smalltalk.Package.klass);
  2495. smalltalk.addMethod(
  2496. smalltalk.method({
  2497. selector: "named:",
  2498. fn: function (aPackageName){
  2499. var self=this;
  2500. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  2501. return smalltalk.withContext(function($ctx1) {
  2502. var $1;
  2503. $1=_st(_st($Smalltalk())._current())._packageAt_(aPackageName);
  2504. return $1;
  2505. }, function($ctx1) {$ctx1.fill(self,"named:",{aPackageName:aPackageName},smalltalk.Package.klass)})},
  2506. messageSends: ["packageAt:", "current"]}),
  2507. smalltalk.Package.klass);
  2508. smalltalk.addMethod(
  2509. smalltalk.method({
  2510. selector: "named:ifAbsent:",
  2511. fn: function (aPackageName,aBlock){
  2512. var self=this;
  2513. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  2514. return smalltalk.withContext(function($ctx1) {
  2515. var $1;
  2516. $1=_st(_st($Smalltalk())._current())._packageAt_ifAbsent_(aPackageName,aBlock);
  2517. return $1;
  2518. }, function($ctx1) {$ctx1.fill(self,"named:ifAbsent:",{aPackageName:aPackageName,aBlock:aBlock},smalltalk.Package.klass)})},
  2519. messageSends: ["packageAt:ifAbsent:", "current"]}),
  2520. smalltalk.Package.klass);
  2521. smalltalk.addMethod(
  2522. smalltalk.method({
  2523. selector: "resetCommitPaths",
  2524. fn: function (){
  2525. var self=this;
  2526. return smalltalk.withContext(function($ctx1) {
  2527. self["@defaultCommitPathJs"]=nil;
  2528. self["@defaultCommitPathSt"]=nil;
  2529. return self}, function($ctx1) {$ctx1.fill(self,"resetCommitPaths",{},smalltalk.Package.klass)})},
  2530. messageSends: []}),
  2531. smalltalk.Package.klass);
  2532. smalltalk.addMethod(
  2533. smalltalk.method({
  2534. selector: "sortedClasses:",
  2535. fn: function (classes){
  2536. var self=this;
  2537. var children,others,nodes,expandedClasses;
  2538. function $ClassSorterNode(){return smalltalk.ClassSorterNode||(typeof ClassSorterNode=="undefined"?nil:ClassSorterNode)}
  2539. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  2540. return smalltalk.withContext(function($ctx1) {
  2541. var $1,$2;
  2542. children=[];
  2543. others=[];
  2544. _st(classes)._do_((function(each){
  2545. return smalltalk.withContext(function($ctx2) {
  2546. $1=_st(classes)._includes_(_st(each)._superclass());
  2547. if(smalltalk.assert($1)){
  2548. return _st(others)._add_(each);
  2549. } else {
  2550. return _st(children)._add_(each);
  2551. };
  2552. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  2553. nodes=_st(children)._collect_((function(each){
  2554. return smalltalk.withContext(function($ctx2) {
  2555. return _st($ClassSorterNode())._on_classes_level_(each,others,(0));
  2556. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  2557. nodes=_st(nodes)._sorted_((function(a,b){
  2558. return smalltalk.withContext(function($ctx2) {
  2559. return _st(_st(_st(a)._theClass())._name()).__lt_eq(_st(_st(b)._theClass())._name());
  2560. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1)})}));
  2561. expandedClasses=_st($Array())._new();
  2562. _st(nodes)._do_((function(aNode){
  2563. return smalltalk.withContext(function($ctx2) {
  2564. return _st(aNode)._traverseClassesWith_(expandedClasses);
  2565. }, function($ctx2) {$ctx2.fillBlock({aNode:aNode},$ctx1)})}));
  2566. $2=expandedClasses;
  2567. return $2;
  2568. }, function($ctx1) {$ctx1.fill(self,"sortedClasses:",{classes:classes,children:children,others:others,nodes:nodes,expandedClasses:expandedClasses},smalltalk.Package.klass)})},
  2569. messageSends: ["do:", "ifFalse:ifTrue:", "add:", "includes:", "superclass", "collect:", "on:classes:level:", "sorted:", "<=", "name", "theClass", "new", "traverseClassesWith:"]}),
  2570. smalltalk.Package.klass);
  2571. smalltalk.addClass('Point', smalltalk.Object, ['x', 'y'], 'Kernel-Objects');
  2572. smalltalk.addMethod(
  2573. smalltalk.method({
  2574. selector: "*",
  2575. fn: function (aPoint){
  2576. var self=this;
  2577. function $Point(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}
  2578. return smalltalk.withContext(function($ctx1) {
  2579. var $1;
  2580. $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()));
  2581. return $1;
  2582. }, function($ctx1) {$ctx1.fill(self,"*",{aPoint:aPoint},smalltalk.Point)})},
  2583. messageSends: ["x:y:", "*", "x", "asPoint", "y"]}),
  2584. smalltalk.Point);
  2585. smalltalk.addMethod(
  2586. smalltalk.method({
  2587. selector: "+",
  2588. fn: function (aPoint){
  2589. var self=this;
  2590. function $Point(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}
  2591. return smalltalk.withContext(function($ctx1) {
  2592. var $1;
  2593. $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()));
  2594. return $1;
  2595. }, function($ctx1) {$ctx1.fill(self,"+",{aPoint:aPoint},smalltalk.Point)})},
  2596. messageSends: ["x:y:", "+", "x", "asPoint", "y"]}),
  2597. smalltalk.Point);
  2598. smalltalk.addMethod(
  2599. smalltalk.method({
  2600. selector: "-",
  2601. fn: function (aPoint){
  2602. var self=this;
  2603. function $Point(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}
  2604. return smalltalk.withContext(function($ctx1) {
  2605. var $1;
  2606. $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()));
  2607. return $1;
  2608. }, function($ctx1) {$ctx1.fill(self,"-",{aPoint:aPoint},smalltalk.Point)})},
  2609. messageSends: ["x:y:", "-", "x", "asPoint", "y"]}),
  2610. smalltalk.Point);
  2611. smalltalk.addMethod(
  2612. smalltalk.method({
  2613. selector: "/",
  2614. fn: function (aPoint){
  2615. var self=this;
  2616. function $Point(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}
  2617. return smalltalk.withContext(function($ctx1) {
  2618. var $1;
  2619. $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()));
  2620. return $1;
  2621. }, function($ctx1) {$ctx1.fill(self,"/",{aPoint:aPoint},smalltalk.Point)})},
  2622. messageSends: ["x:y:", "/", "x", "asPoint", "y"]}),
  2623. smalltalk.Point);
  2624. smalltalk.addMethod(
  2625. smalltalk.method({
  2626. selector: "=",
  2627. fn: function (aPoint){
  2628. var self=this;
  2629. return smalltalk.withContext(function($ctx1) {
  2630. var $1;
  2631. $1=_st(_st(_st(aPoint)._class()).__eq(_st(self)._class()))._and_((function(){
  2632. return smalltalk.withContext(function($ctx2) {
  2633. return _st(_st(_st(aPoint)._x()).__eq(_st(self)._x())).__and(_st(_st(aPoint)._y()).__eq(_st(self)._y()));
  2634. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2635. return $1;
  2636. }, function($ctx1) {$ctx1.fill(self,"=",{aPoint:aPoint},smalltalk.Point)})},
  2637. messageSends: ["and:", "&", "=", "y", "x", "class"]}),
  2638. smalltalk.Point);
  2639. smalltalk.addMethod(
  2640. smalltalk.method({
  2641. selector: "asPoint",
  2642. fn: function (){
  2643. var self=this;
  2644. return smalltalk.withContext(function($ctx1) {
  2645. var $1;
  2646. $1=self;
  2647. return $1;
  2648. }, function($ctx1) {$ctx1.fill(self,"asPoint",{},smalltalk.Point)})},
  2649. messageSends: []}),
  2650. smalltalk.Point);
  2651. smalltalk.addMethod(
  2652. smalltalk.method({
  2653. selector: "printOn:",
  2654. fn: function (aStream){
  2655. var self=this;
  2656. return smalltalk.withContext(function($ctx1) {
  2657. var $1;
  2658. _st(self["@x"])._printOn_(aStream);
  2659. _st(aStream)._nextPutAll_("@");
  2660. $1=_st(_st(self["@y"])._notNil())._and_((function(){
  2661. return smalltalk.withContext(function($ctx2) {
  2662. return _st(self["@y"])._negative();
  2663. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2664. if(smalltalk.assert($1)){
  2665. _st(aStream)._space();
  2666. };
  2667. _st(self["@y"])._printOn_(aStream);
  2668. return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.Point)})},
  2669. messageSends: ["printOn:", "nextPutAll:", "ifTrue:", "space", "and:", "negative", "notNil"]}),
  2670. smalltalk.Point);
  2671. smalltalk.addMethod(
  2672. smalltalk.method({
  2673. selector: "translateBy:",
  2674. fn: function (delta){
  2675. var self=this;
  2676. return smalltalk.withContext(function($ctx1) {
  2677. var $1;
  2678. $1=_st(_st(_st(delta)._x()).__plus(self["@x"])).__at(_st(_st(delta)._y()).__plus(self["@y"]));
  2679. return $1;
  2680. }, function($ctx1) {$ctx1.fill(self,"translateBy:",{delta:delta},smalltalk.Point)})},
  2681. messageSends: ["@", "+", "y", "x"]}),
  2682. smalltalk.Point);
  2683. smalltalk.addMethod(
  2684. smalltalk.method({
  2685. selector: "x",
  2686. fn: function (){
  2687. var self=this;
  2688. return smalltalk.withContext(function($ctx1) {
  2689. var $1;
  2690. $1=self["@x"];
  2691. return $1;
  2692. }, function($ctx1) {$ctx1.fill(self,"x",{},smalltalk.Point)})},
  2693. messageSends: []}),
  2694. smalltalk.Point);
  2695. smalltalk.addMethod(
  2696. smalltalk.method({
  2697. selector: "x:",
  2698. fn: function (aNumber){
  2699. var self=this;
  2700. return smalltalk.withContext(function($ctx1) {
  2701. self["@x"]=aNumber;
  2702. return self}, function($ctx1) {$ctx1.fill(self,"x:",{aNumber:aNumber},smalltalk.Point)})},
  2703. messageSends: []}),
  2704. smalltalk.Point);
  2705. smalltalk.addMethod(
  2706. smalltalk.method({
  2707. selector: "y",
  2708. fn: function (){
  2709. var self=this;
  2710. return smalltalk.withContext(function($ctx1) {
  2711. var $1;
  2712. $1=self["@y"];
  2713. return $1;
  2714. }, function($ctx1) {$ctx1.fill(self,"y",{},smalltalk.Point)})},
  2715. messageSends: []}),
  2716. smalltalk.Point);
  2717. smalltalk.addMethod(
  2718. smalltalk.method({
  2719. selector: "y:",
  2720. fn: function (aNumber){
  2721. var self=this;
  2722. return smalltalk.withContext(function($ctx1) {
  2723. self["@y"]=aNumber;
  2724. return self}, function($ctx1) {$ctx1.fill(self,"y:",{aNumber:aNumber},smalltalk.Point)})},
  2725. messageSends: []}),
  2726. smalltalk.Point);
  2727. smalltalk.addMethod(
  2728. smalltalk.method({
  2729. selector: "x:y:",
  2730. fn: function (aNumber,anotherNumber){
  2731. var self=this;
  2732. return smalltalk.withContext(function($ctx1) {
  2733. var $2,$3,$1;
  2734. $2=_st(self)._new();
  2735. _st($2)._x_(aNumber);
  2736. _st($2)._y_(anotherNumber);
  2737. $3=_st($2)._yourself();
  2738. $1=$3;
  2739. return $1;
  2740. }, function($ctx1) {$ctx1.fill(self,"x:y:",{aNumber:aNumber,anotherNumber:anotherNumber},smalltalk.Point.klass)})},
  2741. messageSends: ["x:", "new", "y:", "yourself"]}),
  2742. smalltalk.Point.klass);
  2743. smalltalk.addClass('Random', smalltalk.Object, [], 'Kernel-Objects');
  2744. smalltalk.addMethod(
  2745. smalltalk.method({
  2746. selector: "next",
  2747. fn: function (){
  2748. var self=this;
  2749. return smalltalk.withContext(function($ctx1) {
  2750. return Math.random();
  2751. return self}, function($ctx1) {$ctx1.fill(self,"next",{},smalltalk.Random)})},
  2752. messageSends: []}),
  2753. smalltalk.Random);
  2754. smalltalk.addMethod(
  2755. smalltalk.method({
  2756. selector: "next:",
  2757. fn: function (anInteger){
  2758. var self=this;
  2759. return smalltalk.withContext(function($ctx1) {
  2760. var $1;
  2761. $1=_st(_st((1))._to_(anInteger))._collect_((function(each){
  2762. return smalltalk.withContext(function($ctx2) {
  2763. return _st(self)._next();
  2764. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  2765. return $1;
  2766. }, function($ctx1) {$ctx1.fill(self,"next:",{anInteger:anInteger},smalltalk.Random)})},
  2767. messageSends: ["collect:", "next", "to:"]}),
  2768. smalltalk.Random);
  2769. smalltalk.addClass('Smalltalk', smalltalk.Object, [], 'Kernel-Objects');
  2770. smalltalk.addMethod(
  2771. smalltalk.method({
  2772. selector: "asSmalltalkException:",
  2773. fn: function (anObject){
  2774. var self=this;
  2775. function $JavaScriptException(){return smalltalk.JavaScriptException||(typeof JavaScriptException=="undefined"?nil:JavaScriptException)}
  2776. function $Error(){return smalltalk.Error||(typeof Error=="undefined"?nil:Error)}
  2777. return smalltalk.withContext(function($ctx1) {
  2778. var $2,$1;
  2779. $2=_st(_st(self)._isSmalltalkObject_(anObject))._and_((function(){
  2780. return smalltalk.withContext(function($ctx2) {
  2781. return _st(anObject)._isKindOf_($Error());
  2782. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2783. if(smalltalk.assert($2)){
  2784. $1=anObject;
  2785. } else {
  2786. $1=_st($JavaScriptException())._on_(anObject);
  2787. };
  2788. return $1;
  2789. }, function($ctx1) {$ctx1.fill(self,"asSmalltalkException:",{anObject:anObject},smalltalk.Smalltalk)})},
  2790. messageSends: ["ifTrue:ifFalse:", "on:", "and:", "isKindOf:", "isSmalltalkObject:"]}),
  2791. smalltalk.Smalltalk);
  2792. smalltalk.addMethod(
  2793. smalltalk.method({
  2794. selector: "at:",
  2795. fn: function (aString){
  2796. var self=this;
  2797. return smalltalk.withContext(function($ctx1) {
  2798. return self[aString];
  2799. return self}, function($ctx1) {$ctx1.fill(self,"at:",{aString:aString},smalltalk.Smalltalk)})},
  2800. messageSends: []}),
  2801. smalltalk.Smalltalk);
  2802. smalltalk.addMethod(
  2803. smalltalk.method({
  2804. selector: "basicParse:",
  2805. fn: function (aString){
  2806. var self=this;
  2807. return smalltalk.withContext(function($ctx1) {
  2808. return smalltalk.parser.parse(aString);
  2809. return self}, function($ctx1) {$ctx1.fill(self,"basicParse:",{aString:aString},smalltalk.Smalltalk)})},
  2810. messageSends: []}),
  2811. smalltalk.Smalltalk);
  2812. smalltalk.addMethod(
  2813. smalltalk.method({
  2814. selector: "classes",
  2815. fn: function (){
  2816. var self=this;
  2817. return smalltalk.withContext(function($ctx1) {
  2818. return self.classes();
  2819. return self}, function($ctx1) {$ctx1.fill(self,"classes",{},smalltalk.Smalltalk)})},
  2820. messageSends: []}),
  2821. smalltalk.Smalltalk);
  2822. smalltalk.addMethod(
  2823. smalltalk.method({
  2824. selector: "createPackage:",
  2825. fn: function (packageName){
  2826. var self=this;
  2827. return smalltalk.withContext(function($ctx1) {
  2828. return smalltalk.addPackage(packageName);
  2829. return self}, function($ctx1) {$ctx1.fill(self,"createPackage:",{packageName:packageName},smalltalk.Smalltalk)})},
  2830. messageSends: []}),
  2831. smalltalk.Smalltalk);
  2832. smalltalk.addMethod(
  2833. smalltalk.method({
  2834. selector: "createPackage:properties:",
  2835. fn: function (packageName,aDict){
  2836. var self=this;
  2837. return smalltalk.withContext(function($ctx1) {
  2838. var $1,$2;
  2839. _st(self)._deprecatedAPI();
  2840. $1=_st(aDict)._isEmpty();
  2841. if(! smalltalk.assert($1)){
  2842. _st(self)._error_("createPackage:properties: called with nonempty properties");
  2843. };
  2844. $2=_st(self)._createPackage_(packageName);
  2845. return $2;
  2846. }, function($ctx1) {$ctx1.fill(self,"createPackage:properties:",{packageName:packageName,aDict:aDict},smalltalk.Smalltalk)})},
  2847. messageSends: ["deprecatedAPI", "ifFalse:", "error:", "isEmpty", "createPackage:"]}),
  2848. smalltalk.Smalltalk);
  2849. smalltalk.addMethod(
  2850. smalltalk.method({
  2851. selector: "deleteClass:",
  2852. fn: function (aClass){
  2853. var self=this;
  2854. return smalltalk.withContext(function($ctx1) {
  2855. self.removeClass(aClass);
  2856. return self}, function($ctx1) {$ctx1.fill(self,"deleteClass:",{aClass:aClass},smalltalk.Smalltalk)})},
  2857. messageSends: []}),
  2858. smalltalk.Smalltalk);
  2859. smalltalk.addMethod(
  2860. smalltalk.method({
  2861. selector: "deletePackage:",
  2862. fn: function (packageName){
  2863. var self=this;
  2864. return smalltalk.withContext(function($ctx1) {
  2865. delete smalltalk.packages[packageName];
  2866. return self}, function($ctx1) {$ctx1.fill(self,"deletePackage:",{packageName:packageName},smalltalk.Smalltalk)})},
  2867. messageSends: []}),
  2868. smalltalk.Smalltalk);
  2869. smalltalk.addMethod(
  2870. smalltalk.method({
  2871. selector: "isSmalltalkObject:",
  2872. fn: function (anObject){
  2873. var self=this;
  2874. return smalltalk.withContext(function($ctx1) {
  2875. return typeof anObject.klass !== 'undefined';
  2876. return self}, function($ctx1) {$ctx1.fill(self,"isSmalltalkObject:",{anObject:anObject},smalltalk.Smalltalk)})},
  2877. messageSends: []}),
  2878. smalltalk.Smalltalk);
  2879. smalltalk.addMethod(
  2880. smalltalk.method({
  2881. selector: "packageAt:",
  2882. fn: function (packageName){
  2883. var self=this;
  2884. return smalltalk.withContext(function($ctx1) {
  2885. return self.packages[packageName];
  2886. return self}, function($ctx1) {$ctx1.fill(self,"packageAt:",{packageName:packageName},smalltalk.Smalltalk)})},
  2887. messageSends: []}),
  2888. smalltalk.Smalltalk);
  2889. smalltalk.addMethod(
  2890. smalltalk.method({
  2891. selector: "packageAt:ifAbsent:",
  2892. fn: function (packageName,aBlock){
  2893. var self=this;
  2894. return smalltalk.withContext(function($ctx1) {
  2895. var $2,$1;
  2896. $2=_st(self)._packageAt_(packageName);
  2897. $1=_st($2)._ifNil_(aBlock);
  2898. return $1;
  2899. }, function($ctx1) {$ctx1.fill(self,"packageAt:ifAbsent:",{packageName:packageName,aBlock:aBlock},smalltalk.Smalltalk)})},
  2900. messageSends: ["ifNil:", "packageAt:"]}),
  2901. smalltalk.Smalltalk);
  2902. smalltalk.addMethod(
  2903. smalltalk.method({
  2904. selector: "packages",
  2905. fn: function (){
  2906. var self=this;
  2907. return smalltalk.withContext(function($ctx1) {
  2908. return self.packages.all();
  2909. return self}, function($ctx1) {$ctx1.fill(self,"packages",{},smalltalk.Smalltalk)})},
  2910. messageSends: []}),
  2911. smalltalk.Smalltalk);
  2912. smalltalk.addMethod(
  2913. smalltalk.method({
  2914. selector: "parse:",
  2915. fn: function (aString){
  2916. var self=this;
  2917. var result;
  2918. return smalltalk.withContext(function($ctx1) {
  2919. var $1;
  2920. _st(self)._try_catch_((function(){
  2921. return smalltalk.withContext(function($ctx2) {
  2922. result=_st(self)._basicParse_(aString);
  2923. return result;
  2924. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(function(ex){
  2925. return smalltalk.withContext(function($ctx2) {
  2926. return _st(_st(self)._parseError_parsing_(ex,aString))._signal();
  2927. }, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1)})}));
  2928. $1=result;
  2929. return $1;
  2930. }, function($ctx1) {$ctx1.fill(self,"parse:",{aString:aString,result:result},smalltalk.Smalltalk)})},
  2931. messageSends: ["try:catch:", "basicParse:", "signal", "parseError:parsing:"]}),
  2932. smalltalk.Smalltalk);
  2933. smalltalk.addMethod(
  2934. smalltalk.method({
  2935. selector: "parseError:parsing:",
  2936. fn: function (anException,aString){
  2937. var self=this;
  2938. function $ParseError(){return smalltalk.ParseError||(typeof ParseError=="undefined"?nil:ParseError)}
  2939. return smalltalk.withContext(function($ctx1) {
  2940. var $1;
  2941. $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")));
  2942. return $1;
  2943. }, function($ctx1) {$ctx1.fill(self,"parseError:parsing:",{anException:anException,aString:aString},smalltalk.Smalltalk)})},
  2944. messageSends: ["messageText:", ",", "basicAt:", "new"]}),
  2945. smalltalk.Smalltalk);
  2946. smalltalk.addMethod(
  2947. smalltalk.method({
  2948. selector: "pseudoVariableNames",
  2949. fn: function (){
  2950. var self=this;
  2951. return smalltalk.withContext(function($ctx1) {
  2952. var $1;
  2953. $1=["self", "super", "nil", "true", "false", "thisContext"];
  2954. return $1;
  2955. }, function($ctx1) {$ctx1.fill(self,"pseudoVariableNames",{},smalltalk.Smalltalk)})},
  2956. messageSends: []}),
  2957. smalltalk.Smalltalk);
  2958. smalltalk.addMethod(
  2959. smalltalk.method({
  2960. selector: "readJSObject:",
  2961. fn: function (anObject){
  2962. var self=this;
  2963. return smalltalk.withContext(function($ctx1) {
  2964. return self.readJSObject(anObject);
  2965. return self}, function($ctx1) {$ctx1.fill(self,"readJSObject:",{anObject:anObject},smalltalk.Smalltalk)})},
  2966. messageSends: []}),
  2967. smalltalk.Smalltalk);
  2968. smalltalk.addMethod(
  2969. smalltalk.method({
  2970. selector: "removeClass:",
  2971. fn: function (aClass){
  2972. var self=this;
  2973. function $ClassRemoved(){return smalltalk.ClassRemoved||(typeof ClassRemoved=="undefined"?nil:ClassRemoved)}
  2974. function $SystemAnnouncer(){return smalltalk.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}
  2975. return smalltalk.withContext(function($ctx1) {
  2976. var $1,$2,$3;
  2977. $1=_st(aClass)._isMetaclass();
  2978. if(smalltalk.assert($1)){
  2979. _st(self)._error_(_st(_st(aClass)._asString()).__comma(" is a Metaclass and cannot be removed!"));
  2980. };
  2981. _st(self)._deleteClass_(aClass);
  2982. $2=_st($ClassRemoved())._new();
  2983. _st($2)._theClass_(aClass);
  2984. $3=_st($2)._yourself();
  2985. _st(_st($SystemAnnouncer())._current())._announce_($3);
  2986. return self}, function($ctx1) {$ctx1.fill(self,"removeClass:",{aClass:aClass},smalltalk.Smalltalk)})},
  2987. messageSends: ["ifTrue:", "error:", ",", "asString", "isMetaclass", "deleteClass:", "announce:", "theClass:", "new", "yourself", "current"]}),
  2988. smalltalk.Smalltalk);
  2989. smalltalk.addMethod(
  2990. smalltalk.method({
  2991. selector: "removePackage:",
  2992. fn: function (packageName){
  2993. var self=this;
  2994. var pkg;
  2995. return smalltalk.withContext(function($ctx1) {
  2996. pkg=_st(self)._packageAt_ifAbsent_(packageName,(function(){
  2997. return smalltalk.withContext(function($ctx2) {
  2998. return _st(self)._error_(_st("Missing package: ").__comma(packageName));
  2999. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3000. _st(_st(pkg)._classes())._do_((function(each){
  3001. return smalltalk.withContext(function($ctx2) {
  3002. return _st(self)._removeClass_(each);
  3003. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  3004. _st(self)._deletePackage_(packageName);
  3005. return self}, function($ctx1) {$ctx1.fill(self,"removePackage:",{packageName:packageName,pkg:pkg},smalltalk.Smalltalk)})},
  3006. messageSends: ["packageAt:ifAbsent:", "error:", ",", "do:", "removeClass:", "classes", "deletePackage:"]}),
  3007. smalltalk.Smalltalk);
  3008. smalltalk.addMethod(
  3009. smalltalk.method({
  3010. selector: "renamePackage:to:",
  3011. fn: function (packageName,newName){
  3012. var self=this;
  3013. var pkg;
  3014. return smalltalk.withContext(function($ctx1) {
  3015. var $1;
  3016. pkg=_st(self)._packageAt_ifAbsent_(packageName,(function(){
  3017. return smalltalk.withContext(function($ctx2) {
  3018. return _st(self)._error_(_st("Missing package: ").__comma(packageName));
  3019. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3020. $1=_st(self)._packageAt_(newName);
  3021. if(($receiver = $1) == nil || $receiver == undefined){
  3022. $1;
  3023. } else {
  3024. _st(self)._error_(_st("Already exists a package called: ").__comma(newName));
  3025. };
  3026. _st(_st(self)._basicAt_("packages"))._at_put_(newName,pkg);
  3027. _st(pkg)._name_(newName);
  3028. _st(self)._deletePackage_(packageName);
  3029. return self}, function($ctx1) {$ctx1.fill(self,"renamePackage:to:",{packageName:packageName,newName:newName,pkg:pkg},smalltalk.Smalltalk)})},
  3030. messageSends: ["packageAt:ifAbsent:", "error:", ",", "ifNotNil:", "packageAt:", "at:put:", "basicAt:", "name:", "deletePackage:"]}),
  3031. smalltalk.Smalltalk);
  3032. smalltalk.addMethod(
  3033. smalltalk.method({
  3034. selector: "reservedWords",
  3035. fn: function (){
  3036. var self=this;
  3037. return smalltalk.withContext(function($ctx1) {
  3038. return self.reservedWords;
  3039. return self}, function($ctx1) {$ctx1.fill(self,"reservedWords",{},smalltalk.Smalltalk)})},
  3040. messageSends: []}),
  3041. smalltalk.Smalltalk);
  3042. smalltalk.addMethod(
  3043. smalltalk.method({
  3044. selector: "version",
  3045. fn: function (){
  3046. var self=this;
  3047. return smalltalk.withContext(function($ctx1) {
  3048. return "0.10";
  3049. }, function($ctx1) {$ctx1.fill(self,"version",{},smalltalk.Smalltalk)})},
  3050. messageSends: []}),
  3051. smalltalk.Smalltalk);
  3052. smalltalk.Smalltalk.klass.iVarNames = ['current'];
  3053. smalltalk.addMethod(
  3054. smalltalk.method({
  3055. selector: "current",
  3056. fn: function (){
  3057. var self=this;
  3058. return smalltalk.withContext(function($ctx1) {
  3059. return smalltalk;
  3060. return self}, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.Smalltalk.klass)})},
  3061. messageSends: []}),
  3062. smalltalk.Smalltalk.klass);
  3063. smalltalk.addClass('Timeout', smalltalk.Object, ['rawTimeout'], 'Kernel-Objects');
  3064. smalltalk.addMethod(
  3065. smalltalk.method({
  3066. selector: "clearInterval",
  3067. fn: function (){
  3068. var self=this;
  3069. return smalltalk.withContext(function($ctx1) {
  3070. var interval = self["@rawTimeout"];
  3071. clearInterval(interval);
  3072. ;
  3073. return self}, function($ctx1) {$ctx1.fill(self,"clearInterval",{},smalltalk.Timeout)})},
  3074. messageSends: []}),
  3075. smalltalk.Timeout);
  3076. smalltalk.addMethod(
  3077. smalltalk.method({
  3078. selector: "clearTimeout",
  3079. fn: function (){
  3080. var self=this;
  3081. return smalltalk.withContext(function($ctx1) {
  3082. var timeout = self["@rawTimeout"];
  3083. clearTimeout(timeout);
  3084. ;
  3085. return self}, function($ctx1) {$ctx1.fill(self,"clearTimeout",{},smalltalk.Timeout)})},
  3086. messageSends: []}),
  3087. smalltalk.Timeout);
  3088. smalltalk.addMethod(
  3089. smalltalk.method({
  3090. selector: "rawTimeout:",
  3091. fn: function (anObject){
  3092. var self=this;
  3093. return smalltalk.withContext(function($ctx1) {
  3094. self["@rawTimeout"]=anObject;
  3095. return self}, function($ctx1) {$ctx1.fill(self,"rawTimeout:",{anObject:anObject},smalltalk.Timeout)})},
  3096. messageSends: []}),
  3097. smalltalk.Timeout);
  3098. smalltalk.addMethod(
  3099. smalltalk.method({
  3100. selector: "on:",
  3101. fn: function (anObject){
  3102. var self=this;
  3103. return smalltalk.withContext(function($ctx1) {
  3104. var $2,$3,$1;
  3105. $2=_st(self)._new();
  3106. _st($2)._rawTimeout_(anObject);
  3107. $3=_st($2)._yourself();
  3108. $1=$3;
  3109. return $1;
  3110. }, function($ctx1) {$ctx1.fill(self,"on:",{anObject:anObject},smalltalk.Timeout.klass)})},
  3111. messageSends: ["rawTimeout:", "new", "yourself"]}),
  3112. smalltalk.Timeout.klass);
  3113. smalltalk.addClass('UndefinedObject', smalltalk.Object, [], 'Kernel-Objects');
  3114. smalltalk.addMethod(
  3115. smalltalk.method({
  3116. selector: "asJSON",
  3117. fn: function (){
  3118. var self=this;
  3119. return smalltalk.withContext(function($ctx1) {
  3120. var $1;
  3121. $1=null;
  3122. return $1;
  3123. }, function($ctx1) {$ctx1.fill(self,"asJSON",{},smalltalk.UndefinedObject)})},
  3124. messageSends: []}),
  3125. smalltalk.UndefinedObject);
  3126. smalltalk.addMethod(
  3127. smalltalk.method({
  3128. selector: "deepCopy",
  3129. fn: function (){
  3130. var self=this;
  3131. return smalltalk.withContext(function($ctx1) {
  3132. var $1;
  3133. $1=self;
  3134. return $1;
  3135. }, function($ctx1) {$ctx1.fill(self,"deepCopy",{},smalltalk.UndefinedObject)})},
  3136. messageSends: []}),
  3137. smalltalk.UndefinedObject);
  3138. smalltalk.addMethod(
  3139. smalltalk.method({
  3140. selector: "ifNil:",
  3141. fn: function (aBlock){
  3142. var self=this;
  3143. return smalltalk.withContext(function($ctx1) {
  3144. var $2,$1;
  3145. $2=self;
  3146. $1=_st($2)._ifNil_ifNotNil_(aBlock,(function(){
  3147. return smalltalk.withContext(function($ctx2) {
  3148. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3149. return $1;
  3150. }, function($ctx1) {$ctx1.fill(self,"ifNil:",{aBlock:aBlock},smalltalk.UndefinedObject)})},
  3151. messageSends: ["ifNil:ifNotNil:"]}),
  3152. smalltalk.UndefinedObject);
  3153. smalltalk.addMethod(
  3154. smalltalk.method({
  3155. selector: "ifNil:ifNotNil:",
  3156. fn: function (aBlock,anotherBlock){
  3157. var self=this;
  3158. return smalltalk.withContext(function($ctx1) {
  3159. var $1;
  3160. $1=_st(aBlock)._value();
  3161. return $1;
  3162. }, function($ctx1) {$ctx1.fill(self,"ifNil:ifNotNil:",{aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.UndefinedObject)})},
  3163. messageSends: ["value"]}),
  3164. smalltalk.UndefinedObject);
  3165. smalltalk.addMethod(
  3166. smalltalk.method({
  3167. selector: "ifNotNil:",
  3168. fn: function (aBlock){
  3169. var self=this;
  3170. return smalltalk.withContext(function($ctx1) {
  3171. var $1;
  3172. $1=self;
  3173. return $1;
  3174. }, function($ctx1) {$ctx1.fill(self,"ifNotNil:",{aBlock:aBlock},smalltalk.UndefinedObject)})},
  3175. messageSends: []}),
  3176. smalltalk.UndefinedObject);
  3177. smalltalk.addMethod(
  3178. smalltalk.method({
  3179. selector: "ifNotNil:ifNil:",
  3180. fn: function (aBlock,anotherBlock){
  3181. var self=this;
  3182. return smalltalk.withContext(function($ctx1) {
  3183. var $1;
  3184. $1=_st(anotherBlock)._value();
  3185. return $1;
  3186. }, function($ctx1) {$ctx1.fill(self,"ifNotNil:ifNil:",{aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.UndefinedObject)})},
  3187. messageSends: ["value"]}),
  3188. smalltalk.UndefinedObject);
  3189. smalltalk.addMethod(
  3190. smalltalk.method({
  3191. selector: "isImmutable",
  3192. fn: function (){
  3193. var self=this;
  3194. return smalltalk.withContext(function($ctx1) {
  3195. return true;
  3196. }, function($ctx1) {$ctx1.fill(self,"isImmutable",{},smalltalk.UndefinedObject)})},
  3197. messageSends: []}),
  3198. smalltalk.UndefinedObject);
  3199. smalltalk.addMethod(
  3200. smalltalk.method({
  3201. selector: "isNil",
  3202. fn: function (){
  3203. var self=this;
  3204. return smalltalk.withContext(function($ctx1) {
  3205. return true;
  3206. }, function($ctx1) {$ctx1.fill(self,"isNil",{},smalltalk.UndefinedObject)})},
  3207. messageSends: []}),
  3208. smalltalk.UndefinedObject);
  3209. smalltalk.addMethod(
  3210. smalltalk.method({
  3211. selector: "notNil",
  3212. fn: function (){
  3213. var self=this;
  3214. return smalltalk.withContext(function($ctx1) {
  3215. return false;
  3216. }, function($ctx1) {$ctx1.fill(self,"notNil",{},smalltalk.UndefinedObject)})},
  3217. messageSends: []}),
  3218. smalltalk.UndefinedObject);
  3219. smalltalk.addMethod(
  3220. smalltalk.method({
  3221. selector: "printOn:",
  3222. fn: function (aStream){
  3223. var self=this;
  3224. return smalltalk.withContext(function($ctx1) {
  3225. _st(aStream)._nextPutAll_("nil");
  3226. return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.UndefinedObject)})},
  3227. messageSends: ["nextPutAll:"]}),
  3228. smalltalk.UndefinedObject);
  3229. smalltalk.addMethod(
  3230. smalltalk.method({
  3231. selector: "shallowCopy",
  3232. fn: function (){
  3233. var self=this;
  3234. return smalltalk.withContext(function($ctx1) {
  3235. var $1;
  3236. $1=self;
  3237. return $1;
  3238. }, function($ctx1) {$ctx1.fill(self,"shallowCopy",{},smalltalk.UndefinedObject)})},
  3239. messageSends: []}),
  3240. smalltalk.UndefinedObject);
  3241. smalltalk.addMethod(
  3242. smalltalk.method({
  3243. selector: "subclass:instanceVariableNames:",
  3244. fn: function (aString,anotherString){
  3245. var self=this;
  3246. return smalltalk.withContext(function($ctx1) {
  3247. var $1;
  3248. $1=_st(self)._subclass_instanceVariableNames_package_(aString,anotherString,nil);
  3249. return $1;
  3250. }, function($ctx1) {$ctx1.fill(self,"subclass:instanceVariableNames:",{aString:aString,anotherString:anotherString},smalltalk.UndefinedObject)})},
  3251. messageSends: ["subclass:instanceVariableNames:package:"]}),
  3252. smalltalk.UndefinedObject);
  3253. smalltalk.addMethod(
  3254. smalltalk.method({
  3255. selector: "subclass:instanceVariableNames:category:",
  3256. fn: function (aString,aString2,aString3){
  3257. var self=this;
  3258. return smalltalk.withContext(function($ctx1) {
  3259. var $1;
  3260. _st(self)._deprecatedAPI();
  3261. $1=_st(self)._subclass_instanceVariableNames_package_(aString,aString2,aString3);
  3262. return $1;
  3263. }, function($ctx1) {$ctx1.fill(self,"subclass:instanceVariableNames:category:",{aString:aString,aString2:aString2,aString3:aString3},smalltalk.UndefinedObject)})},
  3264. messageSends: ["deprecatedAPI", "subclass:instanceVariableNames:package:"]}),
  3265. smalltalk.UndefinedObject);
  3266. smalltalk.addMethod(
  3267. smalltalk.method({
  3268. selector: "subclass:instanceVariableNames:package:",
  3269. fn: function (aString,aString2,aString3){
  3270. var self=this;
  3271. function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
  3272. return smalltalk.withContext(function($ctx1) {
  3273. var $1;
  3274. $1=_st(_st($ClassBuilder())._new())._superclass_subclass_instanceVariableNames_package_(self,_st(aString)._asString(),aString2,aString3);
  3275. return $1;
  3276. }, function($ctx1) {$ctx1.fill(self,"subclass:instanceVariableNames:package:",{aString:aString,aString2:aString2,aString3:aString3},smalltalk.UndefinedObject)})},
  3277. messageSends: ["superclass:subclass:instanceVariableNames:package:", "asString", "new"]}),
  3278. smalltalk.UndefinedObject);
  3279. smalltalk.addMethod(
  3280. smalltalk.method({
  3281. selector: "new",
  3282. fn: function (){
  3283. var self=this;
  3284. return smalltalk.withContext(function($ctx1) {
  3285. _st(self)._error_("You cannot create new instances of UndefinedObject. Use nil");
  3286. return self}, function($ctx1) {$ctx1.fill(self,"new",{},smalltalk.UndefinedObject.klass)})},
  3287. messageSends: ["error:"]}),
  3288. smalltalk.UndefinedObject.klass);
  3289. smalltalk.addMethod(
  3290. smalltalk.method({
  3291. selector: "asJavaScriptSelector",
  3292. fn: function (){
  3293. var self=this;
  3294. return smalltalk.withContext(function($ctx1) {
  3295. var $1;
  3296. $1=_st(self)._replace_with_("^([a-zA-Z0-9]*).*$","$1");
  3297. return $1;
  3298. }, function($ctx1) {$ctx1.fill(self,"asJavaScriptSelector",{},smalltalk.String)})},
  3299. messageSends: ["replace:with:"]}),
  3300. smalltalk.String);