Compiler-AST.js 60 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434
  1. define("amber_core/Compiler-AST", ["amber_vm/smalltalk", "amber_vm/nil", "amber_vm/_st", "amber_vm/globals", "amber_core/Kernel-Objects", "amber_core/Kernel-Methods"], function(smalltalk,nil,_st, globals){
  2. smalltalk.addPackage('Compiler-AST');
  3. smalltalk.packages["Compiler-AST"].transport = {"type":"amd","amdNamespace":"amber_core"};
  4. smalltalk.addClass('Node', globals.Object, ['parent', 'position', 'source', 'nodes', 'shouldBeInlined', 'shouldBeAliased'], 'Compiler-AST');
  5. globals.Node.comment="I am the abstract root class of the abstract syntax tree.\x0a\x0aConcrete classes should implement `#accept:` to allow visiting.\x0a\x0a`position` holds a point containing line and column number of the symbol location in the original source file.";
  6. smalltalk.addMethod(
  7. smalltalk.method({
  8. selector: "accept:",
  9. protocol: 'visiting',
  10. fn: function (aVisitor){
  11. var self=this;
  12. return smalltalk.withContext(function($ctx1) {
  13. var $1;
  14. $1=_st(aVisitor)._visitNode_(self);
  15. return $1;
  16. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},globals.Node)})},
  17. args: ["aVisitor"],
  18. source: "accept: aVisitor\x0a\x09^ aVisitor visitNode: self",
  19. messageSends: ["visitNode:"],
  20. referencedClasses: []
  21. }),
  22. globals.Node);
  23. smalltalk.addMethod(
  24. smalltalk.method({
  25. selector: "addNode:",
  26. protocol: 'accessing',
  27. fn: function (aNode){
  28. var self=this;
  29. return smalltalk.withContext(function($ctx1) {
  30. _st(self._nodes())._add_(aNode);
  31. _st(aNode)._parent_(self);
  32. return self}, function($ctx1) {$ctx1.fill(self,"addNode:",{aNode:aNode},globals.Node)})},
  33. args: ["aNode"],
  34. source: "addNode: aNode\x0a\x09self nodes add: aNode.\x0a\x09aNode parent: self",
  35. messageSends: ["add:", "nodes", "parent:"],
  36. referencedClasses: []
  37. }),
  38. globals.Node);
  39. smalltalk.addMethod(
  40. smalltalk.method({
  41. selector: "isAssignmentNode",
  42. protocol: 'testing',
  43. fn: function (){
  44. var self=this;
  45. return false;
  46. },
  47. args: [],
  48. source: "isAssignmentNode\x0a\x09^ false",
  49. messageSends: [],
  50. referencedClasses: []
  51. }),
  52. globals.Node);
  53. smalltalk.addMethod(
  54. smalltalk.method({
  55. selector: "isBlockNode",
  56. protocol: 'testing',
  57. fn: function (){
  58. var self=this;
  59. return false;
  60. },
  61. args: [],
  62. source: "isBlockNode\x0a\x09^ false",
  63. messageSends: [],
  64. referencedClasses: []
  65. }),
  66. globals.Node);
  67. smalltalk.addMethod(
  68. smalltalk.method({
  69. selector: "isBlockSequenceNode",
  70. protocol: 'testing',
  71. fn: function (){
  72. var self=this;
  73. return false;
  74. },
  75. args: [],
  76. source: "isBlockSequenceNode\x0a\x09^ false",
  77. messageSends: [],
  78. referencedClasses: []
  79. }),
  80. globals.Node);
  81. smalltalk.addMethod(
  82. smalltalk.method({
  83. selector: "isCascadeNode",
  84. protocol: 'testing',
  85. fn: function (){
  86. var self=this;
  87. return false;
  88. },
  89. args: [],
  90. source: "isCascadeNode\x0a\x09^ false",
  91. messageSends: [],
  92. referencedClasses: []
  93. }),
  94. globals.Node);
  95. smalltalk.addMethod(
  96. smalltalk.method({
  97. selector: "isImmutable",
  98. protocol: 'testing',
  99. fn: function (){
  100. var self=this;
  101. return false;
  102. },
  103. args: [],
  104. source: "isImmutable\x0a\x09^ false",
  105. messageSends: [],
  106. referencedClasses: []
  107. }),
  108. globals.Node);
  109. smalltalk.addMethod(
  110. smalltalk.method({
  111. selector: "isJSStatementNode",
  112. protocol: 'testing',
  113. fn: function (){
  114. var self=this;
  115. return false;
  116. },
  117. args: [],
  118. source: "isJSStatementNode\x0a\x09^ false",
  119. messageSends: [],
  120. referencedClasses: []
  121. }),
  122. globals.Node);
  123. smalltalk.addMethod(
  124. smalltalk.method({
  125. selector: "isLastChild",
  126. protocol: 'testing',
  127. fn: function (){
  128. var self=this;
  129. return smalltalk.withContext(function($ctx1) {
  130. var $1;
  131. $1=_st(_st(_st(self._parent())._nodes())._last()).__eq(self);
  132. return $1;
  133. }, function($ctx1) {$ctx1.fill(self,"isLastChild",{},globals.Node)})},
  134. args: [],
  135. source: "isLastChild\x0a\x09^ self parent nodes last = self",
  136. messageSends: ["=", "last", "nodes", "parent"],
  137. referencedClasses: []
  138. }),
  139. globals.Node);
  140. smalltalk.addMethod(
  141. smalltalk.method({
  142. selector: "isNode",
  143. protocol: 'testing',
  144. fn: function (){
  145. var self=this;
  146. return true;
  147. },
  148. args: [],
  149. source: "isNode\x0a\x09^ true",
  150. messageSends: [],
  151. referencedClasses: []
  152. }),
  153. globals.Node);
  154. smalltalk.addMethod(
  155. smalltalk.method({
  156. selector: "isReferenced",
  157. protocol: 'testing',
  158. fn: function (){
  159. var self=this;
  160. return smalltalk.withContext(function($ctx1) {
  161. var $4,$3,$2,$1;
  162. $4=self._parent();
  163. $ctx1.sendIdx["parent"]=1;
  164. $3=_st($4)._isSequenceNode();
  165. $2=_st($3)._or_((function(){
  166. return smalltalk.withContext(function($ctx2) {
  167. return _st(self._parent())._isAssignmentNode();
  168. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  169. $1=_st($2)._not();
  170. return $1;
  171. }, function($ctx1) {$ctx1.fill(self,"isReferenced",{},globals.Node)})},
  172. args: [],
  173. source: "isReferenced\x0a\x09\x22Answer true if the receiver is referenced by other nodes.\x0a\x09Do not take sequences or assignments into account\x22\x0a\x09\x0a\x09^ (self parent isSequenceNode or: [\x0a\x09\x09self parent isAssignmentNode ]) not",
  174. messageSends: ["not", "or:", "isSequenceNode", "parent", "isAssignmentNode"],
  175. referencedClasses: []
  176. }),
  177. globals.Node);
  178. smalltalk.addMethod(
  179. smalltalk.method({
  180. selector: "isReturnNode",
  181. protocol: 'testing',
  182. fn: function (){
  183. var self=this;
  184. return false;
  185. },
  186. args: [],
  187. source: "isReturnNode\x0a\x09^ false",
  188. messageSends: [],
  189. referencedClasses: []
  190. }),
  191. globals.Node);
  192. smalltalk.addMethod(
  193. smalltalk.method({
  194. selector: "isSendNode",
  195. protocol: 'testing',
  196. fn: function (){
  197. var self=this;
  198. return false;
  199. },
  200. args: [],
  201. source: "isSendNode\x0a\x09^ false",
  202. messageSends: [],
  203. referencedClasses: []
  204. }),
  205. globals.Node);
  206. smalltalk.addMethod(
  207. smalltalk.method({
  208. selector: "isSequenceNode",
  209. protocol: 'testing',
  210. fn: function (){
  211. var self=this;
  212. return false;
  213. },
  214. args: [],
  215. source: "isSequenceNode\x0a\x09^ false",
  216. messageSends: [],
  217. referencedClasses: []
  218. }),
  219. globals.Node);
  220. smalltalk.addMethod(
  221. smalltalk.method({
  222. selector: "isValueNode",
  223. protocol: 'testing',
  224. fn: function (){
  225. var self=this;
  226. return false;
  227. },
  228. args: [],
  229. source: "isValueNode\x0a\x09^ false",
  230. messageSends: [],
  231. referencedClasses: []
  232. }),
  233. globals.Node);
  234. smalltalk.addMethod(
  235. smalltalk.method({
  236. selector: "isVariableNode",
  237. protocol: 'testing',
  238. fn: function (){
  239. var self=this;
  240. return false;
  241. },
  242. args: [],
  243. source: "isVariableNode\x0a\x09^ false",
  244. messageSends: [],
  245. referencedClasses: []
  246. }),
  247. globals.Node);
  248. smalltalk.addMethod(
  249. smalltalk.method({
  250. selector: "method",
  251. protocol: 'accessing',
  252. fn: function (){
  253. var self=this;
  254. return smalltalk.withContext(function($ctx1) {
  255. var $2,$1;
  256. $2=self._parent();
  257. if(($receiver = $2) == nil || $receiver == null){
  258. $1=$2;
  259. } else {
  260. var node;
  261. node=$receiver;
  262. $1=_st(node)._method();
  263. };
  264. return $1;
  265. }, function($ctx1) {$ctx1.fill(self,"method",{},globals.Node)})},
  266. args: [],
  267. source: "method\x0a\x09^ self parent ifNotNil: [ :node | node method ]",
  268. messageSends: ["ifNotNil:", "parent", "method"],
  269. referencedClasses: []
  270. }),
  271. globals.Node);
  272. smalltalk.addMethod(
  273. smalltalk.method({
  274. selector: "nextChild",
  275. protocol: 'accessing',
  276. fn: function (){
  277. var self=this;
  278. return smalltalk.withContext(function($ctx1) {
  279. var $3,$2,$1;
  280. $3=self._nodes();
  281. $ctx1.sendIdx["nodes"]=1;
  282. $2=_st($3)._isEmpty();
  283. if(smalltalk.assert($2)){
  284. $1=self;
  285. } else {
  286. $1=_st(_st(self._nodes())._first())._nextChild();
  287. };
  288. return $1;
  289. }, function($ctx1) {$ctx1.fill(self,"nextChild",{},globals.Node)})},
  290. args: [],
  291. source: "nextChild\x0a\x09\x22Answer the next node after aNode.\x0a\x09Recurse into the possible children of the receiver to answer the next node to be evaluated\x22\x0a\x09\x0a\x09^ self nodes isEmpty\x0a\x09\x09ifTrue: [ self ]\x0a\x09\x09ifFalse: [ self nodes first nextChild ]",
  292. messageSends: ["ifTrue:ifFalse:", "isEmpty", "nodes", "nextChild", "first"],
  293. referencedClasses: []
  294. }),
  295. globals.Node);
  296. smalltalk.addMethod(
  297. smalltalk.method({
  298. selector: "nextNode",
  299. protocol: 'accessing',
  300. fn: function (){
  301. var self=this;
  302. return smalltalk.withContext(function($ctx1) {
  303. var $2,$1;
  304. $2=self._parent();
  305. if(($receiver = $2) == nil || $receiver == null){
  306. $1=$2;
  307. } else {
  308. var node;
  309. node=$receiver;
  310. $1=_st(node)._nextNode_(self);
  311. };
  312. return $1;
  313. }, function($ctx1) {$ctx1.fill(self,"nextNode",{},globals.Node)})},
  314. args: [],
  315. source: "nextNode\x0a\x09^ self parent ifNotNil: [ :node |\x0a\x09\x09node nextNode: self ]",
  316. messageSends: ["ifNotNil:", "parent", "nextNode:"],
  317. referencedClasses: []
  318. }),
  319. globals.Node);
  320. smalltalk.addMethod(
  321. smalltalk.method({
  322. selector: "nextNode:",
  323. protocol: 'accessing',
  324. fn: function (aNode){
  325. var self=this;
  326. var next;
  327. return smalltalk.withContext(function($ctx1) {
  328. var $1,$2;
  329. var $early={};
  330. try {
  331. $1=self._nodes();
  332. $ctx1.sendIdx["nodes"]=1;
  333. next=_st($1)._at_ifAbsent_(_st(_st(self._nodes())._indexOf_(aNode)).__plus((1)),(function(){
  334. return smalltalk.withContext(function($ctx2) {
  335. throw $early=[self];
  336. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  337. $2=_st(next)._nextChild();
  338. return $2;
  339. }
  340. catch(e) {if(e===$early)return e[0]; throw e}
  341. }, function($ctx1) {$ctx1.fill(self,"nextNode:",{aNode:aNode,next:next},globals.Node)})},
  342. args: ["aNode"],
  343. source: "nextNode: aNode\x0a\x09\x22Answer the next node after aNode.\x0a\x09Recurse into the possible children of the next node to answer the next node to be evaluated\x22\x0a\x09\x0a\x09| next |\x0a\x09\x0a\x09next := self nodes \x0a\x09\x09at: (self nodes indexOf: aNode) + 1\x0a\x09\x09ifAbsent: [ ^ self ].\x0a\x09\x0a\x09^ next nextChild",
  344. messageSends: ["at:ifAbsent:", "nodes", "+", "indexOf:", "nextChild"],
  345. referencedClasses: []
  346. }),
  347. globals.Node);
  348. smalltalk.addMethod(
  349. smalltalk.method({
  350. selector: "nodes",
  351. protocol: 'accessing',
  352. fn: function (){
  353. var self=this;
  354. function $Array(){return globals.Array||(typeof Array=="undefined"?nil:Array)}
  355. return smalltalk.withContext(function($ctx1) {
  356. var $2,$1;
  357. $2=self["@nodes"];
  358. if(($receiver = $2) == nil || $receiver == null){
  359. self["@nodes"]=_st($Array())._new();
  360. $1=self["@nodes"];
  361. } else {
  362. $1=$2;
  363. };
  364. return $1;
  365. }, function($ctx1) {$ctx1.fill(self,"nodes",{},globals.Node)})},
  366. args: [],
  367. source: "nodes\x0a\x09^ nodes ifNil: [ nodes := Array new ]",
  368. messageSends: ["ifNil:", "new"],
  369. referencedClasses: ["Array"]
  370. }),
  371. globals.Node);
  372. smalltalk.addMethod(
  373. smalltalk.method({
  374. selector: "nodes:",
  375. protocol: 'building',
  376. fn: function (aCollection){
  377. var self=this;
  378. return smalltalk.withContext(function($ctx1) {
  379. self["@nodes"]=aCollection;
  380. _st(aCollection)._do_((function(each){
  381. return smalltalk.withContext(function($ctx2) {
  382. return _st(each)._parent_(self);
  383. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  384. return self}, function($ctx1) {$ctx1.fill(self,"nodes:",{aCollection:aCollection},globals.Node)})},
  385. args: ["aCollection"],
  386. source: "nodes: aCollection\x0a\x09nodes := aCollection.\x0a\x09aCollection do: [ :each | each parent: self ]",
  387. messageSends: ["do:", "parent:"],
  388. referencedClasses: []
  389. }),
  390. globals.Node);
  391. smalltalk.addMethod(
  392. smalltalk.method({
  393. selector: "parent",
  394. protocol: 'accessing',
  395. fn: function (){
  396. var self=this;
  397. var $1;
  398. $1=self["@parent"];
  399. return $1;
  400. },
  401. args: [],
  402. source: "parent\x0a\x09^ parent",
  403. messageSends: [],
  404. referencedClasses: []
  405. }),
  406. globals.Node);
  407. smalltalk.addMethod(
  408. smalltalk.method({
  409. selector: "parent:",
  410. protocol: 'accessing',
  411. fn: function (aNode){
  412. var self=this;
  413. self["@parent"]=aNode;
  414. return self},
  415. args: ["aNode"],
  416. source: "parent: aNode\x0a\x09parent := aNode",
  417. messageSends: [],
  418. referencedClasses: []
  419. }),
  420. globals.Node);
  421. smalltalk.addMethod(
  422. smalltalk.method({
  423. selector: "position",
  424. protocol: 'accessing',
  425. fn: function (){
  426. var self=this;
  427. return smalltalk.withContext(function($ctx1) {
  428. var $2,$3,$1;
  429. $2=self["@position"];
  430. if(($receiver = $2) == nil || $receiver == null){
  431. $3=self._parent();
  432. if(($receiver = $3) == nil || $receiver == null){
  433. $1=$3;
  434. } else {
  435. var node;
  436. node=$receiver;
  437. $1=_st(node)._position();
  438. };
  439. } else {
  440. $1=$2;
  441. };
  442. return $1;
  443. }, function($ctx1) {$ctx1.fill(self,"position",{},globals.Node)})},
  444. args: [],
  445. source: "position\x0a\x09\x22answer the line and column of the receiver in the source code\x22\x0a\x09\x0a\x09^ position ifNil: [ \x0a\x09\x09self parent ifNotNil: [ :node | node position ] ]",
  446. messageSends: ["ifNil:", "ifNotNil:", "parent", "position"],
  447. referencedClasses: []
  448. }),
  449. globals.Node);
  450. smalltalk.addMethod(
  451. smalltalk.method({
  452. selector: "position:",
  453. protocol: 'building',
  454. fn: function (aPosition){
  455. var self=this;
  456. self["@position"]=aPosition;
  457. return self},
  458. args: ["aPosition"],
  459. source: "position: aPosition\x0a\x09position := aPosition",
  460. messageSends: [],
  461. referencedClasses: []
  462. }),
  463. globals.Node);
  464. smalltalk.addMethod(
  465. smalltalk.method({
  466. selector: "postCopy",
  467. protocol: 'copying',
  468. fn: function (){
  469. var self=this;
  470. return smalltalk.withContext(function($ctx1) {
  471. globals.Node.superclass.fn.prototype._postCopy.apply(_st(self), []);
  472. _st(self._nodes())._do_((function(each){
  473. return smalltalk.withContext(function($ctx2) {
  474. return _st(each)._parent_(self);
  475. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  476. return self}, function($ctx1) {$ctx1.fill(self,"postCopy",{},globals.Node)})},
  477. args: [],
  478. source: "postCopy\x0a\x09super postCopy.\x0a\x09self nodes do: [ :each | each parent: self ]",
  479. messageSends: ["postCopy", "do:", "nodes", "parent:"],
  480. referencedClasses: []
  481. }),
  482. globals.Node);
  483. smalltalk.addMethod(
  484. smalltalk.method({
  485. selector: "requiresSmalltalkContext",
  486. protocol: 'testing',
  487. fn: function (){
  488. var self=this;
  489. return smalltalk.withContext(function($ctx1) {
  490. var $1;
  491. $1=_st(_st(self._nodes())._detect_ifNone_((function(each){
  492. return smalltalk.withContext(function($ctx2) {
  493. return _st(each)._requiresSmalltalkContext();
  494. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}),(function(){
  495. return smalltalk.withContext(function($ctx2) {
  496. return nil;
  497. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})})))._notNil();
  498. return $1;
  499. }, function($ctx1) {$ctx1.fill(self,"requiresSmalltalkContext",{},globals.Node)})},
  500. args: [],
  501. source: "requiresSmalltalkContext\x0a\x09\x22Answer true if the receiver requires a smalltalk context.\x0a\x09Only send nodes require a context.\x0a\x09\x0a\x09If no node requires a context, the method will be compiled without one.\x0a\x09See `IRJSTranslator` and `JSStream` for context creation\x22\x0a\x09\x0a\x09^ (self nodes \x0a\x09\x09detect: [ :each | each requiresSmalltalkContext ]\x0a\x09\x09ifNone: [ nil ]) notNil",
  502. messageSends: ["notNil", "detect:ifNone:", "nodes", "requiresSmalltalkContext"],
  503. referencedClasses: []
  504. }),
  505. globals.Node);
  506. smalltalk.addMethod(
  507. smalltalk.method({
  508. selector: "shouldBeAliased",
  509. protocol: 'accessing',
  510. fn: function (){
  511. var self=this;
  512. return smalltalk.withContext(function($ctx1) {
  513. var $2,$1;
  514. $2=self["@shouldBeAliased"];
  515. if(($receiver = $2) == nil || $receiver == null){
  516. $1=false;
  517. } else {
  518. $1=$2;
  519. };
  520. return $1;
  521. }, function($ctx1) {$ctx1.fill(self,"shouldBeAliased",{},globals.Node)})},
  522. args: [],
  523. source: "shouldBeAliased\x0a\x09^ shouldBeAliased ifNil: [ false ]",
  524. messageSends: ["ifNil:"],
  525. referencedClasses: []
  526. }),
  527. globals.Node);
  528. smalltalk.addMethod(
  529. smalltalk.method({
  530. selector: "shouldBeAliased:",
  531. protocol: 'accessing',
  532. fn: function (aBoolean){
  533. var self=this;
  534. self["@shouldBeAliased"]=aBoolean;
  535. return self},
  536. args: ["aBoolean"],
  537. source: "shouldBeAliased: aBoolean\x0a\x09shouldBeAliased := aBoolean",
  538. messageSends: [],
  539. referencedClasses: []
  540. }),
  541. globals.Node);
  542. smalltalk.addMethod(
  543. smalltalk.method({
  544. selector: "shouldBeInlined",
  545. protocol: 'accessing',
  546. fn: function (){
  547. var self=this;
  548. return smalltalk.withContext(function($ctx1) {
  549. var $2,$1;
  550. $2=self["@shouldBeInlined"];
  551. if(($receiver = $2) == nil || $receiver == null){
  552. $1=false;
  553. } else {
  554. $1=$2;
  555. };
  556. return $1;
  557. }, function($ctx1) {$ctx1.fill(self,"shouldBeInlined",{},globals.Node)})},
  558. args: [],
  559. source: "shouldBeInlined\x0a\x09^ shouldBeInlined ifNil: [ false ]",
  560. messageSends: ["ifNil:"],
  561. referencedClasses: []
  562. }),
  563. globals.Node);
  564. smalltalk.addMethod(
  565. smalltalk.method({
  566. selector: "shouldBeInlined:",
  567. protocol: 'accessing',
  568. fn: function (aBoolean){
  569. var self=this;
  570. self["@shouldBeInlined"]=aBoolean;
  571. return self},
  572. args: ["aBoolean"],
  573. source: "shouldBeInlined: aBoolean\x0a\x09shouldBeInlined := aBoolean",
  574. messageSends: [],
  575. referencedClasses: []
  576. }),
  577. globals.Node);
  578. smalltalk.addMethod(
  579. smalltalk.method({
  580. selector: "size",
  581. protocol: 'accessing',
  582. fn: function (){
  583. var self=this;
  584. return smalltalk.withContext(function($ctx1) {
  585. var $1;
  586. $1=_st(self._source())._size();
  587. return $1;
  588. }, function($ctx1) {$ctx1.fill(self,"size",{},globals.Node)})},
  589. args: [],
  590. source: "size\x0a\x09^ self source size",
  591. messageSends: ["size", "source"],
  592. referencedClasses: []
  593. }),
  594. globals.Node);
  595. smalltalk.addMethod(
  596. smalltalk.method({
  597. selector: "source",
  598. protocol: 'accessing',
  599. fn: function (){
  600. var self=this;
  601. return smalltalk.withContext(function($ctx1) {
  602. var $2,$1;
  603. $2=self["@source"];
  604. if(($receiver = $2) == nil || $receiver == null){
  605. $1="";
  606. } else {
  607. $1=$2;
  608. };
  609. return $1;
  610. }, function($ctx1) {$ctx1.fill(self,"source",{},globals.Node)})},
  611. args: [],
  612. source: "source\x0a\x09^ source ifNil: [ '' ]",
  613. messageSends: ["ifNil:"],
  614. referencedClasses: []
  615. }),
  616. globals.Node);
  617. smalltalk.addMethod(
  618. smalltalk.method({
  619. selector: "source:",
  620. protocol: 'accessing',
  621. fn: function (aString){
  622. var self=this;
  623. self["@source"]=aString;
  624. return self},
  625. args: ["aString"],
  626. source: "source: aString\x0a\x09source := aString",
  627. messageSends: [],
  628. referencedClasses: []
  629. }),
  630. globals.Node);
  631. smalltalk.addMethod(
  632. smalltalk.method({
  633. selector: "stopOnStepping",
  634. protocol: 'testing',
  635. fn: function (){
  636. var self=this;
  637. return false;
  638. },
  639. args: [],
  640. source: "stopOnStepping\x0a\x09^ false",
  641. messageSends: [],
  642. referencedClasses: []
  643. }),
  644. globals.Node);
  645. smalltalk.addMethod(
  646. smalltalk.method({
  647. selector: "subtreeNeedsAliasing",
  648. protocol: 'testing',
  649. fn: function (){
  650. var self=this;
  651. return smalltalk.withContext(function($ctx1) {
  652. var $1;
  653. $1=_st(_st(self._shouldBeAliased())._or_((function(){
  654. return smalltalk.withContext(function($ctx2) {
  655. return self._shouldBeInlined();
  656. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})})))._or_((function(){
  657. return smalltalk.withContext(function($ctx2) {
  658. return _st(self._nodes())._anySatisfy_((function(each){
  659. return smalltalk.withContext(function($ctx3) {
  660. return _st(each)._subtreeNeedsAliasing();
  661. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,3)})}));
  662. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  663. $ctx1.sendIdx["or:"]=1;
  664. return $1;
  665. }, function($ctx1) {$ctx1.fill(self,"subtreeNeedsAliasing",{},globals.Node)})},
  666. args: [],
  667. source: "subtreeNeedsAliasing\x0a\x09^ (self shouldBeAliased or: [ self shouldBeInlined ]) or: [\x0a\x09\x09self nodes anySatisfy: [ :each | each subtreeNeedsAliasing ] ]",
  668. messageSends: ["or:", "shouldBeAliased", "shouldBeInlined", "anySatisfy:", "nodes", "subtreeNeedsAliasing"],
  669. referencedClasses: []
  670. }),
  671. globals.Node);
  672. smalltalk.addClass('AssignmentNode', globals.Node, ['left', 'right'], 'Compiler-AST');
  673. globals.AssignmentNode.comment="I represent an assignment node.";
  674. smalltalk.addMethod(
  675. smalltalk.method({
  676. selector: "accept:",
  677. protocol: 'visiting',
  678. fn: function (aVisitor){
  679. var self=this;
  680. return smalltalk.withContext(function($ctx1) {
  681. var $1;
  682. $1=_st(aVisitor)._visitAssignmentNode_(self);
  683. return $1;
  684. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},globals.AssignmentNode)})},
  685. args: ["aVisitor"],
  686. source: "accept: aVisitor\x0a\x09^ aVisitor visitAssignmentNode: self",
  687. messageSends: ["visitAssignmentNode:"],
  688. referencedClasses: []
  689. }),
  690. globals.AssignmentNode);
  691. smalltalk.addMethod(
  692. smalltalk.method({
  693. selector: "isAssignmentNode",
  694. protocol: 'testing',
  695. fn: function (){
  696. var self=this;
  697. return true;
  698. },
  699. args: [],
  700. source: "isAssignmentNode\x0a\x09^ true",
  701. messageSends: [],
  702. referencedClasses: []
  703. }),
  704. globals.AssignmentNode);
  705. smalltalk.addMethod(
  706. smalltalk.method({
  707. selector: "left",
  708. protocol: 'accessing',
  709. fn: function (){
  710. var self=this;
  711. var $1;
  712. $1=self["@left"];
  713. return $1;
  714. },
  715. args: [],
  716. source: "left\x0a\x09^ left",
  717. messageSends: [],
  718. referencedClasses: []
  719. }),
  720. globals.AssignmentNode);
  721. smalltalk.addMethod(
  722. smalltalk.method({
  723. selector: "left:",
  724. protocol: 'accessing',
  725. fn: function (aNode){
  726. var self=this;
  727. return smalltalk.withContext(function($ctx1) {
  728. self["@left"]=aNode;
  729. _st(aNode)._parent_(self);
  730. return self}, function($ctx1) {$ctx1.fill(self,"left:",{aNode:aNode},globals.AssignmentNode)})},
  731. args: ["aNode"],
  732. source: "left: aNode\x0a\x09left := aNode.\x0a\x09aNode parent: self",
  733. messageSends: ["parent:"],
  734. referencedClasses: []
  735. }),
  736. globals.AssignmentNode);
  737. smalltalk.addMethod(
  738. smalltalk.method({
  739. selector: "nodes",
  740. protocol: 'accessing',
  741. fn: function (){
  742. var self=this;
  743. function $Array(){return globals.Array||(typeof Array=="undefined"?nil:Array)}
  744. return smalltalk.withContext(function($ctx1) {
  745. var $1;
  746. $1=_st($Array())._with_with_(self._left(),self._right());
  747. return $1;
  748. }, function($ctx1) {$ctx1.fill(self,"nodes",{},globals.AssignmentNode)})},
  749. args: [],
  750. source: "nodes\x0a\x09^ Array with: self left with: self right",
  751. messageSends: ["with:with:", "left", "right"],
  752. referencedClasses: ["Array"]
  753. }),
  754. globals.AssignmentNode);
  755. smalltalk.addMethod(
  756. smalltalk.method({
  757. selector: "right",
  758. protocol: 'accessing',
  759. fn: function (){
  760. var self=this;
  761. var $1;
  762. $1=self["@right"];
  763. return $1;
  764. },
  765. args: [],
  766. source: "right\x0a\x09^ right",
  767. messageSends: [],
  768. referencedClasses: []
  769. }),
  770. globals.AssignmentNode);
  771. smalltalk.addMethod(
  772. smalltalk.method({
  773. selector: "right:",
  774. protocol: 'accessing',
  775. fn: function (aNode){
  776. var self=this;
  777. return smalltalk.withContext(function($ctx1) {
  778. self["@right"]=aNode;
  779. _st(aNode)._parent_(self);
  780. return self}, function($ctx1) {$ctx1.fill(self,"right:",{aNode:aNode},globals.AssignmentNode)})},
  781. args: ["aNode"],
  782. source: "right: aNode\x0a\x09right := aNode.\x0a\x09aNode parent: self",
  783. messageSends: ["parent:"],
  784. referencedClasses: []
  785. }),
  786. globals.AssignmentNode);
  787. smalltalk.addMethod(
  788. smalltalk.method({
  789. selector: "shouldBeAliased",
  790. protocol: 'testing',
  791. fn: function (){
  792. var self=this;
  793. return smalltalk.withContext(function($ctx1) {
  794. var $1;
  795. $1=_st(globals.AssignmentNode.superclass.fn.prototype._shouldBeAliased.apply(_st(self), []))._or_((function(){
  796. return smalltalk.withContext(function($ctx2) {
  797. return self._isReferenced();
  798. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  799. return $1;
  800. }, function($ctx1) {$ctx1.fill(self,"shouldBeAliased",{},globals.AssignmentNode)})},
  801. args: [],
  802. source: "shouldBeAliased\x0a\x09^ super shouldBeAliased or: [ self isReferenced ]",
  803. messageSends: ["or:", "shouldBeAliased", "isReferenced"],
  804. referencedClasses: []
  805. }),
  806. globals.AssignmentNode);
  807. smalltalk.addClass('BlockNode', globals.Node, ['parameters', 'scope'], 'Compiler-AST');
  808. globals.BlockNode.comment="I represent an block closure node.";
  809. smalltalk.addMethod(
  810. smalltalk.method({
  811. selector: "accept:",
  812. protocol: 'visiting',
  813. fn: function (aVisitor){
  814. var self=this;
  815. return smalltalk.withContext(function($ctx1) {
  816. var $1;
  817. $1=_st(aVisitor)._visitBlockNode_(self);
  818. return $1;
  819. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},globals.BlockNode)})},
  820. args: ["aVisitor"],
  821. source: "accept: aVisitor\x0a\x09^ aVisitor visitBlockNode: self",
  822. messageSends: ["visitBlockNode:"],
  823. referencedClasses: []
  824. }),
  825. globals.BlockNode);
  826. smalltalk.addMethod(
  827. smalltalk.method({
  828. selector: "isBlockNode",
  829. protocol: 'testing',
  830. fn: function (){
  831. var self=this;
  832. return true;
  833. },
  834. args: [],
  835. source: "isBlockNode\x0a\x09^ true",
  836. messageSends: [],
  837. referencedClasses: []
  838. }),
  839. globals.BlockNode);
  840. smalltalk.addMethod(
  841. smalltalk.method({
  842. selector: "nextChild",
  843. protocol: 'accessing',
  844. fn: function (){
  845. var self=this;
  846. return self;
  847. },
  848. args: [],
  849. source: "nextChild\x0a\x09\x22Answer the receiver as we want to avoid eager evaluation\x22\x0a\x09\x0a\x09^ self",
  850. messageSends: [],
  851. referencedClasses: []
  852. }),
  853. globals.BlockNode);
  854. smalltalk.addMethod(
  855. smalltalk.method({
  856. selector: "nextNode:",
  857. protocol: 'accessing',
  858. fn: function (aNode){
  859. var self=this;
  860. return self;
  861. },
  862. args: ["aNode"],
  863. source: "nextNode: aNode\x0a\x09\x22Answer the receiver as we want to avoid eager evaluation\x22\x0a\x09\x0a\x09^ self",
  864. messageSends: [],
  865. referencedClasses: []
  866. }),
  867. globals.BlockNode);
  868. smalltalk.addMethod(
  869. smalltalk.method({
  870. selector: "parameters",
  871. protocol: 'accessing',
  872. fn: function (){
  873. var self=this;
  874. function $Array(){return globals.Array||(typeof Array=="undefined"?nil:Array)}
  875. return smalltalk.withContext(function($ctx1) {
  876. var $2,$1;
  877. $2=self["@parameters"];
  878. if(($receiver = $2) == nil || $receiver == null){
  879. self["@parameters"]=_st($Array())._new();
  880. $1=self["@parameters"];
  881. } else {
  882. $1=$2;
  883. };
  884. return $1;
  885. }, function($ctx1) {$ctx1.fill(self,"parameters",{},globals.BlockNode)})},
  886. args: [],
  887. source: "parameters\x0a\x09^ parameters ifNil: [ parameters := Array new ]",
  888. messageSends: ["ifNil:", "new"],
  889. referencedClasses: ["Array"]
  890. }),
  891. globals.BlockNode);
  892. smalltalk.addMethod(
  893. smalltalk.method({
  894. selector: "parameters:",
  895. protocol: 'accessing',
  896. fn: function (aCollection){
  897. var self=this;
  898. self["@parameters"]=aCollection;
  899. return self},
  900. args: ["aCollection"],
  901. source: "parameters: aCollection\x0a\x09parameters := aCollection",
  902. messageSends: [],
  903. referencedClasses: []
  904. }),
  905. globals.BlockNode);
  906. smalltalk.addMethod(
  907. smalltalk.method({
  908. selector: "scope",
  909. protocol: 'accessing',
  910. fn: function (){
  911. var self=this;
  912. var $1;
  913. $1=self["@scope"];
  914. return $1;
  915. },
  916. args: [],
  917. source: "scope\x0a\x09^ scope",
  918. messageSends: [],
  919. referencedClasses: []
  920. }),
  921. globals.BlockNode);
  922. smalltalk.addMethod(
  923. smalltalk.method({
  924. selector: "scope:",
  925. protocol: 'accessing',
  926. fn: function (aLexicalScope){
  927. var self=this;
  928. self["@scope"]=aLexicalScope;
  929. return self},
  930. args: ["aLexicalScope"],
  931. source: "scope: aLexicalScope\x0a\x09scope := aLexicalScope",
  932. messageSends: [],
  933. referencedClasses: []
  934. }),
  935. globals.BlockNode);
  936. smalltalk.addMethod(
  937. smalltalk.method({
  938. selector: "subtreeNeedsAliasing",
  939. protocol: 'testing',
  940. fn: function (){
  941. var self=this;
  942. return smalltalk.withContext(function($ctx1) {
  943. var $1;
  944. $1=_st(self._shouldBeAliased())._or_((function(){
  945. return smalltalk.withContext(function($ctx2) {
  946. return self._shouldBeInlined();
  947. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  948. return $1;
  949. }, function($ctx1) {$ctx1.fill(self,"subtreeNeedsAliasing",{},globals.BlockNode)})},
  950. args: [],
  951. source: "subtreeNeedsAliasing\x0a\x09^ self shouldBeAliased or: [ self shouldBeInlined ]",
  952. messageSends: ["or:", "shouldBeAliased", "shouldBeInlined"],
  953. referencedClasses: []
  954. }),
  955. globals.BlockNode);
  956. smalltalk.addClass('CascadeNode', globals.Node, ['receiver'], 'Compiler-AST');
  957. globals.CascadeNode.comment="I represent an cascade node.";
  958. smalltalk.addMethod(
  959. smalltalk.method({
  960. selector: "accept:",
  961. protocol: 'visiting',
  962. fn: function (aVisitor){
  963. var self=this;
  964. return smalltalk.withContext(function($ctx1) {
  965. var $1;
  966. $1=_st(aVisitor)._visitCascadeNode_(self);
  967. return $1;
  968. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},globals.CascadeNode)})},
  969. args: ["aVisitor"],
  970. source: "accept: aVisitor\x0a\x09^ aVisitor visitCascadeNode: self",
  971. messageSends: ["visitCascadeNode:"],
  972. referencedClasses: []
  973. }),
  974. globals.CascadeNode);
  975. smalltalk.addMethod(
  976. smalltalk.method({
  977. selector: "isCascadeNode",
  978. protocol: 'testing',
  979. fn: function (){
  980. var self=this;
  981. return true;
  982. },
  983. args: [],
  984. source: "isCascadeNode\x0a\x09^ true",
  985. messageSends: [],
  986. referencedClasses: []
  987. }),
  988. globals.CascadeNode);
  989. smalltalk.addMethod(
  990. smalltalk.method({
  991. selector: "receiver",
  992. protocol: 'accessing',
  993. fn: function (){
  994. var self=this;
  995. var $1;
  996. $1=self["@receiver"];
  997. return $1;
  998. },
  999. args: [],
  1000. source: "receiver\x0a\x09^ receiver",
  1001. messageSends: [],
  1002. referencedClasses: []
  1003. }),
  1004. globals.CascadeNode);
  1005. smalltalk.addMethod(
  1006. smalltalk.method({
  1007. selector: "receiver:",
  1008. protocol: 'accessing',
  1009. fn: function (aNode){
  1010. var self=this;
  1011. self["@receiver"]=aNode;
  1012. return self},
  1013. args: ["aNode"],
  1014. source: "receiver: aNode\x0a\x09receiver := aNode",
  1015. messageSends: [],
  1016. referencedClasses: []
  1017. }),
  1018. globals.CascadeNode);
  1019. smalltalk.addClass('DynamicArrayNode', globals.Node, [], 'Compiler-AST');
  1020. globals.DynamicArrayNode.comment="I represent an dynamic array node.";
  1021. smalltalk.addMethod(
  1022. smalltalk.method({
  1023. selector: "accept:",
  1024. protocol: 'visiting',
  1025. fn: function (aVisitor){
  1026. var self=this;
  1027. return smalltalk.withContext(function($ctx1) {
  1028. var $1;
  1029. $1=_st(aVisitor)._visitDynamicArrayNode_(self);
  1030. return $1;
  1031. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},globals.DynamicArrayNode)})},
  1032. args: ["aVisitor"],
  1033. source: "accept: aVisitor\x0a\x09^ aVisitor visitDynamicArrayNode: self",
  1034. messageSends: ["visitDynamicArrayNode:"],
  1035. referencedClasses: []
  1036. }),
  1037. globals.DynamicArrayNode);
  1038. smalltalk.addClass('DynamicDictionaryNode', globals.Node, [], 'Compiler-AST');
  1039. globals.DynamicDictionaryNode.comment="I represent an dynamic dictionary node.";
  1040. smalltalk.addMethod(
  1041. smalltalk.method({
  1042. selector: "accept:",
  1043. protocol: 'visiting',
  1044. fn: function (aVisitor){
  1045. var self=this;
  1046. return smalltalk.withContext(function($ctx1) {
  1047. var $1;
  1048. $1=_st(aVisitor)._visitDynamicDictionaryNode_(self);
  1049. return $1;
  1050. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},globals.DynamicDictionaryNode)})},
  1051. args: ["aVisitor"],
  1052. source: "accept: aVisitor\x0a\x09^ aVisitor visitDynamicDictionaryNode: self",
  1053. messageSends: ["visitDynamicDictionaryNode:"],
  1054. referencedClasses: []
  1055. }),
  1056. globals.DynamicDictionaryNode);
  1057. smalltalk.addClass('JSStatementNode', globals.Node, [], 'Compiler-AST');
  1058. globals.JSStatementNode.comment="I represent an JavaScript statement node.";
  1059. smalltalk.addMethod(
  1060. smalltalk.method({
  1061. selector: "accept:",
  1062. protocol: 'visiting',
  1063. fn: function (aVisitor){
  1064. var self=this;
  1065. return smalltalk.withContext(function($ctx1) {
  1066. var $1;
  1067. $1=_st(aVisitor)._visitJSStatementNode_(self);
  1068. return $1;
  1069. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},globals.JSStatementNode)})},
  1070. args: ["aVisitor"],
  1071. source: "accept: aVisitor\x0a\x09^ aVisitor visitJSStatementNode: self",
  1072. messageSends: ["visitJSStatementNode:"],
  1073. referencedClasses: []
  1074. }),
  1075. globals.JSStatementNode);
  1076. smalltalk.addMethod(
  1077. smalltalk.method({
  1078. selector: "isJSStatementNode",
  1079. protocol: 'testing',
  1080. fn: function (){
  1081. var self=this;
  1082. return true;
  1083. },
  1084. args: [],
  1085. source: "isJSStatementNode\x0a\x09^ true",
  1086. messageSends: [],
  1087. referencedClasses: []
  1088. }),
  1089. globals.JSStatementNode);
  1090. smalltalk.addClass('MethodNode', globals.Node, ['selector', 'arguments', 'source', 'scope', 'classReferences', 'sendIndexes', 'superSends'], 'Compiler-AST');
  1091. globals.MethodNode.comment="I represent an method node.\x0a\x0aA method node must be the root and only method node of a valid AST.";
  1092. smalltalk.addMethod(
  1093. smalltalk.method({
  1094. selector: "accept:",
  1095. protocol: 'visiting',
  1096. fn: function (aVisitor){
  1097. var self=this;
  1098. return smalltalk.withContext(function($ctx1) {
  1099. var $1;
  1100. $1=_st(aVisitor)._visitMethodNode_(self);
  1101. return $1;
  1102. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},globals.MethodNode)})},
  1103. args: ["aVisitor"],
  1104. source: "accept: aVisitor\x0a\x09^ aVisitor visitMethodNode: self",
  1105. messageSends: ["visitMethodNode:"],
  1106. referencedClasses: []
  1107. }),
  1108. globals.MethodNode);
  1109. smalltalk.addMethod(
  1110. smalltalk.method({
  1111. selector: "arguments",
  1112. protocol: 'accessing',
  1113. fn: function (){
  1114. var self=this;
  1115. return smalltalk.withContext(function($ctx1) {
  1116. var $2,$1;
  1117. $2=self["@arguments"];
  1118. if(($receiver = $2) == nil || $receiver == null){
  1119. $1=[];
  1120. } else {
  1121. $1=$2;
  1122. };
  1123. return $1;
  1124. }, function($ctx1) {$ctx1.fill(self,"arguments",{},globals.MethodNode)})},
  1125. args: [],
  1126. source: "arguments\x0a\x09^ arguments ifNil: [ #() ]",
  1127. messageSends: ["ifNil:"],
  1128. referencedClasses: []
  1129. }),
  1130. globals.MethodNode);
  1131. smalltalk.addMethod(
  1132. smalltalk.method({
  1133. selector: "arguments:",
  1134. protocol: 'accessing',
  1135. fn: function (aCollection){
  1136. var self=this;
  1137. self["@arguments"]=aCollection;
  1138. return self},
  1139. args: ["aCollection"],
  1140. source: "arguments: aCollection\x0a\x09arguments := aCollection",
  1141. messageSends: [],
  1142. referencedClasses: []
  1143. }),
  1144. globals.MethodNode);
  1145. smalltalk.addMethod(
  1146. smalltalk.method({
  1147. selector: "classReferences",
  1148. protocol: 'accessing',
  1149. fn: function (){
  1150. var self=this;
  1151. var $1;
  1152. $1=self["@classReferences"];
  1153. return $1;
  1154. },
  1155. args: [],
  1156. source: "classReferences\x0a\x09^ classReferences",
  1157. messageSends: [],
  1158. referencedClasses: []
  1159. }),
  1160. globals.MethodNode);
  1161. smalltalk.addMethod(
  1162. smalltalk.method({
  1163. selector: "classReferences:",
  1164. protocol: 'accessing',
  1165. fn: function (aCollection){
  1166. var self=this;
  1167. self["@classReferences"]=aCollection;
  1168. return self},
  1169. args: ["aCollection"],
  1170. source: "classReferences: aCollection\x0a\x09classReferences := aCollection",
  1171. messageSends: [],
  1172. referencedClasses: []
  1173. }),
  1174. globals.MethodNode);
  1175. smalltalk.addMethod(
  1176. smalltalk.method({
  1177. selector: "extent",
  1178. protocol: 'accessing',
  1179. fn: function (){
  1180. var self=this;
  1181. return smalltalk.withContext(function($ctx1) {
  1182. var $4,$3,$2,$1;
  1183. $4=self._source();
  1184. $ctx1.sendIdx["source"]=1;
  1185. $3=_st($4)._lines();
  1186. $ctx1.sendIdx["lines"]=1;
  1187. $2=_st($3)._size();
  1188. $ctx1.sendIdx["size"]=1;
  1189. $1=_st($2).__at(_st(_st(_st(_st(self._source())._lines())._last())._size()).__plus((1)));
  1190. return $1;
  1191. }, function($ctx1) {$ctx1.fill(self,"extent",{},globals.MethodNode)})},
  1192. args: [],
  1193. source: "extent\x0a\x09^ self source lines size @ (self source lines last size + 1)",
  1194. messageSends: ["@", "size", "lines", "source", "+", "last"],
  1195. referencedClasses: []
  1196. }),
  1197. globals.MethodNode);
  1198. smalltalk.addMethod(
  1199. smalltalk.method({
  1200. selector: "messageSends",
  1201. protocol: 'accessing',
  1202. fn: function (){
  1203. var self=this;
  1204. return smalltalk.withContext(function($ctx1) {
  1205. var $1;
  1206. $1=_st(self._sendIndexes())._keys();
  1207. return $1;
  1208. }, function($ctx1) {$ctx1.fill(self,"messageSends",{},globals.MethodNode)})},
  1209. args: [],
  1210. source: "messageSends\x0a\x09^ self sendIndexes keys",
  1211. messageSends: ["keys", "sendIndexes"],
  1212. referencedClasses: []
  1213. }),
  1214. globals.MethodNode);
  1215. smalltalk.addMethod(
  1216. smalltalk.method({
  1217. selector: "method",
  1218. protocol: 'accessing',
  1219. fn: function (){
  1220. var self=this;
  1221. return self;
  1222. },
  1223. args: [],
  1224. source: "method\x0a\x09^ self",
  1225. messageSends: [],
  1226. referencedClasses: []
  1227. }),
  1228. globals.MethodNode);
  1229. smalltalk.addMethod(
  1230. smalltalk.method({
  1231. selector: "scope",
  1232. protocol: 'accessing',
  1233. fn: function (){
  1234. var self=this;
  1235. var $1;
  1236. $1=self["@scope"];
  1237. return $1;
  1238. },
  1239. args: [],
  1240. source: "scope\x0a\x09^ scope",
  1241. messageSends: [],
  1242. referencedClasses: []
  1243. }),
  1244. globals.MethodNode);
  1245. smalltalk.addMethod(
  1246. smalltalk.method({
  1247. selector: "scope:",
  1248. protocol: 'accessing',
  1249. fn: function (aMethodScope){
  1250. var self=this;
  1251. self["@scope"]=aMethodScope;
  1252. return self},
  1253. args: ["aMethodScope"],
  1254. source: "scope: aMethodScope\x0a\x09scope := aMethodScope",
  1255. messageSends: [],
  1256. referencedClasses: []
  1257. }),
  1258. globals.MethodNode);
  1259. smalltalk.addMethod(
  1260. smalltalk.method({
  1261. selector: "selector",
  1262. protocol: 'accessing',
  1263. fn: function (){
  1264. var self=this;
  1265. var $1;
  1266. $1=self["@selector"];
  1267. return $1;
  1268. },
  1269. args: [],
  1270. source: "selector\x0a\x09^ selector",
  1271. messageSends: [],
  1272. referencedClasses: []
  1273. }),
  1274. globals.MethodNode);
  1275. smalltalk.addMethod(
  1276. smalltalk.method({
  1277. selector: "selector:",
  1278. protocol: 'accessing',
  1279. fn: function (aString){
  1280. var self=this;
  1281. self["@selector"]=aString;
  1282. return self},
  1283. args: ["aString"],
  1284. source: "selector: aString\x0a\x09selector := aString",
  1285. messageSends: [],
  1286. referencedClasses: []
  1287. }),
  1288. globals.MethodNode);
  1289. smalltalk.addMethod(
  1290. smalltalk.method({
  1291. selector: "sendIndexes",
  1292. protocol: 'accessing',
  1293. fn: function (){
  1294. var self=this;
  1295. var $1;
  1296. $1=self["@sendIndexes"];
  1297. return $1;
  1298. },
  1299. args: [],
  1300. source: "sendIndexes\x0a\x09^ sendIndexes",
  1301. messageSends: [],
  1302. referencedClasses: []
  1303. }),
  1304. globals.MethodNode);
  1305. smalltalk.addMethod(
  1306. smalltalk.method({
  1307. selector: "sendIndexes:",
  1308. protocol: 'accessing',
  1309. fn: function (aDictionary){
  1310. var self=this;
  1311. self["@sendIndexes"]=aDictionary;
  1312. return self},
  1313. args: ["aDictionary"],
  1314. source: "sendIndexes: aDictionary\x0a\x09sendIndexes := aDictionary",
  1315. messageSends: [],
  1316. referencedClasses: []
  1317. }),
  1318. globals.MethodNode);
  1319. smalltalk.addMethod(
  1320. smalltalk.method({
  1321. selector: "source",
  1322. protocol: 'accessing',
  1323. fn: function (){
  1324. var self=this;
  1325. var $1;
  1326. $1=self["@source"];
  1327. return $1;
  1328. },
  1329. args: [],
  1330. source: "source\x0a\x09^ source",
  1331. messageSends: [],
  1332. referencedClasses: []
  1333. }),
  1334. globals.MethodNode);
  1335. smalltalk.addMethod(
  1336. smalltalk.method({
  1337. selector: "source:",
  1338. protocol: 'accessing',
  1339. fn: function (aString){
  1340. var self=this;
  1341. self["@source"]=aString;
  1342. return self},
  1343. args: ["aString"],
  1344. source: "source: aString\x0a\x09source := aString",
  1345. messageSends: [],
  1346. referencedClasses: []
  1347. }),
  1348. globals.MethodNode);
  1349. smalltalk.addMethod(
  1350. smalltalk.method({
  1351. selector: "superSends",
  1352. protocol: 'accessing',
  1353. fn: function (){
  1354. var self=this;
  1355. var $1;
  1356. $1=self["@superSends"];
  1357. return $1;
  1358. },
  1359. args: [],
  1360. source: "superSends\x0a\x09^ superSends",
  1361. messageSends: [],
  1362. referencedClasses: []
  1363. }),
  1364. globals.MethodNode);
  1365. smalltalk.addMethod(
  1366. smalltalk.method({
  1367. selector: "superSends:",
  1368. protocol: 'accessing',
  1369. fn: function (aCollection){
  1370. var self=this;
  1371. self["@superSends"]=aCollection;
  1372. return self},
  1373. args: ["aCollection"],
  1374. source: "superSends: aCollection\x0a\x09superSends := aCollection",
  1375. messageSends: [],
  1376. referencedClasses: []
  1377. }),
  1378. globals.MethodNode);
  1379. smalltalk.addClass('ReturnNode', globals.Node, ['scope'], 'Compiler-AST');
  1380. globals.ReturnNode.comment="I represent an return node. At the AST level, there is not difference between a local return or non-local return.";
  1381. smalltalk.addMethod(
  1382. smalltalk.method({
  1383. selector: "accept:",
  1384. protocol: 'visiting',
  1385. fn: function (aVisitor){
  1386. var self=this;
  1387. return smalltalk.withContext(function($ctx1) {
  1388. var $1;
  1389. $1=_st(aVisitor)._visitReturnNode_(self);
  1390. return $1;
  1391. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},globals.ReturnNode)})},
  1392. args: ["aVisitor"],
  1393. source: "accept: aVisitor\x0a\x09^ aVisitor visitReturnNode: self",
  1394. messageSends: ["visitReturnNode:"],
  1395. referencedClasses: []
  1396. }),
  1397. globals.ReturnNode);
  1398. smalltalk.addMethod(
  1399. smalltalk.method({
  1400. selector: "isReturnNode",
  1401. protocol: 'testing',
  1402. fn: function (){
  1403. var self=this;
  1404. return true;
  1405. },
  1406. args: [],
  1407. source: "isReturnNode\x0a\x09^ true",
  1408. messageSends: [],
  1409. referencedClasses: []
  1410. }),
  1411. globals.ReturnNode);
  1412. smalltalk.addMethod(
  1413. smalltalk.method({
  1414. selector: "nonLocalReturn",
  1415. protocol: 'testing',
  1416. fn: function (){
  1417. var self=this;
  1418. return smalltalk.withContext(function($ctx1) {
  1419. var $1;
  1420. $1=_st(_st(self._scope())._isMethodScope())._not();
  1421. return $1;
  1422. }, function($ctx1) {$ctx1.fill(self,"nonLocalReturn",{},globals.ReturnNode)})},
  1423. args: [],
  1424. source: "nonLocalReturn\x0a\x09^ self scope isMethodScope not",
  1425. messageSends: ["not", "isMethodScope", "scope"],
  1426. referencedClasses: []
  1427. }),
  1428. globals.ReturnNode);
  1429. smalltalk.addMethod(
  1430. smalltalk.method({
  1431. selector: "scope",
  1432. protocol: 'accessing',
  1433. fn: function (){
  1434. var self=this;
  1435. var $1;
  1436. $1=self["@scope"];
  1437. return $1;
  1438. },
  1439. args: [],
  1440. source: "scope\x0a\x09^ scope",
  1441. messageSends: [],
  1442. referencedClasses: []
  1443. }),
  1444. globals.ReturnNode);
  1445. smalltalk.addMethod(
  1446. smalltalk.method({
  1447. selector: "scope:",
  1448. protocol: 'accessing',
  1449. fn: function (aLexicalScope){
  1450. var self=this;
  1451. self["@scope"]=aLexicalScope;
  1452. return self},
  1453. args: ["aLexicalScope"],
  1454. source: "scope: aLexicalScope\x0a\x09scope := aLexicalScope",
  1455. messageSends: [],
  1456. referencedClasses: []
  1457. }),
  1458. globals.ReturnNode);
  1459. smalltalk.addClass('SendNode', globals.Node, ['selector', 'arguments', 'receiver', 'superSend', 'index'], 'Compiler-AST');
  1460. globals.SendNode.comment="I represent an message send node.";
  1461. smalltalk.addMethod(
  1462. smalltalk.method({
  1463. selector: "accept:",
  1464. protocol: 'visiting',
  1465. fn: function (aVisitor){
  1466. var self=this;
  1467. return smalltalk.withContext(function($ctx1) {
  1468. var $1;
  1469. $1=_st(aVisitor)._visitSendNode_(self);
  1470. return $1;
  1471. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},globals.SendNode)})},
  1472. args: ["aVisitor"],
  1473. source: "accept: aVisitor\x0a\x09^ aVisitor visitSendNode: self",
  1474. messageSends: ["visitSendNode:"],
  1475. referencedClasses: []
  1476. }),
  1477. globals.SendNode);
  1478. smalltalk.addMethod(
  1479. smalltalk.method({
  1480. selector: "arguments",
  1481. protocol: 'accessing',
  1482. fn: function (){
  1483. var self=this;
  1484. return smalltalk.withContext(function($ctx1) {
  1485. var $2,$1;
  1486. $2=self["@arguments"];
  1487. if(($receiver = $2) == nil || $receiver == null){
  1488. self["@arguments"]=[];
  1489. $1=self["@arguments"];
  1490. } else {
  1491. $1=$2;
  1492. };
  1493. return $1;
  1494. }, function($ctx1) {$ctx1.fill(self,"arguments",{},globals.SendNode)})},
  1495. args: [],
  1496. source: "arguments\x0a\x09^ arguments ifNil: [ arguments := #() ]",
  1497. messageSends: ["ifNil:"],
  1498. referencedClasses: []
  1499. }),
  1500. globals.SendNode);
  1501. smalltalk.addMethod(
  1502. smalltalk.method({
  1503. selector: "arguments:",
  1504. protocol: 'accessing',
  1505. fn: function (aCollection){
  1506. var self=this;
  1507. return smalltalk.withContext(function($ctx1) {
  1508. self["@arguments"]=aCollection;
  1509. _st(aCollection)._do_((function(each){
  1510. return smalltalk.withContext(function($ctx2) {
  1511. return _st(each)._parent_(self);
  1512. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  1513. return self}, function($ctx1) {$ctx1.fill(self,"arguments:",{aCollection:aCollection},globals.SendNode)})},
  1514. args: ["aCollection"],
  1515. source: "arguments: aCollection\x0a\x09arguments := aCollection.\x0a\x09aCollection do: [ :each | each parent: self ]",
  1516. messageSends: ["do:", "parent:"],
  1517. referencedClasses: []
  1518. }),
  1519. globals.SendNode);
  1520. smalltalk.addMethod(
  1521. smalltalk.method({
  1522. selector: "cascadeNodeWithMessages:",
  1523. protocol: 'accessing',
  1524. fn: function (aCollection){
  1525. var self=this;
  1526. var first;
  1527. function $SendNode(){return globals.SendNode||(typeof SendNode=="undefined"?nil:SendNode)}
  1528. function $CascadeNode(){return globals.CascadeNode||(typeof CascadeNode=="undefined"?nil:CascadeNode)}
  1529. function $Array(){return globals.Array||(typeof Array=="undefined"?nil:Array)}
  1530. return smalltalk.withContext(function($ctx1) {
  1531. var $1,$2,$4,$5,$3;
  1532. $1=_st($SendNode())._new();
  1533. $ctx1.sendIdx["new"]=1;
  1534. _st($1)._selector_(self._selector());
  1535. _st($1)._arguments_(self._arguments());
  1536. $2=_st($1)._yourself();
  1537. $ctx1.sendIdx["yourself"]=1;
  1538. first=$2;
  1539. $4=_st($CascadeNode())._new();
  1540. _st($4)._receiver_(self._receiver());
  1541. _st($4)._nodes_(_st(_st($Array())._with_(first)).__comma(aCollection));
  1542. $5=_st($4)._yourself();
  1543. $3=$5;
  1544. return $3;
  1545. }, function($ctx1) {$ctx1.fill(self,"cascadeNodeWithMessages:",{aCollection:aCollection,first:first},globals.SendNode)})},
  1546. args: ["aCollection"],
  1547. source: "cascadeNodeWithMessages: aCollection\x0a\x09| first |\x0a\x09first := SendNode new\x0a\x09\x09selector: self selector;\x0a\x09\x09arguments: self arguments;\x0a\x09\x09yourself.\x0a\x09^ CascadeNode new\x0a\x09\x09receiver: self receiver;\x0a\x09\x09nodes: (Array with: first), aCollection;\x0a\x09\x09yourself",
  1548. messageSends: ["selector:", "new", "selector", "arguments:", "arguments", "yourself", "receiver:", "receiver", "nodes:", ",", "with:"],
  1549. referencedClasses: ["SendNode", "CascadeNode", "Array"]
  1550. }),
  1551. globals.SendNode);
  1552. smalltalk.addMethod(
  1553. smalltalk.method({
  1554. selector: "index",
  1555. protocol: 'accessing',
  1556. fn: function (){
  1557. var self=this;
  1558. var $1;
  1559. $1=self["@index"];
  1560. return $1;
  1561. },
  1562. args: [],
  1563. source: "index\x0a\x09^ index",
  1564. messageSends: [],
  1565. referencedClasses: []
  1566. }),
  1567. globals.SendNode);
  1568. smalltalk.addMethod(
  1569. smalltalk.method({
  1570. selector: "index:",
  1571. protocol: 'accessing',
  1572. fn: function (anInteger){
  1573. var self=this;
  1574. self["@index"]=anInteger;
  1575. return self},
  1576. args: ["anInteger"],
  1577. source: "index: anInteger\x0a\x09index := anInteger",
  1578. messageSends: [],
  1579. referencedClasses: []
  1580. }),
  1581. globals.SendNode);
  1582. smalltalk.addMethod(
  1583. smalltalk.method({
  1584. selector: "isCascadeSendNode",
  1585. protocol: 'testing',
  1586. fn: function (){
  1587. var self=this;
  1588. return smalltalk.withContext(function($ctx1) {
  1589. var $1;
  1590. $1=_st(self._parent())._isCascadeNode();
  1591. return $1;
  1592. }, function($ctx1) {$ctx1.fill(self,"isCascadeSendNode",{},globals.SendNode)})},
  1593. args: [],
  1594. source: "isCascadeSendNode\x0a\x09^ self parent isCascadeNode",
  1595. messageSends: ["isCascadeNode", "parent"],
  1596. referencedClasses: []
  1597. }),
  1598. globals.SendNode);
  1599. smalltalk.addMethod(
  1600. smalltalk.method({
  1601. selector: "isSendNode",
  1602. protocol: 'testing',
  1603. fn: function (){
  1604. var self=this;
  1605. return true;
  1606. },
  1607. args: [],
  1608. source: "isSendNode\x0a\x09^ true",
  1609. messageSends: [],
  1610. referencedClasses: []
  1611. }),
  1612. globals.SendNode);
  1613. smalltalk.addMethod(
  1614. smalltalk.method({
  1615. selector: "nodes",
  1616. protocol: 'accessing',
  1617. fn: function (){
  1618. var self=this;
  1619. function $Array(){return globals.Array||(typeof Array=="undefined"?nil:Array)}
  1620. return smalltalk.withContext(function($ctx1) {
  1621. var $1,$3,$2,$5,$6,$4;
  1622. $1=self._receiver();
  1623. $ctx1.sendIdx["receiver"]=1;
  1624. if(($receiver = $1) == nil || $receiver == null){
  1625. $3=self._arguments();
  1626. $ctx1.sendIdx["arguments"]=1;
  1627. $2=_st($3)._copy();
  1628. return $2;
  1629. } else {
  1630. $1;
  1631. };
  1632. $5=_st($Array())._with_(self._receiver());
  1633. _st($5)._addAll_(self._arguments());
  1634. $6=_st($5)._yourself();
  1635. $4=$6;
  1636. return $4;
  1637. }, function($ctx1) {$ctx1.fill(self,"nodes",{},globals.SendNode)})},
  1638. args: [],
  1639. source: "nodes\x0a\x09self receiver ifNil: [ ^ self arguments copy ].\x0a\x09\x0a\x09^ (Array with: self receiver)\x0a\x09\x09addAll: self arguments;\x0a\x09\x09yourself",
  1640. messageSends: ["ifNil:", "receiver", "copy", "arguments", "addAll:", "with:", "yourself"],
  1641. referencedClasses: ["Array"]
  1642. }),
  1643. globals.SendNode);
  1644. smalltalk.addMethod(
  1645. smalltalk.method({
  1646. selector: "receiver",
  1647. protocol: 'accessing',
  1648. fn: function (){
  1649. var self=this;
  1650. var $1;
  1651. $1=self["@receiver"];
  1652. return $1;
  1653. },
  1654. args: [],
  1655. source: "receiver\x0a\x09^ receiver",
  1656. messageSends: [],
  1657. referencedClasses: []
  1658. }),
  1659. globals.SendNode);
  1660. smalltalk.addMethod(
  1661. smalltalk.method({
  1662. selector: "receiver:",
  1663. protocol: 'accessing',
  1664. fn: function (aNode){
  1665. var self=this;
  1666. return smalltalk.withContext(function($ctx1) {
  1667. var $1;
  1668. self["@receiver"]=aNode;
  1669. $1=_st(aNode)._isNode();
  1670. if(smalltalk.assert($1)){
  1671. _st(aNode)._parent_(self);
  1672. };
  1673. return self}, function($ctx1) {$ctx1.fill(self,"receiver:",{aNode:aNode},globals.SendNode)})},
  1674. args: ["aNode"],
  1675. source: "receiver: aNode\x0a\x09receiver := aNode.\x0a\x09aNode isNode ifTrue: [\x0a\x09\x09aNode parent: self ]",
  1676. messageSends: ["ifTrue:", "isNode", "parent:"],
  1677. referencedClasses: []
  1678. }),
  1679. globals.SendNode);
  1680. smalltalk.addMethod(
  1681. smalltalk.method({
  1682. selector: "requiresSmalltalkContext",
  1683. protocol: 'testing',
  1684. fn: function (){
  1685. var self=this;
  1686. return true;
  1687. },
  1688. args: [],
  1689. source: "requiresSmalltalkContext\x0a\x09^ true",
  1690. messageSends: [],
  1691. referencedClasses: []
  1692. }),
  1693. globals.SendNode);
  1694. smalltalk.addMethod(
  1695. smalltalk.method({
  1696. selector: "selector",
  1697. protocol: 'accessing',
  1698. fn: function (){
  1699. var self=this;
  1700. var $1;
  1701. $1=self["@selector"];
  1702. return $1;
  1703. },
  1704. args: [],
  1705. source: "selector\x0a\x09^ selector",
  1706. messageSends: [],
  1707. referencedClasses: []
  1708. }),
  1709. globals.SendNode);
  1710. smalltalk.addMethod(
  1711. smalltalk.method({
  1712. selector: "selector:",
  1713. protocol: 'accessing',
  1714. fn: function (aString){
  1715. var self=this;
  1716. self["@selector"]=aString;
  1717. return self},
  1718. args: ["aString"],
  1719. source: "selector: aString\x0a\x09selector := aString",
  1720. messageSends: [],
  1721. referencedClasses: []
  1722. }),
  1723. globals.SendNode);
  1724. smalltalk.addMethod(
  1725. smalltalk.method({
  1726. selector: "shouldBeAliased",
  1727. protocol: 'testing',
  1728. fn: function (){
  1729. var self=this;
  1730. var sends;
  1731. return smalltalk.withContext(function($ctx1) {
  1732. var $1;
  1733. sends=_st(_st(_st(self._method())._sendIndexes())._at_(self._selector()))._size();
  1734. $1=_st(globals.SendNode.superclass.fn.prototype._shouldBeAliased.apply(_st(self), []))._or_((function(){
  1735. return smalltalk.withContext(function($ctx2) {
  1736. return _st(_st(_st(sends).__gt((1)))._and_((function(){
  1737. return smalltalk.withContext(function($ctx3) {
  1738. return _st(self._index()).__lt(sends);
  1739. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})})))._and_((function(){
  1740. return smalltalk.withContext(function($ctx3) {
  1741. return self._isReferenced();
  1742. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  1743. $ctx2.sendIdx["and:"]=1;
  1744. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  1745. return $1;
  1746. }, function($ctx1) {$ctx1.fill(self,"shouldBeAliased",{sends:sends},globals.SendNode)})},
  1747. args: [],
  1748. source: "shouldBeAliased\x0a\x09\x22Because we keep track of send indexes, some send nodes need additional care for aliasing. \x0a\x09See IRJSVisitor >> visitIRSend:\x22\x0a\x09\x0a\x09| sends |\x0a\x09\x0a\x09sends := (self method sendIndexes at: self selector) size.\x0a\x09\x0a\x09^ super shouldBeAliased or: [\x0a\x09\x09(sends > 1 and: [ self index < sends ]) and: [ self isReferenced ] ]",
  1749. messageSends: ["size", "at:", "sendIndexes", "method", "selector", "or:", "shouldBeAliased", "and:", ">", "<", "index", "isReferenced"],
  1750. referencedClasses: []
  1751. }),
  1752. globals.SendNode);
  1753. smalltalk.addMethod(
  1754. smalltalk.method({
  1755. selector: "stopOnStepping",
  1756. protocol: 'testing',
  1757. fn: function (){
  1758. var self=this;
  1759. return true;
  1760. },
  1761. args: [],
  1762. source: "stopOnStepping\x0a\x09^ true",
  1763. messageSends: [],
  1764. referencedClasses: []
  1765. }),
  1766. globals.SendNode);
  1767. smalltalk.addMethod(
  1768. smalltalk.method({
  1769. selector: "superSend",
  1770. protocol: 'accessing',
  1771. fn: function (){
  1772. var self=this;
  1773. return smalltalk.withContext(function($ctx1) {
  1774. var $2,$1;
  1775. $2=self["@superSend"];
  1776. if(($receiver = $2) == nil || $receiver == null){
  1777. $1=false;
  1778. } else {
  1779. $1=$2;
  1780. };
  1781. return $1;
  1782. }, function($ctx1) {$ctx1.fill(self,"superSend",{},globals.SendNode)})},
  1783. args: [],
  1784. source: "superSend\x0a\x09^ superSend ifNil: [ false ]",
  1785. messageSends: ["ifNil:"],
  1786. referencedClasses: []
  1787. }),
  1788. globals.SendNode);
  1789. smalltalk.addMethod(
  1790. smalltalk.method({
  1791. selector: "superSend:",
  1792. protocol: 'accessing',
  1793. fn: function (aBoolean){
  1794. var self=this;
  1795. self["@superSend"]=aBoolean;
  1796. return self},
  1797. args: ["aBoolean"],
  1798. source: "superSend: aBoolean\x0a\x09superSend := aBoolean",
  1799. messageSends: [],
  1800. referencedClasses: []
  1801. }),
  1802. globals.SendNode);
  1803. smalltalk.addMethod(
  1804. smalltalk.method({
  1805. selector: "valueForReceiver:",
  1806. protocol: 'accessing',
  1807. fn: function (anObject){
  1808. var self=this;
  1809. function $SendNode(){return globals.SendNode||(typeof SendNode=="undefined"?nil:SendNode)}
  1810. return smalltalk.withContext(function($ctx1) {
  1811. var $2,$3,$5,$4,$6,$1;
  1812. $2=_st($SendNode())._new();
  1813. _st($2)._position_(self._position());
  1814. _st($2)._source_(self._source());
  1815. $3=$2;
  1816. $5=self._receiver();
  1817. $ctx1.sendIdx["receiver"]=1;
  1818. if(($receiver = $5) == nil || $receiver == null){
  1819. $4=anObject;
  1820. } else {
  1821. $4=_st(self._receiver())._valueForReceiver_(anObject);
  1822. };
  1823. _st($3)._receiver_($4);
  1824. _st($2)._selector_(self._selector());
  1825. _st($2)._arguments_(self._arguments());
  1826. $6=_st($2)._yourself();
  1827. $1=$6;
  1828. return $1;
  1829. }, function($ctx1) {$ctx1.fill(self,"valueForReceiver:",{anObject:anObject},globals.SendNode)})},
  1830. args: ["anObject"],
  1831. source: "valueForReceiver: anObject\x0a\x09^ SendNode new\x0a\x09\x09position: self position;\x0a\x09\x09source: self source;\x0a\x09\x09receiver: (self receiver\x0a\x09\x09ifNil: [ anObject ] \x0a\x09\x09ifNotNil: [ self receiver valueForReceiver: anObject ]);\x0a\x09\x09selector: self selector;\x0a\x09\x09arguments: self arguments;\x0a\x09\x09yourself",
  1832. messageSends: ["position:", "new", "position", "source:", "source", "receiver:", "ifNil:ifNotNil:", "receiver", "valueForReceiver:", "selector:", "selector", "arguments:", "arguments", "yourself"],
  1833. referencedClasses: ["SendNode"]
  1834. }),
  1835. globals.SendNode);
  1836. smalltalk.addClass('SequenceNode', globals.Node, ['temps', 'scope'], 'Compiler-AST');
  1837. globals.SequenceNode.comment="I represent an sequence node. A sequence represent a set of instructions inside the same scope (the method scope or a block scope).";
  1838. smalltalk.addMethod(
  1839. smalltalk.method({
  1840. selector: "accept:",
  1841. protocol: 'visiting',
  1842. fn: function (aVisitor){
  1843. var self=this;
  1844. return smalltalk.withContext(function($ctx1) {
  1845. var $1;
  1846. $1=_st(aVisitor)._visitSequenceNode_(self);
  1847. return $1;
  1848. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},globals.SequenceNode)})},
  1849. args: ["aVisitor"],
  1850. source: "accept: aVisitor\x0a\x09^ aVisitor visitSequenceNode: self",
  1851. messageSends: ["visitSequenceNode:"],
  1852. referencedClasses: []
  1853. }),
  1854. globals.SequenceNode);
  1855. smalltalk.addMethod(
  1856. smalltalk.method({
  1857. selector: "asBlockSequenceNode",
  1858. protocol: 'converting',
  1859. fn: function (){
  1860. var self=this;
  1861. function $BlockSequenceNode(){return globals.BlockSequenceNode||(typeof BlockSequenceNode=="undefined"?nil:BlockSequenceNode)}
  1862. return smalltalk.withContext(function($ctx1) {
  1863. var $2,$3,$1;
  1864. $2=_st($BlockSequenceNode())._new();
  1865. _st($2)._position_(self._position());
  1866. _st($2)._source_(self._source());
  1867. _st($2)._nodes_(self._nodes());
  1868. _st($2)._temps_(self._temps());
  1869. $3=_st($2)._yourself();
  1870. $1=$3;
  1871. return $1;
  1872. }, function($ctx1) {$ctx1.fill(self,"asBlockSequenceNode",{},globals.SequenceNode)})},
  1873. args: [],
  1874. source: "asBlockSequenceNode\x0a\x09^ BlockSequenceNode new\x0a\x09\x09position: self position;\x0a\x09\x09source: self source;\x0a\x09\x09nodes: self nodes;\x0a\x09\x09temps: self temps;\x0a\x09\x09yourself",
  1875. messageSends: ["position:", "new", "position", "source:", "source", "nodes:", "nodes", "temps:", "temps", "yourself"],
  1876. referencedClasses: ["BlockSequenceNode"]
  1877. }),
  1878. globals.SequenceNode);
  1879. smalltalk.addMethod(
  1880. smalltalk.method({
  1881. selector: "isSequenceNode",
  1882. protocol: 'testing',
  1883. fn: function (){
  1884. var self=this;
  1885. return true;
  1886. },
  1887. args: [],
  1888. source: "isSequenceNode\x0a\x09^ true",
  1889. messageSends: [],
  1890. referencedClasses: []
  1891. }),
  1892. globals.SequenceNode);
  1893. smalltalk.addMethod(
  1894. smalltalk.method({
  1895. selector: "scope",
  1896. protocol: 'accessing',
  1897. fn: function (){
  1898. var self=this;
  1899. var $1;
  1900. $1=self["@scope"];
  1901. return $1;
  1902. },
  1903. args: [],
  1904. source: "scope\x0a\x09^ scope",
  1905. messageSends: [],
  1906. referencedClasses: []
  1907. }),
  1908. globals.SequenceNode);
  1909. smalltalk.addMethod(
  1910. smalltalk.method({
  1911. selector: "scope:",
  1912. protocol: 'accessing',
  1913. fn: function (aLexicalScope){
  1914. var self=this;
  1915. self["@scope"]=aLexicalScope;
  1916. return self},
  1917. args: ["aLexicalScope"],
  1918. source: "scope: aLexicalScope\x0a\x09scope := aLexicalScope",
  1919. messageSends: [],
  1920. referencedClasses: []
  1921. }),
  1922. globals.SequenceNode);
  1923. smalltalk.addMethod(
  1924. smalltalk.method({
  1925. selector: "temps",
  1926. protocol: 'accessing',
  1927. fn: function (){
  1928. var self=this;
  1929. return smalltalk.withContext(function($ctx1) {
  1930. var $2,$1;
  1931. $2=self["@temps"];
  1932. if(($receiver = $2) == nil || $receiver == null){
  1933. $1=[];
  1934. } else {
  1935. $1=$2;
  1936. };
  1937. return $1;
  1938. }, function($ctx1) {$ctx1.fill(self,"temps",{},globals.SequenceNode)})},
  1939. args: [],
  1940. source: "temps\x0a\x09^ temps ifNil: [ #() ]",
  1941. messageSends: ["ifNil:"],
  1942. referencedClasses: []
  1943. }),
  1944. globals.SequenceNode);
  1945. smalltalk.addMethod(
  1946. smalltalk.method({
  1947. selector: "temps:",
  1948. protocol: 'accessing',
  1949. fn: function (aCollection){
  1950. var self=this;
  1951. self["@temps"]=aCollection;
  1952. return self},
  1953. args: ["aCollection"],
  1954. source: "temps: aCollection\x0a\x09temps := aCollection",
  1955. messageSends: [],
  1956. referencedClasses: []
  1957. }),
  1958. globals.SequenceNode);
  1959. smalltalk.addClass('BlockSequenceNode', globals.SequenceNode, [], 'Compiler-AST');
  1960. globals.BlockSequenceNode.comment="I represent an special sequence node for block scopes.";
  1961. smalltalk.addMethod(
  1962. smalltalk.method({
  1963. selector: "accept:",
  1964. protocol: 'visiting',
  1965. fn: function (aVisitor){
  1966. var self=this;
  1967. return smalltalk.withContext(function($ctx1) {
  1968. var $1;
  1969. $1=_st(aVisitor)._visitBlockSequenceNode_(self);
  1970. return $1;
  1971. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},globals.BlockSequenceNode)})},
  1972. args: ["aVisitor"],
  1973. source: "accept: aVisitor\x0a\x09^ aVisitor visitBlockSequenceNode: self",
  1974. messageSends: ["visitBlockSequenceNode:"],
  1975. referencedClasses: []
  1976. }),
  1977. globals.BlockSequenceNode);
  1978. smalltalk.addMethod(
  1979. smalltalk.method({
  1980. selector: "isBlockSequenceNode",
  1981. protocol: 'testing',
  1982. fn: function (){
  1983. var self=this;
  1984. return true;
  1985. },
  1986. args: [],
  1987. source: "isBlockSequenceNode\x0a\x09^ true",
  1988. messageSends: [],
  1989. referencedClasses: []
  1990. }),
  1991. globals.BlockSequenceNode);
  1992. smalltalk.addClass('ValueNode', globals.Node, ['value'], 'Compiler-AST');
  1993. globals.ValueNode.comment="I represent a value node.";
  1994. smalltalk.addMethod(
  1995. smalltalk.method({
  1996. selector: "accept:",
  1997. protocol: 'visiting',
  1998. fn: function (aVisitor){
  1999. var self=this;
  2000. return smalltalk.withContext(function($ctx1) {
  2001. var $1;
  2002. $1=_st(aVisitor)._visitValueNode_(self);
  2003. return $1;
  2004. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},globals.ValueNode)})},
  2005. args: ["aVisitor"],
  2006. source: "accept: aVisitor\x0a\x09^ aVisitor visitValueNode: self",
  2007. messageSends: ["visitValueNode:"],
  2008. referencedClasses: []
  2009. }),
  2010. globals.ValueNode);
  2011. smalltalk.addMethod(
  2012. smalltalk.method({
  2013. selector: "isImmutable",
  2014. protocol: 'testing',
  2015. fn: function (){
  2016. var self=this;
  2017. return smalltalk.withContext(function($ctx1) {
  2018. var $1;
  2019. $1=_st(self._value())._isImmutable();
  2020. return $1;
  2021. }, function($ctx1) {$ctx1.fill(self,"isImmutable",{},globals.ValueNode)})},
  2022. args: [],
  2023. source: "isImmutable\x0a\x09^ self value isImmutable",
  2024. messageSends: ["isImmutable", "value"],
  2025. referencedClasses: []
  2026. }),
  2027. globals.ValueNode);
  2028. smalltalk.addMethod(
  2029. smalltalk.method({
  2030. selector: "isValueNode",
  2031. protocol: 'testing',
  2032. fn: function (){
  2033. var self=this;
  2034. return true;
  2035. },
  2036. args: [],
  2037. source: "isValueNode\x0a\x09^ true",
  2038. messageSends: [],
  2039. referencedClasses: []
  2040. }),
  2041. globals.ValueNode);
  2042. smalltalk.addMethod(
  2043. smalltalk.method({
  2044. selector: "value",
  2045. protocol: 'accessing',
  2046. fn: function (){
  2047. var self=this;
  2048. var $1;
  2049. $1=self["@value"];
  2050. return $1;
  2051. },
  2052. args: [],
  2053. source: "value\x0a\x09^ value",
  2054. messageSends: [],
  2055. referencedClasses: []
  2056. }),
  2057. globals.ValueNode);
  2058. smalltalk.addMethod(
  2059. smalltalk.method({
  2060. selector: "value:",
  2061. protocol: 'accessing',
  2062. fn: function (anObject){
  2063. var self=this;
  2064. self["@value"]=anObject;
  2065. return self},
  2066. args: ["anObject"],
  2067. source: "value: anObject\x0a\x09value := anObject",
  2068. messageSends: [],
  2069. referencedClasses: []
  2070. }),
  2071. globals.ValueNode);
  2072. smalltalk.addClass('VariableNode', globals.ValueNode, ['assigned', 'binding'], 'Compiler-AST');
  2073. globals.VariableNode.comment="I represent an variable node.";
  2074. smalltalk.addMethod(
  2075. smalltalk.method({
  2076. selector: "accept:",
  2077. protocol: 'visiting',
  2078. fn: function (aVisitor){
  2079. var self=this;
  2080. return smalltalk.withContext(function($ctx1) {
  2081. var $1;
  2082. $1=_st(aVisitor)._visitVariableNode_(self);
  2083. return $1;
  2084. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},globals.VariableNode)})},
  2085. args: ["aVisitor"],
  2086. source: "accept: aVisitor\x0a\x09^ aVisitor visitVariableNode: self",
  2087. messageSends: ["visitVariableNode:"],
  2088. referencedClasses: []
  2089. }),
  2090. globals.VariableNode);
  2091. smalltalk.addMethod(
  2092. smalltalk.method({
  2093. selector: "alias",
  2094. protocol: 'accessing',
  2095. fn: function (){
  2096. var self=this;
  2097. return smalltalk.withContext(function($ctx1) {
  2098. var $1;
  2099. $1=_st(self._binding())._alias();
  2100. return $1;
  2101. }, function($ctx1) {$ctx1.fill(self,"alias",{},globals.VariableNode)})},
  2102. args: [],
  2103. source: "alias\x0a\x09^ self binding alias",
  2104. messageSends: ["alias", "binding"],
  2105. referencedClasses: []
  2106. }),
  2107. globals.VariableNode);
  2108. smalltalk.addMethod(
  2109. smalltalk.method({
  2110. selector: "assigned",
  2111. protocol: 'accessing',
  2112. fn: function (){
  2113. var self=this;
  2114. return smalltalk.withContext(function($ctx1) {
  2115. var $2,$1;
  2116. $2=self["@assigned"];
  2117. if(($receiver = $2) == nil || $receiver == null){
  2118. $1=false;
  2119. } else {
  2120. $1=$2;
  2121. };
  2122. return $1;
  2123. }, function($ctx1) {$ctx1.fill(self,"assigned",{},globals.VariableNode)})},
  2124. args: [],
  2125. source: "assigned\x0a\x09^ assigned ifNil: [ false ]",
  2126. messageSends: ["ifNil:"],
  2127. referencedClasses: []
  2128. }),
  2129. globals.VariableNode);
  2130. smalltalk.addMethod(
  2131. smalltalk.method({
  2132. selector: "assigned:",
  2133. protocol: 'accessing',
  2134. fn: function (aBoolean){
  2135. var self=this;
  2136. self["@assigned"]=aBoolean;
  2137. return self},
  2138. args: ["aBoolean"],
  2139. source: "assigned: aBoolean\x0a\x09assigned := aBoolean",
  2140. messageSends: [],
  2141. referencedClasses: []
  2142. }),
  2143. globals.VariableNode);
  2144. smalltalk.addMethod(
  2145. smalltalk.method({
  2146. selector: "beAssigned",
  2147. protocol: 'accessing',
  2148. fn: function (){
  2149. var self=this;
  2150. return smalltalk.withContext(function($ctx1) {
  2151. _st(self._binding())._validateAssignment();
  2152. self["@assigned"]=true;
  2153. return self}, function($ctx1) {$ctx1.fill(self,"beAssigned",{},globals.VariableNode)})},
  2154. args: [],
  2155. source: "beAssigned\x0a\x09self binding validateAssignment.\x0a\x09assigned := true",
  2156. messageSends: ["validateAssignment", "binding"],
  2157. referencedClasses: []
  2158. }),
  2159. globals.VariableNode);
  2160. smalltalk.addMethod(
  2161. smalltalk.method({
  2162. selector: "binding",
  2163. protocol: 'accessing',
  2164. fn: function (){
  2165. var self=this;
  2166. var $1;
  2167. $1=self["@binding"];
  2168. return $1;
  2169. },
  2170. args: [],
  2171. source: "binding\x0a\x09^ binding",
  2172. messageSends: [],
  2173. referencedClasses: []
  2174. }),
  2175. globals.VariableNode);
  2176. smalltalk.addMethod(
  2177. smalltalk.method({
  2178. selector: "binding:",
  2179. protocol: 'accessing',
  2180. fn: function (aScopeVar){
  2181. var self=this;
  2182. self["@binding"]=aScopeVar;
  2183. return self},
  2184. args: ["aScopeVar"],
  2185. source: "binding: aScopeVar\x0a\x09binding := aScopeVar",
  2186. messageSends: [],
  2187. referencedClasses: []
  2188. }),
  2189. globals.VariableNode);
  2190. smalltalk.addMethod(
  2191. smalltalk.method({
  2192. selector: "isArgument",
  2193. protocol: 'testing',
  2194. fn: function (){
  2195. var self=this;
  2196. return smalltalk.withContext(function($ctx1) {
  2197. var $1;
  2198. $1=_st(self._binding())._isArgVar();
  2199. return $1;
  2200. }, function($ctx1) {$ctx1.fill(self,"isArgument",{},globals.VariableNode)})},
  2201. args: [],
  2202. source: "isArgument\x0a\x09^ self binding isArgVar",
  2203. messageSends: ["isArgVar", "binding"],
  2204. referencedClasses: []
  2205. }),
  2206. globals.VariableNode);
  2207. smalltalk.addMethod(
  2208. smalltalk.method({
  2209. selector: "isImmutable",
  2210. protocol: 'testing',
  2211. fn: function (){
  2212. var self=this;
  2213. return smalltalk.withContext(function($ctx1) {
  2214. var $1;
  2215. $1=_st(self._binding())._isImmutable();
  2216. return $1;
  2217. }, function($ctx1) {$ctx1.fill(self,"isImmutable",{},globals.VariableNode)})},
  2218. args: [],
  2219. source: "isImmutable\x0a\x09^ self binding isImmutable",
  2220. messageSends: ["isImmutable", "binding"],
  2221. referencedClasses: []
  2222. }),
  2223. globals.VariableNode);
  2224. smalltalk.addMethod(
  2225. smalltalk.method({
  2226. selector: "isVariableNode",
  2227. protocol: 'testing',
  2228. fn: function (){
  2229. var self=this;
  2230. return true;
  2231. },
  2232. args: [],
  2233. source: "isVariableNode\x0a\x09^ true",
  2234. messageSends: [],
  2235. referencedClasses: []
  2236. }),
  2237. globals.VariableNode);
  2238. smalltalk.addMethod(
  2239. smalltalk.method({
  2240. selector: "isNode",
  2241. protocol: '*Compiler-AST',
  2242. fn: function (){
  2243. var self=this;
  2244. return false;
  2245. },
  2246. args: [],
  2247. source: "isNode\x0a\x09^ false",
  2248. messageSends: [],
  2249. referencedClasses: []
  2250. }),
  2251. globals.Object);
  2252. smalltalk.addMethod(
  2253. smalltalk.method({
  2254. selector: "ast",
  2255. protocol: '*Compiler-AST',
  2256. fn: function (){
  2257. var self=this;
  2258. function $Smalltalk(){return globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  2259. return smalltalk.withContext(function($ctx1) {
  2260. var $1,$2;
  2261. $1=self._source();
  2262. $ctx1.sendIdx["source"]=1;
  2263. _st($1)._ifEmpty_((function(){
  2264. return smalltalk.withContext(function($ctx2) {
  2265. return self._error_("Method source is empty");
  2266. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  2267. $2=_st($Smalltalk())._parse_(self._source());
  2268. return $2;
  2269. }, function($ctx1) {$ctx1.fill(self,"ast",{},globals.CompiledMethod)})},
  2270. args: [],
  2271. source: "ast\x0a\x09self source ifEmpty: [ self error: 'Method source is empty' ].\x0a\x09\x0a\x09^ Smalltalk parse: self source",
  2272. messageSends: ["ifEmpty:", "source", "error:", "parse:"],
  2273. referencedClasses: ["Smalltalk"]
  2274. }),
  2275. globals.CompiledMethod);
  2276. });