1
0

Compiler-IR.js 196 KB

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