Compiler-AST.deploy.js 43 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578
  1. smalltalk.addPackage('Compiler-AST');
  2. smalltalk.addClass('Node', smalltalk.Object, ['parent', 'position', 'nodes', 'shouldBeInlined', 'shouldBeAliased'], 'Compiler-AST');
  3. smalltalk.addMethod(
  4. smalltalk.method({
  5. selector: "accept:",
  6. fn: function (aVisitor){
  7. var self=this;
  8. return smalltalk.withContext(function($ctx1) {
  9. var $1;
  10. $1=_st(aVisitor)._visitNode_(self);
  11. return $1;
  12. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},smalltalk.Node)})},
  13. messageSends: ["visitNode:"]}),
  14. smalltalk.Node);
  15. smalltalk.addMethod(
  16. smalltalk.method({
  17. selector: "addNode:",
  18. fn: function (aNode){
  19. var self=this;
  20. return smalltalk.withContext(function($ctx1) {
  21. _st(self._nodes())._add_(aNode);
  22. _st(aNode)._parent_(self);
  23. return self}, function($ctx1) {$ctx1.fill(self,"addNode:",{aNode:aNode},smalltalk.Node)})},
  24. messageSends: ["add:", "nodes", "parent:"]}),
  25. smalltalk.Node);
  26. smalltalk.addMethod(
  27. smalltalk.method({
  28. selector: "extent",
  29. fn: function (){
  30. var self=this;
  31. return smalltalk.withContext(function($ctx1) {
  32. var $2,$3,$1;
  33. $2=self._nextNode();
  34. if(($receiver = $2) == nil || $receiver == undefined){
  35. $3=self._parent();
  36. if(($receiver = $3) == nil || $receiver == undefined){
  37. $1=$3;
  38. } else {
  39. var node;
  40. node=$receiver;
  41. $1=_st(node)._extent();
  42. };
  43. } else {
  44. var node;
  45. node=$receiver;
  46. $1=_st(node)._position();
  47. };
  48. return $1;
  49. }, function($ctx1) {$ctx1.fill(self,"extent",{},smalltalk.Node)})},
  50. messageSends: ["ifNil:ifNotNil:", "ifNotNil:", "extent", "parent", "position", "nextNode"]}),
  51. smalltalk.Node);
  52. smalltalk.addMethod(
  53. smalltalk.method({
  54. selector: "isAssignmentNode",
  55. fn: function (){
  56. var self=this;
  57. return smalltalk.withContext(function($ctx1) {
  58. return false;
  59. }, function($ctx1) {$ctx1.fill(self,"isAssignmentNode",{},smalltalk.Node)})},
  60. messageSends: []}),
  61. smalltalk.Node);
  62. smalltalk.addMethod(
  63. smalltalk.method({
  64. selector: "isBlockNode",
  65. fn: function (){
  66. var self=this;
  67. return smalltalk.withContext(function($ctx1) {
  68. return false;
  69. }, function($ctx1) {$ctx1.fill(self,"isBlockNode",{},smalltalk.Node)})},
  70. messageSends: []}),
  71. smalltalk.Node);
  72. smalltalk.addMethod(
  73. smalltalk.method({
  74. selector: "isBlockSequenceNode",
  75. fn: function (){
  76. var self=this;
  77. return smalltalk.withContext(function($ctx1) {
  78. return false;
  79. }, function($ctx1) {$ctx1.fill(self,"isBlockSequenceNode",{},smalltalk.Node)})},
  80. messageSends: []}),
  81. smalltalk.Node);
  82. smalltalk.addMethod(
  83. smalltalk.method({
  84. selector: "isImmutable",
  85. fn: function (){
  86. var self=this;
  87. return smalltalk.withContext(function($ctx1) {
  88. return false;
  89. }, function($ctx1) {$ctx1.fill(self,"isImmutable",{},smalltalk.Node)})},
  90. messageSends: []}),
  91. smalltalk.Node);
  92. smalltalk.addMethod(
  93. smalltalk.method({
  94. selector: "isJSStatementNode",
  95. fn: function (){
  96. var self=this;
  97. return smalltalk.withContext(function($ctx1) {
  98. return false;
  99. }, function($ctx1) {$ctx1.fill(self,"isJSStatementNode",{},smalltalk.Node)})},
  100. messageSends: []}),
  101. smalltalk.Node);
  102. smalltalk.addMethod(
  103. smalltalk.method({
  104. selector: "isNode",
  105. fn: function (){
  106. var self=this;
  107. return smalltalk.withContext(function($ctx1) {
  108. return true;
  109. }, function($ctx1) {$ctx1.fill(self,"isNode",{},smalltalk.Node)})},
  110. messageSends: []}),
  111. smalltalk.Node);
  112. smalltalk.addMethod(
  113. smalltalk.method({
  114. selector: "isReturnNode",
  115. fn: function (){
  116. var self=this;
  117. return smalltalk.withContext(function($ctx1) {
  118. return false;
  119. }, function($ctx1) {$ctx1.fill(self,"isReturnNode",{},smalltalk.Node)})},
  120. messageSends: []}),
  121. smalltalk.Node);
  122. smalltalk.addMethod(
  123. smalltalk.method({
  124. selector: "isSendNode",
  125. fn: function (){
  126. var self=this;
  127. return smalltalk.withContext(function($ctx1) {
  128. return false;
  129. }, function($ctx1) {$ctx1.fill(self,"isSendNode",{},smalltalk.Node)})},
  130. messageSends: []}),
  131. smalltalk.Node);
  132. smalltalk.addMethod(
  133. smalltalk.method({
  134. selector: "isValueNode",
  135. fn: function (){
  136. var self=this;
  137. return smalltalk.withContext(function($ctx1) {
  138. return false;
  139. }, function($ctx1) {$ctx1.fill(self,"isValueNode",{},smalltalk.Node)})},
  140. messageSends: []}),
  141. smalltalk.Node);
  142. smalltalk.addMethod(
  143. smalltalk.method({
  144. selector: "nextChild",
  145. fn: function (){
  146. var self=this;
  147. return smalltalk.withContext(function($ctx1) {
  148. var $2,$1;
  149. $2=_st(self._nodes())._isEmpty();
  150. if(smalltalk.assert($2)){
  151. $1=self;
  152. } else {
  153. $1=_st(_st(self._nodes())._first())._nextChild();
  154. };
  155. return $1;
  156. }, function($ctx1) {$ctx1.fill(self,"nextChild",{},smalltalk.Node)})},
  157. messageSends: ["ifTrue:ifFalse:", "nextChild", "first", "nodes", "isEmpty"]}),
  158. smalltalk.Node);
  159. smalltalk.addMethod(
  160. smalltalk.method({
  161. selector: "nextNode",
  162. fn: function (){
  163. var self=this;
  164. return smalltalk.withContext(function($ctx1) {
  165. var $2,$1;
  166. $2=self._parent();
  167. if(($receiver = $2) == nil || $receiver == undefined){
  168. $1=$2;
  169. } else {
  170. var node;
  171. node=$receiver;
  172. $1=_st(node)._nextNode_(self);
  173. };
  174. return $1;
  175. }, function($ctx1) {$ctx1.fill(self,"nextNode",{},smalltalk.Node)})},
  176. messageSends: ["ifNotNil:", "nextNode:", "parent"]}),
  177. smalltalk.Node);
  178. smalltalk.addMethod(
  179. smalltalk.method({
  180. selector: "nextNode:",
  181. fn: function (aNode){
  182. var self=this;
  183. var next;
  184. return smalltalk.withContext(function($ctx1) {
  185. var $1,$2;
  186. var $early={};
  187. try {
  188. next=_st(self._nodes())._at_ifAbsent_(_st(_st(self._nodes())._indexOf_(aNode)).__plus((1)),(function(){
  189. return smalltalk.withContext(function($ctx2) {
  190. $1=self;
  191. throw $early=[$1];
  192. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  193. $2=_st(next)._nextChild();
  194. return $2;
  195. }
  196. catch(e) {if(e===$early)return e[0]; throw e}
  197. }, function($ctx1) {$ctx1.fill(self,"nextNode:",{aNode:aNode,next:next},smalltalk.Node)})},
  198. messageSends: ["at:ifAbsent:", "+", "indexOf:", "nodes", "nextChild"]}),
  199. smalltalk.Node);
  200. smalltalk.addMethod(
  201. smalltalk.method({
  202. selector: "nodes",
  203. fn: function (){
  204. var self=this;
  205. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  206. return smalltalk.withContext(function($ctx1) {
  207. var $2,$1;
  208. $2=self["@nodes"];
  209. if(($receiver = $2) == nil || $receiver == undefined){
  210. self["@nodes"]=_st($Array())._new();
  211. $1=self["@nodes"];
  212. } else {
  213. $1=$2;
  214. };
  215. return $1;
  216. }, function($ctx1) {$ctx1.fill(self,"nodes",{},smalltalk.Node)})},
  217. messageSends: ["ifNil:", "new"]}),
  218. smalltalk.Node);
  219. smalltalk.addMethod(
  220. smalltalk.method({
  221. selector: "nodes:",
  222. fn: function (aCollection){
  223. var self=this;
  224. return smalltalk.withContext(function($ctx1) {
  225. self["@nodes"]=aCollection;
  226. _st(aCollection)._do_((function(each){
  227. return smalltalk.withContext(function($ctx2) {
  228. return _st(each)._parent_(self);
  229. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  230. return self}, function($ctx1) {$ctx1.fill(self,"nodes:",{aCollection:aCollection},smalltalk.Node)})},
  231. messageSends: ["do:", "parent:"]}),
  232. smalltalk.Node);
  233. smalltalk.addMethod(
  234. smalltalk.method({
  235. selector: "parent",
  236. fn: function (){
  237. var self=this;
  238. return smalltalk.withContext(function($ctx1) {
  239. var $1;
  240. $1=self["@parent"];
  241. return $1;
  242. }, function($ctx1) {$ctx1.fill(self,"parent",{},smalltalk.Node)})},
  243. messageSends: []}),
  244. smalltalk.Node);
  245. smalltalk.addMethod(
  246. smalltalk.method({
  247. selector: "parent:",
  248. fn: function (aNode){
  249. var self=this;
  250. return smalltalk.withContext(function($ctx1) {
  251. self["@parent"]=aNode;
  252. return self}, function($ctx1) {$ctx1.fill(self,"parent:",{aNode:aNode},smalltalk.Node)})},
  253. messageSends: []}),
  254. smalltalk.Node);
  255. smalltalk.addMethod(
  256. smalltalk.method({
  257. selector: "position",
  258. fn: function (){
  259. var self=this;
  260. return smalltalk.withContext(function($ctx1) {
  261. var $2,$3,$1;
  262. $2=self["@position"];
  263. if(($receiver = $2) == nil || $receiver == undefined){
  264. $3=self._parent();
  265. if(($receiver = $3) == nil || $receiver == undefined){
  266. $1=$3;
  267. } else {
  268. var node;
  269. node=$receiver;
  270. $1=_st(node)._position();
  271. };
  272. } else {
  273. $1=$2;
  274. };
  275. return $1;
  276. }, function($ctx1) {$ctx1.fill(self,"position",{},smalltalk.Node)})},
  277. messageSends: ["ifNil:", "ifNotNil:", "position", "parent"]}),
  278. smalltalk.Node);
  279. smalltalk.addMethod(
  280. smalltalk.method({
  281. selector: "position:",
  282. fn: function (aPosition){
  283. var self=this;
  284. return smalltalk.withContext(function($ctx1) {
  285. self["@position"]=aPosition;
  286. return self}, function($ctx1) {$ctx1.fill(self,"position:",{aPosition:aPosition},smalltalk.Node)})},
  287. messageSends: []}),
  288. smalltalk.Node);
  289. smalltalk.addMethod(
  290. smalltalk.method({
  291. selector: "shouldBeAliased",
  292. fn: function (){
  293. var self=this;
  294. return smalltalk.withContext(function($ctx1) {
  295. var $2,$1;
  296. $2=self["@shouldBeAliased"];
  297. if(($receiver = $2) == nil || $receiver == undefined){
  298. $1=false;
  299. } else {
  300. $1=$2;
  301. };
  302. return $1;
  303. }, function($ctx1) {$ctx1.fill(self,"shouldBeAliased",{},smalltalk.Node)})},
  304. messageSends: ["ifNil:"]}),
  305. smalltalk.Node);
  306. smalltalk.addMethod(
  307. smalltalk.method({
  308. selector: "shouldBeAliased:",
  309. fn: function (aBoolean){
  310. var self=this;
  311. return smalltalk.withContext(function($ctx1) {
  312. self["@shouldBeAliased"]=aBoolean;
  313. return self}, function($ctx1) {$ctx1.fill(self,"shouldBeAliased:",{aBoolean:aBoolean},smalltalk.Node)})},
  314. messageSends: []}),
  315. smalltalk.Node);
  316. smalltalk.addMethod(
  317. smalltalk.method({
  318. selector: "shouldBeInlined",
  319. fn: function (){
  320. var self=this;
  321. return smalltalk.withContext(function($ctx1) {
  322. var $2,$1;
  323. $2=self["@shouldBeInlined"];
  324. if(($receiver = $2) == nil || $receiver == undefined){
  325. $1=false;
  326. } else {
  327. $1=$2;
  328. };
  329. return $1;
  330. }, function($ctx1) {$ctx1.fill(self,"shouldBeInlined",{},smalltalk.Node)})},
  331. messageSends: ["ifNil:"]}),
  332. smalltalk.Node);
  333. smalltalk.addMethod(
  334. smalltalk.method({
  335. selector: "shouldBeInlined:",
  336. fn: function (aBoolean){
  337. var self=this;
  338. return smalltalk.withContext(function($ctx1) {
  339. self["@shouldBeInlined"]=aBoolean;
  340. return self}, function($ctx1) {$ctx1.fill(self,"shouldBeInlined:",{aBoolean:aBoolean},smalltalk.Node)})},
  341. messageSends: []}),
  342. smalltalk.Node);
  343. smalltalk.addMethod(
  344. smalltalk.method({
  345. selector: "stopOnStepping",
  346. fn: function (){
  347. var self=this;
  348. return smalltalk.withContext(function($ctx1) {
  349. return false;
  350. }, function($ctx1) {$ctx1.fill(self,"stopOnStepping",{},smalltalk.Node)})},
  351. messageSends: []}),
  352. smalltalk.Node);
  353. smalltalk.addMethod(
  354. smalltalk.method({
  355. selector: "subtreeNeedsAliasing",
  356. fn: function (){
  357. var self=this;
  358. return smalltalk.withContext(function($ctx1) {
  359. var $1;
  360. $1=_st(_st(self._shouldBeAliased())._or_((function(){
  361. return smalltalk.withContext(function($ctx2) {
  362. return self._shouldBeInlined();
  363. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})))._or_((function(){
  364. return smalltalk.withContext(function($ctx2) {
  365. return _st(_st(self._nodes())._detect_ifNone_((function(each){
  366. return smalltalk.withContext(function($ctx3) {
  367. return _st(each)._subtreeNeedsAliasing();
  368. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2)})}),(function(){
  369. return smalltalk.withContext(function($ctx3) {
  370. return false;
  371. }, function($ctx3) {$ctx3.fillBlock({},$ctx2)})}))).__tild_eq(false);
  372. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  373. return $1;
  374. }, function($ctx1) {$ctx1.fill(self,"subtreeNeedsAliasing",{},smalltalk.Node)})},
  375. messageSends: ["or:", "~=", "detect:ifNone:", "subtreeNeedsAliasing", "nodes", "shouldBeInlined", "shouldBeAliased"]}),
  376. smalltalk.Node);
  377. smalltalk.addClass('AssignmentNode', smalltalk.Node, ['left', 'right'], 'Compiler-AST');
  378. smalltalk.addMethod(
  379. smalltalk.method({
  380. selector: "accept:",
  381. fn: function (aVisitor){
  382. var self=this;
  383. return smalltalk.withContext(function($ctx1) {
  384. var $1;
  385. $1=_st(aVisitor)._visitAssignmentNode_(self);
  386. return $1;
  387. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},smalltalk.AssignmentNode)})},
  388. messageSends: ["visitAssignmentNode:"]}),
  389. smalltalk.AssignmentNode);
  390. smalltalk.addMethod(
  391. smalltalk.method({
  392. selector: "isAssignmentNode",
  393. fn: function (){
  394. var self=this;
  395. return smalltalk.withContext(function($ctx1) {
  396. return true;
  397. }, function($ctx1) {$ctx1.fill(self,"isAssignmentNode",{},smalltalk.AssignmentNode)})},
  398. messageSends: []}),
  399. smalltalk.AssignmentNode);
  400. smalltalk.addMethod(
  401. smalltalk.method({
  402. selector: "left",
  403. fn: function (){
  404. var self=this;
  405. return smalltalk.withContext(function($ctx1) {
  406. var $1;
  407. $1=self["@left"];
  408. return $1;
  409. }, function($ctx1) {$ctx1.fill(self,"left",{},smalltalk.AssignmentNode)})},
  410. messageSends: []}),
  411. smalltalk.AssignmentNode);
  412. smalltalk.addMethod(
  413. smalltalk.method({
  414. selector: "left:",
  415. fn: function (aNode){
  416. var self=this;
  417. return smalltalk.withContext(function($ctx1) {
  418. self["@left"]=aNode;
  419. _st(aNode)._parent_(self);
  420. return self}, function($ctx1) {$ctx1.fill(self,"left:",{aNode:aNode},smalltalk.AssignmentNode)})},
  421. messageSends: ["parent:"]}),
  422. smalltalk.AssignmentNode);
  423. smalltalk.addMethod(
  424. smalltalk.method({
  425. selector: "nodes",
  426. fn: function (){
  427. var self=this;
  428. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  429. return smalltalk.withContext(function($ctx1) {
  430. var $1;
  431. $1=_st($Array())._with_with_(self._left(),self._right());
  432. return $1;
  433. }, function($ctx1) {$ctx1.fill(self,"nodes",{},smalltalk.AssignmentNode)})},
  434. messageSends: ["with:with:", "left", "right"]}),
  435. smalltalk.AssignmentNode);
  436. smalltalk.addMethod(
  437. smalltalk.method({
  438. selector: "right",
  439. fn: function (){
  440. var self=this;
  441. return smalltalk.withContext(function($ctx1) {
  442. var $1;
  443. $1=self["@right"];
  444. return $1;
  445. }, function($ctx1) {$ctx1.fill(self,"right",{},smalltalk.AssignmentNode)})},
  446. messageSends: []}),
  447. smalltalk.AssignmentNode);
  448. smalltalk.addMethod(
  449. smalltalk.method({
  450. selector: "right:",
  451. fn: function (aNode){
  452. var self=this;
  453. return smalltalk.withContext(function($ctx1) {
  454. self["@right"]=aNode;
  455. _st(aNode)._parent_(self);
  456. return self}, function($ctx1) {$ctx1.fill(self,"right:",{aNode:aNode},smalltalk.AssignmentNode)})},
  457. messageSends: ["parent:"]}),
  458. smalltalk.AssignmentNode);
  459. smalltalk.addClass('BlockNode', smalltalk.Node, ['parameters', 'scope'], 'Compiler-AST');
  460. smalltalk.addMethod(
  461. smalltalk.method({
  462. selector: "accept:",
  463. fn: function (aVisitor){
  464. var self=this;
  465. return smalltalk.withContext(function($ctx1) {
  466. var $1;
  467. $1=_st(aVisitor)._visitBlockNode_(self);
  468. return $1;
  469. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},smalltalk.BlockNode)})},
  470. messageSends: ["visitBlockNode:"]}),
  471. smalltalk.BlockNode);
  472. smalltalk.addMethod(
  473. smalltalk.method({
  474. selector: "isBlockNode",
  475. fn: function (){
  476. var self=this;
  477. return smalltalk.withContext(function($ctx1) {
  478. return true;
  479. }, function($ctx1) {$ctx1.fill(self,"isBlockNode",{},smalltalk.BlockNode)})},
  480. messageSends: []}),
  481. smalltalk.BlockNode);
  482. smalltalk.addMethod(
  483. smalltalk.method({
  484. selector: "nextNode:",
  485. fn: function (aNode){
  486. var self=this;
  487. return smalltalk.withContext(function($ctx1) {
  488. var $1;
  489. $1=self;
  490. return $1;
  491. }, function($ctx1) {$ctx1.fill(self,"nextNode:",{aNode:aNode},smalltalk.BlockNode)})},
  492. messageSends: []}),
  493. smalltalk.BlockNode);
  494. smalltalk.addMethod(
  495. smalltalk.method({
  496. selector: "parameters",
  497. fn: function (){
  498. var self=this;
  499. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  500. return smalltalk.withContext(function($ctx1) {
  501. var $2,$1;
  502. $2=self["@parameters"];
  503. if(($receiver = $2) == nil || $receiver == undefined){
  504. self["@parameters"]=_st($Array())._new();
  505. $1=self["@parameters"];
  506. } else {
  507. $1=$2;
  508. };
  509. return $1;
  510. }, function($ctx1) {$ctx1.fill(self,"parameters",{},smalltalk.BlockNode)})},
  511. messageSends: ["ifNil:", "new"]}),
  512. smalltalk.BlockNode);
  513. smalltalk.addMethod(
  514. smalltalk.method({
  515. selector: "parameters:",
  516. fn: function (aCollection){
  517. var self=this;
  518. return smalltalk.withContext(function($ctx1) {
  519. self["@parameters"]=aCollection;
  520. return self}, function($ctx1) {$ctx1.fill(self,"parameters:",{aCollection:aCollection},smalltalk.BlockNode)})},
  521. messageSends: []}),
  522. smalltalk.BlockNode);
  523. smalltalk.addMethod(
  524. smalltalk.method({
  525. selector: "scope",
  526. fn: function (){
  527. var self=this;
  528. return smalltalk.withContext(function($ctx1) {
  529. var $1;
  530. $1=self["@scope"];
  531. return $1;
  532. }, function($ctx1) {$ctx1.fill(self,"scope",{},smalltalk.BlockNode)})},
  533. messageSends: []}),
  534. smalltalk.BlockNode);
  535. smalltalk.addMethod(
  536. smalltalk.method({
  537. selector: "scope:",
  538. fn: function (aLexicalScope){
  539. var self=this;
  540. return smalltalk.withContext(function($ctx1) {
  541. self["@scope"]=aLexicalScope;
  542. return self}, function($ctx1) {$ctx1.fill(self,"scope:",{aLexicalScope:aLexicalScope},smalltalk.BlockNode)})},
  543. messageSends: []}),
  544. smalltalk.BlockNode);
  545. smalltalk.addMethod(
  546. smalltalk.method({
  547. selector: "subtreeNeedsAliasing",
  548. fn: function (){
  549. var self=this;
  550. return smalltalk.withContext(function($ctx1) {
  551. var $1;
  552. $1=_st(self._shouldBeAliased())._or_((function(){
  553. return smalltalk.withContext(function($ctx2) {
  554. return self._shouldBeInlined();
  555. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  556. return $1;
  557. }, function($ctx1) {$ctx1.fill(self,"subtreeNeedsAliasing",{},smalltalk.BlockNode)})},
  558. messageSends: ["or:", "shouldBeInlined", "shouldBeAliased"]}),
  559. smalltalk.BlockNode);
  560. smalltalk.addClass('CascadeNode', smalltalk.Node, ['receiver'], 'Compiler-AST');
  561. smalltalk.addMethod(
  562. smalltalk.method({
  563. selector: "accept:",
  564. fn: function (aVisitor){
  565. var self=this;
  566. return smalltalk.withContext(function($ctx1) {
  567. var $1;
  568. $1=_st(aVisitor)._visitCascadeNode_(self);
  569. return $1;
  570. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},smalltalk.CascadeNode)})},
  571. messageSends: ["visitCascadeNode:"]}),
  572. smalltalk.CascadeNode);
  573. smalltalk.addMethod(
  574. smalltalk.method({
  575. selector: "receiver",
  576. fn: function (){
  577. var self=this;
  578. return smalltalk.withContext(function($ctx1) {
  579. var $1;
  580. $1=self["@receiver"];
  581. return $1;
  582. }, function($ctx1) {$ctx1.fill(self,"receiver",{},smalltalk.CascadeNode)})},
  583. messageSends: []}),
  584. smalltalk.CascadeNode);
  585. smalltalk.addMethod(
  586. smalltalk.method({
  587. selector: "receiver:",
  588. fn: function (aNode){
  589. var self=this;
  590. return smalltalk.withContext(function($ctx1) {
  591. self["@receiver"]=aNode;
  592. return self}, function($ctx1) {$ctx1.fill(self,"receiver:",{aNode:aNode},smalltalk.CascadeNode)})},
  593. messageSends: []}),
  594. smalltalk.CascadeNode);
  595. smalltalk.addClass('DynamicArrayNode', smalltalk.Node, [], 'Compiler-AST');
  596. smalltalk.addMethod(
  597. smalltalk.method({
  598. selector: "accept:",
  599. fn: function (aVisitor){
  600. var self=this;
  601. return smalltalk.withContext(function($ctx1) {
  602. var $1;
  603. $1=_st(aVisitor)._visitDynamicArrayNode_(self);
  604. return $1;
  605. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},smalltalk.DynamicArrayNode)})},
  606. messageSends: ["visitDynamicArrayNode:"]}),
  607. smalltalk.DynamicArrayNode);
  608. smalltalk.addClass('DynamicDictionaryNode', smalltalk.Node, [], 'Compiler-AST');
  609. smalltalk.addMethod(
  610. smalltalk.method({
  611. selector: "accept:",
  612. fn: function (aVisitor){
  613. var self=this;
  614. return smalltalk.withContext(function($ctx1) {
  615. var $1;
  616. $1=_st(aVisitor)._visitDynamicDictionaryNode_(self);
  617. return $1;
  618. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},smalltalk.DynamicDictionaryNode)})},
  619. messageSends: ["visitDynamicDictionaryNode:"]}),
  620. smalltalk.DynamicDictionaryNode);
  621. smalltalk.addClass('JSStatementNode', smalltalk.Node, ['source'], 'Compiler-AST');
  622. smalltalk.addMethod(
  623. smalltalk.method({
  624. selector: "accept:",
  625. fn: function (aVisitor){
  626. var self=this;
  627. return smalltalk.withContext(function($ctx1) {
  628. var $1;
  629. $1=_st(aVisitor)._visitJSStatementNode_(self);
  630. return $1;
  631. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},smalltalk.JSStatementNode)})},
  632. messageSends: ["visitJSStatementNode:"]}),
  633. smalltalk.JSStatementNode);
  634. smalltalk.addMethod(
  635. smalltalk.method({
  636. selector: "isJSStatementNode",
  637. fn: function (){
  638. var self=this;
  639. return smalltalk.withContext(function($ctx1) {
  640. return true;
  641. }, function($ctx1) {$ctx1.fill(self,"isJSStatementNode",{},smalltalk.JSStatementNode)})},
  642. messageSends: []}),
  643. smalltalk.JSStatementNode);
  644. smalltalk.addMethod(
  645. smalltalk.method({
  646. selector: "source",
  647. fn: function (){
  648. var self=this;
  649. return smalltalk.withContext(function($ctx1) {
  650. var $2,$1;
  651. $2=self["@source"];
  652. if(($receiver = $2) == nil || $receiver == undefined){
  653. $1="";
  654. } else {
  655. $1=$2;
  656. };
  657. return $1;
  658. }, function($ctx1) {$ctx1.fill(self,"source",{},smalltalk.JSStatementNode)})},
  659. messageSends: ["ifNil:"]}),
  660. smalltalk.JSStatementNode);
  661. smalltalk.addMethod(
  662. smalltalk.method({
  663. selector: "source:",
  664. fn: function (aString){
  665. var self=this;
  666. return smalltalk.withContext(function($ctx1) {
  667. self["@source"]=aString;
  668. return self}, function($ctx1) {$ctx1.fill(self,"source:",{aString:aString},smalltalk.JSStatementNode)})},
  669. messageSends: []}),
  670. smalltalk.JSStatementNode);
  671. smalltalk.addClass('MethodNode', smalltalk.Node, ['selector', 'arguments', 'source', 'scope', 'classReferences', 'messageSends', 'superSends'], 'Compiler-AST');
  672. smalltalk.addMethod(
  673. smalltalk.method({
  674. selector: "accept:",
  675. fn: function (aVisitor){
  676. var self=this;
  677. return smalltalk.withContext(function($ctx1) {
  678. var $1;
  679. $1=_st(aVisitor)._visitMethodNode_(self);
  680. return $1;
  681. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},smalltalk.MethodNode)})},
  682. messageSends: ["visitMethodNode:"]}),
  683. smalltalk.MethodNode);
  684. smalltalk.addMethod(
  685. smalltalk.method({
  686. selector: "arguments",
  687. fn: function (){
  688. var self=this;
  689. return smalltalk.withContext(function($ctx1) {
  690. var $2,$1;
  691. $2=self["@arguments"];
  692. if(($receiver = $2) == nil || $receiver == undefined){
  693. $1=[];
  694. } else {
  695. $1=$2;
  696. };
  697. return $1;
  698. }, function($ctx1) {$ctx1.fill(self,"arguments",{},smalltalk.MethodNode)})},
  699. messageSends: ["ifNil:"]}),
  700. smalltalk.MethodNode);
  701. smalltalk.addMethod(
  702. smalltalk.method({
  703. selector: "arguments:",
  704. fn: function (aCollection){
  705. var self=this;
  706. return smalltalk.withContext(function($ctx1) {
  707. self["@arguments"]=aCollection;
  708. return self}, function($ctx1) {$ctx1.fill(self,"arguments:",{aCollection:aCollection},smalltalk.MethodNode)})},
  709. messageSends: []}),
  710. smalltalk.MethodNode);
  711. smalltalk.addMethod(
  712. smalltalk.method({
  713. selector: "classReferences",
  714. fn: function (){
  715. var self=this;
  716. return smalltalk.withContext(function($ctx1) {
  717. var $1;
  718. $1=self["@classReferences"];
  719. return $1;
  720. }, function($ctx1) {$ctx1.fill(self,"classReferences",{},smalltalk.MethodNode)})},
  721. messageSends: []}),
  722. smalltalk.MethodNode);
  723. smalltalk.addMethod(
  724. smalltalk.method({
  725. selector: "classReferences:",
  726. fn: function (aCollection){
  727. var self=this;
  728. return smalltalk.withContext(function($ctx1) {
  729. self["@classReferences"]=aCollection;
  730. return self}, function($ctx1) {$ctx1.fill(self,"classReferences:",{aCollection:aCollection},smalltalk.MethodNode)})},
  731. messageSends: []}),
  732. smalltalk.MethodNode);
  733. smalltalk.addMethod(
  734. smalltalk.method({
  735. selector: "extent",
  736. fn: function (){
  737. var self=this;
  738. return smalltalk.withContext(function($ctx1) {
  739. var $1;
  740. $1=_st(_st(_st(self._source())._lines())._size()).__at(_st(_st(_st(_st(self._source())._lines())._last())._size()).__plus((1)));
  741. return $1;
  742. }, function($ctx1) {$ctx1.fill(self,"extent",{},smalltalk.MethodNode)})},
  743. messageSends: ["@", "+", "size", "last", "lines", "source"]}),
  744. smalltalk.MethodNode);
  745. smalltalk.addMethod(
  746. smalltalk.method({
  747. selector: "messageSends",
  748. fn: function (){
  749. var self=this;
  750. return smalltalk.withContext(function($ctx1) {
  751. var $1;
  752. $1=self["@messageSends"];
  753. return $1;
  754. }, function($ctx1) {$ctx1.fill(self,"messageSends",{},smalltalk.MethodNode)})},
  755. messageSends: []}),
  756. smalltalk.MethodNode);
  757. smalltalk.addMethod(
  758. smalltalk.method({
  759. selector: "messageSends:",
  760. fn: function (aCollection){
  761. var self=this;
  762. return smalltalk.withContext(function($ctx1) {
  763. self["@messageSends"]=aCollection;
  764. return self}, function($ctx1) {$ctx1.fill(self,"messageSends:",{aCollection:aCollection},smalltalk.MethodNode)})},
  765. messageSends: []}),
  766. smalltalk.MethodNode);
  767. smalltalk.addMethod(
  768. smalltalk.method({
  769. selector: "scope",
  770. fn: function (){
  771. var self=this;
  772. return smalltalk.withContext(function($ctx1) {
  773. var $1;
  774. $1=self["@scope"];
  775. return $1;
  776. }, function($ctx1) {$ctx1.fill(self,"scope",{},smalltalk.MethodNode)})},
  777. messageSends: []}),
  778. smalltalk.MethodNode);
  779. smalltalk.addMethod(
  780. smalltalk.method({
  781. selector: "scope:",
  782. fn: function (aMethodScope){
  783. var self=this;
  784. return smalltalk.withContext(function($ctx1) {
  785. self["@scope"]=aMethodScope;
  786. return self}, function($ctx1) {$ctx1.fill(self,"scope:",{aMethodScope:aMethodScope},smalltalk.MethodNode)})},
  787. messageSends: []}),
  788. smalltalk.MethodNode);
  789. smalltalk.addMethod(
  790. smalltalk.method({
  791. selector: "selector",
  792. fn: function (){
  793. var self=this;
  794. return smalltalk.withContext(function($ctx1) {
  795. var $1;
  796. $1=self["@selector"];
  797. return $1;
  798. }, function($ctx1) {$ctx1.fill(self,"selector",{},smalltalk.MethodNode)})},
  799. messageSends: []}),
  800. smalltalk.MethodNode);
  801. smalltalk.addMethod(
  802. smalltalk.method({
  803. selector: "selector:",
  804. fn: function (aString){
  805. var self=this;
  806. return smalltalk.withContext(function($ctx1) {
  807. self["@selector"]=aString;
  808. return self}, function($ctx1) {$ctx1.fill(self,"selector:",{aString:aString},smalltalk.MethodNode)})},
  809. messageSends: []}),
  810. smalltalk.MethodNode);
  811. smalltalk.addMethod(
  812. smalltalk.method({
  813. selector: "source",
  814. fn: function (){
  815. var self=this;
  816. return smalltalk.withContext(function($ctx1) {
  817. var $1;
  818. $1=self["@source"];
  819. return $1;
  820. }, function($ctx1) {$ctx1.fill(self,"source",{},smalltalk.MethodNode)})},
  821. messageSends: []}),
  822. smalltalk.MethodNode);
  823. smalltalk.addMethod(
  824. smalltalk.method({
  825. selector: "source:",
  826. fn: function (aString){
  827. var self=this;
  828. return smalltalk.withContext(function($ctx1) {
  829. self["@source"]=aString;
  830. return self}, function($ctx1) {$ctx1.fill(self,"source:",{aString:aString},smalltalk.MethodNode)})},
  831. messageSends: []}),
  832. smalltalk.MethodNode);
  833. smalltalk.addMethod(
  834. smalltalk.method({
  835. selector: "superSends",
  836. fn: function (){
  837. var self=this;
  838. return smalltalk.withContext(function($ctx1) {
  839. var $1;
  840. $1=self["@superSends"];
  841. return $1;
  842. }, function($ctx1) {$ctx1.fill(self,"superSends",{},smalltalk.MethodNode)})},
  843. messageSends: []}),
  844. smalltalk.MethodNode);
  845. smalltalk.addMethod(
  846. smalltalk.method({
  847. selector: "superSends:",
  848. fn: function (aCollection){
  849. var self=this;
  850. return smalltalk.withContext(function($ctx1) {
  851. self["@superSends"]=aCollection;
  852. return self}, function($ctx1) {$ctx1.fill(self,"superSends:",{aCollection:aCollection},smalltalk.MethodNode)})},
  853. messageSends: []}),
  854. smalltalk.MethodNode);
  855. smalltalk.addClass('ReturnNode', smalltalk.Node, ['scope'], 'Compiler-AST');
  856. smalltalk.addMethod(
  857. smalltalk.method({
  858. selector: "accept:",
  859. fn: function (aVisitor){
  860. var self=this;
  861. return smalltalk.withContext(function($ctx1) {
  862. var $1;
  863. $1=_st(aVisitor)._visitReturnNode_(self);
  864. return $1;
  865. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},smalltalk.ReturnNode)})},
  866. messageSends: ["visitReturnNode:"]}),
  867. smalltalk.ReturnNode);
  868. smalltalk.addMethod(
  869. smalltalk.method({
  870. selector: "isReturnNode",
  871. fn: function (){
  872. var self=this;
  873. return smalltalk.withContext(function($ctx1) {
  874. return true;
  875. }, function($ctx1) {$ctx1.fill(self,"isReturnNode",{},smalltalk.ReturnNode)})},
  876. messageSends: []}),
  877. smalltalk.ReturnNode);
  878. smalltalk.addMethod(
  879. smalltalk.method({
  880. selector: "nonLocalReturn",
  881. fn: function (){
  882. var self=this;
  883. return smalltalk.withContext(function($ctx1) {
  884. var $1;
  885. $1=_st(_st(self._scope())._isMethodScope())._not();
  886. return $1;
  887. }, function($ctx1) {$ctx1.fill(self,"nonLocalReturn",{},smalltalk.ReturnNode)})},
  888. messageSends: ["not", "isMethodScope", "scope"]}),
  889. smalltalk.ReturnNode);
  890. smalltalk.addMethod(
  891. smalltalk.method({
  892. selector: "scope",
  893. fn: function (){
  894. var self=this;
  895. return smalltalk.withContext(function($ctx1) {
  896. var $1;
  897. $1=self["@scope"];
  898. return $1;
  899. }, function($ctx1) {$ctx1.fill(self,"scope",{},smalltalk.ReturnNode)})},
  900. messageSends: []}),
  901. smalltalk.ReturnNode);
  902. smalltalk.addMethod(
  903. smalltalk.method({
  904. selector: "scope:",
  905. fn: function (aLexicalScope){
  906. var self=this;
  907. return smalltalk.withContext(function($ctx1) {
  908. self["@scope"]=aLexicalScope;
  909. return self}, function($ctx1) {$ctx1.fill(self,"scope:",{aLexicalScope:aLexicalScope},smalltalk.ReturnNode)})},
  910. messageSends: []}),
  911. smalltalk.ReturnNode);
  912. smalltalk.addClass('SendNode', smalltalk.Node, ['selector', 'arguments', 'receiver', 'superSend', 'index'], 'Compiler-AST');
  913. smalltalk.addMethod(
  914. smalltalk.method({
  915. selector: "accept:",
  916. fn: function (aVisitor){
  917. var self=this;
  918. return smalltalk.withContext(function($ctx1) {
  919. var $1;
  920. $1=_st(aVisitor)._visitSendNode_(self);
  921. return $1;
  922. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},smalltalk.SendNode)})},
  923. messageSends: ["visitSendNode:"]}),
  924. smalltalk.SendNode);
  925. smalltalk.addMethod(
  926. smalltalk.method({
  927. selector: "arguments",
  928. fn: function (){
  929. var self=this;
  930. return smalltalk.withContext(function($ctx1) {
  931. var $2,$1;
  932. $2=self["@arguments"];
  933. if(($receiver = $2) == nil || $receiver == undefined){
  934. self["@arguments"]=[];
  935. $1=self["@arguments"];
  936. } else {
  937. $1=$2;
  938. };
  939. return $1;
  940. }, function($ctx1) {$ctx1.fill(self,"arguments",{},smalltalk.SendNode)})},
  941. messageSends: ["ifNil:"]}),
  942. smalltalk.SendNode);
  943. smalltalk.addMethod(
  944. smalltalk.method({
  945. selector: "arguments:",
  946. fn: function (aCollection){
  947. var self=this;
  948. return smalltalk.withContext(function($ctx1) {
  949. self["@arguments"]=aCollection;
  950. _st(aCollection)._do_((function(each){
  951. return smalltalk.withContext(function($ctx2) {
  952. return _st(each)._parent_(self);
  953. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  954. return self}, function($ctx1) {$ctx1.fill(self,"arguments:",{aCollection:aCollection},smalltalk.SendNode)})},
  955. messageSends: ["do:", "parent:"]}),
  956. smalltalk.SendNode);
  957. smalltalk.addMethod(
  958. smalltalk.method({
  959. selector: "cascadeNodeWithMessages:",
  960. fn: function (aCollection){
  961. var self=this;
  962. var first;
  963. function $SendNode(){return smalltalk.SendNode||(typeof SendNode=="undefined"?nil:SendNode)}
  964. function $CascadeNode(){return smalltalk.CascadeNode||(typeof CascadeNode=="undefined"?nil:CascadeNode)}
  965. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  966. return smalltalk.withContext(function($ctx1) {
  967. var $1,$2,$4,$5,$3;
  968. $1=_st($SendNode())._new();
  969. _st($1)._selector_(self._selector());
  970. _st($1)._arguments_(self._arguments());
  971. $2=_st($1)._yourself();
  972. first=$2;
  973. $4=_st($CascadeNode())._new();
  974. _st($4)._receiver_(self._receiver());
  975. _st($4)._nodes_(_st(_st($Array())._with_(first)).__comma(aCollection));
  976. $5=_st($4)._yourself();
  977. $3=$5;
  978. return $3;
  979. }, function($ctx1) {$ctx1.fill(self,"cascadeNodeWithMessages:",{aCollection:aCollection,first:first},smalltalk.SendNode)})},
  980. messageSends: ["selector:", "selector", "new", "arguments:", "arguments", "yourself", "receiver:", "receiver", "nodes:", ",", "with:"]}),
  981. smalltalk.SendNode);
  982. smalltalk.addMethod(
  983. smalltalk.method({
  984. selector: "index",
  985. fn: function (){
  986. var self=this;
  987. return smalltalk.withContext(function($ctx1) {
  988. var $1;
  989. $1=self["@index"];
  990. return $1;
  991. }, function($ctx1) {$ctx1.fill(self,"index",{},smalltalk.SendNode)})},
  992. messageSends: []}),
  993. smalltalk.SendNode);
  994. smalltalk.addMethod(
  995. smalltalk.method({
  996. selector: "index:",
  997. fn: function (anInteger){
  998. var self=this;
  999. return smalltalk.withContext(function($ctx1) {
  1000. self["@index"]=anInteger;
  1001. return self}, function($ctx1) {$ctx1.fill(self,"index:",{anInteger:anInteger},smalltalk.SendNode)})},
  1002. messageSends: []}),
  1003. smalltalk.SendNode);
  1004. smalltalk.addMethod(
  1005. smalltalk.method({
  1006. selector: "isSendNode",
  1007. fn: function (){
  1008. var self=this;
  1009. return smalltalk.withContext(function($ctx1) {
  1010. return true;
  1011. }, function($ctx1) {$ctx1.fill(self,"isSendNode",{},smalltalk.SendNode)})},
  1012. messageSends: []}),
  1013. smalltalk.SendNode);
  1014. smalltalk.addMethod(
  1015. smalltalk.method({
  1016. selector: "nodes",
  1017. fn: function (){
  1018. var self=this;
  1019. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  1020. return smalltalk.withContext(function($ctx1) {
  1021. var $2,$3,$1;
  1022. $2=_st($Array())._withAll_(self._arguments());
  1023. _st($2)._add_(self._receiver());
  1024. $3=_st($2)._yourself();
  1025. $1=$3;
  1026. return $1;
  1027. }, function($ctx1) {$ctx1.fill(self,"nodes",{},smalltalk.SendNode)})},
  1028. messageSends: ["add:", "receiver", "withAll:", "arguments", "yourself"]}),
  1029. smalltalk.SendNode);
  1030. smalltalk.addMethod(
  1031. smalltalk.method({
  1032. selector: "receiver",
  1033. fn: function (){
  1034. var self=this;
  1035. return smalltalk.withContext(function($ctx1) {
  1036. var $1;
  1037. $1=self["@receiver"];
  1038. return $1;
  1039. }, function($ctx1) {$ctx1.fill(self,"receiver",{},smalltalk.SendNode)})},
  1040. messageSends: []}),
  1041. smalltalk.SendNode);
  1042. smalltalk.addMethod(
  1043. smalltalk.method({
  1044. selector: "receiver:",
  1045. fn: function (aNode){
  1046. var self=this;
  1047. return smalltalk.withContext(function($ctx1) {
  1048. var $1;
  1049. self["@receiver"]=aNode;
  1050. $1=_st(aNode)._isNode();
  1051. if(smalltalk.assert($1)){
  1052. _st(aNode)._parent_(self);
  1053. };
  1054. return self}, function($ctx1) {$ctx1.fill(self,"receiver:",{aNode:aNode},smalltalk.SendNode)})},
  1055. messageSends: ["ifTrue:", "parent:", "isNode"]}),
  1056. smalltalk.SendNode);
  1057. smalltalk.addMethod(
  1058. smalltalk.method({
  1059. selector: "selector",
  1060. fn: function (){
  1061. var self=this;
  1062. return smalltalk.withContext(function($ctx1) {
  1063. var $1;
  1064. $1=self["@selector"];
  1065. return $1;
  1066. }, function($ctx1) {$ctx1.fill(self,"selector",{},smalltalk.SendNode)})},
  1067. messageSends: []}),
  1068. smalltalk.SendNode);
  1069. smalltalk.addMethod(
  1070. smalltalk.method({
  1071. selector: "selector:",
  1072. fn: function (aString){
  1073. var self=this;
  1074. return smalltalk.withContext(function($ctx1) {
  1075. self["@selector"]=aString;
  1076. return self}, function($ctx1) {$ctx1.fill(self,"selector:",{aString:aString},smalltalk.SendNode)})},
  1077. messageSends: []}),
  1078. smalltalk.SendNode);
  1079. smalltalk.addMethod(
  1080. smalltalk.method({
  1081. selector: "stopOnStepping",
  1082. fn: function (){
  1083. var self=this;
  1084. return smalltalk.withContext(function($ctx1) {
  1085. return true;
  1086. }, function($ctx1) {$ctx1.fill(self,"stopOnStepping",{},smalltalk.SendNode)})},
  1087. messageSends: []}),
  1088. smalltalk.SendNode);
  1089. smalltalk.addMethod(
  1090. smalltalk.method({
  1091. selector: "superSend",
  1092. fn: function (){
  1093. var self=this;
  1094. return smalltalk.withContext(function($ctx1) {
  1095. var $2,$1;
  1096. $2=self["@superSend"];
  1097. if(($receiver = $2) == nil || $receiver == undefined){
  1098. $1=false;
  1099. } else {
  1100. $1=$2;
  1101. };
  1102. return $1;
  1103. }, function($ctx1) {$ctx1.fill(self,"superSend",{},smalltalk.SendNode)})},
  1104. messageSends: ["ifNil:"]}),
  1105. smalltalk.SendNode);
  1106. smalltalk.addMethod(
  1107. smalltalk.method({
  1108. selector: "superSend:",
  1109. fn: function (aBoolean){
  1110. var self=this;
  1111. return smalltalk.withContext(function($ctx1) {
  1112. self["@superSend"]=aBoolean;
  1113. return self}, function($ctx1) {$ctx1.fill(self,"superSend:",{aBoolean:aBoolean},smalltalk.SendNode)})},
  1114. messageSends: []}),
  1115. smalltalk.SendNode);
  1116. smalltalk.addMethod(
  1117. smalltalk.method({
  1118. selector: "valueForReceiver:",
  1119. fn: function (anObject){
  1120. var self=this;
  1121. function $SendNode(){return smalltalk.SendNode||(typeof SendNode=="undefined"?nil:SendNode)}
  1122. return smalltalk.withContext(function($ctx1) {
  1123. var $2,$3,$5,$4,$6,$1;
  1124. $2=_st($SendNode())._new();
  1125. _st($2)._position_(self._position());
  1126. $3=$2;
  1127. $5=self._receiver();
  1128. if(($receiver = $5) == nil || $receiver == undefined){
  1129. $4=anObject;
  1130. } else {
  1131. $4=_st(self._receiver())._valueForReceiver_(anObject);
  1132. };
  1133. _st($3)._receiver_($4);
  1134. _st($2)._selector_(self._selector());
  1135. _st($2)._arguments_(self._arguments());
  1136. $6=_st($2)._yourself();
  1137. $1=$6;
  1138. return $1;
  1139. }, function($ctx1) {$ctx1.fill(self,"valueForReceiver:",{anObject:anObject},smalltalk.SendNode)})},
  1140. messageSends: ["position:", "position", "new", "receiver:", "ifNil:ifNotNil:", "valueForReceiver:", "receiver", "selector:", "selector", "arguments:", "arguments", "yourself"]}),
  1141. smalltalk.SendNode);
  1142. smalltalk.addClass('SequenceNode', smalltalk.Node, ['temps', 'scope'], 'Compiler-AST');
  1143. smalltalk.addMethod(
  1144. smalltalk.method({
  1145. selector: "accept:",
  1146. fn: function (aVisitor){
  1147. var self=this;
  1148. return smalltalk.withContext(function($ctx1) {
  1149. var $1;
  1150. $1=_st(aVisitor)._visitSequenceNode_(self);
  1151. return $1;
  1152. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},smalltalk.SequenceNode)})},
  1153. messageSends: ["visitSequenceNode:"]}),
  1154. smalltalk.SequenceNode);
  1155. smalltalk.addMethod(
  1156. smalltalk.method({
  1157. selector: "asBlockSequenceNode",
  1158. fn: function (){
  1159. var self=this;
  1160. function $BlockSequenceNode(){return smalltalk.BlockSequenceNode||(typeof BlockSequenceNode=="undefined"?nil:BlockSequenceNode)}
  1161. return smalltalk.withContext(function($ctx1) {
  1162. var $2,$3,$1;
  1163. $2=_st($BlockSequenceNode())._new();
  1164. _st($2)._position_(self._position());
  1165. _st($2)._nodes_(self._nodes());
  1166. _st($2)._temps_(self._temps());
  1167. $3=_st($2)._yourself();
  1168. $1=$3;
  1169. return $1;
  1170. }, function($ctx1) {$ctx1.fill(self,"asBlockSequenceNode",{},smalltalk.SequenceNode)})},
  1171. messageSends: ["position:", "position", "new", "nodes:", "nodes", "temps:", "temps", "yourself"]}),
  1172. smalltalk.SequenceNode);
  1173. smalltalk.addMethod(
  1174. smalltalk.method({
  1175. selector: "scope",
  1176. fn: function (){
  1177. var self=this;
  1178. return smalltalk.withContext(function($ctx1) {
  1179. var $1;
  1180. $1=self["@scope"];
  1181. return $1;
  1182. }, function($ctx1) {$ctx1.fill(self,"scope",{},smalltalk.SequenceNode)})},
  1183. messageSends: []}),
  1184. smalltalk.SequenceNode);
  1185. smalltalk.addMethod(
  1186. smalltalk.method({
  1187. selector: "scope:",
  1188. fn: function (aLexicalScope){
  1189. var self=this;
  1190. return smalltalk.withContext(function($ctx1) {
  1191. self["@scope"]=aLexicalScope;
  1192. return self}, function($ctx1) {$ctx1.fill(self,"scope:",{aLexicalScope:aLexicalScope},smalltalk.SequenceNode)})},
  1193. messageSends: []}),
  1194. smalltalk.SequenceNode);
  1195. smalltalk.addMethod(
  1196. smalltalk.method({
  1197. selector: "temps",
  1198. fn: function (){
  1199. var self=this;
  1200. return smalltalk.withContext(function($ctx1) {
  1201. var $2,$1;
  1202. $2=self["@temps"];
  1203. if(($receiver = $2) == nil || $receiver == undefined){
  1204. $1=[];
  1205. } else {
  1206. $1=$2;
  1207. };
  1208. return $1;
  1209. }, function($ctx1) {$ctx1.fill(self,"temps",{},smalltalk.SequenceNode)})},
  1210. messageSends: ["ifNil:"]}),
  1211. smalltalk.SequenceNode);
  1212. smalltalk.addMethod(
  1213. smalltalk.method({
  1214. selector: "temps:",
  1215. fn: function (aCollection){
  1216. var self=this;
  1217. return smalltalk.withContext(function($ctx1) {
  1218. self["@temps"]=aCollection;
  1219. return self}, function($ctx1) {$ctx1.fill(self,"temps:",{aCollection:aCollection},smalltalk.SequenceNode)})},
  1220. messageSends: []}),
  1221. smalltalk.SequenceNode);
  1222. smalltalk.addClass('BlockSequenceNode', smalltalk.SequenceNode, [], 'Compiler-AST');
  1223. smalltalk.addMethod(
  1224. smalltalk.method({
  1225. selector: "accept:",
  1226. fn: function (aVisitor){
  1227. var self=this;
  1228. return smalltalk.withContext(function($ctx1) {
  1229. var $1;
  1230. $1=_st(aVisitor)._visitBlockSequenceNode_(self);
  1231. return $1;
  1232. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},smalltalk.BlockSequenceNode)})},
  1233. messageSends: ["visitBlockSequenceNode:"]}),
  1234. smalltalk.BlockSequenceNode);
  1235. smalltalk.addMethod(
  1236. smalltalk.method({
  1237. selector: "isBlockSequenceNode",
  1238. fn: function (){
  1239. var self=this;
  1240. return smalltalk.withContext(function($ctx1) {
  1241. return true;
  1242. }, function($ctx1) {$ctx1.fill(self,"isBlockSequenceNode",{},smalltalk.BlockSequenceNode)})},
  1243. messageSends: []}),
  1244. smalltalk.BlockSequenceNode);
  1245. smalltalk.addClass('ValueNode', smalltalk.Node, ['value'], 'Compiler-AST');
  1246. smalltalk.addMethod(
  1247. smalltalk.method({
  1248. selector: "accept:",
  1249. fn: function (aVisitor){
  1250. var self=this;
  1251. return smalltalk.withContext(function($ctx1) {
  1252. var $1;
  1253. $1=_st(aVisitor)._visitValueNode_(self);
  1254. return $1;
  1255. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},smalltalk.ValueNode)})},
  1256. messageSends: ["visitValueNode:"]}),
  1257. smalltalk.ValueNode);
  1258. smalltalk.addMethod(
  1259. smalltalk.method({
  1260. selector: "isImmutable",
  1261. fn: function (){
  1262. var self=this;
  1263. return smalltalk.withContext(function($ctx1) {
  1264. var $1;
  1265. $1=_st(self._value())._isImmutable();
  1266. return $1;
  1267. }, function($ctx1) {$ctx1.fill(self,"isImmutable",{},smalltalk.ValueNode)})},
  1268. messageSends: ["isImmutable", "value"]}),
  1269. smalltalk.ValueNode);
  1270. smalltalk.addMethod(
  1271. smalltalk.method({
  1272. selector: "isValueNode",
  1273. fn: function (){
  1274. var self=this;
  1275. return smalltalk.withContext(function($ctx1) {
  1276. return true;
  1277. }, function($ctx1) {$ctx1.fill(self,"isValueNode",{},smalltalk.ValueNode)})},
  1278. messageSends: []}),
  1279. smalltalk.ValueNode);
  1280. smalltalk.addMethod(
  1281. smalltalk.method({
  1282. selector: "value",
  1283. fn: function (){
  1284. var self=this;
  1285. return smalltalk.withContext(function($ctx1) {
  1286. var $1;
  1287. $1=self["@value"];
  1288. return $1;
  1289. }, function($ctx1) {$ctx1.fill(self,"value",{},smalltalk.ValueNode)})},
  1290. messageSends: []}),
  1291. smalltalk.ValueNode);
  1292. smalltalk.addMethod(
  1293. smalltalk.method({
  1294. selector: "value:",
  1295. fn: function (anObject){
  1296. var self=this;
  1297. return smalltalk.withContext(function($ctx1) {
  1298. self["@value"]=anObject;
  1299. return self}, function($ctx1) {$ctx1.fill(self,"value:",{anObject:anObject},smalltalk.ValueNode)})},
  1300. messageSends: []}),
  1301. smalltalk.ValueNode);
  1302. smalltalk.addClass('VariableNode', smalltalk.ValueNode, ['assigned', 'binding'], 'Compiler-AST');
  1303. smalltalk.addMethod(
  1304. smalltalk.method({
  1305. selector: "accept:",
  1306. fn: function (aVisitor){
  1307. var self=this;
  1308. return smalltalk.withContext(function($ctx1) {
  1309. var $1;
  1310. $1=_st(aVisitor)._visitVariableNode_(self);
  1311. return $1;
  1312. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},smalltalk.VariableNode)})},
  1313. messageSends: ["visitVariableNode:"]}),
  1314. smalltalk.VariableNode);
  1315. smalltalk.addMethod(
  1316. smalltalk.method({
  1317. selector: "alias",
  1318. fn: function (){
  1319. var self=this;
  1320. return smalltalk.withContext(function($ctx1) {
  1321. var $1;
  1322. $1=_st(self._binding())._alias();
  1323. return $1;
  1324. }, function($ctx1) {$ctx1.fill(self,"alias",{},smalltalk.VariableNode)})},
  1325. messageSends: ["alias", "binding"]}),
  1326. smalltalk.VariableNode);
  1327. smalltalk.addMethod(
  1328. smalltalk.method({
  1329. selector: "assigned",
  1330. fn: function (){
  1331. var self=this;
  1332. return smalltalk.withContext(function($ctx1) {
  1333. var $2,$1;
  1334. $2=self["@assigned"];
  1335. if(($receiver = $2) == nil || $receiver == undefined){
  1336. $1=false;
  1337. } else {
  1338. $1=$2;
  1339. };
  1340. return $1;
  1341. }, function($ctx1) {$ctx1.fill(self,"assigned",{},smalltalk.VariableNode)})},
  1342. messageSends: ["ifNil:"]}),
  1343. smalltalk.VariableNode);
  1344. smalltalk.addMethod(
  1345. smalltalk.method({
  1346. selector: "assigned:",
  1347. fn: function (aBoolean){
  1348. var self=this;
  1349. return smalltalk.withContext(function($ctx1) {
  1350. self["@assigned"]=aBoolean;
  1351. return self}, function($ctx1) {$ctx1.fill(self,"assigned:",{aBoolean:aBoolean},smalltalk.VariableNode)})},
  1352. messageSends: []}),
  1353. smalltalk.VariableNode);
  1354. smalltalk.addMethod(
  1355. smalltalk.method({
  1356. selector: "beAssigned",
  1357. fn: function (){
  1358. var self=this;
  1359. return smalltalk.withContext(function($ctx1) {
  1360. _st(self._binding())._validateAssignment();
  1361. self["@assigned"]=true;
  1362. return self}, function($ctx1) {$ctx1.fill(self,"beAssigned",{},smalltalk.VariableNode)})},
  1363. messageSends: ["validateAssignment", "binding"]}),
  1364. smalltalk.VariableNode);
  1365. smalltalk.addMethod(
  1366. smalltalk.method({
  1367. selector: "binding",
  1368. fn: function (){
  1369. var self=this;
  1370. return smalltalk.withContext(function($ctx1) {
  1371. var $1;
  1372. $1=self["@binding"];
  1373. return $1;
  1374. }, function($ctx1) {$ctx1.fill(self,"binding",{},smalltalk.VariableNode)})},
  1375. messageSends: []}),
  1376. smalltalk.VariableNode);
  1377. smalltalk.addMethod(
  1378. smalltalk.method({
  1379. selector: "binding:",
  1380. fn: function (aScopeVar){
  1381. var self=this;
  1382. return smalltalk.withContext(function($ctx1) {
  1383. self["@binding"]=aScopeVar;
  1384. return self}, function($ctx1) {$ctx1.fill(self,"binding:",{aScopeVar:aScopeVar},smalltalk.VariableNode)})},
  1385. messageSends: []}),
  1386. smalltalk.VariableNode);
  1387. smalltalk.addMethod(
  1388. smalltalk.method({
  1389. selector: "isImmutable",
  1390. fn: function (){
  1391. var self=this;
  1392. return smalltalk.withContext(function($ctx1) {
  1393. return false;
  1394. }, function($ctx1) {$ctx1.fill(self,"isImmutable",{},smalltalk.VariableNode)})},
  1395. messageSends: []}),
  1396. smalltalk.VariableNode);
  1397. smalltalk.addClass('ClassReferenceNode', smalltalk.VariableNode, [], 'Compiler-AST');
  1398. smalltalk.addMethod(
  1399. smalltalk.method({
  1400. selector: "accept:",
  1401. fn: function (aVisitor){
  1402. var self=this;
  1403. return smalltalk.withContext(function($ctx1) {
  1404. var $1;
  1405. $1=_st(aVisitor)._visitClassReferenceNode_(self);
  1406. return $1;
  1407. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},smalltalk.ClassReferenceNode)})},
  1408. messageSends: ["visitClassReferenceNode:"]}),
  1409. smalltalk.ClassReferenceNode);
  1410. smalltalk.addMethod(
  1411. smalltalk.method({
  1412. selector: "isNode",
  1413. fn: function (){
  1414. var self=this;
  1415. return smalltalk.withContext(function($ctx1) {
  1416. return false;
  1417. }, function($ctx1) {$ctx1.fill(self,"isNode",{},smalltalk.Object)})},
  1418. messageSends: []}),
  1419. smalltalk.Object);
  1420. smalltalk.addMethod(
  1421. smalltalk.method({
  1422. selector: "ast",
  1423. fn: function (){
  1424. var self=this;
  1425. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1426. return smalltalk.withContext(function($ctx1) {
  1427. var $1;
  1428. _st(self._source())._ifEmpty_((function(){
  1429. return smalltalk.withContext(function($ctx2) {
  1430. return self._error_("Method source is empty");
  1431. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1432. $1=_st(_st($Smalltalk())._current())._parse_(self._source());
  1433. return $1;
  1434. }, function($ctx1) {$ctx1.fill(self,"ast",{},smalltalk.CompiledMethod)})},
  1435. messageSends: ["ifEmpty:", "error:", "source", "parse:", "current"]}),
  1436. smalltalk.CompiledMethod);