1
0

Kernel-Objects.deploy.js 105 KB

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