1
0

Kernel-Objects.deploy.js 86 KB

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