Compiler.js 617 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858
  1. smalltalk.addPackage('Compiler', {});
  2. smalltalk.addClass('ChunkParser', smalltalk.Object, ['stream'], 'Compiler');
  3. smalltalk.addClass('Compiler', smalltalk.Object, ['currentClass', 'source', 'unknownVariables', 'codeGeneratorClass'], 'Compiler');
  4. smalltalk.Compiler.comment="I provide the public interface for compiling Amber source code into JavaScript.\x0a\x0aThe code generator used to produce JavaScript can be plugged with `#codeGeneratorClass`. \x0aThe default code generator is an instance of `InlinedCodeGenerator`"
  5. smalltalk.addClass('CompilerError', smalltalk.Error, [], 'Compiler');
  6. smalltalk.CompilerError.comment="I am the common superclass of all compiling errors."
  7. smalltalk.addClass('ParseError', smalltalk.CompilerError, [], 'Compiler');
  8. smalltalk.ParseError.comment="Instance of ParseError are signaled on any parsing error. \x0aSee `Smalltalk >> #parse:`"
  9. smalltalk.addClass('SemanticError', smalltalk.CompilerError, [], 'Compiler');
  10. smalltalk.SemanticError.comment="I represent an abstract semantic error thrown by the SemanticAnalyzer.\x0aSemantic errors can be unknown variable errors, etc.\x0aSee my subclasses for concrete errors.\x0a\x0aThe IDE should catch instances of Semantic error to deal with them when compiling"
  11. smalltalk.addClass('InliningError', smalltalk.SemanticError, [], 'Compiler');
  12. smalltalk.InliningError.comment="Instances of InliningError are signaled when using an `InliningCodeGenerator`in a `Compiler`."
  13. smalltalk.addClass('InvalidAssignmentError', smalltalk.SemanticError, ['variableName'], 'Compiler');
  14. smalltalk.InvalidAssignmentError.comment="I get signaled when a pseudo variable gets assigned."
  15. smalltalk.addClass('ShadowingVariableError', smalltalk.SemanticError, ['variableName'], 'Compiler');
  16. smalltalk.ShadowingVariableError.comment="I get signaled when a variable in a block or method scope shadows a variable of the same name in an outer scope."
  17. smalltalk.addClass('UnknownVariableError', smalltalk.SemanticError, ['variableName'], 'Compiler');
  18. smalltalk.UnknownVariableError.comment="I get signaled when a variable is not defined.\x0aThe default behavior is to allow it, as this is how Amber currently is able to seamlessly send messages to JavaScript objects."
  19. smalltalk.addClass('DoIt', smalltalk.Object, [], 'Compiler');
  20. smalltalk.DoIt.comment="`DoIt` is the class used to compile and evaluate expressions. See `Compiler >> evaluateExpression:`."
  21. smalltalk.addClass('Exporter', smalltalk.Object, [], 'Compiler');
  22. smalltalk.addClass('ChunkExporter', smalltalk.Exporter, [], 'Compiler');
  23. smalltalk.addClass('StrippedExporter', smalltalk.Exporter, [], 'Compiler');
  24. smalltalk.addClass('IRInstruction', smalltalk.Object, ['parent', 'instructions'], 'Compiler');
  25. smalltalk.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."
  26. smalltalk.addClass('IRAssignment', smalltalk.IRInstruction, [], 'Compiler');
  27. smalltalk.addClass('IRInlinedAssignment', smalltalk.IRAssignment, [], 'Compiler');
  28. smalltalk.IRInlinedAssignment.comment="I represent an inlined assignment instruction."
  29. smalltalk.addClass('IRDynamicArray', smalltalk.IRInstruction, [], 'Compiler');
  30. smalltalk.addClass('IRDynamicDictionary', smalltalk.IRInstruction, [], 'Compiler');
  31. smalltalk.addClass('IRScopedInstruction', smalltalk.IRInstruction, ['scope'], 'Compiler');
  32. smalltalk.addClass('IRClosure', smalltalk.IRScopedInstruction, ['arguments'], 'Compiler');
  33. smalltalk.addClass('IRInlinedClosure', smalltalk.IRClosure, [], 'Compiler');
  34. smalltalk.IRInlinedClosure.comment="I represent an inlined closure instruction."
  35. smalltalk.addClass('IRMethod', smalltalk.IRScopedInstruction, ['theClass', 'source', 'selector', 'classReferences', 'messageSends', 'superSends', 'arguments', 'internalVariables'], 'Compiler');
  36. smalltalk.IRMethod.comment="I am a method instruction"
  37. smalltalk.addClass('IRReturn', smalltalk.IRScopedInstruction, [], 'Compiler');
  38. smalltalk.IRReturn.comment="I am a local return instruction."
  39. smalltalk.addClass('IRBlockReturn', smalltalk.IRReturn, [], 'Compiler');
  40. smalltalk.IRBlockReturn.comment="Smalltalk blocks return their last statement. I am a implicit block return instruction."
  41. smalltalk.addClass('IRInlinedReturn', smalltalk.IRReturn, [], 'Compiler');
  42. smalltalk.IRInlinedReturn.comment="I represent an inlined local return instruction."
  43. smalltalk.addClass('IRInlinedNonLocalReturn', smalltalk.IRInlinedReturn, [], 'Compiler');
  44. smalltalk.IRInlinedNonLocalReturn.comment="I represent an inlined non local return instruction."
  45. smalltalk.addClass('IRNonLocalReturn', smalltalk.IRReturn, [], 'Compiler');
  46. smalltalk.IRNonLocalReturn.comment="I am a non local return instruction.\x0aNon local returns are handled using a try/catch JS statement.\x0a\x0aSee IRNonLocalReturnHandling class"
  47. smalltalk.addClass('IRTempDeclaration', smalltalk.IRScopedInstruction, ['name'], 'Compiler');
  48. smalltalk.addClass('IRSend', smalltalk.IRInstruction, ['selector', 'classSend', 'index'], 'Compiler');
  49. smalltalk.IRSend.comment="I am a message send instruction."
  50. smalltalk.addClass('IRInlinedSend', smalltalk.IRSend, [], 'Compiler');
  51. smalltalk.IRInlinedSend.comment="I am the abstract super class of inlined message send instructions."
  52. smalltalk.addClass('IRInlinedIfFalse', smalltalk.IRInlinedSend, [], 'Compiler');
  53. smalltalk.addClass('IRInlinedIfNilIfNotNil', smalltalk.IRInlinedSend, [], 'Compiler');
  54. smalltalk.addClass('IRInlinedIfTrue', smalltalk.IRInlinedSend, [], 'Compiler');
  55. smalltalk.addClass('IRInlinedIfTrueIfFalse', smalltalk.IRInlinedSend, [], 'Compiler');
  56. smalltalk.addClass('IRSequence', smalltalk.IRInstruction, [], 'Compiler');
  57. smalltalk.addClass('IRBlockSequence', smalltalk.IRSequence, [], 'Compiler');
  58. smalltalk.addClass('IRInlinedSequence', smalltalk.IRBlockSequence, [], 'Compiler');
  59. smalltalk.IRInlinedSequence.comment="I represent a (block) sequence inside an inlined closure instruction (instance of `IRInlinedClosure`)."
  60. smalltalk.addClass('IRValue', smalltalk.IRInstruction, ['value'], 'Compiler');
  61. smalltalk.IRValue.comment="I am the simplest possible instruction. I represent a value."
  62. smalltalk.addClass('IRVariable', smalltalk.IRInstruction, ['variable'], 'Compiler');
  63. smalltalk.IRVariable.comment="I am a variable instruction."
  64. smalltalk.addClass('IRVerbatim', smalltalk.IRInstruction, ['source'], 'Compiler');
  65. smalltalk.addClass('IRSendInliner', smalltalk.Object, ['send', 'translator'], 'Compiler');
  66. smalltalk.IRSendInliner.comment="I inline some message sends and block closure arguments. I heavily rely on #perform: to dispatch inlining methods."
  67. smalltalk.addClass('IRAssignmentInliner', smalltalk.IRSendInliner, ['assignment'], 'Compiler');
  68. smalltalk.IRAssignmentInliner.comment="I inline message sends together with assignments by moving them around into the inline closure instructions. \x0a\x0a##Example\x0a\x0a\x09foo\x0a\x09\x09| a |\x0a\x09\x09a := true ifTrue: [ 1 ]\x0a\x0aWill produce:\x0a\x0a\x09if(smalltalk.assert(true) {\x0a\x09\x09a = 1;\x0a\x09};"
  69. smalltalk.addClass('IRNonLocalReturnInliner', smalltalk.IRSendInliner, [], 'Compiler');
  70. smalltalk.addClass('IRReturnInliner', smalltalk.IRSendInliner, [], 'Compiler');
  71. smalltalk.IRReturnInliner.comment="I inline message sends with inlined closure together with a return instruction."
  72. smalltalk.addClass('IRVisitor', smalltalk.Object, [], 'Compiler');
  73. smalltalk.addClass('IRInliner', smalltalk.IRVisitor, [], 'Compiler');
  74. smalltalk.IRInliner.comment="I visit an IR tree, inlining message sends and block closures.\x0a\x0aMessage selectors that can be inlined are answered by `IRSendInliner >> #inlinedSelectors`"
  75. smalltalk.addClass('IRJSTranslator', smalltalk.IRVisitor, ['stream'], 'Compiler');
  76. smalltalk.addClass('IRInliningJSTranslator', smalltalk.IRJSTranslator, [], 'Compiler');
  77. smalltalk.IRInliningJSTranslator.comment="I am a specialized JavaScript translator able to write inlined IR instructions to JavaScript stream (`JSStream` instance)."
  78. smalltalk.addClass('Importer', smalltalk.Object, [], 'Compiler');
  79. smalltalk.addClass('JSStream', smalltalk.Object, ['stream'], 'Compiler');
  80. smalltalk.addClass('LexicalScope', smalltalk.Object, ['node', 'instruction', 'temps', 'args', 'outerScope'], 'Compiler');
  81. smalltalk.LexicalScope.comment="I represent a lexical scope where variable names are associated with ScopeVars\x0aInstances are used for block scopes. Method scopes are instances of MethodLexicalScope.\x0a\x0aI am attached to a ScopeVar and method/block nodes.\x0aEach context (method/closure) get a fresh scope that inherits from its outer scope."
  82. smalltalk.addClass('MethodLexicalScope', smalltalk.LexicalScope, ['iVars', 'pseudoVars', 'unknownVariables', 'localReturn', 'nonLocalReturns'], 'Compiler');
  83. smalltalk.MethodLexicalScope.comment="I represent a method scope."
  84. smalltalk.addClass('Node', smalltalk.Object, ['position', 'nodes', 'shouldBeInlined', 'shouldBeAliased'], 'Compiler');
  85. smalltalk.Node.comment="I am the abstract root class of the abstract syntax tree.\x0a\x0aposition: holds a point containing lline- and column number of the symbol location in the original source file"
  86. smalltalk.addClass('AssignmentNode', smalltalk.Node, ['left', 'right'], 'Compiler');
  87. smalltalk.addClass('BlockNode', smalltalk.Node, ['parameters', 'scope'], 'Compiler');
  88. smalltalk.addMethod(
  89. "_inlined",
  90. smalltalk.method({
  91. selector: "inlined",
  92. category: 'accessing',
  93. fn: function () {
  94. var self=this;
  95. return (($receiver = self['@inlined']) == nil || $receiver == undefined) ? (function(){return false;})() : $receiver;
  96. return self;},
  97. args: [],
  98. source: "inlined\x0a\x09^inlined ifNil: [false]",
  99. messageSends: ["ifNil:"],
  100. referencedClasses: []
  101. }),
  102. smalltalk.BlockNode);
  103. smalltalk.addMethod(
  104. "_inlined_",
  105. smalltalk.method({
  106. selector: "inlined:",
  107. category: 'accessing',
  108. fn: function (aBoolean) {
  109. var self=this;
  110. (self['@inlined']=aBoolean);
  111. return self;},
  112. args: ["aBoolean"],
  113. source: "inlined: aBoolean\x0a\x09inlined := aBoolean",
  114. messageSends: [],
  115. referencedClasses: []
  116. }),
  117. smalltalk.BlockNode);
  118. smalltalk.addClass('CascadeNode', smalltalk.Node, ['receiver'], 'Compiler');
  119. smalltalk.addClass('DynamicArrayNode', smalltalk.Node, [], 'Compiler');
  120. smalltalk.addClass('DynamicDictionaryNode', smalltalk.Node, [], 'Compiler');
  121. smalltalk.addClass('JSStatementNode', smalltalk.Node, ['source'], 'Compiler');
  122. smalltalk.addClass('MethodNode', smalltalk.Node, ['selector', 'arguments', 'source', 'scope', 'classReferences', 'messageSends', 'superSends'], 'Compiler');
  123. smalltalk.addClass('ReturnNode', smalltalk.Node, ['scope'], 'Compiler');
  124. smalltalk.addClass('SendNode', smalltalk.Node, ['selector', 'arguments', 'receiver', 'superSend', 'index'], 'Compiler');
  125. smalltalk.addClass('SequenceNode', smalltalk.Node, ['temps', 'scope'], 'Compiler');
  126. smalltalk.addClass('BlockSequenceNode', smalltalk.SequenceNode, [], 'Compiler');
  127. smalltalk.addClass('ValueNode', smalltalk.Node, ['value'], 'Compiler');
  128. smalltalk.addClass('VariableNode', smalltalk.ValueNode, ['assigned', 'binding'], 'Compiler');
  129. smalltalk.addClass('ClassReferenceNode', smalltalk.VariableNode, [], 'Compiler');
  130. smalltalk.addClass('VerbatimNode', smalltalk.Node, ['value'], 'Compiler');
  131. smalltalk.addMethod(
  132. "_accept_",
  133. smalltalk.method({
  134. selector: "accept:",
  135. category: 'visiting',
  136. fn: function (aVisitor) {
  137. var self=this;
  138. smalltalk.send(aVisitor, "_visitVerbatimNode_", [self]);
  139. return self;},
  140. args: ["aVisitor"],
  141. source: "accept: aVisitor\x0a\x09aVisitor visitVerbatimNode: self",
  142. messageSends: ["visitVerbatimNode:"],
  143. referencedClasses: []
  144. }),
  145. smalltalk.VerbatimNode);
  146. smalltalk.addMethod(
  147. "_value",
  148. smalltalk.method({
  149. selector: "value",
  150. category: 'accessing',
  151. fn: function () {
  152. var self=this;
  153. return self['@value'];
  154. return self;},
  155. args: [],
  156. source: "value\x0a\x09^value",
  157. messageSends: [],
  158. referencedClasses: []
  159. }),
  160. smalltalk.VerbatimNode);
  161. smalltalk.addMethod(
  162. "_value_",
  163. smalltalk.method({
  164. selector: "value:",
  165. category: 'accessing',
  166. fn: function (anObject) {
  167. var self=this;
  168. (self['@value']=anObject);
  169. return self;},
  170. args: ["anObject"],
  171. source: "value: anObject\x0a\x09value := anObject",
  172. messageSends: [],
  173. referencedClasses: []
  174. }),
  175. smalltalk.VerbatimNode);
  176. smalltalk.addClass('NodeVisitor', smalltalk.Object, [], 'Compiler');
  177. smalltalk.NodeVisitor.comment="I am the abstract super class of all AST node visitors."
  178. smalltalk.addMethod(
  179. "_visitVerbatimNode_",
  180. smalltalk.method({
  181. selector: "visitVerbatimNode:",
  182. category: 'visiting',
  183. fn: function (aNode) {
  184. var self=this;
  185. smalltalk.send(self, "_visitNode_", [aNode]);
  186. return self;},
  187. args: ["aNode"],
  188. source: "visitVerbatimNode: aNode\x0a\x09self visitNode: aNode",
  189. messageSends: ["visitNode:"],
  190. referencedClasses: []
  191. }),
  192. smalltalk.NodeVisitor);
  193. smalltalk.addClass('AIContext', smalltalk.NodeVisitor, ['outerContext', 'pc', 'locals', 'receiver', 'selector'], 'Compiler');
  194. smalltalk.addClass('ASTInterpreter', smalltalk.NodeVisitor, ['currentNode', 'context', 'shouldReturn'], 'Compiler');
  195. smalltalk.addClass('AbstractCodeGenerator', smalltalk.NodeVisitor, ['currentClass', 'source'], 'Compiler');
  196. smalltalk.AbstractCodeGenerator.comment="I am the abstract super class of all code generators and provide their common API."
  197. smalltalk.addClass('CodeGenerator', smalltalk.AbstractCodeGenerator, [], 'Compiler');
  198. smalltalk.CodeGenerator.comment="I am a basic code generator. I generate a valid JavaScript output, but no not perform any inlining.\x0aSee `InliningCodeGenerator` for an optimized JavaScript code generation."
  199. smalltalk.addClass('InliningCodeGenerator', smalltalk.CodeGenerator, [], 'Compiler');
  200. smalltalk.InliningCodeGenerator.comment="I am a specialized code generator that uses inlining to produce more optimized JavaScript output"
  201. smalltalk.addClass('FunCodeGenerator', smalltalk.AbstractCodeGenerator, ['stream', 'nestedBlocks', 'earlyReturn', 'currentSelector', 'unknownVariables', 'tempVariables', 'messageSends', 'referencedClasses', 'classReferenced', 'argVariables'], 'Compiler');
  202. smalltalk.addMethod(
  203. "_argVariables",
  204. smalltalk.method({
  205. selector: "argVariables",
  206. category: 'accessing',
  207. fn: function () {
  208. var self=this;
  209. return smalltalk.send(self['@argVariables'], "_copy", []);
  210. return self;},
  211. args: [],
  212. source: "argVariables\x0a\x09^argVariables copy",
  213. messageSends: ["copy"],
  214. referencedClasses: []
  215. }),
  216. smalltalk.FunCodeGenerator);
  217. smalltalk.addMethod(
  218. "_checkClass_for_",
  219. smalltalk.method({
  220. selector: "checkClass:for:",
  221. category: 'optimizations',
  222. fn: function (aClassName, receiver) {
  223. var self=this;
  224. smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("((($receiver = ", "__comma", [receiver]), "__comma", [").klass === smalltalk."]), "__comma", [aClassName]), "__comma", [") ? "])]);
  225. return self;},
  226. args: ["aClassName", "receiver"],
  227. source: "checkClass: aClassName for: receiver\x0a stream nextPutAll: '((($receiver = ', receiver, ').klass === smalltalk.', aClassName, ') ? '",
  228. messageSends: ["nextPutAll:", ","],
  229. referencedClasses: []
  230. }),
  231. smalltalk.FunCodeGenerator);
  232. smalltalk.addMethod(
  233. "_compileNode_",
  234. smalltalk.method({
  235. selector: "compileNode:",
  236. category: 'compiling',
  237. fn: function (aNode) {
  238. var self=this;
  239. (self['@stream']=smalltalk.send("", "_writeStream", []));
  240. smalltalk.send(self, "_visit_", [aNode]);
  241. return smalltalk.send(self['@stream'], "_contents", []);
  242. return self;},
  243. args: ["aNode"],
  244. source: "compileNode: aNode\x0a\x09stream := '' writeStream.\x0a\x09self visit: aNode.\x0a\x09^stream contents",
  245. messageSends: ["writeStream", "visit:", "contents"],
  246. referencedClasses: []
  247. }),
  248. smalltalk.FunCodeGenerator);
  249. smalltalk.addMethod(
  250. "_initialize",
  251. smalltalk.method({
  252. selector: "initialize",
  253. category: 'initialization',
  254. fn: function () {
  255. var self=this;
  256. smalltalk.send(self, "_initialize", [], smalltalk.FunCodeGenerator.superclass || nil);
  257. (self['@stream']=smalltalk.send("", "_writeStream", []));
  258. (self['@unknownVariables']=[]);
  259. (self['@tempVariables']=[]);
  260. (self['@argVariables']=[]);
  261. (self['@messageSends']=[]);
  262. (self['@classReferenced']=[]);
  263. return self;},
  264. args: [],
  265. source: "initialize\x0a\x09super initialize.\x0a\x09stream := '' writeStream. \x0a\x09unknownVariables := #().\x0a\x09tempVariables := #().\x0a\x09argVariables := #().\x0a\x09messageSends := #().\x0a\x09classReferenced := #()",
  266. messageSends: ["initialize", "writeStream"],
  267. referencedClasses: []
  268. }),
  269. smalltalk.FunCodeGenerator);
  270. smalltalk.addMethod(
  271. "_inline_receiver_argumentNodes_",
  272. smalltalk.method({
  273. selector: "inline:receiver:argumentNodes:",
  274. category: 'optimizations',
  275. fn: function (aSelector, receiver, aCollection) {
  276. var self=this;
  277. var inlined=nil;
  278. (inlined=false);
  279. ((($receiver = smalltalk.send(aSelector, "__eq", ["ifFalse:"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_checkClass_for_", ["Boolean", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", ["(! $receiver ? "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["() : nil)"]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_checkClass_for_", ["Boolean", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", ["(! $receiver ? "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["() : nil)"]);return (inlined=true);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_checkClass_for_", ["Boolean", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", ["(! $receiver ? "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["() : nil)"]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_checkClass_for_", ["Boolean", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", ["(! $receiver ? "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["() : nil)"]);return (inlined=true);})]));})]));
  280. ((($receiver = smalltalk.send(aSelector, "__eq", ["ifTrue:"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_checkClass_for_", ["Boolean", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", ["($receiver ? "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["() : nil)"]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_checkClass_for_", ["Boolean", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", ["($receiver ? "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["() : nil)"]);return (inlined=true);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_checkClass_for_", ["Boolean", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", ["($receiver ? "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["() : nil)"]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_checkClass_for_", ["Boolean", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", ["($receiver ? "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["() : nil)"]);return (inlined=true);})]));})]));
  281. ((($receiver = smalltalk.send(aSelector, "__eq", ["ifTrue:ifFalse:"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", []), "_and_", [(function(){return smalltalk.send(smalltalk.send(aCollection, "_second", []), "_isBlockNode", []);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_checkClass_for_", ["Boolean", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", ["($receiver ? "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["() : "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_second", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["())"]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_checkClass_for_", ["Boolean", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", ["($receiver ? "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["() : "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_second", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["())"]);return (inlined=true);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", []), "_and_", [(function(){return smalltalk.send(smalltalk.send(aCollection, "_second", []), "_isBlockNode", []);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_checkClass_for_", ["Boolean", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", ["($receiver ? "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["() : "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_second", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["())"]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_checkClass_for_", ["Boolean", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", ["($receiver ? "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["() : "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_second", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["())"]);return (inlined=true);})]));})]));
  282. ((($receiver = smalltalk.send(aSelector, "__eq", ["ifFalse:ifTrue:"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", []), "_and_", [(function(){return smalltalk.send(smalltalk.send(aCollection, "_second", []), "_isBlockNode", []);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_checkClass_for_", ["Boolean", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", ["(! $receiver ? "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["() : "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_second", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["())"]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_checkClass_for_", ["Boolean", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", ["(! $receiver ? "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["() : "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_second", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["())"]);return (inlined=true);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", []), "_and_", [(function(){return smalltalk.send(smalltalk.send(aCollection, "_second", []), "_isBlockNode", []);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_checkClass_for_", ["Boolean", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", ["(! $receiver ? "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["() : "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_second", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["())"]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_checkClass_for_", ["Boolean", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", ["(! $receiver ? "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["() : "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_second", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["())"]);return (inlined=true);})]));})]));
  283. ((($receiver = smalltalk.send(aSelector, "__eq", ["<"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_checkClass_for_", ["Number", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", ["$receiver <"]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_checkClass_for_", ["Number", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", ["$receiver <"]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})]));
  284. ((($receiver = smalltalk.send(aSelector, "__eq", ["<="])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_checkClass_for_", ["Number", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", ["$receiver <="]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_checkClass_for_", ["Number", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", ["$receiver <="]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})]));
  285. ((($receiver = smalltalk.send(aSelector, "__eq", [">"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_checkClass_for_", ["Number", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", ["$receiver >"]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_checkClass_for_", ["Number", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", ["$receiver >"]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})]));
  286. ((($receiver = smalltalk.send(aSelector, "__eq", [">="])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_checkClass_for_", ["Number", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", ["$receiver >="]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_checkClass_for_", ["Number", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", ["$receiver >="]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})]));
  287. ((($receiver = smalltalk.send(aSelector, "__eq", ["+"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_checkClass_for_", ["Number", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", ["$receiver +"]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_checkClass_for_", ["Number", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", ["$receiver +"]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})]));
  288. ((($receiver = smalltalk.send(aSelector, "__eq", ["-"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_checkClass_for_", ["Number", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", ["$receiver -"]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_checkClass_for_", ["Number", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", ["$receiver -"]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})]));
  289. ((($receiver = smalltalk.send(aSelector, "__eq", ["*"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_checkClass_for_", ["Number", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", ["$receiver *"]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_checkClass_for_", ["Number", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", ["$receiver *"]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})]));
  290. ((($receiver = smalltalk.send(aSelector, "__eq", ["/"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_checkClass_for_", ["Number", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", ["$receiver /"]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_checkClass_for_", ["Number", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", ["$receiver /"]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})]));
  291. return inlined;
  292. return self;},
  293. args: ["aSelector", "receiver", "aCollection"],
  294. source: "inline: aSelector receiver: receiver argumentNodes: aCollection\x0a | inlined |\x0a inlined := false.\x0a\x0a\x09\x22-- Booleans --\x22\x0a\x0a\x09(aSelector = 'ifFalse:') ifTrue: [\x0a\x09\x09aCollection first isBlockNode ifTrue: [\x0a \x09self checkClass: 'Boolean' for: receiver.\x0a \x09stream nextPutAll: '(! $receiver ? '.\x0a \x09self visit: aCollection first.\x0a \x09\x09stream nextPutAll: '() : nil)'.\x0a \x09inlined := true]].\x0a\x0a\x09(aSelector = 'ifTrue:') ifTrue: [\x0a\x09\x09aCollection first isBlockNode ifTrue: [\x0a \x09self checkClass: 'Boolean' for: receiver.\x0a \x09stream nextPutAll: '($receiver ? '.\x0a \x09self visit: aCollection first.\x0a \x09\x09stream nextPutAll: '() : nil)'.\x0a \x09inlined := true]].\x0a\x0a\x09(aSelector = 'ifTrue:ifFalse:') ifTrue: [\x0a\x09\x09(aCollection first isBlockNode and: [aCollection second isBlockNode]) ifTrue: [\x0a \x09self checkClass: 'Boolean' for: receiver.\x0a \x09stream nextPutAll: '($receiver ? '.\x0a \x09self visit: aCollection first.\x0a \x09\x09stream nextPutAll: '() : '.\x0a \x09\x09self visit: aCollection second.\x0a \x09\x09stream nextPutAll: '())'.\x0a \x09inlined := true]].\x0a\x0a\x09(aSelector = 'ifFalse:ifTrue:') ifTrue: [\x0a\x09\x09(aCollection first isBlockNode and: [aCollection second isBlockNode]) ifTrue: [\x0a \x09self checkClass: 'Boolean' for: receiver.\x0a \x09stream nextPutAll: '(! $receiver ? '.\x0a \x09self visit: aCollection first.\x0a \x09\x09stream nextPutAll: '() : '.\x0a \x09\x09self visit: aCollection second.\x0a \x09\x09stream nextPutAll: '())'.\x0a \x09inlined := true]].\x0a\x0a\x09\x22-- Numbers --\x22\x0a\x0a\x09(aSelector = '<') ifTrue: [\x0a self checkClass: 'Number' for: receiver.\x0a stream nextPutAll: '$receiver <'.\x0a self visit: aCollection first.\x0a inlined := true].\x0a\x0a\x09(aSelector = '<=') ifTrue: [\x0a self checkClass: 'Number' for: receiver.\x0a stream nextPutAll: '$receiver <='.\x0a self visit: aCollection first.\x0a inlined := true].\x0a\x0a\x09(aSelector = '>') ifTrue: [ \x0a self checkClass: 'Number' for: receiver.\x0a stream nextPutAll: '$receiver >'.\x0a self visit: aCollection first.\x0a inlined := true].\x0a\x0a\x09(aSelector = '>=') ifTrue: [\x0a self checkClass: 'Number' for: receiver.\x0a stream nextPutAll: '$receiver >='.\x0a self visit: aCollection first.\x0a inlined := true].\x0a\x0a (aSelector = '+') ifTrue: [\x0a self checkClass: 'Number' for: receiver.\x0a stream nextPutAll: '$receiver +'.\x0a self visit: aCollection first.\x0a inlined := true].\x0a\x0a (aSelector = '-') ifTrue: [\x0a self checkClass: 'Number' for: receiver.\x0a stream nextPutAll: '$receiver -'.\x0a self visit: aCollection first.\x0a inlined := true].\x0a\x0a (aSelector = '*') ifTrue: [\x0a self checkClass: 'Number' for: receiver.\x0a stream nextPutAll: '$receiver *'.\x0a self visit: aCollection first.\x0a inlined := true].\x0a\x0a (aSelector = '/') ifTrue: [\x0a self checkClass: 'Number' for: receiver.\x0a stream nextPutAll: '$receiver /'.\x0a self visit: aCollection first.\x0a inlined := true].\x0a\x0a ^inlined",
  295. messageSends: ["ifTrue:", "=", "isBlockNode", "first", "checkClass:for:", "nextPutAll:", "visit:", "and:", "second"],
  296. referencedClasses: []
  297. }),
  298. smalltalk.FunCodeGenerator);
  299. smalltalk.addMethod(
  300. "_inlineLiteral_receiverNode_argumentNodes_",
  301. smalltalk.method({
  302. selector: "inlineLiteral:receiverNode:argumentNodes:",
  303. category: 'optimizations',
  304. fn: function (aSelector, anObject, aCollection) {
  305. var self=this;
  306. var inlined=nil;
  307. (inlined=false);
  308. ((($receiver = smalltalk.send(aSelector, "__eq", ["whileTrue:"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(smalltalk.send(anObject, "_isBlockNode", []), "_and_", [(function(){return smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", []);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self['@stream'], "_nextPutAll_", ["(function(){while("]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", ["()) {"]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["()}})()"]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self['@stream'], "_nextPutAll_", ["(function(){while("]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", ["()) {"]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["()}})()"]);return (inlined=true);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(smalltalk.send(anObject, "_isBlockNode", []), "_and_", [(function(){return smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", []);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self['@stream'], "_nextPutAll_", ["(function(){while("]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", ["()) {"]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["()}})()"]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self['@stream'], "_nextPutAll_", ["(function(){while("]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", ["()) {"]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["()}})()"]);return (inlined=true);})]));})]));
  309. ((($receiver = smalltalk.send(aSelector, "__eq", ["whileFalse:"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(smalltalk.send(anObject, "_isBlockNode", []), "_and_", [(function(){return smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", []);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self['@stream'], "_nextPutAll_", ["(function(){while(!"]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", ["()) {"]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["()}})()"]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self['@stream'], "_nextPutAll_", ["(function(){while(!"]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", ["()) {"]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["()}})()"]);return (inlined=true);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(smalltalk.send(anObject, "_isBlockNode", []), "_and_", [(function(){return smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", []);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self['@stream'], "_nextPutAll_", ["(function(){while(!"]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", ["()) {"]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["()}})()"]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self['@stream'], "_nextPutAll_", ["(function(){while(!"]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", ["()) {"]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["()}})()"]);return (inlined=true);})]));})]));
  310. ((($receiver = smalltalk.send(aSelector, "__eq", ["whileTrue"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(anObject, "_isBlockNode", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self['@stream'], "_nextPutAll_", ["(function(){while("]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", ["()) {}})()"]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self['@stream'], "_nextPutAll_", ["(function(){while("]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", ["()) {}})()"]);return (inlined=true);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(anObject, "_isBlockNode", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self['@stream'], "_nextPutAll_", ["(function(){while("]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", ["()) {}})()"]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self['@stream'], "_nextPutAll_", ["(function(){while("]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", ["()) {}})()"]);return (inlined=true);})]));})]));
  311. ((($receiver = smalltalk.send(aSelector, "__eq", ["whileFalse"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(anObject, "_isBlockNode", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self['@stream'], "_nextPutAll_", ["(function(){while(!"]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", ["()) {}})()"]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self['@stream'], "_nextPutAll_", ["(function(){while(!"]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", ["()) {}})()"]);return (inlined=true);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(anObject, "_isBlockNode", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self['@stream'], "_nextPutAll_", ["(function(){while(!"]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", ["()) {}})()"]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self['@stream'], "_nextPutAll_", ["(function(){while(!"]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", ["()) {}})()"]);return (inlined=true);})]));})]));
  312. ((($receiver = smalltalk.send(aSelector, "__eq", ["+"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(self, "_isNode_ofClass_", [anObject, (smalltalk.Number || Number)])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [" + "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [" + "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(self, "_isNode_ofClass_", [anObject, (smalltalk.Number || Number)])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [" + "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [" + "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})]));})]));
  313. ((($receiver = smalltalk.send(aSelector, "__eq", ["-"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(self, "_isNode_ofClass_", [anObject, (smalltalk.Number || Number)])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [" - "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [" - "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(self, "_isNode_ofClass_", [anObject, (smalltalk.Number || Number)])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [" - "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [" - "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})]));})]));
  314. ((($receiver = smalltalk.send(aSelector, "__eq", ["*"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(self, "_isNode_ofClass_", [anObject, (smalltalk.Number || Number)])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [" * "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [" * "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(self, "_isNode_ofClass_", [anObject, (smalltalk.Number || Number)])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [" * "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [" * "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})]));})]));
  315. ((($receiver = smalltalk.send(aSelector, "__eq", ["/"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(self, "_isNode_ofClass_", [anObject, (smalltalk.Number || Number)])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [" / "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [" / "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(self, "_isNode_ofClass_", [anObject, (smalltalk.Number || Number)])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [" / "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [" / "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})]));})]));
  316. ((($receiver = smalltalk.send(aSelector, "__eq", ["<"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(self, "_isNode_ofClass_", [anObject, (smalltalk.Number || Number)])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [" < "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [" < "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(self, "_isNode_ofClass_", [anObject, (smalltalk.Number || Number)])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [" < "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [" < "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})]));})]));
  317. ((($receiver = smalltalk.send(aSelector, "__eq", ["<="])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(self, "_isNode_ofClass_", [anObject, (smalltalk.Number || Number)])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [" <= "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [" <= "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(self, "_isNode_ofClass_", [anObject, (smalltalk.Number || Number)])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [" <= "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [" <= "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})]));})]));
  318. ((($receiver = smalltalk.send(aSelector, "__eq", [">"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(self, "_isNode_ofClass_", [anObject, (smalltalk.Number || Number)])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [" > "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [" > "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(self, "_isNode_ofClass_", [anObject, (smalltalk.Number || Number)])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [" > "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [" > "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})]));})]));
  319. ((($receiver = smalltalk.send(aSelector, "__eq", [">="])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(self, "_isNode_ofClass_", [anObject, (smalltalk.Number || Number)])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [" >= "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [" >= "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(self, "_isNode_ofClass_", [anObject, (smalltalk.Number || Number)])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [" >= "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [" >= "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})]));})]));
  320. ((($receiver = smalltalk.send(aSelector, "__eq", ["ifNil:"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self['@stream'], "_nextPutAll_", ["(($receiver = "]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [") == nil || $receiver == undefined) ? "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["() : $receiver"]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self['@stream'], "_nextPutAll_", ["(($receiver = "]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [") == nil || $receiver == undefined) ? "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["() : $receiver"]);return (inlined=true);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self['@stream'], "_nextPutAll_", ["(($receiver = "]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [") == nil || $receiver == undefined) ? "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["() : $receiver"]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self['@stream'], "_nextPutAll_", ["(($receiver = "]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [") == nil || $receiver == undefined) ? "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["() : $receiver"]);return (inlined=true);})]));})]));
  321. ((($receiver = smalltalk.send(aSelector, "__eq", ["ifNotNil:"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self['@stream'], "_nextPutAll_", ["(($receiver = "]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [") != nil && $receiver != undefined) ? "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["() : nil"]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self['@stream'], "_nextPutAll_", ["(($receiver = "]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [") != nil && $receiver != undefined) ? "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["() : nil"]);return (inlined=true);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self['@stream'], "_nextPutAll_", ["(($receiver = "]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [") != nil && $receiver != undefined) ? "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["() : nil"]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self['@stream'], "_nextPutAll_", ["(($receiver = "]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [") != nil && $receiver != undefined) ? "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["() : nil"]);return (inlined=true);})]));})]));
  322. ((($receiver = smalltalk.send(aSelector, "__eq", ["ifNil:ifNotNil:"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", []), "_and_", [(function(){return smalltalk.send(smalltalk.send(aCollection, "_second", []), "_isBlockNode", []);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self['@stream'], "_nextPutAll_", ["(($receiver = "]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [") == nil || $receiver == undefined) ? "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["() : "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_second", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["()"]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self['@stream'], "_nextPutAll_", ["(($receiver = "]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [") == nil || $receiver == undefined) ? "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["() : "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_second", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["()"]);return (inlined=true);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", []), "_and_", [(function(){return smalltalk.send(smalltalk.send(aCollection, "_second", []), "_isBlockNode", []);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self['@stream'], "_nextPutAll_", ["(($receiver = "]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [") == nil || $receiver == undefined) ? "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["() : "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_second", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["()"]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self['@stream'], "_nextPutAll_", ["(($receiver = "]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [") == nil || $receiver == undefined) ? "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["() : "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_second", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["()"]);return (inlined=true);})]));})]));
  323. ((($receiver = smalltalk.send(aSelector, "__eq", ["ifNotNil:ifNil:"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", []), "_and_", [(function(){return smalltalk.send(smalltalk.send(aCollection, "_second", []), "_isBlockNode", []);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self['@stream'], "_nextPutAll_", ["(($receiver = "]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [") == nil || $receiver == undefined) ? "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_second", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["() : "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["()"]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self['@stream'], "_nextPutAll_", ["(($receiver = "]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [") == nil || $receiver == undefined) ? "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_second", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["() : "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["()"]);return (inlined=true);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", []), "_and_", [(function(){return smalltalk.send(smalltalk.send(aCollection, "_second", []), "_isBlockNode", []);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self['@stream'], "_nextPutAll_", ["(($receiver = "]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [") == nil || $receiver == undefined) ? "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_second", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["() : "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["()"]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self['@stream'], "_nextPutAll_", ["(($receiver = "]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [") == nil || $receiver == undefined) ? "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_second", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["() : "]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", ["()"]);return (inlined=true);})]));})]));
  324. return inlined;
  325. return self;},
  326. args: ["aSelector", "anObject", "aCollection"],
  327. source: "inlineLiteral: aSelector receiverNode: anObject argumentNodes: aCollection\x0a | inlined |\x0a inlined := false.\x0a \x0a\x09\x22-- BlockClosures --\x22\x0a\x0a\x09(aSelector = 'whileTrue:') ifTrue: [\x0a \x09(anObject isBlockNode and: [aCollection first isBlockNode]) ifTrue: [\x0a \x09stream nextPutAll: '(function(){while('.\x0a \x09self visit: anObject.\x0a \x09stream nextPutAll: '()) {'.\x0a \x09self visit: aCollection first.\x0a \x09\x09stream nextPutAll: '()}})()'.\x0a \x09inlined := true]].\x0a\x0a\x09(aSelector = 'whileFalse:') ifTrue: [\x0a \x09(anObject isBlockNode and: [aCollection first isBlockNode]) ifTrue: [\x0a \x09stream nextPutAll: '(function(){while(!'.\x0a \x09self visit: anObject.\x0a \x09stream nextPutAll: '()) {'.\x0a \x09self visit: aCollection first.\x0a \x09\x09stream nextPutAll: '()}})()'.\x0a \x09inlined := true]].\x0a\x0a\x09(aSelector = 'whileTrue') ifTrue: [\x0a \x09anObject isBlockNode ifTrue: [\x0a \x09stream nextPutAll: '(function(){while('.\x0a \x09self visit: anObject.\x0a \x09stream nextPutAll: '()) {}})()'.\x0a \x09inlined := true]].\x0a\x0a\x09(aSelector = 'whileFalse') ifTrue: [\x0a \x09anObject isBlockNode ifTrue: [\x0a \x09stream nextPutAll: '(function(){while(!'.\x0a \x09self visit: anObject.\x0a \x09stream nextPutAll: '()) {}})()'.\x0a \x09inlined := true]].\x0a\x0a\x09\x22-- Numbers --\x22\x0a\x0a\x09(aSelector = '+') ifTrue: [\x0a \x09(self isNode: anObject ofClass: Number) ifTrue: [\x0a \x09self visit: anObject.\x0a \x09stream nextPutAll: ' + '.\x0a \x09self visit: aCollection first.\x0a \x09inlined := true]].\x0a\x0a\x09(aSelector = '-') ifTrue: [\x0a \x09(self isNode: anObject ofClass: Number) ifTrue: [\x0a \x09self visit: anObject.\x0a \x09stream nextPutAll: ' - '.\x0a \x09self visit: aCollection first.\x0a \x09inlined := true]].\x0a\x0a\x09(aSelector = '*') ifTrue: [\x0a \x09(self isNode: anObject ofClass: Number) ifTrue: [\x0a \x09self visit: anObject.\x0a \x09stream nextPutAll: ' * '.\x0a \x09self visit: aCollection first.\x0a \x09inlined := true]].\x0a\x0a\x09(aSelector = '/') ifTrue: [\x0a \x09(self isNode: anObject ofClass: Number) ifTrue: [\x0a \x09self visit: anObject.\x0a \x09stream nextPutAll: ' / '.\x0a \x09self visit: aCollection first.\x0a \x09inlined := true]].\x0a\x0a\x09(aSelector = '<') ifTrue: [\x0a \x09(self isNode: anObject ofClass: Number) ifTrue: [\x0a \x09self visit: anObject.\x0a \x09stream nextPutAll: ' < '.\x0a \x09self visit: aCollection first.\x0a \x09inlined := true]].\x0a\x0a\x09(aSelector = '<=') ifTrue: [\x0a \x09(self isNode: anObject ofClass: Number) ifTrue: [\x0a \x09self visit: anObject.\x0a \x09stream nextPutAll: ' <= '.\x0a \x09self visit: aCollection first.\x0a \x09inlined := true]].\x0a\x0a\x09(aSelector = '>') ifTrue: [\x0a \x09(self isNode: anObject ofClass: Number) ifTrue: [\x0a \x09self visit: anObject.\x0a \x09stream nextPutAll: ' > '.\x0a \x09self visit: aCollection first.\x0a \x09inlined := true]].\x0a\x0a\x09(aSelector = '>=') ifTrue: [\x0a \x09(self isNode: anObject ofClass: Number) ifTrue: [\x0a \x09self visit: anObject.\x0a \x09stream nextPutAll: ' >= '.\x0a \x09self visit: aCollection first.\x0a \x09inlined := true]].\x0a \x09 \x0a\x09\x22-- UndefinedObject --\x22\x0a\x0a\x09(aSelector = 'ifNil:') ifTrue: [\x0a\x09\x09aCollection first isBlockNode ifTrue: [\x0a \x09\x09stream nextPutAll: '(($receiver = '.\x0a \x09\x09self visit: anObject.\x0a \x09\x09stream nextPutAll: ') == nil || $receiver == undefined) ? '.\x0a \x09self visit: aCollection first.\x0a \x09stream nextPutAll: '() : $receiver'.\x0a \x09inlined := true]].\x0a\x0a\x09(aSelector = 'ifNotNil:') ifTrue: [\x0a\x09\x09aCollection first isBlockNode ifTrue: [\x0a \x09\x09stream nextPutAll: '(($receiver = '.\x0a \x09\x09self visit: anObject.\x0a \x09\x09stream nextPutAll: ') != nil && $receiver != undefined) ? '.\x0a \x09self visit: aCollection first.\x0a \x09stream nextPutAll: '() : nil'.\x0a \x09inlined := true]].\x0a\x0a\x09(aSelector = 'ifNil:ifNotNil:') ifTrue: [\x0a\x09\x09(aCollection first isBlockNode and: [aCollection second isBlockNode]) ifTrue: [\x0a \x09\x09stream nextPutAll: '(($receiver = '.\x0a \x09\x09self visit: anObject.\x0a \x09\x09stream nextPutAll: ') == nil || $receiver == undefined) ? '.\x0a \x09self visit: aCollection first.\x0a \x09stream nextPutAll: '() : '.\x0a \x09self visit: aCollection second.\x0a \x09stream nextPutAll: '()'.\x0a \x09inlined := true]].\x0a\x0a\x09(aSelector = 'ifNotNil:ifNil:') ifTrue: [\x0a\x09\x09(aCollection first isBlockNode and: [aCollection second isBlockNode]) ifTrue: [\x0a \x09\x09stream nextPutAll: '(($receiver = '.\x0a \x09\x09self visit: anObject.\x0a \x09\x09stream nextPutAll: ') == nil || $receiver == undefined) ? '.\x0a \x09self visit: aCollection second.\x0a \x09stream nextPutAll: '() : '.\x0a \x09self visit: aCollection first.\x0a \x09stream nextPutAll: '()'.\x0a \x09inlined := true]].\x0a \x0a ^inlined",
  328. messageSends: ["ifTrue:", "=", "and:", "isBlockNode", "first", "nextPutAll:", "visit:", "isNode:ofClass:", "second"],
  329. referencedClasses: ["Number"]
  330. }),
  331. smalltalk.FunCodeGenerator);
  332. smalltalk.addMethod(
  333. "_isNode_ofClass_",
  334. smalltalk.method({
  335. selector: "isNode:ofClass:",
  336. category: 'optimizations',
  337. fn: function (aNode, aClass) {
  338. var self=this;
  339. return smalltalk.send(smalltalk.send(aNode, "_isValueNode", []), "_and_", [(function(){return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aNode, "_value", []), "_class", []), "__eq", [aClass]), "_or_", [(function(){return smalltalk.send(smalltalk.send(smalltalk.send(aNode, "_value", []), "__eq", ["self"]), "_and_", [(function(){return smalltalk.send(smalltalk.send(self, "_currentClass", []), "__eq", [aClass]);})]);})]);})]);
  340. return self;},
  341. args: ["aNode", "aClass"],
  342. source: "isNode: aNode ofClass: aClass\x0a\x09^aNode isValueNode and: [\x0a \x09aNode value class = aClass or: [\x0a \x09\x09aNode value = 'self' and: [self currentClass = aClass]]]",
  343. messageSends: ["and:", "isValueNode", "or:", "=", "class", "value", "currentClass"],
  344. referencedClasses: []
  345. }),
  346. smalltalk.FunCodeGenerator);
  347. smalltalk.addMethod(
  348. "_knownVariables",
  349. smalltalk.method({
  350. selector: "knownVariables",
  351. category: 'accessing',
  352. fn: function () {
  353. var self=this;
  354. return (function($rec){smalltalk.send($rec, "_addAll_", [smalltalk.send(self, "_tempVariables", [])]);smalltalk.send($rec, "_addAll_", [smalltalk.send(self, "_argVariables", [])]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_pseudoVariables", []));
  355. return self;},
  356. args: [],
  357. source: "knownVariables\x0a\x09^self pseudoVariables \x0a\x09\x09addAll: self tempVariables;\x0a\x09\x09addAll: self argVariables;\x0a\x09\x09yourself",
  358. messageSends: ["addAll:", "tempVariables", "argVariables", "yourself", "pseudoVariables"],
  359. referencedClasses: []
  360. }),
  361. smalltalk.FunCodeGenerator);
  362. smalltalk.addMethod(
  363. "_performOptimizations",
  364. smalltalk.method({
  365. selector: "performOptimizations",
  366. category: 'testing',
  367. fn: function () {
  368. var self=this;
  369. return smalltalk.send(smalltalk.send(self, "_class", []), "_performOptimizations", []);
  370. return self;},
  371. args: [],
  372. source: "performOptimizations\x0a\x09^self class performOptimizations",
  373. messageSends: ["performOptimizations", "class"],
  374. referencedClasses: []
  375. }),
  376. smalltalk.FunCodeGenerator);
  377. smalltalk.addMethod(
  378. "_send_to_arguments_superSend_",
  379. smalltalk.method({
  380. selector: "send:to:arguments:superSend:",
  381. category: 'visiting',
  382. fn: function (aSelector, aReceiver, aCollection, aBoolean) {
  383. var self=this;
  384. return smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(str){var tmp=nil;
  385. (tmp=self['@stream']);smalltalk.send(str, "_nextPutAll_", ["smalltalk.send("]);smalltalk.send(str, "_nextPutAll_", [aReceiver]);smalltalk.send(str, "_nextPutAll_", [smalltalk.send(smalltalk.send(", \x22", "__comma", [smalltalk.send(aSelector, "_asSelector", [])]), "__comma", ["\x22, ["])]);(self['@stream']=str);smalltalk.send(aCollection, "_do_separatedBy_", [(function(each){return smalltalk.send(self, "_visit_", [each]);}), (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [", "]);})]);(self['@stream']=tmp);smalltalk.send(str, "_nextPutAll_", ["]"]);((($receiver = aBoolean).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(str, "_nextPutAll_", [smalltalk.send(smalltalk.send(", smalltalk.", "__comma", [smalltalk.send(self, "_classNameFor_", [smalltalk.send(self, "_currentClass", [])])]), "__comma", [".superclass || nil"])]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(str, "_nextPutAll_", [smalltalk.send(smalltalk.send(", smalltalk.", "__comma", [smalltalk.send(self, "_classNameFor_", [smalltalk.send(self, "_currentClass", [])])]), "__comma", [".superclass || nil"])]);})]));return smalltalk.send(str, "_nextPutAll_", [")"]);})]);
  386. return self;},
  387. args: ["aSelector", "aReceiver", "aCollection", "aBoolean"],
  388. source: "send: aSelector to: aReceiver arguments: aCollection superSend: aBoolean\x0a\x09^String streamContents: [:str || tmp |\x0a \x09tmp := stream.\x0a\x09\x09str nextPutAll: 'smalltalk.send('.\x0a\x09\x09str nextPutAll: aReceiver.\x0a\x09\x09str nextPutAll: ', \x22', aSelector asSelector, '\x22, ['.\x0a stream := str.\x0a\x09\x09aCollection\x0a\x09 \x09\x09do: [:each | self visit: each]\x0a\x09 \x09\x09separatedBy: [stream nextPutAll: ', '].\x0a stream := tmp.\x0a str nextPutAll: ']'.\x0a\x09\x09aBoolean ifTrue: [\x0a\x09\x09\x09str nextPutAll: ', smalltalk.', (self classNameFor: self currentClass), '.superclass || nil'].\x0a\x09\x09str nextPutAll: ')']",
  389. messageSends: ["streamContents:", "nextPutAll:", ",", "asSelector", "do:separatedBy:", "visit:", "ifTrue:", "classNameFor:", "currentClass"],
  390. referencedClasses: ["String"]
  391. }),
  392. smalltalk.FunCodeGenerator);
  393. smalltalk.addMethod(
  394. "_tempVariables",
  395. smalltalk.method({
  396. selector: "tempVariables",
  397. category: 'accessing',
  398. fn: function () {
  399. var self=this;
  400. return smalltalk.send(self['@tempVariables'], "_copy", []);
  401. return self;},
  402. args: [],
  403. source: "tempVariables\x0a\x09^tempVariables copy",
  404. messageSends: ["copy"],
  405. referencedClasses: []
  406. }),
  407. smalltalk.FunCodeGenerator);
  408. smalltalk.addMethod(
  409. "_unknownVariables",
  410. smalltalk.method({
  411. selector: "unknownVariables",
  412. category: 'accessing',
  413. fn: function () {
  414. var self=this;
  415. return smalltalk.send(self['@unknownVariables'], "_copy", []);
  416. return self;},
  417. args: [],
  418. source: "unknownVariables\x0a\x09^unknownVariables copy",
  419. messageSends: ["copy"],
  420. referencedClasses: []
  421. }),
  422. smalltalk.FunCodeGenerator);
  423. smalltalk.addMethod(
  424. "_visit_",
  425. smalltalk.method({
  426. selector: "visit:",
  427. category: 'visiting',
  428. fn: function (aNode) {
  429. var self=this;
  430. smalltalk.send(aNode, "_accept_", [self]);
  431. return self;},
  432. args: ["aNode"],
  433. source: "visit: aNode\x0a\x09aNode accept: self",
  434. messageSends: ["accept:"],
  435. referencedClasses: []
  436. }),
  437. smalltalk.FunCodeGenerator);
  438. smalltalk.addMethod(
  439. "_visitAssignmentNode_",
  440. smalltalk.method({
  441. selector: "visitAssignmentNode:",
  442. category: 'visiting',
  443. fn: function (aNode) {
  444. var self=this;
  445. smalltalk.send(self['@stream'], "_nextPutAll_", ["("]);
  446. smalltalk.send(self, "_visit_", [smalltalk.send(aNode, "_left", [])]);
  447. smalltalk.send(self['@stream'], "_nextPutAll_", ["="]);
  448. smalltalk.send(self, "_visit_", [smalltalk.send(aNode, "_right", [])]);
  449. smalltalk.send(self['@stream'], "_nextPutAll_", [")"]);
  450. return self;},
  451. args: ["aNode"],
  452. source: "visitAssignmentNode: aNode\x0a\x09stream nextPutAll: '('.\x0a\x09self visit: aNode left.\x0a\x09stream nextPutAll: '='.\x0a\x09self visit: aNode right.\x0a\x09stream nextPutAll: ')'",
  453. messageSends: ["nextPutAll:", "visit:", "left", "right"],
  454. referencedClasses: []
  455. }),
  456. smalltalk.FunCodeGenerator);
  457. smalltalk.addMethod(
  458. "_visitBlockNode_",
  459. smalltalk.method({
  460. selector: "visitBlockNode:",
  461. category: 'visiting',
  462. fn: function (aNode) {
  463. var self=this;
  464. smalltalk.send(self['@stream'], "_nextPutAll_", ["(function("]);
  465. smalltalk.send(smalltalk.send(aNode, "_parameters", []), "_do_separatedBy_", [(function(each){smalltalk.send(self['@tempVariables'], "_add_", [each]);return smalltalk.send(self['@stream'], "_nextPutAll_", [each]);}), (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [", "]);})]);
  466. smalltalk.send(self['@stream'], "_nextPutAll_", ["){"]);
  467. smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_do_", [(function(each){return smalltalk.send(self, "_visit_", [each]);})]);
  468. smalltalk.send(self['@stream'], "_nextPutAll_", ["})"]);
  469. return self;},
  470. args: ["aNode"],
  471. source: "visitBlockNode: aNode\x0a\x09stream nextPutAll: '(function('.\x0a\x09aNode parameters \x0a\x09 do: [:each |\x0a\x09\x09tempVariables add: each.\x0a\x09\x09stream nextPutAll: each]\x0a\x09 separatedBy: [stream nextPutAll: ', '].\x0a\x09stream nextPutAll: '){'.\x0a\x09aNode nodes do: [:each | self visit: each].\x0a\x09stream nextPutAll: '})'",
  472. messageSends: ["nextPutAll:", "do:separatedBy:", "parameters", "add:", "do:", "nodes", "visit:"],
  473. referencedClasses: []
  474. }),
  475. smalltalk.FunCodeGenerator);
  476. smalltalk.addMethod(
  477. "_visitBlockSequenceNode_",
  478. smalltalk.method({
  479. selector: "visitBlockSequenceNode:",
  480. category: 'visiting',
  481. fn: function (aNode) {
  482. var self=this;
  483. var index=nil;
  484. (self['@nestedBlocks']=((($receiver = self['@nestedBlocks']).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));
  485. ((($receiver = smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_isEmpty", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", ["return nil;"]);})() : (function(){smalltalk.send(smalltalk.send(aNode, "_temps", []), "_do_", [(function(each){var temp=nil;
  486. (temp=smalltalk.send(self, "_safeVariableNameFor_", [each]));smalltalk.send(self['@tempVariables'], "_add_", [temp]);return (function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("var ", "__comma", [temp]), "__comma", ["=nil;"])]);return smalltalk.send($rec, "_lf", []);})(self['@stream']);})]);(index=(0));return smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_do_", [(function(each){(index=((($receiver = index).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));((($receiver = smalltalk.send(index, "__eq", [smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_size", [])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", ["return "]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(self['@stream'], "_nextPutAll_", ["return "]);})]));smalltalk.send(self, "_visit_", [each]);return smalltalk.send(self['@stream'], "_nextPutAll_", [";"]);})]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self['@stream'], "_nextPutAll_", ["return nil;"]);}), (function(){smalltalk.send(smalltalk.send(aNode, "_temps", []), "_do_", [(function(each){var temp=nil;
  487. (temp=smalltalk.send(self, "_safeVariableNameFor_", [each]));smalltalk.send(self['@tempVariables'], "_add_", [temp]);return (function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("var ", "__comma", [temp]), "__comma", ["=nil;"])]);return smalltalk.send($rec, "_lf", []);})(self['@stream']);})]);(index=(0));return smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_do_", [(function(each){(index=((($receiver = index).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));((($receiver = smalltalk.send(index, "__eq", [smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_size", [])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", ["return "]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(self['@stream'], "_nextPutAll_", ["return "]);})]));smalltalk.send(self, "_visit_", [each]);return smalltalk.send(self['@stream'], "_nextPutAll_", [";"]);})]);})]));
  488. (self['@nestedBlocks']=((($receiver = self['@nestedBlocks']).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])));
  489. return self;},
  490. args: ["aNode"],
  491. source: "visitBlockSequenceNode: aNode\x0a\x09| index |\x0a\x09nestedBlocks := nestedBlocks + 1.\x0a\x09aNode nodes isEmpty\x0a\x09 ifTrue: [\x0a\x09\x09stream nextPutAll: 'return nil;']\x0a\x09 ifFalse: [\x0a\x09\x09aNode temps do: [:each | | temp |\x0a temp := self safeVariableNameFor: each.\x0a\x09\x09 tempVariables add: temp.\x0a\x09\x09 stream nextPutAll: 'var ', temp, '=nil;'; lf].\x0a\x09\x09index := 0.\x0a\x09\x09aNode nodes do: [:each |\x0a\x09\x09 index := index + 1.\x0a\x09\x09 index = aNode nodes size ifTrue: [\x0a\x09\x09\x09stream nextPutAll: 'return '].\x0a\x09\x09 self visit: each.\x0a\x09\x09 stream nextPutAll: ';']].\x0a\x09nestedBlocks := nestedBlocks - 1",
  492. messageSends: ["+", "ifTrue:ifFalse:", "isEmpty", "nodes", "nextPutAll:", "do:", "temps", "safeVariableNameFor:", "add:", ",", "lf", "ifTrue:", "=", "size", "visit:", "-"],
  493. referencedClasses: []
  494. }),
  495. smalltalk.FunCodeGenerator);
  496. smalltalk.addMethod(
  497. "_visitCascadeNode_",
  498. smalltalk.method({
  499. selector: "visitCascadeNode:",
  500. category: 'visiting',
  501. fn: function (aNode) {
  502. var self=this;
  503. var index=nil;
  504. (index=(0));
  505. ((($receiver = smalltalk.send(self['@tempVariables'], "_includes_", ["$rec"])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self['@tempVariables'], "_add_", ["$rec"]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(self['@tempVariables'], "_add_", ["$rec"]);})]));
  506. smalltalk.send(self['@stream'], "_nextPutAll_", ["(function($rec){"]);
  507. smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_do_", [(function(each){(index=((($receiver = index).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));((($receiver = smalltalk.send(index, "__eq", [smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_size", [])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", ["return "]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(self['@stream'], "_nextPutAll_", ["return "]);})]));smalltalk.send(each, "_receiver_", [smalltalk.send(smalltalk.send((smalltalk.VariableNode || VariableNode), "_new", []), "_value_", ["$rec"])]);smalltalk.send(self, "_visit_", [each]);return smalltalk.send(self['@stream'], "_nextPutAll_", [";"]);})]);
  508. smalltalk.send(self['@stream'], "_nextPutAll_", ["})("]);
  509. smalltalk.send(self, "_visit_", [smalltalk.send(aNode, "_receiver", [])]);
  510. smalltalk.send(self['@stream'], "_nextPutAll_", [")"]);
  511. return self;},
  512. args: ["aNode"],
  513. source: "visitCascadeNode: aNode\x0a\x09| index |\x0a\x09index := 0.\x0a\x09(tempVariables includes: '$rec') ifFalse: [\x0a\x09\x09tempVariables add: '$rec'].\x0a\x09stream nextPutAll: '(function($rec){'.\x0a\x09aNode nodes do: [:each |\x0a\x09 index := index + 1.\x0a\x09 index = aNode nodes size ifTrue: [\x0a\x09\x09stream nextPutAll: 'return '].\x0a\x09 each receiver: (VariableNode new value: '$rec').\x0a\x09 self visit: each.\x0a\x09 stream nextPutAll: ';'].\x0a\x09stream nextPutAll: '})('.\x0a\x09self visit: aNode receiver.\x0a\x09stream nextPutAll: ')'",
  514. messageSends: ["ifFalse:", "includes:", "add:", "nextPutAll:", "do:", "nodes", "+", "ifTrue:", "=", "size", "receiver:", "value:", "new", "visit:", "receiver"],
  515. referencedClasses: ["VariableNode"]
  516. }),
  517. smalltalk.FunCodeGenerator);
  518. smalltalk.addMethod(
  519. "_visitClassReferenceNode_",
  520. smalltalk.method({
  521. selector: "visitClassReferenceNode:",
  522. category: 'visiting',
  523. fn: function (aNode) {
  524. var self=this;
  525. ((($receiver = smalltalk.send(self['@referencedClasses'], "_includes_", [smalltalk.send(aNode, "_value", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self['@referencedClasses'], "_add_", [smalltalk.send(aNode, "_value", [])]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(self['@referencedClasses'], "_add_", [smalltalk.send(aNode, "_value", [])]);})]));
  526. smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("(smalltalk.", "__comma", [smalltalk.send(aNode, "_value", [])]), "__comma", [" || "]), "__comma", [smalltalk.send(aNode, "_value", [])]), "__comma", [")"])]);
  527. return self;},
  528. args: ["aNode"],
  529. source: "visitClassReferenceNode: aNode\x0a\x09(referencedClasses includes: aNode value) ifFalse: [\x0a\x09\x09referencedClasses add: aNode value].\x0a\x09stream nextPutAll: '(smalltalk.', aNode value, ' || ', aNode value, ')'",
  530. messageSends: ["ifFalse:", "includes:", "value", "add:", "nextPutAll:", ","],
  531. referencedClasses: []
  532. }),
  533. smalltalk.FunCodeGenerator);
  534. smalltalk.addMethod(
  535. "_visitDynamicArrayNode_",
  536. smalltalk.method({
  537. selector: "visitDynamicArrayNode:",
  538. category: 'visiting',
  539. fn: function (aNode) {
  540. var self=this;
  541. smalltalk.send(self['@stream'], "_nextPutAll_", ["["]);
  542. smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_do_separatedBy_", [(function(each){return smalltalk.send(self, "_visit_", [each]);}), (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [","]);})]);
  543. smalltalk.send(self['@stream'], "_nextPutAll_", ["]"]);
  544. return self;},
  545. args: ["aNode"],
  546. source: "visitDynamicArrayNode: aNode\x0a\x09stream nextPutAll: '['.\x0a\x09aNode nodes \x0a\x09\x09do: [:each | self visit: each]\x0a\x09\x09separatedBy: [stream nextPutAll: ','].\x0a\x09stream nextPutAll: ']'",
  547. messageSends: ["nextPutAll:", "do:separatedBy:", "nodes", "visit:"],
  548. referencedClasses: []
  549. }),
  550. smalltalk.FunCodeGenerator);
  551. smalltalk.addMethod(
  552. "_visitDynamicDictionaryNode_",
  553. smalltalk.method({
  554. selector: "visitDynamicDictionaryNode:",
  555. category: 'visiting',
  556. fn: function (aNode) {
  557. var self=this;
  558. smalltalk.send(self['@stream'], "_nextPutAll_", ["smalltalk.HashedCollection._fromPairs_(["]);
  559. smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_do_separatedBy_", [(function(each){return smalltalk.send(self, "_visit_", [each]);}), (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [","]);})]);
  560. smalltalk.send(self['@stream'], "_nextPutAll_", ["])"]);
  561. return self;},
  562. args: ["aNode"],
  563. source: "visitDynamicDictionaryNode: aNode\x0a\x09stream nextPutAll: 'smalltalk.HashedCollection._fromPairs_(['.\x0a\x09\x09aNode nodes \x0a\x09\x09\x09do: [:each | self visit: each]\x0a\x09\x09\x09separatedBy: [stream nextPutAll: ','].\x0a\x09\x09stream nextPutAll: '])'",
  564. messageSends: ["nextPutAll:", "do:separatedBy:", "nodes", "visit:"],
  565. referencedClasses: []
  566. }),
  567. smalltalk.FunCodeGenerator);
  568. smalltalk.addMethod(
  569. "_visitFailure_",
  570. smalltalk.method({
  571. selector: "visitFailure:",
  572. category: 'visiting',
  573. fn: function (aFailure) {
  574. var self=this;
  575. smalltalk.send(self, "_error_", [smalltalk.send(aFailure, "_asString", [])]);
  576. return self;},
  577. args: ["aFailure"],
  578. source: "visitFailure: aFailure\x0a\x09self error: aFailure asString",
  579. messageSends: ["error:", "asString"],
  580. referencedClasses: []
  581. }),
  582. smalltalk.FunCodeGenerator);
  583. smalltalk.addMethod(
  584. "_visitJSStatementNode_",
  585. smalltalk.method({
  586. selector: "visitJSStatementNode:",
  587. category: 'visiting',
  588. fn: function (aNode) {
  589. var self=this;
  590. smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(aNode, "_source", [])]);
  591. return self;},
  592. args: ["aNode"],
  593. source: "visitJSStatementNode: aNode\x0a\x09stream nextPutAll: aNode source",
  594. messageSends: ["nextPutAll:", "source"],
  595. referencedClasses: []
  596. }),
  597. smalltalk.FunCodeGenerator);
  598. smalltalk.addMethod(
  599. "_visitMethodNode_",
  600. smalltalk.method({
  601. selector: "visitMethodNode:",
  602. category: 'visiting',
  603. fn: function (aNode) {
  604. var self=this;
  605. var str=nil;
  606. var currentSelector=nil;
  607. (self['@currentSelector']=smalltalk.send(smalltalk.send(aNode, "_selector", []), "_asSelector", []));
  608. (self['@nestedBlocks']=(0));
  609. (self['@earlyReturn']=false);
  610. (self['@messageSends']=[]);
  611. (self['@referencedClasses']=[]);
  612. (self['@unknownVariables']=[]);
  613. (self['@tempVariables']=[]);
  614. (self['@argVariables']=[]);
  615. (function($rec){smalltalk.send($rec, "_nextPutAll_", ["smalltalk.method({"]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("selector: \x22", "__comma", [smalltalk.send(aNode, "_selector", [])]), "__comma", ["\x22,"])]);return smalltalk.send($rec, "_lf", []);})(self['@stream']);
  616. (function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("source: ", "__comma", [smalltalk.send(smalltalk.send(self, "_source", []), "_asJavascript", [])]), "__comma", [","])]);return smalltalk.send($rec, "_lf", []);})(self['@stream']);
  617. smalltalk.send(self['@stream'], "_nextPutAll_", ["fn: function("]);
  618. smalltalk.send(smalltalk.send(aNode, "_arguments", []), "_do_separatedBy_", [(function(each){smalltalk.send(self['@argVariables'], "_add_", [each]);return smalltalk.send(self['@stream'], "_nextPutAll_", [each]);}), (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [", "]);})]);
  619. (function($rec){smalltalk.send($rec, "_nextPutAll_", ["){"]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", ["var self=this;"]);return smalltalk.send($rec, "_lf", []);})(self['@stream']);
  620. (str=self['@stream']);
  621. (self['@stream']=smalltalk.send("", "_writeStream", []));
  622. smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_do_", [(function(each){return smalltalk.send(self, "_visit_", [each]);})]);
  623. ((($receiver = self['@earlyReturn']).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (function($rec){smalltalk.send($rec, "_nextPutAll_", ["var $early={};"]);smalltalk.send($rec, "_lf", []);return smalltalk.send($rec, "_nextPutAll_", ["try{"]);})(str);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (function($rec){smalltalk.send($rec, "_nextPutAll_", ["var $early={};"]);smalltalk.send($rec, "_lf", []);return smalltalk.send($rec, "_nextPutAll_", ["try{"]);})(str);})]));
  624. smalltalk.send(str, "_nextPutAll_", [smalltalk.send(self['@stream'], "_contents", [])]);
  625. (self['@stream']=str);
  626. (function($rec){smalltalk.send($rec, "_lf", []);return smalltalk.send($rec, "_nextPutAll_", ["return self;"]);})(self['@stream']);
  627. ((($receiver = self['@earlyReturn']).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (function($rec){smalltalk.send($rec, "_lf", []);return smalltalk.send($rec, "_nextPutAll_", ["} catch(e) {if(e===$early)return e[0]; throw e}"]);})(self['@stream']);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (function($rec){smalltalk.send($rec, "_lf", []);return smalltalk.send($rec, "_nextPutAll_", ["} catch(e) {if(e===$early)return e[0]; throw e}"]);})(self['@stream']);})]));
  628. smalltalk.send(self['@stream'], "_nextPutAll_", ["}"]);
  629. (function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(",", "__comma", [smalltalk.send((smalltalk.String || String), "_lf", [])]), "__comma", ["messageSends: "])]);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(self['@messageSends'], "_asJavascript", []), "__comma", [","])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("args: ", "__comma", [smalltalk.send(self['@argVariables'], "_asJavascript", [])]), "__comma", [","])]);smalltalk.send($rec, "_lf", []);return smalltalk.send($rec, "_nextPutAll_", ["referencedClasses: ["]);})(self['@stream']);
  630. smalltalk.send(self['@referencedClasses'], "_do_separatedBy_", [(function(each){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(each, "_printString", [])]);}), (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [","]);})]);
  631. smalltalk.send(self['@stream'], "_nextPutAll_", ["]"]);
  632. smalltalk.send(self['@stream'], "_nextPutAll_", ["})"]);
  633. return self;},
  634. args: ["aNode"],
  635. source: "visitMethodNode: aNode\x0a\x09| str currentSelector | \x0a\x09currentSelector := aNode selector asSelector.\x0a\x09nestedBlocks := 0.\x0a\x09earlyReturn := false.\x0a\x09messageSends := #().\x0a\x09referencedClasses := #().\x0a\x09unknownVariables := #().\x0a\x09tempVariables := #().\x0a\x09argVariables := #().\x0a\x09stream \x0a\x09 nextPutAll: 'smalltalk.method({'; lf;\x0a\x09 nextPutAll: 'selector: \x22', aNode selector, '\x22,'; lf.\x0a\x09stream nextPutAll: 'source: ', self source asJavascript, ',';lf.\x0a\x09stream nextPutAll: 'fn: function('.\x0a\x09aNode arguments \x0a\x09 do: [:each | \x0a\x09\x09argVariables add: each.\x0a\x09\x09stream nextPutAll: each]\x0a\x09 separatedBy: [stream nextPutAll: ', '].\x0a\x09stream \x0a\x09 nextPutAll: '){'; lf;\x0a\x09 nextPutAll: 'var self=this;'; lf.\x0a\x09str := stream.\x0a\x09stream := '' writeStream.\x0a\x09aNode nodes do: [:each |\x0a\x09 self visit: each].\x0a\x09earlyReturn ifTrue: [\x0a\x09 str nextPutAll: 'var $early={};'; lf; nextPutAll: 'try{'].\x0a\x09str nextPutAll: stream contents.\x0a\x09stream := str.\x0a\x09stream \x0a\x09 lf; \x0a\x09 nextPutAll: 'return self;'.\x0a\x09earlyReturn ifTrue: [\x0a\x09 stream lf; nextPutAll: '} catch(e) {if(e===$early)return e[0]; throw e}'].\x0a\x09stream nextPutAll: '}'.\x0a\x09stream \x0a\x09\x09nextPutAll: ',', String lf, 'messageSends: ';\x0a\x09\x09nextPutAll: messageSends asJavascript, ','; lf;\x0a \x09nextPutAll: 'args: ', argVariables asJavascript, ','; lf;\x0a\x09\x09nextPutAll: 'referencedClasses: ['.\x0a\x09referencedClasses \x0a\x09\x09do: [:each | stream nextPutAll: each printString]\x0a\x09\x09separatedBy: [stream nextPutAll: ','].\x0a\x09stream nextPutAll: ']'.\x0a\x09stream nextPutAll: '})'",
  636. messageSends: ["asSelector", "selector", "nextPutAll:", "lf", ",", "asJavascript", "source", "do:separatedBy:", "arguments", "add:", "writeStream", "do:", "nodes", "visit:", "ifTrue:", "contents", "printString"],
  637. referencedClasses: ["String"]
  638. }),
  639. smalltalk.FunCodeGenerator);
  640. smalltalk.addMethod(
  641. "_visitReturnNode_",
  642. smalltalk.method({
  643. selector: "visitReturnNode:",
  644. category: 'visiting',
  645. fn: function (aNode) {
  646. var self=this;
  647. ((($receiver = ((($receiver = self['@nestedBlocks']).klass === smalltalk.Number) ? $receiver >(0) : smalltalk.send($receiver, "__gt", [(0)]))).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (self['@earlyReturn']=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (self['@earlyReturn']=true);})]));
  648. ((($receiver = ((($receiver = self['@nestedBlocks']).klass === smalltalk.Number) ? $receiver >(0) : smalltalk.send($receiver, "__gt", [(0)]))).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", ["(function(){throw $early=["]);})() : (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", ["return "]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self['@stream'], "_nextPutAll_", ["(function(){throw $early=["]);}), (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", ["return "]);})]));
  649. smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_do_", [(function(each){return smalltalk.send(self, "_visit_", [each]);})]);
  650. ((($receiver = ((($receiver = self['@nestedBlocks']).klass === smalltalk.Number) ? $receiver >(0) : smalltalk.send($receiver, "__gt", [(0)]))).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", ["]})()"]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(self['@stream'], "_nextPutAll_", ["]})()"]);})]));
  651. return self;},
  652. args: ["aNode"],
  653. source: "visitReturnNode: aNode\x0a\x09nestedBlocks > 0 ifTrue: [\x0a\x09 earlyReturn := true].\x0a\x09nestedBlocks > 0\x0a\x09 ifTrue: [\x0a\x09\x09stream\x0a\x09\x09 nextPutAll: '(function(){throw $early=[']\x0a\x09 ifFalse: [stream nextPutAll: 'return '].\x0a\x09aNode nodes do: [:each |\x0a\x09 self visit: each].\x0a\x09nestedBlocks > 0 ifTrue: [\x0a\x09 stream nextPutAll: ']})()']",
  654. messageSends: ["ifTrue:", ">", "ifTrue:ifFalse:", "nextPutAll:", "do:", "nodes", "visit:"],
  655. referencedClasses: []
  656. }),
  657. smalltalk.FunCodeGenerator);
  658. smalltalk.addMethod(
  659. "_visitSendNode_",
  660. smalltalk.method({
  661. selector: "visitSendNode:",
  662. category: 'visiting',
  663. fn: function (aNode) {
  664. var self=this;
  665. var str=nil;
  666. var receiver=nil;
  667. var superSend=nil;
  668. var inlined=nil;
  669. (str=self['@stream']);
  670. ((($receiver = smalltalk.send(self['@messageSends'], "_includes_", [smalltalk.send(aNode, "_selector", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self['@messageSends'], "_add_", [smalltalk.send(aNode, "_selector", [])]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(self['@messageSends'], "_add_", [smalltalk.send(aNode, "_selector", [])]);})]));
  671. (self['@stream']=smalltalk.send("", "_writeStream", []));
  672. smalltalk.send(self, "_visit_", [smalltalk.send(aNode, "_receiver", [])]);
  673. (superSend=smalltalk.send(smalltalk.send(self['@stream'], "_contents", []), "__eq", ["super"]));
  674. (receiver=((($receiver = superSend).klass === smalltalk.Boolean) ? ($receiver ? (function(){return "self";})() : (function(){return smalltalk.send(self['@stream'], "_contents", []);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return "self";}), (function(){return smalltalk.send(self['@stream'], "_contents", []);})])));
  675. (self['@stream']=str);
  676. ((($receiver = smalltalk.send(self, "_performOptimizations", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(self, "_inlineLiteral_receiverNode_argumentNodes_", [smalltalk.send(aNode, "_selector", []), smalltalk.send(aNode, "_receiver", []), smalltalk.send(aNode, "_arguments", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return ((($receiver = smalltalk.send(self, "_inline_receiver_argumentNodes_", [smalltalk.send(aNode, "_selector", []), receiver, smalltalk.send(aNode, "_arguments", [])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(" : ", "__comma", [smalltalk.send(self, "_send_to_arguments_superSend_", [smalltalk.send(aNode, "_selector", []), "$receiver", smalltalk.send(aNode, "_arguments", []), superSend])]), "__comma", [")"])]);})() : (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(self, "_send_to_arguments_superSend_", [smalltalk.send(aNode, "_selector", []), receiver, smalltalk.send(aNode, "_arguments", []), superSend])]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(" : ", "__comma", [smalltalk.send(self, "_send_to_arguments_superSend_", [smalltalk.send(aNode, "_selector", []), "$receiver", smalltalk.send(aNode, "_arguments", []), superSend])]), "__comma", [")"])]);}), (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(self, "_send_to_arguments_superSend_", [smalltalk.send(aNode, "_selector", []), receiver, smalltalk.send(aNode, "_arguments", []), superSend])]);})]));})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return ((($receiver = smalltalk.send(self, "_inline_receiver_argumentNodes_", [smalltalk.send(aNode, "_selector", []), receiver, smalltalk.send(aNode, "_arguments", [])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(" : ", "__comma", [smalltalk.send(self, "_send_to_arguments_superSend_", [smalltalk.send(aNode, "_selector", []), "$receiver", smalltalk.send(aNode, "_arguments", []), superSend])]), "__comma", [")"])]);})() : (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(self, "_send_to_arguments_superSend_", [smalltalk.send(aNode, "_selector", []), receiver, smalltalk.send(aNode, "_arguments", []), superSend])]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(" : ", "__comma", [smalltalk.send(self, "_send_to_arguments_superSend_", [smalltalk.send(aNode, "_selector", []), "$receiver", smalltalk.send(aNode, "_arguments", []), superSend])]), "__comma", [")"])]);}), (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(self, "_send_to_arguments_superSend_", [smalltalk.send(aNode, "_selector", []), receiver, smalltalk.send(aNode, "_arguments", []), superSend])]);})]));})]));})() : (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(self, "_send_to_arguments_superSend_", [smalltalk.send(aNode, "_selector", []), receiver, smalltalk.send(aNode, "_arguments", []), superSend])]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return ((($receiver = smalltalk.send(self, "_inlineLiteral_receiverNode_argumentNodes_", [smalltalk.send(aNode, "_selector", []), smalltalk.send(aNode, "_receiver", []), smalltalk.send(aNode, "_arguments", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return ((($receiver = smalltalk.send(self, "_inline_receiver_argumentNodes_", [smalltalk.send(aNode, "_selector", []), receiver, smalltalk.send(aNode, "_arguments", [])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(" : ", "__comma", [smalltalk.send(self, "_send_to_arguments_superSend_", [smalltalk.send(aNode, "_selector", []), "$receiver", smalltalk.send(aNode, "_arguments", []), superSend])]), "__comma", [")"])]);})() : (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(self, "_send_to_arguments_superSend_", [smalltalk.send(aNode, "_selector", []), receiver, smalltalk.send(aNode, "_arguments", []), superSend])]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(" : ", "__comma", [smalltalk.send(self, "_send_to_arguments_superSend_", [smalltalk.send(aNode, "_selector", []), "$receiver", smalltalk.send(aNode, "_arguments", []), superSend])]), "__comma", [")"])]);}), (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(self, "_send_to_arguments_superSend_", [smalltalk.send(aNode, "_selector", []), receiver, smalltalk.send(aNode, "_arguments", []), superSend])]);})]));})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return ((($receiver = smalltalk.send(self, "_inline_receiver_argumentNodes_", [smalltalk.send(aNode, "_selector", []), receiver, smalltalk.send(aNode, "_arguments", [])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(" : ", "__comma", [smalltalk.send(self, "_send_to_arguments_superSend_", [smalltalk.send(aNode, "_selector", []), "$receiver", smalltalk.send(aNode, "_arguments", []), superSend])]), "__comma", [")"])]);})() : (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(self, "_send_to_arguments_superSend_", [smalltalk.send(aNode, "_selector", []), receiver, smalltalk.send(aNode, "_arguments", []), superSend])]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(" : ", "__comma", [smalltalk.send(self, "_send_to_arguments_superSend_", [smalltalk.send(aNode, "_selector", []), "$receiver", smalltalk.send(aNode, "_arguments", []), superSend])]), "__comma", [")"])]);}), (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(self, "_send_to_arguments_superSend_", [smalltalk.send(aNode, "_selector", []), receiver, smalltalk.send(aNode, "_arguments", []), superSend])]);})]));})]));}), (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(self, "_send_to_arguments_superSend_", [smalltalk.send(aNode, "_selector", []), receiver, smalltalk.send(aNode, "_arguments", []), superSend])]);})]));
  677. return self;},
  678. args: ["aNode"],
  679. source: "visitSendNode: aNode\x0a | str receiver superSend inlined |\x0a str := stream.\x0a (messageSends includes: aNode selector) ifFalse: [\x0a messageSends add: aNode selector].\x0a stream := '' writeStream.\x0a self visit: aNode receiver.\x0a superSend := stream contents = 'super'.\x0a receiver := superSend ifTrue: ['self'] ifFalse: [stream contents].\x0a stream := str.\x0a\x09\x0a\x09self performOptimizations \x0a\x09\x09ifTrue: [\x0a\x09\x09\x09(self inlineLiteral: aNode selector receiverNode: aNode receiver argumentNodes: aNode arguments) ifFalse: [\x0a\x09\x09\x09\x09(self inline: aNode selector receiver: receiver argumentNodes: aNode arguments)\x0a \x09\x09\x09ifTrue: [stream nextPutAll: ' : ', (self send: aNode selector to: '$receiver' arguments: aNode arguments superSend: superSend), ')']\x0a \x09\x09\x09ifFalse: [stream nextPutAll: (self send: aNode selector to: receiver arguments: aNode arguments superSend: superSend)]]]\x0a\x09\x09ifFalse: [stream nextPutAll: (self send: aNode selector to: receiver arguments: aNode arguments superSend: superSend)]",
  680. messageSends: ["ifFalse:", "includes:", "selector", "add:", "writeStream", "visit:", "receiver", "=", "contents", "ifTrue:ifFalse:", "performOptimizations", "inlineLiteral:receiverNode:argumentNodes:", "arguments", "inline:receiver:argumentNodes:", "nextPutAll:", ",", "send:to:arguments:superSend:"],
  681. referencedClasses: []
  682. }),
  683. smalltalk.FunCodeGenerator);
  684. smalltalk.addMethod(
  685. "_visitSequenceNode_",
  686. smalltalk.method({
  687. selector: "visitSequenceNode:",
  688. category: 'visiting',
  689. fn: function (aNode) {
  690. var self=this;
  691. smalltalk.send(smalltalk.send(aNode, "_temps", []), "_do_", [(function(each){var temp=nil;
  692. (temp=smalltalk.send(self, "_safeVariableNameFor_", [each]));smalltalk.send(self['@tempVariables'], "_add_", [temp]);return (function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("var ", "__comma", [temp]), "__comma", ["=nil;"])]);return smalltalk.send($rec, "_lf", []);})(self['@stream']);})]);
  693. smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_do_separatedBy_", [(function(each){smalltalk.send(self, "_visit_", [each]);return smalltalk.send(self['@stream'], "_nextPutAll_", [";"]);}), (function(){return smalltalk.send(self['@stream'], "_lf", []);})]);
  694. return self;},
  695. args: ["aNode"],
  696. source: "visitSequenceNode: aNode\x0a\x09aNode temps do: [:each || temp |\x0a temp := self safeVariableNameFor: each.\x0a\x09 tempVariables add: temp.\x0a\x09 stream nextPutAll: 'var ', temp, '=nil;'; lf].\x0a\x09aNode nodes do: [:each |\x0a\x09 self visit: each.\x0a\x09 stream nextPutAll: ';']\x0a\x09 separatedBy: [stream lf]",
  697. messageSends: ["do:", "temps", "safeVariableNameFor:", "add:", "nextPutAll:", ",", "lf", "do:separatedBy:", "nodes", "visit:"],
  698. referencedClasses: []
  699. }),
  700. smalltalk.FunCodeGenerator);
  701. smalltalk.addMethod(
  702. "_visitValueNode_",
  703. smalltalk.method({
  704. selector: "visitValueNode:",
  705. category: 'visiting',
  706. fn: function (aNode) {
  707. var self=this;
  708. smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(aNode, "_value", []), "_asJavascript", [])]);
  709. return self;},
  710. args: ["aNode"],
  711. source: "visitValueNode: aNode\x0a\x09stream nextPutAll: aNode value asJavascript",
  712. messageSends: ["nextPutAll:", "asJavascript", "value"],
  713. referencedClasses: []
  714. }),
  715. smalltalk.FunCodeGenerator);
  716. smalltalk.addMethod(
  717. "_visitVariableNode_",
  718. smalltalk.method({
  719. selector: "visitVariableNode:",
  720. category: 'visiting',
  721. fn: function (aNode) {
  722. var self=this;
  723. var varName=nil;
  724. ((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(self, "_currentClass", []), "_allInstanceVariableNames", []), "_includes_", [smalltalk.send(aNode, "_value", [])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send("self['@", "__comma", [smalltalk.send(aNode, "_value", [])]), "__comma", ["']"])]);})() : (function(){(varName=smalltalk.send(self, "_safeVariableNameFor_", [smalltalk.send(aNode, "_value", [])]));return ((($receiver = smalltalk.send(smalltalk.send(self, "_knownVariables", []), "_includes_", [varName])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){smalltalk.send(self['@unknownVariables'], "_add_", [smalltalk.send(aNode, "_value", [])]);return ((($receiver = smalltalk.send(aNode, "_assigned", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [varName]);})() : (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("(typeof ", "__comma", [varName]), "__comma", [" == 'undefined' ? nil : "]), "__comma", [varName]), "__comma", [")"])]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [varName]);}), (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("(typeof ", "__comma", [varName]), "__comma", [" == 'undefined' ? nil : "]), "__comma", [varName]), "__comma", [")"])]);})]));})() : (function(){return ((($receiver = smalltalk.send(smalltalk.send(aNode, "_value", []), "__eq", ["thisContext"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", ["(smalltalk.getThisContext())"]);})() : (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [varName]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self['@stream'], "_nextPutAll_", ["(smalltalk.getThisContext())"]);}), (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [varName]);})]));})()) : smalltalk.send($receiver, "_ifFalse_ifTrue_", [(function(){smalltalk.send(self['@unknownVariables'], "_add_", [smalltalk.send(aNode, "_value", [])]);return ((($receiver = smalltalk.send(aNode, "_assigned", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [varName]);})() : (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("(typeof ", "__comma", [varName]), "__comma", [" == 'undefined' ? nil : "]), "__comma", [varName]), "__comma", [")"])]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [varName]);}), (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("(typeof ", "__comma", [varName]), "__comma", [" == 'undefined' ? nil : "]), "__comma", [varName]), "__comma", [")"])]);})]));}), (function(){return ((($receiver = smalltalk.send(smalltalk.send(aNode, "_value", []), "__eq", ["thisContext"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", ["(smalltalk.getThisContext())"]);})() : (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [varName]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self['@stream'], "_nextPutAll_", ["(smalltalk.getThisContext())"]);}), (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [varName]);})]));})]));})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send("self['@", "__comma", [smalltalk.send(aNode, "_value", [])]), "__comma", ["']"])]);}), (function(){(varName=smalltalk.send(self, "_safeVariableNameFor_", [smalltalk.send(aNode, "_value", [])]));return ((($receiver = smalltalk.send(smalltalk.send(self, "_knownVariables", []), "_includes_", [varName])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){smalltalk.send(self['@unknownVariables'], "_add_", [smalltalk.send(aNode, "_value", [])]);return ((($receiver = smalltalk.send(aNode, "_assigned", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [varName]);})() : (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("(typeof ", "__comma", [varName]), "__comma", [" == 'undefined' ? nil : "]), "__comma", [varName]), "__comma", [")"])]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [varName]);}), (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("(typeof ", "__comma", [varName]), "__comma", [" == 'undefined' ? nil : "]), "__comma", [varName]), "__comma", [")"])]);})]));})() : (function(){return ((($receiver = smalltalk.send(smalltalk.send(aNode, "_value", []), "__eq", ["thisContext"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", ["(smalltalk.getThisContext())"]);})() : (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [varName]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self['@stream'], "_nextPutAll_", ["(smalltalk.getThisContext())"]);}), (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [varName]);})]));})()) : smalltalk.send($receiver, "_ifFalse_ifTrue_", [(function(){smalltalk.send(self['@unknownVariables'], "_add_", [smalltalk.send(aNode, "_value", [])]);return ((($receiver = smalltalk.send(aNode, "_assigned", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [varName]);})() : (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("(typeof ", "__comma", [varName]), "__comma", [" == 'undefined' ? nil : "]), "__comma", [varName]), "__comma", [")"])]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [varName]);}), (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("(typeof ", "__comma", [varName]), "__comma", [" == 'undefined' ? nil : "]), "__comma", [varName]), "__comma", [")"])]);})]));}), (function(){return ((($receiver = smalltalk.send(smalltalk.send(aNode, "_value", []), "__eq", ["thisContext"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", ["(smalltalk.getThisContext())"]);})() : (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [varName]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self['@stream'], "_nextPutAll_", ["(smalltalk.getThisContext())"]);}), (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [varName]);})]));})]));})]));
  725. return self;},
  726. args: ["aNode"],
  727. source: "visitVariableNode: aNode\x0a\x09| varName |\x0a\x09(self currentClass allInstanceVariableNames includes: aNode value) \x0a\x09\x09ifTrue: [stream nextPutAll: 'self[''@', aNode value, ''']']\x0a\x09\x09ifFalse: [\x0a \x09varName := self safeVariableNameFor: aNode value.\x0a\x09\x09\x09(self knownVariables includes: varName) \x0a \x09\x09ifFalse: [\x0a \x09unknownVariables add: aNode value.\x0a \x09aNode assigned \x0a \x09\x09ifTrue: [stream nextPutAll: varName]\x0a \x09\x09ifFalse: [stream nextPutAll: '(typeof ', varName, ' == ''undefined'' ? nil : ', varName, ')']]\x0a \x09\x09ifTrue: [\x0a \x09aNode value = 'thisContext'\x0a \x09\x09ifTrue: [stream nextPutAll: '(smalltalk.getThisContext())']\x0a \x09\x09\x09\x09ifFalse: [stream nextPutAll: varName]]]",
  728. messageSends: ["ifTrue:ifFalse:", "includes:", "allInstanceVariableNames", "currentClass", "value", "nextPutAll:", ",", "safeVariableNameFor:", "ifFalse:ifTrue:", "knownVariables", "add:", "assigned", "="],
  729. referencedClasses: []
  730. }),
  731. smalltalk.FunCodeGenerator);
  732. smalltalk.FunCodeGenerator.klass.iVarNames = ['performOptimizations'];
  733. smalltalk.addMethod(
  734. "_performOptimizations",
  735. smalltalk.method({
  736. selector: "performOptimizations",
  737. category: 'accessing',
  738. fn: function () {
  739. var self=this;
  740. return (($receiver = self['@performOptimizations']) == nil || $receiver == undefined) ? (function(){return true;})() : $receiver;
  741. return self;},
  742. args: [],
  743. source: "performOptimizations\x0a\x09^performOptimizations ifNil: [true]",
  744. messageSends: ["ifNil:"],
  745. referencedClasses: []
  746. }),
  747. smalltalk.FunCodeGenerator.klass);
  748. smalltalk.addMethod(
  749. "_performOptimizations_",
  750. smalltalk.method({
  751. selector: "performOptimizations:",
  752. category: 'accessing',
  753. fn: function (aBoolean) {
  754. var self=this;
  755. (self['@performOptimizations']=aBoolean);
  756. return self;},
  757. args: ["aBoolean"],
  758. source: "performOptimizations: aBoolean\x0a\x09performOptimizations := aBoolean",
  759. messageSends: [],
  760. referencedClasses: []
  761. }),
  762. smalltalk.FunCodeGenerator.klass);
  763. smalltalk.addClass('ImpCodeGenerator', smalltalk.AbstractCodeGenerator, ['stream', 'nestedBlocks', 'earlyReturn', 'currentSelector', 'unknownVariables', 'tempVariables', 'messageSends', 'referencedClasses', 'classReferenced', 'argVariables', 'mutables', 'target', 'lazyVars', 'realVarNames'], 'Compiler');
  764. smalltalk.addMethod(
  765. "_aboutToModifyState",
  766. smalltalk.method({
  767. selector: "aboutToModifyState",
  768. category: 'compilation DSL',
  769. fn: function (){
  770. var self=this;
  771. var list=nil;
  772. var old=nil;
  773. (list=self['@mutables']);
  774. (self['@mutables']=smalltalk.send((smalltalk.Set || Set), "_new", []));
  775. (old=smalltalk.send(self, "_switchTarget_", [nil]));
  776. smalltalk.send(list, "_do_", [(function(each){var value=nil;
  777. smalltalk.send(self, "_switchTarget_", [each]);return smalltalk.send(self, "_realAssign_", [smalltalk.send(self['@lazyVars'], "_at_", [each])]);})]);
  778. smalltalk.send(self, "_switchTarget_", [old]);
  779. return self;},
  780. args: [],
  781. source: "aboutToModifyState\x0a| list old |\x0a\x09list := mutables.\x0a\x09mutables := Set new.\x0a\x09old := self switchTarget: nil.\x0a\x09list do: [ :each | | value |\x0a\x09\x09self switchTarget: each.\x0a\x09\x09self realAssign: (lazyVars at: each)\x0a\x09].\x0a\x09self switchTarget: old",
  782. messageSends: ["new", "switchTarget:", "do:", "realAssign:", "at:"],
  783. referencedClasses: ["Set"]
  784. }),
  785. smalltalk.ImpCodeGenerator);
  786. smalltalk.addMethod(
  787. "_argVariables",
  788. smalltalk.method({
  789. selector: "argVariables",
  790. category: 'accessing',
  791. fn: function () {
  792. var self=this;
  793. return smalltalk.send(self['@argVariables'], "_copy", []);
  794. return self;},
  795. args: [],
  796. source: "argVariables\x0a\x09^argVariables copy",
  797. messageSends: ["copy"],
  798. referencedClasses: []
  799. }),
  800. smalltalk.ImpCodeGenerator);
  801. smalltalk.addMethod(
  802. "_assert_",
  803. smalltalk.method({
  804. selector: "assert:",
  805. category: 'testing',
  806. fn: function (aBoolean) {
  807. var self=this;
  808. ((($receiver = aBoolean).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self, "_error_", ["assertion failed"]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(self, "_error_", ["assertion failed"]);})]));
  809. return self;},
  810. args: ["aBoolean"],
  811. source: "assert: aBoolean\x0a\x09aBoolean ifFalse: [ self error: 'assertion failed' ]",
  812. messageSends: ["ifFalse:", "error:"],
  813. referencedClasses: []
  814. }),
  815. smalltalk.ImpCodeGenerator);
  816. smalltalk.addMethod(
  817. "_checkClass_for_",
  818. smalltalk.method({
  819. selector: "checkClass:for:",
  820. category: 'optimizations',
  821. fn: function (aClassName, receiver) {
  822. var self=this;
  823. smalltalk.send(self, "_prvCheckClass_for_", [aClassName, receiver]);
  824. smalltalk.send(self['@stream'], "_nextPutAll_", ["{"]);
  825. return self;},
  826. args: ["aClassName", "receiver"],
  827. source: "checkClass: aClassName for: receiver\x0a\x09self prvCheckClass: aClassName for: receiver.\x0a\x09stream nextPutAll: '{'",
  828. messageSends: ["prvCheckClass:for:", "nextPutAll:"],
  829. referencedClasses: []
  830. }),
  831. smalltalk.ImpCodeGenerator);
  832. smalltalk.addMethod(
  833. "_checkClass_for_includeIf_",
  834. smalltalk.method({
  835. selector: "checkClass:for:includeIf:",
  836. category: 'optimizations',
  837. fn: function (aClassName, receiver, aBoolean){
  838. var self=this;
  839. smalltalk.send(self, "_prvCheckClass_for_", [aClassName, receiver]);
  840. smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(((($receiver = aBoolean).klass === smalltalk.Boolean) ? ($receiver ? (function(){return "if((";})() : (function(){return "if(!(";})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return "if((";}), (function(){return "if(!(";})])), "__comma", [smalltalk.send(self, "_useValueNamed_", [receiver])]), "__comma", [")) {"])]);
  841. return self;},
  842. args: ["aClassName", "receiver", "aBoolean"],
  843. source: "checkClass: aClassName for: receiver includeIf: aBoolean\x0a\x09self prvCheckClass: aClassName for: receiver.\x0a\x09stream nextPutAll: (aBoolean ifTrue: ['if(('] ifFalse: ['if(!(']), (self useValueNamed: receiver), ')) {'",
  844. messageSends: ["prvCheckClass:for:", "nextPutAll:", ",", "ifTrue:ifFalse:", "useValueNamed:"],
  845. referencedClasses: []
  846. }),
  847. smalltalk.ImpCodeGenerator);
  848. smalltalk.addMethod(
  849. "_compileNode_",
  850. smalltalk.method({
  851. selector: "compileNode:",
  852. category: 'compiling',
  853. fn: function (aNode) {
  854. var self=this;
  855. (self['@stream']=smalltalk.send("", "_writeStream", []));
  856. smalltalk.send(self, "_visit_", [aNode]);
  857. return smalltalk.send(self['@stream'], "_contents", []);
  858. return self;},
  859. args: ["aNode"],
  860. source: "compileNode: aNode\x0a\x09stream := '' writeStream.\x0a\x09self visit: aNode.\x0a\x09^stream contents",
  861. messageSends: ["writeStream", "visit:", "contents"],
  862. referencedClasses: []
  863. }),
  864. smalltalk.ImpCodeGenerator);
  865. smalltalk.addMethod(
  866. "_ifValueWanted_",
  867. smalltalk.method({
  868. selector: "ifValueWanted:",
  869. category: 'compilation DSL',
  870. fn: function (aBlock){
  871. var self=this;
  872. smalltalk.send(self['@target'], "_ifNotNil_", [aBlock]);
  873. return self;},
  874. args: ["aBlock"],
  875. source: "ifValueWanted: aBlock\x0a\x09target ifNotNil: aBlock",
  876. messageSends: ["ifNotNil:"],
  877. referencedClasses: []
  878. }),
  879. smalltalk.ImpCodeGenerator);
  880. smalltalk.addMethod(
  881. "_initialize",
  882. smalltalk.method({
  883. selector: "initialize",
  884. category: 'initialization',
  885. fn: function (){
  886. var self=this;
  887. smalltalk.send(self, "_initialize", [], smalltalk.ImpCodeGenerator.superclass || nil);
  888. (self['@stream']=smalltalk.send("", "_writeStream", []));
  889. (self['@unknownVariables']=[]);
  890. (self['@tempVariables']=[]);
  891. (self['@argVariables']=[]);
  892. (self['@messageSends']=[]);
  893. (self['@classReferenced']=[]);
  894. (self['@mutables']=smalltalk.send((smalltalk.Set || Set), "_new", []));
  895. (self['@realVarNames']=smalltalk.send((smalltalk.Set || Set), "_new", []));
  896. (self['@lazyVars']=smalltalk.send((smalltalk.HashedCollection || HashedCollection), "_new", []));
  897. (self['@target']=nil);
  898. return self;},
  899. args: [],
  900. source: "initialize\x0a\x09super initialize.\x0a\x09stream := '' writeStream. \x0a\x09unknownVariables := #().\x0a\x09tempVariables := #().\x0a\x09argVariables := #().\x0a\x09messageSends := #().\x0a\x09classReferenced := #().\x0a\x09mutables := Set new.\x0a\x09realVarNames := Set new.\x0a\x09lazyVars := HashedCollection new.\x0a\x09target := nil\x0a",
  901. messageSends: ["initialize", "writeStream", "new"],
  902. referencedClasses: ["Set", "HashedCollection"]
  903. }),
  904. smalltalk.ImpCodeGenerator);
  905. smalltalk.addMethod(
  906. "_inline_receiver_argumentNodes_",
  907. smalltalk.method({
  908. selector: "inline:receiver:argumentNodes:",
  909. category: 'optimizations',
  910. fn: function (aSelector, receiver, aCollection){
  911. var self=this;
  912. var $early={};
  913. try{((($receiver = smalltalk.send(aSelector, "__eq", ["ifFalse:"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_checkClass_for_includeIf_", ["Boolean", receiver, false]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_nodes", []), "_first", [])]);})]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_nilIfValueWanted", []);})]);return (function(){throw $early=[true]})();})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_checkClass_for_includeIf_", ["Boolean", receiver, false]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_nodes", []), "_first", [])]);})]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_nilIfValueWanted", []);})]);return (function(){throw $early=[true]})();})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_checkClass_for_includeIf_", ["Boolean", receiver, false]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_nodes", []), "_first", [])]);})]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_nilIfValueWanted", []);})]);return (function(){throw $early=[true]})();})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_checkClass_for_includeIf_", ["Boolean", receiver, false]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_nodes", []), "_first", [])]);})]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_nilIfValueWanted", []);})]);return (function(){throw $early=[true]})();})]));})]));
  914. ((($receiver = smalltalk.send(aSelector, "__eq", ["ifTrue:"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_checkClass_for_includeIf_", ["Boolean", receiver, true]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_nodes", []), "_first", [])]);})]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_nilIfValueWanted", []);})]);return (function(){throw $early=[true]})();})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_checkClass_for_includeIf_", ["Boolean", receiver, true]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_nodes", []), "_first", [])]);})]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_nilIfValueWanted", []);})]);return (function(){throw $early=[true]})();})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_checkClass_for_includeIf_", ["Boolean", receiver, true]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_nodes", []), "_first", [])]);})]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_nilIfValueWanted", []);})]);return (function(){throw $early=[true]})();})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_checkClass_for_includeIf_", ["Boolean", receiver, true]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_nodes", []), "_first", [])]);})]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_nilIfValueWanted", []);})]);return (function(){throw $early=[true]})();})]));})]));
  915. ((($receiver = smalltalk.send(aSelector, "__eq", ["ifTrue:ifFalse:"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", []), "_and_", [(function(){return smalltalk.send(smalltalk.send(aCollection, "_second", []), "_isBlockNode", []);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_checkClass_for_includeIf_", ["Boolean", receiver, true]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_nodes", []), "_first", [])]);})]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_second", []), "_nodes", []), "_first", [])]);})]);return (function(){throw $early=[true]})();})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_checkClass_for_includeIf_", ["Boolean", receiver, true]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_nodes", []), "_first", [])]);})]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_second", []), "_nodes", []), "_first", [])]);})]);return (function(){throw $early=[true]})();})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", []), "_and_", [(function(){return smalltalk.send(smalltalk.send(aCollection, "_second", []), "_isBlockNode", []);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_checkClass_for_includeIf_", ["Boolean", receiver, true]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_nodes", []), "_first", [])]);})]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_second", []), "_nodes", []), "_first", [])]);})]);return (function(){throw $early=[true]})();})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_checkClass_for_includeIf_", ["Boolean", receiver, true]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_nodes", []), "_first", [])]);})]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_second", []), "_nodes", []), "_first", [])]);})]);return (function(){throw $early=[true]})();})]));})]));
  916. ((($receiver = smalltalk.send(aSelector, "__eq", ["ifFalse:ifTrue:"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", []), "_and_", [(function(){return smalltalk.send(smalltalk.send(aCollection, "_second", []), "_isBlockNode", []);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_checkClass_for_includeIf_", ["Boolean", receiver, false]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_nodes", []), "_first", [])]);})]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_second", []), "_nodes", []), "_first", [])]);})]);return (function(){throw $early=[true]})();})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_checkClass_for_includeIf_", ["Boolean", receiver, false]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_nodes", []), "_first", [])]);})]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_second", []), "_nodes", []), "_first", [])]);})]);return (function(){throw $early=[true]})();})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", []), "_and_", [(function(){return smalltalk.send(smalltalk.send(aCollection, "_second", []), "_isBlockNode", []);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_checkClass_for_includeIf_", ["Boolean", receiver, false]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_nodes", []), "_first", [])]);})]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_second", []), "_nodes", []), "_first", [])]);})]);return (function(){throw $early=[true]})();})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_checkClass_for_includeIf_", ["Boolean", receiver, false]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_nodes", []), "_first", [])]);})]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_second", []), "_nodes", []), "_first", [])]);})]);return (function(){throw $early=[true]})();})]));})]));
  917. ((($receiver = smalltalk.send(aSelector, "__eq", ["<"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){var operand=nil;
  918. (operand=smalltalk.send(self, "_isolatedUse_", [smalltalk.send(aCollection, "_first", [])]));smalltalk.send(self, "_checkClass_for_", ["Number", receiver]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_lazyAssignExpression_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("(", "__comma", [smalltalk.send(self, "_useValueNamed_", [receiver])]), "__comma", ["<"]), "__comma", [operand]), "__comma", [")"])]);})]);return (function(){throw $early=[[smalltalk.send(smalltalk.send((smalltalk.VerbatimNode || VerbatimNode), "_new", []), "_value_", [operand])]]})();})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){var operand=nil;
  919. (operand=smalltalk.send(self, "_isolatedUse_", [smalltalk.send(aCollection, "_first", [])]));smalltalk.send(self, "_checkClass_for_", ["Number", receiver]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_lazyAssignExpression_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("(", "__comma", [smalltalk.send(self, "_useValueNamed_", [receiver])]), "__comma", ["<"]), "__comma", [operand]), "__comma", [")"])]);})]);return (function(){throw $early=[[smalltalk.send(smalltalk.send((smalltalk.VerbatimNode || VerbatimNode), "_new", []), "_value_", [operand])]]})();})]));
  920. ((($receiver = smalltalk.send(aSelector, "__eq", ["<="])).klass === smalltalk.Boolean) ? ($receiver ? (function(){var operand=nil;
  921. (operand=smalltalk.send(self, "_isolatedUse_", [smalltalk.send(aCollection, "_first", [])]));smalltalk.send(self, "_checkClass_for_", ["Number", receiver]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_lazyAssignExpression_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("(", "__comma", [smalltalk.send(self, "_useValueNamed_", [receiver])]), "__comma", ["<="]), "__comma", [operand]), "__comma", [")"])]);})]);return (function(){throw $early=[[smalltalk.send(smalltalk.send((smalltalk.VerbatimNode || VerbatimNode), "_new", []), "_value_", [operand])]]})();})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){var operand=nil;
  922. (operand=smalltalk.send(self, "_isolatedUse_", [smalltalk.send(aCollection, "_first", [])]));smalltalk.send(self, "_checkClass_for_", ["Number", receiver]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_lazyAssignExpression_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("(", "__comma", [smalltalk.send(self, "_useValueNamed_", [receiver])]), "__comma", ["<="]), "__comma", [operand]), "__comma", [")"])]);})]);return (function(){throw $early=[[smalltalk.send(smalltalk.send((smalltalk.VerbatimNode || VerbatimNode), "_new", []), "_value_", [operand])]]})();})]));
  923. ((($receiver = smalltalk.send(aSelector, "__eq", [">"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){var operand=nil;
  924. (operand=smalltalk.send(self, "_isolatedUse_", [smalltalk.send(aCollection, "_first", [])]));smalltalk.send(self, "_checkClass_for_", ["Number", receiver]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_lazyAssignExpression_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("(", "__comma", [smalltalk.send(self, "_useValueNamed_", [receiver])]), "__comma", [">"]), "__comma", [operand]), "__comma", [")"])]);})]);return (function(){throw $early=[[smalltalk.send(smalltalk.send((smalltalk.VerbatimNode || VerbatimNode), "_new", []), "_value_", [operand])]]})();})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){var operand=nil;
  925. (operand=smalltalk.send(self, "_isolatedUse_", [smalltalk.send(aCollection, "_first", [])]));smalltalk.send(self, "_checkClass_for_", ["Number", receiver]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_lazyAssignExpression_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("(", "__comma", [smalltalk.send(self, "_useValueNamed_", [receiver])]), "__comma", [">"]), "__comma", [operand]), "__comma", [")"])]);})]);return (function(){throw $early=[[smalltalk.send(smalltalk.send((smalltalk.VerbatimNode || VerbatimNode), "_new", []), "_value_", [operand])]]})();})]));
  926. ((($receiver = smalltalk.send(aSelector, "__eq", [">="])).klass === smalltalk.Boolean) ? ($receiver ? (function(){var operand=nil;
  927. (operand=smalltalk.send(self, "_isolatedUse_", [smalltalk.send(aCollection, "_first", [])]));smalltalk.send(self, "_checkClass_for_", ["Number", receiver]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_lazyAssignExpression_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("(", "__comma", [smalltalk.send(self, "_useValueNamed_", [receiver])]), "__comma", [">="]), "__comma", [operand]), "__comma", [")"])]);})]);return (function(){throw $early=[[smalltalk.send(smalltalk.send((smalltalk.VerbatimNode || VerbatimNode), "_new", []), "_value_", [operand])]]})();})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){var operand=nil;
  928. (operand=smalltalk.send(self, "_isolatedUse_", [smalltalk.send(aCollection, "_first", [])]));smalltalk.send(self, "_checkClass_for_", ["Number", receiver]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_lazyAssignExpression_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("(", "__comma", [smalltalk.send(self, "_useValueNamed_", [receiver])]), "__comma", [">="]), "__comma", [operand]), "__comma", [")"])]);})]);return (function(){throw $early=[[smalltalk.send(smalltalk.send((smalltalk.VerbatimNode || VerbatimNode), "_new", []), "_value_", [operand])]]})();})]));
  929. ((($receiver = smalltalk.send(aSelector, "__eq", ["+"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){var operand=nil;
  930. (operand=smalltalk.send(self, "_isolatedUse_", [smalltalk.send(aCollection, "_first", [])]));smalltalk.send(self, "_checkClass_for_", ["Number", receiver]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_lazyAssignExpression_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("(", "__comma", [smalltalk.send(self, "_useValueNamed_", [receiver])]), "__comma", ["+"]), "__comma", [operand]), "__comma", [")"])]);})]);return (function(){throw $early=[[smalltalk.send(smalltalk.send((smalltalk.VerbatimNode || VerbatimNode), "_new", []), "_value_", [operand])]]})();})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){var operand=nil;
  931. (operand=smalltalk.send(self, "_isolatedUse_", [smalltalk.send(aCollection, "_first", [])]));smalltalk.send(self, "_checkClass_for_", ["Number", receiver]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_lazyAssignExpression_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("(", "__comma", [smalltalk.send(self, "_useValueNamed_", [receiver])]), "__comma", ["+"]), "__comma", [operand]), "__comma", [")"])]);})]);return (function(){throw $early=[[smalltalk.send(smalltalk.send((smalltalk.VerbatimNode || VerbatimNode), "_new", []), "_value_", [operand])]]})();})]));
  932. ((($receiver = smalltalk.send(aSelector, "__eq", ["-"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){var operand=nil;
  933. (operand=smalltalk.send(self, "_isolatedUse_", [smalltalk.send(aCollection, "_first", [])]));smalltalk.send(self, "_checkClass_for_", ["Number", receiver]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_lazyAssignExpression_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("(", "__comma", [smalltalk.send(self, "_useValueNamed_", [receiver])]), "__comma", ["-"]), "__comma", [operand]), "__comma", [")"])]);})]);return (function(){throw $early=[[smalltalk.send(smalltalk.send((smalltalk.VerbatimNode || VerbatimNode), "_new", []), "_value_", [operand])]]})();})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){var operand=nil;
  934. (operand=smalltalk.send(self, "_isolatedUse_", [smalltalk.send(aCollection, "_first", [])]));smalltalk.send(self, "_checkClass_for_", ["Number", receiver]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_lazyAssignExpression_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("(", "__comma", [smalltalk.send(self, "_useValueNamed_", [receiver])]), "__comma", ["-"]), "__comma", [operand]), "__comma", [")"])]);})]);return (function(){throw $early=[[smalltalk.send(smalltalk.send((smalltalk.VerbatimNode || VerbatimNode), "_new", []), "_value_", [operand])]]})();})]));
  935. ((($receiver = smalltalk.send(aSelector, "__eq", ["*"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){var operand=nil;
  936. (operand=smalltalk.send(self, "_isolatedUse_", [smalltalk.send(aCollection, "_first", [])]));smalltalk.send(self, "_checkClass_for_", ["Number", receiver]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_lazyAssignExpression_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("(", "__comma", [smalltalk.send(self, "_useValueNamed_", [receiver])]), "__comma", ["*"]), "__comma", [operand]), "__comma", [")"])]);})]);return (function(){throw $early=[[smalltalk.send(smalltalk.send((smalltalk.VerbatimNode || VerbatimNode), "_new", []), "_value_", [operand])]]})();})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){var operand=nil;
  937. (operand=smalltalk.send(self, "_isolatedUse_", [smalltalk.send(aCollection, "_first", [])]));smalltalk.send(self, "_checkClass_for_", ["Number", receiver]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_lazyAssignExpression_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("(", "__comma", [smalltalk.send(self, "_useValueNamed_", [receiver])]), "__comma", ["*"]), "__comma", [operand]), "__comma", [")"])]);})]);return (function(){throw $early=[[smalltalk.send(smalltalk.send((smalltalk.VerbatimNode || VerbatimNode), "_new", []), "_value_", [operand])]]})();})]));
  938. ((($receiver = smalltalk.send(aSelector, "__eq", ["/"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){var operand=nil;
  939. (operand=smalltalk.send(self, "_isolatedUse_", [smalltalk.send(aCollection, "_first", [])]));smalltalk.send(self, "_checkClass_for_", ["Number", receiver]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_lazyAssignExpression_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("(", "__comma", [smalltalk.send(self, "_useValueNamed_", [receiver])]), "__comma", ["/"]), "__comma", [operand]), "__comma", [")"])]);})]);return (function(){throw $early=[[smalltalk.send(smalltalk.send((smalltalk.VerbatimNode || VerbatimNode), "_new", []), "_value_", [operand])]]})();})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){var operand=nil;
  940. (operand=smalltalk.send(self, "_isolatedUse_", [smalltalk.send(aCollection, "_first", [])]));smalltalk.send(self, "_checkClass_for_", ["Number", receiver]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_lazyAssignExpression_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("(", "__comma", [smalltalk.send(self, "_useValueNamed_", [receiver])]), "__comma", ["/"]), "__comma", [operand]), "__comma", [")"])]);})]);return (function(){throw $early=[[smalltalk.send(smalltalk.send((smalltalk.VerbatimNode || VerbatimNode), "_new", []), "_value_", [operand])]]})();})]));
  941. return nil;
  942. return self;
  943. } catch(e) {if(e===$early)return e[0]; throw e}},
  944. args: ["aSelector", "receiver", "aCollection"],
  945. source: "inline: aSelector receiver: receiver argumentNodes: aCollection\x0a\x0a\x09\x22-- Booleans --\x22\x0a\x0a\x09(aSelector = 'ifFalse:') ifTrue: [\x0a\x09\x09aCollection first isBlockNode ifTrue: [\x0a\x09\x09\x09self checkClass: 'Boolean' for: receiver includeIf: false.\x0a\x09\x09\x09self prvPutAndElse: [ self visit: aCollection first nodes first ].\x0a\x09\x09\x09self prvPutAndElse: [ self nilIfValueWanted ].\x0a\x09\x09\x09^true]].\x0a\x0a\x09(aSelector = 'ifTrue:') ifTrue: [\x0a\x09\x09aCollection first isBlockNode ifTrue: [\x0a\x09\x09\x09self checkClass: 'Boolean' for: receiver includeIf: true.\x0a\x09\x09\x09self prvPutAndElse: [ self visit: aCollection first nodes first ].\x0a\x09\x09\x09self prvPutAndElse: [ self nilIfValueWanted ].\x0a\x09\x09\x09^true]].\x0a\x0a\x09(aSelector = 'ifTrue:ifFalse:') ifTrue: [\x0a\x09\x09(aCollection first isBlockNode and: [aCollection second isBlockNode]) ifTrue: [\x0a\x09\x09\x09self checkClass: 'Boolean' for: receiver includeIf: true.\x0a\x09\x09\x09self prvPutAndElse: [ self visit: aCollection first nodes first ].\x0a\x09\x09\x09self prvPutAndElse: [ self visit: aCollection second nodes first ].\x0a\x09\x09\x09^true]].\x0a\x0a\x09(aSelector = 'ifFalse:ifTrue:') ifTrue: [\x0a\x09\x09(aCollection first isBlockNode and: [aCollection second isBlockNode]) ifTrue: [\x0a\x09\x09\x09self checkClass: 'Boolean' for: receiver includeIf: false.\x0a\x09\x09\x09self prvPutAndElse: [ self visit: aCollection first nodes first ].\x0a\x09\x09\x09self prvPutAndElse: [ self visit: aCollection second nodes first ].\x0a\x09\x09\x09^true]].\x0a\x0a\x09\x22-- Numbers --\x22\x0a\x0a\x09(aSelector = '<') ifTrue: [ | operand |\x0a\x09\x09operand := self isolatedUse: aCollection first.\x0a\x09\x09self checkClass: 'Number' for: receiver.\x0a\x09\x09self prvPutAndElse: [\x0a\x09\x09\x09self lazyAssignExpression: '(', (self useValueNamed: receiver), '<', operand, ')' ].\x0a\x09\x09^{ VerbatimNode new value: operand }].\x0a\x0a\x09(aSelector = '<=') ifTrue: [ | operand |\x0a\x09\x09operand := self isolatedUse: aCollection first.\x0a\x09\x09self checkClass: 'Number' for: receiver.\x0a\x09\x09self prvPutAndElse: [\x0a\x09\x09\x09self lazyAssignExpression: '(', (self useValueNamed: receiver), '<=', operand, ')' ].\x0a\x09\x09^{ VerbatimNode new value: operand }].\x0a\x0a\x09(aSelector = '>') ifTrue: [ | operand |\x0a\x09\x09operand := self isolatedUse: aCollection first.\x0a\x09\x09self checkClass: 'Number' for: receiver.\x0a\x09\x09self prvPutAndElse: [\x0a\x09\x09\x09self lazyAssignExpression: '(', (self useValueNamed: receiver), '>', operand, ')' ].\x0a\x09\x09^{ VerbatimNode new value: operand }].\x0a\x0a\x09(aSelector = '>=') ifTrue: [ | operand |\x0a\x09\x09operand := self isolatedUse: aCollection first.\x0a\x09\x09self checkClass: 'Number' for: receiver.\x0a\x09\x09self prvPutAndElse: [\x0a\x09\x09\x09self lazyAssignExpression: '(', (self useValueNamed: receiver), '>=', operand, ')' ].\x0a\x09\x09^{ VerbatimNode new value: operand }].\x0a\x0a (aSelector = '+') ifTrue: [ | operand |\x0a\x09\x09operand := self isolatedUse: aCollection first.\x0a\x09\x09self checkClass: 'Number' for: receiver.\x0a\x09\x09self prvPutAndElse: [\x0a\x09\x09\x09self lazyAssignExpression: '(', (self useValueNamed: receiver), '+', operand, ')' ].\x0a\x09\x09^{ VerbatimNode new value: operand }].\x0a\x0a (aSelector = '-') ifTrue: [ | operand |\x0a\x09\x09operand := self isolatedUse: aCollection first.\x0a\x09\x09self checkClass: 'Number' for: receiver.\x0a\x09\x09self prvPutAndElse: [\x0a\x09\x09\x09self lazyAssignExpression: '(', (self useValueNamed: receiver), '-', operand, ')' ].\x0a\x09\x09^{ VerbatimNode new value: operand }].\x0a\x0a (aSelector = '*') ifTrue: [ | operand |\x0a\x09\x09operand := self isolatedUse: aCollection first.\x0a\x09\x09self checkClass: 'Number' for: receiver.\x0a\x09\x09self prvPutAndElse: [\x0a\x09\x09\x09self lazyAssignExpression: '(', (self useValueNamed: receiver), '*', operand, ')' ].\x0a\x09\x09^{ VerbatimNode new value: operand }].\x0a\x0a (aSelector = '/') ifTrue: [ | operand |\x0a\x09\x09operand := self isolatedUse: aCollection first.\x0a\x09\x09self checkClass: 'Number' for: receiver.\x0a\x09\x09self prvPutAndElse: [\x0a\x09\x09\x09self lazyAssignExpression: '(', (self useValueNamed: receiver), '/', operand, ')' ].\x0a\x09\x09^{ VerbatimNode new value: operand }].\x0a\x0a ^nil",
  946. messageSends: ["ifTrue:", "=", "isBlockNode", "first", "checkClass:for:includeIf:", "prvPutAndElse:", "visit:", "nodes", "nilIfValueWanted", "and:", "second", "isolatedUse:", "checkClass:for:", "lazyAssignExpression:", ",", "useValueNamed:", "value:", "new"],
  947. referencedClasses: ["VerbatimNode"]
  948. }),
  949. smalltalk.ImpCodeGenerator);
  950. smalltalk.addMethod(
  951. "_inlineLiteral_receiverNode_argumentNodes_",
  952. smalltalk.method({
  953. selector: "inlineLiteral:receiverNode:argumentNodes:",
  954. category: 'optimizations',
  955. fn: function (aSelector, anObject, aCollection){
  956. var self=this;
  957. var inlined=nil;
  958. (inlined=false);
  959. ((($receiver = smalltalk.send(aSelector, "__eq", ["whileTrue:"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(smalltalk.send(anObject, "_isBlockNode", []), "_and_", [(function(){return smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", []);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){var old=nil;
  960. smalltalk.send(self, "_prvWhileConditionStatement_pre_condition_post_", ["for(;;){", "if (!(", anObject, ")) {"]);smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send("break}", "__comma", [smalltalk.send(self, "_mylf", [])])]);smalltalk.send(self, "_prvPutAndClose_", [(function(){return smalltalk.send(self, "_visit_targetBeing_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_nodes", []), "_first", []), nil]);})]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){var old=nil;
  961. smalltalk.send(self, "_prvWhileConditionStatement_pre_condition_post_", ["for(;;){", "if (!(", anObject, ")) {"]);smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send("break}", "__comma", [smalltalk.send(self, "_mylf", [])])]);smalltalk.send(self, "_prvPutAndClose_", [(function(){return smalltalk.send(self, "_visit_targetBeing_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_nodes", []), "_first", []), nil]);})]);return (inlined=true);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(smalltalk.send(anObject, "_isBlockNode", []), "_and_", [(function(){return smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", []);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){var old=nil;
  962. smalltalk.send(self, "_prvWhileConditionStatement_pre_condition_post_", ["for(;;){", "if (!(", anObject, ")) {"]);smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send("break}", "__comma", [smalltalk.send(self, "_mylf", [])])]);smalltalk.send(self, "_prvPutAndClose_", [(function(){return smalltalk.send(self, "_visit_targetBeing_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_nodes", []), "_first", []), nil]);})]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){var old=nil;
  963. smalltalk.send(self, "_prvWhileConditionStatement_pre_condition_post_", ["for(;;){", "if (!(", anObject, ")) {"]);smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send("break}", "__comma", [smalltalk.send(self, "_mylf", [])])]);smalltalk.send(self, "_prvPutAndClose_", [(function(){return smalltalk.send(self, "_visit_targetBeing_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_nodes", []), "_first", []), nil]);})]);return (inlined=true);})]));})]));
  964. ((($receiver = smalltalk.send(aSelector, "__eq", ["whileFalse:"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(smalltalk.send(anObject, "_isBlockNode", []), "_and_", [(function(){return smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", []);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){var old=nil;
  965. smalltalk.send(self, "_prvWhileConditionStatement_pre_condition_post_", ["for(;;){", "if ((", anObject, ")) {"]);smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send("break}", "__comma", [smalltalk.send(self, "_mylf", [])])]);smalltalk.send(self, "_prvPutAndClose_", [(function(){return smalltalk.send(self, "_visit_targetBeing_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_nodes", []), "_first", []), nil]);})]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){var old=nil;
  966. smalltalk.send(self, "_prvWhileConditionStatement_pre_condition_post_", ["for(;;){", "if ((", anObject, ")) {"]);smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send("break}", "__comma", [smalltalk.send(self, "_mylf", [])])]);smalltalk.send(self, "_prvPutAndClose_", [(function(){return smalltalk.send(self, "_visit_targetBeing_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_nodes", []), "_first", []), nil]);})]);return (inlined=true);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(smalltalk.send(anObject, "_isBlockNode", []), "_and_", [(function(){return smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", []);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){var old=nil;
  967. smalltalk.send(self, "_prvWhileConditionStatement_pre_condition_post_", ["for(;;){", "if ((", anObject, ")) {"]);smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send("break}", "__comma", [smalltalk.send(self, "_mylf", [])])]);smalltalk.send(self, "_prvPutAndClose_", [(function(){return smalltalk.send(self, "_visit_targetBeing_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_nodes", []), "_first", []), nil]);})]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){var old=nil;
  968. smalltalk.send(self, "_prvWhileConditionStatement_pre_condition_post_", ["for(;;){", "if ((", anObject, ")) {"]);smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send("break}", "__comma", [smalltalk.send(self, "_mylf", [])])]);smalltalk.send(self, "_prvPutAndClose_", [(function(){return smalltalk.send(self, "_visit_targetBeing_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_nodes", []), "_first", []), nil]);})]);return (inlined=true);})]));})]));
  969. ((($receiver = smalltalk.send(aSelector, "__eq", ["whileTrue"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(anObject, "_isBlockNode", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_prvWhileConditionStatement_pre_condition_post_", ["do{", "}while((", anObject, smalltalk.send("));", "__comma", [smalltalk.send(self, "_mylf", [])])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_prvWhileConditionStatement_pre_condition_post_", ["do{", "}while((", anObject, smalltalk.send("));", "__comma", [smalltalk.send(self, "_mylf", [])])]);return (inlined=true);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(anObject, "_isBlockNode", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_prvWhileConditionStatement_pre_condition_post_", ["do{", "}while((", anObject, smalltalk.send("));", "__comma", [smalltalk.send(self, "_mylf", [])])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_prvWhileConditionStatement_pre_condition_post_", ["do{", "}while((", anObject, smalltalk.send("));", "__comma", [smalltalk.send(self, "_mylf", [])])]);return (inlined=true);})]));})]));
  970. ((($receiver = smalltalk.send(aSelector, "__eq", ["whileFalse"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(anObject, "_isBlockNode", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_prvWhileConditionStatement_pre_condition_post_", ["do{", "}while(!(", anObject, smalltalk.send("));", "__comma", [smalltalk.send(self, "_mylf", [])])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_prvWhileConditionStatement_pre_condition_post_", ["do{", "}while(!(", anObject, smalltalk.send("));", "__comma", [smalltalk.send(self, "_mylf", [])])]);return (inlined=true);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(anObject, "_isBlockNode", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_prvWhileConditionStatement_pre_condition_post_", ["do{", "}while(!(", anObject, smalltalk.send("));", "__comma", [smalltalk.send(self, "_mylf", [])])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_prvWhileConditionStatement_pre_condition_post_", ["do{", "}while(!(", anObject, smalltalk.send("));", "__comma", [smalltalk.send(self, "_mylf", [])])]);return (inlined=true);})]));})]));
  971. ((($receiver = smalltalk.send(["+", "-", "*", "/", "<", "<=", ">=", ">"], "_includes_", [aSelector])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(self, "_prvInlineNumberOperator_on_and_", [aSelector, anObject, smalltalk.send(aCollection, "_first", [])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (inlined=true);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(self, "_prvInlineNumberOperator_on_and_", [aSelector, anObject, smalltalk.send(aCollection, "_first", [])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (inlined=true);})]));})]));
  972. ((($receiver = smalltalk.send(aSelector, "__eq", ["ifNil:"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){var rcv=nil;
  973. smalltalk.send(self, "_aboutToModifyState", []);(rcv=smalltalk.send(self, "_isolatedUse_", [anObject]));((($receiver = smalltalk.send(rcv, "__eq", ["super"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (rcv="self");})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (rcv="self");})]));smalltalk.send(self, "_makeTargetRealVariable", []);smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("if((", "__comma", [rcv]), "__comma", [") === nil || ("]), "__comma", [rcv]), "__comma", [") == null) {"])]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_nodes", []), "_first", [])]);})]);smalltalk.send(self, "_prvPutAndClose_", [(function(){return smalltalk.send(self, "_lazyAssignValue_", [rcv]);})]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){var rcv=nil;
  974. smalltalk.send(self, "_aboutToModifyState", []);(rcv=smalltalk.send(self, "_isolatedUse_", [anObject]));((($receiver = smalltalk.send(rcv, "__eq", ["super"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (rcv="self");})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (rcv="self");})]));smalltalk.send(self, "_makeTargetRealVariable", []);smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("if((", "__comma", [rcv]), "__comma", [") === nil || ("]), "__comma", [rcv]), "__comma", [") == null) {"])]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_nodes", []), "_first", [])]);})]);smalltalk.send(self, "_prvPutAndClose_", [(function(){return smalltalk.send(self, "_lazyAssignValue_", [rcv]);})]);return (inlined=true);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){var rcv=nil;
  975. smalltalk.send(self, "_aboutToModifyState", []);(rcv=smalltalk.send(self, "_isolatedUse_", [anObject]));((($receiver = smalltalk.send(rcv, "__eq", ["super"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (rcv="self");})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (rcv="self");})]));smalltalk.send(self, "_makeTargetRealVariable", []);smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("if((", "__comma", [rcv]), "__comma", [") === nil || ("]), "__comma", [rcv]), "__comma", [") == null) {"])]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_nodes", []), "_first", [])]);})]);smalltalk.send(self, "_prvPutAndClose_", [(function(){return smalltalk.send(self, "_lazyAssignValue_", [rcv]);})]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){var rcv=nil;
  976. smalltalk.send(self, "_aboutToModifyState", []);(rcv=smalltalk.send(self, "_isolatedUse_", [anObject]));((($receiver = smalltalk.send(rcv, "__eq", ["super"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (rcv="self");})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (rcv="self");})]));smalltalk.send(self, "_makeTargetRealVariable", []);smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("if((", "__comma", [rcv]), "__comma", [") === nil || ("]), "__comma", [rcv]), "__comma", [") == null) {"])]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_nodes", []), "_first", [])]);})]);smalltalk.send(self, "_prvPutAndClose_", [(function(){return smalltalk.send(self, "_lazyAssignValue_", [rcv]);})]);return (inlined=true);})]));})]));
  977. ((($receiver = smalltalk.send(aSelector, "__eq", ["ifNotNil:"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){var rcv=nil;
  978. smalltalk.send(self, "_aboutToModifyState", []);(rcv=smalltalk.send(self, "_isolatedUse_", [anObject]));((($receiver = smalltalk.send(rcv, "__eq", ["super"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (rcv="self");})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (rcv="self");})]));smalltalk.send(self, "_makeTargetRealVariable", []);smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("if((", "__comma", [rcv]), "__comma", [") !== nil && ("]), "__comma", [rcv]), "__comma", [") != null) {"])]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_nodes", []), "_first", [])]);})]);smalltalk.send(self, "_prvPutAndClose_", [(function(){return smalltalk.send(self, "_lazyAssignValue_", [rcv]);})]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){var rcv=nil;
  979. smalltalk.send(self, "_aboutToModifyState", []);(rcv=smalltalk.send(self, "_isolatedUse_", [anObject]));((($receiver = smalltalk.send(rcv, "__eq", ["super"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (rcv="self");})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (rcv="self");})]));smalltalk.send(self, "_makeTargetRealVariable", []);smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("if((", "__comma", [rcv]), "__comma", [") !== nil && ("]), "__comma", [rcv]), "__comma", [") != null) {"])]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_nodes", []), "_first", [])]);})]);smalltalk.send(self, "_prvPutAndClose_", [(function(){return smalltalk.send(self, "_lazyAssignValue_", [rcv]);})]);return (inlined=true);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){var rcv=nil;
  980. smalltalk.send(self, "_aboutToModifyState", []);(rcv=smalltalk.send(self, "_isolatedUse_", [anObject]));((($receiver = smalltalk.send(rcv, "__eq", ["super"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (rcv="self");})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (rcv="self");})]));smalltalk.send(self, "_makeTargetRealVariable", []);smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("if((", "__comma", [rcv]), "__comma", [") !== nil && ("]), "__comma", [rcv]), "__comma", [") != null) {"])]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_nodes", []), "_first", [])]);})]);smalltalk.send(self, "_prvPutAndClose_", [(function(){return smalltalk.send(self, "_lazyAssignValue_", [rcv]);})]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){var rcv=nil;
  981. smalltalk.send(self, "_aboutToModifyState", []);(rcv=smalltalk.send(self, "_isolatedUse_", [anObject]));((($receiver = smalltalk.send(rcv, "__eq", ["super"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (rcv="self");})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (rcv="self");})]));smalltalk.send(self, "_makeTargetRealVariable", []);smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("if((", "__comma", [rcv]), "__comma", [") !== nil && ("]), "__comma", [rcv]), "__comma", [") != null) {"])]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_nodes", []), "_first", [])]);})]);smalltalk.send(self, "_prvPutAndClose_", [(function(){return smalltalk.send(self, "_lazyAssignValue_", [rcv]);})]);return (inlined=true);})]));})]));
  982. ((($receiver = smalltalk.send(aSelector, "__eq", ["ifNil:ifNotNil:"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", []), "_and_", [(function(){return smalltalk.send(smalltalk.send(aCollection, "_second", []), "_isBlockNode", []);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){var rcv=nil;
  983. smalltalk.send(self, "_aboutToModifyState", []);(rcv=smalltalk.send(self, "_isolatedUse_", [anObject]));((($receiver = smalltalk.send(rcv, "__eq", ["super"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (rcv="self");})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (rcv="self");})]));smalltalk.send(self, "_makeTargetRealVariable", []);smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("if((", "__comma", [rcv]), "__comma", [") === nil || ("]), "__comma", [rcv]), "__comma", [") == null) {"])]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_nodes", []), "_first", [])]);})]);smalltalk.send(self, "_prvPutAndClose_", [(function(){return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_second", []), "_nodes", []), "_first", [])]);})]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){var rcv=nil;
  984. smalltalk.send(self, "_aboutToModifyState", []);(rcv=smalltalk.send(self, "_isolatedUse_", [anObject]));((($receiver = smalltalk.send(rcv, "__eq", ["super"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (rcv="self");})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (rcv="self");})]));smalltalk.send(self, "_makeTargetRealVariable", []);smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("if((", "__comma", [rcv]), "__comma", [") === nil || ("]), "__comma", [rcv]), "__comma", [") == null) {"])]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_nodes", []), "_first", [])]);})]);smalltalk.send(self, "_prvPutAndClose_", [(function(){return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_second", []), "_nodes", []), "_first", [])]);})]);return (inlined=true);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", []), "_and_", [(function(){return smalltalk.send(smalltalk.send(aCollection, "_second", []), "_isBlockNode", []);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){var rcv=nil;
  985. smalltalk.send(self, "_aboutToModifyState", []);(rcv=smalltalk.send(self, "_isolatedUse_", [anObject]));((($receiver = smalltalk.send(rcv, "__eq", ["super"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (rcv="self");})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (rcv="self");})]));smalltalk.send(self, "_makeTargetRealVariable", []);smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("if((", "__comma", [rcv]), "__comma", [") === nil || ("]), "__comma", [rcv]), "__comma", [") == null) {"])]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_nodes", []), "_first", [])]);})]);smalltalk.send(self, "_prvPutAndClose_", [(function(){return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_second", []), "_nodes", []), "_first", [])]);})]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){var rcv=nil;
  986. smalltalk.send(self, "_aboutToModifyState", []);(rcv=smalltalk.send(self, "_isolatedUse_", [anObject]));((($receiver = smalltalk.send(rcv, "__eq", ["super"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (rcv="self");})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (rcv="self");})]));smalltalk.send(self, "_makeTargetRealVariable", []);smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("if((", "__comma", [rcv]), "__comma", [") === nil || ("]), "__comma", [rcv]), "__comma", [") == null) {"])]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_nodes", []), "_first", [])]);})]);smalltalk.send(self, "_prvPutAndClose_", [(function(){return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_second", []), "_nodes", []), "_first", [])]);})]);return (inlined=true);})]));})]));
  987. ((($receiver = smalltalk.send(aSelector, "__eq", ["ifNotNil:ifNil:"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", []), "_and_", [(function(){return smalltalk.send(smalltalk.send(aCollection, "_second", []), "_isBlockNode", []);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){var rcv=nil;
  988. smalltalk.send(self, "_aboutToModifyState", []);(rcv=smalltalk.send(self, "_isolatedUse_", [anObject]));((($receiver = smalltalk.send(rcv, "__eq", ["super"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (rcv="self");})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (rcv="self");})]));smalltalk.send(self, "_makeTargetRealVariable", []);smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("if((", "__comma", [rcv]), "__comma", [") !== nil && ("]), "__comma", [rcv]), "__comma", [") != null) {"])]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_nodes", []), "_first", [])]);})]);smalltalk.send(self, "_prvPutAndClose_", [(function(){return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_second", []), "_nodes", []), "_first", [])]);})]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){var rcv=nil;
  989. smalltalk.send(self, "_aboutToModifyState", []);(rcv=smalltalk.send(self, "_isolatedUse_", [anObject]));((($receiver = smalltalk.send(rcv, "__eq", ["super"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (rcv="self");})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (rcv="self");})]));smalltalk.send(self, "_makeTargetRealVariable", []);smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("if((", "__comma", [rcv]), "__comma", [") !== nil && ("]), "__comma", [rcv]), "__comma", [") != null) {"])]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_nodes", []), "_first", [])]);})]);smalltalk.send(self, "_prvPutAndClose_", [(function(){return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_second", []), "_nodes", []), "_first", [])]);})]);return (inlined=true);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", []), "_and_", [(function(){return smalltalk.send(smalltalk.send(aCollection, "_second", []), "_isBlockNode", []);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){var rcv=nil;
  990. smalltalk.send(self, "_aboutToModifyState", []);(rcv=smalltalk.send(self, "_isolatedUse_", [anObject]));((($receiver = smalltalk.send(rcv, "__eq", ["super"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (rcv="self");})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (rcv="self");})]));smalltalk.send(self, "_makeTargetRealVariable", []);smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("if((", "__comma", [rcv]), "__comma", [") !== nil && ("]), "__comma", [rcv]), "__comma", [") != null) {"])]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_nodes", []), "_first", [])]);})]);smalltalk.send(self, "_prvPutAndClose_", [(function(){return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_second", []), "_nodes", []), "_first", [])]);})]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){var rcv=nil;
  991. smalltalk.send(self, "_aboutToModifyState", []);(rcv=smalltalk.send(self, "_isolatedUse_", [anObject]));((($receiver = smalltalk.send(rcv, "__eq", ["super"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (rcv="self");})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (rcv="self");})]));smalltalk.send(self, "_makeTargetRealVariable", []);smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("if((", "__comma", [rcv]), "__comma", [") !== nil && ("]), "__comma", [rcv]), "__comma", [") != null) {"])]);smalltalk.send(self, "_prvPutAndElse_", [(function(){return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_nodes", []), "_first", [])]);})]);smalltalk.send(self, "_prvPutAndClose_", [(function(){return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_second", []), "_nodes", []), "_first", [])]);})]);return (inlined=true);})]));})]));
  992. ((($receiver = smalltalk.send(aSelector, "__eq", ["isNil"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){var rcv=nil;
  993. (rcv=smalltalk.send(self, "_isolatedUse_", [anObject]));((($receiver = smalltalk.send(rcv, "__eq", ["super"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (rcv="self");})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (rcv="self");})]));smalltalk.send(self, "_lazyAssignValue_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("((", "__comma", [rcv]), "__comma", [") === nil || ("]), "__comma", [rcv]), "__comma", [") == null)"])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){var rcv=nil;
  994. (rcv=smalltalk.send(self, "_isolatedUse_", [anObject]));((($receiver = smalltalk.send(rcv, "__eq", ["super"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (rcv="self");})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (rcv="self");})]));smalltalk.send(self, "_lazyAssignValue_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("((", "__comma", [rcv]), "__comma", [") === nil || ("]), "__comma", [rcv]), "__comma", [") == null)"])]);return (inlined=true);})]));
  995. ((($receiver = smalltalk.send(aSelector, "__eq", ["notNil"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){var rcv=nil;
  996. (rcv=smalltalk.send(self, "_isolatedUse_", [anObject]));((($receiver = smalltalk.send(rcv, "__eq", ["super"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (rcv="self");})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (rcv="self");})]));smalltalk.send(self, "_lazyAssignValue_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("((", "__comma", [rcv]), "__comma", [") !== nil && ("]), "__comma", [rcv]), "__comma", [") != null)"])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){var rcv=nil;
  997. (rcv=smalltalk.send(self, "_isolatedUse_", [anObject]));((($receiver = smalltalk.send(rcv, "__eq", ["super"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (rcv="self");})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (rcv="self");})]));smalltalk.send(self, "_lazyAssignValue_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("((", "__comma", [rcv]), "__comma", [") !== nil && ("]), "__comma", [rcv]), "__comma", [") != null)"])]);return (inlined=true);})]));
  998. return inlined;
  999. return self;},
  1000. args: ["aSelector", "anObject", "aCollection"],
  1001. source: "inlineLiteral: aSelector receiverNode: anObject argumentNodes: aCollection\x0a | inlined |\x0a inlined := false.\x0a \x0a\x09\x22-- BlockClosures --\x22\x0a\x0a\x09(aSelector = 'whileTrue:') ifTrue: [\x0a \x09(anObject isBlockNode and: [aCollection first isBlockNode]) ifTrue: [ | old |\x0a\x09\x09\x09self prvWhileConditionStatement: 'for(;;){' pre: 'if (!(' condition: anObject post: ')) {'.\x0a\x09\x09\x09stream nextPutAll: 'break}', self mylf.\x0a\x09\x09\x09self prvPutAndClose: [ self visit: aCollection first nodes first targetBeing: nil ].\x0a\x09\x09\x09inlined := true]].\x0a\x0a\x09(aSelector = 'whileFalse:') ifTrue: [\x0a \x09(anObject isBlockNode and: [aCollection first isBlockNode]) ifTrue: [ | old |\x0a\x09\x09\x09self prvWhileConditionStatement: 'for(;;){' pre: 'if ((' condition: anObject post: ')) {'.\x0a\x09\x09\x09stream nextPutAll: 'break}', self mylf.\x0a\x09\x09\x09self prvPutAndClose: [ self visit: aCollection first nodes first targetBeing: nil ].\x0a\x09\x09\x09inlined := true]].\x0a\x0a\x09(aSelector = 'whileTrue') ifTrue: [\x0a \x09anObject isBlockNode ifTrue: [\x0a\x09\x09\x09self prvWhileConditionStatement: 'do{' pre: '}while((' condition: anObject post: '));', self mylf.\x0a\x09\x09\x09inlined := true]].\x0a\x0a\x09(aSelector = 'whileFalse') ifTrue: [\x0a \x09anObject isBlockNode ifTrue: [\x0a\x09\x09\x09self prvWhileConditionStatement: 'do{' pre: '}while(!(' condition: anObject post: '));', self mylf.\x0a\x09\x09\x09inlined := true]].\x0a\x0a\x09\x22-- Numbers --\x22\x0a\x0a\x09(#('+' '-' '*' '/' '<' '<=' '>=' '>') includes: aSelector) ifTrue: [\x0a\x09\x09(self prvInlineNumberOperator: aSelector on: anObject and: aCollection first) ifTrue: [\x0a\x09\x09\x09inlined := true]].\x0a \x09 \x0a\x09\x22-- UndefinedObject --\x22\x0a\x0a\x09(aSelector = 'ifNil:') ifTrue: [\x0a\x09\x09aCollection first isBlockNode ifTrue: [ | rcv |\x0a\x09\x09\x09self aboutToModifyState.\x0a\x09\x09\x09rcv := self isolatedUse: anObject.\x0a\x09\x09\x09rcv = 'super' ifTrue: [ rcv := 'self' ].\x0a\x09\x09\x09self makeTargetRealVariable.\x0a\x09\x09\x09stream nextPutAll: 'if((', rcv, ') === nil || (', rcv, ') == null) {'.\x0a\x09\x09\x09self prvPutAndElse: [ self visit: aCollection first nodes first ].\x0a\x09\x09\x09self prvPutAndClose: [ self lazyAssignValue: rcv ].\x0a\x09\x09\x09inlined := true]].\x0a\x0a\x09(aSelector = 'ifNotNil:') ifTrue: [\x0a\x09\x09aCollection first isBlockNode ifTrue: [ | rcv |\x0a\x09\x09\x09self aboutToModifyState.\x0a\x09\x09\x09rcv := self isolatedUse: anObject.\x0a\x09\x09\x09rcv = 'super' ifTrue: [ rcv := 'self' ].\x0a\x09\x09\x09self makeTargetRealVariable.\x0a\x09\x09\x09stream nextPutAll: 'if((', rcv, ') !== nil && (', rcv, ') != null) {'.\x0a\x09\x09\x09self prvPutAndElse: [ self visit: aCollection first nodes first ].\x0a\x09\x09\x09self prvPutAndClose: [ self lazyAssignValue: rcv ].\x0a\x09\x09\x09inlined := true]].\x0a\x0a\x09(aSelector = 'ifNil:ifNotNil:') ifTrue: [\x0a\x09\x09(aCollection first isBlockNode and: [aCollection second isBlockNode]) ifTrue: [ | rcv |\x0a\x09\x09\x09self aboutToModifyState.\x0a\x09\x09\x09rcv := self isolatedUse: anObject.\x0a\x09\x09\x09rcv = 'super' ifTrue: [ rcv := 'self' ].\x0a\x09\x09\x09self makeTargetRealVariable.\x0a\x09\x09\x09stream nextPutAll: 'if((', rcv, ') === nil || (', rcv, ') == null) {'.\x0a\x09\x09\x09self prvPutAndElse: [ self visit: aCollection first nodes first ].\x0a\x09\x09\x09self prvPutAndClose: [ self visit: aCollection second nodes first ].\x0a\x09\x09\x09inlined := true]].\x0a\x0a\x09(aSelector = 'ifNotNil:ifNil:') ifTrue: [\x0a\x09\x09(aCollection first isBlockNode and: [aCollection second isBlockNode]) ifTrue: [ | rcv |\x0a\x09\x09\x09self aboutToModifyState.\x0a\x09\x09\x09rcv := self isolatedUse: anObject.\x0a\x09\x09\x09rcv = 'super' ifTrue: [ rcv := 'self' ].\x0a\x09\x09\x09self makeTargetRealVariable.\x0a\x09\x09\x09stream nextPutAll: 'if((', rcv, ') !== nil && (', rcv, ') != null) {'.\x0a\x09\x09\x09self prvPutAndElse: [ self visit: aCollection first nodes first ].\x0a\x09\x09\x09self prvPutAndClose: [ self visit: aCollection second nodes first ].\x0a\x09\x09\x09inlined := true]].\x0a\x0a\x09(aSelector = 'isNil') ifTrue: [ | rcv |\x0a\x09\x09rcv := self isolatedUse: anObject.\x0a\x09\x09rcv = 'super' ifTrue: [ rcv := 'self' ].\x0a\x09\x09self lazyAssignValue: '((', rcv, ') === nil || (', rcv, ') == null)'.\x0a\x09\x09inlined := true].\x0a\x0a\x09(aSelector = 'notNil') ifTrue: [ | rcv |\x0a\x09\x09rcv := self isolatedUse: anObject.\x0a\x09\x09rcv = 'super' ifTrue: [ rcv := 'self' ].\x0a\x09\x09self lazyAssignValue: '((', rcv, ') !== nil && (', rcv, ') != null)'.\x0a\x09\x09inlined := true].\x0a\x0a ^inlined",
  1002. messageSends: ["ifTrue:", "=", "and:", "isBlockNode", "first", "prvWhileConditionStatement:pre:condition:post:", "nextPutAll:", ",", "mylf", "prvPutAndClose:", "visit:targetBeing:", "nodes", "includes:", "prvInlineNumberOperator:on:and:", "aboutToModifyState", "isolatedUse:", "makeTargetRealVariable", "prvPutAndElse:", "visit:", "lazyAssignValue:", "second"],
  1003. referencedClasses: []
  1004. }),
  1005. smalltalk.ImpCodeGenerator);
  1006. smalltalk.addMethod(
  1007. "_isNode_ofClass_",
  1008. smalltalk.method({
  1009. selector: "isNode:ofClass:",
  1010. category: 'optimizations',
  1011. fn: function (aNode, aClass) {
  1012. var self=this;
  1013. return smalltalk.send(smalltalk.send(aNode, "_isValueNode", []), "_and_", [(function(){return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aNode, "_value", []), "_class", []), "__eq", [aClass]), "_or_", [(function(){return smalltalk.send(smalltalk.send(smalltalk.send(aNode, "_value", []), "__eq", ["self"]), "_and_", [(function(){return smalltalk.send(smalltalk.send(self, "_currentClass", []), "__eq", [aClass]);})]);})]);})]);
  1014. return self;},
  1015. args: ["aNode", "aClass"],
  1016. source: "isNode: aNode ofClass: aClass\x0a\x09^aNode isValueNode and: [\x0a \x09aNode value class = aClass or: [\x0a \x09\x09aNode value = 'self' and: [self currentClass = aClass]]]",
  1017. messageSends: ["and:", "isValueNode", "or:", "=", "class", "value", "currentClass"],
  1018. referencedClasses: []
  1019. }),
  1020. smalltalk.ImpCodeGenerator);
  1021. smalltalk.addMethod(
  1022. "_isolated_",
  1023. smalltalk.method({
  1024. selector: "isolated:",
  1025. category: 'compilation DSL',
  1026. fn: function (node){
  1027. var self=this;
  1028. return smalltalk.send(self, "_visit_targetBeing_", [node, smalltalk.send(self, "_nextLazyvarName", [])]);
  1029. return self;},
  1030. args: ["node"],
  1031. source: "isolated: node\x0a \x09^ self visit: node targetBeing: self nextLazyvarName",
  1032. messageSends: ["visit:targetBeing:", "nextLazyvarName"],
  1033. referencedClasses: []
  1034. }),
  1035. smalltalk.ImpCodeGenerator);
  1036. smalltalk.addMethod(
  1037. "_isolatedUse_",
  1038. smalltalk.method({
  1039. selector: "isolatedUse:",
  1040. category: 'compilation DSL',
  1041. fn: function (node){
  1042. var self=this;
  1043. var old=nil;
  1044. (old=smalltalk.send(self, "_switchTarget_", [smalltalk.send(self, "_nextLazyvarName", [])]));
  1045. smalltalk.send(self, "_visit_", [node]);
  1046. return smalltalk.send(self, "_useValueNamed_", [smalltalk.send(self, "_switchTarget_", [old])]);
  1047. return self;},
  1048. args: ["node"],
  1049. source: "isolatedUse: node\x0a| old |\x0a\x09old := self switchTarget: self nextLazyvarName.\x0a\x09self visit: node.\x0a\x09^self useValueNamed: (self switchTarget: old)",
  1050. messageSends: ["switchTarget:", "nextLazyvarName", "visit:", "useValueNamed:"],
  1051. referencedClasses: []
  1052. }),
  1053. smalltalk.ImpCodeGenerator);
  1054. smalltalk.addMethod(
  1055. "_knownVariables",
  1056. smalltalk.method({
  1057. selector: "knownVariables",
  1058. category: 'accessing',
  1059. fn: function () {
  1060. var self=this;
  1061. return (function($rec){smalltalk.send($rec, "_addAll_", [smalltalk.send(self, "_tempVariables", [])]);smalltalk.send($rec, "_addAll_", [smalltalk.send(self, "_argVariables", [])]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_pseudoVariables", []));
  1062. return self;},
  1063. args: [],
  1064. source: "knownVariables\x0a\x09^self pseudoVariables \x0a\x09\x09addAll: self tempVariables;\x0a\x09\x09addAll: self argVariables;\x0a\x09\x09yourself",
  1065. messageSends: ["addAll:", "tempVariables", "argVariables", "yourself", "pseudoVariables"],
  1066. referencedClasses: []
  1067. }),
  1068. smalltalk.ImpCodeGenerator);
  1069. smalltalk.addMethod(
  1070. "_lazyAssign_dependsOnState_",
  1071. smalltalk.method({
  1072. selector: "lazyAssign:dependsOnState:",
  1073. category: 'compilation DSL',
  1074. fn: function (aString, aBoolean){
  1075. var self=this;
  1076. ((($receiver = smalltalk.send(self['@lazyVars'], "_includesKey_", [self['@target']])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self['@lazyVars'], "_at_put_", [self['@target'], aString]);return ((($receiver = aBoolean).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@mutables'], "_add_", [self['@target']]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(self['@mutables'], "_add_", [self['@target']]);})]));})() : (function(){return smalltalk.send(self, "_realAssign_", [aString]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){smalltalk.send(self['@lazyVars'], "_at_put_", [self['@target'], aString]);return ((($receiver = aBoolean).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@mutables'], "_add_", [self['@target']]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(self['@mutables'], "_add_", [self['@target']]);})]));}), (function(){return smalltalk.send(self, "_realAssign_", [aString]);})]));
  1077. return self;},
  1078. args: ["aString", "aBoolean"],
  1079. source: "lazyAssign: aString dependsOnState: aBoolean\x0a\x09(lazyVars includesKey: target)\x0a\x09\x09ifTrue: [ lazyVars at: target put: aString. aBoolean ifTrue: [ mutables add: target ] ]\x0a\x09\x09ifFalse: [ self realAssign: aString ]",
  1080. messageSends: ["ifTrue:ifFalse:", "includesKey:", "at:put:", "ifTrue:", "add:", "realAssign:"],
  1081. referencedClasses: []
  1082. }),
  1083. smalltalk.ImpCodeGenerator);
  1084. smalltalk.addMethod(
  1085. "_lazyAssignExpression_",
  1086. smalltalk.method({
  1087. selector: "lazyAssignExpression:",
  1088. category: 'compilation DSL',
  1089. fn: function (aString){
  1090. var self=this;
  1091. smalltalk.send(self, "_lazyAssign_dependsOnState_", [aString, true]);
  1092. return self;},
  1093. args: ["aString"],
  1094. source: "lazyAssignExpression: aString\x0a\x09self lazyAssign: aString dependsOnState: true",
  1095. messageSends: ["lazyAssign:dependsOnState:"],
  1096. referencedClasses: []
  1097. }),
  1098. smalltalk.ImpCodeGenerator);
  1099. smalltalk.addMethod(
  1100. "_lazyAssignValue_",
  1101. smalltalk.method({
  1102. selector: "lazyAssignValue:",
  1103. category: 'compilation DSL',
  1104. fn: function (aString){
  1105. var self=this;
  1106. smalltalk.send(self, "_lazyAssign_dependsOnState_", [aString, false]);
  1107. return self;},
  1108. args: ["aString"],
  1109. source: "lazyAssignValue: aString\x0a\x09self lazyAssign: aString dependsOnState: false",
  1110. messageSends: ["lazyAssign:dependsOnState:"],
  1111. referencedClasses: []
  1112. }),
  1113. smalltalk.ImpCodeGenerator);
  1114. smalltalk.addMethod(
  1115. "_makeTargetRealVariable",
  1116. smalltalk.method({
  1117. selector: "makeTargetRealVariable",
  1118. category: 'compilation DSL',
  1119. fn: function (){
  1120. var self=this;
  1121. ((($receiver = smalltalk.send(self['@lazyVars'], "_includesKey_", [self['@target']])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self['@lazyVars'], "_removeKey_", [self['@target']]);smalltalk.send(self['@lazyVars'], "_at_put_", [smalltalk.send("assigned ", "__comma", [self['@target']]), nil]);return smalltalk.send(self['@realVarNames'], "_add_", [self['@target']]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self['@lazyVars'], "_removeKey_", [self['@target']]);smalltalk.send(self['@lazyVars'], "_at_put_", [smalltalk.send("assigned ", "__comma", [self['@target']]), nil]);return smalltalk.send(self['@realVarNames'], "_add_", [self['@target']]);})]));
  1122. return self;},
  1123. args: [],
  1124. source: "makeTargetRealVariable\x0a\x09(lazyVars includesKey: target) ifTrue: [\x0a\x09\x09lazyVars removeKey: target.\x0a\x09\x09lazyVars at: 'assigned ',target put: nil. \x22<-- only to retain size, it is used in nextLazyvarName\x22\x0a\x09\x09realVarNames add: target ].",
  1125. messageSends: ["ifTrue:", "includesKey:", "removeKey:", "at:put:", ",", "add:"],
  1126. referencedClasses: []
  1127. }),
  1128. smalltalk.ImpCodeGenerator);
  1129. smalltalk.addMethod(
  1130. "_mylf",
  1131. smalltalk.method({
  1132. selector: "mylf",
  1133. category: 'output',
  1134. fn: function () {
  1135. var self=this;
  1136. return smalltalk.send(smalltalk.send((smalltalk.String || String), "_lf", []), "__comma", [smalltalk.send(smalltalk.send((smalltalk.Array || Array), "_new_", [((($receiver = self['@nestedBlocks']).klass === smalltalk.Number) ? $receiver +(2) : smalltalk.send($receiver, "__plus", [(2)]))]), "_join_", [smalltalk.send((smalltalk.String || String), "_tab", [])])]);
  1137. return self;},
  1138. args: [],
  1139. source: "mylf\x0a\x09^String lf, ((Array new: nestedBlocks+2) join: String tab)",
  1140. messageSends: [",", "lf", "join:", "new:", "+", "tab"],
  1141. referencedClasses: ["String", "Array"]
  1142. }),
  1143. smalltalk.ImpCodeGenerator);
  1144. smalltalk.addMethod(
  1145. "_nextLazyvarName",
  1146. smalltalk.method({
  1147. selector: "nextLazyvarName",
  1148. category: 'compilation DSL',
  1149. fn: function (){
  1150. var self=this;
  1151. var name=nil;
  1152. (name=smalltalk.send("$", "__comma", [smalltalk.send(smalltalk.send(self['@lazyVars'], "_size", []), "_asString", [])]));
  1153. smalltalk.send(self['@lazyVars'], "_at_put_", [name, name]);
  1154. return name;
  1155. return self;},
  1156. args: [],
  1157. source: "nextLazyvarName\x0a\x09| name |\x0a\x09name := '$', lazyVars size asString.\x0a\x09lazyVars at: name put: name.\x0a\x09^name",
  1158. messageSends: [",", "asString", "size", "at:put:"],
  1159. referencedClasses: []
  1160. }),
  1161. smalltalk.ImpCodeGenerator);
  1162. smalltalk.addMethod(
  1163. "_nilIfValueWanted",
  1164. smalltalk.method({
  1165. selector: "nilIfValueWanted",
  1166. category: 'compilation DSL',
  1167. fn: function (){
  1168. var self=this;
  1169. (($receiver = self['@target']) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_lazyAssignValue_", ["nil"]);})() : nil;
  1170. return self;},
  1171. args: [],
  1172. source: "nilIfValueWanted\x0a\x09target ifNotNil: [ self lazyAssignValue: 'nil' ]",
  1173. messageSends: ["ifNotNil:", "lazyAssignValue:"],
  1174. referencedClasses: []
  1175. }),
  1176. smalltalk.ImpCodeGenerator);
  1177. smalltalk.addMethod(
  1178. "_performOptimizations",
  1179. smalltalk.method({
  1180. selector: "performOptimizations",
  1181. category: 'testing',
  1182. fn: function () {
  1183. var self=this;
  1184. return smalltalk.send(smalltalk.send(self, "_class", []), "_performOptimizations", []);
  1185. return self;},
  1186. args: [],
  1187. source: "performOptimizations\x0a\x09^self class performOptimizations",
  1188. messageSends: ["performOptimizations", "class"],
  1189. referencedClasses: []
  1190. }),
  1191. smalltalk.ImpCodeGenerator);
  1192. smalltalk.addMethod(
  1193. "_prvCheckClass_for_",
  1194. smalltalk.method({
  1195. selector: "prvCheckClass:for:",
  1196. category: 'optimizations',
  1197. fn: function (aClassName, receiver){
  1198. var self=this;
  1199. smalltalk.send(self, "_makeTargetRealVariable", []);
  1200. smalltalk.send(self, "_aboutToModifyState", []);
  1201. smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("if((", "__comma", [smalltalk.send(self, "_useValueNamed_", [receiver])]), "__comma", [").klass === smalltalk."]), "__comma", [aClassName]), "__comma", [") "])]);
  1202. return self;},
  1203. args: ["aClassName", "receiver"],
  1204. source: "prvCheckClass: aClassName for: receiver\x0a\x09self makeTargetRealVariable.\x0a\x09self aboutToModifyState.\x0a stream nextPutAll: 'if((', (self useValueNamed: receiver), ').klass === smalltalk.', aClassName, ') '",
  1205. messageSends: ["makeTargetRealVariable", "aboutToModifyState", "nextPutAll:", ",", "useValueNamed:"],
  1206. referencedClasses: []
  1207. }),
  1208. smalltalk.ImpCodeGenerator);
  1209. smalltalk.addMethod(
  1210. "_prvInlineNumberOperator_on_and_",
  1211. smalltalk.method({
  1212. selector: "prvInlineNumberOperator:on:and:",
  1213. category: 'optimizations',
  1214. fn: function (aSelector, receiverNode, operandNode){
  1215. var self=this;
  1216. var $early={};
  1217. try{((($receiver = smalltalk.send(aSelector, "__eq", [aSelector])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(self, "_isNode_ofClass_", [receiverNode, (smalltalk.Number || Number)])).klass === smalltalk.Boolean) ? ($receiver ? (function(){var rcv=nil;
  1218. var operand=nil;
  1219. (rcv=smalltalk.send(self, "_isolated_", [receiverNode]));(operand=smalltalk.send(self, "_isolated_", [operandNode]));smalltalk.send(self, "_lazyAssignValue_", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_useValueNamed_", [rcv]), "__comma", [aSelector]), "__comma", [smalltalk.send(self, "_useValueNamed_", [operand])])]);return (function(){throw $early=[true]})();})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){var rcv=nil;
  1220. var operand=nil;
  1221. (rcv=smalltalk.send(self, "_isolated_", [receiverNode]));(operand=smalltalk.send(self, "_isolated_", [operandNode]));smalltalk.send(self, "_lazyAssignValue_", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_useValueNamed_", [rcv]), "__comma", [aSelector]), "__comma", [smalltalk.send(self, "_useValueNamed_", [operand])])]);return (function(){throw $early=[true]})();})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(self, "_isNode_ofClass_", [receiverNode, (smalltalk.Number || Number)])).klass === smalltalk.Boolean) ? ($receiver ? (function(){var rcv=nil;
  1222. var operand=nil;
  1223. (rcv=smalltalk.send(self, "_isolated_", [receiverNode]));(operand=smalltalk.send(self, "_isolated_", [operandNode]));smalltalk.send(self, "_lazyAssignValue_", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_useValueNamed_", [rcv]), "__comma", [aSelector]), "__comma", [smalltalk.send(self, "_useValueNamed_", [operand])])]);return (function(){throw $early=[true]})();})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){var rcv=nil;
  1224. var operand=nil;
  1225. (rcv=smalltalk.send(self, "_isolated_", [receiverNode]));(operand=smalltalk.send(self, "_isolated_", [operandNode]));smalltalk.send(self, "_lazyAssignValue_", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_useValueNamed_", [rcv]), "__comma", [aSelector]), "__comma", [smalltalk.send(self, "_useValueNamed_", [operand])])]);return (function(){throw $early=[true]})();})]));})]));
  1226. return false;
  1227. return self;
  1228. } catch(e) {if(e===$early)return e[0]; throw e}},
  1229. args: ["aSelector", "receiverNode", "operandNode"],
  1230. source: "prvInlineNumberOperator: aSelector on: receiverNode and: operandNode\x0a\x09(aSelector = aSelector) ifTrue: [\x0a\x09\x09(self isNode: receiverNode ofClass: Number) ifTrue: [\x0a\x09\x09\x09| rcv operand |\x0a\x09\x09\x09rcv := self isolated: receiverNode.\x0a\x09\x09\x09operand := self isolated: operandNode.\x0a\x09\x09\x09self lazyAssignValue: ((self useValueNamed: rcv), aSelector, (self useValueNamed: operand)).\x0a\x09\x09\x09^true]].\x0a\x09^false\x0a",
  1231. messageSends: ["ifTrue:", "=", "isNode:ofClass:", "isolated:", "lazyAssignValue:", ",", "useValueNamed:"],
  1232. referencedClasses: ["Number"]
  1233. }),
  1234. smalltalk.ImpCodeGenerator);
  1235. smalltalk.addMethod(
  1236. "_prvPutAndClose_",
  1237. smalltalk.method({
  1238. selector: "prvPutAndClose:",
  1239. category: 'output',
  1240. fn: function (aBlock) {
  1241. var self=this;
  1242. smalltalk.send(aBlock, "_value", []);
  1243. smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send("}", "__comma", [smalltalk.send(self, "_mylf", [])])]);
  1244. return self;},
  1245. args: ["aBlock"],
  1246. source: "prvPutAndClose: aBlock\x0a\x0a\x09aBlock value.\x0a\x09stream nextPutAll: '}', self mylf\x0a",
  1247. messageSends: ["value", "nextPutAll:", ",", "mylf"],
  1248. referencedClasses: []
  1249. }),
  1250. smalltalk.ImpCodeGenerator);
  1251. smalltalk.addMethod(
  1252. "_prvPutAndElse_",
  1253. smalltalk.method({
  1254. selector: "prvPutAndElse:",
  1255. category: 'output',
  1256. fn: function (aBlock) {
  1257. var self=this;
  1258. smalltalk.send(aBlock, "_value", []);
  1259. smalltalk.send(self['@stream'], "_nextPutAll_", ["} else {"]);
  1260. return self;},
  1261. args: ["aBlock"],
  1262. source: "prvPutAndElse: aBlock\x0a\x0a\x09aBlock value.\x0a\x09stream nextPutAll: '} else {'\x0a",
  1263. messageSends: ["value", "nextPutAll:"],
  1264. referencedClasses: []
  1265. }),
  1266. smalltalk.ImpCodeGenerator);
  1267. smalltalk.addMethod(
  1268. "_prvWhileConditionStatement_pre_condition_post_",
  1269. smalltalk.method({
  1270. selector: "prvWhileConditionStatement:pre:condition:post:",
  1271. category: 'optimizations',
  1272. fn: function (stmtString, preString, anObject, postString){
  1273. var self=this;
  1274. var x=nil;
  1275. smalltalk.send(self['@stream'], "_nextPutAll_", [stmtString]);
  1276. (x=smalltalk.send(self, "_isolatedUse_", [smalltalk.send(smalltalk.send(anObject, "_nodes", []), "_first", [])]));
  1277. smalltalk.send(x, "_ifEmpty_", [(function(){return (x="\x22should not reach - receiver includes ^\x22");})]);
  1278. smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(preString, "__comma", [x]), "__comma", [postString])]);
  1279. smalltalk.send(self, "_nilIfValueWanted", []);
  1280. return self;},
  1281. args: ["stmtString", "preString", "anObject", "postString"],
  1282. source: "prvWhileConditionStatement: stmtString pre: preString condition: anObject post: postString\x0a\x09| x |\x0a\x09stream nextPutAll: stmtString.\x0a\x09x := self isolatedUse: anObject nodes first.\x0a\x09x ifEmpty: [ x := '\x22should not reach - receiver includes ^\x22' ].\x0a\x09stream nextPutAll: preString, x, postString.\x0a\x09self nilIfValueWanted",
  1283. messageSends: ["nextPutAll:", "isolatedUse:", "first", "nodes", "ifEmpty:", ",", "nilIfValueWanted"],
  1284. referencedClasses: []
  1285. }),
  1286. smalltalk.ImpCodeGenerator);
  1287. smalltalk.addMethod(
  1288. "_putTemps_",
  1289. smalltalk.method({
  1290. selector: "putTemps:",
  1291. category: 'output',
  1292. fn: function (temps) {
  1293. var self=this;
  1294. smalltalk.send(temps, "_ifNotEmpty_", [(function(){smalltalk.send(self['@stream'], "_nextPutAll_", ["var "]);smalltalk.send(temps, "_do_separatedBy_", [(function(each){var temp=nil;
  1295. (temp=smalltalk.send(self, "_safeVariableNameFor_", [each]));smalltalk.send(self['@tempVariables'], "_add_", [temp]);return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(temp, "__comma", ["=nil"])]);}), (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [","]);})]);return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(";", "__comma", [smalltalk.send(self, "_mylf", [])])]);})]);
  1296. return self;},
  1297. args: ["temps"],
  1298. source: "putTemps: temps\x0a temps ifNotEmpty: [\x0a\x09stream nextPutAll: 'var '.\x0a\x09temps do: [:each | | temp |\x0a temp := self safeVariableNameFor: each.\x0a\x09 tempVariables add: temp.\x0a\x09 stream nextPutAll: temp, '=nil'] separatedBy: [ stream nextPutAll: ',' ].\x0a\x09stream nextPutAll: ';', self mylf\x0a ]",
  1299. messageSends: ["ifNotEmpty:", "nextPutAll:", "do:separatedBy:", "safeVariableNameFor:", "add:", ",", "mylf"],
  1300. referencedClasses: []
  1301. }),
  1302. smalltalk.ImpCodeGenerator);
  1303. smalltalk.addMethod(
  1304. "_realAssign_",
  1305. smalltalk.method({
  1306. selector: "realAssign:",
  1307. category: 'compilation DSL',
  1308. fn: function (aString){
  1309. var self=this;
  1310. var closer=nil;
  1311. smalltalk.send(aString, "_ifNotEmpty_", [(function(){smalltalk.send(self, "_aboutToModifyState", []);(closer="");smalltalk.send(self, "_ifValueWanted_", [(function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [((($receiver = smalltalk.send(self['@target'], "__eq", ["^"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return "return ";})() : (function(){return ((($receiver = smalltalk.send(self['@target'], "__eq", ["!"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){(closer="]");return "throw $early=[";})() : (function(){return smalltalk.send(self['@target'], "__comma", ["="]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){(closer="]");return "throw $early=[";}), (function(){return smalltalk.send(self['@target'], "__comma", ["="]);})]));})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return "return ";}), (function(){return ((($receiver = smalltalk.send(self['@target'], "__eq", ["!"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){(closer="]");return "throw $early=[";})() : (function(){return smalltalk.send(self['@target'], "__comma", ["="]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){(closer="]");return "throw $early=[";}), (function(){return smalltalk.send(self['@target'], "__comma", ["="]);})]));})]))]);})]);smalltalk.send(self, "_makeTargetRealVariable", []);return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(aString, "__comma", [closer]), "__comma", [";"]), "__comma", [smalltalk.send(self, "_mylf", [])])]);})]);
  1312. return self;},
  1313. args: ["aString"],
  1314. source: "realAssign: aString\x0a\x09| closer |\x0a\x09aString ifNotEmpty: [\x0a\x09\x09self aboutToModifyState.\x0a\x09\x09closer := ''.\x0a\x09\x09self ifValueWanted: [ stream nextPutAll:\x0a\x09\x09\x09(target = '^' ifTrue: ['return '] ifFalse: [\x0a\x09\x09\x09\x09target = '!' ifTrue: [ closer := ']'. 'throw $early=['] ifFalse: [\x0a\x09\x09\x09\x09\x09target, '=']]) ].\x0a\x09\x09self makeTargetRealVariable.\x0a\x09\x09stream nextPutAll: aString, closer, ';', self mylf ]",
  1315. messageSends: ["ifNotEmpty:", "aboutToModifyState", "ifValueWanted:", "nextPutAll:", "ifTrue:ifFalse:", "=", ",", "makeTargetRealVariable", "mylf"],
  1316. referencedClasses: []
  1317. }),
  1318. smalltalk.ImpCodeGenerator);
  1319. smalltalk.addMethod(
  1320. "_send_to_arguments_superSend_",
  1321. smalltalk.method({
  1322. selector: "send:to:arguments:superSend:",
  1323. category: 'visiting',
  1324. fn: function (aSelector, aReceiver, aCollection, aBoolean){
  1325. var self=this;
  1326. var args=nil;
  1327. (args=smalltalk.send(self, "_isolated_", [(function($rec){smalltalk.send($rec, "_nodes_", [aCollection]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.DynamicArrayNode || DynamicArrayNode), "_new", []))]));
  1328. smalltalk.send(self, "_lazyAssignExpression_", [smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(str){smalltalk.send(str, "_nextPutAll_", ["smalltalk.send("]);smalltalk.send(str, "_nextPutAll_", [smalltalk.send(self, "_useValueNamed_", [aReceiver])]);smalltalk.send(str, "_nextPutAll_", [smalltalk.send(smalltalk.send(", \x22", "__comma", [smalltalk.send(aSelector, "_asSelector", [])]), "__comma", ["\x22, "])]);smalltalk.send(str, "_nextPutAll_", [smalltalk.send(self, "_useValueNamed_", [args])]);((($receiver = aBoolean).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(str, "_nextPutAll_", [smalltalk.send(", smalltalk.", "__comma", [smalltalk.send(self, "_classNameFor_", [smalltalk.send(smalltalk.send(self, "_currentClass", []), "_superclass", [])])])]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(str, "_nextPutAll_", [smalltalk.send(", smalltalk.", "__comma", [smalltalk.send(self, "_classNameFor_", [smalltalk.send(smalltalk.send(self, "_currentClass", []), "_superclass", [])])])]);})]));return smalltalk.send(str, "_nextPutAll_", [")"]);})])]);
  1329. return self;},
  1330. args: ["aSelector", "aReceiver", "aCollection", "aBoolean"],
  1331. source: "send: aSelector to: aReceiver arguments: aCollection superSend: aBoolean\x0a\x09| args |\x0a\x09args := self isolated: (DynamicArrayNode new nodes: aCollection; yourself).\x0a\x09self lazyAssignExpression: (String streamContents: [ :str |\x0a\x09\x09str nextPutAll: 'smalltalk.send('.\x0a\x09\x09str nextPutAll: (self useValueNamed: aReceiver).\x0a\x09\x09str nextPutAll: ', \x22', aSelector asSelector, '\x22, '.\x0a\x09\x09str nextPutAll: (self useValueNamed: args).\x0a\x09\x09aBoolean ifTrue: [\x0a\x09\x09\x09str nextPutAll: ', smalltalk.', (self classNameFor: self currentClass superclass)].\x0a\x09\x09str nextPutAll: ')'\x0a\x09])",
  1332. messageSends: ["isolated:", "nodes:", "yourself", "new", "lazyAssignExpression:", "streamContents:", "nextPutAll:", "useValueNamed:", ",", "asSelector", "ifTrue:", "classNameFor:", "superclass", "currentClass"],
  1333. referencedClasses: ["DynamicArrayNode", "String"]
  1334. }),
  1335. smalltalk.ImpCodeGenerator);
  1336. smalltalk.addMethod(
  1337. "_sequenceOfNodes_temps_",
  1338. smalltalk.method({
  1339. selector: "sequenceOfNodes:temps:",
  1340. category: 'visiting',
  1341. fn: function (nodes, temps){
  1342. var self=this;
  1343. ((($receiver = smalltalk.send(nodes, "_isEmpty", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){var old=nil;
  1344. var index=nil;
  1345. smalltalk.send(self, "_putTemps_", [temps]);(old=smalltalk.send(self, "_switchTarget_", [nil]));(index=(0));return smalltalk.send(nodes, "_do_", [(function(each){(index=((($receiver = index).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));((($receiver = smalltalk.send(index, "__eq", [smalltalk.send(nodes, "_size", [])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_switchTarget_", [old]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(self, "_switchTarget_", [old]);})]));return smalltalk.send(self, "_visit_", [each]);})]);})() : (function(){return smalltalk.send(self, "_nilIfValueWanted", []);})()) : smalltalk.send($receiver, "_ifFalse_ifTrue_", [(function(){var old=nil;
  1346. var index=nil;
  1347. smalltalk.send(self, "_putTemps_", [temps]);(old=smalltalk.send(self, "_switchTarget_", [nil]));(index=(0));return smalltalk.send(nodes, "_do_", [(function(each){(index=((($receiver = index).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));((($receiver = smalltalk.send(index, "__eq", [smalltalk.send(nodes, "_size", [])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_switchTarget_", [old]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(self, "_switchTarget_", [old]);})]));return smalltalk.send(self, "_visit_", [each]);})]);}), (function(){return smalltalk.send(self, "_nilIfValueWanted", []);})]));
  1348. return self;},
  1349. args: ["nodes", "temps"],
  1350. source: "sequenceOfNodes: nodes temps: temps\x0a\x09nodes isEmpty\x0a\x09\x09ifFalse: [ | old index |\x0a\x09\x09\x09self putTemps: temps.\x0a\x09\x09\x09old :=self switchTarget: nil.\x0a\x09\x09\x09index := 0.\x0a\x09\x09\x09nodes do: [:each |\x0a\x09\x09\x09\x09index := index + 1.\x0a\x09\x09\x09\x09index = nodes size ifTrue: [ self switchTarget: old ].\x0a\x09\x09\x09self visit: each ]]\x0a\x09\x09ifTrue: [ self nilIfValueWanted ]",
  1351. messageSends: ["ifFalse:ifTrue:", "isEmpty", "putTemps:", "switchTarget:", "do:", "+", "ifTrue:", "=", "size", "visit:", "nilIfValueWanted"],
  1352. referencedClasses: []
  1353. }),
  1354. smalltalk.ImpCodeGenerator);
  1355. smalltalk.addMethod(
  1356. "_switchTarget_",
  1357. smalltalk.method({
  1358. selector: "switchTarget:",
  1359. category: 'compilation DSL',
  1360. fn: function (aString){
  1361. var self=this;
  1362. var old=nil;
  1363. (old=self['@target']);
  1364. (self['@target']=aString);
  1365. return old;
  1366. return self;},
  1367. args: ["aString"],
  1368. source: "switchTarget: aString\x0a\x09| old |\x0a\x09old := target.\x0a\x09target := aString.\x0a\x09^old",
  1369. messageSends: [],
  1370. referencedClasses: []
  1371. }),
  1372. smalltalk.ImpCodeGenerator);
  1373. smalltalk.addMethod(
  1374. "_tempVariables",
  1375. smalltalk.method({
  1376. selector: "tempVariables",
  1377. category: 'accessing',
  1378. fn: function () {
  1379. var self=this;
  1380. return smalltalk.send(self['@tempVariables'], "_copy", []);
  1381. return self;},
  1382. args: [],
  1383. source: "tempVariables\x0a\x09^tempVariables copy",
  1384. messageSends: ["copy"],
  1385. referencedClasses: []
  1386. }),
  1387. smalltalk.ImpCodeGenerator);
  1388. smalltalk.addMethod(
  1389. "_unknownVariables",
  1390. smalltalk.method({
  1391. selector: "unknownVariables",
  1392. category: 'accessing',
  1393. fn: function () {
  1394. var self=this;
  1395. return smalltalk.send(self['@unknownVariables'], "_copy", []);
  1396. return self;},
  1397. args: [],
  1398. source: "unknownVariables\x0a\x09^unknownVariables copy",
  1399. messageSends: ["copy"],
  1400. referencedClasses: []
  1401. }),
  1402. smalltalk.ImpCodeGenerator);
  1403. smalltalk.addMethod(
  1404. "_useValueNamed_",
  1405. smalltalk.method({
  1406. selector: "useValueNamed:",
  1407. category: 'compilation DSL',
  1408. fn: function (key){
  1409. var self=this;
  1410. var $early={};
  1411. try{var val=nil;
  1412. ((($receiver = smalltalk.send(self['@realVarNames'], "_includes_", [key])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (function(){throw $early=[key]})();})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (function(){throw $early=[key]})();})]));
  1413. smalltalk.send(self['@mutables'], "_remove_", [key]);
  1414. return smalltalk.send(self['@lazyVars'], "_at_", [key]);
  1415. return self;
  1416. } catch(e) {if(e===$early)return e[0]; throw e}},
  1417. args: ["key"],
  1418. source: "useValueNamed: key\x0a\x09| val |\x0a\x09(realVarNames includes: key) ifTrue: [ ^key ].\x0a\x09mutables remove: key.\x0a\x09^lazyVars at: key",
  1419. messageSends: ["ifTrue:", "includes:", "remove:", "at:"],
  1420. referencedClasses: []
  1421. }),
  1422. smalltalk.ImpCodeGenerator);
  1423. smalltalk.addMethod(
  1424. "_visit_",
  1425. smalltalk.method({
  1426. selector: "visit:",
  1427. category: 'visiting',
  1428. fn: function (aNode) {
  1429. var self=this;
  1430. smalltalk.send(aNode, "_accept_", [self]);
  1431. return self;},
  1432. args: ["aNode"],
  1433. source: "visit: aNode\x0a\x09aNode accept: self",
  1434. messageSends: ["accept:"],
  1435. referencedClasses: []
  1436. }),
  1437. smalltalk.ImpCodeGenerator);
  1438. smalltalk.addMethod(
  1439. "_visit_targetBeing_",
  1440. smalltalk.method({
  1441. selector: "visit:targetBeing:",
  1442. category: 'compilation DSL',
  1443. fn: function (aNode, aString){
  1444. var self=this;
  1445. var old=nil;
  1446. (old=smalltalk.send(self, "_switchTarget_", [aString]));
  1447. smalltalk.send(self, "_visit_", [aNode]);
  1448. return smalltalk.send(self, "_switchTarget_", [old]);
  1449. return self;},
  1450. args: ["aNode", "aString"],
  1451. source: "visit: aNode targetBeing: aString\x0a| old |\x0a\x09old := self switchTarget: aString.\x0a\x09self visit: aNode.\x0a\x09^ self switchTarget: old.\x0a",
  1452. messageSends: ["switchTarget:", "visit:"],
  1453. referencedClasses: []
  1454. }),
  1455. smalltalk.ImpCodeGenerator);
  1456. smalltalk.addMethod(
  1457. "_visitAssignmentNode_",
  1458. smalltalk.method({
  1459. selector: "visitAssignmentNode:",
  1460. category: 'visiting',
  1461. fn: function (aNode){
  1462. var self=this;
  1463. var olds=nil;
  1464. var oldt=nil;
  1465. (olds=self['@stream']);
  1466. (self['@stream']=smalltalk.send("", "_writeStream", []));
  1467. (oldt=smalltalk.send(self, "_switchTarget_", [smalltalk.send(self, "_nextLazyvarName", [])]));
  1468. smalltalk.send(self, "_visit_", [smalltalk.send(aNode, "_left", [])]);
  1469. smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(self['@lazyVars'], "_at_", [self['@target']]), "_~_eq", [self['@target']])]);
  1470. smalltalk.send(self, "_switchTarget_", [smalltalk.send(self, "_useValueNamed_", [smalltalk.send(self, "_switchTarget_", [nil])])]);
  1471. smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(self['@lazyVars'], "_includesKey_", [self['@target']]), "_not", [])]);
  1472. (self['@stream']=olds);
  1473. smalltalk.send(self, "_visit_", [smalltalk.send(aNode, "_right", [])]);
  1474. (olds=smalltalk.send(self, "_switchTarget_", [oldt]));
  1475. smalltalk.send(self, "_ifValueWanted_", [(function(){return smalltalk.send(self, "_lazyAssignExpression_", [olds]);})]);
  1476. return self;},
  1477. args: ["aNode"],
  1478. source: "visitAssignmentNode: aNode\x0a| olds oldt |\x0a\x09olds := stream.\x0a\x09stream := '' writeStream.\x0a\x09oldt := self switchTarget: self nextLazyvarName.\x0a\x09self visit: aNode left.\x0a\x09self assert: (lazyVars at: target) ~= target.\x0a\x09self switchTarget: (self useValueNamed: (self switchTarget: nil)).\x0a\x09self assert: (lazyVars includesKey: target) not.\x0a\x09stream := olds.\x0a\x09self visit: aNode right.\x0a\x09olds := self switchTarget: oldt.\x0a\x09self ifValueWanted: [ self lazyAssignExpression: olds ]",
  1479. messageSends: ["writeStream", "switchTarget:", "nextLazyvarName", "visit:", "left", "assert:", "~=", "at:", "useValueNamed:", "not", "includesKey:", "right", "ifValueWanted:", "lazyAssignExpression:"],
  1480. referencedClasses: []
  1481. }),
  1482. smalltalk.ImpCodeGenerator);
  1483. smalltalk.addMethod(
  1484. "_visitBlockNode_",
  1485. smalltalk.method({
  1486. selector: "visitBlockNode:",
  1487. category: 'visiting',
  1488. fn: function (aNode){
  1489. var self=this;
  1490. var oldt=nil;
  1491. var olds=nil;
  1492. var oldm=nil;
  1493. smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_size", []), "__eq", [(1)])]);
  1494. (oldt=smalltalk.send(self, "_switchTarget_", ["^"]));
  1495. (olds=self['@stream']);
  1496. (self['@stream']=smalltalk.send("", "_writeStream", []));
  1497. smalltalk.send(self['@stream'], "_nextPutAll_", ["(function("]);
  1498. smalltalk.send(smalltalk.send(aNode, "_parameters", []), "_do_separatedBy_", [(function(each){smalltalk.send(self['@tempVariables'], "_add_", [each]);return smalltalk.send(self['@stream'], "_nextPutAll_", [each]);}), (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [", "]);})]);
  1499. smalltalk.send(self['@stream'], "_nextPutAll_", ["){"]);
  1500. (self['@nestedBlocks']=((($receiver = self['@nestedBlocks']).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));
  1501. (oldm=self['@mutables']);
  1502. (self['@mutables']=smalltalk.send((smalltalk.Set || Set), "_new", []));
  1503. smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_first", [])]);
  1504. smalltalk.send(self, "_assert_", [smalltalk.send(self['@mutables'], "_isEmpty", [])]);
  1505. (self['@mutables']=oldm);
  1506. (self['@nestedBlocks']=((($receiver = self['@nestedBlocks']).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])));
  1507. smalltalk.send(self['@stream'], "_nextPutAll_", ["})"]);
  1508. smalltalk.send(self, "_switchTarget_", [oldt]);
  1509. (oldt=smalltalk.send(self['@stream'], "_contents", []));
  1510. (self['@stream']=olds);
  1511. smalltalk.send(self, "_lazyAssignExpression_", [oldt]);
  1512. return self;},
  1513. args: ["aNode"],
  1514. source: "visitBlockNode: aNode\x0a| oldt olds oldm |\x0a\x09self assert: aNode nodes size = 1.\x0a\x09oldt := self switchTarget: '^'.\x0a\x09olds := stream.\x0a\x09stream := '' writeStream.\x0a\x09stream nextPutAll: '(function('.\x0a\x09aNode parameters \x0a\x09 do: [:each |\x0a\x09\x09tempVariables add: each.\x0a\x09\x09stream nextPutAll: each]\x0a\x09 separatedBy: [stream nextPutAll: ', '].\x0a\x09stream nextPutAll: '){'.\x0a\x09nestedBlocks := nestedBlocks + 1.\x0a\x09oldm := mutables.\x0a\x09mutables := Set new.\x0a\x09self visit: aNode nodes first.\x0a\x09self assert: mutables isEmpty.\x0a\x09mutables := oldm.\x0a\x09nestedBlocks := nestedBlocks - 1.\x0a\x09stream nextPutAll: '})'.\x0a\x09self switchTarget: oldt.\x0a\x09oldt := stream contents.\x0a\x09stream := olds.\x0a\x09self lazyAssignExpression: oldt",
  1515. messageSends: ["assert:", "=", "size", "nodes", "switchTarget:", "writeStream", "nextPutAll:", "do:separatedBy:", "parameters", "add:", "+", "new", "visit:", "first", "isEmpty", "-", "contents", "lazyAssignExpression:"],
  1516. referencedClasses: ["Set"]
  1517. }),
  1518. smalltalk.ImpCodeGenerator);
  1519. smalltalk.addMethod(
  1520. "_visitBlockSequenceNode_",
  1521. smalltalk.method({
  1522. selector: "visitBlockSequenceNode:",
  1523. category: 'visiting',
  1524. fn: function (aNode) {
  1525. var self=this;
  1526. smalltalk.send(self, "_sequenceOfNodes_temps_", [smalltalk.send(aNode, "_nodes", []), smalltalk.send(aNode, "_temps", [])]);
  1527. return self;},
  1528. args: ["aNode"],
  1529. source: "visitBlockSequenceNode: aNode\x0a\x09self sequenceOfNodes: aNode nodes temps: aNode temps",
  1530. messageSends: ["sequenceOfNodes:temps:", "nodes", "temps"],
  1531. referencedClasses: []
  1532. }),
  1533. smalltalk.ImpCodeGenerator);
  1534. smalltalk.addMethod(
  1535. "_visitCascadeNode_",
  1536. smalltalk.method({
  1537. selector: "visitCascadeNode:",
  1538. category: 'visiting',
  1539. fn: function (aNode){
  1540. var self=this;
  1541. var rcv=nil;
  1542. (rcv=smalltalk.send(self, "_isolated_", [smalltalk.send(aNode, "_receiver", [])]));
  1543. smalltalk.send(self, "_aboutToModifyState", []);
  1544. (rcv=smalltalk.send(self, "_useValueNamed_", [rcv]));
  1545. smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_do_", [(function(each){return smalltalk.send(each, "_receiver_", [smalltalk.send(smalltalk.send((smalltalk.VerbatimNode || VerbatimNode), "_new", []), "_value_", [rcv])]);})]);
  1546. smalltalk.send(self, "_sequenceOfNodes_temps_", [smalltalk.send(aNode, "_nodes", []), []]);
  1547. return self;},
  1548. args: ["aNode"],
  1549. source: "visitCascadeNode: aNode\x0a\x09| rcv |\x0a\x09rcv := self isolated: aNode receiver.\x0a\x09self aboutToModifyState.\x0a\x09rcv := self useValueNamed: rcv.\x0a\x09aNode nodes do: [:each |\x0a\x09\x09each receiver: (VerbatimNode new value: rcv) ].\x0a\x09self sequenceOfNodes: aNode nodes temps: #()",
  1550. messageSends: ["isolated:", "receiver", "aboutToModifyState", "useValueNamed:", "do:", "nodes", "receiver:", "value:", "new", "sequenceOfNodes:temps:"],
  1551. referencedClasses: ["VerbatimNode"]
  1552. }),
  1553. smalltalk.ImpCodeGenerator);
  1554. smalltalk.addMethod(
  1555. "_visitClassReferenceNode_",
  1556. smalltalk.method({
  1557. selector: "visitClassReferenceNode:",
  1558. category: 'visiting',
  1559. fn: function (aNode){
  1560. var self=this;
  1561. ((($receiver = smalltalk.send(self['@referencedClasses'], "_includes_", [smalltalk.send(aNode, "_value", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self['@referencedClasses'], "_add_", [smalltalk.send(aNode, "_value", [])]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(self['@referencedClasses'], "_add_", [smalltalk.send(aNode, "_value", [])]);})]));
  1562. smalltalk.send(self, "_lazyAssignExpression_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("(smalltalk.", "__comma", [smalltalk.send(aNode, "_value", [])]), "__comma", [" || "]), "__comma", [smalltalk.send(aNode, "_value", [])]), "__comma", [")"])]);
  1563. return self;},
  1564. args: ["aNode"],
  1565. source: "visitClassReferenceNode: aNode\x0a\x09(referencedClasses includes: aNode value) ifFalse: [\x0a\x09\x09referencedClasses add: aNode value].\x0a\x09self lazyAssignExpression: '(smalltalk.', aNode value, ' || ', aNode value, ')'",
  1566. messageSends: ["ifFalse:", "includes:", "value", "add:", "lazyAssignExpression:", ","],
  1567. referencedClasses: []
  1568. }),
  1569. smalltalk.ImpCodeGenerator);
  1570. smalltalk.addMethod(
  1571. "_visitDynamicArrayNode_",
  1572. smalltalk.method({
  1573. selector: "visitDynamicArrayNode:",
  1574. category: 'visiting',
  1575. fn: function (aNode){
  1576. var self=this;
  1577. var args=nil;
  1578. (args=smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_collect_", [(function(node){return smalltalk.send(self, "_isolated_", [node]);})]));
  1579. smalltalk.send(self, "_lazyAssignValue_", [smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(str){smalltalk.send(str, "_nextPutAll_", ["["]);smalltalk.send(args, "_do_separatedBy_", [(function(each){return smalltalk.send(str, "_nextPutAll_", [smalltalk.send(self, "_useValueNamed_", [each])]);}), (function(){return smalltalk.send(str, "_nextPutAll_", [", "]);})]);return smalltalk.send(str, "_nextPutAll_", ["]"]);})])]);
  1580. return self;},
  1581. args: ["aNode"],
  1582. source: "visitDynamicArrayNode: aNode\x0a\x09| args |\x0a\x09args :=aNode nodes collect: [ :node | self isolated: node ].\x0a\x09self lazyAssignValue: (String streamContents: [ :str |\x0a\x09\x09str nextPutAll: '['.\x0a\x09\x09args\x0a\x09 \x09\x09do: [:each | str nextPutAll: (self useValueNamed: each) ]\x0a\x09 \x09\x09separatedBy: [str nextPutAll: ', '].\x0a str nextPutAll: ']'\x0a\x09])",
  1583. messageSends: ["collect:", "nodes", "isolated:", "lazyAssignValue:", "streamContents:", "nextPutAll:", "do:separatedBy:", "useValueNamed:"],
  1584. referencedClasses: ["String"]
  1585. }),
  1586. smalltalk.ImpCodeGenerator);
  1587. smalltalk.addMethod(
  1588. "_visitDynamicDictionaryNode_",
  1589. smalltalk.method({
  1590. selector: "visitDynamicDictionaryNode:",
  1591. category: 'visiting',
  1592. fn: function (aNode){
  1593. var self=this;
  1594. var elements=nil;
  1595. (elements=smalltalk.send(self, "_isolated_", [(function($rec){smalltalk.send($rec, "_nodes_", [smalltalk.send(aNode, "_nodes", [])]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.DynamicArrayNode || DynamicArrayNode), "_new", []))]));
  1596. smalltalk.send(self, "_lazyAssignValue_", [smalltalk.send(smalltalk.send("smalltalk.HashedCollection._fromPairs_(", "__comma", [smalltalk.send(self, "_useValueNamed_", [elements])]), "__comma", [")"])]);
  1597. return self;},
  1598. args: ["aNode"],
  1599. source: "visitDynamicDictionaryNode: aNode\x0a\x09| elements |\x0a\x09elements := self isolated: (DynamicArrayNode new nodes: aNode nodes; yourself).\x0a\x09self lazyAssignValue: 'smalltalk.HashedCollection._fromPairs_(', (self useValueNamed: elements), ')'",
  1600. messageSends: ["isolated:", "nodes:", "nodes", "yourself", "new", "lazyAssignValue:", ",", "useValueNamed:"],
  1601. referencedClasses: ["DynamicArrayNode"]
  1602. }),
  1603. smalltalk.ImpCodeGenerator);
  1604. smalltalk.addMethod(
  1605. "_visitFailure_",
  1606. smalltalk.method({
  1607. selector: "visitFailure:",
  1608. category: 'visiting',
  1609. fn: function (aFailure) {
  1610. var self=this;
  1611. smalltalk.send(self, "_error_", [smalltalk.send(aFailure, "_asString", [])]);
  1612. return self;},
  1613. args: ["aFailure"],
  1614. source: "visitFailure: aFailure\x0a\x09self error: aFailure asString",
  1615. messageSends: ["error:", "asString"],
  1616. referencedClasses: []
  1617. }),
  1618. smalltalk.ImpCodeGenerator);
  1619. smalltalk.addMethod(
  1620. "_visitJSStatementNode_",
  1621. smalltalk.method({
  1622. selector: "visitJSStatementNode:",
  1623. category: 'visiting',
  1624. fn: function (aNode){
  1625. var self=this;
  1626. smalltalk.send(self, "_aboutToModifyState", []);
  1627. smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(";", "__comma", [smalltalk.send(smalltalk.send(aNode, "_source", []), "_replace_with_", [">>", ">"])]), "__comma", [";"]), "__comma", [smalltalk.send(self, "_mylf", [])])]);
  1628. return self;},
  1629. args: ["aNode"],
  1630. source: "visitJSStatementNode: aNode\x0a\x09self aboutToModifyState.\x0a\x09stream nextPutAll: ';', (aNode source replace: '>>' with: '>'), ';', self mylf",
  1631. messageSends: ["aboutToModifyState", "nextPutAll:", ",", "replace:with:", "source", "mylf"],
  1632. referencedClasses: []
  1633. }),
  1634. smalltalk.ImpCodeGenerator);
  1635. smalltalk.addMethod(
  1636. "_visitMethodNode_",
  1637. smalltalk.method({
  1638. selector: "visitMethodNode:",
  1639. category: 'visiting',
  1640. fn: function (aNode){
  1641. var self=this;
  1642. var str=nil;
  1643. var currentSelector=nil;
  1644. (self['@currentSelector']=smalltalk.send(smalltalk.send(aNode, "_selector", []), "_asSelector", []));
  1645. (self['@nestedBlocks']=(0));
  1646. (self['@earlyReturn']=false);
  1647. (self['@messageSends']=[]);
  1648. (self['@referencedClasses']=[]);
  1649. (self['@unknownVariables']=[]);
  1650. (self['@tempVariables']=[]);
  1651. (self['@argVariables']=[]);
  1652. (self['@lazyVars']=smalltalk.send((smalltalk.HashedCollection || HashedCollection), "_new", []));
  1653. (self['@mutables']=smalltalk.send((smalltalk.Set || Set), "_new", []));
  1654. (self['@realVarNames']=smalltalk.send((smalltalk.Set || Set), "_new", []));
  1655. (function($rec){smalltalk.send($rec, "_nextPutAll_", ["smalltalk.method({"]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("selector: \x22", "__comma", [smalltalk.send(aNode, "_selector", [])]), "__comma", ["\x22,"])]);return smalltalk.send($rec, "_lf", []);})(self['@stream']);
  1656. (function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("source: ", "__comma", [smalltalk.send(smalltalk.send(self, "_source", []), "_asJavascript", [])]), "__comma", [","])]);return smalltalk.send($rec, "_lf", []);})(self['@stream']);
  1657. smalltalk.send(self['@stream'], "_nextPutAll_", ["fn: function("]);
  1658. smalltalk.send(smalltalk.send(aNode, "_arguments", []), "_do_separatedBy_", [(function(each){smalltalk.send(self['@argVariables'], "_add_", [each]);return smalltalk.send(self['@stream'], "_nextPutAll_", [each]);}), (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [", "]);})]);
  1659. smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send("){var self=this;", "__comma", [smalltalk.send(self, "_mylf", [])])]);
  1660. (str=self['@stream']);
  1661. (self['@stream']=smalltalk.send("", "_writeStream", []));
  1662. smalltalk.send(self, "_switchTarget_", [nil]);
  1663. smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_size", []), "__eq", [(1)])]);
  1664. smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_first", [])]);
  1665. smalltalk.send(self['@realVarNames'], "_ifNotEmpty_", [(function(){return smalltalk.send(str, "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send("var ", "__comma", [smalltalk.send(smalltalk.send(self['@realVarNames'], "_asArray", []), "_join_", [","])]), "__comma", [";"]), "__comma", [smalltalk.send(self, "_mylf", [])])]);})]);
  1666. ((($receiver = self['@earlyReturn']).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(str, "_nextPutAll_", [smalltalk.send("var $early={}; try{", "__comma", [smalltalk.send(self, "_mylf", [])])]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(str, "_nextPutAll_", [smalltalk.send("var $early={}; try{", "__comma", [smalltalk.send(self, "_mylf", [])])]);})]));
  1667. smalltalk.send(str, "_nextPutAll_", [smalltalk.send(self['@stream'], "_contents", [])]);
  1668. (self['@stream']=str);
  1669. ((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_first", []), "_nodes", []), "_notEmpty", []), "_and_", [(function(){var checker=nil;
  1670. (checker=smalltalk.send((smalltalk.ReturnNodeChecker || ReturnNodeChecker), "_new", []));smalltalk.send(checker, "_visit_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_first", []), "_nodes", []), "_last", [])]);return smalltalk.send(checker, "_wasReturnNode", []);})])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){smalltalk.send(self, "_switchTarget_", ["^"]);smalltalk.send(self, "_lazyAssignValue_", ["self"]);return smalltalk.send(self, "_switchTarget_", [nil]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){smalltalk.send(self, "_switchTarget_", ["^"]);smalltalk.send(self, "_lazyAssignValue_", ["self"]);return smalltalk.send(self, "_switchTarget_", [nil]);})]));
  1671. ((($receiver = self['@earlyReturn']).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", ["} catch(e) {if(e===$early) return e[0]; throw e}"]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(self['@stream'], "_nextPutAll_", ["} catch(e) {if(e===$early) return e[0]; throw e}"]);})]));
  1672. smalltalk.send(self['@stream'], "_nextPutAll_", ["}"]);
  1673. (function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(",", "__comma", [smalltalk.send((smalltalk.String || String), "_lf", [])]), "__comma", ["messageSends: "])]);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(self['@messageSends'], "_asJavascript", []), "__comma", [","])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("args: ", "__comma", [smalltalk.send(self['@argVariables'], "_asJavascript", [])]), "__comma", [","])]);smalltalk.send($rec, "_lf", []);return smalltalk.send($rec, "_nextPutAll_", ["referencedClasses: ["]);})(self['@stream']);
  1674. smalltalk.send(self['@referencedClasses'], "_do_separatedBy_", [(function(each){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(each, "_printString", [])]);}), (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [","]);})]);
  1675. smalltalk.send(self['@stream'], "_nextPutAll_", ["]"]);
  1676. smalltalk.send(self['@stream'], "_nextPutAll_", ["})"]);
  1677. smalltalk.send(self, "_assert_", [smalltalk.send(self['@mutables'], "_isEmpty", [])]);
  1678. return self;},
  1679. args: ["aNode"],
  1680. source: "visitMethodNode: aNode\x0a\x09| str currentSelector | \x0a\x09currentSelector := aNode selector asSelector.\x0a\x09nestedBlocks := 0.\x0a\x09earlyReturn := false.\x0a\x09messageSends := #().\x0a\x09referencedClasses := #().\x0a\x09unknownVariables := #().\x0a\x09tempVariables := #().\x0a\x09argVariables := #().\x0a\x09lazyVars := HashedCollection new.\x0a\x09mutables := Set new.\x0a\x09realVarNames := Set new.\x0a\x09stream \x0a\x09 nextPutAll: 'smalltalk.method({'; lf;\x0a\x09 nextPutAll: 'selector: \x22', aNode selector, '\x22,'; lf.\x0a\x09stream nextPutAll: 'source: ', self source asJavascript, ',';lf.\x0a\x09stream nextPutAll: 'fn: function('.\x0a\x09aNode arguments \x0a\x09 do: [:each | \x0a\x09\x09argVariables add: each.\x0a\x09\x09stream nextPutAll: each]\x0a\x09 separatedBy: [stream nextPutAll: ', '].\x0a\x09stream \x0a\x09 nextPutAll: '){var self=this;', self mylf.\x0a\x09str := stream.\x0a\x09stream := '' writeStream.\x0a\x09self switchTarget: nil.\x0a\x09self assert: aNode nodes size = 1.\x0a\x09self visit: aNode nodes first.\x0a\x09realVarNames ifNotEmpty: [ str nextPutAll: 'var ', (realVarNames asArray join: ','), ';', self mylf ].\x0a\x09earlyReturn ifTrue: [\x0a\x09 str nextPutAll: 'var $early={}; try{', self mylf].\x0a\x09str nextPutAll: stream contents.\x0a\x09stream := str.\x0a\x09(aNode nodes first nodes notEmpty and: [ |checker|\x0a\x09 checker := ReturnNodeChecker new.\x0a\x09 checker visit: aNode nodes first nodes last.\x0a\x09 checker wasReturnNode]) ifFalse: [ self switchTarget: '^'. self lazyAssignValue: 'self'. self switchTarget: nil ].\x0a\x09earlyReturn ifTrue: [\x0a\x09 stream nextPutAll: '} catch(e) {if(e===$early) return e[0]; throw e}'].\x0a\x09stream nextPutAll: '}'.\x0a\x09stream \x0a\x09\x09nextPutAll: ',', String lf, 'messageSends: ';\x0a\x09\x09nextPutAll: messageSends asJavascript, ','; lf;\x0a \x09nextPutAll: 'args: ', argVariables asJavascript, ','; lf;\x0a\x09\x09nextPutAll: 'referencedClasses: ['.\x0a\x09referencedClasses \x0a\x09\x09do: [:each | stream nextPutAll: each printString]\x0a\x09\x09separatedBy: [stream nextPutAll: ','].\x0a\x09stream nextPutAll: ']'.\x0a\x09stream nextPutAll: '})'.\x0a\x09self assert: mutables isEmpty",
  1681. messageSends: ["asSelector", "selector", "new", "nextPutAll:", "lf", ",", "asJavascript", "source", "do:separatedBy:", "arguments", "add:", "mylf", "writeStream", "switchTarget:", "assert:", "=", "size", "nodes", "visit:", "first", "ifNotEmpty:", "join:", "asArray", "ifTrue:", "contents", "ifFalse:", "and:", "notEmpty", "last", "wasReturnNode", "lazyAssignValue:", "printString", "isEmpty"],
  1682. referencedClasses: ["HashedCollection", "Set", "ReturnNodeChecker", "String"]
  1683. }),
  1684. smalltalk.ImpCodeGenerator);
  1685. smalltalk.addMethod(
  1686. "_visitReturnNode_",
  1687. smalltalk.method({
  1688. selector: "visitReturnNode:",
  1689. category: 'visiting',
  1690. fn: function (aNode){
  1691. var self=this;
  1692. smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_size", []), "__eq", [(1)])]);
  1693. ((($receiver = ((($receiver = self['@nestedBlocks']).klass === smalltalk.Number) ? $receiver >(0) : smalltalk.send($receiver, "__gt", [(0)]))).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (self['@earlyReturn']=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (self['@earlyReturn']=true);})]));
  1694. smalltalk.send(self, "_visit_targetBeing_", [smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_first", []), ((($receiver = ((($receiver = self['@nestedBlocks']).klass === smalltalk.Number) ? $receiver >(0) : smalltalk.send($receiver, "__gt", [(0)]))).klass === smalltalk.Boolean) ? ($receiver ? (function(){return "!";})() : (function(){return "^";})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return "!";}), (function(){return "^";})]))]);
  1695. smalltalk.send(self, "_lazyAssignValue_", [""]);
  1696. return self;},
  1697. args: ["aNode"],
  1698. source: "visitReturnNode: aNode\x0a\x09self assert: aNode nodes size = 1.\x0a\x09nestedBlocks > 0 ifTrue: [\x0a\x09 earlyReturn := true].\x0a\x09self\x0a\x09\x09visit: aNode nodes first\x0a\x09\x09targetBeing: (nestedBlocks > 0 ifTrue: ['!'] ifFalse: ['^']).\x0a\x09self lazyAssignValue: ''",
  1699. messageSends: ["assert:", "=", "size", "nodes", "ifTrue:", ">", "visit:targetBeing:", "first", "ifTrue:ifFalse:", "lazyAssignValue:"],
  1700. referencedClasses: []
  1701. }),
  1702. smalltalk.ImpCodeGenerator);
  1703. smalltalk.addMethod(
  1704. "_visitSendNode_",
  1705. smalltalk.method({
  1706. selector: "visitSendNode:",
  1707. category: 'visiting',
  1708. fn: function (aNode){
  1709. var self=this;
  1710. var $early={};
  1711. try{var receiver=nil;
  1712. var superSend=nil;
  1713. var rcv=nil;
  1714. ((($receiver = smalltalk.send(self['@messageSends'], "_includes_", [smalltalk.send(aNode, "_selector", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self['@messageSends'], "_add_", [smalltalk.send(aNode, "_selector", [])]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(self['@messageSends'], "_add_", [smalltalk.send(aNode, "_selector", [])]);})]));
  1715. ((($receiver = smalltalk.send(self, "_performOptimizations", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(self, "_inlineLiteral_receiverNode_argumentNodes_", [smalltalk.send(aNode, "_selector", []), smalltalk.send(aNode, "_receiver", []), smalltalk.send(aNode, "_arguments", [])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (function(){throw $early=[self]})();})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (function(){throw $early=[self]})();})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(self, "_inlineLiteral_receiverNode_argumentNodes_", [smalltalk.send(aNode, "_selector", []), smalltalk.send(aNode, "_receiver", []), smalltalk.send(aNode, "_arguments", [])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (function(){throw $early=[self]})();})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (function(){throw $early=[self]})();})]));})]));
  1716. (rcv=smalltalk.send(self, "_isolated_", [smalltalk.send(aNode, "_receiver", [])]));
  1717. (superSend=smalltalk.send(smalltalk.send(self['@lazyVars'], "_at_ifAbsent_", [rcv, (function(){return nil;})]), "__eq", ["super"]));
  1718. ((($receiver = superSend).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self['@mutables'], "_remove_", [rcv]);return smalltalk.send(self['@lazyVars'], "_at_put_", [rcv, "self"]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self['@mutables'], "_remove_", [rcv]);return smalltalk.send(self['@lazyVars'], "_at_put_", [rcv, "self"]);})]));
  1719. ((($receiver = smalltalk.send(self, "_performOptimizations", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){var inline=nil;
  1720. (inline=smalltalk.send(self, "_inline_receiver_argumentNodes_", [smalltalk.send(aNode, "_selector", []), rcv, smalltalk.send(aNode, "_arguments", [])]));return (($receiver = inline) != nil && $receiver != undefined) ? (function(){var args=nil;
  1721. (args=((($receiver = smalltalk.send(inline, "__eq", [true])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(aNode, "_arguments", []);})() : (function(){return inline;})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(aNode, "_arguments", []);}), (function(){return inline;})])));smalltalk.send(self, "_prvPutAndClose_", [(function(){return smalltalk.send(self, "_send_to_arguments_superSend_", [smalltalk.send(aNode, "_selector", []), rcv, args, superSend]);})]);return (function(){throw $early=[self]})();})() : nil;})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){var inline=nil;
  1722. (inline=smalltalk.send(self, "_inline_receiver_argumentNodes_", [smalltalk.send(aNode, "_selector", []), rcv, smalltalk.send(aNode, "_arguments", [])]));return (($receiver = inline) != nil && $receiver != undefined) ? (function(){var args=nil;
  1723. (args=((($receiver = smalltalk.send(inline, "__eq", [true])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(aNode, "_arguments", []);})() : (function(){return inline;})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(aNode, "_arguments", []);}), (function(){return inline;})])));smalltalk.send(self, "_prvPutAndClose_", [(function(){return smalltalk.send(self, "_send_to_arguments_superSend_", [smalltalk.send(aNode, "_selector", []), rcv, args, superSend]);})]);return (function(){throw $early=[self]})();})() : nil;})]));
  1724. smalltalk.send(self, "_send_to_arguments_superSend_", [smalltalk.send(aNode, "_selector", []), rcv, smalltalk.send(aNode, "_arguments", []), superSend]);
  1725. return self;
  1726. } catch(e) {if(e===$early)return e[0]; throw e}},
  1727. args: ["aNode"],
  1728. source: "visitSendNode: aNode\x0a | receiver superSend rcv |\x0a (messageSends includes: aNode selector) ifFalse: [\x0a messageSends add: aNode selector].\x0a\x09\x0a\x09self performOptimizations \x0a\x09\x09ifTrue: [\x0a\x09\x09\x09(self inlineLiteral: aNode selector receiverNode: aNode receiver argumentNodes: aNode arguments) ifTrue: [ ^self ].\x0a\x09\x09].\x0a\x0a\x09rcv := self isolated: aNode receiver.\x0a superSend := (lazyVars at: rcv ifAbsent: []) = 'super'.\x0a superSend ifTrue: [ mutables remove: rcv. lazyVars at: rcv put: 'self' ].\x0a\x0a\x09self performOptimizations \x0a\x09\x09ifTrue: [ | inline |\x0a\x09\x09\x09inline := self inline: aNode selector receiver: rcv argumentNodes: aNode arguments.\x0a\x09\x09\x09inline ifNotNil: [ | args |\x0a\x09\x09\x09\x09args := inline = true ifTrue: [ aNode arguments ] ifFalse: [ inline ].\x0a\x09\x09\x09\x09self prvPutAndClose: [ self send: aNode selector to: rcv arguments: args superSend: superSend ].\x0a\x09\x09\x09\x09^self ]].\x0a\x09self send: aNode selector to: rcv arguments: aNode arguments superSend: superSend",
  1729. messageSends: ["ifFalse:", "includes:", "selector", "add:", "ifTrue:", "performOptimizations", "inlineLiteral:receiverNode:argumentNodes:", "receiver", "arguments", "isolated:", "=", "at:ifAbsent:", "remove:", "at:put:", "inline:receiver:argumentNodes:", "ifNotNil:", "ifTrue:ifFalse:", "prvPutAndClose:", "send:to:arguments:superSend:"],
  1730. referencedClasses: []
  1731. }),
  1732. smalltalk.ImpCodeGenerator);
  1733. smalltalk.addMethod(
  1734. "_visitSequenceNode_",
  1735. smalltalk.method({
  1736. selector: "visitSequenceNode:",
  1737. category: 'visiting',
  1738. fn: function (aNode) {
  1739. var self=this;
  1740. ((($receiver = smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_isEmpty", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self, "_sequenceOfNodes_temps_", [smalltalk.send(aNode, "_nodes", []), smalltalk.send(aNode, "_temps", [])]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(self, "_sequenceOfNodes_temps_", [smalltalk.send(aNode, "_nodes", []), smalltalk.send(aNode, "_temps", [])]);})]));
  1741. return self;},
  1742. args: ["aNode"],
  1743. source: "visitSequenceNode: aNode\x0a\x09aNode nodes isEmpty ifFalse: [\x0a\x09\x09self sequenceOfNodes: aNode nodes temps: aNode temps ]\x0a",
  1744. messageSends: ["ifFalse:", "isEmpty", "nodes", "sequenceOfNodes:temps:", "temps"],
  1745. referencedClasses: []
  1746. }),
  1747. smalltalk.ImpCodeGenerator);
  1748. smalltalk.addMethod(
  1749. "_visitValueNode_",
  1750. smalltalk.method({
  1751. selector: "visitValueNode:",
  1752. category: 'visiting',
  1753. fn: function (aNode){
  1754. var self=this;
  1755. smalltalk.send(self, "_lazyAssignValue_", [smalltalk.send(smalltalk.send(aNode, "_value", []), "_asJavascript", [])]);
  1756. return self;},
  1757. args: ["aNode"],
  1758. source: "visitValueNode: aNode\x0a\x09self lazyAssignValue: aNode value asJavascript",
  1759. messageSends: ["lazyAssignValue:", "asJavascript", "value"],
  1760. referencedClasses: []
  1761. }),
  1762. smalltalk.ImpCodeGenerator);
  1763. smalltalk.addMethod(
  1764. "_visitVariableNode_",
  1765. smalltalk.method({
  1766. selector: "visitVariableNode:",
  1767. category: 'visiting',
  1768. fn: function (aNode){
  1769. var self=this;
  1770. var varName=nil;
  1771. ((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(self, "_currentClass", []), "_allInstanceVariableNames", []), "_includes_", [smalltalk.send(aNode, "_value", [])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_lazyAssignExpression_", [smalltalk.send(smalltalk.send("self['@", "__comma", [smalltalk.send(aNode, "_value", [])]), "__comma", ["']"])]);})() : (function(){(varName=smalltalk.send(self, "_safeVariableNameFor_", [smalltalk.send(aNode, "_value", [])]));return ((($receiver = smalltalk.send(smalltalk.send(self, "_knownVariables", []), "_includes_", [varName])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){smalltalk.send(self['@unknownVariables'], "_add_", [smalltalk.send(aNode, "_value", [])]);return ((($receiver = smalltalk.send(aNode, "_assigned", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_lazyAssignExpression_", [varName]);})() : (function(){return smalltalk.send(self, "_lazyAssignExpression_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("(typeof ", "__comma", [varName]), "__comma", [" == 'undefined' ? nil : "]), "__comma", [varName]), "__comma", [")"])]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_lazyAssignExpression_", [varName]);}), (function(){return smalltalk.send(self, "_lazyAssignExpression_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("(typeof ", "__comma", [varName]), "__comma", [" == 'undefined' ? nil : "]), "__comma", [varName]), "__comma", [")"])]);})]));})() : (function(){return ((($receiver = smalltalk.send(smalltalk.send(aNode, "_value", []), "__eq", ["thisContext"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_lazyAssignExpression_", ["(smalltalk.getThisContext())"]);})() : (function(){return ((($receiver = smalltalk.send(smalltalk.send(self, "_pseudoVariables", []), "_includes_", [varName])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_lazyAssignValue_", [varName]);})() : (function(){return smalltalk.send(self, "_lazyAssignExpression_", [varName]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_lazyAssignValue_", [varName]);}), (function(){return smalltalk.send(self, "_lazyAssignExpression_", [varName]);})]));})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_lazyAssignExpression_", ["(smalltalk.getThisContext())"]);}), (function(){return ((($receiver = smalltalk.send(smalltalk.send(self, "_pseudoVariables", []), "_includes_", [varName])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_lazyAssignValue_", [varName]);})() : (function(){return smalltalk.send(self, "_lazyAssignExpression_", [varName]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_lazyAssignValue_", [varName]);}), (function(){return smalltalk.send(self, "_lazyAssignExpression_", [varName]);})]));})]));})()) : smalltalk.send($receiver, "_ifFalse_ifTrue_", [(function(){smalltalk.send(self['@unknownVariables'], "_add_", [smalltalk.send(aNode, "_value", [])]);return ((($receiver = smalltalk.send(aNode, "_assigned", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_lazyAssignExpression_", [varName]);})() : (function(){return smalltalk.send(self, "_lazyAssignExpression_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("(typeof ", "__comma", [varName]), "__comma", [" == 'undefined' ? nil : "]), "__comma", [varName]), "__comma", [")"])]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_lazyAssignExpression_", [varName]);}), (function(){return smalltalk.send(self, "_lazyAssignExpression_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("(typeof ", "__comma", [varName]), "__comma", [" == 'undefined' ? nil : "]), "__comma", [varName]), "__comma", [")"])]);})]));}), (function(){return ((($receiver = smalltalk.send(smalltalk.send(aNode, "_value", []), "__eq", ["thisContext"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_lazyAssignExpression_", ["(smalltalk.getThisContext())"]);})() : (function(){return ((($receiver = smalltalk.send(smalltalk.send(self, "_pseudoVariables", []), "_includes_", [varName])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_lazyAssignValue_", [varName]);})() : (function(){return smalltalk.send(self, "_lazyAssignExpression_", [varName]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_lazyAssignValue_", [varName]);}), (function(){return smalltalk.send(self, "_lazyAssignExpression_", [varName]);})]));})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_lazyAssignExpression_", ["(smalltalk.getThisContext())"]);}), (function(){return ((($receiver = smalltalk.send(smalltalk.send(self, "_pseudoVariables", []), "_includes_", [varName])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_lazyAssignValue_", [varName]);})() : (function(){return smalltalk.send(self, "_lazyAssignExpression_", [varName]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_lazyAssignValue_", [varName]);}), (function(){return smalltalk.send(self, "_lazyAssignExpression_", [varName]);})]));})]));})]));})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_lazyAssignExpression_", [smalltalk.send(smalltalk.send("self['@", "__comma", [smalltalk.send(aNode, "_value", [])]), "__comma", ["']"])]);}), (function(){(varName=smalltalk.send(self, "_safeVariableNameFor_", [smalltalk.send(aNode, "_value", [])]));return ((($receiver = smalltalk.send(smalltalk.send(self, "_knownVariables", []), "_includes_", [varName])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){smalltalk.send(self['@unknownVariables'], "_add_", [smalltalk.send(aNode, "_value", [])]);return ((($receiver = smalltalk.send(aNode, "_assigned", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_lazyAssignExpression_", [varName]);})() : (function(){return smalltalk.send(self, "_lazyAssignExpression_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("(typeof ", "__comma", [varName]), "__comma", [" == 'undefined' ? nil : "]), "__comma", [varName]), "__comma", [")"])]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_lazyAssignExpression_", [varName]);}), (function(){return smalltalk.send(self, "_lazyAssignExpression_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("(typeof ", "__comma", [varName]), "__comma", [" == 'undefined' ? nil : "]), "__comma", [varName]), "__comma", [")"])]);})]));})() : (function(){return ((($receiver = smalltalk.send(smalltalk.send(aNode, "_value", []), "__eq", ["thisContext"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_lazyAssignExpression_", ["(smalltalk.getThisContext())"]);})() : (function(){return ((($receiver = smalltalk.send(smalltalk.send(self, "_pseudoVariables", []), "_includes_", [varName])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_lazyAssignValue_", [varName]);})() : (function(){return smalltalk.send(self, "_lazyAssignExpression_", [varName]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_lazyAssignValue_", [varName]);}), (function(){return smalltalk.send(self, "_lazyAssignExpression_", [varName]);})]));})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_lazyAssignExpression_", ["(smalltalk.getThisContext())"]);}), (function(){return ((($receiver = smalltalk.send(smalltalk.send(self, "_pseudoVariables", []), "_includes_", [varName])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_lazyAssignValue_", [varName]);})() : (function(){return smalltalk.send(self, "_lazyAssignExpression_", [varName]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_lazyAssignValue_", [varName]);}), (function(){return smalltalk.send(self, "_lazyAssignExpression_", [varName]);})]));})]));})()) : smalltalk.send($receiver, "_ifFalse_ifTrue_", [(function(){smalltalk.send(self['@unknownVariables'], "_add_", [smalltalk.send(aNode, "_value", [])]);return ((($receiver = smalltalk.send(aNode, "_assigned", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_lazyAssignExpression_", [varName]);})() : (function(){return smalltalk.send(self, "_lazyAssignExpression_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("(typeof ", "__comma", [varName]), "__comma", [" == 'undefined' ? nil : "]), "__comma", [varName]), "__comma", [")"])]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_lazyAssignExpression_", [varName]);}), (function(){return smalltalk.send(self, "_lazyAssignExpression_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("(typeof ", "__comma", [varName]), "__comma", [" == 'undefined' ? nil : "]), "__comma", [varName]), "__comma", [")"])]);})]));}), (function(){return ((($receiver = smalltalk.send(smalltalk.send(aNode, "_value", []), "__eq", ["thisContext"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_lazyAssignExpression_", ["(smalltalk.getThisContext())"]);})() : (function(){return ((($receiver = smalltalk.send(smalltalk.send(self, "_pseudoVariables", []), "_includes_", [varName])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_lazyAssignValue_", [varName]);})() : (function(){return smalltalk.send(self, "_lazyAssignExpression_", [varName]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_lazyAssignValue_", [varName]);}), (function(){return smalltalk.send(self, "_lazyAssignExpression_", [varName]);})]));})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_lazyAssignExpression_", ["(smalltalk.getThisContext())"]);}), (function(){return ((($receiver = smalltalk.send(smalltalk.send(self, "_pseudoVariables", []), "_includes_", [varName])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_lazyAssignValue_", [varName]);})() : (function(){return smalltalk.send(self, "_lazyAssignExpression_", [varName]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_lazyAssignValue_", [varName]);}), (function(){return smalltalk.send(self, "_lazyAssignExpression_", [varName]);})]));})]));})]));})]));
  1772. return self;},
  1773. args: ["aNode"],
  1774. source: "visitVariableNode: aNode\x0a\x09| varName |\x0a\x09(self currentClass allInstanceVariableNames includes: aNode value) \x0a\x09\x09ifTrue: [self lazyAssignExpression: 'self[''@', aNode value, ''']']\x0a\x09\x09ifFalse: [\x0a \x09varName := self safeVariableNameFor: aNode value.\x0a\x09\x09\x09(self knownVariables includes: varName) \x0a \x09\x09ifFalse: [\x0a \x09unknownVariables add: aNode value.\x0a \x09aNode assigned \x0a \x09\x09ifTrue: [self lazyAssignExpression: varName]\x0a \x09\x09ifFalse: [self lazyAssignExpression: '(typeof ', varName, ' == ''undefined'' ? nil : ', varName, ')']]\x0a \x09\x09ifTrue: [\x0a \x09aNode value = 'thisContext'\x0a \x09\x09ifTrue: [self lazyAssignExpression: '(smalltalk.getThisContext())']\x0a \x09\x09\x09\x09ifFalse: [(self pseudoVariables includes: varName)\x0a\x09\x09\x09\x09\x09\x09\x09ifTrue: [ self lazyAssignValue: varName ]\x0a\x09\x09\x09\x09\x09\x09\x09ifFalse: [ self lazyAssignExpression: varName]]]]",
  1775. messageSends: ["ifTrue:ifFalse:", "includes:", "allInstanceVariableNames", "currentClass", "value", "lazyAssignExpression:", ",", "safeVariableNameFor:", "ifFalse:ifTrue:", "knownVariables", "add:", "assigned", "=", "pseudoVariables", "lazyAssignValue:"],
  1776. referencedClasses: []
  1777. }),
  1778. smalltalk.ImpCodeGenerator);
  1779. smalltalk.addMethod(
  1780. "_visitVerbatimNode_",
  1781. smalltalk.method({
  1782. selector: "visitVerbatimNode:",
  1783. category: 'visiting',
  1784. fn: function (aNode){
  1785. var self=this;
  1786. smalltalk.send(self, "_lazyAssignValue_", [smalltalk.send(aNode, "_value", [])]);
  1787. return self;},
  1788. args: ["aNode"],
  1789. source: "visitVerbatimNode: aNode\x0a\x09self lazyAssignValue: aNode value",
  1790. messageSends: ["lazyAssignValue:", "value"],
  1791. referencedClasses: []
  1792. }),
  1793. smalltalk.ImpCodeGenerator);
  1794. smalltalk.ImpCodeGenerator.klass.iVarNames = ['performOptimizations'];
  1795. smalltalk.addMethod(
  1796. "_performOptimizations",
  1797. smalltalk.method({
  1798. selector: "performOptimizations",
  1799. category: 'accessing',
  1800. fn: function () {
  1801. var self=this;
  1802. return (($receiver = self['@performOptimizations']) == nil || $receiver == undefined) ? (function(){return true;})() : $receiver;
  1803. return self;},
  1804. args: [],
  1805. source: "performOptimizations\x0a\x09^performOptimizations ifNil: [true]",
  1806. messageSends: ["ifNil:"],
  1807. referencedClasses: []
  1808. }),
  1809. smalltalk.ImpCodeGenerator.klass);
  1810. smalltalk.addMethod(
  1811. "_performOptimizations_",
  1812. smalltalk.method({
  1813. selector: "performOptimizations:",
  1814. category: 'accessing',
  1815. fn: function (aBoolean) {
  1816. var self=this;
  1817. (self['@performOptimizations']=aBoolean);
  1818. return self;},
  1819. args: ["aBoolean"],
  1820. source: "performOptimizations: aBoolean\x0a\x09performOptimizations := aBoolean",
  1821. messageSends: [],
  1822. referencedClasses: []
  1823. }),
  1824. smalltalk.ImpCodeGenerator.klass);
  1825. smalltalk.addClass('IRASTTranslator', smalltalk.NodeVisitor, ['source', 'theClass', 'method', 'sequence', 'nextAlias'], 'Compiler');
  1826. smalltalk.IRASTTranslator.comment="I am the AST (abstract syntax tree) visitor responsible for building the intermediate representation graph.\x0aI rely on a builder object, instance of IRBuilder."
  1827. smalltalk.addClass('ReturnNodeChecker', smalltalk.NodeVisitor, ['wasReturnNode'], 'Compiler');
  1828. smalltalk.addMethod(
  1829. "_initialize",
  1830. smalltalk.method({
  1831. selector: "initialize",
  1832. category: 'initializing',
  1833. fn: function () {
  1834. var self=this;
  1835. (self['@wasReturnNode']=false);
  1836. return self;},
  1837. args: [],
  1838. source: "initialize\x0a\x09wasReturnNode := false",
  1839. messageSends: [],
  1840. referencedClasses: []
  1841. }),
  1842. smalltalk.ReturnNodeChecker);
  1843. smalltalk.addMethod(
  1844. "_visitReturnNode_",
  1845. smalltalk.method({
  1846. selector: "visitReturnNode:",
  1847. category: 'visiting',
  1848. fn: function (aNode) {
  1849. var self=this;
  1850. (self['@wasReturnNode']=true);
  1851. return self;},
  1852. args: ["aNode"],
  1853. source: "visitReturnNode: aNode\x0a\x09wasReturnNode := true",
  1854. messageSends: [],
  1855. referencedClasses: []
  1856. }),
  1857. smalltalk.ReturnNodeChecker);
  1858. smalltalk.addMethod(
  1859. "_wasReturnNode",
  1860. smalltalk.method({
  1861. selector: "wasReturnNode",
  1862. category: 'accessing',
  1863. fn: function () {
  1864. var self=this;
  1865. return self['@wasReturnNode'];
  1866. return self;},
  1867. args: [],
  1868. source: "wasReturnNode\x0a\x09^wasReturnNode",
  1869. messageSends: [],
  1870. referencedClasses: []
  1871. }),
  1872. smalltalk.ReturnNodeChecker);
  1873. smalltalk.addClass('SemanticAnalyzer', smalltalk.NodeVisitor, ['currentScope', 'theClass', 'classReferences', 'messageSends', 'superSends'], 'Compiler');
  1874. smalltalk.SemanticAnalyzer.comment="I semantically analyze the abstract syntax tree and annotate it with informations such as non local returns and variable scopes."
  1875. smalltalk.addClass('PackageLoader', smalltalk.Object, [], 'Compiler');
  1876. smalltalk.addClass('ScopeVar', smalltalk.Object, ['scope', 'name'], 'Compiler');
  1877. smalltalk.ScopeVar.comment="I am an entry in a LexicalScope that gets associated with variable nodes of the same name. \x0aThere are 4 different subclasses of vars: temp vars, local vars, args, and unknown/global vars."
  1878. smalltalk.addClass('AliasVar', smalltalk.ScopeVar, ['node'], 'Compiler');
  1879. smalltalk.AliasVar.comment="I am an internally defined variable by the compiler"
  1880. smalltalk.addClass('ArgVar', smalltalk.ScopeVar, [], 'Compiler');
  1881. smalltalk.ArgVar.comment="I am an argument of a method or block."
  1882. smalltalk.addClass('ClassRefVar', smalltalk.ScopeVar, [], 'Compiler');
  1883. smalltalk.ClassRefVar.comment="I am an class reference variable"
  1884. smalltalk.addClass('InstanceVar', smalltalk.ScopeVar, [], 'Compiler');
  1885. smalltalk.InstanceVar.comment="I am an instance variable of a method or block."
  1886. smalltalk.addClass('PseudoVar', smalltalk.ScopeVar, [], 'Compiler');
  1887. smalltalk.PseudoVar.comment="I am an pseudo variable.\x0a\x0aThe five Smalltalk pseudo variables are: 'self', 'super', 'nil', 'true' and 'false'"
  1888. smalltalk.addClass('TempVar', smalltalk.ScopeVar, [], 'Compiler');
  1889. smalltalk.TempVar.comment="I am an temporary variable of a method or block."
  1890. smalltalk.addClass('UnknownVar', smalltalk.ScopeVar, [], 'Compiler');
  1891. smalltalk.UnknownVar.comment="I am an unknown variable. Amber uses unknown variables as JavaScript globals"
  1892. smalltalk.addMethod(
  1893. "_appendToInstruction_",
  1894. smalltalk.method({
  1895. selector: "appendToInstruction:",
  1896. category: '*Compiler',
  1897. fn: function (anIRInstruction){
  1898. var self=this;
  1899. return smalltalk.withContext(function($ctx1) { _st(anIRInstruction)._appendBlock_(self);
  1900. return self}, self, "appendToInstruction:", [anIRInstruction], smalltalk.BlockClosure)},
  1901. args: ["anIRInstruction"],
  1902. source: "appendToInstruction: anIRInstruction\x0a anIRInstruction appendBlock: self",
  1903. messageSends: ["appendBlock:"],
  1904. referencedClasses: []
  1905. }),
  1906. smalltalk.BlockClosure);
  1907. smalltalk.addMethod(
  1908. "_nextChunk",
  1909. smalltalk.method({
  1910. selector: "nextChunk",
  1911. category: '*Compiler',
  1912. fn: function (){
  1913. var self=this;
  1914. return smalltalk.withContext(function($ctx1) { var $1,$3,$5,$6,$4,$2;
  1915. var $early={};
  1916. try {
  1917. $ctx1.locals.char=nil;
  1918. $ctx1.locals.result=nil;
  1919. $ctx1.locals.chunk=nil;
  1920. $ctx1.locals.result=_st("")._writeStream();
  1921. $1=(function(){
  1922. return smalltalk.withContext(function($ctx2) { $ctx1.locals.char=_st(self["@stream"])._next();
  1923. $ctx1.locals.char;
  1924. return _st($ctx1.locals.char)._notNil();
  1925. })});
  1926. $2=(function(){
  1927. return smalltalk.withContext(function($ctx2) { $3=_st($ctx1.locals.char).__eq("!");
  1928. $4=(function(){
  1929. return smalltalk.withContext(function($ctx3) { $5=_st(_st(self["@stream"])._peek()).__eq("!");
  1930. if(smalltalk.assert($5)){
  1931. return _st(self["@stream"])._next();
  1932. } else {
  1933. $6=_st(_st($ctx1.locals.result)._contents())._trimBoth();
  1934. throw $early=[$6];
  1935. };
  1936. })});
  1937. _st($3)._ifTrue_($4);
  1938. return _st($ctx1.locals.result)._nextPut_($ctx1.locals.char);
  1939. })});
  1940. _st($1)._whileTrue_($2);
  1941. return nil;
  1942. }
  1943. catch(e) {if(e===$early)return e[0]; throw e}
  1944. }, self, "nextChunk", [], smalltalk.ChunkParser)},
  1945. args: [],
  1946. source: "nextChunk\x0a\x09\x22The chunk format (Smalltalk Interchange Format or Fileout format)\x0a\x09is a trivial format but can be a bit tricky to understand:\x0a\x09\x09- Uses the exclamation mark as delimiter of chunks.\x0a\x09\x09- Inside a chunk a normal exclamation mark must be doubled.\x0a\x09\x09- A non empty chunk must be a valid Smalltalk expression.\x0a\x09\x09- A chunk on top level with a preceding empty chunk is an instruction chunk:\x0a\x09\x09\x09- The object created by the expression then takes over reading chunks.\x0a\x0a\x09This metod returns next chunk as a String (trimmed), empty String (all whitespace) or nil.\x22\x0a\x0a\x09| char result chunk |\x0a\x09result := '' writeStream.\x0a [char := stream next.\x0a char notNil] whileTrue: [\x0a char = '!' ifTrue: [\x0a stream peek = '!'\x0a ifTrue: [stream next \x22skipping the escape double\x22]\x0a ifFalse: [^result contents trimBoth \x22chunk end marker found\x22]].\x0a result nextPut: char].\x0a\x09^nil \x22a chunk needs to end with !\x22",
  1947. messageSends: ["writeStream", "whileTrue:", "ifTrue:", "ifTrue:ifFalse:", "next", "trimBoth", "contents", "=", "peek", "nextPut:", "notNil"],
  1948. referencedClasses: []
  1949. }),
  1950. smalltalk.ChunkParser);
  1951. smalltalk.addMethod(
  1952. "_stream_",
  1953. smalltalk.method({
  1954. selector: "stream:",
  1955. category: '*Compiler',
  1956. fn: function (aStream){
  1957. var self=this;
  1958. return smalltalk.withContext(function($ctx1) { self["@stream"]=aStream;
  1959. return self}, self, "stream:", [aStream], smalltalk.ChunkParser)},
  1960. args: ["aStream"],
  1961. source: "stream: aStream\x0a\x09stream := aStream",
  1962. messageSends: [],
  1963. referencedClasses: []
  1964. }),
  1965. smalltalk.ChunkParser);
  1966. smalltalk.addMethod(
  1967. "_on_",
  1968. smalltalk.method({
  1969. selector: "on:",
  1970. category: '*Compiler',
  1971. fn: function (aStream){
  1972. var self=this;
  1973. return smalltalk.withContext(function($ctx1) { var $1;
  1974. $1=_st(_st(self)._new())._stream_(aStream);
  1975. return $1;
  1976. }, self, "on:", [aStream], smalltalk.ChunkParser.klass)},
  1977. args: ["aStream"],
  1978. source: "on: aStream\x0a\x09^self new stream: aStream",
  1979. messageSends: ["stream:", "new"],
  1980. referencedClasses: []
  1981. }),
  1982. smalltalk.ChunkParser.klass);
  1983. smalltalk.addMethod(
  1984. "_asVariableName",
  1985. smalltalk.method({
  1986. selector: "asVariableName",
  1987. category: '*Compiler',
  1988. fn: function (){
  1989. var self=this;
  1990. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1991. $2=_st(_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._reservedWords())._includes_(self);
  1992. if(smalltalk.assert($2)){
  1993. $1=_st(self).__comma("_");
  1994. } else {
  1995. $1=self;
  1996. };
  1997. return $1;
  1998. }, self, "asVariableName", [], smalltalk.String)},
  1999. args: [],
  2000. source: "asVariableName\x0a\x09^ (Smalltalk current reservedWords includes: self)\x0a\x09\x09ifTrue: [ self, '_' ]\x0a\x09\x09ifFalse: [ self ]",
  2001. messageSends: ["ifTrue:ifFalse:", ",", "includes:", "reservedWords", "current"],
  2002. referencedClasses: ["Smalltalk"]
  2003. }),
  2004. smalltalk.String);
  2005. smalltalk.addMethod(
  2006. "_codeGeneratorClass",
  2007. smalltalk.method({
  2008. selector: "codeGeneratorClass",
  2009. category: '*Compiler',
  2010. fn: function (){
  2011. var self=this;
  2012. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2013. $2=self["@codeGeneratorClass"];
  2014. if(($receiver = $2) == nil || $receiver == undefined){
  2015. $1=(smalltalk.InliningCodeGenerator || InliningCodeGenerator);
  2016. } else {
  2017. $1=$2;
  2018. };
  2019. return $1;
  2020. }, self, "codeGeneratorClass", [], smalltalk.Compiler)},
  2021. args: [],
  2022. source: "codeGeneratorClass\x0a\x09^codeGeneratorClass ifNil: [InliningCodeGenerator]",
  2023. messageSends: ["ifNil:"],
  2024. referencedClasses: ["InliningCodeGenerator"]
  2025. }),
  2026. smalltalk.Compiler);
  2027. smalltalk.addMethod(
  2028. "_codeGeneratorClass_",
  2029. smalltalk.method({
  2030. selector: "codeGeneratorClass:",
  2031. category: '*Compiler',
  2032. fn: function (aClass){
  2033. var self=this;
  2034. return smalltalk.withContext(function($ctx1) { self["@codeGeneratorClass"]=aClass;
  2035. return self}, self, "codeGeneratorClass:", [aClass], smalltalk.Compiler)},
  2036. args: ["aClass"],
  2037. source: "codeGeneratorClass: aClass\x0a\x09codeGeneratorClass := aClass",
  2038. messageSends: [],
  2039. referencedClasses: []
  2040. }),
  2041. smalltalk.Compiler);
  2042. smalltalk.addMethod(
  2043. "_compile_",
  2044. smalltalk.method({
  2045. selector: "compile:",
  2046. category: '*Compiler',
  2047. fn: function (aString){
  2048. var self=this;
  2049. return smalltalk.withContext(function($ctx1) { var $1;
  2050. $1=_st(self)._compileNode_(_st(self)._parse_(aString));
  2051. return $1;
  2052. }, self, "compile:", [aString], smalltalk.Compiler)},
  2053. args: ["aString"],
  2054. source: "compile: aString\x0a\x09^self compileNode: (self parse: aString)",
  2055. messageSends: ["compileNode:", "parse:"],
  2056. referencedClasses: []
  2057. }),
  2058. smalltalk.Compiler);
  2059. smalltalk.addMethod(
  2060. "_compile_forClass_",
  2061. smalltalk.method({
  2062. selector: "compile:forClass:",
  2063. category: '*Compiler',
  2064. fn: function (aString,aClass){
  2065. var self=this;
  2066. return smalltalk.withContext(function($ctx1) { var $1;
  2067. _st(self)._currentClass_(aClass);
  2068. _st(self)._source_(aString);
  2069. $1=_st(self)._compile_(aString);
  2070. return $1;
  2071. }, self, "compile:forClass:", [aString,aClass], smalltalk.Compiler)},
  2072. args: ["aString", "aClass"],
  2073. source: "compile: aString forClass: aClass\x0a\x09self currentClass: aClass.\x0a\x09self source: aString.\x0a\x09^self compile: aString",
  2074. messageSends: ["currentClass:", "source:", "compile:"],
  2075. referencedClasses: []
  2076. }),
  2077. smalltalk.Compiler);
  2078. smalltalk.addMethod(
  2079. "_compileExpression_",
  2080. smalltalk.method({
  2081. selector: "compileExpression:",
  2082. category: '*Compiler',
  2083. fn: function (aString){
  2084. var self=this;
  2085. return smalltalk.withContext(function($ctx1) { var $1;
  2086. _st(self)._currentClass_((smalltalk.DoIt || DoIt));
  2087. _st(self)._source_(_st(_st("doIt ^[").__comma(aString)).__comma("] value"));
  2088. $1=_st(self)._compileNode_(_st(self)._parse_(_st(self)._source()));
  2089. return $1;
  2090. }, self, "compileExpression:", [aString], smalltalk.Compiler)},
  2091. args: ["aString"],
  2092. source: "compileExpression: aString\x0a\x09self currentClass: DoIt.\x0a\x09self source: 'doIt ^[', aString, '] value'.\x0a\x09^self compileNode: (self parse: self source)",
  2093. messageSends: ["currentClass:", "source:", ",", "compileNode:", "parse:", "source"],
  2094. referencedClasses: ["DoIt"]
  2095. }),
  2096. smalltalk.Compiler);
  2097. smalltalk.addMethod(
  2098. "_compileNode_",
  2099. smalltalk.method({
  2100. selector: "compileNode:",
  2101. category: '*Compiler',
  2102. fn: function (aNode){
  2103. var self=this;
  2104. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  2105. $ctx1.locals.generator=nil;
  2106. $ctx1.locals.result=nil;
  2107. $ctx1.locals.generator=_st(_st(self)._codeGeneratorClass())._new();
  2108. $1=$ctx1.locals.generator;
  2109. _st($1)._source_(_st(self)._source());
  2110. $2=_st($1)._currentClass_(_st(self)._currentClass());
  2111. $ctx1.locals.result=_st($ctx1.locals.generator)._compileNode_(aNode);
  2112. _st(self)._unknownVariables_([]);
  2113. $3=$ctx1.locals.result;
  2114. return $3;
  2115. }, self, "compileNode:", [aNode], smalltalk.Compiler)},
  2116. args: ["aNode"],
  2117. source: "compileNode: aNode\x0a\x09| generator result |\x0a\x09generator := self codeGeneratorClass new.\x0a\x09generator\x0a\x09\x09source: self source;\x0a\x09\x09currentClass: self currentClass.\x0a\x09result := generator compileNode: aNode.\x0a\x09self unknownVariables: #().\x0a\x09^result",
  2118. messageSends: ["new", "codeGeneratorClass", "source:", "source", "currentClass:", "currentClass", "compileNode:", "unknownVariables:"],
  2119. referencedClasses: []
  2120. }),
  2121. smalltalk.Compiler);
  2122. smalltalk.addMethod(
  2123. "_currentClass",
  2124. smalltalk.method({
  2125. selector: "currentClass",
  2126. category: '*Compiler',
  2127. fn: function (){
  2128. var self=this;
  2129. return smalltalk.withContext(function($ctx1) { var $1;
  2130. $1=self["@currentClass"];
  2131. return $1;
  2132. }, self, "currentClass", [], smalltalk.Compiler)},
  2133. args: [],
  2134. source: "currentClass\x0a\x09^currentClass",
  2135. messageSends: [],
  2136. referencedClasses: []
  2137. }),
  2138. smalltalk.Compiler);
  2139. smalltalk.addMethod(
  2140. "_currentClass_",
  2141. smalltalk.method({
  2142. selector: "currentClass:",
  2143. category: '*Compiler',
  2144. fn: function (aClass){
  2145. var self=this;
  2146. return smalltalk.withContext(function($ctx1) { self["@currentClass"]=aClass;
  2147. return self}, self, "currentClass:", [aClass], smalltalk.Compiler)},
  2148. args: ["aClass"],
  2149. source: "currentClass: aClass\x0a\x09currentClass := aClass",
  2150. messageSends: [],
  2151. referencedClasses: []
  2152. }),
  2153. smalltalk.Compiler);
  2154. smalltalk.addMethod(
  2155. "_eval_",
  2156. smalltalk.method({
  2157. selector: "eval:",
  2158. category: '*Compiler',
  2159. fn: function (aString){
  2160. var self=this;
  2161. return smalltalk.withContext(function($ctx1) { return eval(aString);
  2162. return self}, self, "eval:", [aString], smalltalk.Compiler)},
  2163. args: ["aString"],
  2164. source: "eval: aString\x0a\x09<return eval(aString)>",
  2165. messageSends: [],
  2166. referencedClasses: []
  2167. }),
  2168. smalltalk.Compiler);
  2169. smalltalk.addMethod(
  2170. "_evaluateExpression_",
  2171. smalltalk.method({
  2172. selector: "evaluateExpression:",
  2173. category: '*Compiler',
  2174. fn: function (aString){
  2175. var self=this;
  2176. return smalltalk.withContext(function($ctx1) { var $1;
  2177. $ctx1.locals.result=nil;
  2178. _st((smalltalk.DoIt || DoIt))._addCompiledMethod_(_st(self)._eval_(_st(self)._compileExpression_(aString)));
  2179. $ctx1.locals.result=_st(_st((smalltalk.DoIt || DoIt))._new())._doIt();
  2180. _st((smalltalk.DoIt || DoIt))._removeCompiledMethod_(_st(_st((smalltalk.DoIt || DoIt))._methodDictionary())._at_("doIt"));
  2181. $1=$ctx1.locals.result;
  2182. return $1;
  2183. }, self, "evaluateExpression:", [aString], smalltalk.Compiler)},
  2184. args: ["aString"],
  2185. source: "evaluateExpression: aString\x0a\x09\x22Unlike #eval: evaluate a Smalltalk expression and answer the returned object\x22\x0a\x09| result |\x0a\x09DoIt addCompiledMethod: (self eval: (self compileExpression: aString)).\x0a\x09result := DoIt new doIt.\x0a\x09DoIt removeCompiledMethod: (DoIt methodDictionary at: 'doIt').\x0a\x09^result",
  2186. messageSends: ["addCompiledMethod:", "eval:", "compileExpression:", "doIt", "new", "removeCompiledMethod:", "at:", "methodDictionary"],
  2187. referencedClasses: ["DoIt"]
  2188. }),
  2189. smalltalk.Compiler);
  2190. smalltalk.addMethod(
  2191. "_install_forClass_category_",
  2192. smalltalk.method({
  2193. selector: "install:forClass:category:",
  2194. category: '*Compiler',
  2195. fn: function (aString,aBehavior,anotherString){
  2196. var self=this;
  2197. return smalltalk.withContext(function($ctx1) { var $1;
  2198. $ctx1.locals.compiled=nil;
  2199. $ctx1.locals.compiled=_st(self)._eval_(_st(self)._compile_forClass_(aString,aBehavior));
  2200. _st($ctx1.locals.compiled)._category_(anotherString);
  2201. _st(aBehavior)._addCompiledMethod_($ctx1.locals.compiled);
  2202. _st(self)._setupClass_(aBehavior);
  2203. $1=$ctx1.locals.compiled;
  2204. return $1;
  2205. }, self, "install:forClass:category:", [aString,aBehavior,anotherString], smalltalk.Compiler)},
  2206. args: ["aString", "aBehavior", "anotherString"],
  2207. source: "install: aString forClass: aBehavior category: anotherString\x0a\x09| compiled |\x0a\x09compiled := self eval: (self compile: aString forClass: aBehavior).\x0a\x09compiled category: anotherString.\x0a\x09aBehavior addCompiledMethod: compiled.\x0a self setupClass: aBehavior.\x0a\x09^compiled",
  2208. messageSends: ["eval:", "compile:forClass:", "category:", "addCompiledMethod:", "setupClass:"],
  2209. referencedClasses: []
  2210. }),
  2211. smalltalk.Compiler);
  2212. smalltalk.addMethod(
  2213. "_parse_",
  2214. smalltalk.method({
  2215. selector: "parse:",
  2216. category: '*Compiler',
  2217. fn: function (aString){
  2218. var self=this;
  2219. return smalltalk.withContext(function($ctx1) { var $1;
  2220. $1=_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._parse_(aString);
  2221. return $1;
  2222. }, self, "parse:", [aString], smalltalk.Compiler)},
  2223. args: ["aString"],
  2224. source: "parse: aString\x0a ^Smalltalk current parse: aString",
  2225. messageSends: ["parse:", "current"],
  2226. referencedClasses: ["Smalltalk"]
  2227. }),
  2228. smalltalk.Compiler);
  2229. smalltalk.addMethod(
  2230. "_parseExpression_",
  2231. smalltalk.method({
  2232. selector: "parseExpression:",
  2233. category: '*Compiler',
  2234. fn: function (aString){
  2235. var self=this;
  2236. return smalltalk.withContext(function($ctx1) { var $1;
  2237. $1=_st(self)._parse_(_st(_st("doIt ^[").__comma(aString)).__comma("] value"));
  2238. return $1;
  2239. }, self, "parseExpression:", [aString], smalltalk.Compiler)},
  2240. args: ["aString"],
  2241. source: "parseExpression: aString\x0a ^self parse: 'doIt ^[', aString, '] value'",
  2242. messageSends: ["parse:", ","],
  2243. referencedClasses: []
  2244. }),
  2245. smalltalk.Compiler);
  2246. smalltalk.addMethod(
  2247. "_recompile_",
  2248. smalltalk.method({
  2249. selector: "recompile:",
  2250. category: '*Compiler',
  2251. fn: function (aClass){
  2252. var self=this;
  2253. return smalltalk.withContext(function($ctx1) { var $1;
  2254. _st(_st(aClass)._methodDictionary())._do_((function(each){
  2255. return smalltalk.withContext(function($ctx2) { _st(console)._log_(_st(_st(_st(aClass)._name()).__comma(" >> ")).__comma(_st(each)._selector()));
  2256. return _st(self)._install_forClass_category_(_st(each)._source(),aClass,_st(each)._category());
  2257. })}));
  2258. _st(self)._setupClass_(aClass);
  2259. $1=_st(aClass)._isMetaclass();
  2260. if(! smalltalk.assert($1)){
  2261. _st(self)._recompile_(_st(aClass)._class());
  2262. };
  2263. return self}, self, "recompile:", [aClass], smalltalk.Compiler)},
  2264. args: ["aClass"],
  2265. source: "recompile: aClass\x0a\x09aClass methodDictionary do: [:each |\x0a\x09\x09console log: aClass name, ' >> ', each selector.\x0a\x09\x09self install: each source forClass: aClass category: each category].\x0a\x09self setupClass: aClass.\x0a\x09aClass isMetaclass ifFalse: [self recompile: aClass class]",
  2266. messageSends: ["do:", "log:", ",", "selector", "name", "install:forClass:category:", "source", "category", "methodDictionary", "setupClass:", "ifFalse:", "recompile:", "class", "isMetaclass"],
  2267. referencedClasses: []
  2268. }),
  2269. smalltalk.Compiler);
  2270. smalltalk.addMethod(
  2271. "_recompileAll",
  2272. smalltalk.method({
  2273. selector: "recompileAll",
  2274. category: '*Compiler',
  2275. fn: function (){
  2276. var self=this;
  2277. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2278. _st(_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._classes())._do_((function(each){
  2279. return smalltalk.withContext(function($ctx2) { $1=(smalltalk.Transcript || Transcript);
  2280. _st($1)._show_(each);
  2281. $2=_st($1)._cr();
  2282. $2;
  2283. return _st((function(){
  2284. return smalltalk.withContext(function($ctx3) { return _st(self)._recompile_(each);
  2285. })}))._valueWithTimeout_((100));
  2286. })}));
  2287. return self}, self, "recompileAll", [], smalltalk.Compiler)},
  2288. args: [],
  2289. source: "recompileAll\x0a\x09Smalltalk current classes do: [:each |\x0a\x09\x09Transcript show: each; cr.\x0a\x09\x09[self recompile: each] valueWithTimeout: 100]",
  2290. messageSends: ["do:", "show:", "cr", "valueWithTimeout:", "recompile:", "classes", "current"],
  2291. referencedClasses: ["Transcript", "Smalltalk"]
  2292. }),
  2293. smalltalk.Compiler);
  2294. smalltalk.addMethod(
  2295. "_setupClass_",
  2296. smalltalk.method({
  2297. selector: "setupClass:",
  2298. category: '*Compiler',
  2299. fn: function (aClass){
  2300. var self=this;
  2301. return smalltalk.withContext(function($ctx1) { smalltalk.init(aClass);
  2302. return self}, self, "setupClass:", [aClass], smalltalk.Compiler)},
  2303. args: ["aClass"],
  2304. source: "setupClass: aClass\x0a\x09<smalltalk.init(aClass)>",
  2305. messageSends: [],
  2306. referencedClasses: []
  2307. }),
  2308. smalltalk.Compiler);
  2309. smalltalk.addMethod(
  2310. "_source",
  2311. smalltalk.method({
  2312. selector: "source",
  2313. category: '*Compiler',
  2314. fn: function (){
  2315. var self=this;
  2316. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2317. $2=self["@source"];
  2318. if(($receiver = $2) == nil || $receiver == undefined){
  2319. $1="";
  2320. } else {
  2321. $1=$2;
  2322. };
  2323. return $1;
  2324. }, self, "source", [], smalltalk.Compiler)},
  2325. args: [],
  2326. source: "source\x0a\x09^source ifNil: ['']",
  2327. messageSends: ["ifNil:"],
  2328. referencedClasses: []
  2329. }),
  2330. smalltalk.Compiler);
  2331. smalltalk.addMethod(
  2332. "_source_",
  2333. smalltalk.method({
  2334. selector: "source:",
  2335. category: '*Compiler',
  2336. fn: function (aString){
  2337. var self=this;
  2338. return smalltalk.withContext(function($ctx1) { self["@source"]=aString;
  2339. return self}, self, "source:", [aString], smalltalk.Compiler)},
  2340. args: ["aString"],
  2341. source: "source: aString\x0a\x09source := aString",
  2342. messageSends: [],
  2343. referencedClasses: []
  2344. }),
  2345. smalltalk.Compiler);
  2346. smalltalk.addMethod(
  2347. "_unknownVariables",
  2348. smalltalk.method({
  2349. selector: "unknownVariables",
  2350. category: '*Compiler',
  2351. fn: function (){
  2352. var self=this;
  2353. return smalltalk.withContext(function($ctx1) { var $1;
  2354. $1=self["@unknownVariables"];
  2355. return $1;
  2356. }, self, "unknownVariables", [], smalltalk.Compiler)},
  2357. args: [],
  2358. source: "unknownVariables\x0a\x09^unknownVariables",
  2359. messageSends: [],
  2360. referencedClasses: []
  2361. }),
  2362. smalltalk.Compiler);
  2363. smalltalk.addMethod(
  2364. "_unknownVariables_",
  2365. smalltalk.method({
  2366. selector: "unknownVariables:",
  2367. category: '*Compiler',
  2368. fn: function (aCollection){
  2369. var self=this;
  2370. return smalltalk.withContext(function($ctx1) { self["@unknownVariables"]=aCollection;
  2371. return self}, self, "unknownVariables:", [aCollection], smalltalk.Compiler)},
  2372. args: ["aCollection"],
  2373. source: "unknownVariables: aCollection\x0a\x09unknownVariables := aCollection",
  2374. messageSends: [],
  2375. referencedClasses: []
  2376. }),
  2377. smalltalk.Compiler);
  2378. smalltalk.addMethod(
  2379. "_recompile_",
  2380. smalltalk.method({
  2381. selector: "recompile:",
  2382. category: '*Compiler',
  2383. fn: function (aClass){
  2384. var self=this;
  2385. return smalltalk.withContext(function($ctx1) { _st(_st(self)._new())._recompile_(aClass);
  2386. return self}, self, "recompile:", [aClass], smalltalk.Compiler.klass)},
  2387. args: ["aClass"],
  2388. source: "recompile: aClass\x0a\x09self new recompile: aClass",
  2389. messageSends: ["recompile:", "new"],
  2390. referencedClasses: []
  2391. }),
  2392. smalltalk.Compiler.klass);
  2393. smalltalk.addMethod(
  2394. "_recompileAll",
  2395. smalltalk.method({
  2396. selector: "recompileAll",
  2397. category: '*Compiler',
  2398. fn: function (){
  2399. var self=this;
  2400. return smalltalk.withContext(function($ctx1) { _st(_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._classes())._do_((function(each){
  2401. return smalltalk.withContext(function($ctx2) { return _st(self)._recompile_(each);
  2402. })}));
  2403. return self}, self, "recompileAll", [], smalltalk.Compiler.klass)},
  2404. args: [],
  2405. source: "recompileAll\x0a\x09Smalltalk current classes do: [:each |\x0a\x09\x09self recompile: each]",
  2406. messageSends: ["do:", "recompile:", "classes", "current"],
  2407. referencedClasses: ["Smalltalk"]
  2408. }),
  2409. smalltalk.Compiler.klass);
  2410. smalltalk.addMethod(
  2411. "_messageText",
  2412. smalltalk.method({
  2413. selector: "messageText",
  2414. category: '*Compiler',
  2415. fn: function (){
  2416. var self=this;
  2417. return smalltalk.withContext(function($ctx1) { var $1;
  2418. $1=_st(" Invalid assignment to variable: ").__comma(_st(self)._variableName());
  2419. return $1;
  2420. }, self, "messageText", [], smalltalk.InvalidAssignmentError)},
  2421. args: [],
  2422. source: "messageText\x0a\x09^ ' Invalid assignment to variable: ', self variableName",
  2423. messageSends: [",", "variableName"],
  2424. referencedClasses: []
  2425. }),
  2426. smalltalk.InvalidAssignmentError);
  2427. smalltalk.addMethod(
  2428. "_variableName",
  2429. smalltalk.method({
  2430. selector: "variableName",
  2431. category: '*Compiler',
  2432. fn: function (){
  2433. var self=this;
  2434. return smalltalk.withContext(function($ctx1) { var $1;
  2435. $1=self["@variableName"];
  2436. return $1;
  2437. }, self, "variableName", [], smalltalk.InvalidAssignmentError)},
  2438. args: [],
  2439. source: "variableName\x0a\x09^ variableName",
  2440. messageSends: [],
  2441. referencedClasses: []
  2442. }),
  2443. smalltalk.InvalidAssignmentError);
  2444. smalltalk.addMethod(
  2445. "_variableName_",
  2446. smalltalk.method({
  2447. selector: "variableName:",
  2448. category: '*Compiler',
  2449. fn: function (aString){
  2450. var self=this;
  2451. return smalltalk.withContext(function($ctx1) { self["@variableName"]=aString;
  2452. return self}, self, "variableName:", [aString], smalltalk.InvalidAssignmentError)},
  2453. args: ["aString"],
  2454. source: "variableName: aString\x0a\x09variableName := aString",
  2455. messageSends: [],
  2456. referencedClasses: []
  2457. }),
  2458. smalltalk.InvalidAssignmentError);
  2459. smalltalk.addMethod(
  2460. "_messageText",
  2461. smalltalk.method({
  2462. selector: "messageText",
  2463. category: '*Compiler',
  2464. fn: function (){
  2465. var self=this;
  2466. return smalltalk.withContext(function($ctx1) { var $1;
  2467. $1=_st(_st("Variable shadowing error: ").__comma(_st(self)._variableName())).__comma(" is already defined");
  2468. return $1;
  2469. }, self, "messageText", [], smalltalk.ShadowingVariableError)},
  2470. args: [],
  2471. source: "messageText\x0a\x09^ 'Variable shadowing error: ', self variableName, ' is already defined'",
  2472. messageSends: [",", "variableName"],
  2473. referencedClasses: []
  2474. }),
  2475. smalltalk.ShadowingVariableError);
  2476. smalltalk.addMethod(
  2477. "_variableName",
  2478. smalltalk.method({
  2479. selector: "variableName",
  2480. category: '*Compiler',
  2481. fn: function (){
  2482. var self=this;
  2483. return smalltalk.withContext(function($ctx1) { var $1;
  2484. $1=self["@variableName"];
  2485. return $1;
  2486. }, self, "variableName", [], smalltalk.ShadowingVariableError)},
  2487. args: [],
  2488. source: "variableName\x0a\x09^ variableName",
  2489. messageSends: [],
  2490. referencedClasses: []
  2491. }),
  2492. smalltalk.ShadowingVariableError);
  2493. smalltalk.addMethod(
  2494. "_variableName_",
  2495. smalltalk.method({
  2496. selector: "variableName:",
  2497. category: '*Compiler',
  2498. fn: function (aString){
  2499. var self=this;
  2500. return smalltalk.withContext(function($ctx1) { self["@variableName"]=aString;
  2501. return self}, self, "variableName:", [aString], smalltalk.ShadowingVariableError)},
  2502. args: ["aString"],
  2503. source: "variableName: aString\x0a\x09variableName := aString",
  2504. messageSends: [],
  2505. referencedClasses: []
  2506. }),
  2507. smalltalk.ShadowingVariableError);
  2508. smalltalk.addMethod(
  2509. "_variableName",
  2510. smalltalk.method({
  2511. selector: "variableName",
  2512. category: '*Compiler',
  2513. fn: function (){
  2514. var self=this;
  2515. return smalltalk.withContext(function($ctx1) { var $1;
  2516. $1=self["@variableName"];
  2517. return $1;
  2518. }, self, "variableName", [], smalltalk.UnknownVariableError)},
  2519. args: [],
  2520. source: "variableName\x0a\x09^ variableName",
  2521. messageSends: [],
  2522. referencedClasses: []
  2523. }),
  2524. smalltalk.UnknownVariableError);
  2525. smalltalk.addMethod(
  2526. "_variableName_",
  2527. smalltalk.method({
  2528. selector: "variableName:",
  2529. category: '*Compiler',
  2530. fn: function (aString){
  2531. var self=this;
  2532. return smalltalk.withContext(function($ctx1) { self["@variableName"]=aString;
  2533. return self}, self, "variableName:", [aString], smalltalk.UnknownVariableError)},
  2534. args: ["aString"],
  2535. source: "variableName: aString\x0a\x09variableName := aString",
  2536. messageSends: [],
  2537. referencedClasses: []
  2538. }),
  2539. smalltalk.UnknownVariableError);
  2540. smalltalk.addMethod(
  2541. "_classNameFor_",
  2542. smalltalk.method({
  2543. selector: "classNameFor:",
  2544. category: '*Compiler',
  2545. fn: function (aClass){
  2546. var self=this;
  2547. return smalltalk.withContext(function($ctx1) { var $2,$3,$5,$4,$1;
  2548. $2=_st(aClass)._isMetaclass();
  2549. $3=(function(){
  2550. return smalltalk.withContext(function($ctx2) { return _st(_st(_st(aClass)._instanceClass())._name()).__comma(".klass");
  2551. })});
  2552. $4=(function(){
  2553. return smalltalk.withContext(function($ctx2) { $5=_st(aClass)._isNil();
  2554. if(smalltalk.assert($5)){
  2555. return "nil";
  2556. } else {
  2557. return _st(aClass)._name();
  2558. };
  2559. })});
  2560. $1=_st($2)._ifTrue_ifFalse_($3,$4);
  2561. return $1;
  2562. }, self, "classNameFor:", [aClass], smalltalk.Exporter)},
  2563. args: ["aClass"],
  2564. source: "classNameFor: aClass\x0a\x09^aClass isMetaclass\x0a\x09 ifTrue: [aClass instanceClass name, '.klass']\x0a\x09 ifFalse: [\x0a\x09\x09aClass isNil\x0a\x09\x09 ifTrue: ['nil']\x0a\x09\x09 ifFalse: [aClass name]]",
  2565. messageSends: ["ifTrue:ifFalse:", ",", "name", "instanceClass", "isNil", "isMetaclass"],
  2566. referencedClasses: []
  2567. }),
  2568. smalltalk.Exporter);
  2569. smalltalk.addMethod(
  2570. "_exportAll",
  2571. smalltalk.method({
  2572. selector: "exportAll",
  2573. category: '*Compiler',
  2574. fn: function (){
  2575. var self=this;
  2576. return smalltalk.withContext(function($ctx1) { var $1;
  2577. $1=_st((smalltalk.String || String))._streamContents_((function(stream){
  2578. return smalltalk.withContext(function($ctx2) { return _st(_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._packages())._do_((function(pkg){
  2579. return smalltalk.withContext(function($ctx3) { return _st(stream)._nextPutAll_(_st(self)._exportPackage_(_st(pkg)._name()));
  2580. })}));
  2581. })}));
  2582. return $1;
  2583. }, self, "exportAll", [], smalltalk.Exporter)},
  2584. args: [],
  2585. source: "exportAll\x0a \x22Export all packages in the system.\x22\x0a\x0a ^String streamContents: [:stream |\x0a \x09Smalltalk current packages do: [:pkg |\x0a\x09\x09stream nextPutAll: (self exportPackage: pkg name)]]",
  2586. messageSends: ["streamContents:", "do:", "nextPutAll:", "exportPackage:", "name", "packages", "current"],
  2587. referencedClasses: ["Smalltalk", "String"]
  2588. }),
  2589. smalltalk.Exporter);
  2590. smalltalk.addMethod(
  2591. "_exportClass_",
  2592. smalltalk.method({
  2593. selector: "exportClass:",
  2594. category: '*Compiler',
  2595. fn: function (aClass){
  2596. var self=this;
  2597. return smalltalk.withContext(function($ctx1) { var $1;
  2598. $1=_st((smalltalk.String || String))._streamContents_((function(stream){
  2599. return smalltalk.withContext(function($ctx2) { _st(self)._exportDefinitionOf_on_(aClass,stream);
  2600. _st(self)._exportMethodsOf_on_(aClass,stream);
  2601. _st(self)._exportMetaDefinitionOf_on_(aClass,stream);
  2602. return _st(self)._exportMethodsOf_on_(_st(aClass)._class(),stream);
  2603. })}));
  2604. return $1;
  2605. }, self, "exportClass:", [aClass], smalltalk.Exporter)},
  2606. args: ["aClass"],
  2607. source: "exportClass: aClass\x0a\x09\x22Export a single class. Subclasses override these methods.\x22\x0a\x0a\x09^String streamContents: [:stream |\x0a\x09\x09self exportDefinitionOf: aClass on: stream.\x0a\x09\x09self exportMethodsOf: aClass on: stream.\x0a\x09\x09self exportMetaDefinitionOf: aClass on: stream.\x0a\x09\x09self exportMethodsOf: aClass class on: stream]",
  2608. messageSends: ["streamContents:", "exportDefinitionOf:on:", "exportMethodsOf:on:", "exportMetaDefinitionOf:on:", "class"],
  2609. referencedClasses: ["String"]
  2610. }),
  2611. smalltalk.Exporter);
  2612. smalltalk.addMethod(
  2613. "_exportDefinitionOf_on_",
  2614. smalltalk.method({
  2615. selector: "exportDefinitionOf:on:",
  2616. category: '*Compiler',
  2617. fn: function (aClass,aStream){
  2618. var self=this;
  2619. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5,$6,$7;
  2620. $1=aStream;
  2621. _st($1)._nextPutAll_("smalltalk.addClass(");
  2622. _st($1)._nextPutAll_(_st(_st("'").__comma(_st(self)._classNameFor_(aClass))).__comma("', "));
  2623. _st($1)._nextPutAll_(_st("smalltalk.").__comma(_st(self)._classNameFor_(_st(aClass)._superclass())));
  2624. $2=_st($1)._nextPutAll_(", [");
  2625. _st(_st(aClass)._instanceVariableNames())._do_separatedBy_((function(each){
  2626. return smalltalk.withContext(function($ctx2) { return _st(aStream)._nextPutAll_(_st(_st("'").__comma(each)).__comma("'"));
  2627. })}),(function(){
  2628. return smalltalk.withContext(function($ctx2) { return _st(aStream)._nextPutAll_(", ");
  2629. })}));
  2630. $3=aStream;
  2631. _st($3)._nextPutAll_("], '");
  2632. _st($3)._nextPutAll_(_st(_st(aClass)._category()).__comma("'"));
  2633. $4=_st($3)._nextPutAll_(");");
  2634. $5=_st(_st(aClass)._comment())._notEmpty();
  2635. if(smalltalk.assert($5)){
  2636. $6=aStream;
  2637. _st($6)._lf();
  2638. _st($6)._nextPutAll_("smalltalk.");
  2639. _st($6)._nextPutAll_(_st(self)._classNameFor_(aClass));
  2640. _st($6)._nextPutAll_(".comment=");
  2641. $7=_st($6)._nextPutAll_(_st(_st(aClass)._comment())._asJavascript());
  2642. $7;
  2643. };
  2644. _st(aStream)._lf();
  2645. return self}, self, "exportDefinitionOf:on:", [aClass,aStream], smalltalk.Exporter)},
  2646. args: ["aClass", "aStream"],
  2647. source: "exportDefinitionOf: aClass on: aStream\x0a\x09aStream \x0a\x09 nextPutAll: 'smalltalk.addClass(';\x0a\x09 nextPutAll: '''', (self classNameFor: aClass), ''', ';\x0a\x09 nextPutAll: 'smalltalk.', (self classNameFor: aClass superclass);\x0a\x09 nextPutAll: ', ['.\x0a\x09aClass instanceVariableNames \x0a\x09 do: [:each | aStream nextPutAll: '''', each, '''']\x0a\x09 separatedBy: [aStream nextPutAll: ', '].\x0a\x09aStream\x09\x0a\x09 nextPutAll: '], ''';\x0a\x09 nextPutAll: aClass category, '''';\x0a\x09 nextPutAll: ');'.\x0a\x09aClass comment notEmpty ifTrue: [\x0a\x09 aStream \x0a\x09 \x09lf;\x0a\x09\x09nextPutAll: 'smalltalk.';\x0a\x09\x09nextPutAll: (self classNameFor: aClass);\x0a\x09\x09nextPutAll: '.comment=';\x0a\x09\x09nextPutAll: aClass comment asJavascript].\x0a\x09aStream lf",
  2648. messageSends: ["nextPutAll:", ",", "classNameFor:", "superclass", "do:separatedBy:", "instanceVariableNames", "category", "ifTrue:", "lf", "asJavascript", "comment", "notEmpty"],
  2649. referencedClasses: []
  2650. }),
  2651. smalltalk.Exporter);
  2652. smalltalk.addMethod(
  2653. "_exportMetaDefinitionOf_on_",
  2654. smalltalk.method({
  2655. selector: "exportMetaDefinitionOf:on:",
  2656. category: '*Compiler',
  2657. fn: function (aClass,aStream){
  2658. var self=this;
  2659. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  2660. $1=_st(_st(_st(aClass)._class())._instanceVariableNames())._isEmpty();
  2661. if(! smalltalk.assert($1)){
  2662. $2=aStream;
  2663. _st($2)._nextPutAll_(_st("smalltalk.").__comma(_st(self)._classNameFor_(_st(aClass)._class())));
  2664. $3=_st($2)._nextPutAll_(".iVarNames = [");
  2665. $3;
  2666. _st(_st(_st(aClass)._class())._instanceVariableNames())._do_separatedBy_((function(each){
  2667. return smalltalk.withContext(function($ctx2) { return _st(aStream)._nextPutAll_(_st(_st("'").__comma(each)).__comma("'"));
  2668. })}),(function(){
  2669. return smalltalk.withContext(function($ctx2) { return _st(aStream)._nextPutAll_(",");
  2670. })}));
  2671. _st(aStream)._nextPutAll_(_st("];").__comma(_st((smalltalk.String || String))._lf()));
  2672. };
  2673. return self}, self, "exportMetaDefinitionOf:on:", [aClass,aStream], smalltalk.Exporter)},
  2674. args: ["aClass", "aStream"],
  2675. source: "exportMetaDefinitionOf: aClass on: aStream\x0a\x09aClass class instanceVariableNames isEmpty ifFalse: [\x0a\x09 aStream \x0a\x09\x09nextPutAll: 'smalltalk.', (self classNameFor: aClass class);\x0a\x09\x09nextPutAll: '.iVarNames = ['.\x0a\x09 aClass class instanceVariableNames\x0a\x09\x09do: [:each | aStream nextPutAll: '''', each, '''']\x0a\x09\x09separatedBy: [aStream nextPutAll: ','].\x0a\x09 aStream nextPutAll: '];', String lf]",
  2676. messageSends: ["ifFalse:", "nextPutAll:", ",", "classNameFor:", "class", "do:separatedBy:", "instanceVariableNames", "lf", "isEmpty"],
  2677. referencedClasses: ["String"]
  2678. }),
  2679. smalltalk.Exporter);
  2680. smalltalk.addMethod(
  2681. "_exportMethod_of_on_",
  2682. smalltalk.method({
  2683. selector: "exportMethod:of:on:",
  2684. category: '*Compiler',
  2685. fn: function (aMethod,aClass,aStream){
  2686. var self=this;
  2687. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  2688. $1=aStream;
  2689. _st($1)._nextPutAll_("smalltalk.addMethod(");
  2690. _st($1)._lf();
  2691. _st($1)._nextPutAll_(_st(_st(_st(_st(aMethod)._selector())._asSelector())._asJavascript()).__comma(","));
  2692. _st($1)._lf();
  2693. _st($1)._nextPutAll_("smalltalk.method({");
  2694. _st($1)._lf();
  2695. _st($1)._nextPutAll_(_st(_st("selector: ").__comma(_st(_st(aMethod)._selector())._asJavascript())).__comma(","));
  2696. _st($1)._lf();
  2697. _st($1)._nextPutAll_(_st(_st("category: '").__comma(_st(aMethod)._category())).__comma("',"));
  2698. _st($1)._lf();
  2699. _st($1)._nextPutAll_(_st(_st("fn: ").__comma(_st(_st(aMethod)._fn())._compiledSource())).__comma(","));
  2700. _st($1)._lf();
  2701. _st($1)._nextPutAll_(_st(_st("args: ").__comma(_st(_st(aMethod)._arguments())._asJavascript())).__comma(","));
  2702. _st($1)._lf();
  2703. _st($1)._nextPutAll_(_st(_st("source: ").__comma(_st(_st(aMethod)._source())._asJavascript())).__comma(","));
  2704. _st($1)._lf();
  2705. _st($1)._nextPutAll_(_st(_st("messageSends: ").__comma(_st(_st(aMethod)._messageSends())._asJavascript())).__comma(","));
  2706. _st($1)._lf();
  2707. $2=_st($1)._nextPutAll_(_st("referencedClasses: ").__comma(_st(_st(aMethod)._referencedClasses())._asJavascript()));
  2708. $3=aStream;
  2709. _st($3)._lf();
  2710. _st($3)._nextPutAll_("}),");
  2711. _st($3)._lf();
  2712. _st($3)._nextPutAll_(_st("smalltalk.").__comma(_st(self)._classNameFor_(aClass)));
  2713. _st($3)._nextPutAll_(");");
  2714. _st($3)._lf();
  2715. $4=_st($3)._lf();
  2716. return self}, self, "exportMethod:of:on:", [aMethod,aClass,aStream], smalltalk.Exporter)},
  2717. args: ["aMethod", "aClass", "aStream"],
  2718. source: "exportMethod: aMethod of: aClass on: aStream\x0a\x09aStream \x0a\x09\x09nextPutAll: 'smalltalk.addMethod(';lf;\x0a\x09\x09nextPutAll: aMethod selector asSelector asJavascript, ',';lf;\x0a\x09\x09nextPutAll: 'smalltalk.method({';lf;\x0a\x09\x09nextPutAll: 'selector: ', aMethod selector asJavascript, ',';lf;\x0a\x09\x09nextPutAll: 'category: ''', aMethod category, ''',';lf;\x0a\x09\x09nextPutAll: 'fn: ', aMethod fn compiledSource, ',';lf;\x0a\x09\x09nextPutAll: 'args: ', aMethod arguments asJavascript, ','; lf;\x0a\x09\x09nextPutAll: 'source: ', aMethod source asJavascript, ',';lf;\x0a\x09\x09nextPutAll: 'messageSends: ', aMethod messageSends asJavascript, ',';lf;\x0a\x09\x09nextPutAll: 'referencedClasses: ', aMethod referencedClasses asJavascript.\x0a\x09aStream\x0a\x09\x09lf;\x0a\x09\x09nextPutAll: '}),';lf;\x0a\x09\x09nextPutAll: 'smalltalk.', (self classNameFor: aClass);\x0a\x09\x09nextPutAll: ');';lf;lf",
  2719. messageSends: ["nextPutAll:", "lf", ",", "asJavascript", "asSelector", "selector", "category", "compiledSource", "fn", "arguments", "source", "messageSends", "referencedClasses", "classNameFor:"],
  2720. referencedClasses: []
  2721. }),
  2722. smalltalk.Exporter);
  2723. smalltalk.addMethod(
  2724. "_exportMethodsOf_on_",
  2725. smalltalk.method({
  2726. selector: "exportMethodsOf:on:",
  2727. category: '*Compiler',
  2728. fn: function (aClass,aStream){
  2729. var self=this;
  2730. return smalltalk.withContext(function($ctx1) { var $1,$3,$2;
  2731. $1=_st(_st(_st(aClass)._methodDictionary())._values())._sorted_((function(a,b){
  2732. return smalltalk.withContext(function($ctx2) { return _st(_st(a)._selector()).__lt_eq(_st(b)._selector());
  2733. })}));
  2734. $2=(function(each){
  2735. return smalltalk.withContext(function($ctx2) { $3=_st(_st(each)._category())._match_("^\x5c*");
  2736. if(! smalltalk.assert($3)){
  2737. return _st(self)._exportMethod_of_on_(each,aClass,aStream);
  2738. };
  2739. })});
  2740. _st($1)._do_($2);
  2741. _st(aStream)._lf();
  2742. return self}, self, "exportMethodsOf:on:", [aClass,aStream], smalltalk.Exporter)},
  2743. args: ["aClass", "aStream"],
  2744. source: "exportMethodsOf: aClass on: aStream\x0a\x09\x22Issue #143: sort methods alphabetically\x22\x0a\x0a\x09((aClass methodDictionary values) sorted: [:a :b | a selector <= b selector]) do: [:each |\x0a\x09\x09(each category match: '^\x5c*') ifFalse: [\x0a\x09\x09\x09self exportMethod: each of: aClass on: aStream]].\x0a\x09aStream lf",
  2745. messageSends: ["do:", "ifFalse:", "exportMethod:of:on:", "match:", "category", "sorted:", "<=", "selector", "values", "methodDictionary", "lf"],
  2746. referencedClasses: []
  2747. }),
  2748. smalltalk.Exporter);
  2749. smalltalk.addMethod(
  2750. "_exportPackage_",
  2751. smalltalk.method({
  2752. selector: "exportPackage:",
  2753. category: '*Compiler',
  2754. fn: function (packageName){
  2755. var self=this;
  2756. return smalltalk.withContext(function($ctx1) { var $1;
  2757. $ctx1.locals.package=nil;
  2758. $1=_st((smalltalk.String || String))._streamContents_((function(stream){
  2759. return smalltalk.withContext(function($ctx2) { $ctx1.locals.package_=_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._packageAt_(packageName);
  2760. $ctx1.locals.package_;
  2761. _st(self)._exportPackageDefinitionOf_on_($ctx1.locals.package_,stream);
  2762. _st(_st(_st($ctx1.locals.package_)._sortedClasses())._asSet())._do_((function(each){
  2763. return smalltalk.withContext(function($ctx3) { return _st(stream)._nextPutAll_(_st(self)._exportClass_(each));
  2764. })}));
  2765. return _st(self)._exportPackageExtensionsOf_on_($ctx1.locals.package_,stream);
  2766. })}));
  2767. return $1;
  2768. }, self, "exportPackage:", [packageName], smalltalk.Exporter)},
  2769. args: ["packageName"],
  2770. source: "exportPackage: packageName\x0a\x09\x22Export a given package by name.\x22\x0a\x0a\x09| package |\x0a\x09^String streamContents: [:stream |\x0a package := Smalltalk current packageAt: packageName.\x0a self exportPackageDefinitionOf: package on: stream.\x0a\x0a\x09\x09\x22Export classes in dependency order.\x0a\x09\x09Update (issue #171): Remove duplicates for export\x22\x0a\x09 \x09package sortedClasses asSet do: [:each |\x0a stream nextPutAll: (self exportClass: each)].\x0a\x09\x09self exportPackageExtensionsOf: package on: stream]",
  2771. messageSends: ["streamContents:", "packageAt:", "current", "exportPackageDefinitionOf:on:", "do:", "nextPutAll:", "exportClass:", "asSet", "sortedClasses", "exportPackageExtensionsOf:on:"],
  2772. referencedClasses: ["Smalltalk", "String"]
  2773. }),
  2774. smalltalk.Exporter);
  2775. smalltalk.addMethod(
  2776. "_exportPackageDefinitionOf_on_",
  2777. smalltalk.method({
  2778. selector: "exportPackageDefinitionOf:on:",
  2779. category: '*Compiler',
  2780. fn: function (package_,aStream){
  2781. var self=this;
  2782. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2783. $1=aStream;
  2784. _st($1)._nextPutAll_("smalltalk.addPackage(");
  2785. $2=_st($1)._nextPutAll_(_st(_st(_st(_st("'").__comma(_st(package_)._name())).__comma("', ")).__comma(_st(package_)._propertiesAsJSON())).__comma(");"));
  2786. _st(aStream)._lf();
  2787. return self}, self, "exportPackageDefinitionOf:on:", [package_,aStream], smalltalk.Exporter)},
  2788. args: ["package", "aStream"],
  2789. source: "exportPackageDefinitionOf: package on: aStream\x0a\x09aStream \x0a\x09 nextPutAll: 'smalltalk.addPackage(';\x0a\x09 nextPutAll: '''', package name, ''', ', package propertiesAsJSON , ');'.\x0a\x09aStream lf",
  2790. messageSends: ["nextPutAll:", ",", "propertiesAsJSON", "name", "lf"],
  2791. referencedClasses: []
  2792. }),
  2793. smalltalk.Exporter);
  2794. smalltalk.addMethod(
  2795. "_exportPackageExtensionsOf_on_",
  2796. smalltalk.method({
  2797. selector: "exportPackageExtensionsOf:on:",
  2798. category: '*Compiler',
  2799. fn: function (package_,aStream){
  2800. var self=this;
  2801. return smalltalk.withContext(function($ctx1) { var $1,$3,$5,$7,$6,$4,$2;
  2802. $ctx1.locals.name=nil;
  2803. $ctx1.locals.name=_st(package_)._name();
  2804. $1=_st((smalltalk.Package || Package))._sortedClasses_(_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._classes());
  2805. $2=(function(each){
  2806. return smalltalk.withContext(function($ctx2) { $3=[each,_st(each)._class()];
  2807. $4=(function(aClass){
  2808. return smalltalk.withContext(function($ctx3) { $5=_st(_st(_st(aClass)._methodDictionary())._values())._sorted_((function(a,b){
  2809. return smalltalk.withContext(function($ctx4) { return _st(_st(a)._selector()).__lt_eq(_st(b)._selector());
  2810. })}));
  2811. $6=(function(method){
  2812. return smalltalk.withContext(function($ctx4) { $7=_st(_st(method)._category())._match_(_st("^\x5c*").__comma($ctx1.locals.name));
  2813. if(smalltalk.assert($7)){
  2814. return _st(self)._exportMethod_of_on_(method,aClass,aStream);
  2815. };
  2816. })});
  2817. return _st($5)._do_($6);
  2818. })});
  2819. return _st($3)._do_($4);
  2820. })});
  2821. _st($1)._do_($2);
  2822. return self}, self, "exportPackageExtensionsOf:on:", [package_,aStream], smalltalk.Exporter)},
  2823. args: ["package", "aStream"],
  2824. source: "exportPackageExtensionsOf: package on: aStream\x0a\x09\x22Issue #143: sort classes and methods alphabetically\x22\x0a\x0a\x09| name |\x0a\x09name := package name.\x0a\x09(Package sortedClasses: Smalltalk current classes) do: [:each |\x0a\x09\x09{each. each class} do: [:aClass | \x0a\x09\x09\x09((aClass methodDictionary values) sorted: [:a :b | a selector <= b selector]) do: [:method |\x0a\x09\x09\x09\x09(method category match: '^\x5c*', name) ifTrue: [\x0a\x09\x09\x09\x09\x09self exportMethod: method of: aClass on: aStream ]]]]",
  2825. messageSends: ["name", "do:", "ifTrue:", "exportMethod:of:on:", "match:", ",", "category", "sorted:", "<=", "selector", "values", "methodDictionary", "class", "sortedClasses:", "classes", "current"],
  2826. referencedClasses: ["Smalltalk", "Package"]
  2827. }),
  2828. smalltalk.Exporter);
  2829. smalltalk.addMethod(
  2830. "_chunkEscape_",
  2831. smalltalk.method({
  2832. selector: "chunkEscape:",
  2833. category: '*Compiler',
  2834. fn: function (aString){
  2835. var self=this;
  2836. return smalltalk.withContext(function($ctx1) { var $1;
  2837. $1=_st(_st(aString)._replace_with_("!","!!"))._trimBoth();
  2838. return $1;
  2839. }, self, "chunkEscape:", [aString], smalltalk.ChunkExporter)},
  2840. args: ["aString"],
  2841. source: "chunkEscape: aString\x0a\x09\x22Replace all occurrences of ! with !! and trim at both ends.\x22\x0a\x0a\x09^(aString replace: '!' with: '!!') trimBoth",
  2842. messageSends: ["trimBoth", "replace:with:"],
  2843. referencedClasses: []
  2844. }),
  2845. smalltalk.ChunkExporter);
  2846. smalltalk.addMethod(
  2847. "_classNameFor_",
  2848. smalltalk.method({
  2849. selector: "classNameFor:",
  2850. category: '*Compiler',
  2851. fn: function (aClass){
  2852. var self=this;
  2853. return smalltalk.withContext(function($ctx1) { var $2,$3,$5,$4,$1;
  2854. $2=_st(aClass)._isMetaclass();
  2855. $3=(function(){
  2856. return smalltalk.withContext(function($ctx2) { return _st(_st(_st(aClass)._instanceClass())._name()).__comma(" class");
  2857. })});
  2858. $4=(function(){
  2859. return smalltalk.withContext(function($ctx2) { $5=_st(aClass)._isNil();
  2860. if(smalltalk.assert($5)){
  2861. return "nil";
  2862. } else {
  2863. return _st(aClass)._name();
  2864. };
  2865. })});
  2866. $1=_st($2)._ifTrue_ifFalse_($3,$4);
  2867. return $1;
  2868. }, self, "classNameFor:", [aClass], smalltalk.ChunkExporter)},
  2869. args: ["aClass"],
  2870. source: "classNameFor: aClass\x0a\x09^aClass isMetaclass\x0a\x09 ifTrue: [aClass instanceClass name, ' class']\x0a\x09 ifFalse: [\x0a\x09\x09aClass isNil\x0a\x09\x09 ifTrue: ['nil']\x0a\x09\x09 ifFalse: [aClass name]]",
  2871. messageSends: ["ifTrue:ifFalse:", ",", "name", "instanceClass", "isNil", "isMetaclass"],
  2872. referencedClasses: []
  2873. }),
  2874. smalltalk.ChunkExporter);
  2875. smalltalk.addMethod(
  2876. "_exportDefinitionOf_on_",
  2877. smalltalk.method({
  2878. selector: "exportDefinitionOf:on:",
  2879. category: '*Compiler',
  2880. fn: function (aClass,aStream){
  2881. var self=this;
  2882. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5,$6,$7;
  2883. $1=aStream;
  2884. _st($1)._nextPutAll_(_st(self)._classNameFor_(_st(aClass)._superclass()));
  2885. _st($1)._nextPutAll_(_st(" subclass: #").__comma(_st(self)._classNameFor_(aClass)));
  2886. _st($1)._lf();
  2887. $2=_st($1)._nextPutAll_("\x09instanceVariableNames: '");
  2888. _st(_st(aClass)._instanceVariableNames())._do_separatedBy_((function(each){
  2889. return smalltalk.withContext(function($ctx2) { return _st(aStream)._nextPutAll_(each);
  2890. })}),(function(){
  2891. return smalltalk.withContext(function($ctx2) { return _st(aStream)._nextPutAll_(" ");
  2892. })}));
  2893. $3=aStream;
  2894. _st($3)._nextPutAll_("'");
  2895. _st($3)._lf();
  2896. _st($3)._nextPutAll_(_st(_st("\x09package: '").__comma(_st(aClass)._category())).__comma("'!"));
  2897. $4=_st($3)._lf();
  2898. $5=_st(_st(aClass)._comment())._notEmpty();
  2899. if(smalltalk.assert($5)){
  2900. $6=aStream;
  2901. _st($6)._nextPutAll_(_st(_st("!").__comma(_st(self)._classNameFor_(aClass))).__comma(" commentStamp!"));
  2902. _st($6)._lf();
  2903. _st($6)._nextPutAll_(_st(_st(self)._chunkEscape_(_st(aClass)._comment())).__comma("!"));
  2904. $7=_st($6)._lf();
  2905. $7;
  2906. };
  2907. _st(aStream)._lf();
  2908. return self}, self, "exportDefinitionOf:on:", [aClass,aStream], smalltalk.ChunkExporter)},
  2909. args: ["aClass", "aStream"],
  2910. source: "exportDefinitionOf: aClass on: aStream\x0a \x22Chunk format.\x22\x0a\x0a aStream \x0a nextPutAll: (self classNameFor: aClass superclass);\x0a nextPutAll: ' subclass: #', (self classNameFor: aClass); lf;\x0a nextPutAll: '\x09instanceVariableNames: '''.\x0a aClass instanceVariableNames \x0a do: [:each | aStream nextPutAll: each]\x0a separatedBy: [aStream nextPutAll: ' '].\x0a aStream \x0a nextPutAll: ''''; lf;\x0a nextPutAll: '\x09package: ''', aClass category, '''!'; lf.\x0a aClass comment notEmpty ifTrue: [\x0a aStream \x0a nextPutAll: '!', (self classNameFor: aClass), ' commentStamp!';lf;\x0a nextPutAll: (self chunkEscape: aClass comment), '!';lf].\x0a aStream lf",
  2911. messageSends: ["nextPutAll:", "classNameFor:", "superclass", ",", "lf", "do:separatedBy:", "instanceVariableNames", "category", "ifTrue:", "chunkEscape:", "comment", "notEmpty"],
  2912. referencedClasses: []
  2913. }),
  2914. smalltalk.ChunkExporter);
  2915. smalltalk.addMethod(
  2916. "_exportMetaDefinitionOf_on_",
  2917. smalltalk.method({
  2918. selector: "exportMetaDefinitionOf:on:",
  2919. category: '*Compiler',
  2920. fn: function (aClass,aStream){
  2921. var self=this;
  2922. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5;
  2923. $1=_st(_st(_st(aClass)._class())._instanceVariableNames())._isEmpty();
  2924. if(! smalltalk.assert($1)){
  2925. $2=aStream;
  2926. _st($2)._nextPutAll_(_st(self)._classNameFor_(_st(aClass)._class()));
  2927. $3=_st($2)._nextPutAll_(" instanceVariableNames: '");
  2928. $3;
  2929. _st(_st(_st(aClass)._class())._instanceVariableNames())._do_separatedBy_((function(each){
  2930. return smalltalk.withContext(function($ctx2) { return _st(aStream)._nextPutAll_(each);
  2931. })}),(function(){
  2932. return smalltalk.withContext(function($ctx2) { return _st(aStream)._nextPutAll_(" ");
  2933. })}));
  2934. $4=aStream;
  2935. _st($4)._nextPutAll_("'!");
  2936. _st($4)._lf();
  2937. $5=_st($4)._lf();
  2938. $5;
  2939. };
  2940. return self}, self, "exportMetaDefinitionOf:on:", [aClass,aStream], smalltalk.ChunkExporter)},
  2941. args: ["aClass", "aStream"],
  2942. source: "exportMetaDefinitionOf: aClass on: aStream\x0a\x0a\x09aClass class instanceVariableNames isEmpty ifFalse: [\x0a\x09\x09aStream \x0a\x09\x09 nextPutAll: (self classNameFor: aClass class);\x0a\x09\x09 nextPutAll: ' instanceVariableNames: '''.\x0a\x09\x09aClass class instanceVariableNames \x0a\x09\x09 do: [:each | aStream nextPutAll: each]\x0a\x09\x09 separatedBy: [aStream nextPutAll: ' '].\x0a\x09\x09aStream\x09\x0a\x09\x09 nextPutAll: '''!'; lf; lf]",
  2943. messageSends: ["ifFalse:", "nextPutAll:", "classNameFor:", "class", "do:separatedBy:", "instanceVariableNames", "lf", "isEmpty"],
  2944. referencedClasses: []
  2945. }),
  2946. smalltalk.ChunkExporter);
  2947. smalltalk.addMethod(
  2948. "_exportMethod_of_on_",
  2949. smalltalk.method({
  2950. selector: "exportMethod:of:on:",
  2951. category: '*Compiler',
  2952. fn: function (aMethod,aClass,aStream){
  2953. var self=this;
  2954. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2955. $1=aStream;
  2956. _st($1)._lf();
  2957. _st($1)._lf();
  2958. _st($1)._nextPutAll_(_st(self)._chunkEscape_(_st(aMethod)._source()));
  2959. _st($1)._lf();
  2960. $2=_st($1)._nextPutAll_("!");
  2961. return self}, self, "exportMethod:of:on:", [aMethod,aClass,aStream], smalltalk.ChunkExporter)},
  2962. args: ["aMethod", "aClass", "aStream"],
  2963. source: "exportMethod: aMethod of: aClass on: aStream\x0a\x09aStream \x0a\x09\x09lf; lf; nextPutAll: (self chunkEscape: aMethod source); lf;\x0a\x09\x09nextPutAll: '!'",
  2964. messageSends: ["lf", "nextPutAll:", "chunkEscape:", "source"],
  2965. referencedClasses: []
  2966. }),
  2967. smalltalk.ChunkExporter);
  2968. smalltalk.addMethod(
  2969. "_exportMethods_category_of_on_",
  2970. smalltalk.method({
  2971. selector: "exportMethods:category:of:on:",
  2972. category: '*Compiler',
  2973. fn: function (methods,category,aClass,aStream){
  2974. var self=this;
  2975. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  2976. $1=aStream;
  2977. _st($1)._nextPutAll_(_st("!").__comma(_st(self)._classNameFor_(aClass)));
  2978. $2=_st($1)._nextPutAll_(_st(_st(" methodsFor: '").__comma(category)).__comma("'!"));
  2979. _st(_st(methods)._sorted_((function(a,b){
  2980. return smalltalk.withContext(function($ctx2) { return _st(_st(a)._selector()).__lt_eq(_st(b)._selector());
  2981. })})))._do_((function(each){
  2982. return smalltalk.withContext(function($ctx2) { return _st(self)._exportMethod_of_on_(each,aClass,aStream);
  2983. })}));
  2984. $3=aStream;
  2985. _st($3)._nextPutAll_(" !");
  2986. _st($3)._lf();
  2987. $4=_st($3)._lf();
  2988. return self}, self, "exportMethods:category:of:on:", [methods,category,aClass,aStream], smalltalk.ChunkExporter)},
  2989. args: ["methods", "category", "aClass", "aStream"],
  2990. source: "exportMethods: methods category: category of: aClass on: aStream\x0a\x09\x22Issue #143: sort methods alphabetically\x22\x0a\x0a\x09aStream\x0a\x09\x09nextPutAll: '!', (self classNameFor: aClass);\x0a\x09\x09nextPutAll: ' methodsFor: ''', category, '''!'.\x0a\x09\x09(methods sorted: [:a :b | a selector <= b selector]) do: [:each |\x0a\x09\x09\x09\x09self exportMethod: each of: aClass on: aStream].\x0a\x09aStream nextPutAll: ' !'; lf; lf",
  2991. messageSends: ["nextPutAll:", ",", "classNameFor:", "do:", "exportMethod:of:on:", "sorted:", "<=", "selector", "lf"],
  2992. referencedClasses: []
  2993. }),
  2994. smalltalk.ChunkExporter);
  2995. smalltalk.addMethod(
  2996. "_exportMethodsOf_on_",
  2997. smalltalk.method({
  2998. selector: "exportMethodsOf:on:",
  2999. category: '*Compiler',
  3000. fn: function (aClass,aStream){
  3001. var self=this;
  3002. return smalltalk.withContext(function($ctx1) { var $1,$3,$2;
  3003. $ctx1.locals.map=nil;
  3004. $ctx1.locals.map=_st((smalltalk.Dictionary || Dictionary))._new();
  3005. $1=aClass;
  3006. $2=(function(category,methods){
  3007. return smalltalk.withContext(function($ctx2) { $3=_st(category)._match_("^\x5c*");
  3008. if(! smalltalk.assert($3)){
  3009. return _st($ctx1.locals.map)._at_put_(category,methods);
  3010. };
  3011. })});
  3012. _st($1)._protocolsDo_($2);
  3013. _st(_st(_st($ctx1.locals.map)._keys())._sorted_((function(a,b){
  3014. return smalltalk.withContext(function($ctx2) { return _st(a).__lt_eq(b);
  3015. })})))._do_((function(category){
  3016. return smalltalk.withContext(function($ctx2) { $ctx2.locals.methods=nil;
  3017. $ctx2.locals.methods=_st($ctx1.locals.map)._at_(category);
  3018. $ctx2.locals.methods;
  3019. return _st(self)._exportMethods_category_of_on_($ctx2.locals.methods,category,aClass,aStream);
  3020. })}));
  3021. return self}, self, "exportMethodsOf:on:", [aClass,aStream], smalltalk.ChunkExporter)},
  3022. args: ["aClass", "aStream"],
  3023. source: "exportMethodsOf: aClass on: aStream\x0a\x09\x22Issue #143: sort protocol alphabetically\x22\x0a\x0a\x09| map |\x0a\x09map := Dictionary new.\x0a\x09aClass protocolsDo: [:category :methods | \x0a\x09\x09(category match: '^\x5c*') ifFalse: [ map at: category put: methods ]].\x0a\x09(map keys sorted: [:a :b | a <= b ]) do: [:category | | methods |\x0a\x09\x09methods := map at: category.\x0a\x09\x09self\x0a\x09\x09\x09exportMethods: methods\x0a\x09\x09\x09category: category\x0a\x09\x09\x09of: aClass\x0a\x09\x09\x09on: aStream ]",
  3024. messageSends: ["new", "protocolsDo:", "ifFalse:", "at:put:", "match:", "do:", "at:", "exportMethods:category:of:on:", "sorted:", "<=", "keys"],
  3025. referencedClasses: ["Dictionary"]
  3026. }),
  3027. smalltalk.ChunkExporter);
  3028. smalltalk.addMethod(
  3029. "_exportPackageDefinitionOf_on_",
  3030. smalltalk.method({
  3031. selector: "exportPackageDefinitionOf:on:",
  3032. category: '*Compiler',
  3033. fn: function (package_,aStream){
  3034. var self=this;
  3035. return smalltalk.withContext(function($ctx1) { var $1,$2;
  3036. $1=aStream;
  3037. _st($1)._nextPutAll_(_st(_st(_st(_st("Smalltalk current createPackage: '").__comma(_st(package_)._name())).__comma("' properties: ")).__comma(_st(_st(package_)._properties())._storeString())).__comma("!"));
  3038. $2=_st($1)._lf();
  3039. return self}, self, "exportPackageDefinitionOf:on:", [package_,aStream], smalltalk.ChunkExporter)},
  3040. args: ["package", "aStream"],
  3041. source: "exportPackageDefinitionOf: package on: aStream\x0a\x09\x22Chunk format.\x22\x0a\x0a\x09aStream \x0a\x09 nextPutAll: 'Smalltalk current createPackage: ''', package name,\x0a\x09\x09''' properties: ', package properties storeString, '!'; lf.",
  3042. messageSends: ["nextPutAll:", ",", "storeString", "properties", "name", "lf"],
  3043. referencedClasses: []
  3044. }),
  3045. smalltalk.ChunkExporter);
  3046. smalltalk.addMethod(
  3047. "_exportPackageExtensionsOf_on_",
  3048. smalltalk.method({
  3049. selector: "exportPackageExtensionsOf:on:",
  3050. category: '*Compiler',
  3051. fn: function (package_,aStream){
  3052. var self=this;
  3053. return smalltalk.withContext(function($ctx1) { var $1,$3,$5,$7,$6,$4,$2;
  3054. $ctx1.locals.name=nil;
  3055. $ctx1.locals.map=nil;
  3056. $ctx1.locals.name=_st(package_)._name();
  3057. $1=_st((smalltalk.Package || Package))._sortedClasses_(_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._classes());
  3058. $2=(function(each){
  3059. return smalltalk.withContext(function($ctx2) { $3=[each,_st(each)._class()];
  3060. $4=(function(aClass){
  3061. return smalltalk.withContext(function($ctx3) { $ctx1.locals.map=_st((smalltalk.Dictionary || Dictionary))._new();
  3062. $ctx1.locals.map;
  3063. $5=aClass;
  3064. $6=(function(category,methods){
  3065. return smalltalk.withContext(function($ctx4) { $7=_st(category)._match_(_st("^\x5c*").__comma($ctx1.locals.name));
  3066. if(smalltalk.assert($7)){
  3067. return _st($ctx1.locals.map)._at_put_(category,methods);
  3068. };
  3069. })});
  3070. _st($5)._protocolsDo_($6);
  3071. return _st(_st(_st($ctx1.locals.map)._keys())._sorted_((function(a,b){
  3072. return smalltalk.withContext(function($ctx4) { return _st(a).__lt_eq(b);
  3073. })})))._do_((function(category){
  3074. return smalltalk.withContext(function($ctx4) { $ctx4.locals.methods=nil;
  3075. $ctx4.locals.methods=_st($ctx1.locals.map)._at_(category);
  3076. $ctx4.locals.methods;
  3077. return _st(self)._exportMethods_category_of_on_($ctx4.locals.methods,category,aClass,aStream);
  3078. })}));
  3079. })});
  3080. return _st($3)._do_($4);
  3081. })});
  3082. _st($1)._do_($2);
  3083. return self}, self, "exportPackageExtensionsOf:on:", [package_,aStream], smalltalk.ChunkExporter)},
  3084. args: ["package", "aStream"],
  3085. source: "exportPackageExtensionsOf: package on: aStream\x0a\x09\x22We need to override this one too since we need to group\x0a\x09all methods in a given protocol under a leading methodsFor: chunk\x0a\x09for that class.\x22\x0a\x0a\x09\x22Issue #143: sort protocol alphabetically\x22\x0a\x0a\x09| name map |\x0a\x09name := package name.\x0a\x09(Package sortedClasses: Smalltalk current classes) do: [:each |\x0a\x09\x09{each. each class} do: [:aClass |\x0a\x09\x09\x09map := Dictionary new.\x0a\x09\x09\x09aClass protocolsDo: [:category :methods | \x0a\x09\x09\x09\x09(category match: '^\x5c*', name) ifTrue: [ map at: category put: methods ]].\x0a\x09\x09\x09(map keys sorted: [:a :b | a <= b ]) do: [:category | | methods |\x0a\x09\x09\x09\x09methods := map at: category.\x09\x0a\x09\x09\x09\x09self exportMethods: methods category: category of: aClass on: aStream ]]]",
  3086. messageSends: ["name", "do:", "new", "protocolsDo:", "ifTrue:", "at:put:", "match:", ",", "at:", "exportMethods:category:of:on:", "sorted:", "<=", "keys", "class", "sortedClasses:", "classes", "current"],
  3087. referencedClasses: ["Dictionary", "Smalltalk", "Package"]
  3088. }),
  3089. smalltalk.ChunkExporter);
  3090. smalltalk.addMethod(
  3091. "_exportDefinitionOf_on_",
  3092. smalltalk.method({
  3093. selector: "exportDefinitionOf:on:",
  3094. category: '*Compiler',
  3095. fn: function (aClass,aStream){
  3096. var self=this;
  3097. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  3098. $1=aStream;
  3099. _st($1)._nextPutAll_("smalltalk.addClass(");
  3100. _st($1)._nextPutAll_(_st(_st("'").__comma(_st(self)._classNameFor_(aClass))).__comma("', "));
  3101. _st($1)._nextPutAll_(_st("smalltalk.").__comma(_st(self)._classNameFor_(_st(aClass)._superclass())));
  3102. $2=_st($1)._nextPutAll_(", [");
  3103. _st(_st(aClass)._instanceVariableNames())._do_separatedBy_((function(each){
  3104. return smalltalk.withContext(function($ctx2) { return _st(aStream)._nextPutAll_(_st(_st("'").__comma(each)).__comma("'"));
  3105. })}),(function(){
  3106. return smalltalk.withContext(function($ctx2) { return _st(aStream)._nextPutAll_(", ");
  3107. })}));
  3108. $3=aStream;
  3109. _st($3)._nextPutAll_("], '");
  3110. _st($3)._nextPutAll_(_st(_st(aClass)._category()).__comma("'"));
  3111. $4=_st($3)._nextPutAll_(");");
  3112. _st(aStream)._lf();
  3113. return self}, self, "exportDefinitionOf:on:", [aClass,aStream], smalltalk.StrippedExporter)},
  3114. args: ["aClass", "aStream"],
  3115. source: "exportDefinitionOf: aClass on: aStream\x0a\x09aStream \x0a\x09 nextPutAll: 'smalltalk.addClass(';\x0a\x09 nextPutAll: '''', (self classNameFor: aClass), ''', ';\x0a\x09 nextPutAll: 'smalltalk.', (self classNameFor: aClass superclass);\x0a\x09 nextPutAll: ', ['.\x0a\x09aClass instanceVariableNames \x0a\x09 do: [:each | aStream nextPutAll: '''', each, '''']\x0a\x09 separatedBy: [aStream nextPutAll: ', '].\x0a\x09aStream\x09\x0a\x09 nextPutAll: '], ''';\x0a\x09 nextPutAll: aClass category, '''';\x0a\x09 nextPutAll: ');'.\x0a\x09aStream lf",
  3116. messageSends: ["nextPutAll:", ",", "classNameFor:", "superclass", "do:separatedBy:", "instanceVariableNames", "category", "lf"],
  3117. referencedClasses: []
  3118. }),
  3119. smalltalk.StrippedExporter);
  3120. smalltalk.addMethod(
  3121. "_exportMethod_of_on_",
  3122. smalltalk.method({
  3123. selector: "exportMethod:of:on:",
  3124. category: '*Compiler',
  3125. fn: function (aMethod,aClass,aStream){
  3126. var self=this;
  3127. return smalltalk.withContext(function($ctx1) { var $1,$2;
  3128. $1=aStream;
  3129. _st($1)._nextPutAll_("smalltalk.addMethod(");
  3130. _st($1)._lf();
  3131. _st($1)._nextPutAll_(_st(_st(_st(_st(aMethod)._selector())._asSelector())._asJavascript()).__comma(","));
  3132. _st($1)._lf();
  3133. _st($1)._nextPutAll_("smalltalk.method({");
  3134. _st($1)._lf();
  3135. _st($1)._nextPutAll_(_st(_st("selector: ").__comma(_st(_st(aMethod)._selector())._asJavascript())).__comma(","));
  3136. _st($1)._lf();
  3137. _st($1)._nextPutAll_(_st("fn: ").__comma(_st(_st(aMethod)._fn())._compiledSource()));
  3138. _st($1)._lf();
  3139. _st($1)._nextPutAll_("}),");
  3140. _st($1)._lf();
  3141. _st($1)._nextPutAll_(_st("smalltalk.").__comma(_st(self)._classNameFor_(aClass)));
  3142. _st($1)._nextPutAll_(");");
  3143. _st($1)._lf();
  3144. $2=_st($1)._lf();
  3145. return self}, self, "exportMethod:of:on:", [aMethod,aClass,aStream], smalltalk.StrippedExporter)},
  3146. args: ["aMethod", "aClass", "aStream"],
  3147. source: "exportMethod: aMethod of: aClass on: aStream\x0a\x09aStream \x0a\x09\x09nextPutAll: 'smalltalk.addMethod(';lf;\x0a\x09\x09nextPutAll: aMethod selector asSelector asJavascript, ',';lf;\x0a\x09\x09nextPutAll: 'smalltalk.method({';lf;\x0a\x09\x09nextPutAll: 'selector: ', aMethod selector asJavascript, ',';lf;\x0a\x09\x09nextPutAll: 'fn: ', aMethod fn compiledSource;lf;\x0a\x09\x09nextPutAll: '}),';lf;\x0a\x09\x09nextPutAll: 'smalltalk.', (self classNameFor: aClass);\x0a\x09\x09nextPutAll: ');';lf;lf",
  3148. messageSends: ["nextPutAll:", "lf", ",", "asJavascript", "asSelector", "selector", "compiledSource", "fn", "classNameFor:"],
  3149. referencedClasses: []
  3150. }),
  3151. smalltalk.StrippedExporter);
  3152. smalltalk.addMethod(
  3153. "_accept_",
  3154. smalltalk.method({
  3155. selector: "accept:",
  3156. category: '*Compiler',
  3157. fn: function (aVisitor){
  3158. var self=this;
  3159. return smalltalk.withContext(function($ctx1) { var $1;
  3160. $1=_st(aVisitor)._visitIRInstruction_(self);
  3161. return $1;
  3162. }, self, "accept:", [aVisitor], smalltalk.IRInstruction)},
  3163. args: ["aVisitor"],
  3164. source: "accept: aVisitor\x0a\x09^ aVisitor visitIRInstruction: self",
  3165. messageSends: ["visitIRInstruction:"],
  3166. referencedClasses: []
  3167. }),
  3168. smalltalk.IRInstruction);
  3169. smalltalk.addMethod(
  3170. "_add_",
  3171. smalltalk.method({
  3172. selector: "add:",
  3173. category: '*Compiler',
  3174. fn: function (anObject){
  3175. var self=this;
  3176. return smalltalk.withContext(function($ctx1) { var $1;
  3177. _st(anObject)._parent_(self);
  3178. $1=_st(_st(self)._instructions())._add_(anObject);
  3179. return $1;
  3180. }, self, "add:", [anObject], smalltalk.IRInstruction)},
  3181. args: ["anObject"],
  3182. source: "add: anObject\x0a\x09anObject parent: self.\x0a\x09^ self instructions add: anObject",
  3183. messageSends: ["parent:", "add:", "instructions"],
  3184. referencedClasses: []
  3185. }),
  3186. smalltalk.IRInstruction);
  3187. smalltalk.addMethod(
  3188. "_canBeAssigned",
  3189. smalltalk.method({
  3190. selector: "canBeAssigned",
  3191. category: '*Compiler',
  3192. fn: function (){
  3193. var self=this;
  3194. return smalltalk.withContext(function($ctx1) { return true;
  3195. }, self, "canBeAssigned", [], smalltalk.IRInstruction)},
  3196. args: [],
  3197. source: "canBeAssigned\x0a\x09^ true",
  3198. messageSends: [],
  3199. referencedClasses: []
  3200. }),
  3201. smalltalk.IRInstruction);
  3202. smalltalk.addMethod(
  3203. "_instructions",
  3204. smalltalk.method({
  3205. selector: "instructions",
  3206. category: '*Compiler',
  3207. fn: function (){
  3208. var self=this;
  3209. return smalltalk.withContext(function($ctx1) { var $2,$1;
  3210. $2=self["@instructions"];
  3211. if(($receiver = $2) == nil || $receiver == undefined){
  3212. self["@instructions"]=_st((smalltalk.OrderedCollection || OrderedCollection))._new();
  3213. $1=self["@instructions"];
  3214. } else {
  3215. $1=$2;
  3216. };
  3217. return $1;
  3218. }, self, "instructions", [], smalltalk.IRInstruction)},
  3219. args: [],
  3220. source: "instructions\x0a\x09^ instructions ifNil: [ instructions := OrderedCollection new ]",
  3221. messageSends: ["ifNil:", "new"],
  3222. referencedClasses: ["OrderedCollection"]
  3223. }),
  3224. smalltalk.IRInstruction);
  3225. smalltalk.addMethod(
  3226. "_isClosure",
  3227. smalltalk.method({
  3228. selector: "isClosure",
  3229. category: '*Compiler',
  3230. fn: function (){
  3231. var self=this;
  3232. return smalltalk.withContext(function($ctx1) { return false;
  3233. }, self, "isClosure", [], smalltalk.IRInstruction)},
  3234. args: [],
  3235. source: "isClosure\x0a\x09^ false",
  3236. messageSends: [],
  3237. referencedClasses: []
  3238. }),
  3239. smalltalk.IRInstruction);
  3240. smalltalk.addMethod(
  3241. "_isInlined",
  3242. smalltalk.method({
  3243. selector: "isInlined",
  3244. category: '*Compiler',
  3245. fn: function (){
  3246. var self=this;
  3247. return smalltalk.withContext(function($ctx1) { return false;
  3248. }, self, "isInlined", [], smalltalk.IRInstruction)},
  3249. args: [],
  3250. source: "isInlined\x0a\x09^ false",
  3251. messageSends: [],
  3252. referencedClasses: []
  3253. }),
  3254. smalltalk.IRInstruction);
  3255. smalltalk.addMethod(
  3256. "_isLocalReturn",
  3257. smalltalk.method({
  3258. selector: "isLocalReturn",
  3259. category: '*Compiler',
  3260. fn: function (){
  3261. var self=this;
  3262. return smalltalk.withContext(function($ctx1) { return false;
  3263. }, self, "isLocalReturn", [], smalltalk.IRInstruction)},
  3264. args: [],
  3265. source: "isLocalReturn\x0a\x09^ false",
  3266. messageSends: [],
  3267. referencedClasses: []
  3268. }),
  3269. smalltalk.IRInstruction);
  3270. smalltalk.addMethod(
  3271. "_isReturn",
  3272. smalltalk.method({
  3273. selector: "isReturn",
  3274. category: '*Compiler',
  3275. fn: function (){
  3276. var self=this;
  3277. return smalltalk.withContext(function($ctx1) { return false;
  3278. }, self, "isReturn", [], smalltalk.IRInstruction)},
  3279. args: [],
  3280. source: "isReturn\x0a\x09^ false",
  3281. messageSends: [],
  3282. referencedClasses: []
  3283. }),
  3284. smalltalk.IRInstruction);
  3285. smalltalk.addMethod(
  3286. "_isSend",
  3287. smalltalk.method({
  3288. selector: "isSend",
  3289. category: '*Compiler',
  3290. fn: function (){
  3291. var self=this;
  3292. return smalltalk.withContext(function($ctx1) { return false;
  3293. }, self, "isSend", [], smalltalk.IRInstruction)},
  3294. args: [],
  3295. source: "isSend\x0a\x09^ false",
  3296. messageSends: [],
  3297. referencedClasses: []
  3298. }),
  3299. smalltalk.IRInstruction);
  3300. smalltalk.addMethod(
  3301. "_isSequence",
  3302. smalltalk.method({
  3303. selector: "isSequence",
  3304. category: '*Compiler',
  3305. fn: function (){
  3306. var self=this;
  3307. return smalltalk.withContext(function($ctx1) { return false;
  3308. }, self, "isSequence", [], smalltalk.IRInstruction)},
  3309. args: [],
  3310. source: "isSequence\x0a\x09^ false",
  3311. messageSends: [],
  3312. referencedClasses: []
  3313. }),
  3314. smalltalk.IRInstruction);
  3315. smalltalk.addMethod(
  3316. "_isTempDeclaration",
  3317. smalltalk.method({
  3318. selector: "isTempDeclaration",
  3319. category: '*Compiler',
  3320. fn: function (){
  3321. var self=this;
  3322. return smalltalk.withContext(function($ctx1) { return false;
  3323. }, self, "isTempDeclaration", [], smalltalk.IRInstruction)},
  3324. args: [],
  3325. source: "isTempDeclaration\x0a\x09^ false",
  3326. messageSends: [],
  3327. referencedClasses: []
  3328. }),
  3329. smalltalk.IRInstruction);
  3330. smalltalk.addMethod(
  3331. "_isVariable",
  3332. smalltalk.method({
  3333. selector: "isVariable",
  3334. category: '*Compiler',
  3335. fn: function (){
  3336. var self=this;
  3337. return smalltalk.withContext(function($ctx1) { return false;
  3338. }, self, "isVariable", [], smalltalk.IRInstruction)},
  3339. args: [],
  3340. source: "isVariable\x0a\x09^ false",
  3341. messageSends: [],
  3342. referencedClasses: []
  3343. }),
  3344. smalltalk.IRInstruction);
  3345. smalltalk.addMethod(
  3346. "_parent",
  3347. smalltalk.method({
  3348. selector: "parent",
  3349. category: '*Compiler',
  3350. fn: function (){
  3351. var self=this;
  3352. return smalltalk.withContext(function($ctx1) { var $1;
  3353. $1=self["@parent"];
  3354. return $1;
  3355. }, self, "parent", [], smalltalk.IRInstruction)},
  3356. args: [],
  3357. source: "parent\x0a\x09^ parent",
  3358. messageSends: [],
  3359. referencedClasses: []
  3360. }),
  3361. smalltalk.IRInstruction);
  3362. smalltalk.addMethod(
  3363. "_parent_",
  3364. smalltalk.method({
  3365. selector: "parent:",
  3366. category: '*Compiler',
  3367. fn: function (anIRInstruction){
  3368. var self=this;
  3369. return smalltalk.withContext(function($ctx1) { self["@parent"]=anIRInstruction;
  3370. return self}, self, "parent:", [anIRInstruction], smalltalk.IRInstruction)},
  3371. args: ["anIRInstruction"],
  3372. source: "parent: anIRInstruction\x0a\x09parent := anIRInstruction",
  3373. messageSends: [],
  3374. referencedClasses: []
  3375. }),
  3376. smalltalk.IRInstruction);
  3377. smalltalk.addMethod(
  3378. "_remove",
  3379. smalltalk.method({
  3380. selector: "remove",
  3381. category: '*Compiler',
  3382. fn: function (){
  3383. var self=this;
  3384. return smalltalk.withContext(function($ctx1) { _st(_st(self)._parent())._remove_(self);
  3385. return self}, self, "remove", [], smalltalk.IRInstruction)},
  3386. args: [],
  3387. source: "remove\x0a\x09self parent remove: self",
  3388. messageSends: ["remove:", "parent"],
  3389. referencedClasses: []
  3390. }),
  3391. smalltalk.IRInstruction);
  3392. smalltalk.addMethod(
  3393. "_remove_",
  3394. smalltalk.method({
  3395. selector: "remove:",
  3396. category: '*Compiler',
  3397. fn: function (anIRInstruction){
  3398. var self=this;
  3399. return smalltalk.withContext(function($ctx1) { _st(_st(self)._instructions())._remove_(anIRInstruction);
  3400. return self}, self, "remove:", [anIRInstruction], smalltalk.IRInstruction)},
  3401. args: ["anIRInstruction"],
  3402. source: "remove: anIRInstruction\x0a\x09self instructions remove: anIRInstruction",
  3403. messageSends: ["remove:", "instructions"],
  3404. referencedClasses: []
  3405. }),
  3406. smalltalk.IRInstruction);
  3407. smalltalk.addMethod(
  3408. "_replace_with_",
  3409. smalltalk.method({
  3410. selector: "replace:with:",
  3411. category: '*Compiler',
  3412. fn: function (anIRInstruction,anotherIRInstruction){
  3413. var self=this;
  3414. return smalltalk.withContext(function($ctx1) { _st(anotherIRInstruction)._parent_(self);
  3415. _st(_st(self)._instructions())._at_put_(_st(_st(self)._instructions())._indexOf_(anIRInstruction),anotherIRInstruction);
  3416. return self}, self, "replace:with:", [anIRInstruction,anotherIRInstruction], smalltalk.IRInstruction)},
  3417. args: ["anIRInstruction", "anotherIRInstruction"],
  3418. source: "replace: anIRInstruction with: anotherIRInstruction\x0a\x09anotherIRInstruction parent: self.\x0a\x09self instructions \x0a\x09\x09at: (self instructions indexOf: anIRInstruction)\x0a\x09\x09put: anotherIRInstruction",
  3419. messageSends: ["parent:", "at:put:", "indexOf:", "instructions"],
  3420. referencedClasses: []
  3421. }),
  3422. smalltalk.IRInstruction);
  3423. smalltalk.addMethod(
  3424. "_replaceWith_",
  3425. smalltalk.method({
  3426. selector: "replaceWith:",
  3427. category: '*Compiler',
  3428. fn: function (anIRInstruction){
  3429. var self=this;
  3430. return smalltalk.withContext(function($ctx1) { _st(_st(self)._parent())._replace_with_(self,anIRInstruction);
  3431. return self}, self, "replaceWith:", [anIRInstruction], smalltalk.IRInstruction)},
  3432. args: ["anIRInstruction"],
  3433. source: "replaceWith: anIRInstruction\x0a\x09self parent replace: self with: anIRInstruction",
  3434. messageSends: ["replace:with:", "parent"],
  3435. referencedClasses: []
  3436. }),
  3437. smalltalk.IRInstruction);
  3438. smalltalk.addMethod(
  3439. "_on_",
  3440. smalltalk.method({
  3441. selector: "on:",
  3442. category: '*Compiler',
  3443. fn: function (aBuilder){
  3444. var self=this;
  3445. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  3446. $2=_st(self)._new();
  3447. _st($2)._builder_(aBuilder);
  3448. $3=_st($2)._yourself();
  3449. $1=$3;
  3450. return $1;
  3451. }, self, "on:", [aBuilder], smalltalk.IRInstruction.klass)},
  3452. args: ["aBuilder"],
  3453. source: "on: aBuilder\x0a\x09^ self new\x0a\x09\x09builder: aBuilder;\x0a\x09\x09yourself",
  3454. messageSends: ["builder:", "new", "yourself"],
  3455. referencedClasses: []
  3456. }),
  3457. smalltalk.IRInstruction.klass);
  3458. smalltalk.addMethod(
  3459. "_accept_",
  3460. smalltalk.method({
  3461. selector: "accept:",
  3462. category: '*Compiler',
  3463. fn: function (aVisitor){
  3464. var self=this;
  3465. return smalltalk.withContext(function($ctx1) { var $1;
  3466. $1=_st(aVisitor)._visitIRAssignment_(self);
  3467. return $1;
  3468. }, self, "accept:", [aVisitor], smalltalk.IRAssignment)},
  3469. args: ["aVisitor"],
  3470. source: "accept: aVisitor\x0a\x09^ aVisitor visitIRAssignment: self",
  3471. messageSends: ["visitIRAssignment:"],
  3472. referencedClasses: []
  3473. }),
  3474. smalltalk.IRAssignment);
  3475. smalltalk.addMethod(
  3476. "_accept_",
  3477. smalltalk.method({
  3478. selector: "accept:",
  3479. category: '*Compiler',
  3480. fn: function (aVisitor){
  3481. var self=this;
  3482. return smalltalk.withContext(function($ctx1) { var $1;
  3483. $1=_st(aVisitor)._visitIRInlinedAssignment_(self);
  3484. return $1;
  3485. }, self, "accept:", [aVisitor], smalltalk.IRInlinedAssignment)},
  3486. args: ["aVisitor"],
  3487. source: "accept: aVisitor\x0a\x09^ aVisitor visitIRInlinedAssignment: self",
  3488. messageSends: ["visitIRInlinedAssignment:"],
  3489. referencedClasses: []
  3490. }),
  3491. smalltalk.IRInlinedAssignment);
  3492. smalltalk.addMethod(
  3493. "_isInlined",
  3494. smalltalk.method({
  3495. selector: "isInlined",
  3496. category: '*Compiler',
  3497. fn: function (){
  3498. var self=this;
  3499. return smalltalk.withContext(function($ctx1) { return true;
  3500. }, self, "isInlined", [], smalltalk.IRInlinedAssignment)},
  3501. args: [],
  3502. source: "isInlined\x0a\x09^ true",
  3503. messageSends: [],
  3504. referencedClasses: []
  3505. }),
  3506. smalltalk.IRInlinedAssignment);
  3507. smalltalk.addMethod(
  3508. "_accept_",
  3509. smalltalk.method({
  3510. selector: "accept:",
  3511. category: '*Compiler',
  3512. fn: function (aVisitor){
  3513. var self=this;
  3514. return smalltalk.withContext(function($ctx1) { var $1;
  3515. $1=_st(aVisitor)._visitIRDynamicArray_(self);
  3516. return $1;
  3517. }, self, "accept:", [aVisitor], smalltalk.IRDynamicArray)},
  3518. args: ["aVisitor"],
  3519. source: "accept: aVisitor\x0a\x09^ aVisitor visitIRDynamicArray: self",
  3520. messageSends: ["visitIRDynamicArray:"],
  3521. referencedClasses: []
  3522. }),
  3523. smalltalk.IRDynamicArray);
  3524. smalltalk.addMethod(
  3525. "_accept_",
  3526. smalltalk.method({
  3527. selector: "accept:",
  3528. category: '*Compiler',
  3529. fn: function (aVisitor){
  3530. var self=this;
  3531. return smalltalk.withContext(function($ctx1) { var $1;
  3532. $1=_st(aVisitor)._visitIRDynamicDictionary_(self);
  3533. return $1;
  3534. }, self, "accept:", [aVisitor], smalltalk.IRDynamicDictionary)},
  3535. args: ["aVisitor"],
  3536. source: "accept: aVisitor\x0a\x09^ aVisitor visitIRDynamicDictionary: self",
  3537. messageSends: ["visitIRDynamicDictionary:"],
  3538. referencedClasses: []
  3539. }),
  3540. smalltalk.IRDynamicDictionary);
  3541. smalltalk.addMethod(
  3542. "_scope",
  3543. smalltalk.method({
  3544. selector: "scope",
  3545. category: '*Compiler',
  3546. fn: function (){
  3547. var self=this;
  3548. return smalltalk.withContext(function($ctx1) { var $1;
  3549. $1=self["@scope"];
  3550. return $1;
  3551. }, self, "scope", [], smalltalk.IRScopedInstruction)},
  3552. args: [],
  3553. source: "scope\x0a\x09^ scope",
  3554. messageSends: [],
  3555. referencedClasses: []
  3556. }),
  3557. smalltalk.IRScopedInstruction);
  3558. smalltalk.addMethod(
  3559. "_scope_",
  3560. smalltalk.method({
  3561. selector: "scope:",
  3562. category: '*Compiler',
  3563. fn: function (aScope){
  3564. var self=this;
  3565. return smalltalk.withContext(function($ctx1) { self["@scope"]=aScope;
  3566. return self}, self, "scope:", [aScope], smalltalk.IRScopedInstruction)},
  3567. args: ["aScope"],
  3568. source: "scope: aScope\x0a\x09scope := aScope",
  3569. messageSends: [],
  3570. referencedClasses: []
  3571. }),
  3572. smalltalk.IRScopedInstruction);
  3573. smalltalk.addMethod(
  3574. "_accept_",
  3575. smalltalk.method({
  3576. selector: "accept:",
  3577. category: '*Compiler',
  3578. fn: function (aVisitor){
  3579. var self=this;
  3580. return smalltalk.withContext(function($ctx1) { var $1;
  3581. $1=_st(aVisitor)._visitIRClosure_(self);
  3582. return $1;
  3583. }, self, "accept:", [aVisitor], smalltalk.IRClosure)},
  3584. args: ["aVisitor"],
  3585. source: "accept: aVisitor\x0a\x09^ aVisitor visitIRClosure: self",
  3586. messageSends: ["visitIRClosure:"],
  3587. referencedClasses: []
  3588. }),
  3589. smalltalk.IRClosure);
  3590. smalltalk.addMethod(
  3591. "_arguments",
  3592. smalltalk.method({
  3593. selector: "arguments",
  3594. category: '*Compiler',
  3595. fn: function (){
  3596. var self=this;
  3597. return smalltalk.withContext(function($ctx1) { var $2,$1;
  3598. $2=self["@arguments"];
  3599. if(($receiver = $2) == nil || $receiver == undefined){
  3600. $1=[];
  3601. } else {
  3602. $1=$2;
  3603. };
  3604. return $1;
  3605. }, self, "arguments", [], smalltalk.IRClosure)},
  3606. args: [],
  3607. source: "arguments\x0a\x09^ arguments ifNil: [ #() ]",
  3608. messageSends: ["ifNil:"],
  3609. referencedClasses: []
  3610. }),
  3611. smalltalk.IRClosure);
  3612. smalltalk.addMethod(
  3613. "_arguments_",
  3614. smalltalk.method({
  3615. selector: "arguments:",
  3616. category: '*Compiler',
  3617. fn: function (aCollection){
  3618. var self=this;
  3619. return smalltalk.withContext(function($ctx1) { self["@arguments"]=aCollection;
  3620. return self}, self, "arguments:", [aCollection], smalltalk.IRClosure)},
  3621. args: ["aCollection"],
  3622. source: "arguments: aCollection\x0a\x09arguments := aCollection",
  3623. messageSends: [],
  3624. referencedClasses: []
  3625. }),
  3626. smalltalk.IRClosure);
  3627. smalltalk.addMethod(
  3628. "_isClosure",
  3629. smalltalk.method({
  3630. selector: "isClosure",
  3631. category: '*Compiler',
  3632. fn: function (){
  3633. var self=this;
  3634. return smalltalk.withContext(function($ctx1) { return true;
  3635. }, self, "isClosure", [], smalltalk.IRClosure)},
  3636. args: [],
  3637. source: "isClosure\x0a\x09^ true",
  3638. messageSends: [],
  3639. referencedClasses: []
  3640. }),
  3641. smalltalk.IRClosure);
  3642. smalltalk.addMethod(
  3643. "_scope_",
  3644. smalltalk.method({
  3645. selector: "scope:",
  3646. category: '*Compiler',
  3647. fn: function (aScope){
  3648. var self=this;
  3649. return smalltalk.withContext(function($ctx1) { smalltalk.IRScopedInstruction.fn.prototype._scope_.apply(_st(self), [aScope]);
  3650. _st(aScope)._instruction_(self);
  3651. return self}, self, "scope:", [aScope], smalltalk.IRClosure)},
  3652. args: ["aScope"],
  3653. source: "scope: aScope\x0a\x09super scope: aScope.\x0a\x09aScope instruction: self",
  3654. messageSends: ["scope:", "instruction:"],
  3655. referencedClasses: []
  3656. }),
  3657. smalltalk.IRClosure);
  3658. smalltalk.addMethod(
  3659. "_sequence",
  3660. smalltalk.method({
  3661. selector: "sequence",
  3662. category: '*Compiler',
  3663. fn: function (){
  3664. var self=this;
  3665. return smalltalk.withContext(function($ctx1) { var $1;
  3666. $1=_st(_st(self)._instructions())._last();
  3667. return $1;
  3668. }, self, "sequence", [], smalltalk.IRClosure)},
  3669. args: [],
  3670. source: "sequence\x0a\x09^ self instructions last",
  3671. messageSends: ["last", "instructions"],
  3672. referencedClasses: []
  3673. }),
  3674. smalltalk.IRClosure);
  3675. smalltalk.addMethod(
  3676. "_accept_",
  3677. smalltalk.method({
  3678. selector: "accept:",
  3679. category: '*Compiler',
  3680. fn: function (aVisitor){
  3681. var self=this;
  3682. return smalltalk.withContext(function($ctx1) { _st(aVisitor)._visitIRInlinedClosure_(self);
  3683. return self}, self, "accept:", [aVisitor], smalltalk.IRInlinedClosure)},
  3684. args: ["aVisitor"],
  3685. source: "accept: aVisitor\x0a\x09aVisitor visitIRInlinedClosure: self",
  3686. messageSends: ["visitIRInlinedClosure:"],
  3687. referencedClasses: []
  3688. }),
  3689. smalltalk.IRInlinedClosure);
  3690. smalltalk.addMethod(
  3691. "_isInlined",
  3692. smalltalk.method({
  3693. selector: "isInlined",
  3694. category: '*Compiler',
  3695. fn: function (){
  3696. var self=this;
  3697. return smalltalk.withContext(function($ctx1) { return true;
  3698. }, self, "isInlined", [], smalltalk.IRInlinedClosure)},
  3699. args: [],
  3700. source: "isInlined\x0a\x09^ true",
  3701. messageSends: [],
  3702. referencedClasses: []
  3703. }),
  3704. smalltalk.IRInlinedClosure);
  3705. smalltalk.addMethod(
  3706. "_accept_",
  3707. smalltalk.method({
  3708. selector: "accept:",
  3709. category: '*Compiler',
  3710. fn: function (aVisitor){
  3711. var self=this;
  3712. return smalltalk.withContext(function($ctx1) { var $1;
  3713. $1=_st(aVisitor)._visitIRMethod_(self);
  3714. return $1;
  3715. }, self, "accept:", [aVisitor], smalltalk.IRMethod)},
  3716. args: ["aVisitor"],
  3717. source: "accept: aVisitor\x0a\x09^ aVisitor visitIRMethod: self",
  3718. messageSends: ["visitIRMethod:"],
  3719. referencedClasses: []
  3720. }),
  3721. smalltalk.IRMethod);
  3722. smalltalk.addMethod(
  3723. "_arguments",
  3724. smalltalk.method({
  3725. selector: "arguments",
  3726. category: '*Compiler',
  3727. fn: function (){
  3728. var self=this;
  3729. return smalltalk.withContext(function($ctx1) { var $1;
  3730. $1=self["@arguments"];
  3731. return $1;
  3732. }, self, "arguments", [], smalltalk.IRMethod)},
  3733. args: [],
  3734. source: "arguments\x0a\x09^ arguments",
  3735. messageSends: [],
  3736. referencedClasses: []
  3737. }),
  3738. smalltalk.IRMethod);
  3739. smalltalk.addMethod(
  3740. "_arguments_",
  3741. smalltalk.method({
  3742. selector: "arguments:",
  3743. category: '*Compiler',
  3744. fn: function (aCollection){
  3745. var self=this;
  3746. return smalltalk.withContext(function($ctx1) { self["@arguments"]=aCollection;
  3747. return self}, self, "arguments:", [aCollection], smalltalk.IRMethod)},
  3748. args: ["aCollection"],
  3749. source: "arguments: aCollection\x0a\x09arguments := aCollection",
  3750. messageSends: [],
  3751. referencedClasses: []
  3752. }),
  3753. smalltalk.IRMethod);
  3754. smalltalk.addMethod(
  3755. "_classReferences",
  3756. smalltalk.method({
  3757. selector: "classReferences",
  3758. category: '*Compiler',
  3759. fn: function (){
  3760. var self=this;
  3761. return smalltalk.withContext(function($ctx1) { var $1;
  3762. $1=self["@classReferences"];
  3763. return $1;
  3764. }, self, "classReferences", [], smalltalk.IRMethod)},
  3765. args: [],
  3766. source: "classReferences\x0a\x09^ classReferences",
  3767. messageSends: [],
  3768. referencedClasses: []
  3769. }),
  3770. smalltalk.IRMethod);
  3771. smalltalk.addMethod(
  3772. "_classReferences_",
  3773. smalltalk.method({
  3774. selector: "classReferences:",
  3775. category: '*Compiler',
  3776. fn: function (aCollection){
  3777. var self=this;
  3778. return smalltalk.withContext(function($ctx1) { self["@classReferences"]=aCollection;
  3779. return self}, self, "classReferences:", [aCollection], smalltalk.IRMethod)},
  3780. args: ["aCollection"],
  3781. source: "classReferences: aCollection\x0a\x09classReferences := aCollection",
  3782. messageSends: [],
  3783. referencedClasses: []
  3784. }),
  3785. smalltalk.IRMethod);
  3786. smalltalk.addMethod(
  3787. "_internalVariables",
  3788. smalltalk.method({
  3789. selector: "internalVariables",
  3790. category: '*Compiler',
  3791. fn: function (){
  3792. var self=this;
  3793. return smalltalk.withContext(function($ctx1) { var $2,$1;
  3794. $2=self["@internalVariables"];
  3795. if(($receiver = $2) == nil || $receiver == undefined){
  3796. self["@internalVariables"]=_st((smalltalk.Set || Set))._new();
  3797. $1=self["@internalVariables"];
  3798. } else {
  3799. $1=$2;
  3800. };
  3801. return $1;
  3802. }, self, "internalVariables", [], smalltalk.IRMethod)},
  3803. args: [],
  3804. source: "internalVariables\x0a\x09^ internalVariables ifNil: [ internalVariables := Set new ]",
  3805. messageSends: ["ifNil:", "new"],
  3806. referencedClasses: ["Set"]
  3807. }),
  3808. smalltalk.IRMethod);
  3809. smalltalk.addMethod(
  3810. "_messageSends",
  3811. smalltalk.method({
  3812. selector: "messageSends",
  3813. category: '*Compiler',
  3814. fn: function (){
  3815. var self=this;
  3816. return smalltalk.withContext(function($ctx1) { var $1;
  3817. $1=self["@messageSends"];
  3818. return $1;
  3819. }, self, "messageSends", [], smalltalk.IRMethod)},
  3820. args: [],
  3821. source: "messageSends\x0a\x09^ messageSends",
  3822. messageSends: [],
  3823. referencedClasses: []
  3824. }),
  3825. smalltalk.IRMethod);
  3826. smalltalk.addMethod(
  3827. "_messageSends_",
  3828. smalltalk.method({
  3829. selector: "messageSends:",
  3830. category: '*Compiler',
  3831. fn: function (aCollection){
  3832. var self=this;
  3833. return smalltalk.withContext(function($ctx1) { self["@messageSends"]=aCollection;
  3834. return self}, self, "messageSends:", [aCollection], smalltalk.IRMethod)},
  3835. args: ["aCollection"],
  3836. source: "messageSends: aCollection\x0a\x09messageSends := aCollection",
  3837. messageSends: [],
  3838. referencedClasses: []
  3839. }),
  3840. smalltalk.IRMethod);
  3841. smalltalk.addMethod(
  3842. "_scope_",
  3843. smalltalk.method({
  3844. selector: "scope:",
  3845. category: '*Compiler',
  3846. fn: function (aScope){
  3847. var self=this;
  3848. return smalltalk.withContext(function($ctx1) { smalltalk.IRScopedInstruction.fn.prototype._scope_.apply(_st(self), [aScope]);
  3849. _st(aScope)._instruction_(self);
  3850. return self}, self, "scope:", [aScope], smalltalk.IRMethod)},
  3851. args: ["aScope"],
  3852. source: "scope: aScope\x0a\x09super scope: aScope.\x0a\x09aScope instruction: self",
  3853. messageSends: ["scope:", "instruction:"],
  3854. referencedClasses: []
  3855. }),
  3856. smalltalk.IRMethod);
  3857. smalltalk.addMethod(
  3858. "_selector",
  3859. smalltalk.method({
  3860. selector: "selector",
  3861. category: '*Compiler',
  3862. fn: function (){
  3863. var self=this;
  3864. return smalltalk.withContext(function($ctx1) { var $1;
  3865. $1=self["@selector"];
  3866. return $1;
  3867. }, self, "selector", [], smalltalk.IRMethod)},
  3868. args: [],
  3869. source: "selector\x0a\x09^ selector",
  3870. messageSends: [],
  3871. referencedClasses: []
  3872. }),
  3873. smalltalk.IRMethod);
  3874. smalltalk.addMethod(
  3875. "_selector_",
  3876. smalltalk.method({
  3877. selector: "selector:",
  3878. category: '*Compiler',
  3879. fn: function (aString){
  3880. var self=this;
  3881. return smalltalk.withContext(function($ctx1) { self["@selector"]=aString;
  3882. return self}, self, "selector:", [aString], smalltalk.IRMethod)},
  3883. args: ["aString"],
  3884. source: "selector: aString\x0a\x09selector := aString",
  3885. messageSends: [],
  3886. referencedClasses: []
  3887. }),
  3888. smalltalk.IRMethod);
  3889. smalltalk.addMethod(
  3890. "_source",
  3891. smalltalk.method({
  3892. selector: "source",
  3893. category: '*Compiler',
  3894. fn: function (){
  3895. var self=this;
  3896. return smalltalk.withContext(function($ctx1) { var $1;
  3897. $1=self["@source"];
  3898. return $1;
  3899. }, self, "source", [], smalltalk.IRMethod)},
  3900. args: [],
  3901. source: "source\x0a\x09^ source",
  3902. messageSends: [],
  3903. referencedClasses: []
  3904. }),
  3905. smalltalk.IRMethod);
  3906. smalltalk.addMethod(
  3907. "_source_",
  3908. smalltalk.method({
  3909. selector: "source:",
  3910. category: '*Compiler',
  3911. fn: function (aString){
  3912. var self=this;
  3913. return smalltalk.withContext(function($ctx1) { self["@source"]=aString;
  3914. return self}, self, "source:", [aString], smalltalk.IRMethod)},
  3915. args: ["aString"],
  3916. source: "source: aString\x0a\x09source := aString",
  3917. messageSends: [],
  3918. referencedClasses: []
  3919. }),
  3920. smalltalk.IRMethod);
  3921. smalltalk.addMethod(
  3922. "_superSends",
  3923. smalltalk.method({
  3924. selector: "superSends",
  3925. category: '*Compiler',
  3926. fn: function (){
  3927. var self=this;
  3928. return smalltalk.withContext(function($ctx1) { var $1;
  3929. $1=self["@superSends"];
  3930. return $1;
  3931. }, self, "superSends", [], smalltalk.IRMethod)},
  3932. args: [],
  3933. source: "superSends\x0a\x09^ superSends",
  3934. messageSends: [],
  3935. referencedClasses: []
  3936. }),
  3937. smalltalk.IRMethod);
  3938. smalltalk.addMethod(
  3939. "_superSends_",
  3940. smalltalk.method({
  3941. selector: "superSends:",
  3942. category: '*Compiler',
  3943. fn: function (aCollection){
  3944. var self=this;
  3945. return smalltalk.withContext(function($ctx1) { self["@superSends"]=aCollection;
  3946. return self}, self, "superSends:", [aCollection], smalltalk.IRMethod)},
  3947. args: ["aCollection"],
  3948. source: "superSends: aCollection\x0a\x09superSends := aCollection",
  3949. messageSends: [],
  3950. referencedClasses: []
  3951. }),
  3952. smalltalk.IRMethod);
  3953. smalltalk.addMethod(
  3954. "_theClass",
  3955. smalltalk.method({
  3956. selector: "theClass",
  3957. category: '*Compiler',
  3958. fn: function (){
  3959. var self=this;
  3960. return smalltalk.withContext(function($ctx1) { var $1;
  3961. $1=self["@theClass"];
  3962. return $1;
  3963. }, self, "theClass", [], smalltalk.IRMethod)},
  3964. args: [],
  3965. source: "theClass\x0a\x09^ theClass",
  3966. messageSends: [],
  3967. referencedClasses: []
  3968. }),
  3969. smalltalk.IRMethod);
  3970. smalltalk.addMethod(
  3971. "_theClass_",
  3972. smalltalk.method({
  3973. selector: "theClass:",
  3974. category: '*Compiler',
  3975. fn: function (aClass){
  3976. var self=this;
  3977. return smalltalk.withContext(function($ctx1) { self["@theClass"]=aClass;
  3978. return self}, self, "theClass:", [aClass], smalltalk.IRMethod)},
  3979. args: ["aClass"],
  3980. source: "theClass: aClass\x0a\x09theClass := aClass",
  3981. messageSends: [],
  3982. referencedClasses: []
  3983. }),
  3984. smalltalk.IRMethod);
  3985. smalltalk.addMethod(
  3986. "_accept_",
  3987. smalltalk.method({
  3988. selector: "accept:",
  3989. category: '*Compiler',
  3990. fn: function (aVisitor){
  3991. var self=this;
  3992. return smalltalk.withContext(function($ctx1) { var $1;
  3993. $1=_st(aVisitor)._visitIRReturn_(self);
  3994. return $1;
  3995. }, self, "accept:", [aVisitor], smalltalk.IRReturn)},
  3996. args: ["aVisitor"],
  3997. source: "accept: aVisitor\x0a\x09^ aVisitor visitIRReturn: self",
  3998. messageSends: ["visitIRReturn:"],
  3999. referencedClasses: []
  4000. }),
  4001. smalltalk.IRReturn);
  4002. smalltalk.addMethod(
  4003. "_canBeAssigned",
  4004. smalltalk.method({
  4005. selector: "canBeAssigned",
  4006. category: '*Compiler',
  4007. fn: function (){
  4008. var self=this;
  4009. return smalltalk.withContext(function($ctx1) { return false;
  4010. }, self, "canBeAssigned", [], smalltalk.IRReturn)},
  4011. args: [],
  4012. source: "canBeAssigned\x0a\x09^ false",
  4013. messageSends: [],
  4014. referencedClasses: []
  4015. }),
  4016. smalltalk.IRReturn);
  4017. smalltalk.addMethod(
  4018. "_isBlockReturn",
  4019. smalltalk.method({
  4020. selector: "isBlockReturn",
  4021. category: '*Compiler',
  4022. fn: function (){
  4023. var self=this;
  4024. return smalltalk.withContext(function($ctx1) { return false;
  4025. }, self, "isBlockReturn", [], smalltalk.IRReturn)},
  4026. args: [],
  4027. source: "isBlockReturn\x0a\x09^ false",
  4028. messageSends: [],
  4029. referencedClasses: []
  4030. }),
  4031. smalltalk.IRReturn);
  4032. smalltalk.addMethod(
  4033. "_isLocalReturn",
  4034. smalltalk.method({
  4035. selector: "isLocalReturn",
  4036. category: '*Compiler',
  4037. fn: function (){
  4038. var self=this;
  4039. return smalltalk.withContext(function($ctx1) { return true;
  4040. }, self, "isLocalReturn", [], smalltalk.IRReturn)},
  4041. args: [],
  4042. source: "isLocalReturn\x0a\x09^ true",
  4043. messageSends: [],
  4044. referencedClasses: []
  4045. }),
  4046. smalltalk.IRReturn);
  4047. smalltalk.addMethod(
  4048. "_isNonLocalReturn",
  4049. smalltalk.method({
  4050. selector: "isNonLocalReturn",
  4051. category: '*Compiler',
  4052. fn: function (){
  4053. var self=this;
  4054. return smalltalk.withContext(function($ctx1) { var $1;
  4055. $1=_st(_st(self)._isLocalReturn())._not();
  4056. return $1;
  4057. }, self, "isNonLocalReturn", [], smalltalk.IRReturn)},
  4058. args: [],
  4059. source: "isNonLocalReturn\x0a\x09^ self isLocalReturn not",
  4060. messageSends: ["not", "isLocalReturn"],
  4061. referencedClasses: []
  4062. }),
  4063. smalltalk.IRReturn);
  4064. smalltalk.addMethod(
  4065. "_isReturn",
  4066. smalltalk.method({
  4067. selector: "isReturn",
  4068. category: '*Compiler',
  4069. fn: function (){
  4070. var self=this;
  4071. return smalltalk.withContext(function($ctx1) { return true;
  4072. }, self, "isReturn", [], smalltalk.IRReturn)},
  4073. args: [],
  4074. source: "isReturn\x0a\x09^ true",
  4075. messageSends: [],
  4076. referencedClasses: []
  4077. }),
  4078. smalltalk.IRReturn);
  4079. smalltalk.addMethod(
  4080. "_accept_",
  4081. smalltalk.method({
  4082. selector: "accept:",
  4083. category: '*Compiler',
  4084. fn: function (aVisitor){
  4085. var self=this;
  4086. return smalltalk.withContext(function($ctx1) { var $1;
  4087. $1=_st(aVisitor)._visitIRBlockReturn_(self);
  4088. return $1;
  4089. }, self, "accept:", [aVisitor], smalltalk.IRBlockReturn)},
  4090. args: ["aVisitor"],
  4091. source: "accept: aVisitor\x0a\x09^ aVisitor visitIRBlockReturn: self",
  4092. messageSends: ["visitIRBlockReturn:"],
  4093. referencedClasses: []
  4094. }),
  4095. smalltalk.IRBlockReturn);
  4096. smalltalk.addMethod(
  4097. "_isBlockReturn",
  4098. smalltalk.method({
  4099. selector: "isBlockReturn",
  4100. category: '*Compiler',
  4101. fn: function (){
  4102. var self=this;
  4103. return smalltalk.withContext(function($ctx1) { return true;
  4104. }, self, "isBlockReturn", [], smalltalk.IRBlockReturn)},
  4105. args: [],
  4106. source: "isBlockReturn\x0a\x09^ true",
  4107. messageSends: [],
  4108. referencedClasses: []
  4109. }),
  4110. smalltalk.IRBlockReturn);
  4111. smalltalk.addMethod(
  4112. "_accept_",
  4113. smalltalk.method({
  4114. selector: "accept:",
  4115. category: '*Compiler',
  4116. fn: function (aVisitor){
  4117. var self=this;
  4118. return smalltalk.withContext(function($ctx1) { var $1;
  4119. $1=_st(aVisitor)._visitIRInlinedReturn_(self);
  4120. return $1;
  4121. }, self, "accept:", [aVisitor], smalltalk.IRInlinedReturn)},
  4122. args: ["aVisitor"],
  4123. source: "accept: aVisitor\x0a\x09^ aVisitor visitIRInlinedReturn: self",
  4124. messageSends: ["visitIRInlinedReturn:"],
  4125. referencedClasses: []
  4126. }),
  4127. smalltalk.IRInlinedReturn);
  4128. smalltalk.addMethod(
  4129. "_isInlined",
  4130. smalltalk.method({
  4131. selector: "isInlined",
  4132. category: '*Compiler',
  4133. fn: function (){
  4134. var self=this;
  4135. return smalltalk.withContext(function($ctx1) { return true;
  4136. }, self, "isInlined", [], smalltalk.IRInlinedReturn)},
  4137. args: [],
  4138. source: "isInlined\x0a\x09^ true",
  4139. messageSends: [],
  4140. referencedClasses: []
  4141. }),
  4142. smalltalk.IRInlinedReturn);
  4143. smalltalk.addMethod(
  4144. "_accept_",
  4145. smalltalk.method({
  4146. selector: "accept:",
  4147. category: '*Compiler',
  4148. fn: function (aVisitor){
  4149. var self=this;
  4150. return smalltalk.withContext(function($ctx1) { var $1;
  4151. $1=_st(aVisitor)._visitIRInlinedNonLocalReturn_(self);
  4152. return $1;
  4153. }, self, "accept:", [aVisitor], smalltalk.IRInlinedNonLocalReturn)},
  4154. args: ["aVisitor"],
  4155. source: "accept: aVisitor\x0a\x09^ aVisitor visitIRInlinedNonLocalReturn: self",
  4156. messageSends: ["visitIRInlinedNonLocalReturn:"],
  4157. referencedClasses: []
  4158. }),
  4159. smalltalk.IRInlinedNonLocalReturn);
  4160. smalltalk.addMethod(
  4161. "_isInlined",
  4162. smalltalk.method({
  4163. selector: "isInlined",
  4164. category: '*Compiler',
  4165. fn: function (){
  4166. var self=this;
  4167. return smalltalk.withContext(function($ctx1) { return true;
  4168. }, self, "isInlined", [], smalltalk.IRInlinedNonLocalReturn)},
  4169. args: [],
  4170. source: "isInlined\x0a\x09^ true",
  4171. messageSends: [],
  4172. referencedClasses: []
  4173. }),
  4174. smalltalk.IRInlinedNonLocalReturn);
  4175. smalltalk.addMethod(
  4176. "_accept_",
  4177. smalltalk.method({
  4178. selector: "accept:",
  4179. category: '*Compiler',
  4180. fn: function (aVisitor){
  4181. var self=this;
  4182. return smalltalk.withContext(function($ctx1) { var $1;
  4183. $1=_st(aVisitor)._visitIRNonLocalReturn_(self);
  4184. return $1;
  4185. }, self, "accept:", [aVisitor], smalltalk.IRNonLocalReturn)},
  4186. args: ["aVisitor"],
  4187. source: "accept: aVisitor\x0a\x09^ aVisitor visitIRNonLocalReturn: self",
  4188. messageSends: ["visitIRNonLocalReturn:"],
  4189. referencedClasses: []
  4190. }),
  4191. smalltalk.IRNonLocalReturn);
  4192. smalltalk.addMethod(
  4193. "_isLocalReturn",
  4194. smalltalk.method({
  4195. selector: "isLocalReturn",
  4196. category: '*Compiler',
  4197. fn: function (){
  4198. var self=this;
  4199. return smalltalk.withContext(function($ctx1) { return false;
  4200. }, self, "isLocalReturn", [], smalltalk.IRNonLocalReturn)},
  4201. args: [],
  4202. source: "isLocalReturn\x0a\x09^ false",
  4203. messageSends: [],
  4204. referencedClasses: []
  4205. }),
  4206. smalltalk.IRNonLocalReturn);
  4207. smalltalk.addMethod(
  4208. "_accept_",
  4209. smalltalk.method({
  4210. selector: "accept:",
  4211. category: '*Compiler',
  4212. fn: function (aVisitor){
  4213. var self=this;
  4214. return smalltalk.withContext(function($ctx1) { var $1;
  4215. $1=_st(aVisitor)._visitIRTempDeclaration_(self);
  4216. return $1;
  4217. }, self, "accept:", [aVisitor], smalltalk.IRTempDeclaration)},
  4218. args: ["aVisitor"],
  4219. source: "accept: aVisitor\x0a\x09^ aVisitor visitIRTempDeclaration: self",
  4220. messageSends: ["visitIRTempDeclaration:"],
  4221. referencedClasses: []
  4222. }),
  4223. smalltalk.IRTempDeclaration);
  4224. smalltalk.addMethod(
  4225. "_name",
  4226. smalltalk.method({
  4227. selector: "name",
  4228. category: '*Compiler',
  4229. fn: function (){
  4230. var self=this;
  4231. return smalltalk.withContext(function($ctx1) { var $1;
  4232. $1=self["@name"];
  4233. return $1;
  4234. }, self, "name", [], smalltalk.IRTempDeclaration)},
  4235. args: [],
  4236. source: "name\x0a\x09^ name",
  4237. messageSends: [],
  4238. referencedClasses: []
  4239. }),
  4240. smalltalk.IRTempDeclaration);
  4241. smalltalk.addMethod(
  4242. "_name_",
  4243. smalltalk.method({
  4244. selector: "name:",
  4245. category: '*Compiler',
  4246. fn: function (aString){
  4247. var self=this;
  4248. return smalltalk.withContext(function($ctx1) { self["@name"]=aString;
  4249. return self}, self, "name:", [aString], smalltalk.IRTempDeclaration)},
  4250. args: ["aString"],
  4251. source: "name: aString\x0a\x09name := aString",
  4252. messageSends: [],
  4253. referencedClasses: []
  4254. }),
  4255. smalltalk.IRTempDeclaration);
  4256. smalltalk.addMethod(
  4257. "_accept_",
  4258. smalltalk.method({
  4259. selector: "accept:",
  4260. category: '*Compiler',
  4261. fn: function (aVisitor){
  4262. var self=this;
  4263. return smalltalk.withContext(function($ctx1) { var $1;
  4264. $1=_st(aVisitor)._visitIRSend_(self);
  4265. return $1;
  4266. }, self, "accept:", [aVisitor], smalltalk.IRSend)},
  4267. args: ["aVisitor"],
  4268. source: "accept: aVisitor\x0a\x09^ aVisitor visitIRSend: self",
  4269. messageSends: ["visitIRSend:"],
  4270. referencedClasses: []
  4271. }),
  4272. smalltalk.IRSend);
  4273. smalltalk.addMethod(
  4274. "_classSend",
  4275. smalltalk.method({
  4276. selector: "classSend",
  4277. category: '*Compiler',
  4278. fn: function (){
  4279. var self=this;
  4280. return smalltalk.withContext(function($ctx1) { var $1;
  4281. $1=self["@classSend"];
  4282. return $1;
  4283. }, self, "classSend", [], smalltalk.IRSend)},
  4284. args: [],
  4285. source: "classSend\x0a\x09^ classSend",
  4286. messageSends: [],
  4287. referencedClasses: []
  4288. }),
  4289. smalltalk.IRSend);
  4290. smalltalk.addMethod(
  4291. "_classSend_",
  4292. smalltalk.method({
  4293. selector: "classSend:",
  4294. category: '*Compiler',
  4295. fn: function (aClass){
  4296. var self=this;
  4297. return smalltalk.withContext(function($ctx1) { self["@classSend"]=aClass;
  4298. return self}, self, "classSend:", [aClass], smalltalk.IRSend)},
  4299. args: ["aClass"],
  4300. source: "classSend: aClass\x0a\x09classSend := aClass",
  4301. messageSends: [],
  4302. referencedClasses: []
  4303. }),
  4304. smalltalk.IRSend);
  4305. smalltalk.addMethod(
  4306. "_index",
  4307. smalltalk.method({
  4308. selector: "index",
  4309. category: '*Compiler',
  4310. fn: function (){
  4311. var self=this;
  4312. return smalltalk.withContext(function($ctx1) { var $1;
  4313. $1=self["@index"];
  4314. return $1;
  4315. }, self, "index", [], smalltalk.IRSend)},
  4316. args: [],
  4317. source: "index\x0a\x09^ index",
  4318. messageSends: [],
  4319. referencedClasses: []
  4320. }),
  4321. smalltalk.IRSend);
  4322. smalltalk.addMethod(
  4323. "_index_",
  4324. smalltalk.method({
  4325. selector: "index:",
  4326. category: '*Compiler',
  4327. fn: function (anInteger){
  4328. var self=this;
  4329. return smalltalk.withContext(function($ctx1) { self["@index"]=anInteger;
  4330. return self}, self, "index:", [anInteger], smalltalk.IRSend)},
  4331. args: ["anInteger"],
  4332. source: "index: anInteger\x0a\x09index := anInteger",
  4333. messageSends: [],
  4334. referencedClasses: []
  4335. }),
  4336. smalltalk.IRSend);
  4337. smalltalk.addMethod(
  4338. "_isSend",
  4339. smalltalk.method({
  4340. selector: "isSend",
  4341. category: '*Compiler',
  4342. fn: function (){
  4343. var self=this;
  4344. return smalltalk.withContext(function($ctx1) { return true;
  4345. }, self, "isSend", [], smalltalk.IRSend)},
  4346. args: [],
  4347. source: "isSend\x0a\x09^ true",
  4348. messageSends: [],
  4349. referencedClasses: []
  4350. }),
  4351. smalltalk.IRSend);
  4352. smalltalk.addMethod(
  4353. "_javascriptSelector",
  4354. smalltalk.method({
  4355. selector: "javascriptSelector",
  4356. category: '*Compiler',
  4357. fn: function (){
  4358. var self=this;
  4359. return smalltalk.withContext(function($ctx1) { var $2,$1;
  4360. $2=_st(self)._classSend();
  4361. if(($receiver = $2) == nil || $receiver == undefined){
  4362. $1=_st(_st(self)._selector())._asSelector();
  4363. } else {
  4364. $1=_st(_st(self)._selector())._asSuperSelector();
  4365. };
  4366. return $1;
  4367. }, self, "javascriptSelector", [], smalltalk.IRSend)},
  4368. args: [],
  4369. source: "javascriptSelector\x0a\x09^ self classSend \x0a \x09ifNil: [ self selector asSelector ]\x0a \x09ifNotNil: [ self selector asSuperSelector ]",
  4370. messageSends: ["ifNil:ifNotNil:", "asSelector", "selector", "asSuperSelector", "classSend"],
  4371. referencedClasses: []
  4372. }),
  4373. smalltalk.IRSend);
  4374. smalltalk.addMethod(
  4375. "_selector",
  4376. smalltalk.method({
  4377. selector: "selector",
  4378. category: '*Compiler',
  4379. fn: function (){
  4380. var self=this;
  4381. return smalltalk.withContext(function($ctx1) { var $1;
  4382. $1=self["@selector"];
  4383. return $1;
  4384. }, self, "selector", [], smalltalk.IRSend)},
  4385. args: [],
  4386. source: "selector\x0a\x09^ selector",
  4387. messageSends: [],
  4388. referencedClasses: []
  4389. }),
  4390. smalltalk.IRSend);
  4391. smalltalk.addMethod(
  4392. "_selector_",
  4393. smalltalk.method({
  4394. selector: "selector:",
  4395. category: '*Compiler',
  4396. fn: function (aString){
  4397. var self=this;
  4398. return smalltalk.withContext(function($ctx1) { self["@selector"]=aString;
  4399. return self}, self, "selector:", [aString], smalltalk.IRSend)},
  4400. args: ["aString"],
  4401. source: "selector: aString\x0a\x09selector := aString",
  4402. messageSends: [],
  4403. referencedClasses: []
  4404. }),
  4405. smalltalk.IRSend);
  4406. smalltalk.addMethod(
  4407. "_accept_",
  4408. smalltalk.method({
  4409. selector: "accept:",
  4410. category: '*Compiler',
  4411. fn: function (aVisitor){
  4412. var self=this;
  4413. return smalltalk.withContext(function($ctx1) { _st(aVisitor)._visitInlinedSend_(self);
  4414. return self}, self, "accept:", [aVisitor], smalltalk.IRInlinedSend)},
  4415. args: ["aVisitor"],
  4416. source: "accept: aVisitor\x0a\x09aVisitor visitInlinedSend: self",
  4417. messageSends: ["visitInlinedSend:"],
  4418. referencedClasses: []
  4419. }),
  4420. smalltalk.IRInlinedSend);
  4421. smalltalk.addMethod(
  4422. "_isInlined",
  4423. smalltalk.method({
  4424. selector: "isInlined",
  4425. category: '*Compiler',
  4426. fn: function (){
  4427. var self=this;
  4428. return smalltalk.withContext(function($ctx1) { return true;
  4429. }, self, "isInlined", [], smalltalk.IRInlinedSend)},
  4430. args: [],
  4431. source: "isInlined\x0a\x09^ true",
  4432. messageSends: [],
  4433. referencedClasses: []
  4434. }),
  4435. smalltalk.IRInlinedSend);
  4436. smalltalk.addMethod(
  4437. "_accept_",
  4438. smalltalk.method({
  4439. selector: "accept:",
  4440. category: '*Compiler',
  4441. fn: function (aVisitor){
  4442. var self=this;
  4443. return smalltalk.withContext(function($ctx1) { _st(aVisitor)._visitIRInlinedIfFalse_(self);
  4444. return self}, self, "accept:", [aVisitor], smalltalk.IRInlinedIfFalse)},
  4445. args: ["aVisitor"],
  4446. source: "accept: aVisitor\x0a\x09aVisitor visitIRInlinedIfFalse: self",
  4447. messageSends: ["visitIRInlinedIfFalse:"],
  4448. referencedClasses: []
  4449. }),
  4450. smalltalk.IRInlinedIfFalse);
  4451. smalltalk.addMethod(
  4452. "_accept_",
  4453. smalltalk.method({
  4454. selector: "accept:",
  4455. category: '*Compiler',
  4456. fn: function (aVisitor){
  4457. var self=this;
  4458. return smalltalk.withContext(function($ctx1) { _st(aVisitor)._visitIRInlinedIfNilIfNotNil_(self);
  4459. return self}, self, "accept:", [aVisitor], smalltalk.IRInlinedIfNilIfNotNil)},
  4460. args: ["aVisitor"],
  4461. source: "accept: aVisitor\x0a\x09aVisitor visitIRInlinedIfNilIfNotNil: self",
  4462. messageSends: ["visitIRInlinedIfNilIfNotNil:"],
  4463. referencedClasses: []
  4464. }),
  4465. smalltalk.IRInlinedIfNilIfNotNil);
  4466. smalltalk.addMethod(
  4467. "_accept_",
  4468. smalltalk.method({
  4469. selector: "accept:",
  4470. category: '*Compiler',
  4471. fn: function (aVisitor){
  4472. var self=this;
  4473. return smalltalk.withContext(function($ctx1) { _st(aVisitor)._visitIRInlinedIfTrue_(self);
  4474. return self}, self, "accept:", [aVisitor], smalltalk.IRInlinedIfTrue)},
  4475. args: ["aVisitor"],
  4476. source: "accept: aVisitor\x0a\x09aVisitor visitIRInlinedIfTrue: self",
  4477. messageSends: ["visitIRInlinedIfTrue:"],
  4478. referencedClasses: []
  4479. }),
  4480. smalltalk.IRInlinedIfTrue);
  4481. smalltalk.addMethod(
  4482. "_accept_",
  4483. smalltalk.method({
  4484. selector: "accept:",
  4485. category: '*Compiler',
  4486. fn: function (aVisitor){
  4487. var self=this;
  4488. return smalltalk.withContext(function($ctx1) { _st(aVisitor)._visitIRInlinedIfTrueIfFalse_(self);
  4489. return self}, self, "accept:", [aVisitor], smalltalk.IRInlinedIfTrueIfFalse)},
  4490. args: ["aVisitor"],
  4491. source: "accept: aVisitor\x0a\x09aVisitor visitIRInlinedIfTrueIfFalse: self",
  4492. messageSends: ["visitIRInlinedIfTrueIfFalse:"],
  4493. referencedClasses: []
  4494. }),
  4495. smalltalk.IRInlinedIfTrueIfFalse);
  4496. smalltalk.addMethod(
  4497. "_accept_",
  4498. smalltalk.method({
  4499. selector: "accept:",
  4500. category: '*Compiler',
  4501. fn: function (aVisitor){
  4502. var self=this;
  4503. return smalltalk.withContext(function($ctx1) { var $1;
  4504. $1=_st(aVisitor)._visitIRSequence_(self);
  4505. return $1;
  4506. }, self, "accept:", [aVisitor], smalltalk.IRSequence)},
  4507. args: ["aVisitor"],
  4508. source: "accept: aVisitor\x0a\x09^ aVisitor visitIRSequence: self",
  4509. messageSends: ["visitIRSequence:"],
  4510. referencedClasses: []
  4511. }),
  4512. smalltalk.IRSequence);
  4513. smalltalk.addMethod(
  4514. "_isSequence",
  4515. smalltalk.method({
  4516. selector: "isSequence",
  4517. category: '*Compiler',
  4518. fn: function (){
  4519. var self=this;
  4520. return smalltalk.withContext(function($ctx1) { return true;
  4521. }, self, "isSequence", [], smalltalk.IRSequence)},
  4522. args: [],
  4523. source: "isSequence\x0a\x09^ true",
  4524. messageSends: [],
  4525. referencedClasses: []
  4526. }),
  4527. smalltalk.IRSequence);
  4528. smalltalk.addMethod(
  4529. "_accept_",
  4530. smalltalk.method({
  4531. selector: "accept:",
  4532. category: '*Compiler',
  4533. fn: function (aVisitor){
  4534. var self=this;
  4535. return smalltalk.withContext(function($ctx1) { var $1;
  4536. $1=_st(aVisitor)._visitIRBlockSequence_(self);
  4537. return $1;
  4538. }, self, "accept:", [aVisitor], smalltalk.IRBlockSequence)},
  4539. args: ["aVisitor"],
  4540. source: "accept: aVisitor\x0a\x09^ aVisitor visitIRBlockSequence: self",
  4541. messageSends: ["visitIRBlockSequence:"],
  4542. referencedClasses: []
  4543. }),
  4544. smalltalk.IRBlockSequence);
  4545. smalltalk.addMethod(
  4546. "_accept_",
  4547. smalltalk.method({
  4548. selector: "accept:",
  4549. category: '*Compiler',
  4550. fn: function (aVisitor){
  4551. var self=this;
  4552. return smalltalk.withContext(function($ctx1) { _st(aVisitor)._visitIRInlinedSequence_(self);
  4553. return self}, self, "accept:", [aVisitor], smalltalk.IRInlinedSequence)},
  4554. args: ["aVisitor"],
  4555. source: "accept: aVisitor\x0a\x09aVisitor visitIRInlinedSequence: self",
  4556. messageSends: ["visitIRInlinedSequence:"],
  4557. referencedClasses: []
  4558. }),
  4559. smalltalk.IRInlinedSequence);
  4560. smalltalk.addMethod(
  4561. "_isInlined",
  4562. smalltalk.method({
  4563. selector: "isInlined",
  4564. category: '*Compiler',
  4565. fn: function (){
  4566. var self=this;
  4567. return smalltalk.withContext(function($ctx1) { return true;
  4568. }, self, "isInlined", [], smalltalk.IRInlinedSequence)},
  4569. args: [],
  4570. source: "isInlined\x0a\x09^ true",
  4571. messageSends: [],
  4572. referencedClasses: []
  4573. }),
  4574. smalltalk.IRInlinedSequence);
  4575. smalltalk.addMethod(
  4576. "_accept_",
  4577. smalltalk.method({
  4578. selector: "accept:",
  4579. category: '*Compiler',
  4580. fn: function (aVisitor){
  4581. var self=this;
  4582. return smalltalk.withContext(function($ctx1) { var $1;
  4583. $1=_st(aVisitor)._visitIRValue_(self);
  4584. return $1;
  4585. }, self, "accept:", [aVisitor], smalltalk.IRValue)},
  4586. args: ["aVisitor"],
  4587. source: "accept: aVisitor\x0a\x09^ aVisitor visitIRValue: self",
  4588. messageSends: ["visitIRValue:"],
  4589. referencedClasses: []
  4590. }),
  4591. smalltalk.IRValue);
  4592. smalltalk.addMethod(
  4593. "_value",
  4594. smalltalk.method({
  4595. selector: "value",
  4596. category: '*Compiler',
  4597. fn: function (){
  4598. var self=this;
  4599. return smalltalk.withContext(function($ctx1) { var $1;
  4600. $1=self["@value"];
  4601. return $1;
  4602. }, self, "value", [], smalltalk.IRValue)},
  4603. args: [],
  4604. source: "value\x0a\x09^value",
  4605. messageSends: [],
  4606. referencedClasses: []
  4607. }),
  4608. smalltalk.IRValue);
  4609. smalltalk.addMethod(
  4610. "_value_",
  4611. smalltalk.method({
  4612. selector: "value:",
  4613. category: '*Compiler',
  4614. fn: function (aString){
  4615. var self=this;
  4616. return smalltalk.withContext(function($ctx1) { self["@value"]=aString;
  4617. return self}, self, "value:", [aString], smalltalk.IRValue)},
  4618. args: ["aString"],
  4619. source: "value: aString\x0a\x09value := aString",
  4620. messageSends: [],
  4621. referencedClasses: []
  4622. }),
  4623. smalltalk.IRValue);
  4624. smalltalk.addMethod(
  4625. "_accept_",
  4626. smalltalk.method({
  4627. selector: "accept:",
  4628. category: '*Compiler',
  4629. fn: function (aVisitor){
  4630. var self=this;
  4631. return smalltalk.withContext(function($ctx1) { var $1;
  4632. $1=_st(aVisitor)._visitIRVariable_(self);
  4633. return $1;
  4634. }, self, "accept:", [aVisitor], smalltalk.IRVariable)},
  4635. args: ["aVisitor"],
  4636. source: "accept: aVisitor\x0a\x09^ aVisitor visitIRVariable: self",
  4637. messageSends: ["visitIRVariable:"],
  4638. referencedClasses: []
  4639. }),
  4640. smalltalk.IRVariable);
  4641. smalltalk.addMethod(
  4642. "_isVariable",
  4643. smalltalk.method({
  4644. selector: "isVariable",
  4645. category: '*Compiler',
  4646. fn: function (){
  4647. var self=this;
  4648. return smalltalk.withContext(function($ctx1) { return true;
  4649. }, self, "isVariable", [], smalltalk.IRVariable)},
  4650. args: [],
  4651. source: "isVariable\x0a\x09^ true",
  4652. messageSends: [],
  4653. referencedClasses: []
  4654. }),
  4655. smalltalk.IRVariable);
  4656. smalltalk.addMethod(
  4657. "_variable",
  4658. smalltalk.method({
  4659. selector: "variable",
  4660. category: '*Compiler',
  4661. fn: function (){
  4662. var self=this;
  4663. return smalltalk.withContext(function($ctx1) { var $1;
  4664. $1=self["@variable"];
  4665. return $1;
  4666. }, self, "variable", [], smalltalk.IRVariable)},
  4667. args: [],
  4668. source: "variable\x0a\x09^ variable",
  4669. messageSends: [],
  4670. referencedClasses: []
  4671. }),
  4672. smalltalk.IRVariable);
  4673. smalltalk.addMethod(
  4674. "_variable_",
  4675. smalltalk.method({
  4676. selector: "variable:",
  4677. category: '*Compiler',
  4678. fn: function (aScopeVariable){
  4679. var self=this;
  4680. return smalltalk.withContext(function($ctx1) { self["@variable"]=aScopeVariable;
  4681. return self}, self, "variable:", [aScopeVariable], smalltalk.IRVariable)},
  4682. args: ["aScopeVariable"],
  4683. source: "variable: aScopeVariable\x0a\x09variable := aScopeVariable",
  4684. messageSends: [],
  4685. referencedClasses: []
  4686. }),
  4687. smalltalk.IRVariable);
  4688. smalltalk.addMethod(
  4689. "_accept_",
  4690. smalltalk.method({
  4691. selector: "accept:",
  4692. category: '*Compiler',
  4693. fn: function (aVisitor){
  4694. var self=this;
  4695. return smalltalk.withContext(function($ctx1) { var $1;
  4696. $1=_st(aVisitor)._visitIRVerbatim_(self);
  4697. return $1;
  4698. }, self, "accept:", [aVisitor], smalltalk.IRVerbatim)},
  4699. args: ["aVisitor"],
  4700. source: "accept: aVisitor\x0a\x09^ aVisitor visitIRVerbatim: self",
  4701. messageSends: ["visitIRVerbatim:"],
  4702. referencedClasses: []
  4703. }),
  4704. smalltalk.IRVerbatim);
  4705. smalltalk.addMethod(
  4706. "_source",
  4707. smalltalk.method({
  4708. selector: "source",
  4709. category: '*Compiler',
  4710. fn: function (){
  4711. var self=this;
  4712. return smalltalk.withContext(function($ctx1) { var $1;
  4713. $1=self["@source"];
  4714. return $1;
  4715. }, self, "source", [], smalltalk.IRVerbatim)},
  4716. args: [],
  4717. source: "source\x0a\x09^ source",
  4718. messageSends: [],
  4719. referencedClasses: []
  4720. }),
  4721. smalltalk.IRVerbatim);
  4722. smalltalk.addMethod(
  4723. "_source_",
  4724. smalltalk.method({
  4725. selector: "source:",
  4726. category: '*Compiler',
  4727. fn: function (aString){
  4728. var self=this;
  4729. return smalltalk.withContext(function($ctx1) { self["@source"]=aString;
  4730. return self}, self, "source:", [aString], smalltalk.IRVerbatim)},
  4731. args: ["aString"],
  4732. source: "source: aString\x0a\x09source := aString",
  4733. messageSends: [],
  4734. referencedClasses: []
  4735. }),
  4736. smalltalk.IRVerbatim);
  4737. smalltalk.addMethod(
  4738. "_ifFalse_",
  4739. smalltalk.method({
  4740. selector: "ifFalse:",
  4741. category: '*Compiler',
  4742. fn: function (anIRInstruction){
  4743. var self=this;
  4744. return smalltalk.withContext(function($ctx1) { var $1;
  4745. $1=_st(self)._inlinedSend_with_(_st((smalltalk.IRInlinedIfFalse || IRInlinedIfFalse))._new(),anIRInstruction);
  4746. return $1;
  4747. }, self, "ifFalse:", [anIRInstruction], smalltalk.IRSendInliner)},
  4748. args: ["anIRInstruction"],
  4749. source: "ifFalse: anIRInstruction\x0a\x09^ self inlinedSend: IRInlinedIfFalse new with: anIRInstruction",
  4750. messageSends: ["inlinedSend:with:", "new"],
  4751. referencedClasses: ["IRInlinedIfFalse"]
  4752. }),
  4753. smalltalk.IRSendInliner);
  4754. smalltalk.addMethod(
  4755. "_ifFalse_ifTrue_",
  4756. smalltalk.method({
  4757. selector: "ifFalse:ifTrue:",
  4758. category: '*Compiler',
  4759. fn: function (anIRInstruction,anotherIRInstruction){
  4760. var self=this;
  4761. return smalltalk.withContext(function($ctx1) { var $1;
  4762. $1=_st(self)._perform_withArguments_(smalltalk.symbolFor("ifTrue:ifFalse:"),[anotherIRInstruction,anIRInstruction]);
  4763. return $1;
  4764. }, self, "ifFalse:ifTrue:", [anIRInstruction,anotherIRInstruction], smalltalk.IRSendInliner)},
  4765. args: ["anIRInstruction", "anotherIRInstruction"],
  4766. source: "ifFalse: anIRInstruction ifTrue: anotherIRInstruction\x0a\x09^ self perform: #ifTrue:ifFalse: withArguments: { anotherIRInstruction. anIRInstruction }",
  4767. messageSends: ["perform:withArguments:"],
  4768. referencedClasses: []
  4769. }),
  4770. smalltalk.IRSendInliner);
  4771. smalltalk.addMethod(
  4772. "_ifNil_",
  4773. smalltalk.method({
  4774. selector: "ifNil:",
  4775. category: '*Compiler',
  4776. fn: function (anIRInstruction){
  4777. var self=this;
  4778. return smalltalk.withContext(function($ctx1) { var $2,$3,$4,$5,$1;
  4779. $2=_st((smalltalk.IRClosure || IRClosure))._new();
  4780. _st($2)._scope_(_st(_st(anIRInstruction)._scope())._copy());
  4781. $3=_st((smalltalk.IRBlockSequence || IRBlockSequence))._new();
  4782. _st($3)._add_(_st(_st(_st(self)._send())._instructions())._first());
  4783. $4=_st($3)._yourself();
  4784. _st($2)._add_($4);
  4785. $5=_st($2)._yourself();
  4786. $1=_st(self)._inlinedSend_with_with_(_st((smalltalk.IRInlinedIfNilIfNotNil || IRInlinedIfNilIfNotNil))._new(),anIRInstruction,$5);
  4787. return $1;
  4788. }, self, "ifNil:", [anIRInstruction], smalltalk.IRSendInliner)},
  4789. args: ["anIRInstruction"],
  4790. source: "ifNil: anIRInstruction\x0a\x09^ self \x0a\x09\x09inlinedSend: IRInlinedIfNilIfNotNil new \x0a\x09\x09with: anIRInstruction\x0a\x09\x09with: (IRClosure new\x0a\x09\x09\x09scope: anIRInstruction scope copy;\x0a\x09\x09\x09add: (IRBlockSequence new\x0a\x09\x09\x09\x09add: self send instructions first;\x0a\x09\x09\x09\x09yourself);\x0a\x09\x09\x09yourself)",
  4791. messageSends: ["inlinedSend:with:with:", "new", "scope:", "copy", "scope", "add:", "first", "instructions", "send", "yourself"],
  4792. referencedClasses: ["IRInlinedIfNilIfNotNil", "IRClosure", "IRBlockSequence"]
  4793. }),
  4794. smalltalk.IRSendInliner);
  4795. smalltalk.addMethod(
  4796. "_ifNil_ifNotNil_",
  4797. smalltalk.method({
  4798. selector: "ifNil:ifNotNil:",
  4799. category: '*Compiler',
  4800. fn: function (anIRInstruction,anotherIRInstruction){
  4801. var self=this;
  4802. return smalltalk.withContext(function($ctx1) { var $1;
  4803. $1=_st(self)._inlinedSend_with_with_(_st((smalltalk.IRInlinedIfNilIfNotNil || IRInlinedIfNilIfNotNil))._new(),anIRInstruction,anotherIRInstruction);
  4804. return $1;
  4805. }, self, "ifNil:ifNotNil:", [anIRInstruction,anotherIRInstruction], smalltalk.IRSendInliner)},
  4806. args: ["anIRInstruction", "anotherIRInstruction"],
  4807. source: "ifNil: anIRInstruction ifNotNil: anotherIRInstruction\x0a\x09^ self inlinedSend: IRInlinedIfNilIfNotNil new with: anIRInstruction with: anotherIRInstruction",
  4808. messageSends: ["inlinedSend:with:with:", "new"],
  4809. referencedClasses: ["IRInlinedIfNilIfNotNil"]
  4810. }),
  4811. smalltalk.IRSendInliner);
  4812. smalltalk.addMethod(
  4813. "_ifNotNil_",
  4814. smalltalk.method({
  4815. selector: "ifNotNil:",
  4816. category: '*Compiler',
  4817. fn: function (anIRInstruction){
  4818. var self=this;
  4819. return smalltalk.withContext(function($ctx1) { var $2,$3,$4,$5,$1;
  4820. $2=_st((smalltalk.IRClosure || IRClosure))._new();
  4821. _st($2)._scope_(_st(_st(anIRInstruction)._scope())._copy());
  4822. $3=_st((smalltalk.IRBlockSequence || IRBlockSequence))._new();
  4823. _st($3)._add_(_st(_st(_st(self)._send())._instructions())._first());
  4824. $4=_st($3)._yourself();
  4825. _st($2)._add_($4);
  4826. $5=_st($2)._yourself();
  4827. $1=_st(self)._inlinedSend_with_with_(_st((smalltalk.IRInlinedIfNilIfNotNil || IRInlinedIfNilIfNotNil))._new(),$5,anIRInstruction);
  4828. return $1;
  4829. }, self, "ifNotNil:", [anIRInstruction], smalltalk.IRSendInliner)},
  4830. args: ["anIRInstruction"],
  4831. source: "ifNotNil: anIRInstruction\x0a\x09^ self \x0a\x09\x09inlinedSend: IRInlinedIfNilIfNotNil new\x0a\x09\x09with: (IRClosure new\x0a\x09\x09\x09scope: anIRInstruction scope copy;\x0a\x09\x09\x09add: (IRBlockSequence new\x0a\x09\x09\x09\x09add: self send instructions first;\x0a\x09\x09\x09\x09yourself);\x0a\x09\x09\x09yourself)\x0a\x09\x09with: anIRInstruction",
  4832. messageSends: ["inlinedSend:with:with:", "new", "scope:", "copy", "scope", "add:", "first", "instructions", "send", "yourself"],
  4833. referencedClasses: ["IRInlinedIfNilIfNotNil", "IRClosure", "IRBlockSequence"]
  4834. }),
  4835. smalltalk.IRSendInliner);
  4836. smalltalk.addMethod(
  4837. "_ifNotNil_ifNil_",
  4838. smalltalk.method({
  4839. selector: "ifNotNil:ifNil:",
  4840. category: '*Compiler',
  4841. fn: function (anIRInstruction,anotherIRInstruction){
  4842. var self=this;
  4843. return smalltalk.withContext(function($ctx1) { var $1;
  4844. $1=_st(self)._inlinedSend_with_with_(_st((smalltalk.IRInlinedIfNilIfNotNil || IRInlinedIfNilIfNotNil))._new(),anotherIRInstruction,anIRInstruction);
  4845. return $1;
  4846. }, self, "ifNotNil:ifNil:", [anIRInstruction,anotherIRInstruction], smalltalk.IRSendInliner)},
  4847. args: ["anIRInstruction", "anotherIRInstruction"],
  4848. source: "ifNotNil: anIRInstruction ifNil: anotherIRInstruction\x0a\x09^ self inlinedSend: IRInlinedIfNilIfNotNil new with: anotherIRInstruction with: anIRInstruction",
  4849. messageSends: ["inlinedSend:with:with:", "new"],
  4850. referencedClasses: ["IRInlinedIfNilIfNotNil"]
  4851. }),
  4852. smalltalk.IRSendInliner);
  4853. smalltalk.addMethod(
  4854. "_ifTrue_",
  4855. smalltalk.method({
  4856. selector: "ifTrue:",
  4857. category: '*Compiler',
  4858. fn: function (anIRInstruction){
  4859. var self=this;
  4860. return smalltalk.withContext(function($ctx1) { var $1;
  4861. $1=_st(self)._inlinedSend_with_(_st((smalltalk.IRInlinedIfTrue || IRInlinedIfTrue))._new(),anIRInstruction);
  4862. return $1;
  4863. }, self, "ifTrue:", [anIRInstruction], smalltalk.IRSendInliner)},
  4864. args: ["anIRInstruction"],
  4865. source: "ifTrue: anIRInstruction\x0a\x09^ self inlinedSend: IRInlinedIfTrue new with: anIRInstruction",
  4866. messageSends: ["inlinedSend:with:", "new"],
  4867. referencedClasses: ["IRInlinedIfTrue"]
  4868. }),
  4869. smalltalk.IRSendInliner);
  4870. smalltalk.addMethod(
  4871. "_ifTrue_ifFalse_",
  4872. smalltalk.method({
  4873. selector: "ifTrue:ifFalse:",
  4874. category: '*Compiler',
  4875. fn: function (anIRInstruction,anotherIRInstruction){
  4876. var self=this;
  4877. return smalltalk.withContext(function($ctx1) { var $1;
  4878. $1=_st(self)._inlinedSend_with_with_(_st((smalltalk.IRInlinedIfTrueIfFalse || IRInlinedIfTrueIfFalse))._new(),anIRInstruction,anotherIRInstruction);
  4879. return $1;
  4880. }, self, "ifTrue:ifFalse:", [anIRInstruction,anotherIRInstruction], smalltalk.IRSendInliner)},
  4881. args: ["anIRInstruction", "anotherIRInstruction"],
  4882. source: "ifTrue: anIRInstruction ifFalse: anotherIRInstruction\x0a\x09^ self inlinedSend: IRInlinedIfTrueIfFalse new with: anIRInstruction with: anotherIRInstruction",
  4883. messageSends: ["inlinedSend:with:with:", "new"],
  4884. referencedClasses: ["IRInlinedIfTrueIfFalse"]
  4885. }),
  4886. smalltalk.IRSendInliner);
  4887. smalltalk.addMethod(
  4888. "_inlineClosure_",
  4889. smalltalk.method({
  4890. selector: "inlineClosure:",
  4891. category: '*Compiler',
  4892. fn: function (anIRClosure){
  4893. var self=this;
  4894. return smalltalk.withContext(function($ctx1) { var $1,$3,$2,$4,$6,$5,$7;
  4895. $ctx1.locals.inlinedClosure=nil;
  4896. $ctx1.locals.sequence=nil;
  4897. $ctx1.locals.statements=nil;
  4898. $ctx1.locals.inlinedClosure=_st(self)._inlinedClosure();
  4899. _st($ctx1.locals.inlinedClosure)._scope_(_st(anIRClosure)._scope());
  4900. $1=_st(anIRClosure)._instructions();
  4901. $2=(function(each){
  4902. return smalltalk.withContext(function($ctx2) { $3=_st(each)._isSequence();
  4903. if(! smalltalk.assert($3)){
  4904. return _st($ctx1.locals.inlinedClosure)._add_(each);
  4905. };
  4906. })});
  4907. _st($1)._do_($2);
  4908. $ctx1.locals.sequence=_st(self)._inlinedSequence();
  4909. _st($ctx1.locals.inlinedClosure)._add_($ctx1.locals.sequence);
  4910. $ctx1.locals.statements=_st(_st(_st(anIRClosure)._instructions())._last())._instructions();
  4911. $4=$ctx1.locals.statements;
  4912. $5=(function(){
  4913. return smalltalk.withContext(function($ctx2) { _st(_st($ctx1.locals.statements)._allButLast())._do_((function(each){
  4914. return smalltalk.withContext(function($ctx3) { return _st($ctx1.locals.sequence)._add_(each);
  4915. })}));
  4916. $6=_st(_st(_st($ctx1.locals.statements)._last())._isReturn())._and_((function(){
  4917. return smalltalk.withContext(function($ctx3) { return _st(_st($ctx1.locals.statements)._last())._isBlockReturn();
  4918. })}));
  4919. if(smalltalk.assert($6)){
  4920. return _st($ctx1.locals.sequence)._add_(_st(_st(_st($ctx1.locals.statements)._last())._instructions())._first());
  4921. } else {
  4922. return _st($ctx1.locals.sequence)._add_(_st($ctx1.locals.statements)._last());
  4923. };
  4924. })});
  4925. _st($4)._ifNotEmpty_($5);
  4926. $7=$ctx1.locals.inlinedClosure;
  4927. return $7;
  4928. }, self, "inlineClosure:", [anIRClosure], smalltalk.IRSendInliner)},
  4929. args: ["anIRClosure"],
  4930. source: "inlineClosure: anIRClosure\x0a\x09| inlinedClosure sequence statements |\x0a\x0a\x09inlinedClosure := self inlinedClosure.\x0a\x09inlinedClosure scope: anIRClosure scope.\x0a\x0a\x09\x22Add the possible temp declarations\x22\x0a\x09anIRClosure instructions do: [ :each | \x0a\x09\x09each isSequence ifFalse: [\x0a\x09\x09\x09inlinedClosure add: each ]].\x0a\x0a\x09\x22Add a block sequence\x22\x0a\x09sequence := self inlinedSequence.\x0a\x09inlinedClosure add: sequence.\x0a\x0a\x09\x22Get all the statements\x22\x0a\x09statements := anIRClosure instructions last instructions.\x0a\x09\x0a\x09statements ifNotEmpty: [\x0a\x09\x09statements allButLast do: [ :each | sequence add: each ].\x0a\x0a\x09\x09\x22Inlined closures don't have implicit local returns\x22\x0a\x09\x09(statements last isReturn and: [ statements last isBlockReturn ])\x0a\x09\x09\x09ifTrue: [ sequence add: statements last instructions first ]\x0a\x09\x09\x09ifFalse: [ sequence add: statements last ] ].\x0a\x0a\x09^ inlinedClosure",
  4931. messageSends: ["inlinedClosure", "scope:", "scope", "do:", "ifFalse:", "add:", "isSequence", "instructions", "inlinedSequence", "last", "ifNotEmpty:", "allButLast", "ifTrue:ifFalse:", "first", "and:", "isBlockReturn", "isReturn"],
  4932. referencedClasses: []
  4933. }),
  4934. smalltalk.IRSendInliner);
  4935. smalltalk.addMethod(
  4936. "_inlineSend_",
  4937. smalltalk.method({
  4938. selector: "inlineSend:",
  4939. category: '*Compiler',
  4940. fn: function (anIRSend){
  4941. var self=this;
  4942. return smalltalk.withContext(function($ctx1) { var $1;
  4943. _st(self)._send_(anIRSend);
  4944. $1=_st(self)._perform_withArguments_(_st(_st(self)._send())._selector(),_st(_st(_st(self)._send())._instructions())._allButFirst());
  4945. return $1;
  4946. }, self, "inlineSend:", [anIRSend], smalltalk.IRSendInliner)},
  4947. args: ["anIRSend"],
  4948. source: "inlineSend: anIRSend\x0a\x09self send: anIRSend.\x0a\x09^ self \x0a\x09\x09perform: self send selector \x0a\x09\x09withArguments: self send instructions allButFirst",
  4949. messageSends: ["send:", "perform:withArguments:", "selector", "send", "allButFirst", "instructions"],
  4950. referencedClasses: []
  4951. }),
  4952. smalltalk.IRSendInliner);
  4953. smalltalk.addMethod(
  4954. "_inlinedClosure",
  4955. smalltalk.method({
  4956. selector: "inlinedClosure",
  4957. category: '*Compiler',
  4958. fn: function (){
  4959. var self=this;
  4960. return smalltalk.withContext(function($ctx1) { var $1;
  4961. $1=_st((smalltalk.IRInlinedClosure || IRInlinedClosure))._new();
  4962. return $1;
  4963. }, self, "inlinedClosure", [], smalltalk.IRSendInliner)},
  4964. args: [],
  4965. source: "inlinedClosure\x0a\x09^ IRInlinedClosure new",
  4966. messageSends: ["new"],
  4967. referencedClasses: ["IRInlinedClosure"]
  4968. }),
  4969. smalltalk.IRSendInliner);
  4970. smalltalk.addMethod(
  4971. "_inlinedSend_with_",
  4972. smalltalk.method({
  4973. selector: "inlinedSend:with:",
  4974. category: '*Compiler',
  4975. fn: function (inlinedSend,anIRInstruction){
  4976. var self=this;
  4977. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5;
  4978. $ctx1.locals.inlinedClosure=nil;
  4979. $1=_st(anIRInstruction)._isClosure();
  4980. if(! smalltalk.assert($1)){
  4981. _st(self)._inliningError_("Message argument should be a block");
  4982. };
  4983. $2=_st(_st(_st(anIRInstruction)._arguments())._size()).__eq((0));
  4984. if(! smalltalk.assert($2)){
  4985. _st(self)._inliningError_("Inlined block should have zero argument");
  4986. };
  4987. $ctx1.locals.inlinedClosure=_st(_st(self)._translator())._visit_(_st(self)._inlineClosure_(anIRInstruction));
  4988. $3=inlinedSend;
  4989. _st($3)._add_(_st(_st(_st(self)._send())._instructions())._first());
  4990. $4=_st($3)._add_($ctx1.locals.inlinedClosure);
  4991. _st(_st(self)._send())._replaceWith_(inlinedSend);
  4992. $5=inlinedSend;
  4993. return $5;
  4994. }, self, "inlinedSend:with:", [inlinedSend,anIRInstruction], smalltalk.IRSendInliner)},
  4995. args: ["inlinedSend", "anIRInstruction"],
  4996. source: "inlinedSend: inlinedSend with: anIRInstruction\x0a\x09| inlinedClosure |\x0a\x0a\x09anIRInstruction isClosure ifFalse: [ self inliningError: 'Message argument should be a block' ].\x0a\x09anIRInstruction arguments size = 0 ifFalse: [ self inliningError: 'Inlined block should have zero argument' ].\x0a\x0a\x09inlinedClosure := self translator visit: (self inlineClosure: anIRInstruction).\x0a\x0a\x09inlinedSend\x0a\x09\x09add: self send instructions first;\x0a\x09\x09add: inlinedClosure.\x0a\x0a\x09self send replaceWith: inlinedSend.\x0a\x0a\x09^ inlinedSend",
  4997. messageSends: ["ifFalse:", "inliningError:", "isClosure", "=", "size", "arguments", "visit:", "inlineClosure:", "translator", "add:", "first", "instructions", "send", "replaceWith:"],
  4998. referencedClasses: []
  4999. }),
  5000. smalltalk.IRSendInliner);
  5001. smalltalk.addMethod(
  5002. "_inlinedSend_with_with_",
  5003. smalltalk.method({
  5004. selector: "inlinedSend:with:with:",
  5005. category: '*Compiler',
  5006. fn: function (inlinedSend,anIRInstruction,anotherIRInstruction){
  5007. var self=this;
  5008. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5,$6,$7;
  5009. $ctx1.locals.inlinedClosure1=nil;
  5010. $ctx1.locals.inlinedClosure2=nil;
  5011. $1=_st(anIRInstruction)._isClosure();
  5012. if(! smalltalk.assert($1)){
  5013. _st(self)._inliningError_("Message argument should be a block");
  5014. };
  5015. $2=_st(_st(_st(anIRInstruction)._arguments())._size()).__eq((0));
  5016. if(! smalltalk.assert($2)){
  5017. _st(self)._inliningError_("Inlined block should have zero argument");
  5018. };
  5019. $3=_st(anotherIRInstruction)._isClosure();
  5020. if(! smalltalk.assert($3)){
  5021. _st(self)._inliningError_("Message argument should be a block");
  5022. };
  5023. $4=_st(_st(_st(anotherIRInstruction)._arguments())._size()).__eq((0));
  5024. if(! smalltalk.assert($4)){
  5025. _st(self)._inliningError_("Inlined block should have zero argument");
  5026. };
  5027. $ctx1.locals.inlinedClosure1=_st(_st(self)._translator())._visit_(_st(self)._inlineClosure_(anIRInstruction));
  5028. $ctx1.locals.inlinedClosure2=_st(_st(self)._translator())._visit_(_st(self)._inlineClosure_(anotherIRInstruction));
  5029. $5=inlinedSend;
  5030. _st($5)._add_(_st(_st(_st(self)._send())._instructions())._first());
  5031. _st($5)._add_($ctx1.locals.inlinedClosure1);
  5032. $6=_st($5)._add_($ctx1.locals.inlinedClosure2);
  5033. _st(_st(self)._send())._replaceWith_(inlinedSend);
  5034. $7=inlinedSend;
  5035. return $7;
  5036. }, self, "inlinedSend:with:with:", [inlinedSend,anIRInstruction,anotherIRInstruction], smalltalk.IRSendInliner)},
  5037. args: ["inlinedSend", "anIRInstruction", "anotherIRInstruction"],
  5038. source: "inlinedSend: inlinedSend with: anIRInstruction with: anotherIRInstruction\x0a\x09| inlinedClosure1 inlinedClosure2 |\x0a\x0a\x09anIRInstruction isClosure ifFalse: [ self inliningError: 'Message argument should be a block' ].\x0a\x09anIRInstruction arguments size = 0 ifFalse: [ self inliningError: 'Inlined block should have zero argument' ].\x0a\x0a\x09anotherIRInstruction isClosure ifFalse: [ self inliningError: 'Message argument should be a block' ].\x0a\x09anotherIRInstruction arguments size = 0 ifFalse: [ self inliningError: 'Inlined block should have zero argument' ].\x0a\x0a\x09inlinedClosure1 := self translator visit: (self inlineClosure: anIRInstruction).\x0a\x09inlinedClosure2 := self translator visit: (self inlineClosure: anotherIRInstruction).\x0a\x0a\x0a\x09inlinedSend\x0a\x09\x09add: self send instructions first;\x0a\x09\x09add: inlinedClosure1;\x0a\x09\x09add: inlinedClosure2.\x0a\x0a\x09self send replaceWith: inlinedSend.\x0a\x09^ inlinedSend",
  5039. messageSends: ["ifFalse:", "inliningError:", "isClosure", "=", "size", "arguments", "visit:", "inlineClosure:", "translator", "add:", "first", "instructions", "send", "replaceWith:"],
  5040. referencedClasses: []
  5041. }),
  5042. smalltalk.IRSendInliner);
  5043. smalltalk.addMethod(
  5044. "_inlinedSequence",
  5045. smalltalk.method({
  5046. selector: "inlinedSequence",
  5047. category: '*Compiler',
  5048. fn: function (){
  5049. var self=this;
  5050. return smalltalk.withContext(function($ctx1) { var $1;
  5051. $1=_st((smalltalk.IRInlinedSequence || IRInlinedSequence))._new();
  5052. return $1;
  5053. }, self, "inlinedSequence", [], smalltalk.IRSendInliner)},
  5054. args: [],
  5055. source: "inlinedSequence\x0a\x09^ IRInlinedSequence new",
  5056. messageSends: ["new"],
  5057. referencedClasses: ["IRInlinedSequence"]
  5058. }),
  5059. smalltalk.IRSendInliner);
  5060. smalltalk.addMethod(
  5061. "_inliningError_",
  5062. smalltalk.method({
  5063. selector: "inliningError:",
  5064. category: '*Compiler',
  5065. fn: function (aString){
  5066. var self=this;
  5067. return smalltalk.withContext(function($ctx1) { _st((smalltalk.InliningError || InliningError))._signal_(aString);
  5068. return self}, self, "inliningError:", [aString], smalltalk.IRSendInliner)},
  5069. args: ["aString"],
  5070. source: "inliningError: aString\x0a\x09InliningError signal: aString",
  5071. messageSends: ["signal:"],
  5072. referencedClasses: ["InliningError"]
  5073. }),
  5074. smalltalk.IRSendInliner);
  5075. smalltalk.addMethod(
  5076. "_send",
  5077. smalltalk.method({
  5078. selector: "send",
  5079. category: '*Compiler',
  5080. fn: function (){
  5081. var self=this;
  5082. return smalltalk.withContext(function($ctx1) { var $1;
  5083. $1=self["@send"];
  5084. return $1;
  5085. }, self, "send", [], smalltalk.IRSendInliner)},
  5086. args: [],
  5087. source: "send\x0a\x09^ send",
  5088. messageSends: [],
  5089. referencedClasses: []
  5090. }),
  5091. smalltalk.IRSendInliner);
  5092. smalltalk.addMethod(
  5093. "_send_",
  5094. smalltalk.method({
  5095. selector: "send:",
  5096. category: '*Compiler',
  5097. fn: function (anIRSend){
  5098. var self=this;
  5099. return smalltalk.withContext(function($ctx1) { self["@send"]=anIRSend;
  5100. return self}, self, "send:", [anIRSend], smalltalk.IRSendInliner)},
  5101. args: ["anIRSend"],
  5102. source: "send: anIRSend\x0a\x09send := anIRSend",
  5103. messageSends: [],
  5104. referencedClasses: []
  5105. }),
  5106. smalltalk.IRSendInliner);
  5107. smalltalk.addMethod(
  5108. "_translator",
  5109. smalltalk.method({
  5110. selector: "translator",
  5111. category: '*Compiler',
  5112. fn: function (){
  5113. var self=this;
  5114. return smalltalk.withContext(function($ctx1) { var $1;
  5115. $1=self["@translator"];
  5116. return $1;
  5117. }, self, "translator", [], smalltalk.IRSendInliner)},
  5118. args: [],
  5119. source: "translator\x0a\x09^ translator",
  5120. messageSends: [],
  5121. referencedClasses: []
  5122. }),
  5123. smalltalk.IRSendInliner);
  5124. smalltalk.addMethod(
  5125. "_translator_",
  5126. smalltalk.method({
  5127. selector: "translator:",
  5128. category: '*Compiler',
  5129. fn: function (anASTTranslator){
  5130. var self=this;
  5131. return smalltalk.withContext(function($ctx1) { self["@translator"]=anASTTranslator;
  5132. return self}, self, "translator:", [anASTTranslator], smalltalk.IRSendInliner)},
  5133. args: ["anASTTranslator"],
  5134. source: "translator: anASTTranslator\x0a\x09translator := anASTTranslator",
  5135. messageSends: [],
  5136. referencedClasses: []
  5137. }),
  5138. smalltalk.IRSendInliner);
  5139. smalltalk.addMethod(
  5140. "_inlinedSelectors",
  5141. smalltalk.method({
  5142. selector: "inlinedSelectors",
  5143. category: '*Compiler',
  5144. fn: function (){
  5145. var self=this;
  5146. return smalltalk.withContext(function($ctx1) { return ["ifTrue:", "ifFalse:", "ifTrue:ifFalse:", "ifFalse:ifTrue:", "ifNil:", "ifNotNil:", "ifNil:ifNotNil:", "ifNotNil:ifNil"];
  5147. }, self, "inlinedSelectors", [], smalltalk.IRSendInliner.klass)},
  5148. args: [],
  5149. source: "inlinedSelectors\x0a\x09^ #('ifTrue:' 'ifFalse:' 'ifTrue:ifFalse:' 'ifFalse:ifTrue:' 'ifNil:' 'ifNotNil:' 'ifNil:ifNotNil:' 'ifNotNil:ifNil')",
  5150. messageSends: [],
  5151. referencedClasses: []
  5152. }),
  5153. smalltalk.IRSendInliner.klass);
  5154. smalltalk.addMethod(
  5155. "_shouldInline_",
  5156. smalltalk.method({
  5157. selector: "shouldInline:",
  5158. category: '*Compiler',
  5159. fn: function (anIRInstruction){
  5160. var self=this;
  5161. return smalltalk.withContext(function($ctx1) { var $1,$2,$4,$3;
  5162. var $early={};
  5163. try {
  5164. $1=_st(_st(self)._inlinedSelectors())._includes_(_st(anIRInstruction)._selector());
  5165. if(! smalltalk.assert($1)){
  5166. return false;
  5167. };
  5168. $2=_st(_st(anIRInstruction)._instructions())._allButFirst();
  5169. $3=(function(each){
  5170. return smalltalk.withContext(function($ctx2) { $4=_st(each)._isClosure();
  5171. if(! smalltalk.assert($4)){
  5172. throw $early=[false];
  5173. };
  5174. })});
  5175. _st($2)._do_($3);
  5176. return true;
  5177. }
  5178. catch(e) {if(e===$early)return e[0]; throw e}
  5179. }, self, "shouldInline:", [anIRInstruction], smalltalk.IRSendInliner.klass)},
  5180. args: ["anIRInstruction"],
  5181. source: "shouldInline: anIRInstruction\x0a\x09(self inlinedSelectors includes: anIRInstruction selector) ifFalse: [ ^ false ].\x0a\x09anIRInstruction instructions allButFirst do: [ :each |\x0a\x09\x09each isClosure ifFalse: [ ^ false ]].\x0a\x09^ true",
  5182. messageSends: ["ifFalse:", "includes:", "selector", "inlinedSelectors", "do:", "isClosure", "allButFirst", "instructions"],
  5183. referencedClasses: []
  5184. }),
  5185. smalltalk.IRSendInliner.klass);
  5186. smalltalk.addMethod(
  5187. "_assignment",
  5188. smalltalk.method({
  5189. selector: "assignment",
  5190. category: '*Compiler',
  5191. fn: function (){
  5192. var self=this;
  5193. return smalltalk.withContext(function($ctx1) { var $1;
  5194. $1=self["@assignment"];
  5195. return $1;
  5196. }, self, "assignment", [], smalltalk.IRAssignmentInliner)},
  5197. args: [],
  5198. source: "assignment\x0a\x09^ assignment",
  5199. messageSends: [],
  5200. referencedClasses: []
  5201. }),
  5202. smalltalk.IRAssignmentInliner);
  5203. smalltalk.addMethod(
  5204. "_assignment_",
  5205. smalltalk.method({
  5206. selector: "assignment:",
  5207. category: '*Compiler',
  5208. fn: function (aNode){
  5209. var self=this;
  5210. return smalltalk.withContext(function($ctx1) { self["@assignment"]=aNode;
  5211. return self}, self, "assignment:", [aNode], smalltalk.IRAssignmentInliner)},
  5212. args: ["aNode"],
  5213. source: "assignment: aNode\x0a\x09assignment := aNode",
  5214. messageSends: [],
  5215. referencedClasses: []
  5216. }),
  5217. smalltalk.IRAssignmentInliner);
  5218. smalltalk.addMethod(
  5219. "_inlineAssignment_",
  5220. smalltalk.method({
  5221. selector: "inlineAssignment:",
  5222. category: '*Compiler',
  5223. fn: function (anIRAssignment){
  5224. var self=this;
  5225. return smalltalk.withContext(function($ctx1) { var $1;
  5226. $ctx1.locals.inlinedAssignment=nil;
  5227. _st(self)._assignment_(anIRAssignment);
  5228. $ctx1.locals.inlinedAssignment=_st((smalltalk.IRInlinedAssignment || IRInlinedAssignment))._new();
  5229. _st(_st(anIRAssignment)._instructions())._do_((function(each){
  5230. return smalltalk.withContext(function($ctx2) { return _st($ctx1.locals.inlinedAssignment)._add_(each);
  5231. })}));
  5232. _st(anIRAssignment)._replaceWith_($ctx1.locals.inlinedAssignment);
  5233. _st(self)._inlineSend_(_st(_st($ctx1.locals.inlinedAssignment)._instructions())._last());
  5234. $1=$ctx1.locals.inlinedAssignment;
  5235. return $1;
  5236. }, self, "inlineAssignment:", [anIRAssignment], smalltalk.IRAssignmentInliner)},
  5237. args: ["anIRAssignment"],
  5238. source: "inlineAssignment: anIRAssignment\x0a\x09| inlinedAssignment |\x0a\x09self assignment: anIRAssignment.\x0a\x09inlinedAssignment := IRInlinedAssignment new.\x0a\x09anIRAssignment instructions do: [ :each |\x0a\x09\x09inlinedAssignment add: each ].\x0a\x09anIRAssignment replaceWith: inlinedAssignment.\x0a\x09self inlineSend: inlinedAssignment instructions last.\x0a\x09^ inlinedAssignment",
  5239. messageSends: ["assignment:", "new", "do:", "add:", "instructions", "replaceWith:", "inlineSend:", "last"],
  5240. referencedClasses: ["IRInlinedAssignment"]
  5241. }),
  5242. smalltalk.IRAssignmentInliner);
  5243. smalltalk.addMethod(
  5244. "_inlineClosure_",
  5245. smalltalk.method({
  5246. selector: "inlineClosure:",
  5247. category: '*Compiler',
  5248. fn: function (anIRClosure){
  5249. var self=this;
  5250. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$5,$2,$6;
  5251. $ctx1.locals.inlinedClosure=nil;
  5252. $ctx1.locals.statements=nil;
  5253. $ctx1.locals.inlinedClosure=smalltalk.IRSendInliner.fn.prototype._inlineClosure_.apply(_st(self), [anIRClosure]);
  5254. $ctx1.locals.statements=_st(_st(_st($ctx1.locals.inlinedClosure)._instructions())._last())._instructions();
  5255. $1=$ctx1.locals.statements;
  5256. $2=(function(){
  5257. return smalltalk.withContext(function($ctx2) { $3=_st(_st($ctx1.locals.statements)._last())._canBeAssigned();
  5258. if(smalltalk.assert($3)){
  5259. $4=_st((smalltalk.IRAssignment || IRAssignment))._new();
  5260. _st($4)._add_(_st(_st(_st(self)._assignment())._instructions())._first());
  5261. _st($4)._add_(_st(_st($ctx1.locals.statements)._last())._copy());
  5262. $5=_st($4)._yourself();
  5263. return _st(_st($ctx1.locals.statements)._last())._replaceWith_($5);
  5264. };
  5265. })});
  5266. _st($1)._ifNotEmpty_($2);
  5267. $6=$ctx1.locals.inlinedClosure;
  5268. return $6;
  5269. }, self, "inlineClosure:", [anIRClosure], smalltalk.IRAssignmentInliner)},
  5270. args: ["anIRClosure"],
  5271. source: "inlineClosure: anIRClosure\x0a\x09| inlinedClosure statements |\x0a\x0a\x09inlinedClosure := super inlineClosure: anIRClosure.\x0a\x09statements := inlinedClosure instructions last instructions.\x0a\x09\x0a\x09statements ifNotEmpty: [\x0a\x09\x09statements last canBeAssigned ifTrue: [\x0a\x09\x09\x09statements last replaceWith: (IRAssignment new\x0a\x09\x09\x09\x09add: self assignment instructions first;\x0a\x09\x09\x09\x09add: statements last copy;\x0a\x09\x09\x09\x09yourself) ] ].\x0a\x0a\x09^ inlinedClosure",
  5272. messageSends: ["inlineClosure:", "instructions", "last", "ifNotEmpty:", "ifTrue:", "replaceWith:", "add:", "first", "assignment", "new", "copy", "yourself", "canBeAssigned"],
  5273. referencedClasses: ["IRAssignment"]
  5274. }),
  5275. smalltalk.IRAssignmentInliner);
  5276. smalltalk.addMethod(
  5277. "_inlineClosure_",
  5278. smalltalk.method({
  5279. selector: "inlineClosure:",
  5280. category: '*Compiler',
  5281. fn: function (anIRClosure){
  5282. var self=this;
  5283. return smalltalk.withContext(function($ctx1) { var $1;
  5284. $1=smalltalk.IRSendInliner.fn.prototype._inlineCLosure_.apply(_st(self), [anIRClosure]);
  5285. return $1;
  5286. }, self, "inlineClosure:", [anIRClosure], smalltalk.IRNonLocalReturnInliner)},
  5287. args: ["anIRClosure"],
  5288. source: "inlineClosure: anIRClosure\x0a\x09\x22| inlinedClosure statements |\x0a\x0a\x09inlinedClosure := super inlineClosure: anIRClosure.\x0a\x09statements := inlinedClosure instructions last instructions.\x0a\x09\x0a\x09statements ifNotEmpty: [\x0a\x09\x09statements last replaceWith: (IRNonLocalReturn new\x0a\x09\x09\x09add: statements last copy;\x0a\x09\x09\x09yourself) ].\x0a\x0a\x09^ inlinedClosure\x22\x0a\x0a\x09^ super inlineCLosure: anIRClosure",
  5289. messageSends: ["inlineCLosure:"],
  5290. referencedClasses: []
  5291. }),
  5292. smalltalk.IRNonLocalReturnInliner);
  5293. smalltalk.addMethod(
  5294. "_inlinedReturn",
  5295. smalltalk.method({
  5296. selector: "inlinedReturn",
  5297. category: '*Compiler',
  5298. fn: function (){
  5299. var self=this;
  5300. return smalltalk.withContext(function($ctx1) { var $1;
  5301. $1=_st((smalltalk.IRInlinedNonLocalReturn || IRInlinedNonLocalReturn))._new();
  5302. return $1;
  5303. }, self, "inlinedReturn", [], smalltalk.IRNonLocalReturnInliner)},
  5304. args: [],
  5305. source: "inlinedReturn\x0a\x09^ IRInlinedNonLocalReturn new",
  5306. messageSends: ["new"],
  5307. referencedClasses: ["IRInlinedNonLocalReturn"]
  5308. }),
  5309. smalltalk.IRNonLocalReturnInliner);
  5310. smalltalk.addMethod(
  5311. "_inlineClosure_",
  5312. smalltalk.method({
  5313. selector: "inlineClosure:",
  5314. category: '*Compiler',
  5315. fn: function (anIRClosure){
  5316. var self=this;
  5317. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$5,$2,$6;
  5318. $ctx1.locals.closure=nil;
  5319. $ctx1.locals.statements=nil;
  5320. $ctx1.locals.closure=smalltalk.IRSendInliner.fn.prototype._inlineClosure_.apply(_st(self), [anIRClosure]);
  5321. $ctx1.locals.statements=_st(_st(_st($ctx1.locals.closure)._instructions())._last())._instructions();
  5322. $1=$ctx1.locals.statements;
  5323. $2=(function(){
  5324. return smalltalk.withContext(function($ctx2) { $3=_st(_st($ctx1.locals.statements)._last())._isReturn();
  5325. if(! smalltalk.assert($3)){
  5326. $4=_st((smalltalk.IRReturn || IRReturn))._new();
  5327. _st($4)._add_(_st(_st($ctx1.locals.statements)._last())._copy());
  5328. $5=_st($4)._yourself();
  5329. return _st(_st($ctx1.locals.statements)._last())._replaceWith_($5);
  5330. };
  5331. })});
  5332. _st($1)._ifNotEmpty_($2);
  5333. $6=$ctx1.locals.closure;
  5334. return $6;
  5335. }, self, "inlineClosure:", [anIRClosure], smalltalk.IRReturnInliner)},
  5336. args: ["anIRClosure"],
  5337. source: "inlineClosure: anIRClosure\x0a\x09| closure statements |\x0a\x0a\x09closure := super inlineClosure: anIRClosure.\x0a\x09statements := closure instructions last instructions.\x0a\x09\x0a\x09statements ifNotEmpty: [\x0a\x09\x09statements last isReturn\x0a\x09\x09\x09ifFalse: [ statements last replaceWith: (IRReturn new\x0a\x09\x09\x09\x09add: statements last copy;\x0a\x09\x09\x09\x09yourself)] ].\x0a\x0a\x09^ closure",
  5338. messageSends: ["inlineClosure:", "instructions", "last", "ifNotEmpty:", "ifFalse:", "replaceWith:", "add:", "copy", "new", "yourself", "isReturn"],
  5339. referencedClasses: ["IRReturn"]
  5340. }),
  5341. smalltalk.IRReturnInliner);
  5342. smalltalk.addMethod(
  5343. "_inlineReturn_",
  5344. smalltalk.method({
  5345. selector: "inlineReturn:",
  5346. category: '*Compiler',
  5347. fn: function (anIRReturn){
  5348. var self=this;
  5349. return smalltalk.withContext(function($ctx1) { var $1;
  5350. $ctx1.locals.return=nil;
  5351. $ctx1.locals.return_=_st(self)._inlinedReturn();
  5352. _st(_st(anIRReturn)._instructions())._do_((function(each){
  5353. return smalltalk.withContext(function($ctx2) { return _st($ctx1.locals.return_)._add_(each);
  5354. })}));
  5355. _st(anIRReturn)._replaceWith_($ctx1.locals.return_);
  5356. _st(self)._inlineSend_(_st(_st($ctx1.locals.return_)._instructions())._last());
  5357. $1=$ctx1.locals.return_;
  5358. return $1;
  5359. }, self, "inlineReturn:", [anIRReturn], smalltalk.IRReturnInliner)},
  5360. args: ["anIRReturn"],
  5361. source: "inlineReturn: anIRReturn\x0a\x09| return |\x0a\x09return := self inlinedReturn.\x0a\x09anIRReturn instructions do: [ :each |\x0a\x09\x09return add: each ].\x0a\x09anIRReturn replaceWith: return.\x0a\x09self inlineSend: return instructions last.\x0a\x09^ return",
  5362. messageSends: ["inlinedReturn", "do:", "add:", "instructions", "replaceWith:", "inlineSend:", "last"],
  5363. referencedClasses: []
  5364. }),
  5365. smalltalk.IRReturnInliner);
  5366. smalltalk.addMethod(
  5367. "_inlinedReturn",
  5368. smalltalk.method({
  5369. selector: "inlinedReturn",
  5370. category: '*Compiler',
  5371. fn: function (){
  5372. var self=this;
  5373. return smalltalk.withContext(function($ctx1) { var $1;
  5374. $1=_st((smalltalk.IRInlinedReturn || IRInlinedReturn))._new();
  5375. return $1;
  5376. }, self, "inlinedReturn", [], smalltalk.IRReturnInliner)},
  5377. args: [],
  5378. source: "inlinedReturn\x0a\x09^ IRInlinedReturn new",
  5379. messageSends: ["new"],
  5380. referencedClasses: ["IRInlinedReturn"]
  5381. }),
  5382. smalltalk.IRReturnInliner);
  5383. smalltalk.addMethod(
  5384. "_visit_",
  5385. smalltalk.method({
  5386. selector: "visit:",
  5387. category: '*Compiler',
  5388. fn: function (anIRInstruction){
  5389. var self=this;
  5390. return smalltalk.withContext(function($ctx1) { var $1;
  5391. $1=_st(anIRInstruction)._accept_(self);
  5392. return $1;
  5393. }, self, "visit:", [anIRInstruction], smalltalk.IRVisitor)},
  5394. args: ["anIRInstruction"],
  5395. source: "visit: anIRInstruction\x0a\x09^ anIRInstruction accept: self",
  5396. messageSends: ["accept:"],
  5397. referencedClasses: []
  5398. }),
  5399. smalltalk.IRVisitor);
  5400. smalltalk.addMethod(
  5401. "_visitIRAssignment_",
  5402. smalltalk.method({
  5403. selector: "visitIRAssignment:",
  5404. category: '*Compiler',
  5405. fn: function (anIRAssignment){
  5406. var self=this;
  5407. return smalltalk.withContext(function($ctx1) { var $1;
  5408. $1=_st(self)._visitIRInstruction_(anIRAssignment);
  5409. return $1;
  5410. }, self, "visitIRAssignment:", [anIRAssignment], smalltalk.IRVisitor)},
  5411. args: ["anIRAssignment"],
  5412. source: "visitIRAssignment: anIRAssignment\x0a\x09^ self visitIRInstruction: anIRAssignment",
  5413. messageSends: ["visitIRInstruction:"],
  5414. referencedClasses: []
  5415. }),
  5416. smalltalk.IRVisitor);
  5417. smalltalk.addMethod(
  5418. "_visitIRBlockReturn_",
  5419. smalltalk.method({
  5420. selector: "visitIRBlockReturn:",
  5421. category: '*Compiler',
  5422. fn: function (anIRBlockReturn){
  5423. var self=this;
  5424. return smalltalk.withContext(function($ctx1) { var $1;
  5425. $1=_st(self)._visitIRReturn_(anIRBlockReturn);
  5426. return $1;
  5427. }, self, "visitIRBlockReturn:", [anIRBlockReturn], smalltalk.IRVisitor)},
  5428. args: ["anIRBlockReturn"],
  5429. source: "visitIRBlockReturn: anIRBlockReturn\x0a\x09^ self visitIRReturn: anIRBlockReturn",
  5430. messageSends: ["visitIRReturn:"],
  5431. referencedClasses: []
  5432. }),
  5433. smalltalk.IRVisitor);
  5434. smalltalk.addMethod(
  5435. "_visitIRBlockSequence_",
  5436. smalltalk.method({
  5437. selector: "visitIRBlockSequence:",
  5438. category: '*Compiler',
  5439. fn: function (anIRBlockSequence){
  5440. var self=this;
  5441. return smalltalk.withContext(function($ctx1) { var $1;
  5442. $1=_st(self)._visitIRSequence_(anIRBlockSequence);
  5443. return $1;
  5444. }, self, "visitIRBlockSequence:", [anIRBlockSequence], smalltalk.IRVisitor)},
  5445. args: ["anIRBlockSequence"],
  5446. source: "visitIRBlockSequence: anIRBlockSequence\x0a\x09^ self visitIRSequence: anIRBlockSequence",
  5447. messageSends: ["visitIRSequence:"],
  5448. referencedClasses: []
  5449. }),
  5450. smalltalk.IRVisitor);
  5451. smalltalk.addMethod(
  5452. "_visitIRClosure_",
  5453. smalltalk.method({
  5454. selector: "visitIRClosure:",
  5455. category: '*Compiler',
  5456. fn: function (anIRClosure){
  5457. var self=this;
  5458. return smalltalk.withContext(function($ctx1) { var $1;
  5459. $1=_st(self)._visitIRInstruction_(anIRClosure);
  5460. return $1;
  5461. }, self, "visitIRClosure:", [anIRClosure], smalltalk.IRVisitor)},
  5462. args: ["anIRClosure"],
  5463. source: "visitIRClosure: anIRClosure\x0a\x09^ self visitIRInstruction: anIRClosure",
  5464. messageSends: ["visitIRInstruction:"],
  5465. referencedClasses: []
  5466. }),
  5467. smalltalk.IRVisitor);
  5468. smalltalk.addMethod(
  5469. "_visitIRDynamicArray_",
  5470. smalltalk.method({
  5471. selector: "visitIRDynamicArray:",
  5472. category: '*Compiler',
  5473. fn: function (anIRDynamicArray){
  5474. var self=this;
  5475. return smalltalk.withContext(function($ctx1) { var $1;
  5476. $1=_st(self)._visitIRInstruction_(anIRDynamicArray);
  5477. return $1;
  5478. }, self, "visitIRDynamicArray:", [anIRDynamicArray], smalltalk.IRVisitor)},
  5479. args: ["anIRDynamicArray"],
  5480. source: "visitIRDynamicArray: anIRDynamicArray\x0a\x09^ self visitIRInstruction: anIRDynamicArray",
  5481. messageSends: ["visitIRInstruction:"],
  5482. referencedClasses: []
  5483. }),
  5484. smalltalk.IRVisitor);
  5485. smalltalk.addMethod(
  5486. "_visitIRDynamicDictionary_",
  5487. smalltalk.method({
  5488. selector: "visitIRDynamicDictionary:",
  5489. category: '*Compiler',
  5490. fn: function (anIRDynamicDictionary){
  5491. var self=this;
  5492. return smalltalk.withContext(function($ctx1) { var $1;
  5493. $1=_st(self)._visitIRInstruction_(anIRDynamicDictionary);
  5494. return $1;
  5495. }, self, "visitIRDynamicDictionary:", [anIRDynamicDictionary], smalltalk.IRVisitor)},
  5496. args: ["anIRDynamicDictionary"],
  5497. source: "visitIRDynamicDictionary: anIRDynamicDictionary\x0a\x09^ self visitIRInstruction: anIRDynamicDictionary",
  5498. messageSends: ["visitIRInstruction:"],
  5499. referencedClasses: []
  5500. }),
  5501. smalltalk.IRVisitor);
  5502. smalltalk.addMethod(
  5503. "_visitIRInlinedClosure_",
  5504. smalltalk.method({
  5505. selector: "visitIRInlinedClosure:",
  5506. category: '*Compiler',
  5507. fn: function (anIRInlinedClosure){
  5508. var self=this;
  5509. return smalltalk.withContext(function($ctx1) { var $1;
  5510. $1=_st(self)._visitIRClosure_(anIRInlinedClosure);
  5511. return $1;
  5512. }, self, "visitIRInlinedClosure:", [anIRInlinedClosure], smalltalk.IRVisitor)},
  5513. args: ["anIRInlinedClosure"],
  5514. source: "visitIRInlinedClosure: anIRInlinedClosure\x0a\x09^ self visitIRClosure: anIRInlinedClosure",
  5515. messageSends: ["visitIRClosure:"],
  5516. referencedClasses: []
  5517. }),
  5518. smalltalk.IRVisitor);
  5519. smalltalk.addMethod(
  5520. "_visitIRInlinedSequence_",
  5521. smalltalk.method({
  5522. selector: "visitIRInlinedSequence:",
  5523. category: '*Compiler',
  5524. fn: function (anIRInlinedSequence){
  5525. var self=this;
  5526. return smalltalk.withContext(function($ctx1) { var $1;
  5527. $1=_st(self)._visitIRSequence_(anIRInlinedSequence);
  5528. return $1;
  5529. }, self, "visitIRInlinedSequence:", [anIRInlinedSequence], smalltalk.IRVisitor)},
  5530. args: ["anIRInlinedSequence"],
  5531. source: "visitIRInlinedSequence: anIRInlinedSequence\x0a\x09^ self visitIRSequence: anIRInlinedSequence",
  5532. messageSends: ["visitIRSequence:"],
  5533. referencedClasses: []
  5534. }),
  5535. smalltalk.IRVisitor);
  5536. smalltalk.addMethod(
  5537. "_visitIRInstruction_",
  5538. smalltalk.method({
  5539. selector: "visitIRInstruction:",
  5540. category: '*Compiler',
  5541. fn: function (anIRInstruction){
  5542. var self=this;
  5543. return smalltalk.withContext(function($ctx1) { var $1;
  5544. _st(_st(anIRInstruction)._instructions())._do_((function(each){
  5545. return smalltalk.withContext(function($ctx2) { return _st(self)._visit_(each);
  5546. })}));
  5547. $1=anIRInstruction;
  5548. return $1;
  5549. }, self, "visitIRInstruction:", [anIRInstruction], smalltalk.IRVisitor)},
  5550. args: ["anIRInstruction"],
  5551. source: "visitIRInstruction: anIRInstruction\x0a\x09anIRInstruction instructions do: [ :each | self visit: each ].\x0a\x09^ anIRInstruction",
  5552. messageSends: ["do:", "visit:", "instructions"],
  5553. referencedClasses: []
  5554. }),
  5555. smalltalk.IRVisitor);
  5556. smalltalk.addMethod(
  5557. "_visitIRMethod_",
  5558. smalltalk.method({
  5559. selector: "visitIRMethod:",
  5560. category: '*Compiler',
  5561. fn: function (anIRMethod){
  5562. var self=this;
  5563. return smalltalk.withContext(function($ctx1) { var $1;
  5564. $1=_st(self)._visitIRInstruction_(anIRMethod);
  5565. return $1;
  5566. }, self, "visitIRMethod:", [anIRMethod], smalltalk.IRVisitor)},
  5567. args: ["anIRMethod"],
  5568. source: "visitIRMethod: anIRMethod\x0a\x09^ self visitIRInstruction: anIRMethod",
  5569. messageSends: ["visitIRInstruction:"],
  5570. referencedClasses: []
  5571. }),
  5572. smalltalk.IRVisitor);
  5573. smalltalk.addMethod(
  5574. "_visitIRNonLocalReturn_",
  5575. smalltalk.method({
  5576. selector: "visitIRNonLocalReturn:",
  5577. category: '*Compiler',
  5578. fn: function (anIRNonLocalReturn){
  5579. var self=this;
  5580. return smalltalk.withContext(function($ctx1) { var $1;
  5581. $1=_st(self)._visitIRInstruction_(anIRNonLocalReturn);
  5582. return $1;
  5583. }, self, "visitIRNonLocalReturn:", [anIRNonLocalReturn], smalltalk.IRVisitor)},
  5584. args: ["anIRNonLocalReturn"],
  5585. source: "visitIRNonLocalReturn: anIRNonLocalReturn\x0a\x09^ self visitIRInstruction: anIRNonLocalReturn",
  5586. messageSends: ["visitIRInstruction:"],
  5587. referencedClasses: []
  5588. }),
  5589. smalltalk.IRVisitor);
  5590. smalltalk.addMethod(
  5591. "_visitIRNonLocalReturnHandling_",
  5592. smalltalk.method({
  5593. selector: "visitIRNonLocalReturnHandling:",
  5594. category: '*Compiler',
  5595. fn: function (anIRNonLocalReturnHandling){
  5596. var self=this;
  5597. return smalltalk.withContext(function($ctx1) { var $1;
  5598. $1=_st(self)._visitIRInstruction_(anIRNonLocalReturnHandling);
  5599. return $1;
  5600. }, self, "visitIRNonLocalReturnHandling:", [anIRNonLocalReturnHandling], smalltalk.IRVisitor)},
  5601. args: ["anIRNonLocalReturnHandling"],
  5602. source: "visitIRNonLocalReturnHandling: anIRNonLocalReturnHandling\x0a\x09^ self visitIRInstruction: anIRNonLocalReturnHandling",
  5603. messageSends: ["visitIRInstruction:"],
  5604. referencedClasses: []
  5605. }),
  5606. smalltalk.IRVisitor);
  5607. smalltalk.addMethod(
  5608. "_visitIRReturn_",
  5609. smalltalk.method({
  5610. selector: "visitIRReturn:",
  5611. category: '*Compiler',
  5612. fn: function (anIRReturn){
  5613. var self=this;
  5614. return smalltalk.withContext(function($ctx1) { var $1;
  5615. $1=_st(self)._visitIRInstruction_(anIRReturn);
  5616. return $1;
  5617. }, self, "visitIRReturn:", [anIRReturn], smalltalk.IRVisitor)},
  5618. args: ["anIRReturn"],
  5619. source: "visitIRReturn: anIRReturn\x0a\x09^ self visitIRInstruction: anIRReturn",
  5620. messageSends: ["visitIRInstruction:"],
  5621. referencedClasses: []
  5622. }),
  5623. smalltalk.IRVisitor);
  5624. smalltalk.addMethod(
  5625. "_visitIRSend_",
  5626. smalltalk.method({
  5627. selector: "visitIRSend:",
  5628. category: '*Compiler',
  5629. fn: function (anIRSend){
  5630. var self=this;
  5631. return smalltalk.withContext(function($ctx1) { var $1;
  5632. $1=_st(self)._visitIRInstruction_(anIRSend);
  5633. return $1;
  5634. }, self, "visitIRSend:", [anIRSend], smalltalk.IRVisitor)},
  5635. args: ["anIRSend"],
  5636. source: "visitIRSend: anIRSend\x0a\x09^ self visitIRInstruction: anIRSend",
  5637. messageSends: ["visitIRInstruction:"],
  5638. referencedClasses: []
  5639. }),
  5640. smalltalk.IRVisitor);
  5641. smalltalk.addMethod(
  5642. "_visitIRSequence_",
  5643. smalltalk.method({
  5644. selector: "visitIRSequence:",
  5645. category: '*Compiler',
  5646. fn: function (anIRSequence){
  5647. var self=this;
  5648. return smalltalk.withContext(function($ctx1) { var $1;
  5649. $1=_st(self)._visitIRInstruction_(anIRSequence);
  5650. return $1;
  5651. }, self, "visitIRSequence:", [anIRSequence], smalltalk.IRVisitor)},
  5652. args: ["anIRSequence"],
  5653. source: "visitIRSequence: anIRSequence\x0a\x09^ self visitIRInstruction: anIRSequence",
  5654. messageSends: ["visitIRInstruction:"],
  5655. referencedClasses: []
  5656. }),
  5657. smalltalk.IRVisitor);
  5658. smalltalk.addMethod(
  5659. "_visitIRTempDeclaration_",
  5660. smalltalk.method({
  5661. selector: "visitIRTempDeclaration:",
  5662. category: '*Compiler',
  5663. fn: function (anIRTempDeclaration){
  5664. var self=this;
  5665. return smalltalk.withContext(function($ctx1) { var $1;
  5666. $1=_st(self)._visitIRInstruction_(anIRTempDeclaration);
  5667. return $1;
  5668. }, self, "visitIRTempDeclaration:", [anIRTempDeclaration], smalltalk.IRVisitor)},
  5669. args: ["anIRTempDeclaration"],
  5670. source: "visitIRTempDeclaration: anIRTempDeclaration\x0a\x09^ self visitIRInstruction: anIRTempDeclaration",
  5671. messageSends: ["visitIRInstruction:"],
  5672. referencedClasses: []
  5673. }),
  5674. smalltalk.IRVisitor);
  5675. smalltalk.addMethod(
  5676. "_visitIRValue_",
  5677. smalltalk.method({
  5678. selector: "visitIRValue:",
  5679. category: '*Compiler',
  5680. fn: function (anIRValue){
  5681. var self=this;
  5682. return smalltalk.withContext(function($ctx1) { var $1;
  5683. $1=_st(self)._visitIRInstruction_(anIRValue);
  5684. return $1;
  5685. }, self, "visitIRValue:", [anIRValue], smalltalk.IRVisitor)},
  5686. args: ["anIRValue"],
  5687. source: "visitIRValue: anIRValue\x0a\x09^ self visitIRInstruction: anIRValue",
  5688. messageSends: ["visitIRInstruction:"],
  5689. referencedClasses: []
  5690. }),
  5691. smalltalk.IRVisitor);
  5692. smalltalk.addMethod(
  5693. "_visitIRVariable_",
  5694. smalltalk.method({
  5695. selector: "visitIRVariable:",
  5696. category: '*Compiler',
  5697. fn: function (anIRVariable){
  5698. var self=this;
  5699. return smalltalk.withContext(function($ctx1) { var $1;
  5700. $1=_st(self)._visitIRInstruction_(anIRVariable);
  5701. return $1;
  5702. }, self, "visitIRVariable:", [anIRVariable], smalltalk.IRVisitor)},
  5703. args: ["anIRVariable"],
  5704. source: "visitIRVariable: anIRVariable\x0a\x09^ self visitIRInstruction: anIRVariable",
  5705. messageSends: ["visitIRInstruction:"],
  5706. referencedClasses: []
  5707. }),
  5708. smalltalk.IRVisitor);
  5709. smalltalk.addMethod(
  5710. "_visitIRVerbatim_",
  5711. smalltalk.method({
  5712. selector: "visitIRVerbatim:",
  5713. category: '*Compiler',
  5714. fn: function (anIRVerbatim){
  5715. var self=this;
  5716. return smalltalk.withContext(function($ctx1) { var $1;
  5717. $1=_st(self)._visitIRInstruction_(anIRVerbatim);
  5718. return $1;
  5719. }, self, "visitIRVerbatim:", [anIRVerbatim], smalltalk.IRVisitor)},
  5720. args: ["anIRVerbatim"],
  5721. source: "visitIRVerbatim: anIRVerbatim\x0a\x09^ self visitIRInstruction: anIRVerbatim",
  5722. messageSends: ["visitIRInstruction:"],
  5723. referencedClasses: []
  5724. }),
  5725. smalltalk.IRVisitor);
  5726. smalltalk.addMethod(
  5727. "_assignmentInliner",
  5728. smalltalk.method({
  5729. selector: "assignmentInliner",
  5730. category: '*Compiler',
  5731. fn: function (){
  5732. var self=this;
  5733. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  5734. $2=_st((smalltalk.IRAssignmentInliner || IRAssignmentInliner))._new();
  5735. _st($2)._translator_(self);
  5736. $3=_st($2)._yourself();
  5737. $1=$3;
  5738. return $1;
  5739. }, self, "assignmentInliner", [], smalltalk.IRInliner)},
  5740. args: [],
  5741. source: "assignmentInliner\x0a\x09^ IRAssignmentInliner new \x0a\x09\x09translator: self;\x0a\x09\x09yourself",
  5742. messageSends: ["translator:", "new", "yourself"],
  5743. referencedClasses: ["IRAssignmentInliner"]
  5744. }),
  5745. smalltalk.IRInliner);
  5746. smalltalk.addMethod(
  5747. "_nonLocalReturnInliner",
  5748. smalltalk.method({
  5749. selector: "nonLocalReturnInliner",
  5750. category: '*Compiler',
  5751. fn: function (){
  5752. var self=this;
  5753. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  5754. $2=_st((smalltalk.IRNonLocalReturnInliner || IRNonLocalReturnInliner))._new();
  5755. _st($2)._translator_(self);
  5756. $3=_st($2)._yourself();
  5757. $1=$3;
  5758. return $1;
  5759. }, self, "nonLocalReturnInliner", [], smalltalk.IRInliner)},
  5760. args: [],
  5761. source: "nonLocalReturnInliner\x0a\x09^ IRNonLocalReturnInliner new \x0a\x09\x09translator: self;\x0a\x09\x09yourself",
  5762. messageSends: ["translator:", "new", "yourself"],
  5763. referencedClasses: ["IRNonLocalReturnInliner"]
  5764. }),
  5765. smalltalk.IRInliner);
  5766. smalltalk.addMethod(
  5767. "_returnInliner",
  5768. smalltalk.method({
  5769. selector: "returnInliner",
  5770. category: '*Compiler',
  5771. fn: function (){
  5772. var self=this;
  5773. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  5774. $2=_st((smalltalk.IRReturnInliner || IRReturnInliner))._new();
  5775. _st($2)._translator_(self);
  5776. $3=_st($2)._yourself();
  5777. $1=$3;
  5778. return $1;
  5779. }, self, "returnInliner", [], smalltalk.IRInliner)},
  5780. args: [],
  5781. source: "returnInliner\x0a\x09^ IRReturnInliner new \x0a\x09\x09translator: self;\x0a\x09\x09yourself",
  5782. messageSends: ["translator:", "new", "yourself"],
  5783. referencedClasses: ["IRReturnInliner"]
  5784. }),
  5785. smalltalk.IRInliner);
  5786. smalltalk.addMethod(
  5787. "_sendInliner",
  5788. smalltalk.method({
  5789. selector: "sendInliner",
  5790. category: '*Compiler',
  5791. fn: function (){
  5792. var self=this;
  5793. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  5794. $2=_st((smalltalk.IRSendInliner || IRSendInliner))._new();
  5795. _st($2)._translator_(self);
  5796. $3=_st($2)._yourself();
  5797. $1=$3;
  5798. return $1;
  5799. }, self, "sendInliner", [], smalltalk.IRInliner)},
  5800. args: [],
  5801. source: "sendInliner\x0a\x09^ IRSendInliner new \x0a\x09\x09translator: self;\x0a\x09\x09yourself",
  5802. messageSends: ["translator:", "new", "yourself"],
  5803. referencedClasses: ["IRSendInliner"]
  5804. }),
  5805. smalltalk.IRInliner);
  5806. smalltalk.addMethod(
  5807. "_shouldInlineAssignment_",
  5808. smalltalk.method({
  5809. selector: "shouldInlineAssignment:",
  5810. category: '*Compiler',
  5811. fn: function (anIRAssignment){
  5812. var self=this;
  5813. return smalltalk.withContext(function($ctx1) { var $1;
  5814. $1=_st(_st(_st(anIRAssignment)._isInlined())._not())._and_((function(){
  5815. return smalltalk.withContext(function($ctx2) { return _st(_st(_st(_st(anIRAssignment)._instructions())._last())._isSend())._and_((function(){
  5816. return smalltalk.withContext(function($ctx3) { return _st(self)._shouldInlineSend_(_st(_st(anIRAssignment)._instructions())._last());
  5817. })}));
  5818. })}));
  5819. return $1;
  5820. }, self, "shouldInlineAssignment:", [anIRAssignment], smalltalk.IRInliner)},
  5821. args: ["anIRAssignment"],
  5822. source: "shouldInlineAssignment: anIRAssignment\x0a\x09^ anIRAssignment isInlined not and: [ \x0a\x09\x09anIRAssignment instructions last isSend and: [\x09\x0a\x09\x09\x09self shouldInlineSend: (anIRAssignment instructions last) ]]",
  5823. messageSends: ["and:", "shouldInlineSend:", "last", "instructions", "isSend", "not", "isInlined"],
  5824. referencedClasses: []
  5825. }),
  5826. smalltalk.IRInliner);
  5827. smalltalk.addMethod(
  5828. "_shouldInlineReturn_",
  5829. smalltalk.method({
  5830. selector: "shouldInlineReturn:",
  5831. category: '*Compiler',
  5832. fn: function (anIRReturn){
  5833. var self=this;
  5834. return smalltalk.withContext(function($ctx1) { var $1;
  5835. $1=_st(_st(_st(anIRReturn)._isInlined())._not())._and_((function(){
  5836. return smalltalk.withContext(function($ctx2) { return _st(_st(_st(_st(anIRReturn)._instructions())._first())._isSend())._and_((function(){
  5837. return smalltalk.withContext(function($ctx3) { return _st(self)._shouldInlineSend_(_st(_st(anIRReturn)._instructions())._first());
  5838. })}));
  5839. })}));
  5840. return $1;
  5841. }, self, "shouldInlineReturn:", [anIRReturn], smalltalk.IRInliner)},
  5842. args: ["anIRReturn"],
  5843. source: "shouldInlineReturn: anIRReturn\x0a\x09^ anIRReturn isInlined not and: [ \x0a\x09\x09anIRReturn instructions first isSend and: [\x09\x0a\x09\x09\x09self shouldInlineSend: (anIRReturn instructions first) ]]",
  5844. messageSends: ["and:", "shouldInlineSend:", "first", "instructions", "isSend", "not", "isInlined"],
  5845. referencedClasses: []
  5846. }),
  5847. smalltalk.IRInliner);
  5848. smalltalk.addMethod(
  5849. "_shouldInlineSend_",
  5850. smalltalk.method({
  5851. selector: "shouldInlineSend:",
  5852. category: '*Compiler',
  5853. fn: function (anIRSend){
  5854. var self=this;
  5855. return smalltalk.withContext(function($ctx1) { var $1;
  5856. $1=_st(_st(_st(anIRSend)._isInlined())._not())._and_((function(){
  5857. return smalltalk.withContext(function($ctx2) { return _st((smalltalk.IRSendInliner || IRSendInliner))._shouldInline_(anIRSend);
  5858. })}));
  5859. return $1;
  5860. }, self, "shouldInlineSend:", [anIRSend], smalltalk.IRInliner)},
  5861. args: ["anIRSend"],
  5862. source: "shouldInlineSend: anIRSend\x0a\x09^ anIRSend isInlined not and: [\x0a\x09\x09IRSendInliner shouldInline: anIRSend ]",
  5863. messageSends: ["and:", "shouldInline:", "not", "isInlined"],
  5864. referencedClasses: ["IRSendInliner"]
  5865. }),
  5866. smalltalk.IRInliner);
  5867. smalltalk.addMethod(
  5868. "_transformNonLocalReturn_",
  5869. smalltalk.method({
  5870. selector: "transformNonLocalReturn:",
  5871. category: '*Compiler',
  5872. fn: function (anIRNonLocalReturn){
  5873. var self=this;
  5874. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5;
  5875. $ctx1.locals.localReturn=nil;
  5876. $1=_st(_st(anIRNonLocalReturn)._scope())._canInlineNonLocalReturns();
  5877. if(smalltalk.assert($1)){
  5878. _st(_st(_st(anIRNonLocalReturn)._scope())._methodScope())._removeNonLocalReturn_(_st(anIRNonLocalReturn)._scope());
  5879. $2=_st((smalltalk.IRReturn || IRReturn))._new();
  5880. _st($2)._scope_(_st(anIRNonLocalReturn)._scope());
  5881. $3=_st($2)._yourself();
  5882. $ctx1.locals.localReturn=$3;
  5883. $ctx1.locals.localReturn;
  5884. _st(_st(anIRNonLocalReturn)._instructions())._do_((function(each){
  5885. return smalltalk.withContext(function($ctx2) { return _st($ctx1.locals.localReturn)._add_(each);
  5886. })}));
  5887. _st(anIRNonLocalReturn)._replaceWith_($ctx1.locals.localReturn);
  5888. $4=$ctx1.locals.localReturn;
  5889. return $4;
  5890. };
  5891. $5=smalltalk.IRVisitor.fn.prototype._visitIRNonLocalReturn_.apply(_st(self), [anIRNonLocalReturn]);
  5892. return $5;
  5893. }, self, "transformNonLocalReturn:", [anIRNonLocalReturn], smalltalk.IRInliner)},
  5894. args: ["anIRNonLocalReturn"],
  5895. source: "transformNonLocalReturn: anIRNonLocalReturn\x0a\x09\x22Replace a non local return into a local return\x22\x0a\x0a\x09| localReturn |\x0a\x09anIRNonLocalReturn scope canInlineNonLocalReturns ifTrue: [\x0a\x09\x09anIRNonLocalReturn scope methodScope removeNonLocalReturn: anIRNonLocalReturn scope.\x0a\x09\x09localReturn := IRReturn new\x0a\x09\x09\x09scope: anIRNonLocalReturn scope;\x0a\x09\x09\x09yourself.\x0a\x09\x09anIRNonLocalReturn instructions do: [ :each |\x0a\x09\x09\x09localReturn add: each ].\x0a\x09\x09anIRNonLocalReturn replaceWith: localReturn.\x0a\x09\x09^ localReturn ].\x0a\x09^ super visitIRNonLocalReturn: anIRNonLocalReturn",
  5896. messageSends: ["ifTrue:", "removeNonLocalReturn:", "scope", "methodScope", "scope:", "new", "yourself", "do:", "add:", "instructions", "replaceWith:", "canInlineNonLocalReturns", "visitIRNonLocalReturn:"],
  5897. referencedClasses: ["IRReturn"]
  5898. }),
  5899. smalltalk.IRInliner);
  5900. smalltalk.addMethod(
  5901. "_visitIRAssignment_",
  5902. smalltalk.method({
  5903. selector: "visitIRAssignment:",
  5904. category: '*Compiler',
  5905. fn: function (anIRAssignment){
  5906. var self=this;
  5907. return smalltalk.withContext(function($ctx1) { var $2,$1;
  5908. $2=_st(self)._shouldInlineAssignment_(anIRAssignment);
  5909. if(smalltalk.assert($2)){
  5910. $1=_st(_st(self)._assignmentInliner())._inlineAssignment_(anIRAssignment);
  5911. } else {
  5912. $1=smalltalk.IRVisitor.fn.prototype._visitIRAssignment_.apply(_st(self), [anIRAssignment]);
  5913. };
  5914. return $1;
  5915. }, self, "visitIRAssignment:", [anIRAssignment], smalltalk.IRInliner)},
  5916. args: ["anIRAssignment"],
  5917. source: "visitIRAssignment: anIRAssignment\x0a\x09^ (self shouldInlineAssignment: anIRAssignment) \x0a\x09\x09ifTrue: [ self assignmentInliner inlineAssignment: anIRAssignment ]\x0a\x09\x09ifFalse: [ super visitIRAssignment: anIRAssignment ]",
  5918. messageSends: ["ifTrue:ifFalse:", "inlineAssignment:", "assignmentInliner", "visitIRAssignment:", "shouldInlineAssignment:"],
  5919. referencedClasses: []
  5920. }),
  5921. smalltalk.IRInliner);
  5922. smalltalk.addMethod(
  5923. "_visitIRNonLocalReturn_",
  5924. smalltalk.method({
  5925. selector: "visitIRNonLocalReturn:",
  5926. category: '*Compiler',
  5927. fn: function (anIRNonLocalReturn){
  5928. var self=this;
  5929. return smalltalk.withContext(function($ctx1) { var $2,$1;
  5930. $2=_st(self)._shouldInlineReturn_(anIRNonLocalReturn);
  5931. if(smalltalk.assert($2)){
  5932. $1=_st(_st(self)._nonLocalReturnInliner())._inlineReturn_(anIRNonLocalReturn);
  5933. } else {
  5934. $1=_st(self)._transformNonLocalReturn_(anIRNonLocalReturn);
  5935. };
  5936. return $1;
  5937. }, self, "visitIRNonLocalReturn:", [anIRNonLocalReturn], smalltalk.IRInliner)},
  5938. args: ["anIRNonLocalReturn"],
  5939. source: "visitIRNonLocalReturn: anIRNonLocalReturn\x0a\x09^ (self shouldInlineReturn: anIRNonLocalReturn) \x0a\x09\x09ifTrue: [ self nonLocalReturnInliner inlineReturn: anIRNonLocalReturn ]\x0a\x09\x09ifFalse: [ self transformNonLocalReturn: anIRNonLocalReturn ]",
  5940. messageSends: ["ifTrue:ifFalse:", "inlineReturn:", "nonLocalReturnInliner", "transformNonLocalReturn:", "shouldInlineReturn:"],
  5941. referencedClasses: []
  5942. }),
  5943. smalltalk.IRInliner);
  5944. smalltalk.addMethod(
  5945. "_visitIRReturn_",
  5946. smalltalk.method({
  5947. selector: "visitIRReturn:",
  5948. category: '*Compiler',
  5949. fn: function (anIRReturn){
  5950. var self=this;
  5951. return smalltalk.withContext(function($ctx1) { var $2,$1;
  5952. $2=_st(self)._shouldInlineReturn_(anIRReturn);
  5953. if(smalltalk.assert($2)){
  5954. $1=_st(_st(self)._returnInliner())._inlineReturn_(anIRReturn);
  5955. } else {
  5956. $1=smalltalk.IRVisitor.fn.prototype._visitIRReturn_.apply(_st(self), [anIRReturn]);
  5957. };
  5958. return $1;
  5959. }, self, "visitIRReturn:", [anIRReturn], smalltalk.IRInliner)},
  5960. args: ["anIRReturn"],
  5961. source: "visitIRReturn: anIRReturn\x0a\x09^ (self shouldInlineReturn: anIRReturn) \x0a\x09\x09ifTrue: [ self returnInliner inlineReturn: anIRReturn ]\x0a\x09\x09ifFalse: [ super visitIRReturn: anIRReturn ]",
  5962. messageSends: ["ifTrue:ifFalse:", "inlineReturn:", "returnInliner", "visitIRReturn:", "shouldInlineReturn:"],
  5963. referencedClasses: []
  5964. }),
  5965. smalltalk.IRInliner);
  5966. smalltalk.addMethod(
  5967. "_visitIRSend_",
  5968. smalltalk.method({
  5969. selector: "visitIRSend:",
  5970. category: '*Compiler',
  5971. fn: function (anIRSend){
  5972. var self=this;
  5973. return smalltalk.withContext(function($ctx1) { var $2,$1;
  5974. $2=_st(self)._shouldInlineSend_(anIRSend);
  5975. if(smalltalk.assert($2)){
  5976. $1=_st(_st(self)._sendInliner())._inlineSend_(anIRSend);
  5977. } else {
  5978. $1=smalltalk.IRVisitor.fn.prototype._visitIRSend_.apply(_st(self), [anIRSend]);
  5979. };
  5980. return $1;
  5981. }, self, "visitIRSend:", [anIRSend], smalltalk.IRInliner)},
  5982. args: ["anIRSend"],
  5983. source: "visitIRSend: anIRSend\x0a\x09^ (self shouldInlineSend: anIRSend)\x0a\x09\x09ifTrue: [ self sendInliner inlineSend: anIRSend ]\x0a\x09\x09ifFalse: [ super visitIRSend: anIRSend ]",
  5984. messageSends: ["ifTrue:ifFalse:", "inlineSend:", "sendInliner", "visitIRSend:", "shouldInlineSend:"],
  5985. referencedClasses: []
  5986. }),
  5987. smalltalk.IRInliner);
  5988. smalltalk.addMethod(
  5989. "_contents",
  5990. smalltalk.method({
  5991. selector: "contents",
  5992. category: '*Compiler',
  5993. fn: function (){
  5994. var self=this;
  5995. return smalltalk.withContext(function($ctx1) { var $1;
  5996. $1=_st(_st(self)._stream())._contents();
  5997. return $1;
  5998. }, self, "contents", [], smalltalk.IRJSTranslator)},
  5999. args: [],
  6000. source: "contents\x0a\x09^ self stream contents",
  6001. messageSends: ["contents", "stream"],
  6002. referencedClasses: []
  6003. }),
  6004. smalltalk.IRJSTranslator);
  6005. smalltalk.addMethod(
  6006. "_initialize",
  6007. smalltalk.method({
  6008. selector: "initialize",
  6009. category: '*Compiler',
  6010. fn: function (){
  6011. var self=this;
  6012. return smalltalk.withContext(function($ctx1) { smalltalk.IRVisitor.fn.prototype._initialize.apply(_st(self), []);
  6013. self["@stream"]=_st((smalltalk.JSStream || JSStream))._new();
  6014. return self}, self, "initialize", [], smalltalk.IRJSTranslator)},
  6015. args: [],
  6016. source: "initialize\x0a\x09super initialize.\x0a\x09stream := JSStream new.",
  6017. messageSends: ["initialize", "new"],
  6018. referencedClasses: ["JSStream"]
  6019. }),
  6020. smalltalk.IRJSTranslator);
  6021. smalltalk.addMethod(
  6022. "_stream",
  6023. smalltalk.method({
  6024. selector: "stream",
  6025. category: '*Compiler',
  6026. fn: function (){
  6027. var self=this;
  6028. return smalltalk.withContext(function($ctx1) { var $1;
  6029. $1=self["@stream"];
  6030. return $1;
  6031. }, self, "stream", [], smalltalk.IRJSTranslator)},
  6032. args: [],
  6033. source: "stream\x0a\x09^ stream",
  6034. messageSends: [],
  6035. referencedClasses: []
  6036. }),
  6037. smalltalk.IRJSTranslator);
  6038. smalltalk.addMethod(
  6039. "_stream_",
  6040. smalltalk.method({
  6041. selector: "stream:",
  6042. category: '*Compiler',
  6043. fn: function (aStream){
  6044. var self=this;
  6045. return smalltalk.withContext(function($ctx1) { self["@stream"]=aStream;
  6046. return self}, self, "stream:", [aStream], smalltalk.IRJSTranslator)},
  6047. args: ["aStream"],
  6048. source: "stream: aStream\x0a\x09stream := aStream",
  6049. messageSends: [],
  6050. referencedClasses: []
  6051. }),
  6052. smalltalk.IRJSTranslator);
  6053. smalltalk.addMethod(
  6054. "_visitIRAssignment_",
  6055. smalltalk.method({
  6056. selector: "visitIRAssignment:",
  6057. category: '*Compiler',
  6058. fn: function (anIRAssignment){
  6059. var self=this;
  6060. return smalltalk.withContext(function($ctx1) { _st(self)._visit_(_st(_st(anIRAssignment)._instructions())._first());
  6061. _st(_st(self)._stream())._nextPutAssignment();
  6062. _st(self)._visit_(_st(_st(anIRAssignment)._instructions())._last());
  6063. return self}, self, "visitIRAssignment:", [anIRAssignment], smalltalk.IRJSTranslator)},
  6064. args: ["anIRAssignment"],
  6065. source: "visitIRAssignment: anIRAssignment\x0a\x09self visit: anIRAssignment instructions first.\x0a\x09self stream nextPutAssignment.\x0a\x09self visit: anIRAssignment instructions last.",
  6066. messageSends: ["visit:", "first", "instructions", "nextPutAssignment", "stream", "last"],
  6067. referencedClasses: []
  6068. }),
  6069. smalltalk.IRJSTranslator);
  6070. smalltalk.addMethod(
  6071. "_visitIRClosure_",
  6072. smalltalk.method({
  6073. selector: "visitIRClosure:",
  6074. category: '*Compiler',
  6075. fn: function (anIRClosure){
  6076. var self=this;
  6077. return smalltalk.withContext(function($ctx1) { _st(_st(self)._stream())._nextPutClosureWith_arguments_((function(){
  6078. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._stream())._nextPutBlockContextFor_during_(anIRClosure,(function(){
  6079. return smalltalk.withContext(function($ctx3) { return smalltalk.IRVisitor.fn.prototype._visitIRClosure_.apply(_st(self), [anIRClosure]);
  6080. })}));
  6081. })}),_st(anIRClosure)._arguments());
  6082. return self}, self, "visitIRClosure:", [anIRClosure], smalltalk.IRJSTranslator)},
  6083. args: ["anIRClosure"],
  6084. source: "visitIRClosure: anIRClosure\x0a\x09self stream \x0a\x09\x09nextPutClosureWith: [ \x0a \x09self stream \x0a \x09nextPutBlockContextFor: anIRClosure\x0a during: [ super visitIRClosure: anIRClosure ] ]\x0a\x09\x09arguments: anIRClosure arguments",
  6085. messageSends: ["nextPutClosureWith:arguments:", "nextPutBlockContextFor:during:", "visitIRClosure:", "stream", "arguments"],
  6086. referencedClasses: []
  6087. }),
  6088. smalltalk.IRJSTranslator);
  6089. smalltalk.addMethod(
  6090. "_visitIRDynamicArray_",
  6091. smalltalk.method({
  6092. selector: "visitIRDynamicArray:",
  6093. category: '*Compiler',
  6094. fn: function (anIRDynamicArray){
  6095. var self=this;
  6096. return smalltalk.withContext(function($ctx1) { _st(_st(self)._stream())._nextPutAll_("[");
  6097. _st(_st(anIRDynamicArray)._instructions())._do_separatedBy_((function(each){
  6098. return smalltalk.withContext(function($ctx2) { return _st(self)._visit_(each);
  6099. })}),(function(){
  6100. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._stream())._nextPutAll_(",");
  6101. })}));
  6102. _st(self["@stream"])._nextPutAll_("]");
  6103. return self}, self, "visitIRDynamicArray:", [anIRDynamicArray], smalltalk.IRJSTranslator)},
  6104. args: ["anIRDynamicArray"],
  6105. 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: ']'",
  6106. messageSends: ["nextPutAll:", "stream", "do:separatedBy:", "visit:", "instructions"],
  6107. referencedClasses: []
  6108. }),
  6109. smalltalk.IRJSTranslator);
  6110. smalltalk.addMethod(
  6111. "_visitIRDynamicDictionary_",
  6112. smalltalk.method({
  6113. selector: "visitIRDynamicDictionary:",
  6114. category: '*Compiler',
  6115. fn: function (anIRDynamicDictionary){
  6116. var self=this;
  6117. return smalltalk.withContext(function($ctx1) { _st(_st(self)._stream())._nextPutAll_("smalltalk.HashedCollection._fromPairs_([");
  6118. _st(_st(anIRDynamicDictionary)._instructions())._do_separatedBy_((function(each){
  6119. return smalltalk.withContext(function($ctx2) { return _st(self)._visit_(each);
  6120. })}),(function(){
  6121. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._stream())._nextPutAll_(",");
  6122. })}));
  6123. _st(_st(self)._stream())._nextPutAll_("])");
  6124. return self}, self, "visitIRDynamicDictionary:", [anIRDynamicDictionary], smalltalk.IRJSTranslator)},
  6125. args: ["anIRDynamicDictionary"],
  6126. source: "visitIRDynamicDictionary: anIRDynamicDictionary\x0a\x09self stream nextPutAll: 'smalltalk.HashedCollection._fromPairs_(['.\x0a\x09\x09anIRDynamicDictionary instructions \x0a\x09\x09\x09do: [ :each | self visit: each ]\x0a\x09\x09\x09separatedBy: [self stream nextPutAll: ',' ].\x0a\x09self stream nextPutAll: '])'",
  6127. messageSends: ["nextPutAll:", "stream", "do:separatedBy:", "visit:", "instructions"],
  6128. referencedClasses: []
  6129. }),
  6130. smalltalk.IRJSTranslator);
  6131. smalltalk.addMethod(
  6132. "_visitIRMethod_",
  6133. smalltalk.method({
  6134. selector: "visitIRMethod:",
  6135. category: '*Compiler',
  6136. fn: function (anIRMethod){
  6137. var self=this;
  6138. return smalltalk.withContext(function($ctx1) { var $1,$2,$4,$6,$7,$9,$10,$8,$5,$3;
  6139. $1=_st(self)._stream();
  6140. $2=anIRMethod;
  6141. $3=(function(){
  6142. return smalltalk.withContext(function($ctx2) { $4=_st(self)._stream();
  6143. $5=(function(){
  6144. return smalltalk.withContext(function($ctx3) { $6=_st(self)._stream();
  6145. $7=anIRMethod;
  6146. $8=(function(){
  6147. return smalltalk.withContext(function($ctx4) { $9=_st(_st(anIRMethod)._internalVariables())._notEmpty();
  6148. if(smalltalk.assert($9)){
  6149. _st(_st(self)._stream())._nextPutVars_(_st(_st(_st(anIRMethod)._internalVariables())._asArray())._collect_((function(each){
  6150. return smalltalk.withContext(function($ctx5) { return _st(_st(each)._variable())._alias();
  6151. })})));
  6152. };
  6153. $10=_st(_st(anIRMethod)._scope())._hasNonLocalReturn();
  6154. if(smalltalk.assert($10)){
  6155. return _st(_st(self)._stream())._nextPutNonLocalReturnHandlingWith_((function(){
  6156. return smalltalk.withContext(function($ctx5) { return smalltalk.IRVisitor.fn.prototype._visitIRMethod_.apply(_st(self), [anIRMethod]);
  6157. })}));
  6158. } else {
  6159. return smalltalk.IRVisitor.fn.prototype._visitIRMethod_.apply(_st(self), [anIRMethod]);
  6160. };
  6161. })});
  6162. return _st($6)._nextPutContextFor_during_($7,$8);
  6163. })});
  6164. return _st($4)._nextPutFunctionWith_arguments_($5,_st(anIRMethod)._arguments());
  6165. })});
  6166. _st($1)._nextPutMethodDeclaration_with_($2,$3);
  6167. return self}, self, "visitIRMethod:", [anIRMethod], smalltalk.IRJSTranslator)},
  6168. args: ["anIRMethod"],
  6169. source: "visitIRMethod: anIRMethod\x0a\x09self stream\x0a\x09\x09nextPutMethodDeclaration: anIRMethod \x0a\x09\x09with: [ self stream \x0a\x09\x09\x09nextPutFunctionWith: [ \x0a \x09self stream nextPutContextFor: anIRMethod during: [\x0a\x09\x09\x09\x09anIRMethod internalVariables notEmpty ifTrue: [\x0a\x09\x09\x09\x09\x09self stream nextPutVars: (anIRMethod internalVariables asArray 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 ]",
  6170. messageSends: ["nextPutMethodDeclaration:with:", "nextPutFunctionWith:arguments:", "nextPutContextFor:during:", "ifTrue:", "nextPutVars:", "collect:", "alias", "variable", "asArray", "internalVariables", "stream", "notEmpty", "ifTrue:ifFalse:", "nextPutNonLocalReturnHandlingWith:", "visitIRMethod:", "hasNonLocalReturn", "scope", "arguments"],
  6171. referencedClasses: []
  6172. }),
  6173. smalltalk.IRJSTranslator);
  6174. smalltalk.addMethod(
  6175. "_visitIRNonLocalReturn_",
  6176. smalltalk.method({
  6177. selector: "visitIRNonLocalReturn:",
  6178. category: '*Compiler',
  6179. fn: function (anIRNonLocalReturn){
  6180. var self=this;
  6181. return smalltalk.withContext(function($ctx1) { _st(_st(self)._stream())._nextPutNonLocalReturnWith_((function(){
  6182. return smalltalk.withContext(function($ctx2) { return smalltalk.IRVisitor.fn.prototype._visitIRNonLocalReturn_.apply(_st(self), [anIRNonLocalReturn]);
  6183. })}));
  6184. return self}, self, "visitIRNonLocalReturn:", [anIRNonLocalReturn], smalltalk.IRJSTranslator)},
  6185. args: ["anIRNonLocalReturn"],
  6186. source: "visitIRNonLocalReturn: anIRNonLocalReturn\x0a\x09self stream nextPutNonLocalReturnWith: [\x0a\x09\x09super visitIRNonLocalReturn: anIRNonLocalReturn ]",
  6187. messageSends: ["nextPutNonLocalReturnWith:", "visitIRNonLocalReturn:", "stream"],
  6188. referencedClasses: []
  6189. }),
  6190. smalltalk.IRJSTranslator);
  6191. smalltalk.addMethod(
  6192. "_visitIRReturn_",
  6193. smalltalk.method({
  6194. selector: "visitIRReturn:",
  6195. category: '*Compiler',
  6196. fn: function (anIRReturn){
  6197. var self=this;
  6198. return smalltalk.withContext(function($ctx1) { _st(_st(self)._stream())._nextPutReturnWith_((function(){
  6199. return smalltalk.withContext(function($ctx2) { return smalltalk.IRVisitor.fn.prototype._visitIRReturn_.apply(_st(self), [anIRReturn]);
  6200. })}));
  6201. return self}, self, "visitIRReturn:", [anIRReturn], smalltalk.IRJSTranslator)},
  6202. args: ["anIRReturn"],
  6203. source: "visitIRReturn: anIRReturn\x0a\x09self stream nextPutReturnWith: [\x0a\x09\x09super visitIRReturn: anIRReturn ]",
  6204. messageSends: ["nextPutReturnWith:", "visitIRReturn:", "stream"],
  6205. referencedClasses: []
  6206. }),
  6207. smalltalk.IRJSTranslator);
  6208. smalltalk.addMethod(
  6209. "_visitIRSend_",
  6210. smalltalk.method({
  6211. selector: "visitIRSend:",
  6212. category: '*Compiler',
  6213. fn: function (anIRSend){
  6214. var self=this;
  6215. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  6216. $1=_st(anIRSend)._classSend();
  6217. if(($receiver = $1) == nil || $receiver == undefined){
  6218. _st(_st(self)._stream())._nextPutAll_("_st(");
  6219. _st(self)._visit_(_st(_st(anIRSend)._instructions())._first());
  6220. _st(_st(self)._stream())._nextPutAll_(_st(_st(").").__comma(_st(_st(anIRSend)._selector())._asSelector())).__comma("("));
  6221. _st(_st(_st(anIRSend)._instructions())._allButFirst())._do_separatedBy_((function(each){
  6222. return smalltalk.withContext(function($ctx2) { return _st(self)._visit_(each);
  6223. })}),(function(){
  6224. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._stream())._nextPutAll_(",");
  6225. })}));
  6226. _st(_st(self)._stream())._nextPutAll_(")");
  6227. } else {
  6228. $2=_st(self)._stream();
  6229. _st($2)._nextPutAll_(_st(_st(_st(anIRSend)._classSend())._asJavascript()).__comma(".fn.prototype."));
  6230. _st($2)._nextPutAll_(_st(_st(_st(anIRSend)._selector())._asSelector()).__comma(".apply("));
  6231. $3=_st($2)._nextPutAll_("_st(");
  6232. $3;
  6233. _st(self)._visit_(_st(_st(anIRSend)._instructions())._first());
  6234. _st(_st(self)._stream())._nextPutAll_("), [");
  6235. _st(_st(_st(anIRSend)._instructions())._allButFirst())._do_separatedBy_((function(each){
  6236. return smalltalk.withContext(function($ctx2) { return _st(self)._visit_(each);
  6237. })}),(function(){
  6238. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._stream())._nextPutAll_(",");
  6239. })}));
  6240. _st(_st(self)._stream())._nextPutAll_("])");
  6241. };
  6242. return self}, self, "visitIRSend:", [anIRSend], smalltalk.IRJSTranslator)},
  6243. args: ["anIRSend"],
  6244. source: "visitIRSend: anIRSend\x0a\x09anIRSend classSend \x0a \x09ifNil: [\x0a\x09\x09\x09self stream nextPutAll: '_st('.\x0a\x09\x09\x09self visit: anIRSend instructions first.\x0a \x09\x09 \x09self stream nextPutAll: ').', anIRSend selector asSelector, '('.\x0a\x09\x09\x09anIRSend instructions allButFirst\x0a\x09\x09\x09\x09do: [ :each | self visit: each ]\x0a\x09\x09\x09\x09separatedBy: [ self stream nextPutAll: ',' ].\x0a\x09\x09\x09self stream nextPutAll: ')' ]\x0a\x09\x09ifNotNil: [ \x0a\x09\x09\x09self stream \x0a \x09nextPutAll: anIRSend classSend asJavascript, '.fn.prototype.';\x0a\x09\x09\x09\x09nextPutAll: anIRSend selector asSelector, '.apply(';\x0a\x09\x09\x09\x09nextPutAll: '_st('.\x0a\x09\x09\x09self visit: anIRSend instructions first.\x0a\x09\x09\x09self stream nextPutAll: '), ['.\x0a\x09\x09\x09anIRSend instructions allButFirst\x0a\x09\x09\x09\x09do: [ :each | self visit: each ]\x0a\x09\x09\x09\x09separatedBy: [ self stream nextPutAll: ',' ].\x0a\x09\x09\x09self stream nextPutAll: '])' ]",
  6245. messageSends: ["ifNil:ifNotNil:", "nextPutAll:", "stream", "visit:", "first", "instructions", ",", "asSelector", "selector", "do:separatedBy:", "allButFirst", "asJavascript", "classSend"],
  6246. referencedClasses: []
  6247. }),
  6248. smalltalk.IRJSTranslator);
  6249. smalltalk.addMethod(
  6250. "_visitIRSequence_",
  6251. smalltalk.method({
  6252. selector: "visitIRSequence:",
  6253. category: '*Compiler',
  6254. fn: function (anIRSequence){
  6255. var self=this;
  6256. return smalltalk.withContext(function($ctx1) { _st(_st(self)._stream())._nextPutSequenceWith_((function(){
  6257. return smalltalk.withContext(function($ctx2) { return _st(_st(anIRSequence)._instructions())._do_((function(each){
  6258. return smalltalk.withContext(function($ctx3) { return _st(_st(self)._stream())._nextPutStatementWith_(_st(self)._visit_(each));
  6259. })}));
  6260. })}));
  6261. return self}, self, "visitIRSequence:", [anIRSequence], smalltalk.IRJSTranslator)},
  6262. args: ["anIRSequence"],
  6263. source: "visitIRSequence: anIRSequence\x0a\x09self stream nextPutSequenceWith: [\x0a\x09\x09anIRSequence instructions do: [ :each |\x0a\x09\x09\x09self stream nextPutStatementWith: (self visit: each) ]]",
  6264. messageSends: ["nextPutSequenceWith:", "do:", "nextPutStatementWith:", "visit:", "stream", "instructions"],
  6265. referencedClasses: []
  6266. }),
  6267. smalltalk.IRJSTranslator);
  6268. smalltalk.addMethod(
  6269. "_visitIRTempDeclaration_",
  6270. smalltalk.method({
  6271. selector: "visitIRTempDeclaration:",
  6272. category: '*Compiler',
  6273. fn: function (anIRTempDeclaration){
  6274. var self=this;
  6275. return smalltalk.withContext(function($ctx1) { var $1,$2;
  6276. $1=_st(self)._stream();
  6277. _st($1)._nextPutAll_(_st(_st(_st(_st(_st(anIRTempDeclaration)._scope())._alias()).__comma(".locals.")).__comma(_st(anIRTempDeclaration)._name())).__comma("=nil;"));
  6278. $2=_st($1)._lf();
  6279. return self}, self, "visitIRTempDeclaration:", [anIRTempDeclaration], smalltalk.IRJSTranslator)},
  6280. args: ["anIRTempDeclaration"],
  6281. source: "visitIRTempDeclaration: anIRTempDeclaration\x0a\x09self stream \x0a \x09nextPutAll: anIRTempDeclaration scope alias, '.locals.', anIRTempDeclaration name, '=nil;'; \x0a lf",
  6282. messageSends: ["nextPutAll:", ",", "name", "alias", "scope", "stream", "lf"],
  6283. referencedClasses: []
  6284. }),
  6285. smalltalk.IRJSTranslator);
  6286. smalltalk.addMethod(
  6287. "_visitIRValue_",
  6288. smalltalk.method({
  6289. selector: "visitIRValue:",
  6290. category: '*Compiler',
  6291. fn: function (anIRValue){
  6292. var self=this;
  6293. return smalltalk.withContext(function($ctx1) { _st(_st(self)._stream())._nextPutAll_(_st(_st(anIRValue)._value())._asJavascript());
  6294. return self}, self, "visitIRValue:", [anIRValue], smalltalk.IRJSTranslator)},
  6295. args: ["anIRValue"],
  6296. source: "visitIRValue: anIRValue\x0a\x09self stream nextPutAll: anIRValue value asJavascript",
  6297. messageSends: ["nextPutAll:", "asJavascript", "value", "stream"],
  6298. referencedClasses: []
  6299. }),
  6300. smalltalk.IRJSTranslator);
  6301. smalltalk.addMethod(
  6302. "_visitIRVariable_",
  6303. smalltalk.method({
  6304. selector: "visitIRVariable:",
  6305. category: '*Compiler',
  6306. fn: function (anIRVariable){
  6307. var self=this;
  6308. return smalltalk.withContext(function($ctx1) { var $1;
  6309. $1=_st(_st(_st(anIRVariable)._variable())._name()).__eq("thisContext");
  6310. if(smalltalk.assert($1)){
  6311. _st(_st(self)._stream())._nextPutAll_("smalltalk.getThisContext()");
  6312. } else {
  6313. _st(_st(self)._stream())._nextPutAll_(_st(_st(anIRVariable)._variable())._alias());
  6314. };
  6315. return self}, self, "visitIRVariable:", [anIRVariable], smalltalk.IRJSTranslator)},
  6316. args: ["anIRVariable"],
  6317. source: "visitIRVariable: anIRVariable\x0a\x09anIRVariable variable name = 'thisContext'\x0a \x09ifTrue: [ self stream nextPutAll: 'smalltalk.getThisContext()' ]\x0a \x09ifFalse: [ self stream nextPutAll: anIRVariable variable alias ]",
  6318. messageSends: ["ifTrue:ifFalse:", "nextPutAll:", "stream", "alias", "variable", "=", "name"],
  6319. referencedClasses: []
  6320. }),
  6321. smalltalk.IRJSTranslator);
  6322. smalltalk.addMethod(
  6323. "_visitIRVerbatim_",
  6324. smalltalk.method({
  6325. selector: "visitIRVerbatim:",
  6326. category: '*Compiler',
  6327. fn: function (anIRVerbatim){
  6328. var self=this;
  6329. return smalltalk.withContext(function($ctx1) { _st(_st(self)._stream())._nextPutStatementWith_((function(){
  6330. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._stream())._nextPutAll_(_st(anIRVerbatim)._source());
  6331. })}));
  6332. return self}, self, "visitIRVerbatim:", [anIRVerbatim], smalltalk.IRJSTranslator)},
  6333. args: ["anIRVerbatim"],
  6334. source: "visitIRVerbatim: anIRVerbatim\x0a\x09self stream nextPutStatementWith: [\x0a\x09\x09self stream nextPutAll: anIRVerbatim source ]",
  6335. messageSends: ["nextPutStatementWith:", "nextPutAll:", "source", "stream"],
  6336. referencedClasses: []
  6337. }),
  6338. smalltalk.IRJSTranslator);
  6339. smalltalk.addMethod(
  6340. "_visitIRInlinedAssignment_",
  6341. smalltalk.method({
  6342. selector: "visitIRInlinedAssignment:",
  6343. category: '*Compiler',
  6344. fn: function (anIRInlinedAssignment){
  6345. var self=this;
  6346. return smalltalk.withContext(function($ctx1) { _st(self)._visit_(_st(_st(anIRInlinedAssignment)._instructions())._last());
  6347. return self}, self, "visitIRInlinedAssignment:", [anIRInlinedAssignment], smalltalk.IRInliningJSTranslator)},
  6348. args: ["anIRInlinedAssignment"],
  6349. source: "visitIRInlinedAssignment: anIRInlinedAssignment\x0a\x09self visit: anIRInlinedAssignment instructions last",
  6350. messageSends: ["visit:", "last", "instructions"],
  6351. referencedClasses: []
  6352. }),
  6353. smalltalk.IRInliningJSTranslator);
  6354. smalltalk.addMethod(
  6355. "_visitIRInlinedClosure_",
  6356. smalltalk.method({
  6357. selector: "visitIRInlinedClosure:",
  6358. category: '*Compiler',
  6359. fn: function (anIRInlinedClosure){
  6360. var self=this;
  6361. return smalltalk.withContext(function($ctx1) { _st(_st(anIRInlinedClosure)._instructions())._do_((function(each){
  6362. return smalltalk.withContext(function($ctx2) { return _st(self)._visit_(each);
  6363. })}));
  6364. return self}, self, "visitIRInlinedClosure:", [anIRInlinedClosure], smalltalk.IRInliningJSTranslator)},
  6365. args: ["anIRInlinedClosure"],
  6366. source: "visitIRInlinedClosure: anIRInlinedClosure\x0a\x09anIRInlinedClosure instructions do: [ :each |\x0a\x09\x09self visit: each ]",
  6367. messageSends: ["do:", "visit:", "instructions"],
  6368. referencedClasses: []
  6369. }),
  6370. smalltalk.IRInliningJSTranslator);
  6371. smalltalk.addMethod(
  6372. "_visitIRInlinedIfFalse_",
  6373. smalltalk.method({
  6374. selector: "visitIRInlinedIfFalse:",
  6375. category: '*Compiler',
  6376. fn: function (anIRInlinedIfFalse){
  6377. var self=this;
  6378. return smalltalk.withContext(function($ctx1) { _st(_st(self)._stream())._nextPutIf_with_((function(){
  6379. return smalltalk.withContext(function($ctx2) { _st(_st(self)._stream())._nextPutAll_("! smalltalk.assert(");
  6380. _st(self)._visit_(_st(_st(anIRInlinedIfFalse)._instructions())._first());
  6381. return _st(_st(self)._stream())._nextPutAll_(")");
  6382. })}),(function(){
  6383. return smalltalk.withContext(function($ctx2) { return _st(self)._visit_(_st(_st(anIRInlinedIfFalse)._instructions())._last());
  6384. })}));
  6385. return self}, self, "visitIRInlinedIfFalse:", [anIRInlinedIfFalse], smalltalk.IRInliningJSTranslator)},
  6386. args: ["anIRInlinedIfFalse"],
  6387. source: "visitIRInlinedIfFalse: anIRInlinedIfFalse\x0a\x09self stream nextPutIf: [ \x0a\x09\x09self stream nextPutAll: '! smalltalk.assert('.\x0a\x09\x09self visit: anIRInlinedIfFalse instructions first.\x0a\x09\x09self stream nextPutAll: ')' ]\x0a\x09\x09with: [ self visit: anIRInlinedIfFalse instructions last ]",
  6388. messageSends: ["nextPutIf:with:", "nextPutAll:", "stream", "visit:", "first", "instructions", "last"],
  6389. referencedClasses: []
  6390. }),
  6391. smalltalk.IRInliningJSTranslator);
  6392. smalltalk.addMethod(
  6393. "_visitIRInlinedIfNil_",
  6394. smalltalk.method({
  6395. selector: "visitIRInlinedIfNil:",
  6396. category: '*Compiler',
  6397. fn: function (anIRInlinedIfNil){
  6398. var self=this;
  6399. return smalltalk.withContext(function($ctx1) { _st(_st(self)._stream())._nextPutIf_with_((function(){
  6400. return smalltalk.withContext(function($ctx2) { _st(_st(self)._stream())._nextPutAll_("($receiver = ");
  6401. _st(self)._visit_(_st(_st(anIRInlinedIfNil)._instructions())._first());
  6402. return _st(_st(self)._stream())._nextPutAll_(") == nil || $receiver == undefined");
  6403. })}),(function(){
  6404. return smalltalk.withContext(function($ctx2) { return _st(self)._visit_(_st(_st(anIRInlinedIfNil)._instructions())._last());
  6405. })}));
  6406. return self}, self, "visitIRInlinedIfNil:", [anIRInlinedIfNil], smalltalk.IRInliningJSTranslator)},
  6407. args: ["anIRInlinedIfNil"],
  6408. source: "visitIRInlinedIfNil: anIRInlinedIfNil\x0a\x09self stream nextPutIf: [ \x0a\x09\x09self stream nextPutAll: '($receiver = '. \x0a\x09\x09self visit: anIRInlinedIfNil instructions first.\x0a\x09\x09self stream nextPutAll: ') == nil || $receiver == undefined' ]\x0a\x09\x09with: [ self visit: anIRInlinedIfNil instructions last ]",
  6409. messageSends: ["nextPutIf:with:", "nextPutAll:", "stream", "visit:", "first", "instructions", "last"],
  6410. referencedClasses: []
  6411. }),
  6412. smalltalk.IRInliningJSTranslator);
  6413. smalltalk.addMethod(
  6414. "_visitIRInlinedIfNilIfNotNil_",
  6415. smalltalk.method({
  6416. selector: "visitIRInlinedIfNilIfNotNil:",
  6417. category: '*Compiler',
  6418. fn: function (anIRInlinedIfNilIfNotNil){
  6419. var self=this;
  6420. return smalltalk.withContext(function($ctx1) { _st(_st(self)._stream())._nextPutIfElse_with_with_((function(){
  6421. return smalltalk.withContext(function($ctx2) { _st(_st(self)._stream())._nextPutAll_("($receiver = ");
  6422. _st(self)._visit_(_st(_st(anIRInlinedIfNilIfNotNil)._instructions())._first());
  6423. return _st(_st(self)._stream())._nextPutAll_(") == nil || $receiver == undefined");
  6424. })}),(function(){
  6425. return smalltalk.withContext(function($ctx2) { return _st(self)._visit_(_st(_st(anIRInlinedIfNilIfNotNil)._instructions())._second());
  6426. })}),(function(){
  6427. return smalltalk.withContext(function($ctx2) { return _st(self)._visit_(_st(_st(anIRInlinedIfNilIfNotNil)._instructions())._third());
  6428. })}));
  6429. return self}, self, "visitIRInlinedIfNilIfNotNil:", [anIRInlinedIfNilIfNotNil], smalltalk.IRInliningJSTranslator)},
  6430. args: ["anIRInlinedIfNilIfNotNil"],
  6431. source: "visitIRInlinedIfNilIfNotNil: anIRInlinedIfNilIfNotNil\x0a\x09self stream \x0a\x09\x09nextPutIfElse: [ \x0a\x09\x09\x09self stream nextPutAll: '($receiver = '. \x0a\x09\x09\x09self visit: anIRInlinedIfNilIfNotNil instructions first.\x0a\x09\x09\x09self stream nextPutAll: ') == nil || $receiver == undefined' ]\x0a\x09\x09with: [ self visit: anIRInlinedIfNilIfNotNil instructions second ]\x0a\x09\x09with: [ self visit: anIRInlinedIfNilIfNotNil instructions third ]",
  6432. messageSends: ["nextPutIfElse:with:with:", "nextPutAll:", "stream", "visit:", "first", "instructions", "second", "third"],
  6433. referencedClasses: []
  6434. }),
  6435. smalltalk.IRInliningJSTranslator);
  6436. smalltalk.addMethod(
  6437. "_visitIRInlinedIfTrue_",
  6438. smalltalk.method({
  6439. selector: "visitIRInlinedIfTrue:",
  6440. category: '*Compiler',
  6441. fn: function (anIRInlinedIfTrue){
  6442. var self=this;
  6443. return smalltalk.withContext(function($ctx1) { _st(_st(self)._stream())._nextPutIf_with_((function(){
  6444. return smalltalk.withContext(function($ctx2) { _st(_st(self)._stream())._nextPutAll_("smalltalk.assert(");
  6445. _st(self)._visit_(_st(_st(anIRInlinedIfTrue)._instructions())._first());
  6446. return _st(_st(self)._stream())._nextPutAll_(")");
  6447. })}),(function(){
  6448. return smalltalk.withContext(function($ctx2) { return _st(self)._visit_(_st(_st(anIRInlinedIfTrue)._instructions())._last());
  6449. })}));
  6450. return self}, self, "visitIRInlinedIfTrue:", [anIRInlinedIfTrue], smalltalk.IRInliningJSTranslator)},
  6451. args: ["anIRInlinedIfTrue"],
  6452. source: "visitIRInlinedIfTrue: anIRInlinedIfTrue\x0a\x09self stream nextPutIf: [ \x0a\x09\x09self stream nextPutAll: 'smalltalk.assert('. \x0a\x09\x09self visit: anIRInlinedIfTrue instructions first.\x0a\x09\x09self stream nextPutAll: ')' ]\x0a\x09\x09with: [ self visit: anIRInlinedIfTrue instructions last ]",
  6453. messageSends: ["nextPutIf:with:", "nextPutAll:", "stream", "visit:", "first", "instructions", "last"],
  6454. referencedClasses: []
  6455. }),
  6456. smalltalk.IRInliningJSTranslator);
  6457. smalltalk.addMethod(
  6458. "_visitIRInlinedIfTrueIfFalse_",
  6459. smalltalk.method({
  6460. selector: "visitIRInlinedIfTrueIfFalse:",
  6461. category: '*Compiler',
  6462. fn: function (anIRInlinedIfTrueIfFalse){
  6463. var self=this;
  6464. return smalltalk.withContext(function($ctx1) { _st(_st(self)._stream())._nextPutIfElse_with_with_((function(){
  6465. return smalltalk.withContext(function($ctx2) { _st(_st(self)._stream())._nextPutAll_("smalltalk.assert(");
  6466. _st(self)._visit_(_st(_st(anIRInlinedIfTrueIfFalse)._instructions())._first());
  6467. return _st(_st(self)._stream())._nextPutAll_(")");
  6468. })}),(function(){
  6469. return smalltalk.withContext(function($ctx2) { return _st(self)._visit_(_st(_st(anIRInlinedIfTrueIfFalse)._instructions())._second());
  6470. })}),(function(){
  6471. return smalltalk.withContext(function($ctx2) { return _st(self)._visit_(_st(_st(anIRInlinedIfTrueIfFalse)._instructions())._third());
  6472. })}));
  6473. return self}, self, "visitIRInlinedIfTrueIfFalse:", [anIRInlinedIfTrueIfFalse], smalltalk.IRInliningJSTranslator)},
  6474. args: ["anIRInlinedIfTrueIfFalse"],
  6475. source: "visitIRInlinedIfTrueIfFalse: anIRInlinedIfTrueIfFalse\x0a\x09self stream \x0a\x09\x09nextPutIfElse: [ \x0a\x09\x09\x09self stream nextPutAll: 'smalltalk.assert('. \x0a\x09\x09\x09self visit: anIRInlinedIfTrueIfFalse instructions first.\x0a\x09\x09\x09self stream nextPutAll: ')' ]\x0a\x09\x09with: [ self visit: anIRInlinedIfTrueIfFalse instructions second ]\x0a\x09\x09with: [ self visit: anIRInlinedIfTrueIfFalse instructions third ]",
  6476. messageSends: ["nextPutIfElse:with:with:", "nextPutAll:", "stream", "visit:", "first", "instructions", "second", "third"],
  6477. referencedClasses: []
  6478. }),
  6479. smalltalk.IRInliningJSTranslator);
  6480. smalltalk.addMethod(
  6481. "_visitIRInlinedNonLocalReturn_",
  6482. smalltalk.method({
  6483. selector: "visitIRInlinedNonLocalReturn:",
  6484. category: '*Compiler',
  6485. fn: function (anIRInlinedReturn){
  6486. var self=this;
  6487. return smalltalk.withContext(function($ctx1) { _st(_st(self)._stream())._nextPutStatementWith_((function(){
  6488. return smalltalk.withContext(function($ctx2) { return _st(self)._visit_(_st(_st(anIRInlinedReturn)._instructions())._last());
  6489. })}));
  6490. _st(_st(self)._stream())._nextPutNonLocalReturnWith_((function(){
  6491. return smalltalk.withContext(function($ctx2) { })}));
  6492. return self}, self, "visitIRInlinedNonLocalReturn:", [anIRInlinedReturn], smalltalk.IRInliningJSTranslator)},
  6493. args: ["anIRInlinedReturn"],
  6494. source: "visitIRInlinedNonLocalReturn: anIRInlinedReturn\x0a\x09self stream nextPutStatementWith: [\x0a\x09\x09self visit: anIRInlinedReturn instructions last ].\x0a\x09self stream nextPutNonLocalReturnWith: [ ]",
  6495. messageSends: ["nextPutStatementWith:", "visit:", "last", "instructions", "stream", "nextPutNonLocalReturnWith:"],
  6496. referencedClasses: []
  6497. }),
  6498. smalltalk.IRInliningJSTranslator);
  6499. smalltalk.addMethod(
  6500. "_visitIRInlinedReturn_",
  6501. smalltalk.method({
  6502. selector: "visitIRInlinedReturn:",
  6503. category: '*Compiler',
  6504. fn: function (anIRInlinedReturn){
  6505. var self=this;
  6506. return smalltalk.withContext(function($ctx1) { _st(self)._visit_(_st(_st(anIRInlinedReturn)._instructions())._last());
  6507. return self}, self, "visitIRInlinedReturn:", [anIRInlinedReturn], smalltalk.IRInliningJSTranslator)},
  6508. args: ["anIRInlinedReturn"],
  6509. source: "visitIRInlinedReturn: anIRInlinedReturn\x0a\x09self visit: anIRInlinedReturn instructions last",
  6510. messageSends: ["visit:", "last", "instructions"],
  6511. referencedClasses: []
  6512. }),
  6513. smalltalk.IRInliningJSTranslator);
  6514. smalltalk.addMethod(
  6515. "_visitIRInlinedSequence_",
  6516. smalltalk.method({
  6517. selector: "visitIRInlinedSequence:",
  6518. category: '*Compiler',
  6519. fn: function (anIRInlinedSequence){
  6520. var self=this;
  6521. return smalltalk.withContext(function($ctx1) { _st(_st(anIRInlinedSequence)._instructions())._do_((function(each){
  6522. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._stream())._nextPutStatementWith_((function(){
  6523. return smalltalk.withContext(function($ctx3) { return _st(self)._visit_(each);
  6524. })}));
  6525. })}));
  6526. return self}, self, "visitIRInlinedSequence:", [anIRInlinedSequence], smalltalk.IRInliningJSTranslator)},
  6527. args: ["anIRInlinedSequence"],
  6528. source: "visitIRInlinedSequence: anIRInlinedSequence\x0a\x09anIRInlinedSequence instructions do: [ :each | \x0a\x09\x09self stream nextPutStatementWith: [ self visit: each ]]",
  6529. messageSends: ["do:", "nextPutStatementWith:", "visit:", "stream", "instructions"],
  6530. referencedClasses: []
  6531. }),
  6532. smalltalk.IRInliningJSTranslator);
  6533. smalltalk.addMethod(
  6534. "_import_",
  6535. smalltalk.method({
  6536. selector: "import:",
  6537. category: '*Compiler',
  6538. fn: function (aStream){
  6539. var self=this;
  6540. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$6,$5,$2;
  6541. $ctx1.locals.chunk=nil;
  6542. $ctx1.locals.result=nil;
  6543. $ctx1.locals.parser=nil;
  6544. $ctx1.locals.lastEmpty=nil;
  6545. $ctx1.locals.parser=_st((smalltalk.ChunkParser || ChunkParser))._on_(aStream);
  6546. $ctx1.locals.lastEmpty=false;
  6547. $1=(function(){
  6548. return smalltalk.withContext(function($ctx2) { $ctx1.locals.chunk=_st($ctx1.locals.parser)._nextChunk();
  6549. $ctx1.locals.chunk;
  6550. return _st($ctx1.locals.chunk)._isNil();
  6551. })});
  6552. $2=(function(){
  6553. return smalltalk.withContext(function($ctx2) { $3=_st($ctx1.locals.chunk)._isEmpty();
  6554. $4=(function(){
  6555. return smalltalk.withContext(function($ctx3) { $ctx1.locals.lastEmpty=true;
  6556. return $ctx1.locals.lastEmpty;
  6557. })});
  6558. $5=(function(){
  6559. return smalltalk.withContext(function($ctx3) { $ctx1.locals.result=_st(_st((smalltalk.Compiler || Compiler))._new())._evaluateExpression_($ctx1.locals.chunk);
  6560. $ctx1.locals.result;
  6561. $6=$ctx1.locals.lastEmpty;
  6562. if(smalltalk.assert($6)){
  6563. $ctx1.locals.lastEmpty=false;
  6564. $ctx1.locals.lastEmpty;
  6565. return _st($ctx1.locals.result)._scanFrom_($ctx1.locals.parser);
  6566. };
  6567. })});
  6568. return _st($3)._ifTrue_ifFalse_($4,$5);
  6569. })});
  6570. _st($1)._whileFalse_($2);
  6571. return self}, self, "import:", [aStream], smalltalk.Importer)},
  6572. args: ["aStream"],
  6573. source: "import: aStream\x0a | chunk result parser lastEmpty |\x0a parser := ChunkParser on: aStream.\x0a lastEmpty := false.\x0a [chunk := parser nextChunk.\x0a chunk isNil] whileFalse: [\x0a chunk isEmpty\x0a \x09\x09ifTrue: [lastEmpty := true]\x0a \x09\x09ifFalse: [\x0a \x09\x09result := Compiler new evaluateExpression: chunk.\x0a \x09\x09lastEmpty \x0a \x09\x09\x09ifTrue: [\x0a \x09lastEmpty := false.\x0a \x09result scanFrom: parser]]]",
  6574. messageSends: ["on:", "whileFalse:", "ifTrue:ifFalse:", "evaluateExpression:", "new", "ifTrue:", "scanFrom:", "isEmpty", "nextChunk", "isNil"],
  6575. referencedClasses: ["ChunkParser", "Compiler"]
  6576. }),
  6577. smalltalk.Importer);
  6578. smalltalk.addMethod(
  6579. "_contents",
  6580. smalltalk.method({
  6581. selector: "contents",
  6582. category: '*Compiler',
  6583. fn: function (){
  6584. var self=this;
  6585. return smalltalk.withContext(function($ctx1) { var $1;
  6586. $1=_st(self["@stream"])._contents();
  6587. return $1;
  6588. }, self, "contents", [], smalltalk.JSStream)},
  6589. args: [],
  6590. source: "contents\x0a\x09^ stream contents",
  6591. messageSends: ["contents"],
  6592. referencedClasses: []
  6593. }),
  6594. smalltalk.JSStream);
  6595. smalltalk.addMethod(
  6596. "_initialize",
  6597. smalltalk.method({
  6598. selector: "initialize",
  6599. category: '*Compiler',
  6600. fn: function (){
  6601. var self=this;
  6602. return smalltalk.withContext(function($ctx1) { smalltalk.Object.fn.prototype._initialize.apply(_st(self), []);
  6603. self["@stream"]=_st("")._writeStream();
  6604. return self}, self, "initialize", [], smalltalk.JSStream)},
  6605. args: [],
  6606. source: "initialize\x0a\x09super initialize.\x0a\x09stream := '' writeStream.",
  6607. messageSends: ["initialize", "writeStream"],
  6608. referencedClasses: []
  6609. }),
  6610. smalltalk.JSStream);
  6611. smalltalk.addMethod(
  6612. "_lf",
  6613. smalltalk.method({
  6614. selector: "lf",
  6615. category: '*Compiler',
  6616. fn: function (){
  6617. var self=this;
  6618. return smalltalk.withContext(function($ctx1) { _st(self["@stream"])._lf();
  6619. return self}, self, "lf", [], smalltalk.JSStream)},
  6620. args: [],
  6621. source: "lf\x0a\x09stream lf",
  6622. messageSends: ["lf"],
  6623. referencedClasses: []
  6624. }),
  6625. smalltalk.JSStream);
  6626. smalltalk.addMethod(
  6627. "_nextPut_",
  6628. smalltalk.method({
  6629. selector: "nextPut:",
  6630. category: '*Compiler',
  6631. fn: function (aString){
  6632. var self=this;
  6633. return smalltalk.withContext(function($ctx1) { _st(self["@stream"])._nextPut_(aString);
  6634. return self}, self, "nextPut:", [aString], smalltalk.JSStream)},
  6635. args: ["aString"],
  6636. source: "nextPut: aString\x0a\x09stream nextPut: aString",
  6637. messageSends: ["nextPut:"],
  6638. referencedClasses: []
  6639. }),
  6640. smalltalk.JSStream);
  6641. smalltalk.addMethod(
  6642. "_nextPutAll_",
  6643. smalltalk.method({
  6644. selector: "nextPutAll:",
  6645. category: '*Compiler',
  6646. fn: function (aString){
  6647. var self=this;
  6648. return smalltalk.withContext(function($ctx1) { _st(self["@stream"])._nextPutAll_(aString);
  6649. return self}, self, "nextPutAll:", [aString], smalltalk.JSStream)},
  6650. args: ["aString"],
  6651. source: "nextPutAll: aString\x0a\x09stream nextPutAll: aString",
  6652. messageSends: ["nextPutAll:"],
  6653. referencedClasses: []
  6654. }),
  6655. smalltalk.JSStream);
  6656. smalltalk.addMethod(
  6657. "_nextPutAssignment",
  6658. smalltalk.method({
  6659. selector: "nextPutAssignment",
  6660. category: '*Compiler',
  6661. fn: function (){
  6662. var self=this;
  6663. return smalltalk.withContext(function($ctx1) { _st(self["@stream"])._nextPutAll_("=");
  6664. return self}, self, "nextPutAssignment", [], smalltalk.JSStream)},
  6665. args: [],
  6666. source: "nextPutAssignment\x0a\x09stream nextPutAll: '='",
  6667. messageSends: ["nextPutAll:"],
  6668. referencedClasses: []
  6669. }),
  6670. smalltalk.JSStream);
  6671. smalltalk.addMethod(
  6672. "_nextPutBlockContextFor_during_",
  6673. smalltalk.method({
  6674. selector: "nextPutBlockContextFor:during:",
  6675. category: '*Compiler',
  6676. fn: function (anIRClosure,aBlock){
  6677. var self=this;
  6678. return smalltalk.withContext(function($ctx1) { var $1,$2;
  6679. $1=self;
  6680. _st($1)._nextPutAll_(_st(_st("return smalltalk.withContext(function(").__comma(_st(_st(anIRClosure)._scope())._alias())).__comma(") { "));
  6681. $2=_st($1)._nextPutAll_(_st((smalltalk.String || String))._cr());
  6682. _st(aBlock)._value();
  6683. _st(self)._nextPutAll_("})");
  6684. return self}, self, "nextPutBlockContextFor:during:", [anIRClosure,aBlock], smalltalk.JSStream)},
  6685. args: ["anIRClosure", "aBlock"],
  6686. source: "nextPutBlockContextFor: anIRClosure during: aBlock\x0a\x09self \x0a \x09nextPutAll: 'return smalltalk.withContext(function(', anIRClosure scope alias, ') { '; \x0a nextPutAll: String cr.\x0a aBlock value.\x0a self nextPutAll: '})'",
  6687. messageSends: ["nextPutAll:", ",", "alias", "scope", "cr", "value"],
  6688. referencedClasses: ["String"]
  6689. }),
  6690. smalltalk.JSStream);
  6691. smalltalk.addMethod(
  6692. "_nextPutClosureWith_arguments_",
  6693. smalltalk.method({
  6694. selector: "nextPutClosureWith:arguments:",
  6695. category: '*Compiler',
  6696. fn: function (aBlock,anArray){
  6697. var self=this;
  6698. return smalltalk.withContext(function($ctx1) { var $1,$2;
  6699. _st(self["@stream"])._nextPutAll_("(function(");
  6700. _st(anArray)._do_separatedBy_((function(each){
  6701. return smalltalk.withContext(function($ctx2) { return _st(self["@stream"])._nextPutAll_(_st(each)._asVariableName());
  6702. })}),(function(){
  6703. return smalltalk.withContext(function($ctx2) { return _st(self["@stream"])._nextPut_(",");
  6704. })}));
  6705. $1=self["@stream"];
  6706. _st($1)._nextPutAll_("){");
  6707. $2=_st($1)._lf();
  6708. _st(aBlock)._value();
  6709. _st(self["@stream"])._nextPutAll_("})");
  6710. return self}, self, "nextPutClosureWith:arguments:", [aBlock,anArray], smalltalk.JSStream)},
  6711. args: ["aBlock", "anArray"],
  6712. 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 nextPutAll: '})'",
  6713. messageSends: ["nextPutAll:", "do:separatedBy:", "asVariableName", "nextPut:", "lf", "value"],
  6714. referencedClasses: []
  6715. }),
  6716. smalltalk.JSStream);
  6717. smalltalk.addMethod(
  6718. "_nextPutContextFor_during_",
  6719. smalltalk.method({
  6720. selector: "nextPutContextFor:during:",
  6721. category: '*Compiler',
  6722. fn: function (aMethod,aBlock){
  6723. var self=this;
  6724. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5,$6;
  6725. $1=self;
  6726. _st($1)._nextPutAll_(_st(_st("return smalltalk.withContext(function(").__comma(_st(_st(aMethod)._scope())._alias())).__comma(") { "));
  6727. $2=_st($1)._nextPutAll_(_st((smalltalk.String || String))._cr());
  6728. _st(aBlock)._value();
  6729. $3=self;
  6730. _st($3)._nextPutAll_("}, self, ");
  6731. $4=_st($3)._nextPutAll_(_st(_st(_st(aMethod)._selector())._asJavascript()).__comma(", ["));
  6732. _st(_st(aMethod)._arguments())._do_separatedBy_((function(each){
  6733. return smalltalk.withContext(function($ctx2) { return _st(self)._nextPutAll_(_st(each)._asVariableName());
  6734. })}),(function(){
  6735. return smalltalk.withContext(function($ctx2) { return _st(self)._nextPutAll_(",");
  6736. })}));
  6737. $5=self;
  6738. _st($5)._nextPutAll_("], ");
  6739. _st($5)._nextPutAll_(_st(_st(aMethod)._theClass())._asJavascript());
  6740. $6=_st($5)._nextPutAll_(")");
  6741. return self}, self, "nextPutContextFor:during:", [aMethod,aBlock], smalltalk.JSStream)},
  6742. args: ["aMethod", "aBlock"],
  6743. source: "nextPutContextFor: aMethod during: aBlock\x0a\x09self \x0a \x09nextPutAll: 'return smalltalk.withContext(function(', aMethod scope alias, ') { '; \x0a nextPutAll: String cr.\x0a aBlock value.\x0a self \x0a \x09nextPutAll: '}, self, ';\x0a nextPutAll: aMethod selector asJavascript, ', ['.\x0a aMethod arguments \x0a \x09do: [ :each | self nextPutAll: each asVariableName ]\x0a \x09separatedBy: [ self nextPutAll: ',' ].\x0a self nextPutAll: '], ';\x0a nextPutAll: aMethod theClass asJavascript;\x0a nextPutAll: ')'",
  6744. messageSends: ["nextPutAll:", ",", "alias", "scope", "cr", "value", "asJavascript", "selector", "do:separatedBy:", "asVariableName", "arguments", "theClass"],
  6745. referencedClasses: ["String"]
  6746. }),
  6747. smalltalk.JSStream);
  6748. smalltalk.addMethod(
  6749. "_nextPutFunctionWith_arguments_",
  6750. smalltalk.method({
  6751. selector: "nextPutFunctionWith:arguments:",
  6752. category: '*Compiler',
  6753. fn: function (aBlock,anArray){
  6754. var self=this;
  6755. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  6756. _st(self["@stream"])._nextPutAll_("fn: function(");
  6757. _st(anArray)._do_separatedBy_((function(each){
  6758. return smalltalk.withContext(function($ctx2) { return _st(self["@stream"])._nextPutAll_(_st(each)._asVariableName());
  6759. })}),(function(){
  6760. return smalltalk.withContext(function($ctx2) { return _st(self["@stream"])._nextPut_(",");
  6761. })}));
  6762. $1=self["@stream"];
  6763. _st($1)._nextPutAll_("){");
  6764. $2=_st($1)._lf();
  6765. $3=self["@stream"];
  6766. _st($3)._nextPutAll_("var self=this;");
  6767. $4=_st($3)._lf();
  6768. _st(aBlock)._value();
  6769. _st(self["@stream"])._nextPutAll_("}");
  6770. return self}, self, "nextPutFunctionWith:arguments:", [aBlock,anArray], smalltalk.JSStream)},
  6771. args: ["aBlock", "anArray"],
  6772. 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 nextPutAll: '}'",
  6773. messageSends: ["nextPutAll:", "do:separatedBy:", "asVariableName", "nextPut:", "lf", "value"],
  6774. referencedClasses: []
  6775. }),
  6776. smalltalk.JSStream);
  6777. smalltalk.addMethod(
  6778. "_nextPutIf_with_",
  6779. smalltalk.method({
  6780. selector: "nextPutIf:with:",
  6781. category: '*Compiler',
  6782. fn: function (aBlock,anotherBlock){
  6783. var self=this;
  6784. return smalltalk.withContext(function($ctx1) { var $1,$2;
  6785. _st(self["@stream"])._nextPutAll_("if(");
  6786. _st(aBlock)._value();
  6787. $1=self["@stream"];
  6788. _st($1)._nextPutAll_("){");
  6789. $2=_st($1)._lf();
  6790. _st(anotherBlock)._value();
  6791. _st(self["@stream"])._nextPutAll_("}");
  6792. return self}, self, "nextPutIf:with:", [aBlock,anotherBlock], smalltalk.JSStream)},
  6793. args: ["aBlock", "anotherBlock"],
  6794. source: "nextPutIf: aBlock with: anotherBlock\x0a\x09stream nextPutAll: 'if('.\x0a\x09aBlock value.\x0a\x09stream nextPutAll: '){'; lf.\x0a\x09anotherBlock value.\x0a\x09stream nextPutAll: '}'",
  6795. messageSends: ["nextPutAll:", "value", "lf"],
  6796. referencedClasses: []
  6797. }),
  6798. smalltalk.JSStream);
  6799. smalltalk.addMethod(
  6800. "_nextPutIfElse_with_with_",
  6801. smalltalk.method({
  6802. selector: "nextPutIfElse:with:with:",
  6803. category: '*Compiler',
  6804. fn: function (aBlock,ifBlock,elseBlock){
  6805. var self=this;
  6806. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  6807. _st(self["@stream"])._nextPutAll_("if(");
  6808. _st(aBlock)._value();
  6809. $1=self["@stream"];
  6810. _st($1)._nextPutAll_("){");
  6811. $2=_st($1)._lf();
  6812. _st(ifBlock)._value();
  6813. $3=self["@stream"];
  6814. _st($3)._nextPutAll_("} else {");
  6815. $4=_st($3)._lf();
  6816. _st(elseBlock)._value();
  6817. _st(self["@stream"])._nextPutAll_("}");
  6818. return self}, self, "nextPutIfElse:with:with:", [aBlock,ifBlock,elseBlock], smalltalk.JSStream)},
  6819. args: ["aBlock", "ifBlock", "elseBlock"],
  6820. 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: '}'",
  6821. messageSends: ["nextPutAll:", "value", "lf"],
  6822. referencedClasses: []
  6823. }),
  6824. smalltalk.JSStream);
  6825. smalltalk.addMethod(
  6826. "_nextPutMethodDeclaration_with_",
  6827. smalltalk.method({
  6828. selector: "nextPutMethodDeclaration:with:",
  6829. category: '*Compiler',
  6830. fn: function (aMethod,aBlock){
  6831. var self=this;
  6832. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5,$6;
  6833. $1=self["@stream"];
  6834. _st($1)._nextPutAll_("smalltalk.method({");
  6835. _st($1)._lf();
  6836. _st($1)._nextPutAll_(_st(_st("selector: \x22").__comma(_st(aMethod)._selector())).__comma("\x22,"));
  6837. _st($1)._lf();
  6838. _st($1)._nextPutAll_(_st(_st("source: ").__comma(_st(_st(aMethod)._source())._asJavascript())).__comma(","));
  6839. $2=_st($1)._lf();
  6840. _st(aBlock)._value();
  6841. $3=self["@stream"];
  6842. _st($3)._nextPutAll_(_st(_st(",").__comma(_st((smalltalk.String || String))._lf())).__comma("messageSends: "));
  6843. _st($3)._nextPutAll_(_st(_st(_st(_st(aMethod)._messageSends())._asArray())._asJavascript()).__comma(","));
  6844. _st($3)._lf();
  6845. _st($3)._nextPutAll_(_st(_st("args: ").__comma(_st(_st(_st(_st(aMethod)._arguments())._collect_((function(each){
  6846. return smalltalk.withContext(function($ctx2) { return _st(each)._value();
  6847. })})))._asArray())._asJavascript())).__comma(","));
  6848. _st($3)._lf();
  6849. $4=_st($3)._nextPutAll_("referencedClasses: [");
  6850. _st(_st(aMethod)._classReferences())._do_separatedBy_((function(each){
  6851. return smalltalk.withContext(function($ctx2) { return _st(self["@stream"])._nextPutAll_(_st(each)._asJavascript());
  6852. })}),(function(){
  6853. return smalltalk.withContext(function($ctx2) { return _st(self["@stream"])._nextPutAll_(",");
  6854. })}));
  6855. $5=self["@stream"];
  6856. _st($5)._nextPutAll_("]");
  6857. $6=_st($5)._nextPutAll_("})");
  6858. return self}, self, "nextPutMethodDeclaration:with:", [aMethod,aBlock], smalltalk.JSStream)},
  6859. args: ["aMethod", "aBlock"],
  6860. source: "nextPutMethodDeclaration: aMethod with: aBlock\x0a\x09stream \x0a\x09\x09nextPutAll: 'smalltalk.method({'; lf;\x0a\x09\x09nextPutAll: 'selector: \x22', aMethod selector, '\x22,'; 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 nextPutAll: '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: '})'",
  6861. messageSends: ["nextPutAll:", "lf", ",", "selector", "asJavascript", "source", "value", "asArray", "messageSends", "collect:", "arguments", "do:separatedBy:", "classReferences"],
  6862. referencedClasses: ["String"]
  6863. }),
  6864. smalltalk.JSStream);
  6865. smalltalk.addMethod(
  6866. "_nextPutNonLocalReturnHandlingWith_",
  6867. smalltalk.method({
  6868. selector: "nextPutNonLocalReturnHandlingWith:",
  6869. category: '*Compiler',
  6870. fn: function (aBlock){
  6871. var self=this;
  6872. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  6873. $1=self["@stream"];
  6874. _st($1)._nextPutAll_("var $early={};");
  6875. _st($1)._lf();
  6876. _st($1)._nextPutAll_("try {");
  6877. $2=_st($1)._lf();
  6878. _st(aBlock)._value();
  6879. $3=self["@stream"];
  6880. _st($3)._nextPutAll_("}");
  6881. _st($3)._lf();
  6882. _st($3)._nextPutAll_("catch(e) {if(e===$early)return e[0]; throw e}");
  6883. $4=_st($3)._lf();
  6884. return self}, self, "nextPutNonLocalReturnHandlingWith:", [aBlock], smalltalk.JSStream)},
  6885. args: ["aBlock"],
  6886. 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",
  6887. messageSends: ["nextPutAll:", "lf", "value"],
  6888. referencedClasses: []
  6889. }),
  6890. smalltalk.JSStream);
  6891. smalltalk.addMethod(
  6892. "_nextPutNonLocalReturnWith_",
  6893. smalltalk.method({
  6894. selector: "nextPutNonLocalReturnWith:",
  6895. category: '*Compiler',
  6896. fn: function (aBlock){
  6897. var self=this;
  6898. return smalltalk.withContext(function($ctx1) { _st(self["@stream"])._nextPutAll_("throw $early=[");
  6899. _st(aBlock)._value();
  6900. _st(self["@stream"])._nextPutAll_("]");
  6901. return self}, self, "nextPutNonLocalReturnWith:", [aBlock], smalltalk.JSStream)},
  6902. args: ["aBlock"],
  6903. source: "nextPutNonLocalReturnWith: aBlock\x0a\x09stream nextPutAll: 'throw $early=['.\x0a\x09aBlock value.\x0a\x09stream nextPutAll: ']'",
  6904. messageSends: ["nextPutAll:", "value"],
  6905. referencedClasses: []
  6906. }),
  6907. smalltalk.JSStream);
  6908. smalltalk.addMethod(
  6909. "_nextPutReturn",
  6910. smalltalk.method({
  6911. selector: "nextPutReturn",
  6912. category: '*Compiler',
  6913. fn: function (){
  6914. var self=this;
  6915. return smalltalk.withContext(function($ctx1) { _st(self["@stream"])._nextPutAll_("return ");
  6916. return self}, self, "nextPutReturn", [], smalltalk.JSStream)},
  6917. args: [],
  6918. source: "nextPutReturn\x0a\x09stream nextPutAll: 'return '",
  6919. messageSends: ["nextPutAll:"],
  6920. referencedClasses: []
  6921. }),
  6922. smalltalk.JSStream);
  6923. smalltalk.addMethod(
  6924. "_nextPutReturnWith_",
  6925. smalltalk.method({
  6926. selector: "nextPutReturnWith:",
  6927. category: '*Compiler',
  6928. fn: function (aBlock){
  6929. var self=this;
  6930. return smalltalk.withContext(function($ctx1) { _st(self)._nextPutReturn();
  6931. _st(aBlock)._value();
  6932. return self}, self, "nextPutReturnWith:", [aBlock], smalltalk.JSStream)},
  6933. args: ["aBlock"],
  6934. source: "nextPutReturnWith: aBlock\x0a\x09self nextPutReturn.\x0a\x09aBlock value",
  6935. messageSends: ["nextPutReturn", "value"],
  6936. referencedClasses: []
  6937. }),
  6938. smalltalk.JSStream);
  6939. smalltalk.addMethod(
  6940. "_nextPutSequenceWith_",
  6941. smalltalk.method({
  6942. selector: "nextPutSequenceWith:",
  6943. category: '*Compiler',
  6944. fn: function (aBlock){
  6945. var self=this;
  6946. return smalltalk.withContext(function($ctx1) { _st(aBlock)._value();
  6947. return self}, self, "nextPutSequenceWith:", [aBlock], smalltalk.JSStream)},
  6948. args: ["aBlock"],
  6949. source: "nextPutSequenceWith: aBlock\x0a\x09\x22stream \x0a\x09\x09nextPutAll: 'switch(smalltalk.thisContext.pc){'; lf.\x22\x0a\x09aBlock value.\x0a\x09\x22stream \x0a\x09\x09nextPutAll: '};'; lf\x22",
  6950. messageSends: ["value"],
  6951. referencedClasses: []
  6952. }),
  6953. smalltalk.JSStream);
  6954. smalltalk.addMethod(
  6955. "_nextPutStatement_with_",
  6956. smalltalk.method({
  6957. selector: "nextPutStatement:with:",
  6958. category: '*Compiler',
  6959. fn: function (anInteger,aBlock){
  6960. var self=this;
  6961. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  6962. $1=self["@stream"];
  6963. _st($1)._nextPutAll_(_st(_st("case ").__comma(_st(anInteger)._asString())).__comma(":"));
  6964. $2=_st($1)._lf();
  6965. _st(self)._nextPutStatementWith_(aBlock);
  6966. $3=self["@stream"];
  6967. _st($3)._nextPutAll_(_st(_st("smalltalk.thisContext.pc=").__comma(_st(_st(anInteger).__plus((1)))._asString())).__comma(";"));
  6968. $4=_st($3)._lf();
  6969. return self}, self, "nextPutStatement:with:", [anInteger,aBlock], smalltalk.JSStream)},
  6970. args: ["anInteger", "aBlock"],
  6971. source: "nextPutStatement: anInteger with: aBlock\x0a\x09stream nextPutAll: 'case ', anInteger asString, ':'; lf.\x0a\x09self nextPutStatementWith: aBlock.\x0a\x09stream nextPutAll: 'smalltalk.thisContext.pc=', (anInteger + 1) asString, ';'; lf",
  6972. messageSends: ["nextPutAll:", ",", "asString", "lf", "nextPutStatementWith:", "+"],
  6973. referencedClasses: []
  6974. }),
  6975. smalltalk.JSStream);
  6976. smalltalk.addMethod(
  6977. "_nextPutStatementWith_",
  6978. smalltalk.method({
  6979. selector: "nextPutStatementWith:",
  6980. category: '*Compiler',
  6981. fn: function (aBlock){
  6982. var self=this;
  6983. return smalltalk.withContext(function($ctx1) { var $1,$2;
  6984. _st(aBlock)._value();
  6985. $1=self["@stream"];
  6986. _st($1)._nextPutAll_(";");
  6987. $2=_st($1)._lf();
  6988. return self}, self, "nextPutStatementWith:", [aBlock], smalltalk.JSStream)},
  6989. args: ["aBlock"],
  6990. source: "nextPutStatementWith: aBlock\x0a\x09aBlock value.\x0a\x09stream nextPutAll: ';'; lf",
  6991. messageSends: ["value", "nextPutAll:", "lf"],
  6992. referencedClasses: []
  6993. }),
  6994. smalltalk.JSStream);
  6995. smalltalk.addMethod(
  6996. "_nextPutVar_",
  6997. smalltalk.method({
  6998. selector: "nextPutVar:",
  6999. category: '*Compiler',
  7000. fn: function (aString){
  7001. var self=this;
  7002. return smalltalk.withContext(function($ctx1) { var $1,$2;
  7003. $1=self["@stream"];
  7004. _st($1)._nextPutAll_(_st(_st("var ").__comma(aString)).__comma(";"));
  7005. $2=_st($1)._lf();
  7006. return self}, self, "nextPutVar:", [aString], smalltalk.JSStream)},
  7007. args: ["aString"],
  7008. source: "nextPutVar: aString\x0a\x09stream nextPutAll: 'var ', aString, ';'; lf",
  7009. messageSends: ["nextPutAll:", ",", "lf"],
  7010. referencedClasses: []
  7011. }),
  7012. smalltalk.JSStream);
  7013. smalltalk.addMethod(
  7014. "_nextPutVars_",
  7015. smalltalk.method({
  7016. selector: "nextPutVars:",
  7017. category: '*Compiler',
  7018. fn: function (aCollection){
  7019. var self=this;
  7020. return smalltalk.withContext(function($ctx1) { var $1,$2;
  7021. _st(self["@stream"])._nextPutAll_("var ");
  7022. _st(aCollection)._do_separatedBy_((function(each){
  7023. return smalltalk.withContext(function($ctx2) { return _st(self["@stream"])._nextPutAll_(each);
  7024. })}),(function(){
  7025. return smalltalk.withContext(function($ctx2) { return _st(self["@stream"])._nextPutAll_(",");
  7026. })}));
  7027. $1=self["@stream"];
  7028. _st($1)._nextPutAll_(";");
  7029. $2=_st($1)._lf();
  7030. return self}, self, "nextPutVars:", [aCollection], smalltalk.JSStream)},
  7031. args: ["aCollection"],
  7032. source: "nextPutVars: aCollection\x0a\x09stream nextPutAll: 'var '.\x0a\x09aCollection \x0a\x09\x09do: [ :each | stream nextPutAll: each ]\x0a\x09\x09separatedBy: [ stream nextPutAll: ',' ].\x0a\x09stream nextPutAll: ';'; lf",
  7033. messageSends: ["nextPutAll:", "do:separatedBy:", "lf"],
  7034. referencedClasses: []
  7035. }),
  7036. smalltalk.JSStream);
  7037. smalltalk.addMethod(
  7038. "_addArg_",
  7039. smalltalk.method({
  7040. selector: "addArg:",
  7041. category: '*Compiler',
  7042. fn: function (aString){
  7043. var self=this;
  7044. return smalltalk.withContext(function($ctx1) { _st(_st(self)._args())._at_put_(aString,_st((smalltalk.ArgVar || ArgVar))._on_(aString));
  7045. _st(_st(_st(self)._args())._at_(aString))._scope_(self);
  7046. return self}, self, "addArg:", [aString], smalltalk.LexicalScope)},
  7047. args: ["aString"],
  7048. source: "addArg: aString\x0a\x09self args at: aString put: (ArgVar on: aString).\x0a\x09(self args at: aString) scope: self",
  7049. messageSends: ["at:put:", "on:", "args", "scope:", "at:"],
  7050. referencedClasses: ["ArgVar"]
  7051. }),
  7052. smalltalk.LexicalScope);
  7053. smalltalk.addMethod(
  7054. "_addTemp_",
  7055. smalltalk.method({
  7056. selector: "addTemp:",
  7057. category: '*Compiler',
  7058. fn: function (aString){
  7059. var self=this;
  7060. return smalltalk.withContext(function($ctx1) { _st(_st(self)._temps())._at_put_(aString,_st((smalltalk.TempVar || TempVar))._on_(aString));
  7061. _st(_st(_st(self)._temps())._at_(aString))._scope_(self);
  7062. return self}, self, "addTemp:", [aString], smalltalk.LexicalScope)},
  7063. args: ["aString"],
  7064. source: "addTemp: aString\x0a\x09self temps at: aString put: (TempVar on: aString).\x0a\x09(self temps at: aString) scope: self",
  7065. messageSends: ["at:put:", "on:", "temps", "scope:", "at:"],
  7066. referencedClasses: ["TempVar"]
  7067. }),
  7068. smalltalk.LexicalScope);
  7069. smalltalk.addMethod(
  7070. "_alias",
  7071. smalltalk.method({
  7072. selector: "alias",
  7073. category: '*Compiler',
  7074. fn: function (){
  7075. var self=this;
  7076. return smalltalk.withContext(function($ctx1) { var $1;
  7077. $1=_st("$ctx").__comma(_st(_st(self)._scopeLevel())._asString());
  7078. return $1;
  7079. }, self, "alias", [], smalltalk.LexicalScope)},
  7080. args: [],
  7081. source: "alias\x0a\x09^ '$ctx', self scopeLevel asString",
  7082. messageSends: [",", "asString", "scopeLevel"],
  7083. referencedClasses: []
  7084. }),
  7085. smalltalk.LexicalScope);
  7086. smalltalk.addMethod(
  7087. "_allVariableNames",
  7088. smalltalk.method({
  7089. selector: "allVariableNames",
  7090. category: '*Compiler',
  7091. fn: function (){
  7092. var self=this;
  7093. return smalltalk.withContext(function($ctx1) { var $1;
  7094. $1=_st(_st(_st(self)._args())._keys()).__comma(_st(_st(self)._temps())._keys());
  7095. return $1;
  7096. }, self, "allVariableNames", [], smalltalk.LexicalScope)},
  7097. args: [],
  7098. source: "allVariableNames\x0a\x09^ self args keys, self temps keys",
  7099. messageSends: [",", "keys", "temps", "args"],
  7100. referencedClasses: []
  7101. }),
  7102. smalltalk.LexicalScope);
  7103. smalltalk.addMethod(
  7104. "_args",
  7105. smalltalk.method({
  7106. selector: "args",
  7107. category: '*Compiler',
  7108. fn: function (){
  7109. var self=this;
  7110. return smalltalk.withContext(function($ctx1) { var $2,$1;
  7111. $2=self["@args"];
  7112. if(($receiver = $2) == nil || $receiver == undefined){
  7113. self["@args"]=_st((smalltalk.Dictionary || Dictionary))._new();
  7114. $1=self["@args"];
  7115. } else {
  7116. $1=$2;
  7117. };
  7118. return $1;
  7119. }, self, "args", [], smalltalk.LexicalScope)},
  7120. args: [],
  7121. source: "args\x0a\x09^ args ifNil: [ args := Dictionary new ]",
  7122. messageSends: ["ifNil:", "new"],
  7123. referencedClasses: ["Dictionary"]
  7124. }),
  7125. smalltalk.LexicalScope);
  7126. smalltalk.addMethod(
  7127. "_bindingFor_",
  7128. smalltalk.method({
  7129. selector: "bindingFor:",
  7130. category: '*Compiler',
  7131. fn: function (aStringOrNode){
  7132. var self=this;
  7133. return smalltalk.withContext(function($ctx1) { var $1;
  7134. $1=_st(_st(self)._pseudoVars())._at_ifAbsent_(_st(aStringOrNode)._value(),(function(){
  7135. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._args())._at_ifAbsent_(_st(aStringOrNode)._value(),(function(){
  7136. return smalltalk.withContext(function($ctx3) { return _st(_st(self)._temps())._at_ifAbsent_(_st(aStringOrNode)._value(),(function(){
  7137. return smalltalk.withContext(function($ctx4) { return nil;
  7138. })}));
  7139. })}));
  7140. })}));
  7141. return $1;
  7142. }, self, "bindingFor:", [aStringOrNode], smalltalk.LexicalScope)},
  7143. args: ["aStringOrNode"],
  7144. source: "bindingFor: aStringOrNode\x0a\x09^ self pseudoVars at: aStringOrNode value ifAbsent: [ \x0a\x09\x09self args at: aStringOrNode value ifAbsent: [\x0a\x09\x09\x09self temps at: aStringOrNode value ifAbsent: [ nil ]]]",
  7145. messageSends: ["at:ifAbsent:", "value", "temps", "args", "pseudoVars"],
  7146. referencedClasses: []
  7147. }),
  7148. smalltalk.LexicalScope);
  7149. smalltalk.addMethod(
  7150. "_canInlineNonLocalReturns",
  7151. smalltalk.method({
  7152. selector: "canInlineNonLocalReturns",
  7153. category: '*Compiler',
  7154. fn: function (){
  7155. var self=this;
  7156. return smalltalk.withContext(function($ctx1) { var $1;
  7157. $1=_st(_st(self)._isInlined())._and_((function(){
  7158. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._outerScope())._canInlineNonLocalReturns();
  7159. })}));
  7160. return $1;
  7161. }, self, "canInlineNonLocalReturns", [], smalltalk.LexicalScope)},
  7162. args: [],
  7163. source: "canInlineNonLocalReturns\x0a\x09^ self isInlined and: [ self outerScope canInlineNonLocalReturns ]",
  7164. messageSends: ["and:", "canInlineNonLocalReturns", "outerScope", "isInlined"],
  7165. referencedClasses: []
  7166. }),
  7167. smalltalk.LexicalScope);
  7168. smalltalk.addMethod(
  7169. "_instruction",
  7170. smalltalk.method({
  7171. selector: "instruction",
  7172. category: '*Compiler',
  7173. fn: function (){
  7174. var self=this;
  7175. return smalltalk.withContext(function($ctx1) { var $1;
  7176. $1=self["@instruction"];
  7177. return $1;
  7178. }, self, "instruction", [], smalltalk.LexicalScope)},
  7179. args: [],
  7180. source: "instruction\x0a\x09^ instruction",
  7181. messageSends: [],
  7182. referencedClasses: []
  7183. }),
  7184. smalltalk.LexicalScope);
  7185. smalltalk.addMethod(
  7186. "_instruction_",
  7187. smalltalk.method({
  7188. selector: "instruction:",
  7189. category: '*Compiler',
  7190. fn: function (anIRInstruction){
  7191. var self=this;
  7192. return smalltalk.withContext(function($ctx1) { self["@instruction"]=anIRInstruction;
  7193. return self}, self, "instruction:", [anIRInstruction], smalltalk.LexicalScope)},
  7194. args: ["anIRInstruction"],
  7195. source: "instruction: anIRInstruction\x0a\x09instruction := anIRInstruction",
  7196. messageSends: [],
  7197. referencedClasses: []
  7198. }),
  7199. smalltalk.LexicalScope);
  7200. smalltalk.addMethod(
  7201. "_isBlockScope",
  7202. smalltalk.method({
  7203. selector: "isBlockScope",
  7204. category: '*Compiler',
  7205. fn: function (){
  7206. var self=this;
  7207. return smalltalk.withContext(function($ctx1) { var $1;
  7208. $1=_st(_st(self)._isMethodScope())._not();
  7209. return $1;
  7210. }, self, "isBlockScope", [], smalltalk.LexicalScope)},
  7211. args: [],
  7212. source: "isBlockScope\x0a\x09^ self isMethodScope not",
  7213. messageSends: ["not", "isMethodScope"],
  7214. referencedClasses: []
  7215. }),
  7216. smalltalk.LexicalScope);
  7217. smalltalk.addMethod(
  7218. "_isInlined",
  7219. smalltalk.method({
  7220. selector: "isInlined",
  7221. category: '*Compiler',
  7222. fn: function (){
  7223. var self=this;
  7224. return smalltalk.withContext(function($ctx1) { var $1;
  7225. $1=_st(_st(_st(self)._instruction())._notNil())._and_((function(){
  7226. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._instruction())._isInlined();
  7227. })}));
  7228. return $1;
  7229. }, self, "isInlined", [], smalltalk.LexicalScope)},
  7230. args: [],
  7231. source: "isInlined\x0a\x09^ self instruction notNil and: [\x0a \x09self instruction isInlined ]",
  7232. messageSends: ["and:", "isInlined", "instruction", "notNil"],
  7233. referencedClasses: []
  7234. }),
  7235. smalltalk.LexicalScope);
  7236. smalltalk.addMethod(
  7237. "_isMethodScope",
  7238. smalltalk.method({
  7239. selector: "isMethodScope",
  7240. category: '*Compiler',
  7241. fn: function (){
  7242. var self=this;
  7243. return smalltalk.withContext(function($ctx1) { return false;
  7244. }, self, "isMethodScope", [], smalltalk.LexicalScope)},
  7245. args: [],
  7246. source: "isMethodScope\x0a\x09^ false",
  7247. messageSends: [],
  7248. referencedClasses: []
  7249. }),
  7250. smalltalk.LexicalScope);
  7251. smalltalk.addMethod(
  7252. "_lookupVariable_",
  7253. smalltalk.method({
  7254. selector: "lookupVariable:",
  7255. category: '*Compiler',
  7256. fn: function (aNode){
  7257. var self=this;
  7258. return smalltalk.withContext(function($ctx1) { var $1,$3,$2,$4;
  7259. $ctx1.locals.lookup=nil;
  7260. $ctx1.locals.lookup=_st(self)._bindingFor_(aNode);
  7261. $1=$ctx1.locals.lookup;
  7262. $2=(function(){
  7263. return smalltalk.withContext(function($ctx2) { $3=_st(self)._outerScope();
  7264. if(($receiver = $3) == nil || $receiver == undefined){
  7265. $ctx1.locals.lookup=$3;
  7266. } else {
  7267. $ctx1.locals.lookup=_st(_st(self)._outerScope())._lookupVariable_(aNode);
  7268. };
  7269. return $ctx1.locals.lookup;
  7270. })});
  7271. _st($1)._ifNil_($2);
  7272. $4=$ctx1.locals.lookup;
  7273. return $4;
  7274. }, self, "lookupVariable:", [aNode], smalltalk.LexicalScope)},
  7275. args: ["aNode"],
  7276. source: "lookupVariable: aNode\x0a\x09| lookup |\x0a\x09lookup := (self bindingFor: aNode).\x0a\x09lookup ifNil: [\x0a\x09\x09lookup := self outerScope ifNotNil: [ \x0a\x09\x09\x09(self outerScope lookupVariable: aNode) ]].\x0a\x09^ lookup",
  7277. messageSends: ["bindingFor:", "ifNil:", "ifNotNil:", "lookupVariable:", "outerScope"],
  7278. referencedClasses: []
  7279. }),
  7280. smalltalk.LexicalScope);
  7281. smalltalk.addMethod(
  7282. "_methodScope",
  7283. smalltalk.method({
  7284. selector: "methodScope",
  7285. category: '*Compiler',
  7286. fn: function (){
  7287. var self=this;
  7288. return smalltalk.withContext(function($ctx1) { var $2,$1;
  7289. $2=_st(self)._outerScope();
  7290. if(($receiver = $2) == nil || $receiver == undefined){
  7291. $1=$2;
  7292. } else {
  7293. $1=_st(_st(self)._outerScope())._methodScope();
  7294. };
  7295. return $1;
  7296. }, self, "methodScope", [], smalltalk.LexicalScope)},
  7297. args: [],
  7298. source: "methodScope\x0a\x09^ self outerScope ifNotNil: [\x0a\x09\x09self outerScope methodScope ]",
  7299. messageSends: ["ifNotNil:", "methodScope", "outerScope"],
  7300. referencedClasses: []
  7301. }),
  7302. smalltalk.LexicalScope);
  7303. smalltalk.addMethod(
  7304. "_node",
  7305. smalltalk.method({
  7306. selector: "node",
  7307. category: '*Compiler',
  7308. fn: function (){
  7309. var self=this;
  7310. return smalltalk.withContext(function($ctx1) { var $1;
  7311. $1=self["@node"];
  7312. return $1;
  7313. }, self, "node", [], smalltalk.LexicalScope)},
  7314. args: [],
  7315. source: "node\x0a\x09\x22Answer the node in which I am defined\x22\x0a\x09\x0a\x09^ node",
  7316. messageSends: [],
  7317. referencedClasses: []
  7318. }),
  7319. smalltalk.LexicalScope);
  7320. smalltalk.addMethod(
  7321. "_node_",
  7322. smalltalk.method({
  7323. selector: "node:",
  7324. category: '*Compiler',
  7325. fn: function (aNode){
  7326. var self=this;
  7327. return smalltalk.withContext(function($ctx1) { self["@node"]=aNode;
  7328. return self}, self, "node:", [aNode], smalltalk.LexicalScope)},
  7329. args: ["aNode"],
  7330. source: "node: aNode\x0a\x09node := aNode",
  7331. messageSends: [],
  7332. referencedClasses: []
  7333. }),
  7334. smalltalk.LexicalScope);
  7335. smalltalk.addMethod(
  7336. "_outerScope",
  7337. smalltalk.method({
  7338. selector: "outerScope",
  7339. category: '*Compiler',
  7340. fn: function (){
  7341. var self=this;
  7342. return smalltalk.withContext(function($ctx1) { var $1;
  7343. $1=self["@outerScope"];
  7344. return $1;
  7345. }, self, "outerScope", [], smalltalk.LexicalScope)},
  7346. args: [],
  7347. source: "outerScope\x0a\x09^ outerScope",
  7348. messageSends: [],
  7349. referencedClasses: []
  7350. }),
  7351. smalltalk.LexicalScope);
  7352. smalltalk.addMethod(
  7353. "_outerScope_",
  7354. smalltalk.method({
  7355. selector: "outerScope:",
  7356. category: '*Compiler',
  7357. fn: function (aLexicalScope){
  7358. var self=this;
  7359. return smalltalk.withContext(function($ctx1) { self["@outerScope"]=aLexicalScope;
  7360. return self}, self, "outerScope:", [aLexicalScope], smalltalk.LexicalScope)},
  7361. args: ["aLexicalScope"],
  7362. source: "outerScope: aLexicalScope\x0a\x09outerScope := aLexicalScope",
  7363. messageSends: [],
  7364. referencedClasses: []
  7365. }),
  7366. smalltalk.LexicalScope);
  7367. smalltalk.addMethod(
  7368. "_pseudoVars",
  7369. smalltalk.method({
  7370. selector: "pseudoVars",
  7371. category: '*Compiler',
  7372. fn: function (){
  7373. var self=this;
  7374. return smalltalk.withContext(function($ctx1) { var $1;
  7375. $1=_st(_st(self)._methodScope())._pseudoVars();
  7376. return $1;
  7377. }, self, "pseudoVars", [], smalltalk.LexicalScope)},
  7378. args: [],
  7379. source: "pseudoVars\x0a\x09^ self methodScope pseudoVars",
  7380. messageSends: ["pseudoVars", "methodScope"],
  7381. referencedClasses: []
  7382. }),
  7383. smalltalk.LexicalScope);
  7384. smalltalk.addMethod(
  7385. "_scopeLevel",
  7386. smalltalk.method({
  7387. selector: "scopeLevel",
  7388. category: '*Compiler',
  7389. fn: function (){
  7390. var self=this;
  7391. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  7392. $1=_st(self)._outerScope();
  7393. if(($receiver = $1) == nil || $receiver == undefined){
  7394. return (1);
  7395. } else {
  7396. $1;
  7397. };
  7398. $2=_st(self)._isInlined();
  7399. if(smalltalk.assert($2)){
  7400. $3=_st(_st(self)._outerScope())._scopeLevel();
  7401. return $3;
  7402. };
  7403. $4=_st(_st(_st(self)._outerScope())._scopeLevel()).__plus((1));
  7404. return $4;
  7405. }, self, "scopeLevel", [], smalltalk.LexicalScope)},
  7406. args: [],
  7407. source: "scopeLevel\x0a\x09self outerScope ifNil: [ ^ 1 ].\x0a\x09self isInlined ifTrue: [ ^ self outerScope scopeLevel ].\x0a \x0a\x09^ self outerScope scopeLevel + 1",
  7408. messageSends: ["ifNil:", "outerScope", "ifTrue:", "scopeLevel", "isInlined", "+"],
  7409. referencedClasses: []
  7410. }),
  7411. smalltalk.LexicalScope);
  7412. smalltalk.addMethod(
  7413. "_temps",
  7414. smalltalk.method({
  7415. selector: "temps",
  7416. category: '*Compiler',
  7417. fn: function (){
  7418. var self=this;
  7419. return smalltalk.withContext(function($ctx1) { var $2,$1;
  7420. $2=self["@temps"];
  7421. if(($receiver = $2) == nil || $receiver == undefined){
  7422. self["@temps"]=_st((smalltalk.Dictionary || Dictionary))._new();
  7423. $1=self["@temps"];
  7424. } else {
  7425. $1=$2;
  7426. };
  7427. return $1;
  7428. }, self, "temps", [], smalltalk.LexicalScope)},
  7429. args: [],
  7430. source: "temps\x0a\x09^ temps ifNil: [ temps := Dictionary new ]",
  7431. messageSends: ["ifNil:", "new"],
  7432. referencedClasses: ["Dictionary"]
  7433. }),
  7434. smalltalk.LexicalScope);
  7435. smalltalk.addMethod(
  7436. "_addIVar_",
  7437. smalltalk.method({
  7438. selector: "addIVar:",
  7439. category: '*Compiler',
  7440. fn: function (aString){
  7441. var self=this;
  7442. return smalltalk.withContext(function($ctx1) { _st(_st(self)._iVars())._at_put_(aString,_st((smalltalk.InstanceVar || InstanceVar))._on_(aString));
  7443. _st(_st(_st(self)._iVars())._at_(aString))._scope_(self);
  7444. return self}, self, "addIVar:", [aString], smalltalk.MethodLexicalScope)},
  7445. args: ["aString"],
  7446. source: "addIVar: aString\x0a\x09self iVars at: aString put: (InstanceVar on: aString).\x0a\x09(self iVars at: aString) scope: self",
  7447. messageSends: ["at:put:", "on:", "iVars", "scope:", "at:"],
  7448. referencedClasses: ["InstanceVar"]
  7449. }),
  7450. smalltalk.MethodLexicalScope);
  7451. smalltalk.addMethod(
  7452. "_addNonLocalReturn_",
  7453. smalltalk.method({
  7454. selector: "addNonLocalReturn:",
  7455. category: '*Compiler',
  7456. fn: function (aScope){
  7457. var self=this;
  7458. return smalltalk.withContext(function($ctx1) { _st(_st(self)._nonLocalReturns())._add_(aScope);
  7459. return self}, self, "addNonLocalReturn:", [aScope], smalltalk.MethodLexicalScope)},
  7460. args: ["aScope"],
  7461. source: "addNonLocalReturn: aScope\x0a\x09self nonLocalReturns add: aScope",
  7462. messageSends: ["add:", "nonLocalReturns"],
  7463. referencedClasses: []
  7464. }),
  7465. smalltalk.MethodLexicalScope);
  7466. smalltalk.addMethod(
  7467. "_allVariableNames",
  7468. smalltalk.method({
  7469. selector: "allVariableNames",
  7470. category: '*Compiler',
  7471. fn: function (){
  7472. var self=this;
  7473. return smalltalk.withContext(function($ctx1) { var $1;
  7474. $1=_st(smalltalk.LexicalScope.fn.prototype._allVariableNames.apply(_st(self), [])).__comma(_st(_st(self)._iVars())._keys());
  7475. return $1;
  7476. }, self, "allVariableNames", [], smalltalk.MethodLexicalScope)},
  7477. args: [],
  7478. source: "allVariableNames\x0a\x09^ super allVariableNames, self iVars keys",
  7479. messageSends: [",", "keys", "iVars", "allVariableNames"],
  7480. referencedClasses: []
  7481. }),
  7482. smalltalk.MethodLexicalScope);
  7483. smalltalk.addMethod(
  7484. "_bindingFor_",
  7485. smalltalk.method({
  7486. selector: "bindingFor:",
  7487. category: '*Compiler',
  7488. fn: function (aNode){
  7489. var self=this;
  7490. return smalltalk.withContext(function($ctx1) { var $2,$1;
  7491. $2=smalltalk.LexicalScope.fn.prototype._bindingFor_.apply(_st(self), [aNode]);
  7492. if(($receiver = $2) == nil || $receiver == undefined){
  7493. $1=_st(_st(self)._iVars())._at_ifAbsent_(_st(aNode)._value(),(function(){
  7494. return smalltalk.withContext(function($ctx2) { return nil;
  7495. })}));
  7496. } else {
  7497. $1=$2;
  7498. };
  7499. return $1;
  7500. }, self, "bindingFor:", [aNode], smalltalk.MethodLexicalScope)},
  7501. args: ["aNode"],
  7502. source: "bindingFor: aNode\x0a\x09^ (super bindingFor: aNode) ifNil: [\x0a\x09\x09self iVars at: aNode value ifAbsent: [ nil ]]",
  7503. messageSends: ["ifNil:", "at:ifAbsent:", "value", "iVars", "bindingFor:"],
  7504. referencedClasses: []
  7505. }),
  7506. smalltalk.MethodLexicalScope);
  7507. smalltalk.addMethod(
  7508. "_canInlineNonLocalReturns",
  7509. smalltalk.method({
  7510. selector: "canInlineNonLocalReturns",
  7511. category: '*Compiler',
  7512. fn: function (){
  7513. var self=this;
  7514. return smalltalk.withContext(function($ctx1) { return true;
  7515. }, self, "canInlineNonLocalReturns", [], smalltalk.MethodLexicalScope)},
  7516. args: [],
  7517. source: "canInlineNonLocalReturns\x0a\x09^ true",
  7518. messageSends: [],
  7519. referencedClasses: []
  7520. }),
  7521. smalltalk.MethodLexicalScope);
  7522. smalltalk.addMethod(
  7523. "_hasLocalReturn",
  7524. smalltalk.method({
  7525. selector: "hasLocalReturn",
  7526. category: '*Compiler',
  7527. fn: function (){
  7528. var self=this;
  7529. return smalltalk.withContext(function($ctx1) { var $1;
  7530. $1=_st(self)._localReturn();
  7531. return $1;
  7532. }, self, "hasLocalReturn", [], smalltalk.MethodLexicalScope)},
  7533. args: [],
  7534. source: "hasLocalReturn\x0a\x09^ self localReturn",
  7535. messageSends: ["localReturn"],
  7536. referencedClasses: []
  7537. }),
  7538. smalltalk.MethodLexicalScope);
  7539. smalltalk.addMethod(
  7540. "_hasNonLocalReturn",
  7541. smalltalk.method({
  7542. selector: "hasNonLocalReturn",
  7543. category: '*Compiler',
  7544. fn: function (){
  7545. var self=this;
  7546. return smalltalk.withContext(function($ctx1) { var $1;
  7547. $1=_st(_st(self)._nonLocalReturns())._notEmpty();
  7548. return $1;
  7549. }, self, "hasNonLocalReturn", [], smalltalk.MethodLexicalScope)},
  7550. args: [],
  7551. source: "hasNonLocalReturn\x0a\x09^ self nonLocalReturns notEmpty",
  7552. messageSends: ["notEmpty", "nonLocalReturns"],
  7553. referencedClasses: []
  7554. }),
  7555. smalltalk.MethodLexicalScope);
  7556. smalltalk.addMethod(
  7557. "_iVars",
  7558. smalltalk.method({
  7559. selector: "iVars",
  7560. category: '*Compiler',
  7561. fn: function (){
  7562. var self=this;
  7563. return smalltalk.withContext(function($ctx1) { var $2,$1;
  7564. $2=self["@iVars"];
  7565. if(($receiver = $2) == nil || $receiver == undefined){
  7566. self["@iVars"]=_st((smalltalk.Dictionary || Dictionary))._new();
  7567. $1=self["@iVars"];
  7568. } else {
  7569. $1=$2;
  7570. };
  7571. return $1;
  7572. }, self, "iVars", [], smalltalk.MethodLexicalScope)},
  7573. args: [],
  7574. source: "iVars\x0a\x09^ iVars ifNil: [ iVars := Dictionary new ]",
  7575. messageSends: ["ifNil:", "new"],
  7576. referencedClasses: ["Dictionary"]
  7577. }),
  7578. smalltalk.MethodLexicalScope);
  7579. smalltalk.addMethod(
  7580. "_isMethodScope",
  7581. smalltalk.method({
  7582. selector: "isMethodScope",
  7583. category: '*Compiler',
  7584. fn: function (){
  7585. var self=this;
  7586. return smalltalk.withContext(function($ctx1) { return true;
  7587. }, self, "isMethodScope", [], smalltalk.MethodLexicalScope)},
  7588. args: [],
  7589. source: "isMethodScope\x0a\x09^ true",
  7590. messageSends: [],
  7591. referencedClasses: []
  7592. }),
  7593. smalltalk.MethodLexicalScope);
  7594. smalltalk.addMethod(
  7595. "_localReturn",
  7596. smalltalk.method({
  7597. selector: "localReturn",
  7598. category: '*Compiler',
  7599. fn: function (){
  7600. var self=this;
  7601. return smalltalk.withContext(function($ctx1) { var $2,$1;
  7602. $2=self["@localReturn"];
  7603. if(($receiver = $2) == nil || $receiver == undefined){
  7604. $1=false;
  7605. } else {
  7606. $1=$2;
  7607. };
  7608. return $1;
  7609. }, self, "localReturn", [], smalltalk.MethodLexicalScope)},
  7610. args: [],
  7611. source: "localReturn\x0a\x09^ localReturn ifNil: [ false ]",
  7612. messageSends: ["ifNil:"],
  7613. referencedClasses: []
  7614. }),
  7615. smalltalk.MethodLexicalScope);
  7616. smalltalk.addMethod(
  7617. "_localReturn_",
  7618. smalltalk.method({
  7619. selector: "localReturn:",
  7620. category: '*Compiler',
  7621. fn: function (aBoolean){
  7622. var self=this;
  7623. return smalltalk.withContext(function($ctx1) { self["@localReturn"]=aBoolean;
  7624. return self}, self, "localReturn:", [aBoolean], smalltalk.MethodLexicalScope)},
  7625. args: ["aBoolean"],
  7626. source: "localReturn: aBoolean\x0a\x09localReturn := aBoolean",
  7627. messageSends: [],
  7628. referencedClasses: []
  7629. }),
  7630. smalltalk.MethodLexicalScope);
  7631. smalltalk.addMethod(
  7632. "_methodScope",
  7633. smalltalk.method({
  7634. selector: "methodScope",
  7635. category: '*Compiler',
  7636. fn: function (){
  7637. var self=this;
  7638. return smalltalk.withContext(function($ctx1) { var $1;
  7639. $1=self;
  7640. return $1;
  7641. }, self, "methodScope", [], smalltalk.MethodLexicalScope)},
  7642. args: [],
  7643. source: "methodScope\x0a\x09^ self",
  7644. messageSends: [],
  7645. referencedClasses: []
  7646. }),
  7647. smalltalk.MethodLexicalScope);
  7648. smalltalk.addMethod(
  7649. "_nonLocalReturns",
  7650. smalltalk.method({
  7651. selector: "nonLocalReturns",
  7652. category: '*Compiler',
  7653. fn: function (){
  7654. var self=this;
  7655. return smalltalk.withContext(function($ctx1) { var $2,$1;
  7656. $2=self["@nonLocalReturns"];
  7657. if(($receiver = $2) == nil || $receiver == undefined){
  7658. self["@nonLocalReturns"]=_st((smalltalk.OrderedCollection || OrderedCollection))._new();
  7659. $1=self["@nonLocalReturns"];
  7660. } else {
  7661. $1=$2;
  7662. };
  7663. return $1;
  7664. }, self, "nonLocalReturns", [], smalltalk.MethodLexicalScope)},
  7665. args: [],
  7666. source: "nonLocalReturns\x0a\x09^ nonLocalReturns ifNil: [ nonLocalReturns := OrderedCollection new ]",
  7667. messageSends: ["ifNil:", "new"],
  7668. referencedClasses: ["OrderedCollection"]
  7669. }),
  7670. smalltalk.MethodLexicalScope);
  7671. smalltalk.addMethod(
  7672. "_pseudoVars",
  7673. smalltalk.method({
  7674. selector: "pseudoVars",
  7675. category: '*Compiler',
  7676. fn: function (){
  7677. var self=this;
  7678. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  7679. $1=self["@pseudoVars"];
  7680. if(($receiver = $1) == nil || $receiver == undefined){
  7681. self["@pseudoVars"]=_st((smalltalk.Dictionary || Dictionary))._new();
  7682. self["@pseudoVars"];
  7683. _st(_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._pseudoVariableNames())._do_((function(each){
  7684. return smalltalk.withContext(function($ctx2) { $2=_st((smalltalk.PseudoVar || PseudoVar))._on_(each);
  7685. _st($2)._scope_(_st(self)._methodScope());
  7686. $3=_st($2)._yourself();
  7687. return _st(self["@pseudoVars"])._at_put_(each,$3);
  7688. })}));
  7689. } else {
  7690. $1;
  7691. };
  7692. $4=self["@pseudoVars"];
  7693. return $4;
  7694. }, self, "pseudoVars", [], smalltalk.MethodLexicalScope)},
  7695. args: [],
  7696. source: "pseudoVars\x0a\x09pseudoVars ifNil: [\x0a\x09\x09pseudoVars := Dictionary new.\x0a\x09\x09Smalltalk current pseudoVariableNames do: [ :each |\x0a\x09\x09\x09pseudoVars at: each put: ((PseudoVar on: each)\x0a\x09\x09\x09\x09scope: self methodScope;\x0a\x09\x09\x09\x09yourself) ]].\x0a\x09^ pseudoVars",
  7697. messageSends: ["ifNil:", "new", "do:", "at:put:", "scope:", "methodScope", "on:", "yourself", "pseudoVariableNames", "current"],
  7698. referencedClasses: ["Dictionary", "PseudoVar", "Smalltalk"]
  7699. }),
  7700. smalltalk.MethodLexicalScope);
  7701. smalltalk.addMethod(
  7702. "_removeNonLocalReturn_",
  7703. smalltalk.method({
  7704. selector: "removeNonLocalReturn:",
  7705. category: '*Compiler',
  7706. fn: function (aScope){
  7707. var self=this;
  7708. return smalltalk.withContext(function($ctx1) { _st(_st(self)._nonLocalReturns())._remove_ifAbsent_(aScope,(function(){
  7709. return smalltalk.withContext(function($ctx2) { })}));
  7710. return self}, self, "removeNonLocalReturn:", [aScope], smalltalk.MethodLexicalScope)},
  7711. args: ["aScope"],
  7712. source: "removeNonLocalReturn: aScope\x0a\x09self nonLocalReturns remove: aScope ifAbsent: []",
  7713. messageSends: ["remove:ifAbsent:", "nonLocalReturns"],
  7714. referencedClasses: []
  7715. }),
  7716. smalltalk.MethodLexicalScope);
  7717. smalltalk.addMethod(
  7718. "_unknownVariables",
  7719. smalltalk.method({
  7720. selector: "unknownVariables",
  7721. category: '*Compiler',
  7722. fn: function (){
  7723. var self=this;
  7724. return smalltalk.withContext(function($ctx1) { var $2,$1;
  7725. $2=self["@unknownVariables"];
  7726. if(($receiver = $2) == nil || $receiver == undefined){
  7727. self["@unknownVariables"]=_st((smalltalk.OrderedCollection || OrderedCollection))._new();
  7728. $1=self["@unknownVariables"];
  7729. } else {
  7730. $1=$2;
  7731. };
  7732. return $1;
  7733. }, self, "unknownVariables", [], smalltalk.MethodLexicalScope)},
  7734. args: [],
  7735. source: "unknownVariables\x0a\x09^ unknownVariables ifNil: [ unknownVariables := OrderedCollection new ]",
  7736. messageSends: ["ifNil:", "new"],
  7737. referencedClasses: ["OrderedCollection"]
  7738. }),
  7739. smalltalk.MethodLexicalScope);
  7740. smalltalk.addMethod(
  7741. "_accept_",
  7742. smalltalk.method({
  7743. selector: "accept:",
  7744. category: '*Compiler',
  7745. fn: function (aVisitor){
  7746. var self=this;
  7747. return smalltalk.withContext(function($ctx1) { var $1;
  7748. $1=_st(aVisitor)._visitNode_(self);
  7749. return $1;
  7750. }, self, "accept:", [aVisitor], smalltalk.Node)},
  7751. args: ["aVisitor"],
  7752. source: "accept: aVisitor\x0a\x09^ aVisitor visitNode: self",
  7753. messageSends: ["visitNode:"],
  7754. referencedClasses: []
  7755. }),
  7756. smalltalk.Node);
  7757. smalltalk.addMethod(
  7758. "_addNode_",
  7759. smalltalk.method({
  7760. selector: "addNode:",
  7761. category: '*Compiler',
  7762. fn: function (aNode){
  7763. var self=this;
  7764. return smalltalk.withContext(function($ctx1) { _st(_st(self)._nodes())._add_(aNode);
  7765. return self}, self, "addNode:", [aNode], smalltalk.Node)},
  7766. args: ["aNode"],
  7767. source: "addNode: aNode\x0a\x09self nodes add: aNode",
  7768. messageSends: ["add:", "nodes"],
  7769. referencedClasses: []
  7770. }),
  7771. smalltalk.Node);
  7772. smalltalk.addMethod(
  7773. "_isAssignmentNode",
  7774. smalltalk.method({
  7775. selector: "isAssignmentNode",
  7776. category: '*Compiler',
  7777. fn: function (){
  7778. var self=this;
  7779. return smalltalk.withContext(function($ctx1) { return false;
  7780. }, self, "isAssignmentNode", [], smalltalk.Node)},
  7781. args: [],
  7782. source: "isAssignmentNode\x0a\x09^ false",
  7783. messageSends: [],
  7784. referencedClasses: []
  7785. }),
  7786. smalltalk.Node);
  7787. smalltalk.addMethod(
  7788. "_isBlockNode",
  7789. smalltalk.method({
  7790. selector: "isBlockNode",
  7791. category: '*Compiler',
  7792. fn: function (){
  7793. var self=this;
  7794. return smalltalk.withContext(function($ctx1) { return false;
  7795. }, self, "isBlockNode", [], smalltalk.Node)},
  7796. args: [],
  7797. source: "isBlockNode\x0a\x09^false",
  7798. messageSends: [],
  7799. referencedClasses: []
  7800. }),
  7801. smalltalk.Node);
  7802. smalltalk.addMethod(
  7803. "_isBlockSequenceNode",
  7804. smalltalk.method({
  7805. selector: "isBlockSequenceNode",
  7806. category: '*Compiler',
  7807. fn: function (){
  7808. var self=this;
  7809. return smalltalk.withContext(function($ctx1) { return false;
  7810. }, self, "isBlockSequenceNode", [], smalltalk.Node)},
  7811. args: [],
  7812. source: "isBlockSequenceNode\x0a\x09^false",
  7813. messageSends: [],
  7814. referencedClasses: []
  7815. }),
  7816. smalltalk.Node);
  7817. smalltalk.addMethod(
  7818. "_isImmutable",
  7819. smalltalk.method({
  7820. selector: "isImmutable",
  7821. category: '*Compiler',
  7822. fn: function (){
  7823. var self=this;
  7824. return smalltalk.withContext(function($ctx1) { return false;
  7825. }, self, "isImmutable", [], smalltalk.Node)},
  7826. args: [],
  7827. source: "isImmutable\x0a\x09^false",
  7828. messageSends: [],
  7829. referencedClasses: []
  7830. }),
  7831. smalltalk.Node);
  7832. smalltalk.addMethod(
  7833. "_isReturnNode",
  7834. smalltalk.method({
  7835. selector: "isReturnNode",
  7836. category: '*Compiler',
  7837. fn: function (){
  7838. var self=this;
  7839. return smalltalk.withContext(function($ctx1) { return false;
  7840. }, self, "isReturnNode", [], smalltalk.Node)},
  7841. args: [],
  7842. source: "isReturnNode\x0a\x09^false",
  7843. messageSends: [],
  7844. referencedClasses: []
  7845. }),
  7846. smalltalk.Node);
  7847. smalltalk.addMethod(
  7848. "_isSendNode",
  7849. smalltalk.method({
  7850. selector: "isSendNode",
  7851. category: '*Compiler',
  7852. fn: function (){
  7853. var self=this;
  7854. return smalltalk.withContext(function($ctx1) { return false;
  7855. }, self, "isSendNode", [], smalltalk.Node)},
  7856. args: [],
  7857. source: "isSendNode\x0a\x09^false",
  7858. messageSends: [],
  7859. referencedClasses: []
  7860. }),
  7861. smalltalk.Node);
  7862. smalltalk.addMethod(
  7863. "_isValueNode",
  7864. smalltalk.method({
  7865. selector: "isValueNode",
  7866. category: '*Compiler',
  7867. fn: function (){
  7868. var self=this;
  7869. return smalltalk.withContext(function($ctx1) { return false;
  7870. }, self, "isValueNode", [], smalltalk.Node)},
  7871. args: [],
  7872. source: "isValueNode\x0a\x09^false",
  7873. messageSends: [],
  7874. referencedClasses: []
  7875. }),
  7876. smalltalk.Node);
  7877. smalltalk.addMethod(
  7878. "_nodes",
  7879. smalltalk.method({
  7880. selector: "nodes",
  7881. category: '*Compiler',
  7882. fn: function (){
  7883. var self=this;
  7884. return smalltalk.withContext(function($ctx1) { var $2,$1;
  7885. $2=self["@nodes"];
  7886. if(($receiver = $2) == nil || $receiver == undefined){
  7887. self["@nodes"]=_st((smalltalk.Array || Array))._new();
  7888. $1=self["@nodes"];
  7889. } else {
  7890. $1=$2;
  7891. };
  7892. return $1;
  7893. }, self, "nodes", [], smalltalk.Node)},
  7894. args: [],
  7895. source: "nodes\x0a\x09^nodes ifNil: [nodes := Array new]",
  7896. messageSends: ["ifNil:", "new"],
  7897. referencedClasses: ["Array"]
  7898. }),
  7899. smalltalk.Node);
  7900. smalltalk.addMethod(
  7901. "_nodes_",
  7902. smalltalk.method({
  7903. selector: "nodes:",
  7904. category: '*Compiler',
  7905. fn: function (aCollection){
  7906. var self=this;
  7907. return smalltalk.withContext(function($ctx1) { self["@nodes"]=aCollection;
  7908. return self}, self, "nodes:", [aCollection], smalltalk.Node)},
  7909. args: ["aCollection"],
  7910. source: "nodes: aCollection\x0a\x09nodes := aCollection",
  7911. messageSends: [],
  7912. referencedClasses: []
  7913. }),
  7914. smalltalk.Node);
  7915. smalltalk.addMethod(
  7916. "_position",
  7917. smalltalk.method({
  7918. selector: "position",
  7919. category: '*Compiler',
  7920. fn: function (){
  7921. var self=this;
  7922. return smalltalk.withContext(function($ctx1) { var $2,$1;
  7923. $2=self["@position"];
  7924. if(($receiver = $2) == nil || $receiver == undefined){
  7925. self["@position"]=_st((0)).__at((0));
  7926. $1=self["@position"];
  7927. } else {
  7928. $1=$2;
  7929. };
  7930. return $1;
  7931. }, self, "position", [], smalltalk.Node)},
  7932. args: [],
  7933. source: "position\x0a\x09^position ifNil: [position := 0@0]",
  7934. messageSends: ["ifNil:", "@"],
  7935. referencedClasses: []
  7936. }),
  7937. smalltalk.Node);
  7938. smalltalk.addMethod(
  7939. "_position_",
  7940. smalltalk.method({
  7941. selector: "position:",
  7942. category: '*Compiler',
  7943. fn: function (aPosition){
  7944. var self=this;
  7945. return smalltalk.withContext(function($ctx1) { self["@position"]=aPosition;
  7946. return self}, self, "position:", [aPosition], smalltalk.Node)},
  7947. args: ["aPosition"],
  7948. source: "position: aPosition\x0a\x09position := aPosition",
  7949. messageSends: [],
  7950. referencedClasses: []
  7951. }),
  7952. smalltalk.Node);
  7953. smalltalk.addMethod(
  7954. "_shouldBeAliased",
  7955. smalltalk.method({
  7956. selector: "shouldBeAliased",
  7957. category: '*Compiler',
  7958. fn: function (){
  7959. var self=this;
  7960. return smalltalk.withContext(function($ctx1) { var $2,$1;
  7961. $2=self["@shouldBeAliased"];
  7962. if(($receiver = $2) == nil || $receiver == undefined){
  7963. $1=false;
  7964. } else {
  7965. $1=$2;
  7966. };
  7967. return $1;
  7968. }, self, "shouldBeAliased", [], smalltalk.Node)},
  7969. args: [],
  7970. source: "shouldBeAliased\x0a\x09^ shouldBeAliased ifNil: [ false ]",
  7971. messageSends: ["ifNil:"],
  7972. referencedClasses: []
  7973. }),
  7974. smalltalk.Node);
  7975. smalltalk.addMethod(
  7976. "_shouldBeAliased_",
  7977. smalltalk.method({
  7978. selector: "shouldBeAliased:",
  7979. category: '*Compiler',
  7980. fn: function (aBoolean){
  7981. var self=this;
  7982. return smalltalk.withContext(function($ctx1) { self["@shouldBeAliased"]=aBoolean;
  7983. return self}, self, "shouldBeAliased:", [aBoolean], smalltalk.Node)},
  7984. args: ["aBoolean"],
  7985. source: "shouldBeAliased: aBoolean\x0a\x09shouldBeAliased := aBoolean",
  7986. messageSends: [],
  7987. referencedClasses: []
  7988. }),
  7989. smalltalk.Node);
  7990. smalltalk.addMethod(
  7991. "_shouldBeInlined",
  7992. smalltalk.method({
  7993. selector: "shouldBeInlined",
  7994. category: '*Compiler',
  7995. fn: function (){
  7996. var self=this;
  7997. return smalltalk.withContext(function($ctx1) { var $2,$1;
  7998. $2=self["@shouldBeInlined"];
  7999. if(($receiver = $2) == nil || $receiver == undefined){
  8000. $1=false;
  8001. } else {
  8002. $1=$2;
  8003. };
  8004. return $1;
  8005. }, self, "shouldBeInlined", [], smalltalk.Node)},
  8006. args: [],
  8007. source: "shouldBeInlined\x0a\x09^ shouldBeInlined ifNil: [ false ]",
  8008. messageSends: ["ifNil:"],
  8009. referencedClasses: []
  8010. }),
  8011. smalltalk.Node);
  8012. smalltalk.addMethod(
  8013. "_shouldBeInlined_",
  8014. smalltalk.method({
  8015. selector: "shouldBeInlined:",
  8016. category: '*Compiler',
  8017. fn: function (aBoolean){
  8018. var self=this;
  8019. return smalltalk.withContext(function($ctx1) { self["@shouldBeInlined"]=aBoolean;
  8020. return self}, self, "shouldBeInlined:", [aBoolean], smalltalk.Node)},
  8021. args: ["aBoolean"],
  8022. source: "shouldBeInlined: aBoolean\x0a\x09shouldBeInlined := aBoolean",
  8023. messageSends: [],
  8024. referencedClasses: []
  8025. }),
  8026. smalltalk.Node);
  8027. smalltalk.addMethod(
  8028. "_subtreeNeedsAliasing",
  8029. smalltalk.method({
  8030. selector: "subtreeNeedsAliasing",
  8031. category: '*Compiler',
  8032. fn: function (){
  8033. var self=this;
  8034. return smalltalk.withContext(function($ctx1) { var $1;
  8035. $1=_st(_st(_st(self)._shouldBeAliased())._or_((function(){
  8036. return smalltalk.withContext(function($ctx2) { return _st(self)._shouldBeInlined();
  8037. })})))._or_((function(){
  8038. return smalltalk.withContext(function($ctx2) { return _st(_st(_st(self)._nodes())._detect_ifNone_((function(each){
  8039. return smalltalk.withContext(function($ctx3) { return _st(each)._subtreeNeedsAliasing();
  8040. })}),(function(){
  8041. return smalltalk.withContext(function($ctx3) { return false;
  8042. })}))).__tild_eq(false);
  8043. })}));
  8044. return $1;
  8045. }, self, "subtreeNeedsAliasing", [], smalltalk.Node)},
  8046. args: [],
  8047. source: "subtreeNeedsAliasing\x0a ^(self shouldBeAliased or: [ self shouldBeInlined ]) or: [\x0a (self nodes detect: [ :each | each subtreeNeedsAliasing ] ifNone: [ false ]) ~= false ]",
  8048. messageSends: ["or:", "~=", "detect:ifNone:", "subtreeNeedsAliasing", "nodes", "shouldBeInlined", "shouldBeAliased"],
  8049. referencedClasses: []
  8050. }),
  8051. smalltalk.Node);
  8052. smalltalk.addMethod(
  8053. "_accept_",
  8054. smalltalk.method({
  8055. selector: "accept:",
  8056. category: '*Compiler',
  8057. fn: function (aVisitor){
  8058. var self=this;
  8059. return smalltalk.withContext(function($ctx1) { var $1;
  8060. $1=_st(aVisitor)._visitAssignmentNode_(self);
  8061. return $1;
  8062. }, self, "accept:", [aVisitor], smalltalk.AssignmentNode)},
  8063. args: ["aVisitor"],
  8064. source: "accept: aVisitor\x0a\x09^ aVisitor visitAssignmentNode: self",
  8065. messageSends: ["visitAssignmentNode:"],
  8066. referencedClasses: []
  8067. }),
  8068. smalltalk.AssignmentNode);
  8069. smalltalk.addMethod(
  8070. "_isAssignmentNode",
  8071. smalltalk.method({
  8072. selector: "isAssignmentNode",
  8073. category: '*Compiler',
  8074. fn: function (){
  8075. var self=this;
  8076. return smalltalk.withContext(function($ctx1) { return true;
  8077. }, self, "isAssignmentNode", [], smalltalk.AssignmentNode)},
  8078. args: [],
  8079. source: "isAssignmentNode\x0a\x09^ true",
  8080. messageSends: [],
  8081. referencedClasses: []
  8082. }),
  8083. smalltalk.AssignmentNode);
  8084. smalltalk.addMethod(
  8085. "_left",
  8086. smalltalk.method({
  8087. selector: "left",
  8088. category: '*Compiler',
  8089. fn: function (){
  8090. var self=this;
  8091. return smalltalk.withContext(function($ctx1) { var $1;
  8092. $1=self["@left"];
  8093. return $1;
  8094. }, self, "left", [], smalltalk.AssignmentNode)},
  8095. args: [],
  8096. source: "left\x0a\x09^left",
  8097. messageSends: [],
  8098. referencedClasses: []
  8099. }),
  8100. smalltalk.AssignmentNode);
  8101. smalltalk.addMethod(
  8102. "_left_",
  8103. smalltalk.method({
  8104. selector: "left:",
  8105. category: '*Compiler',
  8106. fn: function (aNode){
  8107. var self=this;
  8108. return smalltalk.withContext(function($ctx1) { self["@left"]=aNode;
  8109. return self}, self, "left:", [aNode], smalltalk.AssignmentNode)},
  8110. args: ["aNode"],
  8111. source: "left: aNode\x0a\x09left := aNode",
  8112. messageSends: [],
  8113. referencedClasses: []
  8114. }),
  8115. smalltalk.AssignmentNode);
  8116. smalltalk.addMethod(
  8117. "_nodes",
  8118. smalltalk.method({
  8119. selector: "nodes",
  8120. category: '*Compiler',
  8121. fn: function (){
  8122. var self=this;
  8123. return smalltalk.withContext(function($ctx1) { var $1;
  8124. $1=_st((smalltalk.Array || Array))._with_with_(_st(self)._left(),_st(self)._right());
  8125. return $1;
  8126. }, self, "nodes", [], smalltalk.AssignmentNode)},
  8127. args: [],
  8128. source: "nodes\x0a\x09^ Array with: self left with: self right",
  8129. messageSends: ["with:with:", "left", "right"],
  8130. referencedClasses: ["Array"]
  8131. }),
  8132. smalltalk.AssignmentNode);
  8133. smalltalk.addMethod(
  8134. "_right",
  8135. smalltalk.method({
  8136. selector: "right",
  8137. category: '*Compiler',
  8138. fn: function (){
  8139. var self=this;
  8140. return smalltalk.withContext(function($ctx1) { var $1;
  8141. $1=self["@right"];
  8142. return $1;
  8143. }, self, "right", [], smalltalk.AssignmentNode)},
  8144. args: [],
  8145. source: "right\x0a\x09^right",
  8146. messageSends: [],
  8147. referencedClasses: []
  8148. }),
  8149. smalltalk.AssignmentNode);
  8150. smalltalk.addMethod(
  8151. "_right_",
  8152. smalltalk.method({
  8153. selector: "right:",
  8154. category: '*Compiler',
  8155. fn: function (aNode){
  8156. var self=this;
  8157. return smalltalk.withContext(function($ctx1) { self["@right"]=aNode;
  8158. return self}, self, "right:", [aNode], smalltalk.AssignmentNode)},
  8159. args: ["aNode"],
  8160. source: "right: aNode\x0a\x09right := aNode",
  8161. messageSends: [],
  8162. referencedClasses: []
  8163. }),
  8164. smalltalk.AssignmentNode);
  8165. smalltalk.addMethod(
  8166. "_accept_",
  8167. smalltalk.method({
  8168. selector: "accept:",
  8169. category: '*Compiler',
  8170. fn: function (aVisitor){
  8171. var self=this;
  8172. return smalltalk.withContext(function($ctx1) { var $1;
  8173. $1=_st(aVisitor)._visitBlockNode_(self);
  8174. return $1;
  8175. }, self, "accept:", [aVisitor], smalltalk.BlockNode)},
  8176. args: ["aVisitor"],
  8177. source: "accept: aVisitor\x0a\x09^ aVisitor visitBlockNode: self",
  8178. messageSends: ["visitBlockNode:"],
  8179. referencedClasses: []
  8180. }),
  8181. smalltalk.BlockNode);
  8182. smalltalk.addMethod(
  8183. "_isBlockNode",
  8184. smalltalk.method({
  8185. selector: "isBlockNode",
  8186. category: '*Compiler',
  8187. fn: function (){
  8188. var self=this;
  8189. return smalltalk.withContext(function($ctx1) { return true;
  8190. }, self, "isBlockNode", [], smalltalk.BlockNode)},
  8191. args: [],
  8192. source: "isBlockNode\x0a\x09^true",
  8193. messageSends: [],
  8194. referencedClasses: []
  8195. }),
  8196. smalltalk.BlockNode);
  8197. smalltalk.addMethod(
  8198. "_parameters",
  8199. smalltalk.method({
  8200. selector: "parameters",
  8201. category: '*Compiler',
  8202. fn: function (){
  8203. var self=this;
  8204. return smalltalk.withContext(function($ctx1) { var $2,$1;
  8205. $2=self["@parameters"];
  8206. if(($receiver = $2) == nil || $receiver == undefined){
  8207. self["@parameters"]=_st((smalltalk.Array || Array))._new();
  8208. $1=self["@parameters"];
  8209. } else {
  8210. $1=$2;
  8211. };
  8212. return $1;
  8213. }, self, "parameters", [], smalltalk.BlockNode)},
  8214. args: [],
  8215. source: "parameters\x0a\x09^parameters ifNil: [parameters := Array new]",
  8216. messageSends: ["ifNil:", "new"],
  8217. referencedClasses: ["Array"]
  8218. }),
  8219. smalltalk.BlockNode);
  8220. smalltalk.addMethod(
  8221. "_parameters_",
  8222. smalltalk.method({
  8223. selector: "parameters:",
  8224. category: '*Compiler',
  8225. fn: function (aCollection){
  8226. var self=this;
  8227. return smalltalk.withContext(function($ctx1) { self["@parameters"]=aCollection;
  8228. return self}, self, "parameters:", [aCollection], smalltalk.BlockNode)},
  8229. args: ["aCollection"],
  8230. source: "parameters: aCollection\x0a\x09parameters := aCollection",
  8231. messageSends: [],
  8232. referencedClasses: []
  8233. }),
  8234. smalltalk.BlockNode);
  8235. smalltalk.addMethod(
  8236. "_scope",
  8237. smalltalk.method({
  8238. selector: "scope",
  8239. category: '*Compiler',
  8240. fn: function (){
  8241. var self=this;
  8242. return smalltalk.withContext(function($ctx1) { var $1;
  8243. $1=self["@scope"];
  8244. return $1;
  8245. }, self, "scope", [], smalltalk.BlockNode)},
  8246. args: [],
  8247. source: "scope\x0a\x09^ scope",
  8248. messageSends: [],
  8249. referencedClasses: []
  8250. }),
  8251. smalltalk.BlockNode);
  8252. smalltalk.addMethod(
  8253. "_scope_",
  8254. smalltalk.method({
  8255. selector: "scope:",
  8256. category: '*Compiler',
  8257. fn: function (aLexicalScope){
  8258. var self=this;
  8259. return smalltalk.withContext(function($ctx1) { self["@scope"]=aLexicalScope;
  8260. return self}, self, "scope:", [aLexicalScope], smalltalk.BlockNode)},
  8261. args: ["aLexicalScope"],
  8262. source: "scope: aLexicalScope\x0a\x09scope := aLexicalScope",
  8263. messageSends: [],
  8264. referencedClasses: []
  8265. }),
  8266. smalltalk.BlockNode);
  8267. smalltalk.addMethod(
  8268. "_accept_",
  8269. smalltalk.method({
  8270. selector: "accept:",
  8271. category: '*Compiler',
  8272. fn: function (aVisitor){
  8273. var self=this;
  8274. return smalltalk.withContext(function($ctx1) { var $1;
  8275. $1=_st(aVisitor)._visitCascadeNode_(self);
  8276. return $1;
  8277. }, self, "accept:", [aVisitor], smalltalk.CascadeNode)},
  8278. args: ["aVisitor"],
  8279. source: "accept: aVisitor\x0a\x09^ aVisitor visitCascadeNode: self",
  8280. messageSends: ["visitCascadeNode:"],
  8281. referencedClasses: []
  8282. }),
  8283. smalltalk.CascadeNode);
  8284. smalltalk.addMethod(
  8285. "_receiver",
  8286. smalltalk.method({
  8287. selector: "receiver",
  8288. category: '*Compiler',
  8289. fn: function (){
  8290. var self=this;
  8291. return smalltalk.withContext(function($ctx1) { var $1;
  8292. $1=self["@receiver"];
  8293. return $1;
  8294. }, self, "receiver", [], smalltalk.CascadeNode)},
  8295. args: [],
  8296. source: "receiver\x0a\x09^receiver",
  8297. messageSends: [],
  8298. referencedClasses: []
  8299. }),
  8300. smalltalk.CascadeNode);
  8301. smalltalk.addMethod(
  8302. "_receiver_",
  8303. smalltalk.method({
  8304. selector: "receiver:",
  8305. category: '*Compiler',
  8306. fn: function (aNode){
  8307. var self=this;
  8308. return smalltalk.withContext(function($ctx1) { self["@receiver"]=aNode;
  8309. return self}, self, "receiver:", [aNode], smalltalk.CascadeNode)},
  8310. args: ["aNode"],
  8311. source: "receiver: aNode\x0a\x09receiver := aNode",
  8312. messageSends: [],
  8313. referencedClasses: []
  8314. }),
  8315. smalltalk.CascadeNode);
  8316. smalltalk.addMethod(
  8317. "_accept_",
  8318. smalltalk.method({
  8319. selector: "accept:",
  8320. category: '*Compiler',
  8321. fn: function (aVisitor){
  8322. var self=this;
  8323. return smalltalk.withContext(function($ctx1) { var $1;
  8324. $1=_st(aVisitor)._visitDynamicArrayNode_(self);
  8325. return $1;
  8326. }, self, "accept:", [aVisitor], smalltalk.DynamicArrayNode)},
  8327. args: ["aVisitor"],
  8328. source: "accept: aVisitor\x0a\x09^ aVisitor visitDynamicArrayNode: self",
  8329. messageSends: ["visitDynamicArrayNode:"],
  8330. referencedClasses: []
  8331. }),
  8332. smalltalk.DynamicArrayNode);
  8333. smalltalk.addMethod(
  8334. "_accept_",
  8335. smalltalk.method({
  8336. selector: "accept:",
  8337. category: '*Compiler',
  8338. fn: function (aVisitor){
  8339. var self=this;
  8340. return smalltalk.withContext(function($ctx1) { var $1;
  8341. $1=_st(aVisitor)._visitDynamicDictionaryNode_(self);
  8342. return $1;
  8343. }, self, "accept:", [aVisitor], smalltalk.DynamicDictionaryNode)},
  8344. args: ["aVisitor"],
  8345. source: "accept: aVisitor\x0a\x09^ aVisitor visitDynamicDictionaryNode: self",
  8346. messageSends: ["visitDynamicDictionaryNode:"],
  8347. referencedClasses: []
  8348. }),
  8349. smalltalk.DynamicDictionaryNode);
  8350. smalltalk.addMethod(
  8351. "_accept_",
  8352. smalltalk.method({
  8353. selector: "accept:",
  8354. category: '*Compiler',
  8355. fn: function (aVisitor){
  8356. var self=this;
  8357. return smalltalk.withContext(function($ctx1) { var $1;
  8358. $1=_st(aVisitor)._visitJSStatementNode_(self);
  8359. return $1;
  8360. }, self, "accept:", [aVisitor], smalltalk.JSStatementNode)},
  8361. args: ["aVisitor"],
  8362. source: "accept: aVisitor\x0a\x09^ aVisitor visitJSStatementNode: self",
  8363. messageSends: ["visitJSStatementNode:"],
  8364. referencedClasses: []
  8365. }),
  8366. smalltalk.JSStatementNode);
  8367. smalltalk.addMethod(
  8368. "_source",
  8369. smalltalk.method({
  8370. selector: "source",
  8371. category: '*Compiler',
  8372. fn: function (){
  8373. var self=this;
  8374. return smalltalk.withContext(function($ctx1) { var $2,$1;
  8375. $2=self["@source"];
  8376. if(($receiver = $2) == nil || $receiver == undefined){
  8377. $1="";
  8378. } else {
  8379. $1=$2;
  8380. };
  8381. return $1;
  8382. }, self, "source", [], smalltalk.JSStatementNode)},
  8383. args: [],
  8384. source: "source\x0a\x09^source ifNil: ['']",
  8385. messageSends: ["ifNil:"],
  8386. referencedClasses: []
  8387. }),
  8388. smalltalk.JSStatementNode);
  8389. smalltalk.addMethod(
  8390. "_source_",
  8391. smalltalk.method({
  8392. selector: "source:",
  8393. category: '*Compiler',
  8394. fn: function (aString){
  8395. var self=this;
  8396. return smalltalk.withContext(function($ctx1) { self["@source"]=aString;
  8397. return self}, self, "source:", [aString], smalltalk.JSStatementNode)},
  8398. args: ["aString"],
  8399. source: "source: aString\x0a\x09source := aString",
  8400. messageSends: [],
  8401. referencedClasses: []
  8402. }),
  8403. smalltalk.JSStatementNode);
  8404. smalltalk.addMethod(
  8405. "_accept_",
  8406. smalltalk.method({
  8407. selector: "accept:",
  8408. category: '*Compiler',
  8409. fn: function (aVisitor){
  8410. var self=this;
  8411. return smalltalk.withContext(function($ctx1) { var $1;
  8412. $1=_st(aVisitor)._visitMethodNode_(self);
  8413. return $1;
  8414. }, self, "accept:", [aVisitor], smalltalk.MethodNode)},
  8415. args: ["aVisitor"],
  8416. source: "accept: aVisitor\x0a\x09^ aVisitor visitMethodNode: self",
  8417. messageSends: ["visitMethodNode:"],
  8418. referencedClasses: []
  8419. }),
  8420. smalltalk.MethodNode);
  8421. smalltalk.addMethod(
  8422. "_arguments",
  8423. smalltalk.method({
  8424. selector: "arguments",
  8425. category: '*Compiler',
  8426. fn: function (){
  8427. var self=this;
  8428. return smalltalk.withContext(function($ctx1) { var $2,$1;
  8429. $2=self["@arguments"];
  8430. if(($receiver = $2) == nil || $receiver == undefined){
  8431. $1=[];
  8432. } else {
  8433. $1=$2;
  8434. };
  8435. return $1;
  8436. }, self, "arguments", [], smalltalk.MethodNode)},
  8437. args: [],
  8438. source: "arguments\x0a\x09^arguments ifNil: [#()]",
  8439. messageSends: ["ifNil:"],
  8440. referencedClasses: []
  8441. }),
  8442. smalltalk.MethodNode);
  8443. smalltalk.addMethod(
  8444. "_arguments_",
  8445. smalltalk.method({
  8446. selector: "arguments:",
  8447. category: '*Compiler',
  8448. fn: function (aCollection){
  8449. var self=this;
  8450. return smalltalk.withContext(function($ctx1) { self["@arguments"]=aCollection;
  8451. return self}, self, "arguments:", [aCollection], smalltalk.MethodNode)},
  8452. args: ["aCollection"],
  8453. source: "arguments: aCollection\x0a\x09arguments := aCollection",
  8454. messageSends: [],
  8455. referencedClasses: []
  8456. }),
  8457. smalltalk.MethodNode);
  8458. smalltalk.addMethod(
  8459. "_classReferences",
  8460. smalltalk.method({
  8461. selector: "classReferences",
  8462. category: '*Compiler',
  8463. fn: function (){
  8464. var self=this;
  8465. return smalltalk.withContext(function($ctx1) { var $1;
  8466. $1=self["@classReferences"];
  8467. return $1;
  8468. }, self, "classReferences", [], smalltalk.MethodNode)},
  8469. args: [],
  8470. source: "classReferences\x0a\x09^ classReferences",
  8471. messageSends: [],
  8472. referencedClasses: []
  8473. }),
  8474. smalltalk.MethodNode);
  8475. smalltalk.addMethod(
  8476. "_classReferences_",
  8477. smalltalk.method({
  8478. selector: "classReferences:",
  8479. category: '*Compiler',
  8480. fn: function (aCollection){
  8481. var self=this;
  8482. return smalltalk.withContext(function($ctx1) { self["@classReferences"]=aCollection;
  8483. return self}, self, "classReferences:", [aCollection], smalltalk.MethodNode)},
  8484. args: ["aCollection"],
  8485. source: "classReferences: aCollection\x0a\x09classReferences := aCollection",
  8486. messageSends: [],
  8487. referencedClasses: []
  8488. }),
  8489. smalltalk.MethodNode);
  8490. smalltalk.addMethod(
  8491. "_messageSends",
  8492. smalltalk.method({
  8493. selector: "messageSends",
  8494. category: '*Compiler',
  8495. fn: function (){
  8496. var self=this;
  8497. return smalltalk.withContext(function($ctx1) { var $1;
  8498. $1=self["@messageSends"];
  8499. return $1;
  8500. }, self, "messageSends", [], smalltalk.MethodNode)},
  8501. args: [],
  8502. source: "messageSends\x0a\x09^ messageSends",
  8503. messageSends: [],
  8504. referencedClasses: []
  8505. }),
  8506. smalltalk.MethodNode);
  8507. smalltalk.addMethod(
  8508. "_messageSends_",
  8509. smalltalk.method({
  8510. selector: "messageSends:",
  8511. category: '*Compiler',
  8512. fn: function (aCollection){
  8513. var self=this;
  8514. return smalltalk.withContext(function($ctx1) { self["@messageSends"]=aCollection;
  8515. return self}, self, "messageSends:", [aCollection], smalltalk.MethodNode)},
  8516. args: ["aCollection"],
  8517. source: "messageSends: aCollection\x0a\x09messageSends := aCollection",
  8518. messageSends: [],
  8519. referencedClasses: []
  8520. }),
  8521. smalltalk.MethodNode);
  8522. smalltalk.addMethod(
  8523. "_scope",
  8524. smalltalk.method({
  8525. selector: "scope",
  8526. category: '*Compiler',
  8527. fn: function (){
  8528. var self=this;
  8529. return smalltalk.withContext(function($ctx1) { var $1;
  8530. $1=self["@scope"];
  8531. return $1;
  8532. }, self, "scope", [], smalltalk.MethodNode)},
  8533. args: [],
  8534. source: "scope\x0a\x09^ scope",
  8535. messageSends: [],
  8536. referencedClasses: []
  8537. }),
  8538. smalltalk.MethodNode);
  8539. smalltalk.addMethod(
  8540. "_scope_",
  8541. smalltalk.method({
  8542. selector: "scope:",
  8543. category: '*Compiler',
  8544. fn: function (aMethodScope){
  8545. var self=this;
  8546. return smalltalk.withContext(function($ctx1) { self["@scope"]=aMethodScope;
  8547. return self}, self, "scope:", [aMethodScope], smalltalk.MethodNode)},
  8548. args: ["aMethodScope"],
  8549. source: "scope: aMethodScope\x0a\x09scope := aMethodScope",
  8550. messageSends: [],
  8551. referencedClasses: []
  8552. }),
  8553. smalltalk.MethodNode);
  8554. smalltalk.addMethod(
  8555. "_selector",
  8556. smalltalk.method({
  8557. selector: "selector",
  8558. category: '*Compiler',
  8559. fn: function (){
  8560. var self=this;
  8561. return smalltalk.withContext(function($ctx1) { var $1;
  8562. $1=self["@selector"];
  8563. return $1;
  8564. }, self, "selector", [], smalltalk.MethodNode)},
  8565. args: [],
  8566. source: "selector\x0a\x09^selector",
  8567. messageSends: [],
  8568. referencedClasses: []
  8569. }),
  8570. smalltalk.MethodNode);
  8571. smalltalk.addMethod(
  8572. "_selector_",
  8573. smalltalk.method({
  8574. selector: "selector:",
  8575. category: '*Compiler',
  8576. fn: function (aString){
  8577. var self=this;
  8578. return smalltalk.withContext(function($ctx1) { self["@selector"]=aString;
  8579. return self}, self, "selector:", [aString], smalltalk.MethodNode)},
  8580. args: ["aString"],
  8581. source: "selector: aString\x0a\x09selector := aString",
  8582. messageSends: [],
  8583. referencedClasses: []
  8584. }),
  8585. smalltalk.MethodNode);
  8586. smalltalk.addMethod(
  8587. "_source",
  8588. smalltalk.method({
  8589. selector: "source",
  8590. category: '*Compiler',
  8591. fn: function (){
  8592. var self=this;
  8593. return smalltalk.withContext(function($ctx1) { var $1;
  8594. $1=self["@source"];
  8595. return $1;
  8596. }, self, "source", [], smalltalk.MethodNode)},
  8597. args: [],
  8598. source: "source\x0a\x09^source",
  8599. messageSends: [],
  8600. referencedClasses: []
  8601. }),
  8602. smalltalk.MethodNode);
  8603. smalltalk.addMethod(
  8604. "_source_",
  8605. smalltalk.method({
  8606. selector: "source:",
  8607. category: '*Compiler',
  8608. fn: function (aString){
  8609. var self=this;
  8610. return smalltalk.withContext(function($ctx1) { self["@source"]=aString;
  8611. return self}, self, "source:", [aString], smalltalk.MethodNode)},
  8612. args: ["aString"],
  8613. source: "source: aString\x0a\x09source := aString",
  8614. messageSends: [],
  8615. referencedClasses: []
  8616. }),
  8617. smalltalk.MethodNode);
  8618. smalltalk.addMethod(
  8619. "_superSends",
  8620. smalltalk.method({
  8621. selector: "superSends",
  8622. category: '*Compiler',
  8623. fn: function (){
  8624. var self=this;
  8625. return smalltalk.withContext(function($ctx1) { var $1;
  8626. $1=self["@superSends"];
  8627. return $1;
  8628. }, self, "superSends", [], smalltalk.MethodNode)},
  8629. args: [],
  8630. source: "superSends\x0a\x09^ superSends",
  8631. messageSends: [],
  8632. referencedClasses: []
  8633. }),
  8634. smalltalk.MethodNode);
  8635. smalltalk.addMethod(
  8636. "_superSends_",
  8637. smalltalk.method({
  8638. selector: "superSends:",
  8639. category: '*Compiler',
  8640. fn: function (aCollection){
  8641. var self=this;
  8642. return smalltalk.withContext(function($ctx1) { self["@superSends"]=aCollection;
  8643. return self}, self, "superSends:", [aCollection], smalltalk.MethodNode)},
  8644. args: ["aCollection"],
  8645. source: "superSends: aCollection\x0a\x09superSends := aCollection",
  8646. messageSends: [],
  8647. referencedClasses: []
  8648. }),
  8649. smalltalk.MethodNode);
  8650. smalltalk.addMethod(
  8651. "_accept_",
  8652. smalltalk.method({
  8653. selector: "accept:",
  8654. category: '*Compiler',
  8655. fn: function (aVisitor){
  8656. var self=this;
  8657. return smalltalk.withContext(function($ctx1) { var $1;
  8658. $1=_st(aVisitor)._visitReturnNode_(self);
  8659. return $1;
  8660. }, self, "accept:", [aVisitor], smalltalk.ReturnNode)},
  8661. args: ["aVisitor"],
  8662. source: "accept: aVisitor\x0a\x09^ aVisitor visitReturnNode: self",
  8663. messageSends: ["visitReturnNode:"],
  8664. referencedClasses: []
  8665. }),
  8666. smalltalk.ReturnNode);
  8667. smalltalk.addMethod(
  8668. "_isReturnNode",
  8669. smalltalk.method({
  8670. selector: "isReturnNode",
  8671. category: '*Compiler',
  8672. fn: function (){
  8673. var self=this;
  8674. return smalltalk.withContext(function($ctx1) { return true;
  8675. }, self, "isReturnNode", [], smalltalk.ReturnNode)},
  8676. args: [],
  8677. source: "isReturnNode\x0a\x09^ true",
  8678. messageSends: [],
  8679. referencedClasses: []
  8680. }),
  8681. smalltalk.ReturnNode);
  8682. smalltalk.addMethod(
  8683. "_nonLocalReturn",
  8684. smalltalk.method({
  8685. selector: "nonLocalReturn",
  8686. category: '*Compiler',
  8687. fn: function (){
  8688. var self=this;
  8689. return smalltalk.withContext(function($ctx1) { var $1;
  8690. $1=_st(_st(_st(self)._scope())._isMethodScope())._not();
  8691. return $1;
  8692. }, self, "nonLocalReturn", [], smalltalk.ReturnNode)},
  8693. args: [],
  8694. source: "nonLocalReturn\x0a\x09^ self scope isMethodScope not",
  8695. messageSends: ["not", "isMethodScope", "scope"],
  8696. referencedClasses: []
  8697. }),
  8698. smalltalk.ReturnNode);
  8699. smalltalk.addMethod(
  8700. "_scope",
  8701. smalltalk.method({
  8702. selector: "scope",
  8703. category: '*Compiler',
  8704. fn: function (){
  8705. var self=this;
  8706. return smalltalk.withContext(function($ctx1) { var $1;
  8707. $1=self["@scope"];
  8708. return $1;
  8709. }, self, "scope", [], smalltalk.ReturnNode)},
  8710. args: [],
  8711. source: "scope\x0a\x09^ scope",
  8712. messageSends: [],
  8713. referencedClasses: []
  8714. }),
  8715. smalltalk.ReturnNode);
  8716. smalltalk.addMethod(
  8717. "_scope_",
  8718. smalltalk.method({
  8719. selector: "scope:",
  8720. category: '*Compiler',
  8721. fn: function (aLexicalScope){
  8722. var self=this;
  8723. return smalltalk.withContext(function($ctx1) { self["@scope"]=aLexicalScope;
  8724. return self}, self, "scope:", [aLexicalScope], smalltalk.ReturnNode)},
  8725. args: ["aLexicalScope"],
  8726. source: "scope: aLexicalScope\x0a\x09scope := aLexicalScope",
  8727. messageSends: [],
  8728. referencedClasses: []
  8729. }),
  8730. smalltalk.ReturnNode);
  8731. smalltalk.addMethod(
  8732. "_accept_",
  8733. smalltalk.method({
  8734. selector: "accept:",
  8735. category: '*Compiler',
  8736. fn: function (aVisitor){
  8737. var self=this;
  8738. return smalltalk.withContext(function($ctx1) { var $1;
  8739. $1=_st(aVisitor)._visitSendNode_(self);
  8740. return $1;
  8741. }, self, "accept:", [aVisitor], smalltalk.SendNode)},
  8742. args: ["aVisitor"],
  8743. source: "accept: aVisitor\x0a\x09^ aVisitor visitSendNode: self",
  8744. messageSends: ["visitSendNode:"],
  8745. referencedClasses: []
  8746. }),
  8747. smalltalk.SendNode);
  8748. smalltalk.addMethod(
  8749. "_arguments",
  8750. smalltalk.method({
  8751. selector: "arguments",
  8752. category: '*Compiler',
  8753. fn: function (){
  8754. var self=this;
  8755. return smalltalk.withContext(function($ctx1) { var $2,$1;
  8756. $2=self["@arguments"];
  8757. if(($receiver = $2) == nil || $receiver == undefined){
  8758. self["@arguments"]=[];
  8759. $1=self["@arguments"];
  8760. } else {
  8761. $1=$2;
  8762. };
  8763. return $1;
  8764. }, self, "arguments", [], smalltalk.SendNode)},
  8765. args: [],
  8766. source: "arguments\x0a\x09^arguments ifNil: [arguments := #()]",
  8767. messageSends: ["ifNil:"],
  8768. referencedClasses: []
  8769. }),
  8770. smalltalk.SendNode);
  8771. smalltalk.addMethod(
  8772. "_arguments_",
  8773. smalltalk.method({
  8774. selector: "arguments:",
  8775. category: '*Compiler',
  8776. fn: function (aCollection){
  8777. var self=this;
  8778. return smalltalk.withContext(function($ctx1) { self["@arguments"]=aCollection;
  8779. return self}, self, "arguments:", [aCollection], smalltalk.SendNode)},
  8780. args: ["aCollection"],
  8781. source: "arguments: aCollection\x0a\x09arguments := aCollection",
  8782. messageSends: [],
  8783. referencedClasses: []
  8784. }),
  8785. smalltalk.SendNode);
  8786. smalltalk.addMethod(
  8787. "_cascadeNodeWithMessages_",
  8788. smalltalk.method({
  8789. selector: "cascadeNodeWithMessages:",
  8790. category: '*Compiler',
  8791. fn: function (aCollection){
  8792. var self=this;
  8793. return smalltalk.withContext(function($ctx1) { var $1,$2,$4,$5,$3;
  8794. $ctx1.locals.first=nil;
  8795. $1=_st((smalltalk.SendNode || SendNode))._new();
  8796. _st($1)._selector_(_st(self)._selector());
  8797. _st($1)._arguments_(_st(self)._arguments());
  8798. $2=_st($1)._yourself();
  8799. $ctx1.locals.first=$2;
  8800. $4=_st((smalltalk.CascadeNode || CascadeNode))._new();
  8801. _st($4)._receiver_(_st(self)._receiver());
  8802. _st($4)._nodes_(_st(_st((smalltalk.Array || Array))._with_($ctx1.locals.first)).__comma(aCollection));
  8803. $5=_st($4)._yourself();
  8804. $3=$5;
  8805. return $3;
  8806. }, self, "cascadeNodeWithMessages:", [aCollection], smalltalk.SendNode)},
  8807. args: ["aCollection"],
  8808. source: "cascadeNodeWithMessages: aCollection\x0a\x09| first |\x0a\x09first := SendNode new\x0a\x09 selector: self selector;\x0a\x09 arguments: self arguments;\x0a\x09 yourself.\x0a\x09^CascadeNode new\x0a\x09 receiver: self receiver;\x0a\x09 nodes: (Array with: first), aCollection;\x0a\x09 yourself",
  8809. messageSends: ["selector:", "selector", "new", "arguments:", "arguments", "yourself", "receiver:", "receiver", "nodes:", ",", "with:"],
  8810. referencedClasses: ["SendNode", "CascadeNode", "Array"]
  8811. }),
  8812. smalltalk.SendNode);
  8813. smalltalk.addMethod(
  8814. "_index",
  8815. smalltalk.method({
  8816. selector: "index",
  8817. category: '*Compiler',
  8818. fn: function (){
  8819. var self=this;
  8820. return smalltalk.withContext(function($ctx1) { var $1;
  8821. $1=self["@index"];
  8822. return $1;
  8823. }, self, "index", [], smalltalk.SendNode)},
  8824. args: [],
  8825. source: "index\x0a\x09^ index",
  8826. messageSends: [],
  8827. referencedClasses: []
  8828. }),
  8829. smalltalk.SendNode);
  8830. smalltalk.addMethod(
  8831. "_index_",
  8832. smalltalk.method({
  8833. selector: "index:",
  8834. category: '*Compiler',
  8835. fn: function (anInteger){
  8836. var self=this;
  8837. return smalltalk.withContext(function($ctx1) { self["@index"]=anInteger;
  8838. return self}, self, "index:", [anInteger], smalltalk.SendNode)},
  8839. args: ["anInteger"],
  8840. source: "index: anInteger\x0a\x09index := anInteger",
  8841. messageSends: [],
  8842. referencedClasses: []
  8843. }),
  8844. smalltalk.SendNode);
  8845. smalltalk.addMethod(
  8846. "_isSendNode",
  8847. smalltalk.method({
  8848. selector: "isSendNode",
  8849. category: '*Compiler',
  8850. fn: function (){
  8851. var self=this;
  8852. return smalltalk.withContext(function($ctx1) { return true;
  8853. }, self, "isSendNode", [], smalltalk.SendNode)},
  8854. args: [],
  8855. source: "isSendNode\x0a\x09^ true",
  8856. messageSends: [],
  8857. referencedClasses: []
  8858. }),
  8859. smalltalk.SendNode);
  8860. smalltalk.addMethod(
  8861. "_nodes",
  8862. smalltalk.method({
  8863. selector: "nodes",
  8864. category: '*Compiler',
  8865. fn: function (){
  8866. var self=this;
  8867. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  8868. $2=_st((smalltalk.Array || Array))._withAll_(_st(self)._arguments());
  8869. _st($2)._add_(_st(self)._receiver());
  8870. $3=_st($2)._yourself();
  8871. $1=$3;
  8872. return $1;
  8873. }, self, "nodes", [], smalltalk.SendNode)},
  8874. args: [],
  8875. source: "nodes\x0a\x09^ (Array withAll: self arguments)\x0a\x09\x09add: self receiver;\x0a\x09\x09yourself",
  8876. messageSends: ["add:", "receiver", "withAll:", "arguments", "yourself"],
  8877. referencedClasses: ["Array"]
  8878. }),
  8879. smalltalk.SendNode);
  8880. smalltalk.addMethod(
  8881. "_receiver",
  8882. smalltalk.method({
  8883. selector: "receiver",
  8884. category: '*Compiler',
  8885. fn: function (){
  8886. var self=this;
  8887. return smalltalk.withContext(function($ctx1) { var $1;
  8888. $1=self["@receiver"];
  8889. return $1;
  8890. }, self, "receiver", [], smalltalk.SendNode)},
  8891. args: [],
  8892. source: "receiver\x0a\x09^receiver",
  8893. messageSends: [],
  8894. referencedClasses: []
  8895. }),
  8896. smalltalk.SendNode);
  8897. smalltalk.addMethod(
  8898. "_receiver_",
  8899. smalltalk.method({
  8900. selector: "receiver:",
  8901. category: '*Compiler',
  8902. fn: function (aNode){
  8903. var self=this;
  8904. return smalltalk.withContext(function($ctx1) { self["@receiver"]=aNode;
  8905. return self}, self, "receiver:", [aNode], smalltalk.SendNode)},
  8906. args: ["aNode"],
  8907. source: "receiver: aNode\x0a\x09receiver := aNode",
  8908. messageSends: [],
  8909. referencedClasses: []
  8910. }),
  8911. smalltalk.SendNode);
  8912. smalltalk.addMethod(
  8913. "_selector",
  8914. smalltalk.method({
  8915. selector: "selector",
  8916. category: '*Compiler',
  8917. fn: function (){
  8918. var self=this;
  8919. return smalltalk.withContext(function($ctx1) { var $1;
  8920. $1=self["@selector"];
  8921. return $1;
  8922. }, self, "selector", [], smalltalk.SendNode)},
  8923. args: [],
  8924. source: "selector\x0a\x09^selector",
  8925. messageSends: [],
  8926. referencedClasses: []
  8927. }),
  8928. smalltalk.SendNode);
  8929. smalltalk.addMethod(
  8930. "_selector_",
  8931. smalltalk.method({
  8932. selector: "selector:",
  8933. category: '*Compiler',
  8934. fn: function (aString){
  8935. var self=this;
  8936. return smalltalk.withContext(function($ctx1) { self["@selector"]=aString;
  8937. return self}, self, "selector:", [aString], smalltalk.SendNode)},
  8938. args: ["aString"],
  8939. source: "selector: aString\x0a\x09selector := aString",
  8940. messageSends: [],
  8941. referencedClasses: []
  8942. }),
  8943. smalltalk.SendNode);
  8944. smalltalk.addMethod(
  8945. "_superSend",
  8946. smalltalk.method({
  8947. selector: "superSend",
  8948. category: '*Compiler',
  8949. fn: function (){
  8950. var self=this;
  8951. return smalltalk.withContext(function($ctx1) { var $2,$1;
  8952. $2=self["@superSend"];
  8953. if(($receiver = $2) == nil || $receiver == undefined){
  8954. $1=false;
  8955. } else {
  8956. $1=$2;
  8957. };
  8958. return $1;
  8959. }, self, "superSend", [], smalltalk.SendNode)},
  8960. args: [],
  8961. source: "superSend\x0a\x09^ superSend ifNil: [ false ]",
  8962. messageSends: ["ifNil:"],
  8963. referencedClasses: []
  8964. }),
  8965. smalltalk.SendNode);
  8966. smalltalk.addMethod(
  8967. "_superSend_",
  8968. smalltalk.method({
  8969. selector: "superSend:",
  8970. category: '*Compiler',
  8971. fn: function (aBoolean){
  8972. var self=this;
  8973. return smalltalk.withContext(function($ctx1) { self["@superSend"]=aBoolean;
  8974. return self}, self, "superSend:", [aBoolean], smalltalk.SendNode)},
  8975. args: ["aBoolean"],
  8976. source: "superSend: aBoolean\x0a\x09superSend := aBoolean",
  8977. messageSends: [],
  8978. referencedClasses: []
  8979. }),
  8980. smalltalk.SendNode);
  8981. smalltalk.addMethod(
  8982. "_valueForReceiver_",
  8983. smalltalk.method({
  8984. selector: "valueForReceiver:",
  8985. category: '*Compiler',
  8986. fn: function (anObject){
  8987. var self=this;
  8988. return smalltalk.withContext(function($ctx1) { var $2,$3,$5,$4,$6,$1;
  8989. $2=_st((smalltalk.SendNode || SendNode))._new();
  8990. $3=$2;
  8991. $5=_st(self)._receiver();
  8992. if(($receiver = $5) == nil || $receiver == undefined){
  8993. $4=anObject;
  8994. } else {
  8995. $4=_st(_st(self)._receiver())._valueForReceiver_(anObject);
  8996. };
  8997. _st($3)._receiver_($4);
  8998. _st($2)._selector_(_st(self)._selector());
  8999. _st($2)._arguments_(_st(self)._arguments());
  9000. $6=_st($2)._yourself();
  9001. $1=$6;
  9002. return $1;
  9003. }, self, "valueForReceiver:", [anObject], smalltalk.SendNode)},
  9004. args: ["anObject"],
  9005. source: "valueForReceiver: anObject\x0a\x09^SendNode new\x0a\x09 receiver: (self receiver \x0a\x09\x09ifNil: [anObject]\x0a\x09\x09ifNotNil: [self receiver valueForReceiver: anObject]);\x0a\x09 selector: self selector;\x0a\x09 arguments: self arguments;\x0a\x09 yourself",
  9006. messageSends: ["receiver:", "ifNil:ifNotNil:", "valueForReceiver:", "receiver", "new", "selector:", "selector", "arguments:", "arguments", "yourself"],
  9007. referencedClasses: ["SendNode"]
  9008. }),
  9009. smalltalk.SendNode);
  9010. smalltalk.addMethod(
  9011. "_accept_",
  9012. smalltalk.method({
  9013. selector: "accept:",
  9014. category: '*Compiler',
  9015. fn: function (aVisitor){
  9016. var self=this;
  9017. return smalltalk.withContext(function($ctx1) { var $1;
  9018. $1=_st(aVisitor)._visitSequenceNode_(self);
  9019. return $1;
  9020. }, self, "accept:", [aVisitor], smalltalk.SequenceNode)},
  9021. args: ["aVisitor"],
  9022. source: "accept: aVisitor\x0a\x09^ aVisitor visitSequenceNode: self",
  9023. messageSends: ["visitSequenceNode:"],
  9024. referencedClasses: []
  9025. }),
  9026. smalltalk.SequenceNode);
  9027. smalltalk.addMethod(
  9028. "_asBlockSequenceNode",
  9029. smalltalk.method({
  9030. selector: "asBlockSequenceNode",
  9031. category: '*Compiler',
  9032. fn: function (){
  9033. var self=this;
  9034. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  9035. $2=_st((smalltalk.BlockSequenceNode || BlockSequenceNode))._new();
  9036. _st($2)._nodes_(_st(self)._nodes());
  9037. _st($2)._temps_(_st(self)._temps());
  9038. $3=_st($2)._yourself();
  9039. $1=$3;
  9040. return $1;
  9041. }, self, "asBlockSequenceNode", [], smalltalk.SequenceNode)},
  9042. args: [],
  9043. source: "asBlockSequenceNode\x0a\x09^BlockSequenceNode new\x0a\x09 nodes: self nodes;\x0a\x09 temps: self temps;\x0a\x09 yourself",
  9044. messageSends: ["nodes:", "nodes", "new", "temps:", "temps", "yourself"],
  9045. referencedClasses: ["BlockSequenceNode"]
  9046. }),
  9047. smalltalk.SequenceNode);
  9048. smalltalk.addMethod(
  9049. "_scope",
  9050. smalltalk.method({
  9051. selector: "scope",
  9052. category: '*Compiler',
  9053. fn: function (){
  9054. var self=this;
  9055. return smalltalk.withContext(function($ctx1) { var $1;
  9056. $1=self["@scope"];
  9057. return $1;
  9058. }, self, "scope", [], smalltalk.SequenceNode)},
  9059. args: [],
  9060. source: "scope\x0a\x09^ scope",
  9061. messageSends: [],
  9062. referencedClasses: []
  9063. }),
  9064. smalltalk.SequenceNode);
  9065. smalltalk.addMethod(
  9066. "_scope_",
  9067. smalltalk.method({
  9068. selector: "scope:",
  9069. category: '*Compiler',
  9070. fn: function (aLexicalScope){
  9071. var self=this;
  9072. return smalltalk.withContext(function($ctx1) { self["@scope"]=aLexicalScope;
  9073. return self}, self, "scope:", [aLexicalScope], smalltalk.SequenceNode)},
  9074. args: ["aLexicalScope"],
  9075. source: "scope: aLexicalScope\x0a\x09scope := aLexicalScope",
  9076. messageSends: [],
  9077. referencedClasses: []
  9078. }),
  9079. smalltalk.SequenceNode);
  9080. smalltalk.addMethod(
  9081. "_temps",
  9082. smalltalk.method({
  9083. selector: "temps",
  9084. category: '*Compiler',
  9085. fn: function (){
  9086. var self=this;
  9087. return smalltalk.withContext(function($ctx1) { var $2,$1;
  9088. $2=self["@temps"];
  9089. if(($receiver = $2) == nil || $receiver == undefined){
  9090. $1=[];
  9091. } else {
  9092. $1=$2;
  9093. };
  9094. return $1;
  9095. }, self, "temps", [], smalltalk.SequenceNode)},
  9096. args: [],
  9097. source: "temps\x0a\x09^temps ifNil: [#()]",
  9098. messageSends: ["ifNil:"],
  9099. referencedClasses: []
  9100. }),
  9101. smalltalk.SequenceNode);
  9102. smalltalk.addMethod(
  9103. "_temps_",
  9104. smalltalk.method({
  9105. selector: "temps:",
  9106. category: '*Compiler',
  9107. fn: function (aCollection){
  9108. var self=this;
  9109. return smalltalk.withContext(function($ctx1) { self["@temps"]=aCollection;
  9110. return self}, self, "temps:", [aCollection], smalltalk.SequenceNode)},
  9111. args: ["aCollection"],
  9112. source: "temps: aCollection\x0a\x09temps := aCollection",
  9113. messageSends: [],
  9114. referencedClasses: []
  9115. }),
  9116. smalltalk.SequenceNode);
  9117. smalltalk.addMethod(
  9118. "_accept_",
  9119. smalltalk.method({
  9120. selector: "accept:",
  9121. category: '*Compiler',
  9122. fn: function (aVisitor){
  9123. var self=this;
  9124. return smalltalk.withContext(function($ctx1) { var $1;
  9125. $1=_st(aVisitor)._visitBlockSequenceNode_(self);
  9126. return $1;
  9127. }, self, "accept:", [aVisitor], smalltalk.BlockSequenceNode)},
  9128. args: ["aVisitor"],
  9129. source: "accept: aVisitor\x0a\x09^ aVisitor visitBlockSequenceNode: self",
  9130. messageSends: ["visitBlockSequenceNode:"],
  9131. referencedClasses: []
  9132. }),
  9133. smalltalk.BlockSequenceNode);
  9134. smalltalk.addMethod(
  9135. "_isBlockSequenceNode",
  9136. smalltalk.method({
  9137. selector: "isBlockSequenceNode",
  9138. category: '*Compiler',
  9139. fn: function (){
  9140. var self=this;
  9141. return smalltalk.withContext(function($ctx1) { return true;
  9142. }, self, "isBlockSequenceNode", [], smalltalk.BlockSequenceNode)},
  9143. args: [],
  9144. source: "isBlockSequenceNode\x0a\x09^true",
  9145. messageSends: [],
  9146. referencedClasses: []
  9147. }),
  9148. smalltalk.BlockSequenceNode);
  9149. smalltalk.addMethod(
  9150. "_accept_",
  9151. smalltalk.method({
  9152. selector: "accept:",
  9153. category: '*Compiler',
  9154. fn: function (aVisitor){
  9155. var self=this;
  9156. return smalltalk.withContext(function($ctx1) { var $1;
  9157. $1=_st(aVisitor)._visitValueNode_(self);
  9158. return $1;
  9159. }, self, "accept:", [aVisitor], smalltalk.ValueNode)},
  9160. args: ["aVisitor"],
  9161. source: "accept: aVisitor\x0a\x09^ aVisitor visitValueNode: self",
  9162. messageSends: ["visitValueNode:"],
  9163. referencedClasses: []
  9164. }),
  9165. smalltalk.ValueNode);
  9166. smalltalk.addMethod(
  9167. "_isImmutable",
  9168. smalltalk.method({
  9169. selector: "isImmutable",
  9170. category: '*Compiler',
  9171. fn: function (){
  9172. var self=this;
  9173. return smalltalk.withContext(function($ctx1) { return true;
  9174. }, self, "isImmutable", [], smalltalk.ValueNode)},
  9175. args: [],
  9176. source: "isImmutable\x0a\x09^true",
  9177. messageSends: [],
  9178. referencedClasses: []
  9179. }),
  9180. smalltalk.ValueNode);
  9181. smalltalk.addMethod(
  9182. "_isValueNode",
  9183. smalltalk.method({
  9184. selector: "isValueNode",
  9185. category: '*Compiler',
  9186. fn: function (){
  9187. var self=this;
  9188. return smalltalk.withContext(function($ctx1) { return true;
  9189. }, self, "isValueNode", [], smalltalk.ValueNode)},
  9190. args: [],
  9191. source: "isValueNode\x0a\x09^true",
  9192. messageSends: [],
  9193. referencedClasses: []
  9194. }),
  9195. smalltalk.ValueNode);
  9196. smalltalk.addMethod(
  9197. "_value",
  9198. smalltalk.method({
  9199. selector: "value",
  9200. category: '*Compiler',
  9201. fn: function (){
  9202. var self=this;
  9203. return smalltalk.withContext(function($ctx1) { var $1;
  9204. $1=self["@value"];
  9205. return $1;
  9206. }, self, "value", [], smalltalk.ValueNode)},
  9207. args: [],
  9208. source: "value\x0a\x09^value",
  9209. messageSends: [],
  9210. referencedClasses: []
  9211. }),
  9212. smalltalk.ValueNode);
  9213. smalltalk.addMethod(
  9214. "_value_",
  9215. smalltalk.method({
  9216. selector: "value:",
  9217. category: '*Compiler',
  9218. fn: function (anObject){
  9219. var self=this;
  9220. return smalltalk.withContext(function($ctx1) { self["@value"]=anObject;
  9221. return self}, self, "value:", [anObject], smalltalk.ValueNode)},
  9222. args: ["anObject"],
  9223. source: "value: anObject\x0a\x09value := anObject",
  9224. messageSends: [],
  9225. referencedClasses: []
  9226. }),
  9227. smalltalk.ValueNode);
  9228. smalltalk.addMethod(
  9229. "_accept_",
  9230. smalltalk.method({
  9231. selector: "accept:",
  9232. category: '*Compiler',
  9233. fn: function (aVisitor){
  9234. var self=this;
  9235. return smalltalk.withContext(function($ctx1) { var $1;
  9236. $1=_st(aVisitor)._visitVariableNode_(self);
  9237. return $1;
  9238. }, self, "accept:", [aVisitor], smalltalk.VariableNode)},
  9239. args: ["aVisitor"],
  9240. source: "accept: aVisitor\x0a\x09^ aVisitor visitVariableNode: self",
  9241. messageSends: ["visitVariableNode:"],
  9242. referencedClasses: []
  9243. }),
  9244. smalltalk.VariableNode);
  9245. smalltalk.addMethod(
  9246. "_alias",
  9247. smalltalk.method({
  9248. selector: "alias",
  9249. category: '*Compiler',
  9250. fn: function (){
  9251. var self=this;
  9252. return smalltalk.withContext(function($ctx1) { var $1;
  9253. $1=_st(_st(self)._binding())._alias();
  9254. return $1;
  9255. }, self, "alias", [], smalltalk.VariableNode)},
  9256. args: [],
  9257. source: "alias\x0a\x09^ self binding alias",
  9258. messageSends: ["alias", "binding"],
  9259. referencedClasses: []
  9260. }),
  9261. smalltalk.VariableNode);
  9262. smalltalk.addMethod(
  9263. "_assigned",
  9264. smalltalk.method({
  9265. selector: "assigned",
  9266. category: '*Compiler',
  9267. fn: function (){
  9268. var self=this;
  9269. return smalltalk.withContext(function($ctx1) { var $2,$1;
  9270. $2=self["@assigned"];
  9271. if(($receiver = $2) == nil || $receiver == undefined){
  9272. $1=false;
  9273. } else {
  9274. $1=$2;
  9275. };
  9276. return $1;
  9277. }, self, "assigned", [], smalltalk.VariableNode)},
  9278. args: [],
  9279. source: "assigned\x0a\x09^assigned ifNil: [false]",
  9280. messageSends: ["ifNil:"],
  9281. referencedClasses: []
  9282. }),
  9283. smalltalk.VariableNode);
  9284. smalltalk.addMethod(
  9285. "_assigned_",
  9286. smalltalk.method({
  9287. selector: "assigned:",
  9288. category: '*Compiler',
  9289. fn: function (aBoolean){
  9290. var self=this;
  9291. return smalltalk.withContext(function($ctx1) { self["@assigned"]=aBoolean;
  9292. return self}, self, "assigned:", [aBoolean], smalltalk.VariableNode)},
  9293. args: ["aBoolean"],
  9294. source: "assigned: aBoolean\x0a\x09assigned := aBoolean",
  9295. messageSends: [],
  9296. referencedClasses: []
  9297. }),
  9298. smalltalk.VariableNode);
  9299. smalltalk.addMethod(
  9300. "_beAssigned",
  9301. smalltalk.method({
  9302. selector: "beAssigned",
  9303. category: '*Compiler',
  9304. fn: function (){
  9305. var self=this;
  9306. return smalltalk.withContext(function($ctx1) { _st(_st(self)._binding())._validateAssignment();
  9307. self["@assigned"]=true;
  9308. return self}, self, "beAssigned", [], smalltalk.VariableNode)},
  9309. args: [],
  9310. source: "beAssigned\x0a\x09self binding validateAssignment.\x0a\x09assigned := true",
  9311. messageSends: ["validateAssignment", "binding"],
  9312. referencedClasses: []
  9313. }),
  9314. smalltalk.VariableNode);
  9315. smalltalk.addMethod(
  9316. "_binding",
  9317. smalltalk.method({
  9318. selector: "binding",
  9319. category: '*Compiler',
  9320. fn: function (){
  9321. var self=this;
  9322. return smalltalk.withContext(function($ctx1) { var $1;
  9323. $1=self["@binding"];
  9324. return $1;
  9325. }, self, "binding", [], smalltalk.VariableNode)},
  9326. args: [],
  9327. source: "binding\x0a\x09^ binding",
  9328. messageSends: [],
  9329. referencedClasses: []
  9330. }),
  9331. smalltalk.VariableNode);
  9332. smalltalk.addMethod(
  9333. "_binding_",
  9334. smalltalk.method({
  9335. selector: "binding:",
  9336. category: '*Compiler',
  9337. fn: function (aScopeVar){
  9338. var self=this;
  9339. return smalltalk.withContext(function($ctx1) { self["@binding"]=aScopeVar;
  9340. return self}, self, "binding:", [aScopeVar], smalltalk.VariableNode)},
  9341. args: ["aScopeVar"],
  9342. source: "binding: aScopeVar\x0a\x09binding := aScopeVar",
  9343. messageSends: [],
  9344. referencedClasses: []
  9345. }),
  9346. smalltalk.VariableNode);
  9347. smalltalk.addMethod(
  9348. "_isImmutable",
  9349. smalltalk.method({
  9350. selector: "isImmutable",
  9351. category: '*Compiler',
  9352. fn: function (){
  9353. var self=this;
  9354. return smalltalk.withContext(function($ctx1) { return false;
  9355. }, self, "isImmutable", [], smalltalk.VariableNode)},
  9356. args: [],
  9357. source: "isImmutable\x0a\x09^false",
  9358. messageSends: [],
  9359. referencedClasses: []
  9360. }),
  9361. smalltalk.VariableNode);
  9362. smalltalk.addMethod(
  9363. "_accept_",
  9364. smalltalk.method({
  9365. selector: "accept:",
  9366. category: '*Compiler',
  9367. fn: function (aVisitor){
  9368. var self=this;
  9369. return smalltalk.withContext(function($ctx1) { var $1;
  9370. $1=_st(aVisitor)._visitClassReferenceNode_(self);
  9371. return $1;
  9372. }, self, "accept:", [aVisitor], smalltalk.ClassReferenceNode)},
  9373. args: ["aVisitor"],
  9374. source: "accept: aVisitor\x0a\x09^ aVisitor visitClassReferenceNode: self",
  9375. messageSends: ["visitClassReferenceNode:"],
  9376. referencedClasses: []
  9377. }),
  9378. smalltalk.ClassReferenceNode);
  9379. smalltalk.addMethod(
  9380. "_visit_",
  9381. smalltalk.method({
  9382. selector: "visit:",
  9383. category: '*Compiler',
  9384. fn: function (aNode){
  9385. var self=this;
  9386. return smalltalk.withContext(function($ctx1) { var $1;
  9387. $1=_st(aNode)._accept_(self);
  9388. return $1;
  9389. }, self, "visit:", [aNode], smalltalk.NodeVisitor)},
  9390. args: ["aNode"],
  9391. source: "visit: aNode\x0a\x09^ aNode accept: self",
  9392. messageSends: ["accept:"],
  9393. referencedClasses: []
  9394. }),
  9395. smalltalk.NodeVisitor);
  9396. smalltalk.addMethod(
  9397. "_visitAll_",
  9398. smalltalk.method({
  9399. selector: "visitAll:",
  9400. category: '*Compiler',
  9401. fn: function (aCollection){
  9402. var self=this;
  9403. return smalltalk.withContext(function($ctx1) { var $1;
  9404. $1=_st(aCollection)._do_((function(each){
  9405. return smalltalk.withContext(function($ctx2) { return _st(self)._visit_(each);
  9406. })}));
  9407. return $1;
  9408. }, self, "visitAll:", [aCollection], smalltalk.NodeVisitor)},
  9409. args: ["aCollection"],
  9410. source: "visitAll: aCollection\x0a\x09^ aCollection do: [ :each | self visit: each ]",
  9411. messageSends: ["do:", "visit:"],
  9412. referencedClasses: []
  9413. }),
  9414. smalltalk.NodeVisitor);
  9415. smalltalk.addMethod(
  9416. "_visitAssignmentNode_",
  9417. smalltalk.method({
  9418. selector: "visitAssignmentNode:",
  9419. category: '*Compiler',
  9420. fn: function (aNode){
  9421. var self=this;
  9422. return smalltalk.withContext(function($ctx1) { var $1;
  9423. $1=_st(self)._visitNode_(aNode);
  9424. return $1;
  9425. }, self, "visitAssignmentNode:", [aNode], smalltalk.NodeVisitor)},
  9426. args: ["aNode"],
  9427. source: "visitAssignmentNode: aNode\x0a\x09^ self visitNode: aNode",
  9428. messageSends: ["visitNode:"],
  9429. referencedClasses: []
  9430. }),
  9431. smalltalk.NodeVisitor);
  9432. smalltalk.addMethod(
  9433. "_visitBlockNode_",
  9434. smalltalk.method({
  9435. selector: "visitBlockNode:",
  9436. category: '*Compiler',
  9437. fn: function (aNode){
  9438. var self=this;
  9439. return smalltalk.withContext(function($ctx1) { var $1;
  9440. $1=_st(self)._visitNode_(aNode);
  9441. return $1;
  9442. }, self, "visitBlockNode:", [aNode], smalltalk.NodeVisitor)},
  9443. args: ["aNode"],
  9444. source: "visitBlockNode: aNode\x0a\x09^ self visitNode: aNode",
  9445. messageSends: ["visitNode:"],
  9446. referencedClasses: []
  9447. }),
  9448. smalltalk.NodeVisitor);
  9449. smalltalk.addMethod(
  9450. "_visitBlockSequenceNode_",
  9451. smalltalk.method({
  9452. selector: "visitBlockSequenceNode:",
  9453. category: '*Compiler',
  9454. fn: function (aNode){
  9455. var self=this;
  9456. return smalltalk.withContext(function($ctx1) { var $1;
  9457. $1=_st(self)._visitSequenceNode_(aNode);
  9458. return $1;
  9459. }, self, "visitBlockSequenceNode:", [aNode], smalltalk.NodeVisitor)},
  9460. args: ["aNode"],
  9461. source: "visitBlockSequenceNode: aNode\x0a\x09^ self visitSequenceNode: aNode",
  9462. messageSends: ["visitSequenceNode:"],
  9463. referencedClasses: []
  9464. }),
  9465. smalltalk.NodeVisitor);
  9466. smalltalk.addMethod(
  9467. "_visitCascadeNode_",
  9468. smalltalk.method({
  9469. selector: "visitCascadeNode:",
  9470. category: '*Compiler',
  9471. fn: function (aNode){
  9472. var self=this;
  9473. return smalltalk.withContext(function($ctx1) { var $1;
  9474. $1=_st(self)._visitNode_(aNode);
  9475. return $1;
  9476. }, self, "visitCascadeNode:", [aNode], smalltalk.NodeVisitor)},
  9477. args: ["aNode"],
  9478. source: "visitCascadeNode: aNode\x0a\x09^ self visitNode: aNode",
  9479. messageSends: ["visitNode:"],
  9480. referencedClasses: []
  9481. }),
  9482. smalltalk.NodeVisitor);
  9483. smalltalk.addMethod(
  9484. "_visitClassReferenceNode_",
  9485. smalltalk.method({
  9486. selector: "visitClassReferenceNode:",
  9487. category: '*Compiler',
  9488. fn: function (aNode){
  9489. var self=this;
  9490. return smalltalk.withContext(function($ctx1) { var $1;
  9491. $1=_st(self)._visitVariableNode_(aNode);
  9492. return $1;
  9493. }, self, "visitClassReferenceNode:", [aNode], smalltalk.NodeVisitor)},
  9494. args: ["aNode"],
  9495. source: "visitClassReferenceNode: aNode\x0a\x09^ self visitVariableNode: aNode",
  9496. messageSends: ["visitVariableNode:"],
  9497. referencedClasses: []
  9498. }),
  9499. smalltalk.NodeVisitor);
  9500. smalltalk.addMethod(
  9501. "_visitDynamicArrayNode_",
  9502. smalltalk.method({
  9503. selector: "visitDynamicArrayNode:",
  9504. category: '*Compiler',
  9505. fn: function (aNode){
  9506. var self=this;
  9507. return smalltalk.withContext(function($ctx1) { var $1;
  9508. $1=_st(self)._visitNode_(aNode);
  9509. return $1;
  9510. }, self, "visitDynamicArrayNode:", [aNode], smalltalk.NodeVisitor)},
  9511. args: ["aNode"],
  9512. source: "visitDynamicArrayNode: aNode\x0a\x09^ self visitNode: aNode",
  9513. messageSends: ["visitNode:"],
  9514. referencedClasses: []
  9515. }),
  9516. smalltalk.NodeVisitor);
  9517. smalltalk.addMethod(
  9518. "_visitDynamicDictionaryNode_",
  9519. smalltalk.method({
  9520. selector: "visitDynamicDictionaryNode:",
  9521. category: '*Compiler',
  9522. fn: function (aNode){
  9523. var self=this;
  9524. return smalltalk.withContext(function($ctx1) { var $1;
  9525. $1=_st(self)._visitNode_(aNode);
  9526. return $1;
  9527. }, self, "visitDynamicDictionaryNode:", [aNode], smalltalk.NodeVisitor)},
  9528. args: ["aNode"],
  9529. source: "visitDynamicDictionaryNode: aNode\x0a\x09^ self visitNode: aNode",
  9530. messageSends: ["visitNode:"],
  9531. referencedClasses: []
  9532. }),
  9533. smalltalk.NodeVisitor);
  9534. smalltalk.addMethod(
  9535. "_visitJSStatementNode_",
  9536. smalltalk.method({
  9537. selector: "visitJSStatementNode:",
  9538. category: '*Compiler',
  9539. fn: function (aNode){
  9540. var self=this;
  9541. return smalltalk.withContext(function($ctx1) { var $1;
  9542. $1=_st(self)._visitNode_(aNode);
  9543. return $1;
  9544. }, self, "visitJSStatementNode:", [aNode], smalltalk.NodeVisitor)},
  9545. args: ["aNode"],
  9546. source: "visitJSStatementNode: aNode\x0a\x09^ self visitNode: aNode",
  9547. messageSends: ["visitNode:"],
  9548. referencedClasses: []
  9549. }),
  9550. smalltalk.NodeVisitor);
  9551. smalltalk.addMethod(
  9552. "_visitMethodNode_",
  9553. smalltalk.method({
  9554. selector: "visitMethodNode:",
  9555. category: '*Compiler',
  9556. fn: function (aNode){
  9557. var self=this;
  9558. return smalltalk.withContext(function($ctx1) { var $1;
  9559. $1=_st(self)._visitNode_(aNode);
  9560. return $1;
  9561. }, self, "visitMethodNode:", [aNode], smalltalk.NodeVisitor)},
  9562. args: ["aNode"],
  9563. source: "visitMethodNode: aNode\x0a\x09^ self visitNode: aNode",
  9564. messageSends: ["visitNode:"],
  9565. referencedClasses: []
  9566. }),
  9567. smalltalk.NodeVisitor);
  9568. smalltalk.addMethod(
  9569. "_visitNode_",
  9570. smalltalk.method({
  9571. selector: "visitNode:",
  9572. category: '*Compiler',
  9573. fn: function (aNode){
  9574. var self=this;
  9575. return smalltalk.withContext(function($ctx1) { var $1;
  9576. $1=_st(self)._visitAll_(_st(aNode)._nodes());
  9577. return $1;
  9578. }, self, "visitNode:", [aNode], smalltalk.NodeVisitor)},
  9579. args: ["aNode"],
  9580. source: "visitNode: aNode\x0a\x09^ self visitAll: aNode nodes",
  9581. messageSends: ["visitAll:", "nodes"],
  9582. referencedClasses: []
  9583. }),
  9584. smalltalk.NodeVisitor);
  9585. smalltalk.addMethod(
  9586. "_visitReturnNode_",
  9587. smalltalk.method({
  9588. selector: "visitReturnNode:",
  9589. category: '*Compiler',
  9590. fn: function (aNode){
  9591. var self=this;
  9592. return smalltalk.withContext(function($ctx1) { var $1;
  9593. $1=_st(self)._visitNode_(aNode);
  9594. return $1;
  9595. }, self, "visitReturnNode:", [aNode], smalltalk.NodeVisitor)},
  9596. args: ["aNode"],
  9597. source: "visitReturnNode: aNode\x0a\x09^ self visitNode: aNode",
  9598. messageSends: ["visitNode:"],
  9599. referencedClasses: []
  9600. }),
  9601. smalltalk.NodeVisitor);
  9602. smalltalk.addMethod(
  9603. "_visitSendNode_",
  9604. smalltalk.method({
  9605. selector: "visitSendNode:",
  9606. category: '*Compiler',
  9607. fn: function (aNode){
  9608. var self=this;
  9609. return smalltalk.withContext(function($ctx1) { var $1;
  9610. $1=_st(self)._visitNode_(aNode);
  9611. return $1;
  9612. }, self, "visitSendNode:", [aNode], smalltalk.NodeVisitor)},
  9613. args: ["aNode"],
  9614. source: "visitSendNode: aNode\x0a\x09^ self visitNode: aNode",
  9615. messageSends: ["visitNode:"],
  9616. referencedClasses: []
  9617. }),
  9618. smalltalk.NodeVisitor);
  9619. smalltalk.addMethod(
  9620. "_visitSequenceNode_",
  9621. smalltalk.method({
  9622. selector: "visitSequenceNode:",
  9623. category: '*Compiler',
  9624. fn: function (aNode){
  9625. var self=this;
  9626. return smalltalk.withContext(function($ctx1) { var $1;
  9627. $1=_st(self)._visitNode_(aNode);
  9628. return $1;
  9629. }, self, "visitSequenceNode:", [aNode], smalltalk.NodeVisitor)},
  9630. args: ["aNode"],
  9631. source: "visitSequenceNode: aNode\x0a\x09^ self visitNode: aNode",
  9632. messageSends: ["visitNode:"],
  9633. referencedClasses: []
  9634. }),
  9635. smalltalk.NodeVisitor);
  9636. smalltalk.addMethod(
  9637. "_visitValueNode_",
  9638. smalltalk.method({
  9639. selector: "visitValueNode:",
  9640. category: '*Compiler',
  9641. fn: function (aNode){
  9642. var self=this;
  9643. return smalltalk.withContext(function($ctx1) { var $1;
  9644. $1=_st(self)._visitNode_(aNode);
  9645. return $1;
  9646. }, self, "visitValueNode:", [aNode], smalltalk.NodeVisitor)},
  9647. args: ["aNode"],
  9648. source: "visitValueNode: aNode\x0a\x09^ self visitNode: aNode",
  9649. messageSends: ["visitNode:"],
  9650. referencedClasses: []
  9651. }),
  9652. smalltalk.NodeVisitor);
  9653. smalltalk.addMethod(
  9654. "_visitVariableNode_",
  9655. smalltalk.method({
  9656. selector: "visitVariableNode:",
  9657. category: '*Compiler',
  9658. fn: function (aNode){
  9659. var self=this;
  9660. return smalltalk.withContext(function($ctx1) { var $1;
  9661. $1=_st(self)._visitNode_(aNode);
  9662. return $1;
  9663. }, self, "visitVariableNode:", [aNode], smalltalk.NodeVisitor)},
  9664. args: ["aNode"],
  9665. source: "visitVariableNode: aNode\x0a\x09^ self visitNode: aNode",
  9666. messageSends: ["visitNode:"],
  9667. referencedClasses: []
  9668. }),
  9669. smalltalk.NodeVisitor);
  9670. smalltalk.addMethod(
  9671. "_initializeFromMethodContext_",
  9672. smalltalk.method({
  9673. selector: "initializeFromMethodContext:",
  9674. category: '*Compiler',
  9675. fn: function (aMethodContext){
  9676. var self=this;
  9677. return smalltalk.withContext(function($ctx1) { var $1;
  9678. _st(self)._pc_(_st(aMethodContext)._pc());
  9679. _st(self)._receiver_(_st(aMethodContext)._receiver());
  9680. _st(self)._selector_(_st(aMethodContext)._selector());
  9681. $1=_st(aMethodContext)._outerContext();
  9682. if(($receiver = $1) == nil || $receiver == undefined){
  9683. $1;
  9684. } else {
  9685. _st(self)._outerContext_(_st(_st(self)._class())._fromMethodContext_(_st(aMethodContext)._outerContext()));
  9686. };
  9687. _st(_st(aMethodContext)._locals())._keysAndValuesDo_((function(key,value){
  9688. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._locals())._at_put_(key,value);
  9689. })}));
  9690. return self}, self, "initializeFromMethodContext:", [aMethodContext], smalltalk.AIContext)},
  9691. args: ["aMethodContext"],
  9692. source: "initializeFromMethodContext: aMethodContext\x0a\x09self pc: aMethodContext pc.\x0a self receiver: aMethodContext receiver.\x0a self selector: aMethodContext selector.\x0a aMethodContext outerContext ifNotNil: [\x0a\x09\x09self outerContext: (self class fromMethodContext: aMethodContext outerContext) ].\x0a aMethodContext locals keysAndValuesDo: [ :key :value |\x0a \x09self locals at: key put: value ]",
  9693. messageSends: ["pc:", "pc", "receiver:", "receiver", "selector:", "selector", "ifNotNil:", "outerContext:", "fromMethodContext:", "outerContext", "class", "keysAndValuesDo:", "at:put:", "locals"],
  9694. referencedClasses: []
  9695. }),
  9696. smalltalk.AIContext);
  9697. smalltalk.addMethod(
  9698. "_locals",
  9699. smalltalk.method({
  9700. selector: "locals",
  9701. category: '*Compiler',
  9702. fn: function (){
  9703. var self=this;
  9704. return smalltalk.withContext(function($ctx1) { var $2,$1;
  9705. $2=self["@locals"];
  9706. if(($receiver = $2) == nil || $receiver == undefined){
  9707. self["@locals"]=_st((smalltalk.Dictionary || Dictionary))._new();
  9708. $1=self["@locals"];
  9709. } else {
  9710. $1=$2;
  9711. };
  9712. return $1;
  9713. }, self, "locals", [], smalltalk.AIContext)},
  9714. args: [],
  9715. source: "locals\x0a\x09^ locals ifNil: [ locals := Dictionary new ]",
  9716. messageSends: ["ifNil:", "new"],
  9717. referencedClasses: ["Dictionary"]
  9718. }),
  9719. smalltalk.AIContext);
  9720. smalltalk.addMethod(
  9721. "_outerContext",
  9722. smalltalk.method({
  9723. selector: "outerContext",
  9724. category: '*Compiler',
  9725. fn: function (){
  9726. var self=this;
  9727. return smalltalk.withContext(function($ctx1) { var $1;
  9728. $1=self["@outerContext"];
  9729. return $1;
  9730. }, self, "outerContext", [], smalltalk.AIContext)},
  9731. args: [],
  9732. source: "outerContext\x0a\x09^ outerContext",
  9733. messageSends: [],
  9734. referencedClasses: []
  9735. }),
  9736. smalltalk.AIContext);
  9737. smalltalk.addMethod(
  9738. "_outerContext_",
  9739. smalltalk.method({
  9740. selector: "outerContext:",
  9741. category: '*Compiler',
  9742. fn: function (anAIContext){
  9743. var self=this;
  9744. return smalltalk.withContext(function($ctx1) { self["@outerContext"]=anAIContext;
  9745. return self}, self, "outerContext:", [anAIContext], smalltalk.AIContext)},
  9746. args: ["anAIContext"],
  9747. source: "outerContext: anAIContext\x0a\x09outerContext := anAIContext",
  9748. messageSends: [],
  9749. referencedClasses: []
  9750. }),
  9751. smalltalk.AIContext);
  9752. smalltalk.addMethod(
  9753. "_pc",
  9754. smalltalk.method({
  9755. selector: "pc",
  9756. category: '*Compiler',
  9757. fn: function (){
  9758. var self=this;
  9759. return smalltalk.withContext(function($ctx1) { var $2,$1;
  9760. $2=self["@pc"];
  9761. if(($receiver = $2) == nil || $receiver == undefined){
  9762. self["@pc"]=(0);
  9763. $1=self["@pc"];
  9764. } else {
  9765. $1=$2;
  9766. };
  9767. return $1;
  9768. }, self, "pc", [], smalltalk.AIContext)},
  9769. args: [],
  9770. source: "pc\x0a\x09^ pc ifNil: [ pc := 0 ]",
  9771. messageSends: ["ifNil:"],
  9772. referencedClasses: []
  9773. }),
  9774. smalltalk.AIContext);
  9775. smalltalk.addMethod(
  9776. "_pc_",
  9777. smalltalk.method({
  9778. selector: "pc:",
  9779. category: '*Compiler',
  9780. fn: function (anInteger){
  9781. var self=this;
  9782. return smalltalk.withContext(function($ctx1) { self["@pc"]=anInteger;
  9783. return self}, self, "pc:", [anInteger], smalltalk.AIContext)},
  9784. args: ["anInteger"],
  9785. source: "pc: anInteger\x0a\x09pc := anInteger",
  9786. messageSends: [],
  9787. referencedClasses: []
  9788. }),
  9789. smalltalk.AIContext);
  9790. smalltalk.addMethod(
  9791. "_receiver",
  9792. smalltalk.method({
  9793. selector: "receiver",
  9794. category: '*Compiler',
  9795. fn: function (){
  9796. var self=this;
  9797. return smalltalk.withContext(function($ctx1) { var $1;
  9798. $1=self["@receiver"];
  9799. return $1;
  9800. }, self, "receiver", [], smalltalk.AIContext)},
  9801. args: [],
  9802. source: "receiver\x0a\x09^ receiver",
  9803. messageSends: [],
  9804. referencedClasses: []
  9805. }),
  9806. smalltalk.AIContext);
  9807. smalltalk.addMethod(
  9808. "_receiver_",
  9809. smalltalk.method({
  9810. selector: "receiver:",
  9811. category: '*Compiler',
  9812. fn: function (anObject){
  9813. var self=this;
  9814. return smalltalk.withContext(function($ctx1) { self["@receiver"]=anObject;
  9815. return self}, self, "receiver:", [anObject], smalltalk.AIContext)},
  9816. args: ["anObject"],
  9817. source: "receiver: anObject\x0a\x09receiver := anObject",
  9818. messageSends: [],
  9819. referencedClasses: []
  9820. }),
  9821. smalltalk.AIContext);
  9822. smalltalk.addMethod(
  9823. "_selector",
  9824. smalltalk.method({
  9825. selector: "selector",
  9826. category: '*Compiler',
  9827. fn: function (){
  9828. var self=this;
  9829. return smalltalk.withContext(function($ctx1) { var $1;
  9830. $1=self["@selector"];
  9831. return $1;
  9832. }, self, "selector", [], smalltalk.AIContext)},
  9833. args: [],
  9834. source: "selector\x0a\x09^ selector",
  9835. messageSends: [],
  9836. referencedClasses: []
  9837. }),
  9838. smalltalk.AIContext);
  9839. smalltalk.addMethod(
  9840. "_selector_",
  9841. smalltalk.method({
  9842. selector: "selector:",
  9843. category: '*Compiler',
  9844. fn: function (aString){
  9845. var self=this;
  9846. return smalltalk.withContext(function($ctx1) { self["@selector"]=aString;
  9847. return self}, self, "selector:", [aString], smalltalk.AIContext)},
  9848. args: ["aString"],
  9849. source: "selector: aString\x0a\x09selector := aString",
  9850. messageSends: [],
  9851. referencedClasses: []
  9852. }),
  9853. smalltalk.AIContext);
  9854. smalltalk.addMethod(
  9855. "_fromMethodContext_",
  9856. smalltalk.method({
  9857. selector: "fromMethodContext:",
  9858. category: '*Compiler',
  9859. fn: function (aMethodContext){
  9860. var self=this;
  9861. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  9862. $2=_st(self)._new();
  9863. _st($2)._initializeFromMethodContext_(aMethodContext);
  9864. $3=_st($2)._yourself();
  9865. $1=$3;
  9866. return $1;
  9867. }, self, "fromMethodContext:", [aMethodContext], smalltalk.AIContext.klass)},
  9868. args: ["aMethodContext"],
  9869. source: "fromMethodContext: aMethodContext\x0a\x09^ self new \x0a \x09initializeFromMethodContext: aMethodContext;\x0a yourself",
  9870. messageSends: ["initializeFromMethodContext:", "new", "yourself"],
  9871. referencedClasses: []
  9872. }),
  9873. smalltalk.AIContext.klass);
  9874. smalltalk.addMethod(
  9875. "_context",
  9876. smalltalk.method({
  9877. selector: "context",
  9878. category: '*Compiler',
  9879. fn: function (){
  9880. var self=this;
  9881. return smalltalk.withContext(function($ctx1) { var $1;
  9882. $1=self["@context"];
  9883. return $1;
  9884. }, self, "context", [], smalltalk.ASTInterpreter)},
  9885. args: [],
  9886. source: "context\x0a\x09^ context",
  9887. messageSends: [],
  9888. referencedClasses: []
  9889. }),
  9890. smalltalk.ASTInterpreter);
  9891. smalltalk.addMethod(
  9892. "_context_",
  9893. smalltalk.method({
  9894. selector: "context:",
  9895. category: '*Compiler',
  9896. fn: function (anAIContext){
  9897. var self=this;
  9898. return smalltalk.withContext(function($ctx1) { self["@context"]=anAIContext;
  9899. return self}, self, "context:", [anAIContext], smalltalk.ASTInterpreter)},
  9900. args: ["anAIContext"],
  9901. source: "context: anAIContext\x0a\x09context := anAIContext",
  9902. messageSends: [],
  9903. referencedClasses: []
  9904. }),
  9905. smalltalk.ASTInterpreter);
  9906. smalltalk.addMethod(
  9907. "_initialize",
  9908. smalltalk.method({
  9909. selector: "initialize",
  9910. category: '*Compiler',
  9911. fn: function (){
  9912. var self=this;
  9913. return smalltalk.withContext(function($ctx1) { smalltalk.NodeVisitor.fn.prototype._initialize.apply(_st(self), []);
  9914. self["@shouldReturn"]=false;
  9915. return self}, self, "initialize", [], smalltalk.ASTInterpreter)},
  9916. args: [],
  9917. source: "initialize\x0a\x09super initialize.\x0a shouldReturn := false",
  9918. messageSends: ["initialize"],
  9919. referencedClasses: []
  9920. }),
  9921. smalltalk.ASTInterpreter);
  9922. smalltalk.addMethod(
  9923. "_interpret_",
  9924. smalltalk.method({
  9925. selector: "interpret:",
  9926. category: '*Compiler',
  9927. fn: function (aNode){
  9928. var self=this;
  9929. return smalltalk.withContext(function($ctx1) { var $1;
  9930. self["@shouldReturn"]=false;
  9931. $1=_st(self)._interpretNode_(aNode);
  9932. return $1;
  9933. }, self, "interpret:", [aNode], smalltalk.ASTInterpreter)},
  9934. args: ["aNode"],
  9935. source: "interpret: aNode\x0a\x09shouldReturn := false.\x0a ^ self interpretNode: aNode",
  9936. messageSends: ["interpretNode:"],
  9937. referencedClasses: []
  9938. }),
  9939. smalltalk.ASTInterpreter);
  9940. smalltalk.addMethod(
  9941. "_interpretNode_",
  9942. smalltalk.method({
  9943. selector: "interpretNode:",
  9944. category: '*Compiler',
  9945. fn: function (aNode){
  9946. var self=this;
  9947. return smalltalk.withContext(function($ctx1) { var $1;
  9948. self["@currentNode"]=aNode;
  9949. $1=_st(self)._visit_(aNode);
  9950. return $1;
  9951. }, self, "interpretNode:", [aNode], smalltalk.ASTInterpreter)},
  9952. args: ["aNode"],
  9953. source: "interpretNode: aNode\x0a\x09currentNode := aNode.\x0a ^ self visit: aNode",
  9954. messageSends: ["visit:"],
  9955. referencedClasses: []
  9956. }),
  9957. smalltalk.ASTInterpreter);
  9958. smalltalk.addMethod(
  9959. "_messageFromSendNode_",
  9960. smalltalk.method({
  9961. selector: "messageFromSendNode:",
  9962. category: '*Compiler',
  9963. fn: function (aSendNode){
  9964. var self=this;
  9965. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  9966. $2=_st((smalltalk.Message || Message))._new();
  9967. _st($2)._selector_(_st(aSendNode)._selector());
  9968. _st($2)._arguments_(_st(_st(aSendNode)._arguments())._collect_((function(each){
  9969. return smalltalk.withContext(function($ctx2) { return _st(self)._interpretNode_(each);
  9970. })})));
  9971. $3=_st($2)._yourself();
  9972. $1=$3;
  9973. return $1;
  9974. }, self, "messageFromSendNode:", [aSendNode], smalltalk.ASTInterpreter)},
  9975. args: ["aSendNode"],
  9976. source: "messageFromSendNode: aSendNode\x0a\x09^ Message new\x0a \x09selector: aSendNode selector;\x0a arguments: (aSendNode arguments collect: [ :each |\x0a \x09self interpretNode: each ]);\x0a yourself",
  9977. messageSends: ["selector:", "selector", "new", "arguments:", "collect:", "interpretNode:", "arguments", "yourself"],
  9978. referencedClasses: ["Message"]
  9979. }),
  9980. smalltalk.ASTInterpreter);
  9981. smalltalk.addMethod(
  9982. "_visitBlockNode_",
  9983. smalltalk.method({
  9984. selector: "visitBlockNode:",
  9985. category: '*Compiler',
  9986. fn: function (aNode){
  9987. var self=this;
  9988. return smalltalk.withContext(function($ctx1) { var $1;
  9989. $1=(function(){
  9990. return smalltalk.withContext(function($ctx2) { return _st(self)._interpretNode_(_st(_st(aNode)._nodes())._first());
  9991. })});
  9992. return $1;
  9993. }, self, "visitBlockNode:", [aNode], smalltalk.ASTInterpreter)},
  9994. args: ["aNode"],
  9995. source: "visitBlockNode: aNode\x0a ^ [ self interpretNode: aNode nodes first ]",
  9996. messageSends: ["interpretNode:", "first", "nodes"],
  9997. referencedClasses: []
  9998. }),
  9999. smalltalk.ASTInterpreter);
  10000. smalltalk.addMethod(
  10001. "_visitCascadeNode_",
  10002. smalltalk.method({
  10003. selector: "visitCascadeNode:",
  10004. category: '*Compiler',
  10005. fn: function (aNode){
  10006. var self=this;
  10007. return smalltalk.withContext(function($ctx1) { var $1;
  10008. $ctx1.locals.receiver=nil;
  10009. $ctx1.locals.receiver=_st(self)._interpretNode_(_st(aNode)._receiver());
  10010. _st(_st(_st(aNode)._nodes())._allButLast())._do_((function(each){
  10011. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._messageFromSendNode_(each))._sendTo_($ctx1.locals.receiver);
  10012. })}));
  10013. $1=_st(_st(self)._messageFromSendNode_(_st(_st(aNode)._nodes())._last()))._sendTo_($ctx1.locals.receiver);
  10014. return $1;
  10015. }, self, "visitCascadeNode:", [aNode], smalltalk.ASTInterpreter)},
  10016. args: ["aNode"],
  10017. source: "visitCascadeNode: aNode\x0a\x09\x22TODO: Handle super sends\x22\x0a\x09| receiver |\x0a \x0a receiver := self interpretNode: aNode receiver.\x0a\x0a aNode nodes allButLast\x0a \x09do: [ :each | \x0a \x09(self messageFromSendNode: each)\x0a \x09sendTo: receiver ].\x0a\x0a ^ (self messageFromSendNode: aNode nodes last)\x0a \x09sendTo: receiver",
  10018. messageSends: ["interpretNode:", "receiver", "do:", "sendTo:", "messageFromSendNode:", "allButLast", "nodes", "last"],
  10019. referencedClasses: []
  10020. }),
  10021. smalltalk.ASTInterpreter);
  10022. smalltalk.addMethod(
  10023. "_visitClassReferenceNode_",
  10024. smalltalk.method({
  10025. selector: "visitClassReferenceNode:",
  10026. category: '*Compiler',
  10027. fn: function (aNode){
  10028. var self=this;
  10029. return smalltalk.withContext(function($ctx1) { var $1;
  10030. $1=_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._at_(_st(aNode)._value());
  10031. return $1;
  10032. }, self, "visitClassReferenceNode:", [aNode], smalltalk.ASTInterpreter)},
  10033. args: ["aNode"],
  10034. source: "visitClassReferenceNode: aNode\x0a\x09^ Smalltalk current at: aNode value",
  10035. messageSends: ["at:", "value", "current"],
  10036. referencedClasses: ["Smalltalk"]
  10037. }),
  10038. smalltalk.ASTInterpreter);
  10039. smalltalk.addMethod(
  10040. "_visitJSStatementNode_",
  10041. smalltalk.method({
  10042. selector: "visitJSStatementNode:",
  10043. category: '*Compiler',
  10044. fn: function (aNode){
  10045. var self=this;
  10046. return smalltalk.withContext(function($ctx1) { _st(self)._halt();
  10047. return self}, self, "visitJSStatementNode:", [aNode], smalltalk.ASTInterpreter)},
  10048. args: ["aNode"],
  10049. source: "visitJSStatementNode: aNode\x0a\x09self halt",
  10050. messageSends: ["halt"],
  10051. referencedClasses: []
  10052. }),
  10053. smalltalk.ASTInterpreter);
  10054. smalltalk.addMethod(
  10055. "_visitReturnNode_",
  10056. smalltalk.method({
  10057. selector: "visitReturnNode:",
  10058. category: '*Compiler',
  10059. fn: function (aNode){
  10060. var self=this;
  10061. return smalltalk.withContext(function($ctx1) { var $1;
  10062. self["@shouldReturn"]=true;
  10063. $1=_st(self)._interpretNode_(_st(_st(aNode)._nodes())._first());
  10064. return $1;
  10065. }, self, "visitReturnNode:", [aNode], smalltalk.ASTInterpreter)},
  10066. args: ["aNode"],
  10067. source: "visitReturnNode: aNode\x0a\x09shouldReturn := true.\x0a ^ self interpretNode: aNode nodes first",
  10068. messageSends: ["interpretNode:", "first", "nodes"],
  10069. referencedClasses: []
  10070. }),
  10071. smalltalk.ASTInterpreter);
  10072. smalltalk.addMethod(
  10073. "_visitSendNode_",
  10074. smalltalk.method({
  10075. selector: "visitSendNode:",
  10076. category: '*Compiler',
  10077. fn: function (aNode){
  10078. var self=this;
  10079. return smalltalk.withContext(function($ctx1) { var $1;
  10080. $1=_st(_st(self)._messageFromSendNode_(aNode))._sendTo_(_st(self)._interpretNode_(_st(aNode)._receiver()));
  10081. return $1;
  10082. }, self, "visitSendNode:", [aNode], smalltalk.ASTInterpreter)},
  10083. args: ["aNode"],
  10084. source: "visitSendNode: aNode\x0a\x09\x22TODO: Handle super sends\x22\x0a \x0a ^ (self messageFromSendNode: aNode)\x0a \x09sendTo: (self interpretNode: aNode receiver)",
  10085. messageSends: ["sendTo:", "interpretNode:", "receiver", "messageFromSendNode:"],
  10086. referencedClasses: []
  10087. }),
  10088. smalltalk.ASTInterpreter);
  10089. smalltalk.addMethod(
  10090. "_visitSequenceNode_",
  10091. smalltalk.method({
  10092. selector: "visitSequenceNode:",
  10093. category: '*Compiler',
  10094. fn: function (aNode){
  10095. var self=this;
  10096. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$2,$5;
  10097. var $early={};
  10098. try {
  10099. $1=_st(_st(aNode)._nodes())._allButLast();
  10100. $2=(function(each){
  10101. return smalltalk.withContext(function($ctx2) { $ctx2.locals.value=nil;
  10102. $ctx2.locals.value=_st(self)._interpretNode_(each);
  10103. $ctx2.locals.value;
  10104. $3=self["@shouldReturn"];
  10105. if(smalltalk.assert($3)){
  10106. $4=$ctx2.locals.value;
  10107. throw $early=[$4];
  10108. };
  10109. })});
  10110. _st($1)._do_($2);
  10111. $5=_st(self)._interpretNode_(_st(_st(aNode)._nodes())._last());
  10112. return $5;
  10113. }
  10114. catch(e) {if(e===$early)return e[0]; throw e}
  10115. }, self, "visitSequenceNode:", [aNode], smalltalk.ASTInterpreter)},
  10116. args: ["aNode"],
  10117. source: "visitSequenceNode: aNode\x0a\x09aNode nodes allButLast do: [ :each | | value |\x0a value := self interpretNode: each.\x0a\x09\x09shouldReturn ifTrue: [ ^ value ] ].\x0a ^ self interpretNode: aNode nodes last",
  10118. messageSends: ["do:", "interpretNode:", "ifTrue:", "allButLast", "nodes", "last"],
  10119. referencedClasses: []
  10120. }),
  10121. smalltalk.ASTInterpreter);
  10122. smalltalk.addMethod(
  10123. "_visitValueNode_",
  10124. smalltalk.method({
  10125. selector: "visitValueNode:",
  10126. category: '*Compiler',
  10127. fn: function (aNode){
  10128. var self=this;
  10129. return smalltalk.withContext(function($ctx1) { var $1;
  10130. $1=_st(aNode)._value();
  10131. return $1;
  10132. }, self, "visitValueNode:", [aNode], smalltalk.ASTInterpreter)},
  10133. args: ["aNode"],
  10134. source: "visitValueNode: aNode\x0a\x09^ aNode value",
  10135. messageSends: ["value"],
  10136. referencedClasses: []
  10137. }),
  10138. smalltalk.ASTInterpreter);
  10139. smalltalk.addMethod(
  10140. "_classNameFor_",
  10141. smalltalk.method({
  10142. selector: "classNameFor:",
  10143. category: '*Compiler',
  10144. fn: function (aClass){
  10145. var self=this;
  10146. return smalltalk.withContext(function($ctx1) { var $2,$3,$5,$4,$1;
  10147. $2=_st(aClass)._isMetaclass();
  10148. $3=(function(){
  10149. return smalltalk.withContext(function($ctx2) { return _st(_st(_st(aClass)._instanceClass())._name()).__comma(".klass");
  10150. })});
  10151. $4=(function(){
  10152. return smalltalk.withContext(function($ctx2) { $5=_st(aClass)._isNil();
  10153. if(smalltalk.assert($5)){
  10154. return "nil";
  10155. } else {
  10156. return _st(aClass)._name();
  10157. };
  10158. })});
  10159. $1=_st($2)._ifTrue_ifFalse_($3,$4);
  10160. return $1;
  10161. }, self, "classNameFor:", [aClass], smalltalk.AbstractCodeGenerator)},
  10162. args: ["aClass"],
  10163. source: "classNameFor: aClass\x0a\x09^aClass isMetaclass\x0a\x09 ifTrue: [aClass instanceClass name, '.klass']\x0a\x09 ifFalse: [\x0a\x09\x09aClass isNil\x0a\x09\x09 ifTrue: ['nil']\x0a\x09\x09 ifFalse: [aClass name]]",
  10164. messageSends: ["ifTrue:ifFalse:", ",", "name", "instanceClass", "isNil", "isMetaclass"],
  10165. referencedClasses: []
  10166. }),
  10167. smalltalk.AbstractCodeGenerator);
  10168. smalltalk.addMethod(
  10169. "_compileNode_",
  10170. smalltalk.method({
  10171. selector: "compileNode:",
  10172. category: '*Compiler',
  10173. fn: function (aNode){
  10174. var self=this;
  10175. return smalltalk.withContext(function($ctx1) { _st(self)._subclassResponsibility();
  10176. return self}, self, "compileNode:", [aNode], smalltalk.AbstractCodeGenerator)},
  10177. args: ["aNode"],
  10178. source: "compileNode: aNode\x0a\x09self subclassResponsibility",
  10179. messageSends: ["subclassResponsibility"],
  10180. referencedClasses: []
  10181. }),
  10182. smalltalk.AbstractCodeGenerator);
  10183. smalltalk.addMethod(
  10184. "_currentClass",
  10185. smalltalk.method({
  10186. selector: "currentClass",
  10187. category: '*Compiler',
  10188. fn: function (){
  10189. var self=this;
  10190. return smalltalk.withContext(function($ctx1) { var $1;
  10191. $1=self["@currentClass"];
  10192. return $1;
  10193. }, self, "currentClass", [], smalltalk.AbstractCodeGenerator)},
  10194. args: [],
  10195. source: "currentClass\x0a\x09^currentClass",
  10196. messageSends: [],
  10197. referencedClasses: []
  10198. }),
  10199. smalltalk.AbstractCodeGenerator);
  10200. smalltalk.addMethod(
  10201. "_currentClass_",
  10202. smalltalk.method({
  10203. selector: "currentClass:",
  10204. category: '*Compiler',
  10205. fn: function (aClass){
  10206. var self=this;
  10207. return smalltalk.withContext(function($ctx1) { self["@currentClass"]=aClass;
  10208. return self}, self, "currentClass:", [aClass], smalltalk.AbstractCodeGenerator)},
  10209. args: ["aClass"],
  10210. source: "currentClass: aClass\x0a\x09currentClass := aClass",
  10211. messageSends: [],
  10212. referencedClasses: []
  10213. }),
  10214. smalltalk.AbstractCodeGenerator);
  10215. smalltalk.addMethod(
  10216. "_pseudoVariables",
  10217. smalltalk.method({
  10218. selector: "pseudoVariables",
  10219. category: '*Compiler',
  10220. fn: function (){
  10221. var self=this;
  10222. return smalltalk.withContext(function($ctx1) { return ["self", "super", "true", "false", "nil", "thisContext"];
  10223. }, self, "pseudoVariables", [], smalltalk.AbstractCodeGenerator)},
  10224. args: [],
  10225. source: "pseudoVariables\x0a\x09^#('self' 'super' 'true' 'false' 'nil' 'thisContext')",
  10226. messageSends: [],
  10227. referencedClasses: []
  10228. }),
  10229. smalltalk.AbstractCodeGenerator);
  10230. smalltalk.addMethod(
  10231. "_safeVariableNameFor_",
  10232. smalltalk.method({
  10233. selector: "safeVariableNameFor:",
  10234. category: '*Compiler',
  10235. fn: function (aString){
  10236. var self=this;
  10237. return smalltalk.withContext(function($ctx1) { var $2,$1;
  10238. $2=_st(_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._reservedWords())._includes_(aString);
  10239. if(smalltalk.assert($2)){
  10240. $1=_st(aString).__comma("_");
  10241. } else {
  10242. $1=aString;
  10243. };
  10244. return $1;
  10245. }, self, "safeVariableNameFor:", [aString], smalltalk.AbstractCodeGenerator)},
  10246. args: ["aString"],
  10247. source: "safeVariableNameFor: aString\x0a\x09^(Smalltalk current reservedWords includes: aString)\x0a\x09\x09ifTrue: [aString, '_']\x0a\x09\x09ifFalse: [aString]",
  10248. messageSends: ["ifTrue:ifFalse:", ",", "includes:", "reservedWords", "current"],
  10249. referencedClasses: ["Smalltalk"]
  10250. }),
  10251. smalltalk.AbstractCodeGenerator);
  10252. smalltalk.addMethod(
  10253. "_source",
  10254. smalltalk.method({
  10255. selector: "source",
  10256. category: '*Compiler',
  10257. fn: function (){
  10258. var self=this;
  10259. return smalltalk.withContext(function($ctx1) { var $2,$1;
  10260. $2=self["@source"];
  10261. if(($receiver = $2) == nil || $receiver == undefined){
  10262. $1="";
  10263. } else {
  10264. $1=$2;
  10265. };
  10266. return $1;
  10267. }, self, "source", [], smalltalk.AbstractCodeGenerator)},
  10268. args: [],
  10269. source: "source\x0a\x09^source ifNil: ['']",
  10270. messageSends: ["ifNil:"],
  10271. referencedClasses: []
  10272. }),
  10273. smalltalk.AbstractCodeGenerator);
  10274. smalltalk.addMethod(
  10275. "_source_",
  10276. smalltalk.method({
  10277. selector: "source:",
  10278. category: '*Compiler',
  10279. fn: function (aString){
  10280. var self=this;
  10281. return smalltalk.withContext(function($ctx1) { self["@source"]=aString;
  10282. return self}, self, "source:", [aString], smalltalk.AbstractCodeGenerator)},
  10283. args: ["aString"],
  10284. source: "source: aString\x0a\x09source := aString",
  10285. messageSends: [],
  10286. referencedClasses: []
  10287. }),
  10288. smalltalk.AbstractCodeGenerator);
  10289. smalltalk.addMethod(
  10290. "_compileNode_",
  10291. smalltalk.method({
  10292. selector: "compileNode:",
  10293. category: '*Compiler',
  10294. fn: function (aNode){
  10295. var self=this;
  10296. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  10297. $ctx1.locals.ir=nil;
  10298. $ctx1.locals.stream=nil;
  10299. _st(_st(self)._semanticAnalyzer())._visit_(aNode);
  10300. $ctx1.locals.ir=_st(_st(self)._translator())._visit_(aNode);
  10301. $2=_st(self)._irTranslator();
  10302. _st($2)._visit_($ctx1.locals.ir);
  10303. $3=_st($2)._contents();
  10304. $1=$3;
  10305. return $1;
  10306. }, self, "compileNode:", [aNode], smalltalk.CodeGenerator)},
  10307. args: ["aNode"],
  10308. source: "compileNode: aNode\x0a\x09| ir stream |\x0a\x09self semanticAnalyzer visit: aNode.\x0a\x09ir := self translator visit: aNode.\x0a\x09^ self irTranslator\x0a\x09\x09visit: ir;\x0a\x09\x09contents",
  10309. messageSends: ["visit:", "semanticAnalyzer", "translator", "irTranslator", "contents"],
  10310. referencedClasses: []
  10311. }),
  10312. smalltalk.CodeGenerator);
  10313. smalltalk.addMethod(
  10314. "_irTranslator",
  10315. smalltalk.method({
  10316. selector: "irTranslator",
  10317. category: '*Compiler',
  10318. fn: function (){
  10319. var self=this;
  10320. return smalltalk.withContext(function($ctx1) { var $1;
  10321. $1=_st((smalltalk.IRJSTranslator || IRJSTranslator))._new();
  10322. return $1;
  10323. }, self, "irTranslator", [], smalltalk.CodeGenerator)},
  10324. args: [],
  10325. source: "irTranslator\x0a\x09^ IRJSTranslator new",
  10326. messageSends: ["new"],
  10327. referencedClasses: ["IRJSTranslator"]
  10328. }),
  10329. smalltalk.CodeGenerator);
  10330. smalltalk.addMethod(
  10331. "_semanticAnalyzer",
  10332. smalltalk.method({
  10333. selector: "semanticAnalyzer",
  10334. category: '*Compiler',
  10335. fn: function (){
  10336. var self=this;
  10337. return smalltalk.withContext(function($ctx1) { var $1;
  10338. $1=_st((smalltalk.SemanticAnalyzer || SemanticAnalyzer))._on_(_st(self)._currentClass());
  10339. return $1;
  10340. }, self, "semanticAnalyzer", [], smalltalk.CodeGenerator)},
  10341. args: [],
  10342. source: "semanticAnalyzer\x0a\x09^ SemanticAnalyzer on: self currentClass",
  10343. messageSends: ["on:", "currentClass"],
  10344. referencedClasses: ["SemanticAnalyzer"]
  10345. }),
  10346. smalltalk.CodeGenerator);
  10347. smalltalk.addMethod(
  10348. "_translator",
  10349. smalltalk.method({
  10350. selector: "translator",
  10351. category: '*Compiler',
  10352. fn: function (){
  10353. var self=this;
  10354. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  10355. $2=_st((smalltalk.IRASTTranslator || IRASTTranslator))._new();
  10356. _st($2)._source_(_st(self)._source());
  10357. _st($2)._theClass_(_st(self)._currentClass());
  10358. $3=_st($2)._yourself();
  10359. $1=$3;
  10360. return $1;
  10361. }, self, "translator", [], smalltalk.CodeGenerator)},
  10362. args: [],
  10363. source: "translator\x0a\x09^ IRASTTranslator new\x0a\x09\x09source: self source;\x0a\x09\x09theClass: self currentClass;\x0a\x09\x09yourself",
  10364. messageSends: ["source:", "source", "new", "theClass:", "currentClass", "yourself"],
  10365. referencedClasses: ["IRASTTranslator"]
  10366. }),
  10367. smalltalk.CodeGenerator);
  10368. smalltalk.addMethod(
  10369. "_compileNode_",
  10370. smalltalk.method({
  10371. selector: "compileNode:",
  10372. category: '*Compiler',
  10373. fn: function (aNode){
  10374. var self=this;
  10375. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  10376. $ctx1.locals.ir=nil;
  10377. $ctx1.locals.stream=nil;
  10378. _st(_st(self)._semanticAnalyzer())._visit_(aNode);
  10379. $ctx1.locals.ir=_st(_st(self)._translator())._visit_(aNode);
  10380. _st(_st(self)._inliner())._visit_($ctx1.locals.ir);
  10381. $2=_st(self)._irTranslator();
  10382. _st($2)._visit_($ctx1.locals.ir);
  10383. $3=_st($2)._contents();
  10384. $1=$3;
  10385. return $1;
  10386. }, self, "compileNode:", [aNode], smalltalk.InliningCodeGenerator)},
  10387. args: ["aNode"],
  10388. source: "compileNode: aNode\x0a\x09| ir stream |\x0a\x0a\x09self semanticAnalyzer visit: aNode.\x0a\x09ir := self translator visit: aNode.\x0a\x09self inliner visit: ir.\x0a\x0a\x09^ self irTranslator\x0a\x09\x09visit: ir;\x0a\x09\x09contents",
  10389. messageSends: ["visit:", "semanticAnalyzer", "translator", "inliner", "irTranslator", "contents"],
  10390. referencedClasses: []
  10391. }),
  10392. smalltalk.InliningCodeGenerator);
  10393. smalltalk.addMethod(
  10394. "_inliner",
  10395. smalltalk.method({
  10396. selector: "inliner",
  10397. category: '*Compiler',
  10398. fn: function (){
  10399. var self=this;
  10400. return smalltalk.withContext(function($ctx1) { var $1;
  10401. $1=_st((smalltalk.IRInliner || IRInliner))._new();
  10402. return $1;
  10403. }, self, "inliner", [], smalltalk.InliningCodeGenerator)},
  10404. args: [],
  10405. source: "inliner\x0a\x09^ IRInliner new",
  10406. messageSends: ["new"],
  10407. referencedClasses: ["IRInliner"]
  10408. }),
  10409. smalltalk.InliningCodeGenerator);
  10410. smalltalk.addMethod(
  10411. "_irTranslator",
  10412. smalltalk.method({
  10413. selector: "irTranslator",
  10414. category: '*Compiler',
  10415. fn: function (){
  10416. var self=this;
  10417. return smalltalk.withContext(function($ctx1) { var $1;
  10418. $1=_st((smalltalk.IRInliningJSTranslator || IRInliningJSTranslator))._new();
  10419. return $1;
  10420. }, self, "irTranslator", [], smalltalk.InliningCodeGenerator)},
  10421. args: [],
  10422. source: "irTranslator\x0a\x09^ IRInliningJSTranslator new",
  10423. messageSends: ["new"],
  10424. referencedClasses: ["IRInliningJSTranslator"]
  10425. }),
  10426. smalltalk.InliningCodeGenerator);
  10427. smalltalk.addMethod(
  10428. "_alias_",
  10429. smalltalk.method({
  10430. selector: "alias:",
  10431. category: '*Compiler',
  10432. fn: function (aNode){
  10433. var self=this;
  10434. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5,$6,$7;
  10435. $ctx1.locals.variable=nil;
  10436. $1=_st(aNode)._isImmutable();
  10437. if(smalltalk.assert($1)){
  10438. $2=_st(self)._visit_(aNode);
  10439. return $2;
  10440. };
  10441. $3=_st((smalltalk.IRVariable || IRVariable))._new();
  10442. _st($3)._variable_(_st(_st((smalltalk.AliasVar || AliasVar))._new())._name_(_st("$").__comma(_st(self)._nextAlias())));
  10443. $4=_st($3)._yourself();
  10444. $ctx1.locals.variable=$4;
  10445. $5=_st((smalltalk.IRAssignment || IRAssignment))._new();
  10446. _st($5)._add_($ctx1.locals.variable);
  10447. _st($5)._add_(_st(self)._visit_(aNode));
  10448. $6=_st($5)._yourself();
  10449. _st(_st(self)._sequence())._add_($6);
  10450. _st(_st(_st(self)._method())._internalVariables())._add_($ctx1.locals.variable);
  10451. $7=$ctx1.locals.variable;
  10452. return $7;
  10453. }, self, "alias:", [aNode], smalltalk.IRASTTranslator)},
  10454. args: ["aNode"],
  10455. 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",
  10456. messageSends: ["ifTrue:", "visit:", "isImmutable", "variable:", "name:", ",", "nextAlias", "new", "yourself", "add:", "sequence", "internalVariables", "method"],
  10457. referencedClasses: ["AliasVar", "IRVariable", "IRAssignment"]
  10458. }),
  10459. smalltalk.IRASTTranslator);
  10460. smalltalk.addMethod(
  10461. "_aliasTemporally_",
  10462. smalltalk.method({
  10463. selector: "aliasTemporally:",
  10464. category: '*Compiler',
  10465. fn: function (aCollection){
  10466. var self=this;
  10467. return smalltalk.withContext(function($ctx1) { var $1,$3,$2,$4,$6,$8,$7,$5,$9;
  10468. $ctx1.locals.threshold=nil;
  10469. $ctx1.locals.result=nil;
  10470. $ctx1.locals.threshold=(0);
  10471. $1=aCollection;
  10472. $2=(function(each,i){
  10473. return smalltalk.withContext(function($ctx2) { $3=_st(each)._subtreeNeedsAliasing();
  10474. if(smalltalk.assert($3)){
  10475. $ctx1.locals.threshold=i;
  10476. return $ctx1.locals.threshold;
  10477. };
  10478. })});
  10479. _st($1)._withIndexDo_($2);
  10480. $ctx1.locals.result=_st((smalltalk.OrderedCollection || OrderedCollection))._new();
  10481. $4=aCollection;
  10482. $5=(function(each,i){
  10483. return smalltalk.withContext(function($ctx2) { $6=$ctx1.locals.result;
  10484. $8=_st(i).__lt_eq($ctx1.locals.threshold);
  10485. if(smalltalk.assert($8)){
  10486. $7=_st(self)._alias_(each);
  10487. } else {
  10488. $7=_st(self)._visit_(each);
  10489. };
  10490. return _st($6)._add_($7);
  10491. })});
  10492. _st($4)._withIndexDo_($5);
  10493. $9=$ctx1.locals.result;
  10494. return $9;
  10495. }, self, "aliasTemporally:", [aCollection], smalltalk.IRASTTranslator)},
  10496. args: ["aCollection"],
  10497. source: "aliasTemporally: aCollection\x0a\x09\x22https://github.com/NicolasPetton/amber/issues/296\x0a \x0a If a node is aliased, all preceding ones are aliased as well.\x0a The tree is iterated twice. First we get the aliasing dependency, \x0a then the aliasing itself is done\x22\x0a\x0a\x09| threshold result |\x0a threshold := 0.\x0a \x0a aCollection withIndexDo: [ :each :i |\x0a each subtreeNeedsAliasing\x0a\x09\x09 ifTrue: [ 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 ^result",
  10498. messageSends: ["withIndexDo:", "ifTrue:", "subtreeNeedsAliasing", "new", "add:", "ifTrue:ifFalse:", "alias:", "visit:", "<="],
  10499. referencedClasses: ["OrderedCollection"]
  10500. }),
  10501. smalltalk.IRASTTranslator);
  10502. smalltalk.addMethod(
  10503. "_method",
  10504. smalltalk.method({
  10505. selector: "method",
  10506. category: '*Compiler',
  10507. fn: function (){
  10508. var self=this;
  10509. return smalltalk.withContext(function($ctx1) { var $1;
  10510. $1=self["@method"];
  10511. return $1;
  10512. }, self, "method", [], smalltalk.IRASTTranslator)},
  10513. args: [],
  10514. source: "method\x0a\x09^ method",
  10515. messageSends: [],
  10516. referencedClasses: []
  10517. }),
  10518. smalltalk.IRASTTranslator);
  10519. smalltalk.addMethod(
  10520. "_method_",
  10521. smalltalk.method({
  10522. selector: "method:",
  10523. category: '*Compiler',
  10524. fn: function (anIRMethod){
  10525. var self=this;
  10526. return smalltalk.withContext(function($ctx1) { self["@method"]=anIRMethod;
  10527. return self}, self, "method:", [anIRMethod], smalltalk.IRASTTranslator)},
  10528. args: ["anIRMethod"],
  10529. source: "method: anIRMethod\x0a\x09method := anIRMethod",
  10530. messageSends: [],
  10531. referencedClasses: []
  10532. }),
  10533. smalltalk.IRASTTranslator);
  10534. smalltalk.addMethod(
  10535. "_nextAlias",
  10536. smalltalk.method({
  10537. selector: "nextAlias",
  10538. category: '*Compiler',
  10539. fn: function (){
  10540. var self=this;
  10541. return smalltalk.withContext(function($ctx1) { var $1,$2;
  10542. $1=self["@nextAlias"];
  10543. if(($receiver = $1) == nil || $receiver == undefined){
  10544. self["@nextAlias"]=(0);
  10545. self["@nextAlias"];
  10546. } else {
  10547. $1;
  10548. };
  10549. self["@nextAlias"]=_st(self["@nextAlias"]).__plus((1));
  10550. $2=_st(self["@nextAlias"])._asString();
  10551. return $2;
  10552. }, self, "nextAlias", [], smalltalk.IRASTTranslator)},
  10553. args: [],
  10554. source: "nextAlias\x0a\x09nextAlias ifNil: [ nextAlias := 0 ].\x0a\x09nextAlias := nextAlias + 1.\x0a\x09^ nextAlias asString",
  10555. messageSends: ["ifNil:", "+", "asString"],
  10556. referencedClasses: []
  10557. }),
  10558. smalltalk.IRASTTranslator);
  10559. smalltalk.addMethod(
  10560. "_sequence",
  10561. smalltalk.method({
  10562. selector: "sequence",
  10563. category: '*Compiler',
  10564. fn: function (){
  10565. var self=this;
  10566. return smalltalk.withContext(function($ctx1) { var $1;
  10567. $1=self["@sequence"];
  10568. return $1;
  10569. }, self, "sequence", [], smalltalk.IRASTTranslator)},
  10570. args: [],
  10571. source: "sequence\x0a\x09^ sequence",
  10572. messageSends: [],
  10573. referencedClasses: []
  10574. }),
  10575. smalltalk.IRASTTranslator);
  10576. smalltalk.addMethod(
  10577. "_sequence_",
  10578. smalltalk.method({
  10579. selector: "sequence:",
  10580. category: '*Compiler',
  10581. fn: function (anIRSequence){
  10582. var self=this;
  10583. return smalltalk.withContext(function($ctx1) { self["@sequence"]=anIRSequence;
  10584. return self}, self, "sequence:", [anIRSequence], smalltalk.IRASTTranslator)},
  10585. args: ["anIRSequence"],
  10586. source: "sequence: anIRSequence\x0a\x09sequence := anIRSequence",
  10587. messageSends: [],
  10588. referencedClasses: []
  10589. }),
  10590. smalltalk.IRASTTranslator);
  10591. smalltalk.addMethod(
  10592. "_source",
  10593. smalltalk.method({
  10594. selector: "source",
  10595. category: '*Compiler',
  10596. fn: function (){
  10597. var self=this;
  10598. return smalltalk.withContext(function($ctx1) { var $1;
  10599. $1=self["@source"];
  10600. return $1;
  10601. }, self, "source", [], smalltalk.IRASTTranslator)},
  10602. args: [],
  10603. source: "source\x0a\x09^ source",
  10604. messageSends: [],
  10605. referencedClasses: []
  10606. }),
  10607. smalltalk.IRASTTranslator);
  10608. smalltalk.addMethod(
  10609. "_source_",
  10610. smalltalk.method({
  10611. selector: "source:",
  10612. category: '*Compiler',
  10613. fn: function (aString){
  10614. var self=this;
  10615. return smalltalk.withContext(function($ctx1) { self["@source"]=aString;
  10616. return self}, self, "source:", [aString], smalltalk.IRASTTranslator)},
  10617. args: ["aString"],
  10618. source: "source: aString\x0a\x09source := aString",
  10619. messageSends: [],
  10620. referencedClasses: []
  10621. }),
  10622. smalltalk.IRASTTranslator);
  10623. smalltalk.addMethod(
  10624. "_theClass",
  10625. smalltalk.method({
  10626. selector: "theClass",
  10627. category: '*Compiler',
  10628. fn: function (){
  10629. var self=this;
  10630. return smalltalk.withContext(function($ctx1) { var $1;
  10631. $1=self["@theClass"];
  10632. return $1;
  10633. }, self, "theClass", [], smalltalk.IRASTTranslator)},
  10634. args: [],
  10635. source: "theClass\x0a\x09^ theClass",
  10636. messageSends: [],
  10637. referencedClasses: []
  10638. }),
  10639. smalltalk.IRASTTranslator);
  10640. smalltalk.addMethod(
  10641. "_theClass_",
  10642. smalltalk.method({
  10643. selector: "theClass:",
  10644. category: '*Compiler',
  10645. fn: function (aClass){
  10646. var self=this;
  10647. return smalltalk.withContext(function($ctx1) { self["@theClass"]=aClass;
  10648. return self}, self, "theClass:", [aClass], smalltalk.IRASTTranslator)},
  10649. args: ["aClass"],
  10650. source: "theClass: aClass\x0a\x09theClass := aClass",
  10651. messageSends: [],
  10652. referencedClasses: []
  10653. }),
  10654. smalltalk.IRASTTranslator);
  10655. smalltalk.addMethod(
  10656. "_visitAssignmentNode_",
  10657. smalltalk.method({
  10658. selector: "visitAssignmentNode:",
  10659. category: '*Compiler',
  10660. fn: function (aNode){
  10661. var self=this;
  10662. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  10663. $ctx1.locals.left=nil;
  10664. $ctx1.locals.right=nil;
  10665. $ctx1.locals.assignment=nil;
  10666. $ctx1.locals.right=_st(self)._visit_(_st(aNode)._right());
  10667. $ctx1.locals.left=_st(self)._visit_(_st(aNode)._left());
  10668. $1=_st((smalltalk.IRAssignment || IRAssignment))._new();
  10669. _st($1)._add_($ctx1.locals.left);
  10670. _st($1)._add_($ctx1.locals.right);
  10671. $2=_st($1)._yourself();
  10672. _st(_st(self)._sequence())._add_($2);
  10673. $3=$ctx1.locals.left;
  10674. return $3;
  10675. }, self, "visitAssignmentNode:", [aNode], smalltalk.IRASTTranslator)},
  10676. args: ["aNode"],
  10677. 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",
  10678. messageSends: ["visit:", "right", "left", "add:", "new", "yourself", "sequence"],
  10679. referencedClasses: ["IRAssignment"]
  10680. }),
  10681. smalltalk.IRASTTranslator);
  10682. smalltalk.addMethod(
  10683. "_visitBlockNode_",
  10684. smalltalk.method({
  10685. selector: "visitBlockNode:",
  10686. category: '*Compiler',
  10687. fn: function (aNode){
  10688. var self=this;
  10689. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5;
  10690. $ctx1.locals.closure=nil;
  10691. $1=_st((smalltalk.IRClosure || IRClosure))._new();
  10692. _st($1)._arguments_(_st(aNode)._parameters());
  10693. _st($1)._scope_(_st(aNode)._scope());
  10694. $2=_st($1)._yourself();
  10695. $ctx1.locals.closure=$2;
  10696. _st(_st(_st(aNode)._scope())._temps())._do_((function(each){
  10697. return smalltalk.withContext(function($ctx2) { $3=_st((smalltalk.IRTempDeclaration || IRTempDeclaration))._new();
  10698. _st($3)._name_(_st(each)._name());
  10699. _st($3)._scope_(_st(aNode)._scope());
  10700. $4=_st($3)._yourself();
  10701. return _st($ctx1.locals.closure)._add_($4);
  10702. })}));
  10703. _st(_st(aNode)._nodes())._do_((function(each){
  10704. return smalltalk.withContext(function($ctx2) { return _st($ctx1.locals.closure)._add_(_st(self)._visit_(each));
  10705. })}));
  10706. $5=$ctx1.locals.closure;
  10707. return $5;
  10708. }, self, "visitBlockNode:", [aNode], smalltalk.IRASTTranslator)},
  10709. args: ["aNode"],
  10710. source: "visitBlockNode: aNode\x0a\x09| closure |\x0a\x09closure := IRClosure new\x0a\x09\x09arguments: aNode parameters;\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 scope: aNode scope;\x0a\x09\x09\x09yourself) ].\x0a\x09aNode nodes do: [ :each | closure add: (self visit: each) ].\x0a\x09^ closure",
  10711. messageSends: ["arguments:", "parameters", "new", "scope:", "scope", "yourself", "do:", "add:", "name:", "name", "temps", "visit:", "nodes"],
  10712. referencedClasses: ["IRClosure", "IRTempDeclaration"]
  10713. }),
  10714. smalltalk.IRASTTranslator);
  10715. smalltalk.addMethod(
  10716. "_visitBlockSequenceNode_",
  10717. smalltalk.method({
  10718. selector: "visitBlockSequenceNode:",
  10719. category: '*Compiler',
  10720. fn: function (aNode){
  10721. var self=this;
  10722. return smalltalk.withContext(function($ctx1) { var $2,$3,$5,$7,$8,$9,$6,$4,$1;
  10723. $2=self;
  10724. $3=_st((smalltalk.IRBlockSequence || IRBlockSequence))._new();
  10725. $4=(function(){
  10726. return smalltalk.withContext(function($ctx2) { $5=_st(aNode)._nodes();
  10727. $6=(function(){
  10728. return smalltalk.withContext(function($ctx3) { _st(_st(_st(aNode)._nodes())._allButLast())._do_((function(each){
  10729. return smalltalk.withContext(function($ctx4) { return _st(_st(self)._sequence())._add_(_st(self)._visit_(each));
  10730. })}));
  10731. $7=_st(_st(_st(aNode)._nodes())._last())._isReturnNode();
  10732. if(smalltalk.assert($7)){
  10733. return _st(_st(self)._sequence())._add_(_st(self)._visit_(_st(_st(aNode)._nodes())._last()));
  10734. } else {
  10735. $8=_st((smalltalk.IRBlockReturn || IRBlockReturn))._new();
  10736. _st($8)._add_(_st(self)._visit_(_st(_st(aNode)._nodes())._last()));
  10737. $9=_st($8)._yourself();
  10738. return _st(_st(self)._sequence())._add_($9);
  10739. };
  10740. })});
  10741. return _st($5)._ifNotEmpty_($6);
  10742. })});
  10743. $1=_st($2)._withSequence_do_($3,$4);
  10744. return $1;
  10745. }, self, "visitBlockSequenceNode:", [aNode], smalltalk.IRASTTranslator)},
  10746. args: ["aNode"],
  10747. 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 visit: each) ].\x0a\x09\x09\x09\x09aNode nodes last isReturnNode \x0a\x09\x09\x09\x09\x09ifFalse: [ self sequence add: (IRBlockReturn new add: (self visit: aNode nodes last); yourself) ]\x0a\x09\x09\x09\x09\x09ifTrue: [ self sequence add: (self visit: aNode nodes last) ]]]",
  10748. messageSends: ["withSequence:do:", "new", "ifNotEmpty:", "do:", "add:", "visit:", "sequence", "allButLast", "nodes", "ifFalse:ifTrue:", "last", "yourself", "isReturnNode"],
  10749. referencedClasses: ["IRBlockSequence", "IRBlockReturn"]
  10750. }),
  10751. smalltalk.IRASTTranslator);
  10752. smalltalk.addMethod(
  10753. "_visitCascadeNode_",
  10754. smalltalk.method({
  10755. selector: "visitCascadeNode:",
  10756. category: '*Compiler',
  10757. fn: function (aNode){
  10758. var self=this;
  10759. return smalltalk.withContext(function($ctx1) { var $1,$2;
  10760. $ctx1.locals.alias=nil;
  10761. $1=_st(_st(aNode)._receiver())._isImmutable();
  10762. if(! smalltalk.assert($1)){
  10763. $ctx1.locals.alias=_st(self)._alias_(_st(aNode)._receiver());
  10764. $ctx1.locals.alias;
  10765. _st(_st(aNode)._nodes())._do_((function(each){
  10766. return smalltalk.withContext(function($ctx2) { return _st(each)._receiver_(_st(_st((smalltalk.VariableNode || VariableNode))._new())._binding_(_st($ctx1.locals.alias)._variable()));
  10767. })}));
  10768. };
  10769. _st(_st(_st(aNode)._nodes())._allButLast())._do_((function(each){
  10770. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._sequence())._add_(_st(self)._visit_(each));
  10771. })}));
  10772. $2=_st(self)._alias_(_st(_st(aNode)._nodes())._last());
  10773. return $2;
  10774. }, self, "visitCascadeNode:", [aNode], smalltalk.IRASTTranslator)},
  10775. args: ["aNode"],
  10776. source: "visitCascadeNode: aNode\x0a\x09| alias |\x0a\x0a\x09aNode receiver isImmutable ifFalse: [ \x0a\x09\x09alias := self alias: aNode receiver.\x0a\x09\x09aNode nodes do: [ :each |\x0a\x09\x09\x09each receiver: (VariableNode new binding: alias variable) ]].\x0a\x0a\x09aNode nodes allButLast do: [ :each |\x0a\x09\x09self sequence add: (self visit: each) ].\x0a\x0a\x09^ self alias: aNode nodes last",
  10777. messageSends: ["ifFalse:", "alias:", "receiver", "do:", "receiver:", "binding:", "variable", "new", "nodes", "isImmutable", "add:", "visit:", "sequence", "allButLast", "last"],
  10778. referencedClasses: ["VariableNode"]
  10779. }),
  10780. smalltalk.IRASTTranslator);
  10781. smalltalk.addMethod(
  10782. "_visitDynamicArrayNode_",
  10783. smalltalk.method({
  10784. selector: "visitDynamicArrayNode:",
  10785. category: '*Compiler',
  10786. fn: function (aNode){
  10787. var self=this;
  10788. return smalltalk.withContext(function($ctx1) { var $1;
  10789. $ctx1.locals.array=nil;
  10790. $ctx1.locals.array=_st((smalltalk.IRDynamicArray || IRDynamicArray))._new();
  10791. _st(_st(self)._aliasTemporally_(_st(aNode)._nodes()))._do_((function(each){
  10792. return smalltalk.withContext(function($ctx2) { return _st($ctx1.locals.array)._add_(each);
  10793. })}));
  10794. $1=$ctx1.locals.array;
  10795. return $1;
  10796. }, self, "visitDynamicArrayNode:", [aNode], smalltalk.IRASTTranslator)},
  10797. args: ["aNode"],
  10798. source: "visitDynamicArrayNode: aNode\x0a\x09| array |\x0a\x09array := IRDynamicArray new.\x0a\x09(self aliasTemporally: aNode nodes) do: [:each | array add: each].\x0a\x09^ array",
  10799. messageSends: ["new", "do:", "add:", "aliasTemporally:", "nodes"],
  10800. referencedClasses: ["IRDynamicArray"]
  10801. }),
  10802. smalltalk.IRASTTranslator);
  10803. smalltalk.addMethod(
  10804. "_visitDynamicDictionaryNode_",
  10805. smalltalk.method({
  10806. selector: "visitDynamicDictionaryNode:",
  10807. category: '*Compiler',
  10808. fn: function (aNode){
  10809. var self=this;
  10810. return smalltalk.withContext(function($ctx1) { var $1;
  10811. $ctx1.locals.dictionary=nil;
  10812. $ctx1.locals.dictionary=_st((smalltalk.IRDynamicDictionary || IRDynamicDictionary))._new();
  10813. _st(_st(self)._aliasTemporally_(_st(aNode)._nodes()))._do_((function(each){
  10814. return smalltalk.withContext(function($ctx2) { return _st($ctx1.locals.dictionary)._add_(each);
  10815. })}));
  10816. $1=$ctx1.locals.dictionary;
  10817. return $1;
  10818. }, self, "visitDynamicDictionaryNode:", [aNode], smalltalk.IRASTTranslator)},
  10819. args: ["aNode"],
  10820. source: "visitDynamicDictionaryNode: aNode\x0a\x09| dictionary |\x0a\x09dictionary := IRDynamicDictionary new.\x0a (self aliasTemporally: aNode nodes) do: [:each | dictionary add: each].\x0a\x09^ dictionary",
  10821. messageSends: ["new", "do:", "add:", "aliasTemporally:", "nodes"],
  10822. referencedClasses: ["IRDynamicDictionary"]
  10823. }),
  10824. smalltalk.IRASTTranslator);
  10825. smalltalk.addMethod(
  10826. "_visitJSStatementNode_",
  10827. smalltalk.method({
  10828. selector: "visitJSStatementNode:",
  10829. category: '*Compiler',
  10830. fn: function (aNode){
  10831. var self=this;
  10832. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  10833. $2=_st((smalltalk.IRVerbatim || IRVerbatim))._new();
  10834. _st($2)._source_(_st(aNode)._source());
  10835. $3=_st($2)._yourself();
  10836. $1=$3;
  10837. return $1;
  10838. }, self, "visitJSStatementNode:", [aNode], smalltalk.IRASTTranslator)},
  10839. args: ["aNode"],
  10840. source: "visitJSStatementNode: aNode\x0a\x09^ IRVerbatim new\x0a\x09\x09source: aNode source;\x0a\x09\x09yourself",
  10841. messageSends: ["source:", "source", "new", "yourself"],
  10842. referencedClasses: ["IRVerbatim"]
  10843. }),
  10844. smalltalk.IRASTTranslator);
  10845. smalltalk.addMethod(
  10846. "_visitMethodNode_",
  10847. smalltalk.method({
  10848. selector: "visitMethodNode:",
  10849. category: '*Compiler',
  10850. fn: function (aNode){
  10851. var self=this;
  10852. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5,$6,$7,$8;
  10853. $1=_st((smalltalk.IRMethod || IRMethod))._new();
  10854. _st($1)._source_(_st(self)._source());
  10855. _st($1)._theClass_(_st(self)._theClass());
  10856. _st($1)._arguments_(_st(aNode)._arguments());
  10857. _st($1)._selector_(_st(aNode)._selector());
  10858. _st($1)._messageSends_(_st(aNode)._messageSends());
  10859. _st($1)._superSends_(_st(aNode)._superSends());
  10860. _st($1)._classReferences_(_st(aNode)._classReferences());
  10861. _st($1)._scope_(_st(aNode)._scope());
  10862. $2=_st($1)._yourself();
  10863. _st(self)._method_($2);
  10864. _st(_st(_st(aNode)._scope())._temps())._do_((function(each){
  10865. return smalltalk.withContext(function($ctx2) { $3=_st((smalltalk.IRTempDeclaration || IRTempDeclaration))._new();
  10866. _st($3)._name_(_st(each)._name());
  10867. _st($3)._scope_(_st(aNode)._scope());
  10868. $4=_st($3)._yourself();
  10869. return _st(_st(self)._method())._add_($4);
  10870. })}));
  10871. _st(_st(aNode)._nodes())._do_((function(each){
  10872. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._method())._add_(_st(self)._visit_(each));
  10873. })}));
  10874. $5=_st(_st(aNode)._scope())._hasLocalReturn();
  10875. if(! smalltalk.assert($5)){
  10876. $6=_st((smalltalk.IRVariable || IRVariable))._new();
  10877. _st($6)._variable_(_st(_st(_st(aNode)._scope())._pseudoVars())._at_("self"));
  10878. $7=_st($6)._yourself();
  10879. _st(_st(_st(self)._method())._add_(_st((smalltalk.IRReturn || IRReturn))._new()))._add_($7);
  10880. };
  10881. $8=_st(self)._method();
  10882. return $8;
  10883. }, self, "visitMethodNode:", [aNode], smalltalk.IRASTTranslator)},
  10884. args: ["aNode"],
  10885. source: "visitMethodNode: aNode\x0a\x0a\x09self method: (IRMethod new\x0a\x09\x09source: self source;\x0a theClass: self theClass;\x0a\x09\x09arguments: aNode arguments;\x0a\x09\x09selector: aNode selector;\x0a\x09\x09messageSends: aNode messageSends;\x0a superSends: aNode superSends;\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 scope: aNode scope;\x0a\x09\x09\x09yourself) ].\x0a\x0a\x09aNode nodes do: [ :each | self method add: (self visit: each) ].\x0a\x0a\x09aNode scope hasLocalReturn ifFalse: [\x0a\x09\x09(self method add: IRReturn new) add: (IRVariable new\x0a\x09\x09\x09variable: (aNode scope pseudoVars at: 'self');\x0a\x09\x09\x09yourself) ].\x0a\x0a\x09^ self method",
  10886. messageSends: ["method:", "source:", "source", "new", "theClass:", "theClass", "arguments:", "arguments", "selector:", "selector", "messageSends:", "messageSends", "superSends:", "superSends", "classReferences:", "classReferences", "scope:", "scope", "yourself", "do:", "add:", "name:", "name", "method", "temps", "visit:", "nodes", "ifFalse:", "variable:", "at:", "pseudoVars", "hasLocalReturn"],
  10887. referencedClasses: ["IRMethod", "IRTempDeclaration", "IRVariable", "IRReturn"]
  10888. }),
  10889. smalltalk.IRASTTranslator);
  10890. smalltalk.addMethod(
  10891. "_visitReturnNode_",
  10892. smalltalk.method({
  10893. selector: "visitReturnNode:",
  10894. category: '*Compiler',
  10895. fn: function (aNode){
  10896. var self=this;
  10897. return smalltalk.withContext(function($ctx1) { var $1,$2;
  10898. $ctx1.locals.return=nil;
  10899. $1=_st(aNode)._nonLocalReturn();
  10900. if(smalltalk.assert($1)){
  10901. $ctx1.locals.return_=_st((smalltalk.IRNonLocalReturn || IRNonLocalReturn))._new();
  10902. } else {
  10903. $ctx1.locals.return_=_st((smalltalk.IRReturn || IRReturn))._new();
  10904. };
  10905. _st($ctx1.locals.return_)._scope_(_st(aNode)._scope());
  10906. _st(_st(aNode)._nodes())._do_((function(each){
  10907. return smalltalk.withContext(function($ctx2) { return _st($ctx1.locals.return_)._add_(_st(self)._alias_(each));
  10908. })}));
  10909. $2=$ctx1.locals.return_;
  10910. return $2;
  10911. }, self, "visitReturnNode:", [aNode], smalltalk.IRASTTranslator)},
  10912. args: ["aNode"],
  10913. 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",
  10914. messageSends: ["ifTrue:ifFalse:", "new", "nonLocalReturn", "scope:", "scope", "do:", "add:", "alias:", "nodes"],
  10915. referencedClasses: ["IRNonLocalReturn", "IRReturn"]
  10916. }),
  10917. smalltalk.IRASTTranslator);
  10918. smalltalk.addMethod(
  10919. "_visitSendNode_",
  10920. smalltalk.method({
  10921. selector: "visitSendNode:",
  10922. category: '*Compiler',
  10923. fn: function (aNode){
  10924. var self=this;
  10925. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  10926. $ctx1.locals.send=nil;
  10927. $ctx1.locals.all=nil;
  10928. $ctx1.locals.receiver=nil;
  10929. $ctx1.locals.arguments=nil;
  10930. $ctx1.locals.send=_st((smalltalk.IRSend || IRSend))._new();
  10931. $1=$ctx1.locals.send;
  10932. _st($1)._selector_(_st(aNode)._selector());
  10933. $2=_st($1)._index_(_st(aNode)._index());
  10934. $3=_st(aNode)._superSend();
  10935. if(smalltalk.assert($3)){
  10936. _st($ctx1.locals.send)._classSend_(_st(_st(self)._theClass())._superclass());
  10937. };
  10938. $ctx1.locals.all=_st(self)._aliasTemporally_(_st([_st(aNode)._receiver()]).__comma(_st(aNode)._arguments()));
  10939. $ctx1.locals.receiver=_st($ctx1.locals.all)._first();
  10940. $ctx1.locals.arguments=_st($ctx1.locals.all)._allButFirst();
  10941. _st($ctx1.locals.send)._add_($ctx1.locals.receiver);
  10942. _st($ctx1.locals.arguments)._do_((function(each){
  10943. return smalltalk.withContext(function($ctx2) { return _st($ctx1.locals.send)._add_(each);
  10944. })}));
  10945. $4=$ctx1.locals.send;
  10946. return $4;
  10947. }, self, "visitSendNode:", [aNode], smalltalk.IRASTTranslator)},
  10948. args: ["aNode"],
  10949. 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 \x0a all := 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",
  10950. messageSends: ["new", "selector:", "selector", "index:", "index", "ifTrue:", "classSend:", "superclass", "theClass", "superSend", "aliasTemporally:", ",", "arguments", "receiver", "first", "allButFirst", "add:", "do:"],
  10951. referencedClasses: ["IRSend"]
  10952. }),
  10953. smalltalk.IRASTTranslator);
  10954. smalltalk.addMethod(
  10955. "_visitSequenceNode_",
  10956. smalltalk.method({
  10957. selector: "visitSequenceNode:",
  10958. category: '*Compiler',
  10959. fn: function (aNode){
  10960. var self=this;
  10961. return smalltalk.withContext(function($ctx1) { var $2,$3,$5,$7,$6,$4,$1;
  10962. $2=self;
  10963. $3=_st((smalltalk.IRSequence || IRSequence))._new();
  10964. $4=(function(){
  10965. return smalltalk.withContext(function($ctx2) { $5=_st(aNode)._nodes();
  10966. $6=(function(each){
  10967. return smalltalk.withContext(function($ctx3) { $ctx3.locals.instruction=nil;
  10968. $ctx3.locals.instruction=_st(self)._visit_(each);
  10969. $ctx3.locals.instruction;
  10970. $7=_st($ctx3.locals.instruction)._isVariable();
  10971. if(! smalltalk.assert($7)){
  10972. return _st(_st(self)._sequence())._add_($ctx3.locals.instruction);
  10973. };
  10974. })});
  10975. return _st($5)._do_($6);
  10976. })});
  10977. $1=_st($2)._withSequence_do_($3,$4);
  10978. return $1;
  10979. }, self, "visitSequenceNode:", [aNode], smalltalk.IRASTTranslator)},
  10980. args: ["aNode"],
  10981. source: "visitSequenceNode: aNode\x0a\x09^ self \x0a\x09\x09withSequence: IRSequence new \x09\x0a\x09\x09do: [\x0a\x09\x09\x09aNode nodes do: [ :each | | instruction |\x0a\x09\x09\x09\x09instruction := self visit: each.\x0a\x09\x09\x09\x09instruction isVariable ifFalse: [\x0a\x09\x09\x09\x09\x09self sequence add: instruction ]]]",
  10982. messageSends: ["withSequence:do:", "new", "do:", "visit:", "ifFalse:", "add:", "sequence", "isVariable", "nodes"],
  10983. referencedClasses: ["IRSequence"]
  10984. }),
  10985. smalltalk.IRASTTranslator);
  10986. smalltalk.addMethod(
  10987. "_visitValueNode_",
  10988. smalltalk.method({
  10989. selector: "visitValueNode:",
  10990. category: '*Compiler',
  10991. fn: function (aNode){
  10992. var self=this;
  10993. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  10994. $2=_st((smalltalk.IRValue || IRValue))._new();
  10995. _st($2)._value_(_st(aNode)._value());
  10996. $3=_st($2)._yourself();
  10997. $1=$3;
  10998. return $1;
  10999. }, self, "visitValueNode:", [aNode], smalltalk.IRASTTranslator)},
  11000. args: ["aNode"],
  11001. source: "visitValueNode: aNode\x0a\x09^ IRValue new \x0a\x09\x09value: aNode value; \x0a\x09\x09yourself",
  11002. messageSends: ["value:", "value", "new", "yourself"],
  11003. referencedClasses: ["IRValue"]
  11004. }),
  11005. smalltalk.IRASTTranslator);
  11006. smalltalk.addMethod(
  11007. "_visitVariableNode_",
  11008. smalltalk.method({
  11009. selector: "visitVariableNode:",
  11010. category: '*Compiler',
  11011. fn: function (aNode){
  11012. var self=this;
  11013. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  11014. $2=_st((smalltalk.IRVariable || IRVariable))._new();
  11015. _st($2)._variable_(_st(aNode)._binding());
  11016. $3=_st($2)._yourself();
  11017. $1=$3;
  11018. return $1;
  11019. }, self, "visitVariableNode:", [aNode], smalltalk.IRASTTranslator)},
  11020. args: ["aNode"],
  11021. source: "visitVariableNode: aNode\x0a\x09^ IRVariable new \x0a\x09\x09variable: aNode binding; \x0a\x09\x09yourself",
  11022. messageSends: ["variable:", "binding", "new", "yourself"],
  11023. referencedClasses: ["IRVariable"]
  11024. }),
  11025. smalltalk.IRASTTranslator);
  11026. smalltalk.addMethod(
  11027. "_withSequence_do_",
  11028. smalltalk.method({
  11029. selector: "withSequence:do:",
  11030. category: '*Compiler',
  11031. fn: function (aSequence,aBlock){
  11032. var self=this;
  11033. return smalltalk.withContext(function($ctx1) { var $1;
  11034. $ctx1.locals.outerSequence=nil;
  11035. $ctx1.locals.outerSequence=_st(self)._sequence();
  11036. _st(self)._sequence_(aSequence);
  11037. _st(aBlock)._value();
  11038. _st(self)._sequence_($ctx1.locals.outerSequence);
  11039. $1=aSequence;
  11040. return $1;
  11041. }, self, "withSequence:do:", [aSequence,aBlock], smalltalk.IRASTTranslator)},
  11042. args: ["aSequence", "aBlock"],
  11043. 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",
  11044. messageSends: ["sequence", "sequence:", "value"],
  11045. referencedClasses: []
  11046. }),
  11047. smalltalk.IRASTTranslator);
  11048. smalltalk.addMethod(
  11049. "_classReferences",
  11050. smalltalk.method({
  11051. selector: "classReferences",
  11052. category: '*Compiler',
  11053. fn: function (){
  11054. var self=this;
  11055. return smalltalk.withContext(function($ctx1) { var $2,$1;
  11056. $2=self["@classReferences"];
  11057. if(($receiver = $2) == nil || $receiver == undefined){
  11058. self["@classReferences"]=_st((smalltalk.Set || Set))._new();
  11059. $1=self["@classReferences"];
  11060. } else {
  11061. $1=$2;
  11062. };
  11063. return $1;
  11064. }, self, "classReferences", [], smalltalk.SemanticAnalyzer)},
  11065. args: [],
  11066. source: "classReferences\x0a\x09^ classReferences ifNil: [ classReferences := Set new ]",
  11067. messageSends: ["ifNil:", "new"],
  11068. referencedClasses: ["Set"]
  11069. }),
  11070. smalltalk.SemanticAnalyzer);
  11071. smalltalk.addMethod(
  11072. "_errorShadowingVariable_",
  11073. smalltalk.method({
  11074. selector: "errorShadowingVariable:",
  11075. category: '*Compiler',
  11076. fn: function (aString){
  11077. var self=this;
  11078. return smalltalk.withContext(function($ctx1) { var $1,$2;
  11079. $1=_st((smalltalk.ShadowingVariableError || ShadowingVariableError))._new();
  11080. _st($1)._variableName_(aString);
  11081. $2=_st($1)._signal();
  11082. return self}, self, "errorShadowingVariable:", [aString], smalltalk.SemanticAnalyzer)},
  11083. args: ["aString"],
  11084. source: "errorShadowingVariable: aString\x0a\x09ShadowingVariableError new\x0a\x09\x09variableName: aString;\x0a\x09\x09signal",
  11085. messageSends: ["variableName:", "new", "signal"],
  11086. referencedClasses: ["ShadowingVariableError"]
  11087. }),
  11088. smalltalk.SemanticAnalyzer);
  11089. smalltalk.addMethod(
  11090. "_errorUnknownVariable_",
  11091. smalltalk.method({
  11092. selector: "errorUnknownVariable:",
  11093. category: '*Compiler',
  11094. fn: function (aNode){
  11095. var self=this;
  11096. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  11097. $ctx1.locals.identifier=nil;
  11098. $ctx1.locals.identifier=_st(aNode)._value();
  11099. $1=_st(_st(_st(["jQuery", "window", "process", "global"])._includes_($ctx1.locals.identifier))._not())._and_((function(){
  11100. return smalltalk.withContext(function($ctx2) { return _st(self)._isVariableGloballyUndefined_($ctx1.locals.identifier);
  11101. })}));
  11102. if(smalltalk.assert($1)){
  11103. $2=_st((smalltalk.UnknownVariableError || UnknownVariableError))._new();
  11104. _st($2)._variableName_(_st(aNode)._value());
  11105. $3=_st($2)._signal();
  11106. $3;
  11107. } else {
  11108. _st(_st(_st(self["@currentScope"])._methodScope())._unknownVariables())._add_(_st(aNode)._value());
  11109. };
  11110. return self}, self, "errorUnknownVariable:", [aNode], smalltalk.SemanticAnalyzer)},
  11111. args: ["aNode"],
  11112. source: "errorUnknownVariable: aNode\x0a\x09\x22Throw an error if the variable is undeclared in the global JS scope (i.e. window)\x22\x0a\x0a\x09| identifier |\x0a identifier := aNode value.\x0a\x09((#('jQuery' 'window' 'process' 'global') includes: identifier) not and: [ self isVariableGloballyUndefined: identifier ]) ifTrue: [\x0a\x09\x09\x09UnknownVariableError new\x0a\x09\x09\x09\x09variableName: aNode value;\x0a\x09\x09\x09\x09signal ]\x0a\x09\x09ifFalse: [\x0a\x09\x09\x09currentScope methodScope unknownVariables add: aNode value. ]",
  11113. messageSends: ["value", "ifTrue:ifFalse:", "variableName:", "new", "signal", "add:", "unknownVariables", "methodScope", "and:", "isVariableGloballyUndefined:", "not", "includes:"],
  11114. referencedClasses: ["UnknownVariableError"]
  11115. }),
  11116. smalltalk.SemanticAnalyzer);
  11117. smalltalk.addMethod(
  11118. "_isVariableGloballyUndefined_",
  11119. smalltalk.method({
  11120. selector: "isVariableGloballyUndefined:",
  11121. category: '*Compiler',
  11122. fn: function (aString){
  11123. var self=this;
  11124. return smalltalk.withContext(function($ctx1) { return eval('typeof ' + aString + ' == "undefined"');
  11125. return self}, self, "isVariableGloballyUndefined:", [aString], smalltalk.SemanticAnalyzer)},
  11126. args: ["aString"],
  11127. source: "isVariableGloballyUndefined: aString\x0a\x09<return eval('typeof ' + aString + ' == \x22undefined\x22')>",
  11128. messageSends: [],
  11129. referencedClasses: []
  11130. }),
  11131. smalltalk.SemanticAnalyzer);
  11132. smalltalk.addMethod(
  11133. "_messageSends",
  11134. smalltalk.method({
  11135. selector: "messageSends",
  11136. category: '*Compiler',
  11137. fn: function (){
  11138. var self=this;
  11139. return smalltalk.withContext(function($ctx1) { var $2,$1;
  11140. $2=self["@messageSends"];
  11141. if(($receiver = $2) == nil || $receiver == undefined){
  11142. self["@messageSends"]=_st((smalltalk.Dictionary || Dictionary))._new();
  11143. $1=self["@messageSends"];
  11144. } else {
  11145. $1=$2;
  11146. };
  11147. return $1;
  11148. }, self, "messageSends", [], smalltalk.SemanticAnalyzer)},
  11149. args: [],
  11150. source: "messageSends\x0a\x09^ messageSends ifNil: [ messageSends := Dictionary new ]",
  11151. messageSends: ["ifNil:", "new"],
  11152. referencedClasses: ["Dictionary"]
  11153. }),
  11154. smalltalk.SemanticAnalyzer);
  11155. smalltalk.addMethod(
  11156. "_newBlockScope",
  11157. smalltalk.method({
  11158. selector: "newBlockScope",
  11159. category: '*Compiler',
  11160. fn: function (){
  11161. var self=this;
  11162. return smalltalk.withContext(function($ctx1) { var $1;
  11163. $1=_st(self)._newScopeOfClass_((smalltalk.LexicalScope || LexicalScope));
  11164. return $1;
  11165. }, self, "newBlockScope", [], smalltalk.SemanticAnalyzer)},
  11166. args: [],
  11167. source: "newBlockScope\x0a\x09^ self newScopeOfClass: LexicalScope",
  11168. messageSends: ["newScopeOfClass:"],
  11169. referencedClasses: ["LexicalScope"]
  11170. }),
  11171. smalltalk.SemanticAnalyzer);
  11172. smalltalk.addMethod(
  11173. "_newMethodScope",
  11174. smalltalk.method({
  11175. selector: "newMethodScope",
  11176. category: '*Compiler',
  11177. fn: function (){
  11178. var self=this;
  11179. return smalltalk.withContext(function($ctx1) { var $1;
  11180. $1=_st(self)._newScopeOfClass_((smalltalk.MethodLexicalScope || MethodLexicalScope));
  11181. return $1;
  11182. }, self, "newMethodScope", [], smalltalk.SemanticAnalyzer)},
  11183. args: [],
  11184. source: "newMethodScope\x0a\x09^ self newScopeOfClass: MethodLexicalScope",
  11185. messageSends: ["newScopeOfClass:"],
  11186. referencedClasses: ["MethodLexicalScope"]
  11187. }),
  11188. smalltalk.SemanticAnalyzer);
  11189. smalltalk.addMethod(
  11190. "_newScopeOfClass_",
  11191. smalltalk.method({
  11192. selector: "newScopeOfClass:",
  11193. category: '*Compiler',
  11194. fn: function (aLexicalScopeClass){
  11195. var self=this;
  11196. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  11197. $2=_st(aLexicalScopeClass)._new();
  11198. _st($2)._outerScope_(self["@currentScope"]);
  11199. $3=_st($2)._yourself();
  11200. $1=$3;
  11201. return $1;
  11202. }, self, "newScopeOfClass:", [aLexicalScopeClass], smalltalk.SemanticAnalyzer)},
  11203. args: ["aLexicalScopeClass"],
  11204. source: "newScopeOfClass: aLexicalScopeClass\x0a\x09^ aLexicalScopeClass new \x0a\x09\x09outerScope: currentScope;\x0a\x09\x09yourself",
  11205. messageSends: ["outerScope:", "new", "yourself"],
  11206. referencedClasses: []
  11207. }),
  11208. smalltalk.SemanticAnalyzer);
  11209. smalltalk.addMethod(
  11210. "_popScope",
  11211. smalltalk.method({
  11212. selector: "popScope",
  11213. category: '*Compiler',
  11214. fn: function (){
  11215. var self=this;
  11216. return smalltalk.withContext(function($ctx1) { var $1;
  11217. $1=self["@currentScope"];
  11218. if(($receiver = $1) == nil || $receiver == undefined){
  11219. $1;
  11220. } else {
  11221. self["@currentScope"]=_st(self["@currentScope"])._outerScope();
  11222. self["@currentScope"];
  11223. };
  11224. return self}, self, "popScope", [], smalltalk.SemanticAnalyzer)},
  11225. args: [],
  11226. source: "popScope\x0a\x09currentScope ifNotNil: [\x0a\x09\x09currentScope := currentScope outerScope ]",
  11227. messageSends: ["ifNotNil:", "outerScope"],
  11228. referencedClasses: []
  11229. }),
  11230. smalltalk.SemanticAnalyzer);
  11231. smalltalk.addMethod(
  11232. "_pushScope_",
  11233. smalltalk.method({
  11234. selector: "pushScope:",
  11235. category: '*Compiler',
  11236. fn: function (aScope){
  11237. var self=this;
  11238. return smalltalk.withContext(function($ctx1) { _st(aScope)._outerScope_(self["@currentScope"]);
  11239. self["@currentScope"]=aScope;
  11240. return self}, self, "pushScope:", [aScope], smalltalk.SemanticAnalyzer)},
  11241. args: ["aScope"],
  11242. source: "pushScope: aScope\x0a\x09aScope outerScope: currentScope.\x0a\x09currentScope := aScope",
  11243. messageSends: ["outerScope:"],
  11244. referencedClasses: []
  11245. }),
  11246. smalltalk.SemanticAnalyzer);
  11247. smalltalk.addMethod(
  11248. "_superSends",
  11249. smalltalk.method({
  11250. selector: "superSends",
  11251. category: '*Compiler',
  11252. fn: function (){
  11253. var self=this;
  11254. return smalltalk.withContext(function($ctx1) { var $2,$1;
  11255. $2=self["@superSends"];
  11256. if(($receiver = $2) == nil || $receiver == undefined){
  11257. self["@superSends"]=_st((smalltalk.Dictionary || Dictionary))._new();
  11258. $1=self["@superSends"];
  11259. } else {
  11260. $1=$2;
  11261. };
  11262. return $1;
  11263. }, self, "superSends", [], smalltalk.SemanticAnalyzer)},
  11264. args: [],
  11265. source: "superSends\x0a\x09^ superSends ifNil: [ superSends := Dictionary new ]",
  11266. messageSends: ["ifNil:", "new"],
  11267. referencedClasses: ["Dictionary"]
  11268. }),
  11269. smalltalk.SemanticAnalyzer);
  11270. smalltalk.addMethod(
  11271. "_theClass",
  11272. smalltalk.method({
  11273. selector: "theClass",
  11274. category: '*Compiler',
  11275. fn: function (){
  11276. var self=this;
  11277. return smalltalk.withContext(function($ctx1) { var $1;
  11278. $1=self["@theClass"];
  11279. return $1;
  11280. }, self, "theClass", [], smalltalk.SemanticAnalyzer)},
  11281. args: [],
  11282. source: "theClass\x0a\x09^ theClass",
  11283. messageSends: [],
  11284. referencedClasses: []
  11285. }),
  11286. smalltalk.SemanticAnalyzer);
  11287. smalltalk.addMethod(
  11288. "_theClass_",
  11289. smalltalk.method({
  11290. selector: "theClass:",
  11291. category: '*Compiler',
  11292. fn: function (aClass){
  11293. var self=this;
  11294. return smalltalk.withContext(function($ctx1) { self["@theClass"]=aClass;
  11295. return self}, self, "theClass:", [aClass], smalltalk.SemanticAnalyzer)},
  11296. args: ["aClass"],
  11297. source: "theClass: aClass\x0a\x09theClass := aClass",
  11298. messageSends: [],
  11299. referencedClasses: []
  11300. }),
  11301. smalltalk.SemanticAnalyzer);
  11302. smalltalk.addMethod(
  11303. "_validateVariableScope_",
  11304. smalltalk.method({
  11305. selector: "validateVariableScope:",
  11306. category: '*Compiler',
  11307. fn: function (aString){
  11308. var self=this;
  11309. return smalltalk.withContext(function($ctx1) { var $1;
  11310. $1=_st(self["@currentScope"])._lookupVariable_(aString);
  11311. if(($receiver = $1) == nil || $receiver == undefined){
  11312. $1;
  11313. } else {
  11314. _st(self)._errorShadowingVariable_(aString);
  11315. };
  11316. return self}, self, "validateVariableScope:", [aString], smalltalk.SemanticAnalyzer)},
  11317. args: ["aString"],
  11318. source: "validateVariableScope: aString\x0a\x09\x22Validate the variable scope in by doing a recursive lookup, up to the method scope\x22\x0a\x0a\x09(currentScope lookupVariable: aString) ifNotNil: [\x0a\x09\x09self errorShadowingVariable: aString ]",
  11319. messageSends: ["ifNotNil:", "errorShadowingVariable:", "lookupVariable:"],
  11320. referencedClasses: []
  11321. }),
  11322. smalltalk.SemanticAnalyzer);
  11323. smalltalk.addMethod(
  11324. "_visitAssignmentNode_",
  11325. smalltalk.method({
  11326. selector: "visitAssignmentNode:",
  11327. category: '*Compiler',
  11328. fn: function (aNode){
  11329. var self=this;
  11330. return smalltalk.withContext(function($ctx1) { smalltalk.NodeVisitor.fn.prototype._visitAssignmentNode_.apply(_st(self), [aNode]);
  11331. _st(_st(aNode)._left())._beAssigned();
  11332. return self}, self, "visitAssignmentNode:", [aNode], smalltalk.SemanticAnalyzer)},
  11333. args: ["aNode"],
  11334. source: "visitAssignmentNode: aNode\x0a\x09super visitAssignmentNode: aNode.\x0a\x09aNode left beAssigned",
  11335. messageSends: ["visitAssignmentNode:", "beAssigned", "left"],
  11336. referencedClasses: []
  11337. }),
  11338. smalltalk.SemanticAnalyzer);
  11339. smalltalk.addMethod(
  11340. "_visitBlockNode_",
  11341. smalltalk.method({
  11342. selector: "visitBlockNode:",
  11343. category: '*Compiler',
  11344. fn: function (aNode){
  11345. var self=this;
  11346. return smalltalk.withContext(function($ctx1) { _st(self)._pushScope_(_st(self)._newBlockScope());
  11347. _st(aNode)._scope_(self["@currentScope"]);
  11348. _st(self["@currentScope"])._node_(aNode);
  11349. _st(_st(aNode)._parameters())._do_((function(each){
  11350. return smalltalk.withContext(function($ctx2) { _st(self)._validateVariableScope_(each);
  11351. return _st(self["@currentScope"])._addArg_(each);
  11352. })}));
  11353. smalltalk.NodeVisitor.fn.prototype._visitBlockNode_.apply(_st(self), [aNode]);
  11354. _st(self)._popScope();
  11355. return self}, self, "visitBlockNode:", [aNode], smalltalk.SemanticAnalyzer)},
  11356. args: ["aNode"],
  11357. source: "visitBlockNode: aNode\x0a\x09self pushScope: self newBlockScope.\x0a\x09aNode scope: currentScope.\x0a\x09currentScope node: aNode.\x0a\x09\x0a\x09aNode parameters do: [ :each | \x0a\x09\x09self validateVariableScope: each.\x0a\x09\x09currentScope addArg: each ].\x0a\x0a\x09super visitBlockNode: aNode.\x0a\x09self popScope",
  11358. messageSends: ["pushScope:", "newBlockScope", "scope:", "node:", "do:", "validateVariableScope:", "addArg:", "parameters", "visitBlockNode:", "popScope"],
  11359. referencedClasses: []
  11360. }),
  11361. smalltalk.SemanticAnalyzer);
  11362. smalltalk.addMethod(
  11363. "_visitCascadeNode_",
  11364. smalltalk.method({
  11365. selector: "visitCascadeNode:",
  11366. category: '*Compiler',
  11367. fn: function (aNode){
  11368. var self=this;
  11369. return smalltalk.withContext(function($ctx1) { var $1;
  11370. _st(_st(aNode)._nodes())._do_((function(each){
  11371. return smalltalk.withContext(function($ctx2) { return _st(each)._receiver_(_st(aNode)._receiver());
  11372. })}));
  11373. smalltalk.NodeVisitor.fn.prototype._visitCascadeNode_.apply(_st(self), [aNode]);
  11374. $1=_st(_st(_st(aNode)._nodes())._first())._superSend();
  11375. if(smalltalk.assert($1)){
  11376. _st(_st(aNode)._nodes())._do_((function(each){
  11377. return smalltalk.withContext(function($ctx2) { return _st(each)._superSend_(true);
  11378. })}));
  11379. };
  11380. return self}, self, "visitCascadeNode:", [aNode], smalltalk.SemanticAnalyzer)},
  11381. args: ["aNode"],
  11382. source: "visitCascadeNode: aNode\x0a\x09\x22Populate the receiver into all children\x22\x0a\x09aNode nodes do: [ :each | \x0a\x09\x09each receiver: aNode receiver ].\x0a\x09super visitCascadeNode: aNode.\x0a\x09aNode nodes first superSend ifTrue: [\x0a\x09\x09aNode nodes do: [ :each | each superSend: true ]]",
  11383. messageSends: ["do:", "receiver:", "receiver", "nodes", "visitCascadeNode:", "ifTrue:", "superSend:", "superSend", "first"],
  11384. referencedClasses: []
  11385. }),
  11386. smalltalk.SemanticAnalyzer);
  11387. smalltalk.addMethod(
  11388. "_visitClassReferenceNode_",
  11389. smalltalk.method({
  11390. selector: "visitClassReferenceNode:",
  11391. category: '*Compiler',
  11392. fn: function (aNode){
  11393. var self=this;
  11394. return smalltalk.withContext(function($ctx1) { var $1,$2;
  11395. _st(_st(self)._classReferences())._add_(_st(aNode)._value());
  11396. $1=_st((smalltalk.ClassRefVar || ClassRefVar))._new();
  11397. _st($1)._name_(_st(aNode)._value());
  11398. $2=_st($1)._yourself();
  11399. _st(aNode)._binding_($2);
  11400. return self}, self, "visitClassReferenceNode:", [aNode], smalltalk.SemanticAnalyzer)},
  11401. args: ["aNode"],
  11402. source: "visitClassReferenceNode: aNode\x0a\x09self classReferences add: aNode value.\x0a\x09aNode binding: (ClassRefVar new name: aNode value; yourself)",
  11403. messageSends: ["add:", "value", "classReferences", "binding:", "name:", "new", "yourself"],
  11404. referencedClasses: ["ClassRefVar"]
  11405. }),
  11406. smalltalk.SemanticAnalyzer);
  11407. smalltalk.addMethod(
  11408. "_visitMethodNode_",
  11409. smalltalk.method({
  11410. selector: "visitMethodNode:",
  11411. category: '*Compiler',
  11412. fn: function (aNode){
  11413. var self=this;
  11414. return smalltalk.withContext(function($ctx1) { var $1,$2;
  11415. _st(self)._pushScope_(_st(self)._newMethodScope());
  11416. _st(aNode)._scope_(self["@currentScope"]);
  11417. _st(self["@currentScope"])._node_(aNode);
  11418. _st(_st(_st(self)._theClass())._allInstanceVariableNames())._do_((function(each){
  11419. return smalltalk.withContext(function($ctx2) { return _st(self["@currentScope"])._addIVar_(each);
  11420. })}));
  11421. _st(_st(aNode)._arguments())._do_((function(each){
  11422. return smalltalk.withContext(function($ctx2) { _st(self)._validateVariableScope_(each);
  11423. return _st(self["@currentScope"])._addArg_(each);
  11424. })}));
  11425. smalltalk.NodeVisitor.fn.prototype._visitMethodNode_.apply(_st(self), [aNode]);
  11426. $1=aNode;
  11427. _st($1)._classReferences_(_st(self)._classReferences());
  11428. _st($1)._messageSends_(_st(_st(self)._messageSends())._keys());
  11429. $2=_st($1)._superSends_(_st(_st(self)._superSends())._keys());
  11430. _st(self)._popScope();
  11431. return self}, self, "visitMethodNode:", [aNode], smalltalk.SemanticAnalyzer)},
  11432. args: ["aNode"],
  11433. source: "visitMethodNode: aNode\x0a\x09self pushScope: self newMethodScope.\x0a\x09aNode scope: currentScope.\x0a\x09currentScope node: aNode.\x0a\x0a\x09self theClass allInstanceVariableNames do: [:each | \x0a\x09\x09currentScope addIVar: each ].\x0a\x09aNode arguments do: [ :each | \x0a\x09\x09self validateVariableScope: each.\x0a\x09\x09currentScope addArg: each ].\x0a\x0a\x09super visitMethodNode: aNode.\x0a\x0a\x09aNode \x0a\x09\x09classReferences: self classReferences;\x0a\x09\x09messageSends: self messageSends keys;\x0a superSends: self superSends keys.\x0a\x09self popScope",
  11434. messageSends: ["pushScope:", "newMethodScope", "scope:", "node:", "do:", "addIVar:", "allInstanceVariableNames", "theClass", "validateVariableScope:", "addArg:", "arguments", "visitMethodNode:", "classReferences:", "classReferences", "messageSends:", "keys", "messageSends", "superSends:", "superSends", "popScope"],
  11435. referencedClasses: []
  11436. }),
  11437. smalltalk.SemanticAnalyzer);
  11438. smalltalk.addMethod(
  11439. "_visitReturnNode_",
  11440. smalltalk.method({
  11441. selector: "visitReturnNode:",
  11442. category: '*Compiler',
  11443. fn: function (aNode){
  11444. var self=this;
  11445. return smalltalk.withContext(function($ctx1) { var $1;
  11446. _st(aNode)._scope_(self["@currentScope"]);
  11447. $1=_st(self["@currentScope"])._isMethodScope();
  11448. if(smalltalk.assert($1)){
  11449. _st(self["@currentScope"])._localReturn_(true);
  11450. } else {
  11451. _st(_st(self["@currentScope"])._methodScope())._addNonLocalReturn_(self["@currentScope"]);
  11452. };
  11453. smalltalk.NodeVisitor.fn.prototype._visitReturnNode_.apply(_st(self), [aNode]);
  11454. return self}, self, "visitReturnNode:", [aNode], smalltalk.SemanticAnalyzer)},
  11455. args: ["aNode"],
  11456. source: "visitReturnNode: aNode\x0a\x09aNode scope: currentScope.\x0a\x09currentScope isMethodScope\x0a\x09\x09ifTrue: [ currentScope localReturn: true ]\x0a\x09\x09ifFalse: [ currentScope methodScope addNonLocalReturn: currentScope ].\x0a\x09super visitReturnNode: aNode",
  11457. messageSends: ["scope:", "ifTrue:ifFalse:", "localReturn:", "addNonLocalReturn:", "methodScope", "isMethodScope", "visitReturnNode:"],
  11458. referencedClasses: []
  11459. }),
  11460. smalltalk.SemanticAnalyzer);
  11461. smalltalk.addMethod(
  11462. "_visitSendNode_",
  11463. smalltalk.method({
  11464. selector: "visitSendNode:",
  11465. category: '*Compiler',
  11466. fn: function (aNode){
  11467. var self=this;
  11468. return smalltalk.withContext(function($ctx1) { var $1,$2,$4,$3;
  11469. $1=_st(_st(_st(aNode)._receiver())._value()).__eq("super");
  11470. $2=(function(){
  11471. return smalltalk.withContext(function($ctx2) { _st(aNode)._superSend_(true);
  11472. _st(_st(aNode)._receiver())._value_("self");
  11473. _st(_st(self)._superSends())._at_ifAbsentPut_(_st(aNode)._selector(),(function(){
  11474. return smalltalk.withContext(function($ctx3) { return _st((smalltalk.Set || Set))._new();
  11475. })}));
  11476. return _st(_st(_st(self)._superSends())._at_(_st(aNode)._selector()))._add_(aNode);
  11477. })});
  11478. $3=(function(){
  11479. return smalltalk.withContext(function($ctx2) { $4=_st(_st((smalltalk.IRSendInliner || IRSendInliner))._inlinedSelectors())._includes_(_st(aNode)._selector());
  11480. if(smalltalk.assert($4)){
  11481. _st(aNode)._shouldBeInlined_(true);
  11482. return _st(_st(aNode)._receiver())._shouldBeAliased_(true);
  11483. };
  11484. })});
  11485. _st($1)._ifTrue_ifFalse_($2,$3);
  11486. _st(_st(self)._messageSends())._at_ifAbsentPut_(_st(aNode)._selector(),(function(){
  11487. return smalltalk.withContext(function($ctx2) { return _st((smalltalk.Set || Set))._new();
  11488. })}));
  11489. _st(_st(_st(self)._messageSends())._at_(_st(aNode)._selector()))._add_(aNode);
  11490. _st(aNode)._index_(_st(_st(_st(self)._messageSends())._at_(_st(aNode)._selector()))._size());
  11491. smalltalk.NodeVisitor.fn.prototype._visitSendNode_.apply(_st(self), [aNode]);
  11492. return self}, self, "visitSendNode:", [aNode], smalltalk.SemanticAnalyzer)},
  11493. args: ["aNode"],
  11494. source: "visitSendNode: aNode\x0a\x0a\x09aNode receiver value = 'super' \x0a\x09\x09ifTrue: [\x0a\x09\x09\x09aNode superSend: true.\x0a\x09\x09\x09aNode receiver value: 'self'.\x0a\x09\x09\x09self superSends at: aNode selector ifAbsentPut: [ Set new ].\x0a\x09\x09\x09(self superSends at: aNode selector) add: aNode ]\x0a \x0a\x09\x09ifFalse: [ (IRSendInliner inlinedSelectors includes: aNode selector) ifTrue: [\x0a\x09\x09\x09aNode shouldBeInlined: true.\x0a\x09\x09\x09aNode receiver shouldBeAliased: true ] ].\x0a\x0a\x09self messageSends at: aNode selector ifAbsentPut: [ Set new ].\x0a\x09(self messageSends at: aNode selector) add: aNode.\x0a\x0a\x09aNode index: (self messageSends at: aNode selector) size.\x0a\x0a\x09super visitSendNode: aNode",
  11495. messageSends: ["ifTrue:ifFalse:", "superSend:", "value:", "receiver", "at:ifAbsentPut:", "selector", "new", "superSends", "add:", "at:", "ifTrue:", "shouldBeInlined:", "shouldBeAliased:", "includes:", "inlinedSelectors", "=", "value", "messageSends", "index:", "size", "visitSendNode:"],
  11496. referencedClasses: ["Set", "IRSendInliner"]
  11497. }),
  11498. smalltalk.SemanticAnalyzer);
  11499. smalltalk.addMethod(
  11500. "_visitSequenceNode_",
  11501. smalltalk.method({
  11502. selector: "visitSequenceNode:",
  11503. category: '*Compiler',
  11504. fn: function (aNode){
  11505. var self=this;
  11506. return smalltalk.withContext(function($ctx1) { _st(_st(aNode)._temps())._do_((function(each){
  11507. return smalltalk.withContext(function($ctx2) { _st(self)._validateVariableScope_(each);
  11508. return _st(self["@currentScope"])._addTemp_(each);
  11509. })}));
  11510. smalltalk.NodeVisitor.fn.prototype._visitSequenceNode_.apply(_st(self), [aNode]);
  11511. return self}, self, "visitSequenceNode:", [aNode], smalltalk.SemanticAnalyzer)},
  11512. args: ["aNode"],
  11513. source: "visitSequenceNode: aNode\x0a\x09aNode temps do: [ :each | \x0a\x09\x09self validateVariableScope: each.\x0a\x09\x09currentScope addTemp: each ].\x0a\x0a\x09super visitSequenceNode: aNode",
  11514. messageSends: ["do:", "validateVariableScope:", "addTemp:", "temps", "visitSequenceNode:"],
  11515. referencedClasses: []
  11516. }),
  11517. smalltalk.SemanticAnalyzer);
  11518. smalltalk.addMethod(
  11519. "_visitVariableNode_",
  11520. smalltalk.method({
  11521. selector: "visitVariableNode:",
  11522. category: '*Compiler',
  11523. fn: function (aNode){
  11524. var self=this;
  11525. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$5,$2;
  11526. $1=aNode;
  11527. $3=_st(self["@currentScope"])._lookupVariable_(aNode);
  11528. if(($receiver = $3) == nil || $receiver == undefined){
  11529. _st(self)._errorUnknownVariable_(aNode);
  11530. $4=_st((smalltalk.UnknownVar || UnknownVar))._new();
  11531. _st($4)._name_(_st(aNode)._value());
  11532. $5=_st($4)._yourself();
  11533. $2=$5;
  11534. } else {
  11535. $2=$3;
  11536. };
  11537. _st($1)._binding_($2);
  11538. return self}, self, "visitVariableNode:", [aNode], smalltalk.SemanticAnalyzer)},
  11539. args: ["aNode"],
  11540. source: "visitVariableNode: aNode\x0a\x09\x22Bind a ScopeVar to aNode by doing a lookup in the current scope.\x0a\x09If no ScopeVar is found, bind a UnknowVar and throw an error\x22\x0a\x0a\x09aNode binding: ((currentScope lookupVariable: aNode) ifNil: [ \x0a\x09\x09self errorUnknownVariable: aNode.\x0a\x09\x09UnknownVar new name: aNode value; yourself ])",
  11541. messageSends: ["binding:", "ifNil:", "errorUnknownVariable:", "name:", "value", "new", "yourself", "lookupVariable:"],
  11542. referencedClasses: ["UnknownVar"]
  11543. }),
  11544. smalltalk.SemanticAnalyzer);
  11545. smalltalk.addMethod(
  11546. "_on_",
  11547. smalltalk.method({
  11548. selector: "on:",
  11549. category: '*Compiler',
  11550. fn: function (aClass){
  11551. var self=this;
  11552. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  11553. $2=_st(self)._new();
  11554. _st($2)._theClass_(aClass);
  11555. $3=_st($2)._yourself();
  11556. $1=$3;
  11557. return $1;
  11558. }, self, "on:", [aClass], smalltalk.SemanticAnalyzer.klass)},
  11559. args: ["aClass"],
  11560. source: "on: aClass\x0a\x09^ self new\x0a\x09\x09theClass: aClass;\x0a\x09\x09yourself",
  11561. messageSends: ["theClass:", "new", "yourself"],
  11562. referencedClasses: []
  11563. }),
  11564. smalltalk.SemanticAnalyzer.klass);
  11565. smalltalk.addMethod(
  11566. "_initializePackageNamed_prefix_",
  11567. smalltalk.method({
  11568. selector: "initializePackageNamed:prefix:",
  11569. category: '*Compiler',
  11570. fn: function (packageName,aString){
  11571. var self=this;
  11572. return smalltalk.withContext(function($ctx1) { var $1,$2;
  11573. $1=_st((smalltalk.Package || Package))._named_(packageName);
  11574. _st($1)._setupClasses();
  11575. _st($1)._commitPathJs_(_st(_st("/").__comma(aString)).__comma("/js"));
  11576. $2=_st($1)._commitPathSt_(_st(_st("/").__comma(aString)).__comma("/st"));
  11577. return self}, self, "initializePackageNamed:prefix:", [packageName,aString], smalltalk.PackageLoader)},
  11578. args: ["packageName", "aString"],
  11579. source: "initializePackageNamed: packageName prefix: aString\x0a\x0a\x09(Package named: packageName) \x0a \x09setupClasses;\x0a commitPathJs: '/', aString, '/js';\x0a commitPathSt: '/', aString, '/st'",
  11580. messageSends: ["setupClasses", "named:", "commitPathJs:", ",", "commitPathSt:"],
  11581. referencedClasses: ["Package"]
  11582. }),
  11583. smalltalk.PackageLoader);
  11584. smalltalk.addMethod(
  11585. "_loadPackage_prefix_",
  11586. smalltalk.method({
  11587. selector: "loadPackage:prefix:",
  11588. category: '*Compiler',
  11589. fn: function (packageName,aString){
  11590. var self=this;
  11591. return smalltalk.withContext(function($ctx1) { var $1,$2,$4,$5,$8,$7,$6,$3;
  11592. $ctx1.locals.url=nil;
  11593. $ctx1.locals.url=_st(_st(_st(_st("/").__comma(aString)).__comma("/js/")).__comma(packageName)).__comma(".js");
  11594. $1=jQuery;
  11595. $2=$ctx1.locals.url;
  11596. $4=_st("type").__minus_gt("GET");
  11597. $5=_st("dataType").__minus_gt("script");
  11598. $7=(function(jqXHR,textStatus){
  11599. return smalltalk.withContext(function($ctx2) { $8=_st(_st(jqXHR)._readyState()).__eq((4));
  11600. if(smalltalk.assert($8)){
  11601. return _st(self)._initializePackageNamed_prefix_(packageName,aString);
  11602. };
  11603. })});
  11604. $6=_st("complete").__minus_gt($7);
  11605. $3=smalltalk.HashedCollection._fromPairs_([$4,$5,$6,_st("error").__minus_gt((function(){
  11606. return smalltalk.withContext(function($ctx2) { return _st(window)._alert_(_st("Could not load package at: ").__comma($ctx1.locals.url));
  11607. })}))]);
  11608. _st($1)._ajax_options_($2,$3);
  11609. return self}, self, "loadPackage:prefix:", [packageName,aString], smalltalk.PackageLoader)},
  11610. args: ["packageName", "aString"],
  11611. source: "loadPackage: packageName prefix: aString\x09\x0a\x09| url |\x0a url := '/', aString, '/js/', packageName, '.js'.\x0a\x09jQuery \x0a\x09\x09ajax: url\x0a options: #{\x0a\x09\x09\x09'type' -> 'GET'.\x0a\x09\x09\x09'dataType' -> 'script'.\x0a \x09\x09'complete' -> [ :jqXHR :textStatus | \x0a\x09\x09\x09\x09jqXHR readyState = 4 \x0a \x09ifTrue: [ self initializePackageNamed: packageName prefix: aString ] ].\x0a\x09\x09\x09'error' -> [ window alert: 'Could not load package at: ', url ]\x0a\x09\x09}",
  11612. messageSends: [",", "ajax:options:", "->", "ifTrue:", "initializePackageNamed:prefix:", "=", "readyState", "alert:"],
  11613. referencedClasses: []
  11614. }),
  11615. smalltalk.PackageLoader);
  11616. smalltalk.addMethod(
  11617. "_loadPackages_prefix_",
  11618. smalltalk.method({
  11619. selector: "loadPackages:prefix:",
  11620. category: '*Compiler',
  11621. fn: function (aCollection,aString){
  11622. var self=this;
  11623. return smalltalk.withContext(function($ctx1) { _st(aCollection)._do_((function(each){
  11624. return smalltalk.withContext(function($ctx2) { return _st(self)._loadPackage_prefix_(each,aString);
  11625. })}));
  11626. return self}, self, "loadPackages:prefix:", [aCollection,aString], smalltalk.PackageLoader)},
  11627. args: ["aCollection", "aString"],
  11628. source: "loadPackages: aCollection prefix: aString\x0a\x09aCollection do: [ :each |\x0a \x09self loadPackage: each prefix: aString ]",
  11629. messageSends: ["do:", "loadPackage:prefix:"],
  11630. referencedClasses: []
  11631. }),
  11632. smalltalk.PackageLoader);
  11633. smalltalk.addMethod(
  11634. "_loadPackages_prefix_",
  11635. smalltalk.method({
  11636. selector: "loadPackages:prefix:",
  11637. category: '*Compiler',
  11638. fn: function (aCollection,aString){
  11639. var self=this;
  11640. return smalltalk.withContext(function($ctx1) { var $1;
  11641. $1=_st(_st(self)._new())._loadPackages_prefix_(aCollection,aString);
  11642. return $1;
  11643. }, self, "loadPackages:prefix:", [aCollection,aString], smalltalk.PackageLoader.klass)},
  11644. args: ["aCollection", "aString"],
  11645. source: "loadPackages: aCollection prefix: aString\x0a\x09^ self new loadPackages: aCollection prefix: aString",
  11646. messageSends: ["loadPackages:prefix:", "new"],
  11647. referencedClasses: []
  11648. }),
  11649. smalltalk.PackageLoader.klass);
  11650. smalltalk.addMethod(
  11651. "_alias",
  11652. smalltalk.method({
  11653. selector: "alias",
  11654. category: '*Compiler',
  11655. fn: function (){
  11656. var self=this;
  11657. return smalltalk.withContext(function($ctx1) { var $1;
  11658. $1=_st(_st(self)._name())._asVariableName();
  11659. return $1;
  11660. }, self, "alias", [], smalltalk.ScopeVar)},
  11661. args: [],
  11662. source: "alias\x0a\x09^ self name asVariableName",
  11663. messageSends: ["asVariableName", "name"],
  11664. referencedClasses: []
  11665. }),
  11666. smalltalk.ScopeVar);
  11667. smalltalk.addMethod(
  11668. "_isArgVar",
  11669. smalltalk.method({
  11670. selector: "isArgVar",
  11671. category: '*Compiler',
  11672. fn: function (){
  11673. var self=this;
  11674. return smalltalk.withContext(function($ctx1) { return false;
  11675. }, self, "isArgVar", [], smalltalk.ScopeVar)},
  11676. args: [],
  11677. source: "isArgVar\x0a\x09^ false",
  11678. messageSends: [],
  11679. referencedClasses: []
  11680. }),
  11681. smalltalk.ScopeVar);
  11682. smalltalk.addMethod(
  11683. "_isClassRefVar",
  11684. smalltalk.method({
  11685. selector: "isClassRefVar",
  11686. category: '*Compiler',
  11687. fn: function (){
  11688. var self=this;
  11689. return smalltalk.withContext(function($ctx1) { return false;
  11690. }, self, "isClassRefVar", [], smalltalk.ScopeVar)},
  11691. args: [],
  11692. source: "isClassRefVar\x0a\x09^ false",
  11693. messageSends: [],
  11694. referencedClasses: []
  11695. }),
  11696. smalltalk.ScopeVar);
  11697. smalltalk.addMethod(
  11698. "_isInstanceVar",
  11699. smalltalk.method({
  11700. selector: "isInstanceVar",
  11701. category: '*Compiler',
  11702. fn: function (){
  11703. var self=this;
  11704. return smalltalk.withContext(function($ctx1) { return false;
  11705. }, self, "isInstanceVar", [], smalltalk.ScopeVar)},
  11706. args: [],
  11707. source: "isInstanceVar\x0a\x09^ false",
  11708. messageSends: [],
  11709. referencedClasses: []
  11710. }),
  11711. smalltalk.ScopeVar);
  11712. smalltalk.addMethod(
  11713. "_isPseudoVar",
  11714. smalltalk.method({
  11715. selector: "isPseudoVar",
  11716. category: '*Compiler',
  11717. fn: function (){
  11718. var self=this;
  11719. return smalltalk.withContext(function($ctx1) { return false;
  11720. }, self, "isPseudoVar", [], smalltalk.ScopeVar)},
  11721. args: [],
  11722. source: "isPseudoVar\x0a\x09^ false",
  11723. messageSends: [],
  11724. referencedClasses: []
  11725. }),
  11726. smalltalk.ScopeVar);
  11727. smalltalk.addMethod(
  11728. "_isTempVar",
  11729. smalltalk.method({
  11730. selector: "isTempVar",
  11731. category: '*Compiler',
  11732. fn: function (){
  11733. var self=this;
  11734. return smalltalk.withContext(function($ctx1) { return false;
  11735. }, self, "isTempVar", [], smalltalk.ScopeVar)},
  11736. args: [],
  11737. source: "isTempVar\x0a\x09^ false",
  11738. messageSends: [],
  11739. referencedClasses: []
  11740. }),
  11741. smalltalk.ScopeVar);
  11742. smalltalk.addMethod(
  11743. "_isUnknownVar",
  11744. smalltalk.method({
  11745. selector: "isUnknownVar",
  11746. category: '*Compiler',
  11747. fn: function (){
  11748. var self=this;
  11749. return smalltalk.withContext(function($ctx1) { return false;
  11750. }, self, "isUnknownVar", [], smalltalk.ScopeVar)},
  11751. args: [],
  11752. source: "isUnknownVar\x0a\x09^ false",
  11753. messageSends: [],
  11754. referencedClasses: []
  11755. }),
  11756. smalltalk.ScopeVar);
  11757. smalltalk.addMethod(
  11758. "_name",
  11759. smalltalk.method({
  11760. selector: "name",
  11761. category: '*Compiler',
  11762. fn: function (){
  11763. var self=this;
  11764. return smalltalk.withContext(function($ctx1) { var $1;
  11765. $1=self["@name"];
  11766. return $1;
  11767. }, self, "name", [], smalltalk.ScopeVar)},
  11768. args: [],
  11769. source: "name\x0a\x09^ name",
  11770. messageSends: [],
  11771. referencedClasses: []
  11772. }),
  11773. smalltalk.ScopeVar);
  11774. smalltalk.addMethod(
  11775. "_name_",
  11776. smalltalk.method({
  11777. selector: "name:",
  11778. category: '*Compiler',
  11779. fn: function (aString){
  11780. var self=this;
  11781. return smalltalk.withContext(function($ctx1) { self["@name"]=aString;
  11782. return self}, self, "name:", [aString], smalltalk.ScopeVar)},
  11783. args: ["aString"],
  11784. source: "name: aString\x0a\x09name := aString",
  11785. messageSends: [],
  11786. referencedClasses: []
  11787. }),
  11788. smalltalk.ScopeVar);
  11789. smalltalk.addMethod(
  11790. "_scope",
  11791. smalltalk.method({
  11792. selector: "scope",
  11793. category: '*Compiler',
  11794. fn: function (){
  11795. var self=this;
  11796. return smalltalk.withContext(function($ctx1) { var $1;
  11797. $1=self["@scope"];
  11798. return $1;
  11799. }, self, "scope", [], smalltalk.ScopeVar)},
  11800. args: [],
  11801. source: "scope\x0a\x09^ scope",
  11802. messageSends: [],
  11803. referencedClasses: []
  11804. }),
  11805. smalltalk.ScopeVar);
  11806. smalltalk.addMethod(
  11807. "_scope_",
  11808. smalltalk.method({
  11809. selector: "scope:",
  11810. category: '*Compiler',
  11811. fn: function (aScope){
  11812. var self=this;
  11813. return smalltalk.withContext(function($ctx1) { self["@scope"]=aScope;
  11814. return self}, self, "scope:", [aScope], smalltalk.ScopeVar)},
  11815. args: ["aScope"],
  11816. source: "scope: aScope\x0a\x09scope := aScope",
  11817. messageSends: [],
  11818. referencedClasses: []
  11819. }),
  11820. smalltalk.ScopeVar);
  11821. smalltalk.addMethod(
  11822. "_validateAssignment",
  11823. smalltalk.method({
  11824. selector: "validateAssignment",
  11825. category: '*Compiler',
  11826. fn: function (){
  11827. var self=this;
  11828. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  11829. $1=_st(_st(self)._isArgVar())._or_((function(){
  11830. return smalltalk.withContext(function($ctx2) { return _st(self)._isPseudoVar();
  11831. })}));
  11832. if(smalltalk.assert($1)){
  11833. $2=_st((smalltalk.InvalidAssignmentError || InvalidAssignmentError))._new();
  11834. _st($2)._variableName_(_st(self)._name());
  11835. $3=_st($2)._signal();
  11836. $3;
  11837. };
  11838. return self}, self, "validateAssignment", [], smalltalk.ScopeVar)},
  11839. args: [],
  11840. source: "validateAssignment\x0a\x09(self isArgVar or: [ self isPseudoVar ]) ifTrue: [\x0a\x09\x09InvalidAssignmentError new\x0a\x09\x09\x09variableName: self name;\x0a\x09\x09\x09signal]",
  11841. messageSends: ["ifTrue:", "variableName:", "name", "new", "signal", "or:", "isPseudoVar", "isArgVar"],
  11842. referencedClasses: ["InvalidAssignmentError"]
  11843. }),
  11844. smalltalk.ScopeVar);
  11845. smalltalk.addMethod(
  11846. "_on_",
  11847. smalltalk.method({
  11848. selector: "on:",
  11849. category: '*Compiler',
  11850. fn: function (aString){
  11851. var self=this;
  11852. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  11853. $2=_st(self)._new();
  11854. _st($2)._name_(aString);
  11855. $3=_st($2)._yourself();
  11856. $1=$3;
  11857. return $1;
  11858. }, self, "on:", [aString], smalltalk.ScopeVar.klass)},
  11859. args: ["aString"],
  11860. source: "on: aString\x0a\x09^ self new \x0a\x09\x09name: aString;\x0a\x09\x09yourself",
  11861. messageSends: ["name:", "new", "yourself"],
  11862. referencedClasses: []
  11863. }),
  11864. smalltalk.ScopeVar.klass);
  11865. smalltalk.addMethod(
  11866. "_node",
  11867. smalltalk.method({
  11868. selector: "node",
  11869. category: '*Compiler',
  11870. fn: function (){
  11871. var self=this;
  11872. return smalltalk.withContext(function($ctx1) { var $1;
  11873. $1=self["@node"];
  11874. return $1;
  11875. }, self, "node", [], smalltalk.AliasVar)},
  11876. args: [],
  11877. source: "node\x0a\x09^ node",
  11878. messageSends: [],
  11879. referencedClasses: []
  11880. }),
  11881. smalltalk.AliasVar);
  11882. smalltalk.addMethod(
  11883. "_node_",
  11884. smalltalk.method({
  11885. selector: "node:",
  11886. category: '*Compiler',
  11887. fn: function (aNode){
  11888. var self=this;
  11889. return smalltalk.withContext(function($ctx1) { self["@node"]=aNode;
  11890. return self}, self, "node:", [aNode], smalltalk.AliasVar)},
  11891. args: ["aNode"],
  11892. source: "node: aNode\x0a\x09node := aNode",
  11893. messageSends: [],
  11894. referencedClasses: []
  11895. }),
  11896. smalltalk.AliasVar);
  11897. smalltalk.addMethod(
  11898. "_isArgVar",
  11899. smalltalk.method({
  11900. selector: "isArgVar",
  11901. category: '*Compiler',
  11902. fn: function (){
  11903. var self=this;
  11904. return smalltalk.withContext(function($ctx1) { return true;
  11905. }, self, "isArgVar", [], smalltalk.ArgVar)},
  11906. args: [],
  11907. source: "isArgVar\x0a\x09^ true",
  11908. messageSends: [],
  11909. referencedClasses: []
  11910. }),
  11911. smalltalk.ArgVar);
  11912. smalltalk.addMethod(
  11913. "_alias",
  11914. smalltalk.method({
  11915. selector: "alias",
  11916. category: '*Compiler',
  11917. fn: function (){
  11918. var self=this;
  11919. return smalltalk.withContext(function($ctx1) { var $1;
  11920. $1=_st(_st(_st(_st("(smalltalk.").__comma(_st(self)._name())).__comma(" || ")).__comma(_st(self)._name())).__comma(")");
  11921. return $1;
  11922. }, self, "alias", [], smalltalk.ClassRefVar)},
  11923. args: [],
  11924. source: "alias\x0a\x09^ '(smalltalk.', self name, ' || ', self name, ')'",
  11925. messageSends: [",", "name"],
  11926. referencedClasses: []
  11927. }),
  11928. smalltalk.ClassRefVar);
  11929. smalltalk.addMethod(
  11930. "_isClassRefVar",
  11931. smalltalk.method({
  11932. selector: "isClassRefVar",
  11933. category: '*Compiler',
  11934. fn: function (){
  11935. var self=this;
  11936. return smalltalk.withContext(function($ctx1) { return true;
  11937. }, self, "isClassRefVar", [], smalltalk.ClassRefVar)},
  11938. args: [],
  11939. source: "isClassRefVar\x0a\x09^ true",
  11940. messageSends: [],
  11941. referencedClasses: []
  11942. }),
  11943. smalltalk.ClassRefVar);
  11944. smalltalk.addMethod(
  11945. "_alias",
  11946. smalltalk.method({
  11947. selector: "alias",
  11948. category: '*Compiler',
  11949. fn: function (){
  11950. var self=this;
  11951. return smalltalk.withContext(function($ctx1) { var $1;
  11952. $1=_st(_st("self[\x22@").__comma(_st(self)._name())).__comma("\x22]");
  11953. return $1;
  11954. }, self, "alias", [], smalltalk.InstanceVar)},
  11955. args: [],
  11956. source: "alias\x0a\x09^ 'self[\x22@', self name, '\x22]'",
  11957. messageSends: [",", "name"],
  11958. referencedClasses: []
  11959. }),
  11960. smalltalk.InstanceVar);
  11961. smalltalk.addMethod(
  11962. "_isInstanceVar",
  11963. smalltalk.method({
  11964. selector: "isInstanceVar",
  11965. category: '*Compiler',
  11966. fn: function (){
  11967. var self=this;
  11968. return smalltalk.withContext(function($ctx1) { return true;
  11969. }, self, "isInstanceVar", [], smalltalk.InstanceVar)},
  11970. args: [],
  11971. source: "isInstanceVar\x0a\x09^ true",
  11972. messageSends: [],
  11973. referencedClasses: []
  11974. }),
  11975. smalltalk.InstanceVar);
  11976. smalltalk.addMethod(
  11977. "_alias",
  11978. smalltalk.method({
  11979. selector: "alias",
  11980. category: '*Compiler',
  11981. fn: function (){
  11982. var self=this;
  11983. return smalltalk.withContext(function($ctx1) { var $1;
  11984. $1=_st(self)._name();
  11985. return $1;
  11986. }, self, "alias", [], smalltalk.PseudoVar)},
  11987. args: [],
  11988. source: "alias\x0a\x09^ self name",
  11989. messageSends: ["name"],
  11990. referencedClasses: []
  11991. }),
  11992. smalltalk.PseudoVar);
  11993. smalltalk.addMethod(
  11994. "_isPseudoVar",
  11995. smalltalk.method({
  11996. selector: "isPseudoVar",
  11997. category: '*Compiler',
  11998. fn: function (){
  11999. var self=this;
  12000. return smalltalk.withContext(function($ctx1) { return true;
  12001. }, self, "isPseudoVar", [], smalltalk.PseudoVar)},
  12002. args: [],
  12003. source: "isPseudoVar\x0a\x09^ true",
  12004. messageSends: [],
  12005. referencedClasses: []
  12006. }),
  12007. smalltalk.PseudoVar);
  12008. smalltalk.addMethod(
  12009. "_alias",
  12010. smalltalk.method({
  12011. selector: "alias",
  12012. category: '*Compiler',
  12013. fn: function (){
  12014. var self=this;
  12015. return smalltalk.withContext(function($ctx1) { var $1;
  12016. $1=_st(_st(_st(_st(self)._scope())._alias()).__comma(".locals.")).__comma(smalltalk.ScopeVar.fn.prototype._alias.apply(_st(self), []));
  12017. return $1;
  12018. }, self, "alias", [], smalltalk.TempVar)},
  12019. args: [],
  12020. source: "alias\x0a\x09^ self scope alias, '.locals.', super alias",
  12021. messageSends: [",", "alias", "scope"],
  12022. referencedClasses: []
  12023. }),
  12024. smalltalk.TempVar);
  12025. smalltalk.addMethod(
  12026. "_isTempVar",
  12027. smalltalk.method({
  12028. selector: "isTempVar",
  12029. category: '*Compiler',
  12030. fn: function (){
  12031. var self=this;
  12032. return smalltalk.withContext(function($ctx1) { return true;
  12033. }, self, "isTempVar", [], smalltalk.TempVar)},
  12034. args: [],
  12035. source: "isTempVar\x0a\x09^ true",
  12036. messageSends: [],
  12037. referencedClasses: []
  12038. }),
  12039. smalltalk.TempVar);
  12040. smalltalk.addMethod(
  12041. "_isUnknownVar",
  12042. smalltalk.method({
  12043. selector: "isUnknownVar",
  12044. category: '*Compiler',
  12045. fn: function (){
  12046. var self=this;
  12047. return smalltalk.withContext(function($ctx1) { return true;
  12048. }, self, "isUnknownVar", [], smalltalk.UnknownVar)},
  12049. args: [],
  12050. source: "isUnknownVar\x0a\x09^ true",
  12051. messageSends: [],
  12052. referencedClasses: []
  12053. }),
  12054. smalltalk.UnknownVar);