2
0

Compiler-Core.js 33 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024
  1. (function(smalltalk,nil,_st){
  2. smalltalk.addPackage('Compiler-Core');
  3. smalltalk.addClass('AbstractCodeGenerator', smalltalk.Object, ['currentClass', 'source'], 'Compiler-Core');
  4. smalltalk.AbstractCodeGenerator.comment="I am the abstract super class of all code generators and provide their common API.";
  5. smalltalk.addMethod(
  6. smalltalk.method({
  7. selector: "classNameFor:",
  8. category: 'accessing',
  9. fn: function (aClass){
  10. var self=this;
  11. return smalltalk.withContext(function($ctx1) {
  12. var $2,$3,$1;
  13. $2=_st(aClass)._isMetaclass();
  14. if(smalltalk.assert($2)){
  15. $1=_st(_st(_st(aClass)._instanceClass())._name()).__comma(".klass");
  16. } else {
  17. $3=_st(aClass)._isNil();
  18. if(smalltalk.assert($3)){
  19. $1="nil";
  20. } else {
  21. $1=_st(aClass)._name();
  22. };
  23. };
  24. return $1;
  25. }, function($ctx1) {$ctx1.fill(self,"classNameFor:",{aClass:aClass},smalltalk.AbstractCodeGenerator)})},
  26. args: ["aClass"],
  27. source: "classNameFor: aClass\x0a\x09^aClass isMetaclass\x0a\x09\x09ifTrue: [aClass instanceClass name, '.klass']\x0a\x09\x09ifFalse: [\x0a\x09\x09aClass isNil\x0a\x09\x09\x09ifTrue: ['nil']\x0a\x09\x09\x09ifFalse: [aClass name]]",
  28. messageSends: ["ifTrue:ifFalse:", ",", "name", "instanceClass", "isNil", "isMetaclass"],
  29. referencedClasses: []
  30. }),
  31. smalltalk.AbstractCodeGenerator);
  32. smalltalk.addMethod(
  33. smalltalk.method({
  34. selector: "compileNode:",
  35. category: 'compiling',
  36. fn: function (aNode){
  37. var self=this;
  38. return smalltalk.withContext(function($ctx1) {
  39. self._subclassResponsibility();
  40. return self}, function($ctx1) {$ctx1.fill(self,"compileNode:",{aNode:aNode},smalltalk.AbstractCodeGenerator)})},
  41. args: ["aNode"],
  42. source: "compileNode: aNode\x0a\x09self subclassResponsibility",
  43. messageSends: ["subclassResponsibility"],
  44. referencedClasses: []
  45. }),
  46. smalltalk.AbstractCodeGenerator);
  47. smalltalk.addMethod(
  48. smalltalk.method({
  49. selector: "currentClass",
  50. category: 'accessing',
  51. fn: function (){
  52. var self=this;
  53. return smalltalk.withContext(function($ctx1) {
  54. var $1;
  55. $1=self["@currentClass"];
  56. return $1;
  57. }, function($ctx1) {$ctx1.fill(self,"currentClass",{},smalltalk.AbstractCodeGenerator)})},
  58. args: [],
  59. source: "currentClass\x0a\x09^currentClass",
  60. messageSends: [],
  61. referencedClasses: []
  62. }),
  63. smalltalk.AbstractCodeGenerator);
  64. smalltalk.addMethod(
  65. smalltalk.method({
  66. selector: "currentClass:",
  67. category: 'accessing',
  68. fn: function (aClass){
  69. var self=this;
  70. return smalltalk.withContext(function($ctx1) {
  71. self["@currentClass"]=aClass;
  72. return self}, function($ctx1) {$ctx1.fill(self,"currentClass:",{aClass:aClass},smalltalk.AbstractCodeGenerator)})},
  73. args: ["aClass"],
  74. source: "currentClass: aClass\x0a\x09currentClass := aClass",
  75. messageSends: [],
  76. referencedClasses: []
  77. }),
  78. smalltalk.AbstractCodeGenerator);
  79. smalltalk.addMethod(
  80. smalltalk.method({
  81. selector: "pseudoVariables",
  82. category: 'accessing',
  83. fn: function (){
  84. var self=this;
  85. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  86. return smalltalk.withContext(function($ctx1) {
  87. var $1;
  88. $1=_st(_st($Smalltalk())._current())._pseudoVariableNames();
  89. return $1;
  90. }, function($ctx1) {$ctx1.fill(self,"pseudoVariables",{},smalltalk.AbstractCodeGenerator)})},
  91. args: [],
  92. source: "pseudoVariables\x0a\x09^ Smalltalk current pseudoVariableNames",
  93. messageSends: ["pseudoVariableNames", "current"],
  94. referencedClasses: ["Smalltalk"]
  95. }),
  96. smalltalk.AbstractCodeGenerator);
  97. smalltalk.addMethod(
  98. smalltalk.method({
  99. selector: "safeVariableNameFor:",
  100. category: 'accessing',
  101. fn: function (aString){
  102. var self=this;
  103. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  104. return smalltalk.withContext(function($ctx1) {
  105. var $2,$1;
  106. $2=_st(_st(_st($Smalltalk())._current())._reservedWords())._includes_(aString);
  107. if(smalltalk.assert($2)){
  108. $1=_st(aString).__comma("_");
  109. } else {
  110. $1=aString;
  111. };
  112. return $1;
  113. }, function($ctx1) {$ctx1.fill(self,"safeVariableNameFor:",{aString:aString},smalltalk.AbstractCodeGenerator)})},
  114. args: ["aString"],
  115. source: "safeVariableNameFor: aString\x0a\x09^(Smalltalk current reservedWords includes: aString)\x0a\x09\x09ifTrue: [aString, '_']\x0a\x09\x09ifFalse: [aString]",
  116. messageSends: ["ifTrue:ifFalse:", ",", "includes:", "reservedWords", "current"],
  117. referencedClasses: ["Smalltalk"]
  118. }),
  119. smalltalk.AbstractCodeGenerator);
  120. smalltalk.addMethod(
  121. smalltalk.method({
  122. selector: "source",
  123. category: 'accessing',
  124. fn: function (){
  125. var self=this;
  126. return smalltalk.withContext(function($ctx1) {
  127. var $2,$1;
  128. $2=self["@source"];
  129. if(($receiver = $2) == nil || $receiver == undefined){
  130. $1="";
  131. } else {
  132. $1=$2;
  133. };
  134. return $1;
  135. }, function($ctx1) {$ctx1.fill(self,"source",{},smalltalk.AbstractCodeGenerator)})},
  136. args: [],
  137. source: "source\x0a\x09^source ifNil: ['']",
  138. messageSends: ["ifNil:"],
  139. referencedClasses: []
  140. }),
  141. smalltalk.AbstractCodeGenerator);
  142. smalltalk.addMethod(
  143. smalltalk.method({
  144. selector: "source:",
  145. category: 'accessing',
  146. fn: function (aString){
  147. var self=this;
  148. return smalltalk.withContext(function($ctx1) {
  149. self["@source"]=aString;
  150. return self}, function($ctx1) {$ctx1.fill(self,"source:",{aString:aString},smalltalk.AbstractCodeGenerator)})},
  151. args: ["aString"],
  152. source: "source: aString\x0a\x09source := aString",
  153. messageSends: [],
  154. referencedClasses: []
  155. }),
  156. smalltalk.AbstractCodeGenerator);
  157. smalltalk.addClass('CodeGenerator', smalltalk.AbstractCodeGenerator, [], 'Compiler-Core');
  158. smalltalk.CodeGenerator.comment="I am a basic code generator. I generate a valid JavaScript output, but no not perform any inlining.\x0aSee `InliningCodeGenerator` for an optimized JavaScript code generation.";
  159. smalltalk.addMethod(
  160. smalltalk.method({
  161. selector: "compileNode:",
  162. category: 'compiling',
  163. fn: function (aNode){
  164. var self=this;
  165. var ir,stream;
  166. return smalltalk.withContext(function($ctx1) {
  167. var $2,$3,$1;
  168. _st(self._semanticAnalyzer())._visit_(aNode);
  169. ir=_st(self._translator())._visit_(aNode);
  170. $2=self._irTranslator();
  171. _st($2)._currentClass_(self._currentClass());
  172. _st($2)._visit_(ir);
  173. $3=_st($2)._contents();
  174. $1=$3;
  175. return $1;
  176. }, function($ctx1) {$ctx1.fill(self,"compileNode:",{aNode:aNode,ir:ir,stream:stream},smalltalk.CodeGenerator)})},
  177. args: ["aNode"],
  178. source: "compileNode: aNode\x0a\x09| ir stream |\x0a\x09self semanticAnalyzer visit: aNode.\x0a\x09ir := self translator visit: aNode.\x0a\x09^ self irTranslator\x0a\x09\x09currentClass: self currentClass;\x0a\x09\x09visit: ir;\x0a\x09\x09contents",
  179. messageSends: ["visit:", "semanticAnalyzer", "translator", "currentClass:", "currentClass", "irTranslator", "contents"],
  180. referencedClasses: []
  181. }),
  182. smalltalk.CodeGenerator);
  183. smalltalk.addMethod(
  184. smalltalk.method({
  185. selector: "irTranslator",
  186. category: 'compiling',
  187. fn: function (){
  188. var self=this;
  189. function $IRJSTranslator(){return smalltalk.IRJSTranslator||(typeof IRJSTranslator=="undefined"?nil:IRJSTranslator)}
  190. return smalltalk.withContext(function($ctx1) {
  191. var $1;
  192. $1=_st($IRJSTranslator())._new();
  193. return $1;
  194. }, function($ctx1) {$ctx1.fill(self,"irTranslator",{},smalltalk.CodeGenerator)})},
  195. args: [],
  196. source: "irTranslator\x0a\x09^ IRJSTranslator new",
  197. messageSends: ["new"],
  198. referencedClasses: ["IRJSTranslator"]
  199. }),
  200. smalltalk.CodeGenerator);
  201. smalltalk.addMethod(
  202. smalltalk.method({
  203. selector: "semanticAnalyzer",
  204. category: 'compiling',
  205. fn: function (){
  206. var self=this;
  207. function $SemanticAnalyzer(){return smalltalk.SemanticAnalyzer||(typeof SemanticAnalyzer=="undefined"?nil:SemanticAnalyzer)}
  208. return smalltalk.withContext(function($ctx1) {
  209. var $1;
  210. $1=_st($SemanticAnalyzer())._on_(self._currentClass());
  211. return $1;
  212. }, function($ctx1) {$ctx1.fill(self,"semanticAnalyzer",{},smalltalk.CodeGenerator)})},
  213. args: [],
  214. source: "semanticAnalyzer\x0a\x09^ SemanticAnalyzer on: self currentClass",
  215. messageSends: ["on:", "currentClass"],
  216. referencedClasses: ["SemanticAnalyzer"]
  217. }),
  218. smalltalk.CodeGenerator);
  219. smalltalk.addMethod(
  220. smalltalk.method({
  221. selector: "translator",
  222. category: 'compiling',
  223. fn: function (){
  224. var self=this;
  225. function $IRASTTranslator(){return smalltalk.IRASTTranslator||(typeof IRASTTranslator=="undefined"?nil:IRASTTranslator)}
  226. return smalltalk.withContext(function($ctx1) {
  227. var $2,$3,$1;
  228. $2=_st($IRASTTranslator())._new();
  229. _st($2)._source_(self._source());
  230. _st($2)._theClass_(self._currentClass());
  231. $3=_st($2)._yourself();
  232. $1=$3;
  233. return $1;
  234. }, function($ctx1) {$ctx1.fill(self,"translator",{},smalltalk.CodeGenerator)})},
  235. args: [],
  236. source: "translator\x0a\x09^ IRASTTranslator new\x0a\x09\x09source: self source;\x0a\x09\x09theClass: self currentClass;\x0a\x09\x09yourself",
  237. messageSends: ["source:", "source", "new", "theClass:", "currentClass", "yourself"],
  238. referencedClasses: ["IRASTTranslator"]
  239. }),
  240. smalltalk.CodeGenerator);
  241. smalltalk.addClass('Compiler', smalltalk.Object, ['currentClass', 'source', 'unknownVariables', 'codeGeneratorClass'], 'Compiler-Core');
  242. smalltalk.Compiler.comment="I provide the public interface for compiling Amber source code into JavaScript.\x0a\x0aThe code generator used to produce JavaScript can be plugged with `#codeGeneratorClass`.\x0aThe default code generator is an instance of `InlinedCodeGenerator`";
  243. smalltalk.addMethod(
  244. smalltalk.method({
  245. selector: "codeGeneratorClass",
  246. category: 'accessing',
  247. fn: function (){
  248. var self=this;
  249. function $InliningCodeGenerator(){return smalltalk.InliningCodeGenerator||(typeof InliningCodeGenerator=="undefined"?nil:InliningCodeGenerator)}
  250. return smalltalk.withContext(function($ctx1) {
  251. var $2,$1;
  252. $2=self["@codeGeneratorClass"];
  253. if(($receiver = $2) == nil || $receiver == undefined){
  254. $1=$InliningCodeGenerator();
  255. } else {
  256. $1=$2;
  257. };
  258. return $1;
  259. }, function($ctx1) {$ctx1.fill(self,"codeGeneratorClass",{},smalltalk.Compiler)})},
  260. args: [],
  261. source: "codeGeneratorClass\x0a\x09^codeGeneratorClass ifNil: [InliningCodeGenerator]",
  262. messageSends: ["ifNil:"],
  263. referencedClasses: ["InliningCodeGenerator"]
  264. }),
  265. smalltalk.Compiler);
  266. smalltalk.addMethod(
  267. smalltalk.method({
  268. selector: "codeGeneratorClass:",
  269. category: 'accessing',
  270. fn: function (aClass){
  271. var self=this;
  272. return smalltalk.withContext(function($ctx1) {
  273. self["@codeGeneratorClass"]=aClass;
  274. return self}, function($ctx1) {$ctx1.fill(self,"codeGeneratorClass:",{aClass:aClass},smalltalk.Compiler)})},
  275. args: ["aClass"],
  276. source: "codeGeneratorClass: aClass\x0a\x09codeGeneratorClass := aClass",
  277. messageSends: [],
  278. referencedClasses: []
  279. }),
  280. smalltalk.Compiler);
  281. smalltalk.addMethod(
  282. smalltalk.method({
  283. selector: "compile:",
  284. category: 'compiling',
  285. fn: function (aString){
  286. var self=this;
  287. return smalltalk.withContext(function($ctx1) {
  288. var $1;
  289. $1=self._compileNode_(self._parse_(aString));
  290. return $1;
  291. }, function($ctx1) {$ctx1.fill(self,"compile:",{aString:aString},smalltalk.Compiler)})},
  292. args: ["aString"],
  293. source: "compile: aString\x0a\x09^self compileNode: (self parse: aString)",
  294. messageSends: ["compileNode:", "parse:"],
  295. referencedClasses: []
  296. }),
  297. smalltalk.Compiler);
  298. smalltalk.addMethod(
  299. smalltalk.method({
  300. selector: "compile:forClass:",
  301. category: 'compiling',
  302. fn: function (aString,aClass){
  303. var self=this;
  304. return smalltalk.withContext(function($ctx1) {
  305. var $1;
  306. self._currentClass_(aClass);
  307. self._source_(aString);
  308. $1=self._compile_(aString);
  309. return $1;
  310. }, function($ctx1) {$ctx1.fill(self,"compile:forClass:",{aString:aString,aClass:aClass},smalltalk.Compiler)})},
  311. args: ["aString", "aClass"],
  312. source: "compile: aString forClass: aClass\x0a\x09self currentClass: aClass.\x0a\x09self source: aString.\x0a\x09^self compile: aString",
  313. messageSends: ["currentClass:", "source:", "compile:"],
  314. referencedClasses: []
  315. }),
  316. smalltalk.Compiler);
  317. smalltalk.addMethod(
  318. smalltalk.method({
  319. selector: "compileExpression:",
  320. category: 'compiling',
  321. fn: function (aString){
  322. var self=this;
  323. function $DoIt(){return smalltalk.DoIt||(typeof DoIt=="undefined"?nil:DoIt)}
  324. return smalltalk.withContext(function($ctx1) {
  325. var $1;
  326. self._currentClass_($DoIt());
  327. self._source_(_st("doIt ^[".__comma(aString)).__comma("] value"));
  328. $1=self._compileNode_(self._parse_(self._source()));
  329. return $1;
  330. }, function($ctx1) {$ctx1.fill(self,"compileExpression:",{aString:aString},smalltalk.Compiler)})},
  331. args: ["aString"],
  332. source: "compileExpression: aString\x0a\x09self currentClass: DoIt.\x0a\x09self source: 'doIt ^[', aString, '] value'.\x0a\x09^self compileNode: (self parse: self source)",
  333. messageSends: ["currentClass:", "source:", ",", "compileNode:", "parse:", "source"],
  334. referencedClasses: ["DoIt"]
  335. }),
  336. smalltalk.Compiler);
  337. smalltalk.addMethod(
  338. smalltalk.method({
  339. selector: "compileExpression:on:",
  340. category: 'compiling',
  341. fn: function (aString,anObject){
  342. var self=this;
  343. return smalltalk.withContext(function($ctx1) {
  344. var $1;
  345. self._currentClass_(_st(anObject)._class());
  346. self._source_(_st("xxxDoIt ^[".__comma(aString)).__comma("] value"));
  347. $1=self._compileNode_(self._parse_(self._source()));
  348. return $1;
  349. }, function($ctx1) {$ctx1.fill(self,"compileExpression:on:",{aString:aString,anObject:anObject},smalltalk.Compiler)})},
  350. args: ["aString", "anObject"],
  351. source: "compileExpression: aString on: anObject\x0a\x09self currentClass: anObject class.\x0a\x09self source: 'xxxDoIt ^[', aString, '] value'.\x0a\x09^self compileNode: (self parse: self source)",
  352. messageSends: ["currentClass:", "class", "source:", ",", "compileNode:", "parse:", "source"],
  353. referencedClasses: []
  354. }),
  355. smalltalk.Compiler);
  356. smalltalk.addMethod(
  357. smalltalk.method({
  358. selector: "compileNode:",
  359. category: 'compiling',
  360. fn: function (aNode){
  361. var self=this;
  362. var generator,result;
  363. return smalltalk.withContext(function($ctx1) {
  364. var $1,$2,$3;
  365. generator=_st(self._codeGeneratorClass())._new();
  366. $1=generator;
  367. _st($1)._source_(self._source());
  368. $2=_st($1)._currentClass_(self._currentClass());
  369. result=_st(generator)._compileNode_(aNode);
  370. self._unknownVariables_([]);
  371. $3=result;
  372. return $3;
  373. }, function($ctx1) {$ctx1.fill(self,"compileNode:",{aNode:aNode,generator:generator,result:result},smalltalk.Compiler)})},
  374. args: ["aNode"],
  375. source: "compileNode: aNode\x0a\x09| generator result |\x0a\x09generator := self codeGeneratorClass new.\x0a\x09generator\x0a\x09\x09source: self source;\x0a\x09\x09currentClass: self currentClass.\x0a\x09result := generator compileNode: aNode.\x0a\x09self unknownVariables: #().\x0a\x09^result",
  376. messageSends: ["new", "codeGeneratorClass", "source:", "source", "currentClass:", "currentClass", "compileNode:", "unknownVariables:"],
  377. referencedClasses: []
  378. }),
  379. smalltalk.Compiler);
  380. smalltalk.addMethod(
  381. smalltalk.method({
  382. selector: "currentClass",
  383. category: 'accessing',
  384. fn: function (){
  385. var self=this;
  386. return smalltalk.withContext(function($ctx1) {
  387. var $1;
  388. $1=self["@currentClass"];
  389. return $1;
  390. }, function($ctx1) {$ctx1.fill(self,"currentClass",{},smalltalk.Compiler)})},
  391. args: [],
  392. source: "currentClass\x0a\x09^currentClass",
  393. messageSends: [],
  394. referencedClasses: []
  395. }),
  396. smalltalk.Compiler);
  397. smalltalk.addMethod(
  398. smalltalk.method({
  399. selector: "currentClass:",
  400. category: 'accessing',
  401. fn: function (aClass){
  402. var self=this;
  403. return smalltalk.withContext(function($ctx1) {
  404. self["@currentClass"]=aClass;
  405. return self}, function($ctx1) {$ctx1.fill(self,"currentClass:",{aClass:aClass},smalltalk.Compiler)})},
  406. args: ["aClass"],
  407. source: "currentClass: aClass\x0a\x09currentClass := aClass",
  408. messageSends: [],
  409. referencedClasses: []
  410. }),
  411. smalltalk.Compiler);
  412. smalltalk.addMethod(
  413. smalltalk.method({
  414. selector: "eval:",
  415. category: 'compiling',
  416. fn: function (aString){
  417. var self=this;
  418. return smalltalk.withContext(function($ctx1) {
  419. return eval(aString);
  420. return self}, function($ctx1) {$ctx1.fill(self,"eval:",{aString:aString},smalltalk.Compiler)})},
  421. args: ["aString"],
  422. source: "eval: aString\x0a\x09<return eval(aString)>",
  423. messageSends: [],
  424. referencedClasses: []
  425. }),
  426. smalltalk.Compiler);
  427. smalltalk.addMethod(
  428. smalltalk.method({
  429. selector: "evaluateExpression:",
  430. category: 'compiling',
  431. fn: function (aString){
  432. var self=this;
  433. function $DoIt(){return smalltalk.DoIt||(typeof DoIt=="undefined"?nil:DoIt)}
  434. return smalltalk.withContext(function($ctx1) {
  435. var $1;
  436. $1=self._evaluateExpression_on_(aString,_st($DoIt())._new());
  437. return $1;
  438. }, function($ctx1) {$ctx1.fill(self,"evaluateExpression:",{aString:aString},smalltalk.Compiler)})},
  439. args: ["aString"],
  440. source: "evaluateExpression: aString\x0a\x09\x22Unlike #eval: evaluate a Smalltalk expression and answer the returned object\x22\x0a\x09^ self evaluateExpression: aString on: DoIt new",
  441. messageSends: ["evaluateExpression:on:", "new"],
  442. referencedClasses: ["DoIt"]
  443. }),
  444. smalltalk.Compiler);
  445. smalltalk.addMethod(
  446. smalltalk.method({
  447. selector: "evaluateExpression:on:",
  448. category: 'compiling',
  449. fn: function (aString,anObject){
  450. var self=this;
  451. var result,method;
  452. return smalltalk.withContext(function($ctx1) {
  453. var $1;
  454. method=self._eval_(self._compileExpression_on_(aString,anObject));
  455. _st(method)._category_("xxxDoIt");
  456. _st(_st(anObject)._class())._addCompiledMethod_(method);
  457. result=_st(anObject)._xxxDoIt();
  458. _st(_st(anObject)._class())._removeCompiledMethod_(method);
  459. $1=result;
  460. return $1;
  461. }, function($ctx1) {$ctx1.fill(self,"evaluateExpression:on:",{aString:aString,anObject:anObject,result:result,method:method},smalltalk.Compiler)})},
  462. args: ["aString", "anObject"],
  463. source: "evaluateExpression: aString on: anObject\x0a\x09\x22Unlike #eval: evaluate a Smalltalk expression with anObject as the receiver and answer the returned object\x22\x0a\x09| result method |\x0a\x09method := self eval: (self compileExpression: aString on: anObject).\x0a\x09method category: 'xxxDoIt'.\x0a\x09anObject class addCompiledMethod: method.\x0a\x09result := anObject xxxDoIt.\x0a\x09anObject class removeCompiledMethod: method.\x0a\x09^result",
  464. messageSends: ["eval:", "compileExpression:on:", "category:", "addCompiledMethod:", "class", "xxxDoIt", "removeCompiledMethod:"],
  465. referencedClasses: []
  466. }),
  467. smalltalk.Compiler);
  468. smalltalk.addMethod(
  469. smalltalk.method({
  470. selector: "install:forClass:category:",
  471. category: 'compiling',
  472. fn: function (aString,aBehavior,anotherString){
  473. var self=this;
  474. function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
  475. return smalltalk.withContext(function($ctx1) {
  476. var $1;
  477. $1=_st(_st($ClassBuilder())._new())._installMethod_forClass_category_(self._eval_(self._compile_forClass_(aString,aBehavior)),aBehavior,anotherString);
  478. return $1;
  479. }, function($ctx1) {$ctx1.fill(self,"install:forClass:category:",{aString:aString,aBehavior:aBehavior,anotherString:anotherString},smalltalk.Compiler)})},
  480. args: ["aString", "aBehavior", "anotherString"],
  481. source: "install: aString forClass: aBehavior category: anotherString\x0a\x09^ ClassBuilder new\x0a\x09\x09installMethod: (self eval: (self compile: aString forClass: aBehavior))\x0a\x09\x09forClass: aBehavior\x0a\x09\x09category: anotherString",
  482. messageSends: ["installMethod:forClass:category:", "eval:", "compile:forClass:", "new"],
  483. referencedClasses: ["ClassBuilder"]
  484. }),
  485. smalltalk.Compiler);
  486. smalltalk.addMethod(
  487. smalltalk.method({
  488. selector: "parse:",
  489. category: 'compiling',
  490. fn: function (aString){
  491. var self=this;
  492. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  493. return smalltalk.withContext(function($ctx1) {
  494. var $1;
  495. $1=_st(_st($Smalltalk())._current())._parse_(aString);
  496. return $1;
  497. }, function($ctx1) {$ctx1.fill(self,"parse:",{aString:aString},smalltalk.Compiler)})},
  498. args: ["aString"],
  499. source: "parse: aString\x0a\x09^Smalltalk current parse: aString",
  500. messageSends: ["parse:", "current"],
  501. referencedClasses: ["Smalltalk"]
  502. }),
  503. smalltalk.Compiler);
  504. smalltalk.addMethod(
  505. smalltalk.method({
  506. selector: "parseExpression:",
  507. category: 'compiling',
  508. fn: function (aString){
  509. var self=this;
  510. return smalltalk.withContext(function($ctx1) {
  511. var $1;
  512. $1=self._parse_(_st("doIt ^[".__comma(aString)).__comma("] value"));
  513. return $1;
  514. }, function($ctx1) {$ctx1.fill(self,"parseExpression:",{aString:aString},smalltalk.Compiler)})},
  515. args: ["aString"],
  516. source: "parseExpression: aString\x0a\x09^self parse: 'doIt ^[', aString, '] value'",
  517. messageSends: ["parse:", ","],
  518. referencedClasses: []
  519. }),
  520. smalltalk.Compiler);
  521. smalltalk.addMethod(
  522. smalltalk.method({
  523. selector: "recompile:",
  524. category: 'compiling',
  525. fn: function (aClass){
  526. var self=this;
  527. return smalltalk.withContext(function($ctx1) {
  528. var $1;
  529. _st(_st(_st(aClass)._methodDictionary())._values())._do_displayingProgress_((function(each){
  530. return smalltalk.withContext(function($ctx2) {
  531. return self._install_forClass_category_(_st(each)._source(),aClass,_st(each)._category());
  532. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),"Recompiling ".__comma(_st(aClass)._name()));
  533. $1=_st(aClass)._isMetaclass();
  534. if(! smalltalk.assert($1)){
  535. self._recompile_(_st(aClass)._class());
  536. };
  537. return self}, function($ctx1) {$ctx1.fill(self,"recompile:",{aClass:aClass},smalltalk.Compiler)})},
  538. args: ["aClass"],
  539. source: "recompile: aClass\x0a\x09aClass methodDictionary values\x0a\x09\x09do: [ :each | self install: each source forClass: aClass category: each category ]\x0a\x09\x09displayingProgress: 'Recompiling ', aClass name.\x0a\x09\x22self setupClass: aClass.\x22\x0a\x09aClass isMetaclass ifFalse: [ self recompile: aClass class ]",
  540. messageSends: ["do:displayingProgress:", "install:forClass:category:", "source", "category", ",", "name", "values", "methodDictionary", "ifFalse:", "recompile:", "class", "isMetaclass"],
  541. referencedClasses: []
  542. }),
  543. smalltalk.Compiler);
  544. smalltalk.addMethod(
  545. smalltalk.method({
  546. selector: "recompileAll",
  547. category: 'compiling',
  548. fn: function (){
  549. var self=this;
  550. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  551. return smalltalk.withContext(function($ctx1) {
  552. _st(_st(_st($Smalltalk())._current())._classes())._do_displayingProgress_((function(each){
  553. return smalltalk.withContext(function($ctx2) {
  554. return self._recompile_(each);
  555. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),"Compiling all classes...");
  556. return self}, function($ctx1) {$ctx1.fill(self,"recompileAll",{},smalltalk.Compiler)})},
  557. args: [],
  558. source: "recompileAll\x0a\x09Smalltalk current classes \x0a\x09\x09do: [:each | self recompile: each ]\x0a\x09\x09displayingProgress: 'Compiling all classes...'",
  559. messageSends: ["do:displayingProgress:", "recompile:", "classes", "current"],
  560. referencedClasses: ["Smalltalk"]
  561. }),
  562. smalltalk.Compiler);
  563. smalltalk.addMethod(
  564. smalltalk.method({
  565. selector: "source",
  566. category: 'accessing',
  567. fn: function (){
  568. var self=this;
  569. return smalltalk.withContext(function($ctx1) {
  570. var $2,$1;
  571. $2=self["@source"];
  572. if(($receiver = $2) == nil || $receiver == undefined){
  573. $1="";
  574. } else {
  575. $1=$2;
  576. };
  577. return $1;
  578. }, function($ctx1) {$ctx1.fill(self,"source",{},smalltalk.Compiler)})},
  579. args: [],
  580. source: "source\x0a\x09^source ifNil: ['']",
  581. messageSends: ["ifNil:"],
  582. referencedClasses: []
  583. }),
  584. smalltalk.Compiler);
  585. smalltalk.addMethod(
  586. smalltalk.method({
  587. selector: "source:",
  588. category: 'accessing',
  589. fn: function (aString){
  590. var self=this;
  591. return smalltalk.withContext(function($ctx1) {
  592. self["@source"]=aString;
  593. return self}, function($ctx1) {$ctx1.fill(self,"source:",{aString:aString},smalltalk.Compiler)})},
  594. args: ["aString"],
  595. source: "source: aString\x0a\x09source := aString",
  596. messageSends: [],
  597. referencedClasses: []
  598. }),
  599. smalltalk.Compiler);
  600. smalltalk.addMethod(
  601. smalltalk.method({
  602. selector: "unknownVariables",
  603. category: 'accessing',
  604. fn: function (){
  605. var self=this;
  606. return smalltalk.withContext(function($ctx1) {
  607. var $1;
  608. $1=self["@unknownVariables"];
  609. return $1;
  610. }, function($ctx1) {$ctx1.fill(self,"unknownVariables",{},smalltalk.Compiler)})},
  611. args: [],
  612. source: "unknownVariables\x0a\x09^unknownVariables",
  613. messageSends: [],
  614. referencedClasses: []
  615. }),
  616. smalltalk.Compiler);
  617. smalltalk.addMethod(
  618. smalltalk.method({
  619. selector: "unknownVariables:",
  620. category: 'accessing',
  621. fn: function (aCollection){
  622. var self=this;
  623. return smalltalk.withContext(function($ctx1) {
  624. self["@unknownVariables"]=aCollection;
  625. return self}, function($ctx1) {$ctx1.fill(self,"unknownVariables:",{aCollection:aCollection},smalltalk.Compiler)})},
  626. args: ["aCollection"],
  627. source: "unknownVariables: aCollection\x0a\x09unknownVariables := aCollection",
  628. messageSends: [],
  629. referencedClasses: []
  630. }),
  631. smalltalk.Compiler);
  632. smalltalk.addMethod(
  633. smalltalk.method({
  634. selector: "recompile:",
  635. category: 'compiling',
  636. fn: function (aClass){
  637. var self=this;
  638. return smalltalk.withContext(function($ctx1) {
  639. _st(self._new())._recompile_(aClass);
  640. return self}, function($ctx1) {$ctx1.fill(self,"recompile:",{aClass:aClass},smalltalk.Compiler.klass)})},
  641. args: ["aClass"],
  642. source: "recompile: aClass\x0a\x09self new recompile: aClass",
  643. messageSends: ["recompile:", "new"],
  644. referencedClasses: []
  645. }),
  646. smalltalk.Compiler.klass);
  647. smalltalk.addMethod(
  648. smalltalk.method({
  649. selector: "recompileAll",
  650. category: 'compiling',
  651. fn: function (){
  652. var self=this;
  653. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  654. return smalltalk.withContext(function($ctx1) {
  655. _st(_st(_st($Smalltalk())._current())._classes())._do_((function(each){
  656. return smalltalk.withContext(function($ctx2) {
  657. return self._recompile_(each);
  658. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  659. return self}, function($ctx1) {$ctx1.fill(self,"recompileAll",{},smalltalk.Compiler.klass)})},
  660. args: [],
  661. source: "recompileAll\x0a\x09Smalltalk current classes do: [:each |\x0a\x09\x09self recompile: each]",
  662. messageSends: ["do:", "recompile:", "classes", "current"],
  663. referencedClasses: ["Smalltalk"]
  664. }),
  665. smalltalk.Compiler.klass);
  666. smalltalk.addClass('DoIt', smalltalk.Object, [], 'Compiler-Core');
  667. smalltalk.DoIt.comment="`DoIt` is the class used to compile and evaluate expressions. See `Compiler >> evaluateExpression:`.";
  668. smalltalk.addClass('NodeVisitor', smalltalk.Object, [], 'Compiler-Core');
  669. smalltalk.NodeVisitor.comment="I am the abstract super class of all AST node visitors.";
  670. smalltalk.addMethod(
  671. smalltalk.method({
  672. selector: "visit:",
  673. category: 'visiting',
  674. fn: function (aNode){
  675. var self=this;
  676. return smalltalk.withContext(function($ctx1) {
  677. var $1;
  678. $1=_st(aNode)._accept_(self);
  679. return $1;
  680. }, function($ctx1) {$ctx1.fill(self,"visit:",{aNode:aNode},smalltalk.NodeVisitor)})},
  681. args: ["aNode"],
  682. source: "visit: aNode\x0a\x09^ aNode accept: self",
  683. messageSends: ["accept:"],
  684. referencedClasses: []
  685. }),
  686. smalltalk.NodeVisitor);
  687. smalltalk.addMethod(
  688. smalltalk.method({
  689. selector: "visitAll:",
  690. category: 'visiting',
  691. fn: function (aCollection){
  692. var self=this;
  693. return smalltalk.withContext(function($ctx1) {
  694. var $1;
  695. $1=_st(aCollection)._collect_((function(each){
  696. return smalltalk.withContext(function($ctx2) {
  697. return self._visit_(each);
  698. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  699. return $1;
  700. }, function($ctx1) {$ctx1.fill(self,"visitAll:",{aCollection:aCollection},smalltalk.NodeVisitor)})},
  701. args: ["aCollection"],
  702. source: "visitAll: aCollection\x0a\x09^ aCollection collect: [ :each | self visit: each ]",
  703. messageSends: ["collect:", "visit:"],
  704. referencedClasses: []
  705. }),
  706. smalltalk.NodeVisitor);
  707. smalltalk.addMethod(
  708. smalltalk.method({
  709. selector: "visitAssignmentNode:",
  710. category: 'visiting',
  711. fn: function (aNode){
  712. var self=this;
  713. return smalltalk.withContext(function($ctx1) {
  714. var $1;
  715. $1=self._visitNode_(aNode);
  716. return $1;
  717. }, function($ctx1) {$ctx1.fill(self,"visitAssignmentNode:",{aNode:aNode},smalltalk.NodeVisitor)})},
  718. args: ["aNode"],
  719. source: "visitAssignmentNode: aNode\x0a\x09^ self visitNode: aNode",
  720. messageSends: ["visitNode:"],
  721. referencedClasses: []
  722. }),
  723. smalltalk.NodeVisitor);
  724. smalltalk.addMethod(
  725. smalltalk.method({
  726. selector: "visitBlockNode:",
  727. category: 'visiting',
  728. fn: function (aNode){
  729. var self=this;
  730. return smalltalk.withContext(function($ctx1) {
  731. var $1;
  732. $1=self._visitNode_(aNode);
  733. return $1;
  734. }, function($ctx1) {$ctx1.fill(self,"visitBlockNode:",{aNode:aNode},smalltalk.NodeVisitor)})},
  735. args: ["aNode"],
  736. source: "visitBlockNode: aNode\x0a\x09^ self visitNode: aNode",
  737. messageSends: ["visitNode:"],
  738. referencedClasses: []
  739. }),
  740. smalltalk.NodeVisitor);
  741. smalltalk.addMethod(
  742. smalltalk.method({
  743. selector: "visitBlockSequenceNode:",
  744. category: 'visiting',
  745. fn: function (aNode){
  746. var self=this;
  747. return smalltalk.withContext(function($ctx1) {
  748. var $1;
  749. $1=self._visitSequenceNode_(aNode);
  750. return $1;
  751. }, function($ctx1) {$ctx1.fill(self,"visitBlockSequenceNode:",{aNode:aNode},smalltalk.NodeVisitor)})},
  752. args: ["aNode"],
  753. source: "visitBlockSequenceNode: aNode\x0a\x09^ self visitSequenceNode: aNode",
  754. messageSends: ["visitSequenceNode:"],
  755. referencedClasses: []
  756. }),
  757. smalltalk.NodeVisitor);
  758. smalltalk.addMethod(
  759. smalltalk.method({
  760. selector: "visitCascadeNode:",
  761. category: 'visiting',
  762. fn: function (aNode){
  763. var self=this;
  764. return smalltalk.withContext(function($ctx1) {
  765. var $1;
  766. $1=self._visitNode_(aNode);
  767. return $1;
  768. }, function($ctx1) {$ctx1.fill(self,"visitCascadeNode:",{aNode:aNode},smalltalk.NodeVisitor)})},
  769. args: ["aNode"],
  770. source: "visitCascadeNode: aNode\x0a\x09^ self visitNode: aNode",
  771. messageSends: ["visitNode:"],
  772. referencedClasses: []
  773. }),
  774. smalltalk.NodeVisitor);
  775. smalltalk.addMethod(
  776. smalltalk.method({
  777. selector: "visitClassReferenceNode:",
  778. category: 'visiting',
  779. fn: function (aNode){
  780. var self=this;
  781. return smalltalk.withContext(function($ctx1) {
  782. var $1;
  783. $1=self._visitVariableNode_(aNode);
  784. return $1;
  785. }, function($ctx1) {$ctx1.fill(self,"visitClassReferenceNode:",{aNode:aNode},smalltalk.NodeVisitor)})},
  786. args: ["aNode"],
  787. source: "visitClassReferenceNode: aNode\x0a\x09^ self visitVariableNode: aNode",
  788. messageSends: ["visitVariableNode:"],
  789. referencedClasses: []
  790. }),
  791. smalltalk.NodeVisitor);
  792. smalltalk.addMethod(
  793. smalltalk.method({
  794. selector: "visitDynamicArrayNode:",
  795. category: 'visiting',
  796. fn: function (aNode){
  797. var self=this;
  798. return smalltalk.withContext(function($ctx1) {
  799. var $1;
  800. $1=self._visitNode_(aNode);
  801. return $1;
  802. }, function($ctx1) {$ctx1.fill(self,"visitDynamicArrayNode:",{aNode:aNode},smalltalk.NodeVisitor)})},
  803. args: ["aNode"],
  804. source: "visitDynamicArrayNode: aNode\x0a\x09^ self visitNode: aNode",
  805. messageSends: ["visitNode:"],
  806. referencedClasses: []
  807. }),
  808. smalltalk.NodeVisitor);
  809. smalltalk.addMethod(
  810. smalltalk.method({
  811. selector: "visitDynamicDictionaryNode:",
  812. category: 'visiting',
  813. fn: function (aNode){
  814. var self=this;
  815. return smalltalk.withContext(function($ctx1) {
  816. var $1;
  817. $1=self._visitNode_(aNode);
  818. return $1;
  819. }, function($ctx1) {$ctx1.fill(self,"visitDynamicDictionaryNode:",{aNode:aNode},smalltalk.NodeVisitor)})},
  820. args: ["aNode"],
  821. source: "visitDynamicDictionaryNode: aNode\x0a\x09^ self visitNode: aNode",
  822. messageSends: ["visitNode:"],
  823. referencedClasses: []
  824. }),
  825. smalltalk.NodeVisitor);
  826. smalltalk.addMethod(
  827. smalltalk.method({
  828. selector: "visitJSStatementNode:",
  829. category: 'visiting',
  830. fn: function (aNode){
  831. var self=this;
  832. return smalltalk.withContext(function($ctx1) {
  833. var $1;
  834. $1=self._visitNode_(aNode);
  835. return $1;
  836. }, function($ctx1) {$ctx1.fill(self,"visitJSStatementNode:",{aNode:aNode},smalltalk.NodeVisitor)})},
  837. args: ["aNode"],
  838. source: "visitJSStatementNode: aNode\x0a\x09^ self visitNode: aNode",
  839. messageSends: ["visitNode:"],
  840. referencedClasses: []
  841. }),
  842. smalltalk.NodeVisitor);
  843. smalltalk.addMethod(
  844. smalltalk.method({
  845. selector: "visitMethodNode:",
  846. category: 'visiting',
  847. fn: function (aNode){
  848. var self=this;
  849. return smalltalk.withContext(function($ctx1) {
  850. var $1;
  851. $1=self._visitNode_(aNode);
  852. return $1;
  853. }, function($ctx1) {$ctx1.fill(self,"visitMethodNode:",{aNode:aNode},smalltalk.NodeVisitor)})},
  854. args: ["aNode"],
  855. source: "visitMethodNode: aNode\x0a\x09^ self visitNode: aNode",
  856. messageSends: ["visitNode:"],
  857. referencedClasses: []
  858. }),
  859. smalltalk.NodeVisitor);
  860. smalltalk.addMethod(
  861. smalltalk.method({
  862. selector: "visitNode:",
  863. category: 'visiting',
  864. fn: function (aNode){
  865. var self=this;
  866. return smalltalk.withContext(function($ctx1) {
  867. var $1;
  868. $1=self._visitAll_(_st(aNode)._nodes());
  869. return $1;
  870. }, function($ctx1) {$ctx1.fill(self,"visitNode:",{aNode:aNode},smalltalk.NodeVisitor)})},
  871. args: ["aNode"],
  872. source: "visitNode: aNode\x0a\x09^ self visitAll: aNode nodes",
  873. messageSends: ["visitAll:", "nodes"],
  874. referencedClasses: []
  875. }),
  876. smalltalk.NodeVisitor);
  877. smalltalk.addMethod(
  878. smalltalk.method({
  879. selector: "visitReturnNode:",
  880. category: 'visiting',
  881. fn: function (aNode){
  882. var self=this;
  883. return smalltalk.withContext(function($ctx1) {
  884. var $1;
  885. $1=self._visitNode_(aNode);
  886. return $1;
  887. }, function($ctx1) {$ctx1.fill(self,"visitReturnNode:",{aNode:aNode},smalltalk.NodeVisitor)})},
  888. args: ["aNode"],
  889. source: "visitReturnNode: aNode\x0a\x09^ self visitNode: aNode",
  890. messageSends: ["visitNode:"],
  891. referencedClasses: []
  892. }),
  893. smalltalk.NodeVisitor);
  894. smalltalk.addMethod(
  895. smalltalk.method({
  896. selector: "visitSendNode:",
  897. category: 'visiting',
  898. fn: function (aNode){
  899. var self=this;
  900. return smalltalk.withContext(function($ctx1) {
  901. var $1;
  902. $1=self._visitNode_(aNode);
  903. return $1;
  904. }, function($ctx1) {$ctx1.fill(self,"visitSendNode:",{aNode:aNode},smalltalk.NodeVisitor)})},
  905. args: ["aNode"],
  906. source: "visitSendNode: aNode\x0a\x09^ self visitNode: aNode",
  907. messageSends: ["visitNode:"],
  908. referencedClasses: []
  909. }),
  910. smalltalk.NodeVisitor);
  911. smalltalk.addMethod(
  912. smalltalk.method({
  913. selector: "visitSequenceNode:",
  914. category: 'visiting',
  915. fn: function (aNode){
  916. var self=this;
  917. return smalltalk.withContext(function($ctx1) {
  918. var $1;
  919. $1=self._visitNode_(aNode);
  920. return $1;
  921. }, function($ctx1) {$ctx1.fill(self,"visitSequenceNode:",{aNode:aNode},smalltalk.NodeVisitor)})},
  922. args: ["aNode"],
  923. source: "visitSequenceNode: aNode\x0a\x09^ self visitNode: aNode",
  924. messageSends: ["visitNode:"],
  925. referencedClasses: []
  926. }),
  927. smalltalk.NodeVisitor);
  928. smalltalk.addMethod(
  929. smalltalk.method({
  930. selector: "visitValueNode:",
  931. category: 'visiting',
  932. fn: function (aNode){
  933. var self=this;
  934. return smalltalk.withContext(function($ctx1) {
  935. var $1;
  936. $1=self._visitNode_(aNode);
  937. return $1;
  938. }, function($ctx1) {$ctx1.fill(self,"visitValueNode:",{aNode:aNode},smalltalk.NodeVisitor)})},
  939. args: ["aNode"],
  940. source: "visitValueNode: aNode\x0a\x09^ self visitNode: aNode",
  941. messageSends: ["visitNode:"],
  942. referencedClasses: []
  943. }),
  944. smalltalk.NodeVisitor);
  945. smalltalk.addMethod(
  946. smalltalk.method({
  947. selector: "visitVariableNode:",
  948. category: 'visiting',
  949. fn: function (aNode){
  950. var self=this;
  951. return smalltalk.withContext(function($ctx1) {
  952. var $1;
  953. $1=self._visitNode_(aNode);
  954. return $1;
  955. }, function($ctx1) {$ctx1.fill(self,"visitVariableNode:",{aNode:aNode},smalltalk.NodeVisitor)})},
  956. args: ["aNode"],
  957. source: "visitVariableNode: aNode\x0a\x09^ self visitNode: aNode",
  958. messageSends: ["visitNode:"],
  959. referencedClasses: []
  960. }),
  961. smalltalk.NodeVisitor);
  962. })(global_smalltalk,global_nil,global__st);