Kernel-Objects.deploy.js 107 KB

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