Compiler-AST.js 63 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297
  1. define("amber_core/Compiler-AST", ["amber_vm/smalltalk", "amber_vm/nil", "amber_vm/_st", "amber_core/Kernel-Objects", "amber_core/Kernel-Methods"], function(smalltalk,nil,_st){
  2. smalltalk.addPackage('Compiler-AST');
  3. smalltalk.packages["Compiler-AST"].transport = {"type":"amd","amdNamespace":"amber_core"};
  4. smalltalk.addClass('Node', smalltalk.Object, ['parent', 'position', 'nodes', 'shouldBeInlined', 'shouldBeAliased'], 'Compiler-AST');
  5. 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.";
  6. smalltalk.addMethod(
  7. smalltalk.method({
  8. selector: "accept:",
  9. category: 'visiting',
  10. fn: function (aVisitor){
  11. var self=this;
  12. return smalltalk.withContext(function($ctx1) {
  13. var $1;
  14. $1=_st(aVisitor)._visitNode_(self);
  15. return $1;
  16. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},smalltalk.Node)})},
  17. args: ["aVisitor"],
  18. source: "accept: aVisitor\x0a\x09^ aVisitor visitNode: self",
  19. messageSends: ["visitNode:"],
  20. referencedClasses: []
  21. }),
  22. smalltalk.Node);
  23. smalltalk.addMethod(
  24. smalltalk.method({
  25. selector: "addNode:",
  26. category: 'accessing',
  27. fn: function (aNode){
  28. var self=this;
  29. return smalltalk.withContext(function($ctx1) {
  30. _st(self._nodes())._add_(aNode);
  31. _st(aNode)._parent_(self);
  32. return self}, function($ctx1) {$ctx1.fill(self,"addNode:",{aNode:aNode},smalltalk.Node)})},
  33. args: ["aNode"],
  34. source: "addNode: aNode\x0a\x09self nodes add: aNode.\x0a\x09aNode parent: self",
  35. messageSends: ["add:", "nodes", "parent:"],
  36. referencedClasses: []
  37. }),
  38. smalltalk.Node);
  39. smalltalk.addMethod(
  40. smalltalk.method({
  41. selector: "isAssignmentNode",
  42. category: 'testing',
  43. fn: function (){
  44. var self=this;
  45. return smalltalk.withContext(function($ctx1) {
  46. return false;
  47. }, function($ctx1) {$ctx1.fill(self,"isAssignmentNode",{},smalltalk.Node)})},
  48. args: [],
  49. source: "isAssignmentNode\x0a\x09^ false",
  50. messageSends: [],
  51. referencedClasses: []
  52. }),
  53. smalltalk.Node);
  54. smalltalk.addMethod(
  55. smalltalk.method({
  56. selector: "isBlockNode",
  57. category: 'testing',
  58. fn: function (){
  59. var self=this;
  60. return smalltalk.withContext(function($ctx1) {
  61. return false;
  62. }, function($ctx1) {$ctx1.fill(self,"isBlockNode",{},smalltalk.Node)})},
  63. args: [],
  64. source: "isBlockNode\x0a\x09^false",
  65. messageSends: [],
  66. referencedClasses: []
  67. }),
  68. smalltalk.Node);
  69. smalltalk.addMethod(
  70. smalltalk.method({
  71. selector: "isBlockSequenceNode",
  72. category: 'testing',
  73. fn: function (){
  74. var self=this;
  75. return smalltalk.withContext(function($ctx1) {
  76. return false;
  77. }, function($ctx1) {$ctx1.fill(self,"isBlockSequenceNode",{},smalltalk.Node)})},
  78. args: [],
  79. source: "isBlockSequenceNode\x0a\x09^false",
  80. messageSends: [],
  81. referencedClasses: []
  82. }),
  83. smalltalk.Node);
  84. smalltalk.addMethod(
  85. smalltalk.method({
  86. selector: "isCascadeNode",
  87. category: 'testing',
  88. fn: function (){
  89. var self=this;
  90. return smalltalk.withContext(function($ctx1) {
  91. return false;
  92. }, function($ctx1) {$ctx1.fill(self,"isCascadeNode",{},smalltalk.Node)})},
  93. args: [],
  94. source: "isCascadeNode\x0a\x09^ false",
  95. messageSends: [],
  96. referencedClasses: []
  97. }),
  98. smalltalk.Node);
  99. smalltalk.addMethod(
  100. smalltalk.method({
  101. selector: "isImmutable",
  102. category: 'testing',
  103. fn: function (){
  104. var self=this;
  105. return smalltalk.withContext(function($ctx1) {
  106. return false;
  107. }, function($ctx1) {$ctx1.fill(self,"isImmutable",{},smalltalk.Node)})},
  108. args: [],
  109. source: "isImmutable\x0a\x09^false",
  110. messageSends: [],
  111. referencedClasses: []
  112. }),
  113. smalltalk.Node);
  114. smalltalk.addMethod(
  115. smalltalk.method({
  116. selector: "isJSStatementNode",
  117. category: 'testing',
  118. fn: function (){
  119. var self=this;
  120. return smalltalk.withContext(function($ctx1) {
  121. return false;
  122. }, function($ctx1) {$ctx1.fill(self,"isJSStatementNode",{},smalltalk.Node)})},
  123. args: [],
  124. source: "isJSStatementNode\x0a\x09^ false",
  125. messageSends: [],
  126. referencedClasses: []
  127. }),
  128. smalltalk.Node);
  129. smalltalk.addMethod(
  130. smalltalk.method({
  131. selector: "isLastChild",
  132. category: 'testing',
  133. fn: function (){
  134. var self=this;
  135. return smalltalk.withContext(function($ctx1) {
  136. var $1;
  137. $1=_st(_st(_st(self._parent())._nodes())._last()).__eq(self);
  138. return $1;
  139. }, function($ctx1) {$ctx1.fill(self,"isLastChild",{},smalltalk.Node)})},
  140. args: [],
  141. source: "isLastChild\x0a\x09^ self parent nodes last = self",
  142. messageSends: ["=", "last", "nodes", "parent"],
  143. referencedClasses: []
  144. }),
  145. smalltalk.Node);
  146. smalltalk.addMethod(
  147. smalltalk.method({
  148. selector: "isNode",
  149. category: 'testing',
  150. fn: function (){
  151. var self=this;
  152. return smalltalk.withContext(function($ctx1) {
  153. return true;
  154. }, function($ctx1) {$ctx1.fill(self,"isNode",{},smalltalk.Node)})},
  155. args: [],
  156. source: "isNode\x0a\x09^ true",
  157. messageSends: [],
  158. referencedClasses: []
  159. }),
  160. smalltalk.Node);
  161. smalltalk.addMethod(
  162. smalltalk.method({
  163. selector: "isReturnNode",
  164. category: 'testing',
  165. fn: function (){
  166. var self=this;
  167. return smalltalk.withContext(function($ctx1) {
  168. return false;
  169. }, function($ctx1) {$ctx1.fill(self,"isReturnNode",{},smalltalk.Node)})},
  170. args: [],
  171. source: "isReturnNode\x0a\x09^false",
  172. messageSends: [],
  173. referencedClasses: []
  174. }),
  175. smalltalk.Node);
  176. smalltalk.addMethod(
  177. smalltalk.method({
  178. selector: "isSendNode",
  179. category: 'testing',
  180. fn: function (){
  181. var self=this;
  182. return smalltalk.withContext(function($ctx1) {
  183. return false;
  184. }, function($ctx1) {$ctx1.fill(self,"isSendNode",{},smalltalk.Node)})},
  185. args: [],
  186. source: "isSendNode\x0a\x09^false",
  187. messageSends: [],
  188. referencedClasses: []
  189. }),
  190. smalltalk.Node);
  191. smalltalk.addMethod(
  192. smalltalk.method({
  193. selector: "isValueNode",
  194. category: 'testing',
  195. fn: function (){
  196. var self=this;
  197. return smalltalk.withContext(function($ctx1) {
  198. return false;
  199. }, function($ctx1) {$ctx1.fill(self,"isValueNode",{},smalltalk.Node)})},
  200. args: [],
  201. source: "isValueNode\x0a\x09^false",
  202. messageSends: [],
  203. referencedClasses: []
  204. }),
  205. smalltalk.Node);
  206. smalltalk.addMethod(
  207. smalltalk.method({
  208. selector: "method",
  209. category: 'accessing',
  210. fn: function (){
  211. var self=this;
  212. return smalltalk.withContext(function($ctx1) {
  213. var $2,$1;
  214. $2=self._parent();
  215. if(($receiver = $2) == nil || $receiver == null){
  216. $1=$2;
  217. } else {
  218. var node;
  219. node=$receiver;
  220. $1=_st(node)._method();
  221. };
  222. return $1;
  223. }, function($ctx1) {$ctx1.fill(self,"method",{},smalltalk.Node)})},
  224. args: [],
  225. source: "method\x0a\x09^ self parent ifNotNil: [ :node | node method ]",
  226. messageSends: ["ifNotNil:", "parent", "method"],
  227. referencedClasses: []
  228. }),
  229. smalltalk.Node);
  230. smalltalk.addMethod(
  231. smalltalk.method({
  232. selector: "nextChild",
  233. category: 'accessing',
  234. fn: function (){
  235. var self=this;
  236. return smalltalk.withContext(function($ctx1) {
  237. var $2,$1;
  238. $2=_st(self._nodes())._isEmpty();
  239. if(smalltalk.assert($2)){
  240. $1=self;
  241. } else {
  242. $1=_st(_st(self._nodes())._first())._nextChild();
  243. };
  244. return $1;
  245. }, function($ctx1) {$ctx1.fill(self,"nextChild",{},smalltalk.Node)})},
  246. args: [],
  247. source: "nextChild\x0a\x09\x22Answer the next node after aNode.\x0a\x09Recurse into the possible children of the receiver to answer the next node to be evaluated\x22\x0a\x09\x0a\x09^ self nodes isEmpty\x0a\x09\x09ifTrue: [ self ]\x0a\x09\x09ifFalse: [ self nodes first nextChild ]",
  248. messageSends: ["ifTrue:ifFalse:", "isEmpty", "nodes", "nextChild", "first"],
  249. referencedClasses: []
  250. }),
  251. smalltalk.Node);
  252. smalltalk.addMethod(
  253. smalltalk.method({
  254. selector: "nextNode",
  255. category: 'accessing',
  256. fn: function (){
  257. var self=this;
  258. return smalltalk.withContext(function($ctx1) {
  259. var $2,$1;
  260. $2=self._parent();
  261. if(($receiver = $2) == nil || $receiver == null){
  262. $1=$2;
  263. } else {
  264. var node;
  265. node=$receiver;
  266. $1=_st(node)._nextNode_(self);
  267. };
  268. return $1;
  269. }, function($ctx1) {$ctx1.fill(self,"nextNode",{},smalltalk.Node)})},
  270. args: [],
  271. source: "nextNode\x0a\x09^ self parent ifNotNil: [ :node |\x0a\x09\x09node nextNode: self ]",
  272. messageSends: ["ifNotNil:", "parent", "nextNode:"],
  273. referencedClasses: []
  274. }),
  275. smalltalk.Node);
  276. smalltalk.addMethod(
  277. smalltalk.method({
  278. selector: "nextNode:",
  279. category: 'accessing',
  280. fn: function (aNode){
  281. var self=this;
  282. var next;
  283. return smalltalk.withContext(function($ctx1) {
  284. var $1,$2;
  285. var $early={};
  286. try {
  287. next=_st(self._nodes())._at_ifAbsent_(_st(_st(self._nodes())._indexOf_(aNode)).__plus((1)),(function(){
  288. return smalltalk.withContext(function($ctx2) {
  289. $1=self;
  290. throw $early=[$1];
  291. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  292. $2=_st(next)._nextChild();
  293. return $2;
  294. }
  295. catch(e) {if(e===$early)return e[0]; throw e}
  296. }, function($ctx1) {$ctx1.fill(self,"nextNode:",{aNode:aNode,next:next},smalltalk.Node)})},
  297. args: ["aNode"],
  298. source: "nextNode: aNode\x0a\x09\x22Answer the next node after aNode.\x0a\x09Recurse into the possible children of the next node to answer the next node to be evaluated\x22\x0a\x09\x0a\x09| next |\x0a\x09\x0a\x09next := self nodes \x0a\x09\x09at: (self nodes indexOf: aNode) + 1\x0a\x09\x09ifAbsent: [ ^ self ].\x0a\x09\x0a\x09^ next nextChild",
  299. messageSends: ["at:ifAbsent:", "nodes", "+", "indexOf:", "nextChild"],
  300. referencedClasses: []
  301. }),
  302. smalltalk.Node);
  303. smalltalk.addMethod(
  304. smalltalk.method({
  305. selector: "nodes",
  306. category: 'accessing',
  307. fn: function (){
  308. var self=this;
  309. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  310. return smalltalk.withContext(function($ctx1) {
  311. var $2,$1;
  312. $2=self["@nodes"];
  313. if(($receiver = $2) == nil || $receiver == null){
  314. self["@nodes"]=_st($Array())._new();
  315. $1=self["@nodes"];
  316. } else {
  317. $1=$2;
  318. };
  319. return $1;
  320. }, function($ctx1) {$ctx1.fill(self,"nodes",{},smalltalk.Node)})},
  321. args: [],
  322. source: "nodes\x0a\x09^nodes ifNil: [nodes := Array new]",
  323. messageSends: ["ifNil:", "new"],
  324. referencedClasses: ["Array"]
  325. }),
  326. smalltalk.Node);
  327. smalltalk.addMethod(
  328. smalltalk.method({
  329. selector: "nodes:",
  330. category: 'building',
  331. fn: function (aCollection){
  332. var self=this;
  333. return smalltalk.withContext(function($ctx1) {
  334. self["@nodes"]=aCollection;
  335. _st(aCollection)._do_((function(each){
  336. return smalltalk.withContext(function($ctx2) {
  337. return _st(each)._parent_(self);
  338. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  339. return self}, function($ctx1) {$ctx1.fill(self,"nodes:",{aCollection:aCollection},smalltalk.Node)})},
  340. args: ["aCollection"],
  341. source: "nodes: aCollection\x0a\x09nodes := aCollection.\x0a\x09aCollection do: [ :each | each parent: self ]",
  342. messageSends: ["do:", "parent:"],
  343. referencedClasses: []
  344. }),
  345. smalltalk.Node);
  346. smalltalk.addMethod(
  347. smalltalk.method({
  348. selector: "parent",
  349. category: 'accessing',
  350. fn: function (){
  351. var self=this;
  352. return smalltalk.withContext(function($ctx1) {
  353. var $1;
  354. $1=self["@parent"];
  355. return $1;
  356. }, function($ctx1) {$ctx1.fill(self,"parent",{},smalltalk.Node)})},
  357. args: [],
  358. source: "parent\x0a\x09^ parent",
  359. messageSends: [],
  360. referencedClasses: []
  361. }),
  362. smalltalk.Node);
  363. smalltalk.addMethod(
  364. smalltalk.method({
  365. selector: "parent:",
  366. category: 'accessing',
  367. fn: function (aNode){
  368. var self=this;
  369. return smalltalk.withContext(function($ctx1) {
  370. self["@parent"]=aNode;
  371. return self}, function($ctx1) {$ctx1.fill(self,"parent:",{aNode:aNode},smalltalk.Node)})},
  372. args: ["aNode"],
  373. source: "parent: aNode\x0a\x09parent := aNode",
  374. messageSends: [],
  375. referencedClasses: []
  376. }),
  377. smalltalk.Node);
  378. smalltalk.addMethod(
  379. smalltalk.method({
  380. selector: "position",
  381. category: 'accessing',
  382. fn: function (){
  383. var self=this;
  384. return smalltalk.withContext(function($ctx1) {
  385. var $2,$3,$1;
  386. $2=self["@position"];
  387. if(($receiver = $2) == nil || $receiver == null){
  388. $3=self._parent();
  389. if(($receiver = $3) == nil || $receiver == null){
  390. $1=$3;
  391. } else {
  392. var node;
  393. node=$receiver;
  394. $1=_st(node)._position();
  395. };
  396. } else {
  397. $1=$2;
  398. };
  399. return $1;
  400. }, function($ctx1) {$ctx1.fill(self,"position",{},smalltalk.Node)})},
  401. args: [],
  402. source: "position\x0a\x09\x22answer the line and column of the receiver in the source code\x22\x0a\x09\x0a\x09^ position ifNil: [ \x0a\x09\x09self parent ifNotNil: [ :node | node position ] ]",
  403. messageSends: ["ifNil:", "ifNotNil:", "parent", "position"],
  404. referencedClasses: []
  405. }),
  406. smalltalk.Node);
  407. smalltalk.addMethod(
  408. smalltalk.method({
  409. selector: "position:",
  410. category: 'building',
  411. fn: function (aPosition){
  412. var self=this;
  413. return smalltalk.withContext(function($ctx1) {
  414. self["@position"]=aPosition;
  415. return self}, function($ctx1) {$ctx1.fill(self,"position:",{aPosition:aPosition},smalltalk.Node)})},
  416. args: ["aPosition"],
  417. source: "position: aPosition\x0a\x09position := aPosition",
  418. messageSends: [],
  419. referencedClasses: []
  420. }),
  421. smalltalk.Node);
  422. smalltalk.addMethod(
  423. smalltalk.method({
  424. selector: "postCopy",
  425. category: 'copying',
  426. fn: function (){
  427. var self=this;
  428. return smalltalk.withContext(function($ctx1) {
  429. smalltalk.Node.superclass.fn.prototype._postCopy.apply(_st(self), []);
  430. _st(self._nodes())._do_((function(each){
  431. return smalltalk.withContext(function($ctx2) {
  432. return _st(each)._parent_(self);
  433. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  434. return self}, function($ctx1) {$ctx1.fill(self,"postCopy",{},smalltalk.Node)})},
  435. args: [],
  436. source: "postCopy\x0a\x09super postCopy.\x0a\x09self nodes do: [ :each | each parent: self ]",
  437. messageSends: ["postCopy", "do:", "nodes", "parent:"],
  438. referencedClasses: []
  439. }),
  440. smalltalk.Node);
  441. smalltalk.addMethod(
  442. smalltalk.method({
  443. selector: "shouldBeAliased",
  444. category: 'accessing',
  445. fn: function (){
  446. var self=this;
  447. return smalltalk.withContext(function($ctx1) {
  448. var $2,$1;
  449. $2=self["@shouldBeAliased"];
  450. if(($receiver = $2) == nil || $receiver == null){
  451. $1=false;
  452. } else {
  453. $1=$2;
  454. };
  455. return $1;
  456. }, function($ctx1) {$ctx1.fill(self,"shouldBeAliased",{},smalltalk.Node)})},
  457. args: [],
  458. source: "shouldBeAliased\x0a\x09^ shouldBeAliased ifNil: [ false ]",
  459. messageSends: ["ifNil:"],
  460. referencedClasses: []
  461. }),
  462. smalltalk.Node);
  463. smalltalk.addMethod(
  464. smalltalk.method({
  465. selector: "shouldBeAliased:",
  466. category: 'accessing',
  467. fn: function (aBoolean){
  468. var self=this;
  469. return smalltalk.withContext(function($ctx1) {
  470. self["@shouldBeAliased"]=aBoolean;
  471. return self}, function($ctx1) {$ctx1.fill(self,"shouldBeAliased:",{aBoolean:aBoolean},smalltalk.Node)})},
  472. args: ["aBoolean"],
  473. source: "shouldBeAliased: aBoolean\x0a\x09shouldBeAliased := aBoolean",
  474. messageSends: [],
  475. referencedClasses: []
  476. }),
  477. smalltalk.Node);
  478. smalltalk.addMethod(
  479. smalltalk.method({
  480. selector: "shouldBeInlined",
  481. category: 'accessing',
  482. fn: function (){
  483. var self=this;
  484. return smalltalk.withContext(function($ctx1) {
  485. var $2,$1;
  486. $2=self["@shouldBeInlined"];
  487. if(($receiver = $2) == nil || $receiver == null){
  488. $1=false;
  489. } else {
  490. $1=$2;
  491. };
  492. return $1;
  493. }, function($ctx1) {$ctx1.fill(self,"shouldBeInlined",{},smalltalk.Node)})},
  494. args: [],
  495. source: "shouldBeInlined\x0a\x09^ shouldBeInlined ifNil: [ false ]",
  496. messageSends: ["ifNil:"],
  497. referencedClasses: []
  498. }),
  499. smalltalk.Node);
  500. smalltalk.addMethod(
  501. smalltalk.method({
  502. selector: "shouldBeInlined:",
  503. category: 'accessing',
  504. fn: function (aBoolean){
  505. var self=this;
  506. return smalltalk.withContext(function($ctx1) {
  507. self["@shouldBeInlined"]=aBoolean;
  508. return self}, function($ctx1) {$ctx1.fill(self,"shouldBeInlined:",{aBoolean:aBoolean},smalltalk.Node)})},
  509. args: ["aBoolean"],
  510. source: "shouldBeInlined: aBoolean\x0a\x09shouldBeInlined := aBoolean",
  511. messageSends: [],
  512. referencedClasses: []
  513. }),
  514. smalltalk.Node);
  515. smalltalk.addMethod(
  516. smalltalk.method({
  517. selector: "stopOnStepping",
  518. category: 'testing',
  519. fn: function (){
  520. var self=this;
  521. return smalltalk.withContext(function($ctx1) {
  522. return false;
  523. }, function($ctx1) {$ctx1.fill(self,"stopOnStepping",{},smalltalk.Node)})},
  524. args: [],
  525. source: "stopOnStepping\x0a\x09^ false",
  526. messageSends: [],
  527. referencedClasses: []
  528. }),
  529. smalltalk.Node);
  530. smalltalk.addMethod(
  531. smalltalk.method({
  532. selector: "subtreeNeedsAliasing",
  533. category: 'testing',
  534. fn: function (){
  535. var self=this;
  536. return smalltalk.withContext(function($ctx1) {
  537. var $1;
  538. $1=_st(_st(self._shouldBeAliased())._or_((function(){
  539. return smalltalk.withContext(function($ctx2) {
  540. return self._shouldBeInlined();
  541. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})})))._or_((function(){
  542. return smalltalk.withContext(function($ctx2) {
  543. return _st(_st(self._nodes())._detect_ifNone_((function(each){
  544. return smalltalk.withContext(function($ctx3) {
  545. return _st(each)._subtreeNeedsAliasing();
  546. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,3)})}),(function(){
  547. return smalltalk.withContext(function($ctx3) {
  548. return false;
  549. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)})}))).__tild_eq(false);
  550. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  551. return $1;
  552. }, function($ctx1) {$ctx1.fill(self,"subtreeNeedsAliasing",{},smalltalk.Node)})},
  553. args: [],
  554. source: "subtreeNeedsAliasing\x0a\x09^(self shouldBeAliased or: [ self shouldBeInlined ]) or: [\x0a\x09\x09(self nodes detect: [ :each | each subtreeNeedsAliasing ] ifNone: [ false ]) ~= false ]",
  555. messageSends: ["or:", "shouldBeAliased", "shouldBeInlined", "~=", "detect:ifNone:", "nodes", "subtreeNeedsAliasing"],
  556. referencedClasses: []
  557. }),
  558. smalltalk.Node);
  559. smalltalk.addClass('AssignmentNode', smalltalk.Node, ['left', 'right'], 'Compiler-AST');
  560. smalltalk.AssignmentNode.comment="I represent an assignment node.";
  561. smalltalk.addMethod(
  562. smalltalk.method({
  563. selector: "accept:",
  564. category: 'visiting',
  565. fn: function (aVisitor){
  566. var self=this;
  567. return smalltalk.withContext(function($ctx1) {
  568. var $1;
  569. $1=_st(aVisitor)._visitAssignmentNode_(self);
  570. return $1;
  571. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},smalltalk.AssignmentNode)})},
  572. args: ["aVisitor"],
  573. source: "accept: aVisitor\x0a\x09^ aVisitor visitAssignmentNode: self",
  574. messageSends: ["visitAssignmentNode:"],
  575. referencedClasses: []
  576. }),
  577. smalltalk.AssignmentNode);
  578. smalltalk.addMethod(
  579. smalltalk.method({
  580. selector: "isAssignmentNode",
  581. category: 'testing',
  582. fn: function (){
  583. var self=this;
  584. return smalltalk.withContext(function($ctx1) {
  585. return true;
  586. }, function($ctx1) {$ctx1.fill(self,"isAssignmentNode",{},smalltalk.AssignmentNode)})},
  587. args: [],
  588. source: "isAssignmentNode\x0a\x09^ true",
  589. messageSends: [],
  590. referencedClasses: []
  591. }),
  592. smalltalk.AssignmentNode);
  593. smalltalk.addMethod(
  594. smalltalk.method({
  595. selector: "left",
  596. category: 'accessing',
  597. fn: function (){
  598. var self=this;
  599. return smalltalk.withContext(function($ctx1) {
  600. var $1;
  601. $1=self["@left"];
  602. return $1;
  603. }, function($ctx1) {$ctx1.fill(self,"left",{},smalltalk.AssignmentNode)})},
  604. args: [],
  605. source: "left\x0a\x09^left",
  606. messageSends: [],
  607. referencedClasses: []
  608. }),
  609. smalltalk.AssignmentNode);
  610. smalltalk.addMethod(
  611. smalltalk.method({
  612. selector: "left:",
  613. category: 'accessing',
  614. fn: function (aNode){
  615. var self=this;
  616. return smalltalk.withContext(function($ctx1) {
  617. self["@left"]=aNode;
  618. _st(aNode)._parent_(self);
  619. return self}, function($ctx1) {$ctx1.fill(self,"left:",{aNode:aNode},smalltalk.AssignmentNode)})},
  620. args: ["aNode"],
  621. source: "left: aNode\x0a\x09left := aNode.\x0a\x09aNode parent: self",
  622. messageSends: ["parent:"],
  623. referencedClasses: []
  624. }),
  625. smalltalk.AssignmentNode);
  626. smalltalk.addMethod(
  627. smalltalk.method({
  628. selector: "nodes",
  629. category: 'accessing',
  630. fn: function (){
  631. var self=this;
  632. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  633. return smalltalk.withContext(function($ctx1) {
  634. var $1;
  635. $1=_st($Array())._with_with_(self._left(),self._right());
  636. return $1;
  637. }, function($ctx1) {$ctx1.fill(self,"nodes",{},smalltalk.AssignmentNode)})},
  638. args: [],
  639. source: "nodes\x0a\x09^ Array with: self left with: self right",
  640. messageSends: ["with:with:", "left", "right"],
  641. referencedClasses: ["Array"]
  642. }),
  643. smalltalk.AssignmentNode);
  644. smalltalk.addMethod(
  645. smalltalk.method({
  646. selector: "right",
  647. category: 'accessing',
  648. fn: function (){
  649. var self=this;
  650. return smalltalk.withContext(function($ctx1) {
  651. var $1;
  652. $1=self["@right"];
  653. return $1;
  654. }, function($ctx1) {$ctx1.fill(self,"right",{},smalltalk.AssignmentNode)})},
  655. args: [],
  656. source: "right\x0a\x09^right",
  657. messageSends: [],
  658. referencedClasses: []
  659. }),
  660. smalltalk.AssignmentNode);
  661. smalltalk.addMethod(
  662. smalltalk.method({
  663. selector: "right:",
  664. category: 'accessing',
  665. fn: function (aNode){
  666. var self=this;
  667. return smalltalk.withContext(function($ctx1) {
  668. self["@right"]=aNode;
  669. _st(aNode)._parent_(self);
  670. return self}, function($ctx1) {$ctx1.fill(self,"right:",{aNode:aNode},smalltalk.AssignmentNode)})},
  671. args: ["aNode"],
  672. source: "right: aNode\x0a\x09right := aNode.\x0a\x09aNode parent: self",
  673. messageSends: ["parent:"],
  674. referencedClasses: []
  675. }),
  676. smalltalk.AssignmentNode);
  677. smalltalk.addClass('BlockNode', smalltalk.Node, ['parameters', 'scope'], 'Compiler-AST');
  678. smalltalk.BlockNode.comment="I represent an block closure node.";
  679. smalltalk.addMethod(
  680. smalltalk.method({
  681. selector: "accept:",
  682. category: 'visiting',
  683. fn: function (aVisitor){
  684. var self=this;
  685. return smalltalk.withContext(function($ctx1) {
  686. var $1;
  687. $1=_st(aVisitor)._visitBlockNode_(self);
  688. return $1;
  689. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},smalltalk.BlockNode)})},
  690. args: ["aVisitor"],
  691. source: "accept: aVisitor\x0a\x09^ aVisitor visitBlockNode: self",
  692. messageSends: ["visitBlockNode:"],
  693. referencedClasses: []
  694. }),
  695. smalltalk.BlockNode);
  696. smalltalk.addMethod(
  697. smalltalk.method({
  698. selector: "isBlockNode",
  699. category: 'testing',
  700. fn: function (){
  701. var self=this;
  702. return smalltalk.withContext(function($ctx1) {
  703. return true;
  704. }, function($ctx1) {$ctx1.fill(self,"isBlockNode",{},smalltalk.BlockNode)})},
  705. args: [],
  706. source: "isBlockNode\x0a\x09^true",
  707. messageSends: [],
  708. referencedClasses: []
  709. }),
  710. smalltalk.BlockNode);
  711. smalltalk.addMethod(
  712. smalltalk.method({
  713. selector: "nextChild",
  714. category: 'accessing',
  715. fn: function (){
  716. var self=this;
  717. return smalltalk.withContext(function($ctx1) {
  718. var $1;
  719. $1=self;
  720. return $1;
  721. }, function($ctx1) {$ctx1.fill(self,"nextChild",{},smalltalk.BlockNode)})},
  722. args: [],
  723. source: "nextChild\x0a\x09\x22Answer the receiver as we want to avoid eager evaluation\x22\x0a\x09\x0a\x09^ self",
  724. messageSends: [],
  725. referencedClasses: []
  726. }),
  727. smalltalk.BlockNode);
  728. smalltalk.addMethod(
  729. smalltalk.method({
  730. selector: "nextNode:",
  731. category: 'accessing',
  732. fn: function (aNode){
  733. var self=this;
  734. return smalltalk.withContext(function($ctx1) {
  735. var $1;
  736. $1=self;
  737. return $1;
  738. }, function($ctx1) {$ctx1.fill(self,"nextNode:",{aNode:aNode},smalltalk.BlockNode)})},
  739. args: ["aNode"],
  740. source: "nextNode: aNode\x0a\x09\x22Answer the receiver as we want to avoid eager evaluation\x22\x0a\x09\x0a\x09^ self",
  741. messageSends: [],
  742. referencedClasses: []
  743. }),
  744. smalltalk.BlockNode);
  745. smalltalk.addMethod(
  746. smalltalk.method({
  747. selector: "parameters",
  748. category: 'accessing',
  749. fn: function (){
  750. var self=this;
  751. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  752. return smalltalk.withContext(function($ctx1) {
  753. var $2,$1;
  754. $2=self["@parameters"];
  755. if(($receiver = $2) == nil || $receiver == null){
  756. self["@parameters"]=_st($Array())._new();
  757. $1=self["@parameters"];
  758. } else {
  759. $1=$2;
  760. };
  761. return $1;
  762. }, function($ctx1) {$ctx1.fill(self,"parameters",{},smalltalk.BlockNode)})},
  763. args: [],
  764. source: "parameters\x0a\x09^parameters ifNil: [parameters := Array new]",
  765. messageSends: ["ifNil:", "new"],
  766. referencedClasses: ["Array"]
  767. }),
  768. smalltalk.BlockNode);
  769. smalltalk.addMethod(
  770. smalltalk.method({
  771. selector: "parameters:",
  772. category: 'accessing',
  773. fn: function (aCollection){
  774. var self=this;
  775. return smalltalk.withContext(function($ctx1) {
  776. self["@parameters"]=aCollection;
  777. return self}, function($ctx1) {$ctx1.fill(self,"parameters:",{aCollection:aCollection},smalltalk.BlockNode)})},
  778. args: ["aCollection"],
  779. source: "parameters: aCollection\x0a\x09parameters := aCollection",
  780. messageSends: [],
  781. referencedClasses: []
  782. }),
  783. smalltalk.BlockNode);
  784. smalltalk.addMethod(
  785. smalltalk.method({
  786. selector: "scope",
  787. category: 'accessing',
  788. fn: function (){
  789. var self=this;
  790. return smalltalk.withContext(function($ctx1) {
  791. var $1;
  792. $1=self["@scope"];
  793. return $1;
  794. }, function($ctx1) {$ctx1.fill(self,"scope",{},smalltalk.BlockNode)})},
  795. args: [],
  796. source: "scope\x0a\x09^ scope",
  797. messageSends: [],
  798. referencedClasses: []
  799. }),
  800. smalltalk.BlockNode);
  801. smalltalk.addMethod(
  802. smalltalk.method({
  803. selector: "scope:",
  804. category: 'accessing',
  805. fn: function (aLexicalScope){
  806. var self=this;
  807. return smalltalk.withContext(function($ctx1) {
  808. self["@scope"]=aLexicalScope;
  809. return self}, function($ctx1) {$ctx1.fill(self,"scope:",{aLexicalScope:aLexicalScope},smalltalk.BlockNode)})},
  810. args: ["aLexicalScope"],
  811. source: "scope: aLexicalScope\x0a\x09scope := aLexicalScope",
  812. messageSends: [],
  813. referencedClasses: []
  814. }),
  815. smalltalk.BlockNode);
  816. smalltalk.addMethod(
  817. smalltalk.method({
  818. selector: "subtreeNeedsAliasing",
  819. category: 'testing',
  820. fn: function (){
  821. var self=this;
  822. return smalltalk.withContext(function($ctx1) {
  823. var $1;
  824. $1=_st(self._shouldBeAliased())._or_((function(){
  825. return smalltalk.withContext(function($ctx2) {
  826. return self._shouldBeInlined();
  827. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  828. return $1;
  829. }, function($ctx1) {$ctx1.fill(self,"subtreeNeedsAliasing",{},smalltalk.BlockNode)})},
  830. args: [],
  831. source: "subtreeNeedsAliasing\x0a\x09^ self shouldBeAliased or: [ self shouldBeInlined ]",
  832. messageSends: ["or:", "shouldBeAliased", "shouldBeInlined"],
  833. referencedClasses: []
  834. }),
  835. smalltalk.BlockNode);
  836. smalltalk.addClass('CascadeNode', smalltalk.Node, ['receiver'], 'Compiler-AST');
  837. smalltalk.CascadeNode.comment="I represent an cascade node.";
  838. smalltalk.addMethod(
  839. smalltalk.method({
  840. selector: "accept:",
  841. category: 'visiting',
  842. fn: function (aVisitor){
  843. var self=this;
  844. return smalltalk.withContext(function($ctx1) {
  845. var $1;
  846. $1=_st(aVisitor)._visitCascadeNode_(self);
  847. return $1;
  848. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},smalltalk.CascadeNode)})},
  849. args: ["aVisitor"],
  850. source: "accept: aVisitor\x0a\x09^ aVisitor visitCascadeNode: self",
  851. messageSends: ["visitCascadeNode:"],
  852. referencedClasses: []
  853. }),
  854. smalltalk.CascadeNode);
  855. smalltalk.addMethod(
  856. smalltalk.method({
  857. selector: "isCascadeNode",
  858. category: 'testing',
  859. fn: function (){
  860. var self=this;
  861. return smalltalk.withContext(function($ctx1) {
  862. return true;
  863. }, function($ctx1) {$ctx1.fill(self,"isCascadeNode",{},smalltalk.CascadeNode)})},
  864. args: [],
  865. source: "isCascadeNode\x0a\x09^ true",
  866. messageSends: [],
  867. referencedClasses: []
  868. }),
  869. smalltalk.CascadeNode);
  870. smalltalk.addMethod(
  871. smalltalk.method({
  872. selector: "receiver",
  873. category: 'accessing',
  874. fn: function (){
  875. var self=this;
  876. return smalltalk.withContext(function($ctx1) {
  877. var $1;
  878. $1=self["@receiver"];
  879. return $1;
  880. }, function($ctx1) {$ctx1.fill(self,"receiver",{},smalltalk.CascadeNode)})},
  881. args: [],
  882. source: "receiver\x0a\x09^receiver",
  883. messageSends: [],
  884. referencedClasses: []
  885. }),
  886. smalltalk.CascadeNode);
  887. smalltalk.addMethod(
  888. smalltalk.method({
  889. selector: "receiver:",
  890. category: 'accessing',
  891. fn: function (aNode){
  892. var self=this;
  893. return smalltalk.withContext(function($ctx1) {
  894. self["@receiver"]=aNode;
  895. return self}, function($ctx1) {$ctx1.fill(self,"receiver:",{aNode:aNode},smalltalk.CascadeNode)})},
  896. args: ["aNode"],
  897. source: "receiver: aNode\x0a\x09receiver := aNode",
  898. messageSends: [],
  899. referencedClasses: []
  900. }),
  901. smalltalk.CascadeNode);
  902. smalltalk.addClass('DynamicArrayNode', smalltalk.Node, [], 'Compiler-AST');
  903. smalltalk.DynamicArrayNode.comment="I represent an dynamic array node.";
  904. smalltalk.addMethod(
  905. smalltalk.method({
  906. selector: "accept:",
  907. category: 'visiting',
  908. fn: function (aVisitor){
  909. var self=this;
  910. return smalltalk.withContext(function($ctx1) {
  911. var $1;
  912. $1=_st(aVisitor)._visitDynamicArrayNode_(self);
  913. return $1;
  914. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},smalltalk.DynamicArrayNode)})},
  915. args: ["aVisitor"],
  916. source: "accept: aVisitor\x0a\x09^ aVisitor visitDynamicArrayNode: self",
  917. messageSends: ["visitDynamicArrayNode:"],
  918. referencedClasses: []
  919. }),
  920. smalltalk.DynamicArrayNode);
  921. smalltalk.addClass('DynamicDictionaryNode', smalltalk.Node, [], 'Compiler-AST');
  922. smalltalk.DynamicDictionaryNode.comment="I represent an dynamic dictionary node.";
  923. smalltalk.addMethod(
  924. smalltalk.method({
  925. selector: "accept:",
  926. category: 'visiting',
  927. fn: function (aVisitor){
  928. var self=this;
  929. return smalltalk.withContext(function($ctx1) {
  930. var $1;
  931. $1=_st(aVisitor)._visitDynamicDictionaryNode_(self);
  932. return $1;
  933. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},smalltalk.DynamicDictionaryNode)})},
  934. args: ["aVisitor"],
  935. source: "accept: aVisitor\x0a\x09^ aVisitor visitDynamicDictionaryNode: self",
  936. messageSends: ["visitDynamicDictionaryNode:"],
  937. referencedClasses: []
  938. }),
  939. smalltalk.DynamicDictionaryNode);
  940. smalltalk.addClass('JSStatementNode', smalltalk.Node, ['source'], 'Compiler-AST');
  941. smalltalk.JSStatementNode.comment="I represent an JavaScript statement node.";
  942. smalltalk.addMethod(
  943. smalltalk.method({
  944. selector: "accept:",
  945. category: 'visiting',
  946. fn: function (aVisitor){
  947. var self=this;
  948. return smalltalk.withContext(function($ctx1) {
  949. var $1;
  950. $1=_st(aVisitor)._visitJSStatementNode_(self);
  951. return $1;
  952. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},smalltalk.JSStatementNode)})},
  953. args: ["aVisitor"],
  954. source: "accept: aVisitor\x0a\x09^ aVisitor visitJSStatementNode: self",
  955. messageSends: ["visitJSStatementNode:"],
  956. referencedClasses: []
  957. }),
  958. smalltalk.JSStatementNode);
  959. smalltalk.addMethod(
  960. smalltalk.method({
  961. selector: "isJSStatementNode",
  962. category: 'testing',
  963. fn: function (){
  964. var self=this;
  965. return smalltalk.withContext(function($ctx1) {
  966. return true;
  967. }, function($ctx1) {$ctx1.fill(self,"isJSStatementNode",{},smalltalk.JSStatementNode)})},
  968. args: [],
  969. source: "isJSStatementNode\x0a\x09^ true",
  970. messageSends: [],
  971. referencedClasses: []
  972. }),
  973. smalltalk.JSStatementNode);
  974. smalltalk.addMethod(
  975. smalltalk.method({
  976. selector: "source",
  977. category: 'accessing',
  978. fn: function (){
  979. var self=this;
  980. return smalltalk.withContext(function($ctx1) {
  981. var $2,$1;
  982. $2=self["@source"];
  983. if(($receiver = $2) == nil || $receiver == null){
  984. $1="";
  985. } else {
  986. $1=$2;
  987. };
  988. return $1;
  989. }, function($ctx1) {$ctx1.fill(self,"source",{},smalltalk.JSStatementNode)})},
  990. args: [],
  991. source: "source\x0a\x09^source ifNil: ['']",
  992. messageSends: ["ifNil:"],
  993. referencedClasses: []
  994. }),
  995. smalltalk.JSStatementNode);
  996. smalltalk.addMethod(
  997. smalltalk.method({
  998. selector: "source:",
  999. category: 'accessing',
  1000. fn: function (aString){
  1001. var self=this;
  1002. return smalltalk.withContext(function($ctx1) {
  1003. self["@source"]=aString;
  1004. return self}, function($ctx1) {$ctx1.fill(self,"source:",{aString:aString},smalltalk.JSStatementNode)})},
  1005. args: ["aString"],
  1006. source: "source: aString\x0a\x09source := aString",
  1007. messageSends: [],
  1008. referencedClasses: []
  1009. }),
  1010. smalltalk.JSStatementNode);
  1011. smalltalk.addClass('MethodNode', smalltalk.Node, ['selector', 'arguments', 'source', 'scope', 'classReferences', 'sendIndexes', 'superSends'], 'Compiler-AST');
  1012. smalltalk.MethodNode.comment="I represent an method node.\x0a\x0aA method node must be the root and only method node of a valid AST.";
  1013. smalltalk.addMethod(
  1014. smalltalk.method({
  1015. selector: "accept:",
  1016. category: 'visiting',
  1017. fn: function (aVisitor){
  1018. var self=this;
  1019. return smalltalk.withContext(function($ctx1) {
  1020. var $1;
  1021. $1=_st(aVisitor)._visitMethodNode_(self);
  1022. return $1;
  1023. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},smalltalk.MethodNode)})},
  1024. args: ["aVisitor"],
  1025. source: "accept: aVisitor\x0a\x09^ aVisitor visitMethodNode: self",
  1026. messageSends: ["visitMethodNode:"],
  1027. referencedClasses: []
  1028. }),
  1029. smalltalk.MethodNode);
  1030. smalltalk.addMethod(
  1031. smalltalk.method({
  1032. selector: "arguments",
  1033. category: 'accessing',
  1034. fn: function (){
  1035. var self=this;
  1036. return smalltalk.withContext(function($ctx1) {
  1037. var $2,$1;
  1038. $2=self["@arguments"];
  1039. if(($receiver = $2) == nil || $receiver == null){
  1040. $1=[];
  1041. } else {
  1042. $1=$2;
  1043. };
  1044. return $1;
  1045. }, function($ctx1) {$ctx1.fill(self,"arguments",{},smalltalk.MethodNode)})},
  1046. args: [],
  1047. source: "arguments\x0a\x09^arguments ifNil: [#()]",
  1048. messageSends: ["ifNil:"],
  1049. referencedClasses: []
  1050. }),
  1051. smalltalk.MethodNode);
  1052. smalltalk.addMethod(
  1053. smalltalk.method({
  1054. selector: "arguments:",
  1055. category: 'accessing',
  1056. fn: function (aCollection){
  1057. var self=this;
  1058. return smalltalk.withContext(function($ctx1) {
  1059. self["@arguments"]=aCollection;
  1060. return self}, function($ctx1) {$ctx1.fill(self,"arguments:",{aCollection:aCollection},smalltalk.MethodNode)})},
  1061. args: ["aCollection"],
  1062. source: "arguments: aCollection\x0a\x09arguments := aCollection",
  1063. messageSends: [],
  1064. referencedClasses: []
  1065. }),
  1066. smalltalk.MethodNode);
  1067. smalltalk.addMethod(
  1068. smalltalk.method({
  1069. selector: "classReferences",
  1070. category: 'accessing',
  1071. fn: function (){
  1072. var self=this;
  1073. return smalltalk.withContext(function($ctx1) {
  1074. var $1;
  1075. $1=self["@classReferences"];
  1076. return $1;
  1077. }, function($ctx1) {$ctx1.fill(self,"classReferences",{},smalltalk.MethodNode)})},
  1078. args: [],
  1079. source: "classReferences\x0a\x09^ classReferences",
  1080. messageSends: [],
  1081. referencedClasses: []
  1082. }),
  1083. smalltalk.MethodNode);
  1084. smalltalk.addMethod(
  1085. smalltalk.method({
  1086. selector: "classReferences:",
  1087. category: 'accessing',
  1088. fn: function (aCollection){
  1089. var self=this;
  1090. return smalltalk.withContext(function($ctx1) {
  1091. self["@classReferences"]=aCollection;
  1092. return self}, function($ctx1) {$ctx1.fill(self,"classReferences:",{aCollection:aCollection},smalltalk.MethodNode)})},
  1093. args: ["aCollection"],
  1094. source: "classReferences: aCollection\x0a\x09classReferences := aCollection",
  1095. messageSends: [],
  1096. referencedClasses: []
  1097. }),
  1098. smalltalk.MethodNode);
  1099. smalltalk.addMethod(
  1100. smalltalk.method({
  1101. selector: "extent",
  1102. category: 'accessing',
  1103. fn: function (){
  1104. var self=this;
  1105. return smalltalk.withContext(function($ctx1) {
  1106. var $1;
  1107. $1=_st(_st(_st(self._source())._lines())._size()).__at(_st(_st(_st(_st(self._source())._lines())._last())._size()).__plus((1)));
  1108. return $1;
  1109. }, function($ctx1) {$ctx1.fill(self,"extent",{},smalltalk.MethodNode)})},
  1110. args: [],
  1111. source: "extent\x0a\x09^ self source lines size @ (self source lines last size + 1)",
  1112. messageSends: ["@", "size", "lines", "source", "+", "last"],
  1113. referencedClasses: []
  1114. }),
  1115. smalltalk.MethodNode);
  1116. smalltalk.addMethod(
  1117. smalltalk.method({
  1118. selector: "messageSends",
  1119. category: 'accessing',
  1120. fn: function (){
  1121. var self=this;
  1122. return smalltalk.withContext(function($ctx1) {
  1123. var $1;
  1124. $1=_st(self._sendIndexes())._keys();
  1125. return $1;
  1126. }, function($ctx1) {$ctx1.fill(self,"messageSends",{},smalltalk.MethodNode)})},
  1127. args: [],
  1128. source: "messageSends\x0a\x09^ self sendIndexes keys",
  1129. messageSends: ["keys", "sendIndexes"],
  1130. referencedClasses: []
  1131. }),
  1132. smalltalk.MethodNode);
  1133. smalltalk.addMethod(
  1134. smalltalk.method({
  1135. selector: "method",
  1136. category: 'accessing',
  1137. fn: function (){
  1138. var self=this;
  1139. return smalltalk.withContext(function($ctx1) {
  1140. return self;
  1141. }, function($ctx1) {$ctx1.fill(self,"method",{},smalltalk.MethodNode)})},
  1142. args: [],
  1143. source: "method\x0a\x09^ self",
  1144. messageSends: [],
  1145. referencedClasses: []
  1146. }),
  1147. smalltalk.MethodNode);
  1148. smalltalk.addMethod(
  1149. smalltalk.method({
  1150. selector: "scope",
  1151. category: 'accessing',
  1152. fn: function (){
  1153. var self=this;
  1154. return smalltalk.withContext(function($ctx1) {
  1155. var $1;
  1156. $1=self["@scope"];
  1157. return $1;
  1158. }, function($ctx1) {$ctx1.fill(self,"scope",{},smalltalk.MethodNode)})},
  1159. args: [],
  1160. source: "scope\x0a\x09^ scope",
  1161. messageSends: [],
  1162. referencedClasses: []
  1163. }),
  1164. smalltalk.MethodNode);
  1165. smalltalk.addMethod(
  1166. smalltalk.method({
  1167. selector: "scope:",
  1168. category: 'accessing',
  1169. fn: function (aMethodScope){
  1170. var self=this;
  1171. return smalltalk.withContext(function($ctx1) {
  1172. self["@scope"]=aMethodScope;
  1173. return self}, function($ctx1) {$ctx1.fill(self,"scope:",{aMethodScope:aMethodScope},smalltalk.MethodNode)})},
  1174. args: ["aMethodScope"],
  1175. source: "scope: aMethodScope\x0a\x09scope := aMethodScope",
  1176. messageSends: [],
  1177. referencedClasses: []
  1178. }),
  1179. smalltalk.MethodNode);
  1180. smalltalk.addMethod(
  1181. smalltalk.method({
  1182. selector: "selector",
  1183. category: 'accessing',
  1184. fn: function (){
  1185. var self=this;
  1186. return smalltalk.withContext(function($ctx1) {
  1187. var $1;
  1188. $1=self["@selector"];
  1189. return $1;
  1190. }, function($ctx1) {$ctx1.fill(self,"selector",{},smalltalk.MethodNode)})},
  1191. args: [],
  1192. source: "selector\x0a\x09^selector",
  1193. messageSends: [],
  1194. referencedClasses: []
  1195. }),
  1196. smalltalk.MethodNode);
  1197. smalltalk.addMethod(
  1198. smalltalk.method({
  1199. selector: "selector:",
  1200. category: 'accessing',
  1201. fn: function (aString){
  1202. var self=this;
  1203. return smalltalk.withContext(function($ctx1) {
  1204. self["@selector"]=aString;
  1205. return self}, function($ctx1) {$ctx1.fill(self,"selector:",{aString:aString},smalltalk.MethodNode)})},
  1206. args: ["aString"],
  1207. source: "selector: aString\x0a\x09selector := aString",
  1208. messageSends: [],
  1209. referencedClasses: []
  1210. }),
  1211. smalltalk.MethodNode);
  1212. smalltalk.addMethod(
  1213. smalltalk.method({
  1214. selector: "sendIndexes",
  1215. category: 'accessing',
  1216. fn: function (){
  1217. var self=this;
  1218. return smalltalk.withContext(function($ctx1) {
  1219. var $1;
  1220. $1=self["@sendIndexes"];
  1221. return $1;
  1222. }, function($ctx1) {$ctx1.fill(self,"sendIndexes",{},smalltalk.MethodNode)})},
  1223. args: [],
  1224. source: "sendIndexes\x0a\x09^ sendIndexes",
  1225. messageSends: [],
  1226. referencedClasses: []
  1227. }),
  1228. smalltalk.MethodNode);
  1229. smalltalk.addMethod(
  1230. smalltalk.method({
  1231. selector: "sendIndexes:",
  1232. category: 'accessing',
  1233. fn: function (aDictionary){
  1234. var self=this;
  1235. return smalltalk.withContext(function($ctx1) {
  1236. self["@sendIndexes"]=aDictionary;
  1237. return self}, function($ctx1) {$ctx1.fill(self,"sendIndexes:",{aDictionary:aDictionary},smalltalk.MethodNode)})},
  1238. args: ["aDictionary"],
  1239. source: "sendIndexes: aDictionary\x0a\x09sendIndexes := aDictionary",
  1240. messageSends: [],
  1241. referencedClasses: []
  1242. }),
  1243. smalltalk.MethodNode);
  1244. smalltalk.addMethod(
  1245. smalltalk.method({
  1246. selector: "source",
  1247. category: 'accessing',
  1248. fn: function (){
  1249. var self=this;
  1250. return smalltalk.withContext(function($ctx1) {
  1251. var $1;
  1252. $1=self["@source"];
  1253. return $1;
  1254. }, function($ctx1) {$ctx1.fill(self,"source",{},smalltalk.MethodNode)})},
  1255. args: [],
  1256. source: "source\x0a\x09^source",
  1257. messageSends: [],
  1258. referencedClasses: []
  1259. }),
  1260. smalltalk.MethodNode);
  1261. smalltalk.addMethod(
  1262. smalltalk.method({
  1263. selector: "source:",
  1264. category: 'accessing',
  1265. fn: function (aString){
  1266. var self=this;
  1267. return smalltalk.withContext(function($ctx1) {
  1268. self["@source"]=aString;
  1269. return self}, function($ctx1) {$ctx1.fill(self,"source:",{aString:aString},smalltalk.MethodNode)})},
  1270. args: ["aString"],
  1271. source: "source: aString\x0a\x09source := aString",
  1272. messageSends: [],
  1273. referencedClasses: []
  1274. }),
  1275. smalltalk.MethodNode);
  1276. smalltalk.addMethod(
  1277. smalltalk.method({
  1278. selector: "superSends",
  1279. category: 'accessing',
  1280. fn: function (){
  1281. var self=this;
  1282. return smalltalk.withContext(function($ctx1) {
  1283. var $1;
  1284. $1=self["@superSends"];
  1285. return $1;
  1286. }, function($ctx1) {$ctx1.fill(self,"superSends",{},smalltalk.MethodNode)})},
  1287. args: [],
  1288. source: "superSends\x0a\x09^ superSends",
  1289. messageSends: [],
  1290. referencedClasses: []
  1291. }),
  1292. smalltalk.MethodNode);
  1293. smalltalk.addMethod(
  1294. smalltalk.method({
  1295. selector: "superSends:",
  1296. category: 'accessing',
  1297. fn: function (aCollection){
  1298. var self=this;
  1299. return smalltalk.withContext(function($ctx1) {
  1300. self["@superSends"]=aCollection;
  1301. return self}, function($ctx1) {$ctx1.fill(self,"superSends:",{aCollection:aCollection},smalltalk.MethodNode)})},
  1302. args: ["aCollection"],
  1303. source: "superSends: aCollection\x0a\x09superSends := aCollection",
  1304. messageSends: [],
  1305. referencedClasses: []
  1306. }),
  1307. smalltalk.MethodNode);
  1308. smalltalk.addClass('ReturnNode', smalltalk.Node, ['scope'], 'Compiler-AST');
  1309. smalltalk.ReturnNode.comment="I represent an return node. At the AST level, there is not difference between a local return or non-local return.";
  1310. smalltalk.addMethod(
  1311. smalltalk.method({
  1312. selector: "accept:",
  1313. category: 'visiting',
  1314. fn: function (aVisitor){
  1315. var self=this;
  1316. return smalltalk.withContext(function($ctx1) {
  1317. var $1;
  1318. $1=_st(aVisitor)._visitReturnNode_(self);
  1319. return $1;
  1320. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},smalltalk.ReturnNode)})},
  1321. args: ["aVisitor"],
  1322. source: "accept: aVisitor\x0a\x09^ aVisitor visitReturnNode: self",
  1323. messageSends: ["visitReturnNode:"],
  1324. referencedClasses: []
  1325. }),
  1326. smalltalk.ReturnNode);
  1327. smalltalk.addMethod(
  1328. smalltalk.method({
  1329. selector: "isReturnNode",
  1330. category: 'testing',
  1331. fn: function (){
  1332. var self=this;
  1333. return smalltalk.withContext(function($ctx1) {
  1334. return true;
  1335. }, function($ctx1) {$ctx1.fill(self,"isReturnNode",{},smalltalk.ReturnNode)})},
  1336. args: [],
  1337. source: "isReturnNode\x0a\x09^ true",
  1338. messageSends: [],
  1339. referencedClasses: []
  1340. }),
  1341. smalltalk.ReturnNode);
  1342. smalltalk.addMethod(
  1343. smalltalk.method({
  1344. selector: "nonLocalReturn",
  1345. category: 'testing',
  1346. fn: function (){
  1347. var self=this;
  1348. return smalltalk.withContext(function($ctx1) {
  1349. var $1;
  1350. $1=_st(_st(self._scope())._isMethodScope())._not();
  1351. return $1;
  1352. }, function($ctx1) {$ctx1.fill(self,"nonLocalReturn",{},smalltalk.ReturnNode)})},
  1353. args: [],
  1354. source: "nonLocalReturn\x0a\x09^ self scope isMethodScope not",
  1355. messageSends: ["not", "isMethodScope", "scope"],
  1356. referencedClasses: []
  1357. }),
  1358. smalltalk.ReturnNode);
  1359. smalltalk.addMethod(
  1360. smalltalk.method({
  1361. selector: "scope",
  1362. category: 'accessing',
  1363. fn: function (){
  1364. var self=this;
  1365. return smalltalk.withContext(function($ctx1) {
  1366. var $1;
  1367. $1=self["@scope"];
  1368. return $1;
  1369. }, function($ctx1) {$ctx1.fill(self,"scope",{},smalltalk.ReturnNode)})},
  1370. args: [],
  1371. source: "scope\x0a\x09^ scope",
  1372. messageSends: [],
  1373. referencedClasses: []
  1374. }),
  1375. smalltalk.ReturnNode);
  1376. smalltalk.addMethod(
  1377. smalltalk.method({
  1378. selector: "scope:",
  1379. category: 'accessing',
  1380. fn: function (aLexicalScope){
  1381. var self=this;
  1382. return smalltalk.withContext(function($ctx1) {
  1383. self["@scope"]=aLexicalScope;
  1384. return self}, function($ctx1) {$ctx1.fill(self,"scope:",{aLexicalScope:aLexicalScope},smalltalk.ReturnNode)})},
  1385. args: ["aLexicalScope"],
  1386. source: "scope: aLexicalScope\x0a\x09scope := aLexicalScope",
  1387. messageSends: [],
  1388. referencedClasses: []
  1389. }),
  1390. smalltalk.ReturnNode);
  1391. smalltalk.addClass('SendNode', smalltalk.Node, ['selector', 'arguments', 'receiver', 'superSend', 'index'], 'Compiler-AST');
  1392. smalltalk.SendNode.comment="I represent an message send node.";
  1393. smalltalk.addMethod(
  1394. smalltalk.method({
  1395. selector: "accept:",
  1396. category: 'visiting',
  1397. fn: function (aVisitor){
  1398. var self=this;
  1399. return smalltalk.withContext(function($ctx1) {
  1400. var $1;
  1401. $1=_st(aVisitor)._visitSendNode_(self);
  1402. return $1;
  1403. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},smalltalk.SendNode)})},
  1404. args: ["aVisitor"],
  1405. source: "accept: aVisitor\x0a\x09^ aVisitor visitSendNode: self",
  1406. messageSends: ["visitSendNode:"],
  1407. referencedClasses: []
  1408. }),
  1409. smalltalk.SendNode);
  1410. smalltalk.addMethod(
  1411. smalltalk.method({
  1412. selector: "arguments",
  1413. category: 'accessing',
  1414. fn: function (){
  1415. var self=this;
  1416. return smalltalk.withContext(function($ctx1) {
  1417. var $2,$1;
  1418. $2=self["@arguments"];
  1419. if(($receiver = $2) == nil || $receiver == null){
  1420. self["@arguments"]=[];
  1421. $1=self["@arguments"];
  1422. } else {
  1423. $1=$2;
  1424. };
  1425. return $1;
  1426. }, function($ctx1) {$ctx1.fill(self,"arguments",{},smalltalk.SendNode)})},
  1427. args: [],
  1428. source: "arguments\x0a\x09^arguments ifNil: [arguments := #()]",
  1429. messageSends: ["ifNil:"],
  1430. referencedClasses: []
  1431. }),
  1432. smalltalk.SendNode);
  1433. smalltalk.addMethod(
  1434. smalltalk.method({
  1435. selector: "arguments:",
  1436. category: 'accessing',
  1437. fn: function (aCollection){
  1438. var self=this;
  1439. return smalltalk.withContext(function($ctx1) {
  1440. self["@arguments"]=aCollection;
  1441. _st(aCollection)._do_((function(each){
  1442. return smalltalk.withContext(function($ctx2) {
  1443. return _st(each)._parent_(self);
  1444. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  1445. return self}, function($ctx1) {$ctx1.fill(self,"arguments:",{aCollection:aCollection},smalltalk.SendNode)})},
  1446. args: ["aCollection"],
  1447. source: "arguments: aCollection\x0a\x09arguments := aCollection.\x0a\x09aCollection do: [ :each | each parent: self ]",
  1448. messageSends: ["do:", "parent:"],
  1449. referencedClasses: []
  1450. }),
  1451. smalltalk.SendNode);
  1452. smalltalk.addMethod(
  1453. smalltalk.method({
  1454. selector: "cascadeNodeWithMessages:",
  1455. category: 'accessing',
  1456. fn: function (aCollection){
  1457. var self=this;
  1458. var first;
  1459. function $SendNode(){return smalltalk.SendNode||(typeof SendNode=="undefined"?nil:SendNode)}
  1460. function $CascadeNode(){return smalltalk.CascadeNode||(typeof CascadeNode=="undefined"?nil:CascadeNode)}
  1461. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  1462. return smalltalk.withContext(function($ctx1) {
  1463. var $1,$2,$4,$5,$3;
  1464. $1=_st($SendNode())._new();
  1465. _st($1)._selector_(self._selector());
  1466. _st($1)._arguments_(self._arguments());
  1467. $2=_st($1)._yourself();
  1468. first=$2;
  1469. $4=_st($CascadeNode())._new();
  1470. _st($4)._receiver_(self._receiver());
  1471. _st($4)._nodes_(_st(_st($Array())._with_(first)).__comma(aCollection));
  1472. $5=_st($4)._yourself();
  1473. $3=$5;
  1474. return $3;
  1475. }, function($ctx1) {$ctx1.fill(self,"cascadeNodeWithMessages:",{aCollection:aCollection,first:first},smalltalk.SendNode)})},
  1476. args: ["aCollection"],
  1477. 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",
  1478. messageSends: ["selector:", "new", "selector", "arguments:", "arguments", "yourself", "receiver:", "receiver", "nodes:", ",", "with:"],
  1479. referencedClasses: ["SendNode", "CascadeNode", "Array"]
  1480. }),
  1481. smalltalk.SendNode);
  1482. smalltalk.addMethod(
  1483. smalltalk.method({
  1484. selector: "index",
  1485. category: 'accessing',
  1486. fn: function (){
  1487. var self=this;
  1488. return smalltalk.withContext(function($ctx1) {
  1489. var $1;
  1490. $1=self["@index"];
  1491. return $1;
  1492. }, function($ctx1) {$ctx1.fill(self,"index",{},smalltalk.SendNode)})},
  1493. args: [],
  1494. source: "index\x0a\x09^ index",
  1495. messageSends: [],
  1496. referencedClasses: []
  1497. }),
  1498. smalltalk.SendNode);
  1499. smalltalk.addMethod(
  1500. smalltalk.method({
  1501. selector: "index:",
  1502. category: 'accessing',
  1503. fn: function (anInteger){
  1504. var self=this;
  1505. return smalltalk.withContext(function($ctx1) {
  1506. self["@index"]=anInteger;
  1507. return self}, function($ctx1) {$ctx1.fill(self,"index:",{anInteger:anInteger},smalltalk.SendNode)})},
  1508. args: ["anInteger"],
  1509. source: "index: anInteger\x0a\x09index := anInteger",
  1510. messageSends: [],
  1511. referencedClasses: []
  1512. }),
  1513. smalltalk.SendNode);
  1514. smalltalk.addMethod(
  1515. smalltalk.method({
  1516. selector: "isCascadeSendNode",
  1517. category: 'testing',
  1518. fn: function (){
  1519. var self=this;
  1520. return smalltalk.withContext(function($ctx1) {
  1521. var $1;
  1522. $1=_st(self._parent())._isCascadeNode();
  1523. return $1;
  1524. }, function($ctx1) {$ctx1.fill(self,"isCascadeSendNode",{},smalltalk.SendNode)})},
  1525. args: [],
  1526. source: "isCascadeSendNode\x0a\x09^ self parent isCascadeNode",
  1527. messageSends: ["isCascadeNode", "parent"],
  1528. referencedClasses: []
  1529. }),
  1530. smalltalk.SendNode);
  1531. smalltalk.addMethod(
  1532. smalltalk.method({
  1533. selector: "isSendNode",
  1534. category: 'testing',
  1535. fn: function (){
  1536. var self=this;
  1537. return smalltalk.withContext(function($ctx1) {
  1538. return true;
  1539. }, function($ctx1) {$ctx1.fill(self,"isSendNode",{},smalltalk.SendNode)})},
  1540. args: [],
  1541. source: "isSendNode\x0a\x09^ true",
  1542. messageSends: [],
  1543. referencedClasses: []
  1544. }),
  1545. smalltalk.SendNode);
  1546. smalltalk.addMethod(
  1547. smalltalk.method({
  1548. selector: "nodes",
  1549. category: 'accessing',
  1550. fn: function (){
  1551. var self=this;
  1552. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  1553. return smalltalk.withContext(function($ctx1) {
  1554. var $1,$2,$4,$5,$3;
  1555. $1=self._receiver();
  1556. if(($receiver = $1) == nil || $receiver == null){
  1557. $2=_st(self._arguments())._copy();
  1558. return $2;
  1559. } else {
  1560. $1;
  1561. };
  1562. $4=_st($Array())._with_(self._receiver());
  1563. _st($4)._addAll_(self._arguments());
  1564. $5=_st($4)._yourself();
  1565. $3=$5;
  1566. return $3;
  1567. }, function($ctx1) {$ctx1.fill(self,"nodes",{},smalltalk.SendNode)})},
  1568. args: [],
  1569. source: "nodes\x0a\x09self receiver ifNil: [ ^ self arguments copy ].\x0a\x09\x0a\x09^ (Array with: self receiver)\x0a\x09\x09addAll: self arguments;\x0a\x09\x09yourself",
  1570. messageSends: ["ifNil:", "receiver", "copy", "arguments", "addAll:", "with:", "yourself"],
  1571. referencedClasses: ["Array"]
  1572. }),
  1573. smalltalk.SendNode);
  1574. smalltalk.addMethod(
  1575. smalltalk.method({
  1576. selector: "receiver",
  1577. category: 'accessing',
  1578. fn: function (){
  1579. var self=this;
  1580. return smalltalk.withContext(function($ctx1) {
  1581. var $1;
  1582. $1=self["@receiver"];
  1583. return $1;
  1584. }, function($ctx1) {$ctx1.fill(self,"receiver",{},smalltalk.SendNode)})},
  1585. args: [],
  1586. source: "receiver\x0a\x09^receiver",
  1587. messageSends: [],
  1588. referencedClasses: []
  1589. }),
  1590. smalltalk.SendNode);
  1591. smalltalk.addMethod(
  1592. smalltalk.method({
  1593. selector: "receiver:",
  1594. category: 'accessing',
  1595. fn: function (aNode){
  1596. var self=this;
  1597. return smalltalk.withContext(function($ctx1) {
  1598. var $1;
  1599. self["@receiver"]=aNode;
  1600. $1=_st(aNode)._isNode();
  1601. if(smalltalk.assert($1)){
  1602. _st(aNode)._parent_(self);
  1603. };
  1604. return self}, function($ctx1) {$ctx1.fill(self,"receiver:",{aNode:aNode},smalltalk.SendNode)})},
  1605. args: ["aNode"],
  1606. source: "receiver: aNode\x0a\x09receiver := aNode.\x0a\x09aNode isNode ifTrue: [\x0a\x09\x09aNode parent: self ]",
  1607. messageSends: ["ifTrue:", "isNode", "parent:"],
  1608. referencedClasses: []
  1609. }),
  1610. smalltalk.SendNode);
  1611. smalltalk.addMethod(
  1612. smalltalk.method({
  1613. selector: "selector",
  1614. category: 'accessing',
  1615. fn: function (){
  1616. var self=this;
  1617. return smalltalk.withContext(function($ctx1) {
  1618. var $1;
  1619. $1=self["@selector"];
  1620. return $1;
  1621. }, function($ctx1) {$ctx1.fill(self,"selector",{},smalltalk.SendNode)})},
  1622. args: [],
  1623. source: "selector\x0a\x09^selector",
  1624. messageSends: [],
  1625. referencedClasses: []
  1626. }),
  1627. smalltalk.SendNode);
  1628. smalltalk.addMethod(
  1629. smalltalk.method({
  1630. selector: "selector:",
  1631. category: 'accessing',
  1632. fn: function (aString){
  1633. var self=this;
  1634. return smalltalk.withContext(function($ctx1) {
  1635. self["@selector"]=aString;
  1636. return self}, function($ctx1) {$ctx1.fill(self,"selector:",{aString:aString},smalltalk.SendNode)})},
  1637. args: ["aString"],
  1638. source: "selector: aString\x0a\x09selector := aString",
  1639. messageSends: [],
  1640. referencedClasses: []
  1641. }),
  1642. smalltalk.SendNode);
  1643. smalltalk.addMethod(
  1644. smalltalk.method({
  1645. selector: "stopOnStepping",
  1646. category: 'testing',
  1647. fn: function (){
  1648. var self=this;
  1649. return smalltalk.withContext(function($ctx1) {
  1650. return true;
  1651. }, function($ctx1) {$ctx1.fill(self,"stopOnStepping",{},smalltalk.SendNode)})},
  1652. args: [],
  1653. source: "stopOnStepping\x0a\x09^ true",
  1654. messageSends: [],
  1655. referencedClasses: []
  1656. }),
  1657. smalltalk.SendNode);
  1658. smalltalk.addMethod(
  1659. smalltalk.method({
  1660. selector: "superSend",
  1661. category: 'accessing',
  1662. fn: function (){
  1663. var self=this;
  1664. return smalltalk.withContext(function($ctx1) {
  1665. var $2,$1;
  1666. $2=self["@superSend"];
  1667. if(($receiver = $2) == nil || $receiver == null){
  1668. $1=false;
  1669. } else {
  1670. $1=$2;
  1671. };
  1672. return $1;
  1673. }, function($ctx1) {$ctx1.fill(self,"superSend",{},smalltalk.SendNode)})},
  1674. args: [],
  1675. source: "superSend\x0a\x09^ superSend ifNil: [ false ]",
  1676. messageSends: ["ifNil:"],
  1677. referencedClasses: []
  1678. }),
  1679. smalltalk.SendNode);
  1680. smalltalk.addMethod(
  1681. smalltalk.method({
  1682. selector: "superSend:",
  1683. category: 'accessing',
  1684. fn: function (aBoolean){
  1685. var self=this;
  1686. return smalltalk.withContext(function($ctx1) {
  1687. self["@superSend"]=aBoolean;
  1688. return self}, function($ctx1) {$ctx1.fill(self,"superSend:",{aBoolean:aBoolean},smalltalk.SendNode)})},
  1689. args: ["aBoolean"],
  1690. source: "superSend: aBoolean\x0a\x09superSend := aBoolean",
  1691. messageSends: [],
  1692. referencedClasses: []
  1693. }),
  1694. smalltalk.SendNode);
  1695. smalltalk.addMethod(
  1696. smalltalk.method({
  1697. selector: "valueForReceiver:",
  1698. category: 'accessing',
  1699. fn: function (anObject){
  1700. var self=this;
  1701. function $SendNode(){return smalltalk.SendNode||(typeof SendNode=="undefined"?nil:SendNode)}
  1702. return smalltalk.withContext(function($ctx1) {
  1703. var $2,$3,$5,$4,$6,$1;
  1704. $2=_st($SendNode())._new();
  1705. _st($2)._position_(self._position());
  1706. $3=$2;
  1707. $5=self._receiver();
  1708. if(($receiver = $5) == nil || $receiver == null){
  1709. $4=anObject;
  1710. } else {
  1711. $4=_st(self._receiver())._valueForReceiver_(anObject);
  1712. };
  1713. _st($3)._receiver_($4);
  1714. _st($2)._selector_(self._selector());
  1715. _st($2)._arguments_(self._arguments());
  1716. $6=_st($2)._yourself();
  1717. $1=$6;
  1718. return $1;
  1719. }, function($ctx1) {$ctx1.fill(self,"valueForReceiver:",{anObject:anObject},smalltalk.SendNode)})},
  1720. args: ["anObject"],
  1721. source: "valueForReceiver: anObject\x0a\x09^SendNode new\x0a\x09\x09position: self position;\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",
  1722. messageSends: ["position:", "new", "position", "receiver:", "ifNil:ifNotNil:", "receiver", "valueForReceiver:", "selector:", "selector", "arguments:", "arguments", "yourself"],
  1723. referencedClasses: ["SendNode"]
  1724. }),
  1725. smalltalk.SendNode);
  1726. smalltalk.addClass('SequenceNode', smalltalk.Node, ['temps', 'scope'], 'Compiler-AST');
  1727. 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).";
  1728. smalltalk.addMethod(
  1729. smalltalk.method({
  1730. selector: "accept:",
  1731. category: 'visiting',
  1732. fn: function (aVisitor){
  1733. var self=this;
  1734. return smalltalk.withContext(function($ctx1) {
  1735. var $1;
  1736. $1=_st(aVisitor)._visitSequenceNode_(self);
  1737. return $1;
  1738. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},smalltalk.SequenceNode)})},
  1739. args: ["aVisitor"],
  1740. source: "accept: aVisitor\x0a\x09^ aVisitor visitSequenceNode: self",
  1741. messageSends: ["visitSequenceNode:"],
  1742. referencedClasses: []
  1743. }),
  1744. smalltalk.SequenceNode);
  1745. smalltalk.addMethod(
  1746. smalltalk.method({
  1747. selector: "asBlockSequenceNode",
  1748. category: 'testing',
  1749. fn: function (){
  1750. var self=this;
  1751. function $BlockSequenceNode(){return smalltalk.BlockSequenceNode||(typeof BlockSequenceNode=="undefined"?nil:BlockSequenceNode)}
  1752. return smalltalk.withContext(function($ctx1) {
  1753. var $2,$3,$1;
  1754. $2=_st($BlockSequenceNode())._new();
  1755. _st($2)._position_(self._position());
  1756. _st($2)._nodes_(self._nodes());
  1757. _st($2)._temps_(self._temps());
  1758. $3=_st($2)._yourself();
  1759. $1=$3;
  1760. return $1;
  1761. }, function($ctx1) {$ctx1.fill(self,"asBlockSequenceNode",{},smalltalk.SequenceNode)})},
  1762. args: [],
  1763. source: "asBlockSequenceNode\x0a\x09^BlockSequenceNode new\x0a\x09\x09position: self position;\x0a\x09\x09nodes: self nodes;\x0a\x09\x09temps: self temps;\x0a\x09\x09yourself",
  1764. messageSends: ["position:", "new", "position", "nodes:", "nodes", "temps:", "temps", "yourself"],
  1765. referencedClasses: ["BlockSequenceNode"]
  1766. }),
  1767. smalltalk.SequenceNode);
  1768. smalltalk.addMethod(
  1769. smalltalk.method({
  1770. selector: "scope",
  1771. category: 'accessing',
  1772. fn: function (){
  1773. var self=this;
  1774. return smalltalk.withContext(function($ctx1) {
  1775. var $1;
  1776. $1=self["@scope"];
  1777. return $1;
  1778. }, function($ctx1) {$ctx1.fill(self,"scope",{},smalltalk.SequenceNode)})},
  1779. args: [],
  1780. source: "scope\x0a\x09^ scope",
  1781. messageSends: [],
  1782. referencedClasses: []
  1783. }),
  1784. smalltalk.SequenceNode);
  1785. smalltalk.addMethod(
  1786. smalltalk.method({
  1787. selector: "scope:",
  1788. category: 'accessing',
  1789. fn: function (aLexicalScope){
  1790. var self=this;
  1791. return smalltalk.withContext(function($ctx1) {
  1792. self["@scope"]=aLexicalScope;
  1793. return self}, function($ctx1) {$ctx1.fill(self,"scope:",{aLexicalScope:aLexicalScope},smalltalk.SequenceNode)})},
  1794. args: ["aLexicalScope"],
  1795. source: "scope: aLexicalScope\x0a\x09scope := aLexicalScope",
  1796. messageSends: [],
  1797. referencedClasses: []
  1798. }),
  1799. smalltalk.SequenceNode);
  1800. smalltalk.addMethod(
  1801. smalltalk.method({
  1802. selector: "temps",
  1803. category: 'accessing',
  1804. fn: function (){
  1805. var self=this;
  1806. return smalltalk.withContext(function($ctx1) {
  1807. var $2,$1;
  1808. $2=self["@temps"];
  1809. if(($receiver = $2) == nil || $receiver == null){
  1810. $1=[];
  1811. } else {
  1812. $1=$2;
  1813. };
  1814. return $1;
  1815. }, function($ctx1) {$ctx1.fill(self,"temps",{},smalltalk.SequenceNode)})},
  1816. args: [],
  1817. source: "temps\x0a\x09^temps ifNil: [#()]",
  1818. messageSends: ["ifNil:"],
  1819. referencedClasses: []
  1820. }),
  1821. smalltalk.SequenceNode);
  1822. smalltalk.addMethod(
  1823. smalltalk.method({
  1824. selector: "temps:",
  1825. category: 'accessing',
  1826. fn: function (aCollection){
  1827. var self=this;
  1828. return smalltalk.withContext(function($ctx1) {
  1829. self["@temps"]=aCollection;
  1830. return self}, function($ctx1) {$ctx1.fill(self,"temps:",{aCollection:aCollection},smalltalk.SequenceNode)})},
  1831. args: ["aCollection"],
  1832. source: "temps: aCollection\x0a\x09temps := aCollection",
  1833. messageSends: [],
  1834. referencedClasses: []
  1835. }),
  1836. smalltalk.SequenceNode);
  1837. smalltalk.addClass('BlockSequenceNode', smalltalk.SequenceNode, [], 'Compiler-AST');
  1838. smalltalk.BlockSequenceNode.comment="I represent an special sequence node for block scopes.";
  1839. smalltalk.addMethod(
  1840. smalltalk.method({
  1841. selector: "accept:",
  1842. category: 'visiting',
  1843. fn: function (aVisitor){
  1844. var self=this;
  1845. return smalltalk.withContext(function($ctx1) {
  1846. var $1;
  1847. $1=_st(aVisitor)._visitBlockSequenceNode_(self);
  1848. return $1;
  1849. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},smalltalk.BlockSequenceNode)})},
  1850. args: ["aVisitor"],
  1851. source: "accept: aVisitor\x0a\x09^ aVisitor visitBlockSequenceNode: self",
  1852. messageSends: ["visitBlockSequenceNode:"],
  1853. referencedClasses: []
  1854. }),
  1855. smalltalk.BlockSequenceNode);
  1856. smalltalk.addMethod(
  1857. smalltalk.method({
  1858. selector: "isBlockSequenceNode",
  1859. category: 'testing',
  1860. fn: function (){
  1861. var self=this;
  1862. return smalltalk.withContext(function($ctx1) {
  1863. return true;
  1864. }, function($ctx1) {$ctx1.fill(self,"isBlockSequenceNode",{},smalltalk.BlockSequenceNode)})},
  1865. args: [],
  1866. source: "isBlockSequenceNode\x0a\x09^true",
  1867. messageSends: [],
  1868. referencedClasses: []
  1869. }),
  1870. smalltalk.BlockSequenceNode);
  1871. smalltalk.addClass('ValueNode', smalltalk.Node, ['value'], 'Compiler-AST');
  1872. smalltalk.ValueNode.comment="I represent a value node.";
  1873. smalltalk.addMethod(
  1874. smalltalk.method({
  1875. selector: "accept:",
  1876. category: 'visiting',
  1877. fn: function (aVisitor){
  1878. var self=this;
  1879. return smalltalk.withContext(function($ctx1) {
  1880. var $1;
  1881. $1=_st(aVisitor)._visitValueNode_(self);
  1882. return $1;
  1883. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},smalltalk.ValueNode)})},
  1884. args: ["aVisitor"],
  1885. source: "accept: aVisitor\x0a\x09^ aVisitor visitValueNode: self",
  1886. messageSends: ["visitValueNode:"],
  1887. referencedClasses: []
  1888. }),
  1889. smalltalk.ValueNode);
  1890. smalltalk.addMethod(
  1891. smalltalk.method({
  1892. selector: "isImmutable",
  1893. category: 'testing',
  1894. fn: function (){
  1895. var self=this;
  1896. return smalltalk.withContext(function($ctx1) {
  1897. var $1;
  1898. $1=_st(self._value())._isImmutable();
  1899. return $1;
  1900. }, function($ctx1) {$ctx1.fill(self,"isImmutable",{},smalltalk.ValueNode)})},
  1901. args: [],
  1902. source: "isImmutable\x0a\x09^ self value isImmutable",
  1903. messageSends: ["isImmutable", "value"],
  1904. referencedClasses: []
  1905. }),
  1906. smalltalk.ValueNode);
  1907. smalltalk.addMethod(
  1908. smalltalk.method({
  1909. selector: "isValueNode",
  1910. category: 'testing',
  1911. fn: function (){
  1912. var self=this;
  1913. return smalltalk.withContext(function($ctx1) {
  1914. return true;
  1915. }, function($ctx1) {$ctx1.fill(self,"isValueNode",{},smalltalk.ValueNode)})},
  1916. args: [],
  1917. source: "isValueNode\x0a\x09^true",
  1918. messageSends: [],
  1919. referencedClasses: []
  1920. }),
  1921. smalltalk.ValueNode);
  1922. smalltalk.addMethod(
  1923. smalltalk.method({
  1924. selector: "value",
  1925. category: 'accessing',
  1926. fn: function (){
  1927. var self=this;
  1928. return smalltalk.withContext(function($ctx1) {
  1929. var $1;
  1930. $1=self["@value"];
  1931. return $1;
  1932. }, function($ctx1) {$ctx1.fill(self,"value",{},smalltalk.ValueNode)})},
  1933. args: [],
  1934. source: "value\x0a\x09^value",
  1935. messageSends: [],
  1936. referencedClasses: []
  1937. }),
  1938. smalltalk.ValueNode);
  1939. smalltalk.addMethod(
  1940. smalltalk.method({
  1941. selector: "value:",
  1942. category: 'accessing',
  1943. fn: function (anObject){
  1944. var self=this;
  1945. return smalltalk.withContext(function($ctx1) {
  1946. self["@value"]=anObject;
  1947. return self}, function($ctx1) {$ctx1.fill(self,"value:",{anObject:anObject},smalltalk.ValueNode)})},
  1948. args: ["anObject"],
  1949. source: "value: anObject\x0a\x09value := anObject",
  1950. messageSends: [],
  1951. referencedClasses: []
  1952. }),
  1953. smalltalk.ValueNode);
  1954. smalltalk.addMethod(
  1955. smalltalk.method({
  1956. selector: "xxxDoIt",
  1957. category: 'xxxDoIt',
  1958. fn: function (){
  1959. var self=this;
  1960. return smalltalk.withContext(function($ctx1) {
  1961. var $1;
  1962. $1=_st((function(){
  1963. return smalltalk.withContext(function($ctx2) {
  1964. return self._stack();
  1965. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}))._value();
  1966. return $1;
  1967. }, function($ctx1) {$ctx1.fill(self,"xxxDoIt",{},smalltalk.ValueNode)})},
  1968. args: [],
  1969. source: "xxxDoIt ^[self stack] value",
  1970. messageSends: ["value", "stack"],
  1971. referencedClasses: []
  1972. }),
  1973. smalltalk.ValueNode);
  1974. smalltalk.addClass('VariableNode', smalltalk.ValueNode, ['assigned', 'binding'], 'Compiler-AST');
  1975. smalltalk.VariableNode.comment="I represent an variable node.";
  1976. smalltalk.addMethod(
  1977. smalltalk.method({
  1978. selector: "accept:",
  1979. category: 'visiting',
  1980. fn: function (aVisitor){
  1981. var self=this;
  1982. return smalltalk.withContext(function($ctx1) {
  1983. var $1;
  1984. $1=_st(aVisitor)._visitVariableNode_(self);
  1985. return $1;
  1986. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},smalltalk.VariableNode)})},
  1987. args: ["aVisitor"],
  1988. source: "accept: aVisitor\x0a\x09^ aVisitor visitVariableNode: self",
  1989. messageSends: ["visitVariableNode:"],
  1990. referencedClasses: []
  1991. }),
  1992. smalltalk.VariableNode);
  1993. smalltalk.addMethod(
  1994. smalltalk.method({
  1995. selector: "alias",
  1996. category: 'accessing',
  1997. fn: function (){
  1998. var self=this;
  1999. return smalltalk.withContext(function($ctx1) {
  2000. var $1;
  2001. $1=_st(self._binding())._alias();
  2002. return $1;
  2003. }, function($ctx1) {$ctx1.fill(self,"alias",{},smalltalk.VariableNode)})},
  2004. args: [],
  2005. source: "alias\x0a\x09^ self binding alias",
  2006. messageSends: ["alias", "binding"],
  2007. referencedClasses: []
  2008. }),
  2009. smalltalk.VariableNode);
  2010. smalltalk.addMethod(
  2011. smalltalk.method({
  2012. selector: "assigned",
  2013. category: 'accessing',
  2014. fn: function (){
  2015. var self=this;
  2016. return smalltalk.withContext(function($ctx1) {
  2017. var $2,$1;
  2018. $2=self["@assigned"];
  2019. if(($receiver = $2) == nil || $receiver == null){
  2020. $1=false;
  2021. } else {
  2022. $1=$2;
  2023. };
  2024. return $1;
  2025. }, function($ctx1) {$ctx1.fill(self,"assigned",{},smalltalk.VariableNode)})},
  2026. args: [],
  2027. source: "assigned\x0a\x09^assigned ifNil: [false]",
  2028. messageSends: ["ifNil:"],
  2029. referencedClasses: []
  2030. }),
  2031. smalltalk.VariableNode);
  2032. smalltalk.addMethod(
  2033. smalltalk.method({
  2034. selector: "assigned:",
  2035. category: 'accessing',
  2036. fn: function (aBoolean){
  2037. var self=this;
  2038. return smalltalk.withContext(function($ctx1) {
  2039. self["@assigned"]=aBoolean;
  2040. return self}, function($ctx1) {$ctx1.fill(self,"assigned:",{aBoolean:aBoolean},smalltalk.VariableNode)})},
  2041. args: ["aBoolean"],
  2042. source: "assigned: aBoolean\x0a\x09assigned := aBoolean",
  2043. messageSends: [],
  2044. referencedClasses: []
  2045. }),
  2046. smalltalk.VariableNode);
  2047. smalltalk.addMethod(
  2048. smalltalk.method({
  2049. selector: "beAssigned",
  2050. category: 'accessing',
  2051. fn: function (){
  2052. var self=this;
  2053. return smalltalk.withContext(function($ctx1) {
  2054. _st(self._binding())._validateAssignment();
  2055. self["@assigned"]=true;
  2056. return self}, function($ctx1) {$ctx1.fill(self,"beAssigned",{},smalltalk.VariableNode)})},
  2057. args: [],
  2058. source: "beAssigned\x0a\x09self binding validateAssignment.\x0a\x09assigned := true",
  2059. messageSends: ["validateAssignment", "binding"],
  2060. referencedClasses: []
  2061. }),
  2062. smalltalk.VariableNode);
  2063. smalltalk.addMethod(
  2064. smalltalk.method({
  2065. selector: "binding",
  2066. category: 'accessing',
  2067. fn: function (){
  2068. var self=this;
  2069. return smalltalk.withContext(function($ctx1) {
  2070. var $1;
  2071. $1=self["@binding"];
  2072. return $1;
  2073. }, function($ctx1) {$ctx1.fill(self,"binding",{},smalltalk.VariableNode)})},
  2074. args: [],
  2075. source: "binding\x0a\x09^ binding",
  2076. messageSends: [],
  2077. referencedClasses: []
  2078. }),
  2079. smalltalk.VariableNode);
  2080. smalltalk.addMethod(
  2081. smalltalk.method({
  2082. selector: "binding:",
  2083. category: 'accessing',
  2084. fn: function (aScopeVar){
  2085. var self=this;
  2086. return smalltalk.withContext(function($ctx1) {
  2087. self["@binding"]=aScopeVar;
  2088. return self}, function($ctx1) {$ctx1.fill(self,"binding:",{aScopeVar:aScopeVar},smalltalk.VariableNode)})},
  2089. args: ["aScopeVar"],
  2090. source: "binding: aScopeVar\x0a\x09binding := aScopeVar",
  2091. messageSends: [],
  2092. referencedClasses: []
  2093. }),
  2094. smalltalk.VariableNode);
  2095. smalltalk.addMethod(
  2096. smalltalk.method({
  2097. selector: "isImmutable",
  2098. category: 'testing',
  2099. fn: function (){
  2100. var self=this;
  2101. return smalltalk.withContext(function($ctx1) {
  2102. var $1;
  2103. $1=_st(self._binding())._isPseudoVar();
  2104. return $1;
  2105. }, function($ctx1) {$ctx1.fill(self,"isImmutable",{},smalltalk.VariableNode)})},
  2106. args: [],
  2107. source: "isImmutable\x0a\x09^ self binding isPseudoVar",
  2108. messageSends: ["isPseudoVar", "binding"],
  2109. referencedClasses: []
  2110. }),
  2111. smalltalk.VariableNode);
  2112. smalltalk.addMethod(
  2113. smalltalk.method({
  2114. selector: "isNode",
  2115. category: '*Compiler-AST',
  2116. fn: function (){
  2117. var self=this;
  2118. return smalltalk.withContext(function($ctx1) {
  2119. return false;
  2120. }, function($ctx1) {$ctx1.fill(self,"isNode",{},smalltalk.Object)})},
  2121. args: [],
  2122. source: "isNode\x0a\x09^ false",
  2123. messageSends: [],
  2124. referencedClasses: []
  2125. }),
  2126. smalltalk.Object);
  2127. smalltalk.addMethod(
  2128. smalltalk.method({
  2129. selector: "ast",
  2130. category: '*Compiler-AST',
  2131. fn: function (){
  2132. var self=this;
  2133. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  2134. return smalltalk.withContext(function($ctx1) {
  2135. var $1;
  2136. _st(self._source())._ifEmpty_((function(){
  2137. return smalltalk.withContext(function($ctx2) {
  2138. return self._error_("Method source is empty");
  2139. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  2140. $1=_st(_st($Smalltalk())._current())._parse_(self._source());
  2141. return $1;
  2142. }, function($ctx1) {$ctx1.fill(self,"ast",{},smalltalk.CompiledMethod)})},
  2143. args: [],
  2144. source: "ast\x0a\x09self source ifEmpty: [ self error: 'Method source is empty' ].\x0a\x09\x0a\x09^ Smalltalk current parse: self source",
  2145. messageSends: ["ifEmpty:", "source", "error:", "parse:", "current"],
  2146. referencedClasses: ["Smalltalk"]
  2147. }),
  2148. smalltalk.CompiledMethod);
  2149. });