Compiler-Core.js 34 KB

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