Kernel-Objects.deploy.js 97 KB

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