Compiler-IR.js 197 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152
  1. define("amber_core/Compiler-IR", ["amber/boot", "amber_core/Compiler-Core", "amber_core/Kernel-Objects", "amber_core/Kernel-Methods"], function($boot){
  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;
  5780. var $early={};
  5781. try {
  5782. $recv(aCollection)._ifEmpty_((function(){
  5783. throw $early=[self];
  5784. }));
  5785. $recv(self["@stream"])._nextPutAll_("var ");
  5786. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5787. $ctx1.sendIdx["nextPutAll:"]=1;
  5788. //>>excludeEnd("ctx");
  5789. $recv(aCollection)._do_separatedBy_((function(each){
  5790. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5791. return $core.withContext(function($ctx2) {
  5792. //>>excludeEnd("ctx");
  5793. return $recv(self["@stream"])._nextPutAll_(each);
  5794. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5795. $ctx2.sendIdx["nextPutAll:"]=2;
  5796. //>>excludeEnd("ctx");
  5797. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5798. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)});
  5799. //>>excludeEnd("ctx");
  5800. }),(function(){
  5801. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5802. return $core.withContext(function($ctx2) {
  5803. //>>excludeEnd("ctx");
  5804. return $recv(self["@stream"])._nextPutAll_(",");
  5805. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5806. $ctx2.sendIdx["nextPutAll:"]=3;
  5807. //>>excludeEnd("ctx");
  5808. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5809. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  5810. //>>excludeEnd("ctx");
  5811. }));
  5812. $1=self["@stream"];
  5813. $recv($1)._nextPutAll_(";");
  5814. $2=$recv($1)._lf();
  5815. return self;
  5816. }
  5817. catch(e) {if(e===$early)return e[0]; throw e}
  5818. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5819. }, function($ctx1) {$ctx1.fill(self,"nextPutVars:",{aCollection:aCollection},$globals.JSStream)});
  5820. //>>excludeEnd("ctx");
  5821. },
  5822. //>>excludeStart("ide", pragmas.excludeIdeData);
  5823. args: ["aCollection"],
  5824. source: "nextPutVars: aCollection\x0a\x09aCollection ifEmpty: [ ^ 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",
  5825. referencedClasses: [],
  5826. //>>excludeEnd("ide");
  5827. messageSends: ["ifEmpty:", "nextPutAll:", "do:separatedBy:", "lf"]
  5828. }),
  5829. $globals.JSStream);
  5830. $core.addMethod(
  5831. $core.method({
  5832. selector: "appendToInstruction:",
  5833. protocol: '*Compiler-IR',
  5834. fn: function (anIRInstruction){
  5835. var self=this;
  5836. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5837. return $core.withContext(function($ctx1) {
  5838. //>>excludeEnd("ctx");
  5839. $recv(anIRInstruction)._appendBlock_(self);
  5840. return self;
  5841. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5842. }, function($ctx1) {$ctx1.fill(self,"appendToInstruction:",{anIRInstruction:anIRInstruction},$globals.BlockClosure)});
  5843. //>>excludeEnd("ctx");
  5844. },
  5845. //>>excludeStart("ide", pragmas.excludeIdeData);
  5846. args: ["anIRInstruction"],
  5847. source: "appendToInstruction: anIRInstruction\x0a\x09anIRInstruction appendBlock: self",
  5848. referencedClasses: [],
  5849. //>>excludeEnd("ide");
  5850. messageSends: ["appendBlock:"]
  5851. }),
  5852. $globals.BlockClosure);
  5853. });