2
0

Compiler-AST.deploy.js 42 KB

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