Compiler-AST.deploy.js 21 KB

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