1
0

Compiler-Inlining.deploy.js 49 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292
  1. smalltalk.addPackage('Compiler-Inlining');
  2. smalltalk.addClass('IRInlinedAssignment', smalltalk.IRAssignment, [], 'Compiler-Inlining');
  3. smalltalk.addMethod(
  4. "_accept_",
  5. smalltalk.method({
  6. selector: "accept:",
  7. fn: function (aVisitor){
  8. var self=this;
  9. return smalltalk.withContext(function($ctx1) {
  10. var $1;
  11. $1=_st(aVisitor)._visitIRInlinedAssignment_(self);
  12. return $1;
  13. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},smalltalk.IRInlinedAssignment)})},
  14. messageSends: ["visitIRInlinedAssignment:"]}),
  15. smalltalk.IRInlinedAssignment);
  16. smalltalk.addMethod(
  17. "_isInlined",
  18. smalltalk.method({
  19. selector: "isInlined",
  20. fn: function (){
  21. var self=this;
  22. return smalltalk.withContext(function($ctx1) {
  23. return true;
  24. }, function($ctx1) {$ctx1.fill(self,"isInlined",{},smalltalk.IRInlinedAssignment)})},
  25. messageSends: []}),
  26. smalltalk.IRInlinedAssignment);
  27. smalltalk.addClass('IRInlinedClosure', smalltalk.IRClosure, [], 'Compiler-Inlining');
  28. smalltalk.addMethod(
  29. "_accept_",
  30. smalltalk.method({
  31. selector: "accept:",
  32. fn: function (aVisitor){
  33. var self=this;
  34. return smalltalk.withContext(function($ctx1) {
  35. _st(aVisitor)._visitIRInlinedClosure_(self);
  36. return self}, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},smalltalk.IRInlinedClosure)})},
  37. messageSends: ["visitIRInlinedClosure:"]}),
  38. smalltalk.IRInlinedClosure);
  39. smalltalk.addMethod(
  40. "_isInlined",
  41. smalltalk.method({
  42. selector: "isInlined",
  43. fn: function (){
  44. var self=this;
  45. return smalltalk.withContext(function($ctx1) {
  46. return true;
  47. }, function($ctx1) {$ctx1.fill(self,"isInlined",{},smalltalk.IRInlinedClosure)})},
  48. messageSends: []}),
  49. smalltalk.IRInlinedClosure);
  50. smalltalk.addClass('IRInlinedReturn', smalltalk.IRReturn, [], 'Compiler-Inlining');
  51. smalltalk.addMethod(
  52. "_accept_",
  53. smalltalk.method({
  54. selector: "accept:",
  55. fn: function (aVisitor){
  56. var self=this;
  57. return smalltalk.withContext(function($ctx1) {
  58. var $1;
  59. $1=_st(aVisitor)._visitIRInlinedReturn_(self);
  60. return $1;
  61. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},smalltalk.IRInlinedReturn)})},
  62. messageSends: ["visitIRInlinedReturn:"]}),
  63. smalltalk.IRInlinedReturn);
  64. smalltalk.addMethod(
  65. "_isInlined",
  66. smalltalk.method({
  67. selector: "isInlined",
  68. fn: function (){
  69. var self=this;
  70. return smalltalk.withContext(function($ctx1) {
  71. return true;
  72. }, function($ctx1) {$ctx1.fill(self,"isInlined",{},smalltalk.IRInlinedReturn)})},
  73. messageSends: []}),
  74. smalltalk.IRInlinedReturn);
  75. smalltalk.addClass('IRInlinedNonLocalReturn', smalltalk.IRInlinedReturn, [], 'Compiler-Inlining');
  76. smalltalk.addMethod(
  77. "_accept_",
  78. smalltalk.method({
  79. selector: "accept:",
  80. fn: function (aVisitor){
  81. var self=this;
  82. return smalltalk.withContext(function($ctx1) {
  83. var $1;
  84. $1=_st(aVisitor)._visitIRInlinedNonLocalReturn_(self);
  85. return $1;
  86. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},smalltalk.IRInlinedNonLocalReturn)})},
  87. messageSends: ["visitIRInlinedNonLocalReturn:"]}),
  88. smalltalk.IRInlinedNonLocalReturn);
  89. smalltalk.addMethod(
  90. "_isInlined",
  91. smalltalk.method({
  92. selector: "isInlined",
  93. fn: function (){
  94. var self=this;
  95. return smalltalk.withContext(function($ctx1) {
  96. return true;
  97. }, function($ctx1) {$ctx1.fill(self,"isInlined",{},smalltalk.IRInlinedNonLocalReturn)})},
  98. messageSends: []}),
  99. smalltalk.IRInlinedNonLocalReturn);
  100. smalltalk.addClass('IRInlinedSend', smalltalk.IRSend, [], 'Compiler-Inlining');
  101. smalltalk.addMethod(
  102. "_accept_",
  103. smalltalk.method({
  104. selector: "accept:",
  105. fn: function (aVisitor){
  106. var self=this;
  107. return smalltalk.withContext(function($ctx1) {
  108. _st(aVisitor)._visitInlinedSend_(self);
  109. return self}, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},smalltalk.IRInlinedSend)})},
  110. messageSends: ["visitInlinedSend:"]}),
  111. smalltalk.IRInlinedSend);
  112. smalltalk.addMethod(
  113. "_isInlined",
  114. smalltalk.method({
  115. selector: "isInlined",
  116. fn: function (){
  117. var self=this;
  118. return smalltalk.withContext(function($ctx1) {
  119. return true;
  120. }, function($ctx1) {$ctx1.fill(self,"isInlined",{},smalltalk.IRInlinedSend)})},
  121. messageSends: []}),
  122. smalltalk.IRInlinedSend);
  123. smalltalk.addClass('IRInlinedIfFalse', smalltalk.IRInlinedSend, [], 'Compiler-Inlining');
  124. smalltalk.addMethod(
  125. "_accept_",
  126. smalltalk.method({
  127. selector: "accept:",
  128. fn: function (aVisitor){
  129. var self=this;
  130. return smalltalk.withContext(function($ctx1) {
  131. _st(aVisitor)._visitIRInlinedIfFalse_(self);
  132. return self}, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},smalltalk.IRInlinedIfFalse)})},
  133. messageSends: ["visitIRInlinedIfFalse:"]}),
  134. smalltalk.IRInlinedIfFalse);
  135. smalltalk.addClass('IRInlinedIfNilIfNotNil', smalltalk.IRInlinedSend, [], 'Compiler-Inlining');
  136. smalltalk.addMethod(
  137. "_accept_",
  138. smalltalk.method({
  139. selector: "accept:",
  140. fn: function (aVisitor){
  141. var self=this;
  142. return smalltalk.withContext(function($ctx1) {
  143. _st(aVisitor)._visitIRInlinedIfNilIfNotNil_(self);
  144. return self}, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},smalltalk.IRInlinedIfNilIfNotNil)})},
  145. messageSends: ["visitIRInlinedIfNilIfNotNil:"]}),
  146. smalltalk.IRInlinedIfNilIfNotNil);
  147. smalltalk.addClass('IRInlinedIfTrue', smalltalk.IRInlinedSend, [], 'Compiler-Inlining');
  148. smalltalk.addMethod(
  149. "_accept_",
  150. smalltalk.method({
  151. selector: "accept:",
  152. fn: function (aVisitor){
  153. var self=this;
  154. return smalltalk.withContext(function($ctx1) {
  155. _st(aVisitor)._visitIRInlinedIfTrue_(self);
  156. return self}, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},smalltalk.IRInlinedIfTrue)})},
  157. messageSends: ["visitIRInlinedIfTrue:"]}),
  158. smalltalk.IRInlinedIfTrue);
  159. smalltalk.addClass('IRInlinedIfTrueIfFalse', smalltalk.IRInlinedSend, [], 'Compiler-Inlining');
  160. smalltalk.addMethod(
  161. "_accept_",
  162. smalltalk.method({
  163. selector: "accept:",
  164. fn: function (aVisitor){
  165. var self=this;
  166. return smalltalk.withContext(function($ctx1) {
  167. _st(aVisitor)._visitIRInlinedIfTrueIfFalse_(self);
  168. return self}, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},smalltalk.IRInlinedIfTrueIfFalse)})},
  169. messageSends: ["visitIRInlinedIfTrueIfFalse:"]}),
  170. smalltalk.IRInlinedIfTrueIfFalse);
  171. smalltalk.addClass('IRInlinedSequence', smalltalk.IRBlockSequence, [], 'Compiler-Inlining');
  172. smalltalk.addMethod(
  173. "_accept_",
  174. smalltalk.method({
  175. selector: "accept:",
  176. fn: function (aVisitor){
  177. var self=this;
  178. return smalltalk.withContext(function($ctx1) {
  179. _st(aVisitor)._visitIRInlinedSequence_(self);
  180. return self}, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},smalltalk.IRInlinedSequence)})},
  181. messageSends: ["visitIRInlinedSequence:"]}),
  182. smalltalk.IRInlinedSequence);
  183. smalltalk.addMethod(
  184. "_isInlined",
  185. smalltalk.method({
  186. selector: "isInlined",
  187. fn: function (){
  188. var self=this;
  189. return smalltalk.withContext(function($ctx1) {
  190. return true;
  191. }, function($ctx1) {$ctx1.fill(self,"isInlined",{},smalltalk.IRInlinedSequence)})},
  192. messageSends: []}),
  193. smalltalk.IRInlinedSequence);
  194. smalltalk.addClass('IRInliner', smalltalk.IRVisitor, [], 'Compiler-Inlining');
  195. smalltalk.addMethod(
  196. "_assignmentInliner",
  197. smalltalk.method({
  198. selector: "assignmentInliner",
  199. fn: function (){
  200. var self=this;
  201. function $IRAssignmentInliner(){return smalltalk.IRAssignmentInliner||(typeof IRAssignmentInliner=="undefined"?nil:IRAssignmentInliner)}
  202. return smalltalk.withContext(function($ctx1) {
  203. var $2,$3,$1;
  204. $2=_st($IRAssignmentInliner())._new();
  205. _st($2)._translator_(self);
  206. $3=_st($2)._yourself();
  207. $1=$3;
  208. return $1;
  209. }, function($ctx1) {$ctx1.fill(self,"assignmentInliner",{},smalltalk.IRInliner)})},
  210. messageSends: ["translator:", "new", "yourself"]}),
  211. smalltalk.IRInliner);
  212. smalltalk.addMethod(
  213. "_nonLocalReturnInliner",
  214. smalltalk.method({
  215. selector: "nonLocalReturnInliner",
  216. fn: function (){
  217. var self=this;
  218. function $IRNonLocalReturnInliner(){return smalltalk.IRNonLocalReturnInliner||(typeof IRNonLocalReturnInliner=="undefined"?nil:IRNonLocalReturnInliner)}
  219. return smalltalk.withContext(function($ctx1) {
  220. var $2,$3,$1;
  221. $2=_st($IRNonLocalReturnInliner())._new();
  222. _st($2)._translator_(self);
  223. $3=_st($2)._yourself();
  224. $1=$3;
  225. return $1;
  226. }, function($ctx1) {$ctx1.fill(self,"nonLocalReturnInliner",{},smalltalk.IRInliner)})},
  227. messageSends: ["translator:", "new", "yourself"]}),
  228. smalltalk.IRInliner);
  229. smalltalk.addMethod(
  230. "_returnInliner",
  231. smalltalk.method({
  232. selector: "returnInliner",
  233. fn: function (){
  234. var self=this;
  235. function $IRReturnInliner(){return smalltalk.IRReturnInliner||(typeof IRReturnInliner=="undefined"?nil:IRReturnInliner)}
  236. return smalltalk.withContext(function($ctx1) {
  237. var $2,$3,$1;
  238. $2=_st($IRReturnInliner())._new();
  239. _st($2)._translator_(self);
  240. $3=_st($2)._yourself();
  241. $1=$3;
  242. return $1;
  243. }, function($ctx1) {$ctx1.fill(self,"returnInliner",{},smalltalk.IRInliner)})},
  244. messageSends: ["translator:", "new", "yourself"]}),
  245. smalltalk.IRInliner);
  246. smalltalk.addMethod(
  247. "_sendInliner",
  248. smalltalk.method({
  249. selector: "sendInliner",
  250. fn: function (){
  251. var self=this;
  252. function $IRSendInliner(){return smalltalk.IRSendInliner||(typeof IRSendInliner=="undefined"?nil:IRSendInliner)}
  253. return smalltalk.withContext(function($ctx1) {
  254. var $2,$3,$1;
  255. $2=_st($IRSendInliner())._new();
  256. _st($2)._translator_(self);
  257. $3=_st($2)._yourself();
  258. $1=$3;
  259. return $1;
  260. }, function($ctx1) {$ctx1.fill(self,"sendInliner",{},smalltalk.IRInliner)})},
  261. messageSends: ["translator:", "new", "yourself"]}),
  262. smalltalk.IRInliner);
  263. smalltalk.addMethod(
  264. "_shouldInlineAssignment_",
  265. smalltalk.method({
  266. selector: "shouldInlineAssignment:",
  267. fn: function (anIRAssignment){
  268. var self=this;
  269. return smalltalk.withContext(function($ctx1) {
  270. var $1;
  271. $1=_st(_st(_st(anIRAssignment)._isInlined())._not())._and_((function(){
  272. return smalltalk.withContext(function($ctx2) {
  273. return _st(_st(_st(_st(anIRAssignment)._instructions())._last())._isSend())._and_((function(){
  274. return smalltalk.withContext(function($ctx3) {
  275. return _st(self)._shouldInlineSend_(_st(_st(anIRAssignment)._instructions())._last());
  276. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  277. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  278. return $1;
  279. }, function($ctx1) {$ctx1.fill(self,"shouldInlineAssignment:",{anIRAssignment:anIRAssignment},smalltalk.IRInliner)})},
  280. messageSends: ["and:", "shouldInlineSend:", "last", "instructions", "isSend", "not", "isInlined"]}),
  281. smalltalk.IRInliner);
  282. smalltalk.addMethod(
  283. "_shouldInlineReturn_",
  284. smalltalk.method({
  285. selector: "shouldInlineReturn:",
  286. fn: function (anIRReturn){
  287. var self=this;
  288. return smalltalk.withContext(function($ctx1) {
  289. var $1;
  290. $1=_st(_st(_st(anIRReturn)._isInlined())._not())._and_((function(){
  291. return smalltalk.withContext(function($ctx2) {
  292. return _st(_st(_st(_st(anIRReturn)._instructions())._first())._isSend())._and_((function(){
  293. return smalltalk.withContext(function($ctx3) {
  294. return _st(self)._shouldInlineSend_(_st(_st(anIRReturn)._instructions())._first());
  295. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  296. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  297. return $1;
  298. }, function($ctx1) {$ctx1.fill(self,"shouldInlineReturn:",{anIRReturn:anIRReturn},smalltalk.IRInliner)})},
  299. messageSends: ["and:", "shouldInlineSend:", "first", "instructions", "isSend", "not", "isInlined"]}),
  300. smalltalk.IRInliner);
  301. smalltalk.addMethod(
  302. "_shouldInlineSend_",
  303. smalltalk.method({
  304. selector: "shouldInlineSend:",
  305. fn: function (anIRSend){
  306. var self=this;
  307. function $IRSendInliner(){return smalltalk.IRSendInliner||(typeof IRSendInliner=="undefined"?nil:IRSendInliner)}
  308. return smalltalk.withContext(function($ctx1) {
  309. var $1;
  310. $1=_st(_st(_st(anIRSend)._isInlined())._not())._and_((function(){
  311. return smalltalk.withContext(function($ctx2) {
  312. return _st($IRSendInliner())._shouldInline_(anIRSend);
  313. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  314. return $1;
  315. }, function($ctx1) {$ctx1.fill(self,"shouldInlineSend:",{anIRSend:anIRSend},smalltalk.IRInliner)})},
  316. messageSends: ["and:", "shouldInline:", "not", "isInlined"]}),
  317. smalltalk.IRInliner);
  318. smalltalk.addMethod(
  319. "_transformNonLocalReturn_",
  320. smalltalk.method({
  321. selector: "transformNonLocalReturn:",
  322. fn: function (anIRNonLocalReturn){
  323. var self=this;
  324. var localReturn;
  325. function $IRReturn(){return smalltalk.IRReturn||(typeof IRReturn=="undefined"?nil:IRReturn)}
  326. return smalltalk.withContext(function($ctx1) {
  327. var $1,$2,$3,$4,$5;
  328. $1=_st(_st(anIRNonLocalReturn)._scope())._canInlineNonLocalReturns();
  329. if(smalltalk.assert($1)){
  330. _st(_st(_st(anIRNonLocalReturn)._scope())._methodScope())._removeNonLocalReturn_(_st(anIRNonLocalReturn)._scope());
  331. $2=_st($IRReturn())._new();
  332. _st($2)._scope_(_st(anIRNonLocalReturn)._scope());
  333. $3=_st($2)._yourself();
  334. localReturn=$3;
  335. localReturn;
  336. _st(_st(anIRNonLocalReturn)._instructions())._do_((function(each){
  337. return smalltalk.withContext(function($ctx2) {
  338. return _st(localReturn)._add_(each);
  339. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  340. _st(anIRNonLocalReturn)._replaceWith_(localReturn);
  341. $4=localReturn;
  342. return $4;
  343. };
  344. $5=smalltalk.IRVisitor.fn.prototype._visitIRNonLocalReturn_.apply(_st(self), [anIRNonLocalReturn]);
  345. return $5;
  346. }, function($ctx1) {$ctx1.fill(self,"transformNonLocalReturn:",{anIRNonLocalReturn:anIRNonLocalReturn,localReturn:localReturn},smalltalk.IRInliner)})},
  347. messageSends: ["ifTrue:", "removeNonLocalReturn:", "scope", "methodScope", "scope:", "new", "yourself", "do:", "add:", "instructions", "replaceWith:", "canInlineNonLocalReturns", "visitIRNonLocalReturn:"]}),
  348. smalltalk.IRInliner);
  349. smalltalk.addMethod(
  350. "_visitIRAssignment_",
  351. smalltalk.method({
  352. selector: "visitIRAssignment:",
  353. fn: function (anIRAssignment){
  354. var self=this;
  355. return smalltalk.withContext(function($ctx1) {
  356. var $2,$1;
  357. $2=_st(self)._shouldInlineAssignment_(anIRAssignment);
  358. if(smalltalk.assert($2)){
  359. $1=_st(_st(self)._assignmentInliner())._inlineAssignment_(anIRAssignment);
  360. } else {
  361. $1=smalltalk.IRVisitor.fn.prototype._visitIRAssignment_.apply(_st(self), [anIRAssignment]);
  362. };
  363. return $1;
  364. }, function($ctx1) {$ctx1.fill(self,"visitIRAssignment:",{anIRAssignment:anIRAssignment},smalltalk.IRInliner)})},
  365. messageSends: ["ifTrue:ifFalse:", "inlineAssignment:", "assignmentInliner", "visitIRAssignment:", "shouldInlineAssignment:"]}),
  366. smalltalk.IRInliner);
  367. smalltalk.addMethod(
  368. "_visitIRNonLocalReturn_",
  369. smalltalk.method({
  370. selector: "visitIRNonLocalReturn:",
  371. fn: function (anIRNonLocalReturn){
  372. var self=this;
  373. return smalltalk.withContext(function($ctx1) {
  374. var $2,$1;
  375. $2=_st(self)._shouldInlineReturn_(anIRNonLocalReturn);
  376. if(smalltalk.assert($2)){
  377. $1=_st(_st(self)._nonLocalReturnInliner())._inlineReturn_(anIRNonLocalReturn);
  378. } else {
  379. $1=_st(self)._transformNonLocalReturn_(anIRNonLocalReturn);
  380. };
  381. return $1;
  382. }, function($ctx1) {$ctx1.fill(self,"visitIRNonLocalReturn:",{anIRNonLocalReturn:anIRNonLocalReturn},smalltalk.IRInliner)})},
  383. messageSends: ["ifTrue:ifFalse:", "inlineReturn:", "nonLocalReturnInliner", "transformNonLocalReturn:", "shouldInlineReturn:"]}),
  384. smalltalk.IRInliner);
  385. smalltalk.addMethod(
  386. "_visitIRReturn_",
  387. smalltalk.method({
  388. selector: "visitIRReturn:",
  389. fn: function (anIRReturn){
  390. var self=this;
  391. return smalltalk.withContext(function($ctx1) {
  392. var $2,$1;
  393. $2=_st(self)._shouldInlineReturn_(anIRReturn);
  394. if(smalltalk.assert($2)){
  395. $1=_st(_st(self)._returnInliner())._inlineReturn_(anIRReturn);
  396. } else {
  397. $1=smalltalk.IRVisitor.fn.prototype._visitIRReturn_.apply(_st(self), [anIRReturn]);
  398. };
  399. return $1;
  400. }, function($ctx1) {$ctx1.fill(self,"visitIRReturn:",{anIRReturn:anIRReturn},smalltalk.IRInliner)})},
  401. messageSends: ["ifTrue:ifFalse:", "inlineReturn:", "returnInliner", "visitIRReturn:", "shouldInlineReturn:"]}),
  402. smalltalk.IRInliner);
  403. smalltalk.addMethod(
  404. "_visitIRSend_",
  405. smalltalk.method({
  406. selector: "visitIRSend:",
  407. fn: function (anIRSend){
  408. var self=this;
  409. return smalltalk.withContext(function($ctx1) {
  410. var $2,$1;
  411. $2=_st(self)._shouldInlineSend_(anIRSend);
  412. if(smalltalk.assert($2)){
  413. $1=_st(_st(self)._sendInliner())._inlineSend_(anIRSend);
  414. } else {
  415. $1=smalltalk.IRVisitor.fn.prototype._visitIRSend_.apply(_st(self), [anIRSend]);
  416. };
  417. return $1;
  418. }, function($ctx1) {$ctx1.fill(self,"visitIRSend:",{anIRSend:anIRSend},smalltalk.IRInliner)})},
  419. messageSends: ["ifTrue:ifFalse:", "inlineSend:", "sendInliner", "visitIRSend:", "shouldInlineSend:"]}),
  420. smalltalk.IRInliner);
  421. smalltalk.addClass('IRInliningJSTranslator', smalltalk.IRJSTranslator, [], 'Compiler-Inlining');
  422. smalltalk.addMethod(
  423. "_visitIRInlinedAssignment_",
  424. smalltalk.method({
  425. selector: "visitIRInlinedAssignment:",
  426. fn: function (anIRInlinedAssignment){
  427. var self=this;
  428. return smalltalk.withContext(function($ctx1) {
  429. _st(self)._visit_(_st(_st(anIRInlinedAssignment)._instructions())._last());
  430. return self}, function($ctx1) {$ctx1.fill(self,"visitIRInlinedAssignment:",{anIRInlinedAssignment:anIRInlinedAssignment},smalltalk.IRInliningJSTranslator)})},
  431. messageSends: ["visit:", "last", "instructions"]}),
  432. smalltalk.IRInliningJSTranslator);
  433. smalltalk.addMethod(
  434. "_visitIRInlinedClosure_",
  435. smalltalk.method({
  436. selector: "visitIRInlinedClosure:",
  437. fn: function (anIRInlinedClosure){
  438. var self=this;
  439. return smalltalk.withContext(function($ctx1) {
  440. _st(_st(self)._stream())._nextPutVars_(_st(_st(anIRInlinedClosure)._tempDeclarations())._collect_((function(each){
  441. return smalltalk.withContext(function($ctx2) {
  442. return _st(_st(each)._name())._asVariableName();
  443. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})));
  444. _st(_st(anIRInlinedClosure)._instructions())._do_((function(each){
  445. return smalltalk.withContext(function($ctx2) {
  446. return _st(self)._visit_(each);
  447. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  448. return self}, function($ctx1) {$ctx1.fill(self,"visitIRInlinedClosure:",{anIRInlinedClosure:anIRInlinedClosure},smalltalk.IRInliningJSTranslator)})},
  449. messageSends: ["nextPutVars:", "collect:", "asVariableName", "name", "tempDeclarations", "stream", "do:", "visit:", "instructions"]}),
  450. smalltalk.IRInliningJSTranslator);
  451. smalltalk.addMethod(
  452. "_visitIRInlinedIfFalse_",
  453. smalltalk.method({
  454. selector: "visitIRInlinedIfFalse:",
  455. fn: function (anIRInlinedIfFalse){
  456. var self=this;
  457. return smalltalk.withContext(function($ctx1) {
  458. _st(_st(self)._stream())._nextPutIf_with_((function(){
  459. return smalltalk.withContext(function($ctx2) {
  460. _st(_st(self)._stream())._nextPutAll_("! smalltalk.assert(");
  461. _st(self)._visit_(_st(_st(anIRInlinedIfFalse)._instructions())._first());
  462. return _st(_st(self)._stream())._nextPutAll_(")");
  463. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(function(){
  464. return smalltalk.withContext(function($ctx2) {
  465. return _st(self)._visit_(_st(_st(anIRInlinedIfFalse)._instructions())._last());
  466. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  467. return self}, function($ctx1) {$ctx1.fill(self,"visitIRInlinedIfFalse:",{anIRInlinedIfFalse:anIRInlinedIfFalse},smalltalk.IRInliningJSTranslator)})},
  468. messageSends: ["nextPutIf:with:", "nextPutAll:", "stream", "visit:", "first", "instructions", "last"]}),
  469. smalltalk.IRInliningJSTranslator);
  470. smalltalk.addMethod(
  471. "_visitIRInlinedIfNil_",
  472. smalltalk.method({
  473. selector: "visitIRInlinedIfNil:",
  474. fn: function (anIRInlinedIfNil){
  475. var self=this;
  476. return smalltalk.withContext(function($ctx1) {
  477. _st(_st(self)._stream())._nextPutIf_with_((function(){
  478. return smalltalk.withContext(function($ctx2) {
  479. _st(_st(self)._stream())._nextPutAll_("($receiver = ");
  480. _st(self)._visit_(_st(_st(anIRInlinedIfNil)._instructions())._first());
  481. return _st(_st(self)._stream())._nextPutAll_(") == nil || $receiver == undefined");
  482. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(function(){
  483. return smalltalk.withContext(function($ctx2) {
  484. return _st(self)._visit_(_st(_st(anIRInlinedIfNil)._instructions())._last());
  485. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  486. return self}, function($ctx1) {$ctx1.fill(self,"visitIRInlinedIfNil:",{anIRInlinedIfNil:anIRInlinedIfNil},smalltalk.IRInliningJSTranslator)})},
  487. messageSends: ["nextPutIf:with:", "nextPutAll:", "stream", "visit:", "first", "instructions", "last"]}),
  488. smalltalk.IRInliningJSTranslator);
  489. smalltalk.addMethod(
  490. "_visitIRInlinedIfNilIfNotNil_",
  491. smalltalk.method({
  492. selector: "visitIRInlinedIfNilIfNotNil:",
  493. fn: function (anIRInlinedIfNilIfNotNil){
  494. var self=this;
  495. return smalltalk.withContext(function($ctx1) {
  496. _st(_st(self)._stream())._nextPutIfElse_with_with_((function(){
  497. return smalltalk.withContext(function($ctx2) {
  498. _st(_st(self)._stream())._nextPutAll_("($receiver = ");
  499. _st(self)._visit_(_st(_st(anIRInlinedIfNilIfNotNil)._instructions())._first());
  500. return _st(_st(self)._stream())._nextPutAll_(") == nil || $receiver == undefined");
  501. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(function(){
  502. return smalltalk.withContext(function($ctx2) {
  503. return _st(self)._visit_(_st(_st(anIRInlinedIfNilIfNotNil)._instructions())._second());
  504. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(function(){
  505. return smalltalk.withContext(function($ctx2) {
  506. return _st(self)._visit_(_st(_st(anIRInlinedIfNilIfNotNil)._instructions())._third());
  507. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  508. return self}, function($ctx1) {$ctx1.fill(self,"visitIRInlinedIfNilIfNotNil:",{anIRInlinedIfNilIfNotNil:anIRInlinedIfNilIfNotNil},smalltalk.IRInliningJSTranslator)})},
  509. messageSends: ["nextPutIfElse:with:with:", "nextPutAll:", "stream", "visit:", "first", "instructions", "second", "third"]}),
  510. smalltalk.IRInliningJSTranslator);
  511. smalltalk.addMethod(
  512. "_visitIRInlinedIfTrue_",
  513. smalltalk.method({
  514. selector: "visitIRInlinedIfTrue:",
  515. fn: function (anIRInlinedIfTrue){
  516. var self=this;
  517. return smalltalk.withContext(function($ctx1) {
  518. _st(_st(self)._stream())._nextPutIf_with_((function(){
  519. return smalltalk.withContext(function($ctx2) {
  520. _st(_st(self)._stream())._nextPutAll_("smalltalk.assert(");
  521. _st(self)._visit_(_st(_st(anIRInlinedIfTrue)._instructions())._first());
  522. return _st(_st(self)._stream())._nextPutAll_(")");
  523. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(function(){
  524. return smalltalk.withContext(function($ctx2) {
  525. return _st(self)._visit_(_st(_st(anIRInlinedIfTrue)._instructions())._last());
  526. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  527. return self}, function($ctx1) {$ctx1.fill(self,"visitIRInlinedIfTrue:",{anIRInlinedIfTrue:anIRInlinedIfTrue},smalltalk.IRInliningJSTranslator)})},
  528. messageSends: ["nextPutIf:with:", "nextPutAll:", "stream", "visit:", "first", "instructions", "last"]}),
  529. smalltalk.IRInliningJSTranslator);
  530. smalltalk.addMethod(
  531. "_visitIRInlinedIfTrueIfFalse_",
  532. smalltalk.method({
  533. selector: "visitIRInlinedIfTrueIfFalse:",
  534. fn: function (anIRInlinedIfTrueIfFalse){
  535. var self=this;
  536. return smalltalk.withContext(function($ctx1) {
  537. _st(_st(self)._stream())._nextPutIfElse_with_with_((function(){
  538. return smalltalk.withContext(function($ctx2) {
  539. _st(_st(self)._stream())._nextPutAll_("smalltalk.assert(");
  540. _st(self)._visit_(_st(_st(anIRInlinedIfTrueIfFalse)._instructions())._first());
  541. return _st(_st(self)._stream())._nextPutAll_(")");
  542. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(function(){
  543. return smalltalk.withContext(function($ctx2) {
  544. return _st(self)._visit_(_st(_st(anIRInlinedIfTrueIfFalse)._instructions())._second());
  545. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(function(){
  546. return smalltalk.withContext(function($ctx2) {
  547. return _st(self)._visit_(_st(_st(anIRInlinedIfTrueIfFalse)._instructions())._third());
  548. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  549. return self}, function($ctx1) {$ctx1.fill(self,"visitIRInlinedIfTrueIfFalse:",{anIRInlinedIfTrueIfFalse:anIRInlinedIfTrueIfFalse},smalltalk.IRInliningJSTranslator)})},
  550. messageSends: ["nextPutIfElse:with:with:", "nextPutAll:", "stream", "visit:", "first", "instructions", "second", "third"]}),
  551. smalltalk.IRInliningJSTranslator);
  552. smalltalk.addMethod(
  553. "_visitIRInlinedNonLocalReturn_",
  554. smalltalk.method({
  555. selector: "visitIRInlinedNonLocalReturn:",
  556. fn: function (anIRInlinedReturn){
  557. var self=this;
  558. return smalltalk.withContext(function($ctx1) {
  559. _st(_st(self)._stream())._nextPutStatementWith_((function(){
  560. return smalltalk.withContext(function($ctx2) {
  561. return _st(self)._visit_(_st(_st(anIRInlinedReturn)._instructions())._last());
  562. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  563. _st(_st(self)._stream())._nextPutNonLocalReturnWith_((function(){
  564. return smalltalk.withContext(function($ctx2) {
  565. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  566. return self}, function($ctx1) {$ctx1.fill(self,"visitIRInlinedNonLocalReturn:",{anIRInlinedReturn:anIRInlinedReturn},smalltalk.IRInliningJSTranslator)})},
  567. messageSends: ["nextPutStatementWith:", "visit:", "last", "instructions", "stream", "nextPutNonLocalReturnWith:"]}),
  568. smalltalk.IRInliningJSTranslator);
  569. smalltalk.addMethod(
  570. "_visitIRInlinedReturn_",
  571. smalltalk.method({
  572. selector: "visitIRInlinedReturn:",
  573. fn: function (anIRInlinedReturn){
  574. var self=this;
  575. return smalltalk.withContext(function($ctx1) {
  576. _st(self)._visit_(_st(_st(anIRInlinedReturn)._instructions())._last());
  577. return self}, function($ctx1) {$ctx1.fill(self,"visitIRInlinedReturn:",{anIRInlinedReturn:anIRInlinedReturn},smalltalk.IRInliningJSTranslator)})},
  578. messageSends: ["visit:", "last", "instructions"]}),
  579. smalltalk.IRInliningJSTranslator);
  580. smalltalk.addMethod(
  581. "_visitIRInlinedSequence_",
  582. smalltalk.method({
  583. selector: "visitIRInlinedSequence:",
  584. fn: function (anIRInlinedSequence){
  585. var self=this;
  586. return smalltalk.withContext(function($ctx1) {
  587. _st(_st(anIRInlinedSequence)._instructions())._do_((function(each){
  588. return smalltalk.withContext(function($ctx2) {
  589. return _st(_st(self)._stream())._nextPutStatementWith_((function(){
  590. return smalltalk.withContext(function($ctx3) {
  591. return _st(self)._visit_(each);
  592. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  593. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  594. return self}, function($ctx1) {$ctx1.fill(self,"visitIRInlinedSequence:",{anIRInlinedSequence:anIRInlinedSequence},smalltalk.IRInliningJSTranslator)})},
  595. messageSends: ["do:", "nextPutStatementWith:", "visit:", "stream", "instructions"]}),
  596. smalltalk.IRInliningJSTranslator);
  597. smalltalk.addClass('IRSendInliner', smalltalk.Object, ['send', 'translator'], 'Compiler-Inlining');
  598. smalltalk.addMethod(
  599. "_ifFalse_",
  600. smalltalk.method({
  601. selector: "ifFalse:",
  602. fn: function (anIRInstruction){
  603. var self=this;
  604. function $IRInlinedIfFalse(){return smalltalk.IRInlinedIfFalse||(typeof IRInlinedIfFalse=="undefined"?nil:IRInlinedIfFalse)}
  605. return smalltalk.withContext(function($ctx1) {
  606. var $1;
  607. $1=_st(self)._inlinedSend_with_(_st($IRInlinedIfFalse())._new(),anIRInstruction);
  608. return $1;
  609. }, function($ctx1) {$ctx1.fill(self,"ifFalse:",{anIRInstruction:anIRInstruction},smalltalk.IRSendInliner)})},
  610. messageSends: ["inlinedSend:with:", "new"]}),
  611. smalltalk.IRSendInliner);
  612. smalltalk.addMethod(
  613. "_ifFalse_ifTrue_",
  614. smalltalk.method({
  615. selector: "ifFalse:ifTrue:",
  616. fn: function (anIRInstruction,anotherIRInstruction){
  617. var self=this;
  618. return smalltalk.withContext(function($ctx1) {
  619. var $1;
  620. $1=_st(self)._perform_withArguments_("ifTrue:ifFalse:",[anotherIRInstruction,anIRInstruction]);
  621. return $1;
  622. }, function($ctx1) {$ctx1.fill(self,"ifFalse:ifTrue:",{anIRInstruction:anIRInstruction,anotherIRInstruction:anotherIRInstruction},smalltalk.IRSendInliner)})},
  623. messageSends: ["perform:withArguments:"]}),
  624. smalltalk.IRSendInliner);
  625. smalltalk.addMethod(
  626. "_ifNil_",
  627. smalltalk.method({
  628. selector: "ifNil:",
  629. fn: function (anIRInstruction){
  630. var self=this;
  631. function $IRInlinedIfNilIfNotNil(){return smalltalk.IRInlinedIfNilIfNotNil||(typeof IRInlinedIfNilIfNotNil=="undefined"?nil:IRInlinedIfNilIfNotNil)}
  632. function $IRClosure(){return smalltalk.IRClosure||(typeof IRClosure=="undefined"?nil:IRClosure)}
  633. function $IRBlockSequence(){return smalltalk.IRBlockSequence||(typeof IRBlockSequence=="undefined"?nil:IRBlockSequence)}
  634. return smalltalk.withContext(function($ctx1) {
  635. var $2,$3,$4,$5,$1;
  636. $2=_st($IRClosure())._new();
  637. _st($2)._scope_(_st(_st(anIRInstruction)._scope())._copy());
  638. $3=_st($IRBlockSequence())._new();
  639. _st($3)._add_(_st(_st(_st(self)._send())._instructions())._first());
  640. $4=_st($3)._yourself();
  641. _st($2)._add_($4);
  642. $5=_st($2)._yourself();
  643. $1=_st(self)._inlinedSend_with_with_(_st($IRInlinedIfNilIfNotNil())._new(),anIRInstruction,$5);
  644. return $1;
  645. }, function($ctx1) {$ctx1.fill(self,"ifNil:",{anIRInstruction:anIRInstruction},smalltalk.IRSendInliner)})},
  646. messageSends: ["inlinedSend:with:with:", "new", "scope:", "copy", "scope", "add:", "first", "instructions", "send", "yourself"]}),
  647. smalltalk.IRSendInliner);
  648. smalltalk.addMethod(
  649. "_ifNil_ifNotNil_",
  650. smalltalk.method({
  651. selector: "ifNil:ifNotNil:",
  652. fn: function (anIRInstruction,anotherIRInstruction){
  653. var self=this;
  654. function $IRInlinedIfNilIfNotNil(){return smalltalk.IRInlinedIfNilIfNotNil||(typeof IRInlinedIfNilIfNotNil=="undefined"?nil:IRInlinedIfNilIfNotNil)}
  655. return smalltalk.withContext(function($ctx1) {
  656. var $1;
  657. $1=_st(self)._inlinedSend_with_with_(_st($IRInlinedIfNilIfNotNil())._new(),anIRInstruction,anotherIRInstruction);
  658. return $1;
  659. }, function($ctx1) {$ctx1.fill(self,"ifNil:ifNotNil:",{anIRInstruction:anIRInstruction,anotherIRInstruction:anotherIRInstruction},smalltalk.IRSendInliner)})},
  660. messageSends: ["inlinedSend:with:with:", "new"]}),
  661. smalltalk.IRSendInliner);
  662. smalltalk.addMethod(
  663. "_ifNotNil_",
  664. smalltalk.method({
  665. selector: "ifNotNil:",
  666. fn: function (anIRInstruction){
  667. var self=this;
  668. function $IRInlinedIfNilIfNotNil(){return smalltalk.IRInlinedIfNilIfNotNil||(typeof IRInlinedIfNilIfNotNil=="undefined"?nil:IRInlinedIfNilIfNotNil)}
  669. function $IRClosure(){return smalltalk.IRClosure||(typeof IRClosure=="undefined"?nil:IRClosure)}
  670. function $IRBlockSequence(){return smalltalk.IRBlockSequence||(typeof IRBlockSequence=="undefined"?nil:IRBlockSequence)}
  671. return smalltalk.withContext(function($ctx1) {
  672. var $2,$3,$4,$5,$1;
  673. $2=_st($IRClosure())._new();
  674. _st($2)._scope_(_st(_st(anIRInstruction)._scope())._copy());
  675. $3=_st($IRBlockSequence())._new();
  676. _st($3)._add_(_st(_st(_st(self)._send())._instructions())._first());
  677. $4=_st($3)._yourself();
  678. _st($2)._add_($4);
  679. $5=_st($2)._yourself();
  680. $1=_st(self)._inlinedSend_with_with_(_st($IRInlinedIfNilIfNotNil())._new(),$5,anIRInstruction);
  681. return $1;
  682. }, function($ctx1) {$ctx1.fill(self,"ifNotNil:",{anIRInstruction:anIRInstruction},smalltalk.IRSendInliner)})},
  683. messageSends: ["inlinedSend:with:with:", "new", "scope:", "copy", "scope", "add:", "first", "instructions", "send", "yourself"]}),
  684. smalltalk.IRSendInliner);
  685. smalltalk.addMethod(
  686. "_ifNotNil_ifNil_",
  687. smalltalk.method({
  688. selector: "ifNotNil:ifNil:",
  689. fn: function (anIRInstruction,anotherIRInstruction){
  690. var self=this;
  691. function $IRInlinedIfNilIfNotNil(){return smalltalk.IRInlinedIfNilIfNotNil||(typeof IRInlinedIfNilIfNotNil=="undefined"?nil:IRInlinedIfNilIfNotNil)}
  692. return smalltalk.withContext(function($ctx1) {
  693. var $1;
  694. $1=_st(self)._inlinedSend_with_with_(_st($IRInlinedIfNilIfNotNil())._new(),anotherIRInstruction,anIRInstruction);
  695. return $1;
  696. }, function($ctx1) {$ctx1.fill(self,"ifNotNil:ifNil:",{anIRInstruction:anIRInstruction,anotherIRInstruction:anotherIRInstruction},smalltalk.IRSendInliner)})},
  697. messageSends: ["inlinedSend:with:with:", "new"]}),
  698. smalltalk.IRSendInliner);
  699. smalltalk.addMethod(
  700. "_ifTrue_",
  701. smalltalk.method({
  702. selector: "ifTrue:",
  703. fn: function (anIRInstruction){
  704. var self=this;
  705. function $IRInlinedIfTrue(){return smalltalk.IRInlinedIfTrue||(typeof IRInlinedIfTrue=="undefined"?nil:IRInlinedIfTrue)}
  706. return smalltalk.withContext(function($ctx1) {
  707. var $1;
  708. $1=_st(self)._inlinedSend_with_(_st($IRInlinedIfTrue())._new(),anIRInstruction);
  709. return $1;
  710. }, function($ctx1) {$ctx1.fill(self,"ifTrue:",{anIRInstruction:anIRInstruction},smalltalk.IRSendInliner)})},
  711. messageSends: ["inlinedSend:with:", "new"]}),
  712. smalltalk.IRSendInliner);
  713. smalltalk.addMethod(
  714. "_ifTrue_ifFalse_",
  715. smalltalk.method({
  716. selector: "ifTrue:ifFalse:",
  717. fn: function (anIRInstruction,anotherIRInstruction){
  718. var self=this;
  719. function $IRInlinedIfTrueIfFalse(){return smalltalk.IRInlinedIfTrueIfFalse||(typeof IRInlinedIfTrueIfFalse=="undefined"?nil:IRInlinedIfTrueIfFalse)}
  720. return smalltalk.withContext(function($ctx1) {
  721. var $1;
  722. $1=_st(self)._inlinedSend_with_with_(_st($IRInlinedIfTrueIfFalse())._new(),anIRInstruction,anotherIRInstruction);
  723. return $1;
  724. }, function($ctx1) {$ctx1.fill(self,"ifTrue:ifFalse:",{anIRInstruction:anIRInstruction,anotherIRInstruction:anotherIRInstruction},smalltalk.IRSendInliner)})},
  725. messageSends: ["inlinedSend:with:with:", "new"]}),
  726. smalltalk.IRSendInliner);
  727. smalltalk.addMethod(
  728. "_inlineClosure_",
  729. smalltalk.method({
  730. selector: "inlineClosure:",
  731. fn: function (anIRClosure){
  732. var self=this;
  733. var inlinedClosure,sequence,statements;
  734. return smalltalk.withContext(function($ctx1) {
  735. var $1,$2;
  736. inlinedClosure=_st(self)._inlinedClosure();
  737. _st(inlinedClosure)._scope_(_st(anIRClosure)._scope());
  738. _st(_st(anIRClosure)._tempDeclarations())._do_((function(each){
  739. return smalltalk.withContext(function($ctx2) {
  740. return _st(inlinedClosure)._add_(each);
  741. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  742. sequence=_st(self)._inlinedSequence();
  743. _st(inlinedClosure)._add_(sequence);
  744. statements=_st(_st(_st(anIRClosure)._instructions())._last())._instructions();
  745. _st(statements)._ifNotEmpty_((function(){
  746. return smalltalk.withContext(function($ctx2) {
  747. _st(_st(statements)._allButLast())._do_((function(each){
  748. return smalltalk.withContext(function($ctx3) {
  749. return _st(sequence)._add_(each);
  750. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}));
  751. $1=_st(_st(_st(statements)._last())._isReturn())._and_((function(){
  752. return smalltalk.withContext(function($ctx3) {
  753. return _st(_st(statements)._last())._isBlockReturn();
  754. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  755. if(smalltalk.assert($1)){
  756. return _st(sequence)._add_(_st(_st(_st(statements)._last())._instructions())._first());
  757. } else {
  758. return _st(sequence)._add_(_st(statements)._last());
  759. };
  760. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  761. $2=inlinedClosure;
  762. return $2;
  763. }, function($ctx1) {$ctx1.fill(self,"inlineClosure:",{anIRClosure:anIRClosure,inlinedClosure:inlinedClosure,sequence:sequence,statements:statements},smalltalk.IRSendInliner)})},
  764. messageSends: ["inlinedClosure", "scope:", "scope", "do:", "add:", "tempDeclarations", "inlinedSequence", "instructions", "last", "ifNotEmpty:", "allButLast", "ifTrue:ifFalse:", "first", "and:", "isBlockReturn", "isReturn"]}),
  765. smalltalk.IRSendInliner);
  766. smalltalk.addMethod(
  767. "_inlineSend_",
  768. smalltalk.method({
  769. selector: "inlineSend:",
  770. fn: function (anIRSend){
  771. var self=this;
  772. return smalltalk.withContext(function($ctx1) {
  773. var $1;
  774. _st(self)._send_(anIRSend);
  775. $1=_st(self)._perform_withArguments_(_st(_st(self)._send())._selector(),_st(_st(_st(self)._send())._instructions())._allButFirst());
  776. return $1;
  777. }, function($ctx1) {$ctx1.fill(self,"inlineSend:",{anIRSend:anIRSend},smalltalk.IRSendInliner)})},
  778. messageSends: ["send:", "perform:withArguments:", "selector", "send", "allButFirst", "instructions"]}),
  779. smalltalk.IRSendInliner);
  780. smalltalk.addMethod(
  781. "_inlinedClosure",
  782. smalltalk.method({
  783. selector: "inlinedClosure",
  784. fn: function (){
  785. var self=this;
  786. function $IRInlinedClosure(){return smalltalk.IRInlinedClosure||(typeof IRInlinedClosure=="undefined"?nil:IRInlinedClosure)}
  787. return smalltalk.withContext(function($ctx1) {
  788. var $1;
  789. $1=_st($IRInlinedClosure())._new();
  790. return $1;
  791. }, function($ctx1) {$ctx1.fill(self,"inlinedClosure",{},smalltalk.IRSendInliner)})},
  792. messageSends: ["new"]}),
  793. smalltalk.IRSendInliner);
  794. smalltalk.addMethod(
  795. "_inlinedSend_with_",
  796. smalltalk.method({
  797. selector: "inlinedSend:with:",
  798. fn: function (inlinedSend,anIRInstruction){
  799. var self=this;
  800. var inlinedClosure;
  801. return smalltalk.withContext(function($ctx1) {
  802. var $1,$2,$3,$4,$5;
  803. $1=_st(anIRInstruction)._isClosure();
  804. if(! smalltalk.assert($1)){
  805. _st(self)._inliningError_("Message argument should be a block");
  806. };
  807. $2=_st(_st(_st(anIRInstruction)._arguments())._size()).__eq((0));
  808. if(! smalltalk.assert($2)){
  809. _st(self)._inliningError_("Inlined block should have zero argument");
  810. };
  811. inlinedClosure=_st(_st(self)._translator())._visit_(_st(self)._inlineClosure_(anIRInstruction));
  812. $3=inlinedSend;
  813. _st($3)._add_(_st(_st(_st(self)._send())._instructions())._first());
  814. $4=_st($3)._add_(inlinedClosure);
  815. _st(_st(self)._send())._replaceWith_(inlinedSend);
  816. $5=inlinedSend;
  817. return $5;
  818. }, function($ctx1) {$ctx1.fill(self,"inlinedSend:with:",{inlinedSend:inlinedSend,anIRInstruction:anIRInstruction,inlinedClosure:inlinedClosure},smalltalk.IRSendInliner)})},
  819. messageSends: ["ifFalse:", "inliningError:", "isClosure", "=", "size", "arguments", "visit:", "inlineClosure:", "translator", "add:", "first", "instructions", "send", "replaceWith:"]}),
  820. smalltalk.IRSendInliner);
  821. smalltalk.addMethod(
  822. "_inlinedSend_with_with_",
  823. smalltalk.method({
  824. selector: "inlinedSend:with:with:",
  825. fn: function (inlinedSend,anIRInstruction,anotherIRInstruction){
  826. var self=this;
  827. var inlinedClosure1,inlinedClosure2;
  828. return smalltalk.withContext(function($ctx1) {
  829. var $1,$2,$3,$4,$5,$6,$7;
  830. $1=_st(anIRInstruction)._isClosure();
  831. if(! smalltalk.assert($1)){
  832. _st(self)._inliningError_("Message argument should be a block");
  833. };
  834. $2=_st(_st(_st(anIRInstruction)._arguments())._size()).__eq((0));
  835. if(! smalltalk.assert($2)){
  836. _st(self)._inliningError_("Inlined block should have zero argument");
  837. };
  838. $3=_st(anotherIRInstruction)._isClosure();
  839. if(! smalltalk.assert($3)){
  840. _st(self)._inliningError_("Message argument should be a block");
  841. };
  842. $4=_st(_st(_st(anotherIRInstruction)._arguments())._size()).__eq((0));
  843. if(! smalltalk.assert($4)){
  844. _st(self)._inliningError_("Inlined block should have zero argument");
  845. };
  846. inlinedClosure1=_st(_st(self)._translator())._visit_(_st(self)._inlineClosure_(anIRInstruction));
  847. inlinedClosure2=_st(_st(self)._translator())._visit_(_st(self)._inlineClosure_(anotherIRInstruction));
  848. $5=inlinedSend;
  849. _st($5)._add_(_st(_st(_st(self)._send())._instructions())._first());
  850. _st($5)._add_(inlinedClosure1);
  851. $6=_st($5)._add_(inlinedClosure2);
  852. _st(_st(self)._send())._replaceWith_(inlinedSend);
  853. $7=inlinedSend;
  854. return $7;
  855. }, function($ctx1) {$ctx1.fill(self,"inlinedSend:with:with:",{inlinedSend:inlinedSend,anIRInstruction:anIRInstruction,anotherIRInstruction:anotherIRInstruction,inlinedClosure1:inlinedClosure1,inlinedClosure2:inlinedClosure2},smalltalk.IRSendInliner)})},
  856. messageSends: ["ifFalse:", "inliningError:", "isClosure", "=", "size", "arguments", "visit:", "inlineClosure:", "translator", "add:", "first", "instructions", "send", "replaceWith:"]}),
  857. smalltalk.IRSendInliner);
  858. smalltalk.addMethod(
  859. "_inlinedSequence",
  860. smalltalk.method({
  861. selector: "inlinedSequence",
  862. fn: function (){
  863. var self=this;
  864. function $IRInlinedSequence(){return smalltalk.IRInlinedSequence||(typeof IRInlinedSequence=="undefined"?nil:IRInlinedSequence)}
  865. return smalltalk.withContext(function($ctx1) {
  866. var $1;
  867. $1=_st($IRInlinedSequence())._new();
  868. return $1;
  869. }, function($ctx1) {$ctx1.fill(self,"inlinedSequence",{},smalltalk.IRSendInliner)})},
  870. messageSends: ["new"]}),
  871. smalltalk.IRSendInliner);
  872. smalltalk.addMethod(
  873. "_inliningError_",
  874. smalltalk.method({
  875. selector: "inliningError:",
  876. fn: function (aString){
  877. var self=this;
  878. function $InliningError(){return smalltalk.InliningError||(typeof InliningError=="undefined"?nil:InliningError)}
  879. return smalltalk.withContext(function($ctx1) {
  880. _st($InliningError())._signal_(aString);
  881. return self}, function($ctx1) {$ctx1.fill(self,"inliningError:",{aString:aString},smalltalk.IRSendInliner)})},
  882. messageSends: ["signal:"]}),
  883. smalltalk.IRSendInliner);
  884. smalltalk.addMethod(
  885. "_send",
  886. smalltalk.method({
  887. selector: "send",
  888. fn: function (){
  889. var self=this;
  890. return smalltalk.withContext(function($ctx1) {
  891. var $1;
  892. $1=self["@send"];
  893. return $1;
  894. }, function($ctx1) {$ctx1.fill(self,"send",{},smalltalk.IRSendInliner)})},
  895. messageSends: []}),
  896. smalltalk.IRSendInliner);
  897. smalltalk.addMethod(
  898. "_send_",
  899. smalltalk.method({
  900. selector: "send:",
  901. fn: function (anIRSend){
  902. var self=this;
  903. return smalltalk.withContext(function($ctx1) {
  904. self["@send"]=anIRSend;
  905. return self}, function($ctx1) {$ctx1.fill(self,"send:",{anIRSend:anIRSend},smalltalk.IRSendInliner)})},
  906. messageSends: []}),
  907. smalltalk.IRSendInliner);
  908. smalltalk.addMethod(
  909. "_translator",
  910. smalltalk.method({
  911. selector: "translator",
  912. fn: function (){
  913. var self=this;
  914. return smalltalk.withContext(function($ctx1) {
  915. var $1;
  916. $1=self["@translator"];
  917. return $1;
  918. }, function($ctx1) {$ctx1.fill(self,"translator",{},smalltalk.IRSendInliner)})},
  919. messageSends: []}),
  920. smalltalk.IRSendInliner);
  921. smalltalk.addMethod(
  922. "_translator_",
  923. smalltalk.method({
  924. selector: "translator:",
  925. fn: function (anASTTranslator){
  926. var self=this;
  927. return smalltalk.withContext(function($ctx1) {
  928. self["@translator"]=anASTTranslator;
  929. return self}, function($ctx1) {$ctx1.fill(self,"translator:",{anASTTranslator:anASTTranslator},smalltalk.IRSendInliner)})},
  930. messageSends: []}),
  931. smalltalk.IRSendInliner);
  932. smalltalk.addMethod(
  933. "_inlinedSelectors",
  934. smalltalk.method({
  935. selector: "inlinedSelectors",
  936. fn: function (){
  937. var self=this;
  938. return smalltalk.withContext(function($ctx1) {
  939. var $1;
  940. $1=["ifTrue:", "ifFalse:", "ifTrue:ifFalse:", "ifFalse:ifTrue:", "ifNil:", "ifNotNil:", "ifNil:ifNotNil:", "ifNotNil:ifNil"];
  941. return $1;
  942. }, function($ctx1) {$ctx1.fill(self,"inlinedSelectors",{},smalltalk.IRSendInliner.klass)})},
  943. messageSends: []}),
  944. smalltalk.IRSendInliner.klass);
  945. smalltalk.addMethod(
  946. "_shouldInline_",
  947. smalltalk.method({
  948. selector: "shouldInline:",
  949. fn: function (anIRInstruction){
  950. var self=this;
  951. return smalltalk.withContext(function($ctx1) {
  952. var $1,$2;
  953. var $early={};
  954. try {
  955. $1=_st(_st(self)._inlinedSelectors())._includes_(_st(anIRInstruction)._selector());
  956. if(! smalltalk.assert($1)){
  957. return false;
  958. };
  959. _st(_st(_st(anIRInstruction)._instructions())._allButFirst())._do_((function(each){
  960. return smalltalk.withContext(function($ctx2) {
  961. $2=_st(each)._isClosure();
  962. if(! smalltalk.assert($2)){
  963. throw $early=[false];
  964. };
  965. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  966. return true;
  967. }
  968. catch(e) {if(e===$early)return e[0]; throw e}
  969. }, function($ctx1) {$ctx1.fill(self,"shouldInline:",{anIRInstruction:anIRInstruction},smalltalk.IRSendInliner.klass)})},
  970. messageSends: ["ifFalse:", "includes:", "selector", "inlinedSelectors", "do:", "isClosure", "allButFirst", "instructions"]}),
  971. smalltalk.IRSendInliner.klass);
  972. smalltalk.addClass('IRAssignmentInliner', smalltalk.IRSendInliner, ['assignment'], 'Compiler-Inlining');
  973. smalltalk.addMethod(
  974. "_assignment",
  975. smalltalk.method({
  976. selector: "assignment",
  977. fn: function (){
  978. var self=this;
  979. return smalltalk.withContext(function($ctx1) {
  980. var $1;
  981. $1=self["@assignment"];
  982. return $1;
  983. }, function($ctx1) {$ctx1.fill(self,"assignment",{},smalltalk.IRAssignmentInliner)})},
  984. messageSends: []}),
  985. smalltalk.IRAssignmentInliner);
  986. smalltalk.addMethod(
  987. "_assignment_",
  988. smalltalk.method({
  989. selector: "assignment:",
  990. fn: function (aNode){
  991. var self=this;
  992. return smalltalk.withContext(function($ctx1) {
  993. self["@assignment"]=aNode;
  994. return self}, function($ctx1) {$ctx1.fill(self,"assignment:",{aNode:aNode},smalltalk.IRAssignmentInliner)})},
  995. messageSends: []}),
  996. smalltalk.IRAssignmentInliner);
  997. smalltalk.addMethod(
  998. "_inlineAssignment_",
  999. smalltalk.method({
  1000. selector: "inlineAssignment:",
  1001. fn: function (anIRAssignment){
  1002. var self=this;
  1003. var inlinedAssignment;
  1004. function $IRInlinedAssignment(){return smalltalk.IRInlinedAssignment||(typeof IRInlinedAssignment=="undefined"?nil:IRInlinedAssignment)}
  1005. return smalltalk.withContext(function($ctx1) {
  1006. var $1;
  1007. _st(self)._assignment_(anIRAssignment);
  1008. inlinedAssignment=_st($IRInlinedAssignment())._new();
  1009. _st(_st(anIRAssignment)._instructions())._do_((function(each){
  1010. return smalltalk.withContext(function($ctx2) {
  1011. return _st(inlinedAssignment)._add_(each);
  1012. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  1013. _st(anIRAssignment)._replaceWith_(inlinedAssignment);
  1014. _st(self)._inlineSend_(_st(_st(inlinedAssignment)._instructions())._last());
  1015. $1=inlinedAssignment;
  1016. return $1;
  1017. }, function($ctx1) {$ctx1.fill(self,"inlineAssignment:",{anIRAssignment:anIRAssignment,inlinedAssignment:inlinedAssignment},smalltalk.IRAssignmentInliner)})},
  1018. messageSends: ["assignment:", "new", "do:", "add:", "instructions", "replaceWith:", "inlineSend:", "last"]}),
  1019. smalltalk.IRAssignmentInliner);
  1020. smalltalk.addMethod(
  1021. "_inlineClosure_",
  1022. smalltalk.method({
  1023. selector: "inlineClosure:",
  1024. fn: function (anIRClosure){
  1025. var self=this;
  1026. var inlinedClosure,statements;
  1027. function $IRAssignment(){return smalltalk.IRAssignment||(typeof IRAssignment=="undefined"?nil:IRAssignment)}
  1028. return smalltalk.withContext(function($ctx1) {
  1029. var $1,$2,$3,$4;
  1030. inlinedClosure=smalltalk.IRSendInliner.fn.prototype._inlineClosure_.apply(_st(self), [anIRClosure]);
  1031. statements=_st(_st(_st(inlinedClosure)._instructions())._last())._instructions();
  1032. _st(statements)._ifNotEmpty_((function(){
  1033. return smalltalk.withContext(function($ctx2) {
  1034. $1=_st(_st(statements)._last())._canBeAssigned();
  1035. if(smalltalk.assert($1)){
  1036. $2=_st($IRAssignment())._new();
  1037. _st($2)._add_(_st(_st(_st(self)._assignment())._instructions())._first());
  1038. _st($2)._add_(_st(_st(statements)._last())._copy());
  1039. $3=_st($2)._yourself();
  1040. return _st(_st(statements)._last())._replaceWith_($3);
  1041. };
  1042. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1043. $4=inlinedClosure;
  1044. return $4;
  1045. }, function($ctx1) {$ctx1.fill(self,"inlineClosure:",{anIRClosure:anIRClosure,inlinedClosure:inlinedClosure,statements:statements},smalltalk.IRAssignmentInliner)})},
  1046. messageSends: ["inlineClosure:", "instructions", "last", "ifNotEmpty:", "ifTrue:", "replaceWith:", "add:", "first", "assignment", "new", "copy", "yourself", "canBeAssigned"]}),
  1047. smalltalk.IRAssignmentInliner);
  1048. smalltalk.addClass('IRNonLocalReturnInliner', smalltalk.IRSendInliner, [], 'Compiler-Inlining');
  1049. smalltalk.addMethod(
  1050. "_inlineClosure_",
  1051. smalltalk.method({
  1052. selector: "inlineClosure:",
  1053. fn: function (anIRClosure){
  1054. var self=this;
  1055. return smalltalk.withContext(function($ctx1) {
  1056. var $1;
  1057. $1=smalltalk.IRSendInliner.fn.prototype._inlineCLosure_.apply(_st(self), [anIRClosure]);
  1058. return $1;
  1059. }, function($ctx1) {$ctx1.fill(self,"inlineClosure:",{anIRClosure:anIRClosure},smalltalk.IRNonLocalReturnInliner)})},
  1060. messageSends: ["inlineCLosure:"]}),
  1061. smalltalk.IRNonLocalReturnInliner);
  1062. smalltalk.addMethod(
  1063. "_inlinedReturn",
  1064. smalltalk.method({
  1065. selector: "inlinedReturn",
  1066. fn: function (){
  1067. var self=this;
  1068. function $IRInlinedNonLocalReturn(){return smalltalk.IRInlinedNonLocalReturn||(typeof IRInlinedNonLocalReturn=="undefined"?nil:IRInlinedNonLocalReturn)}
  1069. return smalltalk.withContext(function($ctx1) {
  1070. var $1;
  1071. $1=_st($IRInlinedNonLocalReturn())._new();
  1072. return $1;
  1073. }, function($ctx1) {$ctx1.fill(self,"inlinedReturn",{},smalltalk.IRNonLocalReturnInliner)})},
  1074. messageSends: ["new"]}),
  1075. smalltalk.IRNonLocalReturnInliner);
  1076. smalltalk.addClass('IRReturnInliner', smalltalk.IRSendInliner, [], 'Compiler-Inlining');
  1077. smalltalk.addMethod(
  1078. "_inlineClosure_",
  1079. smalltalk.method({
  1080. selector: "inlineClosure:",
  1081. fn: function (anIRClosure){
  1082. var self=this;
  1083. var closure,statements;
  1084. function $IRReturn(){return smalltalk.IRReturn||(typeof IRReturn=="undefined"?nil:IRReturn)}
  1085. return smalltalk.withContext(function($ctx1) {
  1086. var $1,$2,$3,$4;
  1087. closure=smalltalk.IRSendInliner.fn.prototype._inlineClosure_.apply(_st(self), [anIRClosure]);
  1088. statements=_st(_st(_st(closure)._instructions())._last())._instructions();
  1089. _st(statements)._ifNotEmpty_((function(){
  1090. return smalltalk.withContext(function($ctx2) {
  1091. $1=_st(_st(statements)._last())._isReturn();
  1092. if(! smalltalk.assert($1)){
  1093. $2=_st($IRReturn())._new();
  1094. _st($2)._add_(_st(_st(statements)._last())._copy());
  1095. $3=_st($2)._yourself();
  1096. return _st(_st(statements)._last())._replaceWith_($3);
  1097. };
  1098. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1099. $4=closure;
  1100. return $4;
  1101. }, function($ctx1) {$ctx1.fill(self,"inlineClosure:",{anIRClosure:anIRClosure,closure:closure,statements:statements},smalltalk.IRReturnInliner)})},
  1102. messageSends: ["inlineClosure:", "instructions", "last", "ifNotEmpty:", "ifFalse:", "replaceWith:", "add:", "copy", "new", "yourself", "isReturn"]}),
  1103. smalltalk.IRReturnInliner);
  1104. smalltalk.addMethod(
  1105. "_inlineReturn_",
  1106. smalltalk.method({
  1107. selector: "inlineReturn:",
  1108. fn: function (anIRReturn){
  1109. var self=this;
  1110. var return_;
  1111. return smalltalk.withContext(function($ctx1) {
  1112. var $1;
  1113. return_=_st(self)._inlinedReturn();
  1114. _st(_st(anIRReturn)._instructions())._do_((function(each){
  1115. return smalltalk.withContext(function($ctx2) {
  1116. return _st(return_)._add_(each);
  1117. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  1118. _st(anIRReturn)._replaceWith_(return_);
  1119. _st(self)._inlineSend_(_st(_st(return_)._instructions())._last());
  1120. $1=return_;
  1121. return $1;
  1122. }, function($ctx1) {$ctx1.fill(self,"inlineReturn:",{anIRReturn:anIRReturn,return_:return_},smalltalk.IRReturnInliner)})},
  1123. messageSends: ["inlinedReturn", "do:", "add:", "instructions", "replaceWith:", "inlineSend:", "last"]}),
  1124. smalltalk.IRReturnInliner);
  1125. smalltalk.addMethod(
  1126. "_inlinedReturn",
  1127. smalltalk.method({
  1128. selector: "inlinedReturn",
  1129. fn: function (){
  1130. var self=this;
  1131. function $IRInlinedReturn(){return smalltalk.IRInlinedReturn||(typeof IRInlinedReturn=="undefined"?nil:IRInlinedReturn)}
  1132. return smalltalk.withContext(function($ctx1) {
  1133. var $1;
  1134. $1=_st($IRInlinedReturn())._new();
  1135. return $1;
  1136. }, function($ctx1) {$ctx1.fill(self,"inlinedReturn",{},smalltalk.IRReturnInliner)})},
  1137. messageSends: ["new"]}),
  1138. smalltalk.IRReturnInliner);
  1139. smalltalk.addClass('InliningCodeGenerator', smalltalk.CodeGenerator, [], 'Compiler-Inlining');
  1140. smalltalk.addMethod(
  1141. "_compileNode_",
  1142. smalltalk.method({
  1143. selector: "compileNode:",
  1144. fn: function (aNode){
  1145. var self=this;
  1146. var ir,stream;
  1147. return smalltalk.withContext(function($ctx1) {
  1148. var $2,$3,$1;
  1149. _st(_st(self)._semanticAnalyzer())._visit_(aNode);
  1150. ir=_st(_st(self)._translator())._visit_(aNode);
  1151. _st(_st(self)._inliner())._visit_(ir);
  1152. $2=_st(self)._irTranslator();
  1153. _st($2)._visit_(ir);
  1154. $3=_st($2)._contents();
  1155. $1=$3;
  1156. return $1;
  1157. }, function($ctx1) {$ctx1.fill(self,"compileNode:",{aNode:aNode,ir:ir,stream:stream},smalltalk.InliningCodeGenerator)})},
  1158. messageSends: ["visit:", "semanticAnalyzer", "translator", "inliner", "irTranslator", "contents"]}),
  1159. smalltalk.InliningCodeGenerator);
  1160. smalltalk.addMethod(
  1161. "_inliner",
  1162. smalltalk.method({
  1163. selector: "inliner",
  1164. fn: function (){
  1165. var self=this;
  1166. function $IRInliner(){return smalltalk.IRInliner||(typeof IRInliner=="undefined"?nil:IRInliner)}
  1167. return smalltalk.withContext(function($ctx1) {
  1168. var $1;
  1169. $1=_st($IRInliner())._new();
  1170. return $1;
  1171. }, function($ctx1) {$ctx1.fill(self,"inliner",{},smalltalk.InliningCodeGenerator)})},
  1172. messageSends: ["new"]}),
  1173. smalltalk.InliningCodeGenerator);
  1174. smalltalk.addMethod(
  1175. "_irTranslator",
  1176. smalltalk.method({
  1177. selector: "irTranslator",
  1178. fn: function (){
  1179. var self=this;
  1180. function $IRInliningJSTranslator(){return smalltalk.IRInliningJSTranslator||(typeof IRInliningJSTranslator=="undefined"?nil:IRInliningJSTranslator)}
  1181. return smalltalk.withContext(function($ctx1) {
  1182. var $1;
  1183. $1=_st($IRInliningJSTranslator())._new();
  1184. return $1;
  1185. }, function($ctx1) {$ctx1.fill(self,"irTranslator",{},smalltalk.InliningCodeGenerator)})},
  1186. messageSends: ["new"]}),
  1187. smalltalk.InliningCodeGenerator);