Compiler-AST.deploy.js 45 KB

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