1
0

Compiler-IR.js 196 KB

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