Compiler-AST.deploy.js 45 KB

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