Compiler-AST.js 51 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896
  1. smalltalk.addPackage('Compiler-AST');
  2. smalltalk.addClass('Node', smalltalk.Object, ['position', 'nodes', 'shouldBeInlined', 'shouldBeAliased'], 'Compiler-AST');
  3. smalltalk.Node.comment="I am the abstract root class of the abstract syntax tree.\x0a\x0aConcrete classes should implement `#accept:` to allow visiting.\x0a\x0a`position` holds a point containing line and column number of the symbol location in the original source file."
  4. smalltalk.addMethod(
  5. smalltalk.method({
  6. selector: "accept:",
  7. category: 'visiting',
  8. fn: function (aVisitor){
  9. var self=this;
  10. return smalltalk.withContext(function($ctx1) {
  11. var $1;
  12. $1=_st(aVisitor)._visitNode_(self);
  13. return $1;
  14. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},smalltalk.Node)})},
  15. args: ["aVisitor"],
  16. source: "accept: aVisitor\x0a\x09^ aVisitor visitNode: self",
  17. messageSends: ["visitNode:"],
  18. referencedClasses: []
  19. }),
  20. smalltalk.Node);
  21. smalltalk.addMethod(
  22. smalltalk.method({
  23. selector: "addNode:",
  24. category: 'accessing',
  25. fn: function (aNode){
  26. var self=this;
  27. return smalltalk.withContext(function($ctx1) {
  28. _st(_st(self)._nodes())._add_(aNode);
  29. return self}, function($ctx1) {$ctx1.fill(self,"addNode:",{aNode:aNode},smalltalk.Node)})},
  30. args: ["aNode"],
  31. source: "addNode: aNode\x0a\x09self nodes add: aNode",
  32. messageSends: ["add:", "nodes"],
  33. referencedClasses: []
  34. }),
  35. smalltalk.Node);
  36. smalltalk.addMethod(
  37. smalltalk.method({
  38. selector: "isAssignmentNode",
  39. category: 'testing',
  40. fn: function (){
  41. var self=this;
  42. return smalltalk.withContext(function($ctx1) {
  43. return false;
  44. }, function($ctx1) {$ctx1.fill(self,"isAssignmentNode",{},smalltalk.Node)})},
  45. args: [],
  46. source: "isAssignmentNode\x0a\x09^ false",
  47. messageSends: [],
  48. referencedClasses: []
  49. }),
  50. smalltalk.Node);
  51. smalltalk.addMethod(
  52. smalltalk.method({
  53. selector: "isBlockNode",
  54. category: 'testing',
  55. fn: function (){
  56. var self=this;
  57. return smalltalk.withContext(function($ctx1) {
  58. return false;
  59. }, function($ctx1) {$ctx1.fill(self,"isBlockNode",{},smalltalk.Node)})},
  60. args: [],
  61. source: "isBlockNode\x0a\x09^false",
  62. messageSends: [],
  63. referencedClasses: []
  64. }),
  65. smalltalk.Node);
  66. smalltalk.addMethod(
  67. smalltalk.method({
  68. selector: "isBlockSequenceNode",
  69. category: 'testing',
  70. fn: function (){
  71. var self=this;
  72. return smalltalk.withContext(function($ctx1) {
  73. return false;
  74. }, function($ctx1) {$ctx1.fill(self,"isBlockSequenceNode",{},smalltalk.Node)})},
  75. args: [],
  76. source: "isBlockSequenceNode\x0a\x09^false",
  77. messageSends: [],
  78. referencedClasses: []
  79. }),
  80. smalltalk.Node);
  81. smalltalk.addMethod(
  82. smalltalk.method({
  83. selector: "isImmutable",
  84. category: 'testing',
  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. args: [],
  91. source: "isImmutable\x0a\x09^false",
  92. messageSends: [],
  93. referencedClasses: []
  94. }),
  95. smalltalk.Node);
  96. smalltalk.addMethod(
  97. smalltalk.method({
  98. selector: "isNode",
  99. category: 'testing',
  100. fn: function (){
  101. var self=this;
  102. return smalltalk.withContext(function($ctx1) {
  103. return true;
  104. }, function($ctx1) {$ctx1.fill(self,"isNode",{},smalltalk.Node)})},
  105. args: [],
  106. source: "isNode\x0a\x09^ true",
  107. messageSends: [],
  108. referencedClasses: []
  109. }),
  110. smalltalk.Node);
  111. smalltalk.addMethod(
  112. smalltalk.method({
  113. selector: "isReturnNode",
  114. category: 'testing',
  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. args: [],
  121. source: "isReturnNode\x0a\x09^false",
  122. messageSends: [],
  123. referencedClasses: []
  124. }),
  125. smalltalk.Node);
  126. smalltalk.addMethod(
  127. smalltalk.method({
  128. selector: "isSendNode",
  129. category: 'testing',
  130. fn: function (){
  131. var self=this;
  132. return smalltalk.withContext(function($ctx1) {
  133. return false;
  134. }, function($ctx1) {$ctx1.fill(self,"isSendNode",{},smalltalk.Node)})},
  135. args: [],
  136. source: "isSendNode\x0a\x09^false",
  137. messageSends: [],
  138. referencedClasses: []
  139. }),
  140. smalltalk.Node);
  141. smalltalk.addMethod(
  142. smalltalk.method({
  143. selector: "isValueNode",
  144. category: 'testing',
  145. fn: function (){
  146. var self=this;
  147. return smalltalk.withContext(function($ctx1) {
  148. return false;
  149. }, function($ctx1) {$ctx1.fill(self,"isValueNode",{},smalltalk.Node)})},
  150. args: [],
  151. source: "isValueNode\x0a\x09^false",
  152. messageSends: [],
  153. referencedClasses: []
  154. }),
  155. smalltalk.Node);
  156. smalltalk.addMethod(
  157. smalltalk.method({
  158. selector: "nodes",
  159. category: 'accessing',
  160. fn: function (){
  161. var self=this;
  162. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  163. return smalltalk.withContext(function($ctx1) {
  164. var $2,$1;
  165. $2=self["@nodes"];
  166. if(($receiver = $2) == nil || $receiver == undefined){
  167. self["@nodes"]=_st($Array())._new();
  168. $1=self["@nodes"];
  169. } else {
  170. $1=$2;
  171. };
  172. return $1;
  173. }, function($ctx1) {$ctx1.fill(self,"nodes",{},smalltalk.Node)})},
  174. args: [],
  175. source: "nodes\x0a\x09^nodes ifNil: [nodes := Array new]",
  176. messageSends: ["ifNil:", "new"],
  177. referencedClasses: ["Array"]
  178. }),
  179. smalltalk.Node);
  180. smalltalk.addMethod(
  181. smalltalk.method({
  182. selector: "nodes:",
  183. category: 'building',
  184. fn: function (aCollection){
  185. var self=this;
  186. return smalltalk.withContext(function($ctx1) {
  187. self["@nodes"]=aCollection;
  188. return self}, function($ctx1) {$ctx1.fill(self,"nodes:",{aCollection:aCollection},smalltalk.Node)})},
  189. args: ["aCollection"],
  190. source: "nodes: aCollection\x0a\x09nodes := aCollection",
  191. messageSends: [],
  192. referencedClasses: []
  193. }),
  194. smalltalk.Node);
  195. smalltalk.addMethod(
  196. smalltalk.method({
  197. selector: "position",
  198. category: 'accessing',
  199. fn: function (){
  200. var self=this;
  201. return smalltalk.withContext(function($ctx1) {
  202. var $2,$1;
  203. $2=self["@position"];
  204. if(($receiver = $2) == nil || $receiver == undefined){
  205. self["@position"]=_st((0)).__at((0));
  206. $1=self["@position"];
  207. } else {
  208. $1=$2;
  209. };
  210. return $1;
  211. }, function($ctx1) {$ctx1.fill(self,"position",{},smalltalk.Node)})},
  212. args: [],
  213. source: "position\x0a\x09^position ifNil: [position := 0@0]",
  214. messageSends: ["ifNil:", "@"],
  215. referencedClasses: []
  216. }),
  217. smalltalk.Node);
  218. smalltalk.addMethod(
  219. smalltalk.method({
  220. selector: "position:",
  221. category: 'building',
  222. fn: function (aPosition){
  223. var self=this;
  224. return smalltalk.withContext(function($ctx1) {
  225. self["@position"]=aPosition;
  226. return self}, function($ctx1) {$ctx1.fill(self,"position:",{aPosition:aPosition},smalltalk.Node)})},
  227. args: ["aPosition"],
  228. source: "position: aPosition\x0a\x09position := aPosition",
  229. messageSends: [],
  230. referencedClasses: []
  231. }),
  232. smalltalk.Node);
  233. smalltalk.addMethod(
  234. smalltalk.method({
  235. selector: "shouldBeAliased",
  236. category: 'accessing',
  237. fn: function (){
  238. var self=this;
  239. return smalltalk.withContext(function($ctx1) {
  240. var $2,$1;
  241. $2=self["@shouldBeAliased"];
  242. if(($receiver = $2) == nil || $receiver == undefined){
  243. $1=false;
  244. } else {
  245. $1=$2;
  246. };
  247. return $1;
  248. }, function($ctx1) {$ctx1.fill(self,"shouldBeAliased",{},smalltalk.Node)})},
  249. args: [],
  250. source: "shouldBeAliased\x0a\x09^ shouldBeAliased ifNil: [ false ]",
  251. messageSends: ["ifNil:"],
  252. referencedClasses: []
  253. }),
  254. smalltalk.Node);
  255. smalltalk.addMethod(
  256. smalltalk.method({
  257. selector: "shouldBeAliased:",
  258. category: 'accessing',
  259. fn: function (aBoolean){
  260. var self=this;
  261. return smalltalk.withContext(function($ctx1) {
  262. self["@shouldBeAliased"]=aBoolean;
  263. return self}, function($ctx1) {$ctx1.fill(self,"shouldBeAliased:",{aBoolean:aBoolean},smalltalk.Node)})},
  264. args: ["aBoolean"],
  265. source: "shouldBeAliased: aBoolean\x0a\x09shouldBeAliased := aBoolean",
  266. messageSends: [],
  267. referencedClasses: []
  268. }),
  269. smalltalk.Node);
  270. smalltalk.addMethod(
  271. smalltalk.method({
  272. selector: "shouldBeInlined",
  273. category: 'accessing',
  274. fn: function (){
  275. var self=this;
  276. return smalltalk.withContext(function($ctx1) {
  277. var $2,$1;
  278. $2=self["@shouldBeInlined"];
  279. if(($receiver = $2) == nil || $receiver == undefined){
  280. $1=false;
  281. } else {
  282. $1=$2;
  283. };
  284. return $1;
  285. }, function($ctx1) {$ctx1.fill(self,"shouldBeInlined",{},smalltalk.Node)})},
  286. args: [],
  287. source: "shouldBeInlined\x0a\x09^ shouldBeInlined ifNil: [ false ]",
  288. messageSends: ["ifNil:"],
  289. referencedClasses: []
  290. }),
  291. smalltalk.Node);
  292. smalltalk.addMethod(
  293. smalltalk.method({
  294. selector: "shouldBeInlined:",
  295. category: 'accessing',
  296. fn: function (aBoolean){
  297. var self=this;
  298. return smalltalk.withContext(function($ctx1) {
  299. self["@shouldBeInlined"]=aBoolean;
  300. return self}, function($ctx1) {$ctx1.fill(self,"shouldBeInlined:",{aBoolean:aBoolean},smalltalk.Node)})},
  301. args: ["aBoolean"],
  302. source: "shouldBeInlined: aBoolean\x0a\x09shouldBeInlined := aBoolean",
  303. messageSends: [],
  304. referencedClasses: []
  305. }),
  306. smalltalk.Node);
  307. smalltalk.addMethod(
  308. smalltalk.method({
  309. selector: "stopOnStepping",
  310. category: 'testing',
  311. fn: function (){
  312. var self=this;
  313. return smalltalk.withContext(function($ctx1) {
  314. return false;
  315. }, function($ctx1) {$ctx1.fill(self,"stopOnStepping",{},smalltalk.Node)})},
  316. args: [],
  317. source: "stopOnStepping\x0a\x09^ false",
  318. messageSends: [],
  319. referencedClasses: []
  320. }),
  321. smalltalk.Node);
  322. smalltalk.addMethod(
  323. smalltalk.method({
  324. selector: "subtreeNeedsAliasing",
  325. category: 'testing',
  326. fn: function (){
  327. var self=this;
  328. return smalltalk.withContext(function($ctx1) {
  329. var $1;
  330. $1=_st(_st(_st(self)._shouldBeAliased())._or_((function(){
  331. return smalltalk.withContext(function($ctx2) {
  332. return _st(self)._shouldBeInlined();
  333. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})))._or_((function(){
  334. return smalltalk.withContext(function($ctx2) {
  335. return _st(_st(_st(self)._nodes())._detect_ifNone_((function(each){
  336. return smalltalk.withContext(function($ctx3) {
  337. return _st(each)._subtreeNeedsAliasing();
  338. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}),(function(){
  339. return smalltalk.withContext(function($ctx3) {
  340. return false;
  341. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}))).__tild_eq(false);
  342. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  343. return $1;
  344. }, function($ctx1) {$ctx1.fill(self,"subtreeNeedsAliasing",{},smalltalk.Node)})},
  345. args: [],
  346. source: "subtreeNeedsAliasing\x0a\x09^(self shouldBeAliased or: [ self shouldBeInlined ]) or: [\x0a\x09\x09(self nodes detect: [ :each | each subtreeNeedsAliasing ] ifNone: [ false ]) ~= false ]",
  347. messageSends: ["or:", "~=", "detect:ifNone:", "subtreeNeedsAliasing", "nodes", "shouldBeInlined", "shouldBeAliased"],
  348. referencedClasses: []
  349. }),
  350. smalltalk.Node);
  351. smalltalk.addClass('AssignmentNode', smalltalk.Node, ['left', 'right'], 'Compiler-AST');
  352. smalltalk.AssignmentNode.comment="I represent an assignment node."
  353. smalltalk.addMethod(
  354. smalltalk.method({
  355. selector: "accept:",
  356. category: 'visiting',
  357. fn: function (aVisitor){
  358. var self=this;
  359. return smalltalk.withContext(function($ctx1) {
  360. var $1;
  361. $1=_st(aVisitor)._visitAssignmentNode_(self);
  362. return $1;
  363. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},smalltalk.AssignmentNode)})},
  364. args: ["aVisitor"],
  365. source: "accept: aVisitor\x0a\x09^ aVisitor visitAssignmentNode: self",
  366. messageSends: ["visitAssignmentNode:"],
  367. referencedClasses: []
  368. }),
  369. smalltalk.AssignmentNode);
  370. smalltalk.addMethod(
  371. smalltalk.method({
  372. selector: "isAssignmentNode",
  373. category: 'testing',
  374. fn: function (){
  375. var self=this;
  376. return smalltalk.withContext(function($ctx1) {
  377. return true;
  378. }, function($ctx1) {$ctx1.fill(self,"isAssignmentNode",{},smalltalk.AssignmentNode)})},
  379. args: [],
  380. source: "isAssignmentNode\x0a\x09^ true",
  381. messageSends: [],
  382. referencedClasses: []
  383. }),
  384. smalltalk.AssignmentNode);
  385. smalltalk.addMethod(
  386. smalltalk.method({
  387. selector: "left",
  388. category: 'accessing',
  389. fn: function (){
  390. var self=this;
  391. return smalltalk.withContext(function($ctx1) {
  392. var $1;
  393. $1=self["@left"];
  394. return $1;
  395. }, function($ctx1) {$ctx1.fill(self,"left",{},smalltalk.AssignmentNode)})},
  396. args: [],
  397. source: "left\x0a\x09^left",
  398. messageSends: [],
  399. referencedClasses: []
  400. }),
  401. smalltalk.AssignmentNode);
  402. smalltalk.addMethod(
  403. smalltalk.method({
  404. selector: "left:",
  405. category: 'accessing',
  406. fn: function (aNode){
  407. var self=this;
  408. return smalltalk.withContext(function($ctx1) {
  409. self["@left"]=aNode;
  410. return self}, function($ctx1) {$ctx1.fill(self,"left:",{aNode:aNode},smalltalk.AssignmentNode)})},
  411. args: ["aNode"],
  412. source: "left: aNode\x0a\x09left := aNode",
  413. messageSends: [],
  414. referencedClasses: []
  415. }),
  416. smalltalk.AssignmentNode);
  417. smalltalk.addMethod(
  418. smalltalk.method({
  419. selector: "nodes",
  420. category: 'accessing',
  421. fn: function (){
  422. var self=this;
  423. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  424. return smalltalk.withContext(function($ctx1) {
  425. var $1;
  426. $1=_st($Array())._with_with_(_st(self)._left(),_st(self)._right());
  427. return $1;
  428. }, function($ctx1) {$ctx1.fill(self,"nodes",{},smalltalk.AssignmentNode)})},
  429. args: [],
  430. source: "nodes\x0a\x09^ Array with: self left with: self right",
  431. messageSends: ["with:with:", "left", "right"],
  432. referencedClasses: ["Array"]
  433. }),
  434. smalltalk.AssignmentNode);
  435. smalltalk.addMethod(
  436. smalltalk.method({
  437. selector: "right",
  438. category: 'accessing',
  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. args: [],
  447. source: "right\x0a\x09^right",
  448. messageSends: [],
  449. referencedClasses: []
  450. }),
  451. smalltalk.AssignmentNode);
  452. smalltalk.addMethod(
  453. smalltalk.method({
  454. selector: "right:",
  455. category: 'accessing',
  456. fn: function (aNode){
  457. var self=this;
  458. return smalltalk.withContext(function($ctx1) {
  459. self["@right"]=aNode;
  460. return self}, function($ctx1) {$ctx1.fill(self,"right:",{aNode:aNode},smalltalk.AssignmentNode)})},
  461. args: ["aNode"],
  462. source: "right: aNode\x0a\x09right := aNode",
  463. messageSends: [],
  464. referencedClasses: []
  465. }),
  466. smalltalk.AssignmentNode);
  467. smalltalk.addClass('BlockNode', smalltalk.Node, ['parameters', 'scope'], 'Compiler-AST');
  468. smalltalk.BlockNode.comment="I represent an block closure node."
  469. smalltalk.addMethod(
  470. smalltalk.method({
  471. selector: "accept:",
  472. category: 'visiting',
  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. args: ["aVisitor"],
  481. source: "accept: aVisitor\x0a\x09^ aVisitor visitBlockNode: self",
  482. messageSends: ["visitBlockNode:"],
  483. referencedClasses: []
  484. }),
  485. smalltalk.BlockNode);
  486. smalltalk.addMethod(
  487. smalltalk.method({
  488. selector: "isBlockNode",
  489. category: 'testing',
  490. fn: function (){
  491. var self=this;
  492. return smalltalk.withContext(function($ctx1) {
  493. return true;
  494. }, function($ctx1) {$ctx1.fill(self,"isBlockNode",{},smalltalk.BlockNode)})},
  495. args: [],
  496. source: "isBlockNode\x0a\x09^true",
  497. messageSends: [],
  498. referencedClasses: []
  499. }),
  500. smalltalk.BlockNode);
  501. smalltalk.addMethod(
  502. smalltalk.method({
  503. selector: "parameters",
  504. category: 'accessing',
  505. fn: function (){
  506. var self=this;
  507. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  508. return smalltalk.withContext(function($ctx1) {
  509. var $2,$1;
  510. $2=self["@parameters"];
  511. if(($receiver = $2) == nil || $receiver == undefined){
  512. self["@parameters"]=_st($Array())._new();
  513. $1=self["@parameters"];
  514. } else {
  515. $1=$2;
  516. };
  517. return $1;
  518. }, function($ctx1) {$ctx1.fill(self,"parameters",{},smalltalk.BlockNode)})},
  519. args: [],
  520. source: "parameters\x0a\x09^parameters ifNil: [parameters := Array new]",
  521. messageSends: ["ifNil:", "new"],
  522. referencedClasses: ["Array"]
  523. }),
  524. smalltalk.BlockNode);
  525. smalltalk.addMethod(
  526. smalltalk.method({
  527. selector: "parameters:",
  528. category: 'accessing',
  529. fn: function (aCollection){
  530. var self=this;
  531. return smalltalk.withContext(function($ctx1) {
  532. self["@parameters"]=aCollection;
  533. return self}, function($ctx1) {$ctx1.fill(self,"parameters:",{aCollection:aCollection},smalltalk.BlockNode)})},
  534. args: ["aCollection"],
  535. source: "parameters: aCollection\x0a\x09parameters := aCollection",
  536. messageSends: [],
  537. referencedClasses: []
  538. }),
  539. smalltalk.BlockNode);
  540. smalltalk.addMethod(
  541. smalltalk.method({
  542. selector: "scope",
  543. category: 'accessing',
  544. fn: function (){
  545. var self=this;
  546. return smalltalk.withContext(function($ctx1) {
  547. var $1;
  548. $1=self["@scope"];
  549. return $1;
  550. }, function($ctx1) {$ctx1.fill(self,"scope",{},smalltalk.BlockNode)})},
  551. args: [],
  552. source: "scope\x0a\x09^ scope",
  553. messageSends: [],
  554. referencedClasses: []
  555. }),
  556. smalltalk.BlockNode);
  557. smalltalk.addMethod(
  558. smalltalk.method({
  559. selector: "scope:",
  560. category: 'accessing',
  561. fn: function (aLexicalScope){
  562. var self=this;
  563. return smalltalk.withContext(function($ctx1) {
  564. self["@scope"]=aLexicalScope;
  565. return self}, function($ctx1) {$ctx1.fill(self,"scope:",{aLexicalScope:aLexicalScope},smalltalk.BlockNode)})},
  566. args: ["aLexicalScope"],
  567. source: "scope: aLexicalScope\x0a\x09scope := aLexicalScope",
  568. messageSends: [],
  569. referencedClasses: []
  570. }),
  571. smalltalk.BlockNode);
  572. smalltalk.addMethod(
  573. smalltalk.method({
  574. selector: "subtreeNeedsAliasing",
  575. category: 'testing',
  576. fn: function (){
  577. var self=this;
  578. return smalltalk.withContext(function($ctx1) {
  579. var $1;
  580. $1=_st(_st(self)._shouldBeAliased())._or_((function(){
  581. return smalltalk.withContext(function($ctx2) {
  582. return _st(self)._shouldBeInlined();
  583. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  584. return $1;
  585. }, function($ctx1) {$ctx1.fill(self,"subtreeNeedsAliasing",{},smalltalk.BlockNode)})},
  586. args: [],
  587. source: "subtreeNeedsAliasing\x0a\x09^ self shouldBeAliased or: [ self shouldBeInlined ]",
  588. messageSends: ["or:", "shouldBeInlined", "shouldBeAliased"],
  589. referencedClasses: []
  590. }),
  591. smalltalk.BlockNode);
  592. smalltalk.addClass('CascadeNode', smalltalk.Node, ['receiver'], 'Compiler-AST');
  593. smalltalk.CascadeNode.comment="I represent an cascade node."
  594. smalltalk.addMethod(
  595. smalltalk.method({
  596. selector: "accept:",
  597. category: 'visiting',
  598. fn: function (aVisitor){
  599. var self=this;
  600. return smalltalk.withContext(function($ctx1) {
  601. var $1;
  602. $1=_st(aVisitor)._visitCascadeNode_(self);
  603. return $1;
  604. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},smalltalk.CascadeNode)})},
  605. args: ["aVisitor"],
  606. source: "accept: aVisitor\x0a\x09^ aVisitor visitCascadeNode: self",
  607. messageSends: ["visitCascadeNode:"],
  608. referencedClasses: []
  609. }),
  610. smalltalk.CascadeNode);
  611. smalltalk.addMethod(
  612. smalltalk.method({
  613. selector: "receiver",
  614. category: 'accessing',
  615. fn: function (){
  616. var self=this;
  617. return smalltalk.withContext(function($ctx1) {
  618. var $1;
  619. $1=self["@receiver"];
  620. return $1;
  621. }, function($ctx1) {$ctx1.fill(self,"receiver",{},smalltalk.CascadeNode)})},
  622. args: [],
  623. source: "receiver\x0a\x09^receiver",
  624. messageSends: [],
  625. referencedClasses: []
  626. }),
  627. smalltalk.CascadeNode);
  628. smalltalk.addMethod(
  629. smalltalk.method({
  630. selector: "receiver:",
  631. category: 'accessing',
  632. fn: function (aNode){
  633. var self=this;
  634. return smalltalk.withContext(function($ctx1) {
  635. self["@receiver"]=aNode;
  636. return self}, function($ctx1) {$ctx1.fill(self,"receiver:",{aNode:aNode},smalltalk.CascadeNode)})},
  637. args: ["aNode"],
  638. source: "receiver: aNode\x0a\x09receiver := aNode",
  639. messageSends: [],
  640. referencedClasses: []
  641. }),
  642. smalltalk.CascadeNode);
  643. smalltalk.addClass('DynamicArrayNode', smalltalk.Node, [], 'Compiler-AST');
  644. smalltalk.DynamicArrayNode.comment="I represent an dynamic array node."
  645. smalltalk.addMethod(
  646. smalltalk.method({
  647. selector: "accept:",
  648. category: 'visiting',
  649. fn: function (aVisitor){
  650. var self=this;
  651. return smalltalk.withContext(function($ctx1) {
  652. var $1;
  653. $1=_st(aVisitor)._visitDynamicArrayNode_(self);
  654. return $1;
  655. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},smalltalk.DynamicArrayNode)})},
  656. args: ["aVisitor"],
  657. source: "accept: aVisitor\x0a\x09^ aVisitor visitDynamicArrayNode: self",
  658. messageSends: ["visitDynamicArrayNode:"],
  659. referencedClasses: []
  660. }),
  661. smalltalk.DynamicArrayNode);
  662. smalltalk.addClass('DynamicDictionaryNode', smalltalk.Node, [], 'Compiler-AST');
  663. smalltalk.DynamicDictionaryNode.comment="I represent an dynamic dictionary node."
  664. smalltalk.addMethod(
  665. smalltalk.method({
  666. selector: "accept:",
  667. category: 'visiting',
  668. fn: function (aVisitor){
  669. var self=this;
  670. return smalltalk.withContext(function($ctx1) {
  671. var $1;
  672. $1=_st(aVisitor)._visitDynamicDictionaryNode_(self);
  673. return $1;
  674. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},smalltalk.DynamicDictionaryNode)})},
  675. args: ["aVisitor"],
  676. source: "accept: aVisitor\x0a\x09^ aVisitor visitDynamicDictionaryNode: self",
  677. messageSends: ["visitDynamicDictionaryNode:"],
  678. referencedClasses: []
  679. }),
  680. smalltalk.DynamicDictionaryNode);
  681. smalltalk.addClass('JSStatementNode', smalltalk.Node, ['source'], 'Compiler-AST');
  682. smalltalk.JSStatementNode.comment="I represent an JavaScript statement node."
  683. smalltalk.addMethod(
  684. smalltalk.method({
  685. selector: "accept:",
  686. category: 'visiting',
  687. fn: function (aVisitor){
  688. var self=this;
  689. return smalltalk.withContext(function($ctx1) {
  690. var $1;
  691. $1=_st(aVisitor)._visitJSStatementNode_(self);
  692. return $1;
  693. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},smalltalk.JSStatementNode)})},
  694. args: ["aVisitor"],
  695. source: "accept: aVisitor\x0a\x09^ aVisitor visitJSStatementNode: self",
  696. messageSends: ["visitJSStatementNode:"],
  697. referencedClasses: []
  698. }),
  699. smalltalk.JSStatementNode);
  700. smalltalk.addMethod(
  701. smalltalk.method({
  702. selector: "source",
  703. category: 'accessing',
  704. fn: function (){
  705. var self=this;
  706. return smalltalk.withContext(function($ctx1) {
  707. var $2,$1;
  708. $2=self["@source"];
  709. if(($receiver = $2) == nil || $receiver == undefined){
  710. $1="";
  711. } else {
  712. $1=$2;
  713. };
  714. return $1;
  715. }, function($ctx1) {$ctx1.fill(self,"source",{},smalltalk.JSStatementNode)})},
  716. args: [],
  717. source: "source\x0a\x09^source ifNil: ['']",
  718. messageSends: ["ifNil:"],
  719. referencedClasses: []
  720. }),
  721. smalltalk.JSStatementNode);
  722. smalltalk.addMethod(
  723. smalltalk.method({
  724. selector: "source:",
  725. category: 'accessing',
  726. fn: function (aString){
  727. var self=this;
  728. return smalltalk.withContext(function($ctx1) {
  729. self["@source"]=aString;
  730. return self}, function($ctx1) {$ctx1.fill(self,"source:",{aString:aString},smalltalk.JSStatementNode)})},
  731. args: ["aString"],
  732. source: "source: aString\x0a\x09source := aString",
  733. messageSends: [],
  734. referencedClasses: []
  735. }),
  736. smalltalk.JSStatementNode);
  737. smalltalk.addClass('MethodNode', smalltalk.Node, ['selector', 'arguments', 'source', 'scope', 'classReferences', 'messageSends', 'superSends'], 'Compiler-AST');
  738. smalltalk.MethodNode.comment="I represent an method node.\x0a\x0aA method node must be the root and only method node of a valid AST."
  739. smalltalk.addMethod(
  740. smalltalk.method({
  741. selector: "accept:",
  742. category: 'visiting',
  743. fn: function (aVisitor){
  744. var self=this;
  745. return smalltalk.withContext(function($ctx1) {
  746. var $1;
  747. $1=_st(aVisitor)._visitMethodNode_(self);
  748. return $1;
  749. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},smalltalk.MethodNode)})},
  750. args: ["aVisitor"],
  751. source: "accept: aVisitor\x0a\x09^ aVisitor visitMethodNode: self",
  752. messageSends: ["visitMethodNode:"],
  753. referencedClasses: []
  754. }),
  755. smalltalk.MethodNode);
  756. smalltalk.addMethod(
  757. smalltalk.method({
  758. selector: "arguments",
  759. category: 'accessing',
  760. fn: function (){
  761. var self=this;
  762. return smalltalk.withContext(function($ctx1) {
  763. var $2,$1;
  764. $2=self["@arguments"];
  765. if(($receiver = $2) == nil || $receiver == undefined){
  766. $1=[];
  767. } else {
  768. $1=$2;
  769. };
  770. return $1;
  771. }, function($ctx1) {$ctx1.fill(self,"arguments",{},smalltalk.MethodNode)})},
  772. args: [],
  773. source: "arguments\x0a\x09^arguments ifNil: [#()]",
  774. messageSends: ["ifNil:"],
  775. referencedClasses: []
  776. }),
  777. smalltalk.MethodNode);
  778. smalltalk.addMethod(
  779. smalltalk.method({
  780. selector: "arguments:",
  781. category: 'accessing',
  782. fn: function (aCollection){
  783. var self=this;
  784. return smalltalk.withContext(function($ctx1) {
  785. self["@arguments"]=aCollection;
  786. return self}, function($ctx1) {$ctx1.fill(self,"arguments:",{aCollection:aCollection},smalltalk.MethodNode)})},
  787. args: ["aCollection"],
  788. source: "arguments: aCollection\x0a\x09arguments := aCollection",
  789. messageSends: [],
  790. referencedClasses: []
  791. }),
  792. smalltalk.MethodNode);
  793. smalltalk.addMethod(
  794. smalltalk.method({
  795. selector: "classReferences",
  796. category: 'accessing',
  797. fn: function (){
  798. var self=this;
  799. return smalltalk.withContext(function($ctx1) {
  800. var $1;
  801. $1=self["@classReferences"];
  802. return $1;
  803. }, function($ctx1) {$ctx1.fill(self,"classReferences",{},smalltalk.MethodNode)})},
  804. args: [],
  805. source: "classReferences\x0a\x09^ classReferences",
  806. messageSends: [],
  807. referencedClasses: []
  808. }),
  809. smalltalk.MethodNode);
  810. smalltalk.addMethod(
  811. smalltalk.method({
  812. selector: "classReferences:",
  813. category: 'accessing',
  814. fn: function (aCollection){
  815. var self=this;
  816. return smalltalk.withContext(function($ctx1) {
  817. self["@classReferences"]=aCollection;
  818. return self}, function($ctx1) {$ctx1.fill(self,"classReferences:",{aCollection:aCollection},smalltalk.MethodNode)})},
  819. args: ["aCollection"],
  820. source: "classReferences: aCollection\x0a\x09classReferences := aCollection",
  821. messageSends: [],
  822. referencedClasses: []
  823. }),
  824. smalltalk.MethodNode);
  825. smalltalk.addMethod(
  826. smalltalk.method({
  827. selector: "messageSends",
  828. category: 'accessing',
  829. fn: function (){
  830. var self=this;
  831. return smalltalk.withContext(function($ctx1) {
  832. var $1;
  833. $1=self["@messageSends"];
  834. return $1;
  835. }, function($ctx1) {$ctx1.fill(self,"messageSends",{},smalltalk.MethodNode)})},
  836. args: [],
  837. source: "messageSends\x0a\x09^ messageSends",
  838. messageSends: [],
  839. referencedClasses: []
  840. }),
  841. smalltalk.MethodNode);
  842. smalltalk.addMethod(
  843. smalltalk.method({
  844. selector: "messageSends:",
  845. category: 'accessing',
  846. fn: function (aCollection){
  847. var self=this;
  848. return smalltalk.withContext(function($ctx1) {
  849. self["@messageSends"]=aCollection;
  850. return self}, function($ctx1) {$ctx1.fill(self,"messageSends:",{aCollection:aCollection},smalltalk.MethodNode)})},
  851. args: ["aCollection"],
  852. source: "messageSends: aCollection\x0a\x09messageSends := aCollection",
  853. messageSends: [],
  854. referencedClasses: []
  855. }),
  856. smalltalk.MethodNode);
  857. smalltalk.addMethod(
  858. smalltalk.method({
  859. selector: "scope",
  860. category: 'accessing',
  861. fn: function (){
  862. var self=this;
  863. return smalltalk.withContext(function($ctx1) {
  864. var $1;
  865. $1=self["@scope"];
  866. return $1;
  867. }, function($ctx1) {$ctx1.fill(self,"scope",{},smalltalk.MethodNode)})},
  868. args: [],
  869. source: "scope\x0a\x09^ scope",
  870. messageSends: [],
  871. referencedClasses: []
  872. }),
  873. smalltalk.MethodNode);
  874. smalltalk.addMethod(
  875. smalltalk.method({
  876. selector: "scope:",
  877. category: 'accessing',
  878. fn: function (aMethodScope){
  879. var self=this;
  880. return smalltalk.withContext(function($ctx1) {
  881. self["@scope"]=aMethodScope;
  882. return self}, function($ctx1) {$ctx1.fill(self,"scope:",{aMethodScope:aMethodScope},smalltalk.MethodNode)})},
  883. args: ["aMethodScope"],
  884. source: "scope: aMethodScope\x0a\x09scope := aMethodScope",
  885. messageSends: [],
  886. referencedClasses: []
  887. }),
  888. smalltalk.MethodNode);
  889. smalltalk.addMethod(
  890. smalltalk.method({
  891. selector: "selector",
  892. category: 'accessing',
  893. fn: function (){
  894. var self=this;
  895. return smalltalk.withContext(function($ctx1) {
  896. var $1;
  897. $1=self["@selector"];
  898. return $1;
  899. }, function($ctx1) {$ctx1.fill(self,"selector",{},smalltalk.MethodNode)})},
  900. args: [],
  901. source: "selector\x0a\x09^selector",
  902. messageSends: [],
  903. referencedClasses: []
  904. }),
  905. smalltalk.MethodNode);
  906. smalltalk.addMethod(
  907. smalltalk.method({
  908. selector: "selector:",
  909. category: 'accessing',
  910. fn: function (aString){
  911. var self=this;
  912. return smalltalk.withContext(function($ctx1) {
  913. self["@selector"]=aString;
  914. return self}, function($ctx1) {$ctx1.fill(self,"selector:",{aString:aString},smalltalk.MethodNode)})},
  915. args: ["aString"],
  916. source: "selector: aString\x0a\x09selector := aString",
  917. messageSends: [],
  918. referencedClasses: []
  919. }),
  920. smalltalk.MethodNode);
  921. smalltalk.addMethod(
  922. smalltalk.method({
  923. selector: "source",
  924. category: 'accessing',
  925. fn: function (){
  926. var self=this;
  927. return smalltalk.withContext(function($ctx1) {
  928. var $1;
  929. $1=self["@source"];
  930. return $1;
  931. }, function($ctx1) {$ctx1.fill(self,"source",{},smalltalk.MethodNode)})},
  932. args: [],
  933. source: "source\x0a\x09^source",
  934. messageSends: [],
  935. referencedClasses: []
  936. }),
  937. smalltalk.MethodNode);
  938. smalltalk.addMethod(
  939. smalltalk.method({
  940. selector: "source:",
  941. category: 'accessing',
  942. fn: function (aString){
  943. var self=this;
  944. return smalltalk.withContext(function($ctx1) {
  945. self["@source"]=aString;
  946. return self}, function($ctx1) {$ctx1.fill(self,"source:",{aString:aString},smalltalk.MethodNode)})},
  947. args: ["aString"],
  948. source: "source: aString\x0a\x09source := aString",
  949. messageSends: [],
  950. referencedClasses: []
  951. }),
  952. smalltalk.MethodNode);
  953. smalltalk.addMethod(
  954. smalltalk.method({
  955. selector: "superSends",
  956. category: 'accessing',
  957. fn: function (){
  958. var self=this;
  959. return smalltalk.withContext(function($ctx1) {
  960. var $1;
  961. $1=self["@superSends"];
  962. return $1;
  963. }, function($ctx1) {$ctx1.fill(self,"superSends",{},smalltalk.MethodNode)})},
  964. args: [],
  965. source: "superSends\x0a\x09^ superSends",
  966. messageSends: [],
  967. referencedClasses: []
  968. }),
  969. smalltalk.MethodNode);
  970. smalltalk.addMethod(
  971. smalltalk.method({
  972. selector: "superSends:",
  973. category: 'accessing',
  974. fn: function (aCollection){
  975. var self=this;
  976. return smalltalk.withContext(function($ctx1) {
  977. self["@superSends"]=aCollection;
  978. return self}, function($ctx1) {$ctx1.fill(self,"superSends:",{aCollection:aCollection},smalltalk.MethodNode)})},
  979. args: ["aCollection"],
  980. source: "superSends: aCollection\x0a\x09superSends := aCollection",
  981. messageSends: [],
  982. referencedClasses: []
  983. }),
  984. smalltalk.MethodNode);
  985. smalltalk.addClass('ReturnNode', smalltalk.Node, ['scope'], 'Compiler-AST');
  986. smalltalk.ReturnNode.comment="I represent an return node. At the AST level, there is not difference between a local return or non-local return."
  987. smalltalk.addMethod(
  988. smalltalk.method({
  989. selector: "accept:",
  990. category: 'visiting',
  991. fn: function (aVisitor){
  992. var self=this;
  993. return smalltalk.withContext(function($ctx1) {
  994. var $1;
  995. $1=_st(aVisitor)._visitReturnNode_(self);
  996. return $1;
  997. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},smalltalk.ReturnNode)})},
  998. args: ["aVisitor"],
  999. source: "accept: aVisitor\x0a\x09^ aVisitor visitReturnNode: self",
  1000. messageSends: ["visitReturnNode:"],
  1001. referencedClasses: []
  1002. }),
  1003. smalltalk.ReturnNode);
  1004. smalltalk.addMethod(
  1005. smalltalk.method({
  1006. selector: "isReturnNode",
  1007. category: 'testing',
  1008. fn: function (){
  1009. var self=this;
  1010. return smalltalk.withContext(function($ctx1) {
  1011. return true;
  1012. }, function($ctx1) {$ctx1.fill(self,"isReturnNode",{},smalltalk.ReturnNode)})},
  1013. args: [],
  1014. source: "isReturnNode\x0a\x09^ true",
  1015. messageSends: [],
  1016. referencedClasses: []
  1017. }),
  1018. smalltalk.ReturnNode);
  1019. smalltalk.addMethod(
  1020. smalltalk.method({
  1021. selector: "nonLocalReturn",
  1022. category: 'testing',
  1023. fn: function (){
  1024. var self=this;
  1025. return smalltalk.withContext(function($ctx1) {
  1026. var $1;
  1027. $1=_st(_st(_st(self)._scope())._isMethodScope())._not();
  1028. return $1;
  1029. }, function($ctx1) {$ctx1.fill(self,"nonLocalReturn",{},smalltalk.ReturnNode)})},
  1030. args: [],
  1031. source: "nonLocalReturn\x0a\x09^ self scope isMethodScope not",
  1032. messageSends: ["not", "isMethodScope", "scope"],
  1033. referencedClasses: []
  1034. }),
  1035. smalltalk.ReturnNode);
  1036. smalltalk.addMethod(
  1037. smalltalk.method({
  1038. selector: "scope",
  1039. category: 'accessing',
  1040. fn: function (){
  1041. var self=this;
  1042. return smalltalk.withContext(function($ctx1) {
  1043. var $1;
  1044. $1=self["@scope"];
  1045. return $1;
  1046. }, function($ctx1) {$ctx1.fill(self,"scope",{},smalltalk.ReturnNode)})},
  1047. args: [],
  1048. source: "scope\x0a\x09^ scope",
  1049. messageSends: [],
  1050. referencedClasses: []
  1051. }),
  1052. smalltalk.ReturnNode);
  1053. smalltalk.addMethod(
  1054. smalltalk.method({
  1055. selector: "scope:",
  1056. category: 'accessing',
  1057. fn: function (aLexicalScope){
  1058. var self=this;
  1059. return smalltalk.withContext(function($ctx1) {
  1060. self["@scope"]=aLexicalScope;
  1061. return self}, function($ctx1) {$ctx1.fill(self,"scope:",{aLexicalScope:aLexicalScope},smalltalk.ReturnNode)})},
  1062. args: ["aLexicalScope"],
  1063. source: "scope: aLexicalScope\x0a\x09scope := aLexicalScope",
  1064. messageSends: [],
  1065. referencedClasses: []
  1066. }),
  1067. smalltalk.ReturnNode);
  1068. smalltalk.addClass('SendNode', smalltalk.Node, ['selector', 'arguments', 'receiver', 'superSend', 'index'], 'Compiler-AST');
  1069. smalltalk.SendNode.comment="I represent an message send node."
  1070. smalltalk.addMethod(
  1071. smalltalk.method({
  1072. selector: "accept:",
  1073. category: 'visiting',
  1074. fn: function (aVisitor){
  1075. var self=this;
  1076. return smalltalk.withContext(function($ctx1) {
  1077. var $1;
  1078. $1=_st(aVisitor)._visitSendNode_(self);
  1079. return $1;
  1080. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},smalltalk.SendNode)})},
  1081. args: ["aVisitor"],
  1082. source: "accept: aVisitor\x0a\x09^ aVisitor visitSendNode: self",
  1083. messageSends: ["visitSendNode:"],
  1084. referencedClasses: []
  1085. }),
  1086. smalltalk.SendNode);
  1087. smalltalk.addMethod(
  1088. smalltalk.method({
  1089. selector: "arguments",
  1090. category: 'accessing',
  1091. fn: function (){
  1092. var self=this;
  1093. return smalltalk.withContext(function($ctx1) {
  1094. var $2,$1;
  1095. $2=self["@arguments"];
  1096. if(($receiver = $2) == nil || $receiver == undefined){
  1097. self["@arguments"]=[];
  1098. $1=self["@arguments"];
  1099. } else {
  1100. $1=$2;
  1101. };
  1102. return $1;
  1103. }, function($ctx1) {$ctx1.fill(self,"arguments",{},smalltalk.SendNode)})},
  1104. args: [],
  1105. source: "arguments\x0a\x09^arguments ifNil: [arguments := #()]",
  1106. messageSends: ["ifNil:"],
  1107. referencedClasses: []
  1108. }),
  1109. smalltalk.SendNode);
  1110. smalltalk.addMethod(
  1111. smalltalk.method({
  1112. selector: "arguments:",
  1113. category: 'accessing',
  1114. fn: function (aCollection){
  1115. var self=this;
  1116. return smalltalk.withContext(function($ctx1) {
  1117. self["@arguments"]=aCollection;
  1118. return self}, function($ctx1) {$ctx1.fill(self,"arguments:",{aCollection:aCollection},smalltalk.SendNode)})},
  1119. args: ["aCollection"],
  1120. source: "arguments: aCollection\x0a\x09arguments := aCollection",
  1121. messageSends: [],
  1122. referencedClasses: []
  1123. }),
  1124. smalltalk.SendNode);
  1125. smalltalk.addMethod(
  1126. smalltalk.method({
  1127. selector: "cascadeNodeWithMessages:",
  1128. category: 'accessing',
  1129. fn: function (aCollection){
  1130. var self=this;
  1131. var first;
  1132. function $SendNode(){return smalltalk.SendNode||(typeof SendNode=="undefined"?nil:SendNode)}
  1133. function $CascadeNode(){return smalltalk.CascadeNode||(typeof CascadeNode=="undefined"?nil:CascadeNode)}
  1134. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  1135. return smalltalk.withContext(function($ctx1) {
  1136. var $1,$2,$4,$5,$3;
  1137. $1=_st($SendNode())._new();
  1138. _st($1)._selector_(_st(self)._selector());
  1139. _st($1)._arguments_(_st(self)._arguments());
  1140. $2=_st($1)._yourself();
  1141. first=$2;
  1142. $4=_st($CascadeNode())._new();
  1143. _st($4)._receiver_(_st(self)._receiver());
  1144. _st($4)._nodes_(_st(_st($Array())._with_(first)).__comma(aCollection));
  1145. $5=_st($4)._yourself();
  1146. $3=$5;
  1147. return $3;
  1148. }, function($ctx1) {$ctx1.fill(self,"cascadeNodeWithMessages:",{aCollection:aCollection,first:first},smalltalk.SendNode)})},
  1149. args: ["aCollection"],
  1150. source: "cascadeNodeWithMessages: aCollection\x0a\x09| first |\x0a\x09first := SendNode new\x0a\x09\x09selector: self selector;\x0a\x09\x09arguments: self arguments;\x0a\x09\x09yourself.\x0a\x09^CascadeNode new\x0a\x09\x09receiver: self receiver;\x0a\x09\x09nodes: (Array with: first), aCollection;\x0a\x09\x09yourself",
  1151. messageSends: ["selector:", "selector", "new", "arguments:", "arguments", "yourself", "receiver:", "receiver", "nodes:", ",", "with:"],
  1152. referencedClasses: ["SendNode", "CascadeNode", "Array"]
  1153. }),
  1154. smalltalk.SendNode);
  1155. smalltalk.addMethod(
  1156. smalltalk.method({
  1157. selector: "index",
  1158. category: 'accessing',
  1159. fn: function (){
  1160. var self=this;
  1161. return smalltalk.withContext(function($ctx1) {
  1162. var $1;
  1163. $1=self["@index"];
  1164. return $1;
  1165. }, function($ctx1) {$ctx1.fill(self,"index",{},smalltalk.SendNode)})},
  1166. args: [],
  1167. source: "index\x0a\x09^ index",
  1168. messageSends: [],
  1169. referencedClasses: []
  1170. }),
  1171. smalltalk.SendNode);
  1172. smalltalk.addMethod(
  1173. smalltalk.method({
  1174. selector: "index:",
  1175. category: 'accessing',
  1176. fn: function (anInteger){
  1177. var self=this;
  1178. return smalltalk.withContext(function($ctx1) {
  1179. self["@index"]=anInteger;
  1180. return self}, function($ctx1) {$ctx1.fill(self,"index:",{anInteger:anInteger},smalltalk.SendNode)})},
  1181. args: ["anInteger"],
  1182. source: "index: anInteger\x0a\x09index := anInteger",
  1183. messageSends: [],
  1184. referencedClasses: []
  1185. }),
  1186. smalltalk.SendNode);
  1187. smalltalk.addMethod(
  1188. smalltalk.method({
  1189. selector: "isSendNode",
  1190. category: 'testing',
  1191. fn: function (){
  1192. var self=this;
  1193. return smalltalk.withContext(function($ctx1) {
  1194. return true;
  1195. }, function($ctx1) {$ctx1.fill(self,"isSendNode",{},smalltalk.SendNode)})},
  1196. args: [],
  1197. source: "isSendNode\x0a\x09^ true",
  1198. messageSends: [],
  1199. referencedClasses: []
  1200. }),
  1201. smalltalk.SendNode);
  1202. smalltalk.addMethod(
  1203. smalltalk.method({
  1204. selector: "nodes",
  1205. category: 'accessing',
  1206. fn: function (){
  1207. var self=this;
  1208. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  1209. return smalltalk.withContext(function($ctx1) {
  1210. var $2,$3,$1;
  1211. $2=_st($Array())._withAll_(_st(self)._arguments());
  1212. _st($2)._add_(_st(self)._receiver());
  1213. $3=_st($2)._yourself();
  1214. $1=$3;
  1215. return $1;
  1216. }, function($ctx1) {$ctx1.fill(self,"nodes",{},smalltalk.SendNode)})},
  1217. args: [],
  1218. source: "nodes\x0a\x09^ (Array withAll: self arguments)\x0a\x09\x09add: self receiver;\x0a\x09\x09yourself",
  1219. messageSends: ["add:", "receiver", "withAll:", "arguments", "yourself"],
  1220. referencedClasses: ["Array"]
  1221. }),
  1222. smalltalk.SendNode);
  1223. smalltalk.addMethod(
  1224. smalltalk.method({
  1225. selector: "receiver",
  1226. category: 'accessing',
  1227. fn: function (){
  1228. var self=this;
  1229. return smalltalk.withContext(function($ctx1) {
  1230. var $1;
  1231. $1=self["@receiver"];
  1232. return $1;
  1233. }, function($ctx1) {$ctx1.fill(self,"receiver",{},smalltalk.SendNode)})},
  1234. args: [],
  1235. source: "receiver\x0a\x09^receiver",
  1236. messageSends: [],
  1237. referencedClasses: []
  1238. }),
  1239. smalltalk.SendNode);
  1240. smalltalk.addMethod(
  1241. smalltalk.method({
  1242. selector: "receiver:",
  1243. category: 'accessing',
  1244. fn: function (aNode){
  1245. var self=this;
  1246. return smalltalk.withContext(function($ctx1) {
  1247. self["@receiver"]=aNode;
  1248. return self}, function($ctx1) {$ctx1.fill(self,"receiver:",{aNode:aNode},smalltalk.SendNode)})},
  1249. args: ["aNode"],
  1250. source: "receiver: aNode\x0a\x09receiver := aNode",
  1251. messageSends: [],
  1252. referencedClasses: []
  1253. }),
  1254. smalltalk.SendNode);
  1255. smalltalk.addMethod(
  1256. smalltalk.method({
  1257. selector: "selector",
  1258. category: 'accessing',
  1259. fn: function (){
  1260. var self=this;
  1261. return smalltalk.withContext(function($ctx1) {
  1262. var $1;
  1263. $1=self["@selector"];
  1264. return $1;
  1265. }, function($ctx1) {$ctx1.fill(self,"selector",{},smalltalk.SendNode)})},
  1266. args: [],
  1267. source: "selector\x0a\x09^selector",
  1268. messageSends: [],
  1269. referencedClasses: []
  1270. }),
  1271. smalltalk.SendNode);
  1272. smalltalk.addMethod(
  1273. smalltalk.method({
  1274. selector: "selector:",
  1275. category: 'accessing',
  1276. fn: function (aString){
  1277. var self=this;
  1278. return smalltalk.withContext(function($ctx1) {
  1279. self["@selector"]=aString;
  1280. return self}, function($ctx1) {$ctx1.fill(self,"selector:",{aString:aString},smalltalk.SendNode)})},
  1281. args: ["aString"],
  1282. source: "selector: aString\x0a\x09selector := aString",
  1283. messageSends: [],
  1284. referencedClasses: []
  1285. }),
  1286. smalltalk.SendNode);
  1287. smalltalk.addMethod(
  1288. smalltalk.method({
  1289. selector: "stopOnStepping",
  1290. category: 'testing',
  1291. fn: function (){
  1292. var self=this;
  1293. return smalltalk.withContext(function($ctx1) {
  1294. return true;
  1295. }, function($ctx1) {$ctx1.fill(self,"stopOnStepping",{},smalltalk.SendNode)})},
  1296. args: [],
  1297. source: "stopOnStepping\x0a\x09^ true",
  1298. messageSends: [],
  1299. referencedClasses: []
  1300. }),
  1301. smalltalk.SendNode);
  1302. smalltalk.addMethod(
  1303. smalltalk.method({
  1304. selector: "superSend",
  1305. category: 'accessing',
  1306. fn: function (){
  1307. var self=this;
  1308. return smalltalk.withContext(function($ctx1) {
  1309. var $2,$1;
  1310. $2=self["@superSend"];
  1311. if(($receiver = $2) == nil || $receiver == undefined){
  1312. $1=false;
  1313. } else {
  1314. $1=$2;
  1315. };
  1316. return $1;
  1317. }, function($ctx1) {$ctx1.fill(self,"superSend",{},smalltalk.SendNode)})},
  1318. args: [],
  1319. source: "superSend\x0a\x09^ superSend ifNil: [ false ]",
  1320. messageSends: ["ifNil:"],
  1321. referencedClasses: []
  1322. }),
  1323. smalltalk.SendNode);
  1324. smalltalk.addMethod(
  1325. smalltalk.method({
  1326. selector: "superSend:",
  1327. category: 'accessing',
  1328. fn: function (aBoolean){
  1329. var self=this;
  1330. return smalltalk.withContext(function($ctx1) {
  1331. self["@superSend"]=aBoolean;
  1332. return self}, function($ctx1) {$ctx1.fill(self,"superSend:",{aBoolean:aBoolean},smalltalk.SendNode)})},
  1333. args: ["aBoolean"],
  1334. source: "superSend: aBoolean\x0a\x09superSend := aBoolean",
  1335. messageSends: [],
  1336. referencedClasses: []
  1337. }),
  1338. smalltalk.SendNode);
  1339. smalltalk.addMethod(
  1340. smalltalk.method({
  1341. selector: "valueForReceiver:",
  1342. category: 'accessing',
  1343. fn: function (anObject){
  1344. var self=this;
  1345. function $SendNode(){return smalltalk.SendNode||(typeof SendNode=="undefined"?nil:SendNode)}
  1346. return smalltalk.withContext(function($ctx1) {
  1347. var $2,$3,$5,$4,$6,$1;
  1348. $2=_st($SendNode())._new();
  1349. $3=$2;
  1350. $5=_st(self)._receiver();
  1351. if(($receiver = $5) == nil || $receiver == undefined){
  1352. $4=anObject;
  1353. } else {
  1354. $4=_st(_st(self)._receiver())._valueForReceiver_(anObject);
  1355. };
  1356. _st($3)._receiver_($4);
  1357. _st($2)._selector_(_st(self)._selector());
  1358. _st($2)._arguments_(_st(self)._arguments());
  1359. $6=_st($2)._yourself();
  1360. $1=$6;
  1361. return $1;
  1362. }, function($ctx1) {$ctx1.fill(self,"valueForReceiver:",{anObject:anObject},smalltalk.SendNode)})},
  1363. args: ["anObject"],
  1364. source: "valueForReceiver: anObject\x0a\x09^SendNode new\x0a\x09\x09receiver: (self receiver\x0a\x09\x09ifNil: [anObject]\x0a\x09\x09ifNotNil: [self receiver valueForReceiver: anObject]);\x0a\x09\x09selector: self selector;\x0a\x09\x09arguments: self arguments;\x0a\x09\x09yourself",
  1365. messageSends: ["receiver:", "ifNil:ifNotNil:", "valueForReceiver:", "receiver", "new", "selector:", "selector", "arguments:", "arguments", "yourself"],
  1366. referencedClasses: ["SendNode"]
  1367. }),
  1368. smalltalk.SendNode);
  1369. smalltalk.addClass('SequenceNode', smalltalk.Node, ['temps', 'scope'], 'Compiler-AST');
  1370. smalltalk.SequenceNode.comment="I represent an sequence node. A sequence represent a set of instructions inside the same scope (the method scope or a block scope)."
  1371. smalltalk.addMethod(
  1372. smalltalk.method({
  1373. selector: "accept:",
  1374. category: 'visiting',
  1375. fn: function (aVisitor){
  1376. var self=this;
  1377. return smalltalk.withContext(function($ctx1) {
  1378. var $1;
  1379. $1=_st(aVisitor)._visitSequenceNode_(self);
  1380. return $1;
  1381. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},smalltalk.SequenceNode)})},
  1382. args: ["aVisitor"],
  1383. source: "accept: aVisitor\x0a\x09^ aVisitor visitSequenceNode: self",
  1384. messageSends: ["visitSequenceNode:"],
  1385. referencedClasses: []
  1386. }),
  1387. smalltalk.SequenceNode);
  1388. smalltalk.addMethod(
  1389. smalltalk.method({
  1390. selector: "asBlockSequenceNode",
  1391. category: 'testing',
  1392. fn: function (){
  1393. var self=this;
  1394. function $BlockSequenceNode(){return smalltalk.BlockSequenceNode||(typeof BlockSequenceNode=="undefined"?nil:BlockSequenceNode)}
  1395. return smalltalk.withContext(function($ctx1) {
  1396. var $2,$3,$1;
  1397. $2=_st($BlockSequenceNode())._new();
  1398. _st($2)._nodes_(_st(self)._nodes());
  1399. _st($2)._temps_(_st(self)._temps());
  1400. $3=_st($2)._yourself();
  1401. $1=$3;
  1402. return $1;
  1403. }, function($ctx1) {$ctx1.fill(self,"asBlockSequenceNode",{},smalltalk.SequenceNode)})},
  1404. args: [],
  1405. source: "asBlockSequenceNode\x0a\x09^BlockSequenceNode new\x0a\x09\x09nodes: self nodes;\x0a\x09\x09temps: self temps;\x0a\x09\x09yourself",
  1406. messageSends: ["nodes:", "nodes", "new", "temps:", "temps", "yourself"],
  1407. referencedClasses: ["BlockSequenceNode"]
  1408. }),
  1409. smalltalk.SequenceNode);
  1410. smalltalk.addMethod(
  1411. smalltalk.method({
  1412. selector: "scope",
  1413. category: 'accessing',
  1414. fn: function (){
  1415. var self=this;
  1416. return smalltalk.withContext(function($ctx1) {
  1417. var $1;
  1418. $1=self["@scope"];
  1419. return $1;
  1420. }, function($ctx1) {$ctx1.fill(self,"scope",{},smalltalk.SequenceNode)})},
  1421. args: [],
  1422. source: "scope\x0a\x09^ scope",
  1423. messageSends: [],
  1424. referencedClasses: []
  1425. }),
  1426. smalltalk.SequenceNode);
  1427. smalltalk.addMethod(
  1428. smalltalk.method({
  1429. selector: "scope:",
  1430. category: 'accessing',
  1431. fn: function (aLexicalScope){
  1432. var self=this;
  1433. return smalltalk.withContext(function($ctx1) {
  1434. self["@scope"]=aLexicalScope;
  1435. return self}, function($ctx1) {$ctx1.fill(self,"scope:",{aLexicalScope:aLexicalScope},smalltalk.SequenceNode)})},
  1436. args: ["aLexicalScope"],
  1437. source: "scope: aLexicalScope\x0a\x09scope := aLexicalScope",
  1438. messageSends: [],
  1439. referencedClasses: []
  1440. }),
  1441. smalltalk.SequenceNode);
  1442. smalltalk.addMethod(
  1443. smalltalk.method({
  1444. selector: "temps",
  1445. category: 'accessing',
  1446. fn: function (){
  1447. var self=this;
  1448. return smalltalk.withContext(function($ctx1) {
  1449. var $2,$1;
  1450. $2=self["@temps"];
  1451. if(($receiver = $2) == nil || $receiver == undefined){
  1452. $1=[];
  1453. } else {
  1454. $1=$2;
  1455. };
  1456. return $1;
  1457. }, function($ctx1) {$ctx1.fill(self,"temps",{},smalltalk.SequenceNode)})},
  1458. args: [],
  1459. source: "temps\x0a\x09^temps ifNil: [#()]",
  1460. messageSends: ["ifNil:"],
  1461. referencedClasses: []
  1462. }),
  1463. smalltalk.SequenceNode);
  1464. smalltalk.addMethod(
  1465. smalltalk.method({
  1466. selector: "temps:",
  1467. category: 'accessing',
  1468. fn: function (aCollection){
  1469. var self=this;
  1470. return smalltalk.withContext(function($ctx1) {
  1471. self["@temps"]=aCollection;
  1472. return self}, function($ctx1) {$ctx1.fill(self,"temps:",{aCollection:aCollection},smalltalk.SequenceNode)})},
  1473. args: ["aCollection"],
  1474. source: "temps: aCollection\x0a\x09temps := aCollection",
  1475. messageSends: [],
  1476. referencedClasses: []
  1477. }),
  1478. smalltalk.SequenceNode);
  1479. smalltalk.addClass('BlockSequenceNode', smalltalk.SequenceNode, [], 'Compiler-AST');
  1480. smalltalk.BlockSequenceNode.comment="I represent an special sequence node for block scopes."
  1481. smalltalk.addMethod(
  1482. smalltalk.method({
  1483. selector: "accept:",
  1484. category: 'visiting',
  1485. fn: function (aVisitor){
  1486. var self=this;
  1487. return smalltalk.withContext(function($ctx1) {
  1488. var $1;
  1489. $1=_st(aVisitor)._visitBlockSequenceNode_(self);
  1490. return $1;
  1491. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},smalltalk.BlockSequenceNode)})},
  1492. args: ["aVisitor"],
  1493. source: "accept: aVisitor\x0a\x09^ aVisitor visitBlockSequenceNode: self",
  1494. messageSends: ["visitBlockSequenceNode:"],
  1495. referencedClasses: []
  1496. }),
  1497. smalltalk.BlockSequenceNode);
  1498. smalltalk.addMethod(
  1499. smalltalk.method({
  1500. selector: "isBlockSequenceNode",
  1501. category: 'testing',
  1502. fn: function (){
  1503. var self=this;
  1504. return smalltalk.withContext(function($ctx1) {
  1505. return true;
  1506. }, function($ctx1) {$ctx1.fill(self,"isBlockSequenceNode",{},smalltalk.BlockSequenceNode)})},
  1507. args: [],
  1508. source: "isBlockSequenceNode\x0a\x09^true",
  1509. messageSends: [],
  1510. referencedClasses: []
  1511. }),
  1512. smalltalk.BlockSequenceNode);
  1513. smalltalk.addClass('ValueNode', smalltalk.Node, ['value'], 'Compiler-AST');
  1514. smalltalk.ValueNode.comment="I represent a value node."
  1515. smalltalk.addMethod(
  1516. smalltalk.method({
  1517. selector: "accept:",
  1518. category: 'visiting',
  1519. fn: function (aVisitor){
  1520. var self=this;
  1521. return smalltalk.withContext(function($ctx1) {
  1522. var $1;
  1523. $1=_st(aVisitor)._visitValueNode_(self);
  1524. return $1;
  1525. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},smalltalk.ValueNode)})},
  1526. args: ["aVisitor"],
  1527. source: "accept: aVisitor\x0a\x09^ aVisitor visitValueNode: self",
  1528. messageSends: ["visitValueNode:"],
  1529. referencedClasses: []
  1530. }),
  1531. smalltalk.ValueNode);
  1532. smalltalk.addMethod(
  1533. smalltalk.method({
  1534. selector: "isImmutable",
  1535. category: 'testing',
  1536. fn: function (){
  1537. var self=this;
  1538. return smalltalk.withContext(function($ctx1) {
  1539. var $1;
  1540. $1=_st(_st(self)._value())._isImmutable();
  1541. return $1;
  1542. }, function($ctx1) {$ctx1.fill(self,"isImmutable",{},smalltalk.ValueNode)})},
  1543. args: [],
  1544. source: "isImmutable\x0a\x09^ self value isImmutable",
  1545. messageSends: ["isImmutable", "value"],
  1546. referencedClasses: []
  1547. }),
  1548. smalltalk.ValueNode);
  1549. smalltalk.addMethod(
  1550. smalltalk.method({
  1551. selector: "isValueNode",
  1552. category: 'testing',
  1553. fn: function (){
  1554. var self=this;
  1555. return smalltalk.withContext(function($ctx1) {
  1556. return true;
  1557. }, function($ctx1) {$ctx1.fill(self,"isValueNode",{},smalltalk.ValueNode)})},
  1558. args: [],
  1559. source: "isValueNode\x0a\x09^true",
  1560. messageSends: [],
  1561. referencedClasses: []
  1562. }),
  1563. smalltalk.ValueNode);
  1564. smalltalk.addMethod(
  1565. smalltalk.method({
  1566. selector: "value",
  1567. category: 'accessing',
  1568. fn: function (){
  1569. var self=this;
  1570. return smalltalk.withContext(function($ctx1) {
  1571. var $1;
  1572. $1=self["@value"];
  1573. return $1;
  1574. }, function($ctx1) {$ctx1.fill(self,"value",{},smalltalk.ValueNode)})},
  1575. args: [],
  1576. source: "value\x0a\x09^value",
  1577. messageSends: [],
  1578. referencedClasses: []
  1579. }),
  1580. smalltalk.ValueNode);
  1581. smalltalk.addMethod(
  1582. smalltalk.method({
  1583. selector: "value:",
  1584. category: 'accessing',
  1585. fn: function (anObject){
  1586. var self=this;
  1587. return smalltalk.withContext(function($ctx1) {
  1588. self["@value"]=anObject;
  1589. return self}, function($ctx1) {$ctx1.fill(self,"value:",{anObject:anObject},smalltalk.ValueNode)})},
  1590. args: ["anObject"],
  1591. source: "value: anObject\x0a\x09value := anObject",
  1592. messageSends: [],
  1593. referencedClasses: []
  1594. }),
  1595. smalltalk.ValueNode);
  1596. smalltalk.addClass('VariableNode', smalltalk.ValueNode, ['assigned', 'binding'], 'Compiler-AST');
  1597. smalltalk.VariableNode.comment="I represent an variable node."
  1598. smalltalk.addMethod(
  1599. smalltalk.method({
  1600. selector: "accept:",
  1601. category: 'visiting',
  1602. fn: function (aVisitor){
  1603. var self=this;
  1604. return smalltalk.withContext(function($ctx1) {
  1605. var $1;
  1606. $1=_st(aVisitor)._visitVariableNode_(self);
  1607. return $1;
  1608. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},smalltalk.VariableNode)})},
  1609. args: ["aVisitor"],
  1610. source: "accept: aVisitor\x0a\x09^ aVisitor visitVariableNode: self",
  1611. messageSends: ["visitVariableNode:"],
  1612. referencedClasses: []
  1613. }),
  1614. smalltalk.VariableNode);
  1615. smalltalk.addMethod(
  1616. smalltalk.method({
  1617. selector: "alias",
  1618. category: 'accessing',
  1619. fn: function (){
  1620. var self=this;
  1621. return smalltalk.withContext(function($ctx1) {
  1622. var $1;
  1623. $1=_st(_st(self)._binding())._alias();
  1624. return $1;
  1625. }, function($ctx1) {$ctx1.fill(self,"alias",{},smalltalk.VariableNode)})},
  1626. args: [],
  1627. source: "alias\x0a\x09^ self binding alias",
  1628. messageSends: ["alias", "binding"],
  1629. referencedClasses: []
  1630. }),
  1631. smalltalk.VariableNode);
  1632. smalltalk.addMethod(
  1633. smalltalk.method({
  1634. selector: "assigned",
  1635. category: 'accessing',
  1636. fn: function (){
  1637. var self=this;
  1638. return smalltalk.withContext(function($ctx1) {
  1639. var $2,$1;
  1640. $2=self["@assigned"];
  1641. if(($receiver = $2) == nil || $receiver == undefined){
  1642. $1=false;
  1643. } else {
  1644. $1=$2;
  1645. };
  1646. return $1;
  1647. }, function($ctx1) {$ctx1.fill(self,"assigned",{},smalltalk.VariableNode)})},
  1648. args: [],
  1649. source: "assigned\x0a\x09^assigned ifNil: [false]",
  1650. messageSends: ["ifNil:"],
  1651. referencedClasses: []
  1652. }),
  1653. smalltalk.VariableNode);
  1654. smalltalk.addMethod(
  1655. smalltalk.method({
  1656. selector: "assigned:",
  1657. category: 'accessing',
  1658. fn: function (aBoolean){
  1659. var self=this;
  1660. return smalltalk.withContext(function($ctx1) {
  1661. self["@assigned"]=aBoolean;
  1662. return self}, function($ctx1) {$ctx1.fill(self,"assigned:",{aBoolean:aBoolean},smalltalk.VariableNode)})},
  1663. args: ["aBoolean"],
  1664. source: "assigned: aBoolean\x0a\x09assigned := aBoolean",
  1665. messageSends: [],
  1666. referencedClasses: []
  1667. }),
  1668. smalltalk.VariableNode);
  1669. smalltalk.addMethod(
  1670. smalltalk.method({
  1671. selector: "beAssigned",
  1672. category: 'accessing',
  1673. fn: function (){
  1674. var self=this;
  1675. return smalltalk.withContext(function($ctx1) {
  1676. _st(_st(self)._binding())._validateAssignment();
  1677. self["@assigned"]=true;
  1678. return self}, function($ctx1) {$ctx1.fill(self,"beAssigned",{},smalltalk.VariableNode)})},
  1679. args: [],
  1680. source: "beAssigned\x0a\x09self binding validateAssignment.\x0a\x09assigned := true",
  1681. messageSends: ["validateAssignment", "binding"],
  1682. referencedClasses: []
  1683. }),
  1684. smalltalk.VariableNode);
  1685. smalltalk.addMethod(
  1686. smalltalk.method({
  1687. selector: "binding",
  1688. category: 'accessing',
  1689. fn: function (){
  1690. var self=this;
  1691. return smalltalk.withContext(function($ctx1) {
  1692. var $1;
  1693. $1=self["@binding"];
  1694. return $1;
  1695. }, function($ctx1) {$ctx1.fill(self,"binding",{},smalltalk.VariableNode)})},
  1696. args: [],
  1697. source: "binding\x0a\x09^ binding",
  1698. messageSends: [],
  1699. referencedClasses: []
  1700. }),
  1701. smalltalk.VariableNode);
  1702. smalltalk.addMethod(
  1703. smalltalk.method({
  1704. selector: "binding:",
  1705. category: 'accessing',
  1706. fn: function (aScopeVar){
  1707. var self=this;
  1708. return smalltalk.withContext(function($ctx1) {
  1709. self["@binding"]=aScopeVar;
  1710. return self}, function($ctx1) {$ctx1.fill(self,"binding:",{aScopeVar:aScopeVar},smalltalk.VariableNode)})},
  1711. args: ["aScopeVar"],
  1712. source: "binding: aScopeVar\x0a\x09binding := aScopeVar",
  1713. messageSends: [],
  1714. referencedClasses: []
  1715. }),
  1716. smalltalk.VariableNode);
  1717. smalltalk.addMethod(
  1718. smalltalk.method({
  1719. selector: "isImmutable",
  1720. category: 'testing',
  1721. fn: function (){
  1722. var self=this;
  1723. return smalltalk.withContext(function($ctx1) {
  1724. return false;
  1725. }, function($ctx1) {$ctx1.fill(self,"isImmutable",{},smalltalk.VariableNode)})},
  1726. args: [],
  1727. source: "isImmutable\x0a\x09^false",
  1728. messageSends: [],
  1729. referencedClasses: []
  1730. }),
  1731. smalltalk.VariableNode);
  1732. smalltalk.addClass('ClassReferenceNode', smalltalk.VariableNode, [], 'Compiler-AST');
  1733. smalltalk.ClassReferenceNode.comment="I represent an class reference node."
  1734. smalltalk.addMethod(
  1735. smalltalk.method({
  1736. selector: "accept:",
  1737. category: 'visiting',
  1738. fn: function (aVisitor){
  1739. var self=this;
  1740. return smalltalk.withContext(function($ctx1) {
  1741. var $1;
  1742. $1=_st(aVisitor)._visitClassReferenceNode_(self);
  1743. return $1;
  1744. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},smalltalk.ClassReferenceNode)})},
  1745. args: ["aVisitor"],
  1746. source: "accept: aVisitor\x0a\x09^ aVisitor visitClassReferenceNode: self",
  1747. messageSends: ["visitClassReferenceNode:"],
  1748. referencedClasses: []
  1749. }),
  1750. smalltalk.ClassReferenceNode);
  1751. smalltalk.addMethod(
  1752. smalltalk.method({
  1753. selector: "isNode",
  1754. category: '*Compiler-AST',
  1755. fn: function (){
  1756. var self=this;
  1757. return smalltalk.withContext(function($ctx1) {
  1758. return false;
  1759. }, function($ctx1) {$ctx1.fill(self,"isNode",{},smalltalk.Object)})},
  1760. args: [],
  1761. source: "isNode\x0a\x09^ false",
  1762. messageSends: [],
  1763. referencedClasses: []
  1764. }),
  1765. smalltalk.Object);