Compiler-IR.js 196 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904
  1. define(["amber/boot", "amber_core/Compiler-AST", "amber_core/Kernel-Dag", "amber_core/Kernel-Methods", "amber_core/Kernel-Objects"], function($boot){"use strict";
  2. if(!("nilAsValue" in $boot))$boot.nilAsValue=$boot.nilAsReceiver;
  3. var $core=$boot.api,nil=$boot.nilAsValue,$nil=$boot.nilAsReceiver,$recv=$boot.asReceiver,$globals=$boot.globals;
  4. $core.addPackage("Compiler-IR");
  5. ($core.packageDescriptors||$core.packages)["Compiler-IR"].innerEval = function (expr) { return eval(expr); };
  6. ($core.packageDescriptors||$core.packages)["Compiler-IR"].transport = {"type":"amd","amdNamespace":"amber_core"};
  7. $core.addClass("IRASTTranslator", $globals.NodeVisitor, ["source", "theClass", "method", "sequence", "nextAlias"], "Compiler-IR");
  8. //>>excludeStart("ide", pragmas.excludeIdeData);
  9. $globals.IRASTTranslator.comment="I am the AST (abstract syntax tree) visitor responsible for building the intermediate representation graph.";
  10. //>>excludeEnd("ide");
  11. $core.addMethod(
  12. $core.method({
  13. selector: "addToSequence:",
  14. protocol: "visiting",
  15. fn: function (anInstruction){
  16. var self=this,$self=this;
  17. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  18. return $core.withContext(function($ctx1) {
  19. //>>excludeEnd("ctx");
  20. var $1,$receiver;
  21. if(($receiver = anInstruction) == null || $receiver.a$nil){
  22. anInstruction;
  23. } else {
  24. $1=$recv(anInstruction)._isVariable();
  25. if(!$core.assert($1)){
  26. $recv($self._sequence())._add_(anInstruction);
  27. }
  28. }
  29. return anInstruction;
  30. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  31. }, function($ctx1) {$ctx1.fill(self,"addToSequence:",{anInstruction:anInstruction},$globals.IRASTTranslator)});
  32. //>>excludeEnd("ctx");
  33. },
  34. //>>excludeStart("ide", pragmas.excludeIdeData);
  35. args: ["anInstruction"],
  36. source: "addToSequence: anInstruction\x0a\x09anInstruction ifNotNil: [\x0a\x09\x09anInstruction isVariable ifFalse: [\x0a\x09\x09\x09self sequence add: anInstruction ] ].\x0a\x09^ anInstruction",
  37. referencedClasses: [],
  38. //>>excludeEnd("ide");
  39. messageSends: ["ifNotNil:", "ifFalse:", "isVariable", "add:", "sequence"]
  40. }),
  41. $globals.IRASTTranslator);
  42. $core.addMethod(
  43. $core.method({
  44. selector: "alias:",
  45. protocol: "visiting",
  46. fn: function (aNode){
  47. var self=this,$self=this;
  48. var variable;
  49. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  50. return $core.withContext(function($ctx1) {
  51. //>>excludeEnd("ctx");
  52. var $1,$2,$3,$5,$4,$6,$8,$7;
  53. $1=$recv(aNode)._isImmutable();
  54. if($core.assert($1)){
  55. $2=$self._visit_(aNode);
  56. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  57. $ctx1.sendIdx["visit:"]=1;
  58. //>>excludeEnd("ctx");
  59. return $2;
  60. }
  61. $3=$recv($globals.IRVariable)._new();
  62. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  63. $ctx1.sendIdx["new"]=1;
  64. //>>excludeEnd("ctx");
  65. $5=$recv($globals.AliasVar)._new();
  66. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  67. $ctx1.sendIdx["new"]=2;
  68. //>>excludeEnd("ctx");
  69. $4=$recv($5)._name_("$".__comma($self._nextAlias()));
  70. $recv($3)._variable_($4);
  71. $6=$recv($3)._yourself();
  72. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  73. $ctx1.sendIdx["yourself"]=1;
  74. //>>excludeEnd("ctx");
  75. variable=$6;
  76. $8=$recv($globals.IRAssignment)._new();
  77. $recv($8)._add_(variable);
  78. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  79. $ctx1.sendIdx["add:"]=1;
  80. //>>excludeEnd("ctx");
  81. $recv($8)._add_($self._visit_(aNode));
  82. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  83. $ctx1.sendIdx["add:"]=2;
  84. //>>excludeEnd("ctx");
  85. $7=$recv($8)._yourself();
  86. $self._addToSequence_($7);
  87. $recv($recv($self._method())._internalVariables())._add_(variable);
  88. return variable;
  89. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  90. }, function($ctx1) {$ctx1.fill(self,"alias:",{aNode:aNode,variable:variable},$globals.IRASTTranslator)});
  91. //>>excludeEnd("ctx");
  92. },
  93. //>>excludeStart("ide", pragmas.excludeIdeData);
  94. args: ["aNode"],
  95. source: "alias: aNode\x0a\x09| variable |\x0a\x0a\x09aNode isImmutable ifTrue: [ ^ self visit: aNode ].\x0a\x0a\x09variable := IRVariable new\x0a\x09\x09variable: (AliasVar new name: '$', self nextAlias);\x0a\x09\x09yourself.\x0a\x0a\x09self addToSequence: (IRAssignment new\x0a\x09\x09add: variable;\x0a\x09\x09add: (self visit: aNode);\x0a\x09\x09yourself).\x0a\x0a\x09self method internalVariables add: variable.\x0a\x0a\x09^ variable",
  96. referencedClasses: ["IRVariable", "AliasVar", "IRAssignment"],
  97. //>>excludeEnd("ide");
  98. messageSends: ["ifTrue:", "isImmutable", "visit:", "variable:", "new", "name:", ",", "nextAlias", "yourself", "addToSequence:", "add:", "internalVariables", "method"]
  99. }),
  100. $globals.IRASTTranslator);
  101. $core.addMethod(
  102. $core.method({
  103. selector: "aliasTemporally:",
  104. protocol: "visiting",
  105. fn: function (aCollection){
  106. var self=this,$self=this;
  107. var threshold,result;
  108. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  109. return $core.withContext(function($ctx1) {
  110. //>>excludeEnd("ctx");
  111. var $1,$2,$4,$3;
  112. threshold=(0);
  113. $recv(aCollection)._withIndexDo_((function(each,i){
  114. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  115. return $core.withContext(function($ctx2) {
  116. //>>excludeEnd("ctx");
  117. $1=$recv(each)._subtreeNeedsAliasing();
  118. if($core.assert($1)){
  119. threshold=i;
  120. return threshold;
  121. }
  122. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  123. }, function($ctx2) {$ctx2.fillBlock({each:each,i:i},$ctx1,1)});
  124. //>>excludeEnd("ctx");
  125. }));
  126. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  127. $ctx1.sendIdx["withIndexDo:"]=1;
  128. //>>excludeEnd("ctx");
  129. result=$recv($globals.OrderedCollection)._new();
  130. $recv(aCollection)._withIndexDo_((function(each,i){
  131. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  132. return $core.withContext(function($ctx2) {
  133. //>>excludeEnd("ctx");
  134. $2=result;
  135. $4=$recv(i).__lt_eq(threshold);
  136. if($core.assert($4)){
  137. $3=$self._alias_(each);
  138. } else {
  139. $3=$self._visit_(each);
  140. }
  141. return $recv($2)._add_($3);
  142. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  143. }, function($ctx2) {$ctx2.fillBlock({each:each,i:i},$ctx1,3)});
  144. //>>excludeEnd("ctx");
  145. }));
  146. return result;
  147. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  148. }, function($ctx1) {$ctx1.fill(self,"aliasTemporally:",{aCollection:aCollection,threshold:threshold,result:result},$globals.IRASTTranslator)});
  149. //>>excludeEnd("ctx");
  150. },
  151. //>>excludeStart("ide", pragmas.excludeIdeData);
  152. args: ["aCollection"],
  153. source: "aliasTemporally: aCollection\x0a\x09\x22https://lolg.it/amber/amber/issues/296\x0a\x09\x0a\x09If a node is aliased, all preceding ones are aliased as well.\x0a\x09The tree is iterated twice. First we get the aliasing dependency,\x0a\x09then the aliasing itself is done\x22\x0a\x0a\x09| threshold result |\x0a\x09threshold := 0.\x0a\x09\x0a\x09aCollection withIndexDo: [ :each :i |\x0a\x09\x09each subtreeNeedsAliasing\x0a\x09\x09\x09ifTrue: [ threshold := i ] ].\x0a\x0a\x09result := OrderedCollection new.\x0a\x09aCollection withIndexDo: [ :each :i |\x0a\x09\x09result add: (i <= threshold\x0a\x09\x09\x09ifTrue: [ self alias: each ]\x0a\x09\x09\x09ifFalse: [ self visit: each ]) ].\x0a\x0a\x09^ result",
  154. referencedClasses: ["OrderedCollection"],
  155. //>>excludeEnd("ide");
  156. messageSends: ["withIndexDo:", "ifTrue:", "subtreeNeedsAliasing", "new", "add:", "ifTrue:ifFalse:", "<=", "alias:", "visit:"]
  157. }),
  158. $globals.IRASTTranslator);
  159. $core.addMethod(
  160. $core.method({
  161. selector: "method",
  162. protocol: "accessing",
  163. fn: function (){
  164. var self=this,$self=this;
  165. return $self["@method"];
  166. },
  167. //>>excludeStart("ide", pragmas.excludeIdeData);
  168. args: [],
  169. source: "method\x0a\x09^ method",
  170. referencedClasses: [],
  171. //>>excludeEnd("ide");
  172. messageSends: []
  173. }),
  174. $globals.IRASTTranslator);
  175. $core.addMethod(
  176. $core.method({
  177. selector: "method:",
  178. protocol: "accessing",
  179. fn: function (anIRMethod){
  180. var self=this,$self=this;
  181. $self["@method"]=anIRMethod;
  182. return self;
  183. },
  184. //>>excludeStart("ide", pragmas.excludeIdeData);
  185. args: ["anIRMethod"],
  186. source: "method: anIRMethod\x0a\x09method := anIRMethod",
  187. referencedClasses: [],
  188. //>>excludeEnd("ide");
  189. messageSends: []
  190. }),
  191. $globals.IRASTTranslator);
  192. $core.addMethod(
  193. $core.method({
  194. selector: "nextAlias",
  195. protocol: "accessing",
  196. fn: function (){
  197. var self=this,$self=this;
  198. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  199. return $core.withContext(function($ctx1) {
  200. //>>excludeEnd("ctx");
  201. var $1,$receiver;
  202. $1=$self["@nextAlias"];
  203. if(($receiver = $1) == null || $receiver.a$nil){
  204. $self["@nextAlias"]=(0);
  205. $self["@nextAlias"];
  206. } else {
  207. $1;
  208. }
  209. $self["@nextAlias"]=$recv($self["@nextAlias"]).__plus((1));
  210. return $recv($self["@nextAlias"])._asString();
  211. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  212. }, function($ctx1) {$ctx1.fill(self,"nextAlias",{},$globals.IRASTTranslator)});
  213. //>>excludeEnd("ctx");
  214. },
  215. //>>excludeStart("ide", pragmas.excludeIdeData);
  216. args: [],
  217. source: "nextAlias\x0a\x09nextAlias ifNil: [ nextAlias := 0 ].\x0a\x09nextAlias := nextAlias + 1.\x0a\x09^ nextAlias asString",
  218. referencedClasses: [],
  219. //>>excludeEnd("ide");
  220. messageSends: ["ifNil:", "+", "asString"]
  221. }),
  222. $globals.IRASTTranslator);
  223. $core.addMethod(
  224. $core.method({
  225. selector: "sequence",
  226. protocol: "accessing",
  227. fn: function (){
  228. var self=this,$self=this;
  229. return $self["@sequence"];
  230. },
  231. //>>excludeStart("ide", pragmas.excludeIdeData);
  232. args: [],
  233. source: "sequence\x0a\x09^ sequence",
  234. referencedClasses: [],
  235. //>>excludeEnd("ide");
  236. messageSends: []
  237. }),
  238. $globals.IRASTTranslator);
  239. $core.addMethod(
  240. $core.method({
  241. selector: "sequence:",
  242. protocol: "accessing",
  243. fn: function (anIRSequence){
  244. var self=this,$self=this;
  245. $self["@sequence"]=anIRSequence;
  246. return self;
  247. },
  248. //>>excludeStart("ide", pragmas.excludeIdeData);
  249. args: ["anIRSequence"],
  250. source: "sequence: anIRSequence\x0a\x09sequence := anIRSequence",
  251. referencedClasses: [],
  252. //>>excludeEnd("ide");
  253. messageSends: []
  254. }),
  255. $globals.IRASTTranslator);
  256. $core.addMethod(
  257. $core.method({
  258. selector: "source",
  259. protocol: "accessing",
  260. fn: function (){
  261. var self=this,$self=this;
  262. return $self["@source"];
  263. },
  264. //>>excludeStart("ide", pragmas.excludeIdeData);
  265. args: [],
  266. source: "source\x0a\x09^ source",
  267. referencedClasses: [],
  268. //>>excludeEnd("ide");
  269. messageSends: []
  270. }),
  271. $globals.IRASTTranslator);
  272. $core.addMethod(
  273. $core.method({
  274. selector: "source:",
  275. protocol: "accessing",
  276. fn: function (aString){
  277. var self=this,$self=this;
  278. $self["@source"]=aString;
  279. return self;
  280. },
  281. //>>excludeStart("ide", pragmas.excludeIdeData);
  282. args: ["aString"],
  283. source: "source: aString\x0a\x09source := aString",
  284. referencedClasses: [],
  285. //>>excludeEnd("ide");
  286. messageSends: []
  287. }),
  288. $globals.IRASTTranslator);
  289. $core.addMethod(
  290. $core.method({
  291. selector: "theClass",
  292. protocol: "accessing",
  293. fn: function (){
  294. var self=this,$self=this;
  295. return $self["@theClass"];
  296. },
  297. //>>excludeStart("ide", pragmas.excludeIdeData);
  298. args: [],
  299. source: "theClass\x0a\x09^ theClass",
  300. referencedClasses: [],
  301. //>>excludeEnd("ide");
  302. messageSends: []
  303. }),
  304. $globals.IRASTTranslator);
  305. $core.addMethod(
  306. $core.method({
  307. selector: "theClass:",
  308. protocol: "accessing",
  309. fn: function (aClass){
  310. var self=this,$self=this;
  311. $self["@theClass"]=aClass;
  312. return self;
  313. },
  314. //>>excludeStart("ide", pragmas.excludeIdeData);
  315. args: ["aClass"],
  316. source: "theClass: aClass\x0a\x09theClass := aClass",
  317. referencedClasses: [],
  318. //>>excludeEnd("ide");
  319. messageSends: []
  320. }),
  321. $globals.IRASTTranslator);
  322. $core.addMethod(
  323. $core.method({
  324. selector: "visitAssignmentNode:",
  325. protocol: "visiting",
  326. fn: function (aNode){
  327. var self=this,$self=this;
  328. var left,right,assignment;
  329. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  330. return $core.withContext(function($ctx1) {
  331. //>>excludeEnd("ctx");
  332. var $2,$1;
  333. right=$self._visit_($recv(aNode)._right());
  334. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  335. $ctx1.sendIdx["visit:"]=1;
  336. //>>excludeEnd("ctx");
  337. left=$self._visit_($recv(aNode)._left());
  338. $2=$recv($globals.IRAssignment)._new();
  339. $recv($2)._add_(left);
  340. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  341. $ctx1.sendIdx["add:"]=1;
  342. //>>excludeEnd("ctx");
  343. $recv($2)._add_(right);
  344. $1=$recv($2)._yourself();
  345. $self._addToSequence_($1);
  346. return left;
  347. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  348. }, function($ctx1) {$ctx1.fill(self,"visitAssignmentNode:",{aNode:aNode,left:left,right:right,assignment:assignment},$globals.IRASTTranslator)});
  349. //>>excludeEnd("ctx");
  350. },
  351. //>>excludeStart("ide", pragmas.excludeIdeData);
  352. args: ["aNode"],
  353. source: "visitAssignmentNode: aNode\x0a\x09| left right assignment |\x0a\x09right := self visit: aNode right.\x0a\x09left := self visit: aNode left.\x0a\x09self addToSequence: (IRAssignment new\x0a\x09\x09add: left;\x0a\x09\x09add: right;\x0a\x09\x09yourself).\x0a\x09^ left",
  354. referencedClasses: ["IRAssignment"],
  355. //>>excludeEnd("ide");
  356. messageSends: ["visit:", "right", "left", "addToSequence:", "add:", "new", "yourself"]
  357. }),
  358. $globals.IRASTTranslator);
  359. $core.addMethod(
  360. $core.method({
  361. selector: "visitBlockNode:",
  362. protocol: "visiting",
  363. fn: function (aNode){
  364. var self=this,$self=this;
  365. var closure;
  366. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  367. return $core.withContext(function($ctx1) {
  368. //>>excludeEnd("ctx");
  369. var $1,$2,$3,$5,$4,$6,$8,$7;
  370. $1=$recv($globals.IRClosure)._new();
  371. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  372. $ctx1.sendIdx["new"]=1;
  373. //>>excludeEnd("ctx");
  374. $recv($1)._arguments_($recv(aNode)._parameters());
  375. $recv($1)._requiresSmalltalkContext_($recv(aNode)._requiresSmalltalkContext());
  376. $2=$recv(aNode)._scope();
  377. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  378. $ctx1.sendIdx["scope"]=1;
  379. //>>excludeEnd("ctx");
  380. $recv($1)._scope_($2);
  381. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  382. $ctx1.sendIdx["scope:"]=1;
  383. //>>excludeEnd("ctx");
  384. $3=$recv($1)._yourself();
  385. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  386. $ctx1.sendIdx["yourself"]=1;
  387. //>>excludeEnd("ctx");
  388. closure=$3;
  389. $5=$recv(aNode)._scope();
  390. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  391. $ctx1.sendIdx["scope"]=2;
  392. //>>excludeEnd("ctx");
  393. $4=$recv($5)._temps();
  394. $recv($4)._do_((function(each){
  395. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  396. return $core.withContext(function($ctx2) {
  397. //>>excludeEnd("ctx");
  398. $6=closure;
  399. $8=$recv($globals.IRTempDeclaration)._new();
  400. $recv($8)._name_($recv(each)._name());
  401. $recv($8)._scope_($recv(aNode)._scope());
  402. $7=$recv($8)._yourself();
  403. return $recv($6)._add_($7);
  404. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  405. $ctx2.sendIdx["add:"]=1;
  406. //>>excludeEnd("ctx");
  407. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  408. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  409. //>>excludeEnd("ctx");
  410. }));
  411. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  412. $ctx1.sendIdx["do:"]=1;
  413. //>>excludeEnd("ctx");
  414. $recv($recv(aNode)._dagChildren())._do_((function(each){
  415. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  416. return $core.withContext(function($ctx2) {
  417. //>>excludeEnd("ctx");
  418. return $recv(closure)._add_($self._visit_(each));
  419. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  420. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)});
  421. //>>excludeEnd("ctx");
  422. }));
  423. return closure;
  424. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  425. }, function($ctx1) {$ctx1.fill(self,"visitBlockNode:",{aNode:aNode,closure:closure},$globals.IRASTTranslator)});
  426. //>>excludeEnd("ctx");
  427. },
  428. //>>excludeStart("ide", pragmas.excludeIdeData);
  429. args: ["aNode"],
  430. source: "visitBlockNode: aNode\x0a\x09| closure |\x0a\x09closure := IRClosure new\x0a\x09\x09arguments: aNode parameters;\x0a\x09\x09requiresSmalltalkContext: aNode requiresSmalltalkContext;\x0a\x09\x09scope: aNode scope;\x0a\x09\x09yourself.\x0a\x09aNode scope temps do: [ :each |\x0a\x09\x09closure add: (IRTempDeclaration new\x0a\x09\x09\x09name: each name;\x0a\x09\x09\x09scope: aNode scope;\x0a\x09\x09\x09yourself) ].\x0a\x09aNode dagChildren do: [ :each | closure add: (self visit: each) ].\x0a\x09^ closure",
  431. referencedClasses: ["IRClosure", "IRTempDeclaration"],
  432. //>>excludeEnd("ide");
  433. messageSends: ["arguments:", "new", "parameters", "requiresSmalltalkContext:", "requiresSmalltalkContext", "scope:", "scope", "yourself", "do:", "temps", "add:", "name:", "name", "dagChildren", "visit:"]
  434. }),
  435. $globals.IRASTTranslator);
  436. $core.addMethod(
  437. $core.method({
  438. selector: "visitBlockSequenceNode:",
  439. protocol: "visiting",
  440. fn: function (aNode){
  441. var self=this,$self=this;
  442. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  443. return $core.withContext(function($ctx1) {
  444. //>>excludeEnd("ctx");
  445. var $1,$2,$4,$3,$5,$8,$7,$6,$10,$13,$12,$11,$9;
  446. $1=$recv($globals.IRBlockSequence)._new();
  447. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  448. $ctx1.sendIdx["new"]=1;
  449. //>>excludeEnd("ctx");
  450. return $self._withSequence_do_($1,(function(){
  451. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  452. return $core.withContext(function($ctx2) {
  453. //>>excludeEnd("ctx");
  454. $2=$recv(aNode)._dagChildren();
  455. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  456. $ctx2.sendIdx["dagChildren"]=1;
  457. //>>excludeEnd("ctx");
  458. return $recv($2)._ifNotEmpty_((function(){
  459. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  460. return $core.withContext(function($ctx3) {
  461. //>>excludeEnd("ctx");
  462. $4=$recv(aNode)._dagChildren();
  463. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  464. $ctx3.sendIdx["dagChildren"]=2;
  465. //>>excludeEnd("ctx");
  466. $3=$recv($4)._allButLast();
  467. $recv($3)._do_((function(each){
  468. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  469. return $core.withContext(function($ctx4) {
  470. //>>excludeEnd("ctx");
  471. $5=$self._visitOrAlias_(each);
  472. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  473. $ctx4.sendIdx["visitOrAlias:"]=1;
  474. //>>excludeEnd("ctx");
  475. return $self._addToSequence_($5);
  476. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  477. $ctx4.sendIdx["addToSequence:"]=1;
  478. //>>excludeEnd("ctx");
  479. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  480. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx3,3)});
  481. //>>excludeEnd("ctx");
  482. }));
  483. $8=$recv(aNode)._dagChildren();
  484. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  485. $ctx3.sendIdx["dagChildren"]=3;
  486. //>>excludeEnd("ctx");
  487. $7=$recv($8)._last();
  488. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  489. $ctx3.sendIdx["last"]=1;
  490. //>>excludeEnd("ctx");
  491. $6=$recv($7)._isReturnNode();
  492. if($core.assert($6)){
  493. return $self._addToSequence_($self._visitOrAlias_($recv($recv(aNode)._dagChildren())._last()));
  494. } else {
  495. $10=$recv($globals.IRBlockReturn)._new();
  496. $13=$recv(aNode)._dagChildren();
  497. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  498. $ctx3.sendIdx["dagChildren"]=4;
  499. //>>excludeEnd("ctx");
  500. $12=$recv($13)._last();
  501. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  502. $ctx3.sendIdx["last"]=2;
  503. //>>excludeEnd("ctx");
  504. $11=$self._visitOrAlias_($12);
  505. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  506. $ctx3.sendIdx["visitOrAlias:"]=2;
  507. //>>excludeEnd("ctx");
  508. $recv($10)._add_($11);
  509. $9=$recv($10)._yourself();
  510. return $self._addToSequence_($9);
  511. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  512. $ctx3.sendIdx["addToSequence:"]=2;
  513. //>>excludeEnd("ctx");
  514. }
  515. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  516. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  517. //>>excludeEnd("ctx");
  518. }));
  519. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  520. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  521. //>>excludeEnd("ctx");
  522. }));
  523. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  524. }, function($ctx1) {$ctx1.fill(self,"visitBlockSequenceNode:",{aNode:aNode},$globals.IRASTTranslator)});
  525. //>>excludeEnd("ctx");
  526. },
  527. //>>excludeStart("ide", pragmas.excludeIdeData);
  528. args: ["aNode"],
  529. source: "visitBlockSequenceNode: aNode\x0a\x09^ self\x0a\x09\x09withSequence: IRBlockSequence new\x0a\x09\x09do: [\x0a\x09\x09\x09aNode dagChildren ifNotEmpty: [\x0a\x09\x09\x09\x09aNode dagChildren allButLast do: [ :each |\x0a\x09\x09\x09\x09\x09self addToSequence: (self visitOrAlias: each) ].\x0a\x09\x09\x09\x09aNode dagChildren last isReturnNode\x0a\x09\x09\x09\x09\x09ifFalse: [ self addToSequence: (IRBlockReturn new add: (self visitOrAlias: aNode dagChildren last); yourself) ]\x0a\x09\x09\x09\x09\x09ifTrue: [ self addToSequence: (self visitOrAlias: aNode dagChildren last) ] ]]",
  530. referencedClasses: ["IRBlockSequence", "IRBlockReturn"],
  531. //>>excludeEnd("ide");
  532. messageSends: ["withSequence:do:", "new", "ifNotEmpty:", "dagChildren", "do:", "allButLast", "addToSequence:", "visitOrAlias:", "ifFalse:ifTrue:", "isReturnNode", "last", "add:", "yourself"]
  533. }),
  534. $globals.IRASTTranslator);
  535. $core.addMethod(
  536. $core.method({
  537. selector: "visitCascadeNode:",
  538. protocol: "visiting",
  539. fn: function (aNode){
  540. var self=this,$self=this;
  541. var receiver;
  542. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  543. return $core.withContext(function($ctx1) {
  544. //>>excludeEnd("ctx");
  545. var $1,$2,$4,$3;
  546. receiver=$recv(aNode)._receiver();
  547. $1=$recv(receiver)._isImmutable();
  548. if(!$core.assert($1)){
  549. var alias;
  550. alias=$self._alias_(receiver);
  551. receiver=$recv($recv($globals.VariableNode)._new())._binding_($recv(alias)._variable());
  552. receiver;
  553. }
  554. $2=$recv(aNode)._dagChildren();
  555. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  556. $ctx1.sendIdx["dagChildren"]=1;
  557. //>>excludeEnd("ctx");
  558. $recv($2)._do_((function(each){
  559. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  560. return $core.withContext(function($ctx2) {
  561. //>>excludeEnd("ctx");
  562. return $recv(each)._receiver_(receiver);
  563. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  564. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)});
  565. //>>excludeEnd("ctx");
  566. }));
  567. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  568. $ctx1.sendIdx["do:"]=1;
  569. //>>excludeEnd("ctx");
  570. $4=$recv(aNode)._dagChildren();
  571. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  572. $ctx1.sendIdx["dagChildren"]=2;
  573. //>>excludeEnd("ctx");
  574. $3=$recv($4)._allButLast();
  575. $recv($3)._do_((function(each){
  576. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  577. return $core.withContext(function($ctx2) {
  578. //>>excludeEnd("ctx");
  579. return $self._addToSequence_($self._visit_(each));
  580. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  581. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,3)});
  582. //>>excludeEnd("ctx");
  583. }));
  584. return $self._visitOrAlias_($recv($recv(aNode)._dagChildren())._last());
  585. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  586. }, function($ctx1) {$ctx1.fill(self,"visitCascadeNode:",{aNode:aNode,receiver:receiver},$globals.IRASTTranslator)});
  587. //>>excludeEnd("ctx");
  588. },
  589. //>>excludeStart("ide", pragmas.excludeIdeData);
  590. args: ["aNode"],
  591. source: "visitCascadeNode: aNode\x0a\x09| receiver |\x0a\x09receiver := aNode receiver.\x0a\x09receiver isImmutable ifFalse: [\x0a\x09\x09| alias |\x0a\x09\x09alias := self alias: receiver.\x0a\x09\x09receiver := VariableNode new binding: alias variable ].\x0a\x09aNode dagChildren do: [ :each | each receiver: receiver ].\x0a\x0a\x09aNode dagChildren allButLast do: [ :each |\x0a\x09\x09self addToSequence: (self visit: each) ].\x0a\x0a\x09^ self visitOrAlias: aNode dagChildren last",
  592. referencedClasses: ["VariableNode"],
  593. //>>excludeEnd("ide");
  594. messageSends: ["receiver", "ifFalse:", "isImmutable", "alias:", "binding:", "new", "variable", "do:", "dagChildren", "receiver:", "allButLast", "addToSequence:", "visit:", "visitOrAlias:", "last"]
  595. }),
  596. $globals.IRASTTranslator);
  597. $core.addMethod(
  598. $core.method({
  599. selector: "visitDynamicArrayNode:",
  600. protocol: "visiting",
  601. fn: function (aNode){
  602. var self=this,$self=this;
  603. var array;
  604. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  605. return $core.withContext(function($ctx1) {
  606. //>>excludeEnd("ctx");
  607. array=$recv($globals.IRDynamicArray)._new();
  608. $recv($self._aliasTemporally_($recv(aNode)._dagChildren()))._do_((function(each){
  609. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  610. return $core.withContext(function($ctx2) {
  611. //>>excludeEnd("ctx");
  612. return $recv(array)._add_(each);
  613. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  614. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  615. //>>excludeEnd("ctx");
  616. }));
  617. return array;
  618. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  619. }, function($ctx1) {$ctx1.fill(self,"visitDynamicArrayNode:",{aNode:aNode,array:array},$globals.IRASTTranslator)});
  620. //>>excludeEnd("ctx");
  621. },
  622. //>>excludeStart("ide", pragmas.excludeIdeData);
  623. args: ["aNode"],
  624. source: "visitDynamicArrayNode: aNode\x0a\x09| array |\x0a\x09array := IRDynamicArray new.\x0a\x09(self aliasTemporally: aNode dagChildren) do: [ :each | array add: each ].\x0a\x09^ array",
  625. referencedClasses: ["IRDynamicArray"],
  626. //>>excludeEnd("ide");
  627. messageSends: ["new", "do:", "aliasTemporally:", "dagChildren", "add:"]
  628. }),
  629. $globals.IRASTTranslator);
  630. $core.addMethod(
  631. $core.method({
  632. selector: "visitDynamicDictionaryNode:",
  633. protocol: "visiting",
  634. fn: function (aNode){
  635. var self=this,$self=this;
  636. var dictionary;
  637. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  638. return $core.withContext(function($ctx1) {
  639. //>>excludeEnd("ctx");
  640. dictionary=$recv($globals.IRDynamicDictionary)._new();
  641. $recv($self._aliasTemporally_($recv(aNode)._dagChildren()))._do_((function(each){
  642. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  643. return $core.withContext(function($ctx2) {
  644. //>>excludeEnd("ctx");
  645. return $recv(dictionary)._add_(each);
  646. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  647. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  648. //>>excludeEnd("ctx");
  649. }));
  650. return dictionary;
  651. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  652. }, function($ctx1) {$ctx1.fill(self,"visitDynamicDictionaryNode:",{aNode:aNode,dictionary:dictionary},$globals.IRASTTranslator)});
  653. //>>excludeEnd("ctx");
  654. },
  655. //>>excludeStart("ide", pragmas.excludeIdeData);
  656. args: ["aNode"],
  657. source: "visitDynamicDictionaryNode: aNode\x0a\x09| dictionary |\x0a\x09dictionary := IRDynamicDictionary new.\x0a\x09(self aliasTemporally: aNode dagChildren) do: [ :each | dictionary add: each ].\x0a\x09^ dictionary",
  658. referencedClasses: ["IRDynamicDictionary"],
  659. //>>excludeEnd("ide");
  660. messageSends: ["new", "do:", "aliasTemporally:", "dagChildren", "add:"]
  661. }),
  662. $globals.IRASTTranslator);
  663. $core.addMethod(
  664. $core.method({
  665. selector: "visitJSStatementNode:",
  666. protocol: "visiting",
  667. fn: function (aNode){
  668. var self=this,$self=this;
  669. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  670. return $core.withContext(function($ctx1) {
  671. //>>excludeEnd("ctx");
  672. var $1;
  673. $1=$recv($globals.IRVerbatim)._new();
  674. $recv($1)._source_($recv($recv(aNode)._source())._crlfSanitized());
  675. return $recv($1)._yourself();
  676. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  677. }, function($ctx1) {$ctx1.fill(self,"visitJSStatementNode:",{aNode:aNode},$globals.IRASTTranslator)});
  678. //>>excludeEnd("ctx");
  679. },
  680. //>>excludeStart("ide", pragmas.excludeIdeData);
  681. args: ["aNode"],
  682. source: "visitJSStatementNode: aNode\x0a\x09^ IRVerbatim new\x0a\x09\x09source: aNode source crlfSanitized;\x0a\x09\x09yourself",
  683. referencedClasses: ["IRVerbatim"],
  684. //>>excludeEnd("ide");
  685. messageSends: ["source:", "new", "crlfSanitized", "source", "yourself"]
  686. }),
  687. $globals.IRASTTranslator);
  688. $core.addMethod(
  689. $core.method({
  690. selector: "visitMethodNode:",
  691. protocol: "visiting",
  692. fn: function (aNode){
  693. var self=this,$self=this;
  694. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  695. return $core.withContext(function($ctx1) {
  696. //>>excludeEnd("ctx");
  697. var $2,$3,$4,$1,$6,$5,$7,$9,$10,$11,$8,$12,$14,$13,$15,$17,$19,$20,$18,$21,$16,$23,$22;
  698. $2=$recv($globals.IRMethod)._new();
  699. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  700. $ctx1.sendIdx["new"]=1;
  701. //>>excludeEnd("ctx");
  702. $recv($2)._source_($recv($self._source())._crlfSanitized());
  703. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  704. $ctx1.sendIdx["source:"]=1;
  705. //>>excludeEnd("ctx");
  706. $recv($2)._theClass_($self._theClass());
  707. $recv($2)._arguments_($recv(aNode)._arguments());
  708. $recv($2)._selector_($recv(aNode)._selector());
  709. $recv($2)._sendIndexes_($recv(aNode)._sendIndexes());
  710. $recv($2)._requiresSmalltalkContext_($recv(aNode)._requiresSmalltalkContext());
  711. $recv($2)._classReferences_($recv(aNode)._classReferences());
  712. $3=$recv(aNode)._scope();
  713. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  714. $ctx1.sendIdx["scope"]=1;
  715. //>>excludeEnd("ctx");
  716. $recv($2)._scope_($3);
  717. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  718. $ctx1.sendIdx["scope:"]=1;
  719. //>>excludeEnd("ctx");
  720. $4=$recv($2)._yourself();
  721. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  722. $ctx1.sendIdx["yourself"]=1;
  723. //>>excludeEnd("ctx");
  724. $1=$4;
  725. $self._method_($1);
  726. $6=$recv(aNode)._scope();
  727. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  728. $ctx1.sendIdx["scope"]=2;
  729. //>>excludeEnd("ctx");
  730. $5=$recv($6)._temps();
  731. $recv($5)._do_((function(each){
  732. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  733. return $core.withContext(function($ctx2) {
  734. //>>excludeEnd("ctx");
  735. $7=$self._method();
  736. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  737. $ctx2.sendIdx["method"]=1;
  738. //>>excludeEnd("ctx");
  739. $9=$recv($globals.IRTempDeclaration)._new();
  740. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  741. $ctx2.sendIdx["new"]=2;
  742. //>>excludeEnd("ctx");
  743. $recv($9)._name_($recv(each)._name());
  744. $10=$recv(aNode)._scope();
  745. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  746. $ctx2.sendIdx["scope"]=3;
  747. //>>excludeEnd("ctx");
  748. $recv($9)._scope_($10);
  749. $11=$recv($9)._yourself();
  750. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  751. $ctx2.sendIdx["yourself"]=2;
  752. //>>excludeEnd("ctx");
  753. $8=$11;
  754. return $recv($7)._add_($8);
  755. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  756. $ctx2.sendIdx["add:"]=1;
  757. //>>excludeEnd("ctx");
  758. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  759. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  760. //>>excludeEnd("ctx");
  761. }));
  762. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  763. $ctx1.sendIdx["do:"]=1;
  764. //>>excludeEnd("ctx");
  765. $recv($recv(aNode)._dagChildren())._do_((function(each){
  766. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  767. return $core.withContext(function($ctx2) {
  768. //>>excludeEnd("ctx");
  769. $12=$self._method();
  770. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  771. $ctx2.sendIdx["method"]=2;
  772. //>>excludeEnd("ctx");
  773. return $recv($12)._add_($self._visit_(each));
  774. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  775. $ctx2.sendIdx["add:"]=2;
  776. //>>excludeEnd("ctx");
  777. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  778. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)});
  779. //>>excludeEnd("ctx");
  780. }));
  781. $14=$recv(aNode)._scope();
  782. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  783. $ctx1.sendIdx["scope"]=4;
  784. //>>excludeEnd("ctx");
  785. $13=$recv($14)._hasLocalReturn();
  786. if(!$core.assert($13)){
  787. $15=$self._method();
  788. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  789. $ctx1.sendIdx["method"]=3;
  790. //>>excludeEnd("ctx");
  791. $17=$recv($globals.IRReturn)._new();
  792. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  793. $ctx1.sendIdx["new"]=3;
  794. //>>excludeEnd("ctx");
  795. $19=$recv($globals.IRVariable)._new();
  796. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  797. $ctx1.sendIdx["new"]=4;
  798. //>>excludeEnd("ctx");
  799. $recv($19)._variable_($recv($recv($recv(aNode)._scope())._pseudoVars())._at_("self"));
  800. $20=$recv($19)._yourself();
  801. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  802. $ctx1.sendIdx["yourself"]=3;
  803. //>>excludeEnd("ctx");
  804. $18=$20;
  805. $recv($17)._add_($18);
  806. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  807. $ctx1.sendIdx["add:"]=4;
  808. //>>excludeEnd("ctx");
  809. $21=$recv($17)._yourself();
  810. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  811. $ctx1.sendIdx["yourself"]=4;
  812. //>>excludeEnd("ctx");
  813. $16=$21;
  814. $recv($15)._add_($16);
  815. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  816. $ctx1.sendIdx["add:"]=3;
  817. //>>excludeEnd("ctx");
  818. $23=$recv($globals.IRVerbatim)._new();
  819. $recv($23)._source_(";".__comma($recv($globals.String)._lf()));
  820. $22=$recv($23)._yourself();
  821. $recv($15)._add_($22);
  822. }
  823. return $self._method();
  824. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  825. }, function($ctx1) {$ctx1.fill(self,"visitMethodNode:",{aNode:aNode},$globals.IRASTTranslator)});
  826. //>>excludeEnd("ctx");
  827. },
  828. //>>excludeStart("ide", pragmas.excludeIdeData);
  829. args: ["aNode"],
  830. source: "visitMethodNode: aNode\x0a\x0a\x09self method: (IRMethod new\x0a\x09\x09source: self source crlfSanitized;\x0a\x09\x09theClass: self theClass;\x0a\x09\x09arguments: aNode arguments;\x0a\x09\x09selector: aNode selector;\x0a\x09\x09sendIndexes: aNode sendIndexes;\x0a\x09\x09requiresSmalltalkContext: aNode requiresSmalltalkContext;\x0a\x09\x09classReferences: aNode classReferences;\x0a\x09\x09scope: aNode scope;\x0a\x09\x09yourself).\x0a\x0a\x09aNode scope temps do: [ :each |\x0a\x09\x09self method add: (IRTempDeclaration new\x0a\x09\x09\x09name: each name;\x0a\x09\x09\x09scope: aNode scope;\x0a\x09\x09\x09yourself) ].\x0a\x0a\x09aNode dagChildren do: [ :each | self method add: (self visit: each) ].\x0a\x0a\x09aNode scope hasLocalReturn ifFalse: [self method\x0a\x09\x09add: (IRReturn new\x0a\x09\x09\x09add: (IRVariable new\x0a\x09\x09\x09\x09variable: (aNode scope pseudoVars at: 'self');\x0a\x09\x09\x09\x09yourself);\x0a\x09\x09\x09yourself);\x0a\x09\x09add: (IRVerbatim new source: ';', String lf; yourself) ].\x0a\x0a\x09^ self method",
  831. referencedClasses: ["IRMethod", "IRTempDeclaration", "IRReturn", "IRVariable", "IRVerbatim", "String"],
  832. //>>excludeEnd("ide");
  833. messageSends: ["method:", "source:", "new", "crlfSanitized", "source", "theClass:", "theClass", "arguments:", "arguments", "selector:", "selector", "sendIndexes:", "sendIndexes", "requiresSmalltalkContext:", "requiresSmalltalkContext", "classReferences:", "classReferences", "scope:", "scope", "yourself", "do:", "temps", "add:", "method", "name:", "name", "dagChildren", "visit:", "ifFalse:", "hasLocalReturn", "variable:", "at:", "pseudoVars", ",", "lf"]
  834. }),
  835. $globals.IRASTTranslator);
  836. $core.addMethod(
  837. $core.method({
  838. selector: "visitOrAlias:",
  839. protocol: "visiting",
  840. fn: function (aNode){
  841. var self=this,$self=this;
  842. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  843. return $core.withContext(function($ctx1) {
  844. //>>excludeEnd("ctx");
  845. var $1;
  846. $1=$recv(aNode)._shouldBeAliased();
  847. if($core.assert($1)){
  848. return $self._alias_(aNode);
  849. } else {
  850. return $self._visit_(aNode);
  851. }
  852. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  853. }, function($ctx1) {$ctx1.fill(self,"visitOrAlias:",{aNode:aNode},$globals.IRASTTranslator)});
  854. //>>excludeEnd("ctx");
  855. },
  856. //>>excludeStart("ide", pragmas.excludeIdeData);
  857. args: ["aNode"],
  858. source: "visitOrAlias: aNode\x0a\x09^ aNode shouldBeAliased\x0a\x09\x09ifTrue: [ self alias: aNode ]\x0a\x09\x09ifFalse: [ self visit: aNode ]",
  859. referencedClasses: [],
  860. //>>excludeEnd("ide");
  861. messageSends: ["ifTrue:ifFalse:", "shouldBeAliased", "alias:", "visit:"]
  862. }),
  863. $globals.IRASTTranslator);
  864. $core.addMethod(
  865. $core.method({
  866. selector: "visitReturnNode:",
  867. protocol: "visiting",
  868. fn: function (aNode){
  869. var self=this,$self=this;
  870. var return_;
  871. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  872. return $core.withContext(function($ctx1) {
  873. //>>excludeEnd("ctx");
  874. var $1;
  875. $1=$recv(aNode)._nonLocalReturn();
  876. if($core.assert($1)){
  877. return_=$recv($globals.IRNonLocalReturn)._new();
  878. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  879. $ctx1.sendIdx["new"]=1;
  880. //>>excludeEnd("ctx");
  881. } else {
  882. return_=$recv($globals.IRReturn)._new();
  883. }
  884. $recv(return_)._scope_($recv(aNode)._scope());
  885. $recv($recv(aNode)._dagChildren())._do_((function(each){
  886. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  887. return $core.withContext(function($ctx2) {
  888. //>>excludeEnd("ctx");
  889. return $recv(return_)._add_($self._visitOrAlias_(each));
  890. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  891. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,3)});
  892. //>>excludeEnd("ctx");
  893. }));
  894. return return_;
  895. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  896. }, function($ctx1) {$ctx1.fill(self,"visitReturnNode:",{aNode:aNode,return_:return_},$globals.IRASTTranslator)});
  897. //>>excludeEnd("ctx");
  898. },
  899. //>>excludeStart("ide", pragmas.excludeIdeData);
  900. args: ["aNode"],
  901. source: "visitReturnNode: aNode\x0a\x09| return |\x0a\x09return := aNode nonLocalReturn\x0a\x09\x09ifTrue: [ IRNonLocalReturn new ]\x0a\x09\x09ifFalse: [ IRReturn new ].\x0a\x09return scope: aNode scope.\x0a\x09aNode dagChildren do: [ :each |\x0a\x09\x09return add: (self visitOrAlias: each) ].\x0a\x09^ return",
  902. referencedClasses: ["IRNonLocalReturn", "IRReturn"],
  903. //>>excludeEnd("ide");
  904. messageSends: ["ifTrue:ifFalse:", "nonLocalReturn", "new", "scope:", "scope", "do:", "dagChildren", "add:", "visitOrAlias:"]
  905. }),
  906. $globals.IRASTTranslator);
  907. $core.addMethod(
  908. $core.method({
  909. selector: "visitSendNode:",
  910. protocol: "visiting",
  911. fn: function (aNode){
  912. var self=this,$self=this;
  913. var send;
  914. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  915. return $core.withContext(function($ctx1) {
  916. //>>excludeEnd("ctx");
  917. var $1;
  918. send=$recv($globals.IRSend)._new();
  919. $1=send;
  920. $recv($1)._selector_($recv(aNode)._selector());
  921. $recv($1)._index_($recv(aNode)._index());
  922. $recv($self._aliasTemporally_($recv(aNode)._dagChildren()))._do_((function(each){
  923. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  924. return $core.withContext(function($ctx2) {
  925. //>>excludeEnd("ctx");
  926. return $recv(send)._add_(each);
  927. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  928. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  929. //>>excludeEnd("ctx");
  930. }));
  931. return send;
  932. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  933. }, function($ctx1) {$ctx1.fill(self,"visitSendNode:",{aNode:aNode,send:send},$globals.IRASTTranslator)});
  934. //>>excludeEnd("ctx");
  935. },
  936. //>>excludeStart("ide", pragmas.excludeIdeData);
  937. args: ["aNode"],
  938. source: "visitSendNode: aNode\x0a\x09| send |\x0a\x09send := IRSend new.\x0a\x09send\x0a\x09\x09selector: aNode selector;\x0a\x09\x09index: aNode index.\x0a\x09\x0a\x09(self aliasTemporally: aNode dagChildren) do: [ :each | send add: each ].\x0a\x0a\x09^ send",
  939. referencedClasses: ["IRSend"],
  940. //>>excludeEnd("ide");
  941. messageSends: ["new", "selector:", "selector", "index:", "index", "do:", "aliasTemporally:", "dagChildren", "add:"]
  942. }),
  943. $globals.IRASTTranslator);
  944. $core.addMethod(
  945. $core.method({
  946. selector: "visitSequenceNode:",
  947. protocol: "visiting",
  948. fn: function (aNode){
  949. var self=this,$self=this;
  950. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  951. return $core.withContext(function($ctx1) {
  952. //>>excludeEnd("ctx");
  953. return $self._withSequence_do_($recv($globals.IRSequence)._new(),(function(){
  954. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  955. return $core.withContext(function($ctx2) {
  956. //>>excludeEnd("ctx");
  957. return $recv($recv(aNode)._dagChildren())._do_((function(each){
  958. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  959. return $core.withContext(function($ctx3) {
  960. //>>excludeEnd("ctx");
  961. return $self._addToSequence_($self._visitOrAlias_(each));
  962. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  963. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)});
  964. //>>excludeEnd("ctx");
  965. }));
  966. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  967. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  968. //>>excludeEnd("ctx");
  969. }));
  970. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  971. }, function($ctx1) {$ctx1.fill(self,"visitSequenceNode:",{aNode:aNode},$globals.IRASTTranslator)});
  972. //>>excludeEnd("ctx");
  973. },
  974. //>>excludeStart("ide", pragmas.excludeIdeData);
  975. args: ["aNode"],
  976. source: "visitSequenceNode: aNode\x0a\x09^ self\x0a\x09\x09withSequence: IRSequence new\x0a\x09\x09do: [ aNode dagChildren do: [ :each |\x0a\x09\x09\x09self addToSequence: (self visitOrAlias: each) ] ]",
  977. referencedClasses: ["IRSequence"],
  978. //>>excludeEnd("ide");
  979. messageSends: ["withSequence:do:", "new", "do:", "dagChildren", "addToSequence:", "visitOrAlias:"]
  980. }),
  981. $globals.IRASTTranslator);
  982. $core.addMethod(
  983. $core.method({
  984. selector: "visitValueNode:",
  985. protocol: "visiting",
  986. fn: function (aNode){
  987. var self=this,$self=this;
  988. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  989. return $core.withContext(function($ctx1) {
  990. //>>excludeEnd("ctx");
  991. var $1;
  992. $1=$recv($globals.IRValue)._new();
  993. $recv($1)._value_($recv(aNode)._value());
  994. return $recv($1)._yourself();
  995. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  996. }, function($ctx1) {$ctx1.fill(self,"visitValueNode:",{aNode:aNode},$globals.IRASTTranslator)});
  997. //>>excludeEnd("ctx");
  998. },
  999. //>>excludeStart("ide", pragmas.excludeIdeData);
  1000. args: ["aNode"],
  1001. source: "visitValueNode: aNode\x0a\x09^ IRValue new\x0a\x09\x09value: aNode value;\x0a\x09\x09yourself",
  1002. referencedClasses: ["IRValue"],
  1003. //>>excludeEnd("ide");
  1004. messageSends: ["value:", "new", "value", "yourself"]
  1005. }),
  1006. $globals.IRASTTranslator);
  1007. $core.addMethod(
  1008. $core.method({
  1009. selector: "visitVariableNode:",
  1010. protocol: "visiting",
  1011. fn: function (aNode){
  1012. var self=this,$self=this;
  1013. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1014. return $core.withContext(function($ctx1) {
  1015. //>>excludeEnd("ctx");
  1016. var $1;
  1017. $1=$recv($globals.IRVariable)._new();
  1018. $recv($1)._variable_($recv(aNode)._binding());
  1019. return $recv($1)._yourself();
  1020. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1021. }, function($ctx1) {$ctx1.fill(self,"visitVariableNode:",{aNode:aNode},$globals.IRASTTranslator)});
  1022. //>>excludeEnd("ctx");
  1023. },
  1024. //>>excludeStart("ide", pragmas.excludeIdeData);
  1025. args: ["aNode"],
  1026. source: "visitVariableNode: aNode\x0a\x09^ IRVariable new\x0a\x09\x09variable: aNode binding;\x0a\x09\x09yourself",
  1027. referencedClasses: ["IRVariable"],
  1028. //>>excludeEnd("ide");
  1029. messageSends: ["variable:", "new", "binding", "yourself"]
  1030. }),
  1031. $globals.IRASTTranslator);
  1032. $core.addMethod(
  1033. $core.method({
  1034. selector: "withSequence:do:",
  1035. protocol: "accessing",
  1036. fn: function (aSequence,aBlock){
  1037. var self=this,$self=this;
  1038. var outerSequence;
  1039. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1040. return $core.withContext(function($ctx1) {
  1041. //>>excludeEnd("ctx");
  1042. outerSequence=$self._sequence();
  1043. $self._sequence_(aSequence);
  1044. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1045. $ctx1.sendIdx["sequence:"]=1;
  1046. //>>excludeEnd("ctx");
  1047. $recv(aBlock)._value();
  1048. $self._sequence_(outerSequence);
  1049. return aSequence;
  1050. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1051. }, function($ctx1) {$ctx1.fill(self,"withSequence:do:",{aSequence:aSequence,aBlock:aBlock,outerSequence:outerSequence},$globals.IRASTTranslator)});
  1052. //>>excludeEnd("ctx");
  1053. },
  1054. //>>excludeStart("ide", pragmas.excludeIdeData);
  1055. args: ["aSequence", "aBlock"],
  1056. source: "withSequence: aSequence do: aBlock\x0a\x09| outerSequence |\x0a\x09outerSequence := self sequence.\x0a\x09self sequence: aSequence.\x0a\x09aBlock value.\x0a\x09self sequence: outerSequence.\x0a\x09^ aSequence",
  1057. referencedClasses: [],
  1058. //>>excludeEnd("ide");
  1059. messageSends: ["sequence", "sequence:", "value"]
  1060. }),
  1061. $globals.IRASTTranslator);
  1062. $core.addClass("IRInstruction", $globals.DagParentNode, ["parent"], "Compiler-IR");
  1063. //>>excludeStart("ide", pragmas.excludeIdeData);
  1064. $globals.IRInstruction.comment="I am the abstract root class of the IR (intermediate representation) instructions class hierarchy.\x0aThe IR graph is used to emit JavaScript code using a JSStream.";
  1065. //>>excludeEnd("ide");
  1066. $core.addMethod(
  1067. $core.method({
  1068. selector: "add:",
  1069. protocol: "building",
  1070. fn: function (anObject){
  1071. var self=this,$self=this;
  1072. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1073. return $core.withContext(function($ctx1) {
  1074. //>>excludeEnd("ctx");
  1075. $recv(anObject)._parent_(self);
  1076. return $recv($self._dagChildren())._add_(anObject);
  1077. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1078. }, function($ctx1) {$ctx1.fill(self,"add:",{anObject:anObject},$globals.IRInstruction)});
  1079. //>>excludeEnd("ctx");
  1080. },
  1081. //>>excludeStart("ide", pragmas.excludeIdeData);
  1082. args: ["anObject"],
  1083. source: "add: anObject\x0a\x09anObject parent: self.\x0a\x09^ self dagChildren add: anObject",
  1084. referencedClasses: [],
  1085. //>>excludeEnd("ide");
  1086. messageSends: ["parent:", "add:", "dagChildren"]
  1087. }),
  1088. $globals.IRInstruction);
  1089. $core.addMethod(
  1090. $core.method({
  1091. selector: "isClosure",
  1092. protocol: "testing",
  1093. fn: function (){
  1094. var self=this,$self=this;
  1095. return false;
  1096. },
  1097. //>>excludeStart("ide", pragmas.excludeIdeData);
  1098. args: [],
  1099. source: "isClosure\x0a\x09^ false",
  1100. referencedClasses: [],
  1101. //>>excludeEnd("ide");
  1102. messageSends: []
  1103. }),
  1104. $globals.IRInstruction);
  1105. $core.addMethod(
  1106. $core.method({
  1107. selector: "isInlined",
  1108. protocol: "testing",
  1109. fn: function (){
  1110. var self=this,$self=this;
  1111. return false;
  1112. },
  1113. //>>excludeStart("ide", pragmas.excludeIdeData);
  1114. args: [],
  1115. source: "isInlined\x0a\x09^ false",
  1116. referencedClasses: [],
  1117. //>>excludeEnd("ide");
  1118. messageSends: []
  1119. }),
  1120. $globals.IRInstruction);
  1121. $core.addMethod(
  1122. $core.method({
  1123. selector: "isMethod",
  1124. protocol: "testing",
  1125. fn: function (){
  1126. var self=this,$self=this;
  1127. return false;
  1128. },
  1129. //>>excludeStart("ide", pragmas.excludeIdeData);
  1130. args: [],
  1131. source: "isMethod\x0a\x09^ false",
  1132. referencedClasses: [],
  1133. //>>excludeEnd("ide");
  1134. messageSends: []
  1135. }),
  1136. $globals.IRInstruction);
  1137. $core.addMethod(
  1138. $core.method({
  1139. selector: "isSelf",
  1140. protocol: "testing",
  1141. fn: function (){
  1142. var self=this,$self=this;
  1143. return false;
  1144. },
  1145. //>>excludeStart("ide", pragmas.excludeIdeData);
  1146. args: [],
  1147. source: "isSelf\x0a\x09^ false",
  1148. referencedClasses: [],
  1149. //>>excludeEnd("ide");
  1150. messageSends: []
  1151. }),
  1152. $globals.IRInstruction);
  1153. $core.addMethod(
  1154. $core.method({
  1155. selector: "isSend",
  1156. protocol: "testing",
  1157. fn: function (){
  1158. var self=this,$self=this;
  1159. return false;
  1160. },
  1161. //>>excludeStart("ide", pragmas.excludeIdeData);
  1162. args: [],
  1163. source: "isSend\x0a\x09^ false",
  1164. referencedClasses: [],
  1165. //>>excludeEnd("ide");
  1166. messageSends: []
  1167. }),
  1168. $globals.IRInstruction);
  1169. $core.addMethod(
  1170. $core.method({
  1171. selector: "isSequence",
  1172. protocol: "testing",
  1173. fn: function (){
  1174. var self=this,$self=this;
  1175. return false;
  1176. },
  1177. //>>excludeStart("ide", pragmas.excludeIdeData);
  1178. args: [],
  1179. source: "isSequence\x0a\x09^ false",
  1180. referencedClasses: [],
  1181. //>>excludeEnd("ide");
  1182. messageSends: []
  1183. }),
  1184. $globals.IRInstruction);
  1185. $core.addMethod(
  1186. $core.method({
  1187. selector: "isSuper",
  1188. protocol: "testing",
  1189. fn: function (){
  1190. var self=this,$self=this;
  1191. return false;
  1192. },
  1193. //>>excludeStart("ide", pragmas.excludeIdeData);
  1194. args: [],
  1195. source: "isSuper\x0a\x09^ false",
  1196. referencedClasses: [],
  1197. //>>excludeEnd("ide");
  1198. messageSends: []
  1199. }),
  1200. $globals.IRInstruction);
  1201. $core.addMethod(
  1202. $core.method({
  1203. selector: "isTempDeclaration",
  1204. protocol: "testing",
  1205. fn: function (){
  1206. var self=this,$self=this;
  1207. return false;
  1208. },
  1209. //>>excludeStart("ide", pragmas.excludeIdeData);
  1210. args: [],
  1211. source: "isTempDeclaration\x0a\x09^ false",
  1212. referencedClasses: [],
  1213. //>>excludeEnd("ide");
  1214. messageSends: []
  1215. }),
  1216. $globals.IRInstruction);
  1217. $core.addMethod(
  1218. $core.method({
  1219. selector: "isVariable",
  1220. protocol: "testing",
  1221. fn: function (){
  1222. var self=this,$self=this;
  1223. return false;
  1224. },
  1225. //>>excludeStart("ide", pragmas.excludeIdeData);
  1226. args: [],
  1227. source: "isVariable\x0a\x09^ false",
  1228. referencedClasses: [],
  1229. //>>excludeEnd("ide");
  1230. messageSends: []
  1231. }),
  1232. $globals.IRInstruction);
  1233. $core.addMethod(
  1234. $core.method({
  1235. selector: "method",
  1236. protocol: "accessing",
  1237. fn: function (){
  1238. var self=this,$self=this;
  1239. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1240. return $core.withContext(function($ctx1) {
  1241. //>>excludeEnd("ctx");
  1242. return $recv($self._parent())._method();
  1243. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1244. }, function($ctx1) {$ctx1.fill(self,"method",{},$globals.IRInstruction)});
  1245. //>>excludeEnd("ctx");
  1246. },
  1247. //>>excludeStart("ide", pragmas.excludeIdeData);
  1248. args: [],
  1249. source: "method\x0a\x09^ self parent method",
  1250. referencedClasses: [],
  1251. //>>excludeEnd("ide");
  1252. messageSends: ["method", "parent"]
  1253. }),
  1254. $globals.IRInstruction);
  1255. $core.addMethod(
  1256. $core.method({
  1257. selector: "needsBoxingAsReceiver",
  1258. protocol: "testing",
  1259. fn: function (){
  1260. var self=this,$self=this;
  1261. return true;
  1262. },
  1263. //>>excludeStart("ide", pragmas.excludeIdeData);
  1264. args: [],
  1265. source: "needsBoxingAsReceiver\x0a\x09^ true",
  1266. referencedClasses: [],
  1267. //>>excludeEnd("ide");
  1268. messageSends: []
  1269. }),
  1270. $globals.IRInstruction);
  1271. $core.addMethod(
  1272. $core.method({
  1273. selector: "parent",
  1274. protocol: "accessing",
  1275. fn: function (){
  1276. var self=this,$self=this;
  1277. return $self["@parent"];
  1278. },
  1279. //>>excludeStart("ide", pragmas.excludeIdeData);
  1280. args: [],
  1281. source: "parent\x0a\x09^ parent",
  1282. referencedClasses: [],
  1283. //>>excludeEnd("ide");
  1284. messageSends: []
  1285. }),
  1286. $globals.IRInstruction);
  1287. $core.addMethod(
  1288. $core.method({
  1289. selector: "parent:",
  1290. protocol: "accessing",
  1291. fn: function (anIRInstruction){
  1292. var self=this,$self=this;
  1293. $self["@parent"]=anIRInstruction;
  1294. return self;
  1295. },
  1296. //>>excludeStart("ide", pragmas.excludeIdeData);
  1297. args: ["anIRInstruction"],
  1298. source: "parent: anIRInstruction\x0a\x09parent := anIRInstruction",
  1299. referencedClasses: [],
  1300. //>>excludeEnd("ide");
  1301. messageSends: []
  1302. }),
  1303. $globals.IRInstruction);
  1304. $core.addMethod(
  1305. $core.method({
  1306. selector: "remove:",
  1307. protocol: "building",
  1308. fn: function (anIRInstruction){
  1309. var self=this,$self=this;
  1310. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1311. return $core.withContext(function($ctx1) {
  1312. //>>excludeEnd("ctx");
  1313. $recv($self._dagChildren())._remove_(anIRInstruction);
  1314. return self;
  1315. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1316. }, function($ctx1) {$ctx1.fill(self,"remove:",{anIRInstruction:anIRInstruction},$globals.IRInstruction)});
  1317. //>>excludeEnd("ctx");
  1318. },
  1319. //>>excludeStart("ide", pragmas.excludeIdeData);
  1320. args: ["anIRInstruction"],
  1321. source: "remove: anIRInstruction\x0a\x09self dagChildren remove: anIRInstruction",
  1322. referencedClasses: [],
  1323. //>>excludeEnd("ide");
  1324. messageSends: ["remove:", "dagChildren"]
  1325. }),
  1326. $globals.IRInstruction);
  1327. $core.addMethod(
  1328. $core.method({
  1329. selector: "replace:with:",
  1330. protocol: "building",
  1331. fn: function (anIRInstruction,anotherIRInstruction){
  1332. var self=this,$self=this;
  1333. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1334. return $core.withContext(function($ctx1) {
  1335. //>>excludeEnd("ctx");
  1336. var $1;
  1337. $recv(anotherIRInstruction)._parent_(self);
  1338. $1=$self._dagChildren();
  1339. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1340. $ctx1.sendIdx["dagChildren"]=1;
  1341. //>>excludeEnd("ctx");
  1342. $recv($1)._at_put_($recv($self._dagChildren())._indexOf_(anIRInstruction),anotherIRInstruction);
  1343. return self;
  1344. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1345. }, function($ctx1) {$ctx1.fill(self,"replace:with:",{anIRInstruction:anIRInstruction,anotherIRInstruction:anotherIRInstruction},$globals.IRInstruction)});
  1346. //>>excludeEnd("ctx");
  1347. },
  1348. //>>excludeStart("ide", pragmas.excludeIdeData);
  1349. args: ["anIRInstruction", "anotherIRInstruction"],
  1350. source: "replace: anIRInstruction with: anotherIRInstruction\x0a\x09anotherIRInstruction parent: self.\x0a\x09self dagChildren\x0a\x09\x09at: (self dagChildren indexOf: anIRInstruction)\x0a\x09\x09put: anotherIRInstruction",
  1351. referencedClasses: [],
  1352. //>>excludeEnd("ide");
  1353. messageSends: ["parent:", "at:put:", "dagChildren", "indexOf:"]
  1354. }),
  1355. $globals.IRInstruction);
  1356. $core.addMethod(
  1357. $core.method({
  1358. selector: "replaceWith:",
  1359. protocol: "building",
  1360. fn: function (anIRInstruction){
  1361. var self=this,$self=this;
  1362. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1363. return $core.withContext(function($ctx1) {
  1364. //>>excludeEnd("ctx");
  1365. $recv($self._parent())._replace_with_(self,anIRInstruction);
  1366. return self;
  1367. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1368. }, function($ctx1) {$ctx1.fill(self,"replaceWith:",{anIRInstruction:anIRInstruction},$globals.IRInstruction)});
  1369. //>>excludeEnd("ctx");
  1370. },
  1371. //>>excludeStart("ide", pragmas.excludeIdeData);
  1372. args: ["anIRInstruction"],
  1373. source: "replaceWith: anIRInstruction\x0a\x09self parent replace: self with: anIRInstruction",
  1374. referencedClasses: [],
  1375. //>>excludeEnd("ide");
  1376. messageSends: ["replace:with:", "parent"]
  1377. }),
  1378. $globals.IRInstruction);
  1379. $core.addMethod(
  1380. $core.method({
  1381. selector: "scope",
  1382. protocol: "accessing",
  1383. fn: function (){
  1384. var self=this,$self=this;
  1385. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1386. return $core.withContext(function($ctx1) {
  1387. //>>excludeEnd("ctx");
  1388. var $1,$receiver;
  1389. $1=$self._parent();
  1390. if(($receiver = $1) == null || $receiver.a$nil){
  1391. return $1;
  1392. } else {
  1393. var node;
  1394. node=$receiver;
  1395. return $recv(node)._scope();
  1396. }
  1397. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1398. }, function($ctx1) {$ctx1.fill(self,"scope",{},$globals.IRInstruction)});
  1399. //>>excludeEnd("ctx");
  1400. },
  1401. //>>excludeStart("ide", pragmas.excludeIdeData);
  1402. args: [],
  1403. source: "scope\x0a\x09^ self parent ifNotNil: [ :node | \x0a\x09\x09node scope ]",
  1404. referencedClasses: [],
  1405. //>>excludeEnd("ide");
  1406. messageSends: ["ifNotNil:", "parent", "scope"]
  1407. }),
  1408. $globals.IRInstruction);
  1409. $core.addMethod(
  1410. $core.method({
  1411. selector: "yieldsValue",
  1412. protocol: "testing",
  1413. fn: function (){
  1414. var self=this,$self=this;
  1415. return true;
  1416. },
  1417. //>>excludeStart("ide", pragmas.excludeIdeData);
  1418. args: [],
  1419. source: "yieldsValue\x0a\x09^ true",
  1420. referencedClasses: [],
  1421. //>>excludeEnd("ide");
  1422. messageSends: []
  1423. }),
  1424. $globals.IRInstruction);
  1425. $core.addMethod(
  1426. $core.method({
  1427. selector: "on:",
  1428. protocol: "instance creation",
  1429. fn: function (aBuilder){
  1430. var self=this,$self=this;
  1431. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1432. return $core.withContext(function($ctx1) {
  1433. //>>excludeEnd("ctx");
  1434. var $1;
  1435. $1=$self._new();
  1436. $recv($1)._builder_(aBuilder);
  1437. return $recv($1)._yourself();
  1438. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1439. }, function($ctx1) {$ctx1.fill(self,"on:",{aBuilder:aBuilder},$globals.IRInstruction.a$cls)});
  1440. //>>excludeEnd("ctx");
  1441. },
  1442. //>>excludeStart("ide", pragmas.excludeIdeData);
  1443. args: ["aBuilder"],
  1444. source: "on: aBuilder\x0a\x09^ self new\x0a\x09\x09builder: aBuilder;\x0a\x09\x09yourself",
  1445. referencedClasses: [],
  1446. //>>excludeEnd("ide");
  1447. messageSends: ["builder:", "new", "yourself"]
  1448. }),
  1449. $globals.IRInstruction.a$cls);
  1450. $core.addClass("IRAssignment", $globals.IRInstruction, [], "Compiler-IR");
  1451. $core.addMethod(
  1452. $core.method({
  1453. selector: "acceptDagVisitor:",
  1454. protocol: "visiting",
  1455. fn: function (aVisitor){
  1456. var self=this,$self=this;
  1457. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1458. return $core.withContext(function($ctx1) {
  1459. //>>excludeEnd("ctx");
  1460. return $recv(aVisitor)._visitIRAssignment_(self);
  1461. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1462. }, function($ctx1) {$ctx1.fill(self,"acceptDagVisitor:",{aVisitor:aVisitor},$globals.IRAssignment)});
  1463. //>>excludeEnd("ctx");
  1464. },
  1465. //>>excludeStart("ide", pragmas.excludeIdeData);
  1466. args: ["aVisitor"],
  1467. source: "acceptDagVisitor: aVisitor\x0a\x09^ aVisitor visitIRAssignment: self",
  1468. referencedClasses: [],
  1469. //>>excludeEnd("ide");
  1470. messageSends: ["visitIRAssignment:"]
  1471. }),
  1472. $globals.IRAssignment);
  1473. $core.addMethod(
  1474. $core.method({
  1475. selector: "left",
  1476. protocol: "accessing",
  1477. fn: function (){
  1478. var self=this,$self=this;
  1479. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1480. return $core.withContext(function($ctx1) {
  1481. //>>excludeEnd("ctx");
  1482. return $recv($self._dagChildren())._first();
  1483. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1484. }, function($ctx1) {$ctx1.fill(self,"left",{},$globals.IRAssignment)});
  1485. //>>excludeEnd("ctx");
  1486. },
  1487. //>>excludeStart("ide", pragmas.excludeIdeData);
  1488. args: [],
  1489. source: "left\x0a\x09^ self dagChildren first",
  1490. referencedClasses: [],
  1491. //>>excludeEnd("ide");
  1492. messageSends: ["first", "dagChildren"]
  1493. }),
  1494. $globals.IRAssignment);
  1495. $core.addMethod(
  1496. $core.method({
  1497. selector: "right",
  1498. protocol: "accessing",
  1499. fn: function (){
  1500. var self=this,$self=this;
  1501. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1502. return $core.withContext(function($ctx1) {
  1503. //>>excludeEnd("ctx");
  1504. return $recv($self._dagChildren())._last();
  1505. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1506. }, function($ctx1) {$ctx1.fill(self,"right",{},$globals.IRAssignment)});
  1507. //>>excludeEnd("ctx");
  1508. },
  1509. //>>excludeStart("ide", pragmas.excludeIdeData);
  1510. args: [],
  1511. source: "right\x0a\x09^ self dagChildren last",
  1512. referencedClasses: [],
  1513. //>>excludeEnd("ide");
  1514. messageSends: ["last", "dagChildren"]
  1515. }),
  1516. $globals.IRAssignment);
  1517. $core.addClass("IRDynamicArray", $globals.IRInstruction, [], "Compiler-IR");
  1518. $core.addMethod(
  1519. $core.method({
  1520. selector: "acceptDagVisitor:",
  1521. protocol: "visiting",
  1522. fn: function (aVisitor){
  1523. var self=this,$self=this;
  1524. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1525. return $core.withContext(function($ctx1) {
  1526. //>>excludeEnd("ctx");
  1527. return $recv(aVisitor)._visitIRDynamicArray_(self);
  1528. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1529. }, function($ctx1) {$ctx1.fill(self,"acceptDagVisitor:",{aVisitor:aVisitor},$globals.IRDynamicArray)});
  1530. //>>excludeEnd("ctx");
  1531. },
  1532. //>>excludeStart("ide", pragmas.excludeIdeData);
  1533. args: ["aVisitor"],
  1534. source: "acceptDagVisitor: aVisitor\x0a\x09^ aVisitor visitIRDynamicArray: self",
  1535. referencedClasses: [],
  1536. //>>excludeEnd("ide");
  1537. messageSends: ["visitIRDynamicArray:"]
  1538. }),
  1539. $globals.IRDynamicArray);
  1540. $core.addClass("IRDynamicDictionary", $globals.IRInstruction, [], "Compiler-IR");
  1541. $core.addMethod(
  1542. $core.method({
  1543. selector: "acceptDagVisitor:",
  1544. protocol: "visiting",
  1545. fn: function (aVisitor){
  1546. var self=this,$self=this;
  1547. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1548. return $core.withContext(function($ctx1) {
  1549. //>>excludeEnd("ctx");
  1550. return $recv(aVisitor)._visitIRDynamicDictionary_(self);
  1551. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1552. }, function($ctx1) {$ctx1.fill(self,"acceptDagVisitor:",{aVisitor:aVisitor},$globals.IRDynamicDictionary)});
  1553. //>>excludeEnd("ctx");
  1554. },
  1555. //>>excludeStart("ide", pragmas.excludeIdeData);
  1556. args: ["aVisitor"],
  1557. source: "acceptDagVisitor: aVisitor\x0a\x09^ aVisitor visitIRDynamicDictionary: self",
  1558. referencedClasses: [],
  1559. //>>excludeEnd("ide");
  1560. messageSends: ["visitIRDynamicDictionary:"]
  1561. }),
  1562. $globals.IRDynamicDictionary);
  1563. $core.addClass("IRScopedInstruction", $globals.IRInstruction, ["scope"], "Compiler-IR");
  1564. $core.addMethod(
  1565. $core.method({
  1566. selector: "scope",
  1567. protocol: "accessing",
  1568. fn: function (){
  1569. var self=this,$self=this;
  1570. return $self["@scope"];
  1571. },
  1572. //>>excludeStart("ide", pragmas.excludeIdeData);
  1573. args: [],
  1574. source: "scope\x0a\x09^ scope",
  1575. referencedClasses: [],
  1576. //>>excludeEnd("ide");
  1577. messageSends: []
  1578. }),
  1579. $globals.IRScopedInstruction);
  1580. $core.addMethod(
  1581. $core.method({
  1582. selector: "scope:",
  1583. protocol: "accessing",
  1584. fn: function (aScope){
  1585. var self=this,$self=this;
  1586. $self["@scope"]=aScope;
  1587. return self;
  1588. },
  1589. //>>excludeStart("ide", pragmas.excludeIdeData);
  1590. args: ["aScope"],
  1591. source: "scope: aScope\x0a\x09scope := aScope",
  1592. referencedClasses: [],
  1593. //>>excludeEnd("ide");
  1594. messageSends: []
  1595. }),
  1596. $globals.IRScopedInstruction);
  1597. $core.addClass("IRClosureInstruction", $globals.IRScopedInstruction, ["arguments", "requiresSmalltalkContext"], "Compiler-IR");
  1598. $core.addMethod(
  1599. $core.method({
  1600. selector: "arguments",
  1601. protocol: "accessing",
  1602. fn: function (){
  1603. var self=this,$self=this;
  1604. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1605. return $core.withContext(function($ctx1) {
  1606. //>>excludeEnd("ctx");
  1607. var $1,$receiver;
  1608. $1=$self["@arguments"];
  1609. if(($receiver = $1) == null || $receiver.a$nil){
  1610. return [];
  1611. } else {
  1612. return $1;
  1613. }
  1614. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1615. }, function($ctx1) {$ctx1.fill(self,"arguments",{},$globals.IRClosureInstruction)});
  1616. //>>excludeEnd("ctx");
  1617. },
  1618. //>>excludeStart("ide", pragmas.excludeIdeData);
  1619. args: [],
  1620. source: "arguments\x0a\x09^ arguments ifNil: [ #() ]",
  1621. referencedClasses: [],
  1622. //>>excludeEnd("ide");
  1623. messageSends: ["ifNil:"]
  1624. }),
  1625. $globals.IRClosureInstruction);
  1626. $core.addMethod(
  1627. $core.method({
  1628. selector: "arguments:",
  1629. protocol: "accessing",
  1630. fn: function (aCollection){
  1631. var self=this,$self=this;
  1632. $self["@arguments"]=aCollection;
  1633. return self;
  1634. },
  1635. //>>excludeStart("ide", pragmas.excludeIdeData);
  1636. args: ["aCollection"],
  1637. source: "arguments: aCollection\x0a\x09arguments := aCollection",
  1638. referencedClasses: [],
  1639. //>>excludeEnd("ide");
  1640. messageSends: []
  1641. }),
  1642. $globals.IRClosureInstruction);
  1643. $core.addMethod(
  1644. $core.method({
  1645. selector: "locals",
  1646. protocol: "accessing",
  1647. fn: function (){
  1648. var self=this,$self=this;
  1649. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1650. return $core.withContext(function($ctx1) {
  1651. //>>excludeEnd("ctx");
  1652. var $1;
  1653. $1=$recv($self._arguments())._copy();
  1654. $recv($1)._addAll_($recv($self._tempDeclarations())._collect_((function(each){
  1655. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1656. return $core.withContext(function($ctx2) {
  1657. //>>excludeEnd("ctx");
  1658. return $recv(each)._name();
  1659. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1660. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  1661. //>>excludeEnd("ctx");
  1662. })));
  1663. return $recv($1)._yourself();
  1664. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1665. }, function($ctx1) {$ctx1.fill(self,"locals",{},$globals.IRClosureInstruction)});
  1666. //>>excludeEnd("ctx");
  1667. },
  1668. //>>excludeStart("ide", pragmas.excludeIdeData);
  1669. args: [],
  1670. source: "locals\x0a\x09^ self arguments copy\x0a\x09\x09addAll: (self tempDeclarations collect: [ :each | each name ]);\x0a\x09\x09yourself",
  1671. referencedClasses: [],
  1672. //>>excludeEnd("ide");
  1673. messageSends: ["addAll:", "copy", "arguments", "collect:", "tempDeclarations", "name", "yourself"]
  1674. }),
  1675. $globals.IRClosureInstruction);
  1676. $core.addMethod(
  1677. $core.method({
  1678. selector: "requiresSmalltalkContext",
  1679. protocol: "accessing",
  1680. fn: function (){
  1681. var self=this,$self=this;
  1682. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1683. return $core.withContext(function($ctx1) {
  1684. //>>excludeEnd("ctx");
  1685. var $1,$receiver;
  1686. $1=$self["@requiresSmalltalkContext"];
  1687. if(($receiver = $1) == null || $receiver.a$nil){
  1688. return false;
  1689. } else {
  1690. return $1;
  1691. }
  1692. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1693. }, function($ctx1) {$ctx1.fill(self,"requiresSmalltalkContext",{},$globals.IRClosureInstruction)});
  1694. //>>excludeEnd("ctx");
  1695. },
  1696. //>>excludeStart("ide", pragmas.excludeIdeData);
  1697. args: [],
  1698. source: "requiresSmalltalkContext\x0a\x09^ requiresSmalltalkContext ifNil: [ false ]",
  1699. referencedClasses: [],
  1700. //>>excludeEnd("ide");
  1701. messageSends: ["ifNil:"]
  1702. }),
  1703. $globals.IRClosureInstruction);
  1704. $core.addMethod(
  1705. $core.method({
  1706. selector: "requiresSmalltalkContext:",
  1707. protocol: "accessing",
  1708. fn: function (anObject){
  1709. var self=this,$self=this;
  1710. $self["@requiresSmalltalkContext"]=anObject;
  1711. return self;
  1712. },
  1713. //>>excludeStart("ide", pragmas.excludeIdeData);
  1714. args: ["anObject"],
  1715. source: "requiresSmalltalkContext: anObject\x0a\x09requiresSmalltalkContext := anObject",
  1716. referencedClasses: [],
  1717. //>>excludeEnd("ide");
  1718. messageSends: []
  1719. }),
  1720. $globals.IRClosureInstruction);
  1721. $core.addMethod(
  1722. $core.method({
  1723. selector: "scope:",
  1724. protocol: "accessing",
  1725. fn: function (aScope){
  1726. var self=this,$self=this;
  1727. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1728. return $core.withContext(function($ctx1) {
  1729. //>>excludeEnd("ctx");
  1730. (
  1731. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1732. $ctx1.supercall = true,
  1733. //>>excludeEnd("ctx");
  1734. ($globals.IRClosureInstruction.superclass||$boot.nilAsClass).fn.prototype._scope_.apply($self, [aScope]));
  1735. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1736. $ctx1.supercall = false;
  1737. //>>excludeEnd("ctx");;
  1738. $recv(aScope)._instruction_(self);
  1739. return self;
  1740. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1741. }, function($ctx1) {$ctx1.fill(self,"scope:",{aScope:aScope},$globals.IRClosureInstruction)});
  1742. //>>excludeEnd("ctx");
  1743. },
  1744. //>>excludeStart("ide", pragmas.excludeIdeData);
  1745. args: ["aScope"],
  1746. source: "scope: aScope\x0a\x09super scope: aScope.\x0a\x09aScope instruction: self",
  1747. referencedClasses: [],
  1748. //>>excludeEnd("ide");
  1749. messageSends: ["scope:", "instruction:"]
  1750. }),
  1751. $globals.IRClosureInstruction);
  1752. $core.addMethod(
  1753. $core.method({
  1754. selector: "tempDeclarations",
  1755. protocol: "accessing",
  1756. fn: function (){
  1757. var self=this,$self=this;
  1758. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1759. return $core.withContext(function($ctx1) {
  1760. //>>excludeEnd("ctx");
  1761. return $recv($self._dagChildren())._select_((function(each){
  1762. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1763. return $core.withContext(function($ctx2) {
  1764. //>>excludeEnd("ctx");
  1765. return $recv(each)._isTempDeclaration();
  1766. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1767. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  1768. //>>excludeEnd("ctx");
  1769. }));
  1770. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1771. }, function($ctx1) {$ctx1.fill(self,"tempDeclarations",{},$globals.IRClosureInstruction)});
  1772. //>>excludeEnd("ctx");
  1773. },
  1774. //>>excludeStart("ide", pragmas.excludeIdeData);
  1775. args: [],
  1776. source: "tempDeclarations\x0a\x09^ self dagChildren select: [ :each |\x0a\x09\x09each isTempDeclaration ]",
  1777. referencedClasses: [],
  1778. //>>excludeEnd("ide");
  1779. messageSends: ["select:", "dagChildren", "isTempDeclaration"]
  1780. }),
  1781. $globals.IRClosureInstruction);
  1782. $core.addClass("IRClosure", $globals.IRClosureInstruction, [], "Compiler-IR");
  1783. $core.addMethod(
  1784. $core.method({
  1785. selector: "acceptDagVisitor:",
  1786. protocol: "visiting",
  1787. fn: function (aVisitor){
  1788. var self=this,$self=this;
  1789. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1790. return $core.withContext(function($ctx1) {
  1791. //>>excludeEnd("ctx");
  1792. return $recv(aVisitor)._visitIRClosure_(self);
  1793. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1794. }, function($ctx1) {$ctx1.fill(self,"acceptDagVisitor:",{aVisitor:aVisitor},$globals.IRClosure)});
  1795. //>>excludeEnd("ctx");
  1796. },
  1797. //>>excludeStart("ide", pragmas.excludeIdeData);
  1798. args: ["aVisitor"],
  1799. source: "acceptDagVisitor: aVisitor\x0a\x09^ aVisitor visitIRClosure: self",
  1800. referencedClasses: [],
  1801. //>>excludeEnd("ide");
  1802. messageSends: ["visitIRClosure:"]
  1803. }),
  1804. $globals.IRClosure);
  1805. $core.addMethod(
  1806. $core.method({
  1807. selector: "isClosure",
  1808. protocol: "testing",
  1809. fn: function (){
  1810. var self=this,$self=this;
  1811. return true;
  1812. },
  1813. //>>excludeStart("ide", pragmas.excludeIdeData);
  1814. args: [],
  1815. source: "isClosure\x0a\x09^ true",
  1816. referencedClasses: [],
  1817. //>>excludeEnd("ide");
  1818. messageSends: []
  1819. }),
  1820. $globals.IRClosure);
  1821. $core.addMethod(
  1822. $core.method({
  1823. selector: "sequence",
  1824. protocol: "accessing",
  1825. fn: function (){
  1826. var self=this,$self=this;
  1827. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1828. return $core.withContext(function($ctx1) {
  1829. //>>excludeEnd("ctx");
  1830. return $recv($self._dagChildren())._last();
  1831. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1832. }, function($ctx1) {$ctx1.fill(self,"sequence",{},$globals.IRClosure)});
  1833. //>>excludeEnd("ctx");
  1834. },
  1835. //>>excludeStart("ide", pragmas.excludeIdeData);
  1836. args: [],
  1837. source: "sequence\x0a\x09^ self dagChildren last",
  1838. referencedClasses: [],
  1839. //>>excludeEnd("ide");
  1840. messageSends: ["last", "dagChildren"]
  1841. }),
  1842. $globals.IRClosure);
  1843. $core.addClass("IRMethod", $globals.IRClosureInstruction, ["theClass", "source", "selector", "classReferences", "sendIndexes", "requiresSmalltalkContext", "internalVariables"], "Compiler-IR");
  1844. //>>excludeStart("ide", pragmas.excludeIdeData);
  1845. $globals.IRMethod.comment="I am a method instruction";
  1846. //>>excludeEnd("ide");
  1847. $core.addMethod(
  1848. $core.method({
  1849. selector: "acceptDagVisitor:",
  1850. protocol: "visiting",
  1851. fn: function (aVisitor){
  1852. var self=this,$self=this;
  1853. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1854. return $core.withContext(function($ctx1) {
  1855. //>>excludeEnd("ctx");
  1856. return $recv(aVisitor)._visitIRMethod_(self);
  1857. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1858. }, function($ctx1) {$ctx1.fill(self,"acceptDagVisitor:",{aVisitor:aVisitor},$globals.IRMethod)});
  1859. //>>excludeEnd("ctx");
  1860. },
  1861. //>>excludeStart("ide", pragmas.excludeIdeData);
  1862. args: ["aVisitor"],
  1863. source: "acceptDagVisitor: aVisitor\x0a\x09^ aVisitor visitIRMethod: self",
  1864. referencedClasses: [],
  1865. //>>excludeEnd("ide");
  1866. messageSends: ["visitIRMethod:"]
  1867. }),
  1868. $globals.IRMethod);
  1869. $core.addMethod(
  1870. $core.method({
  1871. selector: "classReferences",
  1872. protocol: "accessing",
  1873. fn: function (){
  1874. var self=this,$self=this;
  1875. return $self["@classReferences"];
  1876. },
  1877. //>>excludeStart("ide", pragmas.excludeIdeData);
  1878. args: [],
  1879. source: "classReferences\x0a\x09^ classReferences",
  1880. referencedClasses: [],
  1881. //>>excludeEnd("ide");
  1882. messageSends: []
  1883. }),
  1884. $globals.IRMethod);
  1885. $core.addMethod(
  1886. $core.method({
  1887. selector: "classReferences:",
  1888. protocol: "accessing",
  1889. fn: function (aCollection){
  1890. var self=this,$self=this;
  1891. $self["@classReferences"]=aCollection;
  1892. return self;
  1893. },
  1894. //>>excludeStart("ide", pragmas.excludeIdeData);
  1895. args: ["aCollection"],
  1896. source: "classReferences: aCollection\x0a\x09classReferences := aCollection",
  1897. referencedClasses: [],
  1898. //>>excludeEnd("ide");
  1899. messageSends: []
  1900. }),
  1901. $globals.IRMethod);
  1902. $core.addMethod(
  1903. $core.method({
  1904. selector: "internalVariables",
  1905. protocol: "accessing",
  1906. fn: function (){
  1907. var self=this,$self=this;
  1908. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1909. return $core.withContext(function($ctx1) {
  1910. //>>excludeEnd("ctx");
  1911. var $1,$receiver;
  1912. $1=$self["@internalVariables"];
  1913. if(($receiver = $1) == null || $receiver.a$nil){
  1914. $self["@internalVariables"]=$recv($globals.Set)._new();
  1915. return $self["@internalVariables"];
  1916. } else {
  1917. return $1;
  1918. }
  1919. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1920. }, function($ctx1) {$ctx1.fill(self,"internalVariables",{},$globals.IRMethod)});
  1921. //>>excludeEnd("ctx");
  1922. },
  1923. //>>excludeStart("ide", pragmas.excludeIdeData);
  1924. args: [],
  1925. source: "internalVariables\x0a\x09^ internalVariables ifNil: [ internalVariables := Set new ]",
  1926. referencedClasses: ["Set"],
  1927. //>>excludeEnd("ide");
  1928. messageSends: ["ifNil:", "new"]
  1929. }),
  1930. $globals.IRMethod);
  1931. $core.addMethod(
  1932. $core.method({
  1933. selector: "isMethod",
  1934. protocol: "testing",
  1935. fn: function (){
  1936. var self=this,$self=this;
  1937. return true;
  1938. },
  1939. //>>excludeStart("ide", pragmas.excludeIdeData);
  1940. args: [],
  1941. source: "isMethod\x0a\x09^ true",
  1942. referencedClasses: [],
  1943. //>>excludeEnd("ide");
  1944. messageSends: []
  1945. }),
  1946. $globals.IRMethod);
  1947. $core.addMethod(
  1948. $core.method({
  1949. selector: "messageSends",
  1950. protocol: "accessing",
  1951. fn: function (){
  1952. var self=this,$self=this;
  1953. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1954. return $core.withContext(function($ctx1) {
  1955. //>>excludeEnd("ctx");
  1956. return $recv($self._sendIndexes())._keys();
  1957. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1958. }, function($ctx1) {$ctx1.fill(self,"messageSends",{},$globals.IRMethod)});
  1959. //>>excludeEnd("ctx");
  1960. },
  1961. //>>excludeStart("ide", pragmas.excludeIdeData);
  1962. args: [],
  1963. source: "messageSends\x0a\x09^ self sendIndexes keys",
  1964. referencedClasses: [],
  1965. //>>excludeEnd("ide");
  1966. messageSends: ["keys", "sendIndexes"]
  1967. }),
  1968. $globals.IRMethod);
  1969. $core.addMethod(
  1970. $core.method({
  1971. selector: "method",
  1972. protocol: "accessing",
  1973. fn: function (){
  1974. var self=this,$self=this;
  1975. return self;
  1976. },
  1977. //>>excludeStart("ide", pragmas.excludeIdeData);
  1978. args: [],
  1979. source: "method\x0a\x09^ self",
  1980. referencedClasses: [],
  1981. //>>excludeEnd("ide");
  1982. messageSends: []
  1983. }),
  1984. $globals.IRMethod);
  1985. $core.addMethod(
  1986. $core.method({
  1987. selector: "selector",
  1988. protocol: "accessing",
  1989. fn: function (){
  1990. var self=this,$self=this;
  1991. return $self["@selector"];
  1992. },
  1993. //>>excludeStart("ide", pragmas.excludeIdeData);
  1994. args: [],
  1995. source: "selector\x0a\x09^ selector",
  1996. referencedClasses: [],
  1997. //>>excludeEnd("ide");
  1998. messageSends: []
  1999. }),
  2000. $globals.IRMethod);
  2001. $core.addMethod(
  2002. $core.method({
  2003. selector: "selector:",
  2004. protocol: "accessing",
  2005. fn: function (aString){
  2006. var self=this,$self=this;
  2007. $self["@selector"]=aString;
  2008. return self;
  2009. },
  2010. //>>excludeStart("ide", pragmas.excludeIdeData);
  2011. args: ["aString"],
  2012. source: "selector: aString\x0a\x09selector := aString",
  2013. referencedClasses: [],
  2014. //>>excludeEnd("ide");
  2015. messageSends: []
  2016. }),
  2017. $globals.IRMethod);
  2018. $core.addMethod(
  2019. $core.method({
  2020. selector: "sendIndexes",
  2021. protocol: "accessing",
  2022. fn: function (){
  2023. var self=this,$self=this;
  2024. return $self["@sendIndexes"];
  2025. },
  2026. //>>excludeStart("ide", pragmas.excludeIdeData);
  2027. args: [],
  2028. source: "sendIndexes\x0a\x09^ sendIndexes",
  2029. referencedClasses: [],
  2030. //>>excludeEnd("ide");
  2031. messageSends: []
  2032. }),
  2033. $globals.IRMethod);
  2034. $core.addMethod(
  2035. $core.method({
  2036. selector: "sendIndexes:",
  2037. protocol: "accessing",
  2038. fn: function (aDictionary){
  2039. var self=this,$self=this;
  2040. $self["@sendIndexes"]=aDictionary;
  2041. return self;
  2042. },
  2043. //>>excludeStart("ide", pragmas.excludeIdeData);
  2044. args: ["aDictionary"],
  2045. source: "sendIndexes: aDictionary\x0a\x09sendIndexes := aDictionary",
  2046. referencedClasses: [],
  2047. //>>excludeEnd("ide");
  2048. messageSends: []
  2049. }),
  2050. $globals.IRMethod);
  2051. $core.addMethod(
  2052. $core.method({
  2053. selector: "source",
  2054. protocol: "accessing",
  2055. fn: function (){
  2056. var self=this,$self=this;
  2057. return $self["@source"];
  2058. },
  2059. //>>excludeStart("ide", pragmas.excludeIdeData);
  2060. args: [],
  2061. source: "source\x0a\x09^ source",
  2062. referencedClasses: [],
  2063. //>>excludeEnd("ide");
  2064. messageSends: []
  2065. }),
  2066. $globals.IRMethod);
  2067. $core.addMethod(
  2068. $core.method({
  2069. selector: "source:",
  2070. protocol: "accessing",
  2071. fn: function (aString){
  2072. var self=this,$self=this;
  2073. $self["@source"]=aString;
  2074. return self;
  2075. },
  2076. //>>excludeStart("ide", pragmas.excludeIdeData);
  2077. args: ["aString"],
  2078. source: "source: aString\x0a\x09source := aString",
  2079. referencedClasses: [],
  2080. //>>excludeEnd("ide");
  2081. messageSends: []
  2082. }),
  2083. $globals.IRMethod);
  2084. $core.addMethod(
  2085. $core.method({
  2086. selector: "theClass",
  2087. protocol: "accessing",
  2088. fn: function (){
  2089. var self=this,$self=this;
  2090. return $self["@theClass"];
  2091. },
  2092. //>>excludeStart("ide", pragmas.excludeIdeData);
  2093. args: [],
  2094. source: "theClass\x0a\x09^ theClass",
  2095. referencedClasses: [],
  2096. //>>excludeEnd("ide");
  2097. messageSends: []
  2098. }),
  2099. $globals.IRMethod);
  2100. $core.addMethod(
  2101. $core.method({
  2102. selector: "theClass:",
  2103. protocol: "accessing",
  2104. fn: function (aClass){
  2105. var self=this,$self=this;
  2106. $self["@theClass"]=aClass;
  2107. return self;
  2108. },
  2109. //>>excludeStart("ide", pragmas.excludeIdeData);
  2110. args: ["aClass"],
  2111. source: "theClass: aClass\x0a\x09theClass := aClass",
  2112. referencedClasses: [],
  2113. //>>excludeEnd("ide");
  2114. messageSends: []
  2115. }),
  2116. $globals.IRMethod);
  2117. $core.addClass("IRReturn", $globals.IRScopedInstruction, [], "Compiler-IR");
  2118. //>>excludeStart("ide", pragmas.excludeIdeData);
  2119. $globals.IRReturn.comment="I am a local return instruction.";
  2120. //>>excludeEnd("ide");
  2121. $core.addMethod(
  2122. $core.method({
  2123. selector: "acceptDagVisitor:",
  2124. protocol: "visiting",
  2125. fn: function (aVisitor){
  2126. var self=this,$self=this;
  2127. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2128. return $core.withContext(function($ctx1) {
  2129. //>>excludeEnd("ctx");
  2130. return $recv(aVisitor)._visitIRReturn_(self);
  2131. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2132. }, function($ctx1) {$ctx1.fill(self,"acceptDagVisitor:",{aVisitor:aVisitor},$globals.IRReturn)});
  2133. //>>excludeEnd("ctx");
  2134. },
  2135. //>>excludeStart("ide", pragmas.excludeIdeData);
  2136. args: ["aVisitor"],
  2137. source: "acceptDagVisitor: aVisitor\x0a\x09^ aVisitor visitIRReturn: self",
  2138. referencedClasses: [],
  2139. //>>excludeEnd("ide");
  2140. messageSends: ["visitIRReturn:"]
  2141. }),
  2142. $globals.IRReturn);
  2143. $core.addMethod(
  2144. $core.method({
  2145. selector: "expression",
  2146. protocol: "accessing",
  2147. fn: function (){
  2148. var self=this,$self=this;
  2149. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2150. return $core.withContext(function($ctx1) {
  2151. //>>excludeEnd("ctx");
  2152. return $recv($self._dagChildren())._single();
  2153. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2154. }, function($ctx1) {$ctx1.fill(self,"expression",{},$globals.IRReturn)});
  2155. //>>excludeEnd("ctx");
  2156. },
  2157. //>>excludeStart("ide", pragmas.excludeIdeData);
  2158. args: [],
  2159. source: "expression\x0a\x09^ self dagChildren single",
  2160. referencedClasses: [],
  2161. //>>excludeEnd("ide");
  2162. messageSends: ["single", "dagChildren"]
  2163. }),
  2164. $globals.IRReturn);
  2165. $core.addMethod(
  2166. $core.method({
  2167. selector: "scope",
  2168. protocol: "accessing",
  2169. fn: function (){
  2170. var self=this,$self=this;
  2171. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2172. return $core.withContext(function($ctx1) {
  2173. //>>excludeEnd("ctx");
  2174. var $1,$receiver;
  2175. $1=$self["@scope"];
  2176. if(($receiver = $1) == null || $receiver.a$nil){
  2177. return $recv($self._parent())._scope();
  2178. } else {
  2179. return $1;
  2180. }
  2181. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2182. }, function($ctx1) {$ctx1.fill(self,"scope",{},$globals.IRReturn)});
  2183. //>>excludeEnd("ctx");
  2184. },
  2185. //>>excludeStart("ide", pragmas.excludeIdeData);
  2186. args: [],
  2187. source: "scope\x0a\x09^ scope ifNil: [ self parent scope ]",
  2188. referencedClasses: [],
  2189. //>>excludeEnd("ide");
  2190. messageSends: ["ifNil:", "scope", "parent"]
  2191. }),
  2192. $globals.IRReturn);
  2193. $core.addMethod(
  2194. $core.method({
  2195. selector: "yieldsValue",
  2196. protocol: "testing",
  2197. fn: function (){
  2198. var self=this,$self=this;
  2199. return false;
  2200. },
  2201. //>>excludeStart("ide", pragmas.excludeIdeData);
  2202. args: [],
  2203. source: "yieldsValue\x0a\x09^ false",
  2204. referencedClasses: [],
  2205. //>>excludeEnd("ide");
  2206. messageSends: []
  2207. }),
  2208. $globals.IRReturn);
  2209. $core.addClass("IRBlockReturn", $globals.IRReturn, [], "Compiler-IR");
  2210. //>>excludeStart("ide", pragmas.excludeIdeData);
  2211. $globals.IRBlockReturn.comment="Smalltalk blocks return their last statement. I am a implicit block return instruction.";
  2212. //>>excludeEnd("ide");
  2213. $core.addMethod(
  2214. $core.method({
  2215. selector: "acceptDagVisitor:",
  2216. protocol: "visiting",
  2217. fn: function (aVisitor){
  2218. var self=this,$self=this;
  2219. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2220. return $core.withContext(function($ctx1) {
  2221. //>>excludeEnd("ctx");
  2222. return $recv(aVisitor)._visitIRBlockReturn_(self);
  2223. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2224. }, function($ctx1) {$ctx1.fill(self,"acceptDagVisitor:",{aVisitor:aVisitor},$globals.IRBlockReturn)});
  2225. //>>excludeEnd("ctx");
  2226. },
  2227. //>>excludeStart("ide", pragmas.excludeIdeData);
  2228. args: ["aVisitor"],
  2229. source: "acceptDagVisitor: aVisitor\x0a\x09^ aVisitor visitIRBlockReturn: self",
  2230. referencedClasses: [],
  2231. //>>excludeEnd("ide");
  2232. messageSends: ["visitIRBlockReturn:"]
  2233. }),
  2234. $globals.IRBlockReturn);
  2235. $core.addClass("IRNonLocalReturn", $globals.IRReturn, [], "Compiler-IR");
  2236. //>>excludeStart("ide", pragmas.excludeIdeData);
  2237. $globals.IRNonLocalReturn.comment="I am a non local return instruction.\x0aNon local returns are handled using a try/catch JavaScript statement.\x0a\x0aSee `IRNonLocalReturnHandling` class.";
  2238. //>>excludeEnd("ide");
  2239. $core.addMethod(
  2240. $core.method({
  2241. selector: "acceptDagVisitor:",
  2242. protocol: "visiting",
  2243. fn: function (aVisitor){
  2244. var self=this,$self=this;
  2245. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2246. return $core.withContext(function($ctx1) {
  2247. //>>excludeEnd("ctx");
  2248. return $recv(aVisitor)._visitIRNonLocalReturn_(self);
  2249. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2250. }, function($ctx1) {$ctx1.fill(self,"acceptDagVisitor:",{aVisitor:aVisitor},$globals.IRNonLocalReturn)});
  2251. //>>excludeEnd("ctx");
  2252. },
  2253. //>>excludeStart("ide", pragmas.excludeIdeData);
  2254. args: ["aVisitor"],
  2255. source: "acceptDagVisitor: aVisitor\x0a\x09^ aVisitor visitIRNonLocalReturn: self",
  2256. referencedClasses: [],
  2257. //>>excludeEnd("ide");
  2258. messageSends: ["visitIRNonLocalReturn:"]
  2259. }),
  2260. $globals.IRNonLocalReturn);
  2261. $core.addClass("IRTempDeclaration", $globals.IRScopedInstruction, ["name"], "Compiler-IR");
  2262. $core.addMethod(
  2263. $core.method({
  2264. selector: "acceptDagVisitor:",
  2265. protocol: "visiting",
  2266. fn: function (aVisitor){
  2267. var self=this,$self=this;
  2268. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2269. return $core.withContext(function($ctx1) {
  2270. //>>excludeEnd("ctx");
  2271. return $recv(aVisitor)._visitIRTempDeclaration_(self);
  2272. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2273. }, function($ctx1) {$ctx1.fill(self,"acceptDagVisitor:",{aVisitor:aVisitor},$globals.IRTempDeclaration)});
  2274. //>>excludeEnd("ctx");
  2275. },
  2276. //>>excludeStart("ide", pragmas.excludeIdeData);
  2277. args: ["aVisitor"],
  2278. source: "acceptDagVisitor: aVisitor\x0a\x09^ aVisitor visitIRTempDeclaration: self",
  2279. referencedClasses: [],
  2280. //>>excludeEnd("ide");
  2281. messageSends: ["visitIRTempDeclaration:"]
  2282. }),
  2283. $globals.IRTempDeclaration);
  2284. $core.addMethod(
  2285. $core.method({
  2286. selector: "isTempDeclaration",
  2287. protocol: "testing",
  2288. fn: function (){
  2289. var self=this,$self=this;
  2290. return true;
  2291. },
  2292. //>>excludeStart("ide", pragmas.excludeIdeData);
  2293. args: [],
  2294. source: "isTempDeclaration\x0a\x09^ true",
  2295. referencedClasses: [],
  2296. //>>excludeEnd("ide");
  2297. messageSends: []
  2298. }),
  2299. $globals.IRTempDeclaration);
  2300. $core.addMethod(
  2301. $core.method({
  2302. selector: "name",
  2303. protocol: "accessing",
  2304. fn: function (){
  2305. var self=this,$self=this;
  2306. return $self["@name"];
  2307. },
  2308. //>>excludeStart("ide", pragmas.excludeIdeData);
  2309. args: [],
  2310. source: "name\x0a\x09^ name",
  2311. referencedClasses: [],
  2312. //>>excludeEnd("ide");
  2313. messageSends: []
  2314. }),
  2315. $globals.IRTempDeclaration);
  2316. $core.addMethod(
  2317. $core.method({
  2318. selector: "name:",
  2319. protocol: "accessing",
  2320. fn: function (aString){
  2321. var self=this,$self=this;
  2322. $self["@name"]=aString;
  2323. return self;
  2324. },
  2325. //>>excludeStart("ide", pragmas.excludeIdeData);
  2326. args: ["aString"],
  2327. source: "name: aString\x0a\x09name := aString",
  2328. referencedClasses: [],
  2329. //>>excludeEnd("ide");
  2330. messageSends: []
  2331. }),
  2332. $globals.IRTempDeclaration);
  2333. $core.addClass("IRSend", $globals.IRInstruction, ["selector", "index"], "Compiler-IR");
  2334. //>>excludeStart("ide", pragmas.excludeIdeData);
  2335. $globals.IRSend.comment="I am a message send instruction.";
  2336. //>>excludeEnd("ide");
  2337. $core.addMethod(
  2338. $core.method({
  2339. selector: "acceptDagVisitor:",
  2340. protocol: "visiting",
  2341. fn: function (aVisitor){
  2342. var self=this,$self=this;
  2343. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2344. return $core.withContext(function($ctx1) {
  2345. //>>excludeEnd("ctx");
  2346. return $recv(aVisitor)._visitIRSend_(self);
  2347. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2348. }, function($ctx1) {$ctx1.fill(self,"acceptDagVisitor:",{aVisitor:aVisitor},$globals.IRSend)});
  2349. //>>excludeEnd("ctx");
  2350. },
  2351. //>>excludeStart("ide", pragmas.excludeIdeData);
  2352. args: ["aVisitor"],
  2353. source: "acceptDagVisitor: aVisitor\x0a\x09^ aVisitor visitIRSend: self",
  2354. referencedClasses: [],
  2355. //>>excludeEnd("ide");
  2356. messageSends: ["visitIRSend:"]
  2357. }),
  2358. $globals.IRSend);
  2359. $core.addMethod(
  2360. $core.method({
  2361. selector: "arguments",
  2362. protocol: "accessing",
  2363. fn: function (){
  2364. var self=this,$self=this;
  2365. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2366. return $core.withContext(function($ctx1) {
  2367. //>>excludeEnd("ctx");
  2368. return $recv($self._dagChildren())._allButFirst();
  2369. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2370. }, function($ctx1) {$ctx1.fill(self,"arguments",{},$globals.IRSend)});
  2371. //>>excludeEnd("ctx");
  2372. },
  2373. //>>excludeStart("ide", pragmas.excludeIdeData);
  2374. args: [],
  2375. source: "arguments\x0a\x09^ self dagChildren allButFirst",
  2376. referencedClasses: [],
  2377. //>>excludeEnd("ide");
  2378. messageSends: ["allButFirst", "dagChildren"]
  2379. }),
  2380. $globals.IRSend);
  2381. $core.addMethod(
  2382. $core.method({
  2383. selector: "index",
  2384. protocol: "accessing",
  2385. fn: function (){
  2386. var self=this,$self=this;
  2387. return $self["@index"];
  2388. },
  2389. //>>excludeStart("ide", pragmas.excludeIdeData);
  2390. args: [],
  2391. source: "index\x0a\x09^ index",
  2392. referencedClasses: [],
  2393. //>>excludeEnd("ide");
  2394. messageSends: []
  2395. }),
  2396. $globals.IRSend);
  2397. $core.addMethod(
  2398. $core.method({
  2399. selector: "index:",
  2400. protocol: "accessing",
  2401. fn: function (anInteger){
  2402. var self=this,$self=this;
  2403. $self["@index"]=anInteger;
  2404. return self;
  2405. },
  2406. //>>excludeStart("ide", pragmas.excludeIdeData);
  2407. args: ["anInteger"],
  2408. source: "index: anInteger\x0a\x09index := anInteger",
  2409. referencedClasses: [],
  2410. //>>excludeEnd("ide");
  2411. messageSends: []
  2412. }),
  2413. $globals.IRSend);
  2414. $core.addMethod(
  2415. $core.method({
  2416. selector: "isSend",
  2417. protocol: "testing",
  2418. fn: function (){
  2419. var self=this,$self=this;
  2420. return true;
  2421. },
  2422. //>>excludeStart("ide", pragmas.excludeIdeData);
  2423. args: [],
  2424. source: "isSend\x0a\x09^ true",
  2425. referencedClasses: [],
  2426. //>>excludeEnd("ide");
  2427. messageSends: []
  2428. }),
  2429. $globals.IRSend);
  2430. $core.addMethod(
  2431. $core.method({
  2432. selector: "receiver",
  2433. protocol: "accessing",
  2434. fn: function (){
  2435. var self=this,$self=this;
  2436. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2437. return $core.withContext(function($ctx1) {
  2438. //>>excludeEnd("ctx");
  2439. return $recv($self._dagChildren())._first();
  2440. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2441. }, function($ctx1) {$ctx1.fill(self,"receiver",{},$globals.IRSend)});
  2442. //>>excludeEnd("ctx");
  2443. },
  2444. //>>excludeStart("ide", pragmas.excludeIdeData);
  2445. args: [],
  2446. source: "receiver\x0a\x09^ self dagChildren first",
  2447. referencedClasses: [],
  2448. //>>excludeEnd("ide");
  2449. messageSends: ["first", "dagChildren"]
  2450. }),
  2451. $globals.IRSend);
  2452. $core.addMethod(
  2453. $core.method({
  2454. selector: "selector",
  2455. protocol: "accessing",
  2456. fn: function (){
  2457. var self=this,$self=this;
  2458. return $self["@selector"];
  2459. },
  2460. //>>excludeStart("ide", pragmas.excludeIdeData);
  2461. args: [],
  2462. source: "selector\x0a\x09^ selector",
  2463. referencedClasses: [],
  2464. //>>excludeEnd("ide");
  2465. messageSends: []
  2466. }),
  2467. $globals.IRSend);
  2468. $core.addMethod(
  2469. $core.method({
  2470. selector: "selector:",
  2471. protocol: "accessing",
  2472. fn: function (aString){
  2473. var self=this,$self=this;
  2474. $self["@selector"]=aString;
  2475. return self;
  2476. },
  2477. //>>excludeStart("ide", pragmas.excludeIdeData);
  2478. args: ["aString"],
  2479. source: "selector: aString\x0a\x09selector := aString",
  2480. referencedClasses: [],
  2481. //>>excludeEnd("ide");
  2482. messageSends: []
  2483. }),
  2484. $globals.IRSend);
  2485. $core.addClass("IRSequence", $globals.IRInstruction, [], "Compiler-IR");
  2486. $core.addMethod(
  2487. $core.method({
  2488. selector: "acceptDagVisitor:",
  2489. protocol: "visiting",
  2490. fn: function (aVisitor){
  2491. var self=this,$self=this;
  2492. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2493. return $core.withContext(function($ctx1) {
  2494. //>>excludeEnd("ctx");
  2495. return $recv(aVisitor)._visitIRSequence_(self);
  2496. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2497. }, function($ctx1) {$ctx1.fill(self,"acceptDagVisitor:",{aVisitor:aVisitor},$globals.IRSequence)});
  2498. //>>excludeEnd("ctx");
  2499. },
  2500. //>>excludeStart("ide", pragmas.excludeIdeData);
  2501. args: ["aVisitor"],
  2502. source: "acceptDagVisitor: aVisitor\x0a\x09^ aVisitor visitIRSequence: self",
  2503. referencedClasses: [],
  2504. //>>excludeEnd("ide");
  2505. messageSends: ["visitIRSequence:"]
  2506. }),
  2507. $globals.IRSequence);
  2508. $core.addMethod(
  2509. $core.method({
  2510. selector: "isSequence",
  2511. protocol: "testing",
  2512. fn: function (){
  2513. var self=this,$self=this;
  2514. return true;
  2515. },
  2516. //>>excludeStart("ide", pragmas.excludeIdeData);
  2517. args: [],
  2518. source: "isSequence\x0a\x09^ true",
  2519. referencedClasses: [],
  2520. //>>excludeEnd("ide");
  2521. messageSends: []
  2522. }),
  2523. $globals.IRSequence);
  2524. $core.addClass("IRBlockSequence", $globals.IRSequence, [], "Compiler-IR");
  2525. $core.addMethod(
  2526. $core.method({
  2527. selector: "acceptDagVisitor:",
  2528. protocol: "visiting",
  2529. fn: function (aVisitor){
  2530. var self=this,$self=this;
  2531. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2532. return $core.withContext(function($ctx1) {
  2533. //>>excludeEnd("ctx");
  2534. return $recv(aVisitor)._visitIRBlockSequence_(self);
  2535. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2536. }, function($ctx1) {$ctx1.fill(self,"acceptDagVisitor:",{aVisitor:aVisitor},$globals.IRBlockSequence)});
  2537. //>>excludeEnd("ctx");
  2538. },
  2539. //>>excludeStart("ide", pragmas.excludeIdeData);
  2540. args: ["aVisitor"],
  2541. source: "acceptDagVisitor: aVisitor\x0a\x09^ aVisitor visitIRBlockSequence: self",
  2542. referencedClasses: [],
  2543. //>>excludeEnd("ide");
  2544. messageSends: ["visitIRBlockSequence:"]
  2545. }),
  2546. $globals.IRBlockSequence);
  2547. $core.addClass("IRValue", $globals.IRInstruction, ["value"], "Compiler-IR");
  2548. //>>excludeStart("ide", pragmas.excludeIdeData);
  2549. $globals.IRValue.comment="I am the simplest possible instruction. I represent a value.";
  2550. //>>excludeEnd("ide");
  2551. $core.addMethod(
  2552. $core.method({
  2553. selector: "acceptDagVisitor:",
  2554. protocol: "visiting",
  2555. fn: function (aVisitor){
  2556. var self=this,$self=this;
  2557. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2558. return $core.withContext(function($ctx1) {
  2559. //>>excludeEnd("ctx");
  2560. return $recv(aVisitor)._visitIRValue_(self);
  2561. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2562. }, function($ctx1) {$ctx1.fill(self,"acceptDagVisitor:",{aVisitor:aVisitor},$globals.IRValue)});
  2563. //>>excludeEnd("ctx");
  2564. },
  2565. //>>excludeStart("ide", pragmas.excludeIdeData);
  2566. args: ["aVisitor"],
  2567. source: "acceptDagVisitor: aVisitor\x0a\x09^ aVisitor visitIRValue: self",
  2568. referencedClasses: [],
  2569. //>>excludeEnd("ide");
  2570. messageSends: ["visitIRValue:"]
  2571. }),
  2572. $globals.IRValue);
  2573. $core.addMethod(
  2574. $core.method({
  2575. selector: "needsBoxingAsReceiver",
  2576. protocol: "testing",
  2577. fn: function (){
  2578. var self=this,$self=this;
  2579. return false;
  2580. },
  2581. //>>excludeStart("ide", pragmas.excludeIdeData);
  2582. args: [],
  2583. source: "needsBoxingAsReceiver\x0a\x09^ false",
  2584. referencedClasses: [],
  2585. //>>excludeEnd("ide");
  2586. messageSends: []
  2587. }),
  2588. $globals.IRValue);
  2589. $core.addMethod(
  2590. $core.method({
  2591. selector: "value",
  2592. protocol: "accessing",
  2593. fn: function (){
  2594. var self=this,$self=this;
  2595. return $self["@value"];
  2596. },
  2597. //>>excludeStart("ide", pragmas.excludeIdeData);
  2598. args: [],
  2599. source: "value\x0a\x09^ value",
  2600. referencedClasses: [],
  2601. //>>excludeEnd("ide");
  2602. messageSends: []
  2603. }),
  2604. $globals.IRValue);
  2605. $core.addMethod(
  2606. $core.method({
  2607. selector: "value:",
  2608. protocol: "accessing",
  2609. fn: function (aString){
  2610. var self=this,$self=this;
  2611. $self["@value"]=aString;
  2612. return self;
  2613. },
  2614. //>>excludeStart("ide", pragmas.excludeIdeData);
  2615. args: ["aString"],
  2616. source: "value: aString\x0a\x09value := aString",
  2617. referencedClasses: [],
  2618. //>>excludeEnd("ide");
  2619. messageSends: []
  2620. }),
  2621. $globals.IRValue);
  2622. $core.addClass("IRVariable", $globals.IRInstruction, ["variable"], "Compiler-IR");
  2623. //>>excludeStart("ide", pragmas.excludeIdeData);
  2624. $globals.IRVariable.comment="I am a variable instruction.";
  2625. //>>excludeEnd("ide");
  2626. $core.addMethod(
  2627. $core.method({
  2628. selector: "acceptDagVisitor:",
  2629. protocol: "visiting",
  2630. fn: function (aVisitor){
  2631. var self=this,$self=this;
  2632. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2633. return $core.withContext(function($ctx1) {
  2634. //>>excludeEnd("ctx");
  2635. return $recv(aVisitor)._visitIRVariable_(self);
  2636. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2637. }, function($ctx1) {$ctx1.fill(self,"acceptDagVisitor:",{aVisitor:aVisitor},$globals.IRVariable)});
  2638. //>>excludeEnd("ctx");
  2639. },
  2640. //>>excludeStart("ide", pragmas.excludeIdeData);
  2641. args: ["aVisitor"],
  2642. source: "acceptDagVisitor: aVisitor\x0a\x09^ aVisitor visitIRVariable: self",
  2643. referencedClasses: [],
  2644. //>>excludeEnd("ide");
  2645. messageSends: ["visitIRVariable:"]
  2646. }),
  2647. $globals.IRVariable);
  2648. $core.addMethod(
  2649. $core.method({
  2650. selector: "isSelf",
  2651. protocol: "testing",
  2652. fn: function (){
  2653. var self=this,$self=this;
  2654. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2655. return $core.withContext(function($ctx1) {
  2656. //>>excludeEnd("ctx");
  2657. return $recv($self._variable())._isSelf();
  2658. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2659. }, function($ctx1) {$ctx1.fill(self,"isSelf",{},$globals.IRVariable)});
  2660. //>>excludeEnd("ctx");
  2661. },
  2662. //>>excludeStart("ide", pragmas.excludeIdeData);
  2663. args: [],
  2664. source: "isSelf\x0a\x09^ self variable isSelf",
  2665. referencedClasses: [],
  2666. //>>excludeEnd("ide");
  2667. messageSends: ["isSelf", "variable"]
  2668. }),
  2669. $globals.IRVariable);
  2670. $core.addMethod(
  2671. $core.method({
  2672. selector: "isSuper",
  2673. protocol: "testing",
  2674. fn: function (){
  2675. var self=this,$self=this;
  2676. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2677. return $core.withContext(function($ctx1) {
  2678. //>>excludeEnd("ctx");
  2679. return $recv($self._variable())._isSuper();
  2680. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2681. }, function($ctx1) {$ctx1.fill(self,"isSuper",{},$globals.IRVariable)});
  2682. //>>excludeEnd("ctx");
  2683. },
  2684. //>>excludeStart("ide", pragmas.excludeIdeData);
  2685. args: [],
  2686. source: "isSuper\x0a\x09^ self variable isSuper",
  2687. referencedClasses: [],
  2688. //>>excludeEnd("ide");
  2689. messageSends: ["isSuper", "variable"]
  2690. }),
  2691. $globals.IRVariable);
  2692. $core.addMethod(
  2693. $core.method({
  2694. selector: "isVariable",
  2695. protocol: "testing",
  2696. fn: function (){
  2697. var self=this,$self=this;
  2698. return true;
  2699. },
  2700. //>>excludeStart("ide", pragmas.excludeIdeData);
  2701. args: [],
  2702. source: "isVariable\x0a\x09^ true",
  2703. referencedClasses: [],
  2704. //>>excludeEnd("ide");
  2705. messageSends: []
  2706. }),
  2707. $globals.IRVariable);
  2708. $core.addMethod(
  2709. $core.method({
  2710. selector: "needsBoxingAsReceiver",
  2711. protocol: "testing",
  2712. fn: function (){
  2713. var self=this,$self=this;
  2714. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2715. return $core.withContext(function($ctx1) {
  2716. //>>excludeEnd("ctx");
  2717. return $recv($recv($self._variable())._isPseudoVar())._not();
  2718. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2719. }, function($ctx1) {$ctx1.fill(self,"needsBoxingAsReceiver",{},$globals.IRVariable)});
  2720. //>>excludeEnd("ctx");
  2721. },
  2722. //>>excludeStart("ide", pragmas.excludeIdeData);
  2723. args: [],
  2724. source: "needsBoxingAsReceiver\x0a\x09^ self variable isPseudoVar not",
  2725. referencedClasses: [],
  2726. //>>excludeEnd("ide");
  2727. messageSends: ["not", "isPseudoVar", "variable"]
  2728. }),
  2729. $globals.IRVariable);
  2730. $core.addMethod(
  2731. $core.method({
  2732. selector: "variable",
  2733. protocol: "accessing",
  2734. fn: function (){
  2735. var self=this,$self=this;
  2736. return $self["@variable"];
  2737. },
  2738. //>>excludeStart("ide", pragmas.excludeIdeData);
  2739. args: [],
  2740. source: "variable\x0a\x09^ variable",
  2741. referencedClasses: [],
  2742. //>>excludeEnd("ide");
  2743. messageSends: []
  2744. }),
  2745. $globals.IRVariable);
  2746. $core.addMethod(
  2747. $core.method({
  2748. selector: "variable:",
  2749. protocol: "accessing",
  2750. fn: function (aScopeVariable){
  2751. var self=this,$self=this;
  2752. $self["@variable"]=aScopeVariable;
  2753. return self;
  2754. },
  2755. //>>excludeStart("ide", pragmas.excludeIdeData);
  2756. args: ["aScopeVariable"],
  2757. source: "variable: aScopeVariable\x0a\x09variable := aScopeVariable",
  2758. referencedClasses: [],
  2759. //>>excludeEnd("ide");
  2760. messageSends: []
  2761. }),
  2762. $globals.IRVariable);
  2763. $core.addClass("IRVerbatim", $globals.IRInstruction, ["source"], "Compiler-IR");
  2764. $core.addMethod(
  2765. $core.method({
  2766. selector: "acceptDagVisitor:",
  2767. protocol: "visiting",
  2768. fn: function (aVisitor){
  2769. var self=this,$self=this;
  2770. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2771. return $core.withContext(function($ctx1) {
  2772. //>>excludeEnd("ctx");
  2773. return $recv(aVisitor)._visitIRVerbatim_(self);
  2774. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2775. }, function($ctx1) {$ctx1.fill(self,"acceptDagVisitor:",{aVisitor:aVisitor},$globals.IRVerbatim)});
  2776. //>>excludeEnd("ctx");
  2777. },
  2778. //>>excludeStart("ide", pragmas.excludeIdeData);
  2779. args: ["aVisitor"],
  2780. source: "acceptDagVisitor: aVisitor\x0a\x09^ aVisitor visitIRVerbatim: self",
  2781. referencedClasses: [],
  2782. //>>excludeEnd("ide");
  2783. messageSends: ["visitIRVerbatim:"]
  2784. }),
  2785. $globals.IRVerbatim);
  2786. $core.addMethod(
  2787. $core.method({
  2788. selector: "source",
  2789. protocol: "accessing",
  2790. fn: function (){
  2791. var self=this,$self=this;
  2792. return $self["@source"];
  2793. },
  2794. //>>excludeStart("ide", pragmas.excludeIdeData);
  2795. args: [],
  2796. source: "source\x0a\x09^ source",
  2797. referencedClasses: [],
  2798. //>>excludeEnd("ide");
  2799. messageSends: []
  2800. }),
  2801. $globals.IRVerbatim);
  2802. $core.addMethod(
  2803. $core.method({
  2804. selector: "source:",
  2805. protocol: "accessing",
  2806. fn: function (aString){
  2807. var self=this,$self=this;
  2808. $self["@source"]=aString;
  2809. return self;
  2810. },
  2811. //>>excludeStart("ide", pragmas.excludeIdeData);
  2812. args: ["aString"],
  2813. source: "source: aString\x0a\x09source := aString",
  2814. referencedClasses: [],
  2815. //>>excludeEnd("ide");
  2816. messageSends: []
  2817. }),
  2818. $globals.IRVerbatim);
  2819. $core.addClass("IRVisitor", $globals.ParentFakingPathDagVisitor, [], "Compiler-IR");
  2820. $core.addMethod(
  2821. $core.method({
  2822. selector: "visitDagNode:",
  2823. protocol: "visiting",
  2824. fn: function (aNode){
  2825. var self=this,$self=this;
  2826. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2827. return $core.withContext(function($ctx1) {
  2828. //>>excludeEnd("ctx");
  2829. return $self._visitDagNodeVariantSimple_(aNode);
  2830. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2831. }, function($ctx1) {$ctx1.fill(self,"visitDagNode:",{aNode:aNode},$globals.IRVisitor)});
  2832. //>>excludeEnd("ctx");
  2833. },
  2834. //>>excludeStart("ide", pragmas.excludeIdeData);
  2835. args: ["aNode"],
  2836. source: "visitDagNode: aNode\x0a\x09^ self visitDagNodeVariantSimple: aNode",
  2837. referencedClasses: [],
  2838. //>>excludeEnd("ide");
  2839. messageSends: ["visitDagNodeVariantSimple:"]
  2840. }),
  2841. $globals.IRVisitor);
  2842. $core.addMethod(
  2843. $core.method({
  2844. selector: "visitIRAssignment:",
  2845. protocol: "visiting",
  2846. fn: function (anIRAssignment){
  2847. var self=this,$self=this;
  2848. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2849. return $core.withContext(function($ctx1) {
  2850. //>>excludeEnd("ctx");
  2851. return $self._visitDagNode_(anIRAssignment);
  2852. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2853. }, function($ctx1) {$ctx1.fill(self,"visitIRAssignment:",{anIRAssignment:anIRAssignment},$globals.IRVisitor)});
  2854. //>>excludeEnd("ctx");
  2855. },
  2856. //>>excludeStart("ide", pragmas.excludeIdeData);
  2857. args: ["anIRAssignment"],
  2858. source: "visitIRAssignment: anIRAssignment\x0a\x09^ self visitDagNode: anIRAssignment",
  2859. referencedClasses: [],
  2860. //>>excludeEnd("ide");
  2861. messageSends: ["visitDagNode:"]
  2862. }),
  2863. $globals.IRVisitor);
  2864. $core.addMethod(
  2865. $core.method({
  2866. selector: "visitIRBlockReturn:",
  2867. protocol: "visiting",
  2868. fn: function (anIRBlockReturn){
  2869. var self=this,$self=this;
  2870. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2871. return $core.withContext(function($ctx1) {
  2872. //>>excludeEnd("ctx");
  2873. return $self._visitIRReturn_(anIRBlockReturn);
  2874. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2875. }, function($ctx1) {$ctx1.fill(self,"visitIRBlockReturn:",{anIRBlockReturn:anIRBlockReturn},$globals.IRVisitor)});
  2876. //>>excludeEnd("ctx");
  2877. },
  2878. //>>excludeStart("ide", pragmas.excludeIdeData);
  2879. args: ["anIRBlockReturn"],
  2880. source: "visitIRBlockReturn: anIRBlockReturn\x0a\x09^ self visitIRReturn: anIRBlockReturn",
  2881. referencedClasses: [],
  2882. //>>excludeEnd("ide");
  2883. messageSends: ["visitIRReturn:"]
  2884. }),
  2885. $globals.IRVisitor);
  2886. $core.addMethod(
  2887. $core.method({
  2888. selector: "visitIRBlockSequence:",
  2889. protocol: "visiting",
  2890. fn: function (anIRBlockSequence){
  2891. var self=this,$self=this;
  2892. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2893. return $core.withContext(function($ctx1) {
  2894. //>>excludeEnd("ctx");
  2895. return $self._visitIRSequence_(anIRBlockSequence);
  2896. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2897. }, function($ctx1) {$ctx1.fill(self,"visitIRBlockSequence:",{anIRBlockSequence:anIRBlockSequence},$globals.IRVisitor)});
  2898. //>>excludeEnd("ctx");
  2899. },
  2900. //>>excludeStart("ide", pragmas.excludeIdeData);
  2901. args: ["anIRBlockSequence"],
  2902. source: "visitIRBlockSequence: anIRBlockSequence\x0a\x09^ self visitIRSequence: anIRBlockSequence",
  2903. referencedClasses: [],
  2904. //>>excludeEnd("ide");
  2905. messageSends: ["visitIRSequence:"]
  2906. }),
  2907. $globals.IRVisitor);
  2908. $core.addMethod(
  2909. $core.method({
  2910. selector: "visitIRClosure:",
  2911. protocol: "visiting",
  2912. fn: function (anIRClosure){
  2913. var self=this,$self=this;
  2914. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2915. return $core.withContext(function($ctx1) {
  2916. //>>excludeEnd("ctx");
  2917. return $self._visitDagNode_(anIRClosure);
  2918. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2919. }, function($ctx1) {$ctx1.fill(self,"visitIRClosure:",{anIRClosure:anIRClosure},$globals.IRVisitor)});
  2920. //>>excludeEnd("ctx");
  2921. },
  2922. //>>excludeStart("ide", pragmas.excludeIdeData);
  2923. args: ["anIRClosure"],
  2924. source: "visitIRClosure: anIRClosure\x0a\x09^ self visitDagNode: anIRClosure",
  2925. referencedClasses: [],
  2926. //>>excludeEnd("ide");
  2927. messageSends: ["visitDagNode:"]
  2928. }),
  2929. $globals.IRVisitor);
  2930. $core.addMethod(
  2931. $core.method({
  2932. selector: "visitIRDynamicArray:",
  2933. protocol: "visiting",
  2934. fn: function (anIRDynamicArray){
  2935. var self=this,$self=this;
  2936. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2937. return $core.withContext(function($ctx1) {
  2938. //>>excludeEnd("ctx");
  2939. return $self._visitDagNode_(anIRDynamicArray);
  2940. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2941. }, function($ctx1) {$ctx1.fill(self,"visitIRDynamicArray:",{anIRDynamicArray:anIRDynamicArray},$globals.IRVisitor)});
  2942. //>>excludeEnd("ctx");
  2943. },
  2944. //>>excludeStart("ide", pragmas.excludeIdeData);
  2945. args: ["anIRDynamicArray"],
  2946. source: "visitIRDynamicArray: anIRDynamicArray\x0a\x09^ self visitDagNode: anIRDynamicArray",
  2947. referencedClasses: [],
  2948. //>>excludeEnd("ide");
  2949. messageSends: ["visitDagNode:"]
  2950. }),
  2951. $globals.IRVisitor);
  2952. $core.addMethod(
  2953. $core.method({
  2954. selector: "visitIRDynamicDictionary:",
  2955. protocol: "visiting",
  2956. fn: function (anIRDynamicDictionary){
  2957. var self=this,$self=this;
  2958. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2959. return $core.withContext(function($ctx1) {
  2960. //>>excludeEnd("ctx");
  2961. return $self._visitDagNode_(anIRDynamicDictionary);
  2962. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2963. }, function($ctx1) {$ctx1.fill(self,"visitIRDynamicDictionary:",{anIRDynamicDictionary:anIRDynamicDictionary},$globals.IRVisitor)});
  2964. //>>excludeEnd("ctx");
  2965. },
  2966. //>>excludeStart("ide", pragmas.excludeIdeData);
  2967. args: ["anIRDynamicDictionary"],
  2968. source: "visitIRDynamicDictionary: anIRDynamicDictionary\x0a\x09^ self visitDagNode: anIRDynamicDictionary",
  2969. referencedClasses: [],
  2970. //>>excludeEnd("ide");
  2971. messageSends: ["visitDagNode:"]
  2972. }),
  2973. $globals.IRVisitor);
  2974. $core.addMethod(
  2975. $core.method({
  2976. selector: "visitIRInlinedClosure:",
  2977. protocol: "visiting",
  2978. fn: function (anIRInlinedClosure){
  2979. var self=this,$self=this;
  2980. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2981. return $core.withContext(function($ctx1) {
  2982. //>>excludeEnd("ctx");
  2983. return $self._visitIRClosure_(anIRInlinedClosure);
  2984. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2985. }, function($ctx1) {$ctx1.fill(self,"visitIRInlinedClosure:",{anIRInlinedClosure:anIRInlinedClosure},$globals.IRVisitor)});
  2986. //>>excludeEnd("ctx");
  2987. },
  2988. //>>excludeStart("ide", pragmas.excludeIdeData);
  2989. args: ["anIRInlinedClosure"],
  2990. source: "visitIRInlinedClosure: anIRInlinedClosure\x0a\x09^ self visitIRClosure: anIRInlinedClosure",
  2991. referencedClasses: [],
  2992. //>>excludeEnd("ide");
  2993. messageSends: ["visitIRClosure:"]
  2994. }),
  2995. $globals.IRVisitor);
  2996. $core.addMethod(
  2997. $core.method({
  2998. selector: "visitIRInlinedSequence:",
  2999. protocol: "visiting",
  3000. fn: function (anIRInlinedSequence){
  3001. var self=this,$self=this;
  3002. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3003. return $core.withContext(function($ctx1) {
  3004. //>>excludeEnd("ctx");
  3005. return $self._visitIRSequence_(anIRInlinedSequence);
  3006. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3007. }, function($ctx1) {$ctx1.fill(self,"visitIRInlinedSequence:",{anIRInlinedSequence:anIRInlinedSequence},$globals.IRVisitor)});
  3008. //>>excludeEnd("ctx");
  3009. },
  3010. //>>excludeStart("ide", pragmas.excludeIdeData);
  3011. args: ["anIRInlinedSequence"],
  3012. source: "visitIRInlinedSequence: anIRInlinedSequence\x0a\x09^ self visitIRSequence: anIRInlinedSequence",
  3013. referencedClasses: [],
  3014. //>>excludeEnd("ide");
  3015. messageSends: ["visitIRSequence:"]
  3016. }),
  3017. $globals.IRVisitor);
  3018. $core.addMethod(
  3019. $core.method({
  3020. selector: "visitIRMethod:",
  3021. protocol: "visiting",
  3022. fn: function (anIRMethod){
  3023. var self=this,$self=this;
  3024. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3025. return $core.withContext(function($ctx1) {
  3026. //>>excludeEnd("ctx");
  3027. return $self._visitDagNode_(anIRMethod);
  3028. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3029. }, function($ctx1) {$ctx1.fill(self,"visitIRMethod:",{anIRMethod:anIRMethod},$globals.IRVisitor)});
  3030. //>>excludeEnd("ctx");
  3031. },
  3032. //>>excludeStart("ide", pragmas.excludeIdeData);
  3033. args: ["anIRMethod"],
  3034. source: "visitIRMethod: anIRMethod\x0a\x09^ self visitDagNode: anIRMethod",
  3035. referencedClasses: [],
  3036. //>>excludeEnd("ide");
  3037. messageSends: ["visitDagNode:"]
  3038. }),
  3039. $globals.IRVisitor);
  3040. $core.addMethod(
  3041. $core.method({
  3042. selector: "visitIRNonLocalReturn:",
  3043. protocol: "visiting",
  3044. fn: function (anIRNonLocalReturn){
  3045. var self=this,$self=this;
  3046. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3047. return $core.withContext(function($ctx1) {
  3048. //>>excludeEnd("ctx");
  3049. return $self._visitDagNode_(anIRNonLocalReturn);
  3050. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3051. }, function($ctx1) {$ctx1.fill(self,"visitIRNonLocalReturn:",{anIRNonLocalReturn:anIRNonLocalReturn},$globals.IRVisitor)});
  3052. //>>excludeEnd("ctx");
  3053. },
  3054. //>>excludeStart("ide", pragmas.excludeIdeData);
  3055. args: ["anIRNonLocalReturn"],
  3056. source: "visitIRNonLocalReturn: anIRNonLocalReturn\x0a\x09^ self visitDagNode: anIRNonLocalReturn",
  3057. referencedClasses: [],
  3058. //>>excludeEnd("ide");
  3059. messageSends: ["visitDagNode:"]
  3060. }),
  3061. $globals.IRVisitor);
  3062. $core.addMethod(
  3063. $core.method({
  3064. selector: "visitIRNonLocalReturnHandling:",
  3065. protocol: "visiting",
  3066. fn: function (anIRNonLocalReturnHandling){
  3067. var self=this,$self=this;
  3068. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3069. return $core.withContext(function($ctx1) {
  3070. //>>excludeEnd("ctx");
  3071. return $self._visitDagNode_(anIRNonLocalReturnHandling);
  3072. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3073. }, function($ctx1) {$ctx1.fill(self,"visitIRNonLocalReturnHandling:",{anIRNonLocalReturnHandling:anIRNonLocalReturnHandling},$globals.IRVisitor)});
  3074. //>>excludeEnd("ctx");
  3075. },
  3076. //>>excludeStart("ide", pragmas.excludeIdeData);
  3077. args: ["anIRNonLocalReturnHandling"],
  3078. source: "visitIRNonLocalReturnHandling: anIRNonLocalReturnHandling\x0a\x09^ self visitDagNode: anIRNonLocalReturnHandling",
  3079. referencedClasses: [],
  3080. //>>excludeEnd("ide");
  3081. messageSends: ["visitDagNode:"]
  3082. }),
  3083. $globals.IRVisitor);
  3084. $core.addMethod(
  3085. $core.method({
  3086. selector: "visitIRReturn:",
  3087. protocol: "visiting",
  3088. fn: function (anIRReturn){
  3089. var self=this,$self=this;
  3090. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3091. return $core.withContext(function($ctx1) {
  3092. //>>excludeEnd("ctx");
  3093. return $self._visitDagNode_(anIRReturn);
  3094. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3095. }, function($ctx1) {$ctx1.fill(self,"visitIRReturn:",{anIRReturn:anIRReturn},$globals.IRVisitor)});
  3096. //>>excludeEnd("ctx");
  3097. },
  3098. //>>excludeStart("ide", pragmas.excludeIdeData);
  3099. args: ["anIRReturn"],
  3100. source: "visitIRReturn: anIRReturn\x0a\x09^ self visitDagNode: anIRReturn",
  3101. referencedClasses: [],
  3102. //>>excludeEnd("ide");
  3103. messageSends: ["visitDagNode:"]
  3104. }),
  3105. $globals.IRVisitor);
  3106. $core.addMethod(
  3107. $core.method({
  3108. selector: "visitIRSend:",
  3109. protocol: "visiting",
  3110. fn: function (anIRSend){
  3111. var self=this,$self=this;
  3112. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3113. return $core.withContext(function($ctx1) {
  3114. //>>excludeEnd("ctx");
  3115. return $self._visitDagNode_(anIRSend);
  3116. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3117. }, function($ctx1) {$ctx1.fill(self,"visitIRSend:",{anIRSend:anIRSend},$globals.IRVisitor)});
  3118. //>>excludeEnd("ctx");
  3119. },
  3120. //>>excludeStart("ide", pragmas.excludeIdeData);
  3121. args: ["anIRSend"],
  3122. source: "visitIRSend: anIRSend\x0a\x09^ self visitDagNode: anIRSend",
  3123. referencedClasses: [],
  3124. //>>excludeEnd("ide");
  3125. messageSends: ["visitDagNode:"]
  3126. }),
  3127. $globals.IRVisitor);
  3128. $core.addMethod(
  3129. $core.method({
  3130. selector: "visitIRSequence:",
  3131. protocol: "visiting",
  3132. fn: function (anIRSequence){
  3133. var self=this,$self=this;
  3134. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3135. return $core.withContext(function($ctx1) {
  3136. //>>excludeEnd("ctx");
  3137. return $self._visitDagNode_(anIRSequence);
  3138. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3139. }, function($ctx1) {$ctx1.fill(self,"visitIRSequence:",{anIRSequence:anIRSequence},$globals.IRVisitor)});
  3140. //>>excludeEnd("ctx");
  3141. },
  3142. //>>excludeStart("ide", pragmas.excludeIdeData);
  3143. args: ["anIRSequence"],
  3144. source: "visitIRSequence: anIRSequence\x0a\x09^ self visitDagNode: anIRSequence",
  3145. referencedClasses: [],
  3146. //>>excludeEnd("ide");
  3147. messageSends: ["visitDagNode:"]
  3148. }),
  3149. $globals.IRVisitor);
  3150. $core.addMethod(
  3151. $core.method({
  3152. selector: "visitIRTempDeclaration:",
  3153. protocol: "visiting",
  3154. fn: function (anIRTempDeclaration){
  3155. var self=this,$self=this;
  3156. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3157. return $core.withContext(function($ctx1) {
  3158. //>>excludeEnd("ctx");
  3159. return $self._visitDagNode_(anIRTempDeclaration);
  3160. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3161. }, function($ctx1) {$ctx1.fill(self,"visitIRTempDeclaration:",{anIRTempDeclaration:anIRTempDeclaration},$globals.IRVisitor)});
  3162. //>>excludeEnd("ctx");
  3163. },
  3164. //>>excludeStart("ide", pragmas.excludeIdeData);
  3165. args: ["anIRTempDeclaration"],
  3166. source: "visitIRTempDeclaration: anIRTempDeclaration\x0a\x09^ self visitDagNode: anIRTempDeclaration",
  3167. referencedClasses: [],
  3168. //>>excludeEnd("ide");
  3169. messageSends: ["visitDagNode:"]
  3170. }),
  3171. $globals.IRVisitor);
  3172. $core.addMethod(
  3173. $core.method({
  3174. selector: "visitIRValue:",
  3175. protocol: "visiting",
  3176. fn: function (anIRValue){
  3177. var self=this,$self=this;
  3178. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3179. return $core.withContext(function($ctx1) {
  3180. //>>excludeEnd("ctx");
  3181. return $self._visitDagNode_(anIRValue);
  3182. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3183. }, function($ctx1) {$ctx1.fill(self,"visitIRValue:",{anIRValue:anIRValue},$globals.IRVisitor)});
  3184. //>>excludeEnd("ctx");
  3185. },
  3186. //>>excludeStart("ide", pragmas.excludeIdeData);
  3187. args: ["anIRValue"],
  3188. source: "visitIRValue: anIRValue\x0a\x09^ self visitDagNode: anIRValue",
  3189. referencedClasses: [],
  3190. //>>excludeEnd("ide");
  3191. messageSends: ["visitDagNode:"]
  3192. }),
  3193. $globals.IRVisitor);
  3194. $core.addMethod(
  3195. $core.method({
  3196. selector: "visitIRVariable:",
  3197. protocol: "visiting",
  3198. fn: function (anIRVariable){
  3199. var self=this,$self=this;
  3200. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3201. return $core.withContext(function($ctx1) {
  3202. //>>excludeEnd("ctx");
  3203. return $self._visitDagNode_(anIRVariable);
  3204. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3205. }, function($ctx1) {$ctx1.fill(self,"visitIRVariable:",{anIRVariable:anIRVariable},$globals.IRVisitor)});
  3206. //>>excludeEnd("ctx");
  3207. },
  3208. //>>excludeStart("ide", pragmas.excludeIdeData);
  3209. args: ["anIRVariable"],
  3210. source: "visitIRVariable: anIRVariable\x0a\x09^ self visitDagNode: anIRVariable",
  3211. referencedClasses: [],
  3212. //>>excludeEnd("ide");
  3213. messageSends: ["visitDagNode:"]
  3214. }),
  3215. $globals.IRVisitor);
  3216. $core.addMethod(
  3217. $core.method({
  3218. selector: "visitIRVerbatim:",
  3219. protocol: "visiting",
  3220. fn: function (anIRVerbatim){
  3221. var self=this,$self=this;
  3222. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3223. return $core.withContext(function($ctx1) {
  3224. //>>excludeEnd("ctx");
  3225. return $self._visitDagNode_(anIRVerbatim);
  3226. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3227. }, function($ctx1) {$ctx1.fill(self,"visitIRVerbatim:",{anIRVerbatim:anIRVerbatim},$globals.IRVisitor)});
  3228. //>>excludeEnd("ctx");
  3229. },
  3230. //>>excludeStart("ide", pragmas.excludeIdeData);
  3231. args: ["anIRVerbatim"],
  3232. source: "visitIRVerbatim: anIRVerbatim\x0a\x09^ self visitDagNode: anIRVerbatim",
  3233. referencedClasses: [],
  3234. //>>excludeEnd("ide");
  3235. messageSends: ["visitDagNode:"]
  3236. }),
  3237. $globals.IRVisitor);
  3238. $core.addClass("IRJSTranslator", $globals.IRVisitor, ["stream", "currentClass"], "Compiler-IR");
  3239. $core.addMethod(
  3240. $core.method({
  3241. selector: "contents",
  3242. protocol: "accessing",
  3243. fn: function (){
  3244. var self=this,$self=this;
  3245. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3246. return $core.withContext(function($ctx1) {
  3247. //>>excludeEnd("ctx");
  3248. return $recv($self._stream())._contents();
  3249. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3250. }, function($ctx1) {$ctx1.fill(self,"contents",{},$globals.IRJSTranslator)});
  3251. //>>excludeEnd("ctx");
  3252. },
  3253. //>>excludeStart("ide", pragmas.excludeIdeData);
  3254. args: [],
  3255. source: "contents\x0a\x09^ self stream contents",
  3256. referencedClasses: [],
  3257. //>>excludeEnd("ide");
  3258. messageSends: ["contents", "stream"]
  3259. }),
  3260. $globals.IRJSTranslator);
  3261. $core.addMethod(
  3262. $core.method({
  3263. selector: "currentClass",
  3264. protocol: "accessing",
  3265. fn: function (){
  3266. var self=this,$self=this;
  3267. return $self["@currentClass"];
  3268. },
  3269. //>>excludeStart("ide", pragmas.excludeIdeData);
  3270. args: [],
  3271. source: "currentClass\x0a\x09^ currentClass",
  3272. referencedClasses: [],
  3273. //>>excludeEnd("ide");
  3274. messageSends: []
  3275. }),
  3276. $globals.IRJSTranslator);
  3277. $core.addMethod(
  3278. $core.method({
  3279. selector: "currentClass:",
  3280. protocol: "accessing",
  3281. fn: function (aClass){
  3282. var self=this,$self=this;
  3283. $self["@currentClass"]=aClass;
  3284. return self;
  3285. },
  3286. //>>excludeStart("ide", pragmas.excludeIdeData);
  3287. args: ["aClass"],
  3288. source: "currentClass: aClass\x0a\x09currentClass := aClass",
  3289. referencedClasses: [],
  3290. //>>excludeEnd("ide");
  3291. messageSends: []
  3292. }),
  3293. $globals.IRJSTranslator);
  3294. $core.addMethod(
  3295. $core.method({
  3296. selector: "initialize",
  3297. protocol: "initialization",
  3298. fn: function (){
  3299. var self=this,$self=this;
  3300. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3301. return $core.withContext(function($ctx1) {
  3302. //>>excludeEnd("ctx");
  3303. (
  3304. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3305. $ctx1.supercall = true,
  3306. //>>excludeEnd("ctx");
  3307. ($globals.IRJSTranslator.superclass||$boot.nilAsClass).fn.prototype._initialize.apply($self, []));
  3308. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3309. $ctx1.supercall = false;
  3310. //>>excludeEnd("ctx");;
  3311. $self["@stream"]=$recv($globals.JSStream)._new();
  3312. return self;
  3313. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3314. }, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.IRJSTranslator)});
  3315. //>>excludeEnd("ctx");
  3316. },
  3317. //>>excludeStart("ide", pragmas.excludeIdeData);
  3318. args: [],
  3319. source: "initialize\x0a\x09super initialize.\x0a\x09stream := JSStream new.",
  3320. referencedClasses: ["JSStream"],
  3321. //>>excludeEnd("ide");
  3322. messageSends: ["initialize", "new"]
  3323. }),
  3324. $globals.IRJSTranslator);
  3325. $core.addMethod(
  3326. $core.method({
  3327. selector: "stream",
  3328. protocol: "accessing",
  3329. fn: function (){
  3330. var self=this,$self=this;
  3331. return $self["@stream"];
  3332. },
  3333. //>>excludeStart("ide", pragmas.excludeIdeData);
  3334. args: [],
  3335. source: "stream\x0a\x09^ stream",
  3336. referencedClasses: [],
  3337. //>>excludeEnd("ide");
  3338. messageSends: []
  3339. }),
  3340. $globals.IRJSTranslator);
  3341. $core.addMethod(
  3342. $core.method({
  3343. selector: "stream:",
  3344. protocol: "accessing",
  3345. fn: function (aStream){
  3346. var self=this,$self=this;
  3347. $self["@stream"]=aStream;
  3348. return self;
  3349. },
  3350. //>>excludeStart("ide", pragmas.excludeIdeData);
  3351. args: ["aStream"],
  3352. source: "stream: aStream\x0a\x09stream := aStream",
  3353. referencedClasses: [],
  3354. //>>excludeEnd("ide");
  3355. messageSends: []
  3356. }),
  3357. $globals.IRJSTranslator);
  3358. $core.addMethod(
  3359. $core.method({
  3360. selector: "visitIRAssignment:",
  3361. protocol: "visiting",
  3362. fn: function (anIRAssignment){
  3363. var self=this,$self=this;
  3364. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3365. return $core.withContext(function($ctx1) {
  3366. //>>excludeEnd("ctx");
  3367. $recv($self._stream())._nextPutAssignLhs_rhs_((function(){
  3368. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3369. return $core.withContext(function($ctx2) {
  3370. //>>excludeEnd("ctx");
  3371. return $self._visit_($recv(anIRAssignment)._left());
  3372. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3373. $ctx2.sendIdx["visit:"]=1;
  3374. //>>excludeEnd("ctx");
  3375. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3376. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  3377. //>>excludeEnd("ctx");
  3378. }),(function(){
  3379. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3380. return $core.withContext(function($ctx2) {
  3381. //>>excludeEnd("ctx");
  3382. return $self._visit_($recv(anIRAssignment)._right());
  3383. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3384. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  3385. //>>excludeEnd("ctx");
  3386. }));
  3387. return self;
  3388. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3389. }, function($ctx1) {$ctx1.fill(self,"visitIRAssignment:",{anIRAssignment:anIRAssignment},$globals.IRJSTranslator)});
  3390. //>>excludeEnd("ctx");
  3391. },
  3392. //>>excludeStart("ide", pragmas.excludeIdeData);
  3393. args: ["anIRAssignment"],
  3394. source: "visitIRAssignment: anIRAssignment\x0a\x09self stream\x0a\x09\x09nextPutAssignLhs: [self visit: anIRAssignment left]\x0a\x09\x09rhs: [self visit: anIRAssignment right].",
  3395. referencedClasses: [],
  3396. //>>excludeEnd("ide");
  3397. messageSends: ["nextPutAssignLhs:rhs:", "stream", "visit:", "left", "right"]
  3398. }),
  3399. $globals.IRJSTranslator);
  3400. $core.addMethod(
  3401. $core.method({
  3402. selector: "visitIRClosure:",
  3403. protocol: "visiting",
  3404. fn: function (anIRClosure){
  3405. var self=this,$self=this;
  3406. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3407. return $core.withContext(function($ctx1) {
  3408. //>>excludeEnd("ctx");
  3409. var $1,$2;
  3410. $1=$self._stream();
  3411. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3412. $ctx1.sendIdx["stream"]=1;
  3413. //>>excludeEnd("ctx");
  3414. $recv($1)._nextPutClosureWith_arguments_((function(){
  3415. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3416. return $core.withContext(function($ctx2) {
  3417. //>>excludeEnd("ctx");
  3418. $2=$self._stream();
  3419. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3420. $ctx2.sendIdx["stream"]=2;
  3421. //>>excludeEnd("ctx");
  3422. $recv($2)._nextPutVars_($recv($recv(anIRClosure)._tempDeclarations())._collect_((function(each){
  3423. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3424. return $core.withContext(function($ctx3) {
  3425. //>>excludeEnd("ctx");
  3426. return $recv($recv(each)._name())._asVariableName();
  3427. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3428. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)});
  3429. //>>excludeEnd("ctx");
  3430. })));
  3431. return $recv($self._stream())._nextPutBlockContextFor_during_(anIRClosure,(function(){
  3432. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3433. return $core.withContext(function($ctx3) {
  3434. //>>excludeEnd("ctx");
  3435. return (
  3436. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3437. $ctx3.supercall = true,
  3438. //>>excludeEnd("ctx");
  3439. ($globals.IRJSTranslator.superclass||$boot.nilAsClass).fn.prototype._visitIRClosure_.apply($self, [anIRClosure]));
  3440. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3441. $ctx3.supercall = false;
  3442. //>>excludeEnd("ctx");;
  3443. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3444. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  3445. //>>excludeEnd("ctx");
  3446. }));
  3447. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3448. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  3449. //>>excludeEnd("ctx");
  3450. }),$recv(anIRClosure)._arguments());
  3451. return self;
  3452. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3453. }, function($ctx1) {$ctx1.fill(self,"visitIRClosure:",{anIRClosure:anIRClosure},$globals.IRJSTranslator)});
  3454. //>>excludeEnd("ctx");
  3455. },
  3456. //>>excludeStart("ide", pragmas.excludeIdeData);
  3457. args: ["anIRClosure"],
  3458. source: "visitIRClosure: anIRClosure\x0a\x09self stream\x0a\x09\x09nextPutClosureWith: [\x0a\x09\x09\x09self stream nextPutVars: (anIRClosure tempDeclarations collect: [ :each |\x0a\x09\x09\x09\x09\x09each name asVariableName ]).\x0a\x09\x09\x09self stream\x0a\x09\x09\x09\x09nextPutBlockContextFor: anIRClosure\x0a\x09\x09\x09\x09during: [ super visitIRClosure: anIRClosure ] ]\x0a\x09\x09arguments: anIRClosure arguments",
  3459. referencedClasses: [],
  3460. //>>excludeEnd("ide");
  3461. messageSends: ["nextPutClosureWith:arguments:", "stream", "nextPutVars:", "collect:", "tempDeclarations", "asVariableName", "name", "nextPutBlockContextFor:during:", "visitIRClosure:", "arguments"]
  3462. }),
  3463. $globals.IRJSTranslator);
  3464. $core.addMethod(
  3465. $core.method({
  3466. selector: "visitIRDynamicArray:",
  3467. protocol: "visiting",
  3468. fn: function (anIRDynamicArray){
  3469. var self=this,$self=this;
  3470. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3471. return $core.withContext(function($ctx1) {
  3472. //>>excludeEnd("ctx");
  3473. $self._visitInstructionList_enclosedBetween_and_($recv(anIRDynamicArray)._dagChildren(),"[","]");
  3474. return self;
  3475. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3476. }, function($ctx1) {$ctx1.fill(self,"visitIRDynamicArray:",{anIRDynamicArray:anIRDynamicArray},$globals.IRJSTranslator)});
  3477. //>>excludeEnd("ctx");
  3478. },
  3479. //>>excludeStart("ide", pragmas.excludeIdeData);
  3480. args: ["anIRDynamicArray"],
  3481. source: "visitIRDynamicArray: anIRDynamicArray\x0a\x09self\x0a\x09\x09visitInstructionList: anIRDynamicArray dagChildren\x0a\x09\x09enclosedBetween: '[' and: ']'",
  3482. referencedClasses: [],
  3483. //>>excludeEnd("ide");
  3484. messageSends: ["visitInstructionList:enclosedBetween:and:", "dagChildren"]
  3485. }),
  3486. $globals.IRJSTranslator);
  3487. $core.addMethod(
  3488. $core.method({
  3489. selector: "visitIRDynamicDictionary:",
  3490. protocol: "visiting",
  3491. fn: function (anIRDynamicDictionary){
  3492. var self=this,$self=this;
  3493. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3494. return $core.withContext(function($ctx1) {
  3495. //>>excludeEnd("ctx");
  3496. $self._visitInstructionList_enclosedBetween_and_($recv(anIRDynamicDictionary)._dagChildren(),"$globals.HashedCollection._newFromPairs_([","])");
  3497. return self;
  3498. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3499. }, function($ctx1) {$ctx1.fill(self,"visitIRDynamicDictionary:",{anIRDynamicDictionary:anIRDynamicDictionary},$globals.IRJSTranslator)});
  3500. //>>excludeEnd("ctx");
  3501. },
  3502. //>>excludeStart("ide", pragmas.excludeIdeData);
  3503. args: ["anIRDynamicDictionary"],
  3504. source: "visitIRDynamicDictionary: anIRDynamicDictionary\x0a\x09self\x0a\x09\x09visitInstructionList: anIRDynamicDictionary dagChildren\x0a\x09\x09enclosedBetween: '$globals.HashedCollection._newFromPairs_([' and: '])'",
  3505. referencedClasses: [],
  3506. //>>excludeEnd("ide");
  3507. messageSends: ["visitInstructionList:enclosedBetween:and:", "dagChildren"]
  3508. }),
  3509. $globals.IRJSTranslator);
  3510. $core.addMethod(
  3511. $core.method({
  3512. selector: "visitIRMethod:",
  3513. protocol: "visiting",
  3514. fn: function (anIRMethod){
  3515. var self=this,$self=this;
  3516. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3517. return $core.withContext(function($ctx1) {
  3518. //>>excludeEnd("ctx");
  3519. var $1,$2,$3,$4,$5,$6,$7;
  3520. $1=$self._stream();
  3521. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3522. $ctx1.sendIdx["stream"]=1;
  3523. //>>excludeEnd("ctx");
  3524. $recv($1)._nextPutMethodDeclaration_with_(anIRMethod,(function(){
  3525. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3526. return $core.withContext(function($ctx2) {
  3527. //>>excludeEnd("ctx");
  3528. $2=$self._stream();
  3529. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3530. $ctx2.sendIdx["stream"]=2;
  3531. //>>excludeEnd("ctx");
  3532. return $recv($2)._nextPutFunctionWith_arguments_((function(){
  3533. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3534. return $core.withContext(function($ctx3) {
  3535. //>>excludeEnd("ctx");
  3536. $3=$self._stream();
  3537. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3538. $ctx3.sendIdx["stream"]=3;
  3539. //>>excludeEnd("ctx");
  3540. $4=$recv($recv(anIRMethod)._tempDeclarations())._collect_((function(each){
  3541. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3542. return $core.withContext(function($ctx4) {
  3543. //>>excludeEnd("ctx");
  3544. return $recv($recv(each)._name())._asVariableName();
  3545. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3546. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx3,3)});
  3547. //>>excludeEnd("ctx");
  3548. }));
  3549. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3550. $ctx3.sendIdx["collect:"]=1;
  3551. //>>excludeEnd("ctx");
  3552. $recv($3)._nextPutVars_($4);
  3553. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3554. $ctx3.sendIdx["nextPutVars:"]=1;
  3555. //>>excludeEnd("ctx");
  3556. $5=$self._stream();
  3557. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3558. $ctx3.sendIdx["stream"]=4;
  3559. //>>excludeEnd("ctx");
  3560. return $recv($5)._nextPutContextFor_during_(anIRMethod,(function(){
  3561. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3562. return $core.withContext(function($ctx4) {
  3563. //>>excludeEnd("ctx");
  3564. $recv($recv(anIRMethod)._internalVariables())._ifNotEmpty_((function(internalVars){
  3565. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3566. return $core.withContext(function($ctx5) {
  3567. //>>excludeEnd("ctx");
  3568. $6=$self._stream();
  3569. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3570. $ctx5.sendIdx["stream"]=5;
  3571. //>>excludeEnd("ctx");
  3572. return $recv($6)._nextPutVars_($recv($recv(internalVars)._asSet())._collect_((function(each){
  3573. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3574. return $core.withContext(function($ctx6) {
  3575. //>>excludeEnd("ctx");
  3576. return $recv($recv(each)._variable())._alias();
  3577. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3578. }, function($ctx6) {$ctx6.fillBlock({each:each},$ctx5,6)});
  3579. //>>excludeEnd("ctx");
  3580. })));
  3581. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3582. }, function($ctx5) {$ctx5.fillBlock({internalVars:internalVars},$ctx4,5)});
  3583. //>>excludeEnd("ctx");
  3584. }));
  3585. $7=$recv($recv(anIRMethod)._scope())._hasNonLocalReturn();
  3586. if($core.assert($7)){
  3587. return $recv($self._stream())._nextPutNonLocalReturnHandlingWith_((function(){
  3588. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3589. return $core.withContext(function($ctx5) {
  3590. //>>excludeEnd("ctx");
  3591. return (
  3592. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3593. $ctx5.supercall = true,
  3594. //>>excludeEnd("ctx");
  3595. ($globals.IRJSTranslator.superclass||$boot.nilAsClass).fn.prototype._visitIRMethod_.apply($self, [anIRMethod]));
  3596. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3597. $ctx5.supercall = false;
  3598. //>>excludeEnd("ctx");;
  3599. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3600. $ctx5.sendIdx["visitIRMethod:"]=1;
  3601. //>>excludeEnd("ctx");
  3602. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3603. }, function($ctx5) {$ctx5.fillBlock({},$ctx4,8)});
  3604. //>>excludeEnd("ctx");
  3605. }));
  3606. } else {
  3607. return (
  3608. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3609. $ctx4.supercall = true,
  3610. //>>excludeEnd("ctx");
  3611. ($globals.IRJSTranslator.superclass||$boot.nilAsClass).fn.prototype._visitIRMethod_.apply($self, [anIRMethod]));
  3612. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3613. $ctx4.supercall = false;
  3614. //>>excludeEnd("ctx");;
  3615. }
  3616. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3617. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,4)});
  3618. //>>excludeEnd("ctx");
  3619. }));
  3620. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3621. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  3622. //>>excludeEnd("ctx");
  3623. }),$recv(anIRMethod)._arguments());
  3624. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3625. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  3626. //>>excludeEnd("ctx");
  3627. }));
  3628. return $self._contents();
  3629. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3630. }, function($ctx1) {$ctx1.fill(self,"visitIRMethod:",{anIRMethod:anIRMethod},$globals.IRJSTranslator)});
  3631. //>>excludeEnd("ctx");
  3632. },
  3633. //>>excludeStart("ide", pragmas.excludeIdeData);
  3634. args: ["anIRMethod"],
  3635. source: "visitIRMethod: anIRMethod\x0a\x0a\x09self stream\x0a\x09\x09nextPutMethodDeclaration: anIRMethod\x0a\x09\x09with: [ self stream\x0a\x09\x09\x09nextPutFunctionWith: [\x0a\x09\x09\x09\x09self stream nextPutVars: (anIRMethod tempDeclarations collect: [ :each |\x0a\x09\x09\x09\x09\x09each name asVariableName ]).\x0a\x09\x09\x09\x09self stream nextPutContextFor: anIRMethod during: [\x0a\x09\x09\x09\x09\x09anIRMethod internalVariables ifNotEmpty: [ :internalVars |\x0a\x09\x09\x09\x09\x09\x09self stream nextPutVars: \x0a\x09\x09\x09\x09\x09\x09\x09(internalVars asSet collect: [ :each | each variable alias ]) ].\x0a\x09\x09\x09\x09anIRMethod scope hasNonLocalReturn\x0a\x09\x09\x09\x09\x09ifTrue: [\x0a\x09\x09\x09\x09\x09\x09self stream nextPutNonLocalReturnHandlingWith: [\x0a\x09\x09\x09\x09\x09\x09\x09super visitIRMethod: anIRMethod ] ]\x0a\x09\x09\x09\x09\x09ifFalse: [ super visitIRMethod: anIRMethod ] ]]\x0a\x09\x09\x09arguments: anIRMethod arguments ].\x0a\x09^ self contents",
  3636. referencedClasses: [],
  3637. //>>excludeEnd("ide");
  3638. messageSends: ["nextPutMethodDeclaration:with:", "stream", "nextPutFunctionWith:arguments:", "nextPutVars:", "collect:", "tempDeclarations", "asVariableName", "name", "nextPutContextFor:during:", "ifNotEmpty:", "internalVariables", "asSet", "alias", "variable", "ifTrue:ifFalse:", "hasNonLocalReturn", "scope", "nextPutNonLocalReturnHandlingWith:", "visitIRMethod:", "arguments", "contents"]
  3639. }),
  3640. $globals.IRJSTranslator);
  3641. $core.addMethod(
  3642. $core.method({
  3643. selector: "visitIRNonLocalReturn:",
  3644. protocol: "visiting",
  3645. fn: function (anIRNonLocalReturn){
  3646. var self=this,$self=this;
  3647. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3648. return $core.withContext(function($ctx1) {
  3649. //>>excludeEnd("ctx");
  3650. $recv($self._stream())._nextPutNonLocalReturnWith_((function(){
  3651. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3652. return $core.withContext(function($ctx2) {
  3653. //>>excludeEnd("ctx");
  3654. return (
  3655. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3656. $ctx2.supercall = true,
  3657. //>>excludeEnd("ctx");
  3658. ($globals.IRJSTranslator.superclass||$boot.nilAsClass).fn.prototype._visitIRNonLocalReturn_.apply($self, [anIRNonLocalReturn]));
  3659. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3660. $ctx2.supercall = false;
  3661. //>>excludeEnd("ctx");;
  3662. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3663. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  3664. //>>excludeEnd("ctx");
  3665. }));
  3666. return self;
  3667. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3668. }, function($ctx1) {$ctx1.fill(self,"visitIRNonLocalReturn:",{anIRNonLocalReturn:anIRNonLocalReturn},$globals.IRJSTranslator)});
  3669. //>>excludeEnd("ctx");
  3670. },
  3671. //>>excludeStart("ide", pragmas.excludeIdeData);
  3672. args: ["anIRNonLocalReturn"],
  3673. source: "visitIRNonLocalReturn: anIRNonLocalReturn\x0a\x09self stream nextPutNonLocalReturnWith: [\x0a\x09\x09super visitIRNonLocalReturn: anIRNonLocalReturn ]",
  3674. referencedClasses: [],
  3675. //>>excludeEnd("ide");
  3676. messageSends: ["nextPutNonLocalReturnWith:", "stream", "visitIRNonLocalReturn:"]
  3677. }),
  3678. $globals.IRJSTranslator);
  3679. $core.addMethod(
  3680. $core.method({
  3681. selector: "visitIRReturn:",
  3682. protocol: "visiting",
  3683. fn: function (anIRReturn){
  3684. var self=this,$self=this;
  3685. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3686. return $core.withContext(function($ctx1) {
  3687. //>>excludeEnd("ctx");
  3688. $recv($self._stream())._nextPutReturnWith_((function(){
  3689. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3690. return $core.withContext(function($ctx2) {
  3691. //>>excludeEnd("ctx");
  3692. return (
  3693. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3694. $ctx2.supercall = true,
  3695. //>>excludeEnd("ctx");
  3696. ($globals.IRJSTranslator.superclass||$boot.nilAsClass).fn.prototype._visitIRReturn_.apply($self, [anIRReturn]));
  3697. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3698. $ctx2.supercall = false;
  3699. //>>excludeEnd("ctx");;
  3700. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3701. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  3702. //>>excludeEnd("ctx");
  3703. }));
  3704. return self;
  3705. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3706. }, function($ctx1) {$ctx1.fill(self,"visitIRReturn:",{anIRReturn:anIRReturn},$globals.IRJSTranslator)});
  3707. //>>excludeEnd("ctx");
  3708. },
  3709. //>>excludeStart("ide", pragmas.excludeIdeData);
  3710. args: ["anIRReturn"],
  3711. source: "visitIRReturn: anIRReturn\x0a\x09self stream nextPutReturnWith: [\x0a\x09\x09super visitIRReturn: anIRReturn ]",
  3712. referencedClasses: [],
  3713. //>>excludeEnd("ide");
  3714. messageSends: ["nextPutReturnWith:", "stream", "visitIRReturn:"]
  3715. }),
  3716. $globals.IRJSTranslator);
  3717. $core.addMethod(
  3718. $core.method({
  3719. selector: "visitIRSend:",
  3720. protocol: "visiting",
  3721. fn: function (anIRSend){
  3722. var self=this,$self=this;
  3723. var sends,superclass;
  3724. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3725. return $core.withContext(function($ctx1) {
  3726. //>>excludeEnd("ctx");
  3727. var $1,$2;
  3728. sends=$recv($recv($recv($recv(anIRSend)._method())._sendIndexes())._at_($recv(anIRSend)._selector()))._size();
  3729. $1=$recv($recv(anIRSend)._receiver())._isSuper();
  3730. if($core.assert($1)){
  3731. $self._visitSuperSend_(anIRSend);
  3732. } else {
  3733. $self._visitSend_(anIRSend);
  3734. }
  3735. $2=$recv($recv(anIRSend)._index()).__lt(sends);
  3736. if($core.assert($2)){
  3737. $recv($self._stream())._nextPutSendIndexFor_(anIRSend);
  3738. }
  3739. return self;
  3740. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3741. }, function($ctx1) {$ctx1.fill(self,"visitIRSend:",{anIRSend:anIRSend,sends:sends,superclass:superclass},$globals.IRJSTranslator)});
  3742. //>>excludeEnd("ctx");
  3743. },
  3744. //>>excludeStart("ide", pragmas.excludeIdeData);
  3745. args: ["anIRSend"],
  3746. source: "visitIRSend: anIRSend\x0a\x09| sends superclass |\x0a\x09sends := (anIRSend method sendIndexes at: anIRSend selector) size.\x0a\x09\x0a\x09anIRSend receiver isSuper\x0a\x09\x09ifTrue: [ self visitSuperSend: anIRSend ]\x0a\x09\x09ifFalse: [ self visitSend: anIRSend ].\x0a\x09\x09\x0a\x09anIRSend index < sends\x0a\x09\x09ifTrue: [ self stream nextPutSendIndexFor: anIRSend ]",
  3747. referencedClasses: [],
  3748. //>>excludeEnd("ide");
  3749. messageSends: ["size", "at:", "sendIndexes", "method", "selector", "ifTrue:ifFalse:", "isSuper", "receiver", "visitSuperSend:", "visitSend:", "ifTrue:", "<", "index", "nextPutSendIndexFor:", "stream"]
  3750. }),
  3751. $globals.IRJSTranslator);
  3752. $core.addMethod(
  3753. $core.method({
  3754. selector: "visitIRSequence:",
  3755. protocol: "visiting",
  3756. fn: function (anIRSequence){
  3757. var self=this,$self=this;
  3758. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3759. return $core.withContext(function($ctx1) {
  3760. //>>excludeEnd("ctx");
  3761. $recv($recv(anIRSequence)._dagChildren())._do_((function(each){
  3762. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3763. return $core.withContext(function($ctx2) {
  3764. //>>excludeEnd("ctx");
  3765. return $recv($self._stream())._nextPutStatementWith_((function(){
  3766. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3767. return $core.withContext(function($ctx3) {
  3768. //>>excludeEnd("ctx");
  3769. return $self._visit_(each);
  3770. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3771. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  3772. //>>excludeEnd("ctx");
  3773. }));
  3774. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3775. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  3776. //>>excludeEnd("ctx");
  3777. }));
  3778. return self;
  3779. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3780. }, function($ctx1) {$ctx1.fill(self,"visitIRSequence:",{anIRSequence:anIRSequence},$globals.IRJSTranslator)});
  3781. //>>excludeEnd("ctx");
  3782. },
  3783. //>>excludeStart("ide", pragmas.excludeIdeData);
  3784. args: ["anIRSequence"],
  3785. source: "visitIRSequence: anIRSequence\x0a\x09anIRSequence dagChildren do: [ :each |\x0a\x09\x09self stream nextPutStatementWith: [ self visit: each ] ]",
  3786. referencedClasses: [],
  3787. //>>excludeEnd("ide");
  3788. messageSends: ["do:", "dagChildren", "nextPutStatementWith:", "stream", "visit:"]
  3789. }),
  3790. $globals.IRJSTranslator);
  3791. $core.addMethod(
  3792. $core.method({
  3793. selector: "visitIRTempDeclaration:",
  3794. protocol: "visiting",
  3795. fn: function (anIRTempDeclaration){
  3796. var self=this,$self=this;
  3797. return self;
  3798. },
  3799. //>>excludeStart("ide", pragmas.excludeIdeData);
  3800. args: ["anIRTempDeclaration"],
  3801. source: "visitIRTempDeclaration: anIRTempDeclaration\x0a\x09\x22self stream\x0a\x09\x09nextPutAll: 'var ', anIRTempDeclaration name asVariableName, ';';\x0a\x09\x09lf\x22",
  3802. referencedClasses: [],
  3803. //>>excludeEnd("ide");
  3804. messageSends: []
  3805. }),
  3806. $globals.IRJSTranslator);
  3807. $core.addMethod(
  3808. $core.method({
  3809. selector: "visitIRValue:",
  3810. protocol: "visiting",
  3811. fn: function (anIRValue){
  3812. var self=this,$self=this;
  3813. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3814. return $core.withContext(function($ctx1) {
  3815. //>>excludeEnd("ctx");
  3816. $recv($self._stream())._nextPutAll_($recv($recv(anIRValue)._value())._asJavaScriptSource());
  3817. return self;
  3818. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3819. }, function($ctx1) {$ctx1.fill(self,"visitIRValue:",{anIRValue:anIRValue},$globals.IRJSTranslator)});
  3820. //>>excludeEnd("ctx");
  3821. },
  3822. //>>excludeStart("ide", pragmas.excludeIdeData);
  3823. args: ["anIRValue"],
  3824. source: "visitIRValue: anIRValue\x0a\x09self stream nextPutAll: anIRValue value asJavaScriptSource",
  3825. referencedClasses: [],
  3826. //>>excludeEnd("ide");
  3827. messageSends: ["nextPutAll:", "stream", "asJavaScriptSource", "value"]
  3828. }),
  3829. $globals.IRJSTranslator);
  3830. $core.addMethod(
  3831. $core.method({
  3832. selector: "visitIRVariable:",
  3833. protocol: "visiting",
  3834. fn: function (anIRVariable){
  3835. var self=this,$self=this;
  3836. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3837. return $core.withContext(function($ctx1) {
  3838. //>>excludeEnd("ctx");
  3839. var $3,$2,$1,$4;
  3840. $3=$recv(anIRVariable)._variable();
  3841. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3842. $ctx1.sendIdx["variable"]=1;
  3843. //>>excludeEnd("ctx");
  3844. $2=$recv($3)._name();
  3845. $1=$recv($2).__eq("thisContext");
  3846. if($core.assert($1)){
  3847. $4=$self._stream();
  3848. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3849. $ctx1.sendIdx["stream"]=1;
  3850. //>>excludeEnd("ctx");
  3851. $recv($4)._nextPutAll_("$core.getThisContext()");
  3852. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3853. $ctx1.sendIdx["nextPutAll:"]=1;
  3854. //>>excludeEnd("ctx");
  3855. } else {
  3856. $recv($self._stream())._nextPutAll_($recv($recv(anIRVariable)._variable())._alias());
  3857. }
  3858. return self;
  3859. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3860. }, function($ctx1) {$ctx1.fill(self,"visitIRVariable:",{anIRVariable:anIRVariable},$globals.IRJSTranslator)});
  3861. //>>excludeEnd("ctx");
  3862. },
  3863. //>>excludeStart("ide", pragmas.excludeIdeData);
  3864. args: ["anIRVariable"],
  3865. source: "visitIRVariable: anIRVariable\x0a\x09anIRVariable variable name = 'thisContext'\x0a\x09\x09ifTrue: [ self stream nextPutAll: '$core.getThisContext()' ]\x0a\x09\x09ifFalse: [ self stream nextPutAll: anIRVariable variable alias ]",
  3866. referencedClasses: [],
  3867. //>>excludeEnd("ide");
  3868. messageSends: ["ifTrue:ifFalse:", "=", "name", "variable", "nextPutAll:", "stream", "alias"]
  3869. }),
  3870. $globals.IRJSTranslator);
  3871. $core.addMethod(
  3872. $core.method({
  3873. selector: "visitIRVerbatim:",
  3874. protocol: "visiting",
  3875. fn: function (anIRVerbatim){
  3876. var self=this,$self=this;
  3877. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3878. return $core.withContext(function($ctx1) {
  3879. //>>excludeEnd("ctx");
  3880. $recv($self._stream())._nextPutAll_($recv(anIRVerbatim)._source());
  3881. return self;
  3882. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3883. }, function($ctx1) {$ctx1.fill(self,"visitIRVerbatim:",{anIRVerbatim:anIRVerbatim},$globals.IRJSTranslator)});
  3884. //>>excludeEnd("ctx");
  3885. },
  3886. //>>excludeStart("ide", pragmas.excludeIdeData);
  3887. args: ["anIRVerbatim"],
  3888. source: "visitIRVerbatim: anIRVerbatim\x0a\x09self stream nextPutAll: anIRVerbatim source",
  3889. referencedClasses: [],
  3890. //>>excludeEnd("ide");
  3891. messageSends: ["nextPutAll:", "stream", "source"]
  3892. }),
  3893. $globals.IRJSTranslator);
  3894. $core.addMethod(
  3895. $core.method({
  3896. selector: "visitInstructionList:enclosedBetween:and:",
  3897. protocol: "visiting",
  3898. fn: function (anArray,aString,anotherString){
  3899. var self=this,$self=this;
  3900. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3901. return $core.withContext(function($ctx1) {
  3902. //>>excludeEnd("ctx");
  3903. var $1;
  3904. $1=$self._stream();
  3905. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3906. $ctx1.sendIdx["stream"]=1;
  3907. //>>excludeEnd("ctx");
  3908. $recv($1)._nextPutAll_(aString);
  3909. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3910. $ctx1.sendIdx["nextPutAll:"]=1;
  3911. //>>excludeEnd("ctx");
  3912. $recv(anArray)._do_separatedBy_((function(each){
  3913. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3914. return $core.withContext(function($ctx2) {
  3915. //>>excludeEnd("ctx");
  3916. return $self._visit_(each);
  3917. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3918. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  3919. //>>excludeEnd("ctx");
  3920. }),(function(){
  3921. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3922. return $core.withContext(function($ctx2) {
  3923. //>>excludeEnd("ctx");
  3924. return $recv($self._stream())._nextPutAll_(",");
  3925. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3926. $ctx2.sendIdx["nextPutAll:"]=2;
  3927. //>>excludeEnd("ctx");
  3928. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3929. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  3930. //>>excludeEnd("ctx");
  3931. }));
  3932. $recv($self["@stream"])._nextPutAll_(anotherString);
  3933. return self;
  3934. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3935. }, function($ctx1) {$ctx1.fill(self,"visitInstructionList:enclosedBetween:and:",{anArray:anArray,aString:aString,anotherString:anotherString},$globals.IRJSTranslator)});
  3936. //>>excludeEnd("ctx");
  3937. },
  3938. //>>excludeStart("ide", pragmas.excludeIdeData);
  3939. args: ["anArray", "aString", "anotherString"],
  3940. source: "visitInstructionList: anArray enclosedBetween: aString and: anotherString\x0a\x09self stream nextPutAll: aString.\x0a\x09anArray\x0a\x09\x09do: [ :each | self visit: each ]\x0a\x09\x09separatedBy: [ self stream nextPutAll: ',' ].\x0a\x09stream nextPutAll: anotherString",
  3941. referencedClasses: [],
  3942. //>>excludeEnd("ide");
  3943. messageSends: ["nextPutAll:", "stream", "do:separatedBy:", "visit:"]
  3944. }),
  3945. $globals.IRJSTranslator);
  3946. $core.addMethod(
  3947. $core.method({
  3948. selector: "visitReceiver:",
  3949. protocol: "visiting",
  3950. fn: function (anIRInstruction){
  3951. var self=this,$self=this;
  3952. var instr;
  3953. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3954. return $core.withContext(function($ctx1) {
  3955. //>>excludeEnd("ctx");
  3956. var $1,$2,$4,$5,$3,$6,$7,$8;
  3957. $1=$recv(anIRInstruction)._isSelf();
  3958. if($core.assert($1)){
  3959. $2=$recv(anIRInstruction)._copy();
  3960. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3961. $ctx1.sendIdx["copy"]=1;
  3962. //>>excludeEnd("ctx");
  3963. $4=$recv($recv(anIRInstruction)._variable())._copy();
  3964. $recv($4)._name_("$self");
  3965. $5=$recv($4)._yourself();
  3966. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3967. $ctx1.sendIdx["yourself"]=1;
  3968. //>>excludeEnd("ctx");
  3969. $3=$5;
  3970. $recv($2)._variable_($3);
  3971. instr=$recv($2)._yourself();
  3972. instr;
  3973. } else {
  3974. instr=anIRInstruction;
  3975. instr;
  3976. }
  3977. $6=$recv(instr)._needsBoxingAsReceiver();
  3978. if(!$core.assert($6)){
  3979. $7=$self._visit_(instr);
  3980. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3981. $ctx1.sendIdx["visit:"]=1;
  3982. //>>excludeEnd("ctx");
  3983. return $7;
  3984. }
  3985. $8=$self._stream();
  3986. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3987. $ctx1.sendIdx["stream"]=1;
  3988. //>>excludeEnd("ctx");
  3989. $recv($8)._nextPutAll_("$recv(");
  3990. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3991. $ctx1.sendIdx["nextPutAll:"]=1;
  3992. //>>excludeEnd("ctx");
  3993. $self._visit_(instr);
  3994. $recv($self._stream())._nextPutAll_(")");
  3995. return self;
  3996. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3997. }, function($ctx1) {$ctx1.fill(self,"visitReceiver:",{anIRInstruction:anIRInstruction,instr:instr},$globals.IRJSTranslator)});
  3998. //>>excludeEnd("ctx");
  3999. },
  4000. //>>excludeStart("ide", pragmas.excludeIdeData);
  4001. args: ["anIRInstruction"],
  4002. source: "visitReceiver: anIRInstruction\x0a\x09| instr |\x0a\x0a\x09anIRInstruction isSelf\x0a\x09\x09ifTrue: [ instr := anIRInstruction copy\x0a\x09\x09\x09variable: (anIRInstruction variable copy name: '$self'; yourself);\x0a\x09\x09\x09yourself ]\x0a\x09\x09ifFalse: [ instr := anIRInstruction ].\x0a\x09\x0a\x09instr needsBoxingAsReceiver ifFalse: [ ^ self visit: instr ].\x0a\x09\x0a\x09self stream nextPutAll: '$recv('.\x0a\x09self visit: instr.\x0a\x09self stream nextPutAll: ')'",
  4003. referencedClasses: [],
  4004. //>>excludeEnd("ide");
  4005. messageSends: ["ifTrue:ifFalse:", "isSelf", "variable:", "copy", "name:", "variable", "yourself", "ifFalse:", "needsBoxingAsReceiver", "visit:", "nextPutAll:", "stream"]
  4006. }),
  4007. $globals.IRJSTranslator);
  4008. $core.addMethod(
  4009. $core.method({
  4010. selector: "visitSend:",
  4011. protocol: "visiting",
  4012. fn: function (anIRSend){
  4013. var self=this,$self=this;
  4014. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4015. return $core.withContext(function($ctx1) {
  4016. //>>excludeEnd("ctx");
  4017. $self._visitReceiver_($recv(anIRSend)._receiver());
  4018. $recv($self._stream())._nextPutAll_(".".__comma($recv($recv(anIRSend)._selector())._asJavaScriptMethodName()));
  4019. $self._visitInstructionList_enclosedBetween_and_($recv(anIRSend)._arguments(),"(",")");
  4020. return self;
  4021. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4022. }, function($ctx1) {$ctx1.fill(self,"visitSend:",{anIRSend:anIRSend},$globals.IRJSTranslator)});
  4023. //>>excludeEnd("ctx");
  4024. },
  4025. //>>excludeStart("ide", pragmas.excludeIdeData);
  4026. args: ["anIRSend"],
  4027. source: "visitSend: anIRSend\x0a\x09self visitReceiver: anIRSend receiver.\x0a\x09self stream nextPutAll: '.', anIRSend selector asJavaScriptMethodName.\x0a\x09self\x0a\x09\x09visitInstructionList: anIRSend arguments\x0a\x09\x09enclosedBetween: '(' and: ')'",
  4028. referencedClasses: [],
  4029. //>>excludeEnd("ide");
  4030. messageSends: ["visitReceiver:", "receiver", "nextPutAll:", "stream", ",", "asJavaScriptMethodName", "selector", "visitInstructionList:enclosedBetween:and:", "arguments"]
  4031. }),
  4032. $globals.IRJSTranslator);
  4033. $core.addMethod(
  4034. $core.method({
  4035. selector: "visitSuperSend:",
  4036. protocol: "visiting",
  4037. fn: function (anIRSend){
  4038. var self=this,$self=this;
  4039. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4040. return $core.withContext(function($ctx1) {
  4041. //>>excludeEnd("ctx");
  4042. var $1,$4,$3,$2,$5,$6,$7,$8;
  4043. $1=$self._stream();
  4044. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4045. $ctx1.sendIdx["stream"]=1;
  4046. //>>excludeEnd("ctx");
  4047. $recv($1)._nextPutAll_("(");
  4048. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4049. $ctx1.sendIdx["nextPutAll:"]=1;
  4050. //>>excludeEnd("ctx");
  4051. $recv($1)._lf();
  4052. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4053. $ctx1.sendIdx["lf"]=1;
  4054. //>>excludeEnd("ctx");
  4055. $recv($1)._nextPutAll_("//>>excludeStart(\x22ctx\x22, pragmas.excludeDebugContexts);");
  4056. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4057. $ctx1.sendIdx["nextPutAll:"]=2;
  4058. //>>excludeEnd("ctx");
  4059. $recv($1)._lf();
  4060. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4061. $ctx1.sendIdx["lf"]=2;
  4062. //>>excludeEnd("ctx");
  4063. $4=$recv(anIRSend)._scope();
  4064. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4065. $ctx1.sendIdx["scope"]=1;
  4066. //>>excludeEnd("ctx");
  4067. $3=$recv($4)._alias();
  4068. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4069. $ctx1.sendIdx["alias"]=1;
  4070. //>>excludeEnd("ctx");
  4071. $2=$recv($3).__comma(".supercall = true,");
  4072. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4073. $ctx1.sendIdx[","]=1;
  4074. //>>excludeEnd("ctx");
  4075. $recv($1)._nextPutAll_($2);
  4076. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4077. $ctx1.sendIdx["nextPutAll:"]=3;
  4078. //>>excludeEnd("ctx");
  4079. $recv($1)._lf();
  4080. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4081. $ctx1.sendIdx["lf"]=3;
  4082. //>>excludeEnd("ctx");
  4083. $recv($1)._nextPutAll_("//>>excludeEnd(\x22ctx\x22);");
  4084. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4085. $ctx1.sendIdx["nextPutAll:"]=4;
  4086. //>>excludeEnd("ctx");
  4087. $recv($1)._lf();
  4088. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4089. $ctx1.sendIdx["lf"]=4;
  4090. //>>excludeEnd("ctx");
  4091. $5="(".__comma($recv($self._currentClass())._asJavaScriptSource());
  4092. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4093. $ctx1.sendIdx[","]=2;
  4094. //>>excludeEnd("ctx");
  4095. $recv($1)._nextPutAll_($5);
  4096. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4097. $ctx1.sendIdx["nextPutAll:"]=5;
  4098. //>>excludeEnd("ctx");
  4099. $recv($1)._nextPutAll_(".superclass||$boot.nilAsClass).fn.prototype.");
  4100. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4101. $ctx1.sendIdx["nextPutAll:"]=6;
  4102. //>>excludeEnd("ctx");
  4103. $6=$recv($recv($recv(anIRSend)._selector())._asJavaScriptMethodName()).__comma(".apply(");
  4104. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4105. $ctx1.sendIdx[","]=3;
  4106. //>>excludeEnd("ctx");
  4107. $recv($1)._nextPutAll_($6);
  4108. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4109. $ctx1.sendIdx["nextPutAll:"]=7;
  4110. //>>excludeEnd("ctx");
  4111. $7=$recv($1)._nextPutAll_("$self, ");
  4112. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4113. $ctx1.sendIdx["nextPutAll:"]=8;
  4114. //>>excludeEnd("ctx");
  4115. $self._visitInstructionList_enclosedBetween_and_($recv(anIRSend)._arguments(),"[","]");
  4116. $8=$self._stream();
  4117. $recv($8)._nextPutAll_("));");
  4118. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4119. $ctx1.sendIdx["nextPutAll:"]=9;
  4120. //>>excludeEnd("ctx");
  4121. $recv($8)._lf();
  4122. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4123. $ctx1.sendIdx["lf"]=5;
  4124. //>>excludeEnd("ctx");
  4125. $recv($8)._nextPutAll_("//>>excludeStart(\x22ctx\x22, pragmas.excludeDebugContexts);");
  4126. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4127. $ctx1.sendIdx["nextPutAll:"]=10;
  4128. //>>excludeEnd("ctx");
  4129. $recv($8)._lf();
  4130. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4131. $ctx1.sendIdx["lf"]=6;
  4132. //>>excludeEnd("ctx");
  4133. $recv($8)._nextPutAll_($recv($recv($recv(anIRSend)._scope())._alias()).__comma(".supercall = false;"));
  4134. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4135. $ctx1.sendIdx["nextPutAll:"]=11;
  4136. //>>excludeEnd("ctx");
  4137. $recv($8)._lf();
  4138. $recv($8)._nextPutAll_("//>>excludeEnd(\x22ctx\x22);");
  4139. return self;
  4140. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4141. }, function($ctx1) {$ctx1.fill(self,"visitSuperSend:",{anIRSend:anIRSend},$globals.IRJSTranslator)});
  4142. //>>excludeEnd("ctx");
  4143. },
  4144. //>>excludeStart("ide", pragmas.excludeIdeData);
  4145. args: ["anIRSend"],
  4146. source: "visitSuperSend: anIRSend\x0a\x09self stream\x0a\x09\x09nextPutAll: '('; lf;\x0a\x09\x09nextPutAll: '//>>excludeStart(\x22ctx\x22, pragmas.excludeDebugContexts);'; lf;\x0a\x09\x09nextPutAll: anIRSend scope alias, '.supercall = true,'; lf;\x0a\x09\x09nextPutAll: '//>>excludeEnd(\x22ctx\x22);'; lf;\x0a\x09\x09nextPutAll: '(', self currentClass asJavaScriptSource;\x0a\x09\x09nextPutAll: '.superclass||$boot.nilAsClass).fn.prototype.';\x0a\x09\x09nextPutAll: anIRSend selector asJavaScriptMethodName, '.apply(';\x0a\x09\x09nextPutAll: '$self, '.\x0a\x09self\x0a\x09\x09visitInstructionList: anIRSend arguments\x0a\x09\x09enclosedBetween: '[' and: ']'.\x0a\x09self stream \x0a\x09\x09nextPutAll: '));'; lf;\x0a\x09\x09nextPutAll: '//>>excludeStart(\x22ctx\x22, pragmas.excludeDebugContexts);'; lf;\x0a\x09\x09nextPutAll: anIRSend scope alias, '.supercall = false;'; lf;\x0a\x09\x09nextPutAll: '//>>excludeEnd(\x22ctx\x22);'",
  4147. referencedClasses: [],
  4148. //>>excludeEnd("ide");
  4149. messageSends: ["nextPutAll:", "stream", "lf", ",", "alias", "scope", "asJavaScriptSource", "currentClass", "asJavaScriptMethodName", "selector", "visitInstructionList:enclosedBetween:and:", "arguments"]
  4150. }),
  4151. $globals.IRJSTranslator);
  4152. $core.addClass("JSStream", $globals.Object, ["stream", "omitSemicolon"], "Compiler-IR");
  4153. $core.addMethod(
  4154. $core.method({
  4155. selector: "contents",
  4156. protocol: "accessing",
  4157. fn: function (){
  4158. var self=this,$self=this;
  4159. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4160. return $core.withContext(function($ctx1) {
  4161. //>>excludeEnd("ctx");
  4162. return $recv($self["@stream"])._contents();
  4163. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4164. }, function($ctx1) {$ctx1.fill(self,"contents",{},$globals.JSStream)});
  4165. //>>excludeEnd("ctx");
  4166. },
  4167. //>>excludeStart("ide", pragmas.excludeIdeData);
  4168. args: [],
  4169. source: "contents\x0a\x09^ stream contents",
  4170. referencedClasses: [],
  4171. //>>excludeEnd("ide");
  4172. messageSends: ["contents"]
  4173. }),
  4174. $globals.JSStream);
  4175. $core.addMethod(
  4176. $core.method({
  4177. selector: "initialize",
  4178. protocol: "initialization",
  4179. fn: function (){
  4180. var self=this,$self=this;
  4181. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4182. return $core.withContext(function($ctx1) {
  4183. //>>excludeEnd("ctx");
  4184. (
  4185. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4186. $ctx1.supercall = true,
  4187. //>>excludeEnd("ctx");
  4188. ($globals.JSStream.superclass||$boot.nilAsClass).fn.prototype._initialize.apply($self, []));
  4189. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4190. $ctx1.supercall = false;
  4191. //>>excludeEnd("ctx");;
  4192. $self["@stream"]=""._writeStream();
  4193. return self;
  4194. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4195. }, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.JSStream)});
  4196. //>>excludeEnd("ctx");
  4197. },
  4198. //>>excludeStart("ide", pragmas.excludeIdeData);
  4199. args: [],
  4200. source: "initialize\x0a\x09super initialize.\x0a\x09stream := '' writeStream.",
  4201. referencedClasses: [],
  4202. //>>excludeEnd("ide");
  4203. messageSends: ["initialize", "writeStream"]
  4204. }),
  4205. $globals.JSStream);
  4206. $core.addMethod(
  4207. $core.method({
  4208. selector: "lf",
  4209. protocol: "streaming",
  4210. fn: function (){
  4211. var self=this,$self=this;
  4212. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4213. return $core.withContext(function($ctx1) {
  4214. //>>excludeEnd("ctx");
  4215. $recv($self["@stream"])._lf();
  4216. return self;
  4217. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4218. }, function($ctx1) {$ctx1.fill(self,"lf",{},$globals.JSStream)});
  4219. //>>excludeEnd("ctx");
  4220. },
  4221. //>>excludeStart("ide", pragmas.excludeIdeData);
  4222. args: [],
  4223. source: "lf\x0a\x09stream lf",
  4224. referencedClasses: [],
  4225. //>>excludeEnd("ide");
  4226. messageSends: ["lf"]
  4227. }),
  4228. $globals.JSStream);
  4229. $core.addMethod(
  4230. $core.method({
  4231. selector: "nextPut:",
  4232. protocol: "streaming",
  4233. fn: function (aString){
  4234. var self=this,$self=this;
  4235. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4236. return $core.withContext(function($ctx1) {
  4237. //>>excludeEnd("ctx");
  4238. $recv($self["@stream"])._nextPut_(aString);
  4239. return self;
  4240. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4241. }, function($ctx1) {$ctx1.fill(self,"nextPut:",{aString:aString},$globals.JSStream)});
  4242. //>>excludeEnd("ctx");
  4243. },
  4244. //>>excludeStart("ide", pragmas.excludeIdeData);
  4245. args: ["aString"],
  4246. source: "nextPut: aString\x0a\x09stream nextPut: aString",
  4247. referencedClasses: [],
  4248. //>>excludeEnd("ide");
  4249. messageSends: ["nextPut:"]
  4250. }),
  4251. $globals.JSStream);
  4252. $core.addMethod(
  4253. $core.method({
  4254. selector: "nextPutAll:",
  4255. protocol: "streaming",
  4256. fn: function (aString){
  4257. var self=this,$self=this;
  4258. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4259. return $core.withContext(function($ctx1) {
  4260. //>>excludeEnd("ctx");
  4261. $recv($self["@stream"])._nextPutAll_(aString);
  4262. return self;
  4263. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4264. }, function($ctx1) {$ctx1.fill(self,"nextPutAll:",{aString:aString},$globals.JSStream)});
  4265. //>>excludeEnd("ctx");
  4266. },
  4267. //>>excludeStart("ide", pragmas.excludeIdeData);
  4268. args: ["aString"],
  4269. source: "nextPutAll: aString\x0a\x09stream nextPutAll: aString",
  4270. referencedClasses: [],
  4271. //>>excludeEnd("ide");
  4272. messageSends: ["nextPutAll:"]
  4273. }),
  4274. $globals.JSStream);
  4275. $core.addMethod(
  4276. $core.method({
  4277. selector: "nextPutAssignLhs:rhs:",
  4278. protocol: "streaming",
  4279. fn: function (aBlock,anotherBlock){
  4280. var self=this,$self=this;
  4281. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4282. return $core.withContext(function($ctx1) {
  4283. //>>excludeEnd("ctx");
  4284. $recv(aBlock)._value();
  4285. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4286. $ctx1.sendIdx["value"]=1;
  4287. //>>excludeEnd("ctx");
  4288. $recv($self["@stream"])._nextPutAll_("=");
  4289. $recv(anotherBlock)._value();
  4290. return self;
  4291. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4292. }, function($ctx1) {$ctx1.fill(self,"nextPutAssignLhs:rhs:",{aBlock:aBlock,anotherBlock:anotherBlock},$globals.JSStream)});
  4293. //>>excludeEnd("ctx");
  4294. },
  4295. //>>excludeStart("ide", pragmas.excludeIdeData);
  4296. args: ["aBlock", "anotherBlock"],
  4297. source: "nextPutAssignLhs: aBlock rhs: anotherBlock\x0a\x09aBlock value.\x0a\x09stream nextPutAll: '='.\x0a\x09anotherBlock value",
  4298. referencedClasses: [],
  4299. //>>excludeEnd("ide");
  4300. messageSends: ["value", "nextPutAll:"]
  4301. }),
  4302. $globals.JSStream);
  4303. $core.addMethod(
  4304. $core.method({
  4305. selector: "nextPutBlockContextFor:during:",
  4306. protocol: "streaming",
  4307. fn: function (anIRClosure,aBlock){
  4308. var self=this,$self=this;
  4309. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4310. return $core.withContext(function($ctx1) {
  4311. //>>excludeEnd("ctx");
  4312. var $1,$2,$6,$5,$4,$3,$7,$11,$10,$9,$8,$15,$14,$13,$12,$16,$17,$23,$22,$21,$20,$19,$18;
  4313. $1=$recv(anIRClosure)._requiresSmalltalkContext();
  4314. if(!$core.assert($1)){
  4315. $2=$recv(aBlock)._value();
  4316. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4317. $ctx1.sendIdx["value"]=1;
  4318. //>>excludeEnd("ctx");
  4319. return $2;
  4320. }
  4321. $self._nextPutAll_("//>>excludeStart(\x22ctx\x22, pragmas.excludeDebugContexts);");
  4322. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4323. $ctx1.sendIdx["nextPutAll:"]=1;
  4324. //>>excludeEnd("ctx");
  4325. $self._lf();
  4326. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4327. $ctx1.sendIdx["lf"]=1;
  4328. //>>excludeEnd("ctx");
  4329. $6=$recv(anIRClosure)._scope();
  4330. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4331. $ctx1.sendIdx["scope"]=1;
  4332. //>>excludeEnd("ctx");
  4333. $5=$recv($6)._alias();
  4334. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4335. $ctx1.sendIdx["alias"]=1;
  4336. //>>excludeEnd("ctx");
  4337. $4="return $core.withContext(function(".__comma($5);
  4338. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4339. $ctx1.sendIdx[","]=2;
  4340. //>>excludeEnd("ctx");
  4341. $3=$recv($4).__comma(") {");
  4342. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4343. $ctx1.sendIdx[","]=1;
  4344. //>>excludeEnd("ctx");
  4345. $self._nextPutAll_($3);
  4346. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4347. $ctx1.sendIdx["nextPutAll:"]=2;
  4348. //>>excludeEnd("ctx");
  4349. $self._lf();
  4350. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4351. $ctx1.sendIdx["lf"]=2;
  4352. //>>excludeEnd("ctx");
  4353. $self._nextPutAll_("//>>excludeEnd(\x22ctx\x22);");
  4354. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4355. $ctx1.sendIdx["nextPutAll:"]=3;
  4356. //>>excludeEnd("ctx");
  4357. $7=$self._lf();
  4358. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4359. $ctx1.sendIdx["lf"]=3;
  4360. //>>excludeEnd("ctx");
  4361. $recv(aBlock)._value();
  4362. $self._nextPutAll_("//>>excludeStart(\x22ctx\x22, pragmas.excludeDebugContexts);");
  4363. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4364. $ctx1.sendIdx["nextPutAll:"]=4;
  4365. //>>excludeEnd("ctx");
  4366. $self._lf();
  4367. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4368. $ctx1.sendIdx["lf"]=4;
  4369. //>>excludeEnd("ctx");
  4370. $11=$recv(anIRClosure)._scope();
  4371. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4372. $ctx1.sendIdx["scope"]=2;
  4373. //>>excludeEnd("ctx");
  4374. $10=$recv($11)._alias();
  4375. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4376. $ctx1.sendIdx["alias"]=2;
  4377. //>>excludeEnd("ctx");
  4378. $9="}, function(".__comma($10);
  4379. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4380. $ctx1.sendIdx[","]=4;
  4381. //>>excludeEnd("ctx");
  4382. $8=$recv($9).__comma(") {");
  4383. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4384. $ctx1.sendIdx[","]=3;
  4385. //>>excludeEnd("ctx");
  4386. $self._nextPutAll_($8);
  4387. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4388. $ctx1.sendIdx["nextPutAll:"]=5;
  4389. //>>excludeEnd("ctx");
  4390. $15=$recv(anIRClosure)._scope();
  4391. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4392. $ctx1.sendIdx["scope"]=3;
  4393. //>>excludeEnd("ctx");
  4394. $14=$recv($15)._alias();
  4395. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4396. $ctx1.sendIdx["alias"]=3;
  4397. //>>excludeEnd("ctx");
  4398. $13=$recv($14).__comma(".fillBlock({");
  4399. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4400. $ctx1.sendIdx[","]=5;
  4401. //>>excludeEnd("ctx");
  4402. $12=$self._nextPutAll_($13);
  4403. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4404. $ctx1.sendIdx["nextPutAll:"]=6;
  4405. //>>excludeEnd("ctx");
  4406. $recv($recv(anIRClosure)._locals())._do_separatedBy_((function(each){
  4407. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4408. return $core.withContext(function($ctx2) {
  4409. //>>excludeEnd("ctx");
  4410. $16=$recv(each)._asVariableName();
  4411. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4412. $ctx2.sendIdx["asVariableName"]=1;
  4413. //>>excludeEnd("ctx");
  4414. $self._nextPutAll_($16);
  4415. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4416. $ctx2.sendIdx["nextPutAll:"]=7;
  4417. //>>excludeEnd("ctx");
  4418. $self._nextPutAll_(":");
  4419. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4420. $ctx2.sendIdx["nextPutAll:"]=8;
  4421. //>>excludeEnd("ctx");
  4422. $17=$self._nextPutAll_($recv(each)._asVariableName());
  4423. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4424. $ctx2.sendIdx["nextPutAll:"]=9;
  4425. //>>excludeEnd("ctx");
  4426. return $17;
  4427. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4428. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)});
  4429. //>>excludeEnd("ctx");
  4430. }),(function(){
  4431. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4432. return $core.withContext(function($ctx2) {
  4433. //>>excludeEnd("ctx");
  4434. return $self._nextPutAll_(",");
  4435. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4436. $ctx2.sendIdx["nextPutAll:"]=10;
  4437. //>>excludeEnd("ctx");
  4438. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4439. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  4440. //>>excludeEnd("ctx");
  4441. }));
  4442. $self._nextPutAll_("},");
  4443. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4444. $ctx1.sendIdx["nextPutAll:"]=11;
  4445. //>>excludeEnd("ctx");
  4446. $23=$recv(anIRClosure)._scope();
  4447. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4448. $ctx1.sendIdx["scope"]=4;
  4449. //>>excludeEnd("ctx");
  4450. $22=$recv($23)._outerScope();
  4451. $21=$recv($22)._alias();
  4452. $20=$recv($21).__comma(",");
  4453. $19=$recv($20).__comma($recv($recv($recv(anIRClosure)._scope())._blockIndex())._asString());
  4454. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4455. $ctx1.sendIdx[","]=7;
  4456. //>>excludeEnd("ctx");
  4457. $18=$recv($19).__comma(")});");
  4458. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4459. $ctx1.sendIdx[","]=6;
  4460. //>>excludeEnd("ctx");
  4461. $self._nextPutAll_($18);
  4462. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4463. $ctx1.sendIdx["nextPutAll:"]=12;
  4464. //>>excludeEnd("ctx");
  4465. $self._lf();
  4466. $self._nextPutAll_("//>>excludeEnd(\x22ctx\x22);");
  4467. return self;
  4468. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4469. }, function($ctx1) {$ctx1.fill(self,"nextPutBlockContextFor:during:",{anIRClosure:anIRClosure,aBlock:aBlock},$globals.JSStream)});
  4470. //>>excludeEnd("ctx");
  4471. },
  4472. //>>excludeStart("ide", pragmas.excludeIdeData);
  4473. args: ["anIRClosure", "aBlock"],
  4474. source: "nextPutBlockContextFor: anIRClosure during: aBlock\x0a\x09anIRClosure requiresSmalltalkContext ifFalse: [ ^ aBlock value ].\x0a\x09self\x0a\x09\x09nextPutAll: '//>>excludeStart(\x22ctx\x22, pragmas.excludeDebugContexts);';\x0a\x09\x09lf;\x0a\x09\x09nextPutAll: 'return $core.withContext(function(', anIRClosure scope alias, ') {';\x0a\x09\x09lf;\x0a\x09\x09nextPutAll: '//>>excludeEnd(\x22ctx\x22);';\x0a\x09\x09lf.\x0a\x09\x0a\x09aBlock value.\x0a\x09\x0a\x09self\x0a\x09\x09nextPutAll: '//>>excludeStart(\x22ctx\x22, pragmas.excludeDebugContexts);';\x0a\x09\x09lf;\x0a\x09\x09nextPutAll: '}, function(', anIRClosure scope alias, ') {';\x0a\x09\x09nextPutAll: anIRClosure scope alias, '.fillBlock({'.\x0a\x09\x0a\x09anIRClosure locals\x0a\x09\x09do: [ :each |\x0a\x09\x09\x09self\x0a\x09\x09\x09\x09nextPutAll: each asVariableName;\x0a\x09\x09\x09\x09nextPutAll: ':';\x0a\x09\x09\x09\x09nextPutAll: each asVariableName ]\x0a\x09\x09separatedBy: [ self nextPutAll: ',' ].\x0a\x09\x0a\x09self\x0a\x09\x09nextPutAll: '},';\x0a\x09\x09nextPutAll: anIRClosure scope outerScope alias, ',', anIRClosure scope blockIndex asString, ')});';\x0a\x09\x09lf;\x0a\x09\x09nextPutAll: '//>>excludeEnd(\x22ctx\x22);'",
  4475. referencedClasses: [],
  4476. //>>excludeEnd("ide");
  4477. messageSends: ["ifFalse:", "requiresSmalltalkContext", "value", "nextPutAll:", "lf", ",", "alias", "scope", "do:separatedBy:", "locals", "asVariableName", "outerScope", "asString", "blockIndex"]
  4478. }),
  4479. $globals.JSStream);
  4480. $core.addMethod(
  4481. $core.method({
  4482. selector: "nextPutClosureWith:arguments:",
  4483. protocol: "streaming",
  4484. fn: function (aBlock,anArray){
  4485. var self=this,$self=this;
  4486. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4487. return $core.withContext(function($ctx1) {
  4488. //>>excludeEnd("ctx");
  4489. var $1,$2,$3;
  4490. $recv($self["@stream"])._nextPutAll_("(function(");
  4491. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4492. $ctx1.sendIdx["nextPutAll:"]=1;
  4493. //>>excludeEnd("ctx");
  4494. $recv(anArray)._do_separatedBy_((function(each){
  4495. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4496. return $core.withContext(function($ctx2) {
  4497. //>>excludeEnd("ctx");
  4498. return $recv($self["@stream"])._nextPutAll_($recv(each)._asVariableName());
  4499. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4500. $ctx2.sendIdx["nextPutAll:"]=2;
  4501. //>>excludeEnd("ctx");
  4502. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4503. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  4504. //>>excludeEnd("ctx");
  4505. }),(function(){
  4506. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4507. return $core.withContext(function($ctx2) {
  4508. //>>excludeEnd("ctx");
  4509. return $recv($self["@stream"])._nextPut_(",");
  4510. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4511. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  4512. //>>excludeEnd("ctx");
  4513. }));
  4514. $1=$self["@stream"];
  4515. $recv($1)._nextPutAll_("){");
  4516. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4517. $ctx1.sendIdx["nextPutAll:"]=3;
  4518. //>>excludeEnd("ctx");
  4519. $2=$recv($1)._lf();
  4520. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4521. $ctx1.sendIdx["lf"]=1;
  4522. //>>excludeEnd("ctx");
  4523. $recv(aBlock)._value();
  4524. $3=$self["@stream"];
  4525. $recv($3)._lf();
  4526. $recv($3)._nextPutAll_("})");
  4527. return self;
  4528. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4529. }, function($ctx1) {$ctx1.fill(self,"nextPutClosureWith:arguments:",{aBlock:aBlock,anArray:anArray},$globals.JSStream)});
  4530. //>>excludeEnd("ctx");
  4531. },
  4532. //>>excludeStart("ide", pragmas.excludeIdeData);
  4533. args: ["aBlock", "anArray"],
  4534. source: "nextPutClosureWith: aBlock arguments: anArray\x0a\x09stream nextPutAll: '(function('.\x0a\x09anArray\x0a\x09\x09do: [ :each | stream nextPutAll: each asVariableName ]\x0a\x09\x09separatedBy: [ stream nextPut: ',' ].\x0a\x09stream nextPutAll: '){'; lf.\x0a\x09aBlock value.\x0a\x09stream lf; nextPutAll: '})'",
  4535. referencedClasses: [],
  4536. //>>excludeEnd("ide");
  4537. messageSends: ["nextPutAll:", "do:separatedBy:", "asVariableName", "nextPut:", "lf", "value"]
  4538. }),
  4539. $globals.JSStream);
  4540. $core.addMethod(
  4541. $core.method({
  4542. selector: "nextPutContextFor:during:",
  4543. protocol: "streaming",
  4544. fn: function (aMethod,aBlock){
  4545. var self=this,$self=this;
  4546. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4547. return $core.withContext(function($ctx1) {
  4548. //>>excludeEnd("ctx");
  4549. var $1,$2,$6,$5,$4,$3,$7,$12,$11,$10,$9,$8,$16,$15,$14,$13,$17,$18;
  4550. $1=$recv(aMethod)._requiresSmalltalkContext();
  4551. if(!$core.assert($1)){
  4552. $2=$recv(aBlock)._value();
  4553. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4554. $ctx1.sendIdx["value"]=1;
  4555. //>>excludeEnd("ctx");
  4556. return $2;
  4557. }
  4558. $self._nextPutAll_("//>>excludeStart(\x22ctx\x22, pragmas.excludeDebugContexts);");
  4559. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4560. $ctx1.sendIdx["nextPutAll:"]=1;
  4561. //>>excludeEnd("ctx");
  4562. $self._lf();
  4563. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4564. $ctx1.sendIdx["lf"]=1;
  4565. //>>excludeEnd("ctx");
  4566. $6=$recv(aMethod)._scope();
  4567. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4568. $ctx1.sendIdx["scope"]=1;
  4569. //>>excludeEnd("ctx");
  4570. $5=$recv($6)._alias();
  4571. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4572. $ctx1.sendIdx["alias"]=1;
  4573. //>>excludeEnd("ctx");
  4574. $4="return $core.withContext(function(".__comma($5);
  4575. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4576. $ctx1.sendIdx[","]=2;
  4577. //>>excludeEnd("ctx");
  4578. $3=$recv($4).__comma(") {");
  4579. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4580. $ctx1.sendIdx[","]=1;
  4581. //>>excludeEnd("ctx");
  4582. $self._nextPutAll_($3);
  4583. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4584. $ctx1.sendIdx["nextPutAll:"]=2;
  4585. //>>excludeEnd("ctx");
  4586. $self._lf();
  4587. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4588. $ctx1.sendIdx["lf"]=2;
  4589. //>>excludeEnd("ctx");
  4590. $self._nextPutAll_("//>>excludeEnd(\x22ctx\x22);");
  4591. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4592. $ctx1.sendIdx["nextPutAll:"]=3;
  4593. //>>excludeEnd("ctx");
  4594. $7=$self._lf();
  4595. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4596. $ctx1.sendIdx["lf"]=3;
  4597. //>>excludeEnd("ctx");
  4598. $recv(aBlock)._value();
  4599. $self._nextPutAll_("//>>excludeStart(\x22ctx\x22, pragmas.excludeDebugContexts);");
  4600. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4601. $ctx1.sendIdx["nextPutAll:"]=4;
  4602. //>>excludeEnd("ctx");
  4603. $self._lf();
  4604. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4605. $ctx1.sendIdx["lf"]=4;
  4606. //>>excludeEnd("ctx");
  4607. $12=$recv(aMethod)._scope();
  4608. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4609. $ctx1.sendIdx["scope"]=2;
  4610. //>>excludeEnd("ctx");
  4611. $11=$recv($12)._alias();
  4612. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4613. $ctx1.sendIdx["alias"]=2;
  4614. //>>excludeEnd("ctx");
  4615. $10="}, function(".__comma($11);
  4616. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4617. $ctx1.sendIdx[","]=5;
  4618. //>>excludeEnd("ctx");
  4619. $9=$recv($10).__comma(") {");
  4620. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4621. $ctx1.sendIdx[","]=4;
  4622. //>>excludeEnd("ctx");
  4623. $8=$recv($9).__comma($recv($recv(aMethod)._scope())._alias());
  4624. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4625. $ctx1.sendIdx[","]=3;
  4626. //>>excludeEnd("ctx");
  4627. $self._nextPutAll_($8);
  4628. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4629. $ctx1.sendIdx["nextPutAll:"]=5;
  4630. //>>excludeEnd("ctx");
  4631. $16=$recv($recv(aMethod)._selector())._asJavaScriptSource();
  4632. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4633. $ctx1.sendIdx["asJavaScriptSource"]=1;
  4634. //>>excludeEnd("ctx");
  4635. $15=".fill(self,".__comma($16);
  4636. $14=$recv($15).__comma(",{");
  4637. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4638. $ctx1.sendIdx[","]=6;
  4639. //>>excludeEnd("ctx");
  4640. $13=$self._nextPutAll_($14);
  4641. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4642. $ctx1.sendIdx["nextPutAll:"]=6;
  4643. //>>excludeEnd("ctx");
  4644. $recv($recv(aMethod)._locals())._do_separatedBy_((function(each){
  4645. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4646. return $core.withContext(function($ctx2) {
  4647. //>>excludeEnd("ctx");
  4648. $17=$recv(each)._asVariableName();
  4649. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4650. $ctx2.sendIdx["asVariableName"]=1;
  4651. //>>excludeEnd("ctx");
  4652. $self._nextPutAll_($17);
  4653. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4654. $ctx2.sendIdx["nextPutAll:"]=7;
  4655. //>>excludeEnd("ctx");
  4656. $self._nextPutAll_(":");
  4657. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4658. $ctx2.sendIdx["nextPutAll:"]=8;
  4659. //>>excludeEnd("ctx");
  4660. $18=$self._nextPutAll_($recv(each)._asVariableName());
  4661. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4662. $ctx2.sendIdx["nextPutAll:"]=9;
  4663. //>>excludeEnd("ctx");
  4664. return $18;
  4665. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4666. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)});
  4667. //>>excludeEnd("ctx");
  4668. }),(function(){
  4669. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4670. return $core.withContext(function($ctx2) {
  4671. //>>excludeEnd("ctx");
  4672. return $self._nextPutAll_(",");
  4673. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4674. $ctx2.sendIdx["nextPutAll:"]=10;
  4675. //>>excludeEnd("ctx");
  4676. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4677. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  4678. //>>excludeEnd("ctx");
  4679. }));
  4680. $self._nextPutAll_("},");
  4681. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4682. $ctx1.sendIdx["nextPutAll:"]=11;
  4683. //>>excludeEnd("ctx");
  4684. $self._nextPutAll_($recv($recv(aMethod)._theClass())._asJavaScriptSource());
  4685. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4686. $ctx1.sendIdx["nextPutAll:"]=12;
  4687. //>>excludeEnd("ctx");
  4688. $self._nextPutAll_(")});");
  4689. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4690. $ctx1.sendIdx["nextPutAll:"]=13;
  4691. //>>excludeEnd("ctx");
  4692. $self._lf();
  4693. $self._nextPutAll_("//>>excludeEnd(\x22ctx\x22);");
  4694. return self;
  4695. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4696. }, function($ctx1) {$ctx1.fill(self,"nextPutContextFor:during:",{aMethod:aMethod,aBlock:aBlock},$globals.JSStream)});
  4697. //>>excludeEnd("ctx");
  4698. },
  4699. //>>excludeStart("ide", pragmas.excludeIdeData);
  4700. args: ["aMethod", "aBlock"],
  4701. source: "nextPutContextFor: aMethod during: aBlock\x0a\x09aMethod requiresSmalltalkContext ifFalse: [ ^ aBlock value ].\x0a\x09\x0a\x09self\x0a\x09\x09nextPutAll: '//>>excludeStart(\x22ctx\x22, pragmas.excludeDebugContexts);';\x0a\x09\x09lf;\x0a\x09\x09nextPutAll: 'return $core.withContext(function(', aMethod scope alias, ') {';\x0a\x09\x09lf;\x0a\x09\x09nextPutAll: '//>>excludeEnd(\x22ctx\x22);';\x0a\x09\x09lf.\x0a\x0a\x09aBlock value.\x0a\x09\x0a\x09self\x0a\x09\x09nextPutAll: '//>>excludeStart(\x22ctx\x22, pragmas.excludeDebugContexts);';\x0a\x09\x09lf;\x0a\x09\x09nextPutAll: '}, function(', aMethod scope alias, ') {', aMethod scope alias;\x0a\x09\x09nextPutAll: '.fill(self,', aMethod selector asJavaScriptSource, ',{'.\x0a\x0a\x09aMethod locals\x0a\x09\x09do: [ :each |\x0a\x09\x09\x09self\x0a\x09\x09\x09\x09nextPutAll: each asVariableName;\x0a\x09\x09\x09\x09nextPutAll: ':';\x0a\x09\x09\x09\x09nextPutAll: each asVariableName ]\x0a\x09\x09separatedBy: [ self nextPutAll: ',' ].\x0a\x09\x0a\x09self\x0a\x09\x09nextPutAll: '},';\x0a\x09\x09nextPutAll: aMethod theClass asJavaScriptSource;\x0a\x09\x09nextPutAll: ')});';\x0a\x09\x09lf;\x0a\x09\x09nextPutAll: '//>>excludeEnd(\x22ctx\x22);'",
  4702. referencedClasses: [],
  4703. //>>excludeEnd("ide");
  4704. messageSends: ["ifFalse:", "requiresSmalltalkContext", "value", "nextPutAll:", "lf", ",", "alias", "scope", "asJavaScriptSource", "selector", "do:separatedBy:", "locals", "asVariableName", "theClass"]
  4705. }),
  4706. $globals.JSStream);
  4707. $core.addMethod(
  4708. $core.method({
  4709. selector: "nextPutFunctionWith:arguments:",
  4710. protocol: "streaming",
  4711. fn: function (aBlock,anArray){
  4712. var self=this,$self=this;
  4713. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4714. return $core.withContext(function($ctx1) {
  4715. //>>excludeEnd("ctx");
  4716. var $1,$2,$3,$4,$5;
  4717. $recv($self["@stream"])._nextPutAll_("fn: function (");
  4718. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4719. $ctx1.sendIdx["nextPutAll:"]=1;
  4720. //>>excludeEnd("ctx");
  4721. $recv(anArray)._do_separatedBy_((function(each){
  4722. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4723. return $core.withContext(function($ctx2) {
  4724. //>>excludeEnd("ctx");
  4725. return $recv($self["@stream"])._nextPutAll_($recv(each)._asVariableName());
  4726. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4727. $ctx2.sendIdx["nextPutAll:"]=2;
  4728. //>>excludeEnd("ctx");
  4729. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4730. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  4731. //>>excludeEnd("ctx");
  4732. }),(function(){
  4733. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4734. return $core.withContext(function($ctx2) {
  4735. //>>excludeEnd("ctx");
  4736. return $recv($self["@stream"])._nextPut_(",");
  4737. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4738. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  4739. //>>excludeEnd("ctx");
  4740. }));
  4741. $1=$self["@stream"];
  4742. $recv($1)._nextPutAll_("){");
  4743. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4744. $ctx1.sendIdx["nextPutAll:"]=3;
  4745. //>>excludeEnd("ctx");
  4746. $2=$recv($1)._lf();
  4747. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4748. $ctx1.sendIdx["lf"]=1;
  4749. //>>excludeEnd("ctx");
  4750. $3=$self["@stream"];
  4751. $recv($3)._nextPutAll_("var self=this,$self=this;");
  4752. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4753. $ctx1.sendIdx["nextPutAll:"]=4;
  4754. //>>excludeEnd("ctx");
  4755. $4=$recv($3)._lf();
  4756. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4757. $ctx1.sendIdx["lf"]=2;
  4758. //>>excludeEnd("ctx");
  4759. $recv(aBlock)._value();
  4760. $5=$self["@stream"];
  4761. $recv($5)._lf();
  4762. $recv($5)._nextPutAll_("}");
  4763. return self;
  4764. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4765. }, function($ctx1) {$ctx1.fill(self,"nextPutFunctionWith:arguments:",{aBlock:aBlock,anArray:anArray},$globals.JSStream)});
  4766. //>>excludeEnd("ctx");
  4767. },
  4768. //>>excludeStart("ide", pragmas.excludeIdeData);
  4769. args: ["aBlock", "anArray"],
  4770. source: "nextPutFunctionWith: aBlock arguments: anArray\x0a\x09stream nextPutAll: 'fn: function ('.\x0a\x09anArray\x0a\x09\x09do: [ :each | stream nextPutAll: each asVariableName ]\x0a\x09\x09separatedBy: [ stream nextPut: ',' ].\x0a\x09stream nextPutAll: '){'; lf.\x0a\x09stream nextPutAll: 'var self=this,$self=this;'; lf.\x0a\x09aBlock value.\x0a\x09stream lf; nextPutAll: '}'",
  4771. referencedClasses: [],
  4772. //>>excludeEnd("ide");
  4773. messageSends: ["nextPutAll:", "do:separatedBy:", "asVariableName", "nextPut:", "lf", "value"]
  4774. }),
  4775. $globals.JSStream);
  4776. $core.addMethod(
  4777. $core.method({
  4778. selector: "nextPutIf:then:",
  4779. protocol: "streaming",
  4780. fn: function (aBlock,anotherBlock){
  4781. var self=this,$self=this;
  4782. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4783. return $core.withContext(function($ctx1) {
  4784. //>>excludeEnd("ctx");
  4785. var $1;
  4786. $recv($self["@stream"])._nextPutAll_("if(");
  4787. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4788. $ctx1.sendIdx["nextPutAll:"]=1;
  4789. //>>excludeEnd("ctx");
  4790. $recv(aBlock)._value();
  4791. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4792. $ctx1.sendIdx["value"]=1;
  4793. //>>excludeEnd("ctx");
  4794. $1=$self["@stream"];
  4795. $recv($1)._nextPutAll_("){");
  4796. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4797. $ctx1.sendIdx["nextPutAll:"]=2;
  4798. //>>excludeEnd("ctx");
  4799. $recv($1)._lf();
  4800. $recv(anotherBlock)._value();
  4801. $recv($self["@stream"])._nextPutAll_("}");
  4802. $self._omitSemicolon_(true);
  4803. return self;
  4804. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4805. }, function($ctx1) {$ctx1.fill(self,"nextPutIf:then:",{aBlock:aBlock,anotherBlock:anotherBlock},$globals.JSStream)});
  4806. //>>excludeEnd("ctx");
  4807. },
  4808. //>>excludeStart("ide", pragmas.excludeIdeData);
  4809. args: ["aBlock", "anotherBlock"],
  4810. source: "nextPutIf: aBlock then: anotherBlock\x0a\x09stream nextPutAll: 'if('.\x0a\x09aBlock value.\x0a\x09stream nextPutAll: '){'; lf.\x0a\x09anotherBlock value.\x0a\x09stream nextPutAll: '}'.\x0a\x09self omitSemicolon: true",
  4811. referencedClasses: [],
  4812. //>>excludeEnd("ide");
  4813. messageSends: ["nextPutAll:", "value", "lf", "omitSemicolon:"]
  4814. }),
  4815. $globals.JSStream);
  4816. $core.addMethod(
  4817. $core.method({
  4818. selector: "nextPutIf:then:else:",
  4819. protocol: "streaming",
  4820. fn: function (aBlock,ifBlock,elseBlock){
  4821. var self=this,$self=this;
  4822. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4823. return $core.withContext(function($ctx1) {
  4824. //>>excludeEnd("ctx");
  4825. var $1,$2,$3;
  4826. $recv($self["@stream"])._nextPutAll_("if(");
  4827. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4828. $ctx1.sendIdx["nextPutAll:"]=1;
  4829. //>>excludeEnd("ctx");
  4830. $recv(aBlock)._value();
  4831. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4832. $ctx1.sendIdx["value"]=1;
  4833. //>>excludeEnd("ctx");
  4834. $1=$self["@stream"];
  4835. $recv($1)._nextPutAll_("){");
  4836. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4837. $ctx1.sendIdx["nextPutAll:"]=2;
  4838. //>>excludeEnd("ctx");
  4839. $2=$recv($1)._lf();
  4840. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4841. $ctx1.sendIdx["lf"]=1;
  4842. //>>excludeEnd("ctx");
  4843. $recv(ifBlock)._value();
  4844. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4845. $ctx1.sendIdx["value"]=2;
  4846. //>>excludeEnd("ctx");
  4847. $3=$self["@stream"];
  4848. $recv($3)._nextPutAll_("} else {");
  4849. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4850. $ctx1.sendIdx["nextPutAll:"]=3;
  4851. //>>excludeEnd("ctx");
  4852. $recv($3)._lf();
  4853. $recv(elseBlock)._value();
  4854. $recv($self["@stream"])._nextPutAll_("}");
  4855. $self._omitSemicolon_(true);
  4856. return self;
  4857. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4858. }, function($ctx1) {$ctx1.fill(self,"nextPutIf:then:else:",{aBlock:aBlock,ifBlock:ifBlock,elseBlock:elseBlock},$globals.JSStream)});
  4859. //>>excludeEnd("ctx");
  4860. },
  4861. //>>excludeStart("ide", pragmas.excludeIdeData);
  4862. args: ["aBlock", "ifBlock", "elseBlock"],
  4863. source: "nextPutIf: aBlock then: ifBlock else: elseBlock\x0a\x09stream nextPutAll: 'if('.\x0a\x09aBlock value.\x0a\x09stream nextPutAll: '){'; lf.\x0a\x09ifBlock value.\x0a\x09stream nextPutAll: '} else {'; lf.\x0a\x09elseBlock value.\x0a\x09stream nextPutAll: '}'.\x0a\x09self omitSemicolon: true",
  4864. referencedClasses: [],
  4865. //>>excludeEnd("ide");
  4866. messageSends: ["nextPutAll:", "value", "lf", "omitSemicolon:"]
  4867. }),
  4868. $globals.JSStream);
  4869. $core.addMethod(
  4870. $core.method({
  4871. selector: "nextPutMethodDeclaration:with:",
  4872. protocol: "streaming",
  4873. fn: function (aMethod,aBlock){
  4874. var self=this,$self=this;
  4875. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4876. return $core.withContext(function($ctx1) {
  4877. //>>excludeEnd("ctx");
  4878. var $1,$4,$3,$2,$7,$6,$5,$8,$9,$12,$11,$10,$15,$14,$13,$18,$17,$16,$19,$20;
  4879. $1=$self["@stream"];
  4880. $recv($1)._nextPutAll_("$core.method({");
  4881. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4882. $ctx1.sendIdx["nextPutAll:"]=1;
  4883. //>>excludeEnd("ctx");
  4884. $recv($1)._lf();
  4885. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4886. $ctx1.sendIdx["lf"]=1;
  4887. //>>excludeEnd("ctx");
  4888. $4=$recv($recv(aMethod)._selector())._asJavaScriptSource();
  4889. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4890. $ctx1.sendIdx["asJavaScriptSource"]=1;
  4891. //>>excludeEnd("ctx");
  4892. $3="selector: ".__comma($4);
  4893. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4894. $ctx1.sendIdx[","]=2;
  4895. //>>excludeEnd("ctx");
  4896. $2=$recv($3).__comma(",");
  4897. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4898. $ctx1.sendIdx[","]=1;
  4899. //>>excludeEnd("ctx");
  4900. $recv($1)._nextPutAll_($2);
  4901. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4902. $ctx1.sendIdx["nextPutAll:"]=2;
  4903. //>>excludeEnd("ctx");
  4904. $recv($1)._lf();
  4905. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4906. $ctx1.sendIdx["lf"]=2;
  4907. //>>excludeEnd("ctx");
  4908. $7=$recv($recv(aMethod)._source())._asJavaScriptSource();
  4909. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4910. $ctx1.sendIdx["asJavaScriptSource"]=2;
  4911. //>>excludeEnd("ctx");
  4912. $6="source: ".__comma($7);
  4913. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4914. $ctx1.sendIdx[","]=4;
  4915. //>>excludeEnd("ctx");
  4916. $5=$recv($6).__comma(",");
  4917. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4918. $ctx1.sendIdx[","]=3;
  4919. //>>excludeEnd("ctx");
  4920. $recv($1)._nextPutAll_($5);
  4921. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4922. $ctx1.sendIdx["nextPutAll:"]=3;
  4923. //>>excludeEnd("ctx");
  4924. $8=$recv($1)._lf();
  4925. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4926. $ctx1.sendIdx["lf"]=3;
  4927. //>>excludeEnd("ctx");
  4928. $recv(aBlock)._value();
  4929. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4930. $ctx1.sendIdx["value"]=1;
  4931. //>>excludeEnd("ctx");
  4932. $9=$self["@stream"];
  4933. $12=$recv($globals.String)._lf();
  4934. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4935. $ctx1.sendIdx["lf"]=4;
  4936. //>>excludeEnd("ctx");
  4937. $11=",".__comma($12);
  4938. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4939. $ctx1.sendIdx[","]=6;
  4940. //>>excludeEnd("ctx");
  4941. $10=$recv($11).__comma("messageSends: ");
  4942. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4943. $ctx1.sendIdx[","]=5;
  4944. //>>excludeEnd("ctx");
  4945. $recv($9)._nextPutAll_($10);
  4946. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4947. $ctx1.sendIdx["nextPutAll:"]=4;
  4948. //>>excludeEnd("ctx");
  4949. $15=$recv($recv(aMethod)._messageSends())._asArray();
  4950. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4951. $ctx1.sendIdx["asArray"]=1;
  4952. //>>excludeEnd("ctx");
  4953. $14=$recv($15)._asJavaScriptSource();
  4954. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4955. $ctx1.sendIdx["asJavaScriptSource"]=3;
  4956. //>>excludeEnd("ctx");
  4957. $13=$recv($14).__comma(",");
  4958. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4959. $ctx1.sendIdx[","]=7;
  4960. //>>excludeEnd("ctx");
  4961. $recv($9)._nextPutAll_($13);
  4962. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4963. $ctx1.sendIdx["nextPutAll:"]=5;
  4964. //>>excludeEnd("ctx");
  4965. $recv($9)._lf();
  4966. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4967. $ctx1.sendIdx["lf"]=5;
  4968. //>>excludeEnd("ctx");
  4969. $18=$recv($recv($recv($recv(aMethod)._arguments())._collect_((function(each){
  4970. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4971. return $core.withContext(function($ctx2) {
  4972. //>>excludeEnd("ctx");
  4973. return $recv(each)._value();
  4974. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4975. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  4976. //>>excludeEnd("ctx");
  4977. })))._asArray())._asJavaScriptSource();
  4978. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4979. $ctx1.sendIdx["asJavaScriptSource"]=4;
  4980. //>>excludeEnd("ctx");
  4981. $17="args: ".__comma($18);
  4982. $16=$recv($17).__comma(",");
  4983. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4984. $ctx1.sendIdx[","]=8;
  4985. //>>excludeEnd("ctx");
  4986. $recv($9)._nextPutAll_($16);
  4987. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4988. $ctx1.sendIdx["nextPutAll:"]=6;
  4989. //>>excludeEnd("ctx");
  4990. $recv($9)._lf();
  4991. $19=$recv($9)._nextPutAll_("referencedClasses: [");
  4992. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4993. $ctx1.sendIdx["nextPutAll:"]=7;
  4994. //>>excludeEnd("ctx");
  4995. $recv($recv(aMethod)._classReferences())._do_separatedBy_((function(each){
  4996. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4997. return $core.withContext(function($ctx2) {
  4998. //>>excludeEnd("ctx");
  4999. return $recv($self["@stream"])._nextPutAll_($recv(each)._asJavaScriptSource());
  5000. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5001. $ctx2.sendIdx["nextPutAll:"]=8;
  5002. //>>excludeEnd("ctx");
  5003. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5004. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)});
  5005. //>>excludeEnd("ctx");
  5006. }),(function(){
  5007. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5008. return $core.withContext(function($ctx2) {
  5009. //>>excludeEnd("ctx");
  5010. return $recv($self["@stream"])._nextPutAll_(",");
  5011. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5012. $ctx2.sendIdx["nextPutAll:"]=9;
  5013. //>>excludeEnd("ctx");
  5014. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5015. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  5016. //>>excludeEnd("ctx");
  5017. }));
  5018. $20=$self["@stream"];
  5019. $recv($20)._nextPutAll_("]");
  5020. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5021. $ctx1.sendIdx["nextPutAll:"]=10;
  5022. //>>excludeEnd("ctx");
  5023. $recv($20)._nextPutAll_("})");
  5024. return self;
  5025. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5026. }, function($ctx1) {$ctx1.fill(self,"nextPutMethodDeclaration:with:",{aMethod:aMethod,aBlock:aBlock},$globals.JSStream)});
  5027. //>>excludeEnd("ctx");
  5028. },
  5029. //>>excludeStart("ide", pragmas.excludeIdeData);
  5030. args: ["aMethod", "aBlock"],
  5031. source: "nextPutMethodDeclaration: aMethod with: aBlock\x0a\x09stream\x0a\x09\x09nextPutAll: '$core.method({'; lf;\x0a\x09\x09nextPutAll: 'selector: ', aMethod selector asJavaScriptSource, ','; lf;\x0a\x09\x09nextPutAll: 'source: ', aMethod source asJavaScriptSource, ',';lf.\x0a\x09aBlock value.\x0a\x09stream\x0a\x09\x09nextPutAll: ',', String lf, 'messageSends: ';\x0a\x09\x09nextPutAll: aMethod messageSends asArray asJavaScriptSource, ','; lf;\x0a\x09\x09nextPutAll: 'args: ', (aMethod arguments collect: [ :each | each value ]) asArray asJavaScriptSource, ','; lf;\x0a\x09\x09nextPutAll: 'referencedClasses: ['.\x0a\x09aMethod classReferences\x0a\x09\x09do: [ :each | stream nextPutAll: each asJavaScriptSource ]\x0a\x09\x09separatedBy: [ stream nextPutAll: ',' ].\x0a\x09stream\x0a\x09\x09nextPutAll: ']';\x0a\x09\x09nextPutAll: '})'",
  5032. referencedClasses: ["String"],
  5033. //>>excludeEnd("ide");
  5034. messageSends: ["nextPutAll:", "lf", ",", "asJavaScriptSource", "selector", "source", "value", "asArray", "messageSends", "collect:", "arguments", "do:separatedBy:", "classReferences"]
  5035. }),
  5036. $globals.JSStream);
  5037. $core.addMethod(
  5038. $core.method({
  5039. selector: "nextPutNonLocalReturnHandlingWith:",
  5040. protocol: "streaming",
  5041. fn: function (aBlock){
  5042. var self=this,$self=this;
  5043. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5044. return $core.withContext(function($ctx1) {
  5045. //>>excludeEnd("ctx");
  5046. var $1,$2,$3;
  5047. $1=$self["@stream"];
  5048. $recv($1)._nextPutAll_("var $early={};");
  5049. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5050. $ctx1.sendIdx["nextPutAll:"]=1;
  5051. //>>excludeEnd("ctx");
  5052. $recv($1)._lf();
  5053. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5054. $ctx1.sendIdx["lf"]=1;
  5055. //>>excludeEnd("ctx");
  5056. $recv($1)._nextPutAll_("try {");
  5057. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5058. $ctx1.sendIdx["nextPutAll:"]=2;
  5059. //>>excludeEnd("ctx");
  5060. $2=$recv($1)._lf();
  5061. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5062. $ctx1.sendIdx["lf"]=2;
  5063. //>>excludeEnd("ctx");
  5064. $recv(aBlock)._value();
  5065. $3=$self["@stream"];
  5066. $recv($3)._nextPutAll_("}");
  5067. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5068. $ctx1.sendIdx["nextPutAll:"]=3;
  5069. //>>excludeEnd("ctx");
  5070. $recv($3)._lf();
  5071. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5072. $ctx1.sendIdx["lf"]=3;
  5073. //>>excludeEnd("ctx");
  5074. $recv($3)._nextPutAll_("catch(e) {if(e===$early)return e[0]; throw e}");
  5075. $recv($3)._lf();
  5076. return self;
  5077. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5078. }, function($ctx1) {$ctx1.fill(self,"nextPutNonLocalReturnHandlingWith:",{aBlock:aBlock},$globals.JSStream)});
  5079. //>>excludeEnd("ctx");
  5080. },
  5081. //>>excludeStart("ide", pragmas.excludeIdeData);
  5082. args: ["aBlock"],
  5083. source: "nextPutNonLocalReturnHandlingWith: aBlock\x0a\x09stream\x0a\x09\x09nextPutAll: 'var $early={};'; lf;\x0a\x09\x09nextPutAll: 'try {'; lf.\x0a\x09aBlock value.\x0a\x09stream\x0a\x09\x09nextPutAll: '}'; lf;\x0a\x09\x09nextPutAll: 'catch(e) {if(e===$early)return e[0]; throw e}'; lf",
  5084. referencedClasses: [],
  5085. //>>excludeEnd("ide");
  5086. messageSends: ["nextPutAll:", "lf", "value"]
  5087. }),
  5088. $globals.JSStream);
  5089. $core.addMethod(
  5090. $core.method({
  5091. selector: "nextPutNonLocalReturnWith:",
  5092. protocol: "streaming",
  5093. fn: function (aBlock){
  5094. var self=this,$self=this;
  5095. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5096. return $core.withContext(function($ctx1) {
  5097. //>>excludeEnd("ctx");
  5098. $recv($self["@stream"])._nextPutAll_("throw $early=[");
  5099. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5100. $ctx1.sendIdx["nextPutAll:"]=1;
  5101. //>>excludeEnd("ctx");
  5102. $recv(aBlock)._value();
  5103. $recv($self["@stream"])._nextPutAll_("]");
  5104. return self;
  5105. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5106. }, function($ctx1) {$ctx1.fill(self,"nextPutNonLocalReturnWith:",{aBlock:aBlock},$globals.JSStream)});
  5107. //>>excludeEnd("ctx");
  5108. },
  5109. //>>excludeStart("ide", pragmas.excludeIdeData);
  5110. args: ["aBlock"],
  5111. source: "nextPutNonLocalReturnWith: aBlock\x0a\x09stream nextPutAll: 'throw $early=['.\x0a\x09aBlock value.\x0a\x09stream nextPutAll: ']'",
  5112. referencedClasses: [],
  5113. //>>excludeEnd("ide");
  5114. messageSends: ["nextPutAll:", "value"]
  5115. }),
  5116. $globals.JSStream);
  5117. $core.addMethod(
  5118. $core.method({
  5119. selector: "nextPutReturnWith:",
  5120. protocol: "streaming",
  5121. fn: function (aBlock){
  5122. var self=this,$self=this;
  5123. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5124. return $core.withContext(function($ctx1) {
  5125. //>>excludeEnd("ctx");
  5126. $recv($self["@stream"])._nextPutAll_("return ");
  5127. $recv(aBlock)._value();
  5128. return self;
  5129. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5130. }, function($ctx1) {$ctx1.fill(self,"nextPutReturnWith:",{aBlock:aBlock},$globals.JSStream)});
  5131. //>>excludeEnd("ctx");
  5132. },
  5133. //>>excludeStart("ide", pragmas.excludeIdeData);
  5134. args: ["aBlock"],
  5135. source: "nextPutReturnWith: aBlock\x0a\x09stream nextPutAll: 'return '.\x0a\x09aBlock value",
  5136. referencedClasses: [],
  5137. //>>excludeEnd("ide");
  5138. messageSends: ["nextPutAll:", "value"]
  5139. }),
  5140. $globals.JSStream);
  5141. $core.addMethod(
  5142. $core.method({
  5143. selector: "nextPutSendIndexFor:",
  5144. protocol: "streaming",
  5145. fn: function (anIRSend){
  5146. var self=this,$self=this;
  5147. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5148. return $core.withContext(function($ctx1) {
  5149. //>>excludeEnd("ctx");
  5150. $self._nextPutAll_(";");
  5151. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5152. $ctx1.sendIdx["nextPutAll:"]=1;
  5153. //>>excludeEnd("ctx");
  5154. $self._lf();
  5155. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5156. $ctx1.sendIdx["lf"]=1;
  5157. //>>excludeEnd("ctx");
  5158. $self._nextPutAll_("//>>excludeStart(\x22ctx\x22, pragmas.excludeDebugContexts);");
  5159. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5160. $ctx1.sendIdx["nextPutAll:"]=2;
  5161. //>>excludeEnd("ctx");
  5162. $self._lf();
  5163. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5164. $ctx1.sendIdx["lf"]=2;
  5165. //>>excludeEnd("ctx");
  5166. $self._nextPutAll_($recv($recv(anIRSend)._scope())._alias());
  5167. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5168. $ctx1.sendIdx["nextPutAll:"]=3;
  5169. //>>excludeEnd("ctx");
  5170. $self._nextPutAll_(".sendIdx[");
  5171. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5172. $ctx1.sendIdx["nextPutAll:"]=4;
  5173. //>>excludeEnd("ctx");
  5174. $self._nextPutAll_($recv($recv(anIRSend)._selector())._asJavaScriptSource());
  5175. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5176. $ctx1.sendIdx["nextPutAll:"]=5;
  5177. //>>excludeEnd("ctx");
  5178. $self._nextPutAll_("]=");
  5179. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5180. $ctx1.sendIdx["nextPutAll:"]=6;
  5181. //>>excludeEnd("ctx");
  5182. $self._nextPutAll_($recv($recv(anIRSend)._index())._asString());
  5183. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5184. $ctx1.sendIdx["nextPutAll:"]=7;
  5185. //>>excludeEnd("ctx");
  5186. $self._nextPutAll_(";");
  5187. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5188. $ctx1.sendIdx["nextPutAll:"]=8;
  5189. //>>excludeEnd("ctx");
  5190. $self._lf();
  5191. $self._nextPutAll_("//>>excludeEnd(\x22ctx\x22)");
  5192. return self;
  5193. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5194. }, function($ctx1) {$ctx1.fill(self,"nextPutSendIndexFor:",{anIRSend:anIRSend},$globals.JSStream)});
  5195. //>>excludeEnd("ctx");
  5196. },
  5197. //>>excludeStart("ide", pragmas.excludeIdeData);
  5198. args: ["anIRSend"],
  5199. source: "nextPutSendIndexFor: anIRSend\x0a\x09self \x0a\x09\x09nextPutAll: ';'; lf;\x0a\x09\x09nextPutAll: '//>>excludeStart(\x22ctx\x22, pragmas.excludeDebugContexts);'; lf;\x0a\x09\x09nextPutAll: anIRSend scope alias;\x0a\x09\x09nextPutAll: '.sendIdx[';\x0a\x09\x09nextPutAll: anIRSend selector asJavaScriptSource;\x0a\x09\x09nextPutAll: ']=';\x0a\x09\x09nextPutAll: anIRSend index asString;\x0a\x09\x09nextPutAll: ';'; lf;\x0a\x09\x09nextPutAll: '//>>excludeEnd(\x22ctx\x22)'",
  5200. referencedClasses: [],
  5201. //>>excludeEnd("ide");
  5202. messageSends: ["nextPutAll:", "lf", "alias", "scope", "asJavaScriptSource", "selector", "asString", "index"]
  5203. }),
  5204. $globals.JSStream);
  5205. $core.addMethod(
  5206. $core.method({
  5207. selector: "nextPutStatementWith:",
  5208. protocol: "streaming",
  5209. fn: function (aBlock){
  5210. var self=this,$self=this;
  5211. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5212. return $core.withContext(function($ctx1) {
  5213. //>>excludeEnd("ctx");
  5214. var $1;
  5215. $self._omitSemicolon_(false);
  5216. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5217. $ctx1.sendIdx["omitSemicolon:"]=1;
  5218. //>>excludeEnd("ctx");
  5219. $recv(aBlock)._value();
  5220. $1=$self._omitSemicolon();
  5221. if(!$core.assert($1)){
  5222. $recv($self["@stream"])._nextPutAll_(";");
  5223. }
  5224. $self._omitSemicolon_(false);
  5225. $recv($self["@stream"])._lf();
  5226. return self;
  5227. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5228. }, function($ctx1) {$ctx1.fill(self,"nextPutStatementWith:",{aBlock:aBlock},$globals.JSStream)});
  5229. //>>excludeEnd("ctx");
  5230. },
  5231. //>>excludeStart("ide", pragmas.excludeIdeData);
  5232. args: ["aBlock"],
  5233. source: "nextPutStatementWith: aBlock\x0a\x09self omitSemicolon: false.\x0a\x09aBlock value.\x0a\x09self omitSemicolon ifFalse: [ stream nextPutAll: ';' ].\x0a\x09self omitSemicolon: false.\x0a\x09stream lf",
  5234. referencedClasses: [],
  5235. //>>excludeEnd("ide");
  5236. messageSends: ["omitSemicolon:", "value", "ifFalse:", "omitSemicolon", "nextPutAll:", "lf"]
  5237. }),
  5238. $globals.JSStream);
  5239. $core.addMethod(
  5240. $core.method({
  5241. selector: "nextPutVars:",
  5242. protocol: "streaming",
  5243. fn: function (aCollection){
  5244. var self=this,$self=this;
  5245. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5246. return $core.withContext(function($ctx1) {
  5247. //>>excludeEnd("ctx");
  5248. var $1;
  5249. $recv(aCollection)._ifNotEmpty_((function(){
  5250. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5251. return $core.withContext(function($ctx2) {
  5252. //>>excludeEnd("ctx");
  5253. $recv($self["@stream"])._nextPutAll_("var ");
  5254. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5255. $ctx2.sendIdx["nextPutAll:"]=1;
  5256. //>>excludeEnd("ctx");
  5257. $recv(aCollection)._do_separatedBy_((function(each){
  5258. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5259. return $core.withContext(function($ctx3) {
  5260. //>>excludeEnd("ctx");
  5261. return $recv($self["@stream"])._nextPutAll_(each);
  5262. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5263. $ctx3.sendIdx["nextPutAll:"]=2;
  5264. //>>excludeEnd("ctx");
  5265. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5266. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)});
  5267. //>>excludeEnd("ctx");
  5268. }),(function(){
  5269. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5270. return $core.withContext(function($ctx3) {
  5271. //>>excludeEnd("ctx");
  5272. return $recv($self["@stream"])._nextPutAll_(",");
  5273. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5274. $ctx3.sendIdx["nextPutAll:"]=3;
  5275. //>>excludeEnd("ctx");
  5276. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5277. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  5278. //>>excludeEnd("ctx");
  5279. }));
  5280. $1=$self["@stream"];
  5281. $recv($1)._nextPutAll_(";");
  5282. return $recv($1)._lf();
  5283. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5284. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  5285. //>>excludeEnd("ctx");
  5286. }));
  5287. return self;
  5288. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5289. }, function($ctx1) {$ctx1.fill(self,"nextPutVars:",{aCollection:aCollection},$globals.JSStream)});
  5290. //>>excludeEnd("ctx");
  5291. },
  5292. //>>excludeStart("ide", pragmas.excludeIdeData);
  5293. args: ["aCollection"],
  5294. source: "nextPutVars: aCollection\x0a\x09aCollection ifNotEmpty: [\x0a\x09\x09stream nextPutAll: 'var '.\x0a\x09\x09aCollection\x0a\x09\x09\x09do: [ :each | stream nextPutAll: each ]\x0a\x09\x09\x09separatedBy: [ stream nextPutAll: ',' ].\x0a\x09\x09stream nextPutAll: ';'; lf ]",
  5295. referencedClasses: [],
  5296. //>>excludeEnd("ide");
  5297. messageSends: ["ifNotEmpty:", "nextPutAll:", "do:separatedBy:", "lf"]
  5298. }),
  5299. $globals.JSStream);
  5300. $core.addMethod(
  5301. $core.method({
  5302. selector: "omitSemicolon",
  5303. protocol: "accessing",
  5304. fn: function (){
  5305. var self=this,$self=this;
  5306. return $self["@omitSemicolon"];
  5307. },
  5308. //>>excludeStart("ide", pragmas.excludeIdeData);
  5309. args: [],
  5310. source: "omitSemicolon\x0a\x09^ omitSemicolon",
  5311. referencedClasses: [],
  5312. //>>excludeEnd("ide");
  5313. messageSends: []
  5314. }),
  5315. $globals.JSStream);
  5316. $core.addMethod(
  5317. $core.method({
  5318. selector: "omitSemicolon:",
  5319. protocol: "accessing",
  5320. fn: function (aBoolean){
  5321. var self=this,$self=this;
  5322. $self["@omitSemicolon"]=aBoolean;
  5323. return self;
  5324. },
  5325. //>>excludeStart("ide", pragmas.excludeIdeData);
  5326. args: ["aBoolean"],
  5327. source: "omitSemicolon: aBoolean\x0a\x09omitSemicolon := aBoolean",
  5328. referencedClasses: [],
  5329. //>>excludeEnd("ide");
  5330. messageSends: []
  5331. }),
  5332. $globals.JSStream);
  5333. $core.addMethod(
  5334. $core.method({
  5335. selector: "isReferenced",
  5336. protocol: "*Compiler-IR",
  5337. fn: function (){
  5338. var self=this,$self=this;
  5339. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5340. return $core.withContext(function($ctx1) {
  5341. //>>excludeEnd("ctx");
  5342. var $3,$2,$1;
  5343. $3=$self._parent();
  5344. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5345. $ctx1.sendIdx["parent"]=1;
  5346. //>>excludeEnd("ctx");
  5347. $2=$recv($3)._isSequenceNode();
  5348. $1=$recv($2)._or_((function(){
  5349. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5350. return $core.withContext(function($ctx2) {
  5351. //>>excludeEnd("ctx");
  5352. return $recv($self._parent())._isAssignmentNode();
  5353. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5354. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  5355. //>>excludeEnd("ctx");
  5356. }));
  5357. return $recv($1)._not();
  5358. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5359. }, function($ctx1) {$ctx1.fill(self,"isReferenced",{},$globals.ASTNode)});
  5360. //>>excludeEnd("ctx");
  5361. },
  5362. //>>excludeStart("ide", pragmas.excludeIdeData);
  5363. args: [],
  5364. source: "isReferenced\x0a\x09\x22Answer true if the receiver is referenced by other nodes.\x0a\x09Do not take sequences or assignments into account\x22\x0a\x09\x0a\x09^ (self parent isSequenceNode or: [\x0a\x09\x09self parent isAssignmentNode ]) not",
  5365. referencedClasses: [],
  5366. //>>excludeEnd("ide");
  5367. messageSends: ["not", "or:", "isSequenceNode", "parent", "isAssignmentNode"]
  5368. }),
  5369. $globals.ASTNode);
  5370. $core.addMethod(
  5371. $core.method({
  5372. selector: "subtreeNeedsAliasing",
  5373. protocol: "*Compiler-IR",
  5374. fn: function (){
  5375. var self=this,$self=this;
  5376. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5377. return $core.withContext(function($ctx1) {
  5378. //>>excludeEnd("ctx");
  5379. return $recv($self._shouldBeAliased())._or_((function(){
  5380. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5381. return $core.withContext(function($ctx2) {
  5382. //>>excludeEnd("ctx");
  5383. return $recv($self._dagChildren())._anySatisfy_((function(each){
  5384. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5385. return $core.withContext(function($ctx3) {
  5386. //>>excludeEnd("ctx");
  5387. return $recv(each)._subtreeNeedsAliasing();
  5388. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5389. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)});
  5390. //>>excludeEnd("ctx");
  5391. }));
  5392. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5393. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  5394. //>>excludeEnd("ctx");
  5395. }));
  5396. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5397. }, function($ctx1) {$ctx1.fill(self,"subtreeNeedsAliasing",{},$globals.ASTNode)});
  5398. //>>excludeEnd("ctx");
  5399. },
  5400. //>>excludeStart("ide", pragmas.excludeIdeData);
  5401. args: [],
  5402. source: "subtreeNeedsAliasing\x0a\x09^ self shouldBeAliased or: [\x0a\x09\x09self dagChildren anySatisfy: [ :each | each subtreeNeedsAliasing ] ]",
  5403. referencedClasses: [],
  5404. //>>excludeEnd("ide");
  5405. messageSends: ["or:", "shouldBeAliased", "anySatisfy:", "dagChildren", "subtreeNeedsAliasing"]
  5406. }),
  5407. $globals.ASTNode);
  5408. $core.addMethod(
  5409. $core.method({
  5410. selector: "shouldBeAliased",
  5411. protocol: "*Compiler-IR",
  5412. fn: function (){
  5413. var self=this,$self=this;
  5414. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5415. return $core.withContext(function($ctx1) {
  5416. //>>excludeEnd("ctx");
  5417. var $1;
  5418. $1=(
  5419. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5420. $ctx1.supercall = true,
  5421. //>>excludeEnd("ctx");
  5422. ($globals.AssignmentNode.superclass||$boot.nilAsClass).fn.prototype._shouldBeAliased.apply($self, []));
  5423. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5424. $ctx1.supercall = false;
  5425. //>>excludeEnd("ctx");;
  5426. return $recv($1)._or_((function(){
  5427. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5428. return $core.withContext(function($ctx2) {
  5429. //>>excludeEnd("ctx");
  5430. return $self._isReferenced();
  5431. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5432. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  5433. //>>excludeEnd("ctx");
  5434. }));
  5435. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5436. }, function($ctx1) {$ctx1.fill(self,"shouldBeAliased",{},$globals.AssignmentNode)});
  5437. //>>excludeEnd("ctx");
  5438. },
  5439. //>>excludeStart("ide", pragmas.excludeIdeData);
  5440. args: [],
  5441. source: "shouldBeAliased\x0a\x09^ super shouldBeAliased or: [ self isReferenced ]",
  5442. referencedClasses: [],
  5443. //>>excludeEnd("ide");
  5444. messageSends: ["or:", "shouldBeAliased", "isReferenced"]
  5445. }),
  5446. $globals.AssignmentNode);
  5447. $core.addMethod(
  5448. $core.method({
  5449. selector: "appendToInstruction:",
  5450. protocol: "*Compiler-IR",
  5451. fn: function (anIRInstruction){
  5452. var self=this,$self=this;
  5453. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5454. return $core.withContext(function($ctx1) {
  5455. //>>excludeEnd("ctx");
  5456. $recv(anIRInstruction)._appendBlock_(self);
  5457. return self;
  5458. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5459. }, function($ctx1) {$ctx1.fill(self,"appendToInstruction:",{anIRInstruction:anIRInstruction},$globals.BlockClosure)});
  5460. //>>excludeEnd("ctx");
  5461. },
  5462. //>>excludeStart("ide", pragmas.excludeIdeData);
  5463. args: ["anIRInstruction"],
  5464. source: "appendToInstruction: anIRInstruction\x0a\x09anIRInstruction appendBlock: self",
  5465. referencedClasses: [],
  5466. //>>excludeEnd("ide");
  5467. messageSends: ["appendBlock:"]
  5468. }),
  5469. $globals.BlockClosure);
  5470. $core.addMethod(
  5471. $core.method({
  5472. selector: "subtreeNeedsAliasing",
  5473. protocol: "*Compiler-IR",
  5474. fn: function (){
  5475. var self=this,$self=this;
  5476. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5477. return $core.withContext(function($ctx1) {
  5478. //>>excludeEnd("ctx");
  5479. return $self._shouldBeAliased();
  5480. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5481. }, function($ctx1) {$ctx1.fill(self,"subtreeNeedsAliasing",{},$globals.BlockNode)});
  5482. //>>excludeEnd("ctx");
  5483. },
  5484. //>>excludeStart("ide", pragmas.excludeIdeData);
  5485. args: [],
  5486. source: "subtreeNeedsAliasing\x0a\x09^ self shouldBeAliased",
  5487. referencedClasses: [],
  5488. //>>excludeEnd("ide");
  5489. messageSends: ["shouldBeAliased"]
  5490. }),
  5491. $globals.BlockNode);
  5492. $core.addMethod(
  5493. $core.method({
  5494. selector: "subtreeNeedsAliasing",
  5495. protocol: "*Compiler-IR",
  5496. fn: function (){
  5497. var self=this,$self=this;
  5498. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5499. return $core.withContext(function($ctx1) {
  5500. //>>excludeEnd("ctx");
  5501. return $recv($recv($self._parent())._isSequenceNode())._not();
  5502. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5503. }, function($ctx1) {$ctx1.fill(self,"subtreeNeedsAliasing",{},$globals.CascadeNode)});
  5504. //>>excludeEnd("ctx");
  5505. },
  5506. //>>excludeStart("ide", pragmas.excludeIdeData);
  5507. args: [],
  5508. source: "subtreeNeedsAliasing\x0a\x09^ self parent isSequenceNode not",
  5509. referencedClasses: [],
  5510. //>>excludeEnd("ide");
  5511. messageSends: ["not", "isSequenceNode", "parent"]
  5512. }),
  5513. $globals.CascadeNode);
  5514. $core.addMethod(
  5515. $core.method({
  5516. selector: "shouldBeAliased",
  5517. protocol: "*Compiler-IR",
  5518. fn: function (){
  5519. var self=this,$self=this;
  5520. var sends;
  5521. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5522. return $core.withContext(function($ctx1) {
  5523. //>>excludeEnd("ctx");
  5524. var $2,$1;
  5525. sends=$recv($recv($recv($self._method())._sendIndexes())._at_($self._selector()))._size();
  5526. $2=(
  5527. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5528. $ctx1.supercall = true,
  5529. //>>excludeEnd("ctx");
  5530. ($globals.SendNode.superclass||$boot.nilAsClass).fn.prototype._shouldBeAliased.apply($self, []));
  5531. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5532. $ctx1.supercall = false;
  5533. //>>excludeEnd("ctx");;
  5534. $1=$recv($2)._or_((function(){
  5535. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5536. return $core.withContext(function($ctx2) {
  5537. //>>excludeEnd("ctx");
  5538. return $recv($self._isReferenced())._and_((function(){
  5539. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5540. return $core.withContext(function($ctx3) {
  5541. //>>excludeEnd("ctx");
  5542. return $recv($recv($self._index()).__lt(sends))._or_((function(){
  5543. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5544. return $core.withContext(function($ctx4) {
  5545. //>>excludeEnd("ctx");
  5546. return $self._superSend();
  5547. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5548. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)});
  5549. //>>excludeEnd("ctx");
  5550. }));
  5551. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5552. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  5553. //>>excludeEnd("ctx");
  5554. }));
  5555. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5556. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  5557. //>>excludeEnd("ctx");
  5558. }));
  5559. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5560. $ctx1.sendIdx["or:"]=1;
  5561. //>>excludeEnd("ctx");
  5562. return $1;
  5563. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5564. }, function($ctx1) {$ctx1.fill(self,"shouldBeAliased",{sends:sends},$globals.SendNode)});
  5565. //>>excludeEnd("ctx");
  5566. },
  5567. //>>excludeStart("ide", pragmas.excludeIdeData);
  5568. args: [],
  5569. source: "shouldBeAliased\x0a\x09\x22Because we keep track of send indexes, some send nodes need additional care for aliasing. \x0a\x09See IRJSVisitor >> visitIRSend:\x22\x0a\x09\x0a\x09| sends |\x0a\x09\x0a\x09sends := (self method sendIndexes at: self selector) size.\x0a\x09\x0a\x09^ (super shouldBeAliased or: [\x0a\x09\x09self isReferenced and: [\x0a\x09\x09\x09self index < sends or: [\x0a\x09\x09\x09\x09self superSend ] ] ])",
  5570. referencedClasses: [],
  5571. //>>excludeEnd("ide");
  5572. messageSends: ["size", "at:", "sendIndexes", "method", "selector", "or:", "shouldBeAliased", "and:", "isReferenced", "<", "index", "superSend"]
  5573. }),
  5574. $globals.SendNode);
  5575. $core.addMethod(
  5576. $core.method({
  5577. selector: "subtreeNeedsAliasing",
  5578. protocol: "*Compiler-IR",
  5579. fn: function (){
  5580. var self=this,$self=this;
  5581. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5582. return $core.withContext(function($ctx1) {
  5583. //>>excludeEnd("ctx");
  5584. return $recv($self._shouldBeInlined())._or_((function(){
  5585. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5586. return $core.withContext(function($ctx2) {
  5587. //>>excludeEnd("ctx");
  5588. return (
  5589. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5590. $ctx2.supercall = true,
  5591. //>>excludeEnd("ctx");
  5592. ($globals.SendNode.superclass||$boot.nilAsClass).fn.prototype._subtreeNeedsAliasing.apply($self, []));
  5593. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5594. $ctx2.supercall = false;
  5595. //>>excludeEnd("ctx");;
  5596. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5597. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  5598. //>>excludeEnd("ctx");
  5599. }));
  5600. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5601. }, function($ctx1) {$ctx1.fill(self,"subtreeNeedsAliasing",{},$globals.SendNode)});
  5602. //>>excludeEnd("ctx");
  5603. },
  5604. //>>excludeStart("ide", pragmas.excludeIdeData);
  5605. args: [],
  5606. source: "subtreeNeedsAliasing\x0a\x09^ self shouldBeInlined or: [ super subtreeNeedsAliasing ]",
  5607. referencedClasses: [],
  5608. //>>excludeEnd("ide");
  5609. messageSends: ["or:", "shouldBeInlined", "subtreeNeedsAliasing"]
  5610. }),
  5611. $globals.SendNode);
  5612. });