1
0

Compiler-Core.js 33 KB

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