1
0

Kernel-Objects.deploy.js 88 KB

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