Compiler-Core.js 33 KB

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