1
0

Kernel-Objects.deploy.js 90 KB

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