12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021 |
- define(["amber/boot", "amber_core/Kernel-Collections", "amber_core/Kernel-Exceptions", "amber_core/Kernel-Infrastructure", "amber_core/Kernel-Objects"], function($boot){"use strict";
- if(!$boot.nilAsReceiver)$boot.nilAsReceiver=$boot.nil;
- if(!("nilAsValue" in $boot))$boot.nilAsValue=$boot.nilAsReceiver;
- var $core=$boot.api,nil=$boot.nilAsValue,$nil=$boot.nilAsReceiver,$recv=$boot.asReceiver,$globals=$boot.globals;
- if(!$boot.nilAsClass)$boot.nilAsClass=$boot.dnu;
- $core.addPackage("Axxord");
- $core.packages["Axxord"].innerEval = function (expr) { return eval(expr); };
- $core.packages["Axxord"].transport = {"type":"amd","amdNamespace":"axxord"};
- $core.addClass("Axes", $globals.Object, [], "Axxord");
- $core.addMethod(
- $core.method({
- selector: "newInterestThru:doing:",
- protocol: "factory",
- fn: function (anAspect,aBlock){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- var $2,$3,$1,$5,$4;
- return $recv($recv($globals.PluggableInterest)._new())._accept_enact_((function(aspect){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx2) {
- //>>excludeEnd("ctx");
- $2=$recv(aspect)._size();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- $ctx2.sendIdx["size"]=1;
- //>>excludeEnd("ctx");
- $3=$recv(anAspect)._size();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- $ctx2.sendIdx["size"]=2;
- //>>excludeEnd("ctx");
- $1=$recv($2).__lt_eq($3);
- if($core.assert($1)){
- $5=$recv(aspect)._size();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- $ctx2.sendIdx["size"]=3;
- //>>excludeEnd("ctx");
- $4=$recv(anAspect)._copyFrom_to_((1),$5);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- $ctx2.sendIdx["copyFrom:to:"]=1;
- //>>excludeEnd("ctx");
- return $recv(aspect).__eq($4);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- $ctx2.sendIdx["="]=1;
- //>>excludeEnd("ctx");
- } else {
- return $recv(anAspect).__eq($recv(aspect)._copyFrom_to_((1),$recv(anAspect)._size()));
- }
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx2) {$ctx2.fillBlock({aspect:aspect},$ctx1,1)});
- //>>excludeEnd("ctx");
- }),aBlock);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"newInterestThru:doing:",{anAspect:anAspect,aBlock:aBlock},$globals.Axes.a$cls)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["anAspect", "aBlock"],
- 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",
- referencedClasses: ["PluggableInterest"],
- //>>excludeEnd("ide");
- messageSends: ["accept:enact:", "new", "ifTrue:ifFalse:", "<=", "size", "=", "copyFrom:to:"]
- }),
- $globals.Axes.a$cls);
- $core.addMethod(
- $core.method({
- selector: "newInterestUpTo:doing:",
- protocol: "factory",
- fn: function (anAspect,aBlock){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- var $2,$3,$1;
- return $recv($recv($globals.PluggableInterest)._new())._accept_enact_((function(changedAspect){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx2) {
- //>>excludeEnd("ctx");
- $2=$recv(changedAspect)._size();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- $ctx2.sendIdx["size"]=1;
- //>>excludeEnd("ctx");
- $3=$recv(anAspect)._size();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- $ctx2.sendIdx["size"]=2;
- //>>excludeEnd("ctx");
- $1=$recv($2).__lt_eq($3);
- return $recv($1)._and_((function(){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx3) {
- //>>excludeEnd("ctx");
- return $recv(changedAspect).__eq($recv(anAspect)._copyFrom_to_((1),$recv(changedAspect)._size()));
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
- //>>excludeEnd("ctx");
- }));
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx2) {$ctx2.fillBlock({changedAspect:changedAspect},$ctx1,1)});
- //>>excludeEnd("ctx");
- }),aBlock);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"newInterestUpTo:doing:",{anAspect:anAspect,aBlock:aBlock},$globals.Axes.a$cls)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["anAspect", "aBlock"],
- 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",
- referencedClasses: ["PluggableInterest"],
- //>>excludeEnd("ide");
- messageSends: ["accept:enact:", "new", "and:", "<=", "size", "=", "copyFrom:to:"]
- }),
- $globals.Axes.a$cls);
- $core.addMethod(
- $core.method({
- selector: "on:at:consume:",
- protocol: "delegated",
- fn: function (anObject,aCollection,aBlock){
- var self=this,$self=this;
- var value;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- var $early={};
- try {
- value=$recv(anObject)._atAxes_ifAbsent_(aCollection,(function(){
- throw $early=[anObject];
- }));
- return $recv(aBlock)._value_(value);
- }
- catch(e) {if(e===$early)return e[0]; throw e}
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"on:at:consume:",{anObject:anObject,aCollection:aCollection,aBlock:aBlock,value:value},$globals.Axes.a$cls)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["anObject", "aCollection", "aBlock"],
- source: "on: anObject at: aCollection consume: aBlock\x0a\x09| value |\x0a\x09value := anObject atAxes: aCollection ifAbsent: [ ^ anObject ].\x0a\x09^ aBlock value: value",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: ["atAxes:ifAbsent:", "value:"]
- }),
- $globals.Axes.a$cls);
- $core.addMethod(
- $core.method({
- selector: "on:at:ifAbsent:",
- protocol: "delegated",
- fn: function (anObject,aCollection,aBlock){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- var $early={};
- try {
- return $recv(aCollection)._inject_into_(anObject,(function(soFar,segment){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx2) {
- //>>excludeEnd("ctx");
- return $recv(segment)._asAxisIn_ifAbsent_(soFar,(function(){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx3) {
- //>>excludeEnd("ctx");
- throw $early=[$recv(aBlock)._value()];
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
- //>>excludeEnd("ctx");
- }));
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx2) {$ctx2.fillBlock({soFar:soFar,segment:segment},$ctx1,1)});
- //>>excludeEnd("ctx");
- }));
- }
- catch(e) {if(e===$early)return e[0]; throw e}
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"on:at:ifAbsent:",{anObject:anObject,aCollection:aCollection,aBlock:aBlock},$globals.Axes.a$cls)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["anObject", "aCollection", "aBlock"],
- source: "on: anObject at: aCollection ifAbsent: aBlock\x0a\x09^ aCollection inject: anObject into: [ :soFar :segment |\x0a\x09\x09segment asAxisIn: soFar ifAbsent: [ ^ aBlock value ]]",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: ["inject:into:", "asAxisIn:ifAbsent:", "value"]
- }),
- $globals.Axes.a$cls);
- $core.addMethod(
- $core.method({
- selector: "on:at:ifAbsent:put:",
- protocol: "delegated",
- fn: function (anObject,aCollection,aBlock,value){
- var self=this,$self=this;
- var penultimate;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- penultimate=$recv(anObject)._atAxes_ifAbsent_($recv(aCollection)._allButLast(),aBlock);
- return $recv($recv(aCollection)._last())._asAxisIn_ifAbsent_put_(penultimate,aBlock,value);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"on:at:ifAbsent:put:",{anObject:anObject,aCollection:aCollection,aBlock:aBlock,value:value,penultimate:penultimate},$globals.Axes.a$cls)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["anObject", "aCollection", "aBlock", "value"],
- 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",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: ["atAxes:ifAbsent:", "allButLast", "asAxisIn:ifAbsent:put:", "last"]
- }),
- $globals.Axes.a$cls);
- $core.addMethod(
- $core.method({
- selector: "on:at:transform:",
- protocol: "delegated",
- fn: function (anObject,aCollection,aBlock){
- var self=this,$self=this;
- var value,newValue;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- var $1,$2,$receiver;
- var $early={};
- try {
- value=$recv(anObject)._atAxes_ifAbsent_(aCollection,(function(){
- throw $early=[anObject];
- }));
- newValue=$recv(aBlock)._value_(value);
- $1=$recv(value).__eq_eq(newValue);
- if(!$core.assert($1)){
- $recv(anObject)._atAxes_ifAbsent_put_(aCollection,(function(){
- throw $early=[anObject];
- }),newValue);
- }
- $2=$recv(anObject)._axxord();
- if(($receiver = $2) == null || $receiver.a$nil){
- $2;
- } else {
- var axon;
- axon=$receiver;
- $recv(axon)._changed_(aCollection);
- }
- return self;
- }
- catch(e) {if(e===$early)return e[0]; throw e}
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"on:at:transform:",{anObject:anObject,aCollection:aCollection,aBlock:aBlock,value:value,newValue:newValue},$globals.Axes.a$cls)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["anObject", "aCollection", "aBlock"],
- 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]",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: ["atAxes:ifAbsent:", "value:", "ifFalse:", "==", "atAxes:ifAbsent:put:", "ifNotNil:", "axxord", "changed:"]
- }),
- $globals.Axes.a$cls);
- $core.addMethod(
- $core.method({
- selector: "parse:",
- protocol: "parsing",
- fn: function (message){
- var self=this,$self=this;
- var result,stack,anArray;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- var $1,$2,$3,$5,$4,$6,$7,$8,$9,$10,$11;
- anArray=$recv(message)._tokenize_(" ");
- result=[];
- stack=[result];
- $recv(anArray)._do_((function(each){
- var asNum,inner,close;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx2) {
- //>>excludeEnd("ctx");
- close=(0);
- close;
- inner=each;
- inner;
- $recv((function(){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx3) {
- //>>excludeEnd("ctx");
- $1=$recv(inner)._notEmpty();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- $ctx3.sendIdx["notEmpty"]=1;
- //>>excludeEnd("ctx");
- return $recv($1)._and_((function(){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx4) {
- //>>excludeEnd("ctx");
- $2=$recv(inner)._first();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- $ctx4.sendIdx["first"]=1;
- //>>excludeEnd("ctx");
- return $recv($2).__eq("(");
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- $ctx4.sendIdx["="]=1;
- //>>excludeEnd("ctx");
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)});
- //>>excludeEnd("ctx");
- }));
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- $ctx3.sendIdx["and:"]=1;
- //>>excludeEnd("ctx");
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
- //>>excludeEnd("ctx");
- }))._whileTrue_((function(){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx3) {
- //>>excludeEnd("ctx");
- inner=$recv(inner)._allButFirst();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- $ctx3.sendIdx["allButFirst"]=1;
- //>>excludeEnd("ctx");
- inner;
- $3=stack;
- $5=$recv(stack)._last();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- $ctx3.sendIdx["last"]=1;
- //>>excludeEnd("ctx");
- $4=$recv($5)._add_([]);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- $ctx3.sendIdx["add:"]=2;
- //>>excludeEnd("ctx");
- return $recv($3)._add_($4);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- $ctx3.sendIdx["add:"]=1;
- //>>excludeEnd("ctx");
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)});
- //>>excludeEnd("ctx");
- }));
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- $ctx2.sendIdx["whileTrue:"]=1;
- //>>excludeEnd("ctx");
- $recv((function(){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx3) {
- //>>excludeEnd("ctx");
- $6=$recv(inner)._notEmpty();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- $ctx3.sendIdx["notEmpty"]=2;
- //>>excludeEnd("ctx");
- return $recv($6)._and_((function(){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx4) {
- //>>excludeEnd("ctx");
- $7=$recv(inner)._last();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- $ctx4.sendIdx["last"]=2;
- //>>excludeEnd("ctx");
- return $recv($7).__eq(")");
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- $ctx4.sendIdx["="]=2;
- //>>excludeEnd("ctx");
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx4) {$ctx4.fillBlock({},$ctx3,6)});
- //>>excludeEnd("ctx");
- }));
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- $ctx3.sendIdx["and:"]=2;
- //>>excludeEnd("ctx");
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx3) {$ctx3.fillBlock({},$ctx2,5)});
- //>>excludeEnd("ctx");
- }))._whileTrue_((function(){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx3) {
- //>>excludeEnd("ctx");
- inner=$recv(inner)._allButLast();
- inner;
- close=$recv(close).__plus((1));
- return close;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx3) {$ctx3.fillBlock({},$ctx2,7)});
- //>>excludeEnd("ctx");
- }));
- $8=$recv($recv(inner)._notEmpty())._and_((function(){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx3) {
- //>>excludeEnd("ctx");
- return $recv($recv(inner)._first()).__eq("~");
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- $ctx3.sendIdx["="]=3;
- //>>excludeEnd("ctx");
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx3) {$ctx3.fillBlock({},$ctx2,8)});
- //>>excludeEnd("ctx");
- }));
- if($core.assert($8)){
- inner=[$recv(inner)._allButFirst()];
- inner;
- }
- $9=$recv(inner)._isString();
- if($core.assert($9)){
- asNum=$recv($recv(inner)._ifEmpty_((function(){
- return "NaN";
- })))._asNumber();
- } else {
- asNum=inner;
- }
- asNum;
- $10=$recv(asNum).__eq(asNum);
- if($core.assert($10)){
- $11=$recv(stack)._last();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- $ctx2.sendIdx["last"]=3;
- //>>excludeEnd("ctx");
- $recv($11)._add_(asNum);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- $ctx2.sendIdx["add:"]=3;
- //>>excludeEnd("ctx");
- } else {
- $recv(inner)._ifNotEmpty_((function(){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx3) {
- //>>excludeEnd("ctx");
- return $recv($recv(stack)._last())._add_(inner);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx3) {$ctx3.fillBlock({},$ctx2,15)});
- //>>excludeEnd("ctx");
- }));
- }
- return $recv(close)._timesRepeat_((function(){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx3) {
- //>>excludeEnd("ctx");
- return $recv(stack)._removeLast();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx3) {$ctx3.fillBlock({},$ctx2,16)});
- //>>excludeEnd("ctx");
- }));
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx2) {$ctx2.fillBlock({each:each,asNum:asNum,inner:inner,close:close},$ctx1,1)});
- //>>excludeEnd("ctx");
- }));
- return result;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"parse:",{message:message,result:result,stack:stack,anArray:anArray},$globals.Axes.a$cls)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["message"],
- 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",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: ["tokenize:", "do:", "whileTrue:", "and:", "notEmpty", "=", "first", "allButFirst", "add:", "last", "allButLast", "+", "ifTrue:", "ifTrue:ifFalse:", "isString", "asNumber", "ifEmpty:", "ifNotEmpty:", "timesRepeat:", "removeLast"]
- }),
- $globals.Axes.a$cls);
- $core.addClass("Axolator", $globals.Object, ["root"], "Axxord");
- $core.addMethod(
- $core.method({
- selector: "model:modify:",
- protocol: "action",
- fn: function (anEavModel,aBlock){
- var self=this,$self=this;
- var newValue;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- newValue=$recv(aBlock)._value_($recv(anEavModel)._on_(self));
- $recv(anEavModel)._on_put_(self,$recv(newValue)._deepCopy());
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"model:modify:",{anEavModel:anEavModel,aBlock:aBlock,newValue:newValue},$globals.Axolator)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["anEavModel", "aBlock"],
- source: "model: anEavModel modify: aBlock\x0a\x0a| newValue |\x0anewValue := aBlock value: (anEavModel on: self).\x0aanEavModel on: self put: newValue deepCopy",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: ["value:", "on:", "on:put:", "deepCopy"]
- }),
- $globals.Axolator);
- $core.addMethod(
- $core.method({
- selector: "model:read:",
- protocol: "action",
- fn: function (anEavModel,aBlock){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- $recv(aBlock)._value_($recv($recv(anEavModel)._on_(self))._deepCopy());
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"model:read:",{anEavModel:anEavModel,aBlock:aBlock},$globals.Axolator)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["anEavModel", "aBlock"],
- source: "model: anEavModel read: aBlock\x0a\x0aaBlock value: (anEavModel on: self) deepCopy",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: ["value:", "deepCopy", "on:"]
- }),
- $globals.Axolator);
- $core.addMethod(
- $core.method({
- selector: "root",
- protocol: "accessing",
- fn: function (){
- var self=this,$self=this;
- return $self["@root"];
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "root\x0a\x0a^root",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: []
- }),
- $globals.Axolator);
- $core.addMethod(
- $core.method({
- selector: "root:",
- protocol: "accessing",
- fn: function (anObject){
- var self=this,$self=this;
- $self["@root"]=anObject;
- return self;
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["anObject"],
- source: "root: anObject\x0a\x0aroot := anObject",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: []
- }),
- $globals.Axolator);
- $core.addMethod(
- $core.method({
- selector: "on:",
- protocol: "instance creation",
- fn: function (anObject){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($self._new())._root_(anObject);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"on:",{anObject:anObject},$globals.Axolator.a$cls)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["anObject"],
- source: "on: anObject\x0a^self new root: anObject",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: ["root:", "new"]
- }),
- $globals.Axolator.a$cls);
- $core.addClass("Axon", $globals.Object, ["factory"], "Axxord");
- //>>excludeStart("ide", pragmas.excludeIdeData);
- $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";
- //>>excludeEnd("ide");
- $core.addMethod(
- $core.method({
- selector: "add:",
- protocol: "primitive ops",
- fn: function (anInterest){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- $self._subclassResponsibility();
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"add:",{anInterest:anInterest},$globals.Axon)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["anInterest"],
- source: "add: anInterest\x0a\x09self subclassResponsibility",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: ["subclassResponsibility"]
- }),
- $globals.Axon);
- $core.addMethod(
- $core.method({
- selector: "addInterest:",
- protocol: "accessing",
- fn: function (anInterest){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- var $1;
- $recv(anInterest)._flag();
- $1=$recv(anInterest)._yourself();
- $self._add_($1);
- $self._dirty_(true);
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"addInterest:",{anInterest:anInterest},$globals.Axon)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["anInterest"],
- source: "addInterest: anInterest\x0a\x09self\x0a\x09\x09add: (anInterest flag; yourself);\x0a\x09\x09dirty: true",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: ["add:", "flag", "yourself", "dirty:"]
- }),
- $globals.Axon);
- $core.addMethod(
- $core.method({
- selector: "changed:",
- protocol: "change-update",
- fn: function (anAspect){
- var self=this,$self=this;
- var needsToRun;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- var $1;
- needsToRun=false;
- $self._do_((function(each){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx2) {
- //>>excludeEnd("ctx");
- $1=$recv(each)._accepts_(anAspect);
- if($core.assert($1)){
- $recv(each)._flag();
- needsToRun=true;
- return needsToRun;
- }
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
- //>>excludeEnd("ctx");
- }));
- $self._dirty_(needsToRun);
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"changed:",{anAspect:anAspect,needsToRun:needsToRun},$globals.Axon)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["anAspect"],
- 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",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: ["do:", "ifTrue:", "accepts:", "flag", "dirty:"]
- }),
- $globals.Axon);
- $core.addMethod(
- $core.method({
- selector: "changedAll",
- protocol: "change-update",
- fn: function (){
- var self=this,$self=this;
- var needsToRun;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- needsToRun=false;
- $self._do_((function(each){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx2) {
- //>>excludeEnd("ctx");
- $recv(each)._flag();
- needsToRun=true;
- return needsToRun;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
- //>>excludeEnd("ctx");
- }));
- $self._dirty_(needsToRun);
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"changedAll",{needsToRun:needsToRun},$globals.Axon)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "changedAll\x0a\x09| needsToRun |\x0a\x09needsToRun := false.\x0a\x09self do: [ :each |\x0a\x09\x09each flag.\x0a\x09\x09needsToRun := true ].\x0a\x09self dirty: needsToRun",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: ["do:", "flag", "dirty:"]
- }),
- $globals.Axon);
- $core.addMethod(
- $core.method({
- selector: "clean",
- protocol: "primitive ops",
- fn: function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- $self._subclassResponsibility();
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"clean",{},$globals.Axon)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "clean\x0a\x09self subclassResponsibility",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: ["subclassResponsibility"]
- }),
- $globals.Axon);
- $core.addMethod(
- $core.method({
- selector: "dirty:",
- protocol: "private",
- fn: function (aBoolean){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- if($core.assert(aBoolean)){
- $recv((function(){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx2) {
- //>>excludeEnd("ctx");
- return $self._run();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
- //>>excludeEnd("ctx");
- }))._fork();
- }
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"dirty:",{aBoolean:aBoolean},$globals.Axon)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aBoolean"],
- source: "dirty: aBoolean\x0a\x09aBoolean ifTrue: [[ self run ] fork]",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: ["ifTrue:", "fork", "run"]
- }),
- $globals.Axon);
- $core.addMethod(
- $core.method({
- selector: "do:",
- protocol: "primitive ops",
- fn: function (aBlock){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- $self._subclassResponsibility();
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"do:",{aBlock:aBlock},$globals.Axon)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aBlock"],
- source: "do: aBlock\x0a\x09self subclassResponsibility",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: ["subclassResponsibility"]
- }),
- $globals.Axon);
- $core.addMethod(
- $core.method({
- selector: "run",
- protocol: "private",
- fn: function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- var $1,$2,$3;
- $recv((function(){
- var needsClean;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx2) {
- //>>excludeEnd("ctx");
- needsClean=false;
- needsClean;
- $self._do_((function(each){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx3) {
- //>>excludeEnd("ctx");
- $1=$recv(each)._isFlagged();
- if($core.assert($1)){
- $recv(each)._run();
- }
- $2=$recv(each)._isClosed();
- if($core.assert($2)){
- needsClean=true;
- return needsClean;
- }
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)});
- //>>excludeEnd("ctx");
- }));
- $3=needsClean;
- if($core.assert($3)){
- return $self._clean();
- }
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx2) {$ctx2.fillBlock({needsClean:needsClean},$ctx1,1)});
- //>>excludeEnd("ctx");
- }))._on_do_($globals.Error,(function(){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx2) {
- //>>excludeEnd("ctx");
- return $self._dirty_(true);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1,6)});
- //>>excludeEnd("ctx");
- }));
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"run",{},$globals.Axon)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- 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 ]",
- referencedClasses: ["Error"],
- //>>excludeEnd("ide");
- messageSends: ["on:do:", "do:", "ifTrue:", "isFlagged", "run", "isClosed", "clean", "dirty:"]
- }),
- $globals.Axon);
- $core.addClass("SimpleAxon", $globals.Axon, ["queue"], "Axxord");
- $core.addMethod(
- $core.method({
- selector: "add:",
- protocol: "primitive ops",
- fn: function (aSubscription){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- $recv($self["@queue"])._add_(aSubscription);
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"add:",{aSubscription:aSubscription},$globals.SimpleAxon)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aSubscription"],
- source: "add: aSubscription\x0a\x09queue add: aSubscription.",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: ["add:"]
- }),
- $globals.SimpleAxon);
- $core.addMethod(
- $core.method({
- selector: "clean",
- protocol: "primitive ops",
- fn: function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- $self["@queue"]=$recv($self["@queue"])._reject_((function(each){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx2) {
- //>>excludeEnd("ctx");
- return $recv(each)._isClosed();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
- //>>excludeEnd("ctx");
- }));
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"clean",{},$globals.SimpleAxon)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "clean\x0a\x09queue := queue reject: [ :each | each isClosed ]",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: ["reject:", "isClosed"]
- }),
- $globals.SimpleAxon);
- $core.addMethod(
- $core.method({
- selector: "do:",
- protocol: "primitive ops",
- fn: function (aBlock){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- $recv($self["@queue"])._do_(aBlock);
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"do:",{aBlock:aBlock},$globals.SimpleAxon)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aBlock"],
- source: "do: aBlock\x0a\x09queue do: aBlock",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: ["do:"]
- }),
- $globals.SimpleAxon);
- $core.addMethod(
- $core.method({
- selector: "initialize",
- protocol: "initialization",
- fn: function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- (
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- $ctx1.supercall = true,
- //>>excludeEnd("ctx");
- ($globals.SimpleAxon.superclass||$boot.nilAsClass).fn.prototype._initialize.apply($self, []));
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- $ctx1.supercall = false;
- //>>excludeEnd("ctx");;
- $self["@queue"]=$recv($globals.OrderedCollection)._new();
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.SimpleAxon)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "initialize\x0a super initialize.\x0a\x09queue := OrderedCollection new",
- referencedClasses: ["OrderedCollection"],
- //>>excludeEnd("ide");
- messageSends: ["initialize", "new"]
- }),
- $globals.SimpleAxon);
- $core.addClass("AxonInterest", $globals.Object, ["flagged"], "Axxord");
- $core.addMethod(
- $core.method({
- selector: "accepts:",
- protocol: "testing",
- fn: function (anAspect){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- $self._subclassResponsibility();
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"accepts:",{anAspect:anAspect},$globals.AxonInterest)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["anAspect"],
- source: "accepts: anAspect\x0a \x22Should return true if change for anAspect is relevant for this AxonInterest\x22\x0a self subclassResponsibility",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: ["subclassResponsibility"]
- }),
- $globals.AxonInterest);
- $core.addMethod(
- $core.method({
- selector: "close",
- protocol: "action",
- fn: function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- $self._subclassResponsibility();
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"close",{},$globals.AxonInterest)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "close\x0a\x09self subclassResponsibility",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: ["subclassResponsibility"]
- }),
- $globals.AxonInterest);
- $core.addMethod(
- $core.method({
- selector: "enact",
- protocol: "action",
- fn: function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- $self._subclassResponsibility();
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"enact",{},$globals.AxonInterest)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "enact\x0a\x09self subclassResponsibility",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: ["subclassResponsibility"]
- }),
- $globals.AxonInterest);
- $core.addMethod(
- $core.method({
- selector: "flag",
- protocol: "accessing",
- fn: function (){
- var self=this,$self=this;
- $self["@flagged"]=true;
- return self;
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "flag\x0a\x09flagged := true",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: []
- }),
- $globals.AxonInterest);
- $core.addMethod(
- $core.method({
- selector: "initialize",
- protocol: "initialization",
- fn: function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- (
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- $ctx1.supercall = true,
- //>>excludeEnd("ctx");
- ($globals.AxonInterest.superclass||$boot.nilAsClass).fn.prototype._initialize.apply($self, []));
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- $ctx1.supercall = false;
- //>>excludeEnd("ctx");;
- $self["@flagged"]=false;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.AxonInterest)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "initialize\x0a\x09super initialize.\x0a flagged := false.",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: ["initialize"]
- }),
- $globals.AxonInterest);
- $core.addMethod(
- $core.method({
- selector: "isClosed",
- protocol: "testing",
- fn: function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- $self._subclassResponsibility();
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"isClosed",{},$globals.AxonInterest)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "isClosed\x0a\x09self subclassResponsibility",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: ["subclassResponsibility"]
- }),
- $globals.AxonInterest);
- $core.addMethod(
- $core.method({
- selector: "isFlagged",
- protocol: "testing",
- fn: function (){
- var self=this,$self=this;
- return $self["@flagged"];
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "isFlagged\x0a\x09^flagged",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: []
- }),
- $globals.AxonInterest);
- $core.addMethod(
- $core.method({
- selector: "run",
- protocol: "action",
- fn: function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- $recv((function(){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx2) {
- //>>excludeEnd("ctx");
- $self["@flagged"]=false;
- $self["@flagged"];
- return $self._enact();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
- //>>excludeEnd("ctx");
- }))._on_do_($globals.AxonOff,(function(){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx2) {
- //>>excludeEnd("ctx");
- return $self._close();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
- //>>excludeEnd("ctx");
- }));
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"run",{},$globals.AxonInterest)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "run\x0a\x09[ flagged := false. self enact ]\x0a on: AxonOff do: [ self close ]",
- referencedClasses: ["AxonOff"],
- //>>excludeEnd("ide");
- messageSends: ["on:do:", "enact", "close"]
- }),
- $globals.AxonInterest);
- $core.addClass("PluggableInterest", $globals.AxonInterest, ["acceptBlock", "enactBlock"], "Axxord");
- $core.addMethod(
- $core.method({
- selector: "accept:enact:",
- protocol: "accessing",
- fn: function (aBlock,anotherBlock){
- var self=this,$self=this;
- $self["@acceptBlock"]=aBlock;
- $self["@enactBlock"]=anotherBlock;
- return self;
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aBlock", "anotherBlock"],
- source: "accept: aBlock enact: anotherBlock\x0a\x09acceptBlock := aBlock.\x0a enactBlock := anotherBlock",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: []
- }),
- $globals.PluggableInterest);
- $core.addMethod(
- $core.method({
- selector: "accepts:",
- protocol: "testing",
- fn: function (anAspect){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($self["@acceptBlock"])._value_(anAspect);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"accepts:",{anAspect:anAspect},$globals.PluggableInterest)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["anAspect"],
- source: "accepts: anAspect\x0a ^ acceptBlock value: anAspect",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: ["value:"]
- }),
- $globals.PluggableInterest);
- $core.addMethod(
- $core.method({
- selector: "close",
- protocol: "action",
- fn: function (){
- var self=this,$self=this;
- $self["@acceptBlock"]=nil;
- $self["@enactBlock"]=nil;
- return self;
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "close\x0a\x09acceptBlock := nil.\x0a\x09enactBlock := nil",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: []
- }),
- $globals.PluggableInterest);
- $core.addMethod(
- $core.method({
- selector: "enact",
- protocol: "action",
- fn: function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- $recv($self["@enactBlock"])._value();
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"enact",{},$globals.PluggableInterest)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "enact\x0a\x09enactBlock value",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: ["value"]
- }),
- $globals.PluggableInterest);
- $core.addMethod(
- $core.method({
- selector: "initialize",
- protocol: "initialization",
- fn: function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- (
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- $ctx1.supercall = true,
- //>>excludeEnd("ctx");
- ($globals.PluggableInterest.superclass||$boot.nilAsClass).fn.prototype._initialize.apply($self, []));
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- $ctx1.supercall = false;
- //>>excludeEnd("ctx");;
- $self._close();
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.PluggableInterest)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "initialize\x0a\x09super initialize.\x0a self close",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: ["initialize", "close"]
- }),
- $globals.PluggableInterest);
- $core.addMethod(
- $core.method({
- selector: "isClosed",
- protocol: "testing",
- fn: function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($self["@acceptBlock"])._isNil();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"isClosed",{},$globals.PluggableInterest)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "isClosed\x0a\x09^ acceptBlock isNil",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: ["isNil"]
- }),
- $globals.PluggableInterest);
- $core.addClass("AxonOff", $globals.Error, [], "Axxord");
- //>>excludeStart("ide", pragmas.excludeIdeData);
- $globals.AxonOff.comment="Signal me from the subscription block to unsubscribe it.";
- //>>excludeEnd("ide");
- $core.addMethod(
- $core.method({
- selector: "asAxisIn:ifAbsent:",
- protocol: "*Axxord",
- fn: function (anObject,aBlock){
- var self=this,$self=this;
- var receiver,selector,result;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- var $5,$4,$3,$2,$1;
- var $early={};
- try {
- selector=$self._first();
- receiver=$recv(anObject)._yourself();
- $recv((function(){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx2) {
- //>>excludeEnd("ctx");
- result=$recv(receiver)._perform_(selector);
- return result;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
- //>>excludeEnd("ctx");
- }))._on_do_($globals.MessageNotUnderstood,(function(mnu){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx2) {
- //>>excludeEnd("ctx");
- $5=$recv(mnu)._message();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- $ctx2.sendIdx["message"]=1;
- //>>excludeEnd("ctx");
- $4=$recv($5)._selector();
- $3=$recv($4).__eq(selector);
- $2=$recv($3)._and_((function(){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx3) {
- //>>excludeEnd("ctx");
- return $recv($recv(mnu)._receiver()).__eq_eq(receiver);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
- //>>excludeEnd("ctx");
- }));
- $1=$recv($2)._and_((function(){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx3) {
- //>>excludeEnd("ctx");
- return $recv($recv($recv(mnu)._message())._arguments())._isEmpty();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)});
- //>>excludeEnd("ctx");
- }));
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- $ctx2.sendIdx["and:"]=1;
- //>>excludeEnd("ctx");
- if(!$core.assert($1)){
- $recv(mnu)._resignal();
- }
- throw $early=[$recv(aBlock)._value()];
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx2) {$ctx2.fillBlock({mnu:mnu},$ctx1,2)});
- //>>excludeEnd("ctx");
- }));
- return result;
- }
- catch(e) {if(e===$early)return e[0]; throw e}
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"asAxisIn:ifAbsent:",{anObject:anObject,aBlock:aBlock,receiver:receiver,selector:selector,result:result},$globals.Array)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["anObject", "aBlock"],
- 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",
- referencedClasses: ["MessageNotUnderstood"],
- //>>excludeEnd("ide");
- messageSends: ["first", "yourself", "on:do:", "perform:", "ifFalse:", "and:", "=", "selector", "message", "==", "receiver", "isEmpty", "arguments", "resignal", "value"]
- }),
- $globals.Array);
- $core.addMethod(
- $core.method({
- selector: "asAxisIn:ifAbsent:put:",
- protocol: "*Axxord",
- fn: function (anObject,aBlock,anotherObject){
- var self=this,$self=this;
- var receiver,selector,arguments_,result;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- var $5,$4,$3,$2,$1;
- var $early={};
- try {
- selector=$recv($self._first())._asMutator();
- receiver=$recv(anObject)._yourself();
- arguments_=[anotherObject];
- $recv((function(){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx2) {
- //>>excludeEnd("ctx");
- result=$recv(receiver)._perform_withArguments_(selector,arguments_);
- return result;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
- //>>excludeEnd("ctx");
- }))._on_do_($globals.MessageNotUnderstood,(function(mnu){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx2) {
- //>>excludeEnd("ctx");
- $5=$recv(mnu)._message();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- $ctx2.sendIdx["message"]=1;
- //>>excludeEnd("ctx");
- $4=$recv($5)._selector();
- $3=$recv($4).__eq(selector);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- $ctx2.sendIdx["="]=1;
- //>>excludeEnd("ctx");
- $2=$recv($3)._and_((function(){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx3) {
- //>>excludeEnd("ctx");
- return $recv($recv(mnu)._receiver()).__eq_eq(receiver);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
- //>>excludeEnd("ctx");
- }));
- $1=$recv($2)._and_((function(){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx3) {
- //>>excludeEnd("ctx");
- return $recv($recv($recv(mnu)._message())._arguments()).__eq(arguments_);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)});
- //>>excludeEnd("ctx");
- }));
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- $ctx2.sendIdx["and:"]=1;
- //>>excludeEnd("ctx");
- if(!$core.assert($1)){
- $recv(mnu)._resignal();
- }
- throw $early=[$recv(aBlock)._value()];
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx2) {$ctx2.fillBlock({mnu:mnu},$ctx1,2)});
- //>>excludeEnd("ctx");
- }));
- return result;
- }
- catch(e) {if(e===$early)return e[0]; throw e}
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"asAxisIn:ifAbsent:put:",{anObject:anObject,aBlock:aBlock,anotherObject:anotherObject,receiver:receiver,selector:selector,arguments_:arguments_,result:result},$globals.Array)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["anObject", "aBlock", "anotherObject"],
- 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",
- referencedClasses: ["MessageNotUnderstood"],
- //>>excludeEnd("ide");
- messageSends: ["asMutator", "first", "yourself", "on:do:", "perform:withArguments:", "ifFalse:", "and:", "=", "selector", "message", "==", "receiver", "arguments", "resignal", "value"]
- }),
- $globals.Array);
- $core.addMethod(
- $core.method({
- selector: "asAxisIn:ifAbsent:",
- protocol: "*Axxord",
- fn: function (anObject,aBlock){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv(aBlock)._value();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"asAxisIn:ifAbsent:",{anObject:anObject,aBlock:aBlock},$globals.JSObjectProxy)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["anObject", "aBlock"],
- source: "asAxisIn: anObject ifAbsent: aBlock\x0a\x09^ aBlock value",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: ["value"]
- }),
- $globals.JSObjectProxy);
- $core.addMethod(
- $core.method({
- selector: "asAxisIn:ifAbsent:put:",
- protocol: "*Axxord",
- fn: function (anObject,aBlock,anotherObject){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv(aBlock)._value();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"asAxisIn:ifAbsent:put:",{anObject:anObject,aBlock:aBlock,anotherObject:anotherObject},$globals.JSObjectProxy)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["anObject", "aBlock", "anotherObject"],
- source: "asAxisIn: anObject ifAbsent: aBlock put: anotherObject\x0a\x09^ aBlock value",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: ["value"]
- }),
- $globals.JSObjectProxy);
- $core.addMethod(
- $core.method({
- selector: "atAxes:ifAbsent:",
- protocol: "*Axxord",
- fn: function (aCollection,aBlock){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($globals.Axes)._on_at_ifAbsent_(self,aCollection,aBlock);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"atAxes:ifAbsent:",{aCollection:aCollection,aBlock:aBlock},$globals.JSObjectProxy)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aCollection", "aBlock"],
- source: "atAxes: aCollection ifAbsent: aBlock\x0a\x09^ Axes on: self at: aCollection ifAbsent: aBlock",
- referencedClasses: ["Axes"],
- //>>excludeEnd("ide");
- messageSends: ["on:at:ifAbsent:"]
- }),
- $globals.JSObjectProxy);
- $core.addMethod(
- $core.method({
- selector: "atAxes:ifAbsent:put:",
- protocol: "*Axxord",
- fn: function (aCollection,aBlock,value){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($globals.Axes)._on_at_ifAbsent_put_(self,aCollection,aBlock,value);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"atAxes:ifAbsent:put:",{aCollection:aCollection,aBlock:aBlock,value:value},$globals.JSObjectProxy)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aCollection", "aBlock", "value"],
- source: "atAxes: aCollection ifAbsent: aBlock put: value\x0a\x09^ Axes on: self at: aCollection ifAbsent: aBlock put: value",
- referencedClasses: ["Axes"],
- //>>excludeEnd("ide");
- messageSends: ["on:at:ifAbsent:put:"]
- }),
- $globals.JSObjectProxy);
- $core.addMethod(
- $core.method({
- selector: "axes:consume:",
- protocol: "*Axxord",
- fn: function (aCollection,aBlock){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($globals.Axes)._on_at_consume_(self,aCollection,aBlock);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"axes:consume:",{aCollection:aCollection,aBlock:aBlock},$globals.JSObjectProxy)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aCollection", "aBlock"],
- source: "axes: aCollection consume: aBlock\x0a\x09^ Axes on: self at: aCollection consume: aBlock",
- referencedClasses: ["Axes"],
- //>>excludeEnd("ide");
- messageSends: ["on:at:consume:"]
- }),
- $globals.JSObjectProxy);
- $core.addMethod(
- $core.method({
- selector: "axes:transform:",
- protocol: "*Axxord",
- fn: function (aCollection,aBlock){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($globals.Axes)._on_at_transform_(self,aCollection,aBlock);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"axes:transform:",{aCollection:aCollection,aBlock:aBlock},$globals.JSObjectProxy)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aCollection", "aBlock"],
- source: "axes: aCollection transform: aBlock\x0a\x09^ Axes on: self at: aCollection transform: aBlock",
- referencedClasses: ["Axes"],
- //>>excludeEnd("ide");
- messageSends: ["on:at:transform:"]
- }),
- $globals.JSObjectProxy);
- $core.addMethod(
- $core.method({
- selector: "axxord",
- protocol: "*Axxord",
- fn: function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $self["@jsObject"].$axxord$;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"axxord",{},$globals.JSObjectProxy)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "axxord\x0a<inlineJS: 'return $self[\x22@jsObject\x22].$axxord$'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: []
- }),
- $globals.JSObjectProxy);
- $core.addMethod(
- $core.method({
- selector: "axxord:",
- protocol: "*Axxord",
- fn: function (anAxon){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- $self["@jsObject"].$axxord$ = anAxon;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"axxord:",{anAxon:anAxon},$globals.JSObjectProxy)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["anAxon"],
- source: "axxord: anAxon\x0a<inlineJS: '$self[\x22@jsObject\x22].$axxord$ = anAxon'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: []
- }),
- $globals.JSObjectProxy);
- $core.addMethod(
- $core.method({
- selector: "asAxisIn:ifAbsent:",
- protocol: "*Axxord",
- fn: function (anObject,aBlock){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- var $1;
- var $early={};
- try {
- $1=$recv(anObject)._respondsTo_("at:ifAbsent:");
- $recv($1)._ifTrue_ifFalse_((function(){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx2) {
- //>>excludeEnd("ctx");
- throw $early=[$recv(anObject)._at_ifAbsent_(self,aBlock)];
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
- //>>excludeEnd("ctx");
- }),aBlock);
- return self;
- }
- catch(e) {if(e===$early)return e[0]; throw e}
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"asAxisIn:ifAbsent:",{anObject:anObject,aBlock:aBlock},$globals.Number)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["anObject", "aBlock"],
- source: "asAxisIn: anObject ifAbsent: aBlock\x0a\x09(anObject respondsTo: #at:ifAbsent:)\x0a\x09\x09ifTrue: [ ^ anObject at: self ifAbsent: aBlock ]\x0a\x09\x09ifFalse: aBlock",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: ["ifTrue:ifFalse:", "respondsTo:", "at:ifAbsent:"]
- }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "asAxisIn:ifAbsent:put:",
- protocol: "*Axxord",
- fn: function (anObject,aBlock,anotherObject){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- var $1;
- var $early={};
- try {
- $1=$recv(anObject)._respondsTo_("at:put:");
- $recv($1)._ifTrue_ifFalse_((function(){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx2) {
- //>>excludeEnd("ctx");
- throw $early=[$recv(anObject)._at_put_(self,anotherObject)];
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
- //>>excludeEnd("ctx");
- }),aBlock);
- return self;
- }
- catch(e) {if(e===$early)return e[0]; throw e}
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"asAxisIn:ifAbsent:put:",{anObject:anObject,aBlock:aBlock,anotherObject:anotherObject},$globals.Number)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["anObject", "aBlock", "anotherObject"],
- 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",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: ["ifTrue:ifFalse:", "respondsTo:", "at:put:"]
- }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "asAxisIn:ifAbsent:",
- protocol: "*Axxord",
- fn: function (anObject,aBlock){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv(aBlock)._value();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"asAxisIn:ifAbsent:",{anObject:anObject,aBlock:aBlock},$globals.Object)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["anObject", "aBlock"],
- source: "asAxisIn: anObject ifAbsent: aBlock\x0a\x09^ aBlock value",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: ["value"]
- }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "asAxisIn:ifAbsent:put:",
- protocol: "*Axxord",
- fn: function (anObject,aBlock,anotherObject){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv(aBlock)._value();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"asAxisIn:ifAbsent:put:",{anObject:anObject,aBlock:aBlock,anotherObject:anotherObject},$globals.Object)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["anObject", "aBlock", "anotherObject"],
- source: "asAxisIn: anObject ifAbsent: aBlock put: anotherObject\x0a\x09^ aBlock value",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: ["value"]
- }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "atAxes:ifAbsent:",
- protocol: "*Axxord",
- fn: function (aCollection,aBlock){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($globals.Axes)._on_at_ifAbsent_(self,aCollection,aBlock);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"atAxes:ifAbsent:",{aCollection:aCollection,aBlock:aBlock},$globals.Object)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aCollection", "aBlock"],
- source: "atAxes: aCollection ifAbsent: aBlock\x0a\x09^ Axes on: self at: aCollection ifAbsent: aBlock",
- referencedClasses: ["Axes"],
- //>>excludeEnd("ide");
- messageSends: ["on:at:ifAbsent:"]
- }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "atAxes:ifAbsent:put:",
- protocol: "*Axxord",
- fn: function (aCollection,aBlock,value){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($globals.Axes)._on_at_ifAbsent_put_(self,aCollection,aBlock,value);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"atAxes:ifAbsent:put:",{aCollection:aCollection,aBlock:aBlock,value:value},$globals.Object)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aCollection", "aBlock", "value"],
- source: "atAxes: aCollection ifAbsent: aBlock put: value\x0a\x09^ Axes on: self at: aCollection ifAbsent: aBlock put: value",
- referencedClasses: ["Axes"],
- //>>excludeEnd("ide");
- messageSends: ["on:at:ifAbsent:put:"]
- }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "axes:consume:",
- protocol: "*Axxord",
- fn: function (aCollection,aBlock){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($globals.Axes)._on_at_consume_(self,aCollection,aBlock);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"axes:consume:",{aCollection:aCollection,aBlock:aBlock},$globals.Object)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aCollection", "aBlock"],
- source: "axes: aCollection consume: aBlock\x0a\x09^ Axes on: self at: aCollection consume: aBlock",
- referencedClasses: ["Axes"],
- //>>excludeEnd("ide");
- messageSends: ["on:at:consume:"]
- }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "axes:transform:",
- protocol: "*Axxord",
- fn: function (aCollection,aBlock){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($globals.Axes)._on_at_transform_(self,aCollection,aBlock);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"axes:transform:",{aCollection:aCollection,aBlock:aBlock},$globals.Object)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aCollection", "aBlock"],
- source: "axes: aCollection transform: aBlock\x0a\x09^ Axes on: self at: aCollection transform: aBlock",
- referencedClasses: ["Axes"],
- //>>excludeEnd("ide");
- messageSends: ["on:at:transform:"]
- }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "axxord",
- protocol: "*Axxord",
- fn: function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return self.$axxord$;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"axxord",{},$globals.Object)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "axxord\x0a<inlineJS: 'return self.$axxord$'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: []
- }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "axxord:",
- protocol: "*Axxord",
- fn: function (anAxon){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- self.$axxord$ = anAxon;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"axxord:",{anAxon:anAxon},$globals.Object)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["anAxon"],
- source: "axxord: anAxon\x0a<inlineJS: 'self.$axxord$ = anAxon'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: []
- }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "asAxisIn:ifAbsent:",
- protocol: "*Axxord",
- fn: function (anObject,aBlock){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- var $1;
- var $early={};
- try {
- $1=$recv(anObject)._respondsTo_("at:ifAbsent:");
- $recv($1)._ifTrue_ifFalse_((function(){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx2) {
- //>>excludeEnd("ctx");
- throw $early=[$recv(anObject)._at_ifAbsent_(self,aBlock)];
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
- //>>excludeEnd("ctx");
- }),aBlock);
- return self;
- }
- catch(e) {if(e===$early)return e[0]; throw e}
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"asAxisIn:ifAbsent:",{anObject:anObject,aBlock:aBlock},$globals.String)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["anObject", "aBlock"],
- source: "asAxisIn: anObject ifAbsent: aBlock\x0a\x09(anObject respondsTo: #at:ifAbsent:)\x0a\x09\x09ifTrue: [ ^ anObject at: self ifAbsent: aBlock ]\x0a\x09\x09ifFalse: aBlock",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: ["ifTrue:ifFalse:", "respondsTo:", "at:ifAbsent:"]
- }),
- $globals.String);
- $core.addMethod(
- $core.method({
- selector: "asAxisIn:ifAbsent:put:",
- protocol: "*Axxord",
- fn: function (anObject,aBlock,anotherObject){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- var $1;
- var $early={};
- try {
- $1=$recv(anObject)._respondsTo_("at:put:");
- $recv($1)._ifTrue_ifFalse_((function(){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx2) {
- //>>excludeEnd("ctx");
- throw $early=[$recv(anObject)._at_put_(self,anotherObject)];
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
- //>>excludeEnd("ctx");
- }),aBlock);
- return self;
- }
- catch(e) {if(e===$early)return e[0]; throw e}
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"asAxisIn:ifAbsent:put:",{anObject:anObject,aBlock:aBlock,anotherObject:anotherObject},$globals.String)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["anObject", "aBlock", "anotherObject"],
- 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",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: ["ifTrue:ifFalse:", "respondsTo:", "at:put:"]
- }),
- $globals.String);
- });
|