1
0

Kernel-Objects.deploy.js 86 KB

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