Kernel-Objects.deploy.js 73 KB

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