Compiler-AST.deploy.js 30 KB

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