Kernel-Objects.deploy.js 72 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638
  1. define("amber/Kernel-Objects", ["amber_vm/smalltalk", "amber_vm/nil", "amber_vm/_st"], function(smalltalk,nil,_st){
  2. smalltalk.addPackage('Kernel-Objects');
  3. smalltalk.packages["Kernel-Objects"].transport = {"type":"amd","amdNamespace":"amber"};
  4. smalltalk.addClass('Object', smalltalk.nil, [], 'Kernel-Objects');
  5. smalltalk.addMethod(
  6. smalltalk.method({
  7. selector: "->",
  8. fn: function (anObject){
  9. var self=this;
  10. function $Association(){return smalltalk.Association||(typeof Association=="undefined"?nil:Association)}
  11. return smalltalk.withContext(function($ctx1) {
  12. var $1;
  13. $1=_st($Association())._key_value_(self,anObject);
  14. return $1;
  15. }, function($ctx1) {$ctx1.fill(self,"->",{anObject:anObject},smalltalk.Object)})},
  16. messageSends: ["key:value:"]}),
  17. smalltalk.Object);
  18. smalltalk.addMethod(
  19. smalltalk.method({
  20. selector: "=",
  21. fn: function (anObject){
  22. var self=this;
  23. return smalltalk.withContext(function($ctx1) {
  24. var $1;
  25. $1=self.__eq_eq(anObject);
  26. return $1;
  27. }, function($ctx1) {$ctx1.fill(self,"=",{anObject:anObject},smalltalk.Object)})},
  28. messageSends: ["=="]}),
  29. smalltalk.Object);
  30. smalltalk.addMethod(
  31. smalltalk.method({
  32. selector: "==",
  33. fn: function (anObject){
  34. var self=this;
  35. return smalltalk.withContext(function($ctx1) {
  36. var $1;
  37. $1=_st(self._identityHash()).__eq(_st(anObject)._identityHash());
  38. return $1;
  39. }, function($ctx1) {$ctx1.fill(self,"==",{anObject:anObject},smalltalk.Object)})},
  40. messageSends: ["=", "identityHash"]}),
  41. smalltalk.Object);
  42. smalltalk.addMethod(
  43. smalltalk.method({
  44. selector: "asJSON",
  45. fn: function (){
  46. var self=this;
  47. var variables;
  48. function $HashedCollection(){return smalltalk.HashedCollection||(typeof HashedCollection=="undefined"?nil:HashedCollection)}
  49. return smalltalk.withContext(function($ctx1) {
  50. var $1;
  51. variables=_st($HashedCollection())._new();
  52. _st(_st(self._class())._allInstanceVariableNames())._do_((function(each){
  53. return smalltalk.withContext(function($ctx2) {
  54. return _st(variables)._at_put_(each,_st(self._instVarAt_(each))._asJSON());
  55. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  56. $1=variables;
  57. return $1;
  58. }, function($ctx1) {$ctx1.fill(self,"asJSON",{variables:variables},smalltalk.Object)})},
  59. messageSends: ["new", "do:", "at:put:", "asJSON", "instVarAt:", "allInstanceVariableNames", "class"]}),
  60. smalltalk.Object);
  61. smalltalk.addMethod(
  62. smalltalk.method({
  63. selector: "asJSONString",
  64. fn: function (){
  65. var self=this;
  66. function $JSON(){return smalltalk.JSON||(typeof JSON=="undefined"?nil:JSON)}
  67. return smalltalk.withContext(function($ctx1) {
  68. var $1;
  69. $1=_st($JSON())._stringify_(self._asJSON());
  70. return $1;
  71. }, function($ctx1) {$ctx1.fill(self,"asJSONString",{},smalltalk.Object)})},
  72. messageSends: ["stringify:", "asJSON"]}),
  73. smalltalk.Object);
  74. smalltalk.addMethod(
  75. smalltalk.method({
  76. selector: "asJavascript",
  77. fn: function (){
  78. var self=this;
  79. return smalltalk.withContext(function($ctx1) {
  80. var $1;
  81. $1=self._asString();
  82. return $1;
  83. }, function($ctx1) {$ctx1.fill(self,"asJavascript",{},smalltalk.Object)})},
  84. messageSends: ["asString"]}),
  85. smalltalk.Object);
  86. smalltalk.addMethod(
  87. smalltalk.method({
  88. selector: "asString",
  89. fn: function (){
  90. var self=this;
  91. return smalltalk.withContext(function($ctx1) {
  92. var $1;
  93. $1=self._printString();
  94. return $1;
  95. }, function($ctx1) {$ctx1.fill(self,"asString",{},smalltalk.Object)})},
  96. messageSends: ["printString"]}),
  97. smalltalk.Object);
  98. smalltalk.addMethod(
  99. smalltalk.method({
  100. selector: "basicAt:",
  101. fn: function (aString){
  102. var self=this;
  103. return smalltalk.withContext(function($ctx1) {
  104. return self[aString];
  105. return self}, function($ctx1) {$ctx1.fill(self,"basicAt:",{aString:aString},smalltalk.Object)})},
  106. messageSends: []}),
  107. smalltalk.Object);
  108. smalltalk.addMethod(
  109. smalltalk.method({
  110. selector: "basicAt:put:",
  111. fn: function (aString,anObject){
  112. var self=this;
  113. return smalltalk.withContext(function($ctx1) {
  114. return self[aString] = anObject;
  115. return self}, function($ctx1) {$ctx1.fill(self,"basicAt:put:",{aString:aString,anObject:anObject},smalltalk.Object)})},
  116. messageSends: []}),
  117. smalltalk.Object);
  118. smalltalk.addMethod(
  119. smalltalk.method({
  120. selector: "basicDelete:",
  121. fn: function (aString){
  122. var self=this;
  123. return smalltalk.withContext(function($ctx1) {
  124. delete self[aString]; return aString;
  125. return self}, function($ctx1) {$ctx1.fill(self,"basicDelete:",{aString:aString},smalltalk.Object)})},
  126. messageSends: []}),
  127. smalltalk.Object);
  128. smalltalk.addMethod(
  129. smalltalk.method({
  130. selector: "basicPerform:",
  131. fn: function (aString){
  132. var self=this;
  133. return smalltalk.withContext(function($ctx1) {
  134. var $1;
  135. $1=self._basicPerform_withArguments_(aString,[]);
  136. return $1;
  137. }, function($ctx1) {$ctx1.fill(self,"basicPerform:",{aString:aString},smalltalk.Object)})},
  138. messageSends: ["basicPerform:withArguments:"]}),
  139. smalltalk.Object);
  140. smalltalk.addMethod(
  141. smalltalk.method({
  142. selector: "basicPerform:withArguments:",
  143. fn: function (aString,aCollection){
  144. var self=this;
  145. return smalltalk.withContext(function($ctx1) {
  146. return self[aString].apply(self, aCollection);;
  147. return self}, function($ctx1) {$ctx1.fill(self,"basicPerform:withArguments:",{aString:aString,aCollection:aCollection},smalltalk.Object)})},
  148. messageSends: []}),
  149. smalltalk.Object);
  150. smalltalk.addMethod(
  151. smalltalk.method({
  152. selector: "class",
  153. fn: function (){
  154. var self=this;
  155. return smalltalk.withContext(function($ctx1) {
  156. return self.klass;
  157. return self}, function($ctx1) {$ctx1.fill(self,"class",{},smalltalk.Object)})},
  158. messageSends: []}),
  159. smalltalk.Object);
  160. smalltalk.addMethod(
  161. smalltalk.method({
  162. selector: "copy",
  163. fn: function (){
  164. var self=this;
  165. return smalltalk.withContext(function($ctx1) {
  166. var $1;
  167. $1=_st(self._shallowCopy())._postCopy();
  168. return $1;
  169. }, function($ctx1) {$ctx1.fill(self,"copy",{},smalltalk.Object)})},
  170. messageSends: ["postCopy", "shallowCopy"]}),
  171. smalltalk.Object);
  172. smalltalk.addMethod(
  173. smalltalk.method({
  174. selector: "deepCopy",
  175. fn: function (){
  176. var self=this;
  177. return smalltalk.withContext(function($ctx1) {
  178. var copy = self.klass._new();
  179. for(var i in self) {
  180. if(/^@.+/.test(i)) {
  181. copy[i] = self[i]._deepCopy();
  182. }
  183. }
  184. return copy;
  185. ;
  186. return self}, function($ctx1) {$ctx1.fill(self,"deepCopy",{},smalltalk.Object)})},
  187. messageSends: []}),
  188. smalltalk.Object);
  189. smalltalk.addMethod(
  190. smalltalk.method({
  191. selector: "deprecatedAPI",
  192. fn: function (){
  193. var self=this;
  194. return smalltalk.withContext(function($ctx1) {
  195. _st(console)._warn_(_st(_st(_st(_st(smalltalk.getThisContext()._home())._asString()).__comma(" is deprecated! (in ")).__comma(_st(_st(smalltalk.getThisContext()._home())._home())._asString())).__comma(")"));
  196. return self}, function($ctx1) {$ctx1.fill(self,"deprecatedAPI",{},smalltalk.Object)})},
  197. messageSends: ["warn:", ",", "asString", "home"]}),
  198. smalltalk.Object);
  199. smalltalk.addMethod(
  200. smalltalk.method({
  201. selector: "doesNotUnderstand:",
  202. fn: function (aMessage){
  203. var self=this;
  204. function $MessageNotUnderstood(){return smalltalk.MessageNotUnderstood||(typeof MessageNotUnderstood=="undefined"?nil:MessageNotUnderstood)}
  205. return smalltalk.withContext(function($ctx1) {
  206. var $1,$2;
  207. $1=_st($MessageNotUnderstood())._new();
  208. _st($1)._receiver_(self);
  209. _st($1)._message_(aMessage);
  210. $2=_st($1)._signal();
  211. return self}, function($ctx1) {$ctx1.fill(self,"doesNotUnderstand:",{aMessage:aMessage},smalltalk.Object)})},
  212. messageSends: ["receiver:", "new", "message:", "signal"]}),
  213. smalltalk.Object);
  214. smalltalk.addMethod(
  215. smalltalk.method({
  216. selector: "error:",
  217. fn: function (aString){
  218. var self=this;
  219. function $Error(){return smalltalk.Error||(typeof Error=="undefined"?nil:Error)}
  220. return smalltalk.withContext(function($ctx1) {
  221. _st($Error())._signal_(aString);
  222. return self}, function($ctx1) {$ctx1.fill(self,"error:",{aString:aString},smalltalk.Object)})},
  223. messageSends: ["signal:"]}),
  224. smalltalk.Object);
  225. smalltalk.addMethod(
  226. smalltalk.method({
  227. selector: "halt",
  228. fn: function (){
  229. var self=this;
  230. return smalltalk.withContext(function($ctx1) {
  231. self._error_("Halt encountered");
  232. return self}, function($ctx1) {$ctx1.fill(self,"halt",{},smalltalk.Object)})},
  233. messageSends: ["error:"]}),
  234. smalltalk.Object);
  235. smalltalk.addMethod(
  236. smalltalk.method({
  237. selector: "identityHash",
  238. fn: function (){
  239. var self=this;
  240. return smalltalk.withContext(function($ctx1) {
  241. var hash=self.identityHash;
  242. if (hash) return hash;
  243. hash=smalltalk.nextId();
  244. Object.defineProperty(self, 'identityHash', {value:hash});
  245. return hash;
  246. ;
  247. return self}, function($ctx1) {$ctx1.fill(self,"identityHash",{},smalltalk.Object)})},
  248. messageSends: []}),
  249. smalltalk.Object);
  250. smalltalk.addMethod(
  251. smalltalk.method({
  252. selector: "ifNil:",
  253. fn: function (aBlock){
  254. var self=this;
  255. return smalltalk.withContext(function($ctx1) {
  256. var $1;
  257. $1=self;
  258. return $1;
  259. }, function($ctx1) {$ctx1.fill(self,"ifNil:",{aBlock:aBlock},smalltalk.Object)})},
  260. messageSends: []}),
  261. smalltalk.Object);
  262. smalltalk.addMethod(
  263. smalltalk.method({
  264. selector: "ifNil:ifNotNil:",
  265. fn: function (aBlock,anotherBlock){
  266. var self=this;
  267. return smalltalk.withContext(function($ctx1) {
  268. var $1;
  269. $1=_st(anotherBlock)._value_(self);
  270. return $1;
  271. }, function($ctx1) {$ctx1.fill(self,"ifNil:ifNotNil:",{aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.Object)})},
  272. messageSends: ["value:"]}),
  273. smalltalk.Object);
  274. smalltalk.addMethod(
  275. smalltalk.method({
  276. selector: "ifNotNil:",
  277. fn: function (aBlock){
  278. var self=this;
  279. return smalltalk.withContext(function($ctx1) {
  280. var $1;
  281. $1=_st(aBlock)._value_(self);
  282. return $1;
  283. }, function($ctx1) {$ctx1.fill(self,"ifNotNil:",{aBlock:aBlock},smalltalk.Object)})},
  284. messageSends: ["value:"]}),
  285. smalltalk.Object);
  286. smalltalk.addMethod(
  287. smalltalk.method({
  288. selector: "ifNotNil:ifNil:",
  289. fn: function (aBlock,anotherBlock){
  290. var self=this;
  291. return smalltalk.withContext(function($ctx1) {
  292. var $1;
  293. $1=_st(aBlock)._value_(self);
  294. return $1;
  295. }, function($ctx1) {$ctx1.fill(self,"ifNotNil:ifNil:",{aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.Object)})},
  296. messageSends: ["value:"]}),
  297. smalltalk.Object);
  298. smalltalk.addMethod(
  299. smalltalk.method({
  300. selector: "initialize",
  301. fn: function (){
  302. var self=this;
  303. return smalltalk.withContext(function($ctx1) {
  304. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.Object)})},
  305. messageSends: []}),
  306. smalltalk.Object);
  307. smalltalk.addMethod(
  308. smalltalk.method({
  309. selector: "inspect",
  310. fn: function (){
  311. var self=this;
  312. function $InspectorHandler(){return smalltalk.InspectorHandler||(typeof InspectorHandler=="undefined"?nil:InspectorHandler)}
  313. return smalltalk.withContext(function($ctx1) {
  314. _st($InspectorHandler())._inspect_(self);
  315. return self}, function($ctx1) {$ctx1.fill(self,"inspect",{},smalltalk.Object)})},
  316. messageSends: ["inspect:"]}),
  317. smalltalk.Object);
  318. smalltalk.addMethod(
  319. smalltalk.method({
  320. selector: "inspectOn:",
  321. fn: function (anInspector){
  322. var self=this;
  323. var variables;
  324. function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  325. return smalltalk.withContext(function($ctx1) {
  326. var $1,$2;
  327. variables=_st($Dictionary())._new();
  328. _st(variables)._at_put_("#self",self);
  329. _st(_st(self._class())._allInstanceVariableNames())._do_((function(each){
  330. return smalltalk.withContext(function($ctx2) {
  331. return _st(variables)._at_put_(each,self._instVarAt_(each));
  332. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  333. $1=anInspector;
  334. _st($1)._setLabel_(self._printString());
  335. $2=_st($1)._setVariables_(variables);
  336. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},smalltalk.Object)})},
  337. messageSends: ["new", "at:put:", "do:", "instVarAt:", "allInstanceVariableNames", "class", "setLabel:", "printString", "setVariables:"]}),
  338. smalltalk.Object);
  339. smalltalk.addMethod(
  340. smalltalk.method({
  341. selector: "instVarAt:",
  342. fn: function (aString){
  343. var self=this;
  344. return smalltalk.withContext(function($ctx1) {
  345. return self['@'+aString] ;
  346. return self}, function($ctx1) {$ctx1.fill(self,"instVarAt:",{aString:aString},smalltalk.Object)})},
  347. messageSends: []}),
  348. smalltalk.Object);
  349. smalltalk.addMethod(
  350. smalltalk.method({
  351. selector: "instVarAt:put:",
  352. fn: function (aString,anObject){
  353. var self=this;
  354. return smalltalk.withContext(function($ctx1) {
  355. self['@' + aString] = anObject ;
  356. return self}, function($ctx1) {$ctx1.fill(self,"instVarAt:put:",{aString:aString,anObject:anObject},smalltalk.Object)})},
  357. messageSends: []}),
  358. smalltalk.Object);
  359. smalltalk.addMethod(
  360. smalltalk.method({
  361. selector: "isBehavior",
  362. fn: function (){
  363. var self=this;
  364. return smalltalk.withContext(function($ctx1) {
  365. return false;
  366. }, function($ctx1) {$ctx1.fill(self,"isBehavior",{},smalltalk.Object)})},
  367. messageSends: []}),
  368. smalltalk.Object);
  369. smalltalk.addMethod(
  370. smalltalk.method({
  371. selector: "isBoolean",
  372. fn: function (){
  373. var self=this;
  374. return smalltalk.withContext(function($ctx1) {
  375. return false;
  376. }, function($ctx1) {$ctx1.fill(self,"isBoolean",{},smalltalk.Object)})},
  377. messageSends: []}),
  378. smalltalk.Object);
  379. smalltalk.addMethod(
  380. smalltalk.method({
  381. selector: "isClass",
  382. fn: function (){
  383. var self=this;
  384. return smalltalk.withContext(function($ctx1) {
  385. return false;
  386. }, function($ctx1) {$ctx1.fill(self,"isClass",{},smalltalk.Object)})},
  387. messageSends: []}),
  388. smalltalk.Object);
  389. smalltalk.addMethod(
  390. smalltalk.method({
  391. selector: "isCompiledMethod",
  392. fn: function (){
  393. var self=this;
  394. return smalltalk.withContext(function($ctx1) {
  395. return false;
  396. }, function($ctx1) {$ctx1.fill(self,"isCompiledMethod",{},smalltalk.Object)})},
  397. messageSends: []}),
  398. smalltalk.Object);
  399. smalltalk.addMethod(
  400. smalltalk.method({
  401. selector: "isImmutable",
  402. fn: function (){
  403. var self=this;
  404. return smalltalk.withContext(function($ctx1) {
  405. return false;
  406. }, function($ctx1) {$ctx1.fill(self,"isImmutable",{},smalltalk.Object)})},
  407. messageSends: []}),
  408. smalltalk.Object);
  409. smalltalk.addMethod(
  410. smalltalk.method({
  411. selector: "isKindOf:",
  412. fn: function (aClass){
  413. var self=this;
  414. return smalltalk.withContext(function($ctx1) {
  415. var $2,$1;
  416. $2=self._isMemberOf_(aClass);
  417. if(smalltalk.assert($2)){
  418. $1=true;
  419. } else {
  420. $1=_st(self._class())._inheritsFrom_(aClass);
  421. };
  422. return $1;
  423. }, function($ctx1) {$ctx1.fill(self,"isKindOf:",{aClass:aClass},smalltalk.Object)})},
  424. messageSends: ["ifTrue:ifFalse:", "inheritsFrom:", "class", "isMemberOf:"]}),
  425. smalltalk.Object);
  426. smalltalk.addMethod(
  427. smalltalk.method({
  428. selector: "isMemberOf:",
  429. fn: function (aClass){
  430. var self=this;
  431. return smalltalk.withContext(function($ctx1) {
  432. var $1;
  433. $1=_st(self._class()).__eq(aClass);
  434. return $1;
  435. }, function($ctx1) {$ctx1.fill(self,"isMemberOf:",{aClass:aClass},smalltalk.Object)})},
  436. messageSends: ["=", "class"]}),
  437. smalltalk.Object);
  438. smalltalk.addMethod(
  439. smalltalk.method({
  440. selector: "isMetaclass",
  441. fn: function (){
  442. var self=this;
  443. return smalltalk.withContext(function($ctx1) {
  444. return false;
  445. }, function($ctx1) {$ctx1.fill(self,"isMetaclass",{},smalltalk.Object)})},
  446. messageSends: []}),
  447. smalltalk.Object);
  448. smalltalk.addMethod(
  449. smalltalk.method({
  450. selector: "isNil",
  451. fn: function (){
  452. var self=this;
  453. return smalltalk.withContext(function($ctx1) {
  454. return false;
  455. }, function($ctx1) {$ctx1.fill(self,"isNil",{},smalltalk.Object)})},
  456. messageSends: []}),
  457. smalltalk.Object);
  458. smalltalk.addMethod(
  459. smalltalk.method({
  460. selector: "isNumber",
  461. fn: function (){
  462. var self=this;
  463. return smalltalk.withContext(function($ctx1) {
  464. return false;
  465. }, function($ctx1) {$ctx1.fill(self,"isNumber",{},smalltalk.Object)})},
  466. messageSends: []}),
  467. smalltalk.Object);
  468. smalltalk.addMethod(
  469. smalltalk.method({
  470. selector: "isPackage",
  471. fn: function (){
  472. var self=this;
  473. return smalltalk.withContext(function($ctx1) {
  474. return false;
  475. }, function($ctx1) {$ctx1.fill(self,"isPackage",{},smalltalk.Object)})},
  476. messageSends: []}),
  477. smalltalk.Object);
  478. smalltalk.addMethod(
  479. smalltalk.method({
  480. selector: "isParseFailure",
  481. fn: function (){
  482. var self=this;
  483. return smalltalk.withContext(function($ctx1) {
  484. return false;
  485. }, function($ctx1) {$ctx1.fill(self,"isParseFailure",{},smalltalk.Object)})},
  486. messageSends: []}),
  487. smalltalk.Object);
  488. smalltalk.addMethod(
  489. smalltalk.method({
  490. selector: "isString",
  491. fn: function (){
  492. var self=this;
  493. return smalltalk.withContext(function($ctx1) {
  494. return false;
  495. }, function($ctx1) {$ctx1.fill(self,"isString",{},smalltalk.Object)})},
  496. messageSends: []}),
  497. smalltalk.Object);
  498. smalltalk.addMethod(
  499. smalltalk.method({
  500. selector: "isSymbol",
  501. fn: function (){
  502. var self=this;
  503. return smalltalk.withContext(function($ctx1) {
  504. return false;
  505. }, function($ctx1) {$ctx1.fill(self,"isSymbol",{},smalltalk.Object)})},
  506. messageSends: []}),
  507. smalltalk.Object);
  508. smalltalk.addMethod(
  509. smalltalk.method({
  510. selector: "notNil",
  511. fn: function (){
  512. var self=this;
  513. return smalltalk.withContext(function($ctx1) {
  514. var $1;
  515. $1=_st(self._isNil())._not();
  516. return $1;
  517. }, function($ctx1) {$ctx1.fill(self,"notNil",{},smalltalk.Object)})},
  518. messageSends: ["not", "isNil"]}),
  519. smalltalk.Object);
  520. smalltalk.addMethod(
  521. smalltalk.method({
  522. selector: "perform:",
  523. fn: function (aString){
  524. var self=this;
  525. return smalltalk.withContext(function($ctx1) {
  526. var $1;
  527. $1=self._perform_withArguments_(aString,[]);
  528. return $1;
  529. }, function($ctx1) {$ctx1.fill(self,"perform:",{aString:aString},smalltalk.Object)})},
  530. messageSends: ["perform:withArguments:"]}),
  531. smalltalk.Object);
  532. smalltalk.addMethod(
  533. smalltalk.method({
  534. selector: "perform:withArguments:",
  535. fn: function (aString,aCollection){
  536. var self=this;
  537. return smalltalk.withContext(function($ctx1) {
  538. return smalltalk.send(self, aString._asSelector(), aCollection);
  539. return self}, function($ctx1) {$ctx1.fill(self,"perform:withArguments:",{aString:aString,aCollection:aCollection},smalltalk.Object)})},
  540. messageSends: []}),
  541. smalltalk.Object);
  542. smalltalk.addMethod(
  543. smalltalk.method({
  544. selector: "postCopy",
  545. fn: function (){
  546. var self=this;
  547. return smalltalk.withContext(function($ctx1) {
  548. return self}, function($ctx1) {$ctx1.fill(self,"postCopy",{},smalltalk.Object)})},
  549. messageSends: []}),
  550. smalltalk.Object);
  551. smalltalk.addMethod(
  552. smalltalk.method({
  553. selector: "printOn:",
  554. fn: function (aStream){
  555. var self=this;
  556. return smalltalk.withContext(function($ctx1) {
  557. var $1,$3,$2;
  558. $1=aStream;
  559. $3=_st(_st(_st(self._class())._name())._first())._isVowel();
  560. if(smalltalk.assert($3)){
  561. $2="an ";
  562. } else {
  563. $2="a ";
  564. };
  565. _st($1)._nextPutAll_($2);
  566. _st(aStream)._nextPutAll_(_st(self._class())._name());
  567. return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.Object)})},
  568. messageSends: ["nextPutAll:", "ifTrue:ifFalse:", "isVowel", "first", "name", "class"]}),
  569. smalltalk.Object);
  570. smalltalk.addMethod(
  571. smalltalk.method({
  572. selector: "printString",
  573. fn: function (){
  574. var self=this;
  575. function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
  576. return smalltalk.withContext(function($ctx1) {
  577. var $1;
  578. $1=_st($String())._streamContents_((function(stream){
  579. return smalltalk.withContext(function($ctx2) {
  580. return self._printOn_(stream);
  581. }, function($ctx2) {$ctx2.fillBlock({stream:stream},$ctx1)})}));
  582. return $1;
  583. }, function($ctx1) {$ctx1.fill(self,"printString",{},smalltalk.Object)})},
  584. messageSends: ["streamContents:", "printOn:"]}),
  585. smalltalk.Object);
  586. smalltalk.addMethod(
  587. smalltalk.method({
  588. selector: "putOn:",
  589. fn: function (aStream){
  590. var self=this;
  591. return smalltalk.withContext(function($ctx1) {
  592. _st(aStream)._nextPut_(self);
  593. return self}, function($ctx1) {$ctx1.fill(self,"putOn:",{aStream:aStream},smalltalk.Object)})},
  594. messageSends: ["nextPut:"]}),
  595. smalltalk.Object);
  596. smalltalk.addMethod(
  597. smalltalk.method({
  598. selector: "respondsTo:",
  599. fn: function (aSelector){
  600. var self=this;
  601. return smalltalk.withContext(function($ctx1) {
  602. var $1;
  603. $1=_st(self._class())._canUnderstand_(aSelector);
  604. return $1;
  605. }, function($ctx1) {$ctx1.fill(self,"respondsTo:",{aSelector:aSelector},smalltalk.Object)})},
  606. messageSends: ["canUnderstand:", "class"]}),
  607. smalltalk.Object);
  608. smalltalk.addMethod(
  609. smalltalk.method({
  610. selector: "shallowCopy",
  611. fn: function (){
  612. var self=this;
  613. return smalltalk.withContext(function($ctx1) {
  614. var copy = self.klass._new();
  615. for(var i in self) {
  616. if(/^@.+/.test(i)) {
  617. copy[i] = self[i];
  618. }
  619. }
  620. return copy;
  621. ;
  622. return self}, function($ctx1) {$ctx1.fill(self,"shallowCopy",{},smalltalk.Object)})},
  623. messageSends: []}),
  624. smalltalk.Object);
  625. smalltalk.addMethod(
  626. smalltalk.method({
  627. selector: "shouldNotImplement",
  628. fn: function (){
  629. var self=this;
  630. return smalltalk.withContext(function($ctx1) {
  631. self._error_("This method should not be implemented in ".__comma(_st(self._class())._name()));
  632. return self}, function($ctx1) {$ctx1.fill(self,"shouldNotImplement",{},smalltalk.Object)})},
  633. messageSends: ["error:", ",", "name", "class"]}),
  634. smalltalk.Object);
  635. smalltalk.addMethod(
  636. smalltalk.method({
  637. selector: "size",
  638. fn: function (){
  639. var self=this;
  640. return smalltalk.withContext(function($ctx1) {
  641. self._error_("Object not indexable");
  642. return self}, function($ctx1) {$ctx1.fill(self,"size",{},smalltalk.Object)})},
  643. messageSends: ["error:"]}),
  644. smalltalk.Object);
  645. smalltalk.addMethod(
  646. smalltalk.method({
  647. selector: "subclassResponsibility",
  648. fn: function (){
  649. var self=this;
  650. return smalltalk.withContext(function($ctx1) {
  651. self._error_("This method is a responsibility of a subclass");
  652. return self}, function($ctx1) {$ctx1.fill(self,"subclassResponsibility",{},smalltalk.Object)})},
  653. messageSends: ["error:"]}),
  654. smalltalk.Object);
  655. smalltalk.addMethod(
  656. smalltalk.method({
  657. selector: "test",
  658. fn: function (){
  659. var self=this;
  660. var a;
  661. return smalltalk.withContext(function($ctx1) {
  662. a=(1);
  663. self._halt();
  664. return self}, function($ctx1) {$ctx1.fill(self,"test",{a:a},smalltalk.Object)})},
  665. messageSends: ["halt"]}),
  666. smalltalk.Object);
  667. smalltalk.addMethod(
  668. smalltalk.method({
  669. selector: "throw:",
  670. fn: function (anObject){
  671. var self=this;
  672. return smalltalk.withContext(function($ctx1) {
  673. throw anObject ;
  674. return self}, function($ctx1) {$ctx1.fill(self,"throw:",{anObject:anObject},smalltalk.Object)})},
  675. messageSends: []}),
  676. smalltalk.Object);
  677. smalltalk.addMethod(
  678. smalltalk.method({
  679. selector: "try:catch:",
  680. fn: function (aBlock,anotherBlock){
  681. var self=this;
  682. return smalltalk.withContext(function($ctx1) {
  683. try{return aBlock._value()} catch(e) {return anotherBlock._value_(e)};
  684. return self}, function($ctx1) {$ctx1.fill(self,"try:catch:",{aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.Object)})},
  685. messageSends: []}),
  686. smalltalk.Object);
  687. smalltalk.addMethod(
  688. smalltalk.method({
  689. selector: "value",
  690. fn: function (){
  691. var self=this;
  692. return smalltalk.withContext(function($ctx1) {
  693. return self.valueOf();
  694. return self}, function($ctx1) {$ctx1.fill(self,"value",{},smalltalk.Object)})},
  695. messageSends: []}),
  696. smalltalk.Object);
  697. smalltalk.addMethod(
  698. smalltalk.method({
  699. selector: "yourself",
  700. fn: function (){
  701. var self=this;
  702. return smalltalk.withContext(function($ctx1) {
  703. var $1;
  704. $1=self;
  705. return $1;
  706. }, function($ctx1) {$ctx1.fill(self,"yourself",{},smalltalk.Object)})},
  707. messageSends: []}),
  708. smalltalk.Object);
  709. smalltalk.addMethod(
  710. smalltalk.method({
  711. selector: "~=",
  712. fn: function (anObject){
  713. var self=this;
  714. return smalltalk.withContext(function($ctx1) {
  715. var $1;
  716. $1=_st(self.__eq(anObject)).__eq(false);
  717. return $1;
  718. }, function($ctx1) {$ctx1.fill(self,"~=",{anObject:anObject},smalltalk.Object)})},
  719. messageSends: ["="]}),
  720. smalltalk.Object);
  721. smalltalk.addMethod(
  722. smalltalk.method({
  723. selector: "~~",
  724. fn: function (anObject){
  725. var self=this;
  726. return smalltalk.withContext(function($ctx1) {
  727. var $1;
  728. $1=_st(self.__eq_eq(anObject)).__eq(false);
  729. return $1;
  730. }, function($ctx1) {$ctx1.fill(self,"~~",{anObject:anObject},smalltalk.Object)})},
  731. messageSends: ["=", "=="]}),
  732. smalltalk.Object);
  733. smalltalk.addMethod(
  734. smalltalk.method({
  735. selector: "heliosClass",
  736. fn: function (){
  737. var self=this;
  738. return smalltalk.withContext(function($ctx1) {
  739. return "class";
  740. }, function($ctx1) {$ctx1.fill(self,"heliosClass",{},smalltalk.Object.klass)})},
  741. messageSends: []}),
  742. smalltalk.Object.klass);
  743. smalltalk.addMethod(
  744. smalltalk.method({
  745. selector: "initialize",
  746. fn: function (){
  747. var self=this;
  748. return smalltalk.withContext(function($ctx1) {
  749. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.Object.klass)})},
  750. messageSends: []}),
  751. smalltalk.Object.klass);
  752. smalltalk.addClass('Boolean', smalltalk.Object, [], 'Kernel-Objects');
  753. smalltalk.addMethod(
  754. smalltalk.method({
  755. selector: "&",
  756. fn: function (aBoolean){
  757. var self=this;
  758. return smalltalk.withContext(function($ctx1) {
  759. if(self == true) {
  760. return aBoolean;
  761. } else {
  762. return false;
  763. }
  764. ;
  765. return self}, function($ctx1) {$ctx1.fill(self,"&",{aBoolean:aBoolean},smalltalk.Boolean)})},
  766. messageSends: []}),
  767. smalltalk.Boolean);
  768. smalltalk.addMethod(
  769. smalltalk.method({
  770. selector: "=",
  771. fn: function (aBoolean){
  772. var self=this;
  773. return smalltalk.withContext(function($ctx1) {
  774. if(! aBoolean._isBoolean || ! aBoolean._isBoolean()) {
  775. return false;
  776. }
  777. return Boolean(self == true) == aBoolean
  778. ;
  779. return self}, function($ctx1) {$ctx1.fill(self,"=",{aBoolean:aBoolean},smalltalk.Boolean)})},
  780. messageSends: []}),
  781. smalltalk.Boolean);
  782. smalltalk.addMethod(
  783. smalltalk.method({
  784. selector: "==",
  785. fn: function (aBoolean){
  786. var self=this;
  787. return smalltalk.withContext(function($ctx1) {
  788. var $1;
  789. $1=self.__eq(aBoolean);
  790. return $1;
  791. }, function($ctx1) {$ctx1.fill(self,"==",{aBoolean:aBoolean},smalltalk.Boolean)})},
  792. messageSends: ["="]}),
  793. smalltalk.Boolean);
  794. smalltalk.addMethod(
  795. smalltalk.method({
  796. selector: "and:",
  797. fn: function (aBlock){
  798. var self=this;
  799. return smalltalk.withContext(function($ctx1) {
  800. var $2,$1;
  801. $2=self.__eq(true);
  802. $1=_st($2)._ifTrue_ifFalse_(aBlock,(function(){
  803. return smalltalk.withContext(function($ctx2) {
  804. return false;
  805. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  806. return $1;
  807. }, function($ctx1) {$ctx1.fill(self,"and:",{aBlock:aBlock},smalltalk.Boolean)})},
  808. messageSends: ["ifTrue:ifFalse:", "="]}),
  809. smalltalk.Boolean);
  810. smalltalk.addMethod(
  811. smalltalk.method({
  812. selector: "asBit",
  813. fn: function (){
  814. var self=this;
  815. return smalltalk.withContext(function($ctx1) {
  816. var $2,$1;
  817. $2=self;
  818. if(smalltalk.assert($2)){
  819. $1=(1);
  820. } else {
  821. $1=(0);
  822. };
  823. return $1;
  824. }, function($ctx1) {$ctx1.fill(self,"asBit",{},smalltalk.Boolean)})},
  825. messageSends: ["ifTrue:ifFalse:"]}),
  826. smalltalk.Boolean);
  827. smalltalk.addMethod(
  828. smalltalk.method({
  829. selector: "asJSON",
  830. fn: function (){
  831. var self=this;
  832. return smalltalk.withContext(function($ctx1) {
  833. var $1;
  834. $1=self;
  835. return $1;
  836. }, function($ctx1) {$ctx1.fill(self,"asJSON",{},smalltalk.Boolean)})},
  837. messageSends: []}),
  838. smalltalk.Boolean);
  839. smalltalk.addMethod(
  840. smalltalk.method({
  841. selector: "asString",
  842. fn: function (){
  843. var self=this;
  844. return smalltalk.withContext(function($ctx1) {
  845. return self.toString() ;
  846. return self}, function($ctx1) {$ctx1.fill(self,"asString",{},smalltalk.Boolean)})},
  847. messageSends: []}),
  848. smalltalk.Boolean);
  849. smalltalk.addMethod(
  850. smalltalk.method({
  851. selector: "deepCopy",
  852. fn: function (){
  853. var self=this;
  854. return smalltalk.withContext(function($ctx1) {
  855. var $1;
  856. $1=self;
  857. return $1;
  858. }, function($ctx1) {$ctx1.fill(self,"deepCopy",{},smalltalk.Boolean)})},
  859. messageSends: []}),
  860. smalltalk.Boolean);
  861. smalltalk.addMethod(
  862. smalltalk.method({
  863. selector: "ifFalse:",
  864. fn: function (aBlock){
  865. var self=this;
  866. return smalltalk.withContext(function($ctx1) {
  867. var $2,$1;
  868. $2=self;
  869. $1=_st($2)._ifTrue_ifFalse_((function(){
  870. return smalltalk.withContext(function($ctx2) {
  871. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),aBlock);
  872. return $1;
  873. }, function($ctx1) {$ctx1.fill(self,"ifFalse:",{aBlock:aBlock},smalltalk.Boolean)})},
  874. messageSends: ["ifTrue:ifFalse:"]}),
  875. smalltalk.Boolean);
  876. smalltalk.addMethod(
  877. smalltalk.method({
  878. selector: "ifFalse:ifTrue:",
  879. fn: function (aBlock,anotherBlock){
  880. var self=this;
  881. return smalltalk.withContext(function($ctx1) {
  882. var $2,$1;
  883. $2=self;
  884. $1=_st($2)._ifTrue_ifFalse_(anotherBlock,aBlock);
  885. return $1;
  886. }, function($ctx1) {$ctx1.fill(self,"ifFalse:ifTrue:",{aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.Boolean)})},
  887. messageSends: ["ifTrue:ifFalse:"]}),
  888. smalltalk.Boolean);
  889. smalltalk.addMethod(
  890. smalltalk.method({
  891. selector: "ifTrue:",
  892. fn: function (aBlock){
  893. var self=this;
  894. return smalltalk.withContext(function($ctx1) {
  895. var $2,$1;
  896. $2=self;
  897. $1=_st($2)._ifTrue_ifFalse_(aBlock,(function(){
  898. return smalltalk.withContext(function($ctx2) {
  899. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  900. return $1;
  901. }, function($ctx1) {$ctx1.fill(self,"ifTrue:",{aBlock:aBlock},smalltalk.Boolean)})},
  902. messageSends: ["ifTrue:ifFalse:"]}),
  903. smalltalk.Boolean);
  904. smalltalk.addMethod(
  905. smalltalk.method({
  906. selector: "ifTrue:ifFalse:",
  907. fn: function (aBlock,anotherBlock){
  908. var self=this;
  909. return smalltalk.withContext(function($ctx1) {
  910. if(self == true) {
  911. return aBlock._value();
  912. } else {
  913. return anotherBlock._value();
  914. }
  915. ;
  916. return self}, function($ctx1) {$ctx1.fill(self,"ifTrue:ifFalse:",{aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.Boolean)})},
  917. messageSends: []}),
  918. smalltalk.Boolean);
  919. smalltalk.addMethod(
  920. smalltalk.method({
  921. selector: "isBoolean",
  922. fn: function (){
  923. var self=this;
  924. return smalltalk.withContext(function($ctx1) {
  925. return true;
  926. }, function($ctx1) {$ctx1.fill(self,"isBoolean",{},smalltalk.Boolean)})},
  927. messageSends: []}),
  928. smalltalk.Boolean);
  929. smalltalk.addMethod(
  930. smalltalk.method({
  931. selector: "isImmutable",
  932. fn: function (){
  933. var self=this;
  934. return smalltalk.withContext(function($ctx1) {
  935. return true;
  936. }, function($ctx1) {$ctx1.fill(self,"isImmutable",{},smalltalk.Boolean)})},
  937. messageSends: []}),
  938. smalltalk.Boolean);
  939. smalltalk.addMethod(
  940. smalltalk.method({
  941. selector: "not",
  942. fn: function (){
  943. var self=this;
  944. return smalltalk.withContext(function($ctx1) {
  945. var $1;
  946. $1=self.__eq(false);
  947. return $1;
  948. }, function($ctx1) {$ctx1.fill(self,"not",{},smalltalk.Boolean)})},
  949. messageSends: ["="]}),
  950. smalltalk.Boolean);
  951. smalltalk.addMethod(
  952. smalltalk.method({
  953. selector: "or:",
  954. fn: function (aBlock){
  955. var self=this;
  956. return smalltalk.withContext(function($ctx1) {
  957. var $2,$1;
  958. $2=self.__eq(true);
  959. $1=_st($2)._ifTrue_ifFalse_((function(){
  960. return smalltalk.withContext(function($ctx2) {
  961. return true;
  962. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),aBlock);
  963. return $1;
  964. }, function($ctx1) {$ctx1.fill(self,"or:",{aBlock:aBlock},smalltalk.Boolean)})},
  965. messageSends: ["ifTrue:ifFalse:", "="]}),
  966. smalltalk.Boolean);
  967. smalltalk.addMethod(
  968. smalltalk.method({
  969. selector: "printOn:",
  970. fn: function (aStream){
  971. var self=this;
  972. return smalltalk.withContext(function($ctx1) {
  973. _st(aStream)._nextPutAll_(self._asString());
  974. return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.Boolean)})},
  975. messageSends: ["nextPutAll:", "asString"]}),
  976. smalltalk.Boolean);
  977. smalltalk.addMethod(
  978. smalltalk.method({
  979. selector: "shallowCopy",
  980. fn: function (){
  981. var self=this;
  982. return smalltalk.withContext(function($ctx1) {
  983. var $1;
  984. $1=self;
  985. return $1;
  986. }, function($ctx1) {$ctx1.fill(self,"shallowCopy",{},smalltalk.Boolean)})},
  987. messageSends: []}),
  988. smalltalk.Boolean);
  989. smalltalk.addMethod(
  990. smalltalk.method({
  991. selector: "|",
  992. fn: function (aBoolean){
  993. var self=this;
  994. return smalltalk.withContext(function($ctx1) {
  995. if(self == true) {
  996. return true;
  997. } else {
  998. return aBoolean;
  999. }
  1000. ;
  1001. return self}, function($ctx1) {$ctx1.fill(self,"|",{aBoolean:aBoolean},smalltalk.Boolean)})},
  1002. messageSends: []}),
  1003. smalltalk.Boolean);
  1004. smalltalk.addClass('Date', smalltalk.Object, [], 'Kernel-Objects');
  1005. smalltalk.addMethod(
  1006. smalltalk.method({
  1007. selector: "+",
  1008. fn: function (aDate){
  1009. var self=this;
  1010. return smalltalk.withContext(function($ctx1) {
  1011. return self + aDate;
  1012. return self}, function($ctx1) {$ctx1.fill(self,"+",{aDate:aDate},smalltalk.Date)})},
  1013. messageSends: []}),
  1014. smalltalk.Date);
  1015. smalltalk.addMethod(
  1016. smalltalk.method({
  1017. selector: "-",
  1018. fn: function (aDate){
  1019. var self=this;
  1020. return smalltalk.withContext(function($ctx1) {
  1021. return self - aDate;
  1022. return self}, function($ctx1) {$ctx1.fill(self,"-",{aDate:aDate},smalltalk.Date)})},
  1023. messageSends: []}),
  1024. smalltalk.Date);
  1025. smalltalk.addMethod(
  1026. smalltalk.method({
  1027. selector: "<",
  1028. fn: function (aDate){
  1029. var self=this;
  1030. return smalltalk.withContext(function($ctx1) {
  1031. return self < aDate;
  1032. return self}, function($ctx1) {$ctx1.fill(self,"<",{aDate:aDate},smalltalk.Date)})},
  1033. messageSends: []}),
  1034. smalltalk.Date);
  1035. smalltalk.addMethod(
  1036. smalltalk.method({
  1037. selector: "<=",
  1038. fn: function (aDate){
  1039. var self=this;
  1040. return smalltalk.withContext(function($ctx1) {
  1041. return self <= aDate;
  1042. return self}, function($ctx1) {$ctx1.fill(self,"<=",{aDate:aDate},smalltalk.Date)})},
  1043. messageSends: []}),
  1044. smalltalk.Date);
  1045. smalltalk.addMethod(
  1046. smalltalk.method({
  1047. selector: ">",
  1048. fn: function (aDate){
  1049. var self=this;
  1050. return smalltalk.withContext(function($ctx1) {
  1051. return self > aDate;
  1052. return self}, function($ctx1) {$ctx1.fill(self,">",{aDate:aDate},smalltalk.Date)})},
  1053. messageSends: []}),
  1054. smalltalk.Date);
  1055. smalltalk.addMethod(
  1056. smalltalk.method({
  1057. selector: ">=",
  1058. fn: function (aDate){
  1059. var self=this;
  1060. return smalltalk.withContext(function($ctx1) {
  1061. return self >= aDate;
  1062. return self}, function($ctx1) {$ctx1.fill(self,">=",{aDate:aDate},smalltalk.Date)})},
  1063. messageSends: []}),
  1064. smalltalk.Date);
  1065. smalltalk.addMethod(
  1066. smalltalk.method({
  1067. selector: "asDateString",
  1068. fn: function (){
  1069. var self=this;
  1070. return smalltalk.withContext(function($ctx1) {
  1071. return self.toDateString();
  1072. return self}, function($ctx1) {$ctx1.fill(self,"asDateString",{},smalltalk.Date)})},
  1073. messageSends: []}),
  1074. smalltalk.Date);
  1075. smalltalk.addMethod(
  1076. smalltalk.method({
  1077. selector: "asLocaleString",
  1078. fn: function (){
  1079. var self=this;
  1080. return smalltalk.withContext(function($ctx1) {
  1081. return self.toLocaleString();
  1082. return self}, function($ctx1) {$ctx1.fill(self,"asLocaleString",{},smalltalk.Date)})},
  1083. messageSends: []}),
  1084. smalltalk.Date);
  1085. smalltalk.addMethod(
  1086. smalltalk.method({
  1087. selector: "asMilliseconds",
  1088. fn: function (){
  1089. var self=this;
  1090. return smalltalk.withContext(function($ctx1) {
  1091. var $1;
  1092. $1=self._time();
  1093. return $1;
  1094. }, function($ctx1) {$ctx1.fill(self,"asMilliseconds",{},smalltalk.Date)})},
  1095. messageSends: ["time"]}),
  1096. smalltalk.Date);
  1097. smalltalk.addMethod(
  1098. smalltalk.method({
  1099. selector: "asNumber",
  1100. fn: function (){
  1101. var self=this;
  1102. return smalltalk.withContext(function($ctx1) {
  1103. var $1;
  1104. $1=self._asMilliseconds();
  1105. return $1;
  1106. }, function($ctx1) {$ctx1.fill(self,"asNumber",{},smalltalk.Date)})},
  1107. messageSends: ["asMilliseconds"]}),
  1108. smalltalk.Date);
  1109. smalltalk.addMethod(
  1110. smalltalk.method({
  1111. selector: "asString",
  1112. fn: function (){
  1113. var self=this;
  1114. return smalltalk.withContext(function($ctx1) {
  1115. return self.toString();
  1116. return self}, function($ctx1) {$ctx1.fill(self,"asString",{},smalltalk.Date)})},
  1117. messageSends: []}),
  1118. smalltalk.Date);
  1119. smalltalk.addMethod(
  1120. smalltalk.method({
  1121. selector: "asTimeString",
  1122. fn: function (){
  1123. var self=this;
  1124. return smalltalk.withContext(function($ctx1) {
  1125. return self.toTimeString();
  1126. return self}, function($ctx1) {$ctx1.fill(self,"asTimeString",{},smalltalk.Date)})},
  1127. messageSends: []}),
  1128. smalltalk.Date);
  1129. smalltalk.addMethod(
  1130. smalltalk.method({
  1131. selector: "day",
  1132. fn: function (){
  1133. var self=this;
  1134. return smalltalk.withContext(function($ctx1) {
  1135. var $1;
  1136. $1=self._dayOfWeek();
  1137. return $1;
  1138. }, function($ctx1) {$ctx1.fill(self,"day",{},smalltalk.Date)})},
  1139. messageSends: ["dayOfWeek"]}),
  1140. smalltalk.Date);
  1141. smalltalk.addMethod(
  1142. smalltalk.method({
  1143. selector: "day:",
  1144. fn: function (aNumber){
  1145. var self=this;
  1146. return smalltalk.withContext(function($ctx1) {
  1147. self._dayOfWeek_(aNumber);
  1148. return self}, function($ctx1) {$ctx1.fill(self,"day:",{aNumber:aNumber},smalltalk.Date)})},
  1149. messageSends: ["dayOfWeek:"]}),
  1150. smalltalk.Date);
  1151. smalltalk.addMethod(
  1152. smalltalk.method({
  1153. selector: "dayOfMonth",
  1154. fn: function (){
  1155. var self=this;
  1156. return smalltalk.withContext(function($ctx1) {
  1157. return self.getDate();
  1158. return self}, function($ctx1) {$ctx1.fill(self,"dayOfMonth",{},smalltalk.Date)})},
  1159. messageSends: []}),
  1160. smalltalk.Date);
  1161. smalltalk.addMethod(
  1162. smalltalk.method({
  1163. selector: "dayOfMonth:",
  1164. fn: function (aNumber){
  1165. var self=this;
  1166. return smalltalk.withContext(function($ctx1) {
  1167. self.setDate(aNumber);
  1168. return self}, function($ctx1) {$ctx1.fill(self,"dayOfMonth:",{aNumber:aNumber},smalltalk.Date)})},
  1169. messageSends: []}),
  1170. smalltalk.Date);
  1171. smalltalk.addMethod(
  1172. smalltalk.method({
  1173. selector: "dayOfWeek",
  1174. fn: function (){
  1175. var self=this;
  1176. return smalltalk.withContext(function($ctx1) {
  1177. return self.getDay() + 1;
  1178. return self}, function($ctx1) {$ctx1.fill(self,"dayOfWeek",{},smalltalk.Date)})},
  1179. messageSends: []}),
  1180. smalltalk.Date);
  1181. smalltalk.addMethod(
  1182. smalltalk.method({
  1183. selector: "dayOfWeek:",
  1184. fn: function (aNumber){
  1185. var self=this;
  1186. return smalltalk.withContext(function($ctx1) {
  1187. return self.setDay(aNumber - 1);
  1188. return self}, function($ctx1) {$ctx1.fill(self,"dayOfWeek:",{aNumber:aNumber},smalltalk.Date)})},
  1189. messageSends: []}),
  1190. smalltalk.Date);
  1191. smalltalk.addMethod(
  1192. smalltalk.method({
  1193. selector: "hours",
  1194. fn: function (){
  1195. var self=this;
  1196. return smalltalk.withContext(function($ctx1) {
  1197. return self.getHours();
  1198. return self}, function($ctx1) {$ctx1.fill(self,"hours",{},smalltalk.Date)})},
  1199. messageSends: []}),
  1200. smalltalk.Date);
  1201. smalltalk.addMethod(
  1202. smalltalk.method({
  1203. selector: "hours:",
  1204. fn: function (aNumber){
  1205. var self=this;
  1206. return smalltalk.withContext(function($ctx1) {
  1207. self.setHours(aNumber);
  1208. return self}, function($ctx1) {$ctx1.fill(self,"hours:",{aNumber:aNumber},smalltalk.Date)})},
  1209. messageSends: []}),
  1210. smalltalk.Date);
  1211. smalltalk.addMethod(
  1212. smalltalk.method({
  1213. selector: "milliseconds",
  1214. fn: function (){
  1215. var self=this;
  1216. return smalltalk.withContext(function($ctx1) {
  1217. return self.getMilliseconds();
  1218. return self}, function($ctx1) {$ctx1.fill(self,"milliseconds",{},smalltalk.Date)})},
  1219. messageSends: []}),
  1220. smalltalk.Date);
  1221. smalltalk.addMethod(
  1222. smalltalk.method({
  1223. selector: "milliseconds:",
  1224. fn: function (aNumber){
  1225. var self=this;
  1226. return smalltalk.withContext(function($ctx1) {
  1227. self.setMilliseconds(aNumber);
  1228. return self}, function($ctx1) {$ctx1.fill(self,"milliseconds:",{aNumber:aNumber},smalltalk.Date)})},
  1229. messageSends: []}),
  1230. smalltalk.Date);
  1231. smalltalk.addMethod(
  1232. smalltalk.method({
  1233. selector: "minutes",
  1234. fn: function (){
  1235. var self=this;
  1236. return smalltalk.withContext(function($ctx1) {
  1237. return self.getMinutes();
  1238. return self}, function($ctx1) {$ctx1.fill(self,"minutes",{},smalltalk.Date)})},
  1239. messageSends: []}),
  1240. smalltalk.Date);
  1241. smalltalk.addMethod(
  1242. smalltalk.method({
  1243. selector: "minutes:",
  1244. fn: function (aNumber){
  1245. var self=this;
  1246. return smalltalk.withContext(function($ctx1) {
  1247. self.setMinutes(aNumber);
  1248. return self}, function($ctx1) {$ctx1.fill(self,"minutes:",{aNumber:aNumber},smalltalk.Date)})},
  1249. messageSends: []}),
  1250. smalltalk.Date);
  1251. smalltalk.addMethod(
  1252. smalltalk.method({
  1253. selector: "month",
  1254. fn: function (){
  1255. var self=this;
  1256. return smalltalk.withContext(function($ctx1) {
  1257. return self.getMonth() + 1;
  1258. return self}, function($ctx1) {$ctx1.fill(self,"month",{},smalltalk.Date)})},
  1259. messageSends: []}),
  1260. smalltalk.Date);
  1261. smalltalk.addMethod(
  1262. smalltalk.method({
  1263. selector: "month:",
  1264. fn: function (aNumber){
  1265. var self=this;
  1266. return smalltalk.withContext(function($ctx1) {
  1267. self.setMonth(aNumber - 1);
  1268. return self}, function($ctx1) {$ctx1.fill(self,"month:",{aNumber:aNumber},smalltalk.Date)})},
  1269. messageSends: []}),
  1270. smalltalk.Date);
  1271. smalltalk.addMethod(
  1272. smalltalk.method({
  1273. selector: "printOn:",
  1274. fn: function (aStream){
  1275. var self=this;
  1276. return smalltalk.withContext(function($ctx1) {
  1277. _st(aStream)._nextPutAll_(self._asString());
  1278. return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.Date)})},
  1279. messageSends: ["nextPutAll:", "asString"]}),
  1280. smalltalk.Date);
  1281. smalltalk.addMethod(
  1282. smalltalk.method({
  1283. selector: "seconds",
  1284. fn: function (){
  1285. var self=this;
  1286. return smalltalk.withContext(function($ctx1) {
  1287. return self.getSeconds();
  1288. return self}, function($ctx1) {$ctx1.fill(self,"seconds",{},smalltalk.Date)})},
  1289. messageSends: []}),
  1290. smalltalk.Date);
  1291. smalltalk.addMethod(
  1292. smalltalk.method({
  1293. selector: "seconds:",
  1294. fn: function (aNumber){
  1295. var self=this;
  1296. return smalltalk.withContext(function($ctx1) {
  1297. self.setSeconds(aNumber);
  1298. return self}, function($ctx1) {$ctx1.fill(self,"seconds:",{aNumber:aNumber},smalltalk.Date)})},
  1299. messageSends: []}),
  1300. smalltalk.Date);
  1301. smalltalk.addMethod(
  1302. smalltalk.method({
  1303. selector: "time",
  1304. fn: function (){
  1305. var self=this;
  1306. return smalltalk.withContext(function($ctx1) {
  1307. return self.getTime();
  1308. return self}, function($ctx1) {$ctx1.fill(self,"time",{},smalltalk.Date)})},
  1309. messageSends: []}),
  1310. smalltalk.Date);
  1311. smalltalk.addMethod(
  1312. smalltalk.method({
  1313. selector: "time:",
  1314. fn: function (aNumber){
  1315. var self=this;
  1316. return smalltalk.withContext(function($ctx1) {
  1317. self.setTime(aNumber);
  1318. return self}, function($ctx1) {$ctx1.fill(self,"time:",{aNumber:aNumber},smalltalk.Date)})},
  1319. messageSends: []}),
  1320. smalltalk.Date);
  1321. smalltalk.addMethod(
  1322. smalltalk.method({
  1323. selector: "year",
  1324. fn: function (){
  1325. var self=this;
  1326. return smalltalk.withContext(function($ctx1) {
  1327. return self.getFullYear();
  1328. return self}, function($ctx1) {$ctx1.fill(self,"year",{},smalltalk.Date)})},
  1329. messageSends: []}),
  1330. smalltalk.Date);
  1331. smalltalk.addMethod(
  1332. smalltalk.method({
  1333. selector: "year:",
  1334. fn: function (aNumber){
  1335. var self=this;
  1336. return smalltalk.withContext(function($ctx1) {
  1337. self.setFullYear(aNumber);
  1338. return self}, function($ctx1) {$ctx1.fill(self,"year:",{aNumber:aNumber},smalltalk.Date)})},
  1339. messageSends: []}),
  1340. smalltalk.Date);
  1341. smalltalk.addMethod(
  1342. smalltalk.method({
  1343. selector: "fromMilliseconds:",
  1344. fn: function (aNumber){
  1345. var self=this;
  1346. return smalltalk.withContext(function($ctx1) {
  1347. var $1;
  1348. $1=self._new_(aNumber);
  1349. return $1;
  1350. }, function($ctx1) {$ctx1.fill(self,"fromMilliseconds:",{aNumber:aNumber},smalltalk.Date.klass)})},
  1351. messageSends: ["new:"]}),
  1352. smalltalk.Date.klass);
  1353. smalltalk.addMethod(
  1354. smalltalk.method({
  1355. selector: "fromSeconds:",
  1356. fn: function (aNumber){
  1357. var self=this;
  1358. return smalltalk.withContext(function($ctx1) {
  1359. var $1;
  1360. $1=self._fromMilliseconds_(_st(aNumber).__star((1000)));
  1361. return $1;
  1362. }, function($ctx1) {$ctx1.fill(self,"fromSeconds:",{aNumber:aNumber},smalltalk.Date.klass)})},
  1363. messageSends: ["fromMilliseconds:", "*"]}),
  1364. smalltalk.Date.klass);
  1365. smalltalk.addMethod(
  1366. smalltalk.method({
  1367. selector: "fromString:",
  1368. fn: function (aString){
  1369. var self=this;
  1370. return smalltalk.withContext(function($ctx1) {
  1371. var $1;
  1372. $1=self._new_(aString);
  1373. return $1;
  1374. }, function($ctx1) {$ctx1.fill(self,"fromString:",{aString:aString},smalltalk.Date.klass)})},
  1375. messageSends: ["new:"]}),
  1376. smalltalk.Date.klass);
  1377. smalltalk.addMethod(
  1378. smalltalk.method({
  1379. selector: "heliosClass",
  1380. fn: function (){
  1381. var self=this;
  1382. return smalltalk.withContext(function($ctx1) {
  1383. return "magnitude";
  1384. }, function($ctx1) {$ctx1.fill(self,"heliosClass",{},smalltalk.Date.klass)})},
  1385. messageSends: []}),
  1386. smalltalk.Date.klass);
  1387. smalltalk.addMethod(
  1388. smalltalk.method({
  1389. selector: "millisecondsToRun:",
  1390. fn: function (aBlock){
  1391. var self=this;
  1392. var t;
  1393. function $Date(){return smalltalk.Date||(typeof Date=="undefined"?nil:Date)}
  1394. return smalltalk.withContext(function($ctx1) {
  1395. var $1;
  1396. t=_st($Date())._now();
  1397. _st(aBlock)._value();
  1398. $1=_st(_st($Date())._now()).__minus(t);
  1399. return $1;
  1400. }, function($ctx1) {$ctx1.fill(self,"millisecondsToRun:",{aBlock:aBlock,t:t},smalltalk.Date.klass)})},
  1401. messageSends: ["now", "value", "-"]}),
  1402. smalltalk.Date.klass);
  1403. smalltalk.addMethod(
  1404. smalltalk.method({
  1405. selector: "new:",
  1406. fn: function (anObject){
  1407. var self=this;
  1408. return smalltalk.withContext(function($ctx1) {
  1409. return new Date(anObject);
  1410. return self}, function($ctx1) {$ctx1.fill(self,"new:",{anObject:anObject},smalltalk.Date.klass)})},
  1411. messageSends: []}),
  1412. smalltalk.Date.klass);
  1413. smalltalk.addMethod(
  1414. smalltalk.method({
  1415. selector: "now",
  1416. fn: function (){
  1417. var self=this;
  1418. return smalltalk.withContext(function($ctx1) {
  1419. var $1;
  1420. $1=self._today();
  1421. return $1;
  1422. }, function($ctx1) {$ctx1.fill(self,"now",{},smalltalk.Date.klass)})},
  1423. messageSends: ["today"]}),
  1424. smalltalk.Date.klass);
  1425. smalltalk.addMethod(
  1426. smalltalk.method({
  1427. selector: "today",
  1428. fn: function (){
  1429. var self=this;
  1430. return smalltalk.withContext(function($ctx1) {
  1431. var $1;
  1432. $1=self._new();
  1433. return $1;
  1434. }, function($ctx1) {$ctx1.fill(self,"today",{},smalltalk.Date.klass)})},
  1435. messageSends: ["new"]}),
  1436. smalltalk.Date.klass);
  1437. smalltalk.addClass('Number', smalltalk.Object, [], 'Kernel-Objects');
  1438. smalltalk.addMethod(
  1439. smalltalk.method({
  1440. selector: "&",
  1441. fn: function (aNumber){
  1442. var self=this;
  1443. return smalltalk.withContext(function($ctx1) {
  1444. return self & aNumber;
  1445. return self}, function($ctx1) {$ctx1.fill(self,"&",{aNumber:aNumber},smalltalk.Number)})},
  1446. messageSends: []}),
  1447. smalltalk.Number);
  1448. smalltalk.addMethod(
  1449. smalltalk.method({
  1450. selector: "*",
  1451. fn: function (aNumber){
  1452. var self=this;
  1453. return smalltalk.withContext(function($ctx1) {
  1454. return self * aNumber;
  1455. return self}, function($ctx1) {$ctx1.fill(self,"*",{aNumber:aNumber},smalltalk.Number)})},
  1456. messageSends: []}),
  1457. smalltalk.Number);
  1458. smalltalk.addMethod(
  1459. smalltalk.method({
  1460. selector: "+",
  1461. fn: function (aNumber){
  1462. var self=this;
  1463. return smalltalk.withContext(function($ctx1) {
  1464. return self + aNumber;
  1465. return self}, function($ctx1) {$ctx1.fill(self,"+",{aNumber:aNumber},smalltalk.Number)})},
  1466. messageSends: []}),
  1467. smalltalk.Number);
  1468. smalltalk.addMethod(
  1469. smalltalk.method({
  1470. selector: "-",
  1471. fn: function (aNumber){
  1472. var self=this;
  1473. return smalltalk.withContext(function($ctx1) {
  1474. return self - aNumber;
  1475. return self}, function($ctx1) {$ctx1.fill(self,"-",{aNumber:aNumber},smalltalk.Number)})},
  1476. messageSends: []}),
  1477. smalltalk.Number);
  1478. smalltalk.addMethod(
  1479. smalltalk.method({
  1480. selector: "/",
  1481. fn: function (aNumber){
  1482. var self=this;
  1483. return smalltalk.withContext(function($ctx1) {
  1484. return self / aNumber;
  1485. return self}, function($ctx1) {$ctx1.fill(self,"/",{aNumber:aNumber},smalltalk.Number)})},
  1486. messageSends: []}),
  1487. smalltalk.Number);
  1488. smalltalk.addMethod(
  1489. smalltalk.method({
  1490. selector: "<",
  1491. fn: function (aNumber){
  1492. var self=this;
  1493. return smalltalk.withContext(function($ctx1) {
  1494. return self < aNumber;
  1495. return self}, function($ctx1) {$ctx1.fill(self,"<",{aNumber:aNumber},smalltalk.Number)})},
  1496. messageSends: []}),
  1497. smalltalk.Number);
  1498. smalltalk.addMethod(
  1499. smalltalk.method({
  1500. selector: "<=",
  1501. fn: function (aNumber){
  1502. var self=this;
  1503. return smalltalk.withContext(function($ctx1) {
  1504. return self <= aNumber;
  1505. return self}, function($ctx1) {$ctx1.fill(self,"<=",{aNumber:aNumber},smalltalk.Number)})},
  1506. messageSends: []}),
  1507. smalltalk.Number);
  1508. smalltalk.addMethod(
  1509. smalltalk.method({
  1510. selector: "=",
  1511. fn: function (aNumber){
  1512. var self=this;
  1513. return smalltalk.withContext(function($ctx1) {
  1514. if(! aNumber._isNumber || ! aNumber._isNumber()) {
  1515. return false;
  1516. }
  1517. return Number(self) == aNumber
  1518. ;
  1519. return self}, function($ctx1) {$ctx1.fill(self,"=",{aNumber:aNumber},smalltalk.Number)})},
  1520. messageSends: []}),
  1521. smalltalk.Number);
  1522. smalltalk.addMethod(
  1523. smalltalk.method({
  1524. selector: ">",
  1525. fn: function (aNumber){
  1526. var self=this;
  1527. return smalltalk.withContext(function($ctx1) {
  1528. return self > aNumber;
  1529. return self}, function($ctx1) {$ctx1.fill(self,">",{aNumber:aNumber},smalltalk.Number)})},
  1530. messageSends: []}),
  1531. smalltalk.Number);
  1532. smalltalk.addMethod(
  1533. smalltalk.method({
  1534. selector: ">=",
  1535. fn: function (aNumber){
  1536. var self=this;
  1537. return smalltalk.withContext(function($ctx1) {
  1538. return self >= aNumber;
  1539. return self}, function($ctx1) {$ctx1.fill(self,">=",{aNumber:aNumber},smalltalk.Number)})},
  1540. messageSends: []}),
  1541. smalltalk.Number);
  1542. smalltalk.addMethod(
  1543. smalltalk.method({
  1544. selector: "@",
  1545. fn: function (aNumber){
  1546. var self=this;
  1547. function $Point(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}
  1548. return smalltalk.withContext(function($ctx1) {
  1549. var $1;
  1550. $1=_st($Point())._x_y_(self,aNumber);
  1551. return $1;
  1552. }, function($ctx1) {$ctx1.fill(self,"@",{aNumber:aNumber},smalltalk.Number)})},
  1553. messageSends: ["x:y:"]}),
  1554. smalltalk.Number);
  1555. smalltalk.addMethod(
  1556. smalltalk.method({
  1557. selector: "\x5c\x5c",
  1558. fn: function (aNumber){
  1559. var self=this;
  1560. return smalltalk.withContext(function($ctx1) {
  1561. return self % aNumber;
  1562. return self}, function($ctx1) {$ctx1.fill(self,"\x5c\x5c",{aNumber:aNumber},smalltalk.Number)})},
  1563. messageSends: []}),
  1564. smalltalk.Number);
  1565. smalltalk.addMethod(
  1566. smalltalk.method({
  1567. selector: "abs",
  1568. fn: function (){
  1569. var self=this;
  1570. return smalltalk.withContext(function($ctx1) {
  1571. return Math.abs(self);;
  1572. return self}, function($ctx1) {$ctx1.fill(self,"abs",{},smalltalk.Number)})},
  1573. messageSends: []}),
  1574. smalltalk.Number);
  1575. smalltalk.addMethod(
  1576. smalltalk.method({
  1577. selector: "asJSON",
  1578. fn: function (){
  1579. var self=this;
  1580. return smalltalk.withContext(function($ctx1) {
  1581. var $1;
  1582. $1=self;
  1583. return $1;
  1584. }, function($ctx1) {$ctx1.fill(self,"asJSON",{},smalltalk.Number)})},
  1585. messageSends: []}),
  1586. smalltalk.Number);
  1587. smalltalk.addMethod(
  1588. smalltalk.method({
  1589. selector: "asJavascript",
  1590. fn: function (){
  1591. var self=this;
  1592. return smalltalk.withContext(function($ctx1) {
  1593. var $1;
  1594. $1=_st("(".__comma(self._printString())).__comma(")");
  1595. return $1;
  1596. }, function($ctx1) {$ctx1.fill(self,"asJavascript",{},smalltalk.Number)})},
  1597. messageSends: [",", "printString"]}),
  1598. smalltalk.Number);
  1599. smalltalk.addMethod(
  1600. smalltalk.method({
  1601. selector: "asPoint",
  1602. fn: function (){
  1603. var self=this;
  1604. function $Point(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}
  1605. return smalltalk.withContext(function($ctx1) {
  1606. var $1;
  1607. $1=_st($Point())._x_y_(self,self);
  1608. return $1;
  1609. }, function($ctx1) {$ctx1.fill(self,"asPoint",{},smalltalk.Number)})},
  1610. messageSends: ["x:y:"]}),
  1611. smalltalk.Number);
  1612. smalltalk.addMethod(
  1613. smalltalk.method({
  1614. selector: "asString",
  1615. fn: function (){
  1616. var self=this;
  1617. return smalltalk.withContext(function($ctx1) {
  1618. return String(self) ;
  1619. return self}, function($ctx1) {$ctx1.fill(self,"asString",{},smalltalk.Number)})},
  1620. messageSends: []}),
  1621. smalltalk.Number);
  1622. smalltalk.addMethod(
  1623. smalltalk.method({
  1624. selector: "atRandom",
  1625. fn: function (){
  1626. var self=this;
  1627. function $Random(){return smalltalk.Random||(typeof Random=="undefined"?nil:Random)}
  1628. return smalltalk.withContext(function($ctx1) {
  1629. var $1;
  1630. $1=_st(_st(_st(_st(_st($Random())._new())._next()).__star(self))._truncated()).__plus((1));
  1631. return $1;
  1632. }, function($ctx1) {$ctx1.fill(self,"atRandom",{},smalltalk.Number)})},
  1633. messageSends: ["+", "truncated", "*", "next", "new"]}),
  1634. smalltalk.Number);
  1635. smalltalk.addMethod(
  1636. smalltalk.method({
  1637. selector: "copy",
  1638. fn: function (){
  1639. var self=this;
  1640. return smalltalk.withContext(function($ctx1) {
  1641. var $1;
  1642. $1=self;
  1643. return $1;
  1644. }, function($ctx1) {$ctx1.fill(self,"copy",{},smalltalk.Number)})},
  1645. messageSends: []}),
  1646. smalltalk.Number);
  1647. smalltalk.addMethod(
  1648. smalltalk.method({
  1649. selector: "deepCopy",
  1650. fn: function (){
  1651. var self=this;
  1652. return smalltalk.withContext(function($ctx1) {
  1653. var $1;
  1654. $1=self._copy();
  1655. return $1;
  1656. }, function($ctx1) {$ctx1.fill(self,"deepCopy",{},smalltalk.Number)})},
  1657. messageSends: ["copy"]}),
  1658. smalltalk.Number);
  1659. smalltalk.addMethod(
  1660. smalltalk.method({
  1661. selector: "even",
  1662. fn: function (){
  1663. var self=this;
  1664. return smalltalk.withContext(function($ctx1) {
  1665. var $1;
  1666. $1=(0).__eq(self.__backslash_backslash((2)));
  1667. return $1;
  1668. }, function($ctx1) {$ctx1.fill(self,"even",{},smalltalk.Number)})},
  1669. messageSends: ["=", "\x5c\x5c"]}),
  1670. smalltalk.Number);
  1671. smalltalk.addMethod(
  1672. smalltalk.method({
  1673. selector: "identityHash",
  1674. fn: function (){
  1675. var self=this;
  1676. return smalltalk.withContext(function($ctx1) {
  1677. var $1;
  1678. $1=_st(self._asString()).__comma("n");
  1679. return $1;
  1680. }, function($ctx1) {$ctx1.fill(self,"identityHash",{},smalltalk.Number)})},
  1681. messageSends: [",", "asString"]}),
  1682. smalltalk.Number);
  1683. smalltalk.addMethod(
  1684. smalltalk.method({
  1685. selector: "isImmutable",
  1686. fn: function (){
  1687. var self=this;
  1688. return smalltalk.withContext(function($ctx1) {
  1689. return true;
  1690. }, function($ctx1) {$ctx1.fill(self,"isImmutable",{},smalltalk.Number)})},
  1691. messageSends: []}),
  1692. smalltalk.Number);
  1693. smalltalk.addMethod(
  1694. smalltalk.method({
  1695. selector: "isNumber",
  1696. fn: function (){
  1697. var self=this;
  1698. return smalltalk.withContext(function($ctx1) {
  1699. return true;
  1700. }, function($ctx1) {$ctx1.fill(self,"isNumber",{},smalltalk.Number)})},
  1701. messageSends: []}),
  1702. smalltalk.Number);
  1703. smalltalk.addMethod(
  1704. smalltalk.method({
  1705. selector: "isZero",
  1706. fn: function (){
  1707. var self=this;
  1708. return smalltalk.withContext(function($ctx1) {
  1709. var $1;
  1710. $1=self.__eq((0));
  1711. return $1;
  1712. }, function($ctx1) {$ctx1.fill(self,"isZero",{},smalltalk.Number)})},
  1713. messageSends: ["="]}),
  1714. smalltalk.Number);
  1715. smalltalk.addMethod(
  1716. smalltalk.method({
  1717. selector: "max:",
  1718. fn: function (aNumber){
  1719. var self=this;
  1720. return smalltalk.withContext(function($ctx1) {
  1721. return Math.max(self, aNumber);;
  1722. return self}, function($ctx1) {$ctx1.fill(self,"max:",{aNumber:aNumber},smalltalk.Number)})},
  1723. messageSends: []}),
  1724. smalltalk.Number);
  1725. smalltalk.addMethod(
  1726. smalltalk.method({
  1727. selector: "min:",
  1728. fn: function (aNumber){
  1729. var self=this;
  1730. return smalltalk.withContext(function($ctx1) {
  1731. return Math.min(self, aNumber);;
  1732. return self}, function($ctx1) {$ctx1.fill(self,"min:",{aNumber:aNumber},smalltalk.Number)})},
  1733. messageSends: []}),
  1734. smalltalk.Number);
  1735. smalltalk.addMethod(
  1736. smalltalk.method({
  1737. selector: "negated",
  1738. fn: function (){
  1739. var self=this;
  1740. return smalltalk.withContext(function($ctx1) {
  1741. var $1;
  1742. $1=(0).__minus(self);
  1743. return $1;
  1744. }, function($ctx1) {$ctx1.fill(self,"negated",{},smalltalk.Number)})},
  1745. messageSends: ["-"]}),
  1746. smalltalk.Number);
  1747. smalltalk.addMethod(
  1748. smalltalk.method({
  1749. selector: "negative",
  1750. fn: function (){
  1751. var self=this;
  1752. return smalltalk.withContext(function($ctx1) {
  1753. var $1;
  1754. $1=self.__lt((0));
  1755. return $1;
  1756. }, function($ctx1) {$ctx1.fill(self,"negative",{},smalltalk.Number)})},
  1757. messageSends: ["<"]}),
  1758. smalltalk.Number);
  1759. smalltalk.addMethod(
  1760. smalltalk.method({
  1761. selector: "odd",
  1762. fn: function (){
  1763. var self=this;
  1764. return smalltalk.withContext(function($ctx1) {
  1765. var $1;
  1766. $1=_st(self._even())._not();
  1767. return $1;
  1768. }, function($ctx1) {$ctx1.fill(self,"odd",{},smalltalk.Number)})},
  1769. messageSends: ["not", "even"]}),
  1770. smalltalk.Number);
  1771. smalltalk.addMethod(
  1772. smalltalk.method({
  1773. selector: "positive",
  1774. fn: function (){
  1775. var self=this;
  1776. return smalltalk.withContext(function($ctx1) {
  1777. var $1;
  1778. $1=self.__gt_eq((0));
  1779. return $1;
  1780. }, function($ctx1) {$ctx1.fill(self,"positive",{},smalltalk.Number)})},
  1781. messageSends: [">="]}),
  1782. smalltalk.Number);
  1783. smalltalk.addMethod(
  1784. smalltalk.method({
  1785. selector: "printOn:",
  1786. fn: function (aStream){
  1787. var self=this;
  1788. return smalltalk.withContext(function($ctx1) {
  1789. _st(aStream)._nextPutAll_(self._asString());
  1790. return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.Number)})},
  1791. messageSends: ["nextPutAll:", "asString"]}),
  1792. smalltalk.Number);
  1793. smalltalk.addMethod(
  1794. smalltalk.method({
  1795. selector: "printShowingDecimalPlaces:",
  1796. fn: function (placesDesired){
  1797. var self=this;
  1798. return smalltalk.withContext(function($ctx1) {
  1799. return self.toFixed(placesDesired);
  1800. return self}, function($ctx1) {$ctx1.fill(self,"printShowingDecimalPlaces:",{placesDesired:placesDesired},smalltalk.Number)})},
  1801. messageSends: []}),
  1802. smalltalk.Number);
  1803. smalltalk.addMethod(
  1804. smalltalk.method({
  1805. selector: "rounded",
  1806. fn: function (){
  1807. var self=this;
  1808. return smalltalk.withContext(function($ctx1) {
  1809. return Math.round(self);;
  1810. return self}, function($ctx1) {$ctx1.fill(self,"rounded",{},smalltalk.Number)})},
  1811. messageSends: []}),
  1812. smalltalk.Number);
  1813. smalltalk.addMethod(
  1814. smalltalk.method({
  1815. selector: "sqrt",
  1816. fn: function (){
  1817. var self=this;
  1818. return smalltalk.withContext(function($ctx1) {
  1819. return Math.sqrt(self);
  1820. return self}, function($ctx1) {$ctx1.fill(self,"sqrt",{},smalltalk.Number)})},
  1821. messageSends: []}),
  1822. smalltalk.Number);
  1823. smalltalk.addMethod(
  1824. smalltalk.method({
  1825. selector: "squared",
  1826. fn: function (){
  1827. var self=this;
  1828. return smalltalk.withContext(function($ctx1) {
  1829. var $1;
  1830. $1=self.__star(self);
  1831. return $1;
  1832. }, function($ctx1) {$ctx1.fill(self,"squared",{},smalltalk.Number)})},
  1833. messageSends: ["*"]}),
  1834. smalltalk.Number);
  1835. smalltalk.addMethod(
  1836. smalltalk.method({
  1837. selector: "timesRepeat:",
  1838. fn: function (aBlock){
  1839. var self=this;
  1840. var count;
  1841. return smalltalk.withContext(function($ctx1) {
  1842. count=(1);
  1843. _st((function(){
  1844. return smalltalk.withContext(function($ctx2) {
  1845. return _st(count).__gt(self);
  1846. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileFalse_((function(){
  1847. return smalltalk.withContext(function($ctx2) {
  1848. _st(aBlock)._value();
  1849. count=_st(count).__plus((1));
  1850. return count;
  1851. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1852. return self}, function($ctx1) {$ctx1.fill(self,"timesRepeat:",{aBlock:aBlock,count:count},smalltalk.Number)})},
  1853. messageSends: ["whileFalse:", "value", "+", ">"]}),
  1854. smalltalk.Number);
  1855. smalltalk.addMethod(
  1856. smalltalk.method({
  1857. selector: "to:",
  1858. fn: function (aNumber){
  1859. var self=this;
  1860. var array,first,last,count;
  1861. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  1862. return smalltalk.withContext(function($ctx1) {
  1863. var $1;
  1864. first=self._truncated();
  1865. last=_st(_st(aNumber)._truncated()).__plus((1));
  1866. count=(1);
  1867. array=_st($Array())._new();
  1868. _st(_st(last).__minus(first))._timesRepeat_((function(){
  1869. return smalltalk.withContext(function($ctx2) {
  1870. _st(array)._at_put_(count,first);
  1871. count=_st(count).__plus((1));
  1872. count;
  1873. first=_st(first).__plus((1));
  1874. return first;
  1875. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1876. $1=array;
  1877. return $1;
  1878. }, function($ctx1) {$ctx1.fill(self,"to:",{aNumber:aNumber,array:array,first:first,last:last,count:count},smalltalk.Number)})},
  1879. messageSends: ["truncated", "+", "new", "timesRepeat:", "at:put:", "-"]}),
  1880. smalltalk.Number);
  1881. smalltalk.addMethod(
  1882. smalltalk.method({
  1883. selector: "to:by:",
  1884. fn: function (stop,step){
  1885. var self=this;
  1886. var array,value,pos;
  1887. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  1888. return smalltalk.withContext(function($ctx1) {
  1889. var $1,$2,$3;
  1890. value=self;
  1891. array=_st($Array())._new();
  1892. pos=(1);
  1893. $1=_st(step).__eq((0));
  1894. if(smalltalk.assert($1)){
  1895. self._error_("step must be non-zero");
  1896. };
  1897. $2=_st(step).__lt((0));
  1898. if(smalltalk.assert($2)){
  1899. _st((function(){
  1900. return smalltalk.withContext(function($ctx2) {
  1901. return _st(value).__gt_eq(stop);
  1902. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileTrue_((function(){
  1903. return smalltalk.withContext(function($ctx2) {
  1904. _st(array)._at_put_(pos,value);
  1905. pos=_st(pos).__plus((1));
  1906. pos;
  1907. value=_st(value).__plus(step);
  1908. return value;
  1909. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1910. } else {
  1911. _st((function(){
  1912. return smalltalk.withContext(function($ctx2) {
  1913. return _st(value).__lt_eq(stop);
  1914. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileTrue_((function(){
  1915. return smalltalk.withContext(function($ctx2) {
  1916. _st(array)._at_put_(pos,value);
  1917. pos=_st(pos).__plus((1));
  1918. pos;
  1919. value=_st(value).__plus(step);
  1920. return value;
  1921. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1922. };
  1923. $3=array;
  1924. return $3;
  1925. }, function($ctx1) {$ctx1.fill(self,"to:by:",{stop:stop,step:step,array:array,value:value,pos:pos},smalltalk.Number)})},
  1926. messageSends: ["new", "ifTrue:", "error:", "=", "ifTrue:ifFalse:", "whileTrue:", "at:put:", "+", ">=", "<=", "<"]}),
  1927. smalltalk.Number);
  1928. smalltalk.addMethod(
  1929. smalltalk.method({
  1930. selector: "to:by:do:",
  1931. fn: function (stop,step,aBlock){
  1932. var self=this;
  1933. var value;
  1934. return smalltalk.withContext(function($ctx1) {
  1935. var $1,$2;
  1936. value=self;
  1937. $1=_st(step).__eq((0));
  1938. if(smalltalk.assert($1)){
  1939. self._error_("step must be non-zero");
  1940. };
  1941. $2=_st(step).__lt((0));
  1942. if(smalltalk.assert($2)){
  1943. _st((function(){
  1944. return smalltalk.withContext(function($ctx2) {
  1945. return _st(value).__gt_eq(stop);
  1946. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileTrue_((function(){
  1947. return smalltalk.withContext(function($ctx2) {
  1948. _st(aBlock)._value_(value);
  1949. value=_st(value).__plus(step);
  1950. return value;
  1951. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1952. } else {
  1953. _st((function(){
  1954. return smalltalk.withContext(function($ctx2) {
  1955. return _st(value).__lt_eq(stop);
  1956. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileTrue_((function(){
  1957. return smalltalk.withContext(function($ctx2) {
  1958. _st(aBlock)._value_(value);
  1959. value=_st(value).__plus(step);
  1960. return value;
  1961. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1962. };
  1963. return self}, function($ctx1) {$ctx1.fill(self,"to:by:do:",{stop:stop,step:step,aBlock:aBlock,value:value},smalltalk.Number)})},
  1964. messageSends: ["ifTrue:", "error:", "=", "ifTrue:ifFalse:", "whileTrue:", "value:", "+", ">=", "<=", "<"]}),
  1965. smalltalk.Number);
  1966. smalltalk.addMethod(
  1967. smalltalk.method({
  1968. selector: "to:do:",
  1969. fn: function (stop,aBlock){
  1970. var self=this;
  1971. var nextValue;
  1972. return smalltalk.withContext(function($ctx1) {
  1973. nextValue=self;
  1974. _st((function(){
  1975. return smalltalk.withContext(function($ctx2) {
  1976. return _st(nextValue).__lt_eq(stop);
  1977. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileTrue_((function(){
  1978. return smalltalk.withContext(function($ctx2) {
  1979. _st(aBlock)._value_(nextValue);
  1980. nextValue=_st(nextValue).__plus((1));
  1981. return nextValue;
  1982. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1983. return self}, function($ctx1) {$ctx1.fill(self,"to:do:",{stop:stop,aBlock:aBlock,nextValue:nextValue},smalltalk.Number)})},
  1984. messageSends: ["whileTrue:", "value:", "+", "<="]}),
  1985. smalltalk.Number);
  1986. smalltalk.addMethod(
  1987. smalltalk.method({
  1988. selector: "truncated",
  1989. fn: function (){
  1990. var self=this;
  1991. return smalltalk.withContext(function($ctx1) {
  1992. if(self >= 0) {
  1993. return Math.floor(self);
  1994. } else {
  1995. return Math.floor(self * (-1)) * (-1);
  1996. };
  1997. ;
  1998. return self}, function($ctx1) {$ctx1.fill(self,"truncated",{},smalltalk.Number)})},
  1999. messageSends: []}),
  2000. smalltalk.Number);
  2001. smalltalk.addMethod(
  2002. smalltalk.method({
  2003. selector: "|",
  2004. fn: function (aNumber){
  2005. var self=this;
  2006. return smalltalk.withContext(function($ctx1) {
  2007. return self | aNumber;
  2008. return self}, function($ctx1) {$ctx1.fill(self,"|",{aNumber:aNumber},smalltalk.Number)})},
  2009. messageSends: []}),
  2010. smalltalk.Number);
  2011. smalltalk.addMethod(
  2012. smalltalk.method({
  2013. selector: "heliosClass",
  2014. fn: function (){
  2015. var self=this;
  2016. return smalltalk.withContext(function($ctx1) {
  2017. return "magnitude";
  2018. }, function($ctx1) {$ctx1.fill(self,"heliosClass",{},smalltalk.Number.klass)})},
  2019. messageSends: []}),
  2020. smalltalk.Number.klass);
  2021. smalltalk.addMethod(
  2022. smalltalk.method({
  2023. selector: "pi",
  2024. fn: function (){
  2025. var self=this;
  2026. return smalltalk.withContext(function($ctx1) {
  2027. return Math.PI;
  2028. return self}, function($ctx1) {$ctx1.fill(self,"pi",{},smalltalk.Number.klass)})},
  2029. messageSends: []}),
  2030. smalltalk.Number.klass);
  2031. smalltalk.addClass('Point', smalltalk.Object, ['x', 'y'], 'Kernel-Objects');
  2032. smalltalk.addMethod(
  2033. smalltalk.method({
  2034. selector: "*",
  2035. fn: function (aPoint){
  2036. var self=this;
  2037. function $Point(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}
  2038. return smalltalk.withContext(function($ctx1) {
  2039. var $1;
  2040. $1=_st($Point())._x_y_(_st(self._x()).__star(_st(_st(aPoint)._asPoint())._x()),_st(self._y()).__star(_st(_st(aPoint)._asPoint())._y()));
  2041. return $1;
  2042. }, function($ctx1) {$ctx1.fill(self,"*",{aPoint:aPoint},smalltalk.Point)})},
  2043. messageSends: ["x:y:", "*", "x", "asPoint", "y"]}),
  2044. smalltalk.Point);
  2045. smalltalk.addMethod(
  2046. smalltalk.method({
  2047. selector: "+",
  2048. fn: function (aPoint){
  2049. var self=this;
  2050. function $Point(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}
  2051. return smalltalk.withContext(function($ctx1) {
  2052. var $1;
  2053. $1=_st($Point())._x_y_(_st(self._x()).__plus(_st(_st(aPoint)._asPoint())._x()),_st(self._y()).__plus(_st(_st(aPoint)._asPoint())._y()));
  2054. return $1;
  2055. }, function($ctx1) {$ctx1.fill(self,"+",{aPoint:aPoint},smalltalk.Point)})},
  2056. messageSends: ["x:y:", "+", "x", "asPoint", "y"]}),
  2057. smalltalk.Point);
  2058. smalltalk.addMethod(
  2059. smalltalk.method({
  2060. selector: "-",
  2061. fn: function (aPoint){
  2062. var self=this;
  2063. function $Point(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}
  2064. return smalltalk.withContext(function($ctx1) {
  2065. var $1;
  2066. $1=_st($Point())._x_y_(_st(self._x()).__minus(_st(_st(aPoint)._asPoint())._x()),_st(self._y()).__minus(_st(_st(aPoint)._asPoint())._y()));
  2067. return $1;
  2068. }, function($ctx1) {$ctx1.fill(self,"-",{aPoint:aPoint},smalltalk.Point)})},
  2069. messageSends: ["x:y:", "-", "x", "asPoint", "y"]}),
  2070. smalltalk.Point);
  2071. smalltalk.addMethod(
  2072. smalltalk.method({
  2073. selector: "/",
  2074. fn: function (aPoint){
  2075. var self=this;
  2076. function $Point(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}
  2077. return smalltalk.withContext(function($ctx1) {
  2078. var $1;
  2079. $1=_st($Point())._x_y_(_st(self._x()).__slash(_st(_st(aPoint)._asPoint())._x()),_st(self._y()).__slash(_st(_st(aPoint)._asPoint())._y()));
  2080. return $1;
  2081. }, function($ctx1) {$ctx1.fill(self,"/",{aPoint:aPoint},smalltalk.Point)})},
  2082. messageSends: ["x:y:", "/", "x", "asPoint", "y"]}),
  2083. smalltalk.Point);
  2084. smalltalk.addMethod(
  2085. smalltalk.method({
  2086. selector: "=",
  2087. fn: function (aPoint){
  2088. var self=this;
  2089. return smalltalk.withContext(function($ctx1) {
  2090. var $1;
  2091. $1=_st(_st(_st(aPoint)._class()).__eq(self._class()))._and_((function(){
  2092. return smalltalk.withContext(function($ctx2) {
  2093. return _st(_st(_st(aPoint)._x()).__eq(self._x())).__and(_st(_st(aPoint)._y()).__eq(self._y()));
  2094. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2095. return $1;
  2096. }, function($ctx1) {$ctx1.fill(self,"=",{aPoint:aPoint},smalltalk.Point)})},
  2097. messageSends: ["and:", "&", "=", "y", "x", "class"]}),
  2098. smalltalk.Point);
  2099. smalltalk.addMethod(
  2100. smalltalk.method({
  2101. selector: "asPoint",
  2102. fn: function (){
  2103. var self=this;
  2104. return smalltalk.withContext(function($ctx1) {
  2105. var $1;
  2106. $1=self;
  2107. return $1;
  2108. }, function($ctx1) {$ctx1.fill(self,"asPoint",{},smalltalk.Point)})},
  2109. messageSends: []}),
  2110. smalltalk.Point);
  2111. smalltalk.addMethod(
  2112. smalltalk.method({
  2113. selector: "printOn:",
  2114. fn: function (aStream){
  2115. var self=this;
  2116. return smalltalk.withContext(function($ctx1) {
  2117. var $1;
  2118. _st(self["@x"])._printOn_(aStream);
  2119. _st(aStream)._nextPutAll_("@");
  2120. $1=_st(_st(self["@y"])._notNil())._and_((function(){
  2121. return smalltalk.withContext(function($ctx2) {
  2122. return _st(self["@y"])._negative();
  2123. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2124. if(smalltalk.assert($1)){
  2125. _st(aStream)._space();
  2126. };
  2127. _st(self["@y"])._printOn_(aStream);
  2128. return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.Point)})},
  2129. messageSends: ["printOn:", "nextPutAll:", "ifTrue:", "space", "and:", "negative", "notNil"]}),
  2130. smalltalk.Point);
  2131. smalltalk.addMethod(
  2132. smalltalk.method({
  2133. selector: "translateBy:",
  2134. fn: function (delta){
  2135. var self=this;
  2136. return smalltalk.withContext(function($ctx1) {
  2137. var $1;
  2138. $1=_st(_st(_st(delta)._x()).__plus(self["@x"])).__at(_st(_st(delta)._y()).__plus(self["@y"]));
  2139. return $1;
  2140. }, function($ctx1) {$ctx1.fill(self,"translateBy:",{delta:delta},smalltalk.Point)})},
  2141. messageSends: ["@", "+", "y", "x"]}),
  2142. smalltalk.Point);
  2143. smalltalk.addMethod(
  2144. smalltalk.method({
  2145. selector: "x",
  2146. fn: function (){
  2147. var self=this;
  2148. return smalltalk.withContext(function($ctx1) {
  2149. var $1;
  2150. $1=self["@x"];
  2151. return $1;
  2152. }, function($ctx1) {$ctx1.fill(self,"x",{},smalltalk.Point)})},
  2153. messageSends: []}),
  2154. smalltalk.Point);
  2155. smalltalk.addMethod(
  2156. smalltalk.method({
  2157. selector: "x:",
  2158. fn: function (aNumber){
  2159. var self=this;
  2160. return smalltalk.withContext(function($ctx1) {
  2161. self["@x"]=aNumber;
  2162. return self}, function($ctx1) {$ctx1.fill(self,"x:",{aNumber:aNumber},smalltalk.Point)})},
  2163. messageSends: []}),
  2164. smalltalk.Point);
  2165. smalltalk.addMethod(
  2166. smalltalk.method({
  2167. selector: "y",
  2168. fn: function (){
  2169. var self=this;
  2170. return smalltalk.withContext(function($ctx1) {
  2171. var $1;
  2172. $1=self["@y"];
  2173. return $1;
  2174. }, function($ctx1) {$ctx1.fill(self,"y",{},smalltalk.Point)})},
  2175. messageSends: []}),
  2176. smalltalk.Point);
  2177. smalltalk.addMethod(
  2178. smalltalk.method({
  2179. selector: "y:",
  2180. fn: function (aNumber){
  2181. var self=this;
  2182. return smalltalk.withContext(function($ctx1) {
  2183. self["@y"]=aNumber;
  2184. return self}, function($ctx1) {$ctx1.fill(self,"y:",{aNumber:aNumber},smalltalk.Point)})},
  2185. messageSends: []}),
  2186. smalltalk.Point);
  2187. smalltalk.addMethod(
  2188. smalltalk.method({
  2189. selector: "heliosClass",
  2190. fn: function (){
  2191. var self=this;
  2192. return smalltalk.withContext(function($ctx1) {
  2193. return "magnitude";
  2194. }, function($ctx1) {$ctx1.fill(self,"heliosClass",{},smalltalk.Point.klass)})},
  2195. messageSends: []}),
  2196. smalltalk.Point.klass);
  2197. smalltalk.addMethod(
  2198. smalltalk.method({
  2199. selector: "x:y:",
  2200. fn: function (aNumber,anotherNumber){
  2201. var self=this;
  2202. return smalltalk.withContext(function($ctx1) {
  2203. var $2,$3,$1;
  2204. $2=self._new();
  2205. _st($2)._x_(aNumber);
  2206. _st($2)._y_(anotherNumber);
  2207. $3=_st($2)._yourself();
  2208. $1=$3;
  2209. return $1;
  2210. }, function($ctx1) {$ctx1.fill(self,"x:y:",{aNumber:aNumber,anotherNumber:anotherNumber},smalltalk.Point.klass)})},
  2211. messageSends: ["x:", "new", "y:", "yourself"]}),
  2212. smalltalk.Point.klass);
  2213. smalltalk.addClass('Random', smalltalk.Object, [], 'Kernel-Objects');
  2214. smalltalk.addMethod(
  2215. smalltalk.method({
  2216. selector: "next",
  2217. fn: function (){
  2218. var self=this;
  2219. return smalltalk.withContext(function($ctx1) {
  2220. return Math.random();
  2221. return self}, function($ctx1) {$ctx1.fill(self,"next",{},smalltalk.Random)})},
  2222. messageSends: []}),
  2223. smalltalk.Random);
  2224. smalltalk.addMethod(
  2225. smalltalk.method({
  2226. selector: "next:",
  2227. fn: function (anInteger){
  2228. var self=this;
  2229. return smalltalk.withContext(function($ctx1) {
  2230. var $1;
  2231. $1=_st((1)._to_(anInteger))._collect_((function(each){
  2232. return smalltalk.withContext(function($ctx2) {
  2233. return self._next();
  2234. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  2235. return $1;
  2236. }, function($ctx1) {$ctx1.fill(self,"next:",{anInteger:anInteger},smalltalk.Random)})},
  2237. messageSends: ["collect:", "next", "to:"]}),
  2238. smalltalk.Random);
  2239. smalltalk.addClass('UndefinedObject', smalltalk.Object, [], 'Kernel-Objects');
  2240. smalltalk.addMethod(
  2241. smalltalk.method({
  2242. selector: "asJSON",
  2243. fn: function (){
  2244. var self=this;
  2245. return smalltalk.withContext(function($ctx1) {
  2246. var $1;
  2247. $1=null;
  2248. return $1;
  2249. }, function($ctx1) {$ctx1.fill(self,"asJSON",{},smalltalk.UndefinedObject)})},
  2250. messageSends: []}),
  2251. smalltalk.UndefinedObject);
  2252. smalltalk.addMethod(
  2253. smalltalk.method({
  2254. selector: "deepCopy",
  2255. fn: function (){
  2256. var self=this;
  2257. return smalltalk.withContext(function($ctx1) {
  2258. var $1;
  2259. $1=self;
  2260. return $1;
  2261. }, function($ctx1) {$ctx1.fill(self,"deepCopy",{},smalltalk.UndefinedObject)})},
  2262. messageSends: []}),
  2263. smalltalk.UndefinedObject);
  2264. smalltalk.addMethod(
  2265. smalltalk.method({
  2266. selector: "ifNil:",
  2267. fn: function (aBlock){
  2268. var self=this;
  2269. return smalltalk.withContext(function($ctx1) {
  2270. var $2,$1;
  2271. $2=self;
  2272. $1=_st($2)._ifNil_ifNotNil_(aBlock,(function(){
  2273. return smalltalk.withContext(function($ctx2) {
  2274. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2275. return $1;
  2276. }, function($ctx1) {$ctx1.fill(self,"ifNil:",{aBlock:aBlock},smalltalk.UndefinedObject)})},
  2277. messageSends: ["ifNil:ifNotNil:"]}),
  2278. smalltalk.UndefinedObject);
  2279. smalltalk.addMethod(
  2280. smalltalk.method({
  2281. selector: "ifNil:ifNotNil:",
  2282. fn: function (aBlock,anotherBlock){
  2283. var self=this;
  2284. return smalltalk.withContext(function($ctx1) {
  2285. var $1;
  2286. $1=_st(aBlock)._value();
  2287. return $1;
  2288. }, function($ctx1) {$ctx1.fill(self,"ifNil:ifNotNil:",{aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.UndefinedObject)})},
  2289. messageSends: ["value"]}),
  2290. smalltalk.UndefinedObject);
  2291. smalltalk.addMethod(
  2292. smalltalk.method({
  2293. selector: "ifNotNil:",
  2294. fn: function (aBlock){
  2295. var self=this;
  2296. return smalltalk.withContext(function($ctx1) {
  2297. var $1;
  2298. $1=self;
  2299. return $1;
  2300. }, function($ctx1) {$ctx1.fill(self,"ifNotNil:",{aBlock:aBlock},smalltalk.UndefinedObject)})},
  2301. messageSends: []}),
  2302. smalltalk.UndefinedObject);
  2303. smalltalk.addMethod(
  2304. smalltalk.method({
  2305. selector: "ifNotNil:ifNil:",
  2306. fn: function (aBlock,anotherBlock){
  2307. var self=this;
  2308. return smalltalk.withContext(function($ctx1) {
  2309. var $1;
  2310. $1=_st(anotherBlock)._value();
  2311. return $1;
  2312. }, function($ctx1) {$ctx1.fill(self,"ifNotNil:ifNil:",{aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.UndefinedObject)})},
  2313. messageSends: ["value"]}),
  2314. smalltalk.UndefinedObject);
  2315. smalltalk.addMethod(
  2316. smalltalk.method({
  2317. selector: "isImmutable",
  2318. fn: function (){
  2319. var self=this;
  2320. return smalltalk.withContext(function($ctx1) {
  2321. return true;
  2322. }, function($ctx1) {$ctx1.fill(self,"isImmutable",{},smalltalk.UndefinedObject)})},
  2323. messageSends: []}),
  2324. smalltalk.UndefinedObject);
  2325. smalltalk.addMethod(
  2326. smalltalk.method({
  2327. selector: "isNil",
  2328. fn: function (){
  2329. var self=this;
  2330. return smalltalk.withContext(function($ctx1) {
  2331. return true;
  2332. }, function($ctx1) {$ctx1.fill(self,"isNil",{},smalltalk.UndefinedObject)})},
  2333. messageSends: []}),
  2334. smalltalk.UndefinedObject);
  2335. smalltalk.addMethod(
  2336. smalltalk.method({
  2337. selector: "notNil",
  2338. fn: function (){
  2339. var self=this;
  2340. return smalltalk.withContext(function($ctx1) {
  2341. return false;
  2342. }, function($ctx1) {$ctx1.fill(self,"notNil",{},smalltalk.UndefinedObject)})},
  2343. messageSends: []}),
  2344. smalltalk.UndefinedObject);
  2345. smalltalk.addMethod(
  2346. smalltalk.method({
  2347. selector: "printOn:",
  2348. fn: function (aStream){
  2349. var self=this;
  2350. return smalltalk.withContext(function($ctx1) {
  2351. _st(aStream)._nextPutAll_("nil");
  2352. return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.UndefinedObject)})},
  2353. messageSends: ["nextPutAll:"]}),
  2354. smalltalk.UndefinedObject);
  2355. smalltalk.addMethod(
  2356. smalltalk.method({
  2357. selector: "shallowCopy",
  2358. fn: function (){
  2359. var self=this;
  2360. return smalltalk.withContext(function($ctx1) {
  2361. var $1;
  2362. $1=self;
  2363. return $1;
  2364. }, function($ctx1) {$ctx1.fill(self,"shallowCopy",{},smalltalk.UndefinedObject)})},
  2365. messageSends: []}),
  2366. smalltalk.UndefinedObject);
  2367. smalltalk.addMethod(
  2368. smalltalk.method({
  2369. selector: "subclass:instanceVariableNames:",
  2370. fn: function (aString,anotherString){
  2371. var self=this;
  2372. return smalltalk.withContext(function($ctx1) {
  2373. var $1;
  2374. $1=self._subclass_instanceVariableNames_package_(aString,anotherString,nil);
  2375. return $1;
  2376. }, function($ctx1) {$ctx1.fill(self,"subclass:instanceVariableNames:",{aString:aString,anotherString:anotherString},smalltalk.UndefinedObject)})},
  2377. messageSends: ["subclass:instanceVariableNames:package:"]}),
  2378. smalltalk.UndefinedObject);
  2379. smalltalk.addMethod(
  2380. smalltalk.method({
  2381. selector: "subclass:instanceVariableNames:category:",
  2382. fn: function (aString,aString2,aString3){
  2383. var self=this;
  2384. return smalltalk.withContext(function($ctx1) {
  2385. var $1;
  2386. self._deprecatedAPI();
  2387. $1=self._subclass_instanceVariableNames_package_(aString,aString2,aString3);
  2388. return $1;
  2389. }, function($ctx1) {$ctx1.fill(self,"subclass:instanceVariableNames:category:",{aString:aString,aString2:aString2,aString3:aString3},smalltalk.UndefinedObject)})},
  2390. messageSends: ["deprecatedAPI", "subclass:instanceVariableNames:package:"]}),
  2391. smalltalk.UndefinedObject);
  2392. smalltalk.addMethod(
  2393. smalltalk.method({
  2394. selector: "subclass:instanceVariableNames:package:",
  2395. fn: function (aString,aString2,aString3){
  2396. var self=this;
  2397. function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
  2398. return smalltalk.withContext(function($ctx1) {
  2399. var $1;
  2400. $1=_st(_st($ClassBuilder())._new())._superclass_subclass_instanceVariableNames_package_(self,_st(aString)._asString(),aString2,aString3);
  2401. return $1;
  2402. }, function($ctx1) {$ctx1.fill(self,"subclass:instanceVariableNames:package:",{aString:aString,aString2:aString2,aString3:aString3},smalltalk.UndefinedObject)})},
  2403. messageSends: ["superclass:subclass:instanceVariableNames:package:", "asString", "new"]}),
  2404. smalltalk.UndefinedObject);
  2405. smalltalk.addMethod(
  2406. smalltalk.method({
  2407. selector: "new",
  2408. fn: function (){
  2409. var self=this;
  2410. return smalltalk.withContext(function($ctx1) {
  2411. self._error_("You cannot create new instances of UndefinedObject. Use nil");
  2412. return self}, function($ctx1) {$ctx1.fill(self,"new",{},smalltalk.UndefinedObject.klass)})},
  2413. messageSends: ["error:"]}),
  2414. smalltalk.UndefinedObject.klass);
  2415. });