2
0

Kernel-Objects.deploy.js 108 KB

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