Compiler-IR.js 197 KB

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