Compiler.js 333 KB

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