Axxord.js 50 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379
  1. define(["amber/boot"
  2. //>>excludeStart("imports", pragmas.excludeImports);
  3. , "axxord/Axxord-Axon"
  4. //>>excludeEnd("imports");
  5. , "amber_core/Kernel-Collections", "amber_core/Kernel-Infrastructure", "amber_core/Kernel-Objects"], function($boot
  6. //>>excludeStart("imports", pragmas.excludeImports);
  7. //>>excludeEnd("imports");
  8. ){"use strict";
  9. if(!$boot.nilAsReceiver)$boot.nilAsReceiver=$boot.nil;
  10. if(!("nilAsValue" in $boot))$boot.nilAsValue=$boot.nilAsReceiver;
  11. var $core=$boot.api,nil=$boot.nilAsValue,$nil=$boot.nilAsReceiver,$recv=$boot.asReceiver,$globals=$boot.globals;
  12. if(!$boot.nilAsClass)$boot.nilAsClass=$boot.dnu;
  13. $core.addPackage("Axxord");
  14. $core.packages["Axxord"].innerEval = function (expr) { return eval(expr); };
  15. $core.packages["Axxord"].imports = ["axxord/Axxord-Axon"];
  16. $core.packages["Axxord"].transport = {"type":"amd","amdNamespace":"axxord"};
  17. $core.addClass("Axes", $globals.Object, [], "Axxord");
  18. $core.addMethod(
  19. $core.method({
  20. selector: "newInterestThru:doing:",
  21. protocol: "factory",
  22. fn: function (anAspect,aBlock){
  23. var self=this,$self=this;
  24. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  25. return $core.withContext(function($ctx1) {
  26. //>>excludeEnd("ctx");
  27. var $2,$3,$1,$5,$4;
  28. return $recv($recv($globals.PluggableInterest)._new())._accept_enact_((function(aspect){
  29. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  30. return $core.withContext(function($ctx2) {
  31. //>>excludeEnd("ctx");
  32. $2=$recv(aspect)._size();
  33. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  34. $ctx2.sendIdx["size"]=1;
  35. //>>excludeEnd("ctx");
  36. $3=$recv(anAspect)._size();
  37. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  38. $ctx2.sendIdx["size"]=2;
  39. //>>excludeEnd("ctx");
  40. $1=$recv($2).__lt_eq($3);
  41. if($core.assert($1)){
  42. $5=$recv(aspect)._size();
  43. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  44. $ctx2.sendIdx["size"]=3;
  45. //>>excludeEnd("ctx");
  46. $4=$recv(anAspect)._copyFrom_to_((1),$5);
  47. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  48. $ctx2.sendIdx["copyFrom:to:"]=1;
  49. //>>excludeEnd("ctx");
  50. return $recv(aspect).__eq($4);
  51. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  52. $ctx2.sendIdx["="]=1;
  53. //>>excludeEnd("ctx");
  54. } else {
  55. return $recv(anAspect).__eq($recv(aspect)._copyFrom_to_((1),$recv(anAspect)._size()));
  56. }
  57. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  58. }, function($ctx2) {$ctx2.fillBlock({aspect:aspect},$ctx1,1)});
  59. //>>excludeEnd("ctx");
  60. }),aBlock);
  61. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  62. }, function($ctx1) {$ctx1.fill(self,"newInterestThru:doing:",{anAspect:anAspect,aBlock:aBlock},$globals.Axes.a$cls)});
  63. //>>excludeEnd("ctx");
  64. },
  65. //>>excludeStart("ide", pragmas.excludeIdeData);
  66. args: ["anAspect", "aBlock"],
  67. 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",
  68. referencedClasses: ["PluggableInterest"],
  69. //>>excludeEnd("ide");
  70. messageSends: ["accept:enact:", "new", "ifTrue:ifFalse:", "<=", "size", "=", "copyFrom:to:"]
  71. }),
  72. $globals.Axes.a$cls);
  73. $core.addMethod(
  74. $core.method({
  75. selector: "newInterestUpTo:doing:",
  76. protocol: "factory",
  77. fn: function (anAspect,aBlock){
  78. var self=this,$self=this;
  79. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  80. return $core.withContext(function($ctx1) {
  81. //>>excludeEnd("ctx");
  82. var $2,$3,$1;
  83. return $recv($recv($globals.PluggableInterest)._new())._accept_enact_((function(changedAspect){
  84. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  85. return $core.withContext(function($ctx2) {
  86. //>>excludeEnd("ctx");
  87. $2=$recv(changedAspect)._size();
  88. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  89. $ctx2.sendIdx["size"]=1;
  90. //>>excludeEnd("ctx");
  91. $3=$recv(anAspect)._size();
  92. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  93. $ctx2.sendIdx["size"]=2;
  94. //>>excludeEnd("ctx");
  95. $1=$recv($2).__lt_eq($3);
  96. return $recv($1)._and_((function(){
  97. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  98. return $core.withContext(function($ctx3) {
  99. //>>excludeEnd("ctx");
  100. return $recv(changedAspect).__eq($recv(anAspect)._copyFrom_to_((1),$recv(changedAspect)._size()));
  101. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  102. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  103. //>>excludeEnd("ctx");
  104. }));
  105. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  106. }, function($ctx2) {$ctx2.fillBlock({changedAspect:changedAspect},$ctx1,1)});
  107. //>>excludeEnd("ctx");
  108. }),aBlock);
  109. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  110. }, function($ctx1) {$ctx1.fill(self,"newInterestUpTo:doing:",{anAspect:anAspect,aBlock:aBlock},$globals.Axes.a$cls)});
  111. //>>excludeEnd("ctx");
  112. },
  113. //>>excludeStart("ide", pragmas.excludeIdeData);
  114. args: ["anAspect", "aBlock"],
  115. 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",
  116. referencedClasses: ["PluggableInterest"],
  117. //>>excludeEnd("ide");
  118. messageSends: ["accept:enact:", "new", "and:", "<=", "size", "=", "copyFrom:to:"]
  119. }),
  120. $globals.Axes.a$cls);
  121. $core.addMethod(
  122. $core.method({
  123. selector: "on:at:consume:",
  124. protocol: "delegated",
  125. fn: function (anObject,aCollection,aBlock){
  126. var self=this,$self=this;
  127. var value;
  128. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  129. return $core.withContext(function($ctx1) {
  130. //>>excludeEnd("ctx");
  131. var $early={};
  132. try {
  133. value=$recv(anObject)._atAxes_ifAbsent_(aCollection,(function(){
  134. throw $early=[anObject];
  135. }));
  136. return $recv(aBlock)._value_(value);
  137. }
  138. catch(e) {if(e===$early)return e[0]; throw e}
  139. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  140. }, function($ctx1) {$ctx1.fill(self,"on:at:consume:",{anObject:anObject,aCollection:aCollection,aBlock:aBlock,value:value},$globals.Axes.a$cls)});
  141. //>>excludeEnd("ctx");
  142. },
  143. //>>excludeStart("ide", pragmas.excludeIdeData);
  144. args: ["anObject", "aCollection", "aBlock"],
  145. source: "on: anObject at: aCollection consume: aBlock\x0a\x09| value |\x0a\x09value := anObject atAxes: aCollection ifAbsent: [ ^ anObject ].\x0a\x09^ aBlock value: value",
  146. referencedClasses: [],
  147. //>>excludeEnd("ide");
  148. messageSends: ["atAxes:ifAbsent:", "value:"]
  149. }),
  150. $globals.Axes.a$cls);
  151. $core.addMethod(
  152. $core.method({
  153. selector: "on:at:ifAbsent:",
  154. protocol: "delegated",
  155. fn: function (anObject,aCollection,aBlock){
  156. var self=this,$self=this;
  157. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  158. return $core.withContext(function($ctx1) {
  159. //>>excludeEnd("ctx");
  160. var $early={};
  161. try {
  162. return $recv(aCollection)._inject_into_(anObject,(function(soFar,segment){
  163. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  164. return $core.withContext(function($ctx2) {
  165. //>>excludeEnd("ctx");
  166. return $recv(segment)._asAxisIn_ifAbsent_(soFar,(function(){
  167. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  168. return $core.withContext(function($ctx3) {
  169. //>>excludeEnd("ctx");
  170. throw $early=[$recv(aBlock)._value()];
  171. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  172. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  173. //>>excludeEnd("ctx");
  174. }));
  175. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  176. }, function($ctx2) {$ctx2.fillBlock({soFar:soFar,segment:segment},$ctx1,1)});
  177. //>>excludeEnd("ctx");
  178. }));
  179. }
  180. catch(e) {if(e===$early)return e[0]; throw e}
  181. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  182. }, function($ctx1) {$ctx1.fill(self,"on:at:ifAbsent:",{anObject:anObject,aCollection:aCollection,aBlock:aBlock},$globals.Axes.a$cls)});
  183. //>>excludeEnd("ctx");
  184. },
  185. //>>excludeStart("ide", pragmas.excludeIdeData);
  186. args: ["anObject", "aCollection", "aBlock"],
  187. source: "on: anObject at: aCollection ifAbsent: aBlock\x0a\x09^ aCollection inject: anObject into: [ :soFar :segment |\x0a\x09\x09segment asAxisIn: soFar ifAbsent: [ ^ aBlock value ]]",
  188. referencedClasses: [],
  189. //>>excludeEnd("ide");
  190. messageSends: ["inject:into:", "asAxisIn:ifAbsent:", "value"]
  191. }),
  192. $globals.Axes.a$cls);
  193. $core.addMethod(
  194. $core.method({
  195. selector: "on:at:ifAbsent:put:",
  196. protocol: "delegated",
  197. fn: function (anObject,aCollection,aBlock,value){
  198. var self=this,$self=this;
  199. var penultimate;
  200. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  201. return $core.withContext(function($ctx1) {
  202. //>>excludeEnd("ctx");
  203. penultimate=$recv(anObject)._atAxes_ifAbsent_($recv(aCollection)._allButLast(),aBlock);
  204. return $recv($recv(aCollection)._last())._asAxisIn_ifAbsent_put_(penultimate,aBlock,value);
  205. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  206. }, function($ctx1) {$ctx1.fill(self,"on:at:ifAbsent:put:",{anObject:anObject,aCollection:aCollection,aBlock:aBlock,value:value,penultimate:penultimate},$globals.Axes.a$cls)});
  207. //>>excludeEnd("ctx");
  208. },
  209. //>>excludeStart("ide", pragmas.excludeIdeData);
  210. args: ["anObject", "aCollection", "aBlock", "value"],
  211. 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",
  212. referencedClasses: [],
  213. //>>excludeEnd("ide");
  214. messageSends: ["atAxes:ifAbsent:", "allButLast", "asAxisIn:ifAbsent:put:", "last"]
  215. }),
  216. $globals.Axes.a$cls);
  217. $core.addMethod(
  218. $core.method({
  219. selector: "on:at:transform:",
  220. protocol: "delegated",
  221. fn: function (anObject,aCollection,aBlock){
  222. var self=this,$self=this;
  223. var value,newValue;
  224. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  225. return $core.withContext(function($ctx1) {
  226. //>>excludeEnd("ctx");
  227. var $1,$2,$receiver;
  228. var $early={};
  229. try {
  230. value=$recv(anObject)._atAxes_ifAbsent_(aCollection,(function(){
  231. throw $early=[anObject];
  232. }));
  233. newValue=$recv(aBlock)._value_(value);
  234. $1=$recv(value).__eq_eq(newValue);
  235. if(!$core.assert($1)){
  236. $recv(anObject)._atAxes_ifAbsent_put_(aCollection,(function(){
  237. throw $early=[anObject];
  238. }),newValue);
  239. }
  240. $2=$recv(anObject)._axxord();
  241. if(($receiver = $2) == null || $receiver.a$nil){
  242. $2;
  243. } else {
  244. var axon;
  245. axon=$receiver;
  246. $recv(axon)._changed_(aCollection);
  247. }
  248. return self;
  249. }
  250. catch(e) {if(e===$early)return e[0]; throw e}
  251. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  252. }, function($ctx1) {$ctx1.fill(self,"on:at:transform:",{anObject:anObject,aCollection:aCollection,aBlock:aBlock,value:value,newValue:newValue},$globals.Axes.a$cls)});
  253. //>>excludeEnd("ctx");
  254. },
  255. //>>excludeStart("ide", pragmas.excludeIdeData);
  256. args: ["anObject", "aCollection", "aBlock"],
  257. 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]",
  258. referencedClasses: [],
  259. //>>excludeEnd("ide");
  260. messageSends: ["atAxes:ifAbsent:", "value:", "ifFalse:", "==", "atAxes:ifAbsent:put:", "ifNotNil:", "axxord", "changed:"]
  261. }),
  262. $globals.Axes.a$cls);
  263. $core.addMethod(
  264. $core.method({
  265. selector: "parse:",
  266. protocol: "parsing",
  267. fn: function (message){
  268. var self=this,$self=this;
  269. var result,stack,anArray;
  270. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  271. return $core.withContext(function($ctx1) {
  272. //>>excludeEnd("ctx");
  273. var $1,$2,$3,$5,$4,$6,$7,$8,$9,$10,$11;
  274. anArray=$recv(message)._tokenize_(" ");
  275. result=[];
  276. stack=[result];
  277. $recv(anArray)._do_((function(each){
  278. var asNum,inner,close;
  279. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  280. return $core.withContext(function($ctx2) {
  281. //>>excludeEnd("ctx");
  282. close=(0);
  283. close;
  284. inner=each;
  285. inner;
  286. $recv((function(){
  287. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  288. return $core.withContext(function($ctx3) {
  289. //>>excludeEnd("ctx");
  290. $1=$recv(inner)._notEmpty();
  291. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  292. $ctx3.sendIdx["notEmpty"]=1;
  293. //>>excludeEnd("ctx");
  294. return $recv($1)._and_((function(){
  295. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  296. return $core.withContext(function($ctx4) {
  297. //>>excludeEnd("ctx");
  298. $2=$recv(inner)._first();
  299. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  300. $ctx4.sendIdx["first"]=1;
  301. //>>excludeEnd("ctx");
  302. return $recv($2).__eq("(");
  303. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  304. $ctx4.sendIdx["="]=1;
  305. //>>excludeEnd("ctx");
  306. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  307. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)});
  308. //>>excludeEnd("ctx");
  309. }));
  310. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  311. $ctx3.sendIdx["and:"]=1;
  312. //>>excludeEnd("ctx");
  313. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  314. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  315. //>>excludeEnd("ctx");
  316. }))._whileTrue_((function(){
  317. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  318. return $core.withContext(function($ctx3) {
  319. //>>excludeEnd("ctx");
  320. inner=$recv(inner)._allButFirst();
  321. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  322. $ctx3.sendIdx["allButFirst"]=1;
  323. //>>excludeEnd("ctx");
  324. inner;
  325. $3=stack;
  326. $5=$recv(stack)._last();
  327. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  328. $ctx3.sendIdx["last"]=1;
  329. //>>excludeEnd("ctx");
  330. $4=$recv($5)._add_([]);
  331. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  332. $ctx3.sendIdx["add:"]=2;
  333. //>>excludeEnd("ctx");
  334. return $recv($3)._add_($4);
  335. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  336. $ctx3.sendIdx["add:"]=1;
  337. //>>excludeEnd("ctx");
  338. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  339. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)});
  340. //>>excludeEnd("ctx");
  341. }));
  342. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  343. $ctx2.sendIdx["whileTrue:"]=1;
  344. //>>excludeEnd("ctx");
  345. $recv((function(){
  346. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  347. return $core.withContext(function($ctx3) {
  348. //>>excludeEnd("ctx");
  349. $6=$recv(inner)._notEmpty();
  350. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  351. $ctx3.sendIdx["notEmpty"]=2;
  352. //>>excludeEnd("ctx");
  353. return $recv($6)._and_((function(){
  354. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  355. return $core.withContext(function($ctx4) {
  356. //>>excludeEnd("ctx");
  357. $7=$recv(inner)._last();
  358. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  359. $ctx4.sendIdx["last"]=2;
  360. //>>excludeEnd("ctx");
  361. return $recv($7).__eq(")");
  362. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  363. $ctx4.sendIdx["="]=2;
  364. //>>excludeEnd("ctx");
  365. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  366. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,6)});
  367. //>>excludeEnd("ctx");
  368. }));
  369. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  370. $ctx3.sendIdx["and:"]=2;
  371. //>>excludeEnd("ctx");
  372. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  373. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,5)});
  374. //>>excludeEnd("ctx");
  375. }))._whileTrue_((function(){
  376. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  377. return $core.withContext(function($ctx3) {
  378. //>>excludeEnd("ctx");
  379. inner=$recv(inner)._allButLast();
  380. inner;
  381. close=$recv(close).__plus((1));
  382. return close;
  383. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  384. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,7)});
  385. //>>excludeEnd("ctx");
  386. }));
  387. $8=$recv($recv(inner)._notEmpty())._and_((function(){
  388. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  389. return $core.withContext(function($ctx3) {
  390. //>>excludeEnd("ctx");
  391. return $recv($recv(inner)._first()).__eq("~");
  392. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  393. $ctx3.sendIdx["="]=3;
  394. //>>excludeEnd("ctx");
  395. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  396. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,8)});
  397. //>>excludeEnd("ctx");
  398. }));
  399. if($core.assert($8)){
  400. inner=[$recv(inner)._allButFirst()];
  401. inner;
  402. }
  403. $9=$recv(inner)._isString();
  404. if($core.assert($9)){
  405. asNum=$recv($recv(inner)._ifEmpty_((function(){
  406. return "NaN";
  407. })))._asNumber();
  408. } else {
  409. asNum=inner;
  410. }
  411. asNum;
  412. $10=$recv(asNum).__eq(asNum);
  413. if($core.assert($10)){
  414. $11=$recv(stack)._last();
  415. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  416. $ctx2.sendIdx["last"]=3;
  417. //>>excludeEnd("ctx");
  418. $recv($11)._add_(asNum);
  419. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  420. $ctx2.sendIdx["add:"]=3;
  421. //>>excludeEnd("ctx");
  422. } else {
  423. $recv(inner)._ifNotEmpty_((function(){
  424. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  425. return $core.withContext(function($ctx3) {
  426. //>>excludeEnd("ctx");
  427. return $recv($recv(stack)._last())._add_(inner);
  428. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  429. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,15)});
  430. //>>excludeEnd("ctx");
  431. }));
  432. }
  433. return $recv(close)._timesRepeat_((function(){
  434. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  435. return $core.withContext(function($ctx3) {
  436. //>>excludeEnd("ctx");
  437. return $recv(stack)._removeLast();
  438. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  439. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,16)});
  440. //>>excludeEnd("ctx");
  441. }));
  442. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  443. }, function($ctx2) {$ctx2.fillBlock({each:each,asNum:asNum,inner:inner,close:close},$ctx1,1)});
  444. //>>excludeEnd("ctx");
  445. }));
  446. return result;
  447. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  448. }, function($ctx1) {$ctx1.fill(self,"parse:",{message:message,result:result,stack:stack,anArray:anArray},$globals.Axes.a$cls)});
  449. //>>excludeEnd("ctx");
  450. },
  451. //>>excludeStart("ide", pragmas.excludeIdeData);
  452. args: ["message"],
  453. 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",
  454. referencedClasses: [],
  455. //>>excludeEnd("ide");
  456. messageSends: ["tokenize:", "do:", "whileTrue:", "and:", "notEmpty", "=", "first", "allButFirst", "add:", "last", "allButLast", "+", "ifTrue:", "ifTrue:ifFalse:", "isString", "asNumber", "ifEmpty:", "ifNotEmpty:", "timesRepeat:", "removeLast"]
  457. }),
  458. $globals.Axes.a$cls);
  459. $core.addClass("Axolator", $globals.Object, ["root"], "Axxord");
  460. $core.addMethod(
  461. $core.method({
  462. selector: "atAxes:ifAbsent:",
  463. protocol: "action",
  464. fn: function (aCollection,aBlock){
  465. var self=this,$self=this;
  466. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  467. return $core.withContext(function($ctx1) {
  468. //>>excludeEnd("ctx");
  469. return $recv($self["@root"])._atAxes_ifAbsent_(aCollection,aBlock);
  470. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  471. }, function($ctx1) {$ctx1.fill(self,"atAxes:ifAbsent:",{aCollection:aCollection,aBlock:aBlock},$globals.Axolator)});
  472. //>>excludeEnd("ctx");
  473. },
  474. //>>excludeStart("ide", pragmas.excludeIdeData);
  475. args: ["aCollection", "aBlock"],
  476. source: "atAxes: aCollection ifAbsent: aBlock\x0a\x09^ root atAxes: aCollection ifAbsent: aBlock",
  477. referencedClasses: [],
  478. //>>excludeEnd("ide");
  479. messageSends: ["atAxes:ifAbsent:"]
  480. }),
  481. $globals.Axolator);
  482. $core.addMethod(
  483. $core.method({
  484. selector: "atAxes:ifAbsent:put:",
  485. protocol: "action",
  486. fn: function (aCollection,aBlock,value){
  487. var self=this,$self=this;
  488. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  489. return $core.withContext(function($ctx1) {
  490. //>>excludeEnd("ctx");
  491. return $recv($self["@root"])._atAxes_ifAbsent_put_(aCollection,aBlock,value);
  492. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  493. }, function($ctx1) {$ctx1.fill(self,"atAxes:ifAbsent:put:",{aCollection:aCollection,aBlock:aBlock,value:value},$globals.Axolator)});
  494. //>>excludeEnd("ctx");
  495. },
  496. //>>excludeStart("ide", pragmas.excludeIdeData);
  497. args: ["aCollection", "aBlock", "value"],
  498. source: "atAxes: aCollection ifAbsent: aBlock put: value\x0a\x09^ root atAxes: aCollection ifAbsent: aBlock put: value",
  499. referencedClasses: [],
  500. //>>excludeEnd("ide");
  501. messageSends: ["atAxes:ifAbsent:put:"]
  502. }),
  503. $globals.Axolator);
  504. $core.addMethod(
  505. $core.method({
  506. selector: "axes:consume:",
  507. protocol: "action",
  508. fn: function (aCollection,aBlock){
  509. var self=this,$self=this;
  510. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  511. return $core.withContext(function($ctx1) {
  512. //>>excludeEnd("ctx");
  513. (
  514. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  515. $ctx1.supercall = true,
  516. //>>excludeEnd("ctx");
  517. ($globals.Axolator.superclass||$boot.nilAsClass).fn.prototype._axes_consume_.apply($self, [aCollection,(function(value){
  518. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  519. return $core.withContext(function($ctx2) {
  520. //>>excludeEnd("ctx");
  521. return $recv(aBlock)._value_($recv(value)._deepCopy());
  522. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  523. }, function($ctx2) {$ctx2.fillBlock({value:value},$ctx1,1)});
  524. //>>excludeEnd("ctx");
  525. })]));
  526. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  527. $ctx1.supercall = false;
  528. //>>excludeEnd("ctx");;
  529. return self;
  530. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  531. }, function($ctx1) {$ctx1.fill(self,"axes:consume:",{aCollection:aCollection,aBlock:aBlock},$globals.Axolator)});
  532. //>>excludeEnd("ctx");
  533. },
  534. //>>excludeStart("ide", pragmas.excludeIdeData);
  535. args: ["aCollection", "aBlock"],
  536. source: "axes: aCollection consume: aBlock\x0a\x0asuper axes: aCollection consume: [:value | aBlock value: value deepCopy]",
  537. referencedClasses: [],
  538. //>>excludeEnd("ide");
  539. messageSends: ["axes:consume:", "value:", "deepCopy"]
  540. }),
  541. $globals.Axolator);
  542. $core.addMethod(
  543. $core.method({
  544. selector: "axes:transform:",
  545. protocol: "action",
  546. fn: function (aCollection,aBlock){
  547. var self=this,$self=this;
  548. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  549. return $core.withContext(function($ctx1) {
  550. //>>excludeEnd("ctx");
  551. var $2,$1,$3,$receiver;
  552. $recv(aCollection)._ifEmpty_ifNotEmpty_((function(){
  553. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  554. return $core.withContext(function($ctx2) {
  555. //>>excludeEnd("ctx");
  556. $2=$recv(aBlock)._value_($self._root());
  557. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  558. $ctx2.sendIdx["value:"]=1;
  559. //>>excludeEnd("ctx");
  560. $1=$recv($2)._deepCopy();
  561. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  562. $ctx2.sendIdx["deepCopy"]=1;
  563. //>>excludeEnd("ctx");
  564. $self._root_($1);
  565. $3=$self._axxord();
  566. if(($receiver = $3) == null || $receiver.a$nil){
  567. return $3;
  568. } else {
  569. var axxord;
  570. axxord=$receiver;
  571. return $recv(axxord)._changed_(aCollection);
  572. }
  573. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  574. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  575. //>>excludeEnd("ctx");
  576. }),(function(){
  577. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  578. return $core.withContext(function($ctx2) {
  579. //>>excludeEnd("ctx");
  580. return (
  581. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  582. $ctx2.supercall = true,
  583. //>>excludeEnd("ctx");
  584. ($globals.Axolator.superclass||$boot.nilAsClass).fn.prototype._axes_transform_.apply($self, [aCollection,(function(value){
  585. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  586. return $core.withContext(function($ctx3) {
  587. //>>excludeEnd("ctx");
  588. return $recv($recv(aBlock)._value_(value))._deepCopy();
  589. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  590. }, function($ctx3) {$ctx3.fillBlock({value:value},$ctx2,4)});
  591. //>>excludeEnd("ctx");
  592. })]));
  593. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  594. $ctx2.supercall = false;
  595. //>>excludeEnd("ctx");;
  596. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  597. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  598. //>>excludeEnd("ctx");
  599. }));
  600. return self;
  601. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  602. }, function($ctx1) {$ctx1.fill(self,"axes:transform:",{aCollection:aCollection,aBlock:aBlock},$globals.Axolator)});
  603. //>>excludeEnd("ctx");
  604. },
  605. //>>excludeStart("ide", pragmas.excludeIdeData);
  606. args: ["aCollection", "aBlock"],
  607. source: "axes: aCollection transform: aBlock\x0a\x0aaCollection\x0a\x09ifEmpty: [ self root: (aBlock value: self root) deepCopy. self axxord ifNotNil: [ :axxord | axxord changed: aCollection ] ]\x0a\x09ifNotEmpty: [ super axes: aCollection transform: [:value | (aBlock value: value) deepCopy] ]",
  608. referencedClasses: [],
  609. //>>excludeEnd("ide");
  610. messageSends: ["ifEmpty:ifNotEmpty:", "root:", "deepCopy", "value:", "root", "ifNotNil:", "axxord", "changed:", "axes:transform:"]
  611. }),
  612. $globals.Axolator);
  613. $core.addMethod(
  614. $core.method({
  615. selector: "root",
  616. protocol: "accessing",
  617. fn: function (){
  618. var self=this,$self=this;
  619. return $self["@root"];
  620. },
  621. //>>excludeStart("ide", pragmas.excludeIdeData);
  622. args: [],
  623. source: "root\x0a\x0a^root",
  624. referencedClasses: [],
  625. //>>excludeEnd("ide");
  626. messageSends: []
  627. }),
  628. $globals.Axolator);
  629. $core.addMethod(
  630. $core.method({
  631. selector: "root:",
  632. protocol: "accessing",
  633. fn: function (anObject){
  634. var self=this,$self=this;
  635. $self["@root"]=anObject;
  636. return self;
  637. },
  638. //>>excludeStart("ide", pragmas.excludeIdeData);
  639. args: ["anObject"],
  640. source: "root: anObject\x0a\x0aroot := anObject",
  641. referencedClasses: [],
  642. //>>excludeEnd("ide");
  643. messageSends: []
  644. }),
  645. $globals.Axolator);
  646. $core.addMethod(
  647. $core.method({
  648. selector: "on:",
  649. protocol: "instance creation",
  650. fn: function (anObject){
  651. var self=this,$self=this;
  652. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  653. return $core.withContext(function($ctx1) {
  654. //>>excludeEnd("ctx");
  655. return $recv($self._new())._root_(anObject);
  656. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  657. }, function($ctx1) {$ctx1.fill(self,"on:",{anObject:anObject},$globals.Axolator.a$cls)});
  658. //>>excludeEnd("ctx");
  659. },
  660. //>>excludeStart("ide", pragmas.excludeIdeData);
  661. args: ["anObject"],
  662. source: "on: anObject\x0a^self new root: anObject",
  663. referencedClasses: [],
  664. //>>excludeEnd("ide");
  665. messageSends: ["root:", "new"]
  666. }),
  667. $globals.Axolator.a$cls);
  668. $core.addMethod(
  669. $core.method({
  670. selector: "asAxisIn:ifAbsent:",
  671. protocol: "*Axxord",
  672. fn: function (anObject,aBlock){
  673. var self=this,$self=this;
  674. var receiver,selector,result;
  675. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  676. return $core.withContext(function($ctx1) {
  677. //>>excludeEnd("ctx");
  678. var $5,$4,$3,$2,$1;
  679. var $early={};
  680. try {
  681. selector=$self._first();
  682. receiver=$recv(anObject)._yourself();
  683. $recv((function(){
  684. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  685. return $core.withContext(function($ctx2) {
  686. //>>excludeEnd("ctx");
  687. result=$recv(receiver)._perform_(selector);
  688. return result;
  689. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  690. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  691. //>>excludeEnd("ctx");
  692. }))._on_do_($globals.MessageNotUnderstood,(function(mnu){
  693. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  694. return $core.withContext(function($ctx2) {
  695. //>>excludeEnd("ctx");
  696. $5=$recv(mnu)._message();
  697. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  698. $ctx2.sendIdx["message"]=1;
  699. //>>excludeEnd("ctx");
  700. $4=$recv($5)._selector();
  701. $3=$recv($4).__eq(selector);
  702. $2=$recv($3)._and_((function(){
  703. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  704. return $core.withContext(function($ctx3) {
  705. //>>excludeEnd("ctx");
  706. return $recv($recv(mnu)._receiver()).__eq_eq(receiver);
  707. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  708. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  709. //>>excludeEnd("ctx");
  710. }));
  711. $1=$recv($2)._and_((function(){
  712. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  713. return $core.withContext(function($ctx3) {
  714. //>>excludeEnd("ctx");
  715. return $recv($recv($recv(mnu)._message())._arguments())._isEmpty();
  716. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  717. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)});
  718. //>>excludeEnd("ctx");
  719. }));
  720. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  721. $ctx2.sendIdx["and:"]=1;
  722. //>>excludeEnd("ctx");
  723. if(!$core.assert($1)){
  724. $recv(mnu)._resignal();
  725. }
  726. throw $early=[$recv(aBlock)._value()];
  727. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  728. }, function($ctx2) {$ctx2.fillBlock({mnu:mnu},$ctx1,2)});
  729. //>>excludeEnd("ctx");
  730. }));
  731. return result;
  732. }
  733. catch(e) {if(e===$early)return e[0]; throw e}
  734. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  735. }, function($ctx1) {$ctx1.fill(self,"asAxisIn:ifAbsent:",{anObject:anObject,aBlock:aBlock,receiver:receiver,selector:selector,result:result},$globals.Array)});
  736. //>>excludeEnd("ctx");
  737. },
  738. //>>excludeStart("ide", pragmas.excludeIdeData);
  739. args: ["anObject", "aBlock"],
  740. 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",
  741. referencedClasses: ["MessageNotUnderstood"],
  742. //>>excludeEnd("ide");
  743. messageSends: ["first", "yourself", "on:do:", "perform:", "ifFalse:", "and:", "=", "selector", "message", "==", "receiver", "isEmpty", "arguments", "resignal", "value"]
  744. }),
  745. $globals.Array);
  746. $core.addMethod(
  747. $core.method({
  748. selector: "asAxisIn:ifAbsent:put:",
  749. protocol: "*Axxord",
  750. fn: function (anObject,aBlock,anotherObject){
  751. var self=this,$self=this;
  752. var receiver,selector,arguments_,result;
  753. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  754. return $core.withContext(function($ctx1) {
  755. //>>excludeEnd("ctx");
  756. var $5,$4,$3,$2,$1;
  757. var $early={};
  758. try {
  759. selector=$recv($self._first())._asMutator();
  760. receiver=$recv(anObject)._yourself();
  761. arguments_=[anotherObject];
  762. $recv((function(){
  763. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  764. return $core.withContext(function($ctx2) {
  765. //>>excludeEnd("ctx");
  766. result=$recv(receiver)._perform_withArguments_(selector,arguments_);
  767. return result;
  768. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  769. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  770. //>>excludeEnd("ctx");
  771. }))._on_do_($globals.MessageNotUnderstood,(function(mnu){
  772. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  773. return $core.withContext(function($ctx2) {
  774. //>>excludeEnd("ctx");
  775. $5=$recv(mnu)._message();
  776. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  777. $ctx2.sendIdx["message"]=1;
  778. //>>excludeEnd("ctx");
  779. $4=$recv($5)._selector();
  780. $3=$recv($4).__eq(selector);
  781. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  782. $ctx2.sendIdx["="]=1;
  783. //>>excludeEnd("ctx");
  784. $2=$recv($3)._and_((function(){
  785. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  786. return $core.withContext(function($ctx3) {
  787. //>>excludeEnd("ctx");
  788. return $recv($recv(mnu)._receiver()).__eq_eq(receiver);
  789. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  790. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  791. //>>excludeEnd("ctx");
  792. }));
  793. $1=$recv($2)._and_((function(){
  794. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  795. return $core.withContext(function($ctx3) {
  796. //>>excludeEnd("ctx");
  797. return $recv($recv($recv(mnu)._message())._arguments()).__eq(arguments_);
  798. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  799. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)});
  800. //>>excludeEnd("ctx");
  801. }));
  802. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  803. $ctx2.sendIdx["and:"]=1;
  804. //>>excludeEnd("ctx");
  805. if(!$core.assert($1)){
  806. $recv(mnu)._resignal();
  807. }
  808. throw $early=[$recv(aBlock)._value()];
  809. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  810. }, function($ctx2) {$ctx2.fillBlock({mnu:mnu},$ctx1,2)});
  811. //>>excludeEnd("ctx");
  812. }));
  813. return result;
  814. }
  815. catch(e) {if(e===$early)return e[0]; throw e}
  816. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  817. }, function($ctx1) {$ctx1.fill(self,"asAxisIn:ifAbsent:put:",{anObject:anObject,aBlock:aBlock,anotherObject:anotherObject,receiver:receiver,selector:selector,arguments_:arguments_,result:result},$globals.Array)});
  818. //>>excludeEnd("ctx");
  819. },
  820. //>>excludeStart("ide", pragmas.excludeIdeData);
  821. args: ["anObject", "aBlock", "anotherObject"],
  822. 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",
  823. referencedClasses: ["MessageNotUnderstood"],
  824. //>>excludeEnd("ide");
  825. messageSends: ["asMutator", "first", "yourself", "on:do:", "perform:withArguments:", "ifFalse:", "and:", "=", "selector", "message", "==", "receiver", "arguments", "resignal", "value"]
  826. }),
  827. $globals.Array);
  828. $core.addMethod(
  829. $core.method({
  830. selector: "asAxisIn:ifAbsent:",
  831. protocol: "*Axxord",
  832. fn: function (anObject,aBlock){
  833. var self=this,$self=this;
  834. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  835. return $core.withContext(function($ctx1) {
  836. //>>excludeEnd("ctx");
  837. return $recv(aBlock)._value();
  838. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  839. }, function($ctx1) {$ctx1.fill(self,"asAxisIn:ifAbsent:",{anObject:anObject,aBlock:aBlock},$globals.JSObjectProxy)});
  840. //>>excludeEnd("ctx");
  841. },
  842. //>>excludeStart("ide", pragmas.excludeIdeData);
  843. args: ["anObject", "aBlock"],
  844. source: "asAxisIn: anObject ifAbsent: aBlock\x0a\x09^ aBlock value",
  845. referencedClasses: [],
  846. //>>excludeEnd("ide");
  847. messageSends: ["value"]
  848. }),
  849. $globals.JSObjectProxy);
  850. $core.addMethod(
  851. $core.method({
  852. selector: "asAxisIn:ifAbsent:put:",
  853. protocol: "*Axxord",
  854. fn: function (anObject,aBlock,anotherObject){
  855. var self=this,$self=this;
  856. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  857. return $core.withContext(function($ctx1) {
  858. //>>excludeEnd("ctx");
  859. return $recv(aBlock)._value();
  860. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  861. }, function($ctx1) {$ctx1.fill(self,"asAxisIn:ifAbsent:put:",{anObject:anObject,aBlock:aBlock,anotherObject:anotherObject},$globals.JSObjectProxy)});
  862. //>>excludeEnd("ctx");
  863. },
  864. //>>excludeStart("ide", pragmas.excludeIdeData);
  865. args: ["anObject", "aBlock", "anotherObject"],
  866. source: "asAxisIn: anObject ifAbsent: aBlock put: anotherObject\x0a\x09^ aBlock value",
  867. referencedClasses: [],
  868. //>>excludeEnd("ide");
  869. messageSends: ["value"]
  870. }),
  871. $globals.JSObjectProxy);
  872. $core.addMethod(
  873. $core.method({
  874. selector: "atAxes:ifAbsent:",
  875. protocol: "*Axxord",
  876. fn: function (aCollection,aBlock){
  877. var self=this,$self=this;
  878. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  879. return $core.withContext(function($ctx1) {
  880. //>>excludeEnd("ctx");
  881. return $recv($globals.Axes)._on_at_ifAbsent_(self,aCollection,aBlock);
  882. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  883. }, function($ctx1) {$ctx1.fill(self,"atAxes:ifAbsent:",{aCollection:aCollection,aBlock:aBlock},$globals.JSObjectProxy)});
  884. //>>excludeEnd("ctx");
  885. },
  886. //>>excludeStart("ide", pragmas.excludeIdeData);
  887. args: ["aCollection", "aBlock"],
  888. source: "atAxes: aCollection ifAbsent: aBlock\x0a\x09^ Axes on: self at: aCollection ifAbsent: aBlock",
  889. referencedClasses: ["Axes"],
  890. //>>excludeEnd("ide");
  891. messageSends: ["on:at:ifAbsent:"]
  892. }),
  893. $globals.JSObjectProxy);
  894. $core.addMethod(
  895. $core.method({
  896. selector: "atAxes:ifAbsent:put:",
  897. protocol: "*Axxord",
  898. fn: function (aCollection,aBlock,value){
  899. var self=this,$self=this;
  900. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  901. return $core.withContext(function($ctx1) {
  902. //>>excludeEnd("ctx");
  903. return $recv($globals.Axes)._on_at_ifAbsent_put_(self,aCollection,aBlock,value);
  904. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  905. }, function($ctx1) {$ctx1.fill(self,"atAxes:ifAbsent:put:",{aCollection:aCollection,aBlock:aBlock,value:value},$globals.JSObjectProxy)});
  906. //>>excludeEnd("ctx");
  907. },
  908. //>>excludeStart("ide", pragmas.excludeIdeData);
  909. args: ["aCollection", "aBlock", "value"],
  910. source: "atAxes: aCollection ifAbsent: aBlock put: value\x0a\x09^ Axes on: self at: aCollection ifAbsent: aBlock put: value",
  911. referencedClasses: ["Axes"],
  912. //>>excludeEnd("ide");
  913. messageSends: ["on:at:ifAbsent:put:"]
  914. }),
  915. $globals.JSObjectProxy);
  916. $core.addMethod(
  917. $core.method({
  918. selector: "axes:consume:",
  919. protocol: "*Axxord",
  920. fn: function (aCollection,aBlock){
  921. var self=this,$self=this;
  922. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  923. return $core.withContext(function($ctx1) {
  924. //>>excludeEnd("ctx");
  925. return $recv($globals.Axes)._on_at_consume_(self,aCollection,aBlock);
  926. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  927. }, function($ctx1) {$ctx1.fill(self,"axes:consume:",{aCollection:aCollection,aBlock:aBlock},$globals.JSObjectProxy)});
  928. //>>excludeEnd("ctx");
  929. },
  930. //>>excludeStart("ide", pragmas.excludeIdeData);
  931. args: ["aCollection", "aBlock"],
  932. source: "axes: aCollection consume: aBlock\x0a\x09^ Axes on: self at: aCollection consume: aBlock",
  933. referencedClasses: ["Axes"],
  934. //>>excludeEnd("ide");
  935. messageSends: ["on:at:consume:"]
  936. }),
  937. $globals.JSObjectProxy);
  938. $core.addMethod(
  939. $core.method({
  940. selector: "axes:transform:",
  941. protocol: "*Axxord",
  942. fn: function (aCollection,aBlock){
  943. var self=this,$self=this;
  944. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  945. return $core.withContext(function($ctx1) {
  946. //>>excludeEnd("ctx");
  947. return $recv($globals.Axes)._on_at_transform_(self,aCollection,aBlock);
  948. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  949. }, function($ctx1) {$ctx1.fill(self,"axes:transform:",{aCollection:aCollection,aBlock:aBlock},$globals.JSObjectProxy)});
  950. //>>excludeEnd("ctx");
  951. },
  952. //>>excludeStart("ide", pragmas.excludeIdeData);
  953. args: ["aCollection", "aBlock"],
  954. source: "axes: aCollection transform: aBlock\x0a\x09^ Axes on: self at: aCollection transform: aBlock",
  955. referencedClasses: ["Axes"],
  956. //>>excludeEnd("ide");
  957. messageSends: ["on:at:transform:"]
  958. }),
  959. $globals.JSObjectProxy);
  960. $core.addMethod(
  961. $core.method({
  962. selector: "axxord",
  963. protocol: "*Axxord",
  964. fn: function (){
  965. var self=this,$self=this;
  966. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  967. return $core.withContext(function($ctx1) {
  968. //>>excludeEnd("ctx");
  969. return $self["@jsObject"].$axxord$;
  970. return self;
  971. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  972. }, function($ctx1) {$ctx1.fill(self,"axxord",{},$globals.JSObjectProxy)});
  973. //>>excludeEnd("ctx");
  974. },
  975. //>>excludeStart("ide", pragmas.excludeIdeData);
  976. args: [],
  977. source: "axxord\x0a<inlineJS: 'return $self[\x22@jsObject\x22].$axxord$'>",
  978. referencedClasses: [],
  979. //>>excludeEnd("ide");
  980. messageSends: []
  981. }),
  982. $globals.JSObjectProxy);
  983. $core.addMethod(
  984. $core.method({
  985. selector: "axxord:",
  986. protocol: "*Axxord",
  987. fn: function (anAxon){
  988. var self=this,$self=this;
  989. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  990. return $core.withContext(function($ctx1) {
  991. //>>excludeEnd("ctx");
  992. $self["@jsObject"].$axxord$ = anAxon;
  993. return self;
  994. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  995. }, function($ctx1) {$ctx1.fill(self,"axxord:",{anAxon:anAxon},$globals.JSObjectProxy)});
  996. //>>excludeEnd("ctx");
  997. },
  998. //>>excludeStart("ide", pragmas.excludeIdeData);
  999. args: ["anAxon"],
  1000. source: "axxord: anAxon\x0a<inlineJS: '$self[\x22@jsObject\x22].$axxord$ = anAxon'>",
  1001. referencedClasses: [],
  1002. //>>excludeEnd("ide");
  1003. messageSends: []
  1004. }),
  1005. $globals.JSObjectProxy);
  1006. $core.addMethod(
  1007. $core.method({
  1008. selector: "asAxisIn:ifAbsent:",
  1009. protocol: "*Axxord",
  1010. fn: function (anObject,aBlock){
  1011. var self=this,$self=this;
  1012. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1013. return $core.withContext(function($ctx1) {
  1014. //>>excludeEnd("ctx");
  1015. var $1;
  1016. var $early={};
  1017. try {
  1018. $1=$recv(anObject)._respondsTo_("at:ifAbsent:");
  1019. $recv($1)._ifTrue_ifFalse_((function(){
  1020. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1021. return $core.withContext(function($ctx2) {
  1022. //>>excludeEnd("ctx");
  1023. throw $early=[$recv(anObject)._at_ifAbsent_(self,aBlock)];
  1024. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1025. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1026. //>>excludeEnd("ctx");
  1027. }),aBlock);
  1028. return self;
  1029. }
  1030. catch(e) {if(e===$early)return e[0]; throw e}
  1031. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1032. }, function($ctx1) {$ctx1.fill(self,"asAxisIn:ifAbsent:",{anObject:anObject,aBlock:aBlock},$globals.Number)});
  1033. //>>excludeEnd("ctx");
  1034. },
  1035. //>>excludeStart("ide", pragmas.excludeIdeData);
  1036. args: ["anObject", "aBlock"],
  1037. source: "asAxisIn: anObject ifAbsent: aBlock\x0a\x09(anObject respondsTo: #at:ifAbsent:)\x0a\x09\x09ifTrue: [ ^ anObject at: self ifAbsent: aBlock ]\x0a\x09\x09ifFalse: aBlock",
  1038. referencedClasses: [],
  1039. //>>excludeEnd("ide");
  1040. messageSends: ["ifTrue:ifFalse:", "respondsTo:", "at:ifAbsent:"]
  1041. }),
  1042. $globals.Number);
  1043. $core.addMethod(
  1044. $core.method({
  1045. selector: "asAxisIn:ifAbsent:put:",
  1046. protocol: "*Axxord",
  1047. fn: function (anObject,aBlock,anotherObject){
  1048. var self=this,$self=this;
  1049. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1050. return $core.withContext(function($ctx1) {
  1051. //>>excludeEnd("ctx");
  1052. var $1;
  1053. var $early={};
  1054. try {
  1055. $1=$recv(anObject)._respondsTo_("at:put:");
  1056. $recv($1)._ifTrue_ifFalse_((function(){
  1057. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1058. return $core.withContext(function($ctx2) {
  1059. //>>excludeEnd("ctx");
  1060. throw $early=[$recv(anObject)._at_put_(self,anotherObject)];
  1061. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1062. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1063. //>>excludeEnd("ctx");
  1064. }),aBlock);
  1065. return self;
  1066. }
  1067. catch(e) {if(e===$early)return e[0]; throw e}
  1068. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1069. }, function($ctx1) {$ctx1.fill(self,"asAxisIn:ifAbsent:put:",{anObject:anObject,aBlock:aBlock,anotherObject:anotherObject},$globals.Number)});
  1070. //>>excludeEnd("ctx");
  1071. },
  1072. //>>excludeStart("ide", pragmas.excludeIdeData);
  1073. args: ["anObject", "aBlock", "anotherObject"],
  1074. 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",
  1075. referencedClasses: [],
  1076. //>>excludeEnd("ide");
  1077. messageSends: ["ifTrue:ifFalse:", "respondsTo:", "at:put:"]
  1078. }),
  1079. $globals.Number);
  1080. $core.addMethod(
  1081. $core.method({
  1082. selector: "asAxisIn:ifAbsent:",
  1083. protocol: "*Axxord",
  1084. fn: function (anObject,aBlock){
  1085. var self=this,$self=this;
  1086. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1087. return $core.withContext(function($ctx1) {
  1088. //>>excludeEnd("ctx");
  1089. return $recv(aBlock)._value();
  1090. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1091. }, function($ctx1) {$ctx1.fill(self,"asAxisIn:ifAbsent:",{anObject:anObject,aBlock:aBlock},$globals.Object)});
  1092. //>>excludeEnd("ctx");
  1093. },
  1094. //>>excludeStart("ide", pragmas.excludeIdeData);
  1095. args: ["anObject", "aBlock"],
  1096. source: "asAxisIn: anObject ifAbsent: aBlock\x0a\x09^ aBlock value",
  1097. referencedClasses: [],
  1098. //>>excludeEnd("ide");
  1099. messageSends: ["value"]
  1100. }),
  1101. $globals.Object);
  1102. $core.addMethod(
  1103. $core.method({
  1104. selector: "asAxisIn:ifAbsent:put:",
  1105. protocol: "*Axxord",
  1106. fn: function (anObject,aBlock,anotherObject){
  1107. var self=this,$self=this;
  1108. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1109. return $core.withContext(function($ctx1) {
  1110. //>>excludeEnd("ctx");
  1111. return $recv(aBlock)._value();
  1112. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1113. }, function($ctx1) {$ctx1.fill(self,"asAxisIn:ifAbsent:put:",{anObject:anObject,aBlock:aBlock,anotherObject:anotherObject},$globals.Object)});
  1114. //>>excludeEnd("ctx");
  1115. },
  1116. //>>excludeStart("ide", pragmas.excludeIdeData);
  1117. args: ["anObject", "aBlock", "anotherObject"],
  1118. source: "asAxisIn: anObject ifAbsent: aBlock put: anotherObject\x0a\x09^ aBlock value",
  1119. referencedClasses: [],
  1120. //>>excludeEnd("ide");
  1121. messageSends: ["value"]
  1122. }),
  1123. $globals.Object);
  1124. $core.addMethod(
  1125. $core.method({
  1126. selector: "atAxes:ifAbsent:",
  1127. protocol: "*Axxord",
  1128. fn: function (aCollection,aBlock){
  1129. var self=this,$self=this;
  1130. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1131. return $core.withContext(function($ctx1) {
  1132. //>>excludeEnd("ctx");
  1133. return $recv($globals.Axes)._on_at_ifAbsent_(self,aCollection,aBlock);
  1134. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1135. }, function($ctx1) {$ctx1.fill(self,"atAxes:ifAbsent:",{aCollection:aCollection,aBlock:aBlock},$globals.Object)});
  1136. //>>excludeEnd("ctx");
  1137. },
  1138. //>>excludeStart("ide", pragmas.excludeIdeData);
  1139. args: ["aCollection", "aBlock"],
  1140. source: "atAxes: aCollection ifAbsent: aBlock\x0a\x09^ Axes on: self at: aCollection ifAbsent: aBlock",
  1141. referencedClasses: ["Axes"],
  1142. //>>excludeEnd("ide");
  1143. messageSends: ["on:at:ifAbsent:"]
  1144. }),
  1145. $globals.Object);
  1146. $core.addMethod(
  1147. $core.method({
  1148. selector: "atAxes:ifAbsent:put:",
  1149. protocol: "*Axxord",
  1150. fn: function (aCollection,aBlock,value){
  1151. var self=this,$self=this;
  1152. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1153. return $core.withContext(function($ctx1) {
  1154. //>>excludeEnd("ctx");
  1155. return $recv($globals.Axes)._on_at_ifAbsent_put_(self,aCollection,aBlock,value);
  1156. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1157. }, function($ctx1) {$ctx1.fill(self,"atAxes:ifAbsent:put:",{aCollection:aCollection,aBlock:aBlock,value:value},$globals.Object)});
  1158. //>>excludeEnd("ctx");
  1159. },
  1160. //>>excludeStart("ide", pragmas.excludeIdeData);
  1161. args: ["aCollection", "aBlock", "value"],
  1162. source: "atAxes: aCollection ifAbsent: aBlock put: value\x0a\x09^ Axes on: self at: aCollection ifAbsent: aBlock put: value",
  1163. referencedClasses: ["Axes"],
  1164. //>>excludeEnd("ide");
  1165. messageSends: ["on:at:ifAbsent:put:"]
  1166. }),
  1167. $globals.Object);
  1168. $core.addMethod(
  1169. $core.method({
  1170. selector: "axes:consume:",
  1171. protocol: "*Axxord",
  1172. fn: function (aCollection,aBlock){
  1173. var self=this,$self=this;
  1174. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1175. return $core.withContext(function($ctx1) {
  1176. //>>excludeEnd("ctx");
  1177. return $recv($globals.Axes)._on_at_consume_(self,aCollection,aBlock);
  1178. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1179. }, function($ctx1) {$ctx1.fill(self,"axes:consume:",{aCollection:aCollection,aBlock:aBlock},$globals.Object)});
  1180. //>>excludeEnd("ctx");
  1181. },
  1182. //>>excludeStart("ide", pragmas.excludeIdeData);
  1183. args: ["aCollection", "aBlock"],
  1184. source: "axes: aCollection consume: aBlock\x0a\x09^ Axes on: self at: aCollection consume: aBlock",
  1185. referencedClasses: ["Axes"],
  1186. //>>excludeEnd("ide");
  1187. messageSends: ["on:at:consume:"]
  1188. }),
  1189. $globals.Object);
  1190. $core.addMethod(
  1191. $core.method({
  1192. selector: "axes:transform:",
  1193. protocol: "*Axxord",
  1194. fn: function (aCollection,aBlock){
  1195. var self=this,$self=this;
  1196. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1197. return $core.withContext(function($ctx1) {
  1198. //>>excludeEnd("ctx");
  1199. return $recv($globals.Axes)._on_at_transform_(self,aCollection,aBlock);
  1200. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1201. }, function($ctx1) {$ctx1.fill(self,"axes:transform:",{aCollection:aCollection,aBlock:aBlock},$globals.Object)});
  1202. //>>excludeEnd("ctx");
  1203. },
  1204. //>>excludeStart("ide", pragmas.excludeIdeData);
  1205. args: ["aCollection", "aBlock"],
  1206. source: "axes: aCollection transform: aBlock\x0a\x09^ Axes on: self at: aCollection transform: aBlock",
  1207. referencedClasses: ["Axes"],
  1208. //>>excludeEnd("ide");
  1209. messageSends: ["on:at:transform:"]
  1210. }),
  1211. $globals.Object);
  1212. $core.addMethod(
  1213. $core.method({
  1214. selector: "axxord",
  1215. protocol: "*Axxord",
  1216. fn: function (){
  1217. var self=this,$self=this;
  1218. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1219. return $core.withContext(function($ctx1) {
  1220. //>>excludeEnd("ctx");
  1221. return self.$axxord$;
  1222. return self;
  1223. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1224. }, function($ctx1) {$ctx1.fill(self,"axxord",{},$globals.Object)});
  1225. //>>excludeEnd("ctx");
  1226. },
  1227. //>>excludeStart("ide", pragmas.excludeIdeData);
  1228. args: [],
  1229. source: "axxord\x0a<inlineJS: 'return self.$axxord$'>",
  1230. referencedClasses: [],
  1231. //>>excludeEnd("ide");
  1232. messageSends: []
  1233. }),
  1234. $globals.Object);
  1235. $core.addMethod(
  1236. $core.method({
  1237. selector: "axxord:",
  1238. protocol: "*Axxord",
  1239. fn: function (anAxon){
  1240. var self=this,$self=this;
  1241. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1242. return $core.withContext(function($ctx1) {
  1243. //>>excludeEnd("ctx");
  1244. self.$axxord$ = anAxon;
  1245. return self;
  1246. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1247. }, function($ctx1) {$ctx1.fill(self,"axxord:",{anAxon:anAxon},$globals.Object)});
  1248. //>>excludeEnd("ctx");
  1249. },
  1250. //>>excludeStart("ide", pragmas.excludeIdeData);
  1251. args: ["anAxon"],
  1252. source: "axxord: anAxon\x0a<inlineJS: 'self.$axxord$ = anAxon'>",
  1253. referencedClasses: [],
  1254. //>>excludeEnd("ide");
  1255. messageSends: []
  1256. }),
  1257. $globals.Object);
  1258. $core.addMethod(
  1259. $core.method({
  1260. selector: "asAxisIn:ifAbsent:",
  1261. protocol: "*Axxord",
  1262. fn: function (anObject,aBlock){
  1263. var self=this,$self=this;
  1264. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1265. return $core.withContext(function($ctx1) {
  1266. //>>excludeEnd("ctx");
  1267. var $1;
  1268. var $early={};
  1269. try {
  1270. $1=$recv(anObject)._respondsTo_("at:ifAbsent:");
  1271. $recv($1)._ifTrue_ifFalse_((function(){
  1272. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1273. return $core.withContext(function($ctx2) {
  1274. //>>excludeEnd("ctx");
  1275. throw $early=[$recv(anObject)._at_ifAbsent_(self,aBlock)];
  1276. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1277. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1278. //>>excludeEnd("ctx");
  1279. }),aBlock);
  1280. return self;
  1281. }
  1282. catch(e) {if(e===$early)return e[0]; throw e}
  1283. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1284. }, function($ctx1) {$ctx1.fill(self,"asAxisIn:ifAbsent:",{anObject:anObject,aBlock:aBlock},$globals.String)});
  1285. //>>excludeEnd("ctx");
  1286. },
  1287. //>>excludeStart("ide", pragmas.excludeIdeData);
  1288. args: ["anObject", "aBlock"],
  1289. source: "asAxisIn: anObject ifAbsent: aBlock\x0a\x09(anObject respondsTo: #at:ifAbsent:)\x0a\x09\x09ifTrue: [ ^ anObject at: self ifAbsent: aBlock ]\x0a\x09\x09ifFalse: aBlock",
  1290. referencedClasses: [],
  1291. //>>excludeEnd("ide");
  1292. messageSends: ["ifTrue:ifFalse:", "respondsTo:", "at:ifAbsent:"]
  1293. }),
  1294. $globals.String);
  1295. $core.addMethod(
  1296. $core.method({
  1297. selector: "asAxisIn:ifAbsent:put:",
  1298. protocol: "*Axxord",
  1299. fn: function (anObject,aBlock,anotherObject){
  1300. var self=this,$self=this;
  1301. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1302. return $core.withContext(function($ctx1) {
  1303. //>>excludeEnd("ctx");
  1304. var $1;
  1305. var $early={};
  1306. try {
  1307. $1=$recv(anObject)._respondsTo_("at:put:");
  1308. $recv($1)._ifTrue_ifFalse_((function(){
  1309. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1310. return $core.withContext(function($ctx2) {
  1311. //>>excludeEnd("ctx");
  1312. throw $early=[$recv(anObject)._at_put_(self,anotherObject)];
  1313. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1314. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1315. //>>excludeEnd("ctx");
  1316. }),aBlock);
  1317. return self;
  1318. }
  1319. catch(e) {if(e===$early)return e[0]; throw e}
  1320. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1321. }, function($ctx1) {$ctx1.fill(self,"asAxisIn:ifAbsent:put:",{anObject:anObject,aBlock:aBlock,anotherObject:anotherObject},$globals.String)});
  1322. //>>excludeEnd("ctx");
  1323. },
  1324. //>>excludeStart("ide", pragmas.excludeIdeData);
  1325. args: ["anObject", "aBlock", "anotherObject"],
  1326. 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",
  1327. referencedClasses: [],
  1328. //>>excludeEnd("ide");
  1329. messageSends: ["ifTrue:ifFalse:", "respondsTo:", "at:put:"]
  1330. }),
  1331. $globals.String);
  1332. });