Compiler-IR.deploy.js 83 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623
  1. smalltalk.addPackage('Compiler-IR', {});
  2. smalltalk.addClass('IRASTTranslator', smalltalk.NodeVisitor, ['source', 'theClass', 'method', 'sequence', 'nextAlias'], 'Compiler-IR');
  3. smalltalk.addMethod(
  4. "_alias_",
  5. smalltalk.method({
  6. selector: "alias:",
  7. fn: function (aNode){
  8. var self=this;
  9. var variable;
  10. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5,$6,$7;
  11. $1=_st(aNode)._isImmutable();
  12. if(smalltalk.assert($1)){
  13. $2=_st(self)._visit_(aNode);
  14. return $2;
  15. };
  16. $3=_st((smalltalk.IRVariable || IRVariable))._new();
  17. _st($3)._variable_(_st(_st((smalltalk.AliasVar || AliasVar))._new())._name_(_st("$").__comma(_st(self)._nextAlias())));
  18. $4=_st($3)._yourself();
  19. variable=$4;
  20. $5=_st((smalltalk.IRAssignment || IRAssignment))._new();
  21. _st($5)._add_(variable);
  22. _st($5)._add_(_st(self)._visit_(aNode));
  23. $6=_st($5)._yourself();
  24. _st(_st(self)._sequence())._add_($6);
  25. _st(_st(_st(self)._method())._internalVariables())._add_(variable);
  26. $7=variable;
  27. return $7;
  28. }, function($ctx1) {$ctx1.fill(self,"alias:",{aNode:aNode,variable:variable}, smalltalk.IRASTTranslator)})}
  29. }),
  30. smalltalk.IRASTTranslator);
  31. smalltalk.addMethod(
  32. "_aliasTemporally_",
  33. smalltalk.method({
  34. selector: "aliasTemporally:",
  35. fn: function (aCollection){
  36. var self=this;
  37. var threshold,result;
  38. return smalltalk.withContext(function($ctx1) { var $1,$3,$2,$4,$6,$8,$7,$5,$9;
  39. threshold=(0);
  40. $1=aCollection;
  41. $2=(function(each,i){
  42. return smalltalk.withContext(function($ctx2) { $3=_st(each)._subtreeNeedsAliasing();
  43. if(smalltalk.assert($3)){
  44. threshold=i;
  45. return threshold;
  46. };
  47. }, function($ctx2) {$ctx2.fillBlock({each:each,i:i},$ctx1)})});
  48. _st($1)._withIndexDo_($2);
  49. result=_st((smalltalk.OrderedCollection || OrderedCollection))._new();
  50. $4=aCollection;
  51. $5=(function(each,i){
  52. return smalltalk.withContext(function($ctx2) { $6=result;
  53. $8=_st(i).__lt_eq(threshold);
  54. if(smalltalk.assert($8)){
  55. $7=_st(self)._alias_(each);
  56. } else {
  57. $7=_st(self)._visit_(each);
  58. };
  59. return _st($6)._add_($7);
  60. }, function($ctx2) {$ctx2.fillBlock({each:each,i:i},$ctx1)})});
  61. _st($4)._withIndexDo_($5);
  62. $9=result;
  63. return $9;
  64. }, function($ctx1) {$ctx1.fill(self,"aliasTemporally:",{aCollection:aCollection,threshold:threshold,result:result}, smalltalk.IRASTTranslator)})}
  65. }),
  66. smalltalk.IRASTTranslator);
  67. smalltalk.addMethod(
  68. "_method",
  69. smalltalk.method({
  70. selector: "method",
  71. fn: function (){
  72. var self=this;
  73. return smalltalk.withContext(function($ctx1) { var $1;
  74. $1=self["@method"];
  75. return $1;
  76. }, function($ctx1) {$ctx1.fill(self,"method",{}, smalltalk.IRASTTranslator)})}
  77. }),
  78. smalltalk.IRASTTranslator);
  79. smalltalk.addMethod(
  80. "_method_",
  81. smalltalk.method({
  82. selector: "method:",
  83. fn: function (anIRMethod){
  84. var self=this;
  85. return smalltalk.withContext(function($ctx1) { self["@method"]=anIRMethod;
  86. return self}, function($ctx1) {$ctx1.fill(self,"method:",{anIRMethod:anIRMethod}, smalltalk.IRASTTranslator)})}
  87. }),
  88. smalltalk.IRASTTranslator);
  89. smalltalk.addMethod(
  90. "_nextAlias",
  91. smalltalk.method({
  92. selector: "nextAlias",
  93. fn: function (){
  94. var self=this;
  95. return smalltalk.withContext(function($ctx1) { var $1,$2;
  96. $1=self["@nextAlias"];
  97. if(($receiver = $1) == nil || $receiver == undefined){
  98. self["@nextAlias"]=(0);
  99. self["@nextAlias"];
  100. } else {
  101. $1;
  102. };
  103. self["@nextAlias"]=_st(self["@nextAlias"]).__plus((1));
  104. $2=_st(self["@nextAlias"])._asString();
  105. return $2;
  106. }, function($ctx1) {$ctx1.fill(self,"nextAlias",{}, smalltalk.IRASTTranslator)})}
  107. }),
  108. smalltalk.IRASTTranslator);
  109. smalltalk.addMethod(
  110. "_sequence",
  111. smalltalk.method({
  112. selector: "sequence",
  113. fn: function (){
  114. var self=this;
  115. return smalltalk.withContext(function($ctx1) { var $1;
  116. $1=self["@sequence"];
  117. return $1;
  118. }, function($ctx1) {$ctx1.fill(self,"sequence",{}, smalltalk.IRASTTranslator)})}
  119. }),
  120. smalltalk.IRASTTranslator);
  121. smalltalk.addMethod(
  122. "_sequence_",
  123. smalltalk.method({
  124. selector: "sequence:",
  125. fn: function (anIRSequence){
  126. var self=this;
  127. return smalltalk.withContext(function($ctx1) { self["@sequence"]=anIRSequence;
  128. return self}, function($ctx1) {$ctx1.fill(self,"sequence:",{anIRSequence:anIRSequence}, smalltalk.IRASTTranslator)})}
  129. }),
  130. smalltalk.IRASTTranslator);
  131. smalltalk.addMethod(
  132. "_source",
  133. smalltalk.method({
  134. selector: "source",
  135. fn: function (){
  136. var self=this;
  137. return smalltalk.withContext(function($ctx1) { var $1;
  138. $1=self["@source"];
  139. return $1;
  140. }, function($ctx1) {$ctx1.fill(self,"source",{}, smalltalk.IRASTTranslator)})}
  141. }),
  142. smalltalk.IRASTTranslator);
  143. smalltalk.addMethod(
  144. "_source_",
  145. smalltalk.method({
  146. selector: "source:",
  147. fn: function (aString){
  148. var self=this;
  149. return smalltalk.withContext(function($ctx1) { self["@source"]=aString;
  150. return self}, function($ctx1) {$ctx1.fill(self,"source:",{aString:aString}, smalltalk.IRASTTranslator)})}
  151. }),
  152. smalltalk.IRASTTranslator);
  153. smalltalk.addMethod(
  154. "_theClass",
  155. smalltalk.method({
  156. selector: "theClass",
  157. fn: function (){
  158. var self=this;
  159. return smalltalk.withContext(function($ctx1) { var $1;
  160. $1=self["@theClass"];
  161. return $1;
  162. }, function($ctx1) {$ctx1.fill(self,"theClass",{}, smalltalk.IRASTTranslator)})}
  163. }),
  164. smalltalk.IRASTTranslator);
  165. smalltalk.addMethod(
  166. "_theClass_",
  167. smalltalk.method({
  168. selector: "theClass:",
  169. fn: function (aClass){
  170. var self=this;
  171. return smalltalk.withContext(function($ctx1) { self["@theClass"]=aClass;
  172. return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass}, smalltalk.IRASTTranslator)})}
  173. }),
  174. smalltalk.IRASTTranslator);
  175. smalltalk.addMethod(
  176. "_visitAssignmentNode_",
  177. smalltalk.method({
  178. selector: "visitAssignmentNode:",
  179. fn: function (aNode){
  180. var self=this;
  181. var left,right,assignment;
  182. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  183. right=_st(self)._visit_(_st(aNode)._right());
  184. left=_st(self)._visit_(_st(aNode)._left());
  185. $1=_st((smalltalk.IRAssignment || IRAssignment))._new();
  186. _st($1)._add_(left);
  187. _st($1)._add_(right);
  188. $2=_st($1)._yourself();
  189. _st(_st(self)._sequence())._add_($2);
  190. $3=left;
  191. return $3;
  192. }, function($ctx1) {$ctx1.fill(self,"visitAssignmentNode:",{aNode:aNode,left:left,right:right,assignment:assignment}, smalltalk.IRASTTranslator)})}
  193. }),
  194. smalltalk.IRASTTranslator);
  195. smalltalk.addMethod(
  196. "_visitBlockNode_",
  197. smalltalk.method({
  198. selector: "visitBlockNode:",
  199. fn: function (aNode){
  200. var self=this;
  201. var closure;
  202. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5;
  203. $1=_st((smalltalk.IRClosure || IRClosure))._new();
  204. _st($1)._arguments_(_st(aNode)._parameters());
  205. _st($1)._scope_(_st(aNode)._scope());
  206. $2=_st($1)._yourself();
  207. closure=$2;
  208. _st(_st(_st(aNode)._scope())._temps())._do_((function(each){
  209. return smalltalk.withContext(function($ctx2) { $3=_st((smalltalk.IRTempDeclaration || IRTempDeclaration))._new();
  210. _st($3)._name_(_st(each)._name());
  211. _st($3)._scope_(_st(aNode)._scope());
  212. $4=_st($3)._yourself();
  213. return _st(closure)._add_($4);
  214. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  215. _st(_st(aNode)._nodes())._do_((function(each){
  216. return smalltalk.withContext(function($ctx2) { return _st(closure)._add_(_st(self)._visit_(each));
  217. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  218. $5=closure;
  219. return $5;
  220. }, function($ctx1) {$ctx1.fill(self,"visitBlockNode:",{aNode:aNode,closure:closure}, smalltalk.IRASTTranslator)})}
  221. }),
  222. smalltalk.IRASTTranslator);
  223. smalltalk.addMethod(
  224. "_visitBlockSequenceNode_",
  225. smalltalk.method({
  226. selector: "visitBlockSequenceNode:",
  227. fn: function (aNode){
  228. var self=this;
  229. return smalltalk.withContext(function($ctx1) { var $2,$3,$5,$7,$8,$9,$6,$4,$1;
  230. $2=self;
  231. $3=_st((smalltalk.IRBlockSequence || IRBlockSequence))._new();
  232. $4=(function(){
  233. return smalltalk.withContext(function($ctx2) { $5=_st(aNode)._nodes();
  234. $6=(function(){
  235. return smalltalk.withContext(function($ctx3) { _st(_st(_st(aNode)._nodes())._allButLast())._do_((function(each){
  236. return smalltalk.withContext(function($ctx4) { return _st(_st(self)._sequence())._add_(_st(self)._visit_(each));
  237. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx1)})}));
  238. $7=_st(_st(_st(aNode)._nodes())._last())._isReturnNode();
  239. if(smalltalk.assert($7)){
  240. return _st(_st(self)._sequence())._add_(_st(self)._visit_(_st(_st(aNode)._nodes())._last()));
  241. } else {
  242. $8=_st((smalltalk.IRBlockReturn || IRBlockReturn))._new();
  243. _st($8)._add_(_st(self)._visit_(_st(_st(aNode)._nodes())._last()));
  244. $9=_st($8)._yourself();
  245. return _st(_st(self)._sequence())._add_($9);
  246. };
  247. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})});
  248. return _st($5)._ifNotEmpty_($6);
  249. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
  250. $1=_st($2)._withSequence_do_($3,$4);
  251. return $1;
  252. }, function($ctx1) {$ctx1.fill(self,"visitBlockSequenceNode:",{aNode:aNode}, smalltalk.IRASTTranslator)})}
  253. }),
  254. smalltalk.IRASTTranslator);
  255. smalltalk.addMethod(
  256. "_visitCascadeNode_",
  257. smalltalk.method({
  258. selector: "visitCascadeNode:",
  259. fn: function (aNode){
  260. var self=this;
  261. var alias;
  262. return smalltalk.withContext(function($ctx1) { var $1,$2;
  263. $1=_st(_st(aNode)._receiver())._isImmutable();
  264. if(! smalltalk.assert($1)){
  265. alias=_st(self)._alias_(_st(aNode)._receiver());
  266. alias;
  267. _st(_st(aNode)._nodes())._do_((function(each){
  268. return smalltalk.withContext(function($ctx2) { return _st(each)._receiver_(_st(_st((smalltalk.VariableNode || VariableNode))._new())._binding_(_st(alias)._variable()));
  269. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  270. };
  271. _st(_st(_st(aNode)._nodes())._allButLast())._do_((function(each){
  272. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._sequence())._add_(_st(self)._visit_(each));
  273. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  274. $2=_st(self)._alias_(_st(_st(aNode)._nodes())._last());
  275. return $2;
  276. }, function($ctx1) {$ctx1.fill(self,"visitCascadeNode:",{aNode:aNode,alias:alias}, smalltalk.IRASTTranslator)})}
  277. }),
  278. smalltalk.IRASTTranslator);
  279. smalltalk.addMethod(
  280. "_visitDynamicArrayNode_",
  281. smalltalk.method({
  282. selector: "visitDynamicArrayNode:",
  283. fn: function (aNode){
  284. var self=this;
  285. var array;
  286. return smalltalk.withContext(function($ctx1) { var $1;
  287. array=_st((smalltalk.IRDynamicArray || IRDynamicArray))._new();
  288. _st(_st(self)._aliasTemporally_(_st(aNode)._nodes()))._do_((function(each){
  289. return smalltalk.withContext(function($ctx2) { return _st(array)._add_(each);
  290. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  291. $1=array;
  292. return $1;
  293. }, function($ctx1) {$ctx1.fill(self,"visitDynamicArrayNode:",{aNode:aNode,array:array}, smalltalk.IRASTTranslator)})}
  294. }),
  295. smalltalk.IRASTTranslator);
  296. smalltalk.addMethod(
  297. "_visitDynamicDictionaryNode_",
  298. smalltalk.method({
  299. selector: "visitDynamicDictionaryNode:",
  300. fn: function (aNode){
  301. var self=this;
  302. var dictionary;
  303. return smalltalk.withContext(function($ctx1) { var $1;
  304. dictionary=_st((smalltalk.IRDynamicDictionary || IRDynamicDictionary))._new();
  305. _st(_st(self)._aliasTemporally_(_st(aNode)._nodes()))._do_((function(each){
  306. return smalltalk.withContext(function($ctx2) { return _st(dictionary)._add_(each);
  307. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  308. $1=dictionary;
  309. return $1;
  310. }, function($ctx1) {$ctx1.fill(self,"visitDynamicDictionaryNode:",{aNode:aNode,dictionary:dictionary}, smalltalk.IRASTTranslator)})}
  311. }),
  312. smalltalk.IRASTTranslator);
  313. smalltalk.addMethod(
  314. "_visitJSStatementNode_",
  315. smalltalk.method({
  316. selector: "visitJSStatementNode:",
  317. fn: function (aNode){
  318. var self=this;
  319. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  320. $2=_st((smalltalk.IRVerbatim || IRVerbatim))._new();
  321. _st($2)._source_(_st(aNode)._source());
  322. $3=_st($2)._yourself();
  323. $1=$3;
  324. return $1;
  325. }, function($ctx1) {$ctx1.fill(self,"visitJSStatementNode:",{aNode:aNode}, smalltalk.IRASTTranslator)})}
  326. }),
  327. smalltalk.IRASTTranslator);
  328. smalltalk.addMethod(
  329. "_visitMethodNode_",
  330. smalltalk.method({
  331. selector: "visitMethodNode:",
  332. fn: function (aNode){
  333. var self=this;
  334. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5,$6,$7,$8;
  335. $1=_st((smalltalk.IRMethod || IRMethod))._new();
  336. _st($1)._source_(_st(self)._source());
  337. _st($1)._theClass_(_st(self)._theClass());
  338. _st($1)._arguments_(_st(aNode)._arguments());
  339. _st($1)._selector_(_st(aNode)._selector());
  340. _st($1)._messageSends_(_st(aNode)._messageSends());
  341. _st($1)._superSends_(_st(aNode)._superSends());
  342. _st($1)._classReferences_(_st(aNode)._classReferences());
  343. _st($1)._scope_(_st(aNode)._scope());
  344. $2=_st($1)._yourself();
  345. _st(self)._method_($2);
  346. _st(_st(_st(aNode)._scope())._temps())._do_((function(each){
  347. return smalltalk.withContext(function($ctx2) { $3=_st((smalltalk.IRTempDeclaration || IRTempDeclaration))._new();
  348. _st($3)._name_(_st(each)._name());
  349. _st($3)._scope_(_st(aNode)._scope());
  350. $4=_st($3)._yourself();
  351. return _st(_st(self)._method())._add_($4);
  352. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  353. _st(_st(aNode)._nodes())._do_((function(each){
  354. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._method())._add_(_st(self)._visit_(each));
  355. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  356. $5=_st(_st(aNode)._scope())._hasLocalReturn();
  357. if(! smalltalk.assert($5)){
  358. $6=_st((smalltalk.IRVariable || IRVariable))._new();
  359. _st($6)._variable_(_st(_st(_st(aNode)._scope())._pseudoVars())._at_("self"));
  360. $7=_st($6)._yourself();
  361. _st(_st(_st(self)._method())._add_(_st((smalltalk.IRReturn || IRReturn))._new()))._add_($7);
  362. };
  363. $8=_st(self)._method();
  364. return $8;
  365. }, function($ctx1) {$ctx1.fill(self,"visitMethodNode:",{aNode:aNode}, smalltalk.IRASTTranslator)})}
  366. }),
  367. smalltalk.IRASTTranslator);
  368. smalltalk.addMethod(
  369. "_visitReturnNode_",
  370. smalltalk.method({
  371. selector: "visitReturnNode:",
  372. fn: function (aNode){
  373. var self=this;
  374. var return_;
  375. return smalltalk.withContext(function($ctx1) { var $1,$2;
  376. $1=_st(aNode)._nonLocalReturn();
  377. if(smalltalk.assert($1)){
  378. return_=_st((smalltalk.IRNonLocalReturn || IRNonLocalReturn))._new();
  379. } else {
  380. return_=_st((smalltalk.IRReturn || IRReturn))._new();
  381. };
  382. _st(return_)._scope_(_st(aNode)._scope());
  383. _st(_st(aNode)._nodes())._do_((function(each){
  384. return smalltalk.withContext(function($ctx2) { return _st(return_)._add_(_st(self)._alias_(each));
  385. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  386. $2=return_;
  387. return $2;
  388. }, function($ctx1) {$ctx1.fill(self,"visitReturnNode:",{aNode:aNode,return_:return_}, smalltalk.IRASTTranslator)})}
  389. }),
  390. smalltalk.IRASTTranslator);
  391. smalltalk.addMethod(
  392. "_visitSendNode_",
  393. smalltalk.method({
  394. selector: "visitSendNode:",
  395. fn: function (aNode){
  396. var self=this;
  397. var send,all,receiver,arguments;
  398. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  399. send=_st((smalltalk.IRSend || IRSend))._new();
  400. $1=send;
  401. _st($1)._selector_(_st(aNode)._selector());
  402. $2=_st($1)._index_(_st(aNode)._index());
  403. $3=_st(aNode)._superSend();
  404. if(smalltalk.assert($3)){
  405. _st(send)._classSend_(_st(_st(self)._theClass())._superclass());
  406. };
  407. all=_st(self)._aliasTemporally_(_st([_st(aNode)._receiver()]).__comma(_st(aNode)._arguments()));
  408. receiver=_st(all)._first();
  409. arguments=_st(all)._allButFirst();
  410. _st(send)._add_(receiver);
  411. _st(arguments)._do_((function(each){
  412. return smalltalk.withContext(function($ctx2) { return _st(send)._add_(each);
  413. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  414. $4=send;
  415. return $4;
  416. }, function($ctx1) {$ctx1.fill(self,"visitSendNode:",{aNode:aNode,send:send,all:all,receiver:receiver,arguments:arguments}, smalltalk.IRASTTranslator)})}
  417. }),
  418. smalltalk.IRASTTranslator);
  419. smalltalk.addMethod(
  420. "_visitSequenceNode_",
  421. smalltalk.method({
  422. selector: "visitSequenceNode:",
  423. fn: function (aNode){
  424. var self=this;
  425. return smalltalk.withContext(function($ctx1) { var $2,$3,$5,$7,$6,$4,$1;
  426. $2=self;
  427. $3=_st((smalltalk.IRSequence || IRSequence))._new();
  428. $4=(function(){
  429. return smalltalk.withContext(function($ctx2) { $5=_st(aNode)._nodes();
  430. $6=(function(each){
  431. var instruction;
  432. return smalltalk.withContext(function($ctx3) { instruction=_st(self)._visit_(each);
  433. instruction;
  434. $7=_st(instruction)._isVariable();
  435. if(! smalltalk.assert($7)){
  436. return _st(_st(self)._sequence())._add_(instruction);
  437. };
  438. }, function($ctx3) {$ctx3.fillBlock({each:each,instruction:instruction},$ctx1)})});
  439. return _st($5)._do_($6);
  440. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
  441. $1=_st($2)._withSequence_do_($3,$4);
  442. return $1;
  443. }, function($ctx1) {$ctx1.fill(self,"visitSequenceNode:",{aNode:aNode}, smalltalk.IRASTTranslator)})}
  444. }),
  445. smalltalk.IRASTTranslator);
  446. smalltalk.addMethod(
  447. "_visitValueNode_",
  448. smalltalk.method({
  449. selector: "visitValueNode:",
  450. fn: function (aNode){
  451. var self=this;
  452. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  453. $2=_st((smalltalk.IRValue || IRValue))._new();
  454. _st($2)._value_(_st(aNode)._value());
  455. $3=_st($2)._yourself();
  456. $1=$3;
  457. return $1;
  458. }, function($ctx1) {$ctx1.fill(self,"visitValueNode:",{aNode:aNode}, smalltalk.IRASTTranslator)})}
  459. }),
  460. smalltalk.IRASTTranslator);
  461. smalltalk.addMethod(
  462. "_visitVariableNode_",
  463. smalltalk.method({
  464. selector: "visitVariableNode:",
  465. fn: function (aNode){
  466. var self=this;
  467. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  468. $2=_st((smalltalk.IRVariable || IRVariable))._new();
  469. _st($2)._variable_(_st(aNode)._binding());
  470. $3=_st($2)._yourself();
  471. $1=$3;
  472. return $1;
  473. }, function($ctx1) {$ctx1.fill(self,"visitVariableNode:",{aNode:aNode}, smalltalk.IRASTTranslator)})}
  474. }),
  475. smalltalk.IRASTTranslator);
  476. smalltalk.addMethod(
  477. "_withSequence_do_",
  478. smalltalk.method({
  479. selector: "withSequence:do:",
  480. fn: function (aSequence,aBlock){
  481. var self=this;
  482. var outerSequence;
  483. return smalltalk.withContext(function($ctx1) { var $1;
  484. outerSequence=_st(self)._sequence();
  485. _st(self)._sequence_(aSequence);
  486. _st(aBlock)._value();
  487. _st(self)._sequence_(outerSequence);
  488. $1=aSequence;
  489. return $1;
  490. }, function($ctx1) {$ctx1.fill(self,"withSequence:do:",{aSequence:aSequence,aBlock:aBlock,outerSequence:outerSequence}, smalltalk.IRASTTranslator)})}
  491. }),
  492. smalltalk.IRASTTranslator);
  493. smalltalk.addClass('IRInstruction', smalltalk.Object, ['parent', 'instructions'], 'Compiler-IR');
  494. smalltalk.addMethod(
  495. "_accept_",
  496. smalltalk.method({
  497. selector: "accept:",
  498. fn: function (aVisitor){
  499. var self=this;
  500. return smalltalk.withContext(function($ctx1) { var $1;
  501. $1=_st(aVisitor)._visitIRInstruction_(self);
  502. return $1;
  503. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRInstruction)})}
  504. }),
  505. smalltalk.IRInstruction);
  506. smalltalk.addMethod(
  507. "_add_",
  508. smalltalk.method({
  509. selector: "add:",
  510. fn: function (anObject){
  511. var self=this;
  512. return smalltalk.withContext(function($ctx1) { var $1;
  513. _st(anObject)._parent_(self);
  514. $1=_st(_st(self)._instructions())._add_(anObject);
  515. return $1;
  516. }, function($ctx1) {$ctx1.fill(self,"add:",{anObject:anObject}, smalltalk.IRInstruction)})}
  517. }),
  518. smalltalk.IRInstruction);
  519. smalltalk.addMethod(
  520. "_canBeAssigned",
  521. smalltalk.method({
  522. selector: "canBeAssigned",
  523. fn: function (){
  524. var self=this;
  525. return smalltalk.withContext(function($ctx1) { return true;
  526. }, function($ctx1) {$ctx1.fill(self,"canBeAssigned",{}, smalltalk.IRInstruction)})}
  527. }),
  528. smalltalk.IRInstruction);
  529. smalltalk.addMethod(
  530. "_instructions",
  531. smalltalk.method({
  532. selector: "instructions",
  533. fn: function (){
  534. var self=this;
  535. return smalltalk.withContext(function($ctx1) { var $2,$1;
  536. $2=self["@instructions"];
  537. if(($receiver = $2) == nil || $receiver == undefined){
  538. self["@instructions"]=_st((smalltalk.OrderedCollection || OrderedCollection))._new();
  539. $1=self["@instructions"];
  540. } else {
  541. $1=$2;
  542. };
  543. return $1;
  544. }, function($ctx1) {$ctx1.fill(self,"instructions",{}, smalltalk.IRInstruction)})}
  545. }),
  546. smalltalk.IRInstruction);
  547. smalltalk.addMethod(
  548. "_isClosure",
  549. smalltalk.method({
  550. selector: "isClosure",
  551. fn: function (){
  552. var self=this;
  553. return smalltalk.withContext(function($ctx1) { return false;
  554. }, function($ctx1) {$ctx1.fill(self,"isClosure",{}, smalltalk.IRInstruction)})}
  555. }),
  556. smalltalk.IRInstruction);
  557. smalltalk.addMethod(
  558. "_isInlined",
  559. smalltalk.method({
  560. selector: "isInlined",
  561. fn: function (){
  562. var self=this;
  563. return smalltalk.withContext(function($ctx1) { return false;
  564. }, function($ctx1) {$ctx1.fill(self,"isInlined",{}, smalltalk.IRInstruction)})}
  565. }),
  566. smalltalk.IRInstruction);
  567. smalltalk.addMethod(
  568. "_isLocalReturn",
  569. smalltalk.method({
  570. selector: "isLocalReturn",
  571. fn: function (){
  572. var self=this;
  573. return smalltalk.withContext(function($ctx1) { return false;
  574. }, function($ctx1) {$ctx1.fill(self,"isLocalReturn",{}, smalltalk.IRInstruction)})}
  575. }),
  576. smalltalk.IRInstruction);
  577. smalltalk.addMethod(
  578. "_isMethod",
  579. smalltalk.method({
  580. selector: "isMethod",
  581. fn: function (){
  582. var self=this;
  583. return smalltalk.withContext(function($ctx1) { return false;
  584. }, function($ctx1) {$ctx1.fill(self,"isMethod",{}, smalltalk.IRInstruction)})}
  585. }),
  586. smalltalk.IRInstruction);
  587. smalltalk.addMethod(
  588. "_isReturn",
  589. smalltalk.method({
  590. selector: "isReturn",
  591. fn: function (){
  592. var self=this;
  593. return smalltalk.withContext(function($ctx1) { return false;
  594. }, function($ctx1) {$ctx1.fill(self,"isReturn",{}, smalltalk.IRInstruction)})}
  595. }),
  596. smalltalk.IRInstruction);
  597. smalltalk.addMethod(
  598. "_isSend",
  599. smalltalk.method({
  600. selector: "isSend",
  601. fn: function (){
  602. var self=this;
  603. return smalltalk.withContext(function($ctx1) { return false;
  604. }, function($ctx1) {$ctx1.fill(self,"isSend",{}, smalltalk.IRInstruction)})}
  605. }),
  606. smalltalk.IRInstruction);
  607. smalltalk.addMethod(
  608. "_isSequence",
  609. smalltalk.method({
  610. selector: "isSequence",
  611. fn: function (){
  612. var self=this;
  613. return smalltalk.withContext(function($ctx1) { return false;
  614. }, function($ctx1) {$ctx1.fill(self,"isSequence",{}, smalltalk.IRInstruction)})}
  615. }),
  616. smalltalk.IRInstruction);
  617. smalltalk.addMethod(
  618. "_isTempDeclaration",
  619. smalltalk.method({
  620. selector: "isTempDeclaration",
  621. fn: function (){
  622. var self=this;
  623. return smalltalk.withContext(function($ctx1) { return false;
  624. }, function($ctx1) {$ctx1.fill(self,"isTempDeclaration",{}, smalltalk.IRInstruction)})}
  625. }),
  626. smalltalk.IRInstruction);
  627. smalltalk.addMethod(
  628. "_isVariable",
  629. smalltalk.method({
  630. selector: "isVariable",
  631. fn: function (){
  632. var self=this;
  633. return smalltalk.withContext(function($ctx1) { return false;
  634. }, function($ctx1) {$ctx1.fill(self,"isVariable",{}, smalltalk.IRInstruction)})}
  635. }),
  636. smalltalk.IRInstruction);
  637. smalltalk.addMethod(
  638. "_method",
  639. smalltalk.method({
  640. selector: "method",
  641. fn: function (){
  642. var self=this;
  643. return smalltalk.withContext(function($ctx1) { var $1;
  644. $1=_st(_st(self)._parent())._method();
  645. return $1;
  646. }, function($ctx1) {$ctx1.fill(self,"method",{}, smalltalk.IRInstruction)})}
  647. }),
  648. smalltalk.IRInstruction);
  649. smalltalk.addMethod(
  650. "_parent",
  651. smalltalk.method({
  652. selector: "parent",
  653. fn: function (){
  654. var self=this;
  655. return smalltalk.withContext(function($ctx1) { var $1;
  656. $1=self["@parent"];
  657. return $1;
  658. }, function($ctx1) {$ctx1.fill(self,"parent",{}, smalltalk.IRInstruction)})}
  659. }),
  660. smalltalk.IRInstruction);
  661. smalltalk.addMethod(
  662. "_parent_",
  663. smalltalk.method({
  664. selector: "parent:",
  665. fn: function (anIRInstruction){
  666. var self=this;
  667. return smalltalk.withContext(function($ctx1) { self["@parent"]=anIRInstruction;
  668. return self}, function($ctx1) {$ctx1.fill(self,"parent:",{anIRInstruction:anIRInstruction}, smalltalk.IRInstruction)})}
  669. }),
  670. smalltalk.IRInstruction);
  671. smalltalk.addMethod(
  672. "_remove",
  673. smalltalk.method({
  674. selector: "remove",
  675. fn: function (){
  676. var self=this;
  677. return smalltalk.withContext(function($ctx1) { _st(_st(self)._parent())._remove_(self);
  678. return self}, function($ctx1) {$ctx1.fill(self,"remove",{}, smalltalk.IRInstruction)})}
  679. }),
  680. smalltalk.IRInstruction);
  681. smalltalk.addMethod(
  682. "_remove_",
  683. smalltalk.method({
  684. selector: "remove:",
  685. fn: function (anIRInstruction){
  686. var self=this;
  687. return smalltalk.withContext(function($ctx1) { _st(_st(self)._instructions())._remove_(anIRInstruction);
  688. return self}, function($ctx1) {$ctx1.fill(self,"remove:",{anIRInstruction:anIRInstruction}, smalltalk.IRInstruction)})}
  689. }),
  690. smalltalk.IRInstruction);
  691. smalltalk.addMethod(
  692. "_replace_with_",
  693. smalltalk.method({
  694. selector: "replace:with:",
  695. fn: function (anIRInstruction,anotherIRInstruction){
  696. var self=this;
  697. return smalltalk.withContext(function($ctx1) { _st(anotherIRInstruction)._parent_(self);
  698. _st(_st(self)._instructions())._at_put_(_st(_st(self)._instructions())._indexOf_(anIRInstruction),anotherIRInstruction);
  699. return self}, function($ctx1) {$ctx1.fill(self,"replace:with:",{anIRInstruction:anIRInstruction,anotherIRInstruction:anotherIRInstruction}, smalltalk.IRInstruction)})}
  700. }),
  701. smalltalk.IRInstruction);
  702. smalltalk.addMethod(
  703. "_replaceWith_",
  704. smalltalk.method({
  705. selector: "replaceWith:",
  706. fn: function (anIRInstruction){
  707. var self=this;
  708. return smalltalk.withContext(function($ctx1) { _st(_st(self)._parent())._replace_with_(self,anIRInstruction);
  709. return self}, function($ctx1) {$ctx1.fill(self,"replaceWith:",{anIRInstruction:anIRInstruction}, smalltalk.IRInstruction)})}
  710. }),
  711. smalltalk.IRInstruction);
  712. smalltalk.addMethod(
  713. "_on_",
  714. smalltalk.method({
  715. selector: "on:",
  716. fn: function (aBuilder){
  717. var self=this;
  718. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  719. $2=_st(self)._new();
  720. _st($2)._builder_(aBuilder);
  721. $3=_st($2)._yourself();
  722. $1=$3;
  723. return $1;
  724. }, function($ctx1) {$ctx1.fill(self,"on:",{aBuilder:aBuilder}, smalltalk.IRInstruction.klass)})}
  725. }),
  726. smalltalk.IRInstruction.klass);
  727. smalltalk.addClass('IRAssignment', smalltalk.IRInstruction, [], 'Compiler-IR');
  728. smalltalk.addMethod(
  729. "_accept_",
  730. smalltalk.method({
  731. selector: "accept:",
  732. fn: function (aVisitor){
  733. var self=this;
  734. return smalltalk.withContext(function($ctx1) { var $1;
  735. $1=_st(aVisitor)._visitIRAssignment_(self);
  736. return $1;
  737. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRAssignment)})}
  738. }),
  739. smalltalk.IRAssignment);
  740. smalltalk.addClass('IRDynamicArray', smalltalk.IRInstruction, [], 'Compiler-IR');
  741. smalltalk.addMethod(
  742. "_accept_",
  743. smalltalk.method({
  744. selector: "accept:",
  745. fn: function (aVisitor){
  746. var self=this;
  747. return smalltalk.withContext(function($ctx1) { var $1;
  748. $1=_st(aVisitor)._visitIRDynamicArray_(self);
  749. return $1;
  750. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRDynamicArray)})}
  751. }),
  752. smalltalk.IRDynamicArray);
  753. smalltalk.addClass('IRDynamicDictionary', smalltalk.IRInstruction, [], 'Compiler-IR');
  754. smalltalk.addMethod(
  755. "_accept_",
  756. smalltalk.method({
  757. selector: "accept:",
  758. fn: function (aVisitor){
  759. var self=this;
  760. return smalltalk.withContext(function($ctx1) { var $1;
  761. $1=_st(aVisitor)._visitIRDynamicDictionary_(self);
  762. return $1;
  763. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRDynamicDictionary)})}
  764. }),
  765. smalltalk.IRDynamicDictionary);
  766. smalltalk.addClass('IRScopedInstruction', smalltalk.IRInstruction, ['scope'], 'Compiler-IR');
  767. smalltalk.addMethod(
  768. "_scope",
  769. smalltalk.method({
  770. selector: "scope",
  771. fn: function (){
  772. var self=this;
  773. return smalltalk.withContext(function($ctx1) { var $1;
  774. $1=self["@scope"];
  775. return $1;
  776. }, function($ctx1) {$ctx1.fill(self,"scope",{}, smalltalk.IRScopedInstruction)})}
  777. }),
  778. smalltalk.IRScopedInstruction);
  779. smalltalk.addMethod(
  780. "_scope_",
  781. smalltalk.method({
  782. selector: "scope:",
  783. fn: function (aScope){
  784. var self=this;
  785. return smalltalk.withContext(function($ctx1) { self["@scope"]=aScope;
  786. return self}, function($ctx1) {$ctx1.fill(self,"scope:",{aScope:aScope}, smalltalk.IRScopedInstruction)})}
  787. }),
  788. smalltalk.IRScopedInstruction);
  789. smalltalk.addClass('IRClosureInstruction', smalltalk.IRScopedInstruction, ['arguments'], 'Compiler-IR');
  790. smalltalk.addMethod(
  791. "_arguments",
  792. smalltalk.method({
  793. selector: "arguments",
  794. fn: function (){
  795. var self=this;
  796. return smalltalk.withContext(function($ctx1) { var $2,$1;
  797. $2=self["@arguments"];
  798. if(($receiver = $2) == nil || $receiver == undefined){
  799. $1=[];
  800. } else {
  801. $1=$2;
  802. };
  803. return $1;
  804. }, function($ctx1) {$ctx1.fill(self,"arguments",{}, smalltalk.IRClosureInstruction)})}
  805. }),
  806. smalltalk.IRClosureInstruction);
  807. smalltalk.addMethod(
  808. "_arguments_",
  809. smalltalk.method({
  810. selector: "arguments:",
  811. fn: function (aCollection){
  812. var self=this;
  813. return smalltalk.withContext(function($ctx1) { self["@arguments"]=aCollection;
  814. return self}, function($ctx1) {$ctx1.fill(self,"arguments:",{aCollection:aCollection}, smalltalk.IRClosureInstruction)})}
  815. }),
  816. smalltalk.IRClosureInstruction);
  817. smalltalk.addMethod(
  818. "_locals",
  819. smalltalk.method({
  820. selector: "locals",
  821. fn: function (){
  822. var self=this;
  823. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  824. $2=_st(_st(self)._arguments())._copy();
  825. _st($2)._addAll_(_st(_st(self)._tempDeclarations())._collect_((function(each){
  826. return smalltalk.withContext(function($ctx2) { return _st(each)._name();
  827. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})));
  828. $3=_st($2)._yourself();
  829. $1=$3;
  830. return $1;
  831. }, function($ctx1) {$ctx1.fill(self,"locals",{}, smalltalk.IRClosureInstruction)})}
  832. }),
  833. smalltalk.IRClosureInstruction);
  834. smalltalk.addMethod(
  835. "_scope_",
  836. smalltalk.method({
  837. selector: "scope:",
  838. fn: function (aScope){
  839. var self=this;
  840. return smalltalk.withContext(function($ctx1) { smalltalk.IRScopedInstruction.fn.prototype._scope_.apply(_st(self), [aScope]);
  841. _st(aScope)._instruction_(self);
  842. return self}, function($ctx1) {$ctx1.fill(self,"scope:",{aScope:aScope}, smalltalk.IRClosureInstruction)})}
  843. }),
  844. smalltalk.IRClosureInstruction);
  845. smalltalk.addMethod(
  846. "_tempDeclarations",
  847. smalltalk.method({
  848. selector: "tempDeclarations",
  849. fn: function (){
  850. var self=this;
  851. return smalltalk.withContext(function($ctx1) { var $1;
  852. $1=_st(_st(self)._instructions())._select_((function(each){
  853. return smalltalk.withContext(function($ctx2) { return _st(each)._isTempDeclaration();
  854. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  855. return $1;
  856. }, function($ctx1) {$ctx1.fill(self,"tempDeclarations",{}, smalltalk.IRClosureInstruction)})}
  857. }),
  858. smalltalk.IRClosureInstruction);
  859. smalltalk.addClass('IRClosure', smalltalk.IRClosureInstruction, [], 'Compiler-IR');
  860. smalltalk.addMethod(
  861. "_accept_",
  862. smalltalk.method({
  863. selector: "accept:",
  864. fn: function (aVisitor){
  865. var self=this;
  866. return smalltalk.withContext(function($ctx1) { var $1;
  867. $1=_st(aVisitor)._visitIRClosure_(self);
  868. return $1;
  869. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRClosure)})}
  870. }),
  871. smalltalk.IRClosure);
  872. smalltalk.addMethod(
  873. "_isClosure",
  874. smalltalk.method({
  875. selector: "isClosure",
  876. fn: function (){
  877. var self=this;
  878. return smalltalk.withContext(function($ctx1) { return true;
  879. }, function($ctx1) {$ctx1.fill(self,"isClosure",{}, smalltalk.IRClosure)})}
  880. }),
  881. smalltalk.IRClosure);
  882. smalltalk.addMethod(
  883. "_sequence",
  884. smalltalk.method({
  885. selector: "sequence",
  886. fn: function (){
  887. var self=this;
  888. return smalltalk.withContext(function($ctx1) { var $1;
  889. $1=_st(_st(self)._instructions())._last();
  890. return $1;
  891. }, function($ctx1) {$ctx1.fill(self,"sequence",{}, smalltalk.IRClosure)})}
  892. }),
  893. smalltalk.IRClosure);
  894. smalltalk.addClass('IRMethod', smalltalk.IRClosureInstruction, ['theClass', 'source', 'selector', 'classReferences', 'messageSends', 'superSends', 'internalVariables'], 'Compiler-IR');
  895. smalltalk.addMethod(
  896. "_accept_",
  897. smalltalk.method({
  898. selector: "accept:",
  899. fn: function (aVisitor){
  900. var self=this;
  901. return smalltalk.withContext(function($ctx1) { var $1;
  902. $1=_st(aVisitor)._visitIRMethod_(self);
  903. return $1;
  904. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRMethod)})}
  905. }),
  906. smalltalk.IRMethod);
  907. smalltalk.addMethod(
  908. "_classReferences",
  909. smalltalk.method({
  910. selector: "classReferences",
  911. fn: function (){
  912. var self=this;
  913. return smalltalk.withContext(function($ctx1) { var $1;
  914. $1=self["@classReferences"];
  915. return $1;
  916. }, function($ctx1) {$ctx1.fill(self,"classReferences",{}, smalltalk.IRMethod)})}
  917. }),
  918. smalltalk.IRMethod);
  919. smalltalk.addMethod(
  920. "_classReferences_",
  921. smalltalk.method({
  922. selector: "classReferences:",
  923. fn: function (aCollection){
  924. var self=this;
  925. return smalltalk.withContext(function($ctx1) { self["@classReferences"]=aCollection;
  926. return self}, function($ctx1) {$ctx1.fill(self,"classReferences:",{aCollection:aCollection}, smalltalk.IRMethod)})}
  927. }),
  928. smalltalk.IRMethod);
  929. smalltalk.addMethod(
  930. "_internalVariables",
  931. smalltalk.method({
  932. selector: "internalVariables",
  933. fn: function (){
  934. var self=this;
  935. return smalltalk.withContext(function($ctx1) { var $2,$1;
  936. $2=self["@internalVariables"];
  937. if(($receiver = $2) == nil || $receiver == undefined){
  938. self["@internalVariables"]=_st((smalltalk.Set || Set))._new();
  939. $1=self["@internalVariables"];
  940. } else {
  941. $1=$2;
  942. };
  943. return $1;
  944. }, function($ctx1) {$ctx1.fill(self,"internalVariables",{}, smalltalk.IRMethod)})}
  945. }),
  946. smalltalk.IRMethod);
  947. smalltalk.addMethod(
  948. "_isMethod",
  949. smalltalk.method({
  950. selector: "isMethod",
  951. fn: function (){
  952. var self=this;
  953. return smalltalk.withContext(function($ctx1) { return true;
  954. }, function($ctx1) {$ctx1.fill(self,"isMethod",{}, smalltalk.IRMethod)})}
  955. }),
  956. smalltalk.IRMethod);
  957. smalltalk.addMethod(
  958. "_messageSends",
  959. smalltalk.method({
  960. selector: "messageSends",
  961. fn: function (){
  962. var self=this;
  963. return smalltalk.withContext(function($ctx1) { var $1;
  964. $1=self["@messageSends"];
  965. return $1;
  966. }, function($ctx1) {$ctx1.fill(self,"messageSends",{}, smalltalk.IRMethod)})}
  967. }),
  968. smalltalk.IRMethod);
  969. smalltalk.addMethod(
  970. "_messageSends_",
  971. smalltalk.method({
  972. selector: "messageSends:",
  973. fn: function (aCollection){
  974. var self=this;
  975. return smalltalk.withContext(function($ctx1) { self["@messageSends"]=aCollection;
  976. return self}, function($ctx1) {$ctx1.fill(self,"messageSends:",{aCollection:aCollection}, smalltalk.IRMethod)})}
  977. }),
  978. smalltalk.IRMethod);
  979. smalltalk.addMethod(
  980. "_method",
  981. smalltalk.method({
  982. selector: "method",
  983. fn: function (){
  984. var self=this;
  985. return smalltalk.withContext(function($ctx1) { var $1;
  986. $1=self;
  987. return $1;
  988. }, function($ctx1) {$ctx1.fill(self,"method",{}, smalltalk.IRMethod)})}
  989. }),
  990. smalltalk.IRMethod);
  991. smalltalk.addMethod(
  992. "_selector",
  993. smalltalk.method({
  994. selector: "selector",
  995. fn: function (){
  996. var self=this;
  997. return smalltalk.withContext(function($ctx1) { var $1;
  998. $1=self["@selector"];
  999. return $1;
  1000. }, function($ctx1) {$ctx1.fill(self,"selector",{}, smalltalk.IRMethod)})}
  1001. }),
  1002. smalltalk.IRMethod);
  1003. smalltalk.addMethod(
  1004. "_selector_",
  1005. smalltalk.method({
  1006. selector: "selector:",
  1007. fn: function (aString){
  1008. var self=this;
  1009. return smalltalk.withContext(function($ctx1) { self["@selector"]=aString;
  1010. return self}, function($ctx1) {$ctx1.fill(self,"selector:",{aString:aString}, smalltalk.IRMethod)})}
  1011. }),
  1012. smalltalk.IRMethod);
  1013. smalltalk.addMethod(
  1014. "_source",
  1015. smalltalk.method({
  1016. selector: "source",
  1017. fn: function (){
  1018. var self=this;
  1019. return smalltalk.withContext(function($ctx1) { var $1;
  1020. $1=self["@source"];
  1021. return $1;
  1022. }, function($ctx1) {$ctx1.fill(self,"source",{}, smalltalk.IRMethod)})}
  1023. }),
  1024. smalltalk.IRMethod);
  1025. smalltalk.addMethod(
  1026. "_source_",
  1027. smalltalk.method({
  1028. selector: "source:",
  1029. fn: function (aString){
  1030. var self=this;
  1031. return smalltalk.withContext(function($ctx1) { self["@source"]=aString;
  1032. return self}, function($ctx1) {$ctx1.fill(self,"source:",{aString:aString}, smalltalk.IRMethod)})}
  1033. }),
  1034. smalltalk.IRMethod);
  1035. smalltalk.addMethod(
  1036. "_superSends",
  1037. smalltalk.method({
  1038. selector: "superSends",
  1039. fn: function (){
  1040. var self=this;
  1041. return smalltalk.withContext(function($ctx1) { var $1;
  1042. $1=self["@superSends"];
  1043. return $1;
  1044. }, function($ctx1) {$ctx1.fill(self,"superSends",{}, smalltalk.IRMethod)})}
  1045. }),
  1046. smalltalk.IRMethod);
  1047. smalltalk.addMethod(
  1048. "_superSends_",
  1049. smalltalk.method({
  1050. selector: "superSends:",
  1051. fn: function (aCollection){
  1052. var self=this;
  1053. return smalltalk.withContext(function($ctx1) { self["@superSends"]=aCollection;
  1054. return self}, function($ctx1) {$ctx1.fill(self,"superSends:",{aCollection:aCollection}, smalltalk.IRMethod)})}
  1055. }),
  1056. smalltalk.IRMethod);
  1057. smalltalk.addMethod(
  1058. "_theClass",
  1059. smalltalk.method({
  1060. selector: "theClass",
  1061. fn: function (){
  1062. var self=this;
  1063. return smalltalk.withContext(function($ctx1) { var $1;
  1064. $1=self["@theClass"];
  1065. return $1;
  1066. }, function($ctx1) {$ctx1.fill(self,"theClass",{}, smalltalk.IRMethod)})}
  1067. }),
  1068. smalltalk.IRMethod);
  1069. smalltalk.addMethod(
  1070. "_theClass_",
  1071. smalltalk.method({
  1072. selector: "theClass:",
  1073. fn: function (aClass){
  1074. var self=this;
  1075. return smalltalk.withContext(function($ctx1) { self["@theClass"]=aClass;
  1076. return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass}, smalltalk.IRMethod)})}
  1077. }),
  1078. smalltalk.IRMethod);
  1079. smalltalk.addClass('IRReturn', smalltalk.IRScopedInstruction, [], 'Compiler-IR');
  1080. smalltalk.addMethod(
  1081. "_accept_",
  1082. smalltalk.method({
  1083. selector: "accept:",
  1084. fn: function (aVisitor){
  1085. var self=this;
  1086. return smalltalk.withContext(function($ctx1) { var $1;
  1087. $1=_st(aVisitor)._visitIRReturn_(self);
  1088. return $1;
  1089. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRReturn)})}
  1090. }),
  1091. smalltalk.IRReturn);
  1092. smalltalk.addMethod(
  1093. "_canBeAssigned",
  1094. smalltalk.method({
  1095. selector: "canBeAssigned",
  1096. fn: function (){
  1097. var self=this;
  1098. return smalltalk.withContext(function($ctx1) { return false;
  1099. }, function($ctx1) {$ctx1.fill(self,"canBeAssigned",{}, smalltalk.IRReturn)})}
  1100. }),
  1101. smalltalk.IRReturn);
  1102. smalltalk.addMethod(
  1103. "_isBlockReturn",
  1104. smalltalk.method({
  1105. selector: "isBlockReturn",
  1106. fn: function (){
  1107. var self=this;
  1108. return smalltalk.withContext(function($ctx1) { return false;
  1109. }, function($ctx1) {$ctx1.fill(self,"isBlockReturn",{}, smalltalk.IRReturn)})}
  1110. }),
  1111. smalltalk.IRReturn);
  1112. smalltalk.addMethod(
  1113. "_isLocalReturn",
  1114. smalltalk.method({
  1115. selector: "isLocalReturn",
  1116. fn: function (){
  1117. var self=this;
  1118. return smalltalk.withContext(function($ctx1) { return true;
  1119. }, function($ctx1) {$ctx1.fill(self,"isLocalReturn",{}, smalltalk.IRReturn)})}
  1120. }),
  1121. smalltalk.IRReturn);
  1122. smalltalk.addMethod(
  1123. "_isNonLocalReturn",
  1124. smalltalk.method({
  1125. selector: "isNonLocalReturn",
  1126. fn: function (){
  1127. var self=this;
  1128. return smalltalk.withContext(function($ctx1) { var $1;
  1129. $1=_st(_st(self)._isLocalReturn())._not();
  1130. return $1;
  1131. }, function($ctx1) {$ctx1.fill(self,"isNonLocalReturn",{}, smalltalk.IRReturn)})}
  1132. }),
  1133. smalltalk.IRReturn);
  1134. smalltalk.addMethod(
  1135. "_isReturn",
  1136. smalltalk.method({
  1137. selector: "isReturn",
  1138. fn: function (){
  1139. var self=this;
  1140. return smalltalk.withContext(function($ctx1) { return true;
  1141. }, function($ctx1) {$ctx1.fill(self,"isReturn",{}, smalltalk.IRReturn)})}
  1142. }),
  1143. smalltalk.IRReturn);
  1144. smalltalk.addClass('IRBlockReturn', smalltalk.IRReturn, [], 'Compiler-IR');
  1145. smalltalk.addMethod(
  1146. "_accept_",
  1147. smalltalk.method({
  1148. selector: "accept:",
  1149. fn: function (aVisitor){
  1150. var self=this;
  1151. return smalltalk.withContext(function($ctx1) { var $1;
  1152. $1=_st(aVisitor)._visitIRBlockReturn_(self);
  1153. return $1;
  1154. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRBlockReturn)})}
  1155. }),
  1156. smalltalk.IRBlockReturn);
  1157. smalltalk.addMethod(
  1158. "_isBlockReturn",
  1159. smalltalk.method({
  1160. selector: "isBlockReturn",
  1161. fn: function (){
  1162. var self=this;
  1163. return smalltalk.withContext(function($ctx1) { return true;
  1164. }, function($ctx1) {$ctx1.fill(self,"isBlockReturn",{}, smalltalk.IRBlockReturn)})}
  1165. }),
  1166. smalltalk.IRBlockReturn);
  1167. smalltalk.addClass('IRNonLocalReturn', smalltalk.IRReturn, [], 'Compiler-IR');
  1168. smalltalk.addMethod(
  1169. "_accept_",
  1170. smalltalk.method({
  1171. selector: "accept:",
  1172. fn: function (aVisitor){
  1173. var self=this;
  1174. return smalltalk.withContext(function($ctx1) { var $1;
  1175. $1=_st(aVisitor)._visitIRNonLocalReturn_(self);
  1176. return $1;
  1177. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRNonLocalReturn)})}
  1178. }),
  1179. smalltalk.IRNonLocalReturn);
  1180. smalltalk.addMethod(
  1181. "_isLocalReturn",
  1182. smalltalk.method({
  1183. selector: "isLocalReturn",
  1184. fn: function (){
  1185. var self=this;
  1186. return smalltalk.withContext(function($ctx1) { return false;
  1187. }, function($ctx1) {$ctx1.fill(self,"isLocalReturn",{}, smalltalk.IRNonLocalReturn)})}
  1188. }),
  1189. smalltalk.IRNonLocalReturn);
  1190. smalltalk.addClass('IRTempDeclaration', smalltalk.IRScopedInstruction, ['name'], 'Compiler-IR');
  1191. smalltalk.addMethod(
  1192. "_accept_",
  1193. smalltalk.method({
  1194. selector: "accept:",
  1195. fn: function (aVisitor){
  1196. var self=this;
  1197. return smalltalk.withContext(function($ctx1) { var $1;
  1198. $1=_st(aVisitor)._visitIRTempDeclaration_(self);
  1199. return $1;
  1200. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRTempDeclaration)})}
  1201. }),
  1202. smalltalk.IRTempDeclaration);
  1203. smalltalk.addMethod(
  1204. "_isTempDeclaration",
  1205. smalltalk.method({
  1206. selector: "isTempDeclaration",
  1207. fn: function (){
  1208. var self=this;
  1209. return smalltalk.withContext(function($ctx1) { return true;
  1210. }, function($ctx1) {$ctx1.fill(self,"isTempDeclaration",{}, smalltalk.IRTempDeclaration)})}
  1211. }),
  1212. smalltalk.IRTempDeclaration);
  1213. smalltalk.addMethod(
  1214. "_name",
  1215. smalltalk.method({
  1216. selector: "name",
  1217. fn: function (){
  1218. var self=this;
  1219. return smalltalk.withContext(function($ctx1) { var $1;
  1220. $1=self["@name"];
  1221. return $1;
  1222. }, function($ctx1) {$ctx1.fill(self,"name",{}, smalltalk.IRTempDeclaration)})}
  1223. }),
  1224. smalltalk.IRTempDeclaration);
  1225. smalltalk.addMethod(
  1226. "_name_",
  1227. smalltalk.method({
  1228. selector: "name:",
  1229. fn: function (aString){
  1230. var self=this;
  1231. return smalltalk.withContext(function($ctx1) { self["@name"]=aString;
  1232. return self}, function($ctx1) {$ctx1.fill(self,"name:",{aString:aString}, smalltalk.IRTempDeclaration)})}
  1233. }),
  1234. smalltalk.IRTempDeclaration);
  1235. smalltalk.addClass('IRSend', smalltalk.IRInstruction, ['selector', 'classSend', 'index'], 'Compiler-IR');
  1236. smalltalk.addMethod(
  1237. "_accept_",
  1238. smalltalk.method({
  1239. selector: "accept:",
  1240. fn: function (aVisitor){
  1241. var self=this;
  1242. return smalltalk.withContext(function($ctx1) { var $1;
  1243. $1=_st(aVisitor)._visitIRSend_(self);
  1244. return $1;
  1245. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRSend)})}
  1246. }),
  1247. smalltalk.IRSend);
  1248. smalltalk.addMethod(
  1249. "_classSend",
  1250. smalltalk.method({
  1251. selector: "classSend",
  1252. fn: function (){
  1253. var self=this;
  1254. return smalltalk.withContext(function($ctx1) { var $1;
  1255. $1=self["@classSend"];
  1256. return $1;
  1257. }, function($ctx1) {$ctx1.fill(self,"classSend",{}, smalltalk.IRSend)})}
  1258. }),
  1259. smalltalk.IRSend);
  1260. smalltalk.addMethod(
  1261. "_classSend_",
  1262. smalltalk.method({
  1263. selector: "classSend:",
  1264. fn: function (aClass){
  1265. var self=this;
  1266. return smalltalk.withContext(function($ctx1) { self["@classSend"]=aClass;
  1267. return self}, function($ctx1) {$ctx1.fill(self,"classSend:",{aClass:aClass}, smalltalk.IRSend)})}
  1268. }),
  1269. smalltalk.IRSend);
  1270. smalltalk.addMethod(
  1271. "_index",
  1272. smalltalk.method({
  1273. selector: "index",
  1274. fn: function (){
  1275. var self=this;
  1276. return smalltalk.withContext(function($ctx1) { var $1;
  1277. $1=self["@index"];
  1278. return $1;
  1279. }, function($ctx1) {$ctx1.fill(self,"index",{}, smalltalk.IRSend)})}
  1280. }),
  1281. smalltalk.IRSend);
  1282. smalltalk.addMethod(
  1283. "_index_",
  1284. smalltalk.method({
  1285. selector: "index:",
  1286. fn: function (anInteger){
  1287. var self=this;
  1288. return smalltalk.withContext(function($ctx1) { self["@index"]=anInteger;
  1289. return self}, function($ctx1) {$ctx1.fill(self,"index:",{anInteger:anInteger}, smalltalk.IRSend)})}
  1290. }),
  1291. smalltalk.IRSend);
  1292. smalltalk.addMethod(
  1293. "_isSend",
  1294. smalltalk.method({
  1295. selector: "isSend",
  1296. fn: function (){
  1297. var self=this;
  1298. return smalltalk.withContext(function($ctx1) { return true;
  1299. }, function($ctx1) {$ctx1.fill(self,"isSend",{}, smalltalk.IRSend)})}
  1300. }),
  1301. smalltalk.IRSend);
  1302. smalltalk.addMethod(
  1303. "_javascriptSelector",
  1304. smalltalk.method({
  1305. selector: "javascriptSelector",
  1306. fn: function (){
  1307. var self=this;
  1308. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1309. $2=_st(self)._classSend();
  1310. if(($receiver = $2) == nil || $receiver == undefined){
  1311. $1=_st(_st(self)._selector())._asSelector();
  1312. } else {
  1313. $1=_st(_st(self)._selector())._asSuperSelector();
  1314. };
  1315. return $1;
  1316. }, function($ctx1) {$ctx1.fill(self,"javascriptSelector",{}, smalltalk.IRSend)})}
  1317. }),
  1318. smalltalk.IRSend);
  1319. smalltalk.addMethod(
  1320. "_selector",
  1321. smalltalk.method({
  1322. selector: "selector",
  1323. fn: function (){
  1324. var self=this;
  1325. return smalltalk.withContext(function($ctx1) { var $1;
  1326. $1=self["@selector"];
  1327. return $1;
  1328. }, function($ctx1) {$ctx1.fill(self,"selector",{}, smalltalk.IRSend)})}
  1329. }),
  1330. smalltalk.IRSend);
  1331. smalltalk.addMethod(
  1332. "_selector_",
  1333. smalltalk.method({
  1334. selector: "selector:",
  1335. fn: function (aString){
  1336. var self=this;
  1337. return smalltalk.withContext(function($ctx1) { self["@selector"]=aString;
  1338. return self}, function($ctx1) {$ctx1.fill(self,"selector:",{aString:aString}, smalltalk.IRSend)})}
  1339. }),
  1340. smalltalk.IRSend);
  1341. smalltalk.addClass('IRSequence', smalltalk.IRInstruction, [], 'Compiler-IR');
  1342. smalltalk.addMethod(
  1343. "_accept_",
  1344. smalltalk.method({
  1345. selector: "accept:",
  1346. fn: function (aVisitor){
  1347. var self=this;
  1348. return smalltalk.withContext(function($ctx1) { var $1;
  1349. $1=_st(aVisitor)._visitIRSequence_(self);
  1350. return $1;
  1351. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRSequence)})}
  1352. }),
  1353. smalltalk.IRSequence);
  1354. smalltalk.addMethod(
  1355. "_isSequence",
  1356. smalltalk.method({
  1357. selector: "isSequence",
  1358. fn: function (){
  1359. var self=this;
  1360. return smalltalk.withContext(function($ctx1) { return true;
  1361. }, function($ctx1) {$ctx1.fill(self,"isSequence",{}, smalltalk.IRSequence)})}
  1362. }),
  1363. smalltalk.IRSequence);
  1364. smalltalk.addClass('IRBlockSequence', smalltalk.IRSequence, [], 'Compiler-IR');
  1365. smalltalk.addMethod(
  1366. "_accept_",
  1367. smalltalk.method({
  1368. selector: "accept:",
  1369. fn: function (aVisitor){
  1370. var self=this;
  1371. return smalltalk.withContext(function($ctx1) { var $1;
  1372. $1=_st(aVisitor)._visitIRBlockSequence_(self);
  1373. return $1;
  1374. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRBlockSequence)})}
  1375. }),
  1376. smalltalk.IRBlockSequence);
  1377. smalltalk.addClass('IRValue', smalltalk.IRInstruction, ['value'], 'Compiler-IR');
  1378. smalltalk.addMethod(
  1379. "_accept_",
  1380. smalltalk.method({
  1381. selector: "accept:",
  1382. fn: function (aVisitor){
  1383. var self=this;
  1384. return smalltalk.withContext(function($ctx1) { var $1;
  1385. $1=_st(aVisitor)._visitIRValue_(self);
  1386. return $1;
  1387. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRValue)})}
  1388. }),
  1389. smalltalk.IRValue);
  1390. smalltalk.addMethod(
  1391. "_value",
  1392. smalltalk.method({
  1393. selector: "value",
  1394. fn: function (){
  1395. var self=this;
  1396. return smalltalk.withContext(function($ctx1) { var $1;
  1397. $1=self["@value"];
  1398. return $1;
  1399. }, function($ctx1) {$ctx1.fill(self,"value",{}, smalltalk.IRValue)})}
  1400. }),
  1401. smalltalk.IRValue);
  1402. smalltalk.addMethod(
  1403. "_value_",
  1404. smalltalk.method({
  1405. selector: "value:",
  1406. fn: function (aString){
  1407. var self=this;
  1408. return smalltalk.withContext(function($ctx1) { self["@value"]=aString;
  1409. return self}, function($ctx1) {$ctx1.fill(self,"value:",{aString:aString}, smalltalk.IRValue)})}
  1410. }),
  1411. smalltalk.IRValue);
  1412. smalltalk.addClass('IRVariable', smalltalk.IRInstruction, ['variable'], 'Compiler-IR');
  1413. smalltalk.addMethod(
  1414. "_accept_",
  1415. smalltalk.method({
  1416. selector: "accept:",
  1417. fn: function (aVisitor){
  1418. var self=this;
  1419. return smalltalk.withContext(function($ctx1) { var $1;
  1420. $1=_st(aVisitor)._visitIRVariable_(self);
  1421. return $1;
  1422. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRVariable)})}
  1423. }),
  1424. smalltalk.IRVariable);
  1425. smalltalk.addMethod(
  1426. "_isVariable",
  1427. smalltalk.method({
  1428. selector: "isVariable",
  1429. fn: function (){
  1430. var self=this;
  1431. return smalltalk.withContext(function($ctx1) { return true;
  1432. }, function($ctx1) {$ctx1.fill(self,"isVariable",{}, smalltalk.IRVariable)})}
  1433. }),
  1434. smalltalk.IRVariable);
  1435. smalltalk.addMethod(
  1436. "_variable",
  1437. smalltalk.method({
  1438. selector: "variable",
  1439. fn: function (){
  1440. var self=this;
  1441. return smalltalk.withContext(function($ctx1) { var $1;
  1442. $1=self["@variable"];
  1443. return $1;
  1444. }, function($ctx1) {$ctx1.fill(self,"variable",{}, smalltalk.IRVariable)})}
  1445. }),
  1446. smalltalk.IRVariable);
  1447. smalltalk.addMethod(
  1448. "_variable_",
  1449. smalltalk.method({
  1450. selector: "variable:",
  1451. fn: function (aScopeVariable){
  1452. var self=this;
  1453. return smalltalk.withContext(function($ctx1) { self["@variable"]=aScopeVariable;
  1454. return self}, function($ctx1) {$ctx1.fill(self,"variable:",{aScopeVariable:aScopeVariable}, smalltalk.IRVariable)})}
  1455. }),
  1456. smalltalk.IRVariable);
  1457. smalltalk.addClass('IRVerbatim', smalltalk.IRInstruction, ['source'], 'Compiler-IR');
  1458. smalltalk.addMethod(
  1459. "_accept_",
  1460. smalltalk.method({
  1461. selector: "accept:",
  1462. fn: function (aVisitor){
  1463. var self=this;
  1464. return smalltalk.withContext(function($ctx1) { var $1;
  1465. $1=_st(aVisitor)._visitIRVerbatim_(self);
  1466. return $1;
  1467. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRVerbatim)})}
  1468. }),
  1469. smalltalk.IRVerbatim);
  1470. smalltalk.addMethod(
  1471. "_source",
  1472. smalltalk.method({
  1473. selector: "source",
  1474. fn: function (){
  1475. var self=this;
  1476. return smalltalk.withContext(function($ctx1) { var $1;
  1477. $1=self["@source"];
  1478. return $1;
  1479. }, function($ctx1) {$ctx1.fill(self,"source",{}, smalltalk.IRVerbatim)})}
  1480. }),
  1481. smalltalk.IRVerbatim);
  1482. smalltalk.addMethod(
  1483. "_source_",
  1484. smalltalk.method({
  1485. selector: "source:",
  1486. fn: function (aString){
  1487. var self=this;
  1488. return smalltalk.withContext(function($ctx1) { self["@source"]=aString;
  1489. return self}, function($ctx1) {$ctx1.fill(self,"source:",{aString:aString}, smalltalk.IRVerbatim)})}
  1490. }),
  1491. smalltalk.IRVerbatim);
  1492. smalltalk.addClass('IRVisitor', smalltalk.Object, [], 'Compiler-IR');
  1493. smalltalk.addMethod(
  1494. "_visit_",
  1495. smalltalk.method({
  1496. selector: "visit:",
  1497. fn: function (anIRInstruction){
  1498. var self=this;
  1499. return smalltalk.withContext(function($ctx1) { var $1;
  1500. $1=_st(anIRInstruction)._accept_(self);
  1501. return $1;
  1502. }, function($ctx1) {$ctx1.fill(self,"visit:",{anIRInstruction:anIRInstruction}, smalltalk.IRVisitor)})}
  1503. }),
  1504. smalltalk.IRVisitor);
  1505. smalltalk.addMethod(
  1506. "_visitIRAssignment_",
  1507. smalltalk.method({
  1508. selector: "visitIRAssignment:",
  1509. fn: function (anIRAssignment){
  1510. var self=this;
  1511. return smalltalk.withContext(function($ctx1) { var $1;
  1512. $1=_st(self)._visitIRInstruction_(anIRAssignment);
  1513. return $1;
  1514. }, function($ctx1) {$ctx1.fill(self,"visitIRAssignment:",{anIRAssignment:anIRAssignment}, smalltalk.IRVisitor)})}
  1515. }),
  1516. smalltalk.IRVisitor);
  1517. smalltalk.addMethod(
  1518. "_visitIRBlockReturn_",
  1519. smalltalk.method({
  1520. selector: "visitIRBlockReturn:",
  1521. fn: function (anIRBlockReturn){
  1522. var self=this;
  1523. return smalltalk.withContext(function($ctx1) { var $1;
  1524. $1=_st(self)._visitIRReturn_(anIRBlockReturn);
  1525. return $1;
  1526. }, function($ctx1) {$ctx1.fill(self,"visitIRBlockReturn:",{anIRBlockReturn:anIRBlockReturn}, smalltalk.IRVisitor)})}
  1527. }),
  1528. smalltalk.IRVisitor);
  1529. smalltalk.addMethod(
  1530. "_visitIRBlockSequence_",
  1531. smalltalk.method({
  1532. selector: "visitIRBlockSequence:",
  1533. fn: function (anIRBlockSequence){
  1534. var self=this;
  1535. return smalltalk.withContext(function($ctx1) { var $1;
  1536. $1=_st(self)._visitIRSequence_(anIRBlockSequence);
  1537. return $1;
  1538. }, function($ctx1) {$ctx1.fill(self,"visitIRBlockSequence:",{anIRBlockSequence:anIRBlockSequence}, smalltalk.IRVisitor)})}
  1539. }),
  1540. smalltalk.IRVisitor);
  1541. smalltalk.addMethod(
  1542. "_visitIRClosure_",
  1543. smalltalk.method({
  1544. selector: "visitIRClosure:",
  1545. fn: function (anIRClosure){
  1546. var self=this;
  1547. return smalltalk.withContext(function($ctx1) { var $1;
  1548. $1=_st(self)._visitIRInstruction_(anIRClosure);
  1549. return $1;
  1550. }, function($ctx1) {$ctx1.fill(self,"visitIRClosure:",{anIRClosure:anIRClosure}, smalltalk.IRVisitor)})}
  1551. }),
  1552. smalltalk.IRVisitor);
  1553. smalltalk.addMethod(
  1554. "_visitIRDynamicArray_",
  1555. smalltalk.method({
  1556. selector: "visitIRDynamicArray:",
  1557. fn: function (anIRDynamicArray){
  1558. var self=this;
  1559. return smalltalk.withContext(function($ctx1) { var $1;
  1560. $1=_st(self)._visitIRInstruction_(anIRDynamicArray);
  1561. return $1;
  1562. }, function($ctx1) {$ctx1.fill(self,"visitIRDynamicArray:",{anIRDynamicArray:anIRDynamicArray}, smalltalk.IRVisitor)})}
  1563. }),
  1564. smalltalk.IRVisitor);
  1565. smalltalk.addMethod(
  1566. "_visitIRDynamicDictionary_",
  1567. smalltalk.method({
  1568. selector: "visitIRDynamicDictionary:",
  1569. fn: function (anIRDynamicDictionary){
  1570. var self=this;
  1571. return smalltalk.withContext(function($ctx1) { var $1;
  1572. $1=_st(self)._visitIRInstruction_(anIRDynamicDictionary);
  1573. return $1;
  1574. }, function($ctx1) {$ctx1.fill(self,"visitIRDynamicDictionary:",{anIRDynamicDictionary:anIRDynamicDictionary}, smalltalk.IRVisitor)})}
  1575. }),
  1576. smalltalk.IRVisitor);
  1577. smalltalk.addMethod(
  1578. "_visitIRInlinedClosure_",
  1579. smalltalk.method({
  1580. selector: "visitIRInlinedClosure:",
  1581. fn: function (anIRInlinedClosure){
  1582. var self=this;
  1583. return smalltalk.withContext(function($ctx1) { var $1;
  1584. $1=_st(self)._visitIRClosure_(anIRInlinedClosure);
  1585. return $1;
  1586. }, function($ctx1) {$ctx1.fill(self,"visitIRInlinedClosure:",{anIRInlinedClosure:anIRInlinedClosure}, smalltalk.IRVisitor)})}
  1587. }),
  1588. smalltalk.IRVisitor);
  1589. smalltalk.addMethod(
  1590. "_visitIRInlinedSequence_",
  1591. smalltalk.method({
  1592. selector: "visitIRInlinedSequence:",
  1593. fn: function (anIRInlinedSequence){
  1594. var self=this;
  1595. return smalltalk.withContext(function($ctx1) { var $1;
  1596. $1=_st(self)._visitIRSequence_(anIRInlinedSequence);
  1597. return $1;
  1598. }, function($ctx1) {$ctx1.fill(self,"visitIRInlinedSequence:",{anIRInlinedSequence:anIRInlinedSequence}, smalltalk.IRVisitor)})}
  1599. }),
  1600. smalltalk.IRVisitor);
  1601. smalltalk.addMethod(
  1602. "_visitIRInstruction_",
  1603. smalltalk.method({
  1604. selector: "visitIRInstruction:",
  1605. fn: function (anIRInstruction){
  1606. var self=this;
  1607. return smalltalk.withContext(function($ctx1) { var $1;
  1608. _st(_st(anIRInstruction)._instructions())._do_((function(each){
  1609. return smalltalk.withContext(function($ctx2) { return _st(self)._visit_(each);
  1610. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  1611. $1=anIRInstruction;
  1612. return $1;
  1613. }, function($ctx1) {$ctx1.fill(self,"visitIRInstruction:",{anIRInstruction:anIRInstruction}, smalltalk.IRVisitor)})}
  1614. }),
  1615. smalltalk.IRVisitor);
  1616. smalltalk.addMethod(
  1617. "_visitIRMethod_",
  1618. smalltalk.method({
  1619. selector: "visitIRMethod:",
  1620. fn: function (anIRMethod){
  1621. var self=this;
  1622. return smalltalk.withContext(function($ctx1) { var $1;
  1623. $1=_st(self)._visitIRInstruction_(anIRMethod);
  1624. return $1;
  1625. }, function($ctx1) {$ctx1.fill(self,"visitIRMethod:",{anIRMethod:anIRMethod}, smalltalk.IRVisitor)})}
  1626. }),
  1627. smalltalk.IRVisitor);
  1628. smalltalk.addMethod(
  1629. "_visitIRNonLocalReturn_",
  1630. smalltalk.method({
  1631. selector: "visitIRNonLocalReturn:",
  1632. fn: function (anIRNonLocalReturn){
  1633. var self=this;
  1634. return smalltalk.withContext(function($ctx1) { var $1;
  1635. $1=_st(self)._visitIRInstruction_(anIRNonLocalReturn);
  1636. return $1;
  1637. }, function($ctx1) {$ctx1.fill(self,"visitIRNonLocalReturn:",{anIRNonLocalReturn:anIRNonLocalReturn}, smalltalk.IRVisitor)})}
  1638. }),
  1639. smalltalk.IRVisitor);
  1640. smalltalk.addMethod(
  1641. "_visitIRNonLocalReturnHandling_",
  1642. smalltalk.method({
  1643. selector: "visitIRNonLocalReturnHandling:",
  1644. fn: function (anIRNonLocalReturnHandling){
  1645. var self=this;
  1646. return smalltalk.withContext(function($ctx1) { var $1;
  1647. $1=_st(self)._visitIRInstruction_(anIRNonLocalReturnHandling);
  1648. return $1;
  1649. }, function($ctx1) {$ctx1.fill(self,"visitIRNonLocalReturnHandling:",{anIRNonLocalReturnHandling:anIRNonLocalReturnHandling}, smalltalk.IRVisitor)})}
  1650. }),
  1651. smalltalk.IRVisitor);
  1652. smalltalk.addMethod(
  1653. "_visitIRReturn_",
  1654. smalltalk.method({
  1655. selector: "visitIRReturn:",
  1656. fn: function (anIRReturn){
  1657. var self=this;
  1658. return smalltalk.withContext(function($ctx1) { var $1;
  1659. $1=_st(self)._visitIRInstruction_(anIRReturn);
  1660. return $1;
  1661. }, function($ctx1) {$ctx1.fill(self,"visitIRReturn:",{anIRReturn:anIRReturn}, smalltalk.IRVisitor)})}
  1662. }),
  1663. smalltalk.IRVisitor);
  1664. smalltalk.addMethod(
  1665. "_visitIRSend_",
  1666. smalltalk.method({
  1667. selector: "visitIRSend:",
  1668. fn: function (anIRSend){
  1669. var self=this;
  1670. return smalltalk.withContext(function($ctx1) { var $1;
  1671. $1=_st(self)._visitIRInstruction_(anIRSend);
  1672. return $1;
  1673. }, function($ctx1) {$ctx1.fill(self,"visitIRSend:",{anIRSend:anIRSend}, smalltalk.IRVisitor)})}
  1674. }),
  1675. smalltalk.IRVisitor);
  1676. smalltalk.addMethod(
  1677. "_visitIRSequence_",
  1678. smalltalk.method({
  1679. selector: "visitIRSequence:",
  1680. fn: function (anIRSequence){
  1681. var self=this;
  1682. return smalltalk.withContext(function($ctx1) { var $1;
  1683. $1=_st(self)._visitIRInstruction_(anIRSequence);
  1684. return $1;
  1685. }, function($ctx1) {$ctx1.fill(self,"visitIRSequence:",{anIRSequence:anIRSequence}, smalltalk.IRVisitor)})}
  1686. }),
  1687. smalltalk.IRVisitor);
  1688. smalltalk.addMethod(
  1689. "_visitIRTempDeclaration_",
  1690. smalltalk.method({
  1691. selector: "visitIRTempDeclaration:",
  1692. fn: function (anIRTempDeclaration){
  1693. var self=this;
  1694. return smalltalk.withContext(function($ctx1) { var $1;
  1695. $1=_st(self)._visitIRInstruction_(anIRTempDeclaration);
  1696. return $1;
  1697. }, function($ctx1) {$ctx1.fill(self,"visitIRTempDeclaration:",{anIRTempDeclaration:anIRTempDeclaration}, smalltalk.IRVisitor)})}
  1698. }),
  1699. smalltalk.IRVisitor);
  1700. smalltalk.addMethod(
  1701. "_visitIRValue_",
  1702. smalltalk.method({
  1703. selector: "visitIRValue:",
  1704. fn: function (anIRValue){
  1705. var self=this;
  1706. return smalltalk.withContext(function($ctx1) { var $1;
  1707. $1=_st(self)._visitIRInstruction_(anIRValue);
  1708. return $1;
  1709. }, function($ctx1) {$ctx1.fill(self,"visitIRValue:",{anIRValue:anIRValue}, smalltalk.IRVisitor)})}
  1710. }),
  1711. smalltalk.IRVisitor);
  1712. smalltalk.addMethod(
  1713. "_visitIRVariable_",
  1714. smalltalk.method({
  1715. selector: "visitIRVariable:",
  1716. fn: function (anIRVariable){
  1717. var self=this;
  1718. return smalltalk.withContext(function($ctx1) { var $1;
  1719. $1=_st(self)._visitIRInstruction_(anIRVariable);
  1720. return $1;
  1721. }, function($ctx1) {$ctx1.fill(self,"visitIRVariable:",{anIRVariable:anIRVariable}, smalltalk.IRVisitor)})}
  1722. }),
  1723. smalltalk.IRVisitor);
  1724. smalltalk.addMethod(
  1725. "_visitIRVerbatim_",
  1726. smalltalk.method({
  1727. selector: "visitIRVerbatim:",
  1728. fn: function (anIRVerbatim){
  1729. var self=this;
  1730. return smalltalk.withContext(function($ctx1) { var $1;
  1731. $1=_st(self)._visitIRInstruction_(anIRVerbatim);
  1732. return $1;
  1733. }, function($ctx1) {$ctx1.fill(self,"visitIRVerbatim:",{anIRVerbatim:anIRVerbatim}, smalltalk.IRVisitor)})}
  1734. }),
  1735. smalltalk.IRVisitor);
  1736. smalltalk.addClass('IRJSTranslator', smalltalk.IRVisitor, ['stream'], 'Compiler-IR');
  1737. smalltalk.addMethod(
  1738. "_contents",
  1739. smalltalk.method({
  1740. selector: "contents",
  1741. fn: function (){
  1742. var self=this;
  1743. return smalltalk.withContext(function($ctx1) { var $1;
  1744. $1=_st(_st(self)._stream())._contents();
  1745. return $1;
  1746. }, function($ctx1) {$ctx1.fill(self,"contents",{}, smalltalk.IRJSTranslator)})}
  1747. }),
  1748. smalltalk.IRJSTranslator);
  1749. smalltalk.addMethod(
  1750. "_initialize",
  1751. smalltalk.method({
  1752. selector: "initialize",
  1753. fn: function (){
  1754. var self=this;
  1755. return smalltalk.withContext(function($ctx1) { smalltalk.IRVisitor.fn.prototype._initialize.apply(_st(self), []);
  1756. self["@stream"]=_st((smalltalk.JSStream || JSStream))._new();
  1757. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.IRJSTranslator)})}
  1758. }),
  1759. smalltalk.IRJSTranslator);
  1760. smalltalk.addMethod(
  1761. "_stream",
  1762. smalltalk.method({
  1763. selector: "stream",
  1764. fn: function (){
  1765. var self=this;
  1766. return smalltalk.withContext(function($ctx1) { var $1;
  1767. $1=self["@stream"];
  1768. return $1;
  1769. }, function($ctx1) {$ctx1.fill(self,"stream",{}, smalltalk.IRJSTranslator)})}
  1770. }),
  1771. smalltalk.IRJSTranslator);
  1772. smalltalk.addMethod(
  1773. "_stream_",
  1774. smalltalk.method({
  1775. selector: "stream:",
  1776. fn: function (aStream){
  1777. var self=this;
  1778. return smalltalk.withContext(function($ctx1) { self["@stream"]=aStream;
  1779. return self}, function($ctx1) {$ctx1.fill(self,"stream:",{aStream:aStream}, smalltalk.IRJSTranslator)})}
  1780. }),
  1781. smalltalk.IRJSTranslator);
  1782. smalltalk.addMethod(
  1783. "_visitIRAssignment_",
  1784. smalltalk.method({
  1785. selector: "visitIRAssignment:",
  1786. fn: function (anIRAssignment){
  1787. var self=this;
  1788. return smalltalk.withContext(function($ctx1) { _st(self)._visit_(_st(_st(anIRAssignment)._instructions())._first());
  1789. _st(_st(self)._stream())._nextPutAssignment();
  1790. _st(self)._visit_(_st(_st(anIRAssignment)._instructions())._last());
  1791. return self}, function($ctx1) {$ctx1.fill(self,"visitIRAssignment:",{anIRAssignment:anIRAssignment}, smalltalk.IRJSTranslator)})}
  1792. }),
  1793. smalltalk.IRJSTranslator);
  1794. smalltalk.addMethod(
  1795. "_visitIRClosure_",
  1796. smalltalk.method({
  1797. selector: "visitIRClosure:",
  1798. fn: function (anIRClosure){
  1799. var self=this;
  1800. return smalltalk.withContext(function($ctx1) { _st(_st(self)._stream())._nextPutClosureWith_arguments_((function(){
  1801. return smalltalk.withContext(function($ctx2) { _st(_st(self)._stream())._nextPutVars_(_st(_st(anIRClosure)._tempDeclarations())._collect_((function(each){
  1802. return smalltalk.withContext(function($ctx3) { return _st(_st(each)._name())._asVariableName();
  1803. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})})));
  1804. return _st(_st(self)._stream())._nextPutBlockContextFor_during_(anIRClosure,(function(){
  1805. return smalltalk.withContext(function($ctx3) { return smalltalk.IRVisitor.fn.prototype._visitIRClosure_.apply(_st(self), [anIRClosure]);
  1806. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  1807. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),_st(anIRClosure)._arguments());
  1808. return self}, function($ctx1) {$ctx1.fill(self,"visitIRClosure:",{anIRClosure:anIRClosure}, smalltalk.IRJSTranslator)})}
  1809. }),
  1810. smalltalk.IRJSTranslator);
  1811. smalltalk.addMethod(
  1812. "_visitIRDynamicArray_",
  1813. smalltalk.method({
  1814. selector: "visitIRDynamicArray:",
  1815. fn: function (anIRDynamicArray){
  1816. var self=this;
  1817. return smalltalk.withContext(function($ctx1) { _st(_st(self)._stream())._nextPutAll_("[");
  1818. _st(_st(anIRDynamicArray)._instructions())._do_separatedBy_((function(each){
  1819. return smalltalk.withContext(function($ctx2) { return _st(self)._visit_(each);
  1820. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
  1821. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._stream())._nextPutAll_(",");
  1822. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1823. _st(self["@stream"])._nextPutAll_("]");
  1824. return self}, function($ctx1) {$ctx1.fill(self,"visitIRDynamicArray:",{anIRDynamicArray:anIRDynamicArray}, smalltalk.IRJSTranslator)})}
  1825. }),
  1826. smalltalk.IRJSTranslator);
  1827. smalltalk.addMethod(
  1828. "_visitIRDynamicDictionary_",
  1829. smalltalk.method({
  1830. selector: "visitIRDynamicDictionary:",
  1831. fn: function (anIRDynamicDictionary){
  1832. var self=this;
  1833. return smalltalk.withContext(function($ctx1) { _st(_st(self)._stream())._nextPutAll_("smalltalk.HashedCollection._fromPairs_([");
  1834. _st(_st(anIRDynamicDictionary)._instructions())._do_separatedBy_((function(each){
  1835. return smalltalk.withContext(function($ctx2) { return _st(self)._visit_(each);
  1836. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
  1837. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._stream())._nextPutAll_(",");
  1838. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1839. _st(_st(self)._stream())._nextPutAll_("])");
  1840. return self}, function($ctx1) {$ctx1.fill(self,"visitIRDynamicDictionary:",{anIRDynamicDictionary:anIRDynamicDictionary}, smalltalk.IRJSTranslator)})}
  1841. }),
  1842. smalltalk.IRJSTranslator);
  1843. smalltalk.addMethod(
  1844. "_visitIRMethod_",
  1845. smalltalk.method({
  1846. selector: "visitIRMethod:",
  1847. fn: function (anIRMethod){
  1848. var self=this;
  1849. return smalltalk.withContext(function($ctx1) { var $1,$2,$4,$6,$7,$9,$10,$8,$5,$3;
  1850. $1=_st(self)._stream();
  1851. $2=anIRMethod;
  1852. $3=(function(){
  1853. return smalltalk.withContext(function($ctx2) { $4=_st(self)._stream();
  1854. $5=(function(){
  1855. return smalltalk.withContext(function($ctx3) { _st(_st(self)._stream())._nextPutVars_(_st(_st(anIRMethod)._tempDeclarations())._collect_((function(each){
  1856. return smalltalk.withContext(function($ctx4) { return _st(_st(each)._name())._asVariableName();
  1857. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx1)})})));
  1858. $6=_st(self)._stream();
  1859. $7=anIRMethod;
  1860. $8=(function(){
  1861. return smalltalk.withContext(function($ctx4) { $9=_st(_st(anIRMethod)._internalVariables())._notEmpty();
  1862. if(smalltalk.assert($9)){
  1863. _st(_st(self)._stream())._nextPutVars_(_st(_st(_st(anIRMethod)._internalVariables())._asArray())._collect_((function(each){
  1864. return smalltalk.withContext(function($ctx5) { return _st(_st(each)._variable())._alias();
  1865. }, function($ctx5) {$ctx5.fillBlock({each:each},$ctx1)})})));
  1866. };
  1867. $10=_st(_st(anIRMethod)._scope())._hasNonLocalReturn();
  1868. if(smalltalk.assert($10)){
  1869. return _st(_st(self)._stream())._nextPutNonLocalReturnHandlingWith_((function(){
  1870. return smalltalk.withContext(function($ctx5) { return smalltalk.IRVisitor.fn.prototype._visitIRMethod_.apply(_st(self), [anIRMethod]);
  1871. }, function($ctx5) {$ctx5.fillBlock({},$ctx1)})}));
  1872. } else {
  1873. return smalltalk.IRVisitor.fn.prototype._visitIRMethod_.apply(_st(self), [anIRMethod]);
  1874. };
  1875. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})});
  1876. return _st($6)._nextPutContextFor_during_($7,$8);
  1877. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})});
  1878. return _st($4)._nextPutFunctionWith_arguments_($5,_st(anIRMethod)._arguments());
  1879. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
  1880. _st($1)._nextPutMethodDeclaration_with_($2,$3);
  1881. return self}, function($ctx1) {$ctx1.fill(self,"visitIRMethod:",{anIRMethod:anIRMethod}, smalltalk.IRJSTranslator)})}
  1882. }),
  1883. smalltalk.IRJSTranslator);
  1884. smalltalk.addMethod(
  1885. "_visitIRNonLocalReturn_",
  1886. smalltalk.method({
  1887. selector: "visitIRNonLocalReturn:",
  1888. fn: function (anIRNonLocalReturn){
  1889. var self=this;
  1890. return smalltalk.withContext(function($ctx1) { _st(_st(self)._stream())._nextPutNonLocalReturnWith_((function(){
  1891. return smalltalk.withContext(function($ctx2) { return smalltalk.IRVisitor.fn.prototype._visitIRNonLocalReturn_.apply(_st(self), [anIRNonLocalReturn]);
  1892. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1893. return self}, function($ctx1) {$ctx1.fill(self,"visitIRNonLocalReturn:",{anIRNonLocalReturn:anIRNonLocalReturn}, smalltalk.IRJSTranslator)})}
  1894. }),
  1895. smalltalk.IRJSTranslator);
  1896. smalltalk.addMethod(
  1897. "_visitIRReturn_",
  1898. smalltalk.method({
  1899. selector: "visitIRReturn:",
  1900. fn: function (anIRReturn){
  1901. var self=this;
  1902. return smalltalk.withContext(function($ctx1) { _st(_st(self)._stream())._nextPutReturnWith_((function(){
  1903. return smalltalk.withContext(function($ctx2) { return smalltalk.IRVisitor.fn.prototype._visitIRReturn_.apply(_st(self), [anIRReturn]);
  1904. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1905. return self}, function($ctx1) {$ctx1.fill(self,"visitIRReturn:",{anIRReturn:anIRReturn}, smalltalk.IRJSTranslator)})}
  1906. }),
  1907. smalltalk.IRJSTranslator);
  1908. smalltalk.addMethod(
  1909. "_visitIRSend_",
  1910. smalltalk.method({
  1911. selector: "visitIRSend:",
  1912. fn: function (anIRSend){
  1913. var self=this;
  1914. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  1915. $1=_st(anIRSend)._classSend();
  1916. if(($receiver = $1) == nil || $receiver == undefined){
  1917. _st(_st(self)._stream())._nextPutAll_("_st(");
  1918. _st(self)._visit_(_st(_st(anIRSend)._instructions())._first());
  1919. _st(_st(self)._stream())._nextPutAll_(_st(_st(").").__comma(_st(_st(anIRSend)._selector())._asSelector())).__comma("("));
  1920. _st(_st(_st(anIRSend)._instructions())._allButFirst())._do_separatedBy_((function(each){
  1921. return smalltalk.withContext(function($ctx2) { return _st(self)._visit_(each);
  1922. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
  1923. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._stream())._nextPutAll_(",");
  1924. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1925. _st(_st(self)._stream())._nextPutAll_(")");
  1926. } else {
  1927. $2=_st(self)._stream();
  1928. _st($2)._nextPutAll_(_st(_st(_st(anIRSend)._classSend())._asJavascript()).__comma(".fn.prototype."));
  1929. _st($2)._nextPutAll_(_st(_st(_st(anIRSend)._selector())._asSelector()).__comma(".apply("));
  1930. $3=_st($2)._nextPutAll_("_st(");
  1931. $3;
  1932. _st(self)._visit_(_st(_st(anIRSend)._instructions())._first());
  1933. _st(_st(self)._stream())._nextPutAll_("), [");
  1934. _st(_st(_st(anIRSend)._instructions())._allButFirst())._do_separatedBy_((function(each){
  1935. return smalltalk.withContext(function($ctx2) { return _st(self)._visit_(each);
  1936. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
  1937. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._stream())._nextPutAll_(",");
  1938. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1939. _st(_st(self)._stream())._nextPutAll_("])");
  1940. };
  1941. return self}, function($ctx1) {$ctx1.fill(self,"visitIRSend:",{anIRSend:anIRSend}, smalltalk.IRJSTranslator)})}
  1942. }),
  1943. smalltalk.IRJSTranslator);
  1944. smalltalk.addMethod(
  1945. "_visitIRSequence_",
  1946. smalltalk.method({
  1947. selector: "visitIRSequence:",
  1948. fn: function (anIRSequence){
  1949. var self=this;
  1950. return smalltalk.withContext(function($ctx1) { _st(_st(self)._stream())._nextPutSequenceWith_((function(){
  1951. return smalltalk.withContext(function($ctx2) { return _st(_st(anIRSequence)._instructions())._do_((function(each){
  1952. return smalltalk.withContext(function($ctx3) { return _st(_st(self)._stream())._nextPutStatementWith_(_st(self)._visit_(each));
  1953. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}));
  1954. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1955. return self}, function($ctx1) {$ctx1.fill(self,"visitIRSequence:",{anIRSequence:anIRSequence}, smalltalk.IRJSTranslator)})}
  1956. }),
  1957. smalltalk.IRJSTranslator);
  1958. smalltalk.addMethod(
  1959. "_visitIRTempDeclaration_",
  1960. smalltalk.method({
  1961. selector: "visitIRTempDeclaration:",
  1962. fn: function (anIRTempDeclaration){
  1963. var self=this;
  1964. return smalltalk.withContext(function($ctx1) { return self}, function($ctx1) {$ctx1.fill(self,"visitIRTempDeclaration:",{anIRTempDeclaration:anIRTempDeclaration}, smalltalk.IRJSTranslator)})}
  1965. }),
  1966. smalltalk.IRJSTranslator);
  1967. smalltalk.addMethod(
  1968. "_visitIRValue_",
  1969. smalltalk.method({
  1970. selector: "visitIRValue:",
  1971. fn: function (anIRValue){
  1972. var self=this;
  1973. return smalltalk.withContext(function($ctx1) { _st(_st(self)._stream())._nextPutAll_(_st(_st(anIRValue)._value())._asJavascript());
  1974. return self}, function($ctx1) {$ctx1.fill(self,"visitIRValue:",{anIRValue:anIRValue}, smalltalk.IRJSTranslator)})}
  1975. }),
  1976. smalltalk.IRJSTranslator);
  1977. smalltalk.addMethod(
  1978. "_visitIRVariable_",
  1979. smalltalk.method({
  1980. selector: "visitIRVariable:",
  1981. fn: function (anIRVariable){
  1982. var self=this;
  1983. return smalltalk.withContext(function($ctx1) { var $1;
  1984. $1=_st(_st(_st(anIRVariable)._variable())._name()).__eq("thisContext");
  1985. if(smalltalk.assert($1)){
  1986. _st(_st(self)._stream())._nextPutAll_("smalltalk.getThisContext()");
  1987. } else {
  1988. _st(_st(self)._stream())._nextPutAll_(_st(_st(anIRVariable)._variable())._alias());
  1989. };
  1990. return self}, function($ctx1) {$ctx1.fill(self,"visitIRVariable:",{anIRVariable:anIRVariable}, smalltalk.IRJSTranslator)})}
  1991. }),
  1992. smalltalk.IRJSTranslator);
  1993. smalltalk.addMethod(
  1994. "_visitIRVerbatim_",
  1995. smalltalk.method({
  1996. selector: "visitIRVerbatim:",
  1997. fn: function (anIRVerbatim){
  1998. var self=this;
  1999. return smalltalk.withContext(function($ctx1) { _st(_st(self)._stream())._nextPutStatementWith_((function(){
  2000. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._stream())._nextPutAll_(_st(anIRVerbatim)._source());
  2001. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2002. return self}, function($ctx1) {$ctx1.fill(self,"visitIRVerbatim:",{anIRVerbatim:anIRVerbatim}, smalltalk.IRJSTranslator)})}
  2003. }),
  2004. smalltalk.IRJSTranslator);
  2005. smalltalk.addClass('JSStream', smalltalk.Object, ['stream'], 'Compiler-IR');
  2006. smalltalk.addMethod(
  2007. "_contents",
  2008. smalltalk.method({
  2009. selector: "contents",
  2010. fn: function (){
  2011. var self=this;
  2012. return smalltalk.withContext(function($ctx1) { var $1;
  2013. $1=_st(self["@stream"])._contents();
  2014. return $1;
  2015. }, function($ctx1) {$ctx1.fill(self,"contents",{}, smalltalk.JSStream)})}
  2016. }),
  2017. smalltalk.JSStream);
  2018. smalltalk.addMethod(
  2019. "_initialize",
  2020. smalltalk.method({
  2021. selector: "initialize",
  2022. fn: function (){
  2023. var self=this;
  2024. return smalltalk.withContext(function($ctx1) { smalltalk.Object.fn.prototype._initialize.apply(_st(self), []);
  2025. self["@stream"]=_st("")._writeStream();
  2026. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.JSStream)})}
  2027. }),
  2028. smalltalk.JSStream);
  2029. smalltalk.addMethod(
  2030. "_lf",
  2031. smalltalk.method({
  2032. selector: "lf",
  2033. fn: function (){
  2034. var self=this;
  2035. return smalltalk.withContext(function($ctx1) { _st(self["@stream"])._lf();
  2036. return self}, function($ctx1) {$ctx1.fill(self,"lf",{}, smalltalk.JSStream)})}
  2037. }),
  2038. smalltalk.JSStream);
  2039. smalltalk.addMethod(
  2040. "_nextPut_",
  2041. smalltalk.method({
  2042. selector: "nextPut:",
  2043. fn: function (aString){
  2044. var self=this;
  2045. return smalltalk.withContext(function($ctx1) { _st(self["@stream"])._nextPut_(aString);
  2046. return self}, function($ctx1) {$ctx1.fill(self,"nextPut:",{aString:aString}, smalltalk.JSStream)})}
  2047. }),
  2048. smalltalk.JSStream);
  2049. smalltalk.addMethod(
  2050. "_nextPutAll_",
  2051. smalltalk.method({
  2052. selector: "nextPutAll:",
  2053. fn: function (aString){
  2054. var self=this;
  2055. return smalltalk.withContext(function($ctx1) { _st(self["@stream"])._nextPutAll_(aString);
  2056. return self}, function($ctx1) {$ctx1.fill(self,"nextPutAll:",{aString:aString}, smalltalk.JSStream)})}
  2057. }),
  2058. smalltalk.JSStream);
  2059. smalltalk.addMethod(
  2060. "_nextPutAssignment",
  2061. smalltalk.method({
  2062. selector: "nextPutAssignment",
  2063. fn: function (){
  2064. var self=this;
  2065. return smalltalk.withContext(function($ctx1) { _st(self["@stream"])._nextPutAll_("=");
  2066. return self}, function($ctx1) {$ctx1.fill(self,"nextPutAssignment",{}, smalltalk.JSStream)})}
  2067. }),
  2068. smalltalk.JSStream);
  2069. smalltalk.addMethod(
  2070. "_nextPutBlockContextFor_during_",
  2071. smalltalk.method({
  2072. selector: "nextPutBlockContextFor:during:",
  2073. fn: function (anIRClosure,aBlock){
  2074. var self=this;
  2075. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5,$6,$7,$8;
  2076. $1=self;
  2077. _st($1)._nextPutAll_(_st(_st("return smalltalk.withContext(function(").__comma(_st(_st(anIRClosure)._scope())._alias())).__comma(") {"));
  2078. $2=_st($1)._nextPutAll_(_st((smalltalk.String || String))._cr());
  2079. _st(aBlock)._value();
  2080. $3=self;
  2081. _st($3)._nextPutAll_(_st(_st("}, function(").__comma(_st(_st(anIRClosure)._scope())._alias())).__comma(") {"));
  2082. $4=_st($3)._nextPutAll_(_st(_st(_st(anIRClosure)._scope())._alias()).__comma(".fillBlock({"));
  2083. _st(_st(anIRClosure)._locals())._do_separatedBy_((function(each){
  2084. return smalltalk.withContext(function($ctx2) { $5=self;
  2085. _st($5)._nextPutAll_(_st(each)._asVariableName());
  2086. _st($5)._nextPutAll_(":");
  2087. $6=_st($5)._nextPutAll_(_st(each)._asVariableName());
  2088. return $6;
  2089. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
  2090. return smalltalk.withContext(function($ctx2) { return _st(self)._nextPutAll_(",");
  2091. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2092. $7=self;
  2093. _st($7)._nextPutAll_("},");
  2094. $8=_st($7)._nextPutAll_(_st(_st(_st(_st(anIRClosure)._method())._scope())._alias()).__comma(")})"));
  2095. return self}, function($ctx1) {$ctx1.fill(self,"nextPutBlockContextFor:during:",{anIRClosure:anIRClosure,aBlock:aBlock}, smalltalk.JSStream)})}
  2096. }),
  2097. smalltalk.JSStream);
  2098. smalltalk.addMethod(
  2099. "_nextPutClosureWith_arguments_",
  2100. smalltalk.method({
  2101. selector: "nextPutClosureWith:arguments:",
  2102. fn: function (aBlock,anArray){
  2103. var self=this;
  2104. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2105. _st(self["@stream"])._nextPutAll_("(function(");
  2106. _st(anArray)._do_separatedBy_((function(each){
  2107. return smalltalk.withContext(function($ctx2) { return _st(self["@stream"])._nextPutAll_(_st(each)._asVariableName());
  2108. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
  2109. return smalltalk.withContext(function($ctx2) { return _st(self["@stream"])._nextPut_(",");
  2110. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2111. $1=self["@stream"];
  2112. _st($1)._nextPutAll_("){");
  2113. $2=_st($1)._lf();
  2114. _st(aBlock)._value();
  2115. _st(self["@stream"])._nextPutAll_("})");
  2116. return self}, function($ctx1) {$ctx1.fill(self,"nextPutClosureWith:arguments:",{aBlock:aBlock,anArray:anArray}, smalltalk.JSStream)})}
  2117. }),
  2118. smalltalk.JSStream);
  2119. smalltalk.addMethod(
  2120. "_nextPutContextFor_during_",
  2121. smalltalk.method({
  2122. selector: "nextPutContextFor:during:",
  2123. fn: function (aMethod,aBlock){
  2124. var self=this;
  2125. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5,$6,$7,$8;
  2126. $1=self;
  2127. _st($1)._nextPutAll_(_st(_st("return smalltalk.withContext(function(").__comma(_st(_st(aMethod)._scope())._alias())).__comma(") { "));
  2128. $2=_st($1)._nextPutAll_(_st((smalltalk.String || String))._cr());
  2129. _st(aBlock)._value();
  2130. $3=self;
  2131. _st($3)._nextPutAll_(_st(_st(_st("}, function(").__comma(_st(_st(aMethod)._scope())._alias())).__comma(") {")).__comma(_st(_st(aMethod)._scope())._alias()));
  2132. $4=_st($3)._nextPutAll_(_st(_st(".fill(self,").__comma(_st(_st(aMethod)._selector())._asJavascript())).__comma(",{"));
  2133. _st(_st(aMethod)._locals())._do_separatedBy_((function(each){
  2134. return smalltalk.withContext(function($ctx2) { $5=self;
  2135. _st($5)._nextPutAll_(_st(each)._asVariableName());
  2136. _st($5)._nextPutAll_(":");
  2137. $6=_st($5)._nextPutAll_(_st(each)._asVariableName());
  2138. return $6;
  2139. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
  2140. return smalltalk.withContext(function($ctx2) { return _st(self)._nextPutAll_(",");
  2141. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2142. $7=self;
  2143. _st($7)._nextPutAll_("}, ");
  2144. _st($7)._nextPutAll_(_st(_st(aMethod)._theClass())._asJavascript());
  2145. $8=_st($7)._nextPutAll_(")})");
  2146. return self}, function($ctx1) {$ctx1.fill(self,"nextPutContextFor:during:",{aMethod:aMethod,aBlock:aBlock}, smalltalk.JSStream)})}
  2147. }),
  2148. smalltalk.JSStream);
  2149. smalltalk.addMethod(
  2150. "_nextPutFunctionWith_arguments_",
  2151. smalltalk.method({
  2152. selector: "nextPutFunctionWith:arguments:",
  2153. fn: function (aBlock,anArray){
  2154. var self=this;
  2155. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  2156. _st(self["@stream"])._nextPutAll_("fn: function(");
  2157. _st(anArray)._do_separatedBy_((function(each){
  2158. return smalltalk.withContext(function($ctx2) { return _st(self["@stream"])._nextPutAll_(_st(each)._asVariableName());
  2159. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
  2160. return smalltalk.withContext(function($ctx2) { return _st(self["@stream"])._nextPut_(",");
  2161. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2162. $1=self["@stream"];
  2163. _st($1)._nextPutAll_("){");
  2164. $2=_st($1)._lf();
  2165. $3=self["@stream"];
  2166. _st($3)._nextPutAll_("var self=this;");
  2167. $4=_st($3)._lf();
  2168. _st(aBlock)._value();
  2169. _st(self["@stream"])._nextPutAll_("}");
  2170. return self}, function($ctx1) {$ctx1.fill(self,"nextPutFunctionWith:arguments:",{aBlock:aBlock,anArray:anArray}, smalltalk.JSStream)})}
  2171. }),
  2172. smalltalk.JSStream);
  2173. smalltalk.addMethod(
  2174. "_nextPutIf_with_",
  2175. smalltalk.method({
  2176. selector: "nextPutIf:with:",
  2177. fn: function (aBlock,anotherBlock){
  2178. var self=this;
  2179. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2180. _st(self["@stream"])._nextPutAll_("if(");
  2181. _st(aBlock)._value();
  2182. $1=self["@stream"];
  2183. _st($1)._nextPutAll_("){");
  2184. $2=_st($1)._lf();
  2185. _st(anotherBlock)._value();
  2186. _st(self["@stream"])._nextPutAll_("}");
  2187. return self}, function($ctx1) {$ctx1.fill(self,"nextPutIf:with:",{aBlock:aBlock,anotherBlock:anotherBlock}, smalltalk.JSStream)})}
  2188. }),
  2189. smalltalk.JSStream);
  2190. smalltalk.addMethod(
  2191. "_nextPutIfElse_with_with_",
  2192. smalltalk.method({
  2193. selector: "nextPutIfElse:with:with:",
  2194. fn: function (aBlock,ifBlock,elseBlock){
  2195. var self=this;
  2196. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  2197. _st(self["@stream"])._nextPutAll_("if(");
  2198. _st(aBlock)._value();
  2199. $1=self["@stream"];
  2200. _st($1)._nextPutAll_("){");
  2201. $2=_st($1)._lf();
  2202. _st(ifBlock)._value();
  2203. $3=self["@stream"];
  2204. _st($3)._nextPutAll_("} else {");
  2205. $4=_st($3)._lf();
  2206. _st(elseBlock)._value();
  2207. _st(self["@stream"])._nextPutAll_("}");
  2208. return self}, function($ctx1) {$ctx1.fill(self,"nextPutIfElse:with:with:",{aBlock:aBlock,ifBlock:ifBlock,elseBlock:elseBlock}, smalltalk.JSStream)})}
  2209. }),
  2210. smalltalk.JSStream);
  2211. smalltalk.addMethod(
  2212. "_nextPutMethodDeclaration_with_",
  2213. smalltalk.method({
  2214. selector: "nextPutMethodDeclaration:with:",
  2215. fn: function (aMethod,aBlock){
  2216. var self=this;
  2217. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5,$6;
  2218. $1=self["@stream"];
  2219. _st($1)._nextPutAll_("smalltalk.method({");
  2220. _st($1)._lf();
  2221. _st($1)._nextPutAll_(_st(_st("selector: \x22").__comma(_st(aMethod)._selector())).__comma("\x22,"));
  2222. _st($1)._lf();
  2223. _st($1)._nextPutAll_(_st(_st("source: ").__comma(_st(_st(aMethod)._source())._asJavascript())).__comma(","));
  2224. $2=_st($1)._lf();
  2225. _st(aBlock)._value();
  2226. $3=self["@stream"];
  2227. _st($3)._nextPutAll_(_st(_st(",").__comma(_st((smalltalk.String || String))._lf())).__comma("messageSends: "));
  2228. _st($3)._nextPutAll_(_st(_st(_st(_st(aMethod)._messageSends())._asArray())._asJavascript()).__comma(","));
  2229. _st($3)._lf();
  2230. _st($3)._nextPutAll_(_st(_st("args: ").__comma(_st(_st(_st(_st(aMethod)._arguments())._collect_((function(each){
  2231. return smalltalk.withContext(function($ctx2) { return _st(each)._value();
  2232. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._asArray())._asJavascript())).__comma(","));
  2233. _st($3)._lf();
  2234. $4=_st($3)._nextPutAll_("referencedClasses: [");
  2235. _st(_st(aMethod)._classReferences())._do_separatedBy_((function(each){
  2236. return smalltalk.withContext(function($ctx2) { return _st(self["@stream"])._nextPutAll_(_st(each)._asJavascript());
  2237. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
  2238. return smalltalk.withContext(function($ctx2) { return _st(self["@stream"])._nextPutAll_(",");
  2239. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2240. $5=self["@stream"];
  2241. _st($5)._nextPutAll_("]");
  2242. $6=_st($5)._nextPutAll_("})");
  2243. return self}, function($ctx1) {$ctx1.fill(self,"nextPutMethodDeclaration:with:",{aMethod:aMethod,aBlock:aBlock}, smalltalk.JSStream)})}
  2244. }),
  2245. smalltalk.JSStream);
  2246. smalltalk.addMethod(
  2247. "_nextPutNonLocalReturnHandlingWith_",
  2248. smalltalk.method({
  2249. selector: "nextPutNonLocalReturnHandlingWith:",
  2250. fn: function (aBlock){
  2251. var self=this;
  2252. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  2253. $1=self["@stream"];
  2254. _st($1)._nextPutAll_("var $early={};");
  2255. _st($1)._lf();
  2256. _st($1)._nextPutAll_("try {");
  2257. $2=_st($1)._lf();
  2258. _st(aBlock)._value();
  2259. $3=self["@stream"];
  2260. _st($3)._nextPutAll_("}");
  2261. _st($3)._lf();
  2262. _st($3)._nextPutAll_("catch(e) {if(e===$early)return e[0]; throw e}");
  2263. $4=_st($3)._lf();
  2264. return self}, function($ctx1) {$ctx1.fill(self,"nextPutNonLocalReturnHandlingWith:",{aBlock:aBlock}, smalltalk.JSStream)})}
  2265. }),
  2266. smalltalk.JSStream);
  2267. smalltalk.addMethod(
  2268. "_nextPutNonLocalReturnWith_",
  2269. smalltalk.method({
  2270. selector: "nextPutNonLocalReturnWith:",
  2271. fn: function (aBlock){
  2272. var self=this;
  2273. return smalltalk.withContext(function($ctx1) { _st(self["@stream"])._nextPutAll_("throw $early=[");
  2274. _st(aBlock)._value();
  2275. _st(self["@stream"])._nextPutAll_("]");
  2276. return self}, function($ctx1) {$ctx1.fill(self,"nextPutNonLocalReturnWith:",{aBlock:aBlock}, smalltalk.JSStream)})}
  2277. }),
  2278. smalltalk.JSStream);
  2279. smalltalk.addMethod(
  2280. "_nextPutReturn",
  2281. smalltalk.method({
  2282. selector: "nextPutReturn",
  2283. fn: function (){
  2284. var self=this;
  2285. return smalltalk.withContext(function($ctx1) { _st(self["@stream"])._nextPutAll_("return ");
  2286. return self}, function($ctx1) {$ctx1.fill(self,"nextPutReturn",{}, smalltalk.JSStream)})}
  2287. }),
  2288. smalltalk.JSStream);
  2289. smalltalk.addMethod(
  2290. "_nextPutReturnWith_",
  2291. smalltalk.method({
  2292. selector: "nextPutReturnWith:",
  2293. fn: function (aBlock){
  2294. var self=this;
  2295. return smalltalk.withContext(function($ctx1) { _st(self)._nextPutReturn();
  2296. _st(aBlock)._value();
  2297. return self}, function($ctx1) {$ctx1.fill(self,"nextPutReturnWith:",{aBlock:aBlock}, smalltalk.JSStream)})}
  2298. }),
  2299. smalltalk.JSStream);
  2300. smalltalk.addMethod(
  2301. "_nextPutSequenceWith_",
  2302. smalltalk.method({
  2303. selector: "nextPutSequenceWith:",
  2304. fn: function (aBlock){
  2305. var self=this;
  2306. return smalltalk.withContext(function($ctx1) { _st(aBlock)._value();
  2307. return self}, function($ctx1) {$ctx1.fill(self,"nextPutSequenceWith:",{aBlock:aBlock}, smalltalk.JSStream)})}
  2308. }),
  2309. smalltalk.JSStream);
  2310. smalltalk.addMethod(
  2311. "_nextPutStatement_with_",
  2312. smalltalk.method({
  2313. selector: "nextPutStatement:with:",
  2314. fn: function (anInteger,aBlock){
  2315. var self=this;
  2316. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  2317. $1=self["@stream"];
  2318. _st($1)._nextPutAll_(_st(_st("case ").__comma(_st(anInteger)._asString())).__comma(":"));
  2319. $2=_st($1)._lf();
  2320. _st(self)._nextPutStatementWith_(aBlock);
  2321. $3=self["@stream"];
  2322. _st($3)._nextPutAll_(_st(_st("smalltalk.thisContext.pc=").__comma(_st(_st(anInteger).__plus((1)))._asString())).__comma(";"));
  2323. $4=_st($3)._lf();
  2324. return self}, function($ctx1) {$ctx1.fill(self,"nextPutStatement:with:",{anInteger:anInteger,aBlock:aBlock}, smalltalk.JSStream)})}
  2325. }),
  2326. smalltalk.JSStream);
  2327. smalltalk.addMethod(
  2328. "_nextPutStatementWith_",
  2329. smalltalk.method({
  2330. selector: "nextPutStatementWith:",
  2331. fn: function (aBlock){
  2332. var self=this;
  2333. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2334. _st(aBlock)._value();
  2335. $1=self["@stream"];
  2336. _st($1)._nextPutAll_(";");
  2337. $2=_st($1)._lf();
  2338. return self}, function($ctx1) {$ctx1.fill(self,"nextPutStatementWith:",{aBlock:aBlock}, smalltalk.JSStream)})}
  2339. }),
  2340. smalltalk.JSStream);
  2341. smalltalk.addMethod(
  2342. "_nextPutVar_",
  2343. smalltalk.method({
  2344. selector: "nextPutVar:",
  2345. fn: function (aString){
  2346. var self=this;
  2347. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2348. $1=self["@stream"];
  2349. _st($1)._nextPutAll_(_st(_st("var ").__comma(aString)).__comma(";"));
  2350. $2=_st($1)._lf();
  2351. return self}, function($ctx1) {$ctx1.fill(self,"nextPutVar:",{aString:aString}, smalltalk.JSStream)})}
  2352. }),
  2353. smalltalk.JSStream);
  2354. smalltalk.addMethod(
  2355. "_nextPutVars_",
  2356. smalltalk.method({
  2357. selector: "nextPutVars:",
  2358. fn: function (aCollection){
  2359. var self=this;
  2360. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  2361. var $early={};
  2362. try {
  2363. _st(aCollection)._ifEmpty_((function(){
  2364. return smalltalk.withContext(function($ctx2) { $1=self;
  2365. throw $early=[$1];
  2366. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2367. _st(self["@stream"])._nextPutAll_("var ");
  2368. _st(aCollection)._do_separatedBy_((function(each){
  2369. return smalltalk.withContext(function($ctx2) { return _st(self["@stream"])._nextPutAll_(each);
  2370. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
  2371. return smalltalk.withContext(function($ctx2) { return _st(self["@stream"])._nextPutAll_(",");
  2372. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2373. $2=self["@stream"];
  2374. _st($2)._nextPutAll_(";");
  2375. $3=_st($2)._lf();
  2376. return self}
  2377. catch(e) {if(e===$early)return e[0]; throw e}
  2378. }, function($ctx1) {$ctx1.fill(self,"nextPutVars:",{aCollection:aCollection}, smalltalk.JSStream)})}
  2379. }),
  2380. smalltalk.JSStream);
  2381. smalltalk.addMethod(
  2382. "_appendToInstruction_",
  2383. smalltalk.method({
  2384. selector: "appendToInstruction:",
  2385. fn: function (anIRInstruction){
  2386. var self=this;
  2387. return smalltalk.withContext(function($ctx1) { _st(anIRInstruction)._appendBlock_(self);
  2388. return self}, function($ctx1) {$ctx1.fill(self,"appendToInstruction:",{anIRInstruction:anIRInstruction}, smalltalk.BlockClosure)})}
  2389. }),
  2390. smalltalk.BlockClosure);
  2391. smalltalk.addMethod(
  2392. "_asVariableName",
  2393. smalltalk.method({
  2394. selector: "asVariableName",
  2395. fn: function (){
  2396. var self=this;
  2397. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2398. $2=_st(_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._reservedWords())._includes_(self);
  2399. if(smalltalk.assert($2)){
  2400. $1=_st(self).__comma("_");
  2401. } else {
  2402. $1=self;
  2403. };
  2404. return $1;
  2405. }, function($ctx1) {$ctx1.fill(self,"asVariableName",{}, smalltalk.String)})}
  2406. }),
  2407. smalltalk.String);