Compiler-AST.deploy.js 21 KB

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