1
0

Compiler-IR.js 192 KB

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