Compiler-AST.deploy.js 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206
  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.addClass('CascadeNode', smalltalk.Node, ['receiver'], 'Compiler-AST');
  340. smalltalk.addMethod(
  341. "_accept_",
  342. smalltalk.method({
  343. selector: "accept:",
  344. fn: function (aVisitor){
  345. var self=this;
  346. var $1;
  347. $1=smalltalk.send(aVisitor,"_visitCascadeNode_",[self]);
  348. return $1;
  349. }
  350. }),
  351. smalltalk.CascadeNode);
  352. smalltalk.addMethod(
  353. "_receiver",
  354. smalltalk.method({
  355. selector: "receiver",
  356. fn: function (){
  357. var self=this;
  358. return self["@receiver"];
  359. }
  360. }),
  361. smalltalk.CascadeNode);
  362. smalltalk.addMethod(
  363. "_receiver_",
  364. smalltalk.method({
  365. selector: "receiver:",
  366. fn: function (aNode){
  367. var self=this;
  368. self["@receiver"]=aNode;
  369. return self}
  370. }),
  371. smalltalk.CascadeNode);
  372. smalltalk.addClass('DynamicArrayNode', smalltalk.Node, [], 'Compiler-AST');
  373. smalltalk.addMethod(
  374. "_accept_",
  375. smalltalk.method({
  376. selector: "accept:",
  377. fn: function (aVisitor){
  378. var self=this;
  379. var $1;
  380. $1=smalltalk.send(aVisitor,"_visitDynamicArrayNode_",[self]);
  381. return $1;
  382. }
  383. }),
  384. smalltalk.DynamicArrayNode);
  385. smalltalk.addClass('DynamicDictionaryNode', smalltalk.Node, [], 'Compiler-AST');
  386. smalltalk.addMethod(
  387. "_accept_",
  388. smalltalk.method({
  389. selector: "accept:",
  390. fn: function (aVisitor){
  391. var self=this;
  392. var $1;
  393. $1=smalltalk.send(aVisitor,"_visitDynamicDictionaryNode_",[self]);
  394. return $1;
  395. }
  396. }),
  397. smalltalk.DynamicDictionaryNode);
  398. smalltalk.addClass('JSStatementNode', smalltalk.Node, ['source'], 'Compiler-AST');
  399. smalltalk.addMethod(
  400. "_accept_",
  401. smalltalk.method({
  402. selector: "accept:",
  403. fn: function (aVisitor){
  404. var self=this;
  405. var $1;
  406. $1=smalltalk.send(aVisitor,"_visitJSStatementNode_",[self]);
  407. return $1;
  408. }
  409. }),
  410. smalltalk.JSStatementNode);
  411. smalltalk.addMethod(
  412. "_source",
  413. smalltalk.method({
  414. selector: "source",
  415. fn: function (){
  416. var self=this;
  417. var $1;
  418. if(($receiver = self["@source"]) == nil || $receiver == undefined){
  419. $1="";
  420. } else {
  421. $1=self["@source"];
  422. };
  423. return $1;
  424. }
  425. }),
  426. smalltalk.JSStatementNode);
  427. smalltalk.addMethod(
  428. "_source_",
  429. smalltalk.method({
  430. selector: "source:",
  431. fn: function (aString){
  432. var self=this;
  433. self["@source"]=aString;
  434. return self}
  435. }),
  436. smalltalk.JSStatementNode);
  437. smalltalk.addClass('MethodNode', smalltalk.Node, ['selector', 'arguments', 'source', 'scope', 'classReferences', 'messageSends'], 'Compiler-AST');
  438. smalltalk.addMethod(
  439. "_accept_",
  440. smalltalk.method({
  441. selector: "accept:",
  442. fn: function (aVisitor){
  443. var self=this;
  444. var $1;
  445. $1=smalltalk.send(aVisitor,"_visitMethodNode_",[self]);
  446. return $1;
  447. }
  448. }),
  449. smalltalk.MethodNode);
  450. smalltalk.addMethod(
  451. "_arguments",
  452. smalltalk.method({
  453. selector: "arguments",
  454. fn: function (){
  455. var self=this;
  456. var $1;
  457. if(($receiver = self["@arguments"]) == nil || $receiver == undefined){
  458. $1=[];
  459. } else {
  460. $1=self["@arguments"];
  461. };
  462. return $1;
  463. }
  464. }),
  465. smalltalk.MethodNode);
  466. smalltalk.addMethod(
  467. "_arguments_",
  468. smalltalk.method({
  469. selector: "arguments:",
  470. fn: function (aCollection){
  471. var self=this;
  472. self["@arguments"]=aCollection;
  473. return self}
  474. }),
  475. smalltalk.MethodNode);
  476. smalltalk.addMethod(
  477. "_classReferences",
  478. smalltalk.method({
  479. selector: "classReferences",
  480. fn: function (){
  481. var self=this;
  482. return self["@classReferences"];
  483. }
  484. }),
  485. smalltalk.MethodNode);
  486. smalltalk.addMethod(
  487. "_classReferences_",
  488. smalltalk.method({
  489. selector: "classReferences:",
  490. fn: function (aCollection){
  491. var self=this;
  492. self["@classReferences"]=aCollection;
  493. return self}
  494. }),
  495. smalltalk.MethodNode);
  496. smalltalk.addMethod(
  497. "_messageSends",
  498. smalltalk.method({
  499. selector: "messageSends",
  500. fn: function (){
  501. var self=this;
  502. return self["@messageSends"];
  503. }
  504. }),
  505. smalltalk.MethodNode);
  506. smalltalk.addMethod(
  507. "_messageSends_",
  508. smalltalk.method({
  509. selector: "messageSends:",
  510. fn: function (aCollection){
  511. var self=this;
  512. self["@messageSends"]=aCollection;
  513. return self}
  514. }),
  515. smalltalk.MethodNode);
  516. smalltalk.addMethod(
  517. "_scope",
  518. smalltalk.method({
  519. selector: "scope",
  520. fn: function (){
  521. var self=this;
  522. return self["@scope"];
  523. }
  524. }),
  525. smalltalk.MethodNode);
  526. smalltalk.addMethod(
  527. "_scope_",
  528. smalltalk.method({
  529. selector: "scope:",
  530. fn: function (aMethodScope){
  531. var self=this;
  532. self["@scope"]=aMethodScope;
  533. return self}
  534. }),
  535. smalltalk.MethodNode);
  536. smalltalk.addMethod(
  537. "_selector",
  538. smalltalk.method({
  539. selector: "selector",
  540. fn: function (){
  541. var self=this;
  542. return self["@selector"];
  543. }
  544. }),
  545. smalltalk.MethodNode);
  546. smalltalk.addMethod(
  547. "_selector_",
  548. smalltalk.method({
  549. selector: "selector:",
  550. fn: function (aString){
  551. var self=this;
  552. self["@selector"]=aString;
  553. return self}
  554. }),
  555. smalltalk.MethodNode);
  556. smalltalk.addMethod(
  557. "_source",
  558. smalltalk.method({
  559. selector: "source",
  560. fn: function (){
  561. var self=this;
  562. return self["@source"];
  563. }
  564. }),
  565. smalltalk.MethodNode);
  566. smalltalk.addMethod(
  567. "_source_",
  568. smalltalk.method({
  569. selector: "source:",
  570. fn: function (aString){
  571. var self=this;
  572. self["@source"]=aString;
  573. return self}
  574. }),
  575. smalltalk.MethodNode);
  576. smalltalk.addClass('ReturnNode', smalltalk.Node, ['scope'], 'Compiler-AST');
  577. smalltalk.addMethod(
  578. "_accept_",
  579. smalltalk.method({
  580. selector: "accept:",
  581. fn: function (aVisitor){
  582. var self=this;
  583. var $1;
  584. $1=smalltalk.send(aVisitor,"_visitReturnNode_",[self]);
  585. return $1;
  586. }
  587. }),
  588. smalltalk.ReturnNode);
  589. smalltalk.addMethod(
  590. "_isReturnNode",
  591. smalltalk.method({
  592. selector: "isReturnNode",
  593. fn: function (){
  594. var self=this;
  595. return true;
  596. }
  597. }),
  598. smalltalk.ReturnNode);
  599. smalltalk.addMethod(
  600. "_nonLocalReturn",
  601. smalltalk.method({
  602. selector: "nonLocalReturn",
  603. fn: function (){
  604. var self=this;
  605. var $1;
  606. $1=smalltalk.send(smalltalk.send(smalltalk.send(self,"_scope",[]),"_isMethodScope",[]),"_not",[]);
  607. return $1;
  608. }
  609. }),
  610. smalltalk.ReturnNode);
  611. smalltalk.addMethod(
  612. "_scope",
  613. smalltalk.method({
  614. selector: "scope",
  615. fn: function (){
  616. var self=this;
  617. return self["@scope"];
  618. }
  619. }),
  620. smalltalk.ReturnNode);
  621. smalltalk.addMethod(
  622. "_scope_",
  623. smalltalk.method({
  624. selector: "scope:",
  625. fn: function (aLexicalScope){
  626. var self=this;
  627. self["@scope"]=aLexicalScope;
  628. return self}
  629. }),
  630. smalltalk.ReturnNode);
  631. smalltalk.addClass('SendNode', smalltalk.Node, ['selector', 'arguments', 'receiver', 'superSend', 'index'], 'Compiler-AST');
  632. smalltalk.addMethod(
  633. "_accept_",
  634. smalltalk.method({
  635. selector: "accept:",
  636. fn: function (aVisitor){
  637. var self=this;
  638. var $1;
  639. $1=smalltalk.send(aVisitor,"_visitSendNode_",[self]);
  640. return $1;
  641. }
  642. }),
  643. smalltalk.SendNode);
  644. smalltalk.addMethod(
  645. "_arguments",
  646. smalltalk.method({
  647. selector: "arguments",
  648. fn: function (){
  649. var self=this;
  650. var $1;
  651. if(($receiver = self["@arguments"]) == nil || $receiver == undefined){
  652. self["@arguments"]=[];
  653. $1=self["@arguments"];
  654. } else {
  655. $1=self["@arguments"];
  656. };
  657. return $1;
  658. }
  659. }),
  660. smalltalk.SendNode);
  661. smalltalk.addMethod(
  662. "_arguments_",
  663. smalltalk.method({
  664. selector: "arguments:",
  665. fn: function (aCollection){
  666. var self=this;
  667. self["@arguments"]=aCollection;
  668. return self}
  669. }),
  670. smalltalk.SendNode);
  671. smalltalk.addMethod(
  672. "_cascadeNodeWithMessages_",
  673. smalltalk.method({
  674. selector: "cascadeNodeWithMessages:",
  675. fn: function (aCollection){
  676. var self=this;
  677. var $1,$2,$4,$5,$3;
  678. var first;
  679. $1=smalltalk.send((smalltalk.SendNode || SendNode),"_new",[]);
  680. smalltalk.send($1,"_selector_",[smalltalk.send(self,"_selector",[])]);
  681. smalltalk.send($1,"_arguments_",[smalltalk.send(self,"_arguments",[])]);
  682. $2=smalltalk.send($1,"_yourself",[]);
  683. first=$2;
  684. $4=smalltalk.send((smalltalk.CascadeNode || CascadeNode),"_new",[]);
  685. smalltalk.send($4,"_receiver_",[smalltalk.send(self,"_receiver",[])]);
  686. smalltalk.send($4,"_nodes_",[smalltalk.send(smalltalk.send((smalltalk.Array || Array),"_with_",[first]),"__comma",[aCollection])]);
  687. $5=smalltalk.send($4,"_yourself",[]);
  688. $3=$5;
  689. return $3;
  690. }
  691. }),
  692. smalltalk.SendNode);
  693. smalltalk.addMethod(
  694. "_index",
  695. smalltalk.method({
  696. selector: "index",
  697. fn: function (){
  698. var self=this;
  699. return self["@index"];
  700. }
  701. }),
  702. smalltalk.SendNode);
  703. smalltalk.addMethod(
  704. "_index_",
  705. smalltalk.method({
  706. selector: "index:",
  707. fn: function (anInteger){
  708. var self=this;
  709. self["@index"]=anInteger;
  710. return self}
  711. }),
  712. smalltalk.SendNode);
  713. smalltalk.addMethod(
  714. "_isSendNode",
  715. smalltalk.method({
  716. selector: "isSendNode",
  717. fn: function (){
  718. var self=this;
  719. return true;
  720. }
  721. }),
  722. smalltalk.SendNode);
  723. smalltalk.addMethod(
  724. "_nodes",
  725. smalltalk.method({
  726. selector: "nodes",
  727. fn: function (){
  728. var self=this;
  729. var $2,$3,$1;
  730. $2=smalltalk.send((smalltalk.Array || Array),"_withAll_",[smalltalk.send(self,"_arguments",[])]);
  731. smalltalk.send($2,"_add_",[smalltalk.send(self,"_receiver",[])]);
  732. $3=smalltalk.send($2,"_yourself",[]);
  733. $1=$3;
  734. return $1;
  735. }
  736. }),
  737. smalltalk.SendNode);
  738. smalltalk.addMethod(
  739. "_receiver",
  740. smalltalk.method({
  741. selector: "receiver",
  742. fn: function (){
  743. var self=this;
  744. return self["@receiver"];
  745. }
  746. }),
  747. smalltalk.SendNode);
  748. smalltalk.addMethod(
  749. "_receiver_",
  750. smalltalk.method({
  751. selector: "receiver:",
  752. fn: function (aNode){
  753. var self=this;
  754. self["@receiver"]=aNode;
  755. return self}
  756. }),
  757. smalltalk.SendNode);
  758. smalltalk.addMethod(
  759. "_selector",
  760. smalltalk.method({
  761. selector: "selector",
  762. fn: function (){
  763. var self=this;
  764. return self["@selector"];
  765. }
  766. }),
  767. smalltalk.SendNode);
  768. smalltalk.addMethod(
  769. "_selector_",
  770. smalltalk.method({
  771. selector: "selector:",
  772. fn: function (aString){
  773. var self=this;
  774. self["@selector"]=aString;
  775. return self}
  776. }),
  777. smalltalk.SendNode);
  778. smalltalk.addMethod(
  779. "_superSend",
  780. smalltalk.method({
  781. selector: "superSend",
  782. fn: function (){
  783. var self=this;
  784. var $1;
  785. if(($receiver = self["@superSend"]) == nil || $receiver == undefined){
  786. $1=false;
  787. } else {
  788. $1=self["@superSend"];
  789. };
  790. return $1;
  791. }
  792. }),
  793. smalltalk.SendNode);
  794. smalltalk.addMethod(
  795. "_superSend_",
  796. smalltalk.method({
  797. selector: "superSend:",
  798. fn: function (aBoolean){
  799. var self=this;
  800. self["@superSend"]=aBoolean;
  801. return self}
  802. }),
  803. smalltalk.SendNode);
  804. smalltalk.addMethod(
  805. "_valueForReceiver_",
  806. smalltalk.method({
  807. selector: "valueForReceiver:",
  808. fn: function (anObject){
  809. var self=this;
  810. var $2,$4,$3,$5,$1;
  811. $2=smalltalk.send((smalltalk.SendNode || SendNode),"_new",[]);
  812. $4=smalltalk.send(self,"_receiver",[]);
  813. if(($receiver = $4) == nil || $receiver == undefined){
  814. $3=anObject;
  815. } else {
  816. $3=smalltalk.send(smalltalk.send(self,"_receiver",[]),"_valueForReceiver_",[anObject]);
  817. };
  818. smalltalk.send($2,"_receiver_",[$3]);
  819. smalltalk.send($2,"_selector_",[smalltalk.send(self,"_selector",[])]);
  820. smalltalk.send($2,"_arguments_",[smalltalk.send(self,"_arguments",[])]);
  821. $5=smalltalk.send($2,"_yourself",[]);
  822. $1=$5;
  823. return $1;
  824. }
  825. }),
  826. smalltalk.SendNode);
  827. smalltalk.addClass('SequenceNode', smalltalk.Node, ['temps', 'scope'], 'Compiler-AST');
  828. smalltalk.addMethod(
  829. "_accept_",
  830. smalltalk.method({
  831. selector: "accept:",
  832. fn: function (aVisitor){
  833. var self=this;
  834. var $1;
  835. $1=smalltalk.send(aVisitor,"_visitSequenceNode_",[self]);
  836. return $1;
  837. }
  838. }),
  839. smalltalk.SequenceNode);
  840. smalltalk.addMethod(
  841. "_asBlockSequenceNode",
  842. smalltalk.method({
  843. selector: "asBlockSequenceNode",
  844. fn: function (){
  845. var self=this;
  846. var $2,$3,$1;
  847. $2=smalltalk.send((smalltalk.BlockSequenceNode || BlockSequenceNode),"_new",[]);
  848. smalltalk.send($2,"_nodes_",[smalltalk.send(self,"_nodes",[])]);
  849. smalltalk.send($2,"_temps_",[smalltalk.send(self,"_temps",[])]);
  850. $3=smalltalk.send($2,"_yourself",[]);
  851. $1=$3;
  852. return $1;
  853. }
  854. }),
  855. smalltalk.SequenceNode);
  856. smalltalk.addMethod(
  857. "_scope",
  858. smalltalk.method({
  859. selector: "scope",
  860. fn: function (){
  861. var self=this;
  862. return self["@scope"];
  863. }
  864. }),
  865. smalltalk.SequenceNode);
  866. smalltalk.addMethod(
  867. "_scope_",
  868. smalltalk.method({
  869. selector: "scope:",
  870. fn: function (aLexicalScope){
  871. var self=this;
  872. self["@scope"]=aLexicalScope;
  873. return self}
  874. }),
  875. smalltalk.SequenceNode);
  876. smalltalk.addMethod(
  877. "_temps",
  878. smalltalk.method({
  879. selector: "temps",
  880. fn: function (){
  881. var self=this;
  882. var $1;
  883. if(($receiver = self["@temps"]) == nil || $receiver == undefined){
  884. $1=[];
  885. } else {
  886. $1=self["@temps"];
  887. };
  888. return $1;
  889. }
  890. }),
  891. smalltalk.SequenceNode);
  892. smalltalk.addMethod(
  893. "_temps_",
  894. smalltalk.method({
  895. selector: "temps:",
  896. fn: function (aCollection){
  897. var self=this;
  898. self["@temps"]=aCollection;
  899. return self}
  900. }),
  901. smalltalk.SequenceNode);
  902. smalltalk.addClass('BlockSequenceNode', smalltalk.SequenceNode, [], 'Compiler-AST');
  903. smalltalk.addMethod(
  904. "_accept_",
  905. smalltalk.method({
  906. selector: "accept:",
  907. fn: function (aVisitor){
  908. var self=this;
  909. var $1;
  910. $1=smalltalk.send(aVisitor,"_visitBlockSequenceNode_",[self]);
  911. return $1;
  912. }
  913. }),
  914. smalltalk.BlockSequenceNode);
  915. smalltalk.addMethod(
  916. "_isBlockSequenceNode",
  917. smalltalk.method({
  918. selector: "isBlockSequenceNode",
  919. fn: function (){
  920. var self=this;
  921. return true;
  922. }
  923. }),
  924. smalltalk.BlockSequenceNode);
  925. smalltalk.addClass('ValueNode', smalltalk.Node, ['value'], 'Compiler-AST');
  926. smalltalk.addMethod(
  927. "_accept_",
  928. smalltalk.method({
  929. selector: "accept:",
  930. fn: function (aVisitor){
  931. var self=this;
  932. var $1;
  933. $1=smalltalk.send(aVisitor,"_visitValueNode_",[self]);
  934. return $1;
  935. }
  936. }),
  937. smalltalk.ValueNode);
  938. smalltalk.addMethod(
  939. "_isImmutable",
  940. smalltalk.method({
  941. selector: "isImmutable",
  942. fn: function (){
  943. var self=this;
  944. var $1;
  945. $1=true;
  946. return $1;
  947. }
  948. }),
  949. smalltalk.ValueNode);
  950. smalltalk.addMethod(
  951. "_isValueNode",
  952. smalltalk.method({
  953. selector: "isValueNode",
  954. fn: function (){
  955. var self=this;
  956. return true;
  957. }
  958. }),
  959. smalltalk.ValueNode);
  960. smalltalk.addMethod(
  961. "_value",
  962. smalltalk.method({
  963. selector: "value",
  964. fn: function (){
  965. var self=this;
  966. return self["@value"];
  967. }
  968. }),
  969. smalltalk.ValueNode);
  970. smalltalk.addMethod(
  971. "_value_",
  972. smalltalk.method({
  973. selector: "value:",
  974. fn: function (anObject){
  975. var self=this;
  976. self["@value"]=anObject;
  977. return self}
  978. }),
  979. smalltalk.ValueNode);
  980. smalltalk.addClass('VariableNode', smalltalk.ValueNode, ['assigned', 'binding'], 'Compiler-AST');
  981. smalltalk.addMethod(
  982. "_accept_",
  983. smalltalk.method({
  984. selector: "accept:",
  985. fn: function (aVisitor){
  986. var self=this;
  987. var $1;
  988. $1=smalltalk.send(aVisitor,"_visitVariableNode_",[self]);
  989. return $1;
  990. }
  991. }),
  992. smalltalk.VariableNode);
  993. smalltalk.addMethod(
  994. "_alias",
  995. smalltalk.method({
  996. selector: "alias",
  997. fn: function (){
  998. var self=this;
  999. var $1;
  1000. $1=smalltalk.send(smalltalk.send(self,"_binding",[]),"_alias",[]);
  1001. return $1;
  1002. }
  1003. }),
  1004. smalltalk.VariableNode);
  1005. smalltalk.addMethod(
  1006. "_assigned",
  1007. smalltalk.method({
  1008. selector: "assigned",
  1009. fn: function (){
  1010. var self=this;
  1011. var $1;
  1012. if(($receiver = self["@assigned"]) == nil || $receiver == undefined){
  1013. $1=false;
  1014. } else {
  1015. $1=self["@assigned"];
  1016. };
  1017. return $1;
  1018. }
  1019. }),
  1020. smalltalk.VariableNode);
  1021. smalltalk.addMethod(
  1022. "_assigned_",
  1023. smalltalk.method({
  1024. selector: "assigned:",
  1025. fn: function (aBoolean){
  1026. var self=this;
  1027. self["@assigned"]=aBoolean;
  1028. return self}
  1029. }),
  1030. smalltalk.VariableNode);
  1031. smalltalk.addMethod(
  1032. "_beAssigned",
  1033. smalltalk.method({
  1034. selector: "beAssigned",
  1035. fn: function (){
  1036. var self=this;
  1037. smalltalk.send(smalltalk.send(self,"_binding",[]),"_validateAssignment",[]);
  1038. self["@assigned"]=true;
  1039. return self}
  1040. }),
  1041. smalltalk.VariableNode);
  1042. smalltalk.addMethod(
  1043. "_binding",
  1044. smalltalk.method({
  1045. selector: "binding",
  1046. fn: function (){
  1047. var self=this;
  1048. return self["@binding"];
  1049. }
  1050. }),
  1051. smalltalk.VariableNode);
  1052. smalltalk.addMethod(
  1053. "_binding_",
  1054. smalltalk.method({
  1055. selector: "binding:",
  1056. fn: function (aScopeVar){
  1057. var self=this;
  1058. self["@binding"]=aScopeVar;
  1059. return self}
  1060. }),
  1061. smalltalk.VariableNode);
  1062. smalltalk.addMethod(
  1063. "_isImmutable",
  1064. smalltalk.method({
  1065. selector: "isImmutable",
  1066. fn: function (){
  1067. var self=this;
  1068. return false;
  1069. }
  1070. }),
  1071. smalltalk.VariableNode);
  1072. smalltalk.addClass('ClassReferenceNode', smalltalk.VariableNode, [], 'Compiler-AST');
  1073. smalltalk.addMethod(
  1074. "_accept_",
  1075. smalltalk.method({
  1076. selector: "accept:",
  1077. fn: function (aVisitor){
  1078. var self=this;
  1079. var $1;
  1080. $1=smalltalk.send(aVisitor,"_visitClassReferenceNode_",[self]);
  1081. return $1;
  1082. }
  1083. }),
  1084. smalltalk.ClassReferenceNode);