Kernel-Objects.deploy.js 85 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452
  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. $1=_st(aDict)._isEmpty();
  2764. if(! smalltalk.assert($1)){
  2765. _st(self)._error_("createPackage:properties: called with nonempty properties");
  2766. };
  2767. $2=_st(self)._createPackage_(packageName);
  2768. return $2;
  2769. }, self, "createPackage:properties:", [packageName,aDict], smalltalk.Smalltalk)}
  2770. }),
  2771. smalltalk.Smalltalk);
  2772. smalltalk.addMethod(
  2773. "_deleteClass_",
  2774. smalltalk.method({
  2775. selector: "deleteClass:",
  2776. fn: function (aClass){
  2777. var self=this;
  2778. return smalltalk.withContext(function($ctx1) { self.removeClass(aClass);
  2779. ;
  2780. return self}, self, "deleteClass:", [aClass], smalltalk.Smalltalk)}
  2781. }),
  2782. smalltalk.Smalltalk);
  2783. smalltalk.addMethod(
  2784. "_deletePackage_",
  2785. smalltalk.method({
  2786. selector: "deletePackage:",
  2787. fn: function (packageName){
  2788. var self=this;
  2789. return smalltalk.withContext(function($ctx1) { delete smalltalk.packages[packageName];
  2790. ;
  2791. return self}, self, "deletePackage:", [packageName], smalltalk.Smalltalk)}
  2792. }),
  2793. smalltalk.Smalltalk);
  2794. smalltalk.addMethod(
  2795. "_packageAt_",
  2796. smalltalk.method({
  2797. selector: "packageAt:",
  2798. fn: function (packageName){
  2799. var self=this;
  2800. return smalltalk.withContext(function($ctx1) { return self.packages[packageName];
  2801. ;
  2802. return self}, self, "packageAt:", [packageName], smalltalk.Smalltalk)}
  2803. }),
  2804. smalltalk.Smalltalk);
  2805. smalltalk.addMethod(
  2806. "_packageAt_ifAbsent_",
  2807. smalltalk.method({
  2808. selector: "packageAt:ifAbsent:",
  2809. fn: function (packageName,aBlock){
  2810. var self=this;
  2811. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2812. $2=_st(self)._packageAt_(packageName);
  2813. $1=_st($2)._ifNil_(aBlock);
  2814. return $1;
  2815. }, self, "packageAt:ifAbsent:", [packageName,aBlock], smalltalk.Smalltalk)}
  2816. }),
  2817. smalltalk.Smalltalk);
  2818. smalltalk.addMethod(
  2819. "_packages",
  2820. smalltalk.method({
  2821. selector: "packages",
  2822. fn: function (){
  2823. var self=this;
  2824. return smalltalk.withContext(function($ctx1) { return self.packages.all();
  2825. ;
  2826. return self}, self, "packages", [], smalltalk.Smalltalk)}
  2827. }),
  2828. smalltalk.Smalltalk);
  2829. smalltalk.addMethod(
  2830. "_parse_",
  2831. smalltalk.method({
  2832. selector: "parse:",
  2833. fn: function (aString){
  2834. var self=this;
  2835. return smalltalk.withContext(function($ctx1) { $ctx1.result=nil;
  2836. _st(self)._try_catch_((function(){
  2837. return smalltalk.withContext(function($ctx2) { $ctx1.locals.result=_st(self)._basicParse_(aString);
  2838. return $ctx1.locals.result;
  2839. })}),(function(ex){
  2840. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._parseError_parsing_(ex,aString))._signal();
  2841. })}));
  2842. return $ctx1.locals.result;
  2843. }, self, "parse:", [aString], smalltalk.Smalltalk)}
  2844. }),
  2845. smalltalk.Smalltalk);
  2846. smalltalk.addMethod(
  2847. "_parseError_parsing_",
  2848. smalltalk.method({
  2849. selector: "parseError:parsing:",
  2850. fn: function (anException,aString){
  2851. var self=this;
  2852. return smalltalk.withContext(function($ctx1) { var $1;
  2853. $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")));
  2854. return $1;
  2855. }, self, "parseError:parsing:", [anException,aString], smalltalk.Smalltalk)}
  2856. }),
  2857. smalltalk.Smalltalk);
  2858. smalltalk.addMethod(
  2859. "_pseudoVariableNames",
  2860. smalltalk.method({
  2861. selector: "pseudoVariableNames",
  2862. fn: function (){
  2863. var self=this;
  2864. return smalltalk.withContext(function($ctx1) { return ["self", "super", "nil", "true", "false", "thisContext"];
  2865. }, self, "pseudoVariableNames", [], smalltalk.Smalltalk)}
  2866. }),
  2867. smalltalk.Smalltalk);
  2868. smalltalk.addMethod(
  2869. "_readJSObject_",
  2870. smalltalk.method({
  2871. selector: "readJSObject:",
  2872. fn: function (anObject){
  2873. var self=this;
  2874. return smalltalk.withContext(function($ctx1) { return self.readJSObject(anObject);
  2875. ;
  2876. return self}, self, "readJSObject:", [anObject], smalltalk.Smalltalk)}
  2877. }),
  2878. smalltalk.Smalltalk);
  2879. smalltalk.addMethod(
  2880. "_removeClass_",
  2881. smalltalk.method({
  2882. selector: "removeClass:",
  2883. fn: function (aClass){
  2884. var self=this;
  2885. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  2886. $1=_st(aClass)._isMetaclass();
  2887. if(smalltalk.assert($1)){
  2888. _st(self)._error_(_st(_st(aClass)._asString()).__comma(" is a Metaclass and cannot be removed!"));
  2889. };
  2890. _st(_st(_st(aClass)._methodDictionary())._values())._do_((function(each){
  2891. return smalltalk.withContext(function($ctx2) { return _st(aClass)._removeCompiledMethod_(each);
  2892. })}));
  2893. _st(_st(_st(_st(aClass)._class())._methodDictionary())._values())._do_((function(each){
  2894. return smalltalk.withContext(function($ctx2) { return _st(_st(aClass)._class())._removeCompiledMethod_(each);
  2895. })}));
  2896. _st(self)._deleteClass_(aClass);
  2897. $2=_st((smalltalk.ClassRemoved || ClassRemoved))._new();
  2898. _st($2)._theClass_(aClass);
  2899. $3=_st($2)._yourself();
  2900. _st(_st((smalltalk.SystemAnnouncer || SystemAnnouncer))._current())._announce_($3);
  2901. return self}, self, "removeClass:", [aClass], smalltalk.Smalltalk)}
  2902. }),
  2903. smalltalk.Smalltalk);
  2904. smalltalk.addMethod(
  2905. "_removePackage_",
  2906. smalltalk.method({
  2907. selector: "removePackage:",
  2908. fn: function (packageName){
  2909. var self=this;
  2910. return smalltalk.withContext(function($ctx1) { $ctx1.pkg=nil;
  2911. $ctx1.locals.pkg=_st(self)._packageAt_ifAbsent_(packageName,(function(){
  2912. return smalltalk.withContext(function($ctx2) { return _st(self)._error_(_st("Missing package: ").__comma(packageName));
  2913. })}));
  2914. _st(_st($ctx1.locals.pkg)._classes())._do_((function(each){
  2915. return smalltalk.withContext(function($ctx2) { return _st(self)._removeClass_(each);
  2916. })}));
  2917. _st(self)._deletePackage_(packageName);
  2918. return self}, self, "removePackage:", [packageName], smalltalk.Smalltalk)}
  2919. }),
  2920. smalltalk.Smalltalk);
  2921. smalltalk.addMethod(
  2922. "_renamePackage_to_",
  2923. smalltalk.method({
  2924. selector: "renamePackage:to:",
  2925. fn: function (packageName,newName){
  2926. var self=this;
  2927. return smalltalk.withContext(function($ctx1) { var $1;
  2928. $ctx1.locals.pkg=nil;
  2929. $ctx1.locals.pkg=_st(self)._packageAt_ifAbsent_(packageName,(function(){
  2930. return smalltalk.withContext(function($ctx2) { return _st(self)._error_(_st("Missing package: ").__comma(packageName));
  2931. })}));
  2932. $1=_st(self)._packageAt_(newName);
  2933. if(($receiver = $1) == nil || $receiver == undefined){
  2934. $1;
  2935. } else {
  2936. _st(self)._error_(_st("Already exists a package called: ").__comma(newName));
  2937. };
  2938. _st(_st(self)._basicAt_("packages"))._at_put_(newName,$ctx1.locals.pkg);
  2939. _st($ctx1.locals.pkg)._name_(newName);
  2940. _st(self)._deletePackage_(packageName);
  2941. return self}, self, "renamePackage:to:", [packageName,newName], smalltalk.Smalltalk)}
  2942. }),
  2943. smalltalk.Smalltalk);
  2944. smalltalk.addMethod(
  2945. "_reservedWords",
  2946. smalltalk.method({
  2947. selector: "reservedWords",
  2948. fn: function (){
  2949. var self=this;
  2950. return smalltalk.withContext(function($ctx1) { return self.reservedWords;
  2951. ;
  2952. return self}, self, "reservedWords", [], smalltalk.Smalltalk)}
  2953. }),
  2954. smalltalk.Smalltalk);
  2955. smalltalk.Smalltalk.klass.iVarNames = ['current'];
  2956. smalltalk.addMethod(
  2957. "_current",
  2958. smalltalk.method({
  2959. selector: "current",
  2960. fn: function (){
  2961. var self=this;
  2962. return smalltalk.withContext(function($ctx1) { return smalltalk;
  2963. ;
  2964. return self}, self, "current", [], smalltalk.Smalltalk.klass)}
  2965. }),
  2966. smalltalk.Smalltalk.klass);
  2967. smalltalk.addClass('Timeout', smalltalk.Object, ['rawTimeout'], 'Kernel-Objects');
  2968. smalltalk.addMethod(
  2969. "_clearInterval",
  2970. smalltalk.method({
  2971. selector: "clearInterval",
  2972. fn: function (){
  2973. var self=this;
  2974. return smalltalk.withContext(function($ctx1) {
  2975. var interval = self["@rawTimeout"];
  2976. clearInterval(interval);
  2977. ;
  2978. return self}, self, "clearInterval", [], smalltalk.Timeout)}
  2979. }),
  2980. smalltalk.Timeout);
  2981. smalltalk.addMethod(
  2982. "_clearTimeout",
  2983. smalltalk.method({
  2984. selector: "clearTimeout",
  2985. fn: function (){
  2986. var self=this;
  2987. return smalltalk.withContext(function($ctx1) {
  2988. var timeout = self["@rawTimeout"];
  2989. clearTimeout(timeout);
  2990. ;
  2991. return self}, self, "clearTimeout", [], smalltalk.Timeout)}
  2992. }),
  2993. smalltalk.Timeout);
  2994. smalltalk.addMethod(
  2995. "_rawTimeout_",
  2996. smalltalk.method({
  2997. selector: "rawTimeout:",
  2998. fn: function (anObject){
  2999. var self=this;
  3000. return smalltalk.withContext(function($ctx1) { self["@rawTimeout"]=anObject;
  3001. return self}, self, "rawTimeout:", [anObject], smalltalk.Timeout)}
  3002. }),
  3003. smalltalk.Timeout);
  3004. smalltalk.addMethod(
  3005. "_on_",
  3006. smalltalk.method({
  3007. selector: "on:",
  3008. fn: function (anObject){
  3009. var self=this;
  3010. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  3011. $2=_st(self)._new();
  3012. _st($2)._rawTimeout_(anObject);
  3013. $3=_st($2)._yourself();
  3014. $1=$3;
  3015. return $1;
  3016. }, self, "on:", [anObject], smalltalk.Timeout.klass)}
  3017. }),
  3018. smalltalk.Timeout.klass);
  3019. smalltalk.addClass('UndefinedObject', smalltalk.Object, [], 'Kernel-Objects');
  3020. smalltalk.addMethod(
  3021. "_asJSON",
  3022. smalltalk.method({
  3023. selector: "asJSON",
  3024. fn: function (){
  3025. var self=this;
  3026. return smalltalk.withContext(function($ctx1) { return null;
  3027. }, self, "asJSON", [], smalltalk.UndefinedObject)}
  3028. }),
  3029. smalltalk.UndefinedObject);
  3030. smalltalk.addMethod(
  3031. "_deepCopy",
  3032. smalltalk.method({
  3033. selector: "deepCopy",
  3034. fn: function (){
  3035. var self=this;
  3036. return smalltalk.withContext(function($ctx1) { return self;
  3037. }, self, "deepCopy", [], smalltalk.UndefinedObject)}
  3038. }),
  3039. smalltalk.UndefinedObject);
  3040. smalltalk.addMethod(
  3041. "_ifNil_",
  3042. smalltalk.method({
  3043. selector: "ifNil:",
  3044. fn: function (aBlock){
  3045. var self=this;
  3046. return smalltalk.withContext(function($ctx1) { var $1;
  3047. $1=_st(self)._ifNil_ifNotNil_(aBlock,(function(){
  3048. return smalltalk.withContext(function($ctx2) { })}));
  3049. return $1;
  3050. }, self, "ifNil:", [aBlock], smalltalk.UndefinedObject)}
  3051. }),
  3052. smalltalk.UndefinedObject);
  3053. smalltalk.addMethod(
  3054. "_ifNil_ifNotNil_",
  3055. smalltalk.method({
  3056. selector: "ifNil:ifNotNil:",
  3057. fn: function (aBlock,anotherBlock){
  3058. var self=this;
  3059. return smalltalk.withContext(function($ctx1) { var $1;
  3060. $1=_st(aBlock)._value();
  3061. return $1;
  3062. }, self, "ifNil:ifNotNil:", [aBlock,anotherBlock], smalltalk.UndefinedObject)}
  3063. }),
  3064. smalltalk.UndefinedObject);
  3065. smalltalk.addMethod(
  3066. "_ifNotNil_",
  3067. smalltalk.method({
  3068. selector: "ifNotNil:",
  3069. fn: function (aBlock){
  3070. var self=this;
  3071. return smalltalk.withContext(function($ctx1) { return self;
  3072. }, self, "ifNotNil:", [aBlock], smalltalk.UndefinedObject)}
  3073. }),
  3074. smalltalk.UndefinedObject);
  3075. smalltalk.addMethod(
  3076. "_ifNotNil_ifNil_",
  3077. smalltalk.method({
  3078. selector: "ifNotNil:ifNil:",
  3079. fn: function (aBlock,anotherBlock){
  3080. var self=this;
  3081. return smalltalk.withContext(function($ctx1) { var $1;
  3082. $1=_st(anotherBlock)._value();
  3083. return $1;
  3084. }, self, "ifNotNil:ifNil:", [aBlock,anotherBlock], smalltalk.UndefinedObject)}
  3085. }),
  3086. smalltalk.UndefinedObject);
  3087. smalltalk.addMethod(
  3088. "_isNil",
  3089. smalltalk.method({
  3090. selector: "isNil",
  3091. fn: function (){
  3092. var self=this;
  3093. return smalltalk.withContext(function($ctx1) { return true;
  3094. }, self, "isNil", [], smalltalk.UndefinedObject)}
  3095. }),
  3096. smalltalk.UndefinedObject);
  3097. smalltalk.addMethod(
  3098. "_notNil",
  3099. smalltalk.method({
  3100. selector: "notNil",
  3101. fn: function (){
  3102. var self=this;
  3103. return smalltalk.withContext(function($ctx1) { return false;
  3104. }, self, "notNil", [], smalltalk.UndefinedObject)}
  3105. }),
  3106. smalltalk.UndefinedObject);
  3107. smalltalk.addMethod(
  3108. "_printString",
  3109. smalltalk.method({
  3110. selector: "printString",
  3111. fn: function (){
  3112. var self=this;
  3113. return smalltalk.withContext(function($ctx1) { return "nil";
  3114. }, self, "printString", [], smalltalk.UndefinedObject)}
  3115. }),
  3116. smalltalk.UndefinedObject);
  3117. smalltalk.addMethod(
  3118. "_shallowCopy",
  3119. smalltalk.method({
  3120. selector: "shallowCopy",
  3121. fn: function (){
  3122. var self=this;
  3123. return smalltalk.withContext(function($ctx1) { return self;
  3124. }, self, "shallowCopy", [], smalltalk.UndefinedObject)}
  3125. }),
  3126. smalltalk.UndefinedObject);
  3127. smalltalk.addMethod(
  3128. "_subclass_instanceVariableNames_",
  3129. smalltalk.method({
  3130. selector: "subclass:instanceVariableNames:",
  3131. fn: function (aString,anotherString){
  3132. var self=this;
  3133. return smalltalk.withContext(function($ctx1) { var $1;
  3134. $1=_st(self)._subclass_instanceVariableNames_package_(aString,anotherString,nil);
  3135. return $1;
  3136. }, self, "subclass:instanceVariableNames:", [aString,anotherString], smalltalk.UndefinedObject)}
  3137. }),
  3138. smalltalk.UndefinedObject);
  3139. smalltalk.addMethod(
  3140. "_subclass_instanceVariableNames_category_",
  3141. smalltalk.method({
  3142. selector: "subclass:instanceVariableNames:category:",
  3143. fn: function (aString,aString2,aString3){
  3144. var self=this;
  3145. return smalltalk.withContext(function($ctx1) { var $1;
  3146. _st(self)._deprecatedAPI();
  3147. $1=_st(self)._subclass_instanceVariableNames_package_(aString,aString2,aString3);
  3148. return $1;
  3149. }, self, "subclass:instanceVariableNames:category:", [aString,aString2,aString3], smalltalk.UndefinedObject)}
  3150. }),
  3151. smalltalk.UndefinedObject);
  3152. smalltalk.addMethod(
  3153. "_subclass_instanceVariableNames_package_",
  3154. smalltalk.method({
  3155. selector: "subclass:instanceVariableNames:package:",
  3156. fn: function (aString,aString2,aString3){
  3157. var self=this;
  3158. return smalltalk.withContext(function($ctx1) { var $1;
  3159. $1=_st(_st((smalltalk.ClassBuilder || ClassBuilder))._new())._superclass_subclass_instanceVariableNames_package_(self,aString,aString2,aString3);
  3160. return $1;
  3161. }, self, "subclass:instanceVariableNames:package:", [aString,aString2,aString3], smalltalk.UndefinedObject)}
  3162. }),
  3163. smalltalk.UndefinedObject);
  3164. smalltalk.addMethod(
  3165. "_new",
  3166. smalltalk.method({
  3167. selector: "new",
  3168. fn: function (){
  3169. var self=this;
  3170. return smalltalk.withContext(function($ctx1) { _st(self)._error_("You cannot create new instances of UndefinedObject. Use nil");
  3171. return self}, self, "new", [], smalltalk.UndefinedObject.klass)}
  3172. }),
  3173. smalltalk.UndefinedObject.klass);