2
0

Compiler-AST.deploy.js 42 KB

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