1
0

Compiler-AST.deploy.js 29 KB

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