1
0

Compiler-AST.js 33 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591
  1. smalltalk.addPackage('Compiler-AST', {});
  2. smalltalk.addClass('Node', smalltalk.Object, ['nodes', 'shouldBeInlined', 'shouldBeAliased'], 'Compiler-AST');
  3. smalltalk.Node.comment="I am the abstract root class of the abstract syntax tree."
  4. smalltalk.addMethod(
  5. "_accept_",
  6. smalltalk.method({
  7. selector: "accept:",
  8. category: 'visiting',
  9. fn: function (aVisitor){
  10. var self=this;
  11. var $1;
  12. $1=smalltalk.send(aVisitor,"_visitNode_",[self]);
  13. return $1;
  14. },
  15. args: ["aVisitor"],
  16. source: "accept: aVisitor\x0a\x09^ aVisitor visitNode: self",
  17. messageSends: ["visitNode:"],
  18. referencedClasses: []
  19. }),
  20. smalltalk.Node);
  21. smalltalk.addMethod(
  22. "_addNode_",
  23. smalltalk.method({
  24. selector: "addNode:",
  25. category: 'accessing',
  26. fn: function (aNode){
  27. var self=this;
  28. smalltalk.send(smalltalk.send(self,"_nodes",[]),"_add_",[aNode]);
  29. return self},
  30. args: ["aNode"],
  31. source: "addNode: aNode\x0a\x09self nodes add: aNode",
  32. messageSends: ["add:", "nodes"],
  33. referencedClasses: []
  34. }),
  35. smalltalk.Node);
  36. smalltalk.addMethod(
  37. "_isAssignmentNode",
  38. smalltalk.method({
  39. selector: "isAssignmentNode",
  40. category: 'testing',
  41. fn: function (){
  42. var self=this;
  43. return false;
  44. },
  45. args: [],
  46. source: "isAssignmentNode\x0a\x09^ false",
  47. messageSends: [],
  48. referencedClasses: []
  49. }),
  50. smalltalk.Node);
  51. smalltalk.addMethod(
  52. "_isBlockNode",
  53. smalltalk.method({
  54. selector: "isBlockNode",
  55. category: 'testing',
  56. fn: function (){
  57. var self=this;
  58. return false;
  59. },
  60. args: [],
  61. source: "isBlockNode\x0a\x09^false",
  62. messageSends: [],
  63. referencedClasses: []
  64. }),
  65. smalltalk.Node);
  66. smalltalk.addMethod(
  67. "_isBlockSequenceNode",
  68. smalltalk.method({
  69. selector: "isBlockSequenceNode",
  70. category: '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. smalltalk.Node);
  81. smalltalk.addMethod(
  82. "_isReturnNode",
  83. smalltalk.method({
  84. selector: "isReturnNode",
  85. category: 'testing',
  86. fn: function (){
  87. var self=this;
  88. return false;
  89. },
  90. args: [],
  91. source: "isReturnNode\x0a\x09^false",
  92. messageSends: [],
  93. referencedClasses: []
  94. }),
  95. smalltalk.Node);
  96. smalltalk.addMethod(
  97. "_isSendNode",
  98. smalltalk.method({
  99. selector: "isSendNode",
  100. category: 'testing',
  101. fn: function (){
  102. var self=this;
  103. return false;
  104. },
  105. args: [],
  106. source: "isSendNode\x0a\x09^false",
  107. messageSends: [],
  108. referencedClasses: []
  109. }),
  110. smalltalk.Node);
  111. smalltalk.addMethod(
  112. "_isValueNode",
  113. smalltalk.method({
  114. selector: "isValueNode",
  115. category: 'testing',
  116. fn: function (){
  117. var self=this;
  118. return false;
  119. },
  120. args: [],
  121. source: "isValueNode\x0a\x09^false",
  122. messageSends: [],
  123. referencedClasses: []
  124. }),
  125. smalltalk.Node);
  126. smalltalk.addMethod(
  127. "_nodes",
  128. smalltalk.method({
  129. selector: "nodes",
  130. category: 'accessing',
  131. fn: function (){
  132. var self=this;
  133. var $1;
  134. if(($receiver = self["@nodes"]) == nil || $receiver == undefined){
  135. self["@nodes"]=smalltalk.send((smalltalk.Array || Array),"_new",[]);
  136. $1=self["@nodes"];
  137. } else {
  138. $1=self["@nodes"];
  139. };
  140. return $1;
  141. },
  142. args: [],
  143. source: "nodes\x0a\x09^nodes ifNil: [nodes := Array new]",
  144. messageSends: ["ifNil:", "new"],
  145. referencedClasses: ["Array"]
  146. }),
  147. smalltalk.Node);
  148. smalltalk.addMethod(
  149. "_nodes_",
  150. smalltalk.method({
  151. selector: "nodes:",
  152. category: 'building',
  153. fn: function (aCollection){
  154. var self=this;
  155. self["@nodes"]=aCollection;
  156. return self},
  157. args: ["aCollection"],
  158. source: "nodes: aCollection\x0a\x09nodes := aCollection",
  159. messageSends: [],
  160. referencedClasses: []
  161. }),
  162. smalltalk.Node);
  163. smalltalk.addMethod(
  164. "_shouldBeAliased",
  165. smalltalk.method({
  166. selector: "shouldBeAliased",
  167. category: 'accessing',
  168. fn: function (){
  169. var self=this;
  170. var $1;
  171. if(($receiver = self["@shouldBeAliased"]) == nil || $receiver == undefined){
  172. $1=false;
  173. } else {
  174. $1=self["@shouldBeAliased"];
  175. };
  176. return $1;
  177. },
  178. args: [],
  179. source: "shouldBeAliased\x0a\x09^ shouldBeAliased ifNil: [ false ]",
  180. messageSends: ["ifNil:"],
  181. referencedClasses: []
  182. }),
  183. smalltalk.Node);
  184. smalltalk.addMethod(
  185. "_shouldBeAliased_",
  186. smalltalk.method({
  187. selector: "shouldBeAliased:",
  188. category: 'accessing',
  189. fn: function (aBoolean){
  190. var self=this;
  191. self["@shouldBeAliased"]=aBoolean;
  192. return self},
  193. args: ["aBoolean"],
  194. source: "shouldBeAliased: aBoolean\x0a\x09shouldBeAliased := aBoolean",
  195. messageSends: [],
  196. referencedClasses: []
  197. }),
  198. smalltalk.Node);
  199. smalltalk.addMethod(
  200. "_shouldBeInlined",
  201. smalltalk.method({
  202. selector: "shouldBeInlined",
  203. category: 'accessing',
  204. fn: function (){
  205. var self=this;
  206. var $1;
  207. if(($receiver = self["@shouldBeInlined"]) == nil || $receiver == undefined){
  208. $1=false;
  209. } else {
  210. $1=self["@shouldBeInlined"];
  211. };
  212. return $1;
  213. },
  214. args: [],
  215. source: "shouldBeInlined\x0a\x09^ shouldBeInlined ifNil: [ false ]",
  216. messageSends: ["ifNil:"],
  217. referencedClasses: []
  218. }),
  219. smalltalk.Node);
  220. smalltalk.addMethod(
  221. "_shouldBeInlined_",
  222. smalltalk.method({
  223. selector: "shouldBeInlined:",
  224. category: 'accessing',
  225. fn: function (aBoolean){
  226. var self=this;
  227. self["@shouldBeInlined"]=aBoolean;
  228. return self},
  229. args: ["aBoolean"],
  230. source: "shouldBeInlined: aBoolean\x0a\x09shouldBeInlined := aBoolean",
  231. messageSends: [],
  232. referencedClasses: []
  233. }),
  234. smalltalk.Node);
  235. smalltalk.addClass('AssignmentNode', smalltalk.Node, ['left', 'right'], 'Compiler-AST');
  236. smalltalk.addMethod(
  237. "_accept_",
  238. smalltalk.method({
  239. selector: "accept:",
  240. category: 'visiting',
  241. fn: function (aVisitor){
  242. var self=this;
  243. var $1;
  244. $1=smalltalk.send(aVisitor,"_visitAssignmentNode_",[self]);
  245. return $1;
  246. },
  247. args: ["aVisitor"],
  248. source: "accept: aVisitor\x0a\x09^ aVisitor visitAssignmentNode: self",
  249. messageSends: ["visitAssignmentNode:"],
  250. referencedClasses: []
  251. }),
  252. smalltalk.AssignmentNode);
  253. smalltalk.addMethod(
  254. "_isAssignmentNode",
  255. smalltalk.method({
  256. selector: "isAssignmentNode",
  257. category: 'testing',
  258. fn: function (){
  259. var self=this;
  260. return true;
  261. },
  262. args: [],
  263. source: "isAssignmentNode\x0a\x09^ true",
  264. messageSends: [],
  265. referencedClasses: []
  266. }),
  267. smalltalk.AssignmentNode);
  268. smalltalk.addMethod(
  269. "_left",
  270. smalltalk.method({
  271. selector: "left",
  272. category: 'accessing',
  273. fn: function (){
  274. var self=this;
  275. return self["@left"];
  276. },
  277. args: [],
  278. source: "left\x0a\x09^left",
  279. messageSends: [],
  280. referencedClasses: []
  281. }),
  282. smalltalk.AssignmentNode);
  283. smalltalk.addMethod(
  284. "_left_",
  285. smalltalk.method({
  286. selector: "left:",
  287. category: 'accessing',
  288. fn: function (aNode){
  289. var self=this;
  290. self["@left"]=aNode;
  291. return self},
  292. args: ["aNode"],
  293. source: "left: aNode\x0a\x09left := aNode",
  294. messageSends: [],
  295. referencedClasses: []
  296. }),
  297. smalltalk.AssignmentNode);
  298. smalltalk.addMethod(
  299. "_nodes",
  300. smalltalk.method({
  301. selector: "nodes",
  302. category: 'accessing',
  303. fn: function (){
  304. var self=this;
  305. var $1;
  306. $1=smalltalk.send((smalltalk.Array || Array),"_with_with_",[smalltalk.send(self,"_left",[]),smalltalk.send(self,"_right",[])]);
  307. return $1;
  308. },
  309. args: [],
  310. source: "nodes\x0a\x09^ Array with: self left with: self right",
  311. messageSends: ["with:with:", "left", "right"],
  312. referencedClasses: ["Array"]
  313. }),
  314. smalltalk.AssignmentNode);
  315. smalltalk.addMethod(
  316. "_right",
  317. smalltalk.method({
  318. selector: "right",
  319. category: 'accessing',
  320. fn: function (){
  321. var self=this;
  322. return self["@right"];
  323. },
  324. args: [],
  325. source: "right\x0a\x09^right",
  326. messageSends: [],
  327. referencedClasses: []
  328. }),
  329. smalltalk.AssignmentNode);
  330. smalltalk.addMethod(
  331. "_right_",
  332. smalltalk.method({
  333. selector: "right:",
  334. category: 'accessing',
  335. fn: function (aNode){
  336. var self=this;
  337. self["@right"]=aNode;
  338. return self},
  339. args: ["aNode"],
  340. source: "right: aNode\x0a\x09right := aNode",
  341. messageSends: [],
  342. referencedClasses: []
  343. }),
  344. smalltalk.AssignmentNode);
  345. smalltalk.addClass('BlockNode', smalltalk.Node, ['parameters', 'scope'], 'Compiler-AST');
  346. smalltalk.addMethod(
  347. "_accept_",
  348. smalltalk.method({
  349. selector: "accept:",
  350. category: 'visiting',
  351. fn: function (aVisitor){
  352. var self=this;
  353. var $1;
  354. $1=smalltalk.send(aVisitor,"_visitBlockNode_",[self]);
  355. return $1;
  356. },
  357. args: ["aVisitor"],
  358. source: "accept: aVisitor\x0a\x09^ aVisitor visitBlockNode: self",
  359. messageSends: ["visitBlockNode:"],
  360. referencedClasses: []
  361. }),
  362. smalltalk.BlockNode);
  363. smalltalk.addMethod(
  364. "_isBlockNode",
  365. smalltalk.method({
  366. selector: "isBlockNode",
  367. category: 'testing',
  368. fn: function (){
  369. var self=this;
  370. return true;
  371. },
  372. args: [],
  373. source: "isBlockNode\x0a\x09^true",
  374. messageSends: [],
  375. referencedClasses: []
  376. }),
  377. smalltalk.BlockNode);
  378. smalltalk.addMethod(
  379. "_parameters",
  380. smalltalk.method({
  381. selector: "parameters",
  382. category: 'accessing',
  383. fn: function (){
  384. var self=this;
  385. var $1;
  386. if(($receiver = self["@parameters"]) == nil || $receiver == undefined){
  387. self["@parameters"]=smalltalk.send((smalltalk.Array || Array),"_new",[]);
  388. $1=self["@parameters"];
  389. } else {
  390. $1=self["@parameters"];
  391. };
  392. return $1;
  393. },
  394. args: [],
  395. source: "parameters\x0a\x09^parameters ifNil: [parameters := Array new]",
  396. messageSends: ["ifNil:", "new"],
  397. referencedClasses: ["Array"]
  398. }),
  399. smalltalk.BlockNode);
  400. smalltalk.addMethod(
  401. "_parameters_",
  402. smalltalk.method({
  403. selector: "parameters:",
  404. category: 'accessing',
  405. fn: function (aCollection){
  406. var self=this;
  407. self["@parameters"]=aCollection;
  408. return self},
  409. args: ["aCollection"],
  410. source: "parameters: aCollection\x0a\x09parameters := aCollection",
  411. messageSends: [],
  412. referencedClasses: []
  413. }),
  414. smalltalk.BlockNode);
  415. smalltalk.addMethod(
  416. "_scope",
  417. smalltalk.method({
  418. selector: "scope",
  419. category: 'accessing',
  420. fn: function (){
  421. var self=this;
  422. return self["@scope"];
  423. },
  424. args: [],
  425. source: "scope\x0a\x09^ scope",
  426. messageSends: [],
  427. referencedClasses: []
  428. }),
  429. smalltalk.BlockNode);
  430. smalltalk.addMethod(
  431. "_scope_",
  432. smalltalk.method({
  433. selector: "scope:",
  434. category: 'accessing',
  435. fn: function (aLexicalScope){
  436. var self=this;
  437. self["@scope"]=aLexicalScope;
  438. return self},
  439. args: ["aLexicalScope"],
  440. source: "scope: aLexicalScope\x0a\x09scope := aLexicalScope",
  441. messageSends: [],
  442. referencedClasses: []
  443. }),
  444. smalltalk.BlockNode);
  445. smalltalk.addClass('CascadeNode', smalltalk.Node, ['receiver'], 'Compiler-AST');
  446. smalltalk.addMethod(
  447. "_accept_",
  448. smalltalk.method({
  449. selector: "accept:",
  450. category: 'visiting',
  451. fn: function (aVisitor){
  452. var self=this;
  453. var $1;
  454. $1=smalltalk.send(aVisitor,"_visitCascadeNode_",[self]);
  455. return $1;
  456. },
  457. args: ["aVisitor"],
  458. source: "accept: aVisitor\x0a\x09^ aVisitor visitCascadeNode: self",
  459. messageSends: ["visitCascadeNode:"],
  460. referencedClasses: []
  461. }),
  462. smalltalk.CascadeNode);
  463. smalltalk.addMethod(
  464. "_receiver",
  465. smalltalk.method({
  466. selector: "receiver",
  467. category: 'accessing',
  468. fn: function (){
  469. var self=this;
  470. return self["@receiver"];
  471. },
  472. args: [],
  473. source: "receiver\x0a\x09^receiver",
  474. messageSends: [],
  475. referencedClasses: []
  476. }),
  477. smalltalk.CascadeNode);
  478. smalltalk.addMethod(
  479. "_receiver_",
  480. smalltalk.method({
  481. selector: "receiver:",
  482. category: 'accessing',
  483. fn: function (aNode){
  484. var self=this;
  485. self["@receiver"]=aNode;
  486. return self},
  487. args: ["aNode"],
  488. source: "receiver: aNode\x0a\x09receiver := aNode",
  489. messageSends: [],
  490. referencedClasses: []
  491. }),
  492. smalltalk.CascadeNode);
  493. smalltalk.addClass('DynamicArrayNode', smalltalk.Node, [], 'Compiler-AST');
  494. smalltalk.addMethod(
  495. "_accept_",
  496. smalltalk.method({
  497. selector: "accept:",
  498. category: 'visiting',
  499. fn: function (aVisitor){
  500. var self=this;
  501. var $1;
  502. $1=smalltalk.send(aVisitor,"_visitDynamicArrayNode_",[self]);
  503. return $1;
  504. },
  505. args: ["aVisitor"],
  506. source: "accept: aVisitor\x0a\x09^ aVisitor visitDynamicArrayNode: self",
  507. messageSends: ["visitDynamicArrayNode:"],
  508. referencedClasses: []
  509. }),
  510. smalltalk.DynamicArrayNode);
  511. smalltalk.addClass('DynamicDictionaryNode', smalltalk.Node, [], 'Compiler-AST');
  512. smalltalk.addMethod(
  513. "_accept_",
  514. smalltalk.method({
  515. selector: "accept:",
  516. category: 'visiting',
  517. fn: function (aVisitor){
  518. var self=this;
  519. var $1;
  520. $1=smalltalk.send(aVisitor,"_visitDynamicDictionaryNode_",[self]);
  521. return $1;
  522. },
  523. args: ["aVisitor"],
  524. source: "accept: aVisitor\x0a\x09^ aVisitor visitDynamicDictionaryNode: self",
  525. messageSends: ["visitDynamicDictionaryNode:"],
  526. referencedClasses: []
  527. }),
  528. smalltalk.DynamicDictionaryNode);
  529. smalltalk.addClass('JSStatementNode', smalltalk.Node, ['source'], 'Compiler-AST');
  530. smalltalk.addMethod(
  531. "_accept_",
  532. smalltalk.method({
  533. selector: "accept:",
  534. category: 'visiting',
  535. fn: function (aVisitor){
  536. var self=this;
  537. var $1;
  538. $1=smalltalk.send(aVisitor,"_visitJSStatementNode_",[self]);
  539. return $1;
  540. },
  541. args: ["aVisitor"],
  542. source: "accept: aVisitor\x0a\x09^ aVisitor visitJSStatementNode: self",
  543. messageSends: ["visitJSStatementNode:"],
  544. referencedClasses: []
  545. }),
  546. smalltalk.JSStatementNode);
  547. smalltalk.addMethod(
  548. "_source",
  549. smalltalk.method({
  550. selector: "source",
  551. category: 'accessing',
  552. fn: function (){
  553. var self=this;
  554. var $1;
  555. if(($receiver = self["@source"]) == nil || $receiver == undefined){
  556. $1="";
  557. } else {
  558. $1=self["@source"];
  559. };
  560. return $1;
  561. },
  562. args: [],
  563. source: "source\x0a\x09^source ifNil: ['']",
  564. messageSends: ["ifNil:"],
  565. referencedClasses: []
  566. }),
  567. smalltalk.JSStatementNode);
  568. smalltalk.addMethod(
  569. "_source_",
  570. smalltalk.method({
  571. selector: "source:",
  572. category: 'accessing',
  573. fn: function (aString){
  574. var self=this;
  575. self["@source"]=aString;
  576. return self},
  577. args: ["aString"],
  578. source: "source: aString\x0a\x09source := aString",
  579. messageSends: [],
  580. referencedClasses: []
  581. }),
  582. smalltalk.JSStatementNode);
  583. smalltalk.addClass('MethodNode', smalltalk.Node, ['selector', 'arguments', 'source', 'scope', 'classReferences', 'messageSends'], 'Compiler-AST');
  584. smalltalk.addMethod(
  585. "_accept_",
  586. smalltalk.method({
  587. selector: "accept:",
  588. category: 'visiting',
  589. fn: function (aVisitor){
  590. var self=this;
  591. var $1;
  592. $1=smalltalk.send(aVisitor,"_visitMethodNode_",[self]);
  593. return $1;
  594. },
  595. args: ["aVisitor"],
  596. source: "accept: aVisitor\x0a\x09^ aVisitor visitMethodNode: self",
  597. messageSends: ["visitMethodNode:"],
  598. referencedClasses: []
  599. }),
  600. smalltalk.MethodNode);
  601. smalltalk.addMethod(
  602. "_arguments",
  603. smalltalk.method({
  604. selector: "arguments",
  605. category: 'accessing',
  606. fn: function (){
  607. var self=this;
  608. var $1;
  609. if(($receiver = self["@arguments"]) == nil || $receiver == undefined){
  610. $1=[];
  611. } else {
  612. $1=self["@arguments"];
  613. };
  614. return $1;
  615. },
  616. args: [],
  617. source: "arguments\x0a\x09^arguments ifNil: [#()]",
  618. messageSends: ["ifNil:"],
  619. referencedClasses: []
  620. }),
  621. smalltalk.MethodNode);
  622. smalltalk.addMethod(
  623. "_arguments_",
  624. smalltalk.method({
  625. selector: "arguments:",
  626. category: 'accessing',
  627. fn: function (aCollection){
  628. var self=this;
  629. self["@arguments"]=aCollection;
  630. return self},
  631. args: ["aCollection"],
  632. source: "arguments: aCollection\x0a\x09arguments := aCollection",
  633. messageSends: [],
  634. referencedClasses: []
  635. }),
  636. smalltalk.MethodNode);
  637. smalltalk.addMethod(
  638. "_classReferences",
  639. smalltalk.method({
  640. selector: "classReferences",
  641. category: 'accessing',
  642. fn: function (){
  643. var self=this;
  644. return self["@classReferences"];
  645. },
  646. args: [],
  647. source: "classReferences\x0a\x09^ classReferences",
  648. messageSends: [],
  649. referencedClasses: []
  650. }),
  651. smalltalk.MethodNode);
  652. smalltalk.addMethod(
  653. "_classReferences_",
  654. smalltalk.method({
  655. selector: "classReferences:",
  656. category: 'accessing',
  657. fn: function (aCollection){
  658. var self=this;
  659. self["@classReferences"]=aCollection;
  660. return self},
  661. args: ["aCollection"],
  662. source: "classReferences: aCollection\x0a\x09classReferences := aCollection",
  663. messageSends: [],
  664. referencedClasses: []
  665. }),
  666. smalltalk.MethodNode);
  667. smalltalk.addMethod(
  668. "_messageSends",
  669. smalltalk.method({
  670. selector: "messageSends",
  671. category: 'accessing',
  672. fn: function (){
  673. var self=this;
  674. return self["@messageSends"];
  675. },
  676. args: [],
  677. source: "messageSends\x0a\x09^ messageSends",
  678. messageSends: [],
  679. referencedClasses: []
  680. }),
  681. smalltalk.MethodNode);
  682. smalltalk.addMethod(
  683. "_messageSends_",
  684. smalltalk.method({
  685. selector: "messageSends:",
  686. category: 'accessing',
  687. fn: function (aCollection){
  688. var self=this;
  689. self["@messageSends"]=aCollection;
  690. return self},
  691. args: ["aCollection"],
  692. source: "messageSends: aCollection\x0a\x09messageSends := aCollection",
  693. messageSends: [],
  694. referencedClasses: []
  695. }),
  696. smalltalk.MethodNode);
  697. smalltalk.addMethod(
  698. "_scope",
  699. smalltalk.method({
  700. selector: "scope",
  701. category: 'accessing',
  702. fn: function (){
  703. var self=this;
  704. return self["@scope"];
  705. },
  706. args: [],
  707. source: "scope\x0a\x09^ scope",
  708. messageSends: [],
  709. referencedClasses: []
  710. }),
  711. smalltalk.MethodNode);
  712. smalltalk.addMethod(
  713. "_scope_",
  714. smalltalk.method({
  715. selector: "scope:",
  716. category: 'accessing',
  717. fn: function (aMethodScope){
  718. var self=this;
  719. self["@scope"]=aMethodScope;
  720. return self},
  721. args: ["aMethodScope"],
  722. source: "scope: aMethodScope\x0a\x09scope := aMethodScope",
  723. messageSends: [],
  724. referencedClasses: []
  725. }),
  726. smalltalk.MethodNode);
  727. smalltalk.addMethod(
  728. "_selector",
  729. smalltalk.method({
  730. selector: "selector",
  731. category: 'accessing',
  732. fn: function (){
  733. var self=this;
  734. return self["@selector"];
  735. },
  736. args: [],
  737. source: "selector\x0a\x09^selector",
  738. messageSends: [],
  739. referencedClasses: []
  740. }),
  741. smalltalk.MethodNode);
  742. smalltalk.addMethod(
  743. "_selector_",
  744. smalltalk.method({
  745. selector: "selector:",
  746. category: 'accessing',
  747. fn: function (aString){
  748. var self=this;
  749. self["@selector"]=aString;
  750. return self},
  751. args: ["aString"],
  752. source: "selector: aString\x0a\x09selector := aString",
  753. messageSends: [],
  754. referencedClasses: []
  755. }),
  756. smalltalk.MethodNode);
  757. smalltalk.addMethod(
  758. "_source",
  759. smalltalk.method({
  760. selector: "source",
  761. category: 'accessing',
  762. fn: function (){
  763. var self=this;
  764. return self["@source"];
  765. },
  766. args: [],
  767. source: "source\x0a\x09^source",
  768. messageSends: [],
  769. referencedClasses: []
  770. }),
  771. smalltalk.MethodNode);
  772. smalltalk.addMethod(
  773. "_source_",
  774. smalltalk.method({
  775. selector: "source:",
  776. category: 'accessing',
  777. fn: function (aString){
  778. var self=this;
  779. self["@source"]=aString;
  780. return self},
  781. args: ["aString"],
  782. source: "source: aString\x0a\x09source := aString",
  783. messageSends: [],
  784. referencedClasses: []
  785. }),
  786. smalltalk.MethodNode);
  787. smalltalk.addClass('ReturnNode', smalltalk.Node, ['scope'], 'Compiler-AST');
  788. smalltalk.addMethod(
  789. "_accept_",
  790. smalltalk.method({
  791. selector: "accept:",
  792. category: 'visiting',
  793. fn: function (aVisitor){
  794. var self=this;
  795. var $1;
  796. $1=smalltalk.send(aVisitor,"_visitReturnNode_",[self]);
  797. return $1;
  798. },
  799. args: ["aVisitor"],
  800. source: "accept: aVisitor\x0a\x09^ aVisitor visitReturnNode: self",
  801. messageSends: ["visitReturnNode:"],
  802. referencedClasses: []
  803. }),
  804. smalltalk.ReturnNode);
  805. smalltalk.addMethod(
  806. "_isReturnNode",
  807. smalltalk.method({
  808. selector: "isReturnNode",
  809. category: 'testing',
  810. fn: function (){
  811. var self=this;
  812. return true;
  813. },
  814. args: [],
  815. source: "isReturnNode\x0a\x09^ true",
  816. messageSends: [],
  817. referencedClasses: []
  818. }),
  819. smalltalk.ReturnNode);
  820. smalltalk.addMethod(
  821. "_nonLocalReturn",
  822. smalltalk.method({
  823. selector: "nonLocalReturn",
  824. category: 'testing',
  825. fn: function (){
  826. var self=this;
  827. var $1;
  828. $1=smalltalk.send(smalltalk.send(smalltalk.send(self,"_scope",[]),"_isMethodScope",[]),"_not",[]);
  829. return $1;
  830. },
  831. args: [],
  832. source: "nonLocalReturn\x0a\x09^ self scope isMethodScope not",
  833. messageSends: ["not", "isMethodScope", "scope"],
  834. referencedClasses: []
  835. }),
  836. smalltalk.ReturnNode);
  837. smalltalk.addMethod(
  838. "_scope",
  839. smalltalk.method({
  840. selector: "scope",
  841. category: 'accessing',
  842. fn: function (){
  843. var self=this;
  844. return self["@scope"];
  845. },
  846. args: [],
  847. source: "scope\x0a\x09^ scope",
  848. messageSends: [],
  849. referencedClasses: []
  850. }),
  851. smalltalk.ReturnNode);
  852. smalltalk.addMethod(
  853. "_scope_",
  854. smalltalk.method({
  855. selector: "scope:",
  856. category: 'accessing',
  857. fn: function (aLexicalScope){
  858. var self=this;
  859. self["@scope"]=aLexicalScope;
  860. return self},
  861. args: ["aLexicalScope"],
  862. source: "scope: aLexicalScope\x0a\x09scope := aLexicalScope",
  863. messageSends: [],
  864. referencedClasses: []
  865. }),
  866. smalltalk.ReturnNode);
  867. smalltalk.addClass('SendNode', smalltalk.Node, ['selector', 'arguments', 'receiver', 'superSend', 'index'], 'Compiler-AST');
  868. smalltalk.addMethod(
  869. "_accept_",
  870. smalltalk.method({
  871. selector: "accept:",
  872. category: 'visiting',
  873. fn: function (aVisitor){
  874. var self=this;
  875. var $1;
  876. $1=smalltalk.send(aVisitor,"_visitSendNode_",[self]);
  877. return $1;
  878. },
  879. args: ["aVisitor"],
  880. source: "accept: aVisitor\x0a\x09^ aVisitor visitSendNode: self",
  881. messageSends: ["visitSendNode:"],
  882. referencedClasses: []
  883. }),
  884. smalltalk.SendNode);
  885. smalltalk.addMethod(
  886. "_arguments",
  887. smalltalk.method({
  888. selector: "arguments",
  889. category: 'accessing',
  890. fn: function (){
  891. var self=this;
  892. var $1;
  893. if(($receiver = self["@arguments"]) == nil || $receiver == undefined){
  894. self["@arguments"]=[];
  895. $1=self["@arguments"];
  896. } else {
  897. $1=self["@arguments"];
  898. };
  899. return $1;
  900. },
  901. args: [],
  902. source: "arguments\x0a\x09^arguments ifNil: [arguments := #()]",
  903. messageSends: ["ifNil:"],
  904. referencedClasses: []
  905. }),
  906. smalltalk.SendNode);
  907. smalltalk.addMethod(
  908. "_arguments_",
  909. smalltalk.method({
  910. selector: "arguments:",
  911. category: 'accessing',
  912. fn: function (aCollection){
  913. var self=this;
  914. self["@arguments"]=aCollection;
  915. return self},
  916. args: ["aCollection"],
  917. source: "arguments: aCollection\x0a\x09arguments := aCollection",
  918. messageSends: [],
  919. referencedClasses: []
  920. }),
  921. smalltalk.SendNode);
  922. smalltalk.addMethod(
  923. "_cascadeNodeWithMessages_",
  924. smalltalk.method({
  925. selector: "cascadeNodeWithMessages:",
  926. category: 'accessing',
  927. fn: function (aCollection){
  928. var self=this;
  929. var $1,$2,$4,$5,$3;
  930. var first;
  931. $1=smalltalk.send((smalltalk.SendNode || SendNode),"_new",[]);
  932. smalltalk.send($1,"_selector_",[smalltalk.send(self,"_selector",[])]);
  933. smalltalk.send($1,"_arguments_",[smalltalk.send(self,"_arguments",[])]);
  934. $2=smalltalk.send($1,"_yourself",[]);
  935. first=$2;
  936. $4=smalltalk.send((smalltalk.CascadeNode || CascadeNode),"_new",[]);
  937. smalltalk.send($4,"_receiver_",[smalltalk.send(self,"_receiver",[])]);
  938. smalltalk.send($4,"_nodes_",[smalltalk.send(smalltalk.send((smalltalk.Array || Array),"_with_",[first]),"__comma",[aCollection])]);
  939. $5=smalltalk.send($4,"_yourself",[]);
  940. $3=$5;
  941. return $3;
  942. },
  943. args: ["aCollection"],
  944. source: "cascadeNodeWithMessages: aCollection\x0a\x09| first |\x0a\x09first := SendNode new\x0a\x09 selector: self selector;\x0a\x09 arguments: self arguments;\x0a\x09 yourself.\x0a\x09^CascadeNode new\x0a\x09 receiver: self receiver;\x0a\x09 nodes: (Array with: first), aCollection;\x0a\x09 yourself",
  945. messageSends: ["selector:", "selector", "new", "arguments:", "arguments", "yourself", "receiver:", "receiver", "nodes:", ",", "with:"],
  946. referencedClasses: ["SendNode", "CascadeNode", "Array"]
  947. }),
  948. smalltalk.SendNode);
  949. smalltalk.addMethod(
  950. "_index",
  951. smalltalk.method({
  952. selector: "index",
  953. category: 'accessing',
  954. fn: function (){
  955. var self=this;
  956. return self["@index"];
  957. },
  958. args: [],
  959. source: "index\x0a\x09^ index",
  960. messageSends: [],
  961. referencedClasses: []
  962. }),
  963. smalltalk.SendNode);
  964. smalltalk.addMethod(
  965. "_index_",
  966. smalltalk.method({
  967. selector: "index:",
  968. category: 'accessing',
  969. fn: function (anInteger){
  970. var self=this;
  971. self["@index"]=anInteger;
  972. return self},
  973. args: ["anInteger"],
  974. source: "index: anInteger\x0a\x09index := anInteger",
  975. messageSends: [],
  976. referencedClasses: []
  977. }),
  978. smalltalk.SendNode);
  979. smalltalk.addMethod(
  980. "_isSendNode",
  981. smalltalk.method({
  982. selector: "isSendNode",
  983. category: 'testing',
  984. fn: function (){
  985. var self=this;
  986. return true;
  987. },
  988. args: [],
  989. source: "isSendNode\x0a\x09^ true",
  990. messageSends: [],
  991. referencedClasses: []
  992. }),
  993. smalltalk.SendNode);
  994. smalltalk.addMethod(
  995. "_nodes",
  996. smalltalk.method({
  997. selector: "nodes",
  998. category: 'accessing',
  999. fn: function (){
  1000. var self=this;
  1001. var $2,$3,$1;
  1002. $2=smalltalk.send((smalltalk.Array || Array),"_withAll_",[smalltalk.send(self,"_arguments",[])]);
  1003. smalltalk.send($2,"_add_",[smalltalk.send(self,"_receiver",[])]);
  1004. $3=smalltalk.send($2,"_yourself",[]);
  1005. $1=$3;
  1006. return $1;
  1007. },
  1008. args: [],
  1009. source: "nodes\x0a\x09^ (Array withAll: self arguments)\x0a\x09\x09add: self receiver;\x0a\x09\x09yourself",
  1010. messageSends: ["add:", "receiver", "withAll:", "arguments", "yourself"],
  1011. referencedClasses: ["Array"]
  1012. }),
  1013. smalltalk.SendNode);
  1014. smalltalk.addMethod(
  1015. "_receiver",
  1016. smalltalk.method({
  1017. selector: "receiver",
  1018. category: 'accessing',
  1019. fn: function (){
  1020. var self=this;
  1021. return self["@receiver"];
  1022. },
  1023. args: [],
  1024. source: "receiver\x0a\x09^receiver",
  1025. messageSends: [],
  1026. referencedClasses: []
  1027. }),
  1028. smalltalk.SendNode);
  1029. smalltalk.addMethod(
  1030. "_receiver_",
  1031. smalltalk.method({
  1032. selector: "receiver:",
  1033. category: 'accessing',
  1034. fn: function (aNode){
  1035. var self=this;
  1036. self["@receiver"]=aNode;
  1037. return self},
  1038. args: ["aNode"],
  1039. source: "receiver: aNode\x0a\x09receiver := aNode",
  1040. messageSends: [],
  1041. referencedClasses: []
  1042. }),
  1043. smalltalk.SendNode);
  1044. smalltalk.addMethod(
  1045. "_selector",
  1046. smalltalk.method({
  1047. selector: "selector",
  1048. category: 'accessing',
  1049. fn: function (){
  1050. var self=this;
  1051. return self["@selector"];
  1052. },
  1053. args: [],
  1054. source: "selector\x0a\x09^selector",
  1055. messageSends: [],
  1056. referencedClasses: []
  1057. }),
  1058. smalltalk.SendNode);
  1059. smalltalk.addMethod(
  1060. "_selector_",
  1061. smalltalk.method({
  1062. selector: "selector:",
  1063. category: 'accessing',
  1064. fn: function (aString){
  1065. var self=this;
  1066. self["@selector"]=aString;
  1067. return self},
  1068. args: ["aString"],
  1069. source: "selector: aString\x0a\x09selector := aString",
  1070. messageSends: [],
  1071. referencedClasses: []
  1072. }),
  1073. smalltalk.SendNode);
  1074. smalltalk.addMethod(
  1075. "_superSend",
  1076. smalltalk.method({
  1077. selector: "superSend",
  1078. category: 'accessing',
  1079. fn: function (){
  1080. var self=this;
  1081. var $1;
  1082. if(($receiver = self["@superSend"]) == nil || $receiver == undefined){
  1083. $1=false;
  1084. } else {
  1085. $1=self["@superSend"];
  1086. };
  1087. return $1;
  1088. },
  1089. args: [],
  1090. source: "superSend\x0a\x09^ superSend ifNil: [ false ]",
  1091. messageSends: ["ifNil:"],
  1092. referencedClasses: []
  1093. }),
  1094. smalltalk.SendNode);
  1095. smalltalk.addMethod(
  1096. "_superSend_",
  1097. smalltalk.method({
  1098. selector: "superSend:",
  1099. category: 'accessing',
  1100. fn: function (aBoolean){
  1101. var self=this;
  1102. self["@superSend"]=aBoolean;
  1103. return self},
  1104. args: ["aBoolean"],
  1105. source: "superSend: aBoolean\x0a\x09superSend := aBoolean",
  1106. messageSends: [],
  1107. referencedClasses: []
  1108. }),
  1109. smalltalk.SendNode);
  1110. smalltalk.addMethod(
  1111. "_valueForReceiver_",
  1112. smalltalk.method({
  1113. selector: "valueForReceiver:",
  1114. category: 'accessing',
  1115. fn: function (anObject){
  1116. var self=this;
  1117. var $2,$4,$3,$5,$1;
  1118. $2=smalltalk.send((smalltalk.SendNode || SendNode),"_new",[]);
  1119. $4=smalltalk.send(self,"_receiver",[]);
  1120. if(($receiver = $4) == nil || $receiver == undefined){
  1121. $3=anObject;
  1122. } else {
  1123. $3=smalltalk.send(smalltalk.send(self,"_receiver",[]),"_valueForReceiver_",[anObject]);
  1124. };
  1125. smalltalk.send($2,"_receiver_",[$3]);
  1126. smalltalk.send($2,"_selector_",[smalltalk.send(self,"_selector",[])]);
  1127. smalltalk.send($2,"_arguments_",[smalltalk.send(self,"_arguments",[])]);
  1128. $5=smalltalk.send($2,"_yourself",[]);
  1129. $1=$5;
  1130. return $1;
  1131. },
  1132. args: ["anObject"],
  1133. source: "valueForReceiver: anObject\x0a\x09^SendNode new\x0a\x09 receiver: (self receiver \x0a\x09\x09ifNil: [anObject]\x0a\x09\x09ifNotNil: [self receiver valueForReceiver: anObject]);\x0a\x09 selector: self selector;\x0a\x09 arguments: self arguments;\x0a\x09 yourself",
  1134. messageSends: ["receiver:", "ifNil:ifNotNil:", "valueForReceiver:", "receiver", "new", "selector:", "selector", "arguments:", "arguments", "yourself"],
  1135. referencedClasses: ["SendNode"]
  1136. }),
  1137. smalltalk.SendNode);
  1138. smalltalk.addClass('SequenceNode', smalltalk.Node, ['temps', 'scope'], 'Compiler-AST');
  1139. smalltalk.addMethod(
  1140. "_accept_",
  1141. smalltalk.method({
  1142. selector: "accept:",
  1143. category: 'visiting',
  1144. fn: function (aVisitor){
  1145. var self=this;
  1146. var $1;
  1147. $1=smalltalk.send(aVisitor,"_visitSequenceNode_",[self]);
  1148. return $1;
  1149. },
  1150. args: ["aVisitor"],
  1151. source: "accept: aVisitor\x0a\x09^ aVisitor visitSequenceNode: self",
  1152. messageSends: ["visitSequenceNode:"],
  1153. referencedClasses: []
  1154. }),
  1155. smalltalk.SequenceNode);
  1156. smalltalk.addMethod(
  1157. "_asBlockSequenceNode",
  1158. smalltalk.method({
  1159. selector: "asBlockSequenceNode",
  1160. category: 'testing',
  1161. fn: function (){
  1162. var self=this;
  1163. var $2,$3,$1;
  1164. $2=smalltalk.send((smalltalk.BlockSequenceNode || BlockSequenceNode),"_new",[]);
  1165. smalltalk.send($2,"_nodes_",[smalltalk.send(self,"_nodes",[])]);
  1166. smalltalk.send($2,"_temps_",[smalltalk.send(self,"_temps",[])]);
  1167. $3=smalltalk.send($2,"_yourself",[]);
  1168. $1=$3;
  1169. return $1;
  1170. },
  1171. args: [],
  1172. source: "asBlockSequenceNode\x0a\x09^BlockSequenceNode new\x0a\x09 nodes: self nodes;\x0a\x09 temps: self temps;\x0a\x09 yourself",
  1173. messageSends: ["nodes:", "nodes", "new", "temps:", "temps", "yourself"],
  1174. referencedClasses: ["BlockSequenceNode"]
  1175. }),
  1176. smalltalk.SequenceNode);
  1177. smalltalk.addMethod(
  1178. "_scope",
  1179. smalltalk.method({
  1180. selector: "scope",
  1181. category: 'accessing',
  1182. fn: function (){
  1183. var self=this;
  1184. return self["@scope"];
  1185. },
  1186. args: [],
  1187. source: "scope\x0a\x09^ scope",
  1188. messageSends: [],
  1189. referencedClasses: []
  1190. }),
  1191. smalltalk.SequenceNode);
  1192. smalltalk.addMethod(
  1193. "_scope_",
  1194. smalltalk.method({
  1195. selector: "scope:",
  1196. category: 'accessing',
  1197. fn: function (aLexicalScope){
  1198. var self=this;
  1199. self["@scope"]=aLexicalScope;
  1200. return self},
  1201. args: ["aLexicalScope"],
  1202. source: "scope: aLexicalScope\x0a\x09scope := aLexicalScope",
  1203. messageSends: [],
  1204. referencedClasses: []
  1205. }),
  1206. smalltalk.SequenceNode);
  1207. smalltalk.addMethod(
  1208. "_temps",
  1209. smalltalk.method({
  1210. selector: "temps",
  1211. category: 'accessing',
  1212. fn: function (){
  1213. var self=this;
  1214. var $1;
  1215. if(($receiver = self["@temps"]) == nil || $receiver == undefined){
  1216. $1=[];
  1217. } else {
  1218. $1=self["@temps"];
  1219. };
  1220. return $1;
  1221. },
  1222. args: [],
  1223. source: "temps\x0a\x09^temps ifNil: [#()]",
  1224. messageSends: ["ifNil:"],
  1225. referencedClasses: []
  1226. }),
  1227. smalltalk.SequenceNode);
  1228. smalltalk.addMethod(
  1229. "_temps_",
  1230. smalltalk.method({
  1231. selector: "temps:",
  1232. category: 'accessing',
  1233. fn: function (aCollection){
  1234. var self=this;
  1235. self["@temps"]=aCollection;
  1236. return self},
  1237. args: ["aCollection"],
  1238. source: "temps: aCollection\x0a\x09temps := aCollection",
  1239. messageSends: [],
  1240. referencedClasses: []
  1241. }),
  1242. smalltalk.SequenceNode);
  1243. smalltalk.addClass('BlockSequenceNode', smalltalk.SequenceNode, [], 'Compiler-AST');
  1244. smalltalk.addMethod(
  1245. "_accept_",
  1246. smalltalk.method({
  1247. selector: "accept:",
  1248. category: 'visiting',
  1249. fn: function (aVisitor){
  1250. var self=this;
  1251. var $1;
  1252. $1=smalltalk.send(aVisitor,"_visitBlockSequenceNode_",[self]);
  1253. return $1;
  1254. },
  1255. args: ["aVisitor"],
  1256. source: "accept: aVisitor\x0a\x09^ aVisitor visitBlockSequenceNode: self",
  1257. messageSends: ["visitBlockSequenceNode:"],
  1258. referencedClasses: []
  1259. }),
  1260. smalltalk.BlockSequenceNode);
  1261. smalltalk.addMethod(
  1262. "_isBlockSequenceNode",
  1263. smalltalk.method({
  1264. selector: "isBlockSequenceNode",
  1265. category: 'testing',
  1266. fn: function (){
  1267. var self=this;
  1268. return true;
  1269. },
  1270. args: [],
  1271. source: "isBlockSequenceNode\x0a\x09^true",
  1272. messageSends: [],
  1273. referencedClasses: []
  1274. }),
  1275. smalltalk.BlockSequenceNode);
  1276. smalltalk.addClass('ValueNode', smalltalk.Node, ['value'], 'Compiler-AST');
  1277. smalltalk.addMethod(
  1278. "_accept_",
  1279. smalltalk.method({
  1280. selector: "accept:",
  1281. category: 'visiting',
  1282. fn: function (aVisitor){
  1283. var self=this;
  1284. var $1;
  1285. $1=smalltalk.send(aVisitor,"_visitValueNode_",[self]);
  1286. return $1;
  1287. },
  1288. args: ["aVisitor"],
  1289. source: "accept: aVisitor\x0a\x09^ aVisitor visitValueNode: self",
  1290. messageSends: ["visitValueNode:"],
  1291. referencedClasses: []
  1292. }),
  1293. smalltalk.ValueNode);
  1294. smalltalk.addMethod(
  1295. "_isValueNode",
  1296. smalltalk.method({
  1297. selector: "isValueNode",
  1298. category: 'testing',
  1299. fn: function (){
  1300. var self=this;
  1301. return true;
  1302. },
  1303. args: [],
  1304. source: "isValueNode\x0a\x09^true",
  1305. messageSends: [],
  1306. referencedClasses: []
  1307. }),
  1308. smalltalk.ValueNode);
  1309. smalltalk.addMethod(
  1310. "_value",
  1311. smalltalk.method({
  1312. selector: "value",
  1313. category: 'accessing',
  1314. fn: function (){
  1315. var self=this;
  1316. return self["@value"];
  1317. },
  1318. args: [],
  1319. source: "value\x0a\x09^value",
  1320. messageSends: [],
  1321. referencedClasses: []
  1322. }),
  1323. smalltalk.ValueNode);
  1324. smalltalk.addMethod(
  1325. "_value_",
  1326. smalltalk.method({
  1327. selector: "value:",
  1328. category: 'accessing',
  1329. fn: function (anObject){
  1330. var self=this;
  1331. self["@value"]=anObject;
  1332. return self},
  1333. args: ["anObject"],
  1334. source: "value: anObject\x0a\x09value := anObject",
  1335. messageSends: [],
  1336. referencedClasses: []
  1337. }),
  1338. smalltalk.ValueNode);
  1339. smalltalk.addClass('VariableNode', smalltalk.ValueNode, ['assigned', 'binding'], 'Compiler-AST');
  1340. smalltalk.addMethod(
  1341. "_accept_",
  1342. smalltalk.method({
  1343. selector: "accept:",
  1344. category: 'visiting',
  1345. fn: function (aVisitor){
  1346. var self=this;
  1347. var $1;
  1348. $1=smalltalk.send(aVisitor,"_visitVariableNode_",[self]);
  1349. return $1;
  1350. },
  1351. args: ["aVisitor"],
  1352. source: "accept: aVisitor\x0a\x09^ aVisitor visitVariableNode: self",
  1353. messageSends: ["visitVariableNode:"],
  1354. referencedClasses: []
  1355. }),
  1356. smalltalk.VariableNode);
  1357. smalltalk.addMethod(
  1358. "_alias",
  1359. smalltalk.method({
  1360. selector: "alias",
  1361. category: 'accessing',
  1362. fn: function (){
  1363. var self=this;
  1364. var $1;
  1365. $1=smalltalk.send(smalltalk.send(self,"_binding",[]),"_alias",[]);
  1366. return $1;
  1367. },
  1368. args: [],
  1369. source: "alias\x0a\x09^ self binding alias",
  1370. messageSends: ["alias", "binding"],
  1371. referencedClasses: []
  1372. }),
  1373. smalltalk.VariableNode);
  1374. smalltalk.addMethod(
  1375. "_assigned",
  1376. smalltalk.method({
  1377. selector: "assigned",
  1378. category: 'accessing',
  1379. fn: function (){
  1380. var self=this;
  1381. var $1;
  1382. if(($receiver = self["@assigned"]) == nil || $receiver == undefined){
  1383. $1=false;
  1384. } else {
  1385. $1=self["@assigned"];
  1386. };
  1387. return $1;
  1388. },
  1389. args: [],
  1390. source: "assigned\x0a\x09^assigned ifNil: [false]",
  1391. messageSends: ["ifNil:"],
  1392. referencedClasses: []
  1393. }),
  1394. smalltalk.VariableNode);
  1395. smalltalk.addMethod(
  1396. "_assigned_",
  1397. smalltalk.method({
  1398. selector: "assigned:",
  1399. category: 'accessing',
  1400. fn: function (aBoolean){
  1401. var self=this;
  1402. self["@assigned"]=aBoolean;
  1403. return self},
  1404. args: ["aBoolean"],
  1405. source: "assigned: aBoolean\x0a\x09assigned := aBoolean",
  1406. messageSends: [],
  1407. referencedClasses: []
  1408. }),
  1409. smalltalk.VariableNode);
  1410. smalltalk.addMethod(
  1411. "_beAssigned",
  1412. smalltalk.method({
  1413. selector: "beAssigned",
  1414. category: 'accessing',
  1415. fn: function (){
  1416. var self=this;
  1417. smalltalk.send(smalltalk.send(self,"_binding",[]),"_validateAssignment",[]);
  1418. self["@assigned"]=true;
  1419. return self},
  1420. args: [],
  1421. source: "beAssigned\x0a\x09self binding validateAssignment.\x0a\x09assigned := true",
  1422. messageSends: ["validateAssignment", "binding"],
  1423. referencedClasses: []
  1424. }),
  1425. smalltalk.VariableNode);
  1426. smalltalk.addMethod(
  1427. "_binding",
  1428. smalltalk.method({
  1429. selector: "binding",
  1430. category: 'accessing',
  1431. fn: function (){
  1432. var self=this;
  1433. return self["@binding"];
  1434. },
  1435. args: [],
  1436. source: "binding\x0a\x09^ binding",
  1437. messageSends: [],
  1438. referencedClasses: []
  1439. }),
  1440. smalltalk.VariableNode);
  1441. smalltalk.addMethod(
  1442. "_binding_",
  1443. smalltalk.method({
  1444. selector: "binding:",
  1445. category: 'accessing',
  1446. fn: function (aScopeVar){
  1447. var self=this;
  1448. self["@binding"]=aScopeVar;
  1449. return self},
  1450. args: ["aScopeVar"],
  1451. source: "binding: aScopeVar\x0a\x09binding := aScopeVar",
  1452. messageSends: [],
  1453. referencedClasses: []
  1454. }),
  1455. smalltalk.VariableNode);
  1456. smalltalk.addClass('ClassReferenceNode', smalltalk.VariableNode, [], 'Compiler-AST');
  1457. smalltalk.addMethod(
  1458. "_accept_",
  1459. smalltalk.method({
  1460. selector: "accept:",
  1461. category: 'visiting',
  1462. fn: function (aVisitor){
  1463. var self=this;
  1464. var $1;
  1465. $1=smalltalk.send(aVisitor,"_visitClassReferenceNode_",[self]);
  1466. return $1;
  1467. },
  1468. args: ["aVisitor"],
  1469. source: "accept: aVisitor\x0a\x09^ aVisitor visitClassReferenceNode: self",
  1470. messageSends: ["visitClassReferenceNode:"],
  1471. referencedClasses: []
  1472. }),
  1473. smalltalk.ClassReferenceNode);