Compiler.js 63 KB

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