Compiler-AST.deploy.js 20 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150
  1. smalltalk.addPackage('Compiler-AST', {});
  2. smalltalk.addClass('Node', smalltalk.Object, ['nodes', 'shouldBeInlined', 'shouldBeAliased'], 'Compiler-AST');
  3. smalltalk.addMethod(
  4. "_accept_",
  5. smalltalk.method({
  6. selector: "accept:",
  7. fn: function (aVisitor){
  8. var self=this;
  9. var $1;
  10. $1=smalltalk.send(aVisitor,"_visitNode_",[self]);
  11. return $1;
  12. }
  13. }),
  14. smalltalk.Node);
  15. smalltalk.addMethod(
  16. "_addNode_",
  17. smalltalk.method({
  18. selector: "addNode:",
  19. fn: function (aNode){
  20. var self=this;
  21. smalltalk.send(smalltalk.send(self,"_nodes",[]),"_add_",[aNode]);
  22. return self}
  23. }),
  24. smalltalk.Node);
  25. smalltalk.addMethod(
  26. "_isAssignmentNode",
  27. smalltalk.method({
  28. selector: "isAssignmentNode",
  29. fn: function (){
  30. var self=this;
  31. return false;
  32. }
  33. }),
  34. smalltalk.Node);
  35. smalltalk.addMethod(
  36. "_isBlockNode",
  37. smalltalk.method({
  38. selector: "isBlockNode",
  39. fn: function (){
  40. var self=this;
  41. return false;
  42. }
  43. }),
  44. smalltalk.Node);
  45. smalltalk.addMethod(
  46. "_isBlockSequenceNode",
  47. smalltalk.method({
  48. selector: "isBlockSequenceNode",
  49. fn: function (){
  50. var self=this;
  51. return false;
  52. }
  53. }),
  54. smalltalk.Node);
  55. smalltalk.addMethod(
  56. "_isReturnNode",
  57. smalltalk.method({
  58. selector: "isReturnNode",
  59. fn: function (){
  60. var self=this;
  61. return false;
  62. }
  63. }),
  64. smalltalk.Node);
  65. smalltalk.addMethod(
  66. "_isSendNode",
  67. smalltalk.method({
  68. selector: "isSendNode",
  69. fn: function (){
  70. var self=this;
  71. return false;
  72. }
  73. }),
  74. smalltalk.Node);
  75. smalltalk.addMethod(
  76. "_isValueNode",
  77. smalltalk.method({
  78. selector: "isValueNode",
  79. fn: function (){
  80. var self=this;
  81. return false;
  82. }
  83. }),
  84. smalltalk.Node);
  85. smalltalk.addMethod(
  86. "_nodes",
  87. smalltalk.method({
  88. selector: "nodes",
  89. fn: function (){
  90. var self=this;
  91. var $1;
  92. if(($receiver = self["@nodes"]) == nil || $receiver == undefined){
  93. self["@nodes"]=smalltalk.send((smalltalk.Array || Array),"_new",[]);
  94. $1=self["@nodes"];
  95. } else {
  96. $1=self["@nodes"];
  97. };
  98. return $1;
  99. }
  100. }),
  101. smalltalk.Node);
  102. smalltalk.addMethod(
  103. "_nodes_",
  104. smalltalk.method({
  105. selector: "nodes:",
  106. fn: function (aCollection){
  107. var self=this;
  108. self["@nodes"]=aCollection;
  109. return self}
  110. }),
  111. smalltalk.Node);
  112. smalltalk.addMethod(
  113. "_shouldBeAliased",
  114. smalltalk.method({
  115. selector: "shouldBeAliased",
  116. fn: function (){
  117. var self=this;
  118. var $1;
  119. if(($receiver = self["@shouldBeAliased"]) == nil || $receiver == undefined){
  120. $1=false;
  121. } else {
  122. $1=self["@shouldBeAliased"];
  123. };
  124. return $1;
  125. }
  126. }),
  127. smalltalk.Node);
  128. smalltalk.addMethod(
  129. "_shouldBeAliased_",
  130. smalltalk.method({
  131. selector: "shouldBeAliased:",
  132. fn: function (aBoolean){
  133. var self=this;
  134. self["@shouldBeAliased"]=aBoolean;
  135. return self}
  136. }),
  137. smalltalk.Node);
  138. smalltalk.addMethod(
  139. "_shouldBeInlined",
  140. smalltalk.method({
  141. selector: "shouldBeInlined",
  142. fn: function (){
  143. var self=this;
  144. var $1;
  145. if(($receiver = self["@shouldBeInlined"]) == nil || $receiver == undefined){
  146. $1=false;
  147. } else {
  148. $1=self["@shouldBeInlined"];
  149. };
  150. return $1;
  151. }
  152. }),
  153. smalltalk.Node);
  154. smalltalk.addMethod(
  155. "_shouldBeInlined_",
  156. smalltalk.method({
  157. selector: "shouldBeInlined:",
  158. fn: function (aBoolean){
  159. var self=this;
  160. self["@shouldBeInlined"]=aBoolean;
  161. return self}
  162. }),
  163. smalltalk.Node);
  164. smalltalk.addClass('AssignmentNode', smalltalk.Node, ['left', 'right'], 'Compiler-AST');
  165. smalltalk.addMethod(
  166. "_accept_",
  167. smalltalk.method({
  168. selector: "accept:",
  169. fn: function (aVisitor){
  170. var self=this;
  171. var $1;
  172. $1=smalltalk.send(aVisitor,"_visitAssignmentNode_",[self]);
  173. return $1;
  174. }
  175. }),
  176. smalltalk.AssignmentNode);
  177. smalltalk.addMethod(
  178. "_isAssignmentNode",
  179. smalltalk.method({
  180. selector: "isAssignmentNode",
  181. fn: function (){
  182. var self=this;
  183. return true;
  184. }
  185. }),
  186. smalltalk.AssignmentNode);
  187. smalltalk.addMethod(
  188. "_left",
  189. smalltalk.method({
  190. selector: "left",
  191. fn: function (){
  192. var self=this;
  193. return self["@left"];
  194. }
  195. }),
  196. smalltalk.AssignmentNode);
  197. smalltalk.addMethod(
  198. "_left_",
  199. smalltalk.method({
  200. selector: "left:",
  201. fn: function (aNode){
  202. var self=this;
  203. self["@left"]=aNode;
  204. return self}
  205. }),
  206. smalltalk.AssignmentNode);
  207. smalltalk.addMethod(
  208. "_nodes",
  209. smalltalk.method({
  210. selector: "nodes",
  211. fn: function (){
  212. var self=this;
  213. var $1;
  214. $1=smalltalk.send((smalltalk.Array || Array),"_with_with_",[smalltalk.send(self,"_left",[]),smalltalk.send(self,"_right",[])]);
  215. return $1;
  216. }
  217. }),
  218. smalltalk.AssignmentNode);
  219. smalltalk.addMethod(
  220. "_right",
  221. smalltalk.method({
  222. selector: "right",
  223. fn: function (){
  224. var self=this;
  225. return self["@right"];
  226. }
  227. }),
  228. smalltalk.AssignmentNode);
  229. smalltalk.addMethod(
  230. "_right_",
  231. smalltalk.method({
  232. selector: "right:",
  233. fn: function (aNode){
  234. var self=this;
  235. self["@right"]=aNode;
  236. return self}
  237. }),
  238. smalltalk.AssignmentNode);
  239. smalltalk.addClass('BlockNode', smalltalk.Node, ['parameters', 'scope'], 'Compiler-AST');
  240. smalltalk.addMethod(
  241. "_accept_",
  242. smalltalk.method({
  243. selector: "accept:",
  244. fn: function (aVisitor){
  245. var self=this;
  246. var $1;
  247. $1=smalltalk.send(aVisitor,"_visitBlockNode_",[self]);
  248. return $1;
  249. }
  250. }),
  251. smalltalk.BlockNode);
  252. smalltalk.addMethod(
  253. "_isBlockNode",
  254. smalltalk.method({
  255. selector: "isBlockNode",
  256. fn: function (){
  257. var self=this;
  258. return true;
  259. }
  260. }),
  261. smalltalk.BlockNode);
  262. smalltalk.addMethod(
  263. "_parameters",
  264. smalltalk.method({
  265. selector: "parameters",
  266. fn: function (){
  267. var self=this;
  268. var $1;
  269. if(($receiver = self["@parameters"]) == nil || $receiver == undefined){
  270. self["@parameters"]=smalltalk.send((smalltalk.Array || Array),"_new",[]);
  271. $1=self["@parameters"];
  272. } else {
  273. $1=self["@parameters"];
  274. };
  275. return $1;
  276. }
  277. }),
  278. smalltalk.BlockNode);
  279. smalltalk.addMethod(
  280. "_parameters_",
  281. smalltalk.method({
  282. selector: "parameters:",
  283. fn: function (aCollection){
  284. var self=this;
  285. self["@parameters"]=aCollection;
  286. return self}
  287. }),
  288. smalltalk.BlockNode);
  289. smalltalk.addMethod(
  290. "_scope",
  291. smalltalk.method({
  292. selector: "scope",
  293. fn: function (){
  294. var self=this;
  295. return self["@scope"];
  296. }
  297. }),
  298. smalltalk.BlockNode);
  299. smalltalk.addMethod(
  300. "_scope_",
  301. smalltalk.method({
  302. selector: "scope:",
  303. fn: function (aLexicalScope){
  304. var self=this;
  305. self["@scope"]=aLexicalScope;
  306. return self}
  307. }),
  308. smalltalk.BlockNode);
  309. smalltalk.addClass('CascadeNode', smalltalk.Node, ['receiver'], 'Compiler-AST');
  310. smalltalk.addMethod(
  311. "_accept_",
  312. smalltalk.method({
  313. selector: "accept:",
  314. fn: function (aVisitor){
  315. var self=this;
  316. var $1;
  317. $1=smalltalk.send(aVisitor,"_visitCascadeNode_",[self]);
  318. return $1;
  319. }
  320. }),
  321. smalltalk.CascadeNode);
  322. smalltalk.addMethod(
  323. "_receiver",
  324. smalltalk.method({
  325. selector: "receiver",
  326. fn: function (){
  327. var self=this;
  328. return self["@receiver"];
  329. }
  330. }),
  331. smalltalk.CascadeNode);
  332. smalltalk.addMethod(
  333. "_receiver_",
  334. smalltalk.method({
  335. selector: "receiver:",
  336. fn: function (aNode){
  337. var self=this;
  338. self["@receiver"]=aNode;
  339. return self}
  340. }),
  341. smalltalk.CascadeNode);
  342. smalltalk.addClass('DynamicArrayNode', smalltalk.Node, [], 'Compiler-AST');
  343. smalltalk.addMethod(
  344. "_accept_",
  345. smalltalk.method({
  346. selector: "accept:",
  347. fn: function (aVisitor){
  348. var self=this;
  349. var $1;
  350. $1=smalltalk.send(aVisitor,"_visitDynamicArrayNode_",[self]);
  351. return $1;
  352. }
  353. }),
  354. smalltalk.DynamicArrayNode);
  355. smalltalk.addClass('DynamicDictionaryNode', smalltalk.Node, [], 'Compiler-AST');
  356. smalltalk.addMethod(
  357. "_accept_",
  358. smalltalk.method({
  359. selector: "accept:",
  360. fn: function (aVisitor){
  361. var self=this;
  362. var $1;
  363. $1=smalltalk.send(aVisitor,"_visitDynamicDictionaryNode_",[self]);
  364. return $1;
  365. }
  366. }),
  367. smalltalk.DynamicDictionaryNode);
  368. smalltalk.addClass('JSStatementNode', smalltalk.Node, ['source'], 'Compiler-AST');
  369. smalltalk.addMethod(
  370. "_accept_",
  371. smalltalk.method({
  372. selector: "accept:",
  373. fn: function (aVisitor){
  374. var self=this;
  375. var $1;
  376. $1=smalltalk.send(aVisitor,"_visitJSStatementNode_",[self]);
  377. return $1;
  378. }
  379. }),
  380. smalltalk.JSStatementNode);
  381. smalltalk.addMethod(
  382. "_source",
  383. smalltalk.method({
  384. selector: "source",
  385. fn: function (){
  386. var self=this;
  387. var $1;
  388. if(($receiver = self["@source"]) == nil || $receiver == undefined){
  389. $1="";
  390. } else {
  391. $1=self["@source"];
  392. };
  393. return $1;
  394. }
  395. }),
  396. smalltalk.JSStatementNode);
  397. smalltalk.addMethod(
  398. "_source_",
  399. smalltalk.method({
  400. selector: "source:",
  401. fn: function (aString){
  402. var self=this;
  403. self["@source"]=aString;
  404. return self}
  405. }),
  406. smalltalk.JSStatementNode);
  407. smalltalk.addClass('MethodNode', smalltalk.Node, ['selector', 'arguments', 'source', 'scope', 'classReferences', 'messageSends'], 'Compiler-AST');
  408. smalltalk.addMethod(
  409. "_accept_",
  410. smalltalk.method({
  411. selector: "accept:",
  412. fn: function (aVisitor){
  413. var self=this;
  414. var $1;
  415. $1=smalltalk.send(aVisitor,"_visitMethodNode_",[self]);
  416. return $1;
  417. }
  418. }),
  419. smalltalk.MethodNode);
  420. smalltalk.addMethod(
  421. "_arguments",
  422. smalltalk.method({
  423. selector: "arguments",
  424. fn: function (){
  425. var self=this;
  426. var $1;
  427. if(($receiver = self["@arguments"]) == nil || $receiver == undefined){
  428. $1=[];
  429. } else {
  430. $1=self["@arguments"];
  431. };
  432. return $1;
  433. }
  434. }),
  435. smalltalk.MethodNode);
  436. smalltalk.addMethod(
  437. "_arguments_",
  438. smalltalk.method({
  439. selector: "arguments:",
  440. fn: function (aCollection){
  441. var self=this;
  442. self["@arguments"]=aCollection;
  443. return self}
  444. }),
  445. smalltalk.MethodNode);
  446. smalltalk.addMethod(
  447. "_classReferences",
  448. smalltalk.method({
  449. selector: "classReferences",
  450. fn: function (){
  451. var self=this;
  452. return self["@classReferences"];
  453. }
  454. }),
  455. smalltalk.MethodNode);
  456. smalltalk.addMethod(
  457. "_classReferences_",
  458. smalltalk.method({
  459. selector: "classReferences:",
  460. fn: function (aCollection){
  461. var self=this;
  462. self["@classReferences"]=aCollection;
  463. return self}
  464. }),
  465. smalltalk.MethodNode);
  466. smalltalk.addMethod(
  467. "_messageSends",
  468. smalltalk.method({
  469. selector: "messageSends",
  470. fn: function (){
  471. var self=this;
  472. return self["@messageSends"];
  473. }
  474. }),
  475. smalltalk.MethodNode);
  476. smalltalk.addMethod(
  477. "_messageSends_",
  478. smalltalk.method({
  479. selector: "messageSends:",
  480. fn: function (aCollection){
  481. var self=this;
  482. self["@messageSends"]=aCollection;
  483. return self}
  484. }),
  485. smalltalk.MethodNode);
  486. smalltalk.addMethod(
  487. "_scope",
  488. smalltalk.method({
  489. selector: "scope",
  490. fn: function (){
  491. var self=this;
  492. return self["@scope"];
  493. }
  494. }),
  495. smalltalk.MethodNode);
  496. smalltalk.addMethod(
  497. "_scope_",
  498. smalltalk.method({
  499. selector: "scope:",
  500. fn: function (aMethodScope){
  501. var self=this;
  502. self["@scope"]=aMethodScope;
  503. return self}
  504. }),
  505. smalltalk.MethodNode);
  506. smalltalk.addMethod(
  507. "_selector",
  508. smalltalk.method({
  509. selector: "selector",
  510. fn: function (){
  511. var self=this;
  512. return self["@selector"];
  513. }
  514. }),
  515. smalltalk.MethodNode);
  516. smalltalk.addMethod(
  517. "_selector_",
  518. smalltalk.method({
  519. selector: "selector:",
  520. fn: function (aString){
  521. var self=this;
  522. self["@selector"]=aString;
  523. return self}
  524. }),
  525. smalltalk.MethodNode);
  526. smalltalk.addMethod(
  527. "_source",
  528. smalltalk.method({
  529. selector: "source",
  530. fn: function (){
  531. var self=this;
  532. return self["@source"];
  533. }
  534. }),
  535. smalltalk.MethodNode);
  536. smalltalk.addMethod(
  537. "_source_",
  538. smalltalk.method({
  539. selector: "source:",
  540. fn: function (aString){
  541. var self=this;
  542. self["@source"]=aString;
  543. return self}
  544. }),
  545. smalltalk.MethodNode);
  546. smalltalk.addClass('ReturnNode', smalltalk.Node, ['scope'], 'Compiler-AST');
  547. smalltalk.addMethod(
  548. "_accept_",
  549. smalltalk.method({
  550. selector: "accept:",
  551. fn: function (aVisitor){
  552. var self=this;
  553. var $1;
  554. $1=smalltalk.send(aVisitor,"_visitReturnNode_",[self]);
  555. return $1;
  556. }
  557. }),
  558. smalltalk.ReturnNode);
  559. smalltalk.addMethod(
  560. "_isReturnNode",
  561. smalltalk.method({
  562. selector: "isReturnNode",
  563. fn: function (){
  564. var self=this;
  565. return true;
  566. }
  567. }),
  568. smalltalk.ReturnNode);
  569. smalltalk.addMethod(
  570. "_nonLocalReturn",
  571. smalltalk.method({
  572. selector: "nonLocalReturn",
  573. fn: function (){
  574. var self=this;
  575. var $1;
  576. $1=smalltalk.send(smalltalk.send(smalltalk.send(self,"_scope",[]),"_isMethodScope",[]),"_not",[]);
  577. return $1;
  578. }
  579. }),
  580. smalltalk.ReturnNode);
  581. smalltalk.addMethod(
  582. "_scope",
  583. smalltalk.method({
  584. selector: "scope",
  585. fn: function (){
  586. var self=this;
  587. return self["@scope"];
  588. }
  589. }),
  590. smalltalk.ReturnNode);
  591. smalltalk.addMethod(
  592. "_scope_",
  593. smalltalk.method({
  594. selector: "scope:",
  595. fn: function (aLexicalScope){
  596. var self=this;
  597. self["@scope"]=aLexicalScope;
  598. return self}
  599. }),
  600. smalltalk.ReturnNode);
  601. smalltalk.addClass('SendNode', smalltalk.Node, ['selector', 'arguments', 'receiver', 'superSend', 'index'], 'Compiler-AST');
  602. smalltalk.addMethod(
  603. "_accept_",
  604. smalltalk.method({
  605. selector: "accept:",
  606. fn: function (aVisitor){
  607. var self=this;
  608. var $1;
  609. $1=smalltalk.send(aVisitor,"_visitSendNode_",[self]);
  610. return $1;
  611. }
  612. }),
  613. smalltalk.SendNode);
  614. smalltalk.addMethod(
  615. "_arguments",
  616. smalltalk.method({
  617. selector: "arguments",
  618. fn: function (){
  619. var self=this;
  620. var $1;
  621. if(($receiver = self["@arguments"]) == nil || $receiver == undefined){
  622. self["@arguments"]=[];
  623. $1=self["@arguments"];
  624. } else {
  625. $1=self["@arguments"];
  626. };
  627. return $1;
  628. }
  629. }),
  630. smalltalk.SendNode);
  631. smalltalk.addMethod(
  632. "_arguments_",
  633. smalltalk.method({
  634. selector: "arguments:",
  635. fn: function (aCollection){
  636. var self=this;
  637. self["@arguments"]=aCollection;
  638. return self}
  639. }),
  640. smalltalk.SendNode);
  641. smalltalk.addMethod(
  642. "_cascadeNodeWithMessages_",
  643. smalltalk.method({
  644. selector: "cascadeNodeWithMessages:",
  645. fn: function (aCollection){
  646. var self=this;
  647. var $1,$2,$4,$5,$3;
  648. var first;
  649. $1=smalltalk.send((smalltalk.SendNode || SendNode),"_new",[]);
  650. smalltalk.send($1,"_selector_",[smalltalk.send(self,"_selector",[])]);
  651. smalltalk.send($1,"_arguments_",[smalltalk.send(self,"_arguments",[])]);
  652. $2=smalltalk.send($1,"_yourself",[]);
  653. first=$2;
  654. $4=smalltalk.send((smalltalk.CascadeNode || CascadeNode),"_new",[]);
  655. smalltalk.send($4,"_receiver_",[smalltalk.send(self,"_receiver",[])]);
  656. smalltalk.send($4,"_nodes_",[smalltalk.send(smalltalk.send((smalltalk.Array || Array),"_with_",[first]),"__comma",[aCollection])]);
  657. $5=smalltalk.send($4,"_yourself",[]);
  658. $3=$5;
  659. return $3;
  660. }
  661. }),
  662. smalltalk.SendNode);
  663. smalltalk.addMethod(
  664. "_index",
  665. smalltalk.method({
  666. selector: "index",
  667. fn: function (){
  668. var self=this;
  669. return self["@index"];
  670. }
  671. }),
  672. smalltalk.SendNode);
  673. smalltalk.addMethod(
  674. "_index_",
  675. smalltalk.method({
  676. selector: "index:",
  677. fn: function (anInteger){
  678. var self=this;
  679. self["@index"]=anInteger;
  680. return self}
  681. }),
  682. smalltalk.SendNode);
  683. smalltalk.addMethod(
  684. "_isSendNode",
  685. smalltalk.method({
  686. selector: "isSendNode",
  687. fn: function (){
  688. var self=this;
  689. return true;
  690. }
  691. }),
  692. smalltalk.SendNode);
  693. smalltalk.addMethod(
  694. "_nodes",
  695. smalltalk.method({
  696. selector: "nodes",
  697. fn: function (){
  698. var self=this;
  699. var $2,$3,$1;
  700. $2=smalltalk.send((smalltalk.Array || Array),"_withAll_",[smalltalk.send(self,"_arguments",[])]);
  701. smalltalk.send($2,"_add_",[smalltalk.send(self,"_receiver",[])]);
  702. $3=smalltalk.send($2,"_yourself",[]);
  703. $1=$3;
  704. return $1;
  705. }
  706. }),
  707. smalltalk.SendNode);
  708. smalltalk.addMethod(
  709. "_receiver",
  710. smalltalk.method({
  711. selector: "receiver",
  712. fn: function (){
  713. var self=this;
  714. return self["@receiver"];
  715. }
  716. }),
  717. smalltalk.SendNode);
  718. smalltalk.addMethod(
  719. "_receiver_",
  720. smalltalk.method({
  721. selector: "receiver:",
  722. fn: function (aNode){
  723. var self=this;
  724. self["@receiver"]=aNode;
  725. return self}
  726. }),
  727. smalltalk.SendNode);
  728. smalltalk.addMethod(
  729. "_selector",
  730. smalltalk.method({
  731. selector: "selector",
  732. fn: function (){
  733. var self=this;
  734. return self["@selector"];
  735. }
  736. }),
  737. smalltalk.SendNode);
  738. smalltalk.addMethod(
  739. "_selector_",
  740. smalltalk.method({
  741. selector: "selector:",
  742. fn: function (aString){
  743. var self=this;
  744. self["@selector"]=aString;
  745. return self}
  746. }),
  747. smalltalk.SendNode);
  748. smalltalk.addMethod(
  749. "_superSend",
  750. smalltalk.method({
  751. selector: "superSend",
  752. fn: function (){
  753. var self=this;
  754. var $1;
  755. if(($receiver = self["@superSend"]) == nil || $receiver == undefined){
  756. $1=false;
  757. } else {
  758. $1=self["@superSend"];
  759. };
  760. return $1;
  761. }
  762. }),
  763. smalltalk.SendNode);
  764. smalltalk.addMethod(
  765. "_superSend_",
  766. smalltalk.method({
  767. selector: "superSend:",
  768. fn: function (aBoolean){
  769. var self=this;
  770. self["@superSend"]=aBoolean;
  771. return self}
  772. }),
  773. smalltalk.SendNode);
  774. smalltalk.addMethod(
  775. "_valueForReceiver_",
  776. smalltalk.method({
  777. selector: "valueForReceiver:",
  778. fn: function (anObject){
  779. var self=this;
  780. var $2,$4,$3,$5,$1;
  781. $2=smalltalk.send((smalltalk.SendNode || SendNode),"_new",[]);
  782. $4=smalltalk.send(self,"_receiver",[]);
  783. if(($receiver = $4) == nil || $receiver == undefined){
  784. $3=anObject;
  785. } else {
  786. $3=smalltalk.send(smalltalk.send(self,"_receiver",[]),"_valueForReceiver_",[anObject]);
  787. };
  788. smalltalk.send($2,"_receiver_",[$3]);
  789. smalltalk.send($2,"_selector_",[smalltalk.send(self,"_selector",[])]);
  790. smalltalk.send($2,"_arguments_",[smalltalk.send(self,"_arguments",[])]);
  791. $5=smalltalk.send($2,"_yourself",[]);
  792. $1=$5;
  793. return $1;
  794. }
  795. }),
  796. smalltalk.SendNode);
  797. smalltalk.addClass('SequenceNode', smalltalk.Node, ['temps', 'scope'], 'Compiler-AST');
  798. smalltalk.addMethod(
  799. "_accept_",
  800. smalltalk.method({
  801. selector: "accept:",
  802. fn: function (aVisitor){
  803. var self=this;
  804. var $1;
  805. $1=smalltalk.send(aVisitor,"_visitSequenceNode_",[self]);
  806. return $1;
  807. }
  808. }),
  809. smalltalk.SequenceNode);
  810. smalltalk.addMethod(
  811. "_asBlockSequenceNode",
  812. smalltalk.method({
  813. selector: "asBlockSequenceNode",
  814. fn: function (){
  815. var self=this;
  816. var $2,$3,$1;
  817. $2=smalltalk.send((smalltalk.BlockSequenceNode || BlockSequenceNode),"_new",[]);
  818. smalltalk.send($2,"_nodes_",[smalltalk.send(self,"_nodes",[])]);
  819. smalltalk.send($2,"_temps_",[smalltalk.send(self,"_temps",[])]);
  820. $3=smalltalk.send($2,"_yourself",[]);
  821. $1=$3;
  822. return $1;
  823. }
  824. }),
  825. smalltalk.SequenceNode);
  826. smalltalk.addMethod(
  827. "_scope",
  828. smalltalk.method({
  829. selector: "scope",
  830. fn: function (){
  831. var self=this;
  832. return self["@scope"];
  833. }
  834. }),
  835. smalltalk.SequenceNode);
  836. smalltalk.addMethod(
  837. "_scope_",
  838. smalltalk.method({
  839. selector: "scope:",
  840. fn: function (aLexicalScope){
  841. var self=this;
  842. self["@scope"]=aLexicalScope;
  843. return self}
  844. }),
  845. smalltalk.SequenceNode);
  846. smalltalk.addMethod(
  847. "_temps",
  848. smalltalk.method({
  849. selector: "temps",
  850. fn: function (){
  851. var self=this;
  852. var $1;
  853. if(($receiver = self["@temps"]) == nil || $receiver == undefined){
  854. $1=[];
  855. } else {
  856. $1=self["@temps"];
  857. };
  858. return $1;
  859. }
  860. }),
  861. smalltalk.SequenceNode);
  862. smalltalk.addMethod(
  863. "_temps_",
  864. smalltalk.method({
  865. selector: "temps:",
  866. fn: function (aCollection){
  867. var self=this;
  868. self["@temps"]=aCollection;
  869. return self}
  870. }),
  871. smalltalk.SequenceNode);
  872. smalltalk.addClass('BlockSequenceNode', smalltalk.SequenceNode, [], 'Compiler-AST');
  873. smalltalk.addMethod(
  874. "_accept_",
  875. smalltalk.method({
  876. selector: "accept:",
  877. fn: function (aVisitor){
  878. var self=this;
  879. var $1;
  880. $1=smalltalk.send(aVisitor,"_visitBlockSequenceNode_",[self]);
  881. return $1;
  882. }
  883. }),
  884. smalltalk.BlockSequenceNode);
  885. smalltalk.addMethod(
  886. "_isBlockSequenceNode",
  887. smalltalk.method({
  888. selector: "isBlockSequenceNode",
  889. fn: function (){
  890. var self=this;
  891. return true;
  892. }
  893. }),
  894. smalltalk.BlockSequenceNode);
  895. smalltalk.addClass('ValueNode', smalltalk.Node, ['value'], 'Compiler-AST');
  896. smalltalk.addMethod(
  897. "_accept_",
  898. smalltalk.method({
  899. selector: "accept:",
  900. fn: function (aVisitor){
  901. var self=this;
  902. var $1;
  903. $1=smalltalk.send(aVisitor,"_visitValueNode_",[self]);
  904. return $1;
  905. }
  906. }),
  907. smalltalk.ValueNode);
  908. smalltalk.addMethod(
  909. "_isValueNode",
  910. smalltalk.method({
  911. selector: "isValueNode",
  912. fn: function (){
  913. var self=this;
  914. return true;
  915. }
  916. }),
  917. smalltalk.ValueNode);
  918. smalltalk.addMethod(
  919. "_value",
  920. smalltalk.method({
  921. selector: "value",
  922. fn: function (){
  923. var self=this;
  924. return self["@value"];
  925. }
  926. }),
  927. smalltalk.ValueNode);
  928. smalltalk.addMethod(
  929. "_value_",
  930. smalltalk.method({
  931. selector: "value:",
  932. fn: function (anObject){
  933. var self=this;
  934. self["@value"]=anObject;
  935. return self}
  936. }),
  937. smalltalk.ValueNode);
  938. smalltalk.addClass('VariableNode', smalltalk.ValueNode, ['assigned', 'binding'], 'Compiler-AST');
  939. smalltalk.addMethod(
  940. "_accept_",
  941. smalltalk.method({
  942. selector: "accept:",
  943. fn: function (aVisitor){
  944. var self=this;
  945. var $1;
  946. $1=smalltalk.send(aVisitor,"_visitVariableNode_",[self]);
  947. return $1;
  948. }
  949. }),
  950. smalltalk.VariableNode);
  951. smalltalk.addMethod(
  952. "_alias",
  953. smalltalk.method({
  954. selector: "alias",
  955. fn: function (){
  956. var self=this;
  957. var $1;
  958. $1=smalltalk.send(smalltalk.send(self,"_binding",[]),"_alias",[]);
  959. return $1;
  960. }
  961. }),
  962. smalltalk.VariableNode);
  963. smalltalk.addMethod(
  964. "_assigned",
  965. smalltalk.method({
  966. selector: "assigned",
  967. fn: function (){
  968. var self=this;
  969. var $1;
  970. if(($receiver = self["@assigned"]) == nil || $receiver == undefined){
  971. $1=false;
  972. } else {
  973. $1=self["@assigned"];
  974. };
  975. return $1;
  976. }
  977. }),
  978. smalltalk.VariableNode);
  979. smalltalk.addMethod(
  980. "_assigned_",
  981. smalltalk.method({
  982. selector: "assigned:",
  983. fn: function (aBoolean){
  984. var self=this;
  985. self["@assigned"]=aBoolean;
  986. return self}
  987. }),
  988. smalltalk.VariableNode);
  989. smalltalk.addMethod(
  990. "_beAssigned",
  991. smalltalk.method({
  992. selector: "beAssigned",
  993. fn: function (){
  994. var self=this;
  995. smalltalk.send(smalltalk.send(self,"_binding",[]),"_validateAssignment",[]);
  996. self["@assigned"]=true;
  997. return self}
  998. }),
  999. smalltalk.VariableNode);
  1000. smalltalk.addMethod(
  1001. "_binding",
  1002. smalltalk.method({
  1003. selector: "binding",
  1004. fn: function (){
  1005. var self=this;
  1006. return self["@binding"];
  1007. }
  1008. }),
  1009. smalltalk.VariableNode);
  1010. smalltalk.addMethod(
  1011. "_binding_",
  1012. smalltalk.method({
  1013. selector: "binding:",
  1014. fn: function (aScopeVar){
  1015. var self=this;
  1016. self["@binding"]=aScopeVar;
  1017. return self}
  1018. }),
  1019. smalltalk.VariableNode);
  1020. smalltalk.addClass('ClassReferenceNode', smalltalk.VariableNode, [], 'Compiler-AST');
  1021. smalltalk.addMethod(
  1022. "_accept_",
  1023. smalltalk.method({
  1024. selector: "accept:",
  1025. fn: function (aVisitor){
  1026. var self=this;
  1027. var $1;
  1028. $1=smalltalk.send(aVisitor,"_visitClassReferenceNode_",[self]);
  1029. return $1;
  1030. }
  1031. }),
  1032. smalltalk.ClassReferenceNode);