Compiler-AST.deploy.js 30 KB

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