Compiler.js 334 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049
  1. smalltalk.addPackage('Compiler', {});
  2. smalltalk.addClass('ChunkParser', smalltalk.Object, ['stream'], 'Compiler');
  3. smalltalk.addMethod(
  4. "_nextChunk",
  5. smalltalk.method({
  6. selector: "nextChunk",
  7. category: 'reading',
  8. fn: function () {
  9. var self=this;
  10. var $early={};
  11. try{var char_=nil;
  12. var result=nil;
  13. var chunk=nil;
  14. (result=smalltalk.send("", "_writeStream", []));
  15. (function(){while((function(){(char_=smalltalk.send(self['@stream'], "_next", []));return smalltalk.send(char_, "_notNil", []);})()) {(function(){((($receiver = smalltalk.send(char_, "__eq", ["!"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(smalltalk.send(self['@stream'], "_peek", []), "__eq", ["!"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@stream'], "_next", []);})() : (function(){return (function(){throw $early=[smalltalk.send(smalltalk.send(result, "_contents", []), "_trimBoth", [])]})();})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self['@stream'], "_next", []);}), (function(){return (function(){throw $early=[smalltalk.send(smalltalk.send(result, "_contents", []), "_trimBoth", [])]})();})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(smalltalk.send(self['@stream'], "_peek", []), "__eq", ["!"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@stream'], "_next", []);})() : (function(){return (function(){throw $early=[smalltalk.send(smalltalk.send(result, "_contents", []), "_trimBoth", [])]})();})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self['@stream'], "_next", []);}), (function(){return (function(){throw $early=[smalltalk.send(smalltalk.send(result, "_contents", []), "_trimBoth", [])]})();})]));})]));return smalltalk.send(result, "_nextPut_", [char_]);})()}})();
  16. return nil;
  17. return self;
  18. } catch(e) {if(e===$early)return e[0]; throw e}},
  19. args: [],
  20. 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",
  21. messageSends: ["writeStream", "whileTrue:", "next", "notNil", "ifTrue:", "=", "ifTrue:ifFalse:", "peek", "trimBoth", "contents", "nextPut:"],
  22. referencedClasses: []
  23. }),
  24. smalltalk.ChunkParser);
  25. smalltalk.addMethod(
  26. "_stream_",
  27. smalltalk.method({
  28. selector: "stream:",
  29. category: 'accessing',
  30. fn: function (aStream) {
  31. var self=this;
  32. (self['@stream']=aStream);
  33. return self;},
  34. args: ["aStream"],
  35. source: "stream: aStream\x0a\x09stream := aStream",
  36. messageSends: [],
  37. referencedClasses: []
  38. }),
  39. smalltalk.ChunkParser);
  40. smalltalk.addMethod(
  41. "_on_",
  42. smalltalk.method({
  43. selector: "on:",
  44. category: 'not yet classified',
  45. fn: function (aStream) {
  46. var self=this;
  47. return smalltalk.send(smalltalk.send(self, "_new", []), "_stream_", [aStream]);
  48. return self;},
  49. args: ["aStream"],
  50. source: "on: aStream\x0a\x09^self new stream: aStream",
  51. messageSends: ["stream:", "new"],
  52. referencedClasses: []
  53. }),
  54. smalltalk.ChunkParser.klass);
  55. smalltalk.addClass('Compiler', smalltalk.Object, ['currentClass', 'source', 'unknownVariables', 'codeGeneratorClass'], 'Compiler');
  56. smalltalk.addMethod(
  57. "_codeGeneratorClass",
  58. smalltalk.method({
  59. selector: "codeGeneratorClass",
  60. category: 'accessing',
  61. fn: function () {
  62. var self=this;
  63. return (($receiver = self['@codeGeneratorClass']) == nil || $receiver == undefined) ? (function(){return (smalltalk.FunCodeGenerator || FunCodeGenerator);})() : $receiver;
  64. return self;},
  65. args: [],
  66. source: "codeGeneratorClass\x0a\x09^codeGeneratorClass ifNil: [FunCodeGenerator]",
  67. messageSends: ["ifNil:"],
  68. referencedClasses: ["FunCodeGenerator"]
  69. }),
  70. smalltalk.Compiler);
  71. smalltalk.addMethod(
  72. "_codeGeneratorClass_",
  73. smalltalk.method({
  74. selector: "codeGeneratorClass:",
  75. category: 'accessing',
  76. fn: function (aClass) {
  77. var self=this;
  78. (self['@codeGeneratorClass']=aClass);
  79. return self;},
  80. args: ["aClass"],
  81. source: "codeGeneratorClass: aClass\x0a\x09codeGeneratorClass := aClass",
  82. messageSends: [],
  83. referencedClasses: []
  84. }),
  85. smalltalk.Compiler);
  86. smalltalk.addMethod(
  87. "_compile_",
  88. smalltalk.method({
  89. selector: "compile:",
  90. category: 'compiling',
  91. fn: function (aString) {
  92. var self=this;
  93. return smalltalk.send(self, "_compileNode_", [smalltalk.send(self, "_parse_", [aString])]);
  94. return self;},
  95. args: ["aString"],
  96. source: "compile: aString\x0a\x09^self compileNode: (self parse: aString)",
  97. messageSends: ["compileNode:", "parse:"],
  98. referencedClasses: []
  99. }),
  100. smalltalk.Compiler);
  101. smalltalk.addMethod(
  102. "_compile_forClass_",
  103. smalltalk.method({
  104. selector: "compile:forClass:",
  105. category: 'compiling',
  106. fn: function (aString, aClass) {
  107. var self=this;
  108. smalltalk.send(self, "_currentClass_", [aClass]);
  109. smalltalk.send(self, "_source_", [aString]);
  110. return smalltalk.send(self, "_compile_", [aString]);
  111. return self;},
  112. args: ["aString", "aClass"],
  113. source: "compile: aString forClass: aClass\x0a\x09self currentClass: aClass.\x0a\x09self source: aString.\x0a\x09^self compile: aString",
  114. messageSends: ["currentClass:", "source:", "compile:"],
  115. referencedClasses: []
  116. }),
  117. smalltalk.Compiler);
  118. smalltalk.addMethod(
  119. "_compileExpression_",
  120. smalltalk.method({
  121. selector: "compileExpression:",
  122. category: 'compiling',
  123. fn: function (aString) {
  124. var self=this;
  125. smalltalk.send(self, "_currentClass_", [(smalltalk.DoIt || DoIt)]);
  126. smalltalk.send(self, "_source_", [smalltalk.send(smalltalk.send("doIt ^[", "__comma", [aString]), "__comma", ["] value"])]);
  127. return smalltalk.send(self, "_compileNode_", [smalltalk.send(self, "_parse_", [smalltalk.send(self, "_source", [])])]);
  128. return self;},
  129. args: ["aString"],
  130. source: "compileExpression: aString\x0a\x09self currentClass: DoIt.\x0a\x09self source: 'doIt ^[', aString, '] value'.\x0a\x09^self compileNode: (self parse: self source)",
  131. messageSends: ["currentClass:", "source:", ",", "compileNode:", "parse:", "source"],
  132. referencedClasses: ["DoIt"]
  133. }),
  134. smalltalk.Compiler);
  135. smalltalk.addMethod(
  136. "_compileNode_",
  137. smalltalk.method({
  138. selector: "compileNode:",
  139. category: 'compiling',
  140. fn: function (aNode) {
  141. var self=this;
  142. var generator=nil;
  143. var result=nil;
  144. (generator=smalltalk.send(smalltalk.send(self, "_codeGeneratorClass", []), "_new", []));
  145. (function($rec){smalltalk.send($rec, "_source_", [smalltalk.send(self, "_source", [])]);return smalltalk.send($rec, "_currentClass_", [smalltalk.send(self, "_currentClass", [])]);})(generator);
  146. (result=smalltalk.send(generator, "_compileNode_", [aNode]));
  147. smalltalk.send(self, "_unknownVariables_", [smalltalk.send(generator, "_unknownVariables", [])]);
  148. return result;
  149. return self;},
  150. args: ["aNode"],
  151. 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: generator unknownVariables.\x0a\x09^result",
  152. messageSends: ["new", "codeGeneratorClass", "source:", "source", "currentClass:", "currentClass", "compileNode:", "unknownVariables:", "unknownVariables"],
  153. referencedClasses: []
  154. }),
  155. smalltalk.Compiler);
  156. smalltalk.addMethod(
  157. "_currentClass",
  158. smalltalk.method({
  159. selector: "currentClass",
  160. category: 'accessing',
  161. fn: function () {
  162. var self=this;
  163. return self['@currentClass'];
  164. return self;},
  165. args: [],
  166. source: "currentClass\x0a\x09^currentClass",
  167. messageSends: [],
  168. referencedClasses: []
  169. }),
  170. smalltalk.Compiler);
  171. smalltalk.addMethod(
  172. "_currentClass_",
  173. smalltalk.method({
  174. selector: "currentClass:",
  175. category: 'accessing',
  176. fn: function (aClass) {
  177. var self=this;
  178. (self['@currentClass']=aClass);
  179. return self;},
  180. args: ["aClass"],
  181. source: "currentClass: aClass\x0a\x09currentClass := aClass",
  182. messageSends: [],
  183. referencedClasses: []
  184. }),
  185. smalltalk.Compiler);
  186. smalltalk.addMethod(
  187. "_eval_",
  188. smalltalk.method({
  189. selector: "eval:",
  190. category: 'compiling',
  191. fn: function (aString) {
  192. var self=this;
  193. return eval(aString);
  194. return self;},
  195. args: ["aString"],
  196. source: "eval: aString\x0a\x09<return eval(aString)>",
  197. messageSends: [],
  198. referencedClasses: []
  199. }),
  200. smalltalk.Compiler);
  201. smalltalk.addMethod(
  202. "_evaluateExpression_",
  203. smalltalk.method({
  204. selector: "evaluateExpression:",
  205. category: 'compiling',
  206. fn: function (aString) {
  207. var self=this;
  208. var result=nil;
  209. smalltalk.send((smalltalk.DoIt || DoIt), "_addCompiledMethod_", [smalltalk.send(self, "_eval_", [smalltalk.send(self, "_compileExpression_", [aString])])]);
  210. (result=smalltalk.send(smalltalk.send((smalltalk.DoIt || DoIt), "_new", []), "_doIt", []));
  211. smalltalk.send((smalltalk.DoIt || DoIt), "_removeCompiledMethod_", [smalltalk.send(smalltalk.send((smalltalk.DoIt || DoIt), "_methodDictionary", []), "_at_", ["doIt"])]);
  212. return result;
  213. return self;},
  214. args: ["aString"],
  215. 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",
  216. messageSends: ["addCompiledMethod:", "eval:", "compileExpression:", "doIt", "new", "removeCompiledMethod:", "at:", "methodDictionary"],
  217. referencedClasses: ["DoIt"]
  218. }),
  219. smalltalk.Compiler);
  220. smalltalk.addMethod(
  221. "_install_forClass_category_",
  222. smalltalk.method({
  223. selector: "install:forClass:category:",
  224. category: 'compiling',
  225. fn: function (aString, aBehavior, anotherString) {
  226. var self=this;
  227. var compiled=nil;
  228. (compiled=smalltalk.send(self, "_eval_", [smalltalk.send(self, "_compile_forClass_", [aString, aBehavior])]));
  229. smalltalk.send(compiled, "_category_", [anotherString]);
  230. smalltalk.send(aBehavior, "_addCompiledMethod_", [compiled]);
  231. return compiled;
  232. return self;},
  233. args: ["aString", "aBehavior", "anotherString"],
  234. 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\x09^compiled",
  235. messageSends: ["eval:", "compile:forClass:", "category:", "addCompiledMethod:"],
  236. referencedClasses: []
  237. }),
  238. smalltalk.Compiler);
  239. smalltalk.addMethod(
  240. "_parse_",
  241. smalltalk.method({
  242. selector: "parse:",
  243. category: 'compiling',
  244. fn: function (aString) {
  245. var self=this;
  246. return smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_parse_", [aString]);
  247. return self;},
  248. args: ["aString"],
  249. source: "parse: aString\x0a ^Smalltalk current parse: aString",
  250. messageSends: ["parse:", "current"],
  251. referencedClasses: ["Smalltalk"]
  252. }),
  253. smalltalk.Compiler);
  254. smalltalk.addMethod(
  255. "_parseExpression_",
  256. smalltalk.method({
  257. selector: "parseExpression:",
  258. category: 'compiling',
  259. fn: function (aString) {
  260. var self=this;
  261. return smalltalk.send(self, "_parse_", [smalltalk.send(smalltalk.send("doIt ^[", "__comma", [aString]), "__comma", ["] value"])]);
  262. return self;},
  263. args: ["aString"],
  264. source: "parseExpression: aString\x0a ^self parse: 'doIt ^[', aString, '] value'",
  265. messageSends: ["parse:", ","],
  266. referencedClasses: []
  267. }),
  268. smalltalk.Compiler);
  269. smalltalk.addMethod(
  270. "_recompile_",
  271. smalltalk.method({
  272. selector: "recompile:",
  273. category: 'compiling',
  274. fn: function (aClass) {
  275. var self=this;
  276. smalltalk.send(smalltalk.send(aClass, "_methodDictionary", []), "_do_", [(function(each){return smalltalk.send(self, "_install_forClass_category_", [smalltalk.send(each, "_source", []), aClass, smalltalk.send(each, "_category", [])]);})]);
  277. smalltalk.send(self, "_setupClass_", [aClass]);
  278. ((($receiver = smalltalk.send(aClass, "_isMetaclass", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self, "_recompile_", [smalltalk.send(aClass, "_class", [])]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(self, "_recompile_", [smalltalk.send(aClass, "_class", [])]);})]));
  279. return self;},
  280. args: ["aClass"],
  281. source: "recompile: aClass\x0a\x09aClass methodDictionary do: [:each |\x0a\x09\x09self install: each source forClass: aClass category: each category].\x0a\x09self setupClass: aClass.\x0a\x09aClass isMetaclass ifFalse: [self recompile: aClass class]",
  282. messageSends: ["do:", "methodDictionary", "install:forClass:category:", "source", "category", "setupClass:", "ifFalse:", "isMetaclass", "recompile:", "class"],
  283. referencedClasses: []
  284. }),
  285. smalltalk.Compiler);
  286. smalltalk.addMethod(
  287. "_recompileAll",
  288. smalltalk.method({
  289. selector: "recompileAll",
  290. category: 'compiling',
  291. fn: function () {
  292. var self=this;
  293. smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_classes", []), "_do_", [(function(each){(function($rec){smalltalk.send($rec, "_show_", [each]);return smalltalk.send($rec, "_cr", []);})((smalltalk.Transcript || Transcript));return smalltalk.send((function(){return smalltalk.send(self, "_recompile_", [each]);}), "_valueWithTimeout_", [(100)]);})]);
  294. return self;},
  295. args: [],
  296. source: "recompileAll\x0a\x09Smalltalk current classes do: [:each |\x0a\x09\x09Transcript show: each; cr.\x0a\x09\x09[self recompile: each] valueWithTimeout: 100]",
  297. messageSends: ["do:", "classes", "current", "show:", "cr", "valueWithTimeout:", "recompile:"],
  298. referencedClasses: ["Smalltalk", "Transcript"]
  299. }),
  300. smalltalk.Compiler);
  301. smalltalk.addMethod(
  302. "_setupClass_",
  303. smalltalk.method({
  304. selector: "setupClass:",
  305. category: 'compiling',
  306. fn: function (aClass) {
  307. var self=this;
  308. smalltalk.init(aClass);
  309. return self;},
  310. args: ["aClass"],
  311. source: "setupClass: aClass\x0a\x09<smalltalk.init(aClass)>",
  312. messageSends: [],
  313. referencedClasses: []
  314. }),
  315. smalltalk.Compiler);
  316. smalltalk.addMethod(
  317. "_source",
  318. smalltalk.method({
  319. selector: "source",
  320. category: 'accessing',
  321. fn: function () {
  322. var self=this;
  323. return (($receiver = self['@source']) == nil || $receiver == undefined) ? (function(){return "";})() : $receiver;
  324. return self;},
  325. args: [],
  326. source: "source\x0a\x09^source ifNil: ['']",
  327. messageSends: ["ifNil:"],
  328. referencedClasses: []
  329. }),
  330. smalltalk.Compiler);
  331. smalltalk.addMethod(
  332. "_source_",
  333. smalltalk.method({
  334. selector: "source:",
  335. category: 'accessing',
  336. fn: function (aString) {
  337. var self=this;
  338. (self['@source']=aString);
  339. return self;},
  340. args: ["aString"],
  341. source: "source: aString\x0a\x09source := aString",
  342. messageSends: [],
  343. referencedClasses: []
  344. }),
  345. smalltalk.Compiler);
  346. smalltalk.addMethod(
  347. "_unknownVariables",
  348. smalltalk.method({
  349. selector: "unknownVariables",
  350. category: 'accessing',
  351. fn: function () {
  352. var self=this;
  353. return self['@unknownVariables'];
  354. return self;},
  355. args: [],
  356. source: "unknownVariables\x0a\x09^unknownVariables",
  357. messageSends: [],
  358. referencedClasses: []
  359. }),
  360. smalltalk.Compiler);
  361. smalltalk.addMethod(
  362. "_unknownVariables_",
  363. smalltalk.method({
  364. selector: "unknownVariables:",
  365. category: 'accessing',
  366. fn: function (aCollection) {
  367. var self=this;
  368. (self['@unknownVariables']=aCollection);
  369. return self;},
  370. args: ["aCollection"],
  371. source: "unknownVariables: aCollection\x0a\x09unknownVariables := aCollection",
  372. messageSends: [],
  373. referencedClasses: []
  374. }),
  375. smalltalk.Compiler);
  376. smalltalk.addMethod(
  377. "_recompile_",
  378. smalltalk.method({
  379. selector: "recompile:",
  380. category: 'compiling',
  381. fn: function (aClass) {
  382. var self=this;
  383. smalltalk.send(smalltalk.send(self, "_new", []), "_recompile_", [aClass]);
  384. return self;},
  385. args: ["aClass"],
  386. source: "recompile: aClass\x0a\x09self new recompile: aClass",
  387. messageSends: ["recompile:", "new"],
  388. referencedClasses: []
  389. }),
  390. smalltalk.Compiler.klass);
  391. smalltalk.addMethod(
  392. "_recompileAll",
  393. smalltalk.method({
  394. selector: "recompileAll",
  395. category: 'compiling',
  396. fn: function () {
  397. var self=this;
  398. smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_classes", []), "_do_", [(function(each){return smalltalk.send(self, "_recompile_", [each]);})]);
  399. return self;},
  400. args: [],
  401. source: "recompileAll\x0a\x09Smalltalk current classes do: [:each |\x0a\x09\x09self recompile: each]",
  402. messageSends: ["do:", "classes", "current", "recompile:"],
  403. referencedClasses: ["Smalltalk"]
  404. }),
  405. smalltalk.Compiler.klass);
  406. smalltalk.addClass('DoIt', smalltalk.Object, [], 'Compiler');
  407. smalltalk.addClass('Exporter', smalltalk.Object, [], 'Compiler');
  408. smalltalk.addMethod(
  409. "_classNameFor_",
  410. smalltalk.method({
  411. selector: "classNameFor:",
  412. category: 'private',
  413. fn: function (aClass) {
  414. var self=this;
  415. return ((($receiver = smalltalk.send(aClass, "_isMetaclass", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_instanceClass", []), "_name", []), "__comma", [".klass"]);})() : (function(){return ((($receiver = smalltalk.send(aClass, "_isNil", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return "nil";})() : (function(){return smalltalk.send(aClass, "_name", []);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return "nil";}), (function(){return smalltalk.send(aClass, "_name", []);})]));})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_instanceClass", []), "_name", []), "__comma", [".klass"]);}), (function(){return ((($receiver = smalltalk.send(aClass, "_isNil", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return "nil";})() : (function(){return smalltalk.send(aClass, "_name", []);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return "nil";}), (function(){return smalltalk.send(aClass, "_name", []);})]));})]));
  416. return self;},
  417. args: ["aClass"],
  418. 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]]",
  419. messageSends: ["ifTrue:ifFalse:", "isMetaclass", ",", "name", "instanceClass", "isNil"],
  420. referencedClasses: []
  421. }),
  422. smalltalk.Exporter);
  423. smalltalk.addMethod(
  424. "_exportAll",
  425. smalltalk.method({
  426. selector: "exportAll",
  427. category: 'fileOut',
  428. fn: function () {
  429. var self=this;
  430. return smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(stream){return smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_packages", []), "_do_", [(function(pkg){return smalltalk.send(stream, "_nextPutAll_", [smalltalk.send(self, "_exportPackage_", [smalltalk.send(pkg, "_name", [])])]);})]);})]);
  431. return self;},
  432. args: [],
  433. 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)]]",
  434. messageSends: ["streamContents:", "do:", "packages", "current", "nextPutAll:", "exportPackage:", "name"],
  435. referencedClasses: ["String", "Smalltalk"]
  436. }),
  437. smalltalk.Exporter);
  438. smalltalk.addMethod(
  439. "_exportClass_",
  440. smalltalk.method({
  441. selector: "exportClass:",
  442. category: 'fileOut',
  443. fn: function (aClass) {
  444. var self=this;
  445. return smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(stream){smalltalk.send(self, "_exportDefinitionOf_on_", [aClass, stream]);smalltalk.send(self, "_exportMethodsOf_on_", [aClass, stream]);smalltalk.send(self, "_exportMetaDefinitionOf_on_", [aClass, stream]);return smalltalk.send(self, "_exportMethodsOf_on_", [smalltalk.send(aClass, "_class", []), stream]);})]);
  446. return self;},
  447. args: ["aClass"],
  448. 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]",
  449. messageSends: ["streamContents:", "exportDefinitionOf:on:", "exportMethodsOf:on:", "exportMetaDefinitionOf:on:", "class"],
  450. referencedClasses: ["String"]
  451. }),
  452. smalltalk.Exporter);
  453. smalltalk.addMethod(
  454. "_exportDefinitionOf_on_",
  455. smalltalk.method({
  456. selector: "exportDefinitionOf:on:",
  457. category: 'private',
  458. fn: function (aClass, aStream) {
  459. var self=this;
  460. (function($rec){smalltalk.send($rec, "_nextPutAll_", ["smalltalk.addClass("]);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("'", "__comma", [smalltalk.send(self, "_classNameFor_", [aClass])]), "__comma", ["', "])]);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send("smalltalk.", "__comma", [smalltalk.send(self, "_classNameFor_", [smalltalk.send(aClass, "_superclass", [])])])]);return smalltalk.send($rec, "_nextPutAll_", [", ["]);})(aStream);
  461. smalltalk.send(smalltalk.send(aClass, "_instanceVariableNames", []), "_do_separatedBy_", [(function(each){return smalltalk.send(aStream, "_nextPutAll_", [smalltalk.send(smalltalk.send("'", "__comma", [each]), "__comma", ["'"])]);}), (function(){return smalltalk.send(aStream, "_nextPutAll_", [", "]);})]);
  462. (function($rec){smalltalk.send($rec, "_nextPutAll_", ["], '"]);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(aClass, "_category", []), "__comma", ["'"])]);return smalltalk.send($rec, "_nextPutAll_", [");"]);})(aStream);
  463. ((($receiver = smalltalk.send(smalltalk.send(aClass, "_comment", []), "_notEmpty", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (function($rec){smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", ["smalltalk."]);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(self, "_classNameFor_", [aClass])]);smalltalk.send($rec, "_nextPutAll_", [".comment="]);return smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(aClass, "_comment", []), "_asJavascript", [])]);})(aStream);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (function($rec){smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", ["smalltalk."]);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(self, "_classNameFor_", [aClass])]);smalltalk.send($rec, "_nextPutAll_", [".comment="]);return smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(aClass, "_comment", []), "_asJavascript", [])]);})(aStream);})]));
  464. smalltalk.send(aStream, "_lf", []);
  465. return self;},
  466. args: ["aClass", "aStream"],
  467. 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",
  468. messageSends: ["nextPutAll:", ",", "classNameFor:", "superclass", "do:separatedBy:", "instanceVariableNames", "category", "ifTrue:", "notEmpty", "comment", "lf", "asJavascript"],
  469. referencedClasses: []
  470. }),
  471. smalltalk.Exporter);
  472. smalltalk.addMethod(
  473. "_exportMetaDefinitionOf_on_",
  474. smalltalk.method({
  475. selector: "exportMetaDefinitionOf:on:",
  476. category: 'private',
  477. fn: function (aClass, aStream) {
  478. var self=this;
  479. ((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_class", []), "_instanceVariableNames", []), "_isEmpty", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){(function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send("smalltalk.", "__comma", [smalltalk.send(self, "_classNameFor_", [smalltalk.send(aClass, "_class", [])])])]);return smalltalk.send($rec, "_nextPutAll_", [".iVarNames = ["]);})(aStream);smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_class", []), "_instanceVariableNames", []), "_do_separatedBy_", [(function(each){return smalltalk.send(aStream, "_nextPutAll_", [smalltalk.send(smalltalk.send("'", "__comma", [each]), "__comma", ["'"])]);}), (function(){return smalltalk.send(aStream, "_nextPutAll_", [","]);})]);return smalltalk.send(aStream, "_nextPutAll_", [smalltalk.send("];", "__comma", [smalltalk.send((smalltalk.String || String), "_lf", [])])]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){(function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send("smalltalk.", "__comma", [smalltalk.send(self, "_classNameFor_", [smalltalk.send(aClass, "_class", [])])])]);return smalltalk.send($rec, "_nextPutAll_", [".iVarNames = ["]);})(aStream);smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_class", []), "_instanceVariableNames", []), "_do_separatedBy_", [(function(each){return smalltalk.send(aStream, "_nextPutAll_", [smalltalk.send(smalltalk.send("'", "__comma", [each]), "__comma", ["'"])]);}), (function(){return smalltalk.send(aStream, "_nextPutAll_", [","]);})]);return smalltalk.send(aStream, "_nextPutAll_", [smalltalk.send("];", "__comma", [smalltalk.send((smalltalk.String || String), "_lf", [])])]);})]));
  480. return self;},
  481. args: ["aClass", "aStream"],
  482. 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]",
  483. messageSends: ["ifFalse:", "isEmpty", "instanceVariableNames", "class", "nextPutAll:", ",", "classNameFor:", "do:separatedBy:", "lf"],
  484. referencedClasses: ["String"]
  485. }),
  486. smalltalk.Exporter);
  487. smalltalk.addMethod(
  488. "_exportMethod_of_on_",
  489. smalltalk.method({
  490. selector: "exportMethod:of:on:",
  491. category: 'private',
  492. fn: function (aMethod, aClass, aStream) {
  493. var self=this;
  494. (function($rec){smalltalk.send($rec, "_nextPutAll_", ["smalltalk.addMethod("]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aMethod, "_selector", []), "_asSelector", []), "_asJavascript", []), "__comma", [","])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", ["smalltalk.method({"]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("selector: ", "__comma", [smalltalk.send(smalltalk.send(aMethod, "_selector", []), "_asJavascript", [])]), "__comma", [","])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("category: '", "__comma", [smalltalk.send(aMethod, "_category", [])]), "__comma", ["',"])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("fn: ", "__comma", [smalltalk.send(smalltalk.send(aMethod, "_fn", []), "_compiledSource", [])]), "__comma", [","])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("args: ", "__comma", [smalltalk.send(smalltalk.send(aMethod, "_arguments", []), "_asJavascript", [])]), "__comma", [","])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("source: ", "__comma", [smalltalk.send(smalltalk.send(aMethod, "_source", []), "_asJavascript", [])]), "__comma", [","])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("messageSends: ", "__comma", [smalltalk.send(smalltalk.send(aMethod, "_messageSends", []), "_asJavascript", [])]), "__comma", [","])]);smalltalk.send($rec, "_lf", []);return smalltalk.send($rec, "_nextPutAll_", [smalltalk.send("referencedClasses: ", "__comma", [smalltalk.send(smalltalk.send(aMethod, "_referencedClasses", []), "_asJavascript", [])])]);})(aStream);
  495. (function($rec){smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", ["}),"]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send("smalltalk.", "__comma", [smalltalk.send(self, "_classNameFor_", [aClass])])]);smalltalk.send($rec, "_nextPutAll_", [");"]);smalltalk.send($rec, "_lf", []);return smalltalk.send($rec, "_lf", []);})(aStream);
  496. return self;},
  497. args: ["aMethod", "aClass", "aStream"],
  498. 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",
  499. messageSends: ["nextPutAll:", "lf", ",", "asJavascript", "asSelector", "selector", "category", "compiledSource", "fn", "arguments", "source", "messageSends", "referencedClasses", "classNameFor:"],
  500. referencedClasses: []
  501. }),
  502. smalltalk.Exporter);
  503. smalltalk.addMethod(
  504. "_exportMethodsOf_on_",
  505. smalltalk.method({
  506. selector: "exportMethodsOf:on:",
  507. category: 'private',
  508. fn: function (aClass, aStream) {
  509. var self=this;
  510. smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_methodDictionary", []), "_values", []), "_sorted_", [(function(a, b){return ((($receiver = smalltalk.send(a, "_selector", [])).klass === smalltalk.Number) ? $receiver <=smalltalk.send(b, "_selector", []) : smalltalk.send($receiver, "__lt_eq", [smalltalk.send(b, "_selector", [])]));})]), "_do_", [(function(each){return ((($receiver = smalltalk.send(smalltalk.send(each, "_category", []), "_match_", ["^\x5c*"])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self, "_exportMethod_of_on_", [each, aClass, aStream]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(self, "_exportMethod_of_on_", [each, aClass, aStream]);})]));})]);
  511. smalltalk.send(aStream, "_lf", []);
  512. return self;},
  513. args: ["aClass", "aStream"],
  514. 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",
  515. messageSends: ["do:", "sorted:", "values", "methodDictionary", "<=", "selector", "ifFalse:", "match:", "category", "exportMethod:of:on:", "lf"],
  516. referencedClasses: []
  517. }),
  518. smalltalk.Exporter);
  519. smalltalk.addMethod(
  520. "_exportPackage_",
  521. smalltalk.method({
  522. selector: "exportPackage:",
  523. category: 'fileOut',
  524. fn: function (packageName) {
  525. var self=this;
  526. var package=nil;
  527. return smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(stream){(package=smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_packageAt_", [packageName]));smalltalk.send(self, "_exportPackageDefinitionOf_on_", [package, stream]);smalltalk.send(smalltalk.send(smalltalk.send(package, "_sortedClasses", []), "_asSet", []), "_do_", [(function(each){return smalltalk.send(stream, "_nextPutAll_", [smalltalk.send(self, "_exportClass_", [each])]);})]);return smalltalk.send(self, "_exportPackageExtensionsOf_on_", [package, stream]);})]);
  528. return self;},
  529. args: ["packageName"],
  530. 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]",
  531. messageSends: ["streamContents:", "packageAt:", "current", "exportPackageDefinitionOf:on:", "do:", "asSet", "sortedClasses", "nextPutAll:", "exportClass:", "exportPackageExtensionsOf:on:"],
  532. referencedClasses: ["String", "Smalltalk"]
  533. }),
  534. smalltalk.Exporter);
  535. smalltalk.addMethod(
  536. "_exportPackageDefinitionOf_on_",
  537. smalltalk.method({
  538. selector: "exportPackageDefinitionOf:on:",
  539. category: 'private',
  540. fn: function (package, aStream) {
  541. var self=this;
  542. (function($rec){smalltalk.send($rec, "_nextPutAll_", ["smalltalk.addPackage("]);return smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("'", "__comma", [smalltalk.send(package, "_name", [])]), "__comma", ["', "]), "__comma", [smalltalk.send(package, "_propertiesAsJSON", [])]), "__comma", [");"])]);})(aStream);
  543. smalltalk.send(aStream, "_lf", []);
  544. return self;},
  545. args: ["package", "aStream"],
  546. source: "exportPackageDefinitionOf: package on: aStream\x0a\x09aStream \x0a\x09 nextPutAll: 'smalltalk.addPackage(';\x0a\x09 nextPutAll: '''', package name, ''', ', package propertiesAsJSON , ');'.\x0a\x09aStream lf",
  547. messageSends: ["nextPutAll:", ",", "name", "propertiesAsJSON", "lf"],
  548. referencedClasses: []
  549. }),
  550. smalltalk.Exporter);
  551. smalltalk.addMethod(
  552. "_exportPackageExtensionsOf_on_",
  553. smalltalk.method({
  554. selector: "exportPackageExtensionsOf:on:",
  555. category: 'private',
  556. fn: function (package, aStream) {
  557. var self=this;
  558. var name=nil;
  559. (name=smalltalk.send(package, "_name", []));
  560. smalltalk.send(smalltalk.send((smalltalk.Package || Package), "_sortedClasses_", [smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_classes", [])]), "_do_", [(function(each){return smalltalk.send([each,smalltalk.send(each, "_class", [])], "_do_", [(function(aClass){return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_methodDictionary", []), "_values", []), "_sorted_", [(function(a, b){return ((($receiver = smalltalk.send(a, "_selector", [])).klass === smalltalk.Number) ? $receiver <=smalltalk.send(b, "_selector", []) : smalltalk.send($receiver, "__lt_eq", [smalltalk.send(b, "_selector", [])]));})]), "_do_", [(function(method){return ((($receiver = smalltalk.send(smalltalk.send(method, "_category", []), "_match_", [smalltalk.send("^\x5c*", "__comma", [name])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_exportMethod_of_on_", [method, aClass, aStream]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(self, "_exportMethod_of_on_", [method, aClass, aStream]);})]));})]);})]);})]);
  561. return self;},
  562. args: ["package", "aStream"],
  563. 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 ]]]]",
  564. messageSends: ["name", "do:", "sortedClasses:", "classes", "current", "class", "sorted:", "values", "methodDictionary", "<=", "selector", "ifTrue:", "match:", "category", ",", "exportMethod:of:on:"],
  565. referencedClasses: ["Package", "Smalltalk"]
  566. }),
  567. smalltalk.Exporter);
  568. smalltalk.addClass('ChunkExporter', smalltalk.Exporter, [], 'Compiler');
  569. smalltalk.addMethod(
  570. "_chunkEscape_",
  571. smalltalk.method({
  572. selector: "chunkEscape:",
  573. category: 'not yet classified',
  574. fn: function (aString) {
  575. var self=this;
  576. return smalltalk.send(smalltalk.send(aString, "_replace_with_", ["!", "!!"]), "_trimBoth", []);
  577. return self;},
  578. args: ["aString"],
  579. source: "chunkEscape: aString\x0a\x09\x22Replace all occurrences of ! with !! and trim at both ends.\x22\x0a\x0a\x09^(aString replace: '!' with: '!!') trimBoth",
  580. messageSends: ["trimBoth", "replace:with:"],
  581. referencedClasses: []
  582. }),
  583. smalltalk.ChunkExporter);
  584. smalltalk.addMethod(
  585. "_classNameFor_",
  586. smalltalk.method({
  587. selector: "classNameFor:",
  588. category: 'not yet classified',
  589. fn: function (aClass) {
  590. var self=this;
  591. return ((($receiver = smalltalk.send(aClass, "_isMetaclass", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_instanceClass", []), "_name", []), "__comma", [" class"]);})() : (function(){return ((($receiver = smalltalk.send(aClass, "_isNil", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return "nil";})() : (function(){return smalltalk.send(aClass, "_name", []);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return "nil";}), (function(){return smalltalk.send(aClass, "_name", []);})]));})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_instanceClass", []), "_name", []), "__comma", [" class"]);}), (function(){return ((($receiver = smalltalk.send(aClass, "_isNil", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return "nil";})() : (function(){return smalltalk.send(aClass, "_name", []);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return "nil";}), (function(){return smalltalk.send(aClass, "_name", []);})]));})]));
  592. return self;},
  593. args: ["aClass"],
  594. 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]]",
  595. messageSends: ["ifTrue:ifFalse:", "isMetaclass", ",", "name", "instanceClass", "isNil"],
  596. referencedClasses: []
  597. }),
  598. smalltalk.ChunkExporter);
  599. smalltalk.addMethod(
  600. "_exportDefinitionOf_on_",
  601. smalltalk.method({
  602. selector: "exportDefinitionOf:on:",
  603. category: 'not yet classified',
  604. fn: function (aClass, aStream) {
  605. var self=this;
  606. (function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(self, "_classNameFor_", [smalltalk.send(aClass, "_superclass", [])])]);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(" subclass: #", "__comma", [smalltalk.send(self, "_classNameFor_", [aClass])])]);smalltalk.send($rec, "_lf", []);return smalltalk.send($rec, "_nextPutAll_", ["\x09instanceVariableNames: '"]);})(aStream);
  607. smalltalk.send(smalltalk.send(aClass, "_instanceVariableNames", []), "_do_separatedBy_", [(function(each){return smalltalk.send(aStream, "_nextPutAll_", [each]);}), (function(){return smalltalk.send(aStream, "_nextPutAll_", [" "]);})]);
  608. (function($rec){smalltalk.send($rec, "_nextPutAll_", ["'"]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("\x09package: '", "__comma", [smalltalk.send(aClass, "_category", [])]), "__comma", ["'!"])]);return smalltalk.send($rec, "_lf", []);})(aStream);
  609. ((($receiver = smalltalk.send(smalltalk.send(aClass, "_comment", []), "_notEmpty", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("!", "__comma", [smalltalk.send(self, "_classNameFor_", [aClass])]), "__comma", [" commentStamp!"])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(self, "_chunkEscape_", [smalltalk.send(aClass, "_comment", [])]), "__comma", ["!"])]);return smalltalk.send($rec, "_lf", []);})(aStream);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("!", "__comma", [smalltalk.send(self, "_classNameFor_", [aClass])]), "__comma", [" commentStamp!"])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(self, "_chunkEscape_", [smalltalk.send(aClass, "_comment", [])]), "__comma", ["!"])]);return smalltalk.send($rec, "_lf", []);})(aStream);})]));
  610. smalltalk.send(aStream, "_lf", []);
  611. return self;},
  612. args: ["aClass", "aStream"],
  613. 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",
  614. messageSends: ["nextPutAll:", "classNameFor:", "superclass", ",", "lf", "do:separatedBy:", "instanceVariableNames", "category", "ifTrue:", "notEmpty", "comment", "chunkEscape:"],
  615. referencedClasses: []
  616. }),
  617. smalltalk.ChunkExporter);
  618. smalltalk.addMethod(
  619. "_exportMetaDefinitionOf_on_",
  620. smalltalk.method({
  621. selector: "exportMetaDefinitionOf:on:",
  622. category: 'not yet classified',
  623. fn: function (aClass, aStream) {
  624. var self=this;
  625. ((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_class", []), "_instanceVariableNames", []), "_isEmpty", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){(function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(self, "_classNameFor_", [smalltalk.send(aClass, "_class", [])])]);return smalltalk.send($rec, "_nextPutAll_", [" instanceVariableNames: '"]);})(aStream);smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_class", []), "_instanceVariableNames", []), "_do_separatedBy_", [(function(each){return smalltalk.send(aStream, "_nextPutAll_", [each]);}), (function(){return smalltalk.send(aStream, "_nextPutAll_", [" "]);})]);return (function($rec){smalltalk.send($rec, "_nextPutAll_", ["'!"]);smalltalk.send($rec, "_lf", []);return smalltalk.send($rec, "_lf", []);})(aStream);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){(function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(self, "_classNameFor_", [smalltalk.send(aClass, "_class", [])])]);return smalltalk.send($rec, "_nextPutAll_", [" instanceVariableNames: '"]);})(aStream);smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_class", []), "_instanceVariableNames", []), "_do_separatedBy_", [(function(each){return smalltalk.send(aStream, "_nextPutAll_", [each]);}), (function(){return smalltalk.send(aStream, "_nextPutAll_", [" "]);})]);return (function($rec){smalltalk.send($rec, "_nextPutAll_", ["'!"]);smalltalk.send($rec, "_lf", []);return smalltalk.send($rec, "_lf", []);})(aStream);})]));
  626. return self;},
  627. args: ["aClass", "aStream"],
  628. 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]",
  629. messageSends: ["ifFalse:", "isEmpty", "instanceVariableNames", "class", "nextPutAll:", "classNameFor:", "do:separatedBy:", "lf"],
  630. referencedClasses: []
  631. }),
  632. smalltalk.ChunkExporter);
  633. smalltalk.addMethod(
  634. "_exportMethod_of_on_",
  635. smalltalk.method({
  636. selector: "exportMethod:of:on:",
  637. category: 'not yet classified',
  638. fn: function (aMethod, aClass, aStream) {
  639. var self=this;
  640. (function($rec){smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(self, "_chunkEscape_", [smalltalk.send(aMethod, "_source", [])])]);smalltalk.send($rec, "_lf", []);return smalltalk.send($rec, "_nextPutAll_", ["!"]);})(aStream);
  641. return self;},
  642. args: ["aMethod", "aClass", "aStream"],
  643. source: "exportMethod: aMethod of: aClass on: aStream\x0a\x09aStream \x0a\x09\x09lf; lf; nextPutAll: (self chunkEscape: aMethod source); lf;\x0a\x09\x09nextPutAll: '!'",
  644. messageSends: ["lf", "nextPutAll:", "chunkEscape:", "source"],
  645. referencedClasses: []
  646. }),
  647. smalltalk.ChunkExporter);
  648. smalltalk.addMethod(
  649. "_exportMethods_category_of_on_",
  650. smalltalk.method({
  651. selector: "exportMethods:category:of:on:",
  652. category: 'not yet classified',
  653. fn: function (methods, category, aClass, aStream) {
  654. var self=this;
  655. (function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send("!", "__comma", [smalltalk.send(self, "_classNameFor_", [aClass])])]);return smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(" methodsFor: '", "__comma", [category]), "__comma", ["'!"])]);})(aStream);
  656. smalltalk.send(smalltalk.send(methods, "_sorted_", [(function(a, b){return ((($receiver = smalltalk.send(a, "_selector", [])).klass === smalltalk.Number) ? $receiver <=smalltalk.send(b, "_selector", []) : smalltalk.send($receiver, "__lt_eq", [smalltalk.send(b, "_selector", [])]));})]), "_do_", [(function(each){return smalltalk.send(self, "_exportMethod_of_on_", [each, aClass, aStream]);})]);
  657. (function($rec){smalltalk.send($rec, "_nextPutAll_", [" !"]);smalltalk.send($rec, "_lf", []);return smalltalk.send($rec, "_lf", []);})(aStream);
  658. return self;},
  659. args: ["methods", "category", "aClass", "aStream"],
  660. 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",
  661. messageSends: ["nextPutAll:", ",", "classNameFor:", "do:", "sorted:", "<=", "selector", "exportMethod:of:on:", "lf"],
  662. referencedClasses: []
  663. }),
  664. smalltalk.ChunkExporter);
  665. smalltalk.addMethod(
  666. "_exportMethodsOf_on_",
  667. smalltalk.method({
  668. selector: "exportMethodsOf:on:",
  669. category: 'not yet classified',
  670. fn: function (aClass, aStream) {
  671. var self=this;
  672. var map=nil;
  673. (map=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []));
  674. smalltalk.send(aClass, "_protocolsDo_", [(function(category, methods){return ((($receiver = smalltalk.send(category, "_match_", ["^\x5c*"])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(map, "_at_put_", [category, methods]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(map, "_at_put_", [category, methods]);})]));})]);
  675. smalltalk.send(smalltalk.send(smalltalk.send(map, "_keys", []), "_sorted_", [(function(a, b){return ((($receiver = a).klass === smalltalk.Number) ? $receiver <=b : smalltalk.send($receiver, "__lt_eq", [b]));})]), "_do_", [(function(category){var methods=nil;
  676. (methods=smalltalk.send(map, "_at_", [category]));return smalltalk.send(self, "_exportMethods_category_of_on_", [methods, category, aClass, aStream]);})]);
  677. return self;},
  678. args: ["aClass", "aStream"],
  679. 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 ]",
  680. messageSends: ["new", "protocolsDo:", "ifFalse:", "match:", "at:put:", "do:", "sorted:", "keys", "<=", "at:", "exportMethods:category:of:on:"],
  681. referencedClasses: ["Dictionary"]
  682. }),
  683. smalltalk.ChunkExporter);
  684. smalltalk.addMethod(
  685. "_exportPackageDefinitionOf_on_",
  686. smalltalk.method({
  687. selector: "exportPackageDefinitionOf:on:",
  688. category: 'not yet classified',
  689. fn: function (package, aStream) {
  690. var self=this;
  691. (function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("Smalltalk current createPackage: '", "__comma", [smalltalk.send(package, "_name", [])]), "__comma", ["' properties: "]), "__comma", [smalltalk.send(smalltalk.send(package, "_properties", []), "_storeString", [])]), "__comma", ["!"])]);return smalltalk.send($rec, "_lf", []);})(aStream);
  692. return self;},
  693. args: ["package", "aStream"],
  694. 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.",
  695. messageSends: ["nextPutAll:", ",", "name", "storeString", "properties", "lf"],
  696. referencedClasses: []
  697. }),
  698. smalltalk.ChunkExporter);
  699. smalltalk.addMethod(
  700. "_exportPackageExtensionsOf_on_",
  701. smalltalk.method({
  702. selector: "exportPackageExtensionsOf:on:",
  703. category: 'not yet classified',
  704. fn: function (package, aStream) {
  705. var self=this;
  706. var name=nil;
  707. var map=nil;
  708. (name=smalltalk.send(package, "_name", []));
  709. smalltalk.send(smalltalk.send((smalltalk.Package || Package), "_sortedClasses_", [smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_classes", [])]), "_do_", [(function(each){return smalltalk.send([each,smalltalk.send(each, "_class", [])], "_do_", [(function(aClass){(map=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []));smalltalk.send(aClass, "_protocolsDo_", [(function(category, methods){return ((($receiver = smalltalk.send(category, "_match_", [smalltalk.send("^\x5c*", "__comma", [name])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(map, "_at_put_", [category, methods]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(map, "_at_put_", [category, methods]);})]));})]);return smalltalk.send(smalltalk.send(smalltalk.send(map, "_keys", []), "_sorted_", [(function(a, b){return ((($receiver = a).klass === smalltalk.Number) ? $receiver <=b : smalltalk.send($receiver, "__lt_eq", [b]));})]), "_do_", [(function(category){var methods=nil;
  710. (methods=smalltalk.send(map, "_at_", [category]));return smalltalk.send(self, "_exportMethods_category_of_on_", [methods, category, aClass, aStream]);})]);})]);})]);
  711. return self;},
  712. args: ["package", "aStream"],
  713. 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 ]]]",
  714. messageSends: ["name", "do:", "sortedClasses:", "classes", "current", "class", "new", "protocolsDo:", "ifTrue:", "match:", ",", "at:put:", "sorted:", "keys", "<=", "at:", "exportMethods:category:of:on:"],
  715. referencedClasses: ["Package", "Smalltalk", "Dictionary"]
  716. }),
  717. smalltalk.ChunkExporter);
  718. smalltalk.addClass('StrippedExporter', smalltalk.Exporter, [], 'Compiler');
  719. smalltalk.addMethod(
  720. "_exportDefinitionOf_on_",
  721. smalltalk.method({
  722. selector: "exportDefinitionOf:on:",
  723. category: 'private',
  724. fn: function (aClass, aStream) {
  725. var self=this;
  726. (function($rec){smalltalk.send($rec, "_nextPutAll_", ["smalltalk.addClass("]);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("'", "__comma", [smalltalk.send(self, "_classNameFor_", [aClass])]), "__comma", ["', "])]);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send("smalltalk.", "__comma", [smalltalk.send(self, "_classNameFor_", [smalltalk.send(aClass, "_superclass", [])])])]);return smalltalk.send($rec, "_nextPutAll_", [", ["]);})(aStream);
  727. smalltalk.send(smalltalk.send(aClass, "_instanceVariableNames", []), "_do_separatedBy_", [(function(each){return smalltalk.send(aStream, "_nextPutAll_", [smalltalk.send(smalltalk.send("'", "__comma", [each]), "__comma", ["'"])]);}), (function(){return smalltalk.send(aStream, "_nextPutAll_", [", "]);})]);
  728. (function($rec){smalltalk.send($rec, "_nextPutAll_", ["], '"]);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(aClass, "_category", []), "__comma", ["'"])]);return smalltalk.send($rec, "_nextPutAll_", [");"]);})(aStream);
  729. smalltalk.send(aStream, "_lf", []);
  730. return self;},
  731. args: ["aClass", "aStream"],
  732. 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",
  733. messageSends: ["nextPutAll:", ",", "classNameFor:", "superclass", "do:separatedBy:", "instanceVariableNames", "category", "lf"],
  734. referencedClasses: []
  735. }),
  736. smalltalk.StrippedExporter);
  737. smalltalk.addMethod(
  738. "_exportMethod_of_on_",
  739. smalltalk.method({
  740. selector: "exportMethod:of:on:",
  741. category: 'private',
  742. fn: function (aMethod, aClass, aStream) {
  743. var self=this;
  744. (function($rec){smalltalk.send($rec, "_nextPutAll_", ["smalltalk.addMethod("]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aMethod, "_selector", []), "_asSelector", []), "_asJavascript", []), "__comma", [","])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", ["smalltalk.method({"]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("selector: ", "__comma", [smalltalk.send(smalltalk.send(aMethod, "_selector", []), "_asJavascript", [])]), "__comma", [","])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send("fn: ", "__comma", [smalltalk.send(smalltalk.send(aMethod, "_fn", []), "_compiledSource", [])])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", ["}),"]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send("smalltalk.", "__comma", [smalltalk.send(self, "_classNameFor_", [aClass])])]);smalltalk.send($rec, "_nextPutAll_", [");"]);smalltalk.send($rec, "_lf", []);return smalltalk.send($rec, "_lf", []);})(aStream);
  745. return self;},
  746. args: ["aMethod", "aClass", "aStream"],
  747. 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",
  748. messageSends: ["nextPutAll:", "lf", ",", "asJavascript", "asSelector", "selector", "compiledSource", "fn", "classNameFor:"],
  749. referencedClasses: []
  750. }),
  751. smalltalk.StrippedExporter);
  752. smalltalk.addClass('Importer', smalltalk.Object, [], 'Compiler');
  753. smalltalk.addMethod(
  754. "_import_",
  755. smalltalk.method({
  756. selector: "import:",
  757. category: 'fileIn',
  758. fn: function (aStream) {
  759. var self=this;
  760. var chunk=nil;
  761. var result=nil;
  762. var parser=nil;
  763. var lastEmpty=nil;
  764. (parser=smalltalk.send((smalltalk.ChunkParser || ChunkParser), "_on_", [aStream]));
  765. (lastEmpty=false);
  766. (function(){while(!(function(){(chunk=smalltalk.send(parser, "_nextChunk", []));return smalltalk.send(chunk, "_isNil", []);})()) {(function(){return ((($receiver = smalltalk.send(chunk, "_isEmpty", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (lastEmpty=true);})() : (function(){(result=smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_evaluateExpression_", [chunk]));return ((($receiver = lastEmpty).klass === smalltalk.Boolean) ? ($receiver ? (function(){(lastEmpty=false);return smalltalk.send(result, "_scanFrom_", [parser]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){(lastEmpty=false);return smalltalk.send(result, "_scanFrom_", [parser]);})]));})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return (lastEmpty=true);}), (function(){(result=smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_evaluateExpression_", [chunk]));return ((($receiver = lastEmpty).klass === smalltalk.Boolean) ? ($receiver ? (function(){(lastEmpty=false);return smalltalk.send(result, "_scanFrom_", [parser]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){(lastEmpty=false);return smalltalk.send(result, "_scanFrom_", [parser]);})]));})]));})()}})();
  767. return self;},
  768. args: ["aStream"],
  769. 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]]]",
  770. messageSends: ["on:", "whileFalse:", "nextChunk", "isNil", "ifTrue:ifFalse:", "isEmpty", "evaluateExpression:", "new", "ifTrue:", "scanFrom:"],
  771. referencedClasses: ["ChunkParser", "Compiler"]
  772. }),
  773. smalltalk.Importer);
  774. smalltalk.addClass('Node', smalltalk.Object, ['nodes'], 'Compiler');
  775. smalltalk.addMethod(
  776. "_accept_",
  777. smalltalk.method({
  778. selector: "accept:",
  779. category: 'visiting',
  780. fn: function (aVisitor) {
  781. var self=this;
  782. smalltalk.send(aVisitor, "_visitNode_", [self]);
  783. return self;},
  784. args: ["aVisitor"],
  785. source: "accept: aVisitor\x0a\x09aVisitor visitNode: self",
  786. messageSends: ["visitNode:"],
  787. referencedClasses: []
  788. }),
  789. smalltalk.Node);
  790. smalltalk.addMethod(
  791. "_addNode_",
  792. smalltalk.method({
  793. selector: "addNode:",
  794. category: 'accessing',
  795. fn: function (aNode) {
  796. var self=this;
  797. smalltalk.send(smalltalk.send(self, "_nodes", []), "_add_", [aNode]);
  798. return self;},
  799. args: ["aNode"],
  800. source: "addNode: aNode\x0a\x09self nodes add: aNode",
  801. messageSends: ["add:", "nodes"],
  802. referencedClasses: []
  803. }),
  804. smalltalk.Node);
  805. smalltalk.addMethod(
  806. "_isBlockNode",
  807. smalltalk.method({
  808. selector: "isBlockNode",
  809. category: 'testing',
  810. fn: function () {
  811. var self=this;
  812. return false;
  813. return self;},
  814. args: [],
  815. source: "isBlockNode\x0a\x09^false",
  816. messageSends: [],
  817. referencedClasses: []
  818. }),
  819. smalltalk.Node);
  820. smalltalk.addMethod(
  821. "_isBlockSequenceNode",
  822. smalltalk.method({
  823. selector: "isBlockSequenceNode",
  824. category: 'testing',
  825. fn: function () {
  826. var self=this;
  827. return false;
  828. return self;},
  829. args: [],
  830. source: "isBlockSequenceNode\x0a\x09^false",
  831. messageSends: [],
  832. referencedClasses: []
  833. }),
  834. smalltalk.Node);
  835. smalltalk.addMethod(
  836. "_isValueNode",
  837. smalltalk.method({
  838. selector: "isValueNode",
  839. category: 'testing',
  840. fn: function () {
  841. var self=this;
  842. return false;
  843. return self;},
  844. args: [],
  845. source: "isValueNode\x0a\x09^false",
  846. messageSends: [],
  847. referencedClasses: []
  848. }),
  849. smalltalk.Node);
  850. smalltalk.addMethod(
  851. "_nodes",
  852. smalltalk.method({
  853. selector: "nodes",
  854. category: 'accessing',
  855. fn: function () {
  856. var self=this;
  857. return (($receiver = self['@nodes']) == nil || $receiver == undefined) ? (function(){return (self['@nodes']=smalltalk.send((smalltalk.Array || Array), "_new", []));})() : $receiver;
  858. return self;},
  859. args: [],
  860. source: "nodes\x0a\x09^nodes ifNil: [nodes := Array new]",
  861. messageSends: ["ifNil:", "new"],
  862. referencedClasses: ["Array"]
  863. }),
  864. smalltalk.Node);
  865. smalltalk.addMethod(
  866. "_nodes_",
  867. smalltalk.method({
  868. selector: "nodes:",
  869. category: 'building',
  870. fn: function (aCollection) {
  871. var self=this;
  872. (self['@nodes']=aCollection);
  873. return self;},
  874. args: ["aCollection"],
  875. source: "nodes: aCollection\x0a\x09nodes := aCollection",
  876. messageSends: [],
  877. referencedClasses: []
  878. }),
  879. smalltalk.Node);
  880. smalltalk.addClass('AssignmentNode', smalltalk.Node, ['left', 'right'], 'Compiler');
  881. smalltalk.addMethod(
  882. "_accept_",
  883. smalltalk.method({
  884. selector: "accept:",
  885. category: 'visiting',
  886. fn: function (aVisitor) {
  887. var self=this;
  888. smalltalk.send(aVisitor, "_visitAssignmentNode_", [self]);
  889. return self;},
  890. args: ["aVisitor"],
  891. source: "accept: aVisitor\x0a\x09aVisitor visitAssignmentNode: self",
  892. messageSends: ["visitAssignmentNode:"],
  893. referencedClasses: []
  894. }),
  895. smalltalk.AssignmentNode);
  896. smalltalk.addMethod(
  897. "_left",
  898. smalltalk.method({
  899. selector: "left",
  900. category: 'accessing',
  901. fn: function () {
  902. var self=this;
  903. return self['@left'];
  904. return self;},
  905. args: [],
  906. source: "left\x0a\x09^left",
  907. messageSends: [],
  908. referencedClasses: []
  909. }),
  910. smalltalk.AssignmentNode);
  911. smalltalk.addMethod(
  912. "_left_",
  913. smalltalk.method({
  914. selector: "left:",
  915. category: 'accessing',
  916. fn: function (aNode) {
  917. var self=this;
  918. (self['@left']=aNode);
  919. smalltalk.send(self['@left'], "_assigned_", [true]);
  920. return self;},
  921. args: ["aNode"],
  922. source: "left: aNode\x0a\x09left := aNode.\x0a\x09left assigned: true",
  923. messageSends: ["assigned:"],
  924. referencedClasses: []
  925. }),
  926. smalltalk.AssignmentNode);
  927. smalltalk.addMethod(
  928. "_right",
  929. smalltalk.method({
  930. selector: "right",
  931. category: 'accessing',
  932. fn: function () {
  933. var self=this;
  934. return self['@right'];
  935. return self;},
  936. args: [],
  937. source: "right\x0a\x09^right",
  938. messageSends: [],
  939. referencedClasses: []
  940. }),
  941. smalltalk.AssignmentNode);
  942. smalltalk.addMethod(
  943. "_right_",
  944. smalltalk.method({
  945. selector: "right:",
  946. category: 'accessing',
  947. fn: function (aNode) {
  948. var self=this;
  949. (self['@right']=aNode);
  950. return self;},
  951. args: ["aNode"],
  952. source: "right: aNode\x0a\x09right := aNode",
  953. messageSends: [],
  954. referencedClasses: []
  955. }),
  956. smalltalk.AssignmentNode);
  957. smalltalk.addClass('BlockNode', smalltalk.Node, ['parameters', 'inlined'], 'Compiler');
  958. smalltalk.addMethod(
  959. "_accept_",
  960. smalltalk.method({
  961. selector: "accept:",
  962. category: 'visiting',
  963. fn: function (aVisitor) {
  964. var self=this;
  965. smalltalk.send(aVisitor, "_visitBlockNode_", [self]);
  966. return self;},
  967. args: ["aVisitor"],
  968. source: "accept: aVisitor\x0a\x09aVisitor visitBlockNode: self",
  969. messageSends: ["visitBlockNode:"],
  970. referencedClasses: []
  971. }),
  972. smalltalk.BlockNode);
  973. smalltalk.addMethod(
  974. "_inlined",
  975. smalltalk.method({
  976. selector: "inlined",
  977. category: 'accessing',
  978. fn: function () {
  979. var self=this;
  980. return (($receiver = self['@inlined']) == nil || $receiver == undefined) ? (function(){return false;})() : $receiver;
  981. return self;},
  982. args: [],
  983. source: "inlined\x0a\x09^inlined ifNil: [false]",
  984. messageSends: ["ifNil:"],
  985. referencedClasses: []
  986. }),
  987. smalltalk.BlockNode);
  988. smalltalk.addMethod(
  989. "_inlined_",
  990. smalltalk.method({
  991. selector: "inlined:",
  992. category: 'accessing',
  993. fn: function (aBoolean) {
  994. var self=this;
  995. (self['@inlined']=aBoolean);
  996. return self;},
  997. args: ["aBoolean"],
  998. source: "inlined: aBoolean\x0a\x09inlined := aBoolean",
  999. messageSends: [],
  1000. referencedClasses: []
  1001. }),
  1002. smalltalk.BlockNode);
  1003. smalltalk.addMethod(
  1004. "_isBlockNode",
  1005. smalltalk.method({
  1006. selector: "isBlockNode",
  1007. category: 'testing',
  1008. fn: function () {
  1009. var self=this;
  1010. return true;
  1011. return self;},
  1012. args: [],
  1013. source: "isBlockNode\x0a\x09^true",
  1014. messageSends: [],
  1015. referencedClasses: []
  1016. }),
  1017. smalltalk.BlockNode);
  1018. smalltalk.addMethod(
  1019. "_parameters",
  1020. smalltalk.method({
  1021. selector: "parameters",
  1022. category: 'accessing',
  1023. fn: function () {
  1024. var self=this;
  1025. return (($receiver = self['@parameters']) == nil || $receiver == undefined) ? (function(){return (self['@parameters']=smalltalk.send((smalltalk.Array || Array), "_new", []));})() : $receiver;
  1026. return self;},
  1027. args: [],
  1028. source: "parameters\x0a\x09^parameters ifNil: [parameters := Array new]",
  1029. messageSends: ["ifNil:", "new"],
  1030. referencedClasses: ["Array"]
  1031. }),
  1032. smalltalk.BlockNode);
  1033. smalltalk.addMethod(
  1034. "_parameters_",
  1035. smalltalk.method({
  1036. selector: "parameters:",
  1037. category: 'accessing',
  1038. fn: function (aCollection) {
  1039. var self=this;
  1040. (self['@parameters']=aCollection);
  1041. return self;},
  1042. args: ["aCollection"],
  1043. source: "parameters: aCollection\x0a\x09parameters := aCollection",
  1044. messageSends: [],
  1045. referencedClasses: []
  1046. }),
  1047. smalltalk.BlockNode);
  1048. smalltalk.addClass('CascadeNode', smalltalk.Node, ['receiver'], 'Compiler');
  1049. smalltalk.addMethod(
  1050. "_accept_",
  1051. smalltalk.method({
  1052. selector: "accept:",
  1053. category: 'visiting',
  1054. fn: function (aVisitor) {
  1055. var self=this;
  1056. smalltalk.send(aVisitor, "_visitCascadeNode_", [self]);
  1057. return self;},
  1058. args: ["aVisitor"],
  1059. source: "accept: aVisitor\x0a\x09aVisitor visitCascadeNode: self",
  1060. messageSends: ["visitCascadeNode:"],
  1061. referencedClasses: []
  1062. }),
  1063. smalltalk.CascadeNode);
  1064. smalltalk.addMethod(
  1065. "_receiver",
  1066. smalltalk.method({
  1067. selector: "receiver",
  1068. category: 'accessing',
  1069. fn: function () {
  1070. var self=this;
  1071. return self['@receiver'];
  1072. return self;},
  1073. args: [],
  1074. source: "receiver\x0a\x09^receiver",
  1075. messageSends: [],
  1076. referencedClasses: []
  1077. }),
  1078. smalltalk.CascadeNode);
  1079. smalltalk.addMethod(
  1080. "_receiver_",
  1081. smalltalk.method({
  1082. selector: "receiver:",
  1083. category: 'accessing',
  1084. fn: function (aNode) {
  1085. var self=this;
  1086. (self['@receiver']=aNode);
  1087. return self;},
  1088. args: ["aNode"],
  1089. source: "receiver: aNode\x0a\x09receiver := aNode",
  1090. messageSends: [],
  1091. referencedClasses: []
  1092. }),
  1093. smalltalk.CascadeNode);
  1094. smalltalk.addClass('DynamicArrayNode', smalltalk.Node, [], 'Compiler');
  1095. smalltalk.addMethod(
  1096. "_accept_",
  1097. smalltalk.method({
  1098. selector: "accept:",
  1099. category: 'visiting',
  1100. fn: function (aVisitor) {
  1101. var self=this;
  1102. smalltalk.send(aVisitor, "_visitDynamicArrayNode_", [self]);
  1103. return self;},
  1104. args: ["aVisitor"],
  1105. source: "accept: aVisitor\x0a\x09aVisitor visitDynamicArrayNode: self",
  1106. messageSends: ["visitDynamicArrayNode:"],
  1107. referencedClasses: []
  1108. }),
  1109. smalltalk.DynamicArrayNode);
  1110. smalltalk.addClass('DynamicDictionaryNode', smalltalk.Node, [], 'Compiler');
  1111. smalltalk.addMethod(
  1112. "_accept_",
  1113. smalltalk.method({
  1114. selector: "accept:",
  1115. category: 'visiting',
  1116. fn: function (aVisitor) {
  1117. var self=this;
  1118. smalltalk.send(aVisitor, "_visitDynamicDictionaryNode_", [self]);
  1119. return self;},
  1120. args: ["aVisitor"],
  1121. source: "accept: aVisitor\x0a\x09aVisitor visitDynamicDictionaryNode: self",
  1122. messageSends: ["visitDynamicDictionaryNode:"],
  1123. referencedClasses: []
  1124. }),
  1125. smalltalk.DynamicDictionaryNode);
  1126. smalltalk.addClass('JSStatementNode', smalltalk.Node, ['source'], 'Compiler');
  1127. smalltalk.addMethod(
  1128. "_accept_",
  1129. smalltalk.method({
  1130. selector: "accept:",
  1131. category: 'visiting',
  1132. fn: function (aVisitor) {
  1133. var self=this;
  1134. smalltalk.send(aVisitor, "_visitJSStatementNode_", [self]);
  1135. return self;},
  1136. args: ["aVisitor"],
  1137. source: "accept: aVisitor\x0a\x09aVisitor visitJSStatementNode: self",
  1138. messageSends: ["visitJSStatementNode:"],
  1139. referencedClasses: []
  1140. }),
  1141. smalltalk.JSStatementNode);
  1142. smalltalk.addMethod(
  1143. "_source",
  1144. smalltalk.method({
  1145. selector: "source",
  1146. category: 'accessing',
  1147. fn: function () {
  1148. var self=this;
  1149. return (($receiver = self['@source']) == nil || $receiver == undefined) ? (function(){return "";})() : $receiver;
  1150. return self;},
  1151. args: [],
  1152. source: "source\x0a\x09^source ifNil: ['']",
  1153. messageSends: ["ifNil:"],
  1154. referencedClasses: []
  1155. }),
  1156. smalltalk.JSStatementNode);
  1157. smalltalk.addMethod(
  1158. "_source_",
  1159. smalltalk.method({
  1160. selector: "source:",
  1161. category: 'accessing',
  1162. fn: function (aString) {
  1163. var self=this;
  1164. (self['@source']=aString);
  1165. return self;},
  1166. args: ["aString"],
  1167. source: "source: aString\x0a\x09source := aString",
  1168. messageSends: [],
  1169. referencedClasses: []
  1170. }),
  1171. smalltalk.JSStatementNode);
  1172. smalltalk.addClass('MethodNode', smalltalk.Node, ['selector', 'arguments', 'source'], 'Compiler');
  1173. smalltalk.addMethod(
  1174. "_accept_",
  1175. smalltalk.method({
  1176. selector: "accept:",
  1177. category: 'visiting',
  1178. fn: function (aVisitor) {
  1179. var self=this;
  1180. smalltalk.send(aVisitor, "_visitMethodNode_", [self]);
  1181. return self;},
  1182. args: ["aVisitor"],
  1183. source: "accept: aVisitor\x0a\x09aVisitor visitMethodNode: self",
  1184. messageSends: ["visitMethodNode:"],
  1185. referencedClasses: []
  1186. }),
  1187. smalltalk.MethodNode);
  1188. smalltalk.addMethod(
  1189. "_arguments",
  1190. smalltalk.method({
  1191. selector: "arguments",
  1192. category: 'accessing',
  1193. fn: function () {
  1194. var self=this;
  1195. return (($receiver = self['@arguments']) == nil || $receiver == undefined) ? (function(){return [];})() : $receiver;
  1196. return self;},
  1197. args: [],
  1198. source: "arguments\x0a\x09^arguments ifNil: [#()]",
  1199. messageSends: ["ifNil:"],
  1200. referencedClasses: []
  1201. }),
  1202. smalltalk.MethodNode);
  1203. smalltalk.addMethod(
  1204. "_arguments_",
  1205. smalltalk.method({
  1206. selector: "arguments:",
  1207. category: 'accessing',
  1208. fn: function (aCollection) {
  1209. var self=this;
  1210. (self['@arguments']=aCollection);
  1211. return self;},
  1212. args: ["aCollection"],
  1213. source: "arguments: aCollection\x0a\x09arguments := aCollection",
  1214. messageSends: [],
  1215. referencedClasses: []
  1216. }),
  1217. smalltalk.MethodNode);
  1218. smalltalk.addMethod(
  1219. "_selector",
  1220. smalltalk.method({
  1221. selector: "selector",
  1222. category: 'accessing',
  1223. fn: function () {
  1224. var self=this;
  1225. return self['@selector'];
  1226. return self;},
  1227. args: [],
  1228. source: "selector\x0a\x09^selector",
  1229. messageSends: [],
  1230. referencedClasses: []
  1231. }),
  1232. smalltalk.MethodNode);
  1233. smalltalk.addMethod(
  1234. "_selector_",
  1235. smalltalk.method({
  1236. selector: "selector:",
  1237. category: 'accessing',
  1238. fn: function (aString) {
  1239. var self=this;
  1240. (self['@selector']=aString);
  1241. return self;},
  1242. args: ["aString"],
  1243. source: "selector: aString\x0a\x09selector := aString",
  1244. messageSends: [],
  1245. referencedClasses: []
  1246. }),
  1247. smalltalk.MethodNode);
  1248. smalltalk.addMethod(
  1249. "_source",
  1250. smalltalk.method({
  1251. selector: "source",
  1252. category: 'accessing',
  1253. fn: function () {
  1254. var self=this;
  1255. return self['@source'];
  1256. return self;},
  1257. args: [],
  1258. source: "source\x0a\x09^source",
  1259. messageSends: [],
  1260. referencedClasses: []
  1261. }),
  1262. smalltalk.MethodNode);
  1263. smalltalk.addMethod(
  1264. "_source_",
  1265. smalltalk.method({
  1266. selector: "source:",
  1267. category: 'accessing',
  1268. fn: function (aString) {
  1269. var self=this;
  1270. (self['@source']=aString);
  1271. return self;},
  1272. args: ["aString"],
  1273. source: "source: aString\x0a\x09source := aString",
  1274. messageSends: [],
  1275. referencedClasses: []
  1276. }),
  1277. smalltalk.MethodNode);
  1278. smalltalk.addClass('ReturnNode', smalltalk.Node, [], 'Compiler');
  1279. smalltalk.addMethod(
  1280. "_accept_",
  1281. smalltalk.method({
  1282. selector: "accept:",
  1283. category: 'visiting',
  1284. fn: function (aVisitor) {
  1285. var self=this;
  1286. smalltalk.send(aVisitor, "_visitReturnNode_", [self]);
  1287. return self;},
  1288. args: ["aVisitor"],
  1289. source: "accept: aVisitor\x0a\x09aVisitor visitReturnNode: self",
  1290. messageSends: ["visitReturnNode:"],
  1291. referencedClasses: []
  1292. }),
  1293. smalltalk.ReturnNode);
  1294. smalltalk.addClass('SendNode', smalltalk.Node, ['selector', 'arguments', 'receiver'], 'Compiler');
  1295. smalltalk.addMethod(
  1296. "_accept_",
  1297. smalltalk.method({
  1298. selector: "accept:",
  1299. category: 'visiting',
  1300. fn: function (aVisitor) {
  1301. var self=this;
  1302. smalltalk.send(aVisitor, "_visitSendNode_", [self]);
  1303. return self;},
  1304. args: ["aVisitor"],
  1305. source: "accept: aVisitor\x0a\x09aVisitor visitSendNode: self",
  1306. messageSends: ["visitSendNode:"],
  1307. referencedClasses: []
  1308. }),
  1309. smalltalk.SendNode);
  1310. smalltalk.addMethod(
  1311. "_arguments",
  1312. smalltalk.method({
  1313. selector: "arguments",
  1314. category: 'accessing',
  1315. fn: function () {
  1316. var self=this;
  1317. return (($receiver = self['@arguments']) == nil || $receiver == undefined) ? (function(){return (self['@arguments']=[]);})() : $receiver;
  1318. return self;},
  1319. args: [],
  1320. source: "arguments\x0a\x09^arguments ifNil: [arguments := #()]",
  1321. messageSends: ["ifNil:"],
  1322. referencedClasses: []
  1323. }),
  1324. smalltalk.SendNode);
  1325. smalltalk.addMethod(
  1326. "_arguments_",
  1327. smalltalk.method({
  1328. selector: "arguments:",
  1329. category: 'accessing',
  1330. fn: function (aCollection) {
  1331. var self=this;
  1332. (self['@arguments']=aCollection);
  1333. return self;},
  1334. args: ["aCollection"],
  1335. source: "arguments: aCollection\x0a\x09arguments := aCollection",
  1336. messageSends: [],
  1337. referencedClasses: []
  1338. }),
  1339. smalltalk.SendNode);
  1340. smalltalk.addMethod(
  1341. "_cascadeNodeWithMessages_",
  1342. smalltalk.method({
  1343. selector: "cascadeNodeWithMessages:",
  1344. category: 'accessing',
  1345. fn: function (aCollection) {
  1346. var self=this;
  1347. var first=nil;
  1348. (first=(function($rec){smalltalk.send($rec, "_selector_", [smalltalk.send(self, "_selector", [])]);smalltalk.send($rec, "_arguments_", [smalltalk.send(self, "_arguments", [])]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.SendNode || SendNode), "_new", [])));
  1349. return (function($rec){smalltalk.send($rec, "_receiver_", [smalltalk.send(self, "_receiver", [])]);smalltalk.send($rec, "_nodes_", [smalltalk.send(smalltalk.send((smalltalk.Array || Array), "_with_", [first]), "__comma", [aCollection])]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.CascadeNode || CascadeNode), "_new", []));
  1350. return self;},
  1351. args: ["aCollection"],
  1352. 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",
  1353. messageSends: ["selector:", "selector", "arguments:", "arguments", "yourself", "new", "receiver:", "receiver", "nodes:", ",", "with:"],
  1354. referencedClasses: ["SendNode", "Array", "CascadeNode"]
  1355. }),
  1356. smalltalk.SendNode);
  1357. smalltalk.addMethod(
  1358. "_receiver",
  1359. smalltalk.method({
  1360. selector: "receiver",
  1361. category: 'accessing',
  1362. fn: function () {
  1363. var self=this;
  1364. return self['@receiver'];
  1365. return self;},
  1366. args: [],
  1367. source: "receiver\x0a\x09^receiver",
  1368. messageSends: [],
  1369. referencedClasses: []
  1370. }),
  1371. smalltalk.SendNode);
  1372. smalltalk.addMethod(
  1373. "_receiver_",
  1374. smalltalk.method({
  1375. selector: "receiver:",
  1376. category: 'accessing',
  1377. fn: function (aNode) {
  1378. var self=this;
  1379. (self['@receiver']=aNode);
  1380. return self;},
  1381. args: ["aNode"],
  1382. source: "receiver: aNode\x0a\x09receiver := aNode",
  1383. messageSends: [],
  1384. referencedClasses: []
  1385. }),
  1386. smalltalk.SendNode);
  1387. smalltalk.addMethod(
  1388. "_selector",
  1389. smalltalk.method({
  1390. selector: "selector",
  1391. category: 'accessing',
  1392. fn: function () {
  1393. var self=this;
  1394. return self['@selector'];
  1395. return self;},
  1396. args: [],
  1397. source: "selector\x0a\x09^selector",
  1398. messageSends: [],
  1399. referencedClasses: []
  1400. }),
  1401. smalltalk.SendNode);
  1402. smalltalk.addMethod(
  1403. "_selector_",
  1404. smalltalk.method({
  1405. selector: "selector:",
  1406. category: 'accessing',
  1407. fn: function (aString) {
  1408. var self=this;
  1409. (self['@selector']=aString);
  1410. return self;},
  1411. args: ["aString"],
  1412. source: "selector: aString\x0a\x09selector := aString",
  1413. messageSends: [],
  1414. referencedClasses: []
  1415. }),
  1416. smalltalk.SendNode);
  1417. smalltalk.addMethod(
  1418. "_valueForReceiver_",
  1419. smalltalk.method({
  1420. selector: "valueForReceiver:",
  1421. category: 'accessing',
  1422. fn: function (anObject) {
  1423. var self=this;
  1424. return (function($rec){smalltalk.send($rec, "_receiver_", [(($receiver = smalltalk.send(self, "_receiver", [])) == nil || $receiver == undefined) ? (function(){return anObject;})() : (function(){return smalltalk.send(smalltalk.send(self, "_receiver", []), "_valueForReceiver_", [anObject]);})()]);smalltalk.send($rec, "_selector_", [smalltalk.send(self, "_selector", [])]);smalltalk.send($rec, "_arguments_", [smalltalk.send(self, "_arguments", [])]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.SendNode || SendNode), "_new", []));
  1425. return self;},
  1426. args: ["anObject"],
  1427. 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",
  1428. messageSends: ["receiver:", "ifNil:ifNotNil:", "receiver", "valueForReceiver:", "selector:", "selector", "arguments:", "arguments", "yourself", "new"],
  1429. referencedClasses: ["SendNode"]
  1430. }),
  1431. smalltalk.SendNode);
  1432. smalltalk.addClass('SequenceNode', smalltalk.Node, ['temps'], 'Compiler');
  1433. smalltalk.addMethod(
  1434. "_accept_",
  1435. smalltalk.method({
  1436. selector: "accept:",
  1437. category: 'visiting',
  1438. fn: function (aVisitor) {
  1439. var self=this;
  1440. smalltalk.send(aVisitor, "_visitSequenceNode_", [self]);
  1441. return self;},
  1442. args: ["aVisitor"],
  1443. source: "accept: aVisitor\x0a\x09aVisitor visitSequenceNode: self",
  1444. messageSends: ["visitSequenceNode:"],
  1445. referencedClasses: []
  1446. }),
  1447. smalltalk.SequenceNode);
  1448. smalltalk.addMethod(
  1449. "_asBlockSequenceNode",
  1450. smalltalk.method({
  1451. selector: "asBlockSequenceNode",
  1452. category: 'testing',
  1453. fn: function () {
  1454. var self=this;
  1455. return (function($rec){smalltalk.send($rec, "_nodes_", [smalltalk.send(self, "_nodes", [])]);smalltalk.send($rec, "_temps_", [smalltalk.send(self, "_temps", [])]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.BlockSequenceNode || BlockSequenceNode), "_new", []));
  1456. return self;},
  1457. args: [],
  1458. source: "asBlockSequenceNode\x0a\x09^BlockSequenceNode new\x0a\x09 nodes: self nodes;\x0a\x09 temps: self temps;\x0a\x09 yourself",
  1459. messageSends: ["nodes:", "nodes", "temps:", "temps", "yourself", "new"],
  1460. referencedClasses: ["BlockSequenceNode"]
  1461. }),
  1462. smalltalk.SequenceNode);
  1463. smalltalk.addMethod(
  1464. "_temps",
  1465. smalltalk.method({
  1466. selector: "temps",
  1467. category: 'accessing',
  1468. fn: function () {
  1469. var self=this;
  1470. return (($receiver = self['@temps']) == nil || $receiver == undefined) ? (function(){return [];})() : $receiver;
  1471. return self;},
  1472. args: [],
  1473. source: "temps\x0a\x09^temps ifNil: [#()]",
  1474. messageSends: ["ifNil:"],
  1475. referencedClasses: []
  1476. }),
  1477. smalltalk.SequenceNode);
  1478. smalltalk.addMethod(
  1479. "_temps_",
  1480. smalltalk.method({
  1481. selector: "temps:",
  1482. category: 'accessing',
  1483. fn: function (aCollection) {
  1484. var self=this;
  1485. (self['@temps']=aCollection);
  1486. return self;},
  1487. args: ["aCollection"],
  1488. source: "temps: aCollection\x0a\x09temps := aCollection",
  1489. messageSends: [],
  1490. referencedClasses: []
  1491. }),
  1492. smalltalk.SequenceNode);
  1493. smalltalk.addClass('BlockSequenceNode', smalltalk.SequenceNode, [], 'Compiler');
  1494. smalltalk.addMethod(
  1495. "_accept_",
  1496. smalltalk.method({
  1497. selector: "accept:",
  1498. category: 'visiting',
  1499. fn: function (aVisitor) {
  1500. var self=this;
  1501. smalltalk.send(aVisitor, "_visitBlockSequenceNode_", [self]);
  1502. return self;},
  1503. args: ["aVisitor"],
  1504. source: "accept: aVisitor\x0a\x09aVisitor visitBlockSequenceNode: self",
  1505. messageSends: ["visitBlockSequenceNode:"],
  1506. referencedClasses: []
  1507. }),
  1508. smalltalk.BlockSequenceNode);
  1509. smalltalk.addMethod(
  1510. "_isBlockSequenceNode",
  1511. smalltalk.method({
  1512. selector: "isBlockSequenceNode",
  1513. category: 'testing',
  1514. fn: function () {
  1515. var self=this;
  1516. return true;
  1517. return self;},
  1518. args: [],
  1519. source: "isBlockSequenceNode\x0a\x09^true",
  1520. messageSends: [],
  1521. referencedClasses: []
  1522. }),
  1523. smalltalk.BlockSequenceNode);
  1524. smalltalk.addClass('ValueNode', smalltalk.Node, ['value'], 'Compiler');
  1525. smalltalk.addMethod(
  1526. "_accept_",
  1527. smalltalk.method({
  1528. selector: "accept:",
  1529. category: 'visiting',
  1530. fn: function (aVisitor) {
  1531. var self=this;
  1532. smalltalk.send(aVisitor, "_visitValueNode_", [self]);
  1533. return self;},
  1534. args: ["aVisitor"],
  1535. source: "accept: aVisitor\x0a\x09aVisitor visitValueNode: self",
  1536. messageSends: ["visitValueNode:"],
  1537. referencedClasses: []
  1538. }),
  1539. smalltalk.ValueNode);
  1540. smalltalk.addMethod(
  1541. "_isValueNode",
  1542. smalltalk.method({
  1543. selector: "isValueNode",
  1544. category: 'testing',
  1545. fn: function () {
  1546. var self=this;
  1547. return true;
  1548. return self;},
  1549. args: [],
  1550. source: "isValueNode\x0a\x09^true",
  1551. messageSends: [],
  1552. referencedClasses: []
  1553. }),
  1554. smalltalk.ValueNode);
  1555. smalltalk.addMethod(
  1556. "_value",
  1557. smalltalk.method({
  1558. selector: "value",
  1559. category: 'accessing',
  1560. fn: function () {
  1561. var self=this;
  1562. return self['@value'];
  1563. return self;},
  1564. args: [],
  1565. source: "value\x0a\x09^value",
  1566. messageSends: [],
  1567. referencedClasses: []
  1568. }),
  1569. smalltalk.ValueNode);
  1570. smalltalk.addMethod(
  1571. "_value_",
  1572. smalltalk.method({
  1573. selector: "value:",
  1574. category: 'accessing',
  1575. fn: function (anObject) {
  1576. var self=this;
  1577. (self['@value']=anObject);
  1578. return self;},
  1579. args: ["anObject"],
  1580. source: "value: anObject\x0a\x09value := anObject",
  1581. messageSends: [],
  1582. referencedClasses: []
  1583. }),
  1584. smalltalk.ValueNode);
  1585. smalltalk.addClass('VariableNode', smalltalk.ValueNode, ['assigned'], 'Compiler');
  1586. smalltalk.addMethod(
  1587. "_accept_",
  1588. smalltalk.method({
  1589. selector: "accept:",
  1590. category: 'visiting',
  1591. fn: function (aVisitor) {
  1592. var self=this;
  1593. smalltalk.send(aVisitor, "_visitVariableNode_", [self]);
  1594. return self;},
  1595. args: ["aVisitor"],
  1596. source: "accept: aVisitor\x0a\x09aVisitor visitVariableNode: self",
  1597. messageSends: ["visitVariableNode:"],
  1598. referencedClasses: []
  1599. }),
  1600. smalltalk.VariableNode);
  1601. smalltalk.addMethod(
  1602. "_assigned",
  1603. smalltalk.method({
  1604. selector: "assigned",
  1605. category: 'accessing',
  1606. fn: function () {
  1607. var self=this;
  1608. return (($receiver = self['@assigned']) == nil || $receiver == undefined) ? (function(){return false;})() : $receiver;
  1609. return self;},
  1610. args: [],
  1611. source: "assigned\x0a\x09^assigned ifNil: [false]",
  1612. messageSends: ["ifNil:"],
  1613. referencedClasses: []
  1614. }),
  1615. smalltalk.VariableNode);
  1616. smalltalk.addMethod(
  1617. "_assigned_",
  1618. smalltalk.method({
  1619. selector: "assigned:",
  1620. category: 'accessing',
  1621. fn: function (aBoolean) {
  1622. var self=this;
  1623. (self['@assigned']=aBoolean);
  1624. return self;},
  1625. args: ["aBoolean"],
  1626. source: "assigned: aBoolean\x0a\x09assigned := aBoolean",
  1627. messageSends: [],
  1628. referencedClasses: []
  1629. }),
  1630. smalltalk.VariableNode);
  1631. smalltalk.addClass('ClassReferenceNode', smalltalk.VariableNode, [], 'Compiler');
  1632. smalltalk.addMethod(
  1633. "_accept_",
  1634. smalltalk.method({
  1635. selector: "accept:",
  1636. category: 'visiting',
  1637. fn: function (aVisitor) {
  1638. var self=this;
  1639. smalltalk.send(aVisitor, "_visitClassReferenceNode_", [self]);
  1640. return self;},
  1641. args: ["aVisitor"],
  1642. source: "accept: aVisitor\x0a\x09aVisitor visitClassReferenceNode: self",
  1643. messageSends: ["visitClassReferenceNode:"],
  1644. referencedClasses: []
  1645. }),
  1646. smalltalk.ClassReferenceNode);
  1647. smalltalk.addClass('VerbatimNode', smalltalk.Node, ['value'], 'Compiler');
  1648. smalltalk.addMethod(
  1649. "_accept_",
  1650. smalltalk.method({
  1651. selector: "accept:",
  1652. category: 'visiting',
  1653. fn: function (aVisitor) {
  1654. var self=this;
  1655. smalltalk.send(aVisitor, "_visitVerbatimNode_", [self]);
  1656. return self;},
  1657. args: ["aVisitor"],
  1658. source: "accept: aVisitor\x0a\x09aVisitor visitVerbatimNode: self",
  1659. messageSends: ["visitVerbatimNode:"],
  1660. referencedClasses: []
  1661. }),
  1662. smalltalk.VerbatimNode);
  1663. smalltalk.addMethod(
  1664. "_value",
  1665. smalltalk.method({
  1666. selector: "value",
  1667. category: 'accessing',
  1668. fn: function () {
  1669. var self=this;
  1670. return self['@value'];
  1671. return self;},
  1672. args: [],
  1673. source: "value\x0a\x09^value",
  1674. messageSends: [],
  1675. referencedClasses: []
  1676. }),
  1677. smalltalk.VerbatimNode);
  1678. smalltalk.addMethod(
  1679. "_value_",
  1680. smalltalk.method({
  1681. selector: "value:",
  1682. category: 'accessing',
  1683. fn: function (anObject) {
  1684. var self=this;
  1685. (self['@value']=anObject);
  1686. return self;},
  1687. args: ["anObject"],
  1688. source: "value: anObject\x0a\x09value := anObject",
  1689. messageSends: [],
  1690. referencedClasses: []
  1691. }),
  1692. smalltalk.VerbatimNode);
  1693. smalltalk.addClass('NodeVisitor', smalltalk.Object, [], 'Compiler');
  1694. smalltalk.addMethod(
  1695. "_visit_",
  1696. smalltalk.method({
  1697. selector: "visit:",
  1698. category: 'visiting',
  1699. fn: function (aNode) {
  1700. var self=this;
  1701. smalltalk.send(aNode, "_accept_", [self]);
  1702. return self;},
  1703. args: ["aNode"],
  1704. source: "visit: aNode\x0a\x09aNode accept: self",
  1705. messageSends: ["accept:"],
  1706. referencedClasses: []
  1707. }),
  1708. smalltalk.NodeVisitor);
  1709. smalltalk.addMethod(
  1710. "_visitAssignmentNode_",
  1711. smalltalk.method({
  1712. selector: "visitAssignmentNode:",
  1713. category: 'visiting',
  1714. fn: function (aNode) {
  1715. var self=this;
  1716. smalltalk.send(self, "_visitNode_", [aNode]);
  1717. return self;},
  1718. args: ["aNode"],
  1719. source: "visitAssignmentNode: aNode\x0a\x09self visitNode: aNode",
  1720. messageSends: ["visitNode:"],
  1721. referencedClasses: []
  1722. }),
  1723. smalltalk.NodeVisitor);
  1724. smalltalk.addMethod(
  1725. "_visitBlockNode_",
  1726. smalltalk.method({
  1727. selector: "visitBlockNode:",
  1728. category: 'visiting',
  1729. fn: function (aNode) {
  1730. var self=this;
  1731. smalltalk.send(self, "_visitNode_", [aNode]);
  1732. return self;},
  1733. args: ["aNode"],
  1734. source: "visitBlockNode: aNode\x0a\x09self visitNode: aNode",
  1735. messageSends: ["visitNode:"],
  1736. referencedClasses: []
  1737. }),
  1738. smalltalk.NodeVisitor);
  1739. smalltalk.addMethod(
  1740. "_visitBlockSequenceNode_",
  1741. smalltalk.method({
  1742. selector: "visitBlockSequenceNode:",
  1743. category: 'visiting',
  1744. fn: function (aNode) {
  1745. var self=this;
  1746. smalltalk.send(self, "_visitNode_", [aNode]);
  1747. return self;},
  1748. args: ["aNode"],
  1749. source: "visitBlockSequenceNode: aNode\x0a\x09self visitNode: aNode",
  1750. messageSends: ["visitNode:"],
  1751. referencedClasses: []
  1752. }),
  1753. smalltalk.NodeVisitor);
  1754. smalltalk.addMethod(
  1755. "_visitCascadeNode_",
  1756. smalltalk.method({
  1757. selector: "visitCascadeNode:",
  1758. category: 'visiting',
  1759. fn: function (aNode) {
  1760. var self=this;
  1761. smalltalk.send(self, "_visitNode_", [aNode]);
  1762. return self;},
  1763. args: ["aNode"],
  1764. source: "visitCascadeNode: aNode\x0a\x09self visitNode: aNode",
  1765. messageSends: ["visitNode:"],
  1766. referencedClasses: []
  1767. }),
  1768. smalltalk.NodeVisitor);
  1769. smalltalk.addMethod(
  1770. "_visitClassReferenceNode_",
  1771. smalltalk.method({
  1772. selector: "visitClassReferenceNode:",
  1773. category: 'visiting',
  1774. fn: function (aNode) {
  1775. var self=this;
  1776. smalltalk.send(self, "_visitNode_", [aNode]);
  1777. return self;},
  1778. args: ["aNode"],
  1779. source: "visitClassReferenceNode: aNode\x0a\x09self visitNode: aNode",
  1780. messageSends: ["visitNode:"],
  1781. referencedClasses: []
  1782. }),
  1783. smalltalk.NodeVisitor);
  1784. smalltalk.addMethod(
  1785. "_visitDynamicArrayNode_",
  1786. smalltalk.method({
  1787. selector: "visitDynamicArrayNode:",
  1788. category: 'visiting',
  1789. fn: function (aNode) {
  1790. var self=this;
  1791. smalltalk.send(self, "_visitNode_", [aNode]);
  1792. return self;},
  1793. args: ["aNode"],
  1794. source: "visitDynamicArrayNode: aNode\x0a\x09self visitNode: aNode",
  1795. messageSends: ["visitNode:"],
  1796. referencedClasses: []
  1797. }),
  1798. smalltalk.NodeVisitor);
  1799. smalltalk.addMethod(
  1800. "_visitDynamicDictionaryNode_",
  1801. smalltalk.method({
  1802. selector: "visitDynamicDictionaryNode:",
  1803. category: 'visiting',
  1804. fn: function (aNode) {
  1805. var self=this;
  1806. smalltalk.send(self, "_visitNode_", [aNode]);
  1807. return self;},
  1808. args: ["aNode"],
  1809. source: "visitDynamicDictionaryNode: aNode\x0a\x09self visitNode: aNode",
  1810. messageSends: ["visitNode:"],
  1811. referencedClasses: []
  1812. }),
  1813. smalltalk.NodeVisitor);
  1814. smalltalk.addMethod(
  1815. "_visitJSStatementNode_",
  1816. smalltalk.method({
  1817. selector: "visitJSStatementNode:",
  1818. category: 'visiting',
  1819. fn: function (aNode) {
  1820. var self=this;
  1821. smalltalk.send(self, "_visitNode_", [aNode]);
  1822. return self;},
  1823. args: ["aNode"],
  1824. source: "visitJSStatementNode: aNode\x0a\x09self visitNode: aNode",
  1825. messageSends: ["visitNode:"],
  1826. referencedClasses: []
  1827. }),
  1828. smalltalk.NodeVisitor);
  1829. smalltalk.addMethod(
  1830. "_visitMethodNode_",
  1831. smalltalk.method({
  1832. selector: "visitMethodNode:",
  1833. category: 'visiting',
  1834. fn: function (aNode) {
  1835. var self=this;
  1836. smalltalk.send(self, "_visitNode_", [aNode]);
  1837. return self;},
  1838. args: ["aNode"],
  1839. source: "visitMethodNode: aNode\x0a\x09self visitNode: aNode",
  1840. messageSends: ["visitNode:"],
  1841. referencedClasses: []
  1842. }),
  1843. smalltalk.NodeVisitor);
  1844. smalltalk.addMethod(
  1845. "_visitNode_",
  1846. smalltalk.method({
  1847. selector: "visitNode:",
  1848. category: 'visiting',
  1849. fn: function (aNode) {
  1850. var self=this;
  1851. return self;},
  1852. args: ["aNode"],
  1853. source: "visitNode: aNode",
  1854. messageSends: [],
  1855. referencedClasses: []
  1856. }),
  1857. smalltalk.NodeVisitor);
  1858. smalltalk.addMethod(
  1859. "_visitReturnNode_",
  1860. smalltalk.method({
  1861. selector: "visitReturnNode:",
  1862. category: 'visiting',
  1863. fn: function (aNode) {
  1864. var self=this;
  1865. smalltalk.send(self, "_visitNode_", [aNode]);
  1866. return self;},
  1867. args: ["aNode"],
  1868. source: "visitReturnNode: aNode\x0a\x09self visitNode: aNode",
  1869. messageSends: ["visitNode:"],
  1870. referencedClasses: []
  1871. }),
  1872. smalltalk.NodeVisitor);
  1873. smalltalk.addMethod(
  1874. "_visitSendNode_",
  1875. smalltalk.method({
  1876. selector: "visitSendNode:",
  1877. category: 'visiting',
  1878. fn: function (aNode) {
  1879. var self=this;
  1880. smalltalk.send(self, "_visitNode_", [aNode]);
  1881. return self;},
  1882. args: ["aNode"],
  1883. source: "visitSendNode: aNode\x0a\x09self visitNode: aNode",
  1884. messageSends: ["visitNode:"],
  1885. referencedClasses: []
  1886. }),
  1887. smalltalk.NodeVisitor);
  1888. smalltalk.addMethod(
  1889. "_visitSequenceNode_",
  1890. smalltalk.method({
  1891. selector: "visitSequenceNode:",
  1892. category: 'visiting',
  1893. fn: function (aNode) {
  1894. var self=this;
  1895. smalltalk.send(self, "_visitNode_", [aNode]);
  1896. return self;},
  1897. args: ["aNode"],
  1898. source: "visitSequenceNode: aNode\x0a\x09self visitNode: aNode",
  1899. messageSends: ["visitNode:"],
  1900. referencedClasses: []
  1901. }),
  1902. smalltalk.NodeVisitor);
  1903. smalltalk.addMethod(
  1904. "_visitValueNode_",
  1905. smalltalk.method({
  1906. selector: "visitValueNode:",
  1907. category: 'visiting',
  1908. fn: function (aNode) {
  1909. var self=this;
  1910. smalltalk.send(self, "_visitNode_", [aNode]);
  1911. return self;},
  1912. args: ["aNode"],
  1913. source: "visitValueNode: aNode\x0a\x09self visitNode: aNode",
  1914. messageSends: ["visitNode:"],
  1915. referencedClasses: []
  1916. }),
  1917. smalltalk.NodeVisitor);
  1918. smalltalk.addMethod(
  1919. "_visitVariableNode_",
  1920. smalltalk.method({
  1921. selector: "visitVariableNode:",
  1922. category: 'visiting',
  1923. fn: function (aNode) {
  1924. var self=this;
  1925. smalltalk.send(self, "_visitNode_", [aNode]);
  1926. return self;},
  1927. args: ["aNode"],
  1928. source: "visitVariableNode: aNode\x0a\x09self visitNode: aNode",
  1929. messageSends: ["visitNode:"],
  1930. referencedClasses: []
  1931. }),
  1932. smalltalk.NodeVisitor);
  1933. smalltalk.addMethod(
  1934. "_visitVerbatimNode_",
  1935. smalltalk.method({
  1936. selector: "visitVerbatimNode:",
  1937. category: 'visiting',
  1938. fn: function (aNode) {
  1939. var self=this;
  1940. smalltalk.send(self, "_visitNode_", [aNode]);
  1941. return self;},
  1942. args: ["aNode"],
  1943. source: "visitVerbatimNode: aNode\x0a\x09self visitNode: aNode",
  1944. messageSends: ["visitNode:"],
  1945. referencedClasses: []
  1946. }),
  1947. smalltalk.NodeVisitor);
  1948. smalltalk.addClass('AbstractCodeGenerator', smalltalk.NodeVisitor, ['currentClass', 'source'], 'Compiler');
  1949. smalltalk.addMethod(
  1950. "_classNameFor_",
  1951. smalltalk.method({
  1952. selector: "classNameFor:",
  1953. category: 'accessing',
  1954. fn: function (aClass) {
  1955. var self=this;
  1956. return ((($receiver = smalltalk.send(aClass, "_isMetaclass", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_instanceClass", []), "_name", []), "__comma", [".klass"]);})() : (function(){return ((($receiver = smalltalk.send(aClass, "_isNil", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return "nil";})() : (function(){return smalltalk.send(aClass, "_name", []);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return "nil";}), (function(){return smalltalk.send(aClass, "_name", []);})]));})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_instanceClass", []), "_name", []), "__comma", [".klass"]);}), (function(){return ((($receiver = smalltalk.send(aClass, "_isNil", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return "nil";})() : (function(){return smalltalk.send(aClass, "_name", []);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return "nil";}), (function(){return smalltalk.send(aClass, "_name", []);})]));})]));
  1957. return self;},
  1958. args: ["aClass"],
  1959. 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]]",
  1960. messageSends: ["ifTrue:ifFalse:", "isMetaclass", ",", "name", "instanceClass", "isNil"],
  1961. referencedClasses: []
  1962. }),
  1963. smalltalk.AbstractCodeGenerator);
  1964. smalltalk.addMethod(
  1965. "_compileNode_",
  1966. smalltalk.method({
  1967. selector: "compileNode:",
  1968. category: 'compiling',
  1969. fn: function (aNode) {
  1970. var self=this;
  1971. smalltalk.send(self, "_subclassResponsibility", []);
  1972. return self;},
  1973. args: ["aNode"],
  1974. source: "compileNode: aNode\x0a\x09self subclassResponsibility",
  1975. messageSends: ["subclassResponsibility"],
  1976. referencedClasses: []
  1977. }),
  1978. smalltalk.AbstractCodeGenerator);
  1979. smalltalk.addMethod(
  1980. "_currentClass",
  1981. smalltalk.method({
  1982. selector: "currentClass",
  1983. category: 'accessing',
  1984. fn: function () {
  1985. var self=this;
  1986. return self['@currentClass'];
  1987. return self;},
  1988. args: [],
  1989. source: "currentClass\x0a\x09^currentClass",
  1990. messageSends: [],
  1991. referencedClasses: []
  1992. }),
  1993. smalltalk.AbstractCodeGenerator);
  1994. smalltalk.addMethod(
  1995. "_currentClass_",
  1996. smalltalk.method({
  1997. selector: "currentClass:",
  1998. category: 'accessing',
  1999. fn: function (aClass) {
  2000. var self=this;
  2001. (self['@currentClass']=aClass);
  2002. return self;},
  2003. args: ["aClass"],
  2004. source: "currentClass: aClass\x0a\x09currentClass := aClass",
  2005. messageSends: [],
  2006. referencedClasses: []
  2007. }),
  2008. smalltalk.AbstractCodeGenerator);
  2009. smalltalk.addMethod(
  2010. "_pseudoVariables",
  2011. smalltalk.method({
  2012. selector: "pseudoVariables",
  2013. category: 'accessing',
  2014. fn: function () {
  2015. var self=this;
  2016. return ["self", "super", "true", "false", "nil", "thisContext"];
  2017. return self;},
  2018. args: [],
  2019. source: "pseudoVariables\x0a\x09^#('self' 'super' 'true' 'false' 'nil' 'thisContext')",
  2020. messageSends: [],
  2021. referencedClasses: []
  2022. }),
  2023. smalltalk.AbstractCodeGenerator);
  2024. smalltalk.addMethod(
  2025. "_safeVariableNameFor_",
  2026. smalltalk.method({
  2027. selector: "safeVariableNameFor:",
  2028. category: 'accessing',
  2029. fn: function (aString) {
  2030. var self=this;
  2031. return ((($receiver = smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_reservedWords", []), "_includes_", [aString])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(aString, "__comma", ["_"]);})() : (function(){return aString;})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(aString, "__comma", ["_"]);}), (function(){return aString;})]));
  2032. return self;},
  2033. args: ["aString"],
  2034. source: "safeVariableNameFor: aString\x0a\x09^(Smalltalk current reservedWords includes: aString)\x0a\x09\x09ifTrue: [aString, '_']\x0a\x09\x09ifFalse: [aString]",
  2035. messageSends: ["ifTrue:ifFalse:", "includes:", "reservedWords", "current", ","],
  2036. referencedClasses: ["Smalltalk"]
  2037. }),
  2038. smalltalk.AbstractCodeGenerator);
  2039. smalltalk.addMethod(
  2040. "_source",
  2041. smalltalk.method({
  2042. selector: "source",
  2043. category: 'accessing',
  2044. fn: function () {
  2045. var self=this;
  2046. return (($receiver = self['@source']) == nil || $receiver == undefined) ? (function(){return "";})() : $receiver;
  2047. return self;},
  2048. args: [],
  2049. source: "source\x0a\x09^source ifNil: ['']",
  2050. messageSends: ["ifNil:"],
  2051. referencedClasses: []
  2052. }),
  2053. smalltalk.AbstractCodeGenerator);
  2054. smalltalk.addMethod(
  2055. "_source_",
  2056. smalltalk.method({
  2057. selector: "source:",
  2058. category: 'accessing',
  2059. fn: function (aString) {
  2060. var self=this;
  2061. (self['@source']=aString);
  2062. return self;},
  2063. args: ["aString"],
  2064. source: "source: aString\x0a\x09source := aString",
  2065. messageSends: [],
  2066. referencedClasses: []
  2067. }),
  2068. smalltalk.AbstractCodeGenerator);
  2069. smalltalk.addClass('FunCodeGenerator', smalltalk.AbstractCodeGenerator, ['stream', 'nestedBlocks', 'earlyReturn', 'currentSelector', 'unknownVariables', 'tempVariables', 'messageSends', 'referencedClasses', 'classReferenced', 'argVariables'], 'Compiler');
  2070. smalltalk.addMethod(
  2071. "_argVariables",
  2072. smalltalk.method({
  2073. selector: "argVariables",
  2074. category: 'accessing',
  2075. fn: function () {
  2076. var self=this;
  2077. return smalltalk.send(self['@argVariables'], "_copy", []);
  2078. return self;},
  2079. args: [],
  2080. source: "argVariables\x0a\x09^argVariables copy",
  2081. messageSends: ["copy"],
  2082. referencedClasses: []
  2083. }),
  2084. smalltalk.FunCodeGenerator);
  2085. smalltalk.addMethod(
  2086. "_checkClass_for_",
  2087. smalltalk.method({
  2088. selector: "checkClass:for:",
  2089. category: 'optimizations',
  2090. fn: function (aClassName, receiver) {
  2091. var self=this;
  2092. smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("((($receiver = ", "__comma", [receiver]), "__comma", [").klass === smalltalk."]), "__comma", [aClassName]), "__comma", [") ? "])]);
  2093. return self;},
  2094. args: ["aClassName", "receiver"],
  2095. source: "checkClass: aClassName for: receiver\x0a stream nextPutAll: '((($receiver = ', receiver, ').klass === smalltalk.', aClassName, ') ? '",
  2096. messageSends: ["nextPutAll:", ","],
  2097. referencedClasses: []
  2098. }),
  2099. smalltalk.FunCodeGenerator);
  2100. smalltalk.addMethod(
  2101. "_compileNode_",
  2102. smalltalk.method({
  2103. selector: "compileNode:",
  2104. category: 'compiling',
  2105. fn: function (aNode) {
  2106. var self=this;
  2107. (self['@stream']=smalltalk.send("", "_writeStream", []));
  2108. smalltalk.send(self, "_visit_", [aNode]);
  2109. return smalltalk.send(self['@stream'], "_contents", []);
  2110. return self;},
  2111. args: ["aNode"],
  2112. source: "compileNode: aNode\x0a\x09stream := '' writeStream.\x0a\x09self visit: aNode.\x0a\x09^stream contents",
  2113. messageSends: ["writeStream", "visit:", "contents"],
  2114. referencedClasses: []
  2115. }),
  2116. smalltalk.FunCodeGenerator);
  2117. smalltalk.addMethod(
  2118. "_initialize",
  2119. smalltalk.method({
  2120. selector: "initialize",
  2121. category: 'initialization',
  2122. fn: function () {
  2123. var self=this;
  2124. smalltalk.send(self, "_initialize", [], smalltalk.FunCodeGenerator.superclass || nil);
  2125. (self['@stream']=smalltalk.send("", "_writeStream", []));
  2126. (self['@unknownVariables']=[]);
  2127. (self['@tempVariables']=[]);
  2128. (self['@argVariables']=[]);
  2129. (self['@messageSends']=[]);
  2130. (self['@classReferenced']=[]);
  2131. return self;},
  2132. args: [],
  2133. source: "initialize\x0a\x09super initialize.\x0a\x09stream := '' writeStream. \x0a\x09unknownVariables := #().\x0a\x09tempVariables := #().\x0a\x09argVariables := #().\x0a\x09messageSends := #().\x0a\x09classReferenced := #()",
  2134. messageSends: ["initialize", "writeStream"],
  2135. referencedClasses: []
  2136. }),
  2137. smalltalk.FunCodeGenerator);
  2138. smalltalk.addMethod(
  2139. "_inline_receiver_argumentNodes_",
  2140. smalltalk.method({
  2141. selector: "inline:receiver:argumentNodes:",
  2142. category: 'optimizations',
  2143. fn: function (aSelector, receiver, aCollection) {
  2144. var self=this;
  2145. var inlined=nil;
  2146. (inlined=false);
  2147. ((($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);})]));})]));
  2148. ((($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);})]));})]));
  2149. ((($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);})]));})]));
  2150. ((($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);})]));})]));
  2151. ((($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);})]));
  2152. ((($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);})]));
  2153. ((($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);})]));
  2154. ((($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);})]));
  2155. ((($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);})]));
  2156. ((($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);})]));
  2157. ((($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);})]));
  2158. ((($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);})]));
  2159. return inlined;
  2160. return self;},
  2161. args: ["aSelector", "receiver", "aCollection"],
  2162. 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",
  2163. messageSends: ["ifTrue:", "=", "isBlockNode", "first", "checkClass:for:", "nextPutAll:", "visit:", "and:", "second"],
  2164. referencedClasses: []
  2165. }),
  2166. smalltalk.FunCodeGenerator);
  2167. smalltalk.addMethod(
  2168. "_inlineLiteral_receiverNode_argumentNodes_",
  2169. smalltalk.method({
  2170. selector: "inlineLiteral:receiverNode:argumentNodes:",
  2171. category: 'optimizations',
  2172. fn: function (aSelector, anObject, aCollection) {
  2173. var self=this;
  2174. var inlined=nil;
  2175. (inlined=false);
  2176. ((($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);})]));})]));
  2177. ((($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);})]));})]));
  2178. ((($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);})]));})]));
  2179. ((($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);})]));})]));
  2180. ((($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);})]));})]));
  2181. ((($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);})]));})]));
  2182. ((($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);})]));})]));
  2183. ((($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);})]));})]));
  2184. ((($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);})]));})]));
  2185. ((($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);})]));})]));
  2186. ((($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);})]));})]));
  2187. ((($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);})]));})]));
  2188. ((($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);})]));})]));
  2189. ((($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);})]));})]));
  2190. ((($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);})]));})]));
  2191. ((($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);})]));})]));
  2192. return inlined;
  2193. return self;},
  2194. args: ["aSelector", "anObject", "aCollection"],
  2195. 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",
  2196. messageSends: ["ifTrue:", "=", "and:", "isBlockNode", "first", "nextPutAll:", "visit:", "isNode:ofClass:", "second"],
  2197. referencedClasses: ["Number"]
  2198. }),
  2199. smalltalk.FunCodeGenerator);
  2200. smalltalk.addMethod(
  2201. "_isNode_ofClass_",
  2202. smalltalk.method({
  2203. selector: "isNode:ofClass:",
  2204. category: 'optimizations',
  2205. fn: function (aNode, aClass) {
  2206. var self=this;
  2207. 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]);})]);})]);})]);
  2208. return self;},
  2209. args: ["aNode", "aClass"],
  2210. 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]]]",
  2211. messageSends: ["and:", "isValueNode", "or:", "=", "class", "value", "currentClass"],
  2212. referencedClasses: []
  2213. }),
  2214. smalltalk.FunCodeGenerator);
  2215. smalltalk.addMethod(
  2216. "_knownVariables",
  2217. smalltalk.method({
  2218. selector: "knownVariables",
  2219. category: 'accessing',
  2220. fn: function () {
  2221. var self=this;
  2222. 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", []));
  2223. return self;},
  2224. args: [],
  2225. source: "knownVariables\x0a\x09^self pseudoVariables \x0a\x09\x09addAll: self tempVariables;\x0a\x09\x09addAll: self argVariables;\x0a\x09\x09yourself",
  2226. messageSends: ["addAll:", "tempVariables", "argVariables", "yourself", "pseudoVariables"],
  2227. referencedClasses: []
  2228. }),
  2229. smalltalk.FunCodeGenerator);
  2230. smalltalk.addMethod(
  2231. "_performOptimizations",
  2232. smalltalk.method({
  2233. selector: "performOptimizations",
  2234. category: 'testing',
  2235. fn: function () {
  2236. var self=this;
  2237. return smalltalk.send(smalltalk.send(self, "_class", []), "_performOptimizations", []);
  2238. return self;},
  2239. args: [],
  2240. source: "performOptimizations\x0a\x09^self class performOptimizations",
  2241. messageSends: ["performOptimizations", "class"],
  2242. referencedClasses: []
  2243. }),
  2244. smalltalk.FunCodeGenerator);
  2245. smalltalk.addMethod(
  2246. "_send_to_arguments_superSend_",
  2247. smalltalk.method({
  2248. selector: "send:to:arguments:superSend:",
  2249. category: 'visiting',
  2250. fn: function (aSelector, aReceiver, aCollection, aBoolean) {
  2251. var self=this;
  2252. return smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(str){var tmp=nil;
  2253. (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_", [")"]);})]);
  2254. return self;},
  2255. args: ["aSelector", "aReceiver", "aCollection", "aBoolean"],
  2256. 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: ')']",
  2257. messageSends: ["streamContents:", "nextPutAll:", ",", "asSelector", "do:separatedBy:", "visit:", "ifTrue:", "classNameFor:", "currentClass"],
  2258. referencedClasses: ["String"]
  2259. }),
  2260. smalltalk.FunCodeGenerator);
  2261. smalltalk.addMethod(
  2262. "_tempVariables",
  2263. smalltalk.method({
  2264. selector: "tempVariables",
  2265. category: 'accessing',
  2266. fn: function () {
  2267. var self=this;
  2268. return smalltalk.send(self['@tempVariables'], "_copy", []);
  2269. return self;},
  2270. args: [],
  2271. source: "tempVariables\x0a\x09^tempVariables copy",
  2272. messageSends: ["copy"],
  2273. referencedClasses: []
  2274. }),
  2275. smalltalk.FunCodeGenerator);
  2276. smalltalk.addMethod(
  2277. "_unknownVariables",
  2278. smalltalk.method({
  2279. selector: "unknownVariables",
  2280. category: 'accessing',
  2281. fn: function () {
  2282. var self=this;
  2283. return smalltalk.send(self['@unknownVariables'], "_copy", []);
  2284. return self;},
  2285. args: [],
  2286. source: "unknownVariables\x0a\x09^unknownVariables copy",
  2287. messageSends: ["copy"],
  2288. referencedClasses: []
  2289. }),
  2290. smalltalk.FunCodeGenerator);
  2291. smalltalk.addMethod(
  2292. "_visit_",
  2293. smalltalk.method({
  2294. selector: "visit:",
  2295. category: 'visiting',
  2296. fn: function (aNode) {
  2297. var self=this;
  2298. smalltalk.send(aNode, "_accept_", [self]);
  2299. return self;},
  2300. args: ["aNode"],
  2301. source: "visit: aNode\x0a\x09aNode accept: self",
  2302. messageSends: ["accept:"],
  2303. referencedClasses: []
  2304. }),
  2305. smalltalk.FunCodeGenerator);
  2306. smalltalk.addMethod(
  2307. "_visitAssignmentNode_",
  2308. smalltalk.method({
  2309. selector: "visitAssignmentNode:",
  2310. category: 'visiting',
  2311. fn: function (aNode) {
  2312. var self=this;
  2313. smalltalk.send(self['@stream'], "_nextPutAll_", ["("]);
  2314. smalltalk.send(self, "_visit_", [smalltalk.send(aNode, "_left", [])]);
  2315. smalltalk.send(self['@stream'], "_nextPutAll_", ["="]);
  2316. smalltalk.send(self, "_visit_", [smalltalk.send(aNode, "_right", [])]);
  2317. smalltalk.send(self['@stream'], "_nextPutAll_", [")"]);
  2318. return self;},
  2319. args: ["aNode"],
  2320. source: "visitAssignmentNode: aNode\x0a\x09stream nextPutAll: '('.\x0a\x09self visit: aNode left.\x0a\x09stream nextPutAll: '='.\x0a\x09self visit: aNode right.\x0a\x09stream nextPutAll: ')'",
  2321. messageSends: ["nextPutAll:", "visit:", "left", "right"],
  2322. referencedClasses: []
  2323. }),
  2324. smalltalk.FunCodeGenerator);
  2325. smalltalk.addMethod(
  2326. "_visitBlockNode_",
  2327. smalltalk.method({
  2328. selector: "visitBlockNode:",
  2329. category: 'visiting',
  2330. fn: function (aNode) {
  2331. var self=this;
  2332. smalltalk.send(self['@stream'], "_nextPutAll_", ["(function("]);
  2333. 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_", [", "]);})]);
  2334. smalltalk.send(self['@stream'], "_nextPutAll_", ["){"]);
  2335. smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_do_", [(function(each){return smalltalk.send(self, "_visit_", [each]);})]);
  2336. smalltalk.send(self['@stream'], "_nextPutAll_", ["})"]);
  2337. return self;},
  2338. args: ["aNode"],
  2339. 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: '})'",
  2340. messageSends: ["nextPutAll:", "do:separatedBy:", "parameters", "add:", "do:", "nodes", "visit:"],
  2341. referencedClasses: []
  2342. }),
  2343. smalltalk.FunCodeGenerator);
  2344. smalltalk.addMethod(
  2345. "_visitBlockSequenceNode_",
  2346. smalltalk.method({
  2347. selector: "visitBlockSequenceNode:",
  2348. category: 'visiting',
  2349. fn: function (aNode) {
  2350. var self=this;
  2351. var index=nil;
  2352. (self['@nestedBlocks']=((($receiver = self['@nestedBlocks']).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));
  2353. ((($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;
  2354. (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;
  2355. (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_", [";"]);})]);})]));
  2356. (self['@nestedBlocks']=((($receiver = self['@nestedBlocks']).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])));
  2357. return self;},
  2358. args: ["aNode"],
  2359. 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",
  2360. messageSends: ["+", "ifTrue:ifFalse:", "isEmpty", "nodes", "nextPutAll:", "do:", "temps", "safeVariableNameFor:", "add:", ",", "lf", "ifTrue:", "=", "size", "visit:", "-"],
  2361. referencedClasses: []
  2362. }),
  2363. smalltalk.FunCodeGenerator);
  2364. smalltalk.addMethod(
  2365. "_visitCascadeNode_",
  2366. smalltalk.method({
  2367. selector: "visitCascadeNode:",
  2368. category: 'visiting',
  2369. fn: function (aNode) {
  2370. var self=this;
  2371. var index=nil;
  2372. (index=(0));
  2373. ((($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"]);})]));
  2374. smalltalk.send(self['@stream'], "_nextPutAll_", ["(function($rec){"]);
  2375. 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_", [";"]);})]);
  2376. smalltalk.send(self['@stream'], "_nextPutAll_", ["})("]);
  2377. smalltalk.send(self, "_visit_", [smalltalk.send(aNode, "_receiver", [])]);
  2378. smalltalk.send(self['@stream'], "_nextPutAll_", [")"]);
  2379. return self;},
  2380. args: ["aNode"],
  2381. 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: ')'",
  2382. messageSends: ["ifFalse:", "includes:", "add:", "nextPutAll:", "do:", "nodes", "+", "ifTrue:", "=", "size", "receiver:", "value:", "new", "visit:", "receiver"],
  2383. referencedClasses: ["VariableNode"]
  2384. }),
  2385. smalltalk.FunCodeGenerator);
  2386. smalltalk.addMethod(
  2387. "_visitClassReferenceNode_",
  2388. smalltalk.method({
  2389. selector: "visitClassReferenceNode:",
  2390. category: 'visiting',
  2391. fn: function (aNode) {
  2392. var self=this;
  2393. ((($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", [])]);})]));
  2394. 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", [")"])]);
  2395. return self;},
  2396. args: ["aNode"],
  2397. source: "visitClassReferenceNode: aNode\x0a\x09(referencedClasses includes: aNode value) ifFalse: [\x0a\x09\x09referencedClasses add: aNode value].\x0a\x09stream nextPutAll: '(smalltalk.', aNode value, ' || ', aNode value, ')'",
  2398. messageSends: ["ifFalse:", "includes:", "value", "add:", "nextPutAll:", ","],
  2399. referencedClasses: []
  2400. }),
  2401. smalltalk.FunCodeGenerator);
  2402. smalltalk.addMethod(
  2403. "_visitDynamicArrayNode_",
  2404. smalltalk.method({
  2405. selector: "visitDynamicArrayNode:",
  2406. category: 'visiting',
  2407. fn: function (aNode) {
  2408. var self=this;
  2409. smalltalk.send(self['@stream'], "_nextPutAll_", ["["]);
  2410. smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_do_separatedBy_", [(function(each){return smalltalk.send(self, "_visit_", [each]);}), (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [","]);})]);
  2411. smalltalk.send(self['@stream'], "_nextPutAll_", ["]"]);
  2412. return self;},
  2413. args: ["aNode"],
  2414. source: "visitDynamicArrayNode: aNode\x0a\x09stream nextPutAll: '['.\x0a\x09aNode nodes \x0a\x09\x09do: [:each | self visit: each]\x0a\x09\x09separatedBy: [stream nextPutAll: ','].\x0a\x09stream nextPutAll: ']'",
  2415. messageSends: ["nextPutAll:", "do:separatedBy:", "nodes", "visit:"],
  2416. referencedClasses: []
  2417. }),
  2418. smalltalk.FunCodeGenerator);
  2419. smalltalk.addMethod(
  2420. "_visitDynamicDictionaryNode_",
  2421. smalltalk.method({
  2422. selector: "visitDynamicDictionaryNode:",
  2423. category: 'visiting',
  2424. fn: function (aNode) {
  2425. var self=this;
  2426. smalltalk.send(self['@stream'], "_nextPutAll_", ["smalltalk.HashedCollection._fromPairs_(["]);
  2427. smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_do_separatedBy_", [(function(each){return smalltalk.send(self, "_visit_", [each]);}), (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [","]);})]);
  2428. smalltalk.send(self['@stream'], "_nextPutAll_", ["])"]);
  2429. return self;},
  2430. args: ["aNode"],
  2431. 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: '])'",
  2432. messageSends: ["nextPutAll:", "do:separatedBy:", "nodes", "visit:"],
  2433. referencedClasses: []
  2434. }),
  2435. smalltalk.FunCodeGenerator);
  2436. smalltalk.addMethod(
  2437. "_visitFailure_",
  2438. smalltalk.method({
  2439. selector: "visitFailure:",
  2440. category: 'visiting',
  2441. fn: function (aFailure) {
  2442. var self=this;
  2443. smalltalk.send(self, "_error_", [smalltalk.send(aFailure, "_asString", [])]);
  2444. return self;},
  2445. args: ["aFailure"],
  2446. source: "visitFailure: aFailure\x0a\x09self error: aFailure asString",
  2447. messageSends: ["error:", "asString"],
  2448. referencedClasses: []
  2449. }),
  2450. smalltalk.FunCodeGenerator);
  2451. smalltalk.addMethod(
  2452. "_visitJSStatementNode_",
  2453. smalltalk.method({
  2454. selector: "visitJSStatementNode:",
  2455. category: 'visiting',
  2456. fn: function (aNode) {
  2457. var self=this;
  2458. smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(aNode, "_source", [])]);
  2459. return self;},
  2460. args: ["aNode"],
  2461. source: "visitJSStatementNode: aNode\x0a\x09stream nextPutAll: aNode source",
  2462. messageSends: ["nextPutAll:", "source"],
  2463. referencedClasses: []
  2464. }),
  2465. smalltalk.FunCodeGenerator);
  2466. smalltalk.addMethod(
  2467. "_visitMethodNode_",
  2468. smalltalk.method({
  2469. selector: "visitMethodNode:",
  2470. category: 'visiting',
  2471. fn: function (aNode) {
  2472. var self=this;
  2473. var str=nil;
  2474. var currentSelector=nil;
  2475. (self['@currentSelector']=smalltalk.send(smalltalk.send(aNode, "_selector", []), "_asSelector", []));
  2476. (self['@nestedBlocks']=(0));
  2477. (self['@earlyReturn']=false);
  2478. (self['@messageSends']=[]);
  2479. (self['@referencedClasses']=[]);
  2480. (self['@unknownVariables']=[]);
  2481. (self['@tempVariables']=[]);
  2482. (self['@argVariables']=[]);
  2483. (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']);
  2484. (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']);
  2485. smalltalk.send(self['@stream'], "_nextPutAll_", ["fn: function("]);
  2486. 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_", [", "]);})]);
  2487. (function($rec){smalltalk.send($rec, "_nextPutAll_", ["){"]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", ["var self=this;"]);return smalltalk.send($rec, "_lf", []);})(self['@stream']);
  2488. (str=self['@stream']);
  2489. (self['@stream']=smalltalk.send("", "_writeStream", []));
  2490. smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_do_", [(function(each){return smalltalk.send(self, "_visit_", [each]);})]);
  2491. ((($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);})]));
  2492. smalltalk.send(str, "_nextPutAll_", [smalltalk.send(self['@stream'], "_contents", [])]);
  2493. (self['@stream']=str);
  2494. (function($rec){smalltalk.send($rec, "_lf", []);return smalltalk.send($rec, "_nextPutAll_", ["return self;"]);})(self['@stream']);
  2495. ((($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']);})]));
  2496. smalltalk.send(self['@stream'], "_nextPutAll_", ["}"]);
  2497. (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']);
  2498. 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_", [","]);})]);
  2499. smalltalk.send(self['@stream'], "_nextPutAll_", ["]"]);
  2500. smalltalk.send(self['@stream'], "_nextPutAll_", ["})"]);
  2501. return self;},
  2502. args: ["aNode"],
  2503. 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: '})'",
  2504. messageSends: ["asSelector", "selector", "nextPutAll:", "lf", ",", "asJavascript", "source", "do:separatedBy:", "arguments", "add:", "writeStream", "do:", "nodes", "visit:", "ifTrue:", "contents", "printString"],
  2505. referencedClasses: ["String"]
  2506. }),
  2507. smalltalk.FunCodeGenerator);
  2508. smalltalk.addMethod(
  2509. "_visitReturnNode_",
  2510. smalltalk.method({
  2511. selector: "visitReturnNode:",
  2512. category: 'visiting',
  2513. fn: function (aNode) {
  2514. var self=this;
  2515. ((($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);})]));
  2516. ((($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 "]);})]));
  2517. smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_do_", [(function(each){return smalltalk.send(self, "_visit_", [each]);})]);
  2518. ((($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_", ["]})()"]);})]));
  2519. return self;},
  2520. args: ["aNode"],
  2521. 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: ']})()']",
  2522. messageSends: ["ifTrue:", ">", "ifTrue:ifFalse:", "nextPutAll:", "do:", "nodes", "visit:"],
  2523. referencedClasses: []
  2524. }),
  2525. smalltalk.FunCodeGenerator);
  2526. smalltalk.addMethod(
  2527. "_visitSendNode_",
  2528. smalltalk.method({
  2529. selector: "visitSendNode:",
  2530. category: 'visiting',
  2531. fn: function (aNode) {
  2532. var self=this;
  2533. var str=nil;
  2534. var receiver=nil;
  2535. var superSend=nil;
  2536. var inlined=nil;
  2537. (str=self['@stream']);
  2538. ((($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", [])]);})]));
  2539. (self['@stream']=smalltalk.send("", "_writeStream", []));
  2540. smalltalk.send(self, "_visit_", [smalltalk.send(aNode, "_receiver", [])]);
  2541. (superSend=smalltalk.send(smalltalk.send(self['@stream'], "_contents", []), "__eq", ["super"]));
  2542. (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", []);})])));
  2543. (self['@stream']=str);
  2544. ((($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])]);})]));
  2545. return self;},
  2546. args: ["aNode"],
  2547. 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)]",
  2548. messageSends: ["ifFalse:", "includes:", "selector", "add:", "writeStream", "visit:", "receiver", "=", "contents", "ifTrue:ifFalse:", "performOptimizations", "inlineLiteral:receiverNode:argumentNodes:", "arguments", "inline:receiver:argumentNodes:", "nextPutAll:", ",", "send:to:arguments:superSend:"],
  2549. referencedClasses: []
  2550. }),
  2551. smalltalk.FunCodeGenerator);
  2552. smalltalk.addMethod(
  2553. "_visitSequenceNode_",
  2554. smalltalk.method({
  2555. selector: "visitSequenceNode:",
  2556. category: 'visiting',
  2557. fn: function (aNode) {
  2558. var self=this;
  2559. smalltalk.send(smalltalk.send(aNode, "_temps", []), "_do_", [(function(each){var temp=nil;
  2560. (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']);})]);
  2561. 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", []);})]);
  2562. return self;},
  2563. args: ["aNode"],
  2564. 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]",
  2565. messageSends: ["do:", "temps", "safeVariableNameFor:", "add:", "nextPutAll:", ",", "lf", "do:separatedBy:", "nodes", "visit:"],
  2566. referencedClasses: []
  2567. }),
  2568. smalltalk.FunCodeGenerator);
  2569. smalltalk.addMethod(
  2570. "_visitValueNode_",
  2571. smalltalk.method({
  2572. selector: "visitValueNode:",
  2573. category: 'visiting',
  2574. fn: function (aNode) {
  2575. var self=this;
  2576. smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(aNode, "_value", []), "_asJavascript", [])]);
  2577. return self;},
  2578. args: ["aNode"],
  2579. source: "visitValueNode: aNode\x0a\x09stream nextPutAll: aNode value asJavascript",
  2580. messageSends: ["nextPutAll:", "asJavascript", "value"],
  2581. referencedClasses: []
  2582. }),
  2583. smalltalk.FunCodeGenerator);
  2584. smalltalk.addMethod(
  2585. "_visitVariableNode_",
  2586. smalltalk.method({
  2587. selector: "visitVariableNode:",
  2588. category: 'visiting',
  2589. fn: function (aNode) {
  2590. var self=this;
  2591. var varName=nil;
  2592. ((($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]);})]));})]));})]));
  2593. return self;},
  2594. args: ["aNode"],
  2595. 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]]]",
  2596. messageSends: ["ifTrue:ifFalse:", "includes:", "allInstanceVariableNames", "currentClass", "value", "nextPutAll:", ",", "safeVariableNameFor:", "ifFalse:ifTrue:", "knownVariables", "add:", "assigned", "="],
  2597. referencedClasses: []
  2598. }),
  2599. smalltalk.FunCodeGenerator);
  2600. smalltalk.FunCodeGenerator.klass.iVarNames = ['performOptimizations'];
  2601. smalltalk.addMethod(
  2602. "_performOptimizations",
  2603. smalltalk.method({
  2604. selector: "performOptimizations",
  2605. category: 'accessing',
  2606. fn: function () {
  2607. var self=this;
  2608. return (($receiver = self['@performOptimizations']) == nil || $receiver == undefined) ? (function(){return true;})() : $receiver;
  2609. return self;},
  2610. args: [],
  2611. source: "performOptimizations\x0a\x09^performOptimizations ifNil: [true]",
  2612. messageSends: ["ifNil:"],
  2613. referencedClasses: []
  2614. }),
  2615. smalltalk.FunCodeGenerator.klass);
  2616. smalltalk.addMethod(
  2617. "_performOptimizations_",
  2618. smalltalk.method({
  2619. selector: "performOptimizations:",
  2620. category: 'accessing',
  2621. fn: function (aBoolean) {
  2622. var self=this;
  2623. (self['@performOptimizations']=aBoolean);
  2624. return self;},
  2625. args: ["aBoolean"],
  2626. source: "performOptimizations: aBoolean\x0a\x09performOptimizations := aBoolean",
  2627. messageSends: [],
  2628. referencedClasses: []
  2629. }),
  2630. smalltalk.FunCodeGenerator.klass);
  2631. smalltalk.addClass('ImpCodeGenerator', smalltalk.AbstractCodeGenerator, ['stream', 'nestedBlocks', 'earlyReturn', 'currentSelector', 'unknownVariables', 'tempVariables', 'messageSends', 'referencedClasses', 'classReferenced', 'argVariables', 'ivarAliases', 'toIvar', 'mutables', 'assigned'], 'Compiler');
  2632. smalltalk.addMethod(
  2633. "_alias_",
  2634. smalltalk.method({
  2635. selector: "alias:",
  2636. category: 'compilation DSL',
  2637. fn: function (aString) {
  2638. var self=this;
  2639. smalltalk.send(self, "_alias_mutable_", [aString, false]);
  2640. return self;},
  2641. args: ["aString"],
  2642. source: "alias: aString\x0a\x09self alias: aString mutable: false",
  2643. messageSends: ["alias:mutable:"],
  2644. referencedClasses: []
  2645. }),
  2646. smalltalk.ImpCodeGenerator);
  2647. smalltalk.addMethod(
  2648. "_alias_mutable_",
  2649. smalltalk.method({
  2650. selector: "alias:mutable:",
  2651. category: 'compilation DSL',
  2652. fn: function (aString, aBoolean) {
  2653. var self=this;
  2654. ((($receiver = smalltalk.send(self['@ivarAliases'], "_includesKey_", [self['@toIvar']])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self['@ivarAliases'], "_at_put_", [self['@toIvar'], aString]);return ((($receiver = aBoolean).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@mutables'], "_add_", [self['@toIvar']]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(self['@mutables'], "_add_", [self['@toIvar']]);})]));})() : (function(){return smalltalk.send(self, "_assign_", [aString]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){smalltalk.send(self['@ivarAliases'], "_at_put_", [self['@toIvar'], aString]);return ((($receiver = aBoolean).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@mutables'], "_add_", [self['@toIvar']]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(self['@mutables'], "_add_", [self['@toIvar']]);})]));}), (function(){return smalltalk.send(self, "_assign_", [aString]);})]));
  2655. return self;},
  2656. args: ["aString", "aBoolean"],
  2657. source: "alias: aString mutable: aBoolean\x0a\x09(ivarAliases includesKey: toIvar)\x0a\x09\x09ifTrue: [ ivarAliases at: toIvar put: aString. aBoolean ifTrue: [ mutables add: toIvar ] ]\x0a\x09\x09ifFalse: [ self assign: aString ]",
  2658. messageSends: ["ifTrue:ifFalse:", "includesKey:", "at:put:", "ifTrue:", "add:", "assign:"],
  2659. referencedClasses: []
  2660. }),
  2661. smalltalk.ImpCodeGenerator);
  2662. smalltalk.addMethod(
  2663. "_aliasMutable_",
  2664. smalltalk.method({
  2665. selector: "aliasMutable:",
  2666. category: 'compilation DSL',
  2667. fn: function (aString) {
  2668. var self=this;
  2669. smalltalk.send(self, "_alias_mutable_", [aString, true]);
  2670. return self;},
  2671. args: ["aString"],
  2672. source: "aliasMutable: aString\x0a\x09self alias: aString mutable: true",
  2673. messageSends: ["alias:mutable:"],
  2674. referencedClasses: []
  2675. }),
  2676. smalltalk.ImpCodeGenerator);
  2677. smalltalk.addMethod(
  2678. "_argVariables",
  2679. smalltalk.method({
  2680. selector: "argVariables",
  2681. category: 'accessing',
  2682. fn: function () {
  2683. var self=this;
  2684. return smalltalk.send(self['@argVariables'], "_copy", []);
  2685. return self;},
  2686. args: [],
  2687. source: "argVariables\x0a\x09^argVariables copy",
  2688. messageSends: ["copy"],
  2689. referencedClasses: []
  2690. }),
  2691. smalltalk.ImpCodeGenerator);
  2692. smalltalk.addMethod(
  2693. "_arrayOfValues_",
  2694. smalltalk.method({
  2695. selector: "arrayOfValues:",
  2696. category: 'visiting',
  2697. fn: function (nodes) {
  2698. var self=this;
  2699. var args=nil;
  2700. (args=smalltalk.send(nodes, "_collect_", [(function(node){return smalltalk.send(self, "_isolated_", [node]);})]));
  2701. smalltalk.send(self, "_alias_", [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, "_useIvar_", [each])]);}), (function(){return smalltalk.send(str, "_nextPutAll_", [", "]);})]);return smalltalk.send(str, "_nextPutAll_", ["]"]);})])]);
  2702. return self;},
  2703. args: ["nodes"],
  2704. source: "arrayOfValues: nodes\x0a\x09| args |\x0a\x09args :=nodes collect: [ :node | self isolated: node ].\x0a\x09self alias: (String streamContents: [ :str |\x0a\x09\x09str nextPutAll: '['.\x0a\x09\x09args\x0a\x09 \x09\x09do: [:each | str nextPutAll: (self useIvar: each) ]\x0a\x09 \x09\x09separatedBy: [str nextPutAll: ', '].\x0a str nextPutAll: ']'\x0a\x09])",
  2705. messageSends: ["collect:", "isolated:", "alias:", "streamContents:", "nextPutAll:", "do:separatedBy:", "useIvar:"],
  2706. referencedClasses: ["String"]
  2707. }),
  2708. smalltalk.ImpCodeGenerator);
  2709. smalltalk.addMethod(
  2710. "_assert_",
  2711. smalltalk.method({
  2712. selector: "assert:",
  2713. category: 'testing',
  2714. fn: function (aBoolean) {
  2715. var self=this;
  2716. ((($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"]);})]));
  2717. return self;},
  2718. args: ["aBoolean"],
  2719. source: "assert: aBoolean\x0a\x09aBoolean ifFalse: [ self error: 'assertion failed' ]",
  2720. messageSends: ["ifFalse:", "error:"],
  2721. referencedClasses: []
  2722. }),
  2723. smalltalk.ImpCodeGenerator);
  2724. smalltalk.addMethod(
  2725. "_assign_",
  2726. smalltalk.method({
  2727. selector: "assign:",
  2728. category: 'compilation DSL',
  2729. fn: function (aString) {
  2730. var self=this;
  2731. var closer=nil;
  2732. smalltalk.send(aString, "_ifNotEmpty_", [(function(){smalltalk.send(self, "_disarmAll", []);(closer="");(($receiver = self['@toIvar']) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [((($receiver = smalltalk.send(self['@toIvar'], "__eq", ["^"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return "return ";})() : (function(){return ((($receiver = smalltalk.send(self['@toIvar'], "__eq", ["!"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){(closer="]");return "throw $early=[";})() : (function(){return smalltalk.send(self['@toIvar'], "__comma", ["="]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){(closer="]");return "throw $early=[";}), (function(){return smalltalk.send(self['@toIvar'], "__comma", ["="]);})]));})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return "return ";}), (function(){return ((($receiver = smalltalk.send(self['@toIvar'], "__eq", ["!"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){(closer="]");return "throw $early=[";})() : (function(){return smalltalk.send(self['@toIvar'], "__comma", ["="]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){(closer="]");return "throw $early=[";}), (function(){return smalltalk.send(self['@toIvar'], "__comma", ["="]);})]));})]))]);})() : nil;smalltalk.send(self, "_makeAssigned", []);return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(aString, "__comma", [closer]), "__comma", [";"]), "__comma", [smalltalk.send(self, "_mylf", [])])]);})]);
  2733. return self;},
  2734. args: ["aString"],
  2735. source: "assign: aString\x0a\x09| closer |\x0a\x09aString ifNotEmpty: [\x0a\x09\x09self disarmAll.\x0a\x09\x09closer := ''.\x0a\x09\x09toIvar ifNotNil: [ stream nextPutAll:\x0a\x09\x09\x09(toIvar = '^' ifTrue: ['return '] ifFalse: [\x0a\x09\x09\x09\x09toIvar = '!' ifTrue: [ closer := ']'. 'throw $early=['] ifFalse: [\x0a\x09\x09\x09\x09\x09toIvar, '=']]) ].\x0a\x09\x09self makeAssigned.\x0a\x09\x09stream nextPutAll: aString, closer, ';', self mylf ]",
  2736. messageSends: ["ifNotEmpty:", "disarmAll", "ifNotNil:", "nextPutAll:", "ifTrue:ifFalse:", "=", ",", "makeAssigned", "mylf"],
  2737. referencedClasses: []
  2738. }),
  2739. smalltalk.ImpCodeGenerator);
  2740. smalltalk.addMethod(
  2741. "_checkClass_for_",
  2742. smalltalk.method({
  2743. selector: "checkClass:for:",
  2744. category: 'optimizations',
  2745. fn: function (aClassName, receiver) {
  2746. var self=this;
  2747. smalltalk.send(self, "_prvCheckClass_for_", [aClassName, receiver]);
  2748. smalltalk.send(self['@stream'], "_nextPutAll_", ["{"]);
  2749. return self;},
  2750. args: ["aClassName", "receiver"],
  2751. source: "checkClass: aClassName for: receiver\x0a\x09self prvCheckClass: aClassName for: receiver.\x0a\x09stream nextPutAll: '{'",
  2752. messageSends: ["prvCheckClass:for:", "nextPutAll:"],
  2753. referencedClasses: []
  2754. }),
  2755. smalltalk.ImpCodeGenerator);
  2756. smalltalk.addMethod(
  2757. "_checkClass_for_includeIf_",
  2758. smalltalk.method({
  2759. selector: "checkClass:for:includeIf:",
  2760. category: 'optimizations',
  2761. fn: function (aClassName, receiver, aBoolean) {
  2762. var self=this;
  2763. smalltalk.send(self, "_prvCheckClass_for_", [aClassName, receiver]);
  2764. 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, "_useIvar_", [receiver])]), "__comma", [")) {"])]);
  2765. return self;},
  2766. args: ["aClassName", "receiver", "aBoolean"],
  2767. source: "checkClass: aClassName for: receiver includeIf: aBoolean\x0a\x09self prvCheckClass: aClassName for: receiver.\x0a\x09stream nextPutAll: (aBoolean ifTrue: ['if(('] ifFalse: ['if(!(']), (self useIvar: receiver), ')) {'",
  2768. messageSends: ["prvCheckClass:for:", "nextPutAll:", ",", "ifTrue:ifFalse:", "useIvar:"],
  2769. referencedClasses: []
  2770. }),
  2771. smalltalk.ImpCodeGenerator);
  2772. smalltalk.addMethod(
  2773. "_compileNode_",
  2774. smalltalk.method({
  2775. selector: "compileNode:",
  2776. category: 'compiling',
  2777. fn: function (aNode) {
  2778. var self=this;
  2779. (self['@stream']=smalltalk.send("", "_writeStream", []));
  2780. smalltalk.send(self, "_visit_", [aNode]);
  2781. return smalltalk.send(self['@stream'], "_contents", []);
  2782. return self;},
  2783. args: ["aNode"],
  2784. source: "compileNode: aNode\x0a\x09stream := '' writeStream.\x0a\x09self visit: aNode.\x0a\x09^stream contents",
  2785. messageSends: ["writeStream", "visit:", "contents"],
  2786. referencedClasses: []
  2787. }),
  2788. smalltalk.ImpCodeGenerator);
  2789. smalltalk.addMethod(
  2790. "_disarmAll",
  2791. smalltalk.method({
  2792. selector: "disarmAll",
  2793. category: 'compilation DSL',
  2794. fn: function () {
  2795. var self=this;
  2796. var list=nil;
  2797. var old=nil;
  2798. (list=self['@mutables']);
  2799. (self['@mutables']=smalltalk.send((smalltalk.Set || Set), "_new", []));
  2800. (old=self['@toIvar']);
  2801. smalltalk.send(list, "_do_", [(function(each){var value=nil;
  2802. (self['@toIvar']=each);(value=smalltalk.send(self['@ivarAliases'], "_at_", [each]));return smalltalk.send(self, "_assign_", [value]);})]);
  2803. (self['@toIvar']=old);
  2804. return self;},
  2805. args: [],
  2806. source: "disarmAll\x0a| list old |\x0a\x09list := mutables.\x0a\x09mutables := Set new.\x0a\x09old := toIvar.\x0a\x09list do: [ :each | | value |\x0a\x09\x09toIvar := each.\x0a\x09\x09value := ivarAliases at: each.\x0a\x09\x09self assign: value\x0a\x09].\x0a\x09toIvar := old",
  2807. messageSends: ["new", "do:", "at:", "assign:"],
  2808. referencedClasses: ["Set"]
  2809. }),
  2810. smalltalk.ImpCodeGenerator);
  2811. smalltalk.addMethod(
  2812. "_initialize",
  2813. smalltalk.method({
  2814. selector: "initialize",
  2815. category: 'initialization',
  2816. fn: function () {
  2817. var self=this;
  2818. smalltalk.send(self, "_initialize", [], smalltalk.ImpCodeGenerator.superclass || nil);
  2819. (self['@stream']=smalltalk.send("", "_writeStream", []));
  2820. (self['@unknownVariables']=[]);
  2821. (self['@tempVariables']=[]);
  2822. (self['@argVariables']=[]);
  2823. (self['@messageSends']=[]);
  2824. (self['@classReferenced']=[]);
  2825. (self['@mutables']=smalltalk.send((smalltalk.Set || Set), "_new", []));
  2826. (self['@assigned']=smalltalk.send((smalltalk.Set || Set), "_new", []));
  2827. (self['@ivarAliases']=smalltalk.send((smalltalk.HashedCollection || HashedCollection), "_new", []));
  2828. (self['@toIvar']=nil);
  2829. return self;},
  2830. args: [],
  2831. source: "initialize\x0a\x09super initialize.\x0a\x09stream := '' writeStream. \x0a\x09unknownVariables := #().\x0a\x09tempVariables := #().\x0a\x09argVariables := #().\x0a\x09messageSends := #().\x0a\x09classReferenced := #().\x0a\x09mutables := Set new.\x0a\x09assigned := Set new.\x0a\x09ivarAliases := HashedCollection new.\x0a\x09toIvar := nil\x0a",
  2832. messageSends: ["initialize", "writeStream", "new"],
  2833. referencedClasses: ["Set", "HashedCollection"]
  2834. }),
  2835. smalltalk.ImpCodeGenerator);
  2836. smalltalk.addMethod(
  2837. "_inline_receiver_argumentNodes_",
  2838. smalltalk.method({
  2839. selector: "inline:receiver:argumentNodes:",
  2840. category: 'optimizations',
  2841. fn: function (aSelector, receiver, aCollection) {
  2842. var self=this;
  2843. var $early={};
  2844. 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 (($receiver = self['@toIvar']) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_aliasMutable_", ["nil"]);})() : nil;})]);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 (($receiver = self['@toIvar']) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_aliasMutable_", ["nil"]);})() : nil;})]);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 (($receiver = self['@toIvar']) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_aliasMutable_", ["nil"]);})() : nil;})]);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 (($receiver = self['@toIvar']) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_aliasMutable_", ["nil"]);})() : nil;})]);return (function(){throw $early=[true]})();})]));})]));
  2845. ((($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 (($receiver = self['@toIvar']) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_aliasMutable_", ["nil"]);})() : nil;})]);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 (($receiver = self['@toIvar']) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_aliasMutable_", ["nil"]);})() : nil;})]);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 (($receiver = self['@toIvar']) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_aliasMutable_", ["nil"]);})() : nil;})]);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 (($receiver = self['@toIvar']) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_aliasMutable_", ["nil"]);})() : nil;})]);return (function(){throw $early=[true]})();})]));})]));
  2846. ((($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]})();})]));})]));
  2847. ((($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]})();})]));})]));
  2848. ((($receiver = smalltalk.send(aSelector, "__eq", ["<"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){var operand=nil;
  2849. (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, "_aliasMutable_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("(", "__comma", [smalltalk.send(self, "_useIvar_", [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;
  2850. (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, "_aliasMutable_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("(", "__comma", [smalltalk.send(self, "_useIvar_", [receiver])]), "__comma", ["<"]), "__comma", [operand]), "__comma", [")"])]);})]);return (function(){throw $early=[[smalltalk.send(smalltalk.send((smalltalk.VerbatimNode || VerbatimNode), "_new", []), "_value_", [operand])]]})();})]));
  2851. ((($receiver = smalltalk.send(aSelector, "__eq", ["<="])).klass === smalltalk.Boolean) ? ($receiver ? (function(){var operand=nil;
  2852. (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, "_aliasMutable_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("(", "__comma", [smalltalk.send(self, "_useIvar_", [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;
  2853. (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, "_aliasMutable_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("(", "__comma", [smalltalk.send(self, "_useIvar_", [receiver])]), "__comma", ["<="]), "__comma", [operand]), "__comma", [")"])]);})]);return (function(){throw $early=[[smalltalk.send(smalltalk.send((smalltalk.VerbatimNode || VerbatimNode), "_new", []), "_value_", [operand])]]})();})]));
  2854. ((($receiver = smalltalk.send(aSelector, "__eq", [">"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){var operand=nil;
  2855. (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, "_aliasMutable_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("(", "__comma", [smalltalk.send(self, "_useIvar_", [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;
  2856. (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, "_aliasMutable_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("(", "__comma", [smalltalk.send(self, "_useIvar_", [receiver])]), "__comma", [">"]), "__comma", [operand]), "__comma", [")"])]);})]);return (function(){throw $early=[[smalltalk.send(smalltalk.send((smalltalk.VerbatimNode || VerbatimNode), "_new", []), "_value_", [operand])]]})();})]));
  2857. ((($receiver = smalltalk.send(aSelector, "__eq", [">="])).klass === smalltalk.Boolean) ? ($receiver ? (function(){var operand=nil;
  2858. (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, "_aliasMutable_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("(", "__comma", [smalltalk.send(self, "_useIvar_", [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;
  2859. (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, "_aliasMutable_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("(", "__comma", [smalltalk.send(self, "_useIvar_", [receiver])]), "__comma", [">="]), "__comma", [operand]), "__comma", [")"])]);})]);return (function(){throw $early=[[smalltalk.send(smalltalk.send((smalltalk.VerbatimNode || VerbatimNode), "_new", []), "_value_", [operand])]]})();})]));
  2860. ((($receiver = smalltalk.send(aSelector, "__eq", ["+"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){var operand=nil;
  2861. (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, "_aliasMutable_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("(", "__comma", [smalltalk.send(self, "_useIvar_", [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;
  2862. (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, "_aliasMutable_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("(", "__comma", [smalltalk.send(self, "_useIvar_", [receiver])]), "__comma", ["+"]), "__comma", [operand]), "__comma", [")"])]);})]);return (function(){throw $early=[[smalltalk.send(smalltalk.send((smalltalk.VerbatimNode || VerbatimNode), "_new", []), "_value_", [operand])]]})();})]));
  2863. ((($receiver = smalltalk.send(aSelector, "__eq", ["-"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){var operand=nil;
  2864. (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, "_aliasMutable_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("(", "__comma", [smalltalk.send(self, "_useIvar_", [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;
  2865. (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, "_aliasMutable_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("(", "__comma", [smalltalk.send(self, "_useIvar_", [receiver])]), "__comma", ["-"]), "__comma", [operand]), "__comma", [")"])]);})]);return (function(){throw $early=[[smalltalk.send(smalltalk.send((smalltalk.VerbatimNode || VerbatimNode), "_new", []), "_value_", [operand])]]})();})]));
  2866. ((($receiver = smalltalk.send(aSelector, "__eq", ["*"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){var operand=nil;
  2867. (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, "_aliasMutable_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("(", "__comma", [smalltalk.send(self, "_useIvar_", [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;
  2868. (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, "_aliasMutable_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("(", "__comma", [smalltalk.send(self, "_useIvar_", [receiver])]), "__comma", ["*"]), "__comma", [operand]), "__comma", [")"])]);})]);return (function(){throw $early=[[smalltalk.send(smalltalk.send((smalltalk.VerbatimNode || VerbatimNode), "_new", []), "_value_", [operand])]]})();})]));
  2869. ((($receiver = smalltalk.send(aSelector, "__eq", ["/"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){var operand=nil;
  2870. (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, "_aliasMutable_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("(", "__comma", [smalltalk.send(self, "_useIvar_", [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;
  2871. (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, "_aliasMutable_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("(", "__comma", [smalltalk.send(self, "_useIvar_", [receiver])]), "__comma", ["/"]), "__comma", [operand]), "__comma", [")"])]);})]);return (function(){throw $early=[[smalltalk.send(smalltalk.send((smalltalk.VerbatimNode || VerbatimNode), "_new", []), "_value_", [operand])]]})();})]));
  2872. return nil;
  2873. return self;
  2874. } catch(e) {if(e===$early)return e[0]; throw e}},
  2875. args: ["aSelector", "receiver", "aCollection"],
  2876. 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: [ toIvar ifNotNil: [ self aliasMutable: 'nil' ] ].\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: [ toIvar ifNotNil: [ self aliasMutable: 'nil' ] ].\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 aliasMutable: '(', (self useIvar: 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 aliasMutable: '(', (self useIvar: 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 aliasMutable: '(', (self useIvar: 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 aliasMutable: '(', (self useIvar: 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 aliasMutable: '(', (self useIvar: 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 aliasMutable: '(', (self useIvar: 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 aliasMutable: '(', (self useIvar: 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 aliasMutable: '(', (self useIvar: receiver), '/', operand, ')' ].\x0a\x09\x09^{ VerbatimNode new value: operand }].\x0a\x0a ^nil",
  2877. messageSends: ["ifTrue:", "=", "isBlockNode", "first", "checkClass:for:includeIf:", "prvPutAndElse:", "visit:", "nodes", "ifNotNil:", "aliasMutable:", "and:", "second", "isolatedUse:", "checkClass:for:", ",", "useIvar:", "value:", "new"],
  2878. referencedClasses: ["VerbatimNode"]
  2879. }),
  2880. smalltalk.ImpCodeGenerator);
  2881. smalltalk.addMethod(
  2882. "_inlineLiteral_receiverNode_argumentNodes_",
  2883. smalltalk.method({
  2884. selector: "inlineLiteral:receiverNode:argumentNodes:",
  2885. category: 'optimizations',
  2886. fn: function (aSelector, anObject, aCollection) {
  2887. var self=this;
  2888. var inlined=nil;
  2889. (inlined=false);
  2890. ((($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;
  2891. 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_ivar_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_nodes", []), "_first", []), nil]);})]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){var old=nil;
  2892. 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_ivar_", [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;
  2893. 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_ivar_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_nodes", []), "_first", []), nil]);})]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){var old=nil;
  2894. 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_ivar_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_nodes", []), "_first", []), nil]);})]);return (inlined=true);})]));})]));
  2895. ((($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;
  2896. 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_ivar_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_nodes", []), "_first", []), nil]);})]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){var old=nil;
  2897. 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_ivar_", [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;
  2898. 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_ivar_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_nodes", []), "_first", []), nil]);})]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){var old=nil;
  2899. 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_ivar_", [smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_nodes", []), "_first", []), nil]);})]);return (inlined=true);})]));})]));
  2900. ((($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);})]));})]));
  2901. ((($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);})]));})]));
  2902. ((($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);})]));})]));
  2903. ((($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;
  2904. smalltalk.send(self, "_disarmAll", []);(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, "_makeAssigned", []);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, "_alias_", [rcv]);})]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){var rcv=nil;
  2905. smalltalk.send(self, "_disarmAll", []);(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, "_makeAssigned", []);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, "_alias_", [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;
  2906. smalltalk.send(self, "_disarmAll", []);(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, "_makeAssigned", []);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, "_alias_", [rcv]);})]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){var rcv=nil;
  2907. smalltalk.send(self, "_disarmAll", []);(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, "_makeAssigned", []);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, "_alias_", [rcv]);})]);return (inlined=true);})]));})]));
  2908. ((($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;
  2909. smalltalk.send(self, "_disarmAll", []);(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, "_makeAssigned", []);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, "_alias_", [rcv]);})]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){var rcv=nil;
  2910. smalltalk.send(self, "_disarmAll", []);(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, "_makeAssigned", []);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, "_alias_", [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;
  2911. smalltalk.send(self, "_disarmAll", []);(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, "_makeAssigned", []);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, "_alias_", [rcv]);})]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){var rcv=nil;
  2912. smalltalk.send(self, "_disarmAll", []);(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, "_makeAssigned", []);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, "_alias_", [rcv]);})]);return (inlined=true);})]));})]));
  2913. ((($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;
  2914. smalltalk.send(self, "_disarmAll", []);(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, "_makeAssigned", []);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;
  2915. smalltalk.send(self, "_disarmAll", []);(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, "_makeAssigned", []);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;
  2916. smalltalk.send(self, "_disarmAll", []);(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, "_makeAssigned", []);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;
  2917. smalltalk.send(self, "_disarmAll", []);(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, "_makeAssigned", []);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);})]));})]));
  2918. ((($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;
  2919. smalltalk.send(self, "_disarmAll", []);(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, "_makeAssigned", []);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;
  2920. smalltalk.send(self, "_disarmAll", []);(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, "_makeAssigned", []);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;
  2921. smalltalk.send(self, "_disarmAll", []);(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, "_makeAssigned", []);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;
  2922. smalltalk.send(self, "_disarmAll", []);(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, "_makeAssigned", []);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);})]));})]));
  2923. ((($receiver = smalltalk.send(aSelector, "__eq", ["isNil"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){var rcv=nil;
  2924. (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, "_alias_", [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;
  2925. (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, "_alias_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("((", "__comma", [rcv]), "__comma", [") === nil || ("]), "__comma", [rcv]), "__comma", [") == null)"])]);return (inlined=true);})]));
  2926. ((($receiver = smalltalk.send(aSelector, "__eq", ["notNil"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){var rcv=nil;
  2927. (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, "_alias_", [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;
  2928. (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, "_alias_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("((", "__comma", [rcv]), "__comma", [") !== nil && ("]), "__comma", [rcv]), "__comma", [") != null)"])]);return (inlined=true);})]));
  2929. return inlined;
  2930. return self;},
  2931. args: ["aSelector", "anObject", "aCollection"],
  2932. 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 ivar: 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 ivar: 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 disarmAll.\x0a\x09\x09\x09rcv := self isolatedUse: anObject.\x0a\x09\x09\x09rcv = 'super' ifTrue: [ rcv := 'self' ].\x0a\x09\x09\x09self makeAssigned.\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 alias: rcv ].\x0a\x09\x09\x09inlined := true]].\x0a\x0a\x09(aSelector = 'ifNotNil:') ifTrue: [\x0a\x09\x09aCollection first isBlockNode ifTrue: [ | rcv |\x0a\x09\x09\x09self disarmAll.\x0a\x09\x09\x09rcv := self isolatedUse: anObject.\x0a\x09\x09\x09rcv = 'super' ifTrue: [ rcv := 'self' ].\x0a\x09\x09\x09self makeAssigned.\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 alias: 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 disarmAll.\x0a\x09\x09\x09rcv := self isolatedUse: anObject.\x0a\x09\x09\x09rcv = 'super' ifTrue: [ rcv := 'self' ].\x0a\x09\x09\x09self makeAssigned.\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 disarmAll.\x0a\x09\x09\x09rcv := self isolatedUse: anObject.\x0a\x09\x09\x09rcv = 'super' ifTrue: [ rcv := 'self' ].\x0a\x09\x09\x09self makeAssigned.\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 alias: '((', 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 alias: '((', rcv, ') !== nil && (', rcv, ') != null)'.\x0a\x09\x09inlined := true].\x0a\x0a ^inlined",
  2933. messageSends: ["ifTrue:", "=", "and:", "isBlockNode", "first", "prvWhileConditionStatement:pre:condition:post:", "nextPutAll:", ",", "mylf", "prvPutAndClose:", "visit:ivar:", "nodes", "includes:", "prvInlineNumberOperator:on:and:", "disarmAll", "isolatedUse:", "makeAssigned", "prvPutAndElse:", "visit:", "alias:", "second"],
  2934. referencedClasses: []
  2935. }),
  2936. smalltalk.ImpCodeGenerator);
  2937. smalltalk.addMethod(
  2938. "_isNode_ofClass_",
  2939. smalltalk.method({
  2940. selector: "isNode:ofClass:",
  2941. category: 'optimizations',
  2942. fn: function (aNode, aClass) {
  2943. var self=this;
  2944. 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]);})]);})]);})]);
  2945. return self;},
  2946. args: ["aNode", "aClass"],
  2947. 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]]]",
  2948. messageSends: ["and:", "isValueNode", "or:", "=", "class", "value", "currentClass"],
  2949. referencedClasses: []
  2950. }),
  2951. smalltalk.ImpCodeGenerator);
  2952. smalltalk.addMethod(
  2953. "_isolate_",
  2954. smalltalk.method({
  2955. selector: "isolate:",
  2956. category: 'compilation DSL',
  2957. fn: function (aBlock) {
  2958. var self=this;
  2959. var old=nil;
  2960. var ivar=nil;
  2961. (old=self['@toIvar']);
  2962. (ivar=(self['@toIvar']=smalltalk.send(self, "_nextIvar", [])));
  2963. smalltalk.send(aBlock, "_value", []);
  2964. (self['@toIvar']=old);
  2965. return ivar;
  2966. return self;},
  2967. args: ["aBlock"],
  2968. source: "isolate: aBlock\x0a| old ivar |\x0a\x09old := toIvar.\x0a\x09ivar := toIvar := self nextIvar.\x0a\x09aBlock value.\x0a\x09toIvar := old.\x0a\x09^ivar",
  2969. messageSends: ["nextIvar", "value"],
  2970. referencedClasses: []
  2971. }),
  2972. smalltalk.ImpCodeGenerator);
  2973. smalltalk.addMethod(
  2974. "_isolated_",
  2975. smalltalk.method({
  2976. selector: "isolated:",
  2977. category: 'compilation DSL',
  2978. fn: function (node) {
  2979. var self=this;
  2980. return smalltalk.send(self, "_visit_ivar_", [node, smalltalk.send(self, "_nextIvar", [])]);
  2981. return self;},
  2982. args: ["node"],
  2983. source: "isolated: node\x0a \x09^ self visit: node ivar: self nextIvar\x0a",
  2984. messageSends: ["visit:ivar:", "nextIvar"],
  2985. referencedClasses: []
  2986. }),
  2987. smalltalk.ImpCodeGenerator);
  2988. smalltalk.addMethod(
  2989. "_isolatedUse_",
  2990. smalltalk.method({
  2991. selector: "isolatedUse:",
  2992. category: 'compilation DSL',
  2993. fn: function (node) {
  2994. var self=this;
  2995. var old=nil;
  2996. var operand=nil;
  2997. (old=self['@toIvar']);
  2998. (self['@toIvar']=smalltalk.send(self, "_nextIvar", []));
  2999. smalltalk.send(self, "_visit_", [node]);
  3000. (operand=smalltalk.send(self, "_useIvar", []));
  3001. (self['@toIvar']=old);
  3002. return operand;
  3003. return self;},
  3004. args: ["node"],
  3005. source: "isolatedUse: node\x0a| old operand |\x0a\x09old := toIvar.\x0a\x09toIvar := self nextIvar.\x0a\x09self visit: node.\x0a\x09operand := self useIvar.\x0a\x09toIvar := old.\x0a\x09^operand",
  3006. messageSends: ["nextIvar", "visit:", "useIvar"],
  3007. referencedClasses: []
  3008. }),
  3009. smalltalk.ImpCodeGenerator);
  3010. smalltalk.addMethod(
  3011. "_knownVariables",
  3012. smalltalk.method({
  3013. selector: "knownVariables",
  3014. category: 'accessing',
  3015. fn: function () {
  3016. var self=this;
  3017. 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", []));
  3018. return self;},
  3019. args: [],
  3020. source: "knownVariables\x0a\x09^self pseudoVariables \x0a\x09\x09addAll: self tempVariables;\x0a\x09\x09addAll: self argVariables;\x0a\x09\x09yourself",
  3021. messageSends: ["addAll:", "tempVariables", "argVariables", "yourself", "pseudoVariables"],
  3022. referencedClasses: []
  3023. }),
  3024. smalltalk.ImpCodeGenerator);
  3025. smalltalk.addMethod(
  3026. "_makeAssigned",
  3027. smalltalk.method({
  3028. selector: "makeAssigned",
  3029. category: 'compilation DSL',
  3030. fn: function () {
  3031. var self=this;
  3032. ((($receiver = smalltalk.send(self['@ivarAliases'], "_includesKey_", [self['@toIvar']])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self['@ivarAliases'], "_removeKey_", [self['@toIvar']]);smalltalk.send(self['@ivarAliases'], "_at_put_", [smalltalk.send("assigned ", "__comma", [self['@toIvar']]), nil]);return smalltalk.send(self['@assigned'], "_add_", [self['@toIvar']]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self['@ivarAliases'], "_removeKey_", [self['@toIvar']]);smalltalk.send(self['@ivarAliases'], "_at_put_", [smalltalk.send("assigned ", "__comma", [self['@toIvar']]), nil]);return smalltalk.send(self['@assigned'], "_add_", [self['@toIvar']]);})]));
  3033. return self;},
  3034. args: [],
  3035. source: "makeAssigned\x0a\x09(ivarAliases includesKey: toIvar) ifTrue: [\x0a\x09\x09ivarAliases removeKey: toIvar.\x0a\x09\x09ivarAliases at: 'assigned ',toIvar put: nil.\x0a\x09\x09assigned add: toIvar ].\x0a",
  3036. messageSends: ["ifTrue:", "includesKey:", "removeKey:", "at:put:", ",", "add:"],
  3037. referencedClasses: []
  3038. }),
  3039. smalltalk.ImpCodeGenerator);
  3040. smalltalk.addMethod(
  3041. "_mylf",
  3042. smalltalk.method({
  3043. selector: "mylf",
  3044. category: 'output',
  3045. fn: function () {
  3046. var self=this;
  3047. 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", [])])]);
  3048. return self;},
  3049. args: [],
  3050. source: "mylf\x0a\x09^String lf, ((Array new: nestedBlocks+2) join: String tab)",
  3051. messageSends: [",", "lf", "join:", "new:", "+", "tab"],
  3052. referencedClasses: ["String", "Array"]
  3053. }),
  3054. smalltalk.ImpCodeGenerator);
  3055. smalltalk.addMethod(
  3056. "_nextIvar",
  3057. smalltalk.method({
  3058. selector: "nextIvar",
  3059. category: 'compilation DSL',
  3060. fn: function () {
  3061. var self=this;
  3062. var name=nil;
  3063. (name=smalltalk.send("$", "__comma", [smalltalk.send(smalltalk.send(self['@ivarAliases'], "_size", []), "_asString", [])]));
  3064. smalltalk.send(self['@ivarAliases'], "_at_put_", [name, name]);
  3065. return name;
  3066. return self;},
  3067. args: [],
  3068. source: "nextIvar\x0a\x09| name |\x0a\x09name := '$', ivarAliases size asString.\x0a\x09ivarAliases at: name put: name.\x0a\x09^name",
  3069. messageSends: [",", "asString", "size", "at:put:"],
  3070. referencedClasses: []
  3071. }),
  3072. smalltalk.ImpCodeGenerator);
  3073. smalltalk.addMethod(
  3074. "_performOptimizations",
  3075. smalltalk.method({
  3076. selector: "performOptimizations",
  3077. category: 'testing',
  3078. fn: function () {
  3079. var self=this;
  3080. return smalltalk.send(smalltalk.send(self, "_class", []), "_performOptimizations", []);
  3081. return self;},
  3082. args: [],
  3083. source: "performOptimizations\x0a\x09^self class performOptimizations",
  3084. messageSends: ["performOptimizations", "class"],
  3085. referencedClasses: []
  3086. }),
  3087. smalltalk.ImpCodeGenerator);
  3088. smalltalk.addMethod(
  3089. "_prvCheckClass_for_",
  3090. smalltalk.method({
  3091. selector: "prvCheckClass:for:",
  3092. category: 'optimizations',
  3093. fn: function (aClassName, receiver) {
  3094. var self=this;
  3095. smalltalk.send(self, "_makeAssigned", []);
  3096. smalltalk.send(self, "_disarmAll", []);
  3097. smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("if((", "__comma", [smalltalk.send(self, "_useIvar_", [receiver])]), "__comma", [").klass === smalltalk."]), "__comma", [aClassName]), "__comma", [") "])]);
  3098. return self;},
  3099. args: ["aClassName", "receiver"],
  3100. source: "prvCheckClass: aClassName for: receiver\x0a\x09self makeAssigned.\x0a\x09self disarmAll.\x0a stream nextPutAll: 'if((', (self useIvar: receiver), ').klass === smalltalk.', aClassName, ') '\x0a",
  3101. messageSends: ["makeAssigned", "disarmAll", "nextPutAll:", ",", "useIvar:"],
  3102. referencedClasses: []
  3103. }),
  3104. smalltalk.ImpCodeGenerator);
  3105. smalltalk.addMethod(
  3106. "_prvInlineNumberOperator_on_and_",
  3107. smalltalk.method({
  3108. selector: "prvInlineNumberOperator:on:and:",
  3109. category: 'optimizations',
  3110. fn: function (aSelector, receiverNode, operandNode) {
  3111. var self=this;
  3112. var $early={};
  3113. 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;
  3114. var operand=nil;
  3115. (rcv=smalltalk.send(self, "_isolated_", [receiverNode]));(operand=smalltalk.send(self, "_isolated_", [operandNode]));smalltalk.send(self, "_alias_", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_useIvar_", [rcv]), "__comma", [aSelector]), "__comma", [smalltalk.send(self, "_useIvar_", [operand])])]);return (function(){throw $early=[true]})();})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){var rcv=nil;
  3116. var operand=nil;
  3117. (rcv=smalltalk.send(self, "_isolated_", [receiverNode]));(operand=smalltalk.send(self, "_isolated_", [operandNode]));smalltalk.send(self, "_alias_", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_useIvar_", [rcv]), "__comma", [aSelector]), "__comma", [smalltalk.send(self, "_useIvar_", [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;
  3118. var operand=nil;
  3119. (rcv=smalltalk.send(self, "_isolated_", [receiverNode]));(operand=smalltalk.send(self, "_isolated_", [operandNode]));smalltalk.send(self, "_alias_", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_useIvar_", [rcv]), "__comma", [aSelector]), "__comma", [smalltalk.send(self, "_useIvar_", [operand])])]);return (function(){throw $early=[true]})();})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){var rcv=nil;
  3120. var operand=nil;
  3121. (rcv=smalltalk.send(self, "_isolated_", [receiverNode]));(operand=smalltalk.send(self, "_isolated_", [operandNode]));smalltalk.send(self, "_alias_", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_useIvar_", [rcv]), "__comma", [aSelector]), "__comma", [smalltalk.send(self, "_useIvar_", [operand])])]);return (function(){throw $early=[true]})();})]));})]));
  3122. return false;
  3123. return self;
  3124. } catch(e) {if(e===$early)return e[0]; throw e}},
  3125. args: ["aSelector", "receiverNode", "operandNode"],
  3126. 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 alias: ((self useIvar: rcv), aSelector, (self useIvar: operand)).\x0a\x09\x09\x09^true]].\x0a\x09^false\x0a",
  3127. messageSends: ["ifTrue:", "=", "isNode:ofClass:", "isolated:", "alias:", ",", "useIvar:"],
  3128. referencedClasses: ["Number"]
  3129. }),
  3130. smalltalk.ImpCodeGenerator);
  3131. smalltalk.addMethod(
  3132. "_prvPutAndClose_",
  3133. smalltalk.method({
  3134. selector: "prvPutAndClose:",
  3135. category: 'output',
  3136. fn: function (aBlock) {
  3137. var self=this;
  3138. smalltalk.send(aBlock, "_value", []);
  3139. smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send("}", "__comma", [smalltalk.send(self, "_mylf", [])])]);
  3140. return self;},
  3141. args: ["aBlock"],
  3142. source: "prvPutAndClose: aBlock\x0a\x0a\x09aBlock value.\x0a\x09stream nextPutAll: '}', self mylf\x0a",
  3143. messageSends: ["value", "nextPutAll:", ",", "mylf"],
  3144. referencedClasses: []
  3145. }),
  3146. smalltalk.ImpCodeGenerator);
  3147. smalltalk.addMethod(
  3148. "_prvPutAndElse_",
  3149. smalltalk.method({
  3150. selector: "prvPutAndElse:",
  3151. category: 'output',
  3152. fn: function (aBlock) {
  3153. var self=this;
  3154. smalltalk.send(aBlock, "_value", []);
  3155. smalltalk.send(self['@stream'], "_nextPutAll_", ["} else {"]);
  3156. return self;},
  3157. args: ["aBlock"],
  3158. source: "prvPutAndElse: aBlock\x0a\x0a\x09aBlock value.\x0a\x09stream nextPutAll: '} else {'\x0a",
  3159. messageSends: ["value", "nextPutAll:"],
  3160. referencedClasses: []
  3161. }),
  3162. smalltalk.ImpCodeGenerator);
  3163. smalltalk.addMethod(
  3164. "_prvWhileConditionStatement_pre_condition_post_",
  3165. smalltalk.method({
  3166. selector: "prvWhileConditionStatement:pre:condition:post:",
  3167. category: 'optimizations',
  3168. fn: function (stmtString, preString, anObject, postString) {
  3169. var self=this;
  3170. var x=nil;
  3171. smalltalk.send(self['@stream'], "_nextPutAll_", [stmtString]);
  3172. (x=smalltalk.send(self, "_isolatedUse_", [smalltalk.send(smalltalk.send(anObject, "_nodes", []), "_first", [])]));
  3173. smalltalk.send(x, "_ifEmpty_", [(function(){return (x="\x22should not reach - receiver includes ^\x22");})]);
  3174. smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(preString, "__comma", [x]), "__comma", [postString])]);
  3175. (($receiver = self['@toIvar']) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_alias_", ["nil"]);})() : nil;
  3176. return self;},
  3177. args: ["stmtString", "preString", "anObject", "postString"],
  3178. 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\x09toIvar ifNotNil: [ self alias: 'nil' ]\x0a",
  3179. messageSends: ["nextPutAll:", "isolatedUse:", "first", "nodes", "ifEmpty:", ",", "ifNotNil:", "alias:"],
  3180. referencedClasses: []
  3181. }),
  3182. smalltalk.ImpCodeGenerator);
  3183. smalltalk.addMethod(
  3184. "_putTemps_",
  3185. smalltalk.method({
  3186. selector: "putTemps:",
  3187. category: 'output',
  3188. fn: function (temps) {
  3189. var self=this;
  3190. smalltalk.send(temps, "_ifNotEmpty_", [(function(){smalltalk.send(self['@stream'], "_nextPutAll_", ["var "]);smalltalk.send(temps, "_do_separatedBy_", [(function(each){var temp=nil;
  3191. (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", [])])]);})]);
  3192. return self;},
  3193. args: ["temps"],
  3194. 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 ]",
  3195. messageSends: ["ifNotEmpty:", "nextPutAll:", "do:separatedBy:", "safeVariableNameFor:", "add:", ",", "mylf"],
  3196. referencedClasses: []
  3197. }),
  3198. smalltalk.ImpCodeGenerator);
  3199. smalltalk.addMethod(
  3200. "_send_to_arguments_superSend_",
  3201. smalltalk.method({
  3202. selector: "send:to:arguments:superSend:",
  3203. category: 'visiting',
  3204. fn: function (aSelector, aReceiver, aCollection, aBoolean) {
  3205. var self=this;
  3206. var args=nil;
  3207. (args=smalltalk.send(self, "_isolate_", [(function(){return smalltalk.send(self, "_arrayOfValues_", [aCollection]);})]));
  3208. smalltalk.send(self, "_aliasMutable_", [smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(str){smalltalk.send(str, "_nextPutAll_", ["smalltalk.send("]);smalltalk.send(str, "_nextPutAll_", [smalltalk.send(self, "_useIvar_", [aReceiver])]);smalltalk.send(str, "_nextPutAll_", [smalltalk.send(smalltalk.send(", \x22", "__comma", [smalltalk.send(aSelector, "_asSelector", [])]), "__comma", ["\x22, "])]);smalltalk.send(str, "_nextPutAll_", [smalltalk.send(self, "_useIvar_", [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_", [")"]);})])]);
  3209. return self;},
  3210. args: ["aSelector", "aReceiver", "aCollection", "aBoolean"],
  3211. source: "send: aSelector to: aReceiver arguments: aCollection superSend: aBoolean\x0a\x09| args |\x0a\x09args := self isolate: [ self arrayOfValues: aCollection ].\x0a\x09self aliasMutable: (String streamContents: [ :str |\x0a\x09\x09str nextPutAll: 'smalltalk.send('.\x0a\x09\x09str nextPutAll: (self useIvar: aReceiver).\x0a\x09\x09str nextPutAll: ', \x22', aSelector asSelector, '\x22, '.\x0a\x09\x09str nextPutAll: (self useIvar: args).\x0a\x09\x09aBoolean ifTrue: [\x0a\x09\x09\x09str nextPutAll: ', smalltalk.', (self classNameFor: self currentClass superclass)].\x0a\x09\x09str nextPutAll: ')'\x0a\x09])",
  3212. messageSends: ["isolate:", "arrayOfValues:", "aliasMutable:", "streamContents:", "nextPutAll:", "useIvar:", ",", "asSelector", "ifTrue:", "classNameFor:", "superclass", "currentClass"],
  3213. referencedClasses: ["String"]
  3214. }),
  3215. smalltalk.ImpCodeGenerator);
  3216. smalltalk.addMethod(
  3217. "_sequenceOfNodes_temps_",
  3218. smalltalk.method({
  3219. selector: "sequenceOfNodes:temps:",
  3220. category: 'visiting',
  3221. fn: function (nodes, temps) {
  3222. var self=this;
  3223. ((($receiver = smalltalk.send(nodes, "_isEmpty", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){var old=nil;
  3224. var index=nil;
  3225. smalltalk.send(self, "_putTemps_", [temps]);(old=self['@toIvar']);(self['@toIvar']=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 (self['@toIvar']=old);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (self['@toIvar']=old);})]));return smalltalk.send(self, "_visit_", [each]);})]);})() : (function(){return (($receiver = self['@toIvar']) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_alias_", ["nil"]);})() : nil;})()) : smalltalk.send($receiver, "_ifFalse_ifTrue_", [(function(){var old=nil;
  3226. var index=nil;
  3227. smalltalk.send(self, "_putTemps_", [temps]);(old=self['@toIvar']);(self['@toIvar']=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 (self['@toIvar']=old);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (self['@toIvar']=old);})]));return smalltalk.send(self, "_visit_", [each]);})]);}), (function(){return (($receiver = self['@toIvar']) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_alias_", ["nil"]);})() : nil;})]));
  3228. return self;},
  3229. args: ["nodes", "temps"],
  3230. source: "sequenceOfNodes: nodes temps: temps\x0a\x09nodes isEmpty\x0a\x09\x09ifFalse: [ | old index |\x0a\x09\x09\x09self putTemps: temps.\x0a\x09\x09\x09old := toIvar.\x0a\x09\x09\x09toIvar := 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: [ toIvar := old ].\x0a\x09\x09\x09self visit: each ]]\x0a\x09\x09ifTrue: [ toIvar ifNotNil: [ self alias: 'nil' ]]\x0a",
  3231. messageSends: ["ifFalse:ifTrue:", "isEmpty", "putTemps:", "do:", "+", "ifTrue:", "=", "size", "visit:", "ifNotNil:", "alias:"],
  3232. referencedClasses: []
  3233. }),
  3234. smalltalk.ImpCodeGenerator);
  3235. smalltalk.addMethod(
  3236. "_tempVariables",
  3237. smalltalk.method({
  3238. selector: "tempVariables",
  3239. category: 'accessing',
  3240. fn: function () {
  3241. var self=this;
  3242. return smalltalk.send(self['@tempVariables'], "_copy", []);
  3243. return self;},
  3244. args: [],
  3245. source: "tempVariables\x0a\x09^tempVariables copy",
  3246. messageSends: ["copy"],
  3247. referencedClasses: []
  3248. }),
  3249. smalltalk.ImpCodeGenerator);
  3250. smalltalk.addMethod(
  3251. "_unknownVariables",
  3252. smalltalk.method({
  3253. selector: "unknownVariables",
  3254. category: 'accessing',
  3255. fn: function () {
  3256. var self=this;
  3257. return smalltalk.send(self['@unknownVariables'], "_copy", []);
  3258. return self;},
  3259. args: [],
  3260. source: "unknownVariables\x0a\x09^unknownVariables copy",
  3261. messageSends: ["copy"],
  3262. referencedClasses: []
  3263. }),
  3264. smalltalk.ImpCodeGenerator);
  3265. smalltalk.addMethod(
  3266. "_useIvar",
  3267. smalltalk.method({
  3268. selector: "useIvar",
  3269. category: 'compilation DSL',
  3270. fn: function () {
  3271. var self=this;
  3272. return smalltalk.send(self, "_useIvarIfAbsent_", [(function(){return smalltalk.send(self, "_error_", [smalltalk.send("Absent ivar: ", "__comma", [self['@toIvar']])]);})]);
  3273. return self;},
  3274. args: [],
  3275. source: "useIvar\x0a\x09^self useIvarIfAbsent: [ self error: 'Absent ivar: ', toIvar ]",
  3276. messageSends: ["useIvarIfAbsent:", "error:", ","],
  3277. referencedClasses: []
  3278. }),
  3279. smalltalk.ImpCodeGenerator);
  3280. smalltalk.addMethod(
  3281. "_useIvar_",
  3282. smalltalk.method({
  3283. selector: "useIvar:",
  3284. category: 'compilation DSL',
  3285. fn: function (ivar) {
  3286. var self=this;
  3287. var old=nil;
  3288. var result=nil;
  3289. (old=self['@toIvar']);
  3290. (self['@toIvar']=ivar);
  3291. (result=smalltalk.send(self, "_useIvar", []));
  3292. (self['@toIvar']=old);
  3293. return result;
  3294. return self;},
  3295. args: ["ivar"],
  3296. source: "useIvar: ivar\x0a| old result |\x0a\x09old := toIvar.\x0a\x09toIvar := ivar.\x0a\x09result := self useIvar.\x0a\x09toIvar := old.\x0a\x09^ result\x0a",
  3297. messageSends: ["useIvar"],
  3298. referencedClasses: []
  3299. }),
  3300. smalltalk.ImpCodeGenerator);
  3301. smalltalk.addMethod(
  3302. "_useIvarIfAbsent_",
  3303. smalltalk.method({
  3304. selector: "useIvarIfAbsent:",
  3305. category: 'compilation DSL',
  3306. fn: function (aBlock) {
  3307. var self=this;
  3308. var $early={};
  3309. try{var val=nil;
  3310. ((($receiver = smalltalk.send(self['@assigned'], "_includes_", [self['@toIvar']])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (function(){throw $early=[self['@toIvar']]})();})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (function(){throw $early=[self['@toIvar']]})();})]));
  3311. smalltalk.send(self['@mutables'], "_remove_", [self['@toIvar']]);
  3312. return smalltalk.send(self['@ivarAliases'], "_at_ifAbsent_", [self['@toIvar'], aBlock]);
  3313. return self;
  3314. } catch(e) {if(e===$early)return e[0]; throw e}},
  3315. args: ["aBlock"],
  3316. source: "useIvarIfAbsent: aBlock\x0a| val |\x0a\x09(assigned includes: toIvar) ifTrue: [ ^toIvar ].\x0a\x09mutables remove: toIvar.\x0a\x09^ivarAliases at: toIvar ifAbsent: aBlock\x0a",
  3317. messageSends: ["ifTrue:", "includes:", "remove:", "at:ifAbsent:"],
  3318. referencedClasses: []
  3319. }),
  3320. smalltalk.ImpCodeGenerator);
  3321. smalltalk.addMethod(
  3322. "_visit_",
  3323. smalltalk.method({
  3324. selector: "visit:",
  3325. category: 'visiting',
  3326. fn: function (aNode) {
  3327. var self=this;
  3328. smalltalk.send(aNode, "_accept_", [self]);
  3329. return self;},
  3330. args: ["aNode"],
  3331. source: "visit: aNode\x0a\x09aNode accept: self",
  3332. messageSends: ["accept:"],
  3333. referencedClasses: []
  3334. }),
  3335. smalltalk.ImpCodeGenerator);
  3336. smalltalk.addMethod(
  3337. "_visit_ivar_",
  3338. smalltalk.method({
  3339. selector: "visit:ivar:",
  3340. category: 'compilation DSL',
  3341. fn: function (aNode, aString) {
  3342. var self=this;
  3343. var old=nil;
  3344. (old=self['@toIvar']);
  3345. (self['@toIvar']=aString);
  3346. smalltalk.send(self, "_visit_", [aNode]);
  3347. (self['@toIvar']=old);
  3348. return aString;
  3349. return self;},
  3350. args: ["aNode", "aString"],
  3351. source: "visit: aNode ivar: aString\x0a| old |\x0a\x09old := toIvar.\x0a\x09toIvar := aString.\x0a\x09self visit: aNode.\x0a\x09toIvar := old.\x0a\x09^ aString",
  3352. messageSends: ["visit:"],
  3353. referencedClasses: []
  3354. }),
  3355. smalltalk.ImpCodeGenerator);
  3356. smalltalk.addMethod(
  3357. "_visitAssignmentNode_",
  3358. smalltalk.method({
  3359. selector: "visitAssignmentNode:",
  3360. category: 'visiting',
  3361. fn: function (aNode) {
  3362. var self=this;
  3363. var olds=nil;
  3364. var oldt=nil;
  3365. (olds=self['@stream']);
  3366. (oldt=self['@toIvar']);
  3367. (self['@stream']=smalltalk.send("", "_writeStream", []));
  3368. (self['@toIvar']=smalltalk.send(self, "_nextIvar", []));
  3369. smalltalk.send(self, "_visit_", [smalltalk.send(aNode, "_left", [])]);
  3370. smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(self['@ivarAliases'], "_at_", [self['@toIvar']]), "_~_eq", [self['@toIvar']])]);
  3371. (self['@toIvar']=smalltalk.send(self, "_useIvar", []));
  3372. smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(self['@ivarAliases'], "_includesKey_", [self['@toIvar']]), "_not", [])]);
  3373. (self['@stream']=olds);
  3374. smalltalk.send(self, "_visit_", [smalltalk.send(aNode, "_right", [])]);
  3375. (olds=self['@toIvar']);
  3376. (self['@toIvar']=oldt);
  3377. (($receiver = self['@toIvar']) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_aliasMutable_", [olds]);})() : nil;
  3378. return self;},
  3379. args: ["aNode"],
  3380. source: "visitAssignmentNode: aNode\x0a| olds oldt |\x0a\x09olds := stream.\x0a\x09oldt := toIvar.\x0a\x09stream := '' writeStream.\x0a\x09toIvar := self nextIvar.\x0a\x09self visit: aNode left.\x0a\x09self assert: (ivarAliases at: toIvar) ~= toIvar.\x0a\x09toIvar := self useIvar.\x0a\x09self assert: (ivarAliases includesKey: toIvar) not.\x0a\x09stream := olds.\x0a\x09self visit: aNode right.\x0a\x09olds := toIvar.\x0a\x09toIvar := oldt.\x0a\x09toIvar ifNotNil: [ self aliasMutable: olds ]",
  3381. messageSends: ["writeStream", "nextIvar", "visit:", "left", "assert:", "~=", "at:", "useIvar", "not", "includesKey:", "right", "ifNotNil:", "aliasMutable:"],
  3382. referencedClasses: []
  3383. }),
  3384. smalltalk.ImpCodeGenerator);
  3385. smalltalk.addMethod(
  3386. "_visitBlockNode_",
  3387. smalltalk.method({
  3388. selector: "visitBlockNode:",
  3389. category: 'visiting',
  3390. fn: function (aNode) {
  3391. var self=this;
  3392. var oldt=nil;
  3393. var olds=nil;
  3394. var oldm=nil;
  3395. smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_size", []), "__eq", [(1)])]);
  3396. (oldt=self['@toIvar']);
  3397. (self['@toIvar']="^");
  3398. (olds=self['@stream']);
  3399. (self['@stream']=smalltalk.send("", "_writeStream", []));
  3400. smalltalk.send(self['@stream'], "_nextPutAll_", ["(function("]);
  3401. 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_", [", "]);})]);
  3402. smalltalk.send(self['@stream'], "_nextPutAll_", ["){"]);
  3403. (self['@nestedBlocks']=((($receiver = self['@nestedBlocks']).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));
  3404. (oldm=self['@mutables']);
  3405. (self['@mutables']=smalltalk.send((smalltalk.Set || Set), "_new", []));
  3406. smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_first", [])]);
  3407. smalltalk.send(self, "_assert_", [smalltalk.send(self['@mutables'], "_isEmpty", [])]);
  3408. (self['@mutables']=oldm);
  3409. (self['@nestedBlocks']=((($receiver = self['@nestedBlocks']).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])));
  3410. smalltalk.send(self['@stream'], "_nextPutAll_", ["})"]);
  3411. (self['@toIvar']=oldt);
  3412. (oldt=smalltalk.send(self['@stream'], "_contents", []));
  3413. (self['@stream']=olds);
  3414. smalltalk.send(self, "_aliasMutable_", [oldt]);
  3415. return self;},
  3416. args: ["aNode"],
  3417. source: "visitBlockNode: aNode\x0a| oldt olds oldm |\x0a\x09self assert: aNode nodes size = 1.\x0a\x09oldt := toIvar.\x0a\x09toIvar := '^'.\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\x09toIvar := oldt.\x0a\x09oldt := stream contents.\x0a\x09stream := olds.\x0a\x09self aliasMutable: oldt",
  3418. messageSends: ["assert:", "=", "size", "nodes", "writeStream", "nextPutAll:", "do:separatedBy:", "parameters", "add:", "+", "new", "visit:", "first", "isEmpty", "-", "contents", "aliasMutable:"],
  3419. referencedClasses: ["Set"]
  3420. }),
  3421. smalltalk.ImpCodeGenerator);
  3422. smalltalk.addMethod(
  3423. "_visitBlockSequenceNode_",
  3424. smalltalk.method({
  3425. selector: "visitBlockSequenceNode:",
  3426. category: 'visiting',
  3427. fn: function (aNode) {
  3428. var self=this;
  3429. smalltalk.send(self, "_sequenceOfNodes_temps_", [smalltalk.send(aNode, "_nodes", []), smalltalk.send(aNode, "_temps", [])]);
  3430. return self;},
  3431. args: ["aNode"],
  3432. source: "visitBlockSequenceNode: aNode\x0a\x09self sequenceOfNodes: aNode nodes temps: aNode temps",
  3433. messageSends: ["sequenceOfNodes:temps:", "nodes", "temps"],
  3434. referencedClasses: []
  3435. }),
  3436. smalltalk.ImpCodeGenerator);
  3437. smalltalk.addMethod(
  3438. "_visitCascadeNode_",
  3439. smalltalk.method({
  3440. selector: "visitCascadeNode:",
  3441. category: 'visiting',
  3442. fn: function (aNode) {
  3443. var self=this;
  3444. var rcv=nil;
  3445. (rcv=smalltalk.send(self, "_isolated_", [smalltalk.send(aNode, "_receiver", [])]));
  3446. smalltalk.send(self, "_disarmAll", []);
  3447. (rcv=smalltalk.send(self, "_useIvar_", [rcv]));
  3448. smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_do_", [(function(each){return smalltalk.send(each, "_receiver_", [smalltalk.send(smalltalk.send((smalltalk.VerbatimNode || VerbatimNode), "_new", []), "_value_", [rcv])]);})]);
  3449. smalltalk.send(self, "_sequenceOfNodes_temps_", [smalltalk.send(aNode, "_nodes", []), []]);
  3450. return self;},
  3451. args: ["aNode"],
  3452. source: "visitCascadeNode: aNode\x0a\x09| rcv |\x0a\x09rcv := self isolated: aNode receiver.\x0a\x09self disarmAll.\x0a\x09rcv := self useIvar: rcv.\x0a\x09aNode nodes do: [:each |\x0a\x09\x09each receiver: (VerbatimNode new value: rcv) ].\x0a\x09self sequenceOfNodes: aNode nodes temps: #()",
  3453. messageSends: ["isolated:", "receiver", "disarmAll", "useIvar:", "do:", "nodes", "receiver:", "value:", "new", "sequenceOfNodes:temps:"],
  3454. referencedClasses: ["VerbatimNode"]
  3455. }),
  3456. smalltalk.ImpCodeGenerator);
  3457. smalltalk.addMethod(
  3458. "_visitClassReferenceNode_",
  3459. smalltalk.method({
  3460. selector: "visitClassReferenceNode:",
  3461. category: 'visiting',
  3462. fn: function (aNode) {
  3463. var self=this;
  3464. ((($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", [])]);})]));
  3465. smalltalk.send(self, "_aliasMutable_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("(smalltalk.", "__comma", [smalltalk.send(aNode, "_value", [])]), "__comma", [" || "]), "__comma", [smalltalk.send(aNode, "_value", [])]), "__comma", [")"])]);
  3466. return self;},
  3467. args: ["aNode"],
  3468. source: "visitClassReferenceNode: aNode\x0a\x09(referencedClasses includes: aNode value) ifFalse: [\x0a\x09\x09referencedClasses add: aNode value].\x0a\x09self aliasMutable: '(smalltalk.', aNode value, ' || ', aNode value, ')'\x0a",
  3469. messageSends: ["ifFalse:", "includes:", "value", "add:", "aliasMutable:", ","],
  3470. referencedClasses: []
  3471. }),
  3472. smalltalk.ImpCodeGenerator);
  3473. smalltalk.addMethod(
  3474. "_visitDynamicArrayNode_",
  3475. smalltalk.method({
  3476. selector: "visitDynamicArrayNode:",
  3477. category: 'visiting',
  3478. fn: function (aNode) {
  3479. var self=this;
  3480. smalltalk.send(self, "_arrayOfValues_", [smalltalk.send(aNode, "_nodes", [])]);
  3481. return self;},
  3482. args: ["aNode"],
  3483. source: "visitDynamicArrayNode: aNode\x0a\x09self arrayOfValues: aNode nodes",
  3484. messageSends: ["arrayOfValues:", "nodes"],
  3485. referencedClasses: []
  3486. }),
  3487. smalltalk.ImpCodeGenerator);
  3488. smalltalk.addMethod(
  3489. "_visitDynamicDictionaryNode_",
  3490. smalltalk.method({
  3491. selector: "visitDynamicDictionaryNode:",
  3492. category: 'visiting',
  3493. fn: function (aNode) {
  3494. var self=this;
  3495. var elements=nil;
  3496. (elements=smalltalk.send(self, "_isolate_", [(function(){return smalltalk.send(self, "_arrayOfValues_", [smalltalk.send(aNode, "_nodes", [])]);})]));
  3497. smalltalk.send(self, "_alias_", [smalltalk.send(smalltalk.send("smalltalk.HashedCollection._fromPairs_(", "__comma", [smalltalk.send(self, "_useIvar_", [elements])]), "__comma", [")"])]);
  3498. return self;},
  3499. args: ["aNode"],
  3500. source: "visitDynamicDictionaryNode: aNode\x0a\x09| elements |\x0a\x09elements := self isolate: [ self arrayOfValues: aNode nodes ].\x0a\x09self alias: 'smalltalk.HashedCollection._fromPairs_(', (self useIvar: elements), ')'\x0a",
  3501. messageSends: ["isolate:", "arrayOfValues:", "nodes", "alias:", ",", "useIvar:"],
  3502. referencedClasses: []
  3503. }),
  3504. smalltalk.ImpCodeGenerator);
  3505. smalltalk.addMethod(
  3506. "_visitFailure_",
  3507. smalltalk.method({
  3508. selector: "visitFailure:",
  3509. category: 'visiting',
  3510. fn: function (aFailure) {
  3511. var self=this;
  3512. smalltalk.send(self, "_error_", [smalltalk.send(aFailure, "_asString", [])]);
  3513. return self;},
  3514. args: ["aFailure"],
  3515. source: "visitFailure: aFailure\x0a\x09self error: aFailure asString",
  3516. messageSends: ["error:", "asString"],
  3517. referencedClasses: []
  3518. }),
  3519. smalltalk.ImpCodeGenerator);
  3520. smalltalk.addMethod(
  3521. "_visitJSStatementNode_",
  3522. smalltalk.method({
  3523. selector: "visitJSStatementNode:",
  3524. category: 'visiting',
  3525. fn: function (aNode) {
  3526. var self=this;
  3527. smalltalk.send(self, "_disarmAll", []);
  3528. 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", [])])]);
  3529. return self;},
  3530. args: ["aNode"],
  3531. source: "visitJSStatementNode: aNode\x0a\x09self disarmAll.\x0a\x09stream nextPutAll: ';', (aNode source replace: '>>' with: '>'), ';', self mylf",
  3532. messageSends: ["disarmAll", "nextPutAll:", ",", "replace:with:", "source", "mylf"],
  3533. referencedClasses: []
  3534. }),
  3535. smalltalk.ImpCodeGenerator);
  3536. smalltalk.addMethod(
  3537. "_visitMethodNode_",
  3538. smalltalk.method({
  3539. selector: "visitMethodNode:",
  3540. category: 'visiting',
  3541. fn: function (aNode) {
  3542. var self=this;
  3543. var str=nil;
  3544. var currentSelector=nil;
  3545. (self['@currentSelector']=smalltalk.send(smalltalk.send(aNode, "_selector", []), "_asSelector", []));
  3546. (self['@nestedBlocks']=(0));
  3547. (self['@earlyReturn']=false);
  3548. (self['@messageSends']=[]);
  3549. (self['@referencedClasses']=[]);
  3550. (self['@unknownVariables']=[]);
  3551. (self['@tempVariables']=[]);
  3552. (self['@argVariables']=[]);
  3553. (self['@ivarAliases']=smalltalk.send((smalltalk.HashedCollection || HashedCollection), "_new", []));
  3554. (self['@mutables']=smalltalk.send((smalltalk.Set || Set), "_new", []));
  3555. (self['@assigned']=smalltalk.send((smalltalk.Set || Set), "_new", []));
  3556. (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']);
  3557. (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']);
  3558. smalltalk.send(self['@stream'], "_nextPutAll_", ["fn: function("]);
  3559. 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_", [", "]);})]);
  3560. smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send("){var self=this;", "__comma", [smalltalk.send(self, "_mylf", [])])]);
  3561. (str=self['@stream']);
  3562. (self['@stream']=smalltalk.send("", "_writeStream", []));
  3563. (self['@toIvar']=nil);
  3564. smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_size", []), "__eq", [(1)])]);
  3565. smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_first", [])]);
  3566. smalltalk.send(self['@assigned'], "_ifNotEmpty_", [(function(){return smalltalk.send(str, "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send("var ", "__comma", [smalltalk.send(smalltalk.send(self['@assigned'], "_asArray", []), "_join_", [","])]), "__comma", [";"]), "__comma", [smalltalk.send(self, "_mylf", [])])]);})]);
  3567. ((($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", [])])]);})]));
  3568. smalltalk.send(str, "_nextPutAll_", [smalltalk.send(self['@stream'], "_contents", [])]);
  3569. (self['@stream']=str);
  3570. ((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_first", []), "_nodes", []), "_notEmpty", []), "_and_", [(function(){var checker=nil;
  3571. (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(){(self['@toIvar']="^");smalltalk.send(self, "_alias_", ["self"]);return (self['@toIvar']=nil);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){(self['@toIvar']="^");smalltalk.send(self, "_alias_", ["self"]);return (self['@toIvar']=nil);})]));
  3572. ((($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}"]);})]));
  3573. smalltalk.send(self['@stream'], "_nextPutAll_", ["}"]);
  3574. (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']);
  3575. 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_", [","]);})]);
  3576. smalltalk.send(self['@stream'], "_nextPutAll_", ["]"]);
  3577. smalltalk.send(self['@stream'], "_nextPutAll_", ["})"]);
  3578. smalltalk.send(self, "_assert_", [smalltalk.send(self['@mutables'], "_isEmpty", [])]);
  3579. return self;},
  3580. args: ["aNode"],
  3581. 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\x09ivarAliases := HashedCollection new.\x0a\x09mutables := Set new.\x0a\x09assigned := 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\x09toIvar := nil.\x0a\x09self assert: aNode nodes size = 1.\x0a\x09self visit: aNode nodes first.\x0a\x09assigned ifNotEmpty: [ str nextPutAll: 'var ', (assigned 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: [ toIvar := '^'. self alias: 'self'. toIvar := 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",
  3582. messageSends: ["asSelector", "selector", "new", "nextPutAll:", "lf", ",", "asJavascript", "source", "do:separatedBy:", "arguments", "add:", "mylf", "writeStream", "assert:", "=", "size", "nodes", "visit:", "first", "ifNotEmpty:", "join:", "asArray", "ifTrue:", "contents", "ifFalse:", "and:", "notEmpty", "last", "wasReturnNode", "alias:", "printString", "isEmpty"],
  3583. referencedClasses: ["HashedCollection", "Set", "ReturnNodeChecker", "String"]
  3584. }),
  3585. smalltalk.ImpCodeGenerator);
  3586. smalltalk.addMethod(
  3587. "_visitReturnNode_",
  3588. smalltalk.method({
  3589. selector: "visitReturnNode:",
  3590. category: 'visiting',
  3591. fn: function (aNode) {
  3592. var self=this;
  3593. smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_size", []), "__eq", [(1)])]);
  3594. ((($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);})]));
  3595. smalltalk.send(self, "_visit_ivar_", [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 "^";})]))]);
  3596. smalltalk.send(self, "_alias_", [""]);
  3597. return self;},
  3598. args: ["aNode"],
  3599. 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\x09ivar: (nestedBlocks > 0 ifTrue: ['!'] ifFalse: ['^']).\x0a\x09self alias: ''\x0a",
  3600. messageSends: ["assert:", "=", "size", "nodes", "ifTrue:", ">", "visit:ivar:", "first", "ifTrue:ifFalse:", "alias:"],
  3601. referencedClasses: []
  3602. }),
  3603. smalltalk.ImpCodeGenerator);
  3604. smalltalk.addMethod(
  3605. "_visitSendNode_",
  3606. smalltalk.method({
  3607. selector: "visitSendNode:",
  3608. category: 'visiting',
  3609. fn: function (aNode) {
  3610. var self=this;
  3611. var $early={};
  3612. try{var receiver=nil;
  3613. var superSend=nil;
  3614. var rcv=nil;
  3615. ((($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", [])]);})]));
  3616. ((($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]})();})]));})]));
  3617. (rcv=smalltalk.send(self, "_isolated_", [smalltalk.send(aNode, "_receiver", [])]));
  3618. (superSend=smalltalk.send(smalltalk.send(self['@ivarAliases'], "_at_ifAbsent_", [rcv, (function(){return nil;})]), "__eq", ["super"]));
  3619. ((($receiver = superSend).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self['@mutables'], "_remove_", [rcv]);return smalltalk.send(self['@ivarAliases'], "_at_put_", [rcv, "self"]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self['@mutables'], "_remove_", [rcv]);return smalltalk.send(self['@ivarAliases'], "_at_put_", [rcv, "self"]);})]));
  3620. ((($receiver = smalltalk.send(self, "_performOptimizations", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){var inline=nil;
  3621. (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;
  3622. (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;
  3623. (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;
  3624. (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;})]));
  3625. smalltalk.send(self, "_send_to_arguments_superSend_", [smalltalk.send(aNode, "_selector", []), rcv, smalltalk.send(aNode, "_arguments", []), superSend]);
  3626. return self;
  3627. } catch(e) {if(e===$early)return e[0]; throw e}},
  3628. args: ["aNode"],
  3629. 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 := (ivarAliases at: rcv ifAbsent: []) = 'super'.\x0a superSend ifTrue: [ mutables remove: rcv. ivarAliases 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",
  3630. 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:"],
  3631. referencedClasses: []
  3632. }),
  3633. smalltalk.ImpCodeGenerator);
  3634. smalltalk.addMethod(
  3635. "_visitSequenceNode_",
  3636. smalltalk.method({
  3637. selector: "visitSequenceNode:",
  3638. category: 'visiting',
  3639. fn: function (aNode) {
  3640. var self=this;
  3641. ((($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", [])]);})]));
  3642. return self;},
  3643. args: ["aNode"],
  3644. source: "visitSequenceNode: aNode\x0a\x09aNode nodes isEmpty ifFalse: [\x0a\x09\x09self sequenceOfNodes: aNode nodes temps: aNode temps ]\x0a",
  3645. messageSends: ["ifFalse:", "isEmpty", "nodes", "sequenceOfNodes:temps:", "temps"],
  3646. referencedClasses: []
  3647. }),
  3648. smalltalk.ImpCodeGenerator);
  3649. smalltalk.addMethod(
  3650. "_visitValueNode_",
  3651. smalltalk.method({
  3652. selector: "visitValueNode:",
  3653. category: 'visiting',
  3654. fn: function (aNode) {
  3655. var self=this;
  3656. smalltalk.send(self, "_alias_", [smalltalk.send(smalltalk.send(aNode, "_value", []), "_asJavascript", [])]);
  3657. return self;},
  3658. args: ["aNode"],
  3659. source: "visitValueNode: aNode\x0a\x09self alias: aNode value asJavascript",
  3660. messageSends: ["alias:", "asJavascript", "value"],
  3661. referencedClasses: []
  3662. }),
  3663. smalltalk.ImpCodeGenerator);
  3664. smalltalk.addMethod(
  3665. "_visitVariableNode_",
  3666. smalltalk.method({
  3667. selector: "visitVariableNode:",
  3668. category: 'visiting',
  3669. fn: function (aNode) {
  3670. var self=this;
  3671. var varName=nil;
  3672. ((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(self, "_currentClass", []), "_allInstanceVariableNames", []), "_includes_", [smalltalk.send(aNode, "_value", [])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_aliasMutable_", [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, "_aliasMutable_", [varName]);})() : (function(){return smalltalk.send(self, "_aliasMutable_", [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, "_aliasMutable_", [varName]);}), (function(){return smalltalk.send(self, "_aliasMutable_", [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, "_aliasMutable_", ["(smalltalk.getThisContext())"]);})() : (function(){return ((($receiver = smalltalk.send(smalltalk.send(self, "_pseudoVariables", []), "_includes_", [varName])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_alias_", [varName]);})() : (function(){return smalltalk.send(self, "_aliasMutable_", [varName]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_alias_", [varName]);}), (function(){return smalltalk.send(self, "_aliasMutable_", [varName]);})]));})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_aliasMutable_", ["(smalltalk.getThisContext())"]);}), (function(){return ((($receiver = smalltalk.send(smalltalk.send(self, "_pseudoVariables", []), "_includes_", [varName])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_alias_", [varName]);})() : (function(){return smalltalk.send(self, "_aliasMutable_", [varName]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_alias_", [varName]);}), (function(){return smalltalk.send(self, "_aliasMutable_", [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, "_aliasMutable_", [varName]);})() : (function(){return smalltalk.send(self, "_aliasMutable_", [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, "_aliasMutable_", [varName]);}), (function(){return smalltalk.send(self, "_aliasMutable_", [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, "_aliasMutable_", ["(smalltalk.getThisContext())"]);})() : (function(){return ((($receiver = smalltalk.send(smalltalk.send(self, "_pseudoVariables", []), "_includes_", [varName])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_alias_", [varName]);})() : (function(){return smalltalk.send(self, "_aliasMutable_", [varName]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_alias_", [varName]);}), (function(){return smalltalk.send(self, "_aliasMutable_", [varName]);})]));})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_aliasMutable_", ["(smalltalk.getThisContext())"]);}), (function(){return ((($receiver = smalltalk.send(smalltalk.send(self, "_pseudoVariables", []), "_includes_", [varName])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_alias_", [varName]);})() : (function(){return smalltalk.send(self, "_aliasMutable_", [varName]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_alias_", [varName]);}), (function(){return smalltalk.send(self, "_aliasMutable_", [varName]);})]));})]));})]));})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_aliasMutable_", [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, "_aliasMutable_", [varName]);})() : (function(){return smalltalk.send(self, "_aliasMutable_", [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, "_aliasMutable_", [varName]);}), (function(){return smalltalk.send(self, "_aliasMutable_", [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, "_aliasMutable_", ["(smalltalk.getThisContext())"]);})() : (function(){return ((($receiver = smalltalk.send(smalltalk.send(self, "_pseudoVariables", []), "_includes_", [varName])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_alias_", [varName]);})() : (function(){return smalltalk.send(self, "_aliasMutable_", [varName]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_alias_", [varName]);}), (function(){return smalltalk.send(self, "_aliasMutable_", [varName]);})]));})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_aliasMutable_", ["(smalltalk.getThisContext())"]);}), (function(){return ((($receiver = smalltalk.send(smalltalk.send(self, "_pseudoVariables", []), "_includes_", [varName])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_alias_", [varName]);})() : (function(){return smalltalk.send(self, "_aliasMutable_", [varName]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_alias_", [varName]);}), (function(){return smalltalk.send(self, "_aliasMutable_", [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, "_aliasMutable_", [varName]);})() : (function(){return smalltalk.send(self, "_aliasMutable_", [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, "_aliasMutable_", [varName]);}), (function(){return smalltalk.send(self, "_aliasMutable_", [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, "_aliasMutable_", ["(smalltalk.getThisContext())"]);})() : (function(){return ((($receiver = smalltalk.send(smalltalk.send(self, "_pseudoVariables", []), "_includes_", [varName])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_alias_", [varName]);})() : (function(){return smalltalk.send(self, "_aliasMutable_", [varName]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_alias_", [varName]);}), (function(){return smalltalk.send(self, "_aliasMutable_", [varName]);})]));})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_aliasMutable_", ["(smalltalk.getThisContext())"]);}), (function(){return ((($receiver = smalltalk.send(smalltalk.send(self, "_pseudoVariables", []), "_includes_", [varName])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_alias_", [varName]);})() : (function(){return smalltalk.send(self, "_aliasMutable_", [varName]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_alias_", [varName]);}), (function(){return smalltalk.send(self, "_aliasMutable_", [varName]);})]));})]));})]));})]));
  3673. return self;},
  3674. args: ["aNode"],
  3675. source: "visitVariableNode: aNode\x0a\x09| varName |\x0a\x09(self currentClass allInstanceVariableNames includes: aNode value) \x0a\x09\x09ifTrue: [self aliasMutable: '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 aliasMutable: varName]\x0a \x09\x09ifFalse: [self aliasMutable: '(typeof ', varName, ' == ''undefined'' ? nil : ', varName, ')']]\x0a \x09\x09ifTrue: [\x0a \x09aNode value = 'thisContext'\x0a \x09\x09ifTrue: [self aliasMutable: '(smalltalk.getThisContext())']\x0a \x09\x09\x09\x09ifFalse: [(self pseudoVariables includes: varName)\x0a\x09\x09\x09\x09\x09\x09\x09ifTrue: [ self alias: varName ]\x0a\x09\x09\x09\x09\x09\x09\x09ifFalse: [ self aliasMutable: varName]]]]",
  3676. messageSends: ["ifTrue:ifFalse:", "includes:", "allInstanceVariableNames", "currentClass", "value", "aliasMutable:", ",", "safeVariableNameFor:", "ifFalse:ifTrue:", "knownVariables", "add:", "assigned", "=", "pseudoVariables", "alias:"],
  3677. referencedClasses: []
  3678. }),
  3679. smalltalk.ImpCodeGenerator);
  3680. smalltalk.addMethod(
  3681. "_visitVerbatimNode_",
  3682. smalltalk.method({
  3683. selector: "visitVerbatimNode:",
  3684. category: 'visiting',
  3685. fn: function (aNode) {
  3686. var self=this;
  3687. smalltalk.send(self, "_alias_", [smalltalk.send(aNode, "_value", [])]);
  3688. return self;},
  3689. args: ["aNode"],
  3690. source: "visitVerbatimNode: aNode\x0a\x09self alias: aNode value",
  3691. messageSends: ["alias:", "value"],
  3692. referencedClasses: []
  3693. }),
  3694. smalltalk.ImpCodeGenerator);
  3695. smalltalk.ImpCodeGenerator.klass.iVarNames = ['performOptimizations'];
  3696. smalltalk.addMethod(
  3697. "_performOptimizations",
  3698. smalltalk.method({
  3699. selector: "performOptimizations",
  3700. category: 'accessing',
  3701. fn: function () {
  3702. var self=this;
  3703. return (($receiver = self['@performOptimizations']) == nil || $receiver == undefined) ? (function(){return true;})() : $receiver;
  3704. return self;},
  3705. args: [],
  3706. source: "performOptimizations\x0a\x09^performOptimizations ifNil: [true]",
  3707. messageSends: ["ifNil:"],
  3708. referencedClasses: []
  3709. }),
  3710. smalltalk.ImpCodeGenerator.klass);
  3711. smalltalk.addMethod(
  3712. "_performOptimizations_",
  3713. smalltalk.method({
  3714. selector: "performOptimizations:",
  3715. category: 'accessing',
  3716. fn: function (aBoolean) {
  3717. var self=this;
  3718. (self['@performOptimizations']=aBoolean);
  3719. return self;},
  3720. args: ["aBoolean"],
  3721. source: "performOptimizations: aBoolean\x0a\x09performOptimizations := aBoolean",
  3722. messageSends: [],
  3723. referencedClasses: []
  3724. }),
  3725. smalltalk.ImpCodeGenerator.klass);
  3726. smalltalk.addClass('ReturnNodeChecker', smalltalk.NodeVisitor, ['wasReturnNode'], 'Compiler');
  3727. smalltalk.addMethod(
  3728. "_initialize",
  3729. smalltalk.method({
  3730. selector: "initialize",
  3731. category: 'initializing',
  3732. fn: function () {
  3733. var self=this;
  3734. (self['@wasReturnNode']=false);
  3735. return self;},
  3736. args: [],
  3737. source: "initialize\x0a\x09wasReturnNode := false",
  3738. messageSends: [],
  3739. referencedClasses: []
  3740. }),
  3741. smalltalk.ReturnNodeChecker);
  3742. smalltalk.addMethod(
  3743. "_visitReturnNode_",
  3744. smalltalk.method({
  3745. selector: "visitReturnNode:",
  3746. category: 'visiting',
  3747. fn: function (aNode) {
  3748. var self=this;
  3749. (self['@wasReturnNode']=true);
  3750. return self;},
  3751. args: ["aNode"],
  3752. source: "visitReturnNode: aNode\x0a\x09wasReturnNode := true",
  3753. messageSends: [],
  3754. referencedClasses: []
  3755. }),
  3756. smalltalk.ReturnNodeChecker);
  3757. smalltalk.addMethod(
  3758. "_wasReturnNode",
  3759. smalltalk.method({
  3760. selector: "wasReturnNode",
  3761. category: 'accessing',
  3762. fn: function () {
  3763. var self=this;
  3764. return self['@wasReturnNode'];
  3765. return self;},
  3766. args: [],
  3767. source: "wasReturnNode\x0a\x09^wasReturnNode",
  3768. messageSends: [],
  3769. referencedClasses: []
  3770. }),
  3771. smalltalk.ReturnNodeChecker);