2
0

Compiler-Core.js 34 KB

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