Kernel-Objects.deploy.js 85 KB

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