2
0

Kernel-Objects.deploy.js 73 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673
  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: "asNumber",
  1602. fn: function (){
  1603. var self=this;
  1604. return smalltalk.withContext(function($ctx1) {
  1605. var $1;
  1606. $1=self;
  1607. return $1;
  1608. }, function($ctx1) {$ctx1.fill(self,"asNumber",{},smalltalk.Number)})},
  1609. messageSends: []}),
  1610. smalltalk.Number);
  1611. smalltalk.addMethod(
  1612. smalltalk.method({
  1613. selector: "asPoint",
  1614. fn: function (){
  1615. var self=this;
  1616. function $Point(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}
  1617. return smalltalk.withContext(function($ctx1) {
  1618. var $1;
  1619. $1=_st($Point())._x_y_(self,self);
  1620. return $1;
  1621. }, function($ctx1) {$ctx1.fill(self,"asPoint",{},smalltalk.Number)})},
  1622. messageSends: ["x:y:"]}),
  1623. smalltalk.Number);
  1624. smalltalk.addMethod(
  1625. smalltalk.method({
  1626. selector: "asString",
  1627. fn: function (){
  1628. var self=this;
  1629. return smalltalk.withContext(function($ctx1) {
  1630. return String(self) ;
  1631. return self}, function($ctx1) {$ctx1.fill(self,"asString",{},smalltalk.Number)})},
  1632. messageSends: []}),
  1633. smalltalk.Number);
  1634. smalltalk.addMethod(
  1635. smalltalk.method({
  1636. selector: "atRandom",
  1637. fn: function (){
  1638. var self=this;
  1639. function $Random(){return smalltalk.Random||(typeof Random=="undefined"?nil:Random)}
  1640. return smalltalk.withContext(function($ctx1) {
  1641. var $1;
  1642. $1=_st(_st(_st(_st(_st($Random())._new())._next()).__star(self))._truncated()).__plus((1));
  1643. return $1;
  1644. }, function($ctx1) {$ctx1.fill(self,"atRandom",{},smalltalk.Number)})},
  1645. messageSends: ["+", "truncated", "*", "next", "new"]}),
  1646. smalltalk.Number);
  1647. smalltalk.addMethod(
  1648. smalltalk.method({
  1649. selector: "ceiling",
  1650. fn: function (){
  1651. var self=this;
  1652. return smalltalk.withContext(function($ctx1) {
  1653. return Math.ceil(self);;
  1654. return self}, function($ctx1) {$ctx1.fill(self,"ceiling",{},smalltalk.Number)})},
  1655. messageSends: []}),
  1656. smalltalk.Number);
  1657. smalltalk.addMethod(
  1658. smalltalk.method({
  1659. selector: "copy",
  1660. fn: function (){
  1661. var self=this;
  1662. return smalltalk.withContext(function($ctx1) {
  1663. var $1;
  1664. $1=self;
  1665. return $1;
  1666. }, function($ctx1) {$ctx1.fill(self,"copy",{},smalltalk.Number)})},
  1667. messageSends: []}),
  1668. smalltalk.Number);
  1669. smalltalk.addMethod(
  1670. smalltalk.method({
  1671. selector: "deepCopy",
  1672. fn: function (){
  1673. var self=this;
  1674. return smalltalk.withContext(function($ctx1) {
  1675. var $1;
  1676. $1=self._copy();
  1677. return $1;
  1678. }, function($ctx1) {$ctx1.fill(self,"deepCopy",{},smalltalk.Number)})},
  1679. messageSends: ["copy"]}),
  1680. smalltalk.Number);
  1681. smalltalk.addMethod(
  1682. smalltalk.method({
  1683. selector: "even",
  1684. fn: function (){
  1685. var self=this;
  1686. return smalltalk.withContext(function($ctx1) {
  1687. var $1;
  1688. $1=(0).__eq(self.__backslash_backslash((2)));
  1689. return $1;
  1690. }, function($ctx1) {$ctx1.fill(self,"even",{},smalltalk.Number)})},
  1691. messageSends: ["=", "\x5c\x5c"]}),
  1692. smalltalk.Number);
  1693. smalltalk.addMethod(
  1694. smalltalk.method({
  1695. selector: "floor",
  1696. fn: function (){
  1697. var self=this;
  1698. return smalltalk.withContext(function($ctx1) {
  1699. return Math.floor(self);;
  1700. return self}, function($ctx1) {$ctx1.fill(self,"floor",{},smalltalk.Number)})},
  1701. messageSends: []}),
  1702. smalltalk.Number);
  1703. smalltalk.addMethod(
  1704. smalltalk.method({
  1705. selector: "identityHash",
  1706. fn: function (){
  1707. var self=this;
  1708. return smalltalk.withContext(function($ctx1) {
  1709. var $1;
  1710. $1=_st(self._asString()).__comma("n");
  1711. return $1;
  1712. }, function($ctx1) {$ctx1.fill(self,"identityHash",{},smalltalk.Number)})},
  1713. messageSends: [",", "asString"]}),
  1714. smalltalk.Number);
  1715. smalltalk.addMethod(
  1716. smalltalk.method({
  1717. selector: "isImmutable",
  1718. fn: function (){
  1719. var self=this;
  1720. return smalltalk.withContext(function($ctx1) {
  1721. return true;
  1722. }, function($ctx1) {$ctx1.fill(self,"isImmutable",{},smalltalk.Number)})},
  1723. messageSends: []}),
  1724. smalltalk.Number);
  1725. smalltalk.addMethod(
  1726. smalltalk.method({
  1727. selector: "isNumber",
  1728. fn: function (){
  1729. var self=this;
  1730. return smalltalk.withContext(function($ctx1) {
  1731. return true;
  1732. }, function($ctx1) {$ctx1.fill(self,"isNumber",{},smalltalk.Number)})},
  1733. messageSends: []}),
  1734. smalltalk.Number);
  1735. smalltalk.addMethod(
  1736. smalltalk.method({
  1737. selector: "isZero",
  1738. fn: function (){
  1739. var self=this;
  1740. return smalltalk.withContext(function($ctx1) {
  1741. var $1;
  1742. $1=self.__eq((0));
  1743. return $1;
  1744. }, function($ctx1) {$ctx1.fill(self,"isZero",{},smalltalk.Number)})},
  1745. messageSends: ["="]}),
  1746. smalltalk.Number);
  1747. smalltalk.addMethod(
  1748. smalltalk.method({
  1749. selector: "max:",
  1750. fn: function (aNumber){
  1751. var self=this;
  1752. return smalltalk.withContext(function($ctx1) {
  1753. return Math.max(self, aNumber);;
  1754. return self}, function($ctx1) {$ctx1.fill(self,"max:",{aNumber:aNumber},smalltalk.Number)})},
  1755. messageSends: []}),
  1756. smalltalk.Number);
  1757. smalltalk.addMethod(
  1758. smalltalk.method({
  1759. selector: "min:",
  1760. fn: function (aNumber){
  1761. var self=this;
  1762. return smalltalk.withContext(function($ctx1) {
  1763. return Math.min(self, aNumber);;
  1764. return self}, function($ctx1) {$ctx1.fill(self,"min:",{aNumber:aNumber},smalltalk.Number)})},
  1765. messageSends: []}),
  1766. smalltalk.Number);
  1767. smalltalk.addMethod(
  1768. smalltalk.method({
  1769. selector: "negated",
  1770. fn: function (){
  1771. var self=this;
  1772. return smalltalk.withContext(function($ctx1) {
  1773. var $1;
  1774. $1=(0).__minus(self);
  1775. return $1;
  1776. }, function($ctx1) {$ctx1.fill(self,"negated",{},smalltalk.Number)})},
  1777. messageSends: ["-"]}),
  1778. smalltalk.Number);
  1779. smalltalk.addMethod(
  1780. smalltalk.method({
  1781. selector: "negative",
  1782. fn: function (){
  1783. var self=this;
  1784. return smalltalk.withContext(function($ctx1) {
  1785. var $1;
  1786. $1=self.__lt((0));
  1787. return $1;
  1788. }, function($ctx1) {$ctx1.fill(self,"negative",{},smalltalk.Number)})},
  1789. messageSends: ["<"]}),
  1790. smalltalk.Number);
  1791. smalltalk.addMethod(
  1792. smalltalk.method({
  1793. selector: "odd",
  1794. fn: function (){
  1795. var self=this;
  1796. return smalltalk.withContext(function($ctx1) {
  1797. var $1;
  1798. $1=_st(self._even())._not();
  1799. return $1;
  1800. }, function($ctx1) {$ctx1.fill(self,"odd",{},smalltalk.Number)})},
  1801. messageSends: ["not", "even"]}),
  1802. smalltalk.Number);
  1803. smalltalk.addMethod(
  1804. smalltalk.method({
  1805. selector: "positive",
  1806. fn: function (){
  1807. var self=this;
  1808. return smalltalk.withContext(function($ctx1) {
  1809. var $1;
  1810. $1=self.__gt_eq((0));
  1811. return $1;
  1812. }, function($ctx1) {$ctx1.fill(self,"positive",{},smalltalk.Number)})},
  1813. messageSends: [">="]}),
  1814. smalltalk.Number);
  1815. smalltalk.addMethod(
  1816. smalltalk.method({
  1817. selector: "printOn:",
  1818. fn: function (aStream){
  1819. var self=this;
  1820. return smalltalk.withContext(function($ctx1) {
  1821. _st(aStream)._nextPutAll_(self._asString());
  1822. return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.Number)})},
  1823. messageSends: ["nextPutAll:", "asString"]}),
  1824. smalltalk.Number);
  1825. smalltalk.addMethod(
  1826. smalltalk.method({
  1827. selector: "printShowingDecimalPlaces:",
  1828. fn: function (placesDesired){
  1829. var self=this;
  1830. return smalltalk.withContext(function($ctx1) {
  1831. return self.toFixed(placesDesired);
  1832. return self}, function($ctx1) {$ctx1.fill(self,"printShowingDecimalPlaces:",{placesDesired:placesDesired},smalltalk.Number)})},
  1833. messageSends: []}),
  1834. smalltalk.Number);
  1835. smalltalk.addMethod(
  1836. smalltalk.method({
  1837. selector: "rounded",
  1838. fn: function (){
  1839. var self=this;
  1840. return smalltalk.withContext(function($ctx1) {
  1841. return Math.round(self);;
  1842. return self}, function($ctx1) {$ctx1.fill(self,"rounded",{},smalltalk.Number)})},
  1843. messageSends: []}),
  1844. smalltalk.Number);
  1845. smalltalk.addMethod(
  1846. smalltalk.method({
  1847. selector: "sqrt",
  1848. fn: function (){
  1849. var self=this;
  1850. return smalltalk.withContext(function($ctx1) {
  1851. return Math.sqrt(self);
  1852. return self}, function($ctx1) {$ctx1.fill(self,"sqrt",{},smalltalk.Number)})},
  1853. messageSends: []}),
  1854. smalltalk.Number);
  1855. smalltalk.addMethod(
  1856. smalltalk.method({
  1857. selector: "squared",
  1858. fn: function (){
  1859. var self=this;
  1860. return smalltalk.withContext(function($ctx1) {
  1861. var $1;
  1862. $1=self.__star(self);
  1863. return $1;
  1864. }, function($ctx1) {$ctx1.fill(self,"squared",{},smalltalk.Number)})},
  1865. messageSends: ["*"]}),
  1866. smalltalk.Number);
  1867. smalltalk.addMethod(
  1868. smalltalk.method({
  1869. selector: "timesRepeat:",
  1870. fn: function (aBlock){
  1871. var self=this;
  1872. var count;
  1873. return smalltalk.withContext(function($ctx1) {
  1874. count=(1);
  1875. _st((function(){
  1876. return smalltalk.withContext(function($ctx2) {
  1877. return _st(count).__gt(self);
  1878. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileFalse_((function(){
  1879. return smalltalk.withContext(function($ctx2) {
  1880. _st(aBlock)._value();
  1881. count=_st(count).__plus((1));
  1882. return count;
  1883. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1884. return self}, function($ctx1) {$ctx1.fill(self,"timesRepeat:",{aBlock:aBlock,count:count},smalltalk.Number)})},
  1885. messageSends: ["whileFalse:", "value", "+", ">"]}),
  1886. smalltalk.Number);
  1887. smalltalk.addMethod(
  1888. smalltalk.method({
  1889. selector: "to:",
  1890. fn: function (aNumber){
  1891. var self=this;
  1892. var array,first,last,count;
  1893. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  1894. return smalltalk.withContext(function($ctx1) {
  1895. var $1;
  1896. first=self._truncated();
  1897. last=_st(_st(aNumber)._truncated()).__plus((1));
  1898. count=(1);
  1899. array=_st($Array())._new();
  1900. _st(_st(last).__minus(first))._timesRepeat_((function(){
  1901. return smalltalk.withContext(function($ctx2) {
  1902. _st(array)._at_put_(count,first);
  1903. count=_st(count).__plus((1));
  1904. count;
  1905. first=_st(first).__plus((1));
  1906. return first;
  1907. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1908. $1=array;
  1909. return $1;
  1910. }, function($ctx1) {$ctx1.fill(self,"to:",{aNumber:aNumber,array:array,first:first,last:last,count:count},smalltalk.Number)})},
  1911. messageSends: ["truncated", "+", "new", "timesRepeat:", "at:put:", "-"]}),
  1912. smalltalk.Number);
  1913. smalltalk.addMethod(
  1914. smalltalk.method({
  1915. selector: "to:by:",
  1916. fn: function (stop,step){
  1917. var self=this;
  1918. var array,value,pos;
  1919. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  1920. return smalltalk.withContext(function($ctx1) {
  1921. var $1,$2,$3;
  1922. value=self;
  1923. array=_st($Array())._new();
  1924. pos=(1);
  1925. $1=_st(step).__eq((0));
  1926. if(smalltalk.assert($1)){
  1927. self._error_("step must be non-zero");
  1928. };
  1929. $2=_st(step).__lt((0));
  1930. if(smalltalk.assert($2)){
  1931. _st((function(){
  1932. return smalltalk.withContext(function($ctx2) {
  1933. return _st(value).__gt_eq(stop);
  1934. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileTrue_((function(){
  1935. return smalltalk.withContext(function($ctx2) {
  1936. _st(array)._at_put_(pos,value);
  1937. pos=_st(pos).__plus((1));
  1938. pos;
  1939. value=_st(value).__plus(step);
  1940. return value;
  1941. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1942. } else {
  1943. _st((function(){
  1944. return smalltalk.withContext(function($ctx2) {
  1945. return _st(value).__lt_eq(stop);
  1946. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileTrue_((function(){
  1947. return smalltalk.withContext(function($ctx2) {
  1948. _st(array)._at_put_(pos,value);
  1949. pos=_st(pos).__plus((1));
  1950. pos;
  1951. value=_st(value).__plus(step);
  1952. return value;
  1953. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1954. };
  1955. $3=array;
  1956. return $3;
  1957. }, function($ctx1) {$ctx1.fill(self,"to:by:",{stop:stop,step:step,array:array,value:value,pos:pos},smalltalk.Number)})},
  1958. messageSends: ["new", "ifTrue:", "error:", "=", "ifTrue:ifFalse:", "whileTrue:", "at:put:", "+", ">=", "<=", "<"]}),
  1959. smalltalk.Number);
  1960. smalltalk.addMethod(
  1961. smalltalk.method({
  1962. selector: "to:by:do:",
  1963. fn: function (stop,step,aBlock){
  1964. var self=this;
  1965. var value;
  1966. return smalltalk.withContext(function($ctx1) {
  1967. var $1,$2;
  1968. value=self;
  1969. $1=_st(step).__eq((0));
  1970. if(smalltalk.assert($1)){
  1971. self._error_("step must be non-zero");
  1972. };
  1973. $2=_st(step).__lt((0));
  1974. if(smalltalk.assert($2)){
  1975. _st((function(){
  1976. return smalltalk.withContext(function($ctx2) {
  1977. return _st(value).__gt_eq(stop);
  1978. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileTrue_((function(){
  1979. return smalltalk.withContext(function($ctx2) {
  1980. _st(aBlock)._value_(value);
  1981. value=_st(value).__plus(step);
  1982. return value;
  1983. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1984. } else {
  1985. _st((function(){
  1986. return smalltalk.withContext(function($ctx2) {
  1987. return _st(value).__lt_eq(stop);
  1988. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileTrue_((function(){
  1989. return smalltalk.withContext(function($ctx2) {
  1990. _st(aBlock)._value_(value);
  1991. value=_st(value).__plus(step);
  1992. return value;
  1993. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1994. };
  1995. return self}, function($ctx1) {$ctx1.fill(self,"to:by:do:",{stop:stop,step:step,aBlock:aBlock,value:value},smalltalk.Number)})},
  1996. messageSends: ["ifTrue:", "error:", "=", "ifTrue:ifFalse:", "whileTrue:", "value:", "+", ">=", "<=", "<"]}),
  1997. smalltalk.Number);
  1998. smalltalk.addMethod(
  1999. smalltalk.method({
  2000. selector: "to:do:",
  2001. fn: function (stop,aBlock){
  2002. var self=this;
  2003. var nextValue;
  2004. return smalltalk.withContext(function($ctx1) {
  2005. nextValue=self;
  2006. _st((function(){
  2007. return smalltalk.withContext(function($ctx2) {
  2008. return _st(nextValue).__lt_eq(stop);
  2009. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileTrue_((function(){
  2010. return smalltalk.withContext(function($ctx2) {
  2011. _st(aBlock)._value_(nextValue);
  2012. nextValue=_st(nextValue).__plus((1));
  2013. return nextValue;
  2014. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2015. return self}, function($ctx1) {$ctx1.fill(self,"to:do:",{stop:stop,aBlock:aBlock,nextValue:nextValue},smalltalk.Number)})},
  2016. messageSends: ["whileTrue:", "value:", "+", "<="]}),
  2017. smalltalk.Number);
  2018. smalltalk.addMethod(
  2019. smalltalk.method({
  2020. selector: "truncated",
  2021. fn: function (){
  2022. var self=this;
  2023. return smalltalk.withContext(function($ctx1) {
  2024. if(self >= 0) {
  2025. return Math.floor(self);
  2026. } else {
  2027. return Math.floor(self * (-1)) * (-1);
  2028. };
  2029. ;
  2030. return self}, function($ctx1) {$ctx1.fill(self,"truncated",{},smalltalk.Number)})},
  2031. messageSends: []}),
  2032. smalltalk.Number);
  2033. smalltalk.addMethod(
  2034. smalltalk.method({
  2035. selector: "|",
  2036. fn: function (aNumber){
  2037. var self=this;
  2038. return smalltalk.withContext(function($ctx1) {
  2039. return self | aNumber;
  2040. return self}, function($ctx1) {$ctx1.fill(self,"|",{aNumber:aNumber},smalltalk.Number)})},
  2041. messageSends: []}),
  2042. smalltalk.Number);
  2043. smalltalk.addMethod(
  2044. smalltalk.method({
  2045. selector: "heliosClass",
  2046. fn: function (){
  2047. var self=this;
  2048. return smalltalk.withContext(function($ctx1) {
  2049. return "magnitude";
  2050. }, function($ctx1) {$ctx1.fill(self,"heliosClass",{},smalltalk.Number.klass)})},
  2051. messageSends: []}),
  2052. smalltalk.Number.klass);
  2053. smalltalk.addMethod(
  2054. smalltalk.method({
  2055. selector: "pi",
  2056. fn: function (){
  2057. var self=this;
  2058. return smalltalk.withContext(function($ctx1) {
  2059. return Math.PI;
  2060. return self}, function($ctx1) {$ctx1.fill(self,"pi",{},smalltalk.Number.klass)})},
  2061. messageSends: []}),
  2062. smalltalk.Number.klass);
  2063. smalltalk.addClass('Point', smalltalk.Object, ['x', 'y'], 'Kernel-Objects');
  2064. smalltalk.addMethod(
  2065. smalltalk.method({
  2066. selector: "*",
  2067. fn: function (aPoint){
  2068. var self=this;
  2069. function $Point(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}
  2070. return smalltalk.withContext(function($ctx1) {
  2071. var $1;
  2072. $1=_st($Point())._x_y_(_st(self._x()).__star(_st(_st(aPoint)._asPoint())._x()),_st(self._y()).__star(_st(_st(aPoint)._asPoint())._y()));
  2073. return $1;
  2074. }, function($ctx1) {$ctx1.fill(self,"*",{aPoint:aPoint},smalltalk.Point)})},
  2075. messageSends: ["x:y:", "*", "x", "asPoint", "y"]}),
  2076. smalltalk.Point);
  2077. smalltalk.addMethod(
  2078. smalltalk.method({
  2079. selector: "+",
  2080. fn: function (aPoint){
  2081. var self=this;
  2082. function $Point(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}
  2083. return smalltalk.withContext(function($ctx1) {
  2084. var $1;
  2085. $1=_st($Point())._x_y_(_st(self._x()).__plus(_st(_st(aPoint)._asPoint())._x()),_st(self._y()).__plus(_st(_st(aPoint)._asPoint())._y()));
  2086. return $1;
  2087. }, function($ctx1) {$ctx1.fill(self,"+",{aPoint:aPoint},smalltalk.Point)})},
  2088. messageSends: ["x:y:", "+", "x", "asPoint", "y"]}),
  2089. smalltalk.Point);
  2090. smalltalk.addMethod(
  2091. smalltalk.method({
  2092. selector: "-",
  2093. fn: function (aPoint){
  2094. var self=this;
  2095. function $Point(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}
  2096. return smalltalk.withContext(function($ctx1) {
  2097. var $1;
  2098. $1=_st($Point())._x_y_(_st(self._x()).__minus(_st(_st(aPoint)._asPoint())._x()),_st(self._y()).__minus(_st(_st(aPoint)._asPoint())._y()));
  2099. return $1;
  2100. }, function($ctx1) {$ctx1.fill(self,"-",{aPoint:aPoint},smalltalk.Point)})},
  2101. messageSends: ["x:y:", "-", "x", "asPoint", "y"]}),
  2102. smalltalk.Point);
  2103. smalltalk.addMethod(
  2104. smalltalk.method({
  2105. selector: "/",
  2106. fn: function (aPoint){
  2107. var self=this;
  2108. function $Point(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}
  2109. return smalltalk.withContext(function($ctx1) {
  2110. var $1;
  2111. $1=_st($Point())._x_y_(_st(self._x()).__slash(_st(_st(aPoint)._asPoint())._x()),_st(self._y()).__slash(_st(_st(aPoint)._asPoint())._y()));
  2112. return $1;
  2113. }, function($ctx1) {$ctx1.fill(self,"/",{aPoint:aPoint},smalltalk.Point)})},
  2114. messageSends: ["x:y:", "/", "x", "asPoint", "y"]}),
  2115. smalltalk.Point);
  2116. smalltalk.addMethod(
  2117. smalltalk.method({
  2118. selector: "=",
  2119. fn: function (aPoint){
  2120. var self=this;
  2121. return smalltalk.withContext(function($ctx1) {
  2122. var $1;
  2123. $1=_st(_st(_st(aPoint)._class()).__eq(self._class()))._and_((function(){
  2124. return smalltalk.withContext(function($ctx2) {
  2125. return _st(_st(_st(aPoint)._x()).__eq(self._x())).__and(_st(_st(aPoint)._y()).__eq(self._y()));
  2126. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2127. return $1;
  2128. }, function($ctx1) {$ctx1.fill(self,"=",{aPoint:aPoint},smalltalk.Point)})},
  2129. messageSends: ["and:", "&", "=", "y", "x", "class"]}),
  2130. smalltalk.Point);
  2131. smalltalk.addMethod(
  2132. smalltalk.method({
  2133. selector: "asPoint",
  2134. fn: function (){
  2135. var self=this;
  2136. return smalltalk.withContext(function($ctx1) {
  2137. var $1;
  2138. $1=self;
  2139. return $1;
  2140. }, function($ctx1) {$ctx1.fill(self,"asPoint",{},smalltalk.Point)})},
  2141. messageSends: []}),
  2142. smalltalk.Point);
  2143. smalltalk.addMethod(
  2144. smalltalk.method({
  2145. selector: "printOn:",
  2146. fn: function (aStream){
  2147. var self=this;
  2148. return smalltalk.withContext(function($ctx1) {
  2149. var $1;
  2150. _st(self["@x"])._printOn_(aStream);
  2151. _st(aStream)._nextPutAll_("@");
  2152. $1=_st(_st(self["@y"])._notNil())._and_((function(){
  2153. return smalltalk.withContext(function($ctx2) {
  2154. return _st(self["@y"])._negative();
  2155. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2156. if(smalltalk.assert($1)){
  2157. _st(aStream)._space();
  2158. };
  2159. _st(self["@y"])._printOn_(aStream);
  2160. return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.Point)})},
  2161. messageSends: ["printOn:", "nextPutAll:", "ifTrue:", "space", "and:", "negative", "notNil"]}),
  2162. smalltalk.Point);
  2163. smalltalk.addMethod(
  2164. smalltalk.method({
  2165. selector: "translateBy:",
  2166. fn: function (delta){
  2167. var self=this;
  2168. return smalltalk.withContext(function($ctx1) {
  2169. var $1;
  2170. $1=_st(_st(_st(delta)._x()).__plus(self["@x"])).__at(_st(_st(delta)._y()).__plus(self["@y"]));
  2171. return $1;
  2172. }, function($ctx1) {$ctx1.fill(self,"translateBy:",{delta:delta},smalltalk.Point)})},
  2173. messageSends: ["@", "+", "y", "x"]}),
  2174. smalltalk.Point);
  2175. smalltalk.addMethod(
  2176. smalltalk.method({
  2177. selector: "x",
  2178. fn: function (){
  2179. var self=this;
  2180. return smalltalk.withContext(function($ctx1) {
  2181. var $1;
  2182. $1=self["@x"];
  2183. return $1;
  2184. }, function($ctx1) {$ctx1.fill(self,"x",{},smalltalk.Point)})},
  2185. messageSends: []}),
  2186. smalltalk.Point);
  2187. smalltalk.addMethod(
  2188. smalltalk.method({
  2189. selector: "x:",
  2190. fn: function (aNumber){
  2191. var self=this;
  2192. return smalltalk.withContext(function($ctx1) {
  2193. self["@x"]=aNumber;
  2194. return self}, function($ctx1) {$ctx1.fill(self,"x:",{aNumber:aNumber},smalltalk.Point)})},
  2195. messageSends: []}),
  2196. smalltalk.Point);
  2197. smalltalk.addMethod(
  2198. smalltalk.method({
  2199. selector: "y",
  2200. fn: function (){
  2201. var self=this;
  2202. return smalltalk.withContext(function($ctx1) {
  2203. var $1;
  2204. $1=self["@y"];
  2205. return $1;
  2206. }, function($ctx1) {$ctx1.fill(self,"y",{},smalltalk.Point)})},
  2207. messageSends: []}),
  2208. smalltalk.Point);
  2209. smalltalk.addMethod(
  2210. smalltalk.method({
  2211. selector: "y:",
  2212. fn: function (aNumber){
  2213. var self=this;
  2214. return smalltalk.withContext(function($ctx1) {
  2215. self["@y"]=aNumber;
  2216. return self}, function($ctx1) {$ctx1.fill(self,"y:",{aNumber:aNumber},smalltalk.Point)})},
  2217. messageSends: []}),
  2218. smalltalk.Point);
  2219. smalltalk.addMethod(
  2220. smalltalk.method({
  2221. selector: "heliosClass",
  2222. fn: function (){
  2223. var self=this;
  2224. return smalltalk.withContext(function($ctx1) {
  2225. return "magnitude";
  2226. }, function($ctx1) {$ctx1.fill(self,"heliosClass",{},smalltalk.Point.klass)})},
  2227. messageSends: []}),
  2228. smalltalk.Point.klass);
  2229. smalltalk.addMethod(
  2230. smalltalk.method({
  2231. selector: "x:y:",
  2232. fn: function (aNumber,anotherNumber){
  2233. var self=this;
  2234. return smalltalk.withContext(function($ctx1) {
  2235. var $2,$3,$1;
  2236. $2=self._new();
  2237. _st($2)._x_(aNumber);
  2238. _st($2)._y_(anotherNumber);
  2239. $3=_st($2)._yourself();
  2240. $1=$3;
  2241. return $1;
  2242. }, function($ctx1) {$ctx1.fill(self,"x:y:",{aNumber:aNumber,anotherNumber:anotherNumber},smalltalk.Point.klass)})},
  2243. messageSends: ["x:", "new", "y:", "yourself"]}),
  2244. smalltalk.Point.klass);
  2245. smalltalk.addClass('Random', smalltalk.Object, [], 'Kernel-Objects');
  2246. smalltalk.addMethod(
  2247. smalltalk.method({
  2248. selector: "next",
  2249. fn: function (){
  2250. var self=this;
  2251. return smalltalk.withContext(function($ctx1) {
  2252. return Math.random();
  2253. return self}, function($ctx1) {$ctx1.fill(self,"next",{},smalltalk.Random)})},
  2254. messageSends: []}),
  2255. smalltalk.Random);
  2256. smalltalk.addMethod(
  2257. smalltalk.method({
  2258. selector: "next:",
  2259. fn: function (anInteger){
  2260. var self=this;
  2261. return smalltalk.withContext(function($ctx1) {
  2262. var $1;
  2263. $1=_st((1)._to_(anInteger))._collect_((function(each){
  2264. return smalltalk.withContext(function($ctx2) {
  2265. return self._next();
  2266. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  2267. return $1;
  2268. }, function($ctx1) {$ctx1.fill(self,"next:",{anInteger:anInteger},smalltalk.Random)})},
  2269. messageSends: ["collect:", "next", "to:"]}),
  2270. smalltalk.Random);
  2271. smalltalk.addClass('UndefinedObject', smalltalk.Object, [], 'Kernel-Objects');
  2272. smalltalk.addMethod(
  2273. smalltalk.method({
  2274. selector: "asJSON",
  2275. fn: function (){
  2276. var self=this;
  2277. return smalltalk.withContext(function($ctx1) {
  2278. var $1;
  2279. $1=null;
  2280. return $1;
  2281. }, function($ctx1) {$ctx1.fill(self,"asJSON",{},smalltalk.UndefinedObject)})},
  2282. messageSends: []}),
  2283. smalltalk.UndefinedObject);
  2284. smalltalk.addMethod(
  2285. smalltalk.method({
  2286. selector: "deepCopy",
  2287. fn: function (){
  2288. var self=this;
  2289. return smalltalk.withContext(function($ctx1) {
  2290. var $1;
  2291. $1=self;
  2292. return $1;
  2293. }, function($ctx1) {$ctx1.fill(self,"deepCopy",{},smalltalk.UndefinedObject)})},
  2294. messageSends: []}),
  2295. smalltalk.UndefinedObject);
  2296. smalltalk.addMethod(
  2297. smalltalk.method({
  2298. selector: "ifNil:",
  2299. fn: function (aBlock){
  2300. var self=this;
  2301. return smalltalk.withContext(function($ctx1) {
  2302. var $2,$1;
  2303. $2=self;
  2304. $1=_st($2)._ifNil_ifNotNil_(aBlock,(function(){
  2305. return smalltalk.withContext(function($ctx2) {
  2306. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2307. return $1;
  2308. }, function($ctx1) {$ctx1.fill(self,"ifNil:",{aBlock:aBlock},smalltalk.UndefinedObject)})},
  2309. messageSends: ["ifNil:ifNotNil:"]}),
  2310. smalltalk.UndefinedObject);
  2311. smalltalk.addMethod(
  2312. smalltalk.method({
  2313. selector: "ifNil:ifNotNil:",
  2314. fn: function (aBlock,anotherBlock){
  2315. var self=this;
  2316. return smalltalk.withContext(function($ctx1) {
  2317. var $1;
  2318. $1=_st(aBlock)._value();
  2319. return $1;
  2320. }, function($ctx1) {$ctx1.fill(self,"ifNil:ifNotNil:",{aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.UndefinedObject)})},
  2321. messageSends: ["value"]}),
  2322. smalltalk.UndefinedObject);
  2323. smalltalk.addMethod(
  2324. smalltalk.method({
  2325. selector: "ifNotNil:",
  2326. fn: function (aBlock){
  2327. var self=this;
  2328. return smalltalk.withContext(function($ctx1) {
  2329. var $1;
  2330. $1=self;
  2331. return $1;
  2332. }, function($ctx1) {$ctx1.fill(self,"ifNotNil:",{aBlock:aBlock},smalltalk.UndefinedObject)})},
  2333. messageSends: []}),
  2334. smalltalk.UndefinedObject);
  2335. smalltalk.addMethod(
  2336. smalltalk.method({
  2337. selector: "ifNotNil:ifNil:",
  2338. fn: function (aBlock,anotherBlock){
  2339. var self=this;
  2340. return smalltalk.withContext(function($ctx1) {
  2341. var $1;
  2342. $1=_st(anotherBlock)._value();
  2343. return $1;
  2344. }, function($ctx1) {$ctx1.fill(self,"ifNotNil:ifNil:",{aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.UndefinedObject)})},
  2345. messageSends: ["value"]}),
  2346. smalltalk.UndefinedObject);
  2347. smalltalk.addMethod(
  2348. smalltalk.method({
  2349. selector: "isImmutable",
  2350. fn: function (){
  2351. var self=this;
  2352. return smalltalk.withContext(function($ctx1) {
  2353. return true;
  2354. }, function($ctx1) {$ctx1.fill(self,"isImmutable",{},smalltalk.UndefinedObject)})},
  2355. messageSends: []}),
  2356. smalltalk.UndefinedObject);
  2357. smalltalk.addMethod(
  2358. smalltalk.method({
  2359. selector: "isNil",
  2360. fn: function (){
  2361. var self=this;
  2362. return smalltalk.withContext(function($ctx1) {
  2363. return true;
  2364. }, function($ctx1) {$ctx1.fill(self,"isNil",{},smalltalk.UndefinedObject)})},
  2365. messageSends: []}),
  2366. smalltalk.UndefinedObject);
  2367. smalltalk.addMethod(
  2368. smalltalk.method({
  2369. selector: "notNil",
  2370. fn: function (){
  2371. var self=this;
  2372. return smalltalk.withContext(function($ctx1) {
  2373. return false;
  2374. }, function($ctx1) {$ctx1.fill(self,"notNil",{},smalltalk.UndefinedObject)})},
  2375. messageSends: []}),
  2376. smalltalk.UndefinedObject);
  2377. smalltalk.addMethod(
  2378. smalltalk.method({
  2379. selector: "printOn:",
  2380. fn: function (aStream){
  2381. var self=this;
  2382. return smalltalk.withContext(function($ctx1) {
  2383. _st(aStream)._nextPutAll_("nil");
  2384. return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.UndefinedObject)})},
  2385. messageSends: ["nextPutAll:"]}),
  2386. smalltalk.UndefinedObject);
  2387. smalltalk.addMethod(
  2388. smalltalk.method({
  2389. selector: "shallowCopy",
  2390. fn: function (){
  2391. var self=this;
  2392. return smalltalk.withContext(function($ctx1) {
  2393. var $1;
  2394. $1=self;
  2395. return $1;
  2396. }, function($ctx1) {$ctx1.fill(self,"shallowCopy",{},smalltalk.UndefinedObject)})},
  2397. messageSends: []}),
  2398. smalltalk.UndefinedObject);
  2399. smalltalk.addMethod(
  2400. smalltalk.method({
  2401. selector: "subclass:instanceVariableNames:",
  2402. fn: function (aString,anotherString){
  2403. var self=this;
  2404. return smalltalk.withContext(function($ctx1) {
  2405. var $1;
  2406. $1=self._subclass_instanceVariableNames_package_(aString,anotherString,nil);
  2407. return $1;
  2408. }, function($ctx1) {$ctx1.fill(self,"subclass:instanceVariableNames:",{aString:aString,anotherString:anotherString},smalltalk.UndefinedObject)})},
  2409. messageSends: ["subclass:instanceVariableNames:package:"]}),
  2410. smalltalk.UndefinedObject);
  2411. smalltalk.addMethod(
  2412. smalltalk.method({
  2413. selector: "subclass:instanceVariableNames:category:",
  2414. fn: function (aString,aString2,aString3){
  2415. var self=this;
  2416. return smalltalk.withContext(function($ctx1) {
  2417. var $1;
  2418. self._deprecatedAPI();
  2419. $1=self._subclass_instanceVariableNames_package_(aString,aString2,aString3);
  2420. return $1;
  2421. }, function($ctx1) {$ctx1.fill(self,"subclass:instanceVariableNames:category:",{aString:aString,aString2:aString2,aString3:aString3},smalltalk.UndefinedObject)})},
  2422. messageSends: ["deprecatedAPI", "subclass:instanceVariableNames:package:"]}),
  2423. smalltalk.UndefinedObject);
  2424. smalltalk.addMethod(
  2425. smalltalk.method({
  2426. selector: "subclass:instanceVariableNames:package:",
  2427. fn: function (aString,aString2,aString3){
  2428. var self=this;
  2429. function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
  2430. return smalltalk.withContext(function($ctx1) {
  2431. var $1;
  2432. $1=_st(_st($ClassBuilder())._new())._superclass_subclass_instanceVariableNames_package_(self,_st(aString)._asString(),aString2,aString3);
  2433. return $1;
  2434. }, function($ctx1) {$ctx1.fill(self,"subclass:instanceVariableNames:package:",{aString:aString,aString2:aString2,aString3:aString3},smalltalk.UndefinedObject)})},
  2435. messageSends: ["superclass:subclass:instanceVariableNames:package:", "asString", "new"]}),
  2436. smalltalk.UndefinedObject);
  2437. smalltalk.addMethod(
  2438. smalltalk.method({
  2439. selector: "new",
  2440. fn: function (){
  2441. var self=this;
  2442. return smalltalk.withContext(function($ctx1) {
  2443. self._error_("You cannot create new instances of UndefinedObject. Use nil");
  2444. return self}, function($ctx1) {$ctx1.fill(self,"new",{},smalltalk.UndefinedObject.klass)})},
  2445. messageSends: ["error:"]}),
  2446. smalltalk.UndefinedObject.klass);
  2447. });