Axxord.js 68 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021
  1. define(["amber/boot", "amber_core/Kernel-Collections", "amber_core/Kernel-Exceptions", "amber_core/Kernel-Infrastructure", "amber_core/Kernel-Objects"], function($boot){"use strict";
  2. if(!$boot.nilAsReceiver)$boot.nilAsReceiver=$boot.nil;
  3. if(!("nilAsValue" in $boot))$boot.nilAsValue=$boot.nilAsReceiver;
  4. var $core=$boot.api,nil=$boot.nilAsValue,$nil=$boot.nilAsReceiver,$recv=$boot.asReceiver,$globals=$boot.globals;
  5. if(!$boot.nilAsClass)$boot.nilAsClass=$boot.dnu;
  6. $core.addPackage("Axxord");
  7. $core.packages["Axxord"].innerEval = function (expr) { return eval(expr); };
  8. $core.packages["Axxord"].transport = {"type":"amd","amdNamespace":"axxord"};
  9. $core.addClass("Axes", $globals.Object, [], "Axxord");
  10. $core.addMethod(
  11. $core.method({
  12. selector: "newInterestThru:doing:",
  13. protocol: "factory",
  14. fn: function (anAspect,aBlock){
  15. var self=this,$self=this;
  16. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  17. return $core.withContext(function($ctx1) {
  18. //>>excludeEnd("ctx");
  19. var $2,$3,$1,$5,$4;
  20. return $recv($recv($globals.PluggableInterest)._new())._accept_enact_((function(aspect){
  21. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  22. return $core.withContext(function($ctx2) {
  23. //>>excludeEnd("ctx");
  24. $2=$recv(aspect)._size();
  25. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  26. $ctx2.sendIdx["size"]=1;
  27. //>>excludeEnd("ctx");
  28. $3=$recv(anAspect)._size();
  29. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  30. $ctx2.sendIdx["size"]=2;
  31. //>>excludeEnd("ctx");
  32. $1=$recv($2).__lt_eq($3);
  33. if($core.assert($1)){
  34. $5=$recv(aspect)._size();
  35. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  36. $ctx2.sendIdx["size"]=3;
  37. //>>excludeEnd("ctx");
  38. $4=$recv(anAspect)._copyFrom_to_((1),$5);
  39. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  40. $ctx2.sendIdx["copyFrom:to:"]=1;
  41. //>>excludeEnd("ctx");
  42. return $recv(aspect).__eq($4);
  43. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  44. $ctx2.sendIdx["="]=1;
  45. //>>excludeEnd("ctx");
  46. } else {
  47. return $recv(anAspect).__eq($recv(aspect)._copyFrom_to_((1),$recv(anAspect)._size()));
  48. }
  49. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  50. }, function($ctx2) {$ctx2.fillBlock({aspect:aspect},$ctx1,1)});
  51. //>>excludeEnd("ctx");
  52. }),aBlock);
  53. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  54. }, function($ctx1) {$ctx1.fill(self,"newInterestThru:doing:",{anAspect:anAspect,aBlock:aBlock},$globals.Axes.a$cls)});
  55. //>>excludeEnd("ctx");
  56. },
  57. //>>excludeStart("ide", pragmas.excludeIdeData);
  58. args: ["anAspect", "aBlock"],
  59. source: "newInterestThru: anAspect doing: aBlock\x0a\x09^ PluggableInterest new\x0a\x09\x09accept: [ :aspect | aspect size <= anAspect size\x0a\x09\x09\x09ifTrue: [ aspect = (anAspect copyFrom: 1 to: aspect size) ]\x0a\x09\x09\x09ifFalse: [ anAspect = (aspect copyFrom: 1 to: anAspect size) ] ]\x0a\x09\x09enact: aBlock",
  60. referencedClasses: ["PluggableInterest"],
  61. //>>excludeEnd("ide");
  62. messageSends: ["accept:enact:", "new", "ifTrue:ifFalse:", "<=", "size", "=", "copyFrom:to:"]
  63. }),
  64. $globals.Axes.a$cls);
  65. $core.addMethod(
  66. $core.method({
  67. selector: "newInterestUpTo:doing:",
  68. protocol: "factory",
  69. fn: function (anAspect,aBlock){
  70. var self=this,$self=this;
  71. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  72. return $core.withContext(function($ctx1) {
  73. //>>excludeEnd("ctx");
  74. var $2,$3,$1;
  75. return $recv($recv($globals.PluggableInterest)._new())._accept_enact_((function(changedAspect){
  76. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  77. return $core.withContext(function($ctx2) {
  78. //>>excludeEnd("ctx");
  79. $2=$recv(changedAspect)._size();
  80. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  81. $ctx2.sendIdx["size"]=1;
  82. //>>excludeEnd("ctx");
  83. $3=$recv(anAspect)._size();
  84. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  85. $ctx2.sendIdx["size"]=2;
  86. //>>excludeEnd("ctx");
  87. $1=$recv($2).__lt_eq($3);
  88. return $recv($1)._and_((function(){
  89. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  90. return $core.withContext(function($ctx3) {
  91. //>>excludeEnd("ctx");
  92. return $recv(changedAspect).__eq($recv(anAspect)._copyFrom_to_((1),$recv(changedAspect)._size()));
  93. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  94. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  95. //>>excludeEnd("ctx");
  96. }));
  97. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  98. }, function($ctx2) {$ctx2.fillBlock({changedAspect:changedAspect},$ctx1,1)});
  99. //>>excludeEnd("ctx");
  100. }),aBlock);
  101. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  102. }, function($ctx1) {$ctx1.fill(self,"newInterestUpTo:doing:",{anAspect:anAspect,aBlock:aBlock},$globals.Axes.a$cls)});
  103. //>>excludeEnd("ctx");
  104. },
  105. //>>excludeStart("ide", pragmas.excludeIdeData);
  106. args: ["anAspect", "aBlock"],
  107. source: "newInterestUpTo: anAspect doing: aBlock\x0a\x09^ PluggableInterest new\x0a\x09\x09accept: [ :changedAspect | changedAspect size <= anAspect size and:\x0a\x09\x09\x09[changedAspect = (anAspect copyFrom: 1 to: changedAspect size)] ]\x0a\x09\x09enact: aBlock",
  108. referencedClasses: ["PluggableInterest"],
  109. //>>excludeEnd("ide");
  110. messageSends: ["accept:enact:", "new", "and:", "<=", "size", "=", "copyFrom:to:"]
  111. }),
  112. $globals.Axes.a$cls);
  113. $core.addMethod(
  114. $core.method({
  115. selector: "on:at:consume:",
  116. protocol: "delegated",
  117. fn: function (anObject,aCollection,aBlock){
  118. var self=this,$self=this;
  119. var value;
  120. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  121. return $core.withContext(function($ctx1) {
  122. //>>excludeEnd("ctx");
  123. var $early={};
  124. try {
  125. value=$recv(anObject)._atAxes_ifAbsent_(aCollection,(function(){
  126. throw $early=[anObject];
  127. }));
  128. return $recv(aBlock)._value_(value);
  129. }
  130. catch(e) {if(e===$early)return e[0]; throw e}
  131. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  132. }, function($ctx1) {$ctx1.fill(self,"on:at:consume:",{anObject:anObject,aCollection:aCollection,aBlock:aBlock,value:value},$globals.Axes.a$cls)});
  133. //>>excludeEnd("ctx");
  134. },
  135. //>>excludeStart("ide", pragmas.excludeIdeData);
  136. args: ["anObject", "aCollection", "aBlock"],
  137. source: "on: anObject at: aCollection consume: aBlock\x0a\x09| value |\x0a\x09value := anObject atAxes: aCollection ifAbsent: [ ^ anObject ].\x0a\x09^ aBlock value: value",
  138. referencedClasses: [],
  139. //>>excludeEnd("ide");
  140. messageSends: ["atAxes:ifAbsent:", "value:"]
  141. }),
  142. $globals.Axes.a$cls);
  143. $core.addMethod(
  144. $core.method({
  145. selector: "on:at:ifAbsent:",
  146. protocol: "delegated",
  147. fn: function (anObject,aCollection,aBlock){
  148. var self=this,$self=this;
  149. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  150. return $core.withContext(function($ctx1) {
  151. //>>excludeEnd("ctx");
  152. var $early={};
  153. try {
  154. return $recv(aCollection)._inject_into_(anObject,(function(soFar,segment){
  155. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  156. return $core.withContext(function($ctx2) {
  157. //>>excludeEnd("ctx");
  158. return $recv(segment)._asAxisIn_ifAbsent_(soFar,(function(){
  159. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  160. return $core.withContext(function($ctx3) {
  161. //>>excludeEnd("ctx");
  162. throw $early=[$recv(aBlock)._value()];
  163. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  164. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  165. //>>excludeEnd("ctx");
  166. }));
  167. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  168. }, function($ctx2) {$ctx2.fillBlock({soFar:soFar,segment:segment},$ctx1,1)});
  169. //>>excludeEnd("ctx");
  170. }));
  171. }
  172. catch(e) {if(e===$early)return e[0]; throw e}
  173. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  174. }, function($ctx1) {$ctx1.fill(self,"on:at:ifAbsent:",{anObject:anObject,aCollection:aCollection,aBlock:aBlock},$globals.Axes.a$cls)});
  175. //>>excludeEnd("ctx");
  176. },
  177. //>>excludeStart("ide", pragmas.excludeIdeData);
  178. args: ["anObject", "aCollection", "aBlock"],
  179. source: "on: anObject at: aCollection ifAbsent: aBlock\x0a\x09^ aCollection inject: anObject into: [ :soFar :segment |\x0a\x09\x09segment asAxisIn: soFar ifAbsent: [ ^ aBlock value ]]",
  180. referencedClasses: [],
  181. //>>excludeEnd("ide");
  182. messageSends: ["inject:into:", "asAxisIn:ifAbsent:", "value"]
  183. }),
  184. $globals.Axes.a$cls);
  185. $core.addMethod(
  186. $core.method({
  187. selector: "on:at:ifAbsent:put:",
  188. protocol: "delegated",
  189. fn: function (anObject,aCollection,aBlock,value){
  190. var self=this,$self=this;
  191. var penultimate;
  192. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  193. return $core.withContext(function($ctx1) {
  194. //>>excludeEnd("ctx");
  195. penultimate=$recv(anObject)._atAxes_ifAbsent_($recv(aCollection)._allButLast(),aBlock);
  196. return $recv($recv(aCollection)._last())._asAxisIn_ifAbsent_put_(penultimate,aBlock,value);
  197. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  198. }, function($ctx1) {$ctx1.fill(self,"on:at:ifAbsent:put:",{anObject:anObject,aCollection:aCollection,aBlock:aBlock,value:value,penultimate:penultimate},$globals.Axes.a$cls)});
  199. //>>excludeEnd("ctx");
  200. },
  201. //>>excludeStart("ide", pragmas.excludeIdeData);
  202. args: ["anObject", "aCollection", "aBlock", "value"],
  203. source: "on: anObject at: aCollection ifAbsent: aBlock put: value\x0a\x09| penultimate |\x0a\x09penultimate := anObject atAxes: aCollection allButLast ifAbsent: aBlock.\x0a\x09^ aCollection last asAxisIn: penultimate ifAbsent: aBlock put: value",
  204. referencedClasses: [],
  205. //>>excludeEnd("ide");
  206. messageSends: ["atAxes:ifAbsent:", "allButLast", "asAxisIn:ifAbsent:put:", "last"]
  207. }),
  208. $globals.Axes.a$cls);
  209. $core.addMethod(
  210. $core.method({
  211. selector: "on:at:transform:",
  212. protocol: "delegated",
  213. fn: function (anObject,aCollection,aBlock){
  214. var self=this,$self=this;
  215. var value,newValue;
  216. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  217. return $core.withContext(function($ctx1) {
  218. //>>excludeEnd("ctx");
  219. var $1,$2,$receiver;
  220. var $early={};
  221. try {
  222. value=$recv(anObject)._atAxes_ifAbsent_(aCollection,(function(){
  223. throw $early=[anObject];
  224. }));
  225. newValue=$recv(aBlock)._value_(value);
  226. $1=$recv(value).__eq_eq(newValue);
  227. if(!$core.assert($1)){
  228. $recv(anObject)._atAxes_ifAbsent_put_(aCollection,(function(){
  229. throw $early=[anObject];
  230. }),newValue);
  231. }
  232. $2=$recv(anObject)._axxord();
  233. if(($receiver = $2) == null || $receiver.a$nil){
  234. $2;
  235. } else {
  236. var axon;
  237. axon=$receiver;
  238. $recv(axon)._changed_(aCollection);
  239. }
  240. return self;
  241. }
  242. catch(e) {if(e===$early)return e[0]; throw e}
  243. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  244. }, function($ctx1) {$ctx1.fill(self,"on:at:transform:",{anObject:anObject,aCollection:aCollection,aBlock:aBlock,value:value,newValue:newValue},$globals.Axes.a$cls)});
  245. //>>excludeEnd("ctx");
  246. },
  247. //>>excludeStart("ide", pragmas.excludeIdeData);
  248. args: ["anObject", "aCollection", "aBlock"],
  249. source: "on: anObject at: aCollection transform: aBlock\x0a\x09| value newValue |\x0a\x09value := anObject atAxes: aCollection ifAbsent: [ ^ anObject ].\x0a\x09newValue := aBlock value: value.\x0a\x09value == newValue ifFalse: [ anObject atAxes: aCollection ifAbsent: [ ^ anObject ] put: newValue ].\x0a\x09anObject axxord ifNotNil: [:axon | axon changed: aCollection]",
  250. referencedClasses: [],
  251. //>>excludeEnd("ide");
  252. messageSends: ["atAxes:ifAbsent:", "value:", "ifFalse:", "==", "atAxes:ifAbsent:put:", "ifNotNil:", "axxord", "changed:"]
  253. }),
  254. $globals.Axes.a$cls);
  255. $core.addMethod(
  256. $core.method({
  257. selector: "parse:",
  258. protocol: "parsing",
  259. fn: function (message){
  260. var self=this,$self=this;
  261. var result,stack,anArray;
  262. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  263. return $core.withContext(function($ctx1) {
  264. //>>excludeEnd("ctx");
  265. var $1,$2,$3,$5,$4,$6,$7,$8,$9,$10,$11;
  266. anArray=$recv(message)._tokenize_(" ");
  267. result=[];
  268. stack=[result];
  269. $recv(anArray)._do_((function(each){
  270. var asNum,inner,close;
  271. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  272. return $core.withContext(function($ctx2) {
  273. //>>excludeEnd("ctx");
  274. close=(0);
  275. close;
  276. inner=each;
  277. inner;
  278. $recv((function(){
  279. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  280. return $core.withContext(function($ctx3) {
  281. //>>excludeEnd("ctx");
  282. $1=$recv(inner)._notEmpty();
  283. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  284. $ctx3.sendIdx["notEmpty"]=1;
  285. //>>excludeEnd("ctx");
  286. return $recv($1)._and_((function(){
  287. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  288. return $core.withContext(function($ctx4) {
  289. //>>excludeEnd("ctx");
  290. $2=$recv(inner)._first();
  291. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  292. $ctx4.sendIdx["first"]=1;
  293. //>>excludeEnd("ctx");
  294. return $recv($2).__eq("(");
  295. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  296. $ctx4.sendIdx["="]=1;
  297. //>>excludeEnd("ctx");
  298. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  299. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)});
  300. //>>excludeEnd("ctx");
  301. }));
  302. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  303. $ctx3.sendIdx["and:"]=1;
  304. //>>excludeEnd("ctx");
  305. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  306. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  307. //>>excludeEnd("ctx");
  308. }))._whileTrue_((function(){
  309. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  310. return $core.withContext(function($ctx3) {
  311. //>>excludeEnd("ctx");
  312. inner=$recv(inner)._allButFirst();
  313. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  314. $ctx3.sendIdx["allButFirst"]=1;
  315. //>>excludeEnd("ctx");
  316. inner;
  317. $3=stack;
  318. $5=$recv(stack)._last();
  319. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  320. $ctx3.sendIdx["last"]=1;
  321. //>>excludeEnd("ctx");
  322. $4=$recv($5)._add_([]);
  323. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  324. $ctx3.sendIdx["add:"]=2;
  325. //>>excludeEnd("ctx");
  326. return $recv($3)._add_($4);
  327. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  328. $ctx3.sendIdx["add:"]=1;
  329. //>>excludeEnd("ctx");
  330. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  331. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)});
  332. //>>excludeEnd("ctx");
  333. }));
  334. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  335. $ctx2.sendIdx["whileTrue:"]=1;
  336. //>>excludeEnd("ctx");
  337. $recv((function(){
  338. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  339. return $core.withContext(function($ctx3) {
  340. //>>excludeEnd("ctx");
  341. $6=$recv(inner)._notEmpty();
  342. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  343. $ctx3.sendIdx["notEmpty"]=2;
  344. //>>excludeEnd("ctx");
  345. return $recv($6)._and_((function(){
  346. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  347. return $core.withContext(function($ctx4) {
  348. //>>excludeEnd("ctx");
  349. $7=$recv(inner)._last();
  350. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  351. $ctx4.sendIdx["last"]=2;
  352. //>>excludeEnd("ctx");
  353. return $recv($7).__eq(")");
  354. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  355. $ctx4.sendIdx["="]=2;
  356. //>>excludeEnd("ctx");
  357. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  358. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,6)});
  359. //>>excludeEnd("ctx");
  360. }));
  361. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  362. $ctx3.sendIdx["and:"]=2;
  363. //>>excludeEnd("ctx");
  364. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  365. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,5)});
  366. //>>excludeEnd("ctx");
  367. }))._whileTrue_((function(){
  368. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  369. return $core.withContext(function($ctx3) {
  370. //>>excludeEnd("ctx");
  371. inner=$recv(inner)._allButLast();
  372. inner;
  373. close=$recv(close).__plus((1));
  374. return close;
  375. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  376. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,7)});
  377. //>>excludeEnd("ctx");
  378. }));
  379. $8=$recv($recv(inner)._notEmpty())._and_((function(){
  380. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  381. return $core.withContext(function($ctx3) {
  382. //>>excludeEnd("ctx");
  383. return $recv($recv(inner)._first()).__eq("~");
  384. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  385. $ctx3.sendIdx["="]=3;
  386. //>>excludeEnd("ctx");
  387. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  388. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,8)});
  389. //>>excludeEnd("ctx");
  390. }));
  391. if($core.assert($8)){
  392. inner=[$recv(inner)._allButFirst()];
  393. inner;
  394. }
  395. $9=$recv(inner)._isString();
  396. if($core.assert($9)){
  397. asNum=$recv($recv(inner)._ifEmpty_((function(){
  398. return "NaN";
  399. })))._asNumber();
  400. } else {
  401. asNum=inner;
  402. }
  403. asNum;
  404. $10=$recv(asNum).__eq(asNum);
  405. if($core.assert($10)){
  406. $11=$recv(stack)._last();
  407. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  408. $ctx2.sendIdx["last"]=3;
  409. //>>excludeEnd("ctx");
  410. $recv($11)._add_(asNum);
  411. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  412. $ctx2.sendIdx["add:"]=3;
  413. //>>excludeEnd("ctx");
  414. } else {
  415. $recv(inner)._ifNotEmpty_((function(){
  416. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  417. return $core.withContext(function($ctx3) {
  418. //>>excludeEnd("ctx");
  419. return $recv($recv(stack)._last())._add_(inner);
  420. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  421. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,15)});
  422. //>>excludeEnd("ctx");
  423. }));
  424. }
  425. return $recv(close)._timesRepeat_((function(){
  426. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  427. return $core.withContext(function($ctx3) {
  428. //>>excludeEnd("ctx");
  429. return $recv(stack)._removeLast();
  430. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  431. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,16)});
  432. //>>excludeEnd("ctx");
  433. }));
  434. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  435. }, function($ctx2) {$ctx2.fillBlock({each:each,asNum:asNum,inner:inner,close:close},$ctx1,1)});
  436. //>>excludeEnd("ctx");
  437. }));
  438. return result;
  439. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  440. }, function($ctx1) {$ctx1.fill(self,"parse:",{message:message,result:result,stack:stack,anArray:anArray},$globals.Axes.a$cls)});
  441. //>>excludeEnd("ctx");
  442. },
  443. //>>excludeStart("ide", pragmas.excludeIdeData);
  444. args: ["message"],
  445. source: "parse: message\x0a\x09| result stack anArray |\x0a\x09anArray := message tokenize: ' '.\x0a\x09result := #().\x0a\x09stack := { result }.\x0a\x09anArray do: [ :each |\x0a\x09\x09| asNum inner close |\x0a\x09\x09close := 0.\x0a\x09\x09inner := each.\x0a\x09\x09[ inner notEmpty and: [ inner first = '(' ]] whileTrue: [ inner := inner allButFirst. stack add: (stack last add: #()) ].\x0a\x09\x09[ inner notEmpty and: [ inner last = ')' ]] whileTrue: [ inner := inner allButLast. close := close + 1 ].\x0a\x09\x09(inner notEmpty and: [ inner first = '~' ]) ifTrue: [ inner := { inner allButFirst } ].\x0a\x09\x09asNum := inner isString ifTrue: [ (inner ifEmpty: [ 'NaN' ]) asNumber ] ifFalse: [ inner ].\x0a\x09\x09asNum = asNum ifTrue: [ stack last add: asNum ] ifFalse: [\x0a\x09\x09\x09inner ifNotEmpty: [ stack last add: inner ] ].\x0a\x09\x09close timesRepeat: [ stack removeLast ] ].\x0a\x09^ result",
  446. referencedClasses: [],
  447. //>>excludeEnd("ide");
  448. messageSends: ["tokenize:", "do:", "whileTrue:", "and:", "notEmpty", "=", "first", "allButFirst", "add:", "last", "allButLast", "+", "ifTrue:", "ifTrue:ifFalse:", "isString", "asNumber", "ifEmpty:", "ifNotEmpty:", "timesRepeat:", "removeLast"]
  449. }),
  450. $globals.Axes.a$cls);
  451. $core.addClass("Axolator", $globals.Object, ["root"], "Axxord");
  452. $core.addMethod(
  453. $core.method({
  454. selector: "model:modify:",
  455. protocol: "action",
  456. fn: function (anEavModel,aBlock){
  457. var self=this,$self=this;
  458. var newValue;
  459. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  460. return $core.withContext(function($ctx1) {
  461. //>>excludeEnd("ctx");
  462. newValue=$recv(aBlock)._value_($recv(anEavModel)._on_(self));
  463. $recv(anEavModel)._on_put_(self,$recv(newValue)._deepCopy());
  464. return self;
  465. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  466. }, function($ctx1) {$ctx1.fill(self,"model:modify:",{anEavModel:anEavModel,aBlock:aBlock,newValue:newValue},$globals.Axolator)});
  467. //>>excludeEnd("ctx");
  468. },
  469. //>>excludeStart("ide", pragmas.excludeIdeData);
  470. args: ["anEavModel", "aBlock"],
  471. source: "model: anEavModel modify: aBlock\x0a\x0a| newValue |\x0anewValue := aBlock value: (anEavModel on: self).\x0aanEavModel on: self put: newValue deepCopy",
  472. referencedClasses: [],
  473. //>>excludeEnd("ide");
  474. messageSends: ["value:", "on:", "on:put:", "deepCopy"]
  475. }),
  476. $globals.Axolator);
  477. $core.addMethod(
  478. $core.method({
  479. selector: "model:read:",
  480. protocol: "action",
  481. fn: function (anEavModel,aBlock){
  482. var self=this,$self=this;
  483. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  484. return $core.withContext(function($ctx1) {
  485. //>>excludeEnd("ctx");
  486. $recv(aBlock)._value_($recv($recv(anEavModel)._on_(self))._deepCopy());
  487. return self;
  488. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  489. }, function($ctx1) {$ctx1.fill(self,"model:read:",{anEavModel:anEavModel,aBlock:aBlock},$globals.Axolator)});
  490. //>>excludeEnd("ctx");
  491. },
  492. //>>excludeStart("ide", pragmas.excludeIdeData);
  493. args: ["anEavModel", "aBlock"],
  494. source: "model: anEavModel read: aBlock\x0a\x0aaBlock value: (anEavModel on: self) deepCopy",
  495. referencedClasses: [],
  496. //>>excludeEnd("ide");
  497. messageSends: ["value:", "deepCopy", "on:"]
  498. }),
  499. $globals.Axolator);
  500. $core.addMethod(
  501. $core.method({
  502. selector: "root",
  503. protocol: "accessing",
  504. fn: function (){
  505. var self=this,$self=this;
  506. return $self["@root"];
  507. },
  508. //>>excludeStart("ide", pragmas.excludeIdeData);
  509. args: [],
  510. source: "root\x0a\x0a^root",
  511. referencedClasses: [],
  512. //>>excludeEnd("ide");
  513. messageSends: []
  514. }),
  515. $globals.Axolator);
  516. $core.addMethod(
  517. $core.method({
  518. selector: "root:",
  519. protocol: "accessing",
  520. fn: function (anObject){
  521. var self=this,$self=this;
  522. $self["@root"]=anObject;
  523. return self;
  524. },
  525. //>>excludeStart("ide", pragmas.excludeIdeData);
  526. args: ["anObject"],
  527. source: "root: anObject\x0a\x0aroot := anObject",
  528. referencedClasses: [],
  529. //>>excludeEnd("ide");
  530. messageSends: []
  531. }),
  532. $globals.Axolator);
  533. $core.addMethod(
  534. $core.method({
  535. selector: "on:",
  536. protocol: "instance creation",
  537. fn: function (anObject){
  538. var self=this,$self=this;
  539. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  540. return $core.withContext(function($ctx1) {
  541. //>>excludeEnd("ctx");
  542. return $recv($self._new())._root_(anObject);
  543. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  544. }, function($ctx1) {$ctx1.fill(self,"on:",{anObject:anObject},$globals.Axolator.a$cls)});
  545. //>>excludeEnd("ctx");
  546. },
  547. //>>excludeStart("ide", pragmas.excludeIdeData);
  548. args: ["anObject"],
  549. source: "on: anObject\x0a^self new root: anObject",
  550. referencedClasses: [],
  551. //>>excludeEnd("ide");
  552. messageSends: ["root:", "new"]
  553. }),
  554. $globals.Axolator.a$cls);
  555. $core.addClass("Axon", $globals.Object, ["factory"], "Axxord");
  556. //>>excludeStart("ide", pragmas.excludeIdeData);
  557. $globals.Axon.comment="I represent a pub-sub based on a key (called 'aspect').\x0aI manage aspect-block subscriptions (called 'interests') as well as run blocks of dirtied interests.\x0aThe interest objects are responsible of decision if the change of an aspect is relevant for them.\x0aInterest object must be subclasses of `AxonInterest`.\x0a\x0aMy subclasses must provide implementation for:\x0a\x0a - add:\x0a - do:\x0a - clean";
  558. //>>excludeEnd("ide");
  559. $core.addMethod(
  560. $core.method({
  561. selector: "add:",
  562. protocol: "primitive ops",
  563. fn: function (anInterest){
  564. var self=this,$self=this;
  565. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  566. return $core.withContext(function($ctx1) {
  567. //>>excludeEnd("ctx");
  568. $self._subclassResponsibility();
  569. return self;
  570. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  571. }, function($ctx1) {$ctx1.fill(self,"add:",{anInterest:anInterest},$globals.Axon)});
  572. //>>excludeEnd("ctx");
  573. },
  574. //>>excludeStart("ide", pragmas.excludeIdeData);
  575. args: ["anInterest"],
  576. source: "add: anInterest\x0a\x09self subclassResponsibility",
  577. referencedClasses: [],
  578. //>>excludeEnd("ide");
  579. messageSends: ["subclassResponsibility"]
  580. }),
  581. $globals.Axon);
  582. $core.addMethod(
  583. $core.method({
  584. selector: "addInterest:",
  585. protocol: "accessing",
  586. fn: function (anInterest){
  587. var self=this,$self=this;
  588. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  589. return $core.withContext(function($ctx1) {
  590. //>>excludeEnd("ctx");
  591. var $1;
  592. $recv(anInterest)._flag();
  593. $1=$recv(anInterest)._yourself();
  594. $self._add_($1);
  595. $self._dirty_(true);
  596. return self;
  597. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  598. }, function($ctx1) {$ctx1.fill(self,"addInterest:",{anInterest:anInterest},$globals.Axon)});
  599. //>>excludeEnd("ctx");
  600. },
  601. //>>excludeStart("ide", pragmas.excludeIdeData);
  602. args: ["anInterest"],
  603. source: "addInterest: anInterest\x0a\x09self\x0a\x09\x09add: (anInterest flag; yourself);\x0a\x09\x09dirty: true",
  604. referencedClasses: [],
  605. //>>excludeEnd("ide");
  606. messageSends: ["add:", "flag", "yourself", "dirty:"]
  607. }),
  608. $globals.Axon);
  609. $core.addMethod(
  610. $core.method({
  611. selector: "changed:",
  612. protocol: "change-update",
  613. fn: function (anAspect){
  614. var self=this,$self=this;
  615. var needsToRun;
  616. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  617. return $core.withContext(function($ctx1) {
  618. //>>excludeEnd("ctx");
  619. var $1;
  620. needsToRun=false;
  621. $self._do_((function(each){
  622. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  623. return $core.withContext(function($ctx2) {
  624. //>>excludeEnd("ctx");
  625. $1=$recv(each)._accepts_(anAspect);
  626. if($core.assert($1)){
  627. $recv(each)._flag();
  628. needsToRun=true;
  629. return needsToRun;
  630. }
  631. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  632. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  633. //>>excludeEnd("ctx");
  634. }));
  635. $self._dirty_(needsToRun);
  636. return self;
  637. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  638. }, function($ctx1) {$ctx1.fill(self,"changed:",{anAspect:anAspect,needsToRun:needsToRun},$globals.Axon)});
  639. //>>excludeEnd("ctx");
  640. },
  641. //>>excludeStart("ide", pragmas.excludeIdeData);
  642. args: ["anAspect"],
  643. source: "changed: anAspect\x0a\x09| needsToRun |\x0a\x09needsToRun := false.\x0a\x09self do: [ :each |\x0a\x09\x09(each accepts: anAspect) ifTrue: [\x0a\x09\x09\x09each flag.\x0a\x09\x09\x09needsToRun := true ]].\x0a\x09self dirty: needsToRun",
  644. referencedClasses: [],
  645. //>>excludeEnd("ide");
  646. messageSends: ["do:", "ifTrue:", "accepts:", "flag", "dirty:"]
  647. }),
  648. $globals.Axon);
  649. $core.addMethod(
  650. $core.method({
  651. selector: "changedAll",
  652. protocol: "change-update",
  653. fn: function (){
  654. var self=this,$self=this;
  655. var needsToRun;
  656. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  657. return $core.withContext(function($ctx1) {
  658. //>>excludeEnd("ctx");
  659. needsToRun=false;
  660. $self._do_((function(each){
  661. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  662. return $core.withContext(function($ctx2) {
  663. //>>excludeEnd("ctx");
  664. $recv(each)._flag();
  665. needsToRun=true;
  666. return needsToRun;
  667. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  668. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  669. //>>excludeEnd("ctx");
  670. }));
  671. $self._dirty_(needsToRun);
  672. return self;
  673. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  674. }, function($ctx1) {$ctx1.fill(self,"changedAll",{needsToRun:needsToRun},$globals.Axon)});
  675. //>>excludeEnd("ctx");
  676. },
  677. //>>excludeStart("ide", pragmas.excludeIdeData);
  678. args: [],
  679. source: "changedAll\x0a\x09| needsToRun |\x0a\x09needsToRun := false.\x0a\x09self do: [ :each |\x0a\x09\x09each flag.\x0a\x09\x09needsToRun := true ].\x0a\x09self dirty: needsToRun",
  680. referencedClasses: [],
  681. //>>excludeEnd("ide");
  682. messageSends: ["do:", "flag", "dirty:"]
  683. }),
  684. $globals.Axon);
  685. $core.addMethod(
  686. $core.method({
  687. selector: "clean",
  688. protocol: "primitive ops",
  689. fn: function (){
  690. var self=this,$self=this;
  691. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  692. return $core.withContext(function($ctx1) {
  693. //>>excludeEnd("ctx");
  694. $self._subclassResponsibility();
  695. return self;
  696. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  697. }, function($ctx1) {$ctx1.fill(self,"clean",{},$globals.Axon)});
  698. //>>excludeEnd("ctx");
  699. },
  700. //>>excludeStart("ide", pragmas.excludeIdeData);
  701. args: [],
  702. source: "clean\x0a\x09self subclassResponsibility",
  703. referencedClasses: [],
  704. //>>excludeEnd("ide");
  705. messageSends: ["subclassResponsibility"]
  706. }),
  707. $globals.Axon);
  708. $core.addMethod(
  709. $core.method({
  710. selector: "dirty:",
  711. protocol: "private",
  712. fn: function (aBoolean){
  713. var self=this,$self=this;
  714. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  715. return $core.withContext(function($ctx1) {
  716. //>>excludeEnd("ctx");
  717. if($core.assert(aBoolean)){
  718. $recv((function(){
  719. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  720. return $core.withContext(function($ctx2) {
  721. //>>excludeEnd("ctx");
  722. return $self._run();
  723. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  724. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  725. //>>excludeEnd("ctx");
  726. }))._fork();
  727. }
  728. return self;
  729. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  730. }, function($ctx1) {$ctx1.fill(self,"dirty:",{aBoolean:aBoolean},$globals.Axon)});
  731. //>>excludeEnd("ctx");
  732. },
  733. //>>excludeStart("ide", pragmas.excludeIdeData);
  734. args: ["aBoolean"],
  735. source: "dirty: aBoolean\x0a\x09aBoolean ifTrue: [[ self run ] fork]",
  736. referencedClasses: [],
  737. //>>excludeEnd("ide");
  738. messageSends: ["ifTrue:", "fork", "run"]
  739. }),
  740. $globals.Axon);
  741. $core.addMethod(
  742. $core.method({
  743. selector: "do:",
  744. protocol: "primitive ops",
  745. fn: function (aBlock){
  746. var self=this,$self=this;
  747. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  748. return $core.withContext(function($ctx1) {
  749. //>>excludeEnd("ctx");
  750. $self._subclassResponsibility();
  751. return self;
  752. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  753. }, function($ctx1) {$ctx1.fill(self,"do:",{aBlock:aBlock},$globals.Axon)});
  754. //>>excludeEnd("ctx");
  755. },
  756. //>>excludeStart("ide", pragmas.excludeIdeData);
  757. args: ["aBlock"],
  758. source: "do: aBlock\x0a\x09self subclassResponsibility",
  759. referencedClasses: [],
  760. //>>excludeEnd("ide");
  761. messageSends: ["subclassResponsibility"]
  762. }),
  763. $globals.Axon);
  764. $core.addMethod(
  765. $core.method({
  766. selector: "run",
  767. protocol: "private",
  768. fn: function (){
  769. var self=this,$self=this;
  770. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  771. return $core.withContext(function($ctx1) {
  772. //>>excludeEnd("ctx");
  773. var $1,$2,$3;
  774. $recv((function(){
  775. var needsClean;
  776. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  777. return $core.withContext(function($ctx2) {
  778. //>>excludeEnd("ctx");
  779. needsClean=false;
  780. needsClean;
  781. $self._do_((function(each){
  782. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  783. return $core.withContext(function($ctx3) {
  784. //>>excludeEnd("ctx");
  785. $1=$recv(each)._isFlagged();
  786. if($core.assert($1)){
  787. $recv(each)._run();
  788. }
  789. $2=$recv(each)._isClosed();
  790. if($core.assert($2)){
  791. needsClean=true;
  792. return needsClean;
  793. }
  794. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  795. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)});
  796. //>>excludeEnd("ctx");
  797. }));
  798. $3=needsClean;
  799. if($core.assert($3)){
  800. return $self._clean();
  801. }
  802. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  803. }, function($ctx2) {$ctx2.fillBlock({needsClean:needsClean},$ctx1,1)});
  804. //>>excludeEnd("ctx");
  805. }))._on_do_($globals.Error,(function(){
  806. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  807. return $core.withContext(function($ctx2) {
  808. //>>excludeEnd("ctx");
  809. return $self._dirty_(true);
  810. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  811. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,6)});
  812. //>>excludeEnd("ctx");
  813. }));
  814. return self;
  815. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  816. }, function($ctx1) {$ctx1.fill(self,"run",{},$globals.Axon)});
  817. //>>excludeEnd("ctx");
  818. },
  819. //>>excludeStart("ide", pragmas.excludeIdeData);
  820. args: [],
  821. source: "run\x0a\x09[\x0a\x09\x09| needsClean |\x0a\x09 needsClean := false.\x0a\x09\x09self do: [ :each |\x0a\x09\x09\x09each isFlagged ifTrue: [ each run ].\x0a\x09 each isClosed ifTrue: [ needsClean := true ]\x0a\x09\x09].\x0a \x09needsClean ifTrue: [ self clean ]\x0a\x09] on: Error do: [ self dirty: true ]",
  822. referencedClasses: ["Error"],
  823. //>>excludeEnd("ide");
  824. messageSends: ["on:do:", "do:", "ifTrue:", "isFlagged", "run", "isClosed", "clean", "dirty:"]
  825. }),
  826. $globals.Axon);
  827. $core.addClass("SimpleAxon", $globals.Axon, ["queue"], "Axxord");
  828. $core.addMethod(
  829. $core.method({
  830. selector: "add:",
  831. protocol: "primitive ops",
  832. fn: function (aSubscription){
  833. var self=this,$self=this;
  834. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  835. return $core.withContext(function($ctx1) {
  836. //>>excludeEnd("ctx");
  837. $recv($self["@queue"])._add_(aSubscription);
  838. return self;
  839. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  840. }, function($ctx1) {$ctx1.fill(self,"add:",{aSubscription:aSubscription},$globals.SimpleAxon)});
  841. //>>excludeEnd("ctx");
  842. },
  843. //>>excludeStart("ide", pragmas.excludeIdeData);
  844. args: ["aSubscription"],
  845. source: "add: aSubscription\x0a\x09queue add: aSubscription.",
  846. referencedClasses: [],
  847. //>>excludeEnd("ide");
  848. messageSends: ["add:"]
  849. }),
  850. $globals.SimpleAxon);
  851. $core.addMethod(
  852. $core.method({
  853. selector: "clean",
  854. protocol: "primitive ops",
  855. fn: function (){
  856. var self=this,$self=this;
  857. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  858. return $core.withContext(function($ctx1) {
  859. //>>excludeEnd("ctx");
  860. $self["@queue"]=$recv($self["@queue"])._reject_((function(each){
  861. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  862. return $core.withContext(function($ctx2) {
  863. //>>excludeEnd("ctx");
  864. return $recv(each)._isClosed();
  865. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  866. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  867. //>>excludeEnd("ctx");
  868. }));
  869. return self;
  870. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  871. }, function($ctx1) {$ctx1.fill(self,"clean",{},$globals.SimpleAxon)});
  872. //>>excludeEnd("ctx");
  873. },
  874. //>>excludeStart("ide", pragmas.excludeIdeData);
  875. args: [],
  876. source: "clean\x0a\x09queue := queue reject: [ :each | each isClosed ]",
  877. referencedClasses: [],
  878. //>>excludeEnd("ide");
  879. messageSends: ["reject:", "isClosed"]
  880. }),
  881. $globals.SimpleAxon);
  882. $core.addMethod(
  883. $core.method({
  884. selector: "do:",
  885. protocol: "primitive ops",
  886. fn: function (aBlock){
  887. var self=this,$self=this;
  888. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  889. return $core.withContext(function($ctx1) {
  890. //>>excludeEnd("ctx");
  891. $recv($self["@queue"])._do_(aBlock);
  892. return self;
  893. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  894. }, function($ctx1) {$ctx1.fill(self,"do:",{aBlock:aBlock},$globals.SimpleAxon)});
  895. //>>excludeEnd("ctx");
  896. },
  897. //>>excludeStart("ide", pragmas.excludeIdeData);
  898. args: ["aBlock"],
  899. source: "do: aBlock\x0a\x09queue do: aBlock",
  900. referencedClasses: [],
  901. //>>excludeEnd("ide");
  902. messageSends: ["do:"]
  903. }),
  904. $globals.SimpleAxon);
  905. $core.addMethod(
  906. $core.method({
  907. selector: "initialize",
  908. protocol: "initialization",
  909. fn: function (){
  910. var self=this,$self=this;
  911. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  912. return $core.withContext(function($ctx1) {
  913. //>>excludeEnd("ctx");
  914. (
  915. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  916. $ctx1.supercall = true,
  917. //>>excludeEnd("ctx");
  918. ($globals.SimpleAxon.superclass||$boot.nilAsClass).fn.prototype._initialize.apply($self, []));
  919. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  920. $ctx1.supercall = false;
  921. //>>excludeEnd("ctx");;
  922. $self["@queue"]=$recv($globals.OrderedCollection)._new();
  923. return self;
  924. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  925. }, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.SimpleAxon)});
  926. //>>excludeEnd("ctx");
  927. },
  928. //>>excludeStart("ide", pragmas.excludeIdeData);
  929. args: [],
  930. source: "initialize\x0a super initialize.\x0a\x09queue := OrderedCollection new",
  931. referencedClasses: ["OrderedCollection"],
  932. //>>excludeEnd("ide");
  933. messageSends: ["initialize", "new"]
  934. }),
  935. $globals.SimpleAxon);
  936. $core.addClass("AxonInterest", $globals.Object, ["flagged"], "Axxord");
  937. $core.addMethod(
  938. $core.method({
  939. selector: "accepts:",
  940. protocol: "testing",
  941. fn: function (anAspect){
  942. var self=this,$self=this;
  943. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  944. return $core.withContext(function($ctx1) {
  945. //>>excludeEnd("ctx");
  946. $self._subclassResponsibility();
  947. return self;
  948. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  949. }, function($ctx1) {$ctx1.fill(self,"accepts:",{anAspect:anAspect},$globals.AxonInterest)});
  950. //>>excludeEnd("ctx");
  951. },
  952. //>>excludeStart("ide", pragmas.excludeIdeData);
  953. args: ["anAspect"],
  954. source: "accepts: anAspect\x0a \x22Should return true if change for anAspect is relevant for this AxonInterest\x22\x0a self subclassResponsibility",
  955. referencedClasses: [],
  956. //>>excludeEnd("ide");
  957. messageSends: ["subclassResponsibility"]
  958. }),
  959. $globals.AxonInterest);
  960. $core.addMethod(
  961. $core.method({
  962. selector: "close",
  963. protocol: "action",
  964. fn: function (){
  965. var self=this,$self=this;
  966. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  967. return $core.withContext(function($ctx1) {
  968. //>>excludeEnd("ctx");
  969. $self._subclassResponsibility();
  970. return self;
  971. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  972. }, function($ctx1) {$ctx1.fill(self,"close",{},$globals.AxonInterest)});
  973. //>>excludeEnd("ctx");
  974. },
  975. //>>excludeStart("ide", pragmas.excludeIdeData);
  976. args: [],
  977. source: "close\x0a\x09self subclassResponsibility",
  978. referencedClasses: [],
  979. //>>excludeEnd("ide");
  980. messageSends: ["subclassResponsibility"]
  981. }),
  982. $globals.AxonInterest);
  983. $core.addMethod(
  984. $core.method({
  985. selector: "enact",
  986. protocol: "action",
  987. fn: function (){
  988. var self=this,$self=this;
  989. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  990. return $core.withContext(function($ctx1) {
  991. //>>excludeEnd("ctx");
  992. $self._subclassResponsibility();
  993. return self;
  994. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  995. }, function($ctx1) {$ctx1.fill(self,"enact",{},$globals.AxonInterest)});
  996. //>>excludeEnd("ctx");
  997. },
  998. //>>excludeStart("ide", pragmas.excludeIdeData);
  999. args: [],
  1000. source: "enact\x0a\x09self subclassResponsibility",
  1001. referencedClasses: [],
  1002. //>>excludeEnd("ide");
  1003. messageSends: ["subclassResponsibility"]
  1004. }),
  1005. $globals.AxonInterest);
  1006. $core.addMethod(
  1007. $core.method({
  1008. selector: "flag",
  1009. protocol: "accessing",
  1010. fn: function (){
  1011. var self=this,$self=this;
  1012. $self["@flagged"]=true;
  1013. return self;
  1014. },
  1015. //>>excludeStart("ide", pragmas.excludeIdeData);
  1016. args: [],
  1017. source: "flag\x0a\x09flagged := true",
  1018. referencedClasses: [],
  1019. //>>excludeEnd("ide");
  1020. messageSends: []
  1021. }),
  1022. $globals.AxonInterest);
  1023. $core.addMethod(
  1024. $core.method({
  1025. selector: "initialize",
  1026. protocol: "initialization",
  1027. fn: function (){
  1028. var self=this,$self=this;
  1029. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1030. return $core.withContext(function($ctx1) {
  1031. //>>excludeEnd("ctx");
  1032. (
  1033. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1034. $ctx1.supercall = true,
  1035. //>>excludeEnd("ctx");
  1036. ($globals.AxonInterest.superclass||$boot.nilAsClass).fn.prototype._initialize.apply($self, []));
  1037. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1038. $ctx1.supercall = false;
  1039. //>>excludeEnd("ctx");;
  1040. $self["@flagged"]=false;
  1041. return self;
  1042. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1043. }, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.AxonInterest)});
  1044. //>>excludeEnd("ctx");
  1045. },
  1046. //>>excludeStart("ide", pragmas.excludeIdeData);
  1047. args: [],
  1048. source: "initialize\x0a\x09super initialize.\x0a flagged := false.",
  1049. referencedClasses: [],
  1050. //>>excludeEnd("ide");
  1051. messageSends: ["initialize"]
  1052. }),
  1053. $globals.AxonInterest);
  1054. $core.addMethod(
  1055. $core.method({
  1056. selector: "isClosed",
  1057. protocol: "testing",
  1058. fn: function (){
  1059. var self=this,$self=this;
  1060. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1061. return $core.withContext(function($ctx1) {
  1062. //>>excludeEnd("ctx");
  1063. $self._subclassResponsibility();
  1064. return self;
  1065. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1066. }, function($ctx1) {$ctx1.fill(self,"isClosed",{},$globals.AxonInterest)});
  1067. //>>excludeEnd("ctx");
  1068. },
  1069. //>>excludeStart("ide", pragmas.excludeIdeData);
  1070. args: [],
  1071. source: "isClosed\x0a\x09self subclassResponsibility",
  1072. referencedClasses: [],
  1073. //>>excludeEnd("ide");
  1074. messageSends: ["subclassResponsibility"]
  1075. }),
  1076. $globals.AxonInterest);
  1077. $core.addMethod(
  1078. $core.method({
  1079. selector: "isFlagged",
  1080. protocol: "testing",
  1081. fn: function (){
  1082. var self=this,$self=this;
  1083. return $self["@flagged"];
  1084. },
  1085. //>>excludeStart("ide", pragmas.excludeIdeData);
  1086. args: [],
  1087. source: "isFlagged\x0a\x09^flagged",
  1088. referencedClasses: [],
  1089. //>>excludeEnd("ide");
  1090. messageSends: []
  1091. }),
  1092. $globals.AxonInterest);
  1093. $core.addMethod(
  1094. $core.method({
  1095. selector: "run",
  1096. protocol: "action",
  1097. fn: function (){
  1098. var self=this,$self=this;
  1099. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1100. return $core.withContext(function($ctx1) {
  1101. //>>excludeEnd("ctx");
  1102. $recv((function(){
  1103. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1104. return $core.withContext(function($ctx2) {
  1105. //>>excludeEnd("ctx");
  1106. $self["@flagged"]=false;
  1107. $self["@flagged"];
  1108. return $self._enact();
  1109. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1110. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1111. //>>excludeEnd("ctx");
  1112. }))._on_do_($globals.AxonOff,(function(){
  1113. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1114. return $core.withContext(function($ctx2) {
  1115. //>>excludeEnd("ctx");
  1116. return $self._close();
  1117. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1118. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  1119. //>>excludeEnd("ctx");
  1120. }));
  1121. return self;
  1122. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1123. }, function($ctx1) {$ctx1.fill(self,"run",{},$globals.AxonInterest)});
  1124. //>>excludeEnd("ctx");
  1125. },
  1126. //>>excludeStart("ide", pragmas.excludeIdeData);
  1127. args: [],
  1128. source: "run\x0a\x09[ flagged := false. self enact ]\x0a on: AxonOff do: [ self close ]",
  1129. referencedClasses: ["AxonOff"],
  1130. //>>excludeEnd("ide");
  1131. messageSends: ["on:do:", "enact", "close"]
  1132. }),
  1133. $globals.AxonInterest);
  1134. $core.addClass("PluggableInterest", $globals.AxonInterest, ["acceptBlock", "enactBlock"], "Axxord");
  1135. $core.addMethod(
  1136. $core.method({
  1137. selector: "accept:enact:",
  1138. protocol: "accessing",
  1139. fn: function (aBlock,anotherBlock){
  1140. var self=this,$self=this;
  1141. $self["@acceptBlock"]=aBlock;
  1142. $self["@enactBlock"]=anotherBlock;
  1143. return self;
  1144. },
  1145. //>>excludeStart("ide", pragmas.excludeIdeData);
  1146. args: ["aBlock", "anotherBlock"],
  1147. source: "accept: aBlock enact: anotherBlock\x0a\x09acceptBlock := aBlock.\x0a enactBlock := anotherBlock",
  1148. referencedClasses: [],
  1149. //>>excludeEnd("ide");
  1150. messageSends: []
  1151. }),
  1152. $globals.PluggableInterest);
  1153. $core.addMethod(
  1154. $core.method({
  1155. selector: "accepts:",
  1156. protocol: "testing",
  1157. fn: function (anAspect){
  1158. var self=this,$self=this;
  1159. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1160. return $core.withContext(function($ctx1) {
  1161. //>>excludeEnd("ctx");
  1162. return $recv($self["@acceptBlock"])._value_(anAspect);
  1163. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1164. }, function($ctx1) {$ctx1.fill(self,"accepts:",{anAspect:anAspect},$globals.PluggableInterest)});
  1165. //>>excludeEnd("ctx");
  1166. },
  1167. //>>excludeStart("ide", pragmas.excludeIdeData);
  1168. args: ["anAspect"],
  1169. source: "accepts: anAspect\x0a ^ acceptBlock value: anAspect",
  1170. referencedClasses: [],
  1171. //>>excludeEnd("ide");
  1172. messageSends: ["value:"]
  1173. }),
  1174. $globals.PluggableInterest);
  1175. $core.addMethod(
  1176. $core.method({
  1177. selector: "close",
  1178. protocol: "action",
  1179. fn: function (){
  1180. var self=this,$self=this;
  1181. $self["@acceptBlock"]=nil;
  1182. $self["@enactBlock"]=nil;
  1183. return self;
  1184. },
  1185. //>>excludeStart("ide", pragmas.excludeIdeData);
  1186. args: [],
  1187. source: "close\x0a\x09acceptBlock := nil.\x0a\x09enactBlock := nil",
  1188. referencedClasses: [],
  1189. //>>excludeEnd("ide");
  1190. messageSends: []
  1191. }),
  1192. $globals.PluggableInterest);
  1193. $core.addMethod(
  1194. $core.method({
  1195. selector: "enact",
  1196. protocol: "action",
  1197. fn: function (){
  1198. var self=this,$self=this;
  1199. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1200. return $core.withContext(function($ctx1) {
  1201. //>>excludeEnd("ctx");
  1202. $recv($self["@enactBlock"])._value();
  1203. return self;
  1204. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1205. }, function($ctx1) {$ctx1.fill(self,"enact",{},$globals.PluggableInterest)});
  1206. //>>excludeEnd("ctx");
  1207. },
  1208. //>>excludeStart("ide", pragmas.excludeIdeData);
  1209. args: [],
  1210. source: "enact\x0a\x09enactBlock value",
  1211. referencedClasses: [],
  1212. //>>excludeEnd("ide");
  1213. messageSends: ["value"]
  1214. }),
  1215. $globals.PluggableInterest);
  1216. $core.addMethod(
  1217. $core.method({
  1218. selector: "initialize",
  1219. protocol: "initialization",
  1220. fn: function (){
  1221. var self=this,$self=this;
  1222. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1223. return $core.withContext(function($ctx1) {
  1224. //>>excludeEnd("ctx");
  1225. (
  1226. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1227. $ctx1.supercall = true,
  1228. //>>excludeEnd("ctx");
  1229. ($globals.PluggableInterest.superclass||$boot.nilAsClass).fn.prototype._initialize.apply($self, []));
  1230. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1231. $ctx1.supercall = false;
  1232. //>>excludeEnd("ctx");;
  1233. $self._close();
  1234. return self;
  1235. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1236. }, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.PluggableInterest)});
  1237. //>>excludeEnd("ctx");
  1238. },
  1239. //>>excludeStart("ide", pragmas.excludeIdeData);
  1240. args: [],
  1241. source: "initialize\x0a\x09super initialize.\x0a self close",
  1242. referencedClasses: [],
  1243. //>>excludeEnd("ide");
  1244. messageSends: ["initialize", "close"]
  1245. }),
  1246. $globals.PluggableInterest);
  1247. $core.addMethod(
  1248. $core.method({
  1249. selector: "isClosed",
  1250. protocol: "testing",
  1251. fn: function (){
  1252. var self=this,$self=this;
  1253. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1254. return $core.withContext(function($ctx1) {
  1255. //>>excludeEnd("ctx");
  1256. return $recv($self["@acceptBlock"])._isNil();
  1257. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1258. }, function($ctx1) {$ctx1.fill(self,"isClosed",{},$globals.PluggableInterest)});
  1259. //>>excludeEnd("ctx");
  1260. },
  1261. //>>excludeStart("ide", pragmas.excludeIdeData);
  1262. args: [],
  1263. source: "isClosed\x0a\x09^ acceptBlock isNil",
  1264. referencedClasses: [],
  1265. //>>excludeEnd("ide");
  1266. messageSends: ["isNil"]
  1267. }),
  1268. $globals.PluggableInterest);
  1269. $core.addClass("AxonOff", $globals.Error, [], "Axxord");
  1270. //>>excludeStart("ide", pragmas.excludeIdeData);
  1271. $globals.AxonOff.comment="Signal me from the subscription block to unsubscribe it.";
  1272. //>>excludeEnd("ide");
  1273. $core.addMethod(
  1274. $core.method({
  1275. selector: "asAxisIn:ifAbsent:",
  1276. protocol: "*Axxord",
  1277. fn: function (anObject,aBlock){
  1278. var self=this,$self=this;
  1279. var receiver,selector,result;
  1280. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1281. return $core.withContext(function($ctx1) {
  1282. //>>excludeEnd("ctx");
  1283. var $5,$4,$3,$2,$1;
  1284. var $early={};
  1285. try {
  1286. selector=$self._first();
  1287. receiver=$recv(anObject)._yourself();
  1288. $recv((function(){
  1289. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1290. return $core.withContext(function($ctx2) {
  1291. //>>excludeEnd("ctx");
  1292. result=$recv(receiver)._perform_(selector);
  1293. return result;
  1294. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1295. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1296. //>>excludeEnd("ctx");
  1297. }))._on_do_($globals.MessageNotUnderstood,(function(mnu){
  1298. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1299. return $core.withContext(function($ctx2) {
  1300. //>>excludeEnd("ctx");
  1301. $5=$recv(mnu)._message();
  1302. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1303. $ctx2.sendIdx["message"]=1;
  1304. //>>excludeEnd("ctx");
  1305. $4=$recv($5)._selector();
  1306. $3=$recv($4).__eq(selector);
  1307. $2=$recv($3)._and_((function(){
  1308. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1309. return $core.withContext(function($ctx3) {
  1310. //>>excludeEnd("ctx");
  1311. return $recv($recv(mnu)._receiver()).__eq_eq(receiver);
  1312. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1313. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  1314. //>>excludeEnd("ctx");
  1315. }));
  1316. $1=$recv($2)._and_((function(){
  1317. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1318. return $core.withContext(function($ctx3) {
  1319. //>>excludeEnd("ctx");
  1320. return $recv($recv($recv(mnu)._message())._arguments())._isEmpty();
  1321. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1322. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)});
  1323. //>>excludeEnd("ctx");
  1324. }));
  1325. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1326. $ctx2.sendIdx["and:"]=1;
  1327. //>>excludeEnd("ctx");
  1328. if(!$core.assert($1)){
  1329. $recv(mnu)._resignal();
  1330. }
  1331. throw $early=[$recv(aBlock)._value()];
  1332. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1333. }, function($ctx2) {$ctx2.fillBlock({mnu:mnu},$ctx1,2)});
  1334. //>>excludeEnd("ctx");
  1335. }));
  1336. return result;
  1337. }
  1338. catch(e) {if(e===$early)return e[0]; throw e}
  1339. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1340. }, function($ctx1) {$ctx1.fill(self,"asAxisIn:ifAbsent:",{anObject:anObject,aBlock:aBlock,receiver:receiver,selector:selector,result:result},$globals.Array)});
  1341. //>>excludeEnd("ctx");
  1342. },
  1343. //>>excludeStart("ide", pragmas.excludeIdeData);
  1344. args: ["anObject", "aBlock"],
  1345. source: "asAxisIn: anObject ifAbsent: aBlock\x0a\x09| receiver selector result |\x0a\x09selector := self first.\x0a\x09receiver := anObject yourself. \x22JSObjectProxy hack\x22\x0a\x09\x0a\x09[ result := receiver perform: selector ]\x0a\x09on: MessageNotUnderstood do: [ :mnu |\x0a\x09\x09((mnu message selector = selector\x0a\x09\x09\x09and: [ mnu receiver == receiver ])\x0a\x09\x09\x09and: [ mnu message arguments isEmpty ])\x0a\x09\x09\x09ifFalse: [ mnu resignal ].\x0a\x09\x09^ aBlock value ].\x0a\x09^ result",
  1346. referencedClasses: ["MessageNotUnderstood"],
  1347. //>>excludeEnd("ide");
  1348. messageSends: ["first", "yourself", "on:do:", "perform:", "ifFalse:", "and:", "=", "selector", "message", "==", "receiver", "isEmpty", "arguments", "resignal", "value"]
  1349. }),
  1350. $globals.Array);
  1351. $core.addMethod(
  1352. $core.method({
  1353. selector: "asAxisIn:ifAbsent:put:",
  1354. protocol: "*Axxord",
  1355. fn: function (anObject,aBlock,anotherObject){
  1356. var self=this,$self=this;
  1357. var receiver,selector,arguments_,result;
  1358. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1359. return $core.withContext(function($ctx1) {
  1360. //>>excludeEnd("ctx");
  1361. var $5,$4,$3,$2,$1;
  1362. var $early={};
  1363. try {
  1364. selector=$recv($self._first())._asMutator();
  1365. receiver=$recv(anObject)._yourself();
  1366. arguments_=[anotherObject];
  1367. $recv((function(){
  1368. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1369. return $core.withContext(function($ctx2) {
  1370. //>>excludeEnd("ctx");
  1371. result=$recv(receiver)._perform_withArguments_(selector,arguments_);
  1372. return result;
  1373. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1374. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1375. //>>excludeEnd("ctx");
  1376. }))._on_do_($globals.MessageNotUnderstood,(function(mnu){
  1377. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1378. return $core.withContext(function($ctx2) {
  1379. //>>excludeEnd("ctx");
  1380. $5=$recv(mnu)._message();
  1381. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1382. $ctx2.sendIdx["message"]=1;
  1383. //>>excludeEnd("ctx");
  1384. $4=$recv($5)._selector();
  1385. $3=$recv($4).__eq(selector);
  1386. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1387. $ctx2.sendIdx["="]=1;
  1388. //>>excludeEnd("ctx");
  1389. $2=$recv($3)._and_((function(){
  1390. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1391. return $core.withContext(function($ctx3) {
  1392. //>>excludeEnd("ctx");
  1393. return $recv($recv(mnu)._receiver()).__eq_eq(receiver);
  1394. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1395. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  1396. //>>excludeEnd("ctx");
  1397. }));
  1398. $1=$recv($2)._and_((function(){
  1399. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1400. return $core.withContext(function($ctx3) {
  1401. //>>excludeEnd("ctx");
  1402. return $recv($recv($recv(mnu)._message())._arguments()).__eq(arguments_);
  1403. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1404. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)});
  1405. //>>excludeEnd("ctx");
  1406. }));
  1407. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1408. $ctx2.sendIdx["and:"]=1;
  1409. //>>excludeEnd("ctx");
  1410. if(!$core.assert($1)){
  1411. $recv(mnu)._resignal();
  1412. }
  1413. throw $early=[$recv(aBlock)._value()];
  1414. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1415. }, function($ctx2) {$ctx2.fillBlock({mnu:mnu},$ctx1,2)});
  1416. //>>excludeEnd("ctx");
  1417. }));
  1418. return result;
  1419. }
  1420. catch(e) {if(e===$early)return e[0]; throw e}
  1421. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1422. }, function($ctx1) {$ctx1.fill(self,"asAxisIn:ifAbsent:put:",{anObject:anObject,aBlock:aBlock,anotherObject:anotherObject,receiver:receiver,selector:selector,arguments_:arguments_,result:result},$globals.Array)});
  1423. //>>excludeEnd("ctx");
  1424. },
  1425. //>>excludeStart("ide", pragmas.excludeIdeData);
  1426. args: ["anObject", "aBlock", "anotherObject"],
  1427. source: "asAxisIn: anObject ifAbsent: aBlock put: anotherObject\x0a\x09| receiver selector arguments result |\x0a\x09selector := self first asMutator.\x0a\x09receiver := anObject yourself. \x22JSObjectProxy hack\x22\x0a\x09arguments := { anotherObject }.\x0a\x09\x0a\x09[ result := receiver perform: selector withArguments: arguments ]\x0a\x09on: MessageNotUnderstood do: [ :mnu |\x0a\x09\x09((mnu message selector = selector\x0a\x09\x09\x09and: [ mnu receiver == receiver ])\x0a\x09\x09\x09and: [ mnu message arguments = arguments ])\x0a\x09\x09\x09ifFalse: [ mnu resignal ].\x0a\x09\x09^ aBlock value ].\x0a\x09^ result",
  1428. referencedClasses: ["MessageNotUnderstood"],
  1429. //>>excludeEnd("ide");
  1430. messageSends: ["asMutator", "first", "yourself", "on:do:", "perform:withArguments:", "ifFalse:", "and:", "=", "selector", "message", "==", "receiver", "arguments", "resignal", "value"]
  1431. }),
  1432. $globals.Array);
  1433. $core.addMethod(
  1434. $core.method({
  1435. selector: "asAxisIn:ifAbsent:",
  1436. protocol: "*Axxord",
  1437. fn: function (anObject,aBlock){
  1438. var self=this,$self=this;
  1439. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1440. return $core.withContext(function($ctx1) {
  1441. //>>excludeEnd("ctx");
  1442. return $recv(aBlock)._value();
  1443. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1444. }, function($ctx1) {$ctx1.fill(self,"asAxisIn:ifAbsent:",{anObject:anObject,aBlock:aBlock},$globals.JSObjectProxy)});
  1445. //>>excludeEnd("ctx");
  1446. },
  1447. //>>excludeStart("ide", pragmas.excludeIdeData);
  1448. args: ["anObject", "aBlock"],
  1449. source: "asAxisIn: anObject ifAbsent: aBlock\x0a\x09^ aBlock value",
  1450. referencedClasses: [],
  1451. //>>excludeEnd("ide");
  1452. messageSends: ["value"]
  1453. }),
  1454. $globals.JSObjectProxy);
  1455. $core.addMethod(
  1456. $core.method({
  1457. selector: "asAxisIn:ifAbsent:put:",
  1458. protocol: "*Axxord",
  1459. fn: function (anObject,aBlock,anotherObject){
  1460. var self=this,$self=this;
  1461. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1462. return $core.withContext(function($ctx1) {
  1463. //>>excludeEnd("ctx");
  1464. return $recv(aBlock)._value();
  1465. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1466. }, function($ctx1) {$ctx1.fill(self,"asAxisIn:ifAbsent:put:",{anObject:anObject,aBlock:aBlock,anotherObject:anotherObject},$globals.JSObjectProxy)});
  1467. //>>excludeEnd("ctx");
  1468. },
  1469. //>>excludeStart("ide", pragmas.excludeIdeData);
  1470. args: ["anObject", "aBlock", "anotherObject"],
  1471. source: "asAxisIn: anObject ifAbsent: aBlock put: anotherObject\x0a\x09^ aBlock value",
  1472. referencedClasses: [],
  1473. //>>excludeEnd("ide");
  1474. messageSends: ["value"]
  1475. }),
  1476. $globals.JSObjectProxy);
  1477. $core.addMethod(
  1478. $core.method({
  1479. selector: "atAxes:ifAbsent:",
  1480. protocol: "*Axxord",
  1481. fn: function (aCollection,aBlock){
  1482. var self=this,$self=this;
  1483. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1484. return $core.withContext(function($ctx1) {
  1485. //>>excludeEnd("ctx");
  1486. return $recv($globals.Axes)._on_at_ifAbsent_(self,aCollection,aBlock);
  1487. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1488. }, function($ctx1) {$ctx1.fill(self,"atAxes:ifAbsent:",{aCollection:aCollection,aBlock:aBlock},$globals.JSObjectProxy)});
  1489. //>>excludeEnd("ctx");
  1490. },
  1491. //>>excludeStart("ide", pragmas.excludeIdeData);
  1492. args: ["aCollection", "aBlock"],
  1493. source: "atAxes: aCollection ifAbsent: aBlock\x0a\x09^ Axes on: self at: aCollection ifAbsent: aBlock",
  1494. referencedClasses: ["Axes"],
  1495. //>>excludeEnd("ide");
  1496. messageSends: ["on:at:ifAbsent:"]
  1497. }),
  1498. $globals.JSObjectProxy);
  1499. $core.addMethod(
  1500. $core.method({
  1501. selector: "atAxes:ifAbsent:put:",
  1502. protocol: "*Axxord",
  1503. fn: function (aCollection,aBlock,value){
  1504. var self=this,$self=this;
  1505. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1506. return $core.withContext(function($ctx1) {
  1507. //>>excludeEnd("ctx");
  1508. return $recv($globals.Axes)._on_at_ifAbsent_put_(self,aCollection,aBlock,value);
  1509. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1510. }, function($ctx1) {$ctx1.fill(self,"atAxes:ifAbsent:put:",{aCollection:aCollection,aBlock:aBlock,value:value},$globals.JSObjectProxy)});
  1511. //>>excludeEnd("ctx");
  1512. },
  1513. //>>excludeStart("ide", pragmas.excludeIdeData);
  1514. args: ["aCollection", "aBlock", "value"],
  1515. source: "atAxes: aCollection ifAbsent: aBlock put: value\x0a\x09^ Axes on: self at: aCollection ifAbsent: aBlock put: value",
  1516. referencedClasses: ["Axes"],
  1517. //>>excludeEnd("ide");
  1518. messageSends: ["on:at:ifAbsent:put:"]
  1519. }),
  1520. $globals.JSObjectProxy);
  1521. $core.addMethod(
  1522. $core.method({
  1523. selector: "axes:consume:",
  1524. protocol: "*Axxord",
  1525. fn: function (aCollection,aBlock){
  1526. var self=this,$self=this;
  1527. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1528. return $core.withContext(function($ctx1) {
  1529. //>>excludeEnd("ctx");
  1530. return $recv($globals.Axes)._on_at_consume_(self,aCollection,aBlock);
  1531. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1532. }, function($ctx1) {$ctx1.fill(self,"axes:consume:",{aCollection:aCollection,aBlock:aBlock},$globals.JSObjectProxy)});
  1533. //>>excludeEnd("ctx");
  1534. },
  1535. //>>excludeStart("ide", pragmas.excludeIdeData);
  1536. args: ["aCollection", "aBlock"],
  1537. source: "axes: aCollection consume: aBlock\x0a\x09^ Axes on: self at: aCollection consume: aBlock",
  1538. referencedClasses: ["Axes"],
  1539. //>>excludeEnd("ide");
  1540. messageSends: ["on:at:consume:"]
  1541. }),
  1542. $globals.JSObjectProxy);
  1543. $core.addMethod(
  1544. $core.method({
  1545. selector: "axes:transform:",
  1546. protocol: "*Axxord",
  1547. fn: function (aCollection,aBlock){
  1548. var self=this,$self=this;
  1549. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1550. return $core.withContext(function($ctx1) {
  1551. //>>excludeEnd("ctx");
  1552. return $recv($globals.Axes)._on_at_transform_(self,aCollection,aBlock);
  1553. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1554. }, function($ctx1) {$ctx1.fill(self,"axes:transform:",{aCollection:aCollection,aBlock:aBlock},$globals.JSObjectProxy)});
  1555. //>>excludeEnd("ctx");
  1556. },
  1557. //>>excludeStart("ide", pragmas.excludeIdeData);
  1558. args: ["aCollection", "aBlock"],
  1559. source: "axes: aCollection transform: aBlock\x0a\x09^ Axes on: self at: aCollection transform: aBlock",
  1560. referencedClasses: ["Axes"],
  1561. //>>excludeEnd("ide");
  1562. messageSends: ["on:at:transform:"]
  1563. }),
  1564. $globals.JSObjectProxy);
  1565. $core.addMethod(
  1566. $core.method({
  1567. selector: "axxord",
  1568. protocol: "*Axxord",
  1569. fn: function (){
  1570. var self=this,$self=this;
  1571. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1572. return $core.withContext(function($ctx1) {
  1573. //>>excludeEnd("ctx");
  1574. return $self["@jsObject"].$axxord$;
  1575. return self;
  1576. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1577. }, function($ctx1) {$ctx1.fill(self,"axxord",{},$globals.JSObjectProxy)});
  1578. //>>excludeEnd("ctx");
  1579. },
  1580. //>>excludeStart("ide", pragmas.excludeIdeData);
  1581. args: [],
  1582. source: "axxord\x0a<inlineJS: 'return $self[\x22@jsObject\x22].$axxord$'>",
  1583. referencedClasses: [],
  1584. //>>excludeEnd("ide");
  1585. messageSends: []
  1586. }),
  1587. $globals.JSObjectProxy);
  1588. $core.addMethod(
  1589. $core.method({
  1590. selector: "axxord:",
  1591. protocol: "*Axxord",
  1592. fn: function (anAxon){
  1593. var self=this,$self=this;
  1594. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1595. return $core.withContext(function($ctx1) {
  1596. //>>excludeEnd("ctx");
  1597. $self["@jsObject"].$axxord$ = anAxon;
  1598. return self;
  1599. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1600. }, function($ctx1) {$ctx1.fill(self,"axxord:",{anAxon:anAxon},$globals.JSObjectProxy)});
  1601. //>>excludeEnd("ctx");
  1602. },
  1603. //>>excludeStart("ide", pragmas.excludeIdeData);
  1604. args: ["anAxon"],
  1605. source: "axxord: anAxon\x0a<inlineJS: '$self[\x22@jsObject\x22].$axxord$ = anAxon'>",
  1606. referencedClasses: [],
  1607. //>>excludeEnd("ide");
  1608. messageSends: []
  1609. }),
  1610. $globals.JSObjectProxy);
  1611. $core.addMethod(
  1612. $core.method({
  1613. selector: "asAxisIn:ifAbsent:",
  1614. protocol: "*Axxord",
  1615. fn: function (anObject,aBlock){
  1616. var self=this,$self=this;
  1617. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1618. return $core.withContext(function($ctx1) {
  1619. //>>excludeEnd("ctx");
  1620. var $1;
  1621. var $early={};
  1622. try {
  1623. $1=$recv(anObject)._respondsTo_("at:ifAbsent:");
  1624. $recv($1)._ifTrue_ifFalse_((function(){
  1625. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1626. return $core.withContext(function($ctx2) {
  1627. //>>excludeEnd("ctx");
  1628. throw $early=[$recv(anObject)._at_ifAbsent_(self,aBlock)];
  1629. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1630. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1631. //>>excludeEnd("ctx");
  1632. }),aBlock);
  1633. return self;
  1634. }
  1635. catch(e) {if(e===$early)return e[0]; throw e}
  1636. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1637. }, function($ctx1) {$ctx1.fill(self,"asAxisIn:ifAbsent:",{anObject:anObject,aBlock:aBlock},$globals.Number)});
  1638. //>>excludeEnd("ctx");
  1639. },
  1640. //>>excludeStart("ide", pragmas.excludeIdeData);
  1641. args: ["anObject", "aBlock"],
  1642. source: "asAxisIn: anObject ifAbsent: aBlock\x0a\x09(anObject respondsTo: #at:ifAbsent:)\x0a\x09\x09ifTrue: [ ^ anObject at: self ifAbsent: aBlock ]\x0a\x09\x09ifFalse: aBlock",
  1643. referencedClasses: [],
  1644. //>>excludeEnd("ide");
  1645. messageSends: ["ifTrue:ifFalse:", "respondsTo:", "at:ifAbsent:"]
  1646. }),
  1647. $globals.Number);
  1648. $core.addMethod(
  1649. $core.method({
  1650. selector: "asAxisIn:ifAbsent:put:",
  1651. protocol: "*Axxord",
  1652. fn: function (anObject,aBlock,anotherObject){
  1653. var self=this,$self=this;
  1654. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1655. return $core.withContext(function($ctx1) {
  1656. //>>excludeEnd("ctx");
  1657. var $1;
  1658. var $early={};
  1659. try {
  1660. $1=$recv(anObject)._respondsTo_("at:put:");
  1661. $recv($1)._ifTrue_ifFalse_((function(){
  1662. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1663. return $core.withContext(function($ctx2) {
  1664. //>>excludeEnd("ctx");
  1665. throw $early=[$recv(anObject)._at_put_(self,anotherObject)];
  1666. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1667. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1668. //>>excludeEnd("ctx");
  1669. }),aBlock);
  1670. return self;
  1671. }
  1672. catch(e) {if(e===$early)return e[0]; throw e}
  1673. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1674. }, function($ctx1) {$ctx1.fill(self,"asAxisIn:ifAbsent:put:",{anObject:anObject,aBlock:aBlock,anotherObject:anotherObject},$globals.Number)});
  1675. //>>excludeEnd("ctx");
  1676. },
  1677. //>>excludeStart("ide", pragmas.excludeIdeData);
  1678. args: ["anObject", "aBlock", "anotherObject"],
  1679. source: "asAxisIn: anObject ifAbsent: aBlock put: anotherObject\x0a\x09(anObject respondsTo: #at:put:)\x0a\x09\x09ifTrue: [ ^ anObject at: self put: anotherObject ]\x0a\x09\x09ifFalse: aBlock",
  1680. referencedClasses: [],
  1681. //>>excludeEnd("ide");
  1682. messageSends: ["ifTrue:ifFalse:", "respondsTo:", "at:put:"]
  1683. }),
  1684. $globals.Number);
  1685. $core.addMethod(
  1686. $core.method({
  1687. selector: "asAxisIn:ifAbsent:",
  1688. protocol: "*Axxord",
  1689. fn: function (anObject,aBlock){
  1690. var self=this,$self=this;
  1691. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1692. return $core.withContext(function($ctx1) {
  1693. //>>excludeEnd("ctx");
  1694. return $recv(aBlock)._value();
  1695. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1696. }, function($ctx1) {$ctx1.fill(self,"asAxisIn:ifAbsent:",{anObject:anObject,aBlock:aBlock},$globals.Object)});
  1697. //>>excludeEnd("ctx");
  1698. },
  1699. //>>excludeStart("ide", pragmas.excludeIdeData);
  1700. args: ["anObject", "aBlock"],
  1701. source: "asAxisIn: anObject ifAbsent: aBlock\x0a\x09^ aBlock value",
  1702. referencedClasses: [],
  1703. //>>excludeEnd("ide");
  1704. messageSends: ["value"]
  1705. }),
  1706. $globals.Object);
  1707. $core.addMethod(
  1708. $core.method({
  1709. selector: "asAxisIn:ifAbsent:put:",
  1710. protocol: "*Axxord",
  1711. fn: function (anObject,aBlock,anotherObject){
  1712. var self=this,$self=this;
  1713. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1714. return $core.withContext(function($ctx1) {
  1715. //>>excludeEnd("ctx");
  1716. return $recv(aBlock)._value();
  1717. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1718. }, function($ctx1) {$ctx1.fill(self,"asAxisIn:ifAbsent:put:",{anObject:anObject,aBlock:aBlock,anotherObject:anotherObject},$globals.Object)});
  1719. //>>excludeEnd("ctx");
  1720. },
  1721. //>>excludeStart("ide", pragmas.excludeIdeData);
  1722. args: ["anObject", "aBlock", "anotherObject"],
  1723. source: "asAxisIn: anObject ifAbsent: aBlock put: anotherObject\x0a\x09^ aBlock value",
  1724. referencedClasses: [],
  1725. //>>excludeEnd("ide");
  1726. messageSends: ["value"]
  1727. }),
  1728. $globals.Object);
  1729. $core.addMethod(
  1730. $core.method({
  1731. selector: "atAxes:ifAbsent:",
  1732. protocol: "*Axxord",
  1733. fn: function (aCollection,aBlock){
  1734. var self=this,$self=this;
  1735. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1736. return $core.withContext(function($ctx1) {
  1737. //>>excludeEnd("ctx");
  1738. return $recv($globals.Axes)._on_at_ifAbsent_(self,aCollection,aBlock);
  1739. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1740. }, function($ctx1) {$ctx1.fill(self,"atAxes:ifAbsent:",{aCollection:aCollection,aBlock:aBlock},$globals.Object)});
  1741. //>>excludeEnd("ctx");
  1742. },
  1743. //>>excludeStart("ide", pragmas.excludeIdeData);
  1744. args: ["aCollection", "aBlock"],
  1745. source: "atAxes: aCollection ifAbsent: aBlock\x0a\x09^ Axes on: self at: aCollection ifAbsent: aBlock",
  1746. referencedClasses: ["Axes"],
  1747. //>>excludeEnd("ide");
  1748. messageSends: ["on:at:ifAbsent:"]
  1749. }),
  1750. $globals.Object);
  1751. $core.addMethod(
  1752. $core.method({
  1753. selector: "atAxes:ifAbsent:put:",
  1754. protocol: "*Axxord",
  1755. fn: function (aCollection,aBlock,value){
  1756. var self=this,$self=this;
  1757. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1758. return $core.withContext(function($ctx1) {
  1759. //>>excludeEnd("ctx");
  1760. return $recv($globals.Axes)._on_at_ifAbsent_put_(self,aCollection,aBlock,value);
  1761. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1762. }, function($ctx1) {$ctx1.fill(self,"atAxes:ifAbsent:put:",{aCollection:aCollection,aBlock:aBlock,value:value},$globals.Object)});
  1763. //>>excludeEnd("ctx");
  1764. },
  1765. //>>excludeStart("ide", pragmas.excludeIdeData);
  1766. args: ["aCollection", "aBlock", "value"],
  1767. source: "atAxes: aCollection ifAbsent: aBlock put: value\x0a\x09^ Axes on: self at: aCollection ifAbsent: aBlock put: value",
  1768. referencedClasses: ["Axes"],
  1769. //>>excludeEnd("ide");
  1770. messageSends: ["on:at:ifAbsent:put:"]
  1771. }),
  1772. $globals.Object);
  1773. $core.addMethod(
  1774. $core.method({
  1775. selector: "axes:consume:",
  1776. protocol: "*Axxord",
  1777. fn: function (aCollection,aBlock){
  1778. var self=this,$self=this;
  1779. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1780. return $core.withContext(function($ctx1) {
  1781. //>>excludeEnd("ctx");
  1782. return $recv($globals.Axes)._on_at_consume_(self,aCollection,aBlock);
  1783. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1784. }, function($ctx1) {$ctx1.fill(self,"axes:consume:",{aCollection:aCollection,aBlock:aBlock},$globals.Object)});
  1785. //>>excludeEnd("ctx");
  1786. },
  1787. //>>excludeStart("ide", pragmas.excludeIdeData);
  1788. args: ["aCollection", "aBlock"],
  1789. source: "axes: aCollection consume: aBlock\x0a\x09^ Axes on: self at: aCollection consume: aBlock",
  1790. referencedClasses: ["Axes"],
  1791. //>>excludeEnd("ide");
  1792. messageSends: ["on:at:consume:"]
  1793. }),
  1794. $globals.Object);
  1795. $core.addMethod(
  1796. $core.method({
  1797. selector: "axes:transform:",
  1798. protocol: "*Axxord",
  1799. fn: function (aCollection,aBlock){
  1800. var self=this,$self=this;
  1801. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1802. return $core.withContext(function($ctx1) {
  1803. //>>excludeEnd("ctx");
  1804. return $recv($globals.Axes)._on_at_transform_(self,aCollection,aBlock);
  1805. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1806. }, function($ctx1) {$ctx1.fill(self,"axes:transform:",{aCollection:aCollection,aBlock:aBlock},$globals.Object)});
  1807. //>>excludeEnd("ctx");
  1808. },
  1809. //>>excludeStart("ide", pragmas.excludeIdeData);
  1810. args: ["aCollection", "aBlock"],
  1811. source: "axes: aCollection transform: aBlock\x0a\x09^ Axes on: self at: aCollection transform: aBlock",
  1812. referencedClasses: ["Axes"],
  1813. //>>excludeEnd("ide");
  1814. messageSends: ["on:at:transform:"]
  1815. }),
  1816. $globals.Object);
  1817. $core.addMethod(
  1818. $core.method({
  1819. selector: "axxord",
  1820. protocol: "*Axxord",
  1821. fn: function (){
  1822. var self=this,$self=this;
  1823. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1824. return $core.withContext(function($ctx1) {
  1825. //>>excludeEnd("ctx");
  1826. return self.$axxord$;
  1827. return self;
  1828. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1829. }, function($ctx1) {$ctx1.fill(self,"axxord",{},$globals.Object)});
  1830. //>>excludeEnd("ctx");
  1831. },
  1832. //>>excludeStart("ide", pragmas.excludeIdeData);
  1833. args: [],
  1834. source: "axxord\x0a<inlineJS: 'return self.$axxord$'>",
  1835. referencedClasses: [],
  1836. //>>excludeEnd("ide");
  1837. messageSends: []
  1838. }),
  1839. $globals.Object);
  1840. $core.addMethod(
  1841. $core.method({
  1842. selector: "axxord:",
  1843. protocol: "*Axxord",
  1844. fn: function (anAxon){
  1845. var self=this,$self=this;
  1846. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1847. return $core.withContext(function($ctx1) {
  1848. //>>excludeEnd("ctx");
  1849. self.$axxord$ = anAxon;
  1850. return self;
  1851. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1852. }, function($ctx1) {$ctx1.fill(self,"axxord:",{anAxon:anAxon},$globals.Object)});
  1853. //>>excludeEnd("ctx");
  1854. },
  1855. //>>excludeStart("ide", pragmas.excludeIdeData);
  1856. args: ["anAxon"],
  1857. source: "axxord: anAxon\x0a<inlineJS: 'self.$axxord$ = anAxon'>",
  1858. referencedClasses: [],
  1859. //>>excludeEnd("ide");
  1860. messageSends: []
  1861. }),
  1862. $globals.Object);
  1863. $core.addMethod(
  1864. $core.method({
  1865. selector: "asAxisIn:ifAbsent:",
  1866. protocol: "*Axxord",
  1867. fn: function (anObject,aBlock){
  1868. var self=this,$self=this;
  1869. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1870. return $core.withContext(function($ctx1) {
  1871. //>>excludeEnd("ctx");
  1872. var $1;
  1873. var $early={};
  1874. try {
  1875. $1=$recv(anObject)._respondsTo_("at:ifAbsent:");
  1876. $recv($1)._ifTrue_ifFalse_((function(){
  1877. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1878. return $core.withContext(function($ctx2) {
  1879. //>>excludeEnd("ctx");
  1880. throw $early=[$recv(anObject)._at_ifAbsent_(self,aBlock)];
  1881. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1882. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1883. //>>excludeEnd("ctx");
  1884. }),aBlock);
  1885. return self;
  1886. }
  1887. catch(e) {if(e===$early)return e[0]; throw e}
  1888. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1889. }, function($ctx1) {$ctx1.fill(self,"asAxisIn:ifAbsent:",{anObject:anObject,aBlock:aBlock},$globals.String)});
  1890. //>>excludeEnd("ctx");
  1891. },
  1892. //>>excludeStart("ide", pragmas.excludeIdeData);
  1893. args: ["anObject", "aBlock"],
  1894. source: "asAxisIn: anObject ifAbsent: aBlock\x0a\x09(anObject respondsTo: #at:ifAbsent:)\x0a\x09\x09ifTrue: [ ^ anObject at: self ifAbsent: aBlock ]\x0a\x09\x09ifFalse: aBlock",
  1895. referencedClasses: [],
  1896. //>>excludeEnd("ide");
  1897. messageSends: ["ifTrue:ifFalse:", "respondsTo:", "at:ifAbsent:"]
  1898. }),
  1899. $globals.String);
  1900. $core.addMethod(
  1901. $core.method({
  1902. selector: "asAxisIn:ifAbsent:put:",
  1903. protocol: "*Axxord",
  1904. fn: function (anObject,aBlock,anotherObject){
  1905. var self=this,$self=this;
  1906. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1907. return $core.withContext(function($ctx1) {
  1908. //>>excludeEnd("ctx");
  1909. var $1;
  1910. var $early={};
  1911. try {
  1912. $1=$recv(anObject)._respondsTo_("at:put:");
  1913. $recv($1)._ifTrue_ifFalse_((function(){
  1914. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1915. return $core.withContext(function($ctx2) {
  1916. //>>excludeEnd("ctx");
  1917. throw $early=[$recv(anObject)._at_put_(self,anotherObject)];
  1918. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1919. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1920. //>>excludeEnd("ctx");
  1921. }),aBlock);
  1922. return self;
  1923. }
  1924. catch(e) {if(e===$early)return e[0]; throw e}
  1925. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1926. }, function($ctx1) {$ctx1.fill(self,"asAxisIn:ifAbsent:put:",{anObject:anObject,aBlock:aBlock,anotherObject:anotherObject},$globals.String)});
  1927. //>>excludeEnd("ctx");
  1928. },
  1929. //>>excludeStart("ide", pragmas.excludeIdeData);
  1930. args: ["anObject", "aBlock", "anotherObject"],
  1931. source: "asAxisIn: anObject ifAbsent: aBlock put: anotherObject\x0a\x09(anObject respondsTo: #at:put:)\x0a\x09\x09ifTrue: [ ^ anObject at: self put: anotherObject ]\x0a\x09\x09ifFalse: aBlock",
  1932. referencedClasses: [],
  1933. //>>excludeEnd("ide");
  1934. messageSends: ["ifTrue:ifFalse:", "respondsTo:", "at:put:"]
  1935. }),
  1936. $globals.String);
  1937. });