Compiler-AST.js 35 KB

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