Compiler-Inlining.js 93 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480
  1. define(["amber/boot", "amber_core/Compiler-Core", "amber_core/Compiler-IR", "amber_core/Compiler-Semantic", "amber_core/Kernel-Objects"], function($boot){"use strict";
  2. if(!$boot.nilAsReceiver)$boot.nilAsReceiver=$boot.nil;
  3. var $core=$boot.api,nil=$boot.nilAsReceiver,$recv=$boot.asReceiver,$globals=$boot.globals;
  4. if(!$boot.nilAsClass)$boot.nilAsClass=$boot.dnu;
  5. $core.addPackage('Compiler-Inlining');
  6. $core.packages["Compiler-Inlining"].innerEval = function (expr) { return eval(expr); };
  7. $core.packages["Compiler-Inlining"].transport = {"type":"amd","amdNamespace":"amber_core"};
  8. $core.addClass('IRInlinedAssignment', $globals.IRAssignment, [], 'Compiler-Inlining');
  9. //>>excludeStart("ide", pragmas.excludeIdeData);
  10. $globals.IRInlinedAssignment.comment="I represent an inlined assignment instruction.";
  11. //>>excludeEnd("ide");
  12. $core.addMethod(
  13. $core.method({
  14. selector: "accept:",
  15. protocol: 'visiting',
  16. fn: function (aVisitor){
  17. var self=this;
  18. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  19. return $core.withContext(function($ctx1) {
  20. //>>excludeEnd("ctx");
  21. return $recv(aVisitor)._visitIRInlinedAssignment_(self);
  22. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  23. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},$globals.IRInlinedAssignment)});
  24. //>>excludeEnd("ctx");
  25. },
  26. //>>excludeStart("ide", pragmas.excludeIdeData);
  27. args: ["aVisitor"],
  28. source: "accept: aVisitor\x0a\x09^ aVisitor visitIRInlinedAssignment: self",
  29. referencedClasses: [],
  30. //>>excludeEnd("ide");
  31. messageSends: ["visitIRInlinedAssignment:"]
  32. }),
  33. $globals.IRInlinedAssignment);
  34. $core.addMethod(
  35. $core.method({
  36. selector: "isInlined",
  37. protocol: 'testing',
  38. fn: function (){
  39. var self=this;
  40. return true;
  41. },
  42. //>>excludeStart("ide", pragmas.excludeIdeData);
  43. args: [],
  44. source: "isInlined\x0a\x09^ true",
  45. referencedClasses: [],
  46. //>>excludeEnd("ide");
  47. messageSends: []
  48. }),
  49. $globals.IRInlinedAssignment);
  50. $core.addClass('IRInlinedClosure', $globals.IRClosure, [], 'Compiler-Inlining');
  51. //>>excludeStart("ide", pragmas.excludeIdeData);
  52. $globals.IRInlinedClosure.comment="I represent an inlined closure instruction.";
  53. //>>excludeEnd("ide");
  54. $core.addMethod(
  55. $core.method({
  56. selector: "accept:",
  57. protocol: 'visiting',
  58. fn: function (aVisitor){
  59. var self=this;
  60. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  61. return $core.withContext(function($ctx1) {
  62. //>>excludeEnd("ctx");
  63. $recv(aVisitor)._visitIRInlinedClosure_(self);
  64. return self;
  65. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  66. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},$globals.IRInlinedClosure)});
  67. //>>excludeEnd("ctx");
  68. },
  69. //>>excludeStart("ide", pragmas.excludeIdeData);
  70. args: ["aVisitor"],
  71. source: "accept: aVisitor\x0a\x09aVisitor visitIRInlinedClosure: self",
  72. referencedClasses: [],
  73. //>>excludeEnd("ide");
  74. messageSends: ["visitIRInlinedClosure:"]
  75. }),
  76. $globals.IRInlinedClosure);
  77. $core.addMethod(
  78. $core.method({
  79. selector: "isInlined",
  80. protocol: 'testing',
  81. fn: function (){
  82. var self=this;
  83. return true;
  84. },
  85. //>>excludeStart("ide", pragmas.excludeIdeData);
  86. args: [],
  87. source: "isInlined\x0a\x09^ true",
  88. referencedClasses: [],
  89. //>>excludeEnd("ide");
  90. messageSends: []
  91. }),
  92. $globals.IRInlinedClosure);
  93. $core.addClass('IRInlinedReturn', $globals.IRReturn, [], 'Compiler-Inlining');
  94. //>>excludeStart("ide", pragmas.excludeIdeData);
  95. $globals.IRInlinedReturn.comment="I represent an inlined local return instruction.";
  96. //>>excludeEnd("ide");
  97. $core.addMethod(
  98. $core.method({
  99. selector: "accept:",
  100. protocol: 'visiting',
  101. fn: function (aVisitor){
  102. var self=this;
  103. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  104. return $core.withContext(function($ctx1) {
  105. //>>excludeEnd("ctx");
  106. return $recv(aVisitor)._visitIRInlinedReturn_(self);
  107. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  108. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},$globals.IRInlinedReturn)});
  109. //>>excludeEnd("ctx");
  110. },
  111. //>>excludeStart("ide", pragmas.excludeIdeData);
  112. args: ["aVisitor"],
  113. source: "accept: aVisitor\x0a\x09^ aVisitor visitIRInlinedReturn: self",
  114. referencedClasses: [],
  115. //>>excludeEnd("ide");
  116. messageSends: ["visitIRInlinedReturn:"]
  117. }),
  118. $globals.IRInlinedReturn);
  119. $core.addMethod(
  120. $core.method({
  121. selector: "isInlined",
  122. protocol: 'testing',
  123. fn: function (){
  124. var self=this;
  125. return true;
  126. },
  127. //>>excludeStart("ide", pragmas.excludeIdeData);
  128. args: [],
  129. source: "isInlined\x0a\x09^ true",
  130. referencedClasses: [],
  131. //>>excludeEnd("ide");
  132. messageSends: []
  133. }),
  134. $globals.IRInlinedReturn);
  135. $core.addClass('IRInlinedSend', $globals.IRSend, [], 'Compiler-Inlining');
  136. //>>excludeStart("ide", pragmas.excludeIdeData);
  137. $globals.IRInlinedSend.comment="I am the abstract super class of inlined message send instructions.";
  138. //>>excludeEnd("ide");
  139. $core.addMethod(
  140. $core.method({
  141. selector: "accept:",
  142. protocol: 'visiting',
  143. fn: function (aVisitor){
  144. var self=this;
  145. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  146. return $core.withContext(function($ctx1) {
  147. //>>excludeEnd("ctx");
  148. $recv(aVisitor)._visitInlinedSend_(self);
  149. return self;
  150. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  151. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},$globals.IRInlinedSend)});
  152. //>>excludeEnd("ctx");
  153. },
  154. //>>excludeStart("ide", pragmas.excludeIdeData);
  155. args: ["aVisitor"],
  156. source: "accept: aVisitor\x0a\x09aVisitor visitInlinedSend: self",
  157. referencedClasses: [],
  158. //>>excludeEnd("ide");
  159. messageSends: ["visitInlinedSend:"]
  160. }),
  161. $globals.IRInlinedSend);
  162. $core.addMethod(
  163. $core.method({
  164. selector: "internalVariables",
  165. protocol: 'accessing',
  166. fn: function (){
  167. var self=this;
  168. return [];
  169. },
  170. //>>excludeStart("ide", pragmas.excludeIdeData);
  171. args: [],
  172. source: "internalVariables\x0a\x09\x22Answer a collection of internal variables required \x0a\x09to perform the inlining\x22\x0a\x09\x0a\x09^ #()",
  173. referencedClasses: [],
  174. //>>excludeEnd("ide");
  175. messageSends: []
  176. }),
  177. $globals.IRInlinedSend);
  178. $core.addMethod(
  179. $core.method({
  180. selector: "isInlined",
  181. protocol: 'testing',
  182. fn: function (){
  183. var self=this;
  184. return true;
  185. },
  186. //>>excludeStart("ide", pragmas.excludeIdeData);
  187. args: [],
  188. source: "isInlined\x0a\x09^ true",
  189. referencedClasses: [],
  190. //>>excludeEnd("ide");
  191. messageSends: []
  192. }),
  193. $globals.IRInlinedSend);
  194. $core.addClass('IRInlinedIfFalse', $globals.IRInlinedSend, [], 'Compiler-Inlining');
  195. //>>excludeStart("ide", pragmas.excludeIdeData);
  196. $globals.IRInlinedIfFalse.comment="I represent an inlined `#ifFalse:` message send instruction.";
  197. //>>excludeEnd("ide");
  198. $core.addMethod(
  199. $core.method({
  200. selector: "accept:",
  201. protocol: 'visiting',
  202. fn: function (aVisitor){
  203. var self=this;
  204. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  205. return $core.withContext(function($ctx1) {
  206. //>>excludeEnd("ctx");
  207. $recv(aVisitor)._visitIRInlinedIfFalse_(self);
  208. return self;
  209. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  210. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},$globals.IRInlinedIfFalse)});
  211. //>>excludeEnd("ctx");
  212. },
  213. //>>excludeStart("ide", pragmas.excludeIdeData);
  214. args: ["aVisitor"],
  215. source: "accept: aVisitor\x0a\x09aVisitor visitIRInlinedIfFalse: self",
  216. referencedClasses: [],
  217. //>>excludeEnd("ide");
  218. messageSends: ["visitIRInlinedIfFalse:"]
  219. }),
  220. $globals.IRInlinedIfFalse);
  221. $core.addClass('IRInlinedIfNilIfNotNil', $globals.IRInlinedSend, [], 'Compiler-Inlining');
  222. //>>excludeStart("ide", pragmas.excludeIdeData);
  223. $globals.IRInlinedIfNilIfNotNil.comment="I represent an inlined `#ifNil:ifNotNil:` message send instruction.";
  224. //>>excludeEnd("ide");
  225. $core.addMethod(
  226. $core.method({
  227. selector: "accept:",
  228. protocol: 'visiting',
  229. fn: function (aVisitor){
  230. var self=this;
  231. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  232. return $core.withContext(function($ctx1) {
  233. //>>excludeEnd("ctx");
  234. $recv(aVisitor)._visitIRInlinedIfNilIfNotNil_(self);
  235. return self;
  236. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  237. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},$globals.IRInlinedIfNilIfNotNil)});
  238. //>>excludeEnd("ctx");
  239. },
  240. //>>excludeStart("ide", pragmas.excludeIdeData);
  241. args: ["aVisitor"],
  242. source: "accept: aVisitor\x0a\x09aVisitor visitIRInlinedIfNilIfNotNil: self",
  243. referencedClasses: [],
  244. //>>excludeEnd("ide");
  245. messageSends: ["visitIRInlinedIfNilIfNotNil:"]
  246. }),
  247. $globals.IRInlinedIfNilIfNotNil);
  248. $core.addMethod(
  249. $core.method({
  250. selector: "internalVariables",
  251. protocol: 'accessing',
  252. fn: function (){
  253. var self=this;
  254. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  255. return $core.withContext(function($ctx1) {
  256. //>>excludeEnd("ctx");
  257. return $recv($globals.Array)._with_(self._receiverInternalVariable());
  258. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  259. }, function($ctx1) {$ctx1.fill(self,"internalVariables",{},$globals.IRInlinedIfNilIfNotNil)});
  260. //>>excludeEnd("ctx");
  261. },
  262. //>>excludeStart("ide", pragmas.excludeIdeData);
  263. args: [],
  264. source: "internalVariables\x0a\x09^ Array with: self receiverInternalVariable",
  265. referencedClasses: ["Array"],
  266. //>>excludeEnd("ide");
  267. messageSends: ["with:", "receiverInternalVariable"]
  268. }),
  269. $globals.IRInlinedIfNilIfNotNil);
  270. $core.addMethod(
  271. $core.method({
  272. selector: "receiverInternalVariable",
  273. protocol: 'accessing',
  274. fn: function (){
  275. var self=this;
  276. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  277. return $core.withContext(function($ctx1) {
  278. //>>excludeEnd("ctx");
  279. var $1;
  280. $1=$recv($globals.IRVariable)._new();
  281. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  282. $ctx1.sendIdx["new"]=1;
  283. //>>excludeEnd("ctx");
  284. $recv($1)._variable_($recv($recv($globals.AliasVar)._new())._name_(self._receiverInternalVariableName()));
  285. return $recv($1)._yourself();
  286. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  287. }, function($ctx1) {$ctx1.fill(self,"receiverInternalVariable",{},$globals.IRInlinedIfNilIfNotNil)});
  288. //>>excludeEnd("ctx");
  289. },
  290. //>>excludeStart("ide", pragmas.excludeIdeData);
  291. args: [],
  292. source: "receiverInternalVariable\x0a\x09^ IRVariable new\x0a\x09\x09variable: (AliasVar new name: self receiverInternalVariableName);\x0a\x09\x09yourself.",
  293. referencedClasses: ["IRVariable", "AliasVar"],
  294. //>>excludeEnd("ide");
  295. messageSends: ["variable:", "new", "name:", "receiverInternalVariableName", "yourself"]
  296. }),
  297. $globals.IRInlinedIfNilIfNotNil);
  298. $core.addMethod(
  299. $core.method({
  300. selector: "receiverInternalVariableName",
  301. protocol: 'accessing',
  302. fn: function (){
  303. var self=this;
  304. return "$receiver";
  305. },
  306. //>>excludeStart("ide", pragmas.excludeIdeData);
  307. args: [],
  308. source: "receiverInternalVariableName\x0a\x09^ '$receiver'",
  309. referencedClasses: [],
  310. //>>excludeEnd("ide");
  311. messageSends: []
  312. }),
  313. $globals.IRInlinedIfNilIfNotNil);
  314. $core.addClass('IRInlinedIfTrue', $globals.IRInlinedSend, [], 'Compiler-Inlining');
  315. //>>excludeStart("ide", pragmas.excludeIdeData);
  316. $globals.IRInlinedIfTrue.comment="I represent an inlined `#ifTrue:` message send instruction.";
  317. //>>excludeEnd("ide");
  318. $core.addMethod(
  319. $core.method({
  320. selector: "accept:",
  321. protocol: 'visiting',
  322. fn: function (aVisitor){
  323. var self=this;
  324. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  325. return $core.withContext(function($ctx1) {
  326. //>>excludeEnd("ctx");
  327. $recv(aVisitor)._visitIRInlinedIfTrue_(self);
  328. return self;
  329. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  330. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},$globals.IRInlinedIfTrue)});
  331. //>>excludeEnd("ctx");
  332. },
  333. //>>excludeStart("ide", pragmas.excludeIdeData);
  334. args: ["aVisitor"],
  335. source: "accept: aVisitor\x0a\x09aVisitor visitIRInlinedIfTrue: self",
  336. referencedClasses: [],
  337. //>>excludeEnd("ide");
  338. messageSends: ["visitIRInlinedIfTrue:"]
  339. }),
  340. $globals.IRInlinedIfTrue);
  341. $core.addClass('IRInlinedIfTrueIfFalse', $globals.IRInlinedSend, [], 'Compiler-Inlining');
  342. //>>excludeStart("ide", pragmas.excludeIdeData);
  343. $globals.IRInlinedIfTrueIfFalse.comment="I represent an inlined `#ifTrue:ifFalse:` message send instruction.";
  344. //>>excludeEnd("ide");
  345. $core.addMethod(
  346. $core.method({
  347. selector: "accept:",
  348. protocol: 'visiting',
  349. fn: function (aVisitor){
  350. var self=this;
  351. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  352. return $core.withContext(function($ctx1) {
  353. //>>excludeEnd("ctx");
  354. $recv(aVisitor)._visitIRInlinedIfTrueIfFalse_(self);
  355. return self;
  356. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  357. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},$globals.IRInlinedIfTrueIfFalse)});
  358. //>>excludeEnd("ctx");
  359. },
  360. //>>excludeStart("ide", pragmas.excludeIdeData);
  361. args: ["aVisitor"],
  362. source: "accept: aVisitor\x0a\x09aVisitor visitIRInlinedIfTrueIfFalse: self",
  363. referencedClasses: [],
  364. //>>excludeEnd("ide");
  365. messageSends: ["visitIRInlinedIfTrueIfFalse:"]
  366. }),
  367. $globals.IRInlinedIfTrueIfFalse);
  368. $core.addClass('IRInlinedSequence', $globals.IRBlockSequence, [], 'Compiler-Inlining');
  369. //>>excludeStart("ide", pragmas.excludeIdeData);
  370. $globals.IRInlinedSequence.comment="I represent a (block) sequence inside an inlined closure instruction (instance of `IRInlinedClosure`).";
  371. //>>excludeEnd("ide");
  372. $core.addMethod(
  373. $core.method({
  374. selector: "accept:",
  375. protocol: 'visiting',
  376. fn: function (aVisitor){
  377. var self=this;
  378. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  379. return $core.withContext(function($ctx1) {
  380. //>>excludeEnd("ctx");
  381. $recv(aVisitor)._visitIRInlinedSequence_(self);
  382. return self;
  383. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  384. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},$globals.IRInlinedSequence)});
  385. //>>excludeEnd("ctx");
  386. },
  387. //>>excludeStart("ide", pragmas.excludeIdeData);
  388. args: ["aVisitor"],
  389. source: "accept: aVisitor\x0a\x09aVisitor visitIRInlinedSequence: self",
  390. referencedClasses: [],
  391. //>>excludeEnd("ide");
  392. messageSends: ["visitIRInlinedSequence:"]
  393. }),
  394. $globals.IRInlinedSequence);
  395. $core.addMethod(
  396. $core.method({
  397. selector: "isInlined",
  398. protocol: 'testing',
  399. fn: function (){
  400. var self=this;
  401. return true;
  402. },
  403. //>>excludeStart("ide", pragmas.excludeIdeData);
  404. args: [],
  405. source: "isInlined\x0a\x09^ true",
  406. referencedClasses: [],
  407. //>>excludeEnd("ide");
  408. messageSends: []
  409. }),
  410. $globals.IRInlinedSequence);
  411. $core.addClass('IRInliner', $globals.IRVisitor, [], 'Compiler-Inlining');
  412. //>>excludeStart("ide", pragmas.excludeIdeData);
  413. $globals.IRInliner.comment="I visit an IR tree, inlining message sends and block closures.\x0a\x0aMessage selectors that can be inlined are answered by `IRSendInliner >> #inlinedSelectors`";
  414. //>>excludeEnd("ide");
  415. $core.addMethod(
  416. $core.method({
  417. selector: "assignmentInliner",
  418. protocol: 'factory',
  419. fn: function (){
  420. var self=this;
  421. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  422. return $core.withContext(function($ctx1) {
  423. //>>excludeEnd("ctx");
  424. var $1;
  425. $1=$recv($globals.IRAssignmentInliner)._new();
  426. $recv($1)._translator_(self);
  427. return $recv($1)._yourself();
  428. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  429. }, function($ctx1) {$ctx1.fill(self,"assignmentInliner",{},$globals.IRInliner)});
  430. //>>excludeEnd("ctx");
  431. },
  432. //>>excludeStart("ide", pragmas.excludeIdeData);
  433. args: [],
  434. source: "assignmentInliner\x0a\x09^ IRAssignmentInliner new\x0a\x09\x09translator: self;\x0a\x09\x09yourself",
  435. referencedClasses: ["IRAssignmentInliner"],
  436. //>>excludeEnd("ide");
  437. messageSends: ["translator:", "new", "yourself"]
  438. }),
  439. $globals.IRInliner);
  440. $core.addMethod(
  441. $core.method({
  442. selector: "returnInliner",
  443. protocol: 'factory',
  444. fn: function (){
  445. var self=this;
  446. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  447. return $core.withContext(function($ctx1) {
  448. //>>excludeEnd("ctx");
  449. var $1;
  450. $1=$recv($globals.IRReturnInliner)._new();
  451. $recv($1)._translator_(self);
  452. return $recv($1)._yourself();
  453. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  454. }, function($ctx1) {$ctx1.fill(self,"returnInliner",{},$globals.IRInliner)});
  455. //>>excludeEnd("ctx");
  456. },
  457. //>>excludeStart("ide", pragmas.excludeIdeData);
  458. args: [],
  459. source: "returnInliner\x0a\x09^ IRReturnInliner new\x0a\x09\x09translator: self;\x0a\x09\x09yourself",
  460. referencedClasses: ["IRReturnInliner"],
  461. //>>excludeEnd("ide");
  462. messageSends: ["translator:", "new", "yourself"]
  463. }),
  464. $globals.IRInliner);
  465. $core.addMethod(
  466. $core.method({
  467. selector: "sendInliner",
  468. protocol: 'factory',
  469. fn: function (){
  470. var self=this;
  471. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  472. return $core.withContext(function($ctx1) {
  473. //>>excludeEnd("ctx");
  474. var $1;
  475. $1=$recv($globals.IRSendInliner)._new();
  476. $recv($1)._translator_(self);
  477. return $recv($1)._yourself();
  478. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  479. }, function($ctx1) {$ctx1.fill(self,"sendInliner",{},$globals.IRInliner)});
  480. //>>excludeEnd("ctx");
  481. },
  482. //>>excludeStart("ide", pragmas.excludeIdeData);
  483. args: [],
  484. source: "sendInliner\x0a\x09^ IRSendInliner new\x0a\x09\x09translator: self;\x0a\x09\x09yourself",
  485. referencedClasses: ["IRSendInliner"],
  486. //>>excludeEnd("ide");
  487. messageSends: ["translator:", "new", "yourself"]
  488. }),
  489. $globals.IRInliner);
  490. $core.addMethod(
  491. $core.method({
  492. selector: "shouldInlineAssignment:",
  493. protocol: 'testing',
  494. fn: function (anIRAssignment){
  495. var self=this;
  496. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  497. return $core.withContext(function($ctx1) {
  498. //>>excludeEnd("ctx");
  499. var $3,$2,$1;
  500. $1=$recv($recv($recv(anIRAssignment)._isInlined())._not())._and_((function(){
  501. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  502. return $core.withContext(function($ctx2) {
  503. //>>excludeEnd("ctx");
  504. $3=$recv(anIRAssignment)._right();
  505. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  506. $ctx2.sendIdx["right"]=1;
  507. //>>excludeEnd("ctx");
  508. $2=$recv($3)._isSend();
  509. return $recv($2)._and_((function(){
  510. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  511. return $core.withContext(function($ctx3) {
  512. //>>excludeEnd("ctx");
  513. return self._shouldInlineSend_($recv(anIRAssignment)._right());
  514. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  515. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  516. //>>excludeEnd("ctx");
  517. }));
  518. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  519. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  520. //>>excludeEnd("ctx");
  521. }));
  522. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  523. $ctx1.sendIdx["and:"]=1;
  524. //>>excludeEnd("ctx");
  525. return $1;
  526. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  527. }, function($ctx1) {$ctx1.fill(self,"shouldInlineAssignment:",{anIRAssignment:anIRAssignment},$globals.IRInliner)});
  528. //>>excludeEnd("ctx");
  529. },
  530. //>>excludeStart("ide", pragmas.excludeIdeData);
  531. args: ["anIRAssignment"],
  532. source: "shouldInlineAssignment: anIRAssignment\x0a\x09^ anIRAssignment isInlined not and: [\x0a\x09\x09anIRAssignment right isSend and: [\x0a\x09\x09\x09self shouldInlineSend: anIRAssignment right ]]",
  533. referencedClasses: [],
  534. //>>excludeEnd("ide");
  535. messageSends: ["and:", "not", "isInlined", "isSend", "right", "shouldInlineSend:"]
  536. }),
  537. $globals.IRInliner);
  538. $core.addMethod(
  539. $core.method({
  540. selector: "shouldInlineReturn:",
  541. protocol: 'testing',
  542. fn: function (anIRReturn){
  543. var self=this;
  544. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  545. return $core.withContext(function($ctx1) {
  546. //>>excludeEnd("ctx");
  547. var $3,$2,$1;
  548. $1=$recv($recv($recv(anIRReturn)._isInlined())._not())._and_((function(){
  549. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  550. return $core.withContext(function($ctx2) {
  551. //>>excludeEnd("ctx");
  552. $3=$recv(anIRReturn)._expression();
  553. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  554. $ctx2.sendIdx["expression"]=1;
  555. //>>excludeEnd("ctx");
  556. $2=$recv($3)._isSend();
  557. return $recv($2)._and_((function(){
  558. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  559. return $core.withContext(function($ctx3) {
  560. //>>excludeEnd("ctx");
  561. return self._shouldInlineSend_($recv(anIRReturn)._expression());
  562. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  563. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  564. //>>excludeEnd("ctx");
  565. }));
  566. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  567. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  568. //>>excludeEnd("ctx");
  569. }));
  570. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  571. $ctx1.sendIdx["and:"]=1;
  572. //>>excludeEnd("ctx");
  573. return $1;
  574. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  575. }, function($ctx1) {$ctx1.fill(self,"shouldInlineReturn:",{anIRReturn:anIRReturn},$globals.IRInliner)});
  576. //>>excludeEnd("ctx");
  577. },
  578. //>>excludeStart("ide", pragmas.excludeIdeData);
  579. args: ["anIRReturn"],
  580. source: "shouldInlineReturn: anIRReturn\x0a\x09^ anIRReturn isInlined not and: [\x0a\x09\x09anIRReturn expression isSend and: [\x0a\x09\x09\x09self shouldInlineSend: anIRReturn expression ]]",
  581. referencedClasses: [],
  582. //>>excludeEnd("ide");
  583. messageSends: ["and:", "not", "isInlined", "isSend", "expression", "shouldInlineSend:"]
  584. }),
  585. $globals.IRInliner);
  586. $core.addMethod(
  587. $core.method({
  588. selector: "shouldInlineSend:",
  589. protocol: 'testing',
  590. fn: function (anIRSend){
  591. var self=this;
  592. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  593. return $core.withContext(function($ctx1) {
  594. //>>excludeEnd("ctx");
  595. return $recv($recv($recv(anIRSend)._isInlined())._not())._and_((function(){
  596. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  597. return $core.withContext(function($ctx2) {
  598. //>>excludeEnd("ctx");
  599. return $recv($globals.IRSendInliner)._shouldInline_(anIRSend);
  600. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  601. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  602. //>>excludeEnd("ctx");
  603. }));
  604. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  605. }, function($ctx1) {$ctx1.fill(self,"shouldInlineSend:",{anIRSend:anIRSend},$globals.IRInliner)});
  606. //>>excludeEnd("ctx");
  607. },
  608. //>>excludeStart("ide", pragmas.excludeIdeData);
  609. args: ["anIRSend"],
  610. source: "shouldInlineSend: anIRSend\x0a\x09^ anIRSend isInlined not and: [\x0a\x09\x09IRSendInliner shouldInline: anIRSend ]",
  611. referencedClasses: ["IRSendInliner"],
  612. //>>excludeEnd("ide");
  613. messageSends: ["and:", "not", "isInlined", "shouldInline:"]
  614. }),
  615. $globals.IRInliner);
  616. $core.addMethod(
  617. $core.method({
  618. selector: "transformNonLocalReturn:",
  619. protocol: 'visiting',
  620. fn: function (anIRNonLocalReturn){
  621. var self=this;
  622. var localReturn;
  623. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  624. return $core.withContext(function($ctx1) {
  625. //>>excludeEnd("ctx");
  626. var $2,$1,$4,$3,$5,$6,$7;
  627. $2=$recv(anIRNonLocalReturn)._scope();
  628. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  629. $ctx1.sendIdx["scope"]=1;
  630. //>>excludeEnd("ctx");
  631. $1=$recv($2)._canInlineNonLocalReturns();
  632. if($core.assert($1)){
  633. $4=$recv(anIRNonLocalReturn)._scope();
  634. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  635. $ctx1.sendIdx["scope"]=2;
  636. //>>excludeEnd("ctx");
  637. $3=$recv($4)._methodScope();
  638. $5=$recv(anIRNonLocalReturn)._scope();
  639. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  640. $ctx1.sendIdx["scope"]=3;
  641. //>>excludeEnd("ctx");
  642. $recv($3)._removeNonLocalReturn_($5);
  643. $6=$recv($globals.IRReturn)._new();
  644. $recv($6)._scope_($recv(anIRNonLocalReturn)._scope());
  645. localReturn=$recv($6)._yourself();
  646. localReturn;
  647. $recv($recv(anIRNonLocalReturn)._instructions())._do_((function(each){
  648. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  649. return $core.withContext(function($ctx2) {
  650. //>>excludeEnd("ctx");
  651. return $recv(localReturn)._add_(each);
  652. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  653. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)});
  654. //>>excludeEnd("ctx");
  655. }));
  656. $recv(anIRNonLocalReturn)._replaceWith_(localReturn);
  657. return localReturn;
  658. };
  659. $7=(
  660. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  661. $ctx1.supercall = true,
  662. //>>excludeEnd("ctx");
  663. ($globals.IRInliner.superclass||$boot.nilAsClass).fn.prototype._visitIRNonLocalReturn_.apply($recv(self), [anIRNonLocalReturn]));
  664. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  665. $ctx1.supercall = false;
  666. //>>excludeEnd("ctx");;
  667. return $7;
  668. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  669. }, function($ctx1) {$ctx1.fill(self,"transformNonLocalReturn:",{anIRNonLocalReturn:anIRNonLocalReturn,localReturn:localReturn},$globals.IRInliner)});
  670. //>>excludeEnd("ctx");
  671. },
  672. //>>excludeStart("ide", pragmas.excludeIdeData);
  673. args: ["anIRNonLocalReturn"],
  674. source: "transformNonLocalReturn: anIRNonLocalReturn\x0a\x09\x22Replace a non local return into a local return\x22\x0a\x0a\x09| localReturn |\x0a\x09anIRNonLocalReturn scope canInlineNonLocalReturns ifTrue: [\x0a\x09\x09anIRNonLocalReturn scope methodScope removeNonLocalReturn: anIRNonLocalReturn scope.\x0a\x09\x09localReturn := IRReturn new\x0a\x09\x09\x09scope: anIRNonLocalReturn scope;\x0a\x09\x09\x09yourself.\x0a\x09\x09anIRNonLocalReturn instructions do: [ :each |\x0a\x09\x09\x09localReturn add: each ].\x0a\x09\x09anIRNonLocalReturn replaceWith: localReturn.\x0a\x09\x09^ localReturn ].\x0a\x09^ super visitIRNonLocalReturn: anIRNonLocalReturn",
  675. referencedClasses: ["IRReturn"],
  676. //>>excludeEnd("ide");
  677. messageSends: ["ifTrue:", "canInlineNonLocalReturns", "scope", "removeNonLocalReturn:", "methodScope", "scope:", "new", "yourself", "do:", "instructions", "add:", "replaceWith:", "visitIRNonLocalReturn:"]
  678. }),
  679. $globals.IRInliner);
  680. $core.addMethod(
  681. $core.method({
  682. selector: "visitIRAssignment:",
  683. protocol: 'visiting',
  684. fn: function (anIRAssignment){
  685. var self=this;
  686. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  687. return $core.withContext(function($ctx1) {
  688. //>>excludeEnd("ctx");
  689. var $1;
  690. $1=self._shouldInlineAssignment_(anIRAssignment);
  691. if($core.assert($1)){
  692. return $recv(self._assignmentInliner())._inlineAssignment_(anIRAssignment);
  693. } else {
  694. return (
  695. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  696. $ctx1.supercall = true,
  697. //>>excludeEnd("ctx");
  698. ($globals.IRInliner.superclass||$boot.nilAsClass).fn.prototype._visitIRAssignment_.apply($recv(self), [anIRAssignment]));
  699. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  700. $ctx1.supercall = false;
  701. //>>excludeEnd("ctx");;
  702. };
  703. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  704. }, function($ctx1) {$ctx1.fill(self,"visitIRAssignment:",{anIRAssignment:anIRAssignment},$globals.IRInliner)});
  705. //>>excludeEnd("ctx");
  706. },
  707. //>>excludeStart("ide", pragmas.excludeIdeData);
  708. args: ["anIRAssignment"],
  709. source: "visitIRAssignment: anIRAssignment\x0a\x09^ (self shouldInlineAssignment: anIRAssignment)\x0a\x09\x09ifTrue: [ self assignmentInliner inlineAssignment: anIRAssignment ]\x0a\x09\x09ifFalse: [ super visitIRAssignment: anIRAssignment ]",
  710. referencedClasses: [],
  711. //>>excludeEnd("ide");
  712. messageSends: ["ifTrue:ifFalse:", "shouldInlineAssignment:", "inlineAssignment:", "assignmentInliner", "visitIRAssignment:"]
  713. }),
  714. $globals.IRInliner);
  715. $core.addMethod(
  716. $core.method({
  717. selector: "visitIRNonLocalReturn:",
  718. protocol: 'visiting',
  719. fn: function (anIRNonLocalReturn){
  720. var self=this;
  721. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  722. return $core.withContext(function($ctx1) {
  723. //>>excludeEnd("ctx");
  724. return self._transformNonLocalReturn_(anIRNonLocalReturn);
  725. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  726. }, function($ctx1) {$ctx1.fill(self,"visitIRNonLocalReturn:",{anIRNonLocalReturn:anIRNonLocalReturn},$globals.IRInliner)});
  727. //>>excludeEnd("ctx");
  728. },
  729. //>>excludeStart("ide", pragmas.excludeIdeData);
  730. args: ["anIRNonLocalReturn"],
  731. source: "visitIRNonLocalReturn: anIRNonLocalReturn\x0a\x09^ self transformNonLocalReturn: anIRNonLocalReturn",
  732. referencedClasses: [],
  733. //>>excludeEnd("ide");
  734. messageSends: ["transformNonLocalReturn:"]
  735. }),
  736. $globals.IRInliner);
  737. $core.addMethod(
  738. $core.method({
  739. selector: "visitIRReturn:",
  740. protocol: 'visiting',
  741. fn: function (anIRReturn){
  742. var self=this;
  743. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  744. return $core.withContext(function($ctx1) {
  745. //>>excludeEnd("ctx");
  746. var $1;
  747. $1=self._shouldInlineReturn_(anIRReturn);
  748. if($core.assert($1)){
  749. return $recv(self._returnInliner())._inlineReturn_(anIRReturn);
  750. } else {
  751. return (
  752. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  753. $ctx1.supercall = true,
  754. //>>excludeEnd("ctx");
  755. ($globals.IRInliner.superclass||$boot.nilAsClass).fn.prototype._visitIRReturn_.apply($recv(self), [anIRReturn]));
  756. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  757. $ctx1.supercall = false;
  758. //>>excludeEnd("ctx");;
  759. };
  760. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  761. }, function($ctx1) {$ctx1.fill(self,"visitIRReturn:",{anIRReturn:anIRReturn},$globals.IRInliner)});
  762. //>>excludeEnd("ctx");
  763. },
  764. //>>excludeStart("ide", pragmas.excludeIdeData);
  765. args: ["anIRReturn"],
  766. source: "visitIRReturn: anIRReturn\x0a\x09^ (self shouldInlineReturn: anIRReturn)\x0a\x09\x09ifTrue: [ self returnInliner inlineReturn: anIRReturn ]\x0a\x09\x09ifFalse: [ super visitIRReturn: anIRReturn ]",
  767. referencedClasses: [],
  768. //>>excludeEnd("ide");
  769. messageSends: ["ifTrue:ifFalse:", "shouldInlineReturn:", "inlineReturn:", "returnInliner", "visitIRReturn:"]
  770. }),
  771. $globals.IRInliner);
  772. $core.addMethod(
  773. $core.method({
  774. selector: "visitIRSend:",
  775. protocol: 'visiting',
  776. fn: function (anIRSend){
  777. var self=this;
  778. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  779. return $core.withContext(function($ctx1) {
  780. //>>excludeEnd("ctx");
  781. var $1;
  782. $1=self._shouldInlineSend_(anIRSend);
  783. if($core.assert($1)){
  784. return $recv(self._sendInliner())._inlineSend_(anIRSend);
  785. } else {
  786. return (
  787. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  788. $ctx1.supercall = true,
  789. //>>excludeEnd("ctx");
  790. ($globals.IRInliner.superclass||$boot.nilAsClass).fn.prototype._visitIRSend_.apply($recv(self), [anIRSend]));
  791. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  792. $ctx1.supercall = false;
  793. //>>excludeEnd("ctx");;
  794. };
  795. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  796. }, function($ctx1) {$ctx1.fill(self,"visitIRSend:",{anIRSend:anIRSend},$globals.IRInliner)});
  797. //>>excludeEnd("ctx");
  798. },
  799. //>>excludeStart("ide", pragmas.excludeIdeData);
  800. args: ["anIRSend"],
  801. source: "visitIRSend: anIRSend\x0a\x09^ (self shouldInlineSend: anIRSend)\x0a\x09\x09ifTrue: [ self sendInliner inlineSend: anIRSend ]\x0a\x09\x09ifFalse: [ super visitIRSend: anIRSend ]",
  802. referencedClasses: [],
  803. //>>excludeEnd("ide");
  804. messageSends: ["ifTrue:ifFalse:", "shouldInlineSend:", "inlineSend:", "sendInliner", "visitIRSend:"]
  805. }),
  806. $globals.IRInliner);
  807. $core.addClass('IRInliningJSTranslator', $globals.IRJSTranslator, [], 'Compiler-Inlining');
  808. //>>excludeStart("ide", pragmas.excludeIdeData);
  809. $globals.IRInliningJSTranslator.comment="I am a specialized JavaScript translator able to write inlined IR instructions to JavaScript stream (`JSStream` instance).";
  810. //>>excludeEnd("ide");
  811. $core.addMethod(
  812. $core.method({
  813. selector: "visitIRInlinedAssignment:",
  814. protocol: 'visiting',
  815. fn: function (anIRInlinedAssignment){
  816. var self=this;
  817. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  818. return $core.withContext(function($ctx1) {
  819. //>>excludeEnd("ctx");
  820. self._visit_($recv(anIRInlinedAssignment)._right());
  821. return self;
  822. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  823. }, function($ctx1) {$ctx1.fill(self,"visitIRInlinedAssignment:",{anIRInlinedAssignment:anIRInlinedAssignment},$globals.IRInliningJSTranslator)});
  824. //>>excludeEnd("ctx");
  825. },
  826. //>>excludeStart("ide", pragmas.excludeIdeData);
  827. args: ["anIRInlinedAssignment"],
  828. source: "visitIRInlinedAssignment: anIRInlinedAssignment\x0a\x09self visit: anIRInlinedAssignment right",
  829. referencedClasses: [],
  830. //>>excludeEnd("ide");
  831. messageSends: ["visit:", "right"]
  832. }),
  833. $globals.IRInliningJSTranslator);
  834. $core.addMethod(
  835. $core.method({
  836. selector: "visitIRInlinedClosure:",
  837. protocol: 'visiting',
  838. fn: function (anIRInlinedClosure){
  839. var self=this;
  840. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  841. return $core.withContext(function($ctx1) {
  842. //>>excludeEnd("ctx");
  843. $recv(self._stream())._nextPutVars_($recv($recv(anIRInlinedClosure)._tempDeclarations())._collect_((function(each){
  844. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  845. return $core.withContext(function($ctx2) {
  846. //>>excludeEnd("ctx");
  847. return $recv($recv(each)._name())._asVariableName();
  848. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  849. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  850. //>>excludeEnd("ctx");
  851. })));
  852. $recv($recv(anIRInlinedClosure)._instructions())._do_((function(each){
  853. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  854. return $core.withContext(function($ctx2) {
  855. //>>excludeEnd("ctx");
  856. return self._visit_(each);
  857. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  858. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)});
  859. //>>excludeEnd("ctx");
  860. }));
  861. return self;
  862. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  863. }, function($ctx1) {$ctx1.fill(self,"visitIRInlinedClosure:",{anIRInlinedClosure:anIRInlinedClosure},$globals.IRInliningJSTranslator)});
  864. //>>excludeEnd("ctx");
  865. },
  866. //>>excludeStart("ide", pragmas.excludeIdeData);
  867. args: ["anIRInlinedClosure"],
  868. source: "visitIRInlinedClosure: anIRInlinedClosure\x0a\x09self stream nextPutVars: (anIRInlinedClosure tempDeclarations collect: [ :each |\x0a\x09\x09each name asVariableName ]).\x0a\x09anIRInlinedClosure instructions do: [ :each |\x0a\x09\x09self visit: each ]",
  869. referencedClasses: [],
  870. //>>excludeEnd("ide");
  871. messageSends: ["nextPutVars:", "stream", "collect:", "tempDeclarations", "asVariableName", "name", "do:", "instructions", "visit:"]
  872. }),
  873. $globals.IRInliningJSTranslator);
  874. $core.addMethod(
  875. $core.method({
  876. selector: "visitIRInlinedIfFalse:",
  877. protocol: 'visiting',
  878. fn: function (anIRInlinedIfFalse){
  879. var self=this;
  880. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  881. return $core.withContext(function($ctx1) {
  882. //>>excludeEnd("ctx");
  883. var $1,$2,$4,$3;
  884. $1=self._stream();
  885. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  886. $ctx1.sendIdx["stream"]=1;
  887. //>>excludeEnd("ctx");
  888. $recv($1)._nextPutIf_then_((function(){
  889. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  890. return $core.withContext(function($ctx2) {
  891. //>>excludeEnd("ctx");
  892. $2=self._stream();
  893. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  894. $ctx2.sendIdx["stream"]=2;
  895. //>>excludeEnd("ctx");
  896. $recv($2)._nextPutAll_("!$core.assert(");
  897. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  898. $ctx2.sendIdx["nextPutAll:"]=1;
  899. //>>excludeEnd("ctx");
  900. $4=$recv(anIRInlinedIfFalse)._instructions();
  901. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  902. $ctx2.sendIdx["instructions"]=1;
  903. //>>excludeEnd("ctx");
  904. $3=$recv($4)._first();
  905. self._visit_($3);
  906. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  907. $ctx2.sendIdx["visit:"]=1;
  908. //>>excludeEnd("ctx");
  909. return $recv(self._stream())._nextPutAll_(")");
  910. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  911. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  912. //>>excludeEnd("ctx");
  913. }),(function(){
  914. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  915. return $core.withContext(function($ctx2) {
  916. //>>excludeEnd("ctx");
  917. return self._visit_($recv($recv(anIRInlinedIfFalse)._instructions())._last());
  918. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  919. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  920. //>>excludeEnd("ctx");
  921. }));
  922. return self;
  923. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  924. }, function($ctx1) {$ctx1.fill(self,"visitIRInlinedIfFalse:",{anIRInlinedIfFalse:anIRInlinedIfFalse},$globals.IRInliningJSTranslator)});
  925. //>>excludeEnd("ctx");
  926. },
  927. //>>excludeStart("ide", pragmas.excludeIdeData);
  928. args: ["anIRInlinedIfFalse"],
  929. source: "visitIRInlinedIfFalse: anIRInlinedIfFalse\x0a\x09self stream nextPutIf: [\x0a\x09\x09self stream nextPutAll: '!$core.assert('.\x0a\x09\x09self visit: anIRInlinedIfFalse instructions first.\x0a\x09\x09self stream nextPutAll: ')' ]\x0a\x09\x09then: [ self visit: anIRInlinedIfFalse instructions last ]",
  930. referencedClasses: [],
  931. //>>excludeEnd("ide");
  932. messageSends: ["nextPutIf:then:", "stream", "nextPutAll:", "visit:", "first", "instructions", "last"]
  933. }),
  934. $globals.IRInliningJSTranslator);
  935. $core.addMethod(
  936. $core.method({
  937. selector: "visitIRInlinedIfNilIfNotNil:",
  938. protocol: 'visiting',
  939. fn: function (anIRInlinedIfNilIfNotNil){
  940. var self=this;
  941. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  942. return $core.withContext(function($ctx1) {
  943. //>>excludeEnd("ctx");
  944. var $1,$2,$4,$3,$6,$5,$7,$8,$10,$9;
  945. $1=self._stream();
  946. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  947. $ctx1.sendIdx["stream"]=1;
  948. //>>excludeEnd("ctx");
  949. $recv($1)._nextPutIf_then_else_((function(){
  950. var recvVarName;
  951. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  952. return $core.withContext(function($ctx2) {
  953. //>>excludeEnd("ctx");
  954. recvVarName=$recv(anIRInlinedIfNilIfNotNil)._receiverInternalVariableName();
  955. recvVarName;
  956. $2=self._stream();
  957. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  958. $ctx2.sendIdx["stream"]=2;
  959. //>>excludeEnd("ctx");
  960. $4="(".__comma(recvVarName);
  961. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  962. $ctx2.sendIdx[","]=2;
  963. //>>excludeEnd("ctx");
  964. $3=$recv($4).__comma(" = ");
  965. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  966. $ctx2.sendIdx[","]=1;
  967. //>>excludeEnd("ctx");
  968. $recv($2)._nextPutAll_($3);
  969. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  970. $ctx2.sendIdx["nextPutAll:"]=1;
  971. //>>excludeEnd("ctx");
  972. $6=$recv(anIRInlinedIfNilIfNotNil)._instructions();
  973. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  974. $ctx2.sendIdx["instructions"]=1;
  975. //>>excludeEnd("ctx");
  976. $5=$recv($6)._first();
  977. self._visit_($5);
  978. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  979. $ctx2.sendIdx["visit:"]=1;
  980. //>>excludeEnd("ctx");
  981. $7=self._stream();
  982. $8=$recv(") == null || ".__comma(recvVarName)).__comma(".isNil");
  983. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  984. $ctx2.sendIdx[","]=3;
  985. //>>excludeEnd("ctx");
  986. return $recv($7)._nextPutAll_($8);
  987. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  988. }, function($ctx2) {$ctx2.fillBlock({recvVarName:recvVarName},$ctx1,1)});
  989. //>>excludeEnd("ctx");
  990. }),(function(){
  991. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  992. return $core.withContext(function($ctx2) {
  993. //>>excludeEnd("ctx");
  994. $10=$recv(anIRInlinedIfNilIfNotNil)._instructions();
  995. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  996. $ctx2.sendIdx["instructions"]=2;
  997. //>>excludeEnd("ctx");
  998. $9=$recv($10)._second();
  999. return self._visit_($9);
  1000. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1001. $ctx2.sendIdx["visit:"]=2;
  1002. //>>excludeEnd("ctx");
  1003. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1004. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  1005. //>>excludeEnd("ctx");
  1006. }),(function(){
  1007. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1008. return $core.withContext(function($ctx2) {
  1009. //>>excludeEnd("ctx");
  1010. return self._visit_($recv($recv(anIRInlinedIfNilIfNotNil)._instructions())._third());
  1011. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1012. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  1013. //>>excludeEnd("ctx");
  1014. }));
  1015. return self;
  1016. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1017. }, function($ctx1) {$ctx1.fill(self,"visitIRInlinedIfNilIfNotNil:",{anIRInlinedIfNilIfNotNil:anIRInlinedIfNilIfNotNil},$globals.IRInliningJSTranslator)});
  1018. //>>excludeEnd("ctx");
  1019. },
  1020. //>>excludeStart("ide", pragmas.excludeIdeData);
  1021. args: ["anIRInlinedIfNilIfNotNil"],
  1022. source: "visitIRInlinedIfNilIfNotNil: anIRInlinedIfNilIfNotNil\x0a\x09self stream\x0a\x09\x09nextPutIf: [\x0a\x09\x09\x09| recvVarName |\x0a\x09\x09\x09recvVarName := anIRInlinedIfNilIfNotNil receiverInternalVariableName.\x0a\x09\x09\x09self stream nextPutAll: '(', recvVarName, ' = '.\x0a\x09\x09\x09self visit: anIRInlinedIfNilIfNotNil instructions first.\x0a\x09\x09\x09self stream nextPutAll: ') == null || ', recvVarName, '.isNil' ]\x0a\x09\x09then: [ self visit: anIRInlinedIfNilIfNotNil instructions second ]\x0a\x09\x09else: [ self visit: anIRInlinedIfNilIfNotNil instructions third ]",
  1023. referencedClasses: [],
  1024. //>>excludeEnd("ide");
  1025. messageSends: ["nextPutIf:then:else:", "stream", "receiverInternalVariableName", "nextPutAll:", ",", "visit:", "first", "instructions", "second", "third"]
  1026. }),
  1027. $globals.IRInliningJSTranslator);
  1028. $core.addMethod(
  1029. $core.method({
  1030. selector: "visitIRInlinedIfTrue:",
  1031. protocol: 'visiting',
  1032. fn: function (anIRInlinedIfTrue){
  1033. var self=this;
  1034. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1035. return $core.withContext(function($ctx1) {
  1036. //>>excludeEnd("ctx");
  1037. var $1,$2,$4,$3;
  1038. $1=self._stream();
  1039. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1040. $ctx1.sendIdx["stream"]=1;
  1041. //>>excludeEnd("ctx");
  1042. $recv($1)._nextPutIf_then_((function(){
  1043. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1044. return $core.withContext(function($ctx2) {
  1045. //>>excludeEnd("ctx");
  1046. $2=self._stream();
  1047. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1048. $ctx2.sendIdx["stream"]=2;
  1049. //>>excludeEnd("ctx");
  1050. $recv($2)._nextPutAll_("$core.assert(");
  1051. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1052. $ctx2.sendIdx["nextPutAll:"]=1;
  1053. //>>excludeEnd("ctx");
  1054. $4=$recv(anIRInlinedIfTrue)._instructions();
  1055. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1056. $ctx2.sendIdx["instructions"]=1;
  1057. //>>excludeEnd("ctx");
  1058. $3=$recv($4)._first();
  1059. self._visit_($3);
  1060. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1061. $ctx2.sendIdx["visit:"]=1;
  1062. //>>excludeEnd("ctx");
  1063. return $recv(self._stream())._nextPutAll_(")");
  1064. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1065. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1066. //>>excludeEnd("ctx");
  1067. }),(function(){
  1068. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1069. return $core.withContext(function($ctx2) {
  1070. //>>excludeEnd("ctx");
  1071. return self._visit_($recv($recv(anIRInlinedIfTrue)._instructions())._last());
  1072. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1073. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  1074. //>>excludeEnd("ctx");
  1075. }));
  1076. return self;
  1077. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1078. }, function($ctx1) {$ctx1.fill(self,"visitIRInlinedIfTrue:",{anIRInlinedIfTrue:anIRInlinedIfTrue},$globals.IRInliningJSTranslator)});
  1079. //>>excludeEnd("ctx");
  1080. },
  1081. //>>excludeStart("ide", pragmas.excludeIdeData);
  1082. args: ["anIRInlinedIfTrue"],
  1083. source: "visitIRInlinedIfTrue: anIRInlinedIfTrue\x0a\x09self stream nextPutIf: [\x0a\x09\x09self stream nextPutAll: '$core.assert('.\x0a\x09\x09self visit: anIRInlinedIfTrue instructions first.\x0a\x09\x09self stream nextPutAll: ')' ]\x0a\x09\x09then: [ self visit: anIRInlinedIfTrue instructions last ]",
  1084. referencedClasses: [],
  1085. //>>excludeEnd("ide");
  1086. messageSends: ["nextPutIf:then:", "stream", "nextPutAll:", "visit:", "first", "instructions", "last"]
  1087. }),
  1088. $globals.IRInliningJSTranslator);
  1089. $core.addMethod(
  1090. $core.method({
  1091. selector: "visitIRInlinedIfTrueIfFalse:",
  1092. protocol: 'visiting',
  1093. fn: function (anIRInlinedIfTrueIfFalse){
  1094. var self=this;
  1095. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1096. return $core.withContext(function($ctx1) {
  1097. //>>excludeEnd("ctx");
  1098. var $1,$2,$4,$3,$6,$5;
  1099. $1=self._stream();
  1100. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1101. $ctx1.sendIdx["stream"]=1;
  1102. //>>excludeEnd("ctx");
  1103. $recv($1)._nextPutIf_then_else_((function(){
  1104. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1105. return $core.withContext(function($ctx2) {
  1106. //>>excludeEnd("ctx");
  1107. $2=self._stream();
  1108. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1109. $ctx2.sendIdx["stream"]=2;
  1110. //>>excludeEnd("ctx");
  1111. $recv($2)._nextPutAll_("$core.assert(");
  1112. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1113. $ctx2.sendIdx["nextPutAll:"]=1;
  1114. //>>excludeEnd("ctx");
  1115. $4=$recv(anIRInlinedIfTrueIfFalse)._instructions();
  1116. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1117. $ctx2.sendIdx["instructions"]=1;
  1118. //>>excludeEnd("ctx");
  1119. $3=$recv($4)._first();
  1120. self._visit_($3);
  1121. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1122. $ctx2.sendIdx["visit:"]=1;
  1123. //>>excludeEnd("ctx");
  1124. return $recv(self._stream())._nextPutAll_(")");
  1125. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1126. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1127. //>>excludeEnd("ctx");
  1128. }),(function(){
  1129. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1130. return $core.withContext(function($ctx2) {
  1131. //>>excludeEnd("ctx");
  1132. $6=$recv(anIRInlinedIfTrueIfFalse)._instructions();
  1133. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1134. $ctx2.sendIdx["instructions"]=2;
  1135. //>>excludeEnd("ctx");
  1136. $5=$recv($6)._second();
  1137. return self._visit_($5);
  1138. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1139. $ctx2.sendIdx["visit:"]=2;
  1140. //>>excludeEnd("ctx");
  1141. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1142. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  1143. //>>excludeEnd("ctx");
  1144. }),(function(){
  1145. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1146. return $core.withContext(function($ctx2) {
  1147. //>>excludeEnd("ctx");
  1148. return self._visit_($recv($recv(anIRInlinedIfTrueIfFalse)._instructions())._third());
  1149. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1150. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  1151. //>>excludeEnd("ctx");
  1152. }));
  1153. return self;
  1154. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1155. }, function($ctx1) {$ctx1.fill(self,"visitIRInlinedIfTrueIfFalse:",{anIRInlinedIfTrueIfFalse:anIRInlinedIfTrueIfFalse},$globals.IRInliningJSTranslator)});
  1156. //>>excludeEnd("ctx");
  1157. },
  1158. //>>excludeStart("ide", pragmas.excludeIdeData);
  1159. args: ["anIRInlinedIfTrueIfFalse"],
  1160. source: "visitIRInlinedIfTrueIfFalse: anIRInlinedIfTrueIfFalse\x0a\x09self stream\x0a\x09\x09nextPutIf: [\x0a\x09\x09\x09self stream nextPutAll: '$core.assert('.\x0a\x09\x09\x09self visit: anIRInlinedIfTrueIfFalse instructions first.\x0a\x09\x09\x09self stream nextPutAll: ')' ]\x0a\x09\x09then: [ self visit: anIRInlinedIfTrueIfFalse instructions second ]\x0a\x09\x09else: [ self visit: anIRInlinedIfTrueIfFalse instructions third ]",
  1161. referencedClasses: [],
  1162. //>>excludeEnd("ide");
  1163. messageSends: ["nextPutIf:then:else:", "stream", "nextPutAll:", "visit:", "first", "instructions", "second", "third"]
  1164. }),
  1165. $globals.IRInliningJSTranslator);
  1166. $core.addMethod(
  1167. $core.method({
  1168. selector: "visitIRInlinedNonLocalReturn:",
  1169. protocol: 'visiting',
  1170. fn: function (anIRInlinedReturn){
  1171. var self=this;
  1172. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1173. return $core.withContext(function($ctx1) {
  1174. //>>excludeEnd("ctx");
  1175. var $1;
  1176. $1=self._stream();
  1177. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1178. $ctx1.sendIdx["stream"]=1;
  1179. //>>excludeEnd("ctx");
  1180. $recv($1)._nextPutStatementWith_((function(){
  1181. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1182. return $core.withContext(function($ctx2) {
  1183. //>>excludeEnd("ctx");
  1184. return self._visit_($recv(anIRInlinedReturn)._expression());
  1185. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1186. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1187. //>>excludeEnd("ctx");
  1188. }));
  1189. $recv(self._stream())._nextPutNonLocalReturnWith_((function(){
  1190. }));
  1191. return self;
  1192. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1193. }, function($ctx1) {$ctx1.fill(self,"visitIRInlinedNonLocalReturn:",{anIRInlinedReturn:anIRInlinedReturn},$globals.IRInliningJSTranslator)});
  1194. //>>excludeEnd("ctx");
  1195. },
  1196. //>>excludeStart("ide", pragmas.excludeIdeData);
  1197. args: ["anIRInlinedReturn"],
  1198. source: "visitIRInlinedNonLocalReturn: anIRInlinedReturn\x0a\x09self stream nextPutStatementWith: [\x0a\x09\x09self visit: anIRInlinedReturn expression ].\x0a\x09self stream nextPutNonLocalReturnWith: [ ]",
  1199. referencedClasses: [],
  1200. //>>excludeEnd("ide");
  1201. messageSends: ["nextPutStatementWith:", "stream", "visit:", "expression", "nextPutNonLocalReturnWith:"]
  1202. }),
  1203. $globals.IRInliningJSTranslator);
  1204. $core.addMethod(
  1205. $core.method({
  1206. selector: "visitIRInlinedReturn:",
  1207. protocol: 'visiting',
  1208. fn: function (anIRInlinedReturn){
  1209. var self=this;
  1210. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1211. return $core.withContext(function($ctx1) {
  1212. //>>excludeEnd("ctx");
  1213. self._visit_($recv(anIRInlinedReturn)._expression());
  1214. return self;
  1215. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1216. }, function($ctx1) {$ctx1.fill(self,"visitIRInlinedReturn:",{anIRInlinedReturn:anIRInlinedReturn},$globals.IRInliningJSTranslator)});
  1217. //>>excludeEnd("ctx");
  1218. },
  1219. //>>excludeStart("ide", pragmas.excludeIdeData);
  1220. args: ["anIRInlinedReturn"],
  1221. source: "visitIRInlinedReturn: anIRInlinedReturn\x0a\x09self visit: anIRInlinedReturn expression",
  1222. referencedClasses: [],
  1223. //>>excludeEnd("ide");
  1224. messageSends: ["visit:", "expression"]
  1225. }),
  1226. $globals.IRInliningJSTranslator);
  1227. $core.addMethod(
  1228. $core.method({
  1229. selector: "visitIRInlinedSequence:",
  1230. protocol: 'visiting',
  1231. fn: function (anIRInlinedSequence){
  1232. var self=this;
  1233. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1234. return $core.withContext(function($ctx1) {
  1235. //>>excludeEnd("ctx");
  1236. $recv($recv(anIRInlinedSequence)._instructions())._do_((function(each){
  1237. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1238. return $core.withContext(function($ctx2) {
  1239. //>>excludeEnd("ctx");
  1240. return $recv(self._stream())._nextPutStatementWith_((function(){
  1241. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1242. return $core.withContext(function($ctx3) {
  1243. //>>excludeEnd("ctx");
  1244. return self._visit_(each);
  1245. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1246. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  1247. //>>excludeEnd("ctx");
  1248. }));
  1249. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1250. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  1251. //>>excludeEnd("ctx");
  1252. }));
  1253. return self;
  1254. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1255. }, function($ctx1) {$ctx1.fill(self,"visitIRInlinedSequence:",{anIRInlinedSequence:anIRInlinedSequence},$globals.IRInliningJSTranslator)});
  1256. //>>excludeEnd("ctx");
  1257. },
  1258. //>>excludeStart("ide", pragmas.excludeIdeData);
  1259. args: ["anIRInlinedSequence"],
  1260. source: "visitIRInlinedSequence: anIRInlinedSequence\x0a\x09anIRInlinedSequence instructions do: [ :each |\x0a\x09\x09self stream nextPutStatementWith: [ self visit: each ]]",
  1261. referencedClasses: [],
  1262. //>>excludeEnd("ide");
  1263. messageSends: ["do:", "instructions", "nextPutStatementWith:", "stream", "visit:"]
  1264. }),
  1265. $globals.IRInliningJSTranslator);
  1266. $core.addClass('IRSendInliner', $globals.Object, ['send', 'translator'], 'Compiler-Inlining');
  1267. //>>excludeStart("ide", pragmas.excludeIdeData);
  1268. $globals.IRSendInliner.comment="I inline some message sends and block closure arguments. I heavily rely on #perform: to dispatch inlining methods.";
  1269. //>>excludeEnd("ide");
  1270. $core.addMethod(
  1271. $core.method({
  1272. selector: "ifFalse:",
  1273. protocol: 'inlining',
  1274. fn: function (anIRInstruction){
  1275. var self=this;
  1276. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1277. return $core.withContext(function($ctx1) {
  1278. //>>excludeEnd("ctx");
  1279. return self._inlinedSend_withBlock_($recv($globals.IRInlinedIfFalse)._new(),anIRInstruction);
  1280. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1281. }, function($ctx1) {$ctx1.fill(self,"ifFalse:",{anIRInstruction:anIRInstruction},$globals.IRSendInliner)});
  1282. //>>excludeEnd("ctx");
  1283. },
  1284. //>>excludeStart("ide", pragmas.excludeIdeData);
  1285. args: ["anIRInstruction"],
  1286. source: "ifFalse: anIRInstruction\x0a\x09^ self inlinedSend: IRInlinedIfFalse new withBlock: anIRInstruction",
  1287. referencedClasses: ["IRInlinedIfFalse"],
  1288. //>>excludeEnd("ide");
  1289. messageSends: ["inlinedSend:withBlock:", "new"]
  1290. }),
  1291. $globals.IRSendInliner);
  1292. $core.addMethod(
  1293. $core.method({
  1294. selector: "ifFalse:ifTrue:",
  1295. protocol: 'inlining',
  1296. fn: function (anIRInstruction,anotherIRInstruction){
  1297. var self=this;
  1298. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1299. return $core.withContext(function($ctx1) {
  1300. //>>excludeEnd("ctx");
  1301. return self._perform_withArguments_("ifTrue:ifFalse:",[anotherIRInstruction,anIRInstruction]);
  1302. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1303. }, function($ctx1) {$ctx1.fill(self,"ifFalse:ifTrue:",{anIRInstruction:anIRInstruction,anotherIRInstruction:anotherIRInstruction},$globals.IRSendInliner)});
  1304. //>>excludeEnd("ctx");
  1305. },
  1306. //>>excludeStart("ide", pragmas.excludeIdeData);
  1307. args: ["anIRInstruction", "anotherIRInstruction"],
  1308. source: "ifFalse: anIRInstruction ifTrue: anotherIRInstruction\x0a\x09^ self perform: #ifTrue:ifFalse: withArguments: { anotherIRInstruction. anIRInstruction }",
  1309. referencedClasses: [],
  1310. //>>excludeEnd("ide");
  1311. messageSends: ["perform:withArguments:"]
  1312. }),
  1313. $globals.IRSendInliner);
  1314. $core.addMethod(
  1315. $core.method({
  1316. selector: "ifNil:",
  1317. protocol: 'inlining',
  1318. fn: function (anIRInstruction){
  1319. var self=this;
  1320. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1321. return $core.withContext(function($ctx1) {
  1322. //>>excludeEnd("ctx");
  1323. var $1,$3,$5,$6,$4,$2;
  1324. $1=$recv($globals.IRInlinedIfNilIfNotNil)._new();
  1325. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1326. $ctx1.sendIdx["new"]=1;
  1327. //>>excludeEnd("ctx");
  1328. $3=$recv($globals.IRClosure)._new();
  1329. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1330. $ctx1.sendIdx["new"]=2;
  1331. //>>excludeEnd("ctx");
  1332. $recv($3)._scope_($recv($recv(anIRInstruction)._scope())._copy());
  1333. $5=$recv($globals.IRBlockSequence)._new();
  1334. $recv($5)._add_($recv(self._send())._receiver());
  1335. $6=$recv($5)._yourself();
  1336. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1337. $ctx1.sendIdx["yourself"]=1;
  1338. //>>excludeEnd("ctx");
  1339. $4=$6;
  1340. $recv($3)._add_($4);
  1341. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1342. $ctx1.sendIdx["add:"]=1;
  1343. //>>excludeEnd("ctx");
  1344. $2=$recv($3)._yourself();
  1345. return self._inlinedSend_withBlock_withBlock_($1,anIRInstruction,$2);
  1346. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1347. }, function($ctx1) {$ctx1.fill(self,"ifNil:",{anIRInstruction:anIRInstruction},$globals.IRSendInliner)});
  1348. //>>excludeEnd("ctx");
  1349. },
  1350. //>>excludeStart("ide", pragmas.excludeIdeData);
  1351. args: ["anIRInstruction"],
  1352. source: "ifNil: anIRInstruction\x0a\x09^ self\x0a\x09\x09inlinedSend: IRInlinedIfNilIfNotNil new\x0a\x09\x09withBlock: anIRInstruction\x0a\x09\x09withBlock: (IRClosure new\x0a\x09\x09\x09scope: anIRInstruction scope copy;\x0a\x09\x09\x09add: (IRBlockSequence new\x0a\x09\x09\x09\x09add: self send receiver;\x0a\x09\x09\x09\x09yourself);\x0a\x09\x09\x09yourself)",
  1353. referencedClasses: ["IRInlinedIfNilIfNotNil", "IRClosure", "IRBlockSequence"],
  1354. //>>excludeEnd("ide");
  1355. messageSends: ["inlinedSend:withBlock:withBlock:", "new", "scope:", "copy", "scope", "add:", "receiver", "send", "yourself"]
  1356. }),
  1357. $globals.IRSendInliner);
  1358. $core.addMethod(
  1359. $core.method({
  1360. selector: "ifNil:ifNotNil:",
  1361. protocol: 'inlining',
  1362. fn: function (anIRInstruction,anotherIRInstruction){
  1363. var self=this;
  1364. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1365. return $core.withContext(function($ctx1) {
  1366. //>>excludeEnd("ctx");
  1367. return self._inlinedSend_withBlock_withBlock_($recv($globals.IRInlinedIfNilIfNotNil)._new(),anIRInstruction,anotherIRInstruction);
  1368. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1369. }, function($ctx1) {$ctx1.fill(self,"ifNil:ifNotNil:",{anIRInstruction:anIRInstruction,anotherIRInstruction:anotherIRInstruction},$globals.IRSendInliner)});
  1370. //>>excludeEnd("ctx");
  1371. },
  1372. //>>excludeStart("ide", pragmas.excludeIdeData);
  1373. args: ["anIRInstruction", "anotherIRInstruction"],
  1374. source: "ifNil: anIRInstruction ifNotNil: anotherIRInstruction\x0a\x09^ self inlinedSend: IRInlinedIfNilIfNotNil new withBlock: anIRInstruction withBlock: anotherIRInstruction",
  1375. referencedClasses: ["IRInlinedIfNilIfNotNil"],
  1376. //>>excludeEnd("ide");
  1377. messageSends: ["inlinedSend:withBlock:withBlock:", "new"]
  1378. }),
  1379. $globals.IRSendInliner);
  1380. $core.addMethod(
  1381. $core.method({
  1382. selector: "ifNotNil:",
  1383. protocol: 'inlining',
  1384. fn: function (anIRInstruction){
  1385. var self=this;
  1386. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1387. return $core.withContext(function($ctx1) {
  1388. //>>excludeEnd("ctx");
  1389. var $1,$3,$5,$6,$4,$2;
  1390. $1=$recv($globals.IRInlinedIfNilIfNotNil)._new();
  1391. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1392. $ctx1.sendIdx["new"]=1;
  1393. //>>excludeEnd("ctx");
  1394. $3=$recv($globals.IRClosure)._new();
  1395. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1396. $ctx1.sendIdx["new"]=2;
  1397. //>>excludeEnd("ctx");
  1398. $recv($3)._scope_($recv($recv(anIRInstruction)._scope())._copy());
  1399. $5=$recv($globals.IRBlockSequence)._new();
  1400. $recv($5)._add_($recv(self._send())._receiver());
  1401. $6=$recv($5)._yourself();
  1402. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1403. $ctx1.sendIdx["yourself"]=1;
  1404. //>>excludeEnd("ctx");
  1405. $4=$6;
  1406. $recv($3)._add_($4);
  1407. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1408. $ctx1.sendIdx["add:"]=1;
  1409. //>>excludeEnd("ctx");
  1410. $2=$recv($3)._yourself();
  1411. return self._inlinedSend_withBlock_withBlock_($1,$2,anIRInstruction);
  1412. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1413. }, function($ctx1) {$ctx1.fill(self,"ifNotNil:",{anIRInstruction:anIRInstruction},$globals.IRSendInliner)});
  1414. //>>excludeEnd("ctx");
  1415. },
  1416. //>>excludeStart("ide", pragmas.excludeIdeData);
  1417. args: ["anIRInstruction"],
  1418. source: "ifNotNil: anIRInstruction\x0a\x09^ self\x0a\x09\x09inlinedSend: IRInlinedIfNilIfNotNil new\x0a\x09\x09withBlock: (IRClosure new\x0a\x09\x09\x09scope: anIRInstruction scope copy;\x0a\x09\x09\x09add: (IRBlockSequence new\x0a\x09\x09\x09\x09add: self send receiver;\x0a\x09\x09\x09\x09yourself);\x0a\x09\x09\x09yourself)\x0a\x09\x09withBlock: anIRInstruction",
  1419. referencedClasses: ["IRInlinedIfNilIfNotNil", "IRClosure", "IRBlockSequence"],
  1420. //>>excludeEnd("ide");
  1421. messageSends: ["inlinedSend:withBlock:withBlock:", "new", "scope:", "copy", "scope", "add:", "receiver", "send", "yourself"]
  1422. }),
  1423. $globals.IRSendInliner);
  1424. $core.addMethod(
  1425. $core.method({
  1426. selector: "ifNotNil:ifNil:",
  1427. protocol: 'inlining',
  1428. fn: function (anIRInstruction,anotherIRInstruction){
  1429. var self=this;
  1430. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1431. return $core.withContext(function($ctx1) {
  1432. //>>excludeEnd("ctx");
  1433. return self._inlinedSend_withBlock_withBlock_($recv($globals.IRInlinedIfNilIfNotNil)._new(),anotherIRInstruction,anIRInstruction);
  1434. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1435. }, function($ctx1) {$ctx1.fill(self,"ifNotNil:ifNil:",{anIRInstruction:anIRInstruction,anotherIRInstruction:anotherIRInstruction},$globals.IRSendInliner)});
  1436. //>>excludeEnd("ctx");
  1437. },
  1438. //>>excludeStart("ide", pragmas.excludeIdeData);
  1439. args: ["anIRInstruction", "anotherIRInstruction"],
  1440. source: "ifNotNil: anIRInstruction ifNil: anotherIRInstruction\x0a\x09^ self inlinedSend: IRInlinedIfNilIfNotNil new withBlock: anotherIRInstruction withBlock: anIRInstruction",
  1441. referencedClasses: ["IRInlinedIfNilIfNotNil"],
  1442. //>>excludeEnd("ide");
  1443. messageSends: ["inlinedSend:withBlock:withBlock:", "new"]
  1444. }),
  1445. $globals.IRSendInliner);
  1446. $core.addMethod(
  1447. $core.method({
  1448. selector: "ifTrue:",
  1449. protocol: 'inlining',
  1450. fn: function (anIRInstruction){
  1451. var self=this;
  1452. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1453. return $core.withContext(function($ctx1) {
  1454. //>>excludeEnd("ctx");
  1455. return self._inlinedSend_withBlock_($recv($globals.IRInlinedIfTrue)._new(),anIRInstruction);
  1456. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1457. }, function($ctx1) {$ctx1.fill(self,"ifTrue:",{anIRInstruction:anIRInstruction},$globals.IRSendInliner)});
  1458. //>>excludeEnd("ctx");
  1459. },
  1460. //>>excludeStart("ide", pragmas.excludeIdeData);
  1461. args: ["anIRInstruction"],
  1462. source: "ifTrue: anIRInstruction\x0a\x09^ self inlinedSend: IRInlinedIfTrue new withBlock: anIRInstruction",
  1463. referencedClasses: ["IRInlinedIfTrue"],
  1464. //>>excludeEnd("ide");
  1465. messageSends: ["inlinedSend:withBlock:", "new"]
  1466. }),
  1467. $globals.IRSendInliner);
  1468. $core.addMethod(
  1469. $core.method({
  1470. selector: "ifTrue:ifFalse:",
  1471. protocol: 'inlining',
  1472. fn: function (anIRInstruction,anotherIRInstruction){
  1473. var self=this;
  1474. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1475. return $core.withContext(function($ctx1) {
  1476. //>>excludeEnd("ctx");
  1477. return self._inlinedSend_withBlock_withBlock_($recv($globals.IRInlinedIfTrueIfFalse)._new(),anIRInstruction,anotherIRInstruction);
  1478. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1479. }, function($ctx1) {$ctx1.fill(self,"ifTrue:ifFalse:",{anIRInstruction:anIRInstruction,anotherIRInstruction:anotherIRInstruction},$globals.IRSendInliner)});
  1480. //>>excludeEnd("ctx");
  1481. },
  1482. //>>excludeStart("ide", pragmas.excludeIdeData);
  1483. args: ["anIRInstruction", "anotherIRInstruction"],
  1484. source: "ifTrue: anIRInstruction ifFalse: anotherIRInstruction\x0a\x09^ self inlinedSend: IRInlinedIfTrueIfFalse new withBlock: anIRInstruction withBlock: anotherIRInstruction",
  1485. referencedClasses: ["IRInlinedIfTrueIfFalse"],
  1486. //>>excludeEnd("ide");
  1487. messageSends: ["inlinedSend:withBlock:withBlock:", "new"]
  1488. }),
  1489. $globals.IRSendInliner);
  1490. $core.addMethod(
  1491. $core.method({
  1492. selector: "inlineClosure:",
  1493. protocol: 'inlining',
  1494. fn: function (anIRClosure){
  1495. var self=this;
  1496. var inlinedClosure,sequence,statements;
  1497. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1498. return $core.withContext(function($ctx1) {
  1499. //>>excludeEnd("ctx");
  1500. var $1,$2,$3,$5,$6,$4,$7,$9,$11,$13,$14,$15,$12,$10,$17,$19,$20,$18,$16,$8,$23,$22,$24,$21,$25,$27,$26;
  1501. inlinedClosure=self._inlinedClosure();
  1502. $1=inlinedClosure;
  1503. $2=$recv(anIRClosure)._scope();
  1504. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1505. $ctx1.sendIdx["scope"]=1;
  1506. //>>excludeEnd("ctx");
  1507. $recv($1)._scope_($2);
  1508. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1509. $ctx1.sendIdx["scope:"]=1;
  1510. //>>excludeEnd("ctx");
  1511. $recv($1)._parent_($recv(anIRClosure)._parent());
  1512. $recv($recv(anIRClosure)._tempDeclarations())._do_((function(each){
  1513. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1514. return $core.withContext(function($ctx2) {
  1515. //>>excludeEnd("ctx");
  1516. return $recv(inlinedClosure)._add_(each);
  1517. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1518. $ctx2.sendIdx["add:"]=1;
  1519. //>>excludeEnd("ctx");
  1520. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1521. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  1522. //>>excludeEnd("ctx");
  1523. }));
  1524. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1525. $ctx1.sendIdx["do:"]=1;
  1526. //>>excludeEnd("ctx");
  1527. sequence=self._inlinedSequence();
  1528. $recv($recv(anIRClosure)._arguments())._do_((function(each){
  1529. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1530. return $core.withContext(function($ctx2) {
  1531. //>>excludeEnd("ctx");
  1532. $3=inlinedClosure;
  1533. $5=$recv($globals.IRTempDeclaration)._new();
  1534. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1535. $ctx2.sendIdx["new"]=1;
  1536. //>>excludeEnd("ctx");
  1537. $recv($5)._name_(each);
  1538. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1539. $ctx2.sendIdx["name:"]=1;
  1540. //>>excludeEnd("ctx");
  1541. $6=$recv($5)._yourself();
  1542. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1543. $ctx2.sendIdx["yourself"]=1;
  1544. //>>excludeEnd("ctx");
  1545. $4=$6;
  1546. $recv($3)._add_($4);
  1547. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1548. $ctx2.sendIdx["add:"]=2;
  1549. //>>excludeEnd("ctx");
  1550. $7=sequence;
  1551. $9=$recv($globals.IRAssignment)._new();
  1552. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1553. $ctx2.sendIdx["new"]=2;
  1554. //>>excludeEnd("ctx");
  1555. $11=$recv($globals.IRVariable)._new();
  1556. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1557. $ctx2.sendIdx["new"]=3;
  1558. //>>excludeEnd("ctx");
  1559. $13=$recv($globals.AliasVar)._new();
  1560. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1561. $ctx2.sendIdx["new"]=4;
  1562. //>>excludeEnd("ctx");
  1563. $14=$recv(inlinedClosure)._scope();
  1564. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1565. $ctx2.sendIdx["scope"]=2;
  1566. //>>excludeEnd("ctx");
  1567. $recv($13)._scope_($14);
  1568. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1569. $ctx2.sendIdx["scope:"]=2;
  1570. //>>excludeEnd("ctx");
  1571. $recv($13)._name_(each);
  1572. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1573. $ctx2.sendIdx["name:"]=2;
  1574. //>>excludeEnd("ctx");
  1575. $15=$recv($13)._yourself();
  1576. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1577. $ctx2.sendIdx["yourself"]=2;
  1578. //>>excludeEnd("ctx");
  1579. $12=$15;
  1580. $10=$recv($11)._variable_($12);
  1581. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1582. $ctx2.sendIdx["variable:"]=1;
  1583. //>>excludeEnd("ctx");
  1584. $recv($9)._add_($10);
  1585. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1586. $ctx2.sendIdx["add:"]=4;
  1587. //>>excludeEnd("ctx");
  1588. $17=$recv($globals.IRVariable)._new();
  1589. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1590. $ctx2.sendIdx["new"]=5;
  1591. //>>excludeEnd("ctx");
  1592. $19=$recv($globals.AliasVar)._new();
  1593. $recv($19)._scope_($recv(inlinedClosure)._scope());
  1594. $recv($19)._name_("$receiver");
  1595. $20=$recv($19)._yourself();
  1596. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1597. $ctx2.sendIdx["yourself"]=3;
  1598. //>>excludeEnd("ctx");
  1599. $18=$20;
  1600. $16=$recv($17)._variable_($18);
  1601. $recv($9)._add_($16);
  1602. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1603. $ctx2.sendIdx["add:"]=5;
  1604. //>>excludeEnd("ctx");
  1605. $8=$recv($9)._yourself();
  1606. return $recv($7)._add_($8);
  1607. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1608. $ctx2.sendIdx["add:"]=3;
  1609. //>>excludeEnd("ctx");
  1610. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1611. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)});
  1612. //>>excludeEnd("ctx");
  1613. }));
  1614. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1615. $ctx1.sendIdx["do:"]=2;
  1616. //>>excludeEnd("ctx");
  1617. $recv(inlinedClosure)._add_(sequence);
  1618. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1619. $ctx1.sendIdx["add:"]=6;
  1620. //>>excludeEnd("ctx");
  1621. statements=$recv($recv(anIRClosure)._sequence())._instructions();
  1622. $recv(statements)._ifNotEmpty_((function(){
  1623. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1624. return $core.withContext(function($ctx2) {
  1625. //>>excludeEnd("ctx");
  1626. $recv($recv(statements)._allButLast())._do_((function(each){
  1627. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1628. return $core.withContext(function($ctx3) {
  1629. //>>excludeEnd("ctx");
  1630. return $recv(sequence)._add_(each);
  1631. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1632. $ctx3.sendIdx["add:"]=7;
  1633. //>>excludeEnd("ctx");
  1634. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1635. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,4)});
  1636. //>>excludeEnd("ctx");
  1637. }));
  1638. $23=$recv(statements)._last();
  1639. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1640. $ctx2.sendIdx["last"]=1;
  1641. //>>excludeEnd("ctx");
  1642. $22=$recv($23)._isReturn();
  1643. $21=$recv($22)._and_((function(){
  1644. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1645. return $core.withContext(function($ctx3) {
  1646. //>>excludeEnd("ctx");
  1647. $24=$recv(statements)._last();
  1648. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1649. $ctx3.sendIdx["last"]=2;
  1650. //>>excludeEnd("ctx");
  1651. return $recv($24)._isBlockReturn();
  1652. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1653. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,5)});
  1654. //>>excludeEnd("ctx");
  1655. }));
  1656. if($core.assert($21)){
  1657. $25=sequence;
  1658. $27=$recv(statements)._last();
  1659. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1660. $ctx2.sendIdx["last"]=3;
  1661. //>>excludeEnd("ctx");
  1662. $26=$recv($27)._expression();
  1663. return $recv($25)._add_($26);
  1664. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1665. $ctx2.sendIdx["add:"]=8;
  1666. //>>excludeEnd("ctx");
  1667. } else {
  1668. return $recv(sequence)._add_($recv(statements)._last());
  1669. };
  1670. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1671. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  1672. //>>excludeEnd("ctx");
  1673. }));
  1674. return inlinedClosure;
  1675. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1676. }, function($ctx1) {$ctx1.fill(self,"inlineClosure:",{anIRClosure:anIRClosure,inlinedClosure:inlinedClosure,sequence:sequence,statements:statements},$globals.IRSendInliner)});
  1677. //>>excludeEnd("ctx");
  1678. },
  1679. //>>excludeStart("ide", pragmas.excludeIdeData);
  1680. args: ["anIRClosure"],
  1681. source: "inlineClosure: anIRClosure\x0a\x09| inlinedClosure sequence statements |\x0a\x0a\x09inlinedClosure := self inlinedClosure.\x0a\x09inlinedClosure \x0a\x09\x09scope: anIRClosure scope;\x0a\x09\x09parent: anIRClosure parent.\x0a\x0a\x09\x22Add the possible temp declarations\x22\x0a\x09anIRClosure tempDeclarations do: [ :each |\x0a\x09\x09\x09inlinedClosure add: each ].\x0a\x0a\x09\x22Add a block sequence\x22\x0a\x09sequence := self inlinedSequence.\x0a\x0a\x09\x22Map the closure arguments to the receiver of the message send\x22\x0a\x09anIRClosure arguments do: [ :each |\x0a\x09\x09inlinedClosure add: (IRTempDeclaration new name: each; yourself).\x0a\x09\x09sequence add: (IRAssignment new\x0a\x09\x09\x09add: (IRVariable new variable: (AliasVar new scope: inlinedClosure scope; name: each; yourself));\x0a\x09\x09\x09add: (IRVariable new variable: (AliasVar new scope: inlinedClosure scope; name: '$receiver'; yourself));\x0a\x09\x09\x09yourself) ].\x0a\x09\x09\x09\x0a\x09\x22To ensure the correct order of the closure instructions: first the temps then the sequence\x22\x0a\x09inlinedClosure add: sequence.\x0a\x0a\x09\x22Get all the statements\x22\x0a\x09statements := anIRClosure sequence instructions.\x0a\x09\x0a\x09statements ifNotEmpty: [\x0a\x09\x09statements allButLast do: [ :each | sequence add: each ].\x0a\x0a\x09\x09\x22Inlined closures don't have implicit local returns\x22\x0a\x09\x09(statements last isReturn and: [ statements last isBlockReturn ])\x0a\x09\x09\x09ifTrue: [ sequence add: statements last expression ]\x0a\x09\x09\x09ifFalse: [ sequence add: statements last ] ].\x0a\x0a\x09^ inlinedClosure",
  1682. referencedClasses: ["IRTempDeclaration", "IRAssignment", "IRVariable", "AliasVar"],
  1683. //>>excludeEnd("ide");
  1684. messageSends: ["inlinedClosure", "scope:", "scope", "parent:", "parent", "do:", "tempDeclarations", "add:", "inlinedSequence", "arguments", "name:", "new", "yourself", "variable:", "instructions", "sequence", "ifNotEmpty:", "allButLast", "ifTrue:ifFalse:", "and:", "isReturn", "last", "isBlockReturn", "expression"]
  1685. }),
  1686. $globals.IRSendInliner);
  1687. $core.addMethod(
  1688. $core.method({
  1689. selector: "inlineSend:",
  1690. protocol: 'inlining',
  1691. fn: function (anIRSend){
  1692. var self=this;
  1693. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1694. return $core.withContext(function($ctx1) {
  1695. //>>excludeEnd("ctx");
  1696. var $2,$1;
  1697. self._send_(anIRSend);
  1698. $2=self._send();
  1699. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1700. $ctx1.sendIdx["send"]=1;
  1701. //>>excludeEnd("ctx");
  1702. $1=$recv($2)._selector();
  1703. return self._perform_withArguments_($1,$recv(self._send())._arguments());
  1704. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1705. }, function($ctx1) {$ctx1.fill(self,"inlineSend:",{anIRSend:anIRSend},$globals.IRSendInliner)});
  1706. //>>excludeEnd("ctx");
  1707. },
  1708. //>>excludeStart("ide", pragmas.excludeIdeData);
  1709. args: ["anIRSend"],
  1710. source: "inlineSend: anIRSend\x0a\x09self send: anIRSend.\x0a\x09^ self\x0a\x09\x09perform: self send selector\x0a\x09\x09withArguments: self send arguments",
  1711. referencedClasses: [],
  1712. //>>excludeEnd("ide");
  1713. messageSends: ["send:", "perform:withArguments:", "selector", "send", "arguments"]
  1714. }),
  1715. $globals.IRSendInliner);
  1716. $core.addMethod(
  1717. $core.method({
  1718. selector: "inlinedClosure",
  1719. protocol: 'factory',
  1720. fn: function (){
  1721. var self=this;
  1722. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1723. return $core.withContext(function($ctx1) {
  1724. //>>excludeEnd("ctx");
  1725. return $recv($globals.IRInlinedClosure)._new();
  1726. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1727. }, function($ctx1) {$ctx1.fill(self,"inlinedClosure",{},$globals.IRSendInliner)});
  1728. //>>excludeEnd("ctx");
  1729. },
  1730. //>>excludeStart("ide", pragmas.excludeIdeData);
  1731. args: [],
  1732. source: "inlinedClosure\x0a\x09^ IRInlinedClosure new",
  1733. referencedClasses: ["IRInlinedClosure"],
  1734. //>>excludeEnd("ide");
  1735. messageSends: ["new"]
  1736. }),
  1737. $globals.IRSendInliner);
  1738. $core.addMethod(
  1739. $core.method({
  1740. selector: "inlinedSend:withBlock:",
  1741. protocol: 'inlining',
  1742. fn: function (inlinedSend,anIRInstruction){
  1743. var self=this;
  1744. var inlinedClosure;
  1745. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1746. return $core.withContext(function($ctx1) {
  1747. //>>excludeEnd("ctx");
  1748. var $1,$2,$4,$3,$5;
  1749. $1=$recv(anIRInstruction)._isClosure();
  1750. if(!$core.assert($1)){
  1751. self._inliningError_("Message argument should be a block");
  1752. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1753. $ctx1.sendIdx["inliningError:"]=1;
  1754. //>>excludeEnd("ctx");
  1755. };
  1756. $2=$recv($recv($recv(anIRInstruction)._arguments())._size()).__eq((0));
  1757. if(!$core.assert($2)){
  1758. self._inliningError_("Inlined block should have zero argument");
  1759. };
  1760. inlinedClosure=$recv(self._translator())._visit_(self._inlineClosure_(anIRInstruction));
  1761. $4=self._send();
  1762. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1763. $ctx1.sendIdx["send"]=1;
  1764. //>>excludeEnd("ctx");
  1765. $3=$recv($4)._receiver();
  1766. $recv(inlinedSend)._add_($3);
  1767. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1768. $ctx1.sendIdx["add:"]=1;
  1769. //>>excludeEnd("ctx");
  1770. $recv(inlinedSend)._add_(inlinedClosure);
  1771. $recv(self._send())._replaceWith_(inlinedSend);
  1772. $5=$recv($recv(inlinedSend)._method())._internalVariables();
  1773. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1774. $ctx1.sendIdx["internalVariables"]=1;
  1775. //>>excludeEnd("ctx");
  1776. $recv($5)._addAll_($recv(inlinedSend)._internalVariables());
  1777. return inlinedSend;
  1778. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1779. }, function($ctx1) {$ctx1.fill(self,"inlinedSend:withBlock:",{inlinedSend:inlinedSend,anIRInstruction:anIRInstruction,inlinedClosure:inlinedClosure},$globals.IRSendInliner)});
  1780. //>>excludeEnd("ctx");
  1781. },
  1782. //>>excludeStart("ide", pragmas.excludeIdeData);
  1783. args: ["inlinedSend", "anIRInstruction"],
  1784. source: "inlinedSend: inlinedSend withBlock: anIRInstruction\x0a\x09| inlinedClosure |\x0a\x0a\x09anIRInstruction isClosure ifFalse: [ self inliningError: 'Message argument should be a block' ].\x0a\x09anIRInstruction arguments size = 0 ifFalse: [ self inliningError: 'Inlined block should have zero argument' ].\x0a\x0a\x09inlinedClosure := self translator visit: (self inlineClosure: anIRInstruction).\x0a\x0a\x09inlinedSend\x0a\x09\x09add: self send receiver;\x0a\x09\x09add: inlinedClosure.\x0a\x0a\x09self send replaceWith: inlinedSend.\x0a\x09inlinedSend method internalVariables \x0a\x09\x09addAll: inlinedSend internalVariables.\x0a\x0a\x09^ inlinedSend",
  1785. referencedClasses: [],
  1786. //>>excludeEnd("ide");
  1787. messageSends: ["ifFalse:", "isClosure", "inliningError:", "=", "size", "arguments", "visit:", "translator", "inlineClosure:", "add:", "receiver", "send", "replaceWith:", "addAll:", "internalVariables", "method"]
  1788. }),
  1789. $globals.IRSendInliner);
  1790. $core.addMethod(
  1791. $core.method({
  1792. selector: "inlinedSend:withBlock:withBlock:",
  1793. protocol: 'inlining',
  1794. fn: function (inlinedSend,anIRInstruction,anotherIRInstruction){
  1795. var self=this;
  1796. var inlinedClosure1,inlinedClosure2;
  1797. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1798. return $core.withContext(function($ctx1) {
  1799. //>>excludeEnd("ctx");
  1800. var $1,$2,$3,$4,$6,$5,$7;
  1801. $1=$recv(anIRInstruction)._isClosure();
  1802. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1803. $ctx1.sendIdx["isClosure"]=1;
  1804. //>>excludeEnd("ctx");
  1805. if(!$core.assert($1)){
  1806. self._inliningError_("Message argument should be a block");
  1807. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1808. $ctx1.sendIdx["inliningError:"]=1;
  1809. //>>excludeEnd("ctx");
  1810. };
  1811. $2=$recv(anotherIRInstruction)._isClosure();
  1812. if(!$core.assert($2)){
  1813. self._inliningError_("Message argument should be a block");
  1814. };
  1815. $3=self._translator();
  1816. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1817. $ctx1.sendIdx["translator"]=1;
  1818. //>>excludeEnd("ctx");
  1819. $4=self._inlineClosure_(anIRInstruction);
  1820. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1821. $ctx1.sendIdx["inlineClosure:"]=1;
  1822. //>>excludeEnd("ctx");
  1823. inlinedClosure1=$recv($3)._visit_($4);
  1824. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1825. $ctx1.sendIdx["visit:"]=1;
  1826. //>>excludeEnd("ctx");
  1827. inlinedClosure2=$recv(self._translator())._visit_(self._inlineClosure_(anotherIRInstruction));
  1828. $6=self._send();
  1829. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1830. $ctx1.sendIdx["send"]=1;
  1831. //>>excludeEnd("ctx");
  1832. $5=$recv($6)._receiver();
  1833. $recv(inlinedSend)._add_($5);
  1834. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1835. $ctx1.sendIdx["add:"]=1;
  1836. //>>excludeEnd("ctx");
  1837. $recv(inlinedSend)._add_(inlinedClosure1);
  1838. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1839. $ctx1.sendIdx["add:"]=2;
  1840. //>>excludeEnd("ctx");
  1841. $recv(inlinedSend)._add_(inlinedClosure2);
  1842. $recv(self._send())._replaceWith_(inlinedSend);
  1843. $7=$recv($recv(inlinedSend)._method())._internalVariables();
  1844. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1845. $ctx1.sendIdx["internalVariables"]=1;
  1846. //>>excludeEnd("ctx");
  1847. $recv($7)._addAll_($recv(inlinedSend)._internalVariables());
  1848. return inlinedSend;
  1849. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1850. }, function($ctx1) {$ctx1.fill(self,"inlinedSend:withBlock:withBlock:",{inlinedSend:inlinedSend,anIRInstruction:anIRInstruction,anotherIRInstruction:anotherIRInstruction,inlinedClosure1:inlinedClosure1,inlinedClosure2:inlinedClosure2},$globals.IRSendInliner)});
  1851. //>>excludeEnd("ctx");
  1852. },
  1853. //>>excludeStart("ide", pragmas.excludeIdeData);
  1854. args: ["inlinedSend", "anIRInstruction", "anotherIRInstruction"],
  1855. source: "inlinedSend: inlinedSend withBlock: anIRInstruction withBlock: anotherIRInstruction\x0a\x09| inlinedClosure1 inlinedClosure2 |\x0a\x0a\x09anIRInstruction isClosure ifFalse: [ self inliningError: 'Message argument should be a block' ].\x0a\x09anotherIRInstruction isClosure ifFalse: [ self inliningError: 'Message argument should be a block' ].\x0a\x0a\x09inlinedClosure1 := self translator visit: (self inlineClosure: anIRInstruction).\x0a\x09inlinedClosure2 := self translator visit: (self inlineClosure: anotherIRInstruction).\x0a\x0a\x09inlinedSend\x0a\x09\x09add: self send receiver;\x0a\x09\x09add: inlinedClosure1;\x0a\x09\x09add: inlinedClosure2.\x0a\x0a\x09self send replaceWith: inlinedSend.\x0a\x09inlinedSend method internalVariables \x0a\x09\x09addAll: inlinedSend internalVariables.\x0a\x09\x09\x0a\x09^ inlinedSend",
  1856. referencedClasses: [],
  1857. //>>excludeEnd("ide");
  1858. messageSends: ["ifFalse:", "isClosure", "inliningError:", "visit:", "translator", "inlineClosure:", "add:", "receiver", "send", "replaceWith:", "addAll:", "internalVariables", "method"]
  1859. }),
  1860. $globals.IRSendInliner);
  1861. $core.addMethod(
  1862. $core.method({
  1863. selector: "inlinedSequence",
  1864. protocol: 'factory',
  1865. fn: function (){
  1866. var self=this;
  1867. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1868. return $core.withContext(function($ctx1) {
  1869. //>>excludeEnd("ctx");
  1870. return $recv($globals.IRInlinedSequence)._new();
  1871. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1872. }, function($ctx1) {$ctx1.fill(self,"inlinedSequence",{},$globals.IRSendInliner)});
  1873. //>>excludeEnd("ctx");
  1874. },
  1875. //>>excludeStart("ide", pragmas.excludeIdeData);
  1876. args: [],
  1877. source: "inlinedSequence\x0a\x09^ IRInlinedSequence new",
  1878. referencedClasses: ["IRInlinedSequence"],
  1879. //>>excludeEnd("ide");
  1880. messageSends: ["new"]
  1881. }),
  1882. $globals.IRSendInliner);
  1883. $core.addMethod(
  1884. $core.method({
  1885. selector: "inliningError:",
  1886. protocol: 'error handling',
  1887. fn: function (aString){
  1888. var self=this;
  1889. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1890. return $core.withContext(function($ctx1) {
  1891. //>>excludeEnd("ctx");
  1892. $recv($globals.InliningError)._signal_(aString);
  1893. return self;
  1894. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1895. }, function($ctx1) {$ctx1.fill(self,"inliningError:",{aString:aString},$globals.IRSendInliner)});
  1896. //>>excludeEnd("ctx");
  1897. },
  1898. //>>excludeStart("ide", pragmas.excludeIdeData);
  1899. args: ["aString"],
  1900. source: "inliningError: aString\x0a\x09InliningError signal: aString",
  1901. referencedClasses: ["InliningError"],
  1902. //>>excludeEnd("ide");
  1903. messageSends: ["signal:"]
  1904. }),
  1905. $globals.IRSendInliner);
  1906. $core.addMethod(
  1907. $core.method({
  1908. selector: "send",
  1909. protocol: 'accessing',
  1910. fn: function (){
  1911. var self=this;
  1912. return self["@send"];
  1913. },
  1914. //>>excludeStart("ide", pragmas.excludeIdeData);
  1915. args: [],
  1916. source: "send\x0a\x09^ send",
  1917. referencedClasses: [],
  1918. //>>excludeEnd("ide");
  1919. messageSends: []
  1920. }),
  1921. $globals.IRSendInliner);
  1922. $core.addMethod(
  1923. $core.method({
  1924. selector: "send:",
  1925. protocol: 'accessing',
  1926. fn: function (anIRSend){
  1927. var self=this;
  1928. self["@send"]=anIRSend;
  1929. return self;
  1930. },
  1931. //>>excludeStart("ide", pragmas.excludeIdeData);
  1932. args: ["anIRSend"],
  1933. source: "send: anIRSend\x0a\x09send := anIRSend",
  1934. referencedClasses: [],
  1935. //>>excludeEnd("ide");
  1936. messageSends: []
  1937. }),
  1938. $globals.IRSendInliner);
  1939. $core.addMethod(
  1940. $core.method({
  1941. selector: "translator",
  1942. protocol: 'accessing',
  1943. fn: function (){
  1944. var self=this;
  1945. return self["@translator"];
  1946. },
  1947. //>>excludeStart("ide", pragmas.excludeIdeData);
  1948. args: [],
  1949. source: "translator\x0a\x09^ translator",
  1950. referencedClasses: [],
  1951. //>>excludeEnd("ide");
  1952. messageSends: []
  1953. }),
  1954. $globals.IRSendInliner);
  1955. $core.addMethod(
  1956. $core.method({
  1957. selector: "translator:",
  1958. protocol: 'accessing',
  1959. fn: function (anASTTranslator){
  1960. var self=this;
  1961. self["@translator"]=anASTTranslator;
  1962. return self;
  1963. },
  1964. //>>excludeStart("ide", pragmas.excludeIdeData);
  1965. args: ["anASTTranslator"],
  1966. source: "translator: anASTTranslator\x0a\x09translator := anASTTranslator",
  1967. referencedClasses: [],
  1968. //>>excludeEnd("ide");
  1969. messageSends: []
  1970. }),
  1971. $globals.IRSendInliner);
  1972. $core.addMethod(
  1973. $core.method({
  1974. selector: "inlinedSelectors",
  1975. protocol: 'accessing',
  1976. fn: function (){
  1977. var self=this;
  1978. return ["ifTrue:", "ifFalse:", "ifTrue:ifFalse:", "ifFalse:ifTrue:", "ifNil:", "ifNotNil:", "ifNil:ifNotNil:", "ifNotNil:ifNil:"];
  1979. },
  1980. //>>excludeStart("ide", pragmas.excludeIdeData);
  1981. args: [],
  1982. source: "inlinedSelectors\x0a\x09^ #('ifTrue:' 'ifFalse:' 'ifTrue:ifFalse:' 'ifFalse:ifTrue:' 'ifNil:' 'ifNotNil:' 'ifNil:ifNotNil:' 'ifNotNil:ifNil:')",
  1983. referencedClasses: [],
  1984. //>>excludeEnd("ide");
  1985. messageSends: []
  1986. }),
  1987. $globals.IRSendInliner.klass);
  1988. $core.addMethod(
  1989. $core.method({
  1990. selector: "shouldInline:",
  1991. protocol: 'accessing',
  1992. fn: function (anIRSend){
  1993. var self=this;
  1994. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1995. return $core.withContext(function($ctx1) {
  1996. //>>excludeEnd("ctx");
  1997. var $1;
  1998. $1=$recv(self._inlinedSelectors())._includes_($recv(anIRSend)._selector());
  1999. if(!$core.assert($1)){
  2000. return false;
  2001. };
  2002. return $recv($recv(anIRSend)._arguments())._allSatisfy_((function(each){
  2003. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2004. return $core.withContext(function($ctx2) {
  2005. //>>excludeEnd("ctx");
  2006. return $recv(each)._isClosure();
  2007. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2008. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)});
  2009. //>>excludeEnd("ctx");
  2010. }));
  2011. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2012. }, function($ctx1) {$ctx1.fill(self,"shouldInline:",{anIRSend:anIRSend},$globals.IRSendInliner.klass)});
  2013. //>>excludeEnd("ctx");
  2014. },
  2015. //>>excludeStart("ide", pragmas.excludeIdeData);
  2016. args: ["anIRSend"],
  2017. source: "shouldInline: anIRSend\x0a\x09(self inlinedSelectors includes: anIRSend selector) ifFalse: [ ^ false ].\x0a\x09^ anIRSend arguments allSatisfy: [ :each | each isClosure ]",
  2018. referencedClasses: [],
  2019. //>>excludeEnd("ide");
  2020. messageSends: ["ifFalse:", "includes:", "inlinedSelectors", "selector", "allSatisfy:", "arguments", "isClosure"]
  2021. }),
  2022. $globals.IRSendInliner.klass);
  2023. $core.addClass('IRAssignmentInliner', $globals.IRSendInliner, ['assignment'], 'Compiler-Inlining');
  2024. //>>excludeStart("ide", pragmas.excludeIdeData);
  2025. $globals.IRAssignmentInliner.comment="I inline message sends together with assignments by moving them around into the inline closure instructions.\x0a\x0a##Example\x0a\x0a\x09foo\x0a\x09\x09| a |\x0a\x09\x09a := true ifTrue: [ 1 ]\x0a\x0aWill produce:\x0a\x0a\x09if($core.assert(true) {\x0a\x09\x09a = 1;\x0a\x09};";
  2026. //>>excludeEnd("ide");
  2027. $core.addMethod(
  2028. $core.method({
  2029. selector: "assignment",
  2030. protocol: 'accessing',
  2031. fn: function (){
  2032. var self=this;
  2033. return self["@assignment"];
  2034. },
  2035. //>>excludeStart("ide", pragmas.excludeIdeData);
  2036. args: [],
  2037. source: "assignment\x0a\x09^ assignment",
  2038. referencedClasses: [],
  2039. //>>excludeEnd("ide");
  2040. messageSends: []
  2041. }),
  2042. $globals.IRAssignmentInliner);
  2043. $core.addMethod(
  2044. $core.method({
  2045. selector: "assignment:",
  2046. protocol: 'accessing',
  2047. fn: function (aNode){
  2048. var self=this;
  2049. self["@assignment"]=aNode;
  2050. return self;
  2051. },
  2052. //>>excludeStart("ide", pragmas.excludeIdeData);
  2053. args: ["aNode"],
  2054. source: "assignment: aNode\x0a\x09assignment := aNode",
  2055. referencedClasses: [],
  2056. //>>excludeEnd("ide");
  2057. messageSends: []
  2058. }),
  2059. $globals.IRAssignmentInliner);
  2060. $core.addMethod(
  2061. $core.method({
  2062. selector: "inlineAssignment:",
  2063. protocol: 'inlining',
  2064. fn: function (anIRAssignment){
  2065. var self=this;
  2066. var inlinedAssignment;
  2067. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2068. return $core.withContext(function($ctx1) {
  2069. //>>excludeEnd("ctx");
  2070. self._assignment_(anIRAssignment);
  2071. inlinedAssignment=$recv($globals.IRInlinedAssignment)._new();
  2072. $recv($recv(anIRAssignment)._instructions())._do_((function(each){
  2073. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2074. return $core.withContext(function($ctx2) {
  2075. //>>excludeEnd("ctx");
  2076. return $recv(inlinedAssignment)._add_(each);
  2077. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2078. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  2079. //>>excludeEnd("ctx");
  2080. }));
  2081. $recv(anIRAssignment)._replaceWith_(inlinedAssignment);
  2082. self._inlineSend_($recv(inlinedAssignment)._right());
  2083. return inlinedAssignment;
  2084. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2085. }, function($ctx1) {$ctx1.fill(self,"inlineAssignment:",{anIRAssignment:anIRAssignment,inlinedAssignment:inlinedAssignment},$globals.IRAssignmentInliner)});
  2086. //>>excludeEnd("ctx");
  2087. },
  2088. //>>excludeStart("ide", pragmas.excludeIdeData);
  2089. args: ["anIRAssignment"],
  2090. source: "inlineAssignment: anIRAssignment\x0a\x09| inlinedAssignment |\x0a\x09self assignment: anIRAssignment.\x0a\x09inlinedAssignment := IRInlinedAssignment new.\x0a\x09anIRAssignment instructions do: [ :each |\x0a\x09\x09inlinedAssignment add: each ].\x0a\x09anIRAssignment replaceWith: inlinedAssignment.\x0a\x09self inlineSend: inlinedAssignment right.\x0a\x09^ inlinedAssignment",
  2091. referencedClasses: ["IRInlinedAssignment"],
  2092. //>>excludeEnd("ide");
  2093. messageSends: ["assignment:", "new", "do:", "instructions", "add:", "replaceWith:", "inlineSend:", "right"]
  2094. }),
  2095. $globals.IRAssignmentInliner);
  2096. $core.addMethod(
  2097. $core.method({
  2098. selector: "inlineClosure:",
  2099. protocol: 'inlining',
  2100. fn: function (anIRClosure){
  2101. var self=this;
  2102. var inlinedClosure,statements;
  2103. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2104. return $core.withContext(function($ctx1) {
  2105. //>>excludeEnd("ctx");
  2106. var $2,$1,$3,$5,$4;
  2107. inlinedClosure=(
  2108. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2109. $ctx1.supercall = true,
  2110. //>>excludeEnd("ctx");
  2111. ($globals.IRAssignmentInliner.superclass||$boot.nilAsClass).fn.prototype._inlineClosure_.apply($recv(self), [anIRClosure]));
  2112. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2113. $ctx1.supercall = false;
  2114. //>>excludeEnd("ctx");;
  2115. statements=$recv($recv(inlinedClosure)._sequence())._instructions();
  2116. $recv(statements)._ifNotEmpty_((function(){
  2117. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2118. return $core.withContext(function($ctx2) {
  2119. //>>excludeEnd("ctx");
  2120. $2=$recv(statements)._last();
  2121. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2122. $ctx2.sendIdx["last"]=1;
  2123. //>>excludeEnd("ctx");
  2124. $1=$recv($2)._canBeAssigned();
  2125. if($core.assert($1)){
  2126. $3=$recv(statements)._last();
  2127. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2128. $ctx2.sendIdx["last"]=2;
  2129. //>>excludeEnd("ctx");
  2130. $5=$recv($globals.IRAssignment)._new();
  2131. $recv($5)._add_($recv(self._assignment())._left());
  2132. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2133. $ctx2.sendIdx["add:"]=1;
  2134. //>>excludeEnd("ctx");
  2135. $recv($5)._add_($recv($recv(statements)._last())._copy());
  2136. $4=$recv($5)._yourself();
  2137. return $recv($3)._replaceWith_($4);
  2138. };
  2139. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2140. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  2141. //>>excludeEnd("ctx");
  2142. }));
  2143. return inlinedClosure;
  2144. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2145. }, function($ctx1) {$ctx1.fill(self,"inlineClosure:",{anIRClosure:anIRClosure,inlinedClosure:inlinedClosure,statements:statements},$globals.IRAssignmentInliner)});
  2146. //>>excludeEnd("ctx");
  2147. },
  2148. //>>excludeStart("ide", pragmas.excludeIdeData);
  2149. args: ["anIRClosure"],
  2150. source: "inlineClosure: anIRClosure\x0a\x09| inlinedClosure statements |\x0a\x0a\x09inlinedClosure := super inlineClosure: anIRClosure.\x0a\x09statements := inlinedClosure sequence instructions.\x0a\x09\x0a\x09statements ifNotEmpty: [\x0a\x09\x09statements last canBeAssigned ifTrue: [\x0a\x09\x09\x09statements last replaceWith: (IRAssignment new\x0a\x09\x09\x09\x09add: self assignment left;\x0a\x09\x09\x09\x09add: statements last copy;\x0a\x09\x09\x09\x09yourself) ] ].\x0a\x0a\x09^ inlinedClosure",
  2151. referencedClasses: ["IRAssignment"],
  2152. //>>excludeEnd("ide");
  2153. messageSends: ["inlineClosure:", "instructions", "sequence", "ifNotEmpty:", "ifTrue:", "canBeAssigned", "last", "replaceWith:", "add:", "new", "left", "assignment", "copy", "yourself"]
  2154. }),
  2155. $globals.IRAssignmentInliner);
  2156. $core.addClass('IRReturnInliner', $globals.IRSendInliner, [], 'Compiler-Inlining');
  2157. //>>excludeStart("ide", pragmas.excludeIdeData);
  2158. $globals.IRReturnInliner.comment="I inline message sends with inlined closure together with a return instruction.";
  2159. //>>excludeEnd("ide");
  2160. $core.addMethod(
  2161. $core.method({
  2162. selector: "inlineClosure:",
  2163. protocol: 'inlining',
  2164. fn: function (anIRClosure){
  2165. var self=this;
  2166. var closure,statements;
  2167. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2168. return $core.withContext(function($ctx1) {
  2169. //>>excludeEnd("ctx");
  2170. var $2,$1,$3,$5,$4;
  2171. closure=(
  2172. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2173. $ctx1.supercall = true,
  2174. //>>excludeEnd("ctx");
  2175. ($globals.IRReturnInliner.superclass||$boot.nilAsClass).fn.prototype._inlineClosure_.apply($recv(self), [anIRClosure]));
  2176. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2177. $ctx1.supercall = false;
  2178. //>>excludeEnd("ctx");;
  2179. statements=$recv($recv(closure)._sequence())._instructions();
  2180. $recv(statements)._ifNotEmpty_((function(){
  2181. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2182. return $core.withContext(function($ctx2) {
  2183. //>>excludeEnd("ctx");
  2184. $2=$recv(statements)._last();
  2185. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2186. $ctx2.sendIdx["last"]=1;
  2187. //>>excludeEnd("ctx");
  2188. $1=$recv($2)._isReturn();
  2189. if(!$core.assert($1)){
  2190. $3=$recv(statements)._last();
  2191. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2192. $ctx2.sendIdx["last"]=2;
  2193. //>>excludeEnd("ctx");
  2194. $5=$recv($globals.IRReturn)._new();
  2195. $recv($5)._add_($recv($recv(statements)._last())._copy());
  2196. $4=$recv($5)._yourself();
  2197. return $recv($3)._replaceWith_($4);
  2198. };
  2199. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2200. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  2201. //>>excludeEnd("ctx");
  2202. }));
  2203. return closure;
  2204. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2205. }, function($ctx1) {$ctx1.fill(self,"inlineClosure:",{anIRClosure:anIRClosure,closure:closure,statements:statements},$globals.IRReturnInliner)});
  2206. //>>excludeEnd("ctx");
  2207. },
  2208. //>>excludeStart("ide", pragmas.excludeIdeData);
  2209. args: ["anIRClosure"],
  2210. source: "inlineClosure: anIRClosure\x0a\x09| closure statements |\x0a\x0a\x09closure := super inlineClosure: anIRClosure.\x0a\x09statements := closure sequence instructions.\x0a\x09\x0a\x09statements ifNotEmpty: [\x0a\x09\x09statements last isReturn\x0a\x09\x09\x09ifFalse: [ statements last replaceWith: (IRReturn new\x0a\x09\x09\x09\x09add: statements last copy;\x0a\x09\x09\x09\x09yourself)] ].\x0a\x0a\x09^ closure",
  2211. referencedClasses: ["IRReturn"],
  2212. //>>excludeEnd("ide");
  2213. messageSends: ["inlineClosure:", "instructions", "sequence", "ifNotEmpty:", "ifFalse:", "isReturn", "last", "replaceWith:", "add:", "new", "copy", "yourself"]
  2214. }),
  2215. $globals.IRReturnInliner);
  2216. $core.addMethod(
  2217. $core.method({
  2218. selector: "inlineReturn:",
  2219. protocol: 'inlining',
  2220. fn: function (anIRReturn){
  2221. var self=this;
  2222. var return_;
  2223. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2224. return $core.withContext(function($ctx1) {
  2225. //>>excludeEnd("ctx");
  2226. return_=self._inlinedReturn();
  2227. $recv($recv(anIRReturn)._instructions())._do_((function(each){
  2228. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2229. return $core.withContext(function($ctx2) {
  2230. //>>excludeEnd("ctx");
  2231. return $recv(return_)._add_(each);
  2232. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2233. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  2234. //>>excludeEnd("ctx");
  2235. }));
  2236. $recv(anIRReturn)._replaceWith_(return_);
  2237. self._inlineSend_($recv(return_)._expression());
  2238. return return_;
  2239. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2240. }, function($ctx1) {$ctx1.fill(self,"inlineReturn:",{anIRReturn:anIRReturn,return_:return_},$globals.IRReturnInliner)});
  2241. //>>excludeEnd("ctx");
  2242. },
  2243. //>>excludeStart("ide", pragmas.excludeIdeData);
  2244. args: ["anIRReturn"],
  2245. source: "inlineReturn: anIRReturn\x0a\x09| return |\x0a\x09return := self inlinedReturn.\x0a\x09anIRReturn instructions do: [ :each |\x0a\x09\x09return add: each ].\x0a\x09anIRReturn replaceWith: return.\x0a\x09self inlineSend: return expression.\x0a\x09^ return",
  2246. referencedClasses: [],
  2247. //>>excludeEnd("ide");
  2248. messageSends: ["inlinedReturn", "do:", "instructions", "add:", "replaceWith:", "inlineSend:", "expression"]
  2249. }),
  2250. $globals.IRReturnInliner);
  2251. $core.addMethod(
  2252. $core.method({
  2253. selector: "inlinedReturn",
  2254. protocol: 'factory',
  2255. fn: function (){
  2256. var self=this;
  2257. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2258. return $core.withContext(function($ctx1) {
  2259. //>>excludeEnd("ctx");
  2260. return $recv($globals.IRInlinedReturn)._new();
  2261. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2262. }, function($ctx1) {$ctx1.fill(self,"inlinedReturn",{},$globals.IRReturnInliner)});
  2263. //>>excludeEnd("ctx");
  2264. },
  2265. //>>excludeStart("ide", pragmas.excludeIdeData);
  2266. args: [],
  2267. source: "inlinedReturn\x0a\x09^ IRInlinedReturn new",
  2268. referencedClasses: ["IRInlinedReturn"],
  2269. //>>excludeEnd("ide");
  2270. messageSends: ["new"]
  2271. }),
  2272. $globals.IRReturnInliner);
  2273. $core.addClass('InliningCodeGenerator', $globals.CodeGenerator, [], 'Compiler-Inlining');
  2274. //>>excludeStart("ide", pragmas.excludeIdeData);
  2275. $globals.InliningCodeGenerator.comment="I am a specialized code generator that uses inlining to produce more optimized JavaScript output";
  2276. //>>excludeEnd("ide");
  2277. $core.addMethod(
  2278. $core.method({
  2279. selector: "compileNode:",
  2280. protocol: 'compiling',
  2281. fn: function (aNode){
  2282. var self=this;
  2283. var ir,stream;
  2284. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2285. return $core.withContext(function($ctx1) {
  2286. //>>excludeEnd("ctx");
  2287. var $1;
  2288. $recv(self._semanticAnalyzer())._visit_(aNode);
  2289. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2290. $ctx1.sendIdx["visit:"]=1;
  2291. //>>excludeEnd("ctx");
  2292. ir=$recv(self._translator())._visit_(aNode);
  2293. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2294. $ctx1.sendIdx["visit:"]=2;
  2295. //>>excludeEnd("ctx");
  2296. $recv(self._inliner())._visit_(ir);
  2297. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2298. $ctx1.sendIdx["visit:"]=3;
  2299. //>>excludeEnd("ctx");
  2300. $1=self._irTranslator();
  2301. $recv($1)._currentClass_(self._currentClass());
  2302. $recv($1)._visit_(ir);
  2303. return $recv($1)._contents();
  2304. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2305. }, function($ctx1) {$ctx1.fill(self,"compileNode:",{aNode:aNode,ir:ir,stream:stream},$globals.InliningCodeGenerator)});
  2306. //>>excludeEnd("ctx");
  2307. },
  2308. //>>excludeStart("ide", pragmas.excludeIdeData);
  2309. args: ["aNode"],
  2310. source: "compileNode: aNode\x0a\x09| ir stream |\x0a\x0a\x09self semanticAnalyzer visit: aNode.\x0a\x09ir := self translator visit: aNode.\x0a\x09self inliner visit: ir.\x0a\x0a\x09^ self irTranslator\x0a\x09\x09currentClass: self currentClass;\x0a\x09\x09visit: ir;\x0a\x09\x09contents",
  2311. referencedClasses: [],
  2312. //>>excludeEnd("ide");
  2313. messageSends: ["visit:", "semanticAnalyzer", "translator", "inliner", "currentClass:", "irTranslator", "currentClass", "contents"]
  2314. }),
  2315. $globals.InliningCodeGenerator);
  2316. $core.addMethod(
  2317. $core.method({
  2318. selector: "inliner",
  2319. protocol: 'compiling',
  2320. fn: function (){
  2321. var self=this;
  2322. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2323. return $core.withContext(function($ctx1) {
  2324. //>>excludeEnd("ctx");
  2325. return $recv($globals.IRInliner)._new();
  2326. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2327. }, function($ctx1) {$ctx1.fill(self,"inliner",{},$globals.InliningCodeGenerator)});
  2328. //>>excludeEnd("ctx");
  2329. },
  2330. //>>excludeStart("ide", pragmas.excludeIdeData);
  2331. args: [],
  2332. source: "inliner\x0a\x09^ IRInliner new",
  2333. referencedClasses: ["IRInliner"],
  2334. //>>excludeEnd("ide");
  2335. messageSends: ["new"]
  2336. }),
  2337. $globals.InliningCodeGenerator);
  2338. $core.addMethod(
  2339. $core.method({
  2340. selector: "irTranslator",
  2341. protocol: 'compiling',
  2342. fn: function (){
  2343. var self=this;
  2344. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2345. return $core.withContext(function($ctx1) {
  2346. //>>excludeEnd("ctx");
  2347. return $recv($globals.IRInliningJSTranslator)._new();
  2348. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2349. }, function($ctx1) {$ctx1.fill(self,"irTranslator",{},$globals.InliningCodeGenerator)});
  2350. //>>excludeEnd("ctx");
  2351. },
  2352. //>>excludeStart("ide", pragmas.excludeIdeData);
  2353. args: [],
  2354. source: "irTranslator\x0a\x09^ IRInliningJSTranslator new",
  2355. referencedClasses: ["IRInliningJSTranslator"],
  2356. //>>excludeEnd("ide");
  2357. messageSends: ["new"]
  2358. }),
  2359. $globals.InliningCodeGenerator);
  2360. $core.addClass('InliningError', $globals.SemanticError, [], 'Compiler-Inlining');
  2361. //>>excludeStart("ide", pragmas.excludeIdeData);
  2362. $globals.InliningError.comment="Instances of InliningError are signaled when using an `InliningCodeGenerator`in a `Compiler`.";
  2363. //>>excludeEnd("ide");
  2364. });