Compiler-IR.deploy.js 81 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599
  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], {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.fill(null, null, {})})});
  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.fill(null, null, {})})});
  61. _st($4)._withIndexDo_($5);
  62. $9=result;
  63. return $9;
  64. }, function($ctx1) {$ctx1.fill(self,"aliasTemporally:", [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], {}, 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], {}, 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], {}, 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], {}, 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], {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.fill(null, null, {})})}));
  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.fill(null, null, {})})}));
  218. $5=closure;
  219. return $5;
  220. }, function($ctx1) {$ctx1.fill(self,"visitBlockNode:", [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.fill(null, null, {})})}));
  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.fill(null, null, {})})});
  248. return _st($5)._ifNotEmpty_($6);
  249. }, function($ctx2) {$ctx2.fill(null, null, {})})});
  250. $1=_st($2)._withSequence_do_($3,$4);
  251. return $1;
  252. }, function($ctx1) {$ctx1.fill(self,"visitBlockSequenceNode:", [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.fill(null, null, {})})}));
  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.fill(null, null, {})})}));
  274. $2=_st(self)._alias_(_st(_st(aNode)._nodes())._last());
  275. return $2;
  276. }, function($ctx1) {$ctx1.fill(self,"visitCascadeNode:", [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.fill(null, null, {})})}));
  291. $1=array;
  292. return $1;
  293. }, function($ctx1) {$ctx1.fill(self,"visitDynamicArrayNode:", [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.fill(null, null, {})})}));
  308. $1=dictionary;
  309. return $1;
  310. }, function($ctx1) {$ctx1.fill(self,"visitDynamicDictionaryNode:", [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], {}, 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.fill(null, null, {})})}));
  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.fill(null, null, {})})}));
  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], {}, 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.fill(null, null, {})})}));
  386. $2=return_;
  387. return $2;
  388. }, function($ctx1) {$ctx1.fill(self,"visitReturnNode:", [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.fill(null, null, {})})}));
  414. $4=send;
  415. return $4;
  416. }, function($ctx1) {$ctx1.fill(self,"visitSendNode:", [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.fill(null, null, {})})});
  439. return _st($5)._do_($6);
  440. }, function($ctx2) {$ctx2.fill(null, null, {})})});
  441. $1=_st($2)._withSequence_do_($3,$4);
  442. return $1;
  443. }, function($ctx1) {$ctx1.fill(self,"visitSequenceNode:", [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], {}, 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], {}, 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,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], {}, 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], {}, 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. "_isReturn",
  579. smalltalk.method({
  580. selector: "isReturn",
  581. fn: function (){
  582. var self=this;
  583. return smalltalk.withContext(function($ctx1) { return false;
  584. }, function($ctx1) {$ctx1.fill(self,"isReturn", [], {}, smalltalk.IRInstruction)})}
  585. }),
  586. smalltalk.IRInstruction);
  587. smalltalk.addMethod(
  588. "_isSend",
  589. smalltalk.method({
  590. selector: "isSend",
  591. fn: function (){
  592. var self=this;
  593. return smalltalk.withContext(function($ctx1) { return false;
  594. }, function($ctx1) {$ctx1.fill(self,"isSend", [], {}, smalltalk.IRInstruction)})}
  595. }),
  596. smalltalk.IRInstruction);
  597. smalltalk.addMethod(
  598. "_isSequence",
  599. smalltalk.method({
  600. selector: "isSequence",
  601. fn: function (){
  602. var self=this;
  603. return smalltalk.withContext(function($ctx1) { return false;
  604. }, function($ctx1) {$ctx1.fill(self,"isSequence", [], {}, smalltalk.IRInstruction)})}
  605. }),
  606. smalltalk.IRInstruction);
  607. smalltalk.addMethod(
  608. "_isTempDeclaration",
  609. smalltalk.method({
  610. selector: "isTempDeclaration",
  611. fn: function (){
  612. var self=this;
  613. return smalltalk.withContext(function($ctx1) { return false;
  614. }, function($ctx1) {$ctx1.fill(self,"isTempDeclaration", [], {}, smalltalk.IRInstruction)})}
  615. }),
  616. smalltalk.IRInstruction);
  617. smalltalk.addMethod(
  618. "_isVariable",
  619. smalltalk.method({
  620. selector: "isVariable",
  621. fn: function (){
  622. var self=this;
  623. return smalltalk.withContext(function($ctx1) { return false;
  624. }, function($ctx1) {$ctx1.fill(self,"isVariable", [], {}, smalltalk.IRInstruction)})}
  625. }),
  626. smalltalk.IRInstruction);
  627. smalltalk.addMethod(
  628. "_parent",
  629. smalltalk.method({
  630. selector: "parent",
  631. fn: function (){
  632. var self=this;
  633. return smalltalk.withContext(function($ctx1) { var $1;
  634. $1=self["@parent"];
  635. return $1;
  636. }, function($ctx1) {$ctx1.fill(self,"parent", [], {}, smalltalk.IRInstruction)})}
  637. }),
  638. smalltalk.IRInstruction);
  639. smalltalk.addMethod(
  640. "_parent_",
  641. smalltalk.method({
  642. selector: "parent:",
  643. fn: function (anIRInstruction){
  644. var self=this;
  645. return smalltalk.withContext(function($ctx1) { self["@parent"]=anIRInstruction;
  646. return self}, function($ctx1) {$ctx1.fill(self,"parent:", [anIRInstruction], {}, smalltalk.IRInstruction)})}
  647. }),
  648. smalltalk.IRInstruction);
  649. smalltalk.addMethod(
  650. "_remove",
  651. smalltalk.method({
  652. selector: "remove",
  653. fn: function (){
  654. var self=this;
  655. return smalltalk.withContext(function($ctx1) { _st(_st(self)._parent())._remove_(self);
  656. return self}, function($ctx1) {$ctx1.fill(self,"remove", [], {}, smalltalk.IRInstruction)})}
  657. }),
  658. smalltalk.IRInstruction);
  659. smalltalk.addMethod(
  660. "_remove_",
  661. smalltalk.method({
  662. selector: "remove:",
  663. fn: function (anIRInstruction){
  664. var self=this;
  665. return smalltalk.withContext(function($ctx1) { _st(_st(self)._instructions())._remove_(anIRInstruction);
  666. return self}, function($ctx1) {$ctx1.fill(self,"remove:", [anIRInstruction], {}, smalltalk.IRInstruction)})}
  667. }),
  668. smalltalk.IRInstruction);
  669. smalltalk.addMethod(
  670. "_replace_with_",
  671. smalltalk.method({
  672. selector: "replace:with:",
  673. fn: function (anIRInstruction,anotherIRInstruction){
  674. var self=this;
  675. return smalltalk.withContext(function($ctx1) { _st(anotherIRInstruction)._parent_(self);
  676. _st(_st(self)._instructions())._at_put_(_st(_st(self)._instructions())._indexOf_(anIRInstruction),anotherIRInstruction);
  677. return self}, function($ctx1) {$ctx1.fill(self,"replace:with:", [anIRInstruction,anotherIRInstruction], {}, smalltalk.IRInstruction)})}
  678. }),
  679. smalltalk.IRInstruction);
  680. smalltalk.addMethod(
  681. "_replaceWith_",
  682. smalltalk.method({
  683. selector: "replaceWith:",
  684. fn: function (anIRInstruction){
  685. var self=this;
  686. return smalltalk.withContext(function($ctx1) { _st(_st(self)._parent())._replace_with_(self,anIRInstruction);
  687. return self}, function($ctx1) {$ctx1.fill(self,"replaceWith:", [anIRInstruction], {}, smalltalk.IRInstruction)})}
  688. }),
  689. smalltalk.IRInstruction);
  690. smalltalk.addMethod(
  691. "_on_",
  692. smalltalk.method({
  693. selector: "on:",
  694. fn: function (aBuilder){
  695. var self=this;
  696. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  697. $2=_st(self)._new();
  698. _st($2)._builder_(aBuilder);
  699. $3=_st($2)._yourself();
  700. $1=$3;
  701. return $1;
  702. }, function($ctx1) {$ctx1.fill(self,"on:", [aBuilder], {}, smalltalk.IRInstruction.klass)})}
  703. }),
  704. smalltalk.IRInstruction.klass);
  705. smalltalk.addClass('IRAssignment', smalltalk.IRInstruction, [], 'Compiler-IR');
  706. smalltalk.addMethod(
  707. "_accept_",
  708. smalltalk.method({
  709. selector: "accept:",
  710. fn: function (aVisitor){
  711. var self=this;
  712. return smalltalk.withContext(function($ctx1) { var $1;
  713. $1=_st(aVisitor)._visitIRAssignment_(self);
  714. return $1;
  715. }, function($ctx1) {$ctx1.fill(self,"accept:", [aVisitor], {}, smalltalk.IRAssignment)})}
  716. }),
  717. smalltalk.IRAssignment);
  718. smalltalk.addClass('IRDynamicArray', smalltalk.IRInstruction, [], 'Compiler-IR');
  719. smalltalk.addMethod(
  720. "_accept_",
  721. smalltalk.method({
  722. selector: "accept:",
  723. fn: function (aVisitor){
  724. var self=this;
  725. return smalltalk.withContext(function($ctx1) { var $1;
  726. $1=_st(aVisitor)._visitIRDynamicArray_(self);
  727. return $1;
  728. }, function($ctx1) {$ctx1.fill(self,"accept:", [aVisitor], {}, smalltalk.IRDynamicArray)})}
  729. }),
  730. smalltalk.IRDynamicArray);
  731. smalltalk.addClass('IRDynamicDictionary', smalltalk.IRInstruction, [], 'Compiler-IR');
  732. smalltalk.addMethod(
  733. "_accept_",
  734. smalltalk.method({
  735. selector: "accept:",
  736. fn: function (aVisitor){
  737. var self=this;
  738. return smalltalk.withContext(function($ctx1) { var $1;
  739. $1=_st(aVisitor)._visitIRDynamicDictionary_(self);
  740. return $1;
  741. }, function($ctx1) {$ctx1.fill(self,"accept:", [aVisitor], {}, smalltalk.IRDynamicDictionary)})}
  742. }),
  743. smalltalk.IRDynamicDictionary);
  744. smalltalk.addClass('IRScopedInstruction', smalltalk.IRInstruction, ['scope'], 'Compiler-IR');
  745. smalltalk.addMethod(
  746. "_scope",
  747. smalltalk.method({
  748. selector: "scope",
  749. fn: function (){
  750. var self=this;
  751. return smalltalk.withContext(function($ctx1) { var $1;
  752. $1=self["@scope"];
  753. return $1;
  754. }, function($ctx1) {$ctx1.fill(self,"scope", [], {}, smalltalk.IRScopedInstruction)})}
  755. }),
  756. smalltalk.IRScopedInstruction);
  757. smalltalk.addMethod(
  758. "_scope_",
  759. smalltalk.method({
  760. selector: "scope:",
  761. fn: function (aScope){
  762. var self=this;
  763. return smalltalk.withContext(function($ctx1) { self["@scope"]=aScope;
  764. return self}, function($ctx1) {$ctx1.fill(self,"scope:", [aScope], {}, smalltalk.IRScopedInstruction)})}
  765. }),
  766. smalltalk.IRScopedInstruction);
  767. smalltalk.addClass('IRClosure', smalltalk.IRScopedInstruction, ['arguments'], 'Compiler-IR');
  768. smalltalk.addMethod(
  769. "_accept_",
  770. smalltalk.method({
  771. selector: "accept:",
  772. fn: function (aVisitor){
  773. var self=this;
  774. return smalltalk.withContext(function($ctx1) { var $1;
  775. $1=_st(aVisitor)._visitIRClosure_(self);
  776. return $1;
  777. }, function($ctx1) {$ctx1.fill(self,"accept:", [aVisitor], {}, smalltalk.IRClosure)})}
  778. }),
  779. smalltalk.IRClosure);
  780. smalltalk.addMethod(
  781. "_arguments",
  782. smalltalk.method({
  783. selector: "arguments",
  784. fn: function (){
  785. var self=this;
  786. return smalltalk.withContext(function($ctx1) { var $2,$1;
  787. $2=self["@arguments"];
  788. if(($receiver = $2) == nil || $receiver == undefined){
  789. $1=[];
  790. } else {
  791. $1=$2;
  792. };
  793. return $1;
  794. }, function($ctx1) {$ctx1.fill(self,"arguments", [], {}, smalltalk.IRClosure)})}
  795. }),
  796. smalltalk.IRClosure);
  797. smalltalk.addMethod(
  798. "_arguments_",
  799. smalltalk.method({
  800. selector: "arguments:",
  801. fn: function (aCollection){
  802. var self=this;
  803. return smalltalk.withContext(function($ctx1) { self["@arguments"]=aCollection;
  804. return self}, function($ctx1) {$ctx1.fill(self,"arguments:", [aCollection], {}, smalltalk.IRClosure)})}
  805. }),
  806. smalltalk.IRClosure);
  807. smalltalk.addMethod(
  808. "_isClosure",
  809. smalltalk.method({
  810. selector: "isClosure",
  811. fn: function (){
  812. var self=this;
  813. return smalltalk.withContext(function($ctx1) { return true;
  814. }, function($ctx1) {$ctx1.fill(self,"isClosure", [], {}, smalltalk.IRClosure)})}
  815. }),
  816. smalltalk.IRClosure);
  817. smalltalk.addMethod(
  818. "_scope_",
  819. smalltalk.method({
  820. selector: "scope:",
  821. fn: function (aScope){
  822. var self=this;
  823. return smalltalk.withContext(function($ctx1) { smalltalk.IRScopedInstruction.fn.prototype._scope_.apply(_st(self), [aScope]);
  824. _st(aScope)._instruction_(self);
  825. return self}, function($ctx1) {$ctx1.fill(self,"scope:", [aScope], {}, smalltalk.IRClosure)})}
  826. }),
  827. smalltalk.IRClosure);
  828. smalltalk.addMethod(
  829. "_sequence",
  830. smalltalk.method({
  831. selector: "sequence",
  832. fn: function (){
  833. var self=this;
  834. return smalltalk.withContext(function($ctx1) { var $1;
  835. $1=_st(_st(self)._instructions())._last();
  836. return $1;
  837. }, function($ctx1) {$ctx1.fill(self,"sequence", [], {}, smalltalk.IRClosure)})}
  838. }),
  839. smalltalk.IRClosure);
  840. smalltalk.addMethod(
  841. "_tempDeclarations",
  842. smalltalk.method({
  843. selector: "tempDeclarations",
  844. fn: function (){
  845. var self=this;
  846. return smalltalk.withContext(function($ctx1) { var $1;
  847. $1=_st(_st(self)._instructions())._select_((function(each){
  848. return smalltalk.withContext(function($ctx2) { return _st(each)._isTempDeclaration();
  849. }, function($ctx2) {$ctx2.fill(null, null, {})})}));
  850. return $1;
  851. }, function($ctx1) {$ctx1.fill(self,"tempDeclarations", [], {}, smalltalk.IRClosure)})}
  852. }),
  853. smalltalk.IRClosure);
  854. smalltalk.addClass('IRMethod', smalltalk.IRScopedInstruction, ['theClass', 'source', 'selector', 'classReferences', 'messageSends', 'superSends', 'arguments', 'internalVariables'], 'Compiler-IR');
  855. smalltalk.addMethod(
  856. "_accept_",
  857. smalltalk.method({
  858. selector: "accept:",
  859. fn: function (aVisitor){
  860. var self=this;
  861. return smalltalk.withContext(function($ctx1) { var $1;
  862. $1=_st(aVisitor)._visitIRMethod_(self);
  863. return $1;
  864. }, function($ctx1) {$ctx1.fill(self,"accept:", [aVisitor], {}, smalltalk.IRMethod)})}
  865. }),
  866. smalltalk.IRMethod);
  867. smalltalk.addMethod(
  868. "_arguments",
  869. smalltalk.method({
  870. selector: "arguments",
  871. fn: function (){
  872. var self=this;
  873. return smalltalk.withContext(function($ctx1) { var $1;
  874. $1=self["@arguments"];
  875. return $1;
  876. }, function($ctx1) {$ctx1.fill(self,"arguments", [], {}, smalltalk.IRMethod)})}
  877. }),
  878. smalltalk.IRMethod);
  879. smalltalk.addMethod(
  880. "_arguments_",
  881. smalltalk.method({
  882. selector: "arguments:",
  883. fn: function (aCollection){
  884. var self=this;
  885. return smalltalk.withContext(function($ctx1) { self["@arguments"]=aCollection;
  886. return self}, function($ctx1) {$ctx1.fill(self,"arguments:", [aCollection], {}, smalltalk.IRMethod)})}
  887. }),
  888. smalltalk.IRMethod);
  889. smalltalk.addMethod(
  890. "_classReferences",
  891. smalltalk.method({
  892. selector: "classReferences",
  893. fn: function (){
  894. var self=this;
  895. return smalltalk.withContext(function($ctx1) { var $1;
  896. $1=self["@classReferences"];
  897. return $1;
  898. }, function($ctx1) {$ctx1.fill(self,"classReferences", [], {}, smalltalk.IRMethod)})}
  899. }),
  900. smalltalk.IRMethod);
  901. smalltalk.addMethod(
  902. "_classReferences_",
  903. smalltalk.method({
  904. selector: "classReferences:",
  905. fn: function (aCollection){
  906. var self=this;
  907. return smalltalk.withContext(function($ctx1) { self["@classReferences"]=aCollection;
  908. return self}, function($ctx1) {$ctx1.fill(self,"classReferences:", [aCollection], {}, smalltalk.IRMethod)})}
  909. }),
  910. smalltalk.IRMethod);
  911. smalltalk.addMethod(
  912. "_internalVariables",
  913. smalltalk.method({
  914. selector: "internalVariables",
  915. fn: function (){
  916. var self=this;
  917. return smalltalk.withContext(function($ctx1) { var $2,$1;
  918. $2=self["@internalVariables"];
  919. if(($receiver = $2) == nil || $receiver == undefined){
  920. self["@internalVariables"]=_st((smalltalk.Set || Set))._new();
  921. $1=self["@internalVariables"];
  922. } else {
  923. $1=$2;
  924. };
  925. return $1;
  926. }, function($ctx1) {$ctx1.fill(self,"internalVariables", [], {}, smalltalk.IRMethod)})}
  927. }),
  928. smalltalk.IRMethod);
  929. smalltalk.addMethod(
  930. "_messageSends",
  931. smalltalk.method({
  932. selector: "messageSends",
  933. fn: function (){
  934. var self=this;
  935. return smalltalk.withContext(function($ctx1) { var $1;
  936. $1=self["@messageSends"];
  937. return $1;
  938. }, function($ctx1) {$ctx1.fill(self,"messageSends", [], {}, smalltalk.IRMethod)})}
  939. }),
  940. smalltalk.IRMethod);
  941. smalltalk.addMethod(
  942. "_messageSends_",
  943. smalltalk.method({
  944. selector: "messageSends:",
  945. fn: function (aCollection){
  946. var self=this;
  947. return smalltalk.withContext(function($ctx1) { self["@messageSends"]=aCollection;
  948. return self}, function($ctx1) {$ctx1.fill(self,"messageSends:", [aCollection], {}, smalltalk.IRMethod)})}
  949. }),
  950. smalltalk.IRMethod);
  951. smalltalk.addMethod(
  952. "_scope_",
  953. smalltalk.method({
  954. selector: "scope:",
  955. fn: function (aScope){
  956. var self=this;
  957. return smalltalk.withContext(function($ctx1) { smalltalk.IRScopedInstruction.fn.prototype._scope_.apply(_st(self), [aScope]);
  958. _st(aScope)._instruction_(self);
  959. return self}, function($ctx1) {$ctx1.fill(self,"scope:", [aScope], {}, smalltalk.IRMethod)})}
  960. }),
  961. smalltalk.IRMethod);
  962. smalltalk.addMethod(
  963. "_selector",
  964. smalltalk.method({
  965. selector: "selector",
  966. fn: function (){
  967. var self=this;
  968. return smalltalk.withContext(function($ctx1) { var $1;
  969. $1=self["@selector"];
  970. return $1;
  971. }, function($ctx1) {$ctx1.fill(self,"selector", [], {}, smalltalk.IRMethod)})}
  972. }),
  973. smalltalk.IRMethod);
  974. smalltalk.addMethod(
  975. "_selector_",
  976. smalltalk.method({
  977. selector: "selector:",
  978. fn: function (aString){
  979. var self=this;
  980. return smalltalk.withContext(function($ctx1) { self["@selector"]=aString;
  981. return self}, function($ctx1) {$ctx1.fill(self,"selector:", [aString], {}, smalltalk.IRMethod)})}
  982. }),
  983. smalltalk.IRMethod);
  984. smalltalk.addMethod(
  985. "_source",
  986. smalltalk.method({
  987. selector: "source",
  988. fn: function (){
  989. var self=this;
  990. return smalltalk.withContext(function($ctx1) { var $1;
  991. $1=self["@source"];
  992. return $1;
  993. }, function($ctx1) {$ctx1.fill(self,"source", [], {}, smalltalk.IRMethod)})}
  994. }),
  995. smalltalk.IRMethod);
  996. smalltalk.addMethod(
  997. "_source_",
  998. smalltalk.method({
  999. selector: "source:",
  1000. fn: function (aString){
  1001. var self=this;
  1002. return smalltalk.withContext(function($ctx1) { self["@source"]=aString;
  1003. return self}, function($ctx1) {$ctx1.fill(self,"source:", [aString], {}, smalltalk.IRMethod)})}
  1004. }),
  1005. smalltalk.IRMethod);
  1006. smalltalk.addMethod(
  1007. "_superSends",
  1008. smalltalk.method({
  1009. selector: "superSends",
  1010. fn: function (){
  1011. var self=this;
  1012. return smalltalk.withContext(function($ctx1) { var $1;
  1013. $1=self["@superSends"];
  1014. return $1;
  1015. }, function($ctx1) {$ctx1.fill(self,"superSends", [], {}, smalltalk.IRMethod)})}
  1016. }),
  1017. smalltalk.IRMethod);
  1018. smalltalk.addMethod(
  1019. "_superSends_",
  1020. smalltalk.method({
  1021. selector: "superSends:",
  1022. fn: function (aCollection){
  1023. var self=this;
  1024. return smalltalk.withContext(function($ctx1) { self["@superSends"]=aCollection;
  1025. return self}, function($ctx1) {$ctx1.fill(self,"superSends:", [aCollection], {}, smalltalk.IRMethod)})}
  1026. }),
  1027. smalltalk.IRMethod);
  1028. smalltalk.addMethod(
  1029. "_tempDeclarations",
  1030. smalltalk.method({
  1031. selector: "tempDeclarations",
  1032. fn: function (){
  1033. var self=this;
  1034. return smalltalk.withContext(function($ctx1) { var $1;
  1035. $1=_st(_st(self)._instructions())._select_((function(each){
  1036. return smalltalk.withContext(function($ctx2) { return _st(each)._isTempDeclaration();
  1037. }, function($ctx2) {$ctx2.fill(null, null, {})})}));
  1038. return $1;
  1039. }, function($ctx1) {$ctx1.fill(self,"tempDeclarations", [], {}, smalltalk.IRMethod)})}
  1040. }),
  1041. smalltalk.IRMethod);
  1042. smalltalk.addMethod(
  1043. "_theClass",
  1044. smalltalk.method({
  1045. selector: "theClass",
  1046. fn: function (){
  1047. var self=this;
  1048. return smalltalk.withContext(function($ctx1) { var $1;
  1049. $1=self["@theClass"];
  1050. return $1;
  1051. }, function($ctx1) {$ctx1.fill(self,"theClass", [], {}, smalltalk.IRMethod)})}
  1052. }),
  1053. smalltalk.IRMethod);
  1054. smalltalk.addMethod(
  1055. "_theClass_",
  1056. smalltalk.method({
  1057. selector: "theClass:",
  1058. fn: function (aClass){
  1059. var self=this;
  1060. return smalltalk.withContext(function($ctx1) { self["@theClass"]=aClass;
  1061. return self}, function($ctx1) {$ctx1.fill(self,"theClass:", [aClass], {}, smalltalk.IRMethod)})}
  1062. }),
  1063. smalltalk.IRMethod);
  1064. smalltalk.addClass('IRReturn', smalltalk.IRScopedInstruction, [], 'Compiler-IR');
  1065. smalltalk.addMethod(
  1066. "_accept_",
  1067. smalltalk.method({
  1068. selector: "accept:",
  1069. fn: function (aVisitor){
  1070. var self=this;
  1071. return smalltalk.withContext(function($ctx1) { var $1;
  1072. $1=_st(aVisitor)._visitIRReturn_(self);
  1073. return $1;
  1074. }, function($ctx1) {$ctx1.fill(self,"accept:", [aVisitor], {}, smalltalk.IRReturn)})}
  1075. }),
  1076. smalltalk.IRReturn);
  1077. smalltalk.addMethod(
  1078. "_canBeAssigned",
  1079. smalltalk.method({
  1080. selector: "canBeAssigned",
  1081. fn: function (){
  1082. var self=this;
  1083. return smalltalk.withContext(function($ctx1) { return false;
  1084. }, function($ctx1) {$ctx1.fill(self,"canBeAssigned", [], {}, smalltalk.IRReturn)})}
  1085. }),
  1086. smalltalk.IRReturn);
  1087. smalltalk.addMethod(
  1088. "_isBlockReturn",
  1089. smalltalk.method({
  1090. selector: "isBlockReturn",
  1091. fn: function (){
  1092. var self=this;
  1093. return smalltalk.withContext(function($ctx1) { return false;
  1094. }, function($ctx1) {$ctx1.fill(self,"isBlockReturn", [], {}, smalltalk.IRReturn)})}
  1095. }),
  1096. smalltalk.IRReturn);
  1097. smalltalk.addMethod(
  1098. "_isLocalReturn",
  1099. smalltalk.method({
  1100. selector: "isLocalReturn",
  1101. fn: function (){
  1102. var self=this;
  1103. return smalltalk.withContext(function($ctx1) { return true;
  1104. }, function($ctx1) {$ctx1.fill(self,"isLocalReturn", [], {}, smalltalk.IRReturn)})}
  1105. }),
  1106. smalltalk.IRReturn);
  1107. smalltalk.addMethod(
  1108. "_isNonLocalReturn",
  1109. smalltalk.method({
  1110. selector: "isNonLocalReturn",
  1111. fn: function (){
  1112. var self=this;
  1113. return smalltalk.withContext(function($ctx1) { var $1;
  1114. $1=_st(_st(self)._isLocalReturn())._not();
  1115. return $1;
  1116. }, function($ctx1) {$ctx1.fill(self,"isNonLocalReturn", [], {}, smalltalk.IRReturn)})}
  1117. }),
  1118. smalltalk.IRReturn);
  1119. smalltalk.addMethod(
  1120. "_isReturn",
  1121. smalltalk.method({
  1122. selector: "isReturn",
  1123. fn: function (){
  1124. var self=this;
  1125. return smalltalk.withContext(function($ctx1) { return true;
  1126. }, function($ctx1) {$ctx1.fill(self,"isReturn", [], {}, smalltalk.IRReturn)})}
  1127. }),
  1128. smalltalk.IRReturn);
  1129. smalltalk.addClass('IRBlockReturn', smalltalk.IRReturn, [], 'Compiler-IR');
  1130. smalltalk.addMethod(
  1131. "_accept_",
  1132. smalltalk.method({
  1133. selector: "accept:",
  1134. fn: function (aVisitor){
  1135. var self=this;
  1136. return smalltalk.withContext(function($ctx1) { var $1;
  1137. $1=_st(aVisitor)._visitIRBlockReturn_(self);
  1138. return $1;
  1139. }, function($ctx1) {$ctx1.fill(self,"accept:", [aVisitor], {}, smalltalk.IRBlockReturn)})}
  1140. }),
  1141. smalltalk.IRBlockReturn);
  1142. smalltalk.addMethod(
  1143. "_isBlockReturn",
  1144. smalltalk.method({
  1145. selector: "isBlockReturn",
  1146. fn: function (){
  1147. var self=this;
  1148. return smalltalk.withContext(function($ctx1) { return true;
  1149. }, function($ctx1) {$ctx1.fill(self,"isBlockReturn", [], {}, smalltalk.IRBlockReturn)})}
  1150. }),
  1151. smalltalk.IRBlockReturn);
  1152. smalltalk.addClass('IRNonLocalReturn', smalltalk.IRReturn, [], 'Compiler-IR');
  1153. smalltalk.addMethod(
  1154. "_accept_",
  1155. smalltalk.method({
  1156. selector: "accept:",
  1157. fn: function (aVisitor){
  1158. var self=this;
  1159. return smalltalk.withContext(function($ctx1) { var $1;
  1160. $1=_st(aVisitor)._visitIRNonLocalReturn_(self);
  1161. return $1;
  1162. }, function($ctx1) {$ctx1.fill(self,"accept:", [aVisitor], {}, smalltalk.IRNonLocalReturn)})}
  1163. }),
  1164. smalltalk.IRNonLocalReturn);
  1165. smalltalk.addMethod(
  1166. "_isLocalReturn",
  1167. smalltalk.method({
  1168. selector: "isLocalReturn",
  1169. fn: function (){
  1170. var self=this;
  1171. return smalltalk.withContext(function($ctx1) { return false;
  1172. }, function($ctx1) {$ctx1.fill(self,"isLocalReturn", [], {}, smalltalk.IRNonLocalReturn)})}
  1173. }),
  1174. smalltalk.IRNonLocalReturn);
  1175. smalltalk.addClass('IRTempDeclaration', smalltalk.IRScopedInstruction, ['name'], 'Compiler-IR');
  1176. smalltalk.addMethod(
  1177. "_accept_",
  1178. smalltalk.method({
  1179. selector: "accept:",
  1180. fn: function (aVisitor){
  1181. var self=this;
  1182. return smalltalk.withContext(function($ctx1) { var $1;
  1183. $1=_st(aVisitor)._visitIRTempDeclaration_(self);
  1184. return $1;
  1185. }, function($ctx1) {$ctx1.fill(self,"accept:", [aVisitor], {}, smalltalk.IRTempDeclaration)})}
  1186. }),
  1187. smalltalk.IRTempDeclaration);
  1188. smalltalk.addMethod(
  1189. "_isTempDeclaration",
  1190. smalltalk.method({
  1191. selector: "isTempDeclaration",
  1192. fn: function (){
  1193. var self=this;
  1194. return smalltalk.withContext(function($ctx1) { return true;
  1195. }, function($ctx1) {$ctx1.fill(self,"isTempDeclaration", [], {}, smalltalk.IRTempDeclaration)})}
  1196. }),
  1197. smalltalk.IRTempDeclaration);
  1198. smalltalk.addMethod(
  1199. "_name",
  1200. smalltalk.method({
  1201. selector: "name",
  1202. fn: function (){
  1203. var self=this;
  1204. return smalltalk.withContext(function($ctx1) { var $1;
  1205. $1=self["@name"];
  1206. return $1;
  1207. }, function($ctx1) {$ctx1.fill(self,"name", [], {}, smalltalk.IRTempDeclaration)})}
  1208. }),
  1209. smalltalk.IRTempDeclaration);
  1210. smalltalk.addMethod(
  1211. "_name_",
  1212. smalltalk.method({
  1213. selector: "name:",
  1214. fn: function (aString){
  1215. var self=this;
  1216. return smalltalk.withContext(function($ctx1) { self["@name"]=aString;
  1217. return self}, function($ctx1) {$ctx1.fill(self,"name:", [aString], {}, smalltalk.IRTempDeclaration)})}
  1218. }),
  1219. smalltalk.IRTempDeclaration);
  1220. smalltalk.addClass('IRSend', smalltalk.IRInstruction, ['selector', 'classSend', 'index'], 'Compiler-IR');
  1221. smalltalk.addMethod(
  1222. "_accept_",
  1223. smalltalk.method({
  1224. selector: "accept:",
  1225. fn: function (aVisitor){
  1226. var self=this;
  1227. return smalltalk.withContext(function($ctx1) { var $1;
  1228. $1=_st(aVisitor)._visitIRSend_(self);
  1229. return $1;
  1230. }, function($ctx1) {$ctx1.fill(self,"accept:", [aVisitor], {}, smalltalk.IRSend)})}
  1231. }),
  1232. smalltalk.IRSend);
  1233. smalltalk.addMethod(
  1234. "_classSend",
  1235. smalltalk.method({
  1236. selector: "classSend",
  1237. fn: function (){
  1238. var self=this;
  1239. return smalltalk.withContext(function($ctx1) { var $1;
  1240. $1=self["@classSend"];
  1241. return $1;
  1242. }, function($ctx1) {$ctx1.fill(self,"classSend", [], {}, smalltalk.IRSend)})}
  1243. }),
  1244. smalltalk.IRSend);
  1245. smalltalk.addMethod(
  1246. "_classSend_",
  1247. smalltalk.method({
  1248. selector: "classSend:",
  1249. fn: function (aClass){
  1250. var self=this;
  1251. return smalltalk.withContext(function($ctx1) { self["@classSend"]=aClass;
  1252. return self}, function($ctx1) {$ctx1.fill(self,"classSend:", [aClass], {}, smalltalk.IRSend)})}
  1253. }),
  1254. smalltalk.IRSend);
  1255. smalltalk.addMethod(
  1256. "_index",
  1257. smalltalk.method({
  1258. selector: "index",
  1259. fn: function (){
  1260. var self=this;
  1261. return smalltalk.withContext(function($ctx1) { var $1;
  1262. $1=self["@index"];
  1263. return $1;
  1264. }, function($ctx1) {$ctx1.fill(self,"index", [], {}, smalltalk.IRSend)})}
  1265. }),
  1266. smalltalk.IRSend);
  1267. smalltalk.addMethod(
  1268. "_index_",
  1269. smalltalk.method({
  1270. selector: "index:",
  1271. fn: function (anInteger){
  1272. var self=this;
  1273. return smalltalk.withContext(function($ctx1) { self["@index"]=anInteger;
  1274. return self}, function($ctx1) {$ctx1.fill(self,"index:", [anInteger], {}, smalltalk.IRSend)})}
  1275. }),
  1276. smalltalk.IRSend);
  1277. smalltalk.addMethod(
  1278. "_isSend",
  1279. smalltalk.method({
  1280. selector: "isSend",
  1281. fn: function (){
  1282. var self=this;
  1283. return smalltalk.withContext(function($ctx1) { return true;
  1284. }, function($ctx1) {$ctx1.fill(self,"isSend", [], {}, smalltalk.IRSend)})}
  1285. }),
  1286. smalltalk.IRSend);
  1287. smalltalk.addMethod(
  1288. "_javascriptSelector",
  1289. smalltalk.method({
  1290. selector: "javascriptSelector",
  1291. fn: function (){
  1292. var self=this;
  1293. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1294. $2=_st(self)._classSend();
  1295. if(($receiver = $2) == nil || $receiver == undefined){
  1296. $1=_st(_st(self)._selector())._asSelector();
  1297. } else {
  1298. $1=_st(_st(self)._selector())._asSuperSelector();
  1299. };
  1300. return $1;
  1301. }, function($ctx1) {$ctx1.fill(self,"javascriptSelector", [], {}, smalltalk.IRSend)})}
  1302. }),
  1303. smalltalk.IRSend);
  1304. smalltalk.addMethod(
  1305. "_selector",
  1306. smalltalk.method({
  1307. selector: "selector",
  1308. fn: function (){
  1309. var self=this;
  1310. return smalltalk.withContext(function($ctx1) { var $1;
  1311. $1=self["@selector"];
  1312. return $1;
  1313. }, function($ctx1) {$ctx1.fill(self,"selector", [], {}, smalltalk.IRSend)})}
  1314. }),
  1315. smalltalk.IRSend);
  1316. smalltalk.addMethod(
  1317. "_selector_",
  1318. smalltalk.method({
  1319. selector: "selector:",
  1320. fn: function (aString){
  1321. var self=this;
  1322. return smalltalk.withContext(function($ctx1) { self["@selector"]=aString;
  1323. return self}, function($ctx1) {$ctx1.fill(self,"selector:", [aString], {}, smalltalk.IRSend)})}
  1324. }),
  1325. smalltalk.IRSend);
  1326. smalltalk.addClass('IRSequence', smalltalk.IRInstruction, [], 'Compiler-IR');
  1327. smalltalk.addMethod(
  1328. "_accept_",
  1329. smalltalk.method({
  1330. selector: "accept:",
  1331. fn: function (aVisitor){
  1332. var self=this;
  1333. return smalltalk.withContext(function($ctx1) { var $1;
  1334. $1=_st(aVisitor)._visitIRSequence_(self);
  1335. return $1;
  1336. }, function($ctx1) {$ctx1.fill(self,"accept:", [aVisitor], {}, smalltalk.IRSequence)})}
  1337. }),
  1338. smalltalk.IRSequence);
  1339. smalltalk.addMethod(
  1340. "_isSequence",
  1341. smalltalk.method({
  1342. selector: "isSequence",
  1343. fn: function (){
  1344. var self=this;
  1345. return smalltalk.withContext(function($ctx1) { return true;
  1346. }, function($ctx1) {$ctx1.fill(self,"isSequence", [], {}, smalltalk.IRSequence)})}
  1347. }),
  1348. smalltalk.IRSequence);
  1349. smalltalk.addClass('IRBlockSequence', smalltalk.IRSequence, [], 'Compiler-IR');
  1350. smalltalk.addMethod(
  1351. "_accept_",
  1352. smalltalk.method({
  1353. selector: "accept:",
  1354. fn: function (aVisitor){
  1355. var self=this;
  1356. return smalltalk.withContext(function($ctx1) { var $1;
  1357. $1=_st(aVisitor)._visitIRBlockSequence_(self);
  1358. return $1;
  1359. }, function($ctx1) {$ctx1.fill(self,"accept:", [aVisitor], {}, smalltalk.IRBlockSequence)})}
  1360. }),
  1361. smalltalk.IRBlockSequence);
  1362. smalltalk.addClass('IRValue', smalltalk.IRInstruction, ['value'], 'Compiler-IR');
  1363. smalltalk.addMethod(
  1364. "_accept_",
  1365. smalltalk.method({
  1366. selector: "accept:",
  1367. fn: function (aVisitor){
  1368. var self=this;
  1369. return smalltalk.withContext(function($ctx1) { var $1;
  1370. $1=_st(aVisitor)._visitIRValue_(self);
  1371. return $1;
  1372. }, function($ctx1) {$ctx1.fill(self,"accept:", [aVisitor], {}, smalltalk.IRValue)})}
  1373. }),
  1374. smalltalk.IRValue);
  1375. smalltalk.addMethod(
  1376. "_value",
  1377. smalltalk.method({
  1378. selector: "value",
  1379. fn: function (){
  1380. var self=this;
  1381. return smalltalk.withContext(function($ctx1) { var $1;
  1382. $1=self["@value"];
  1383. return $1;
  1384. }, function($ctx1) {$ctx1.fill(self,"value", [], {}, smalltalk.IRValue)})}
  1385. }),
  1386. smalltalk.IRValue);
  1387. smalltalk.addMethod(
  1388. "_value_",
  1389. smalltalk.method({
  1390. selector: "value:",
  1391. fn: function (aString){
  1392. var self=this;
  1393. return smalltalk.withContext(function($ctx1) { self["@value"]=aString;
  1394. return self}, function($ctx1) {$ctx1.fill(self,"value:", [aString], {}, smalltalk.IRValue)})}
  1395. }),
  1396. smalltalk.IRValue);
  1397. smalltalk.addClass('IRVariable', smalltalk.IRInstruction, ['variable'], 'Compiler-IR');
  1398. smalltalk.addMethod(
  1399. "_accept_",
  1400. smalltalk.method({
  1401. selector: "accept:",
  1402. fn: function (aVisitor){
  1403. var self=this;
  1404. return smalltalk.withContext(function($ctx1) { var $1;
  1405. $1=_st(aVisitor)._visitIRVariable_(self);
  1406. return $1;
  1407. }, function($ctx1) {$ctx1.fill(self,"accept:", [aVisitor], {}, smalltalk.IRVariable)})}
  1408. }),
  1409. smalltalk.IRVariable);
  1410. smalltalk.addMethod(
  1411. "_isVariable",
  1412. smalltalk.method({
  1413. selector: "isVariable",
  1414. fn: function (){
  1415. var self=this;
  1416. return smalltalk.withContext(function($ctx1) { return true;
  1417. }, function($ctx1) {$ctx1.fill(self,"isVariable", [], {}, smalltalk.IRVariable)})}
  1418. }),
  1419. smalltalk.IRVariable);
  1420. smalltalk.addMethod(
  1421. "_variable",
  1422. smalltalk.method({
  1423. selector: "variable",
  1424. fn: function (){
  1425. var self=this;
  1426. return smalltalk.withContext(function($ctx1) { var $1;
  1427. $1=self["@variable"];
  1428. return $1;
  1429. }, function($ctx1) {$ctx1.fill(self,"variable", [], {}, smalltalk.IRVariable)})}
  1430. }),
  1431. smalltalk.IRVariable);
  1432. smalltalk.addMethod(
  1433. "_variable_",
  1434. smalltalk.method({
  1435. selector: "variable:",
  1436. fn: function (aScopeVariable){
  1437. var self=this;
  1438. return smalltalk.withContext(function($ctx1) { self["@variable"]=aScopeVariable;
  1439. return self}, function($ctx1) {$ctx1.fill(self,"variable:", [aScopeVariable], {}, smalltalk.IRVariable)})}
  1440. }),
  1441. smalltalk.IRVariable);
  1442. smalltalk.addClass('IRVerbatim', smalltalk.IRInstruction, ['source'], 'Compiler-IR');
  1443. smalltalk.addMethod(
  1444. "_accept_",
  1445. smalltalk.method({
  1446. selector: "accept:",
  1447. fn: function (aVisitor){
  1448. var self=this;
  1449. return smalltalk.withContext(function($ctx1) { var $1;
  1450. $1=_st(aVisitor)._visitIRVerbatim_(self);
  1451. return $1;
  1452. }, function($ctx1) {$ctx1.fill(self,"accept:", [aVisitor], {}, smalltalk.IRVerbatim)})}
  1453. }),
  1454. smalltalk.IRVerbatim);
  1455. smalltalk.addMethod(
  1456. "_source",
  1457. smalltalk.method({
  1458. selector: "source",
  1459. fn: function (){
  1460. var self=this;
  1461. return smalltalk.withContext(function($ctx1) { var $1;
  1462. $1=self["@source"];
  1463. return $1;
  1464. }, function($ctx1) {$ctx1.fill(self,"source", [], {}, smalltalk.IRVerbatim)})}
  1465. }),
  1466. smalltalk.IRVerbatim);
  1467. smalltalk.addMethod(
  1468. "_source_",
  1469. smalltalk.method({
  1470. selector: "source:",
  1471. fn: function (aString){
  1472. var self=this;
  1473. return smalltalk.withContext(function($ctx1) { self["@source"]=aString;
  1474. return self}, function($ctx1) {$ctx1.fill(self,"source:", [aString], {}, smalltalk.IRVerbatim)})}
  1475. }),
  1476. smalltalk.IRVerbatim);
  1477. smalltalk.addClass('IRVisitor', smalltalk.Object, [], 'Compiler-IR');
  1478. smalltalk.addMethod(
  1479. "_visit_",
  1480. smalltalk.method({
  1481. selector: "visit:",
  1482. fn: function (anIRInstruction){
  1483. var self=this;
  1484. return smalltalk.withContext(function($ctx1) { var $1;
  1485. $1=_st(anIRInstruction)._accept_(self);
  1486. return $1;
  1487. }, function($ctx1) {$ctx1.fill(self,"visit:", [anIRInstruction], {}, smalltalk.IRVisitor)})}
  1488. }),
  1489. smalltalk.IRVisitor);
  1490. smalltalk.addMethod(
  1491. "_visitIRAssignment_",
  1492. smalltalk.method({
  1493. selector: "visitIRAssignment:",
  1494. fn: function (anIRAssignment){
  1495. var self=this;
  1496. return smalltalk.withContext(function($ctx1) { var $1;
  1497. $1=_st(self)._visitIRInstruction_(anIRAssignment);
  1498. return $1;
  1499. }, function($ctx1) {$ctx1.fill(self,"visitIRAssignment:", [anIRAssignment], {}, smalltalk.IRVisitor)})}
  1500. }),
  1501. smalltalk.IRVisitor);
  1502. smalltalk.addMethod(
  1503. "_visitIRBlockReturn_",
  1504. smalltalk.method({
  1505. selector: "visitIRBlockReturn:",
  1506. fn: function (anIRBlockReturn){
  1507. var self=this;
  1508. return smalltalk.withContext(function($ctx1) { var $1;
  1509. $1=_st(self)._visitIRReturn_(anIRBlockReturn);
  1510. return $1;
  1511. }, function($ctx1) {$ctx1.fill(self,"visitIRBlockReturn:", [anIRBlockReturn], {}, smalltalk.IRVisitor)})}
  1512. }),
  1513. smalltalk.IRVisitor);
  1514. smalltalk.addMethod(
  1515. "_visitIRBlockSequence_",
  1516. smalltalk.method({
  1517. selector: "visitIRBlockSequence:",
  1518. fn: function (anIRBlockSequence){
  1519. var self=this;
  1520. return smalltalk.withContext(function($ctx1) { var $1;
  1521. $1=_st(self)._visitIRSequence_(anIRBlockSequence);
  1522. return $1;
  1523. }, function($ctx1) {$ctx1.fill(self,"visitIRBlockSequence:", [anIRBlockSequence], {}, smalltalk.IRVisitor)})}
  1524. }),
  1525. smalltalk.IRVisitor);
  1526. smalltalk.addMethod(
  1527. "_visitIRClosure_",
  1528. smalltalk.method({
  1529. selector: "visitIRClosure:",
  1530. fn: function (anIRClosure){
  1531. var self=this;
  1532. return smalltalk.withContext(function($ctx1) { var $1;
  1533. $1=_st(self)._visitIRInstruction_(anIRClosure);
  1534. return $1;
  1535. }, function($ctx1) {$ctx1.fill(self,"visitIRClosure:", [anIRClosure], {}, smalltalk.IRVisitor)})}
  1536. }),
  1537. smalltalk.IRVisitor);
  1538. smalltalk.addMethod(
  1539. "_visitIRDynamicArray_",
  1540. smalltalk.method({
  1541. selector: "visitIRDynamicArray:",
  1542. fn: function (anIRDynamicArray){
  1543. var self=this;
  1544. return smalltalk.withContext(function($ctx1) { var $1;
  1545. $1=_st(self)._visitIRInstruction_(anIRDynamicArray);
  1546. return $1;
  1547. }, function($ctx1) {$ctx1.fill(self,"visitIRDynamicArray:", [anIRDynamicArray], {}, smalltalk.IRVisitor)})}
  1548. }),
  1549. smalltalk.IRVisitor);
  1550. smalltalk.addMethod(
  1551. "_visitIRDynamicDictionary_",
  1552. smalltalk.method({
  1553. selector: "visitIRDynamicDictionary:",
  1554. fn: function (anIRDynamicDictionary){
  1555. var self=this;
  1556. return smalltalk.withContext(function($ctx1) { var $1;
  1557. $1=_st(self)._visitIRInstruction_(anIRDynamicDictionary);
  1558. return $1;
  1559. }, function($ctx1) {$ctx1.fill(self,"visitIRDynamicDictionary:", [anIRDynamicDictionary], {}, smalltalk.IRVisitor)})}
  1560. }),
  1561. smalltalk.IRVisitor);
  1562. smalltalk.addMethod(
  1563. "_visitIRInlinedClosure_",
  1564. smalltalk.method({
  1565. selector: "visitIRInlinedClosure:",
  1566. fn: function (anIRInlinedClosure){
  1567. var self=this;
  1568. return smalltalk.withContext(function($ctx1) { var $1;
  1569. $1=_st(self)._visitIRClosure_(anIRInlinedClosure);
  1570. return $1;
  1571. }, function($ctx1) {$ctx1.fill(self,"visitIRInlinedClosure:", [anIRInlinedClosure], {}, smalltalk.IRVisitor)})}
  1572. }),
  1573. smalltalk.IRVisitor);
  1574. smalltalk.addMethod(
  1575. "_visitIRInlinedSequence_",
  1576. smalltalk.method({
  1577. selector: "visitIRInlinedSequence:",
  1578. fn: function (anIRInlinedSequence){
  1579. var self=this;
  1580. return smalltalk.withContext(function($ctx1) { var $1;
  1581. $1=_st(self)._visitIRSequence_(anIRInlinedSequence);
  1582. return $1;
  1583. }, function($ctx1) {$ctx1.fill(self,"visitIRInlinedSequence:", [anIRInlinedSequence], {}, smalltalk.IRVisitor)})}
  1584. }),
  1585. smalltalk.IRVisitor);
  1586. smalltalk.addMethod(
  1587. "_visitIRInstruction_",
  1588. smalltalk.method({
  1589. selector: "visitIRInstruction:",
  1590. fn: function (anIRInstruction){
  1591. var self=this;
  1592. return smalltalk.withContext(function($ctx1) { var $1;
  1593. _st(_st(anIRInstruction)._instructions())._do_((function(each){
  1594. return smalltalk.withContext(function($ctx2) { return _st(self)._visit_(each);
  1595. }, function($ctx2) {$ctx2.fill(null, null, {})})}));
  1596. $1=anIRInstruction;
  1597. return $1;
  1598. }, function($ctx1) {$ctx1.fill(self,"visitIRInstruction:", [anIRInstruction], {}, smalltalk.IRVisitor)})}
  1599. }),
  1600. smalltalk.IRVisitor);
  1601. smalltalk.addMethod(
  1602. "_visitIRMethod_",
  1603. smalltalk.method({
  1604. selector: "visitIRMethod:",
  1605. fn: function (anIRMethod){
  1606. var self=this;
  1607. return smalltalk.withContext(function($ctx1) { var $1;
  1608. $1=_st(self)._visitIRInstruction_(anIRMethod);
  1609. return $1;
  1610. }, function($ctx1) {$ctx1.fill(self,"visitIRMethod:", [anIRMethod], {}, smalltalk.IRVisitor)})}
  1611. }),
  1612. smalltalk.IRVisitor);
  1613. smalltalk.addMethod(
  1614. "_visitIRNonLocalReturn_",
  1615. smalltalk.method({
  1616. selector: "visitIRNonLocalReturn:",
  1617. fn: function (anIRNonLocalReturn){
  1618. var self=this;
  1619. return smalltalk.withContext(function($ctx1) { var $1;
  1620. $1=_st(self)._visitIRInstruction_(anIRNonLocalReturn);
  1621. return $1;
  1622. }, function($ctx1) {$ctx1.fill(self,"visitIRNonLocalReturn:", [anIRNonLocalReturn], {}, smalltalk.IRVisitor)})}
  1623. }),
  1624. smalltalk.IRVisitor);
  1625. smalltalk.addMethod(
  1626. "_visitIRNonLocalReturnHandling_",
  1627. smalltalk.method({
  1628. selector: "visitIRNonLocalReturnHandling:",
  1629. fn: function (anIRNonLocalReturnHandling){
  1630. var self=this;
  1631. return smalltalk.withContext(function($ctx1) { var $1;
  1632. $1=_st(self)._visitIRInstruction_(anIRNonLocalReturnHandling);
  1633. return $1;
  1634. }, function($ctx1) {$ctx1.fill(self,"visitIRNonLocalReturnHandling:", [anIRNonLocalReturnHandling], {}, smalltalk.IRVisitor)})}
  1635. }),
  1636. smalltalk.IRVisitor);
  1637. smalltalk.addMethod(
  1638. "_visitIRReturn_",
  1639. smalltalk.method({
  1640. selector: "visitIRReturn:",
  1641. fn: function (anIRReturn){
  1642. var self=this;
  1643. return smalltalk.withContext(function($ctx1) { var $1;
  1644. $1=_st(self)._visitIRInstruction_(anIRReturn);
  1645. return $1;
  1646. }, function($ctx1) {$ctx1.fill(self,"visitIRReturn:", [anIRReturn], {}, smalltalk.IRVisitor)})}
  1647. }),
  1648. smalltalk.IRVisitor);
  1649. smalltalk.addMethod(
  1650. "_visitIRSend_",
  1651. smalltalk.method({
  1652. selector: "visitIRSend:",
  1653. fn: function (anIRSend){
  1654. var self=this;
  1655. return smalltalk.withContext(function($ctx1) { var $1;
  1656. $1=_st(self)._visitIRInstruction_(anIRSend);
  1657. return $1;
  1658. }, function($ctx1) {$ctx1.fill(self,"visitIRSend:", [anIRSend], {}, smalltalk.IRVisitor)})}
  1659. }),
  1660. smalltalk.IRVisitor);
  1661. smalltalk.addMethod(
  1662. "_visitIRSequence_",
  1663. smalltalk.method({
  1664. selector: "visitIRSequence:",
  1665. fn: function (anIRSequence){
  1666. var self=this;
  1667. return smalltalk.withContext(function($ctx1) { var $1;
  1668. $1=_st(self)._visitIRInstruction_(anIRSequence);
  1669. return $1;
  1670. }, function($ctx1) {$ctx1.fill(self,"visitIRSequence:", [anIRSequence], {}, smalltalk.IRVisitor)})}
  1671. }),
  1672. smalltalk.IRVisitor);
  1673. smalltalk.addMethod(
  1674. "_visitIRTempDeclaration_",
  1675. smalltalk.method({
  1676. selector: "visitIRTempDeclaration:",
  1677. fn: function (anIRTempDeclaration){
  1678. var self=this;
  1679. return smalltalk.withContext(function($ctx1) { var $1;
  1680. $1=_st(self)._visitIRInstruction_(anIRTempDeclaration);
  1681. return $1;
  1682. }, function($ctx1) {$ctx1.fill(self,"visitIRTempDeclaration:", [anIRTempDeclaration], {}, smalltalk.IRVisitor)})}
  1683. }),
  1684. smalltalk.IRVisitor);
  1685. smalltalk.addMethod(
  1686. "_visitIRValue_",
  1687. smalltalk.method({
  1688. selector: "visitIRValue:",
  1689. fn: function (anIRValue){
  1690. var self=this;
  1691. return smalltalk.withContext(function($ctx1) { var $1;
  1692. $1=_st(self)._visitIRInstruction_(anIRValue);
  1693. return $1;
  1694. }, function($ctx1) {$ctx1.fill(self,"visitIRValue:", [anIRValue], {}, smalltalk.IRVisitor)})}
  1695. }),
  1696. smalltalk.IRVisitor);
  1697. smalltalk.addMethod(
  1698. "_visitIRVariable_",
  1699. smalltalk.method({
  1700. selector: "visitIRVariable:",
  1701. fn: function (anIRVariable){
  1702. var self=this;
  1703. return smalltalk.withContext(function($ctx1) { var $1;
  1704. $1=_st(self)._visitIRInstruction_(anIRVariable);
  1705. return $1;
  1706. }, function($ctx1) {$ctx1.fill(self,"visitIRVariable:", [anIRVariable], {}, smalltalk.IRVisitor)})}
  1707. }),
  1708. smalltalk.IRVisitor);
  1709. smalltalk.addMethod(
  1710. "_visitIRVerbatim_",
  1711. smalltalk.method({
  1712. selector: "visitIRVerbatim:",
  1713. fn: function (anIRVerbatim){
  1714. var self=this;
  1715. return smalltalk.withContext(function($ctx1) { var $1;
  1716. $1=_st(self)._visitIRInstruction_(anIRVerbatim);
  1717. return $1;
  1718. }, function($ctx1) {$ctx1.fill(self,"visitIRVerbatim:", [anIRVerbatim], {}, smalltalk.IRVisitor)})}
  1719. }),
  1720. smalltalk.IRVisitor);
  1721. smalltalk.addClass('IRJSTranslator', smalltalk.IRVisitor, ['stream'], 'Compiler-IR');
  1722. smalltalk.addMethod(
  1723. "_contents",
  1724. smalltalk.method({
  1725. selector: "contents",
  1726. fn: function (){
  1727. var self=this;
  1728. return smalltalk.withContext(function($ctx1) { var $1;
  1729. $1=_st(_st(self)._stream())._contents();
  1730. return $1;
  1731. }, function($ctx1) {$ctx1.fill(self,"contents", [], {}, smalltalk.IRJSTranslator)})}
  1732. }),
  1733. smalltalk.IRJSTranslator);
  1734. smalltalk.addMethod(
  1735. "_initialize",
  1736. smalltalk.method({
  1737. selector: "initialize",
  1738. fn: function (){
  1739. var self=this;
  1740. return smalltalk.withContext(function($ctx1) { smalltalk.IRVisitor.fn.prototype._initialize.apply(_st(self), []);
  1741. self["@stream"]=_st((smalltalk.JSStream || JSStream))._new();
  1742. return self}, function($ctx1) {$ctx1.fill(self,"initialize", [], {}, smalltalk.IRJSTranslator)})}
  1743. }),
  1744. smalltalk.IRJSTranslator);
  1745. smalltalk.addMethod(
  1746. "_stream",
  1747. smalltalk.method({
  1748. selector: "stream",
  1749. fn: function (){
  1750. var self=this;
  1751. return smalltalk.withContext(function($ctx1) { var $1;
  1752. $1=self["@stream"];
  1753. return $1;
  1754. }, function($ctx1) {$ctx1.fill(self,"stream", [], {}, smalltalk.IRJSTranslator)})}
  1755. }),
  1756. smalltalk.IRJSTranslator);
  1757. smalltalk.addMethod(
  1758. "_stream_",
  1759. smalltalk.method({
  1760. selector: "stream:",
  1761. fn: function (aStream){
  1762. var self=this;
  1763. return smalltalk.withContext(function($ctx1) { self["@stream"]=aStream;
  1764. return self}, function($ctx1) {$ctx1.fill(self,"stream:", [aStream], {}, smalltalk.IRJSTranslator)})}
  1765. }),
  1766. smalltalk.IRJSTranslator);
  1767. smalltalk.addMethod(
  1768. "_visitIRAssignment_",
  1769. smalltalk.method({
  1770. selector: "visitIRAssignment:",
  1771. fn: function (anIRAssignment){
  1772. var self=this;
  1773. return smalltalk.withContext(function($ctx1) { _st(self)._visit_(_st(_st(anIRAssignment)._instructions())._first());
  1774. _st(_st(self)._stream())._nextPutAssignment();
  1775. _st(self)._visit_(_st(_st(anIRAssignment)._instructions())._last());
  1776. return self}, function($ctx1) {$ctx1.fill(self,"visitIRAssignment:", [anIRAssignment], {}, smalltalk.IRJSTranslator)})}
  1777. }),
  1778. smalltalk.IRJSTranslator);
  1779. smalltalk.addMethod(
  1780. "_visitIRClosure_",
  1781. smalltalk.method({
  1782. selector: "visitIRClosure:",
  1783. fn: function (anIRClosure){
  1784. var self=this;
  1785. return smalltalk.withContext(function($ctx1) { _st(_st(self)._stream())._nextPutClosureWith_arguments_((function(){
  1786. return smalltalk.withContext(function($ctx2) { _st(_st(self)._stream())._nextPutVars_(_st(_st(anIRClosure)._tempDeclarations())._collect_((function(each){
  1787. return smalltalk.withContext(function($ctx3) { return _st(_st(each)._name())._asVariableName();
  1788. }, function($ctx3) {$ctx3.fill(null, null, {})})})));
  1789. return _st(_st(self)._stream())._nextPutBlockContextFor_during_(anIRClosure,(function(){
  1790. return smalltalk.withContext(function($ctx3) { return smalltalk.IRVisitor.fn.prototype._visitIRClosure_.apply(_st(self), [anIRClosure]);
  1791. }, function($ctx3) {$ctx3.fill(null, null, {})})}));
  1792. }, function($ctx2) {$ctx2.fill(null, null, {})})}),_st(anIRClosure)._arguments());
  1793. return self}, function($ctx1) {$ctx1.fill(self,"visitIRClosure:", [anIRClosure], {}, smalltalk.IRJSTranslator)})}
  1794. }),
  1795. smalltalk.IRJSTranslator);
  1796. smalltalk.addMethod(
  1797. "_visitIRDynamicArray_",
  1798. smalltalk.method({
  1799. selector: "visitIRDynamicArray:",
  1800. fn: function (anIRDynamicArray){
  1801. var self=this;
  1802. return smalltalk.withContext(function($ctx1) { _st(_st(self)._stream())._nextPutAll_("[");
  1803. _st(_st(anIRDynamicArray)._instructions())._do_separatedBy_((function(each){
  1804. return smalltalk.withContext(function($ctx2) { return _st(self)._visit_(each);
  1805. }, function($ctx2) {$ctx2.fill(null, null, {})})}),(function(){
  1806. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._stream())._nextPutAll_(",");
  1807. }, function($ctx2) {$ctx2.fill(null, null, {})})}));
  1808. _st(self["@stream"])._nextPutAll_("]");
  1809. return self}, function($ctx1) {$ctx1.fill(self,"visitIRDynamicArray:", [anIRDynamicArray], {}, smalltalk.IRJSTranslator)})}
  1810. }),
  1811. smalltalk.IRJSTranslator);
  1812. smalltalk.addMethod(
  1813. "_visitIRDynamicDictionary_",
  1814. smalltalk.method({
  1815. selector: "visitIRDynamicDictionary:",
  1816. fn: function (anIRDynamicDictionary){
  1817. var self=this;
  1818. return smalltalk.withContext(function($ctx1) { _st(_st(self)._stream())._nextPutAll_("smalltalk.HashedCollection._fromPairs_([");
  1819. _st(_st(anIRDynamicDictionary)._instructions())._do_separatedBy_((function(each){
  1820. return smalltalk.withContext(function($ctx2) { return _st(self)._visit_(each);
  1821. }, function($ctx2) {$ctx2.fill(null, null, {})})}),(function(){
  1822. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._stream())._nextPutAll_(",");
  1823. }, function($ctx2) {$ctx2.fill(null, null, {})})}));
  1824. _st(_st(self)._stream())._nextPutAll_("])");
  1825. return self}, function($ctx1) {$ctx1.fill(self,"visitIRDynamicDictionary:", [anIRDynamicDictionary], {}, smalltalk.IRJSTranslator)})}
  1826. }),
  1827. smalltalk.IRJSTranslator);
  1828. smalltalk.addMethod(
  1829. "_visitIRMethod_",
  1830. smalltalk.method({
  1831. selector: "visitIRMethod:",
  1832. fn: function (anIRMethod){
  1833. var self=this;
  1834. return smalltalk.withContext(function($ctx1) { var $1,$2,$4,$6,$7,$9,$10,$8,$5,$3;
  1835. $1=_st(self)._stream();
  1836. $2=anIRMethod;
  1837. $3=(function(){
  1838. return smalltalk.withContext(function($ctx2) { $4=_st(self)._stream();
  1839. $5=(function(){
  1840. return smalltalk.withContext(function($ctx3) { _st(_st(self)._stream())._nextPutVars_(_st(_st(anIRMethod)._tempDeclarations())._collect_((function(each){
  1841. return smalltalk.withContext(function($ctx4) { return _st(_st(each)._name())._asVariableName();
  1842. }, function($ctx4) {$ctx4.fill(null, null, {})})})));
  1843. $6=_st(self)._stream();
  1844. $7=anIRMethod;
  1845. $8=(function(){
  1846. return smalltalk.withContext(function($ctx4) { $9=_st(_st(anIRMethod)._internalVariables())._notEmpty();
  1847. if(smalltalk.assert($9)){
  1848. _st(_st(self)._stream())._nextPutVars_(_st(_st(_st(anIRMethod)._internalVariables())._asArray())._collect_((function(each){
  1849. return smalltalk.withContext(function($ctx5) { return _st(_st(each)._variable())._alias();
  1850. }, function($ctx5) {$ctx5.fill(null, null, {})})})));
  1851. };
  1852. $10=_st(_st(anIRMethod)._scope())._hasNonLocalReturn();
  1853. if(smalltalk.assert($10)){
  1854. return _st(_st(self)._stream())._nextPutNonLocalReturnHandlingWith_((function(){
  1855. return smalltalk.withContext(function($ctx5) { return smalltalk.IRVisitor.fn.prototype._visitIRMethod_.apply(_st(self), [anIRMethod]);
  1856. }, function($ctx5) {$ctx5.fill(null, null, {})})}));
  1857. } else {
  1858. return smalltalk.IRVisitor.fn.prototype._visitIRMethod_.apply(_st(self), [anIRMethod]);
  1859. };
  1860. }, function($ctx4) {$ctx4.fill(null, null, {})})});
  1861. return _st($6)._nextPutContextFor_during_($7,$8);
  1862. }, function($ctx3) {$ctx3.fill(null, null, {})})});
  1863. return _st($4)._nextPutFunctionWith_arguments_($5,_st(anIRMethod)._arguments());
  1864. }, function($ctx2) {$ctx2.fill(null, null, {})})});
  1865. _st($1)._nextPutMethodDeclaration_with_($2,$3);
  1866. return self}, function($ctx1) {$ctx1.fill(self,"visitIRMethod:", [anIRMethod], {}, smalltalk.IRJSTranslator)})}
  1867. }),
  1868. smalltalk.IRJSTranslator);
  1869. smalltalk.addMethod(
  1870. "_visitIRNonLocalReturn_",
  1871. smalltalk.method({
  1872. selector: "visitIRNonLocalReturn:",
  1873. fn: function (anIRNonLocalReturn){
  1874. var self=this;
  1875. return smalltalk.withContext(function($ctx1) { _st(_st(self)._stream())._nextPutNonLocalReturnWith_((function(){
  1876. return smalltalk.withContext(function($ctx2) { return smalltalk.IRVisitor.fn.prototype._visitIRNonLocalReturn_.apply(_st(self), [anIRNonLocalReturn]);
  1877. }, function($ctx2) {$ctx2.fill(null, null, {})})}));
  1878. return self}, function($ctx1) {$ctx1.fill(self,"visitIRNonLocalReturn:", [anIRNonLocalReturn], {}, smalltalk.IRJSTranslator)})}
  1879. }),
  1880. smalltalk.IRJSTranslator);
  1881. smalltalk.addMethod(
  1882. "_visitIRReturn_",
  1883. smalltalk.method({
  1884. selector: "visitIRReturn:",
  1885. fn: function (anIRReturn){
  1886. var self=this;
  1887. return smalltalk.withContext(function($ctx1) { _st(_st(self)._stream())._nextPutReturnWith_((function(){
  1888. return smalltalk.withContext(function($ctx2) { return smalltalk.IRVisitor.fn.prototype._visitIRReturn_.apply(_st(self), [anIRReturn]);
  1889. }, function($ctx2) {$ctx2.fill(null, null, {})})}));
  1890. return self}, function($ctx1) {$ctx1.fill(self,"visitIRReturn:", [anIRReturn], {}, smalltalk.IRJSTranslator)})}
  1891. }),
  1892. smalltalk.IRJSTranslator);
  1893. smalltalk.addMethod(
  1894. "_visitIRSend_",
  1895. smalltalk.method({
  1896. selector: "visitIRSend:",
  1897. fn: function (anIRSend){
  1898. var self=this;
  1899. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  1900. $1=_st(anIRSend)._classSend();
  1901. if(($receiver = $1) == nil || $receiver == undefined){
  1902. _st(_st(self)._stream())._nextPutAll_("_st(");
  1903. _st(self)._visit_(_st(_st(anIRSend)._instructions())._first());
  1904. _st(_st(self)._stream())._nextPutAll_(_st(_st(").").__comma(_st(_st(anIRSend)._selector())._asSelector())).__comma("("));
  1905. _st(_st(_st(anIRSend)._instructions())._allButFirst())._do_separatedBy_((function(each){
  1906. return smalltalk.withContext(function($ctx2) { return _st(self)._visit_(each);
  1907. }, function($ctx2) {$ctx2.fill(null, null, {})})}),(function(){
  1908. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._stream())._nextPutAll_(",");
  1909. }, function($ctx2) {$ctx2.fill(null, null, {})})}));
  1910. _st(_st(self)._stream())._nextPutAll_(")");
  1911. } else {
  1912. $2=_st(self)._stream();
  1913. _st($2)._nextPutAll_(_st(_st(_st(anIRSend)._classSend())._asJavascript()).__comma(".fn.prototype."));
  1914. _st($2)._nextPutAll_(_st(_st(_st(anIRSend)._selector())._asSelector()).__comma(".apply("));
  1915. $3=_st($2)._nextPutAll_("_st(");
  1916. $3;
  1917. _st(self)._visit_(_st(_st(anIRSend)._instructions())._first());
  1918. _st(_st(self)._stream())._nextPutAll_("), [");
  1919. _st(_st(_st(anIRSend)._instructions())._allButFirst())._do_separatedBy_((function(each){
  1920. return smalltalk.withContext(function($ctx2) { return _st(self)._visit_(each);
  1921. }, function($ctx2) {$ctx2.fill(null, null, {})})}),(function(){
  1922. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._stream())._nextPutAll_(",");
  1923. }, function($ctx2) {$ctx2.fill(null, null, {})})}));
  1924. _st(_st(self)._stream())._nextPutAll_("])");
  1925. };
  1926. return self}, function($ctx1) {$ctx1.fill(self,"visitIRSend:", [anIRSend], {}, smalltalk.IRJSTranslator)})}
  1927. }),
  1928. smalltalk.IRJSTranslator);
  1929. smalltalk.addMethod(
  1930. "_visitIRSequence_",
  1931. smalltalk.method({
  1932. selector: "visitIRSequence:",
  1933. fn: function (anIRSequence){
  1934. var self=this;
  1935. return smalltalk.withContext(function($ctx1) { _st(_st(self)._stream())._nextPutSequenceWith_((function(){
  1936. return smalltalk.withContext(function($ctx2) { return _st(_st(anIRSequence)._instructions())._do_((function(each){
  1937. return smalltalk.withContext(function($ctx3) { return _st(_st(self)._stream())._nextPutStatementWith_(_st(self)._visit_(each));
  1938. }, function($ctx3) {$ctx3.fill(null, null, {})})}));
  1939. }, function($ctx2) {$ctx2.fill(null, null, {})})}));
  1940. return self}, function($ctx1) {$ctx1.fill(self,"visitIRSequence:", [anIRSequence], {}, smalltalk.IRJSTranslator)})}
  1941. }),
  1942. smalltalk.IRJSTranslator);
  1943. smalltalk.addMethod(
  1944. "_visitIRTempDeclaration_",
  1945. smalltalk.method({
  1946. selector: "visitIRTempDeclaration:",
  1947. fn: function (anIRTempDeclaration){
  1948. var self=this;
  1949. return smalltalk.withContext(function($ctx1) { return self}, function($ctx1) {$ctx1.fill(self,"visitIRTempDeclaration:", [anIRTempDeclaration], {}, smalltalk.IRJSTranslator)})}
  1950. }),
  1951. smalltalk.IRJSTranslator);
  1952. smalltalk.addMethod(
  1953. "_visitIRValue_",
  1954. smalltalk.method({
  1955. selector: "visitIRValue:",
  1956. fn: function (anIRValue){
  1957. var self=this;
  1958. return smalltalk.withContext(function($ctx1) { _st(_st(self)._stream())._nextPutAll_(_st(_st(anIRValue)._value())._asJavascript());
  1959. return self}, function($ctx1) {$ctx1.fill(self,"visitIRValue:", [anIRValue], {}, smalltalk.IRJSTranslator)})}
  1960. }),
  1961. smalltalk.IRJSTranslator);
  1962. smalltalk.addMethod(
  1963. "_visitIRVariable_",
  1964. smalltalk.method({
  1965. selector: "visitIRVariable:",
  1966. fn: function (anIRVariable){
  1967. var self=this;
  1968. return smalltalk.withContext(function($ctx1) { var $1;
  1969. $1=_st(_st(_st(anIRVariable)._variable())._name()).__eq("thisContext");
  1970. if(smalltalk.assert($1)){
  1971. _st(_st(self)._stream())._nextPutAll_("smalltalk.getThisContext()");
  1972. } else {
  1973. _st(_st(self)._stream())._nextPutAll_(_st(_st(anIRVariable)._variable())._alias());
  1974. };
  1975. return self}, function($ctx1) {$ctx1.fill(self,"visitIRVariable:", [anIRVariable], {}, smalltalk.IRJSTranslator)})}
  1976. }),
  1977. smalltalk.IRJSTranslator);
  1978. smalltalk.addMethod(
  1979. "_visitIRVerbatim_",
  1980. smalltalk.method({
  1981. selector: "visitIRVerbatim:",
  1982. fn: function (anIRVerbatim){
  1983. var self=this;
  1984. return smalltalk.withContext(function($ctx1) { _st(_st(self)._stream())._nextPutStatementWith_((function(){
  1985. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._stream())._nextPutAll_(_st(anIRVerbatim)._source());
  1986. }, function($ctx2) {$ctx2.fill(null, null, {})})}));
  1987. return self}, function($ctx1) {$ctx1.fill(self,"visitIRVerbatim:", [anIRVerbatim], {}, smalltalk.IRJSTranslator)})}
  1988. }),
  1989. smalltalk.IRJSTranslator);
  1990. smalltalk.addClass('JSStream', smalltalk.Object, ['stream'], 'Compiler-IR');
  1991. smalltalk.addMethod(
  1992. "_contents",
  1993. smalltalk.method({
  1994. selector: "contents",
  1995. fn: function (){
  1996. var self=this;
  1997. return smalltalk.withContext(function($ctx1) { var $1;
  1998. $1=_st(self["@stream"])._contents();
  1999. return $1;
  2000. }, function($ctx1) {$ctx1.fill(self,"contents", [], {}, smalltalk.JSStream)})}
  2001. }),
  2002. smalltalk.JSStream);
  2003. smalltalk.addMethod(
  2004. "_initialize",
  2005. smalltalk.method({
  2006. selector: "initialize",
  2007. fn: function (){
  2008. var self=this;
  2009. return smalltalk.withContext(function($ctx1) { smalltalk.Object.fn.prototype._initialize.apply(_st(self), []);
  2010. self["@stream"]=_st("")._writeStream();
  2011. return self}, function($ctx1) {$ctx1.fill(self,"initialize", [], {}, smalltalk.JSStream)})}
  2012. }),
  2013. smalltalk.JSStream);
  2014. smalltalk.addMethod(
  2015. "_lf",
  2016. smalltalk.method({
  2017. selector: "lf",
  2018. fn: function (){
  2019. var self=this;
  2020. return smalltalk.withContext(function($ctx1) { _st(self["@stream"])._lf();
  2021. return self}, function($ctx1) {$ctx1.fill(self,"lf", [], {}, smalltalk.JSStream)})}
  2022. }),
  2023. smalltalk.JSStream);
  2024. smalltalk.addMethod(
  2025. "_nextPut_",
  2026. smalltalk.method({
  2027. selector: "nextPut:",
  2028. fn: function (aString){
  2029. var self=this;
  2030. return smalltalk.withContext(function($ctx1) { _st(self["@stream"])._nextPut_(aString);
  2031. return self}, function($ctx1) {$ctx1.fill(self,"nextPut:", [aString], {}, smalltalk.JSStream)})}
  2032. }),
  2033. smalltalk.JSStream);
  2034. smalltalk.addMethod(
  2035. "_nextPutAll_",
  2036. smalltalk.method({
  2037. selector: "nextPutAll:",
  2038. fn: function (aString){
  2039. var self=this;
  2040. return smalltalk.withContext(function($ctx1) { _st(self["@stream"])._nextPutAll_(aString);
  2041. return self}, function($ctx1) {$ctx1.fill(self,"nextPutAll:", [aString], {}, smalltalk.JSStream)})}
  2042. }),
  2043. smalltalk.JSStream);
  2044. smalltalk.addMethod(
  2045. "_nextPutAssignment",
  2046. smalltalk.method({
  2047. selector: "nextPutAssignment",
  2048. fn: function (){
  2049. var self=this;
  2050. return smalltalk.withContext(function($ctx1) { _st(self["@stream"])._nextPutAll_("=");
  2051. return self}, function($ctx1) {$ctx1.fill(self,"nextPutAssignment", [], {}, smalltalk.JSStream)})}
  2052. }),
  2053. smalltalk.JSStream);
  2054. smalltalk.addMethod(
  2055. "_nextPutBlockContextFor_during_",
  2056. smalltalk.method({
  2057. selector: "nextPutBlockContextFor:during:",
  2058. fn: function (anIRClosure,aBlock){
  2059. var self=this;
  2060. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  2061. $1=self;
  2062. _st($1)._nextPutAll_(_st(_st("return smalltalk.withContext(function(").__comma(_st(_st(anIRClosure)._scope())._alias())).__comma(") {"));
  2063. $2=_st($1)._nextPutAll_(_st((smalltalk.String || String))._cr());
  2064. _st(aBlock)._value();
  2065. $3=self;
  2066. _st($3)._nextPutAll_(_st(_st("}, function(").__comma(_st(_st(anIRClosure)._scope())._alias())).__comma(") {"));
  2067. $4=_st($3)._nextPutAll_(_st(_st(_st(anIRClosure)._scope())._alias()).__comma(".fillBlock()})"));
  2068. return self}, function($ctx1) {$ctx1.fill(self,"nextPutBlockContextFor:during:", [anIRClosure,aBlock], {}, smalltalk.JSStream)})}
  2069. }),
  2070. smalltalk.JSStream);
  2071. smalltalk.addMethod(
  2072. "_nextPutClosureWith_arguments_",
  2073. smalltalk.method({
  2074. selector: "nextPutClosureWith:arguments:",
  2075. fn: function (aBlock,anArray){
  2076. var self=this;
  2077. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2078. _st(self["@stream"])._nextPutAll_("(function(");
  2079. _st(anArray)._do_separatedBy_((function(each){
  2080. return smalltalk.withContext(function($ctx2) { return _st(self["@stream"])._nextPutAll_(_st(each)._asVariableName());
  2081. }, function($ctx2) {$ctx2.fill(null, null, {})})}),(function(){
  2082. return smalltalk.withContext(function($ctx2) { return _st(self["@stream"])._nextPut_(",");
  2083. }, function($ctx2) {$ctx2.fill(null, null, {})})}));
  2084. $1=self["@stream"];
  2085. _st($1)._nextPutAll_("){");
  2086. $2=_st($1)._lf();
  2087. _st(aBlock)._value();
  2088. _st(self["@stream"])._nextPutAll_("})");
  2089. return self}, function($ctx1) {$ctx1.fill(self,"nextPutClosureWith:arguments:", [aBlock,anArray], {}, smalltalk.JSStream)})}
  2090. }),
  2091. smalltalk.JSStream);
  2092. smalltalk.addMethod(
  2093. "_nextPutContextFor_during_",
  2094. smalltalk.method({
  2095. selector: "nextPutContextFor:during:",
  2096. fn: function (aMethod,aBlock){
  2097. var self=this;
  2098. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5,$6,$7,$8;
  2099. $1=self;
  2100. _st($1)._nextPutAll_(_st(_st("return smalltalk.withContext(function(").__comma(_st(_st(aMethod)._scope())._alias())).__comma(") { "));
  2101. $2=_st($1)._nextPutAll_(_st((smalltalk.String || String))._cr());
  2102. _st(aBlock)._value();
  2103. $3=self;
  2104. _st($3)._nextPutAll_(_st(_st(_st("}, function(").__comma(_st(_st(aMethod)._scope())._alias())).__comma(") {")).__comma(_st(_st(aMethod)._scope())._alias()));
  2105. $4=_st($3)._nextPutAll_(_st(_st(".fill(self,").__comma(_st(_st(aMethod)._selector())._asJavascript())).__comma(", ["));
  2106. _st(_st(aMethod)._arguments())._do_separatedBy_((function(each){
  2107. return smalltalk.withContext(function($ctx2) { return _st(self)._nextPutAll_(_st(each)._asVariableName());
  2108. }, function($ctx2) {$ctx2.fill(null, null, {})})}),(function(){
  2109. return smalltalk.withContext(function($ctx2) { return _st(self)._nextPutAll_(",");
  2110. }, function($ctx2) {$ctx2.fill(null, null, {})})}));
  2111. _st(self)._nextPutAll_("], {");
  2112. _st(_st(aMethod)._tempDeclarations())._do_separatedBy_((function(each){
  2113. return smalltalk.withContext(function($ctx2) { $5=self;
  2114. _st($5)._nextPutAll_(_st(_st(each)._name())._asVariableName());
  2115. _st($5)._nextPutAll_(":");
  2116. $6=_st($5)._nextPutAll_(_st(_st(each)._name())._asVariableName());
  2117. return $6;
  2118. }, function($ctx2) {$ctx2.fill(null, null, {})})}),(function(){
  2119. return smalltalk.withContext(function($ctx2) { return _st(self)._nextPutAll_(",");
  2120. }, function($ctx2) {$ctx2.fill(null, null, {})})}));
  2121. $7=self;
  2122. _st($7)._nextPutAll_("}, ");
  2123. _st($7)._nextPutAll_(_st(_st(aMethod)._theClass())._asJavascript());
  2124. $8=_st($7)._nextPutAll_(")})");
  2125. return self}, function($ctx1) {$ctx1.fill(self,"nextPutContextFor:during:", [aMethod,aBlock], {}, smalltalk.JSStream)})}
  2126. }),
  2127. smalltalk.JSStream);
  2128. smalltalk.addMethod(
  2129. "_nextPutFunctionWith_arguments_",
  2130. smalltalk.method({
  2131. selector: "nextPutFunctionWith:arguments:",
  2132. fn: function (aBlock,anArray){
  2133. var self=this;
  2134. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  2135. _st(self["@stream"])._nextPutAll_("fn: function(");
  2136. _st(anArray)._do_separatedBy_((function(each){
  2137. return smalltalk.withContext(function($ctx2) { return _st(self["@stream"])._nextPutAll_(_st(each)._asVariableName());
  2138. }, function($ctx2) {$ctx2.fill(null, null, {})})}),(function(){
  2139. return smalltalk.withContext(function($ctx2) { return _st(self["@stream"])._nextPut_(",");
  2140. }, function($ctx2) {$ctx2.fill(null, null, {})})}));
  2141. $1=self["@stream"];
  2142. _st($1)._nextPutAll_("){");
  2143. $2=_st($1)._lf();
  2144. $3=self["@stream"];
  2145. _st($3)._nextPutAll_("var self=this;");
  2146. $4=_st($3)._lf();
  2147. _st(aBlock)._value();
  2148. _st(self["@stream"])._nextPutAll_("}");
  2149. return self}, function($ctx1) {$ctx1.fill(self,"nextPutFunctionWith:arguments:", [aBlock,anArray], {}, smalltalk.JSStream)})}
  2150. }),
  2151. smalltalk.JSStream);
  2152. smalltalk.addMethod(
  2153. "_nextPutIf_with_",
  2154. smalltalk.method({
  2155. selector: "nextPutIf:with:",
  2156. fn: function (aBlock,anotherBlock){
  2157. var self=this;
  2158. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2159. _st(self["@stream"])._nextPutAll_("if(");
  2160. _st(aBlock)._value();
  2161. $1=self["@stream"];
  2162. _st($1)._nextPutAll_("){");
  2163. $2=_st($1)._lf();
  2164. _st(anotherBlock)._value();
  2165. _st(self["@stream"])._nextPutAll_("}");
  2166. return self}, function($ctx1) {$ctx1.fill(self,"nextPutIf:with:", [aBlock,anotherBlock], {}, smalltalk.JSStream)})}
  2167. }),
  2168. smalltalk.JSStream);
  2169. smalltalk.addMethod(
  2170. "_nextPutIfElse_with_with_",
  2171. smalltalk.method({
  2172. selector: "nextPutIfElse:with:with:",
  2173. fn: function (aBlock,ifBlock,elseBlock){
  2174. var self=this;
  2175. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  2176. _st(self["@stream"])._nextPutAll_("if(");
  2177. _st(aBlock)._value();
  2178. $1=self["@stream"];
  2179. _st($1)._nextPutAll_("){");
  2180. $2=_st($1)._lf();
  2181. _st(ifBlock)._value();
  2182. $3=self["@stream"];
  2183. _st($3)._nextPutAll_("} else {");
  2184. $4=_st($3)._lf();
  2185. _st(elseBlock)._value();
  2186. _st(self["@stream"])._nextPutAll_("}");
  2187. return self}, function($ctx1) {$ctx1.fill(self,"nextPutIfElse:with:with:", [aBlock,ifBlock,elseBlock], {}, smalltalk.JSStream)})}
  2188. }),
  2189. smalltalk.JSStream);
  2190. smalltalk.addMethod(
  2191. "_nextPutMethodDeclaration_with_",
  2192. smalltalk.method({
  2193. selector: "nextPutMethodDeclaration:with:",
  2194. fn: function (aMethod,aBlock){
  2195. var self=this;
  2196. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5,$6;
  2197. $1=self["@stream"];
  2198. _st($1)._nextPutAll_("smalltalk.method({");
  2199. _st($1)._lf();
  2200. _st($1)._nextPutAll_(_st(_st("selector: \x22").__comma(_st(aMethod)._selector())).__comma("\x22,"));
  2201. _st($1)._lf();
  2202. _st($1)._nextPutAll_(_st(_st("source: ").__comma(_st(_st(aMethod)._source())._asJavascript())).__comma(","));
  2203. $2=_st($1)._lf();
  2204. _st(aBlock)._value();
  2205. $3=self["@stream"];
  2206. _st($3)._nextPutAll_(_st(_st(",").__comma(_st((smalltalk.String || String))._lf())).__comma("messageSends: "));
  2207. _st($3)._nextPutAll_(_st(_st(_st(_st(aMethod)._messageSends())._asArray())._asJavascript()).__comma(","));
  2208. _st($3)._lf();
  2209. _st($3)._nextPutAll_(_st(_st("args: ").__comma(_st(_st(_st(_st(aMethod)._arguments())._collect_((function(each){
  2210. return smalltalk.withContext(function($ctx2) { return _st(each)._value();
  2211. }, function($ctx2) {$ctx2.fill(null, null, {})})})))._asArray())._asJavascript())).__comma(","));
  2212. _st($3)._lf();
  2213. $4=_st($3)._nextPutAll_("referencedClasses: [");
  2214. _st(_st(aMethod)._classReferences())._do_separatedBy_((function(each){
  2215. return smalltalk.withContext(function($ctx2) { return _st(self["@stream"])._nextPutAll_(_st(each)._asJavascript());
  2216. }, function($ctx2) {$ctx2.fill(null, null, {})})}),(function(){
  2217. return smalltalk.withContext(function($ctx2) { return _st(self["@stream"])._nextPutAll_(",");
  2218. }, function($ctx2) {$ctx2.fill(null, null, {})})}));
  2219. $5=self["@stream"];
  2220. _st($5)._nextPutAll_("]");
  2221. $6=_st($5)._nextPutAll_("})");
  2222. return self}, function($ctx1) {$ctx1.fill(self,"nextPutMethodDeclaration:with:", [aMethod,aBlock], {}, smalltalk.JSStream)})}
  2223. }),
  2224. smalltalk.JSStream);
  2225. smalltalk.addMethod(
  2226. "_nextPutNonLocalReturnHandlingWith_",
  2227. smalltalk.method({
  2228. selector: "nextPutNonLocalReturnHandlingWith:",
  2229. fn: function (aBlock){
  2230. var self=this;
  2231. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  2232. $1=self["@stream"];
  2233. _st($1)._nextPutAll_("var $early={};");
  2234. _st($1)._lf();
  2235. _st($1)._nextPutAll_("try {");
  2236. $2=_st($1)._lf();
  2237. _st(aBlock)._value();
  2238. $3=self["@stream"];
  2239. _st($3)._nextPutAll_("}");
  2240. _st($3)._lf();
  2241. _st($3)._nextPutAll_("catch(e) {if(e===$early)return e[0]; throw e}");
  2242. $4=_st($3)._lf();
  2243. return self}, function($ctx1) {$ctx1.fill(self,"nextPutNonLocalReturnHandlingWith:", [aBlock], {}, smalltalk.JSStream)})}
  2244. }),
  2245. smalltalk.JSStream);
  2246. smalltalk.addMethod(
  2247. "_nextPutNonLocalReturnWith_",
  2248. smalltalk.method({
  2249. selector: "nextPutNonLocalReturnWith:",
  2250. fn: function (aBlock){
  2251. var self=this;
  2252. return smalltalk.withContext(function($ctx1) { _st(self["@stream"])._nextPutAll_("throw $early=[");
  2253. _st(aBlock)._value();
  2254. _st(self["@stream"])._nextPutAll_("]");
  2255. return self}, function($ctx1) {$ctx1.fill(self,"nextPutNonLocalReturnWith:", [aBlock], {}, smalltalk.JSStream)})}
  2256. }),
  2257. smalltalk.JSStream);
  2258. smalltalk.addMethod(
  2259. "_nextPutReturn",
  2260. smalltalk.method({
  2261. selector: "nextPutReturn",
  2262. fn: function (){
  2263. var self=this;
  2264. return smalltalk.withContext(function($ctx1) { _st(self["@stream"])._nextPutAll_("return ");
  2265. return self}, function($ctx1) {$ctx1.fill(self,"nextPutReturn", [], {}, smalltalk.JSStream)})}
  2266. }),
  2267. smalltalk.JSStream);
  2268. smalltalk.addMethod(
  2269. "_nextPutReturnWith_",
  2270. smalltalk.method({
  2271. selector: "nextPutReturnWith:",
  2272. fn: function (aBlock){
  2273. var self=this;
  2274. return smalltalk.withContext(function($ctx1) { _st(self)._nextPutReturn();
  2275. _st(aBlock)._value();
  2276. return self}, function($ctx1) {$ctx1.fill(self,"nextPutReturnWith:", [aBlock], {}, smalltalk.JSStream)})}
  2277. }),
  2278. smalltalk.JSStream);
  2279. smalltalk.addMethod(
  2280. "_nextPutSequenceWith_",
  2281. smalltalk.method({
  2282. selector: "nextPutSequenceWith:",
  2283. fn: function (aBlock){
  2284. var self=this;
  2285. return smalltalk.withContext(function($ctx1) { _st(aBlock)._value();
  2286. return self}, function($ctx1) {$ctx1.fill(self,"nextPutSequenceWith:", [aBlock], {}, smalltalk.JSStream)})}
  2287. }),
  2288. smalltalk.JSStream);
  2289. smalltalk.addMethod(
  2290. "_nextPutStatement_with_",
  2291. smalltalk.method({
  2292. selector: "nextPutStatement:with:",
  2293. fn: function (anInteger,aBlock){
  2294. var self=this;
  2295. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  2296. $1=self["@stream"];
  2297. _st($1)._nextPutAll_(_st(_st("case ").__comma(_st(anInteger)._asString())).__comma(":"));
  2298. $2=_st($1)._lf();
  2299. _st(self)._nextPutStatementWith_(aBlock);
  2300. $3=self["@stream"];
  2301. _st($3)._nextPutAll_(_st(_st("smalltalk.thisContext.pc=").__comma(_st(_st(anInteger).__plus((1)))._asString())).__comma(";"));
  2302. $4=_st($3)._lf();
  2303. return self}, function($ctx1) {$ctx1.fill(self,"nextPutStatement:with:", [anInteger,aBlock], {}, smalltalk.JSStream)})}
  2304. }),
  2305. smalltalk.JSStream);
  2306. smalltalk.addMethod(
  2307. "_nextPutStatementWith_",
  2308. smalltalk.method({
  2309. selector: "nextPutStatementWith:",
  2310. fn: function (aBlock){
  2311. var self=this;
  2312. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2313. _st(aBlock)._value();
  2314. $1=self["@stream"];
  2315. _st($1)._nextPutAll_(";");
  2316. $2=_st($1)._lf();
  2317. return self}, function($ctx1) {$ctx1.fill(self,"nextPutStatementWith:", [aBlock], {}, smalltalk.JSStream)})}
  2318. }),
  2319. smalltalk.JSStream);
  2320. smalltalk.addMethod(
  2321. "_nextPutVar_",
  2322. smalltalk.method({
  2323. selector: "nextPutVar:",
  2324. fn: function (aString){
  2325. var self=this;
  2326. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2327. $1=self["@stream"];
  2328. _st($1)._nextPutAll_(_st(_st("var ").__comma(aString)).__comma(";"));
  2329. $2=_st($1)._lf();
  2330. return self}, function($ctx1) {$ctx1.fill(self,"nextPutVar:", [aString], {}, smalltalk.JSStream)})}
  2331. }),
  2332. smalltalk.JSStream);
  2333. smalltalk.addMethod(
  2334. "_nextPutVars_",
  2335. smalltalk.method({
  2336. selector: "nextPutVars:",
  2337. fn: function (aCollection){
  2338. var self=this;
  2339. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  2340. var $early={};
  2341. try {
  2342. _st(aCollection)._ifEmpty_((function(){
  2343. return smalltalk.withContext(function($ctx2) { $1=self;
  2344. throw $early=[$1];
  2345. }, function($ctx2) {$ctx2.fill(null, null, {})})}));
  2346. _st(self["@stream"])._nextPutAll_("var ");
  2347. _st(aCollection)._do_separatedBy_((function(each){
  2348. return smalltalk.withContext(function($ctx2) { return _st(self["@stream"])._nextPutAll_(each);
  2349. }, function($ctx2) {$ctx2.fill(null, null, {})})}),(function(){
  2350. return smalltalk.withContext(function($ctx2) { return _st(self["@stream"])._nextPutAll_(",");
  2351. }, function($ctx2) {$ctx2.fill(null, null, {})})}));
  2352. $2=self["@stream"];
  2353. _st($2)._nextPutAll_(";");
  2354. $3=_st($2)._lf();
  2355. return self}
  2356. catch(e) {if(e===$early)return e[0]; throw e}
  2357. }, function($ctx1) {$ctx1.fill(self,"nextPutVars:", [aCollection], {}, smalltalk.JSStream)})}
  2358. }),
  2359. smalltalk.JSStream);
  2360. smalltalk.addMethod(
  2361. "_appendToInstruction_",
  2362. smalltalk.method({
  2363. selector: "appendToInstruction:",
  2364. fn: function (anIRInstruction){
  2365. var self=this;
  2366. return smalltalk.withContext(function($ctx1) { _st(anIRInstruction)._appendBlock_(self);
  2367. return self}, function($ctx1) {$ctx1.fill(self,"appendToInstruction:", [anIRInstruction], {}, smalltalk.BlockClosure)})}
  2368. }),
  2369. smalltalk.BlockClosure);
  2370. smalltalk.addMethod(
  2371. "_asVariableName",
  2372. smalltalk.method({
  2373. selector: "asVariableName",
  2374. fn: function (){
  2375. var self=this;
  2376. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2377. $2=_st(_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._reservedWords())._includes_(self);
  2378. if(smalltalk.assert($2)){
  2379. $1=_st(self).__comma("_");
  2380. } else {
  2381. $1=self;
  2382. };
  2383. return $1;
  2384. }, function($ctx1) {$ctx1.fill(self,"asVariableName", [], {}, smalltalk.String)})}
  2385. }),
  2386. smalltalk.String);