Compiler-Core.deploy.js 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759
  1. (function(smalltalk,nil,_st){
  2. smalltalk.addPackage('Compiler-Core');
  3. smalltalk.addClass('AbstractCodeGenerator', smalltalk.Object, ['currentClass', 'source'], 'Compiler-Core');
  4. smalltalk.addMethod(
  5. smalltalk.method({
  6. selector: "classNameFor:",
  7. fn: function (aClass){
  8. var self=this;
  9. return smalltalk.withContext(function($ctx1) {
  10. var $2,$3,$1;
  11. $2=_st(aClass)._isMetaclass();
  12. if(smalltalk.assert($2)){
  13. $1=_st(_st(_st(aClass)._instanceClass())._name()).__comma(".klass");
  14. } else {
  15. $3=_st(aClass)._isNil();
  16. if(smalltalk.assert($3)){
  17. $1="nil";
  18. } else {
  19. $1=_st(aClass)._name();
  20. };
  21. };
  22. return $1;
  23. }, function($ctx1) {$ctx1.fill(self,"classNameFor:",{aClass:aClass},smalltalk.AbstractCodeGenerator)})},
  24. messageSends: ["ifTrue:ifFalse:", ",", "name", "instanceClass", "isNil", "isMetaclass"]}),
  25. smalltalk.AbstractCodeGenerator);
  26. smalltalk.addMethod(
  27. smalltalk.method({
  28. selector: "compileNode:",
  29. fn: function (aNode){
  30. var self=this;
  31. return smalltalk.withContext(function($ctx1) {
  32. self._subclassResponsibility();
  33. return self}, function($ctx1) {$ctx1.fill(self,"compileNode:",{aNode:aNode},smalltalk.AbstractCodeGenerator)})},
  34. messageSends: ["subclassResponsibility"]}),
  35. smalltalk.AbstractCodeGenerator);
  36. smalltalk.addMethod(
  37. smalltalk.method({
  38. selector: "currentClass",
  39. fn: function (){
  40. var self=this;
  41. return smalltalk.withContext(function($ctx1) {
  42. var $1;
  43. $1=self["@currentClass"];
  44. return $1;
  45. }, function($ctx1) {$ctx1.fill(self,"currentClass",{},smalltalk.AbstractCodeGenerator)})},
  46. messageSends: []}),
  47. smalltalk.AbstractCodeGenerator);
  48. smalltalk.addMethod(
  49. smalltalk.method({
  50. selector: "currentClass:",
  51. fn: function (aClass){
  52. var self=this;
  53. return smalltalk.withContext(function($ctx1) {
  54. self["@currentClass"]=aClass;
  55. return self}, function($ctx1) {$ctx1.fill(self,"currentClass:",{aClass:aClass},smalltalk.AbstractCodeGenerator)})},
  56. messageSends: []}),
  57. smalltalk.AbstractCodeGenerator);
  58. smalltalk.addMethod(
  59. smalltalk.method({
  60. selector: "pseudoVariables",
  61. fn: function (){
  62. var self=this;
  63. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  64. return smalltalk.withContext(function($ctx1) {
  65. var $1;
  66. $1=_st(_st($Smalltalk())._current())._pseudoVariableNames();
  67. return $1;
  68. }, function($ctx1) {$ctx1.fill(self,"pseudoVariables",{},smalltalk.AbstractCodeGenerator)})},
  69. messageSends: ["pseudoVariableNames", "current"]}),
  70. smalltalk.AbstractCodeGenerator);
  71. smalltalk.addMethod(
  72. smalltalk.method({
  73. selector: "safeVariableNameFor:",
  74. fn: function (aString){
  75. var self=this;
  76. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  77. return smalltalk.withContext(function($ctx1) {
  78. var $2,$1;
  79. $2=_st(_st(_st($Smalltalk())._current())._reservedWords())._includes_(aString);
  80. if(smalltalk.assert($2)){
  81. $1=_st(aString).__comma("_");
  82. } else {
  83. $1=aString;
  84. };
  85. return $1;
  86. }, function($ctx1) {$ctx1.fill(self,"safeVariableNameFor:",{aString:aString},smalltalk.AbstractCodeGenerator)})},
  87. messageSends: ["ifTrue:ifFalse:", ",", "includes:", "reservedWords", "current"]}),
  88. smalltalk.AbstractCodeGenerator);
  89. smalltalk.addMethod(
  90. smalltalk.method({
  91. selector: "source",
  92. fn: function (){
  93. var self=this;
  94. return smalltalk.withContext(function($ctx1) {
  95. var $2,$1;
  96. $2=self["@source"];
  97. if(($receiver = $2) == nil || $receiver == undefined){
  98. $1="";
  99. } else {
  100. $1=$2;
  101. };
  102. return $1;
  103. }, function($ctx1) {$ctx1.fill(self,"source",{},smalltalk.AbstractCodeGenerator)})},
  104. messageSends: ["ifNil:"]}),
  105. smalltalk.AbstractCodeGenerator);
  106. smalltalk.addMethod(
  107. smalltalk.method({
  108. selector: "source:",
  109. fn: function (aString){
  110. var self=this;
  111. return smalltalk.withContext(function($ctx1) {
  112. self["@source"]=aString;
  113. return self}, function($ctx1) {$ctx1.fill(self,"source:",{aString:aString},smalltalk.AbstractCodeGenerator)})},
  114. messageSends: []}),
  115. smalltalk.AbstractCodeGenerator);
  116. smalltalk.addClass('CodeGenerator', smalltalk.AbstractCodeGenerator, [], 'Compiler-Core');
  117. smalltalk.addMethod(
  118. smalltalk.method({
  119. selector: "compileNode:",
  120. fn: function (aNode){
  121. var self=this;
  122. var ir,stream;
  123. return smalltalk.withContext(function($ctx1) {
  124. var $2,$3,$1;
  125. _st(self._semanticAnalyzer())._visit_(aNode);
  126. ir=_st(self._translator())._visit_(aNode);
  127. $2=self._irTranslator();
  128. _st($2)._currentClass_(self._currentClass());
  129. _st($2)._visit_(ir);
  130. $3=_st($2)._contents();
  131. $1=$3;
  132. return $1;
  133. }, function($ctx1) {$ctx1.fill(self,"compileNode:",{aNode:aNode,ir:ir,stream:stream},smalltalk.CodeGenerator)})},
  134. messageSends: ["visit:", "semanticAnalyzer", "translator", "currentClass:", "currentClass", "irTranslator", "contents"]}),
  135. smalltalk.CodeGenerator);
  136. smalltalk.addMethod(
  137. smalltalk.method({
  138. selector: "irTranslator",
  139. fn: function (){
  140. var self=this;
  141. function $IRJSTranslator(){return smalltalk.IRJSTranslator||(typeof IRJSTranslator=="undefined"?nil:IRJSTranslator)}
  142. return smalltalk.withContext(function($ctx1) {
  143. var $1;
  144. $1=_st($IRJSTranslator())._new();
  145. return $1;
  146. }, function($ctx1) {$ctx1.fill(self,"irTranslator",{},smalltalk.CodeGenerator)})},
  147. messageSends: ["new"]}),
  148. smalltalk.CodeGenerator);
  149. smalltalk.addMethod(
  150. smalltalk.method({
  151. selector: "semanticAnalyzer",
  152. fn: function (){
  153. var self=this;
  154. function $SemanticAnalyzer(){return smalltalk.SemanticAnalyzer||(typeof SemanticAnalyzer=="undefined"?nil:SemanticAnalyzer)}
  155. return smalltalk.withContext(function($ctx1) {
  156. var $1;
  157. $1=_st($SemanticAnalyzer())._on_(self._currentClass());
  158. return $1;
  159. }, function($ctx1) {$ctx1.fill(self,"semanticAnalyzer",{},smalltalk.CodeGenerator)})},
  160. messageSends: ["on:", "currentClass"]}),
  161. smalltalk.CodeGenerator);
  162. smalltalk.addMethod(
  163. smalltalk.method({
  164. selector: "translator",
  165. fn: function (){
  166. var self=this;
  167. function $IRASTTranslator(){return smalltalk.IRASTTranslator||(typeof IRASTTranslator=="undefined"?nil:IRASTTranslator)}
  168. return smalltalk.withContext(function($ctx1) {
  169. var $2,$3,$1;
  170. $2=_st($IRASTTranslator())._new();
  171. _st($2)._source_(self._source());
  172. _st($2)._theClass_(self._currentClass());
  173. $3=_st($2)._yourself();
  174. $1=$3;
  175. return $1;
  176. }, function($ctx1) {$ctx1.fill(self,"translator",{},smalltalk.CodeGenerator)})},
  177. messageSends: ["source:", "source", "new", "theClass:", "currentClass", "yourself"]}),
  178. smalltalk.CodeGenerator);
  179. smalltalk.addClass('Compiler', smalltalk.Object, ['currentClass', 'source', 'unknownVariables', 'codeGeneratorClass'], 'Compiler-Core');
  180. smalltalk.addMethod(
  181. smalltalk.method({
  182. selector: "codeGeneratorClass",
  183. fn: function (){
  184. var self=this;
  185. function $InliningCodeGenerator(){return smalltalk.InliningCodeGenerator||(typeof InliningCodeGenerator=="undefined"?nil:InliningCodeGenerator)}
  186. return smalltalk.withContext(function($ctx1) {
  187. var $2,$1;
  188. $2=self["@codeGeneratorClass"];
  189. if(($receiver = $2) == nil || $receiver == undefined){
  190. $1=$InliningCodeGenerator();
  191. } else {
  192. $1=$2;
  193. };
  194. return $1;
  195. }, function($ctx1) {$ctx1.fill(self,"codeGeneratorClass",{},smalltalk.Compiler)})},
  196. messageSends: ["ifNil:"]}),
  197. smalltalk.Compiler);
  198. smalltalk.addMethod(
  199. smalltalk.method({
  200. selector: "codeGeneratorClass:",
  201. fn: function (aClass){
  202. var self=this;
  203. return smalltalk.withContext(function($ctx1) {
  204. self["@codeGeneratorClass"]=aClass;
  205. return self}, function($ctx1) {$ctx1.fill(self,"codeGeneratorClass:",{aClass:aClass},smalltalk.Compiler)})},
  206. messageSends: []}),
  207. smalltalk.Compiler);
  208. smalltalk.addMethod(
  209. smalltalk.method({
  210. selector: "compile:",
  211. fn: function (aString){
  212. var self=this;
  213. return smalltalk.withContext(function($ctx1) {
  214. var $1;
  215. $1=self._compileNode_(self._parse_(aString));
  216. return $1;
  217. }, function($ctx1) {$ctx1.fill(self,"compile:",{aString:aString},smalltalk.Compiler)})},
  218. messageSends: ["compileNode:", "parse:"]}),
  219. smalltalk.Compiler);
  220. smalltalk.addMethod(
  221. smalltalk.method({
  222. selector: "compile:forClass:",
  223. fn: function (aString,aClass){
  224. var self=this;
  225. return smalltalk.withContext(function($ctx1) {
  226. var $1;
  227. self._currentClass_(aClass);
  228. self._source_(aString);
  229. $1=self._compile_(aString);
  230. return $1;
  231. }, function($ctx1) {$ctx1.fill(self,"compile:forClass:",{aString:aString,aClass:aClass},smalltalk.Compiler)})},
  232. messageSends: ["currentClass:", "source:", "compile:"]}),
  233. smalltalk.Compiler);
  234. smalltalk.addMethod(
  235. smalltalk.method({
  236. selector: "compileExpression:",
  237. fn: function (aString){
  238. var self=this;
  239. function $DoIt(){return smalltalk.DoIt||(typeof DoIt=="undefined"?nil:DoIt)}
  240. return smalltalk.withContext(function($ctx1) {
  241. var $1;
  242. self._currentClass_($DoIt());
  243. self._source_(_st("doIt ^[".__comma(aString)).__comma("] value"));
  244. $1=self._compileNode_(self._parse_(self._source()));
  245. return $1;
  246. }, function($ctx1) {$ctx1.fill(self,"compileExpression:",{aString:aString},smalltalk.Compiler)})},
  247. messageSends: ["currentClass:", "source:", ",", "compileNode:", "parse:", "source"]}),
  248. smalltalk.Compiler);
  249. smalltalk.addMethod(
  250. smalltalk.method({
  251. selector: "compileExpression:on:",
  252. fn: function (aString,anObject){
  253. var self=this;
  254. return smalltalk.withContext(function($ctx1) {
  255. var $1;
  256. self._currentClass_(_st(anObject)._class());
  257. self._source_(_st("xxxDoIt ^[".__comma(aString)).__comma("] value"));
  258. $1=self._compileNode_(self._parse_(self._source()));
  259. return $1;
  260. }, function($ctx1) {$ctx1.fill(self,"compileExpression:on:",{aString:aString,anObject:anObject},smalltalk.Compiler)})},
  261. messageSends: ["currentClass:", "class", "source:", ",", "compileNode:", "parse:", "source"]}),
  262. smalltalk.Compiler);
  263. smalltalk.addMethod(
  264. smalltalk.method({
  265. selector: "compileNode:",
  266. fn: function (aNode){
  267. var self=this;
  268. var generator,result;
  269. return smalltalk.withContext(function($ctx1) {
  270. var $1,$2,$3;
  271. generator=_st(self._codeGeneratorClass())._new();
  272. $1=generator;
  273. _st($1)._source_(self._source());
  274. $2=_st($1)._currentClass_(self._currentClass());
  275. result=_st(generator)._compileNode_(aNode);
  276. self._unknownVariables_([]);
  277. $3=result;
  278. return $3;
  279. }, function($ctx1) {$ctx1.fill(self,"compileNode:",{aNode:aNode,generator:generator,result:result},smalltalk.Compiler)})},
  280. messageSends: ["new", "codeGeneratorClass", "source:", "source", "currentClass:", "currentClass", "compileNode:", "unknownVariables:"]}),
  281. smalltalk.Compiler);
  282. smalltalk.addMethod(
  283. smalltalk.method({
  284. selector: "currentClass",
  285. fn: function (){
  286. var self=this;
  287. return smalltalk.withContext(function($ctx1) {
  288. var $1;
  289. $1=self["@currentClass"];
  290. return $1;
  291. }, function($ctx1) {$ctx1.fill(self,"currentClass",{},smalltalk.Compiler)})},
  292. messageSends: []}),
  293. smalltalk.Compiler);
  294. smalltalk.addMethod(
  295. smalltalk.method({
  296. selector: "currentClass:",
  297. fn: function (aClass){
  298. var self=this;
  299. return smalltalk.withContext(function($ctx1) {
  300. self["@currentClass"]=aClass;
  301. return self}, function($ctx1) {$ctx1.fill(self,"currentClass:",{aClass:aClass},smalltalk.Compiler)})},
  302. messageSends: []}),
  303. smalltalk.Compiler);
  304. smalltalk.addMethod(
  305. smalltalk.method({
  306. selector: "eval:",
  307. fn: function (aString){
  308. var self=this;
  309. return smalltalk.withContext(function($ctx1) {
  310. return eval(aString);
  311. return self}, function($ctx1) {$ctx1.fill(self,"eval:",{aString:aString},smalltalk.Compiler)})},
  312. messageSends: []}),
  313. smalltalk.Compiler);
  314. smalltalk.addMethod(
  315. smalltalk.method({
  316. selector: "evaluateExpression:",
  317. fn: function (aString){
  318. var self=this;
  319. function $DoIt(){return smalltalk.DoIt||(typeof DoIt=="undefined"?nil:DoIt)}
  320. return smalltalk.withContext(function($ctx1) {
  321. var $1;
  322. $1=self._evaluateExpression_on_(aString,_st($DoIt())._new());
  323. return $1;
  324. }, function($ctx1) {$ctx1.fill(self,"evaluateExpression:",{aString:aString},smalltalk.Compiler)})},
  325. messageSends: ["evaluateExpression:on:", "new"]}),
  326. smalltalk.Compiler);
  327. smalltalk.addMethod(
  328. smalltalk.method({
  329. selector: "evaluateExpression:on:",
  330. fn: function (aString,anObject){
  331. var self=this;
  332. var result,method;
  333. return smalltalk.withContext(function($ctx1) {
  334. var $1;
  335. method=self._eval_(self._compileExpression_on_(aString,anObject));
  336. _st(method)._category_("xxxDoIt");
  337. _st(_st(anObject)._class())._addCompiledMethod_(method);
  338. result=_st(anObject)._xxxDoIt();
  339. _st(_st(anObject)._class())._removeCompiledMethod_(method);
  340. $1=result;
  341. return $1;
  342. }, function($ctx1) {$ctx1.fill(self,"evaluateExpression:on:",{aString:aString,anObject:anObject,result:result,method:method},smalltalk.Compiler)})},
  343. messageSends: ["eval:", "compileExpression:on:", "category:", "addCompiledMethod:", "class", "xxxDoIt", "removeCompiledMethod:"]}),
  344. smalltalk.Compiler);
  345. smalltalk.addMethod(
  346. smalltalk.method({
  347. selector: "install:forClass:category:",
  348. fn: function (aString,aBehavior,anotherString){
  349. var self=this;
  350. function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
  351. return smalltalk.withContext(function($ctx1) {
  352. var $1;
  353. $1=_st(_st($ClassBuilder())._new())._installMethod_forClass_category_(self._eval_(self._compile_forClass_(aString,aBehavior)),aBehavior,anotherString);
  354. return $1;
  355. }, function($ctx1) {$ctx1.fill(self,"install:forClass:category:",{aString:aString,aBehavior:aBehavior,anotherString:anotherString},smalltalk.Compiler)})},
  356. messageSends: ["installMethod:forClass:category:", "eval:", "compile:forClass:", "new"]}),
  357. smalltalk.Compiler);
  358. smalltalk.addMethod(
  359. smalltalk.method({
  360. selector: "parse:",
  361. fn: function (aString){
  362. var self=this;
  363. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  364. return smalltalk.withContext(function($ctx1) {
  365. var $1;
  366. $1=_st(_st($Smalltalk())._current())._parse_(aString);
  367. return $1;
  368. }, function($ctx1) {$ctx1.fill(self,"parse:",{aString:aString},smalltalk.Compiler)})},
  369. messageSends: ["parse:", "current"]}),
  370. smalltalk.Compiler);
  371. smalltalk.addMethod(
  372. smalltalk.method({
  373. selector: "parseExpression:",
  374. fn: function (aString){
  375. var self=this;
  376. return smalltalk.withContext(function($ctx1) {
  377. var $1;
  378. $1=self._parse_(_st("doIt ^[".__comma(aString)).__comma("] value"));
  379. return $1;
  380. }, function($ctx1) {$ctx1.fill(self,"parseExpression:",{aString:aString},smalltalk.Compiler)})},
  381. messageSends: ["parse:", ","]}),
  382. smalltalk.Compiler);
  383. smalltalk.addMethod(
  384. smalltalk.method({
  385. selector: "recompile:",
  386. fn: function (aClass){
  387. var self=this;
  388. return smalltalk.withContext(function($ctx1) {
  389. var $1;
  390. _st(_st(_st(aClass)._methodDictionary())._values())._do_displayingProgress_((function(each){
  391. return smalltalk.withContext(function($ctx2) {
  392. return self._install_forClass_category_(_st(each)._source(),aClass,_st(each)._category());
  393. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),"Recompiling ".__comma(_st(aClass)._name()));
  394. $1=_st(aClass)._isMetaclass();
  395. if(! smalltalk.assert($1)){
  396. self._recompile_(_st(aClass)._class());
  397. };
  398. return self}, function($ctx1) {$ctx1.fill(self,"recompile:",{aClass:aClass},smalltalk.Compiler)})},
  399. messageSends: ["do:displayingProgress:", "install:forClass:category:", "source", "category", ",", "name", "values", "methodDictionary", "ifFalse:", "recompile:", "class", "isMetaclass"]}),
  400. smalltalk.Compiler);
  401. smalltalk.addMethod(
  402. smalltalk.method({
  403. selector: "recompileAll",
  404. fn: function (){
  405. var self=this;
  406. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  407. return smalltalk.withContext(function($ctx1) {
  408. _st(_st(_st($Smalltalk())._current())._classes())._do_displayingProgress_((function(each){
  409. return smalltalk.withContext(function($ctx2) {
  410. return self._recompile_(each);
  411. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),"Compiling all classes...");
  412. return self}, function($ctx1) {$ctx1.fill(self,"recompileAll",{},smalltalk.Compiler)})},
  413. messageSends: ["do:displayingProgress:", "recompile:", "classes", "current"]}),
  414. smalltalk.Compiler);
  415. smalltalk.addMethod(
  416. smalltalk.method({
  417. selector: "source",
  418. fn: function (){
  419. var self=this;
  420. return smalltalk.withContext(function($ctx1) {
  421. var $2,$1;
  422. $2=self["@source"];
  423. if(($receiver = $2) == nil || $receiver == undefined){
  424. $1="";
  425. } else {
  426. $1=$2;
  427. };
  428. return $1;
  429. }, function($ctx1) {$ctx1.fill(self,"source",{},smalltalk.Compiler)})},
  430. messageSends: ["ifNil:"]}),
  431. smalltalk.Compiler);
  432. smalltalk.addMethod(
  433. smalltalk.method({
  434. selector: "source:",
  435. fn: function (aString){
  436. var self=this;
  437. return smalltalk.withContext(function($ctx1) {
  438. self["@source"]=aString;
  439. return self}, function($ctx1) {$ctx1.fill(self,"source:",{aString:aString},smalltalk.Compiler)})},
  440. messageSends: []}),
  441. smalltalk.Compiler);
  442. smalltalk.addMethod(
  443. smalltalk.method({
  444. selector: "unknownVariables",
  445. fn: function (){
  446. var self=this;
  447. return smalltalk.withContext(function($ctx1) {
  448. var $1;
  449. $1=self["@unknownVariables"];
  450. return $1;
  451. }, function($ctx1) {$ctx1.fill(self,"unknownVariables",{},smalltalk.Compiler)})},
  452. messageSends: []}),
  453. smalltalk.Compiler);
  454. smalltalk.addMethod(
  455. smalltalk.method({
  456. selector: "unknownVariables:",
  457. fn: function (aCollection){
  458. var self=this;
  459. return smalltalk.withContext(function($ctx1) {
  460. self["@unknownVariables"]=aCollection;
  461. return self}, function($ctx1) {$ctx1.fill(self,"unknownVariables:",{aCollection:aCollection},smalltalk.Compiler)})},
  462. messageSends: []}),
  463. smalltalk.Compiler);
  464. smalltalk.addMethod(
  465. smalltalk.method({
  466. selector: "recompile:",
  467. fn: function (aClass){
  468. var self=this;
  469. return smalltalk.withContext(function($ctx1) {
  470. _st(self._new())._recompile_(aClass);
  471. return self}, function($ctx1) {$ctx1.fill(self,"recompile:",{aClass:aClass},smalltalk.Compiler.klass)})},
  472. messageSends: ["recompile:", "new"]}),
  473. smalltalk.Compiler.klass);
  474. smalltalk.addMethod(
  475. smalltalk.method({
  476. selector: "recompileAll",
  477. fn: function (){
  478. var self=this;
  479. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  480. return smalltalk.withContext(function($ctx1) {
  481. _st(_st(_st($Smalltalk())._current())._classes())._do_((function(each){
  482. return smalltalk.withContext(function($ctx2) {
  483. return self._recompile_(each);
  484. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  485. return self}, function($ctx1) {$ctx1.fill(self,"recompileAll",{},smalltalk.Compiler.klass)})},
  486. messageSends: ["do:", "recompile:", "classes", "current"]}),
  487. smalltalk.Compiler.klass);
  488. smalltalk.addClass('DoIt', smalltalk.Object, [], 'Compiler-Core');
  489. smalltalk.addClass('NodeVisitor', smalltalk.Object, [], 'Compiler-Core');
  490. smalltalk.addMethod(
  491. smalltalk.method({
  492. selector: "visit:",
  493. fn: function (aNode){
  494. var self=this;
  495. return smalltalk.withContext(function($ctx1) {
  496. var $1;
  497. $1=_st(aNode)._accept_(self);
  498. return $1;
  499. }, function($ctx1) {$ctx1.fill(self,"visit:",{aNode:aNode},smalltalk.NodeVisitor)})},
  500. messageSends: ["accept:"]}),
  501. smalltalk.NodeVisitor);
  502. smalltalk.addMethod(
  503. smalltalk.method({
  504. selector: "visitAll:",
  505. fn: function (aCollection){
  506. var self=this;
  507. return smalltalk.withContext(function($ctx1) {
  508. var $1;
  509. $1=_st(aCollection)._collect_((function(each){
  510. return smalltalk.withContext(function($ctx2) {
  511. return self._visit_(each);
  512. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  513. return $1;
  514. }, function($ctx1) {$ctx1.fill(self,"visitAll:",{aCollection:aCollection},smalltalk.NodeVisitor)})},
  515. messageSends: ["collect:", "visit:"]}),
  516. smalltalk.NodeVisitor);
  517. smalltalk.addMethod(
  518. smalltalk.method({
  519. selector: "visitAssignmentNode:",
  520. fn: function (aNode){
  521. var self=this;
  522. return smalltalk.withContext(function($ctx1) {
  523. var $1;
  524. $1=self._visitNode_(aNode);
  525. return $1;
  526. }, function($ctx1) {$ctx1.fill(self,"visitAssignmentNode:",{aNode:aNode},smalltalk.NodeVisitor)})},
  527. messageSends: ["visitNode:"]}),
  528. smalltalk.NodeVisitor);
  529. smalltalk.addMethod(
  530. smalltalk.method({
  531. selector: "visitBlockNode:",
  532. fn: function (aNode){
  533. var self=this;
  534. return smalltalk.withContext(function($ctx1) {
  535. var $1;
  536. $1=self._visitNode_(aNode);
  537. return $1;
  538. }, function($ctx1) {$ctx1.fill(self,"visitBlockNode:",{aNode:aNode},smalltalk.NodeVisitor)})},
  539. messageSends: ["visitNode:"]}),
  540. smalltalk.NodeVisitor);
  541. smalltalk.addMethod(
  542. smalltalk.method({
  543. selector: "visitBlockSequenceNode:",
  544. fn: function (aNode){
  545. var self=this;
  546. return smalltalk.withContext(function($ctx1) {
  547. var $1;
  548. $1=self._visitSequenceNode_(aNode);
  549. return $1;
  550. }, function($ctx1) {$ctx1.fill(self,"visitBlockSequenceNode:",{aNode:aNode},smalltalk.NodeVisitor)})},
  551. messageSends: ["visitSequenceNode:"]}),
  552. smalltalk.NodeVisitor);
  553. smalltalk.addMethod(
  554. smalltalk.method({
  555. selector: "visitCascadeNode:",
  556. fn: function (aNode){
  557. var self=this;
  558. return smalltalk.withContext(function($ctx1) {
  559. var $1;
  560. $1=self._visitNode_(aNode);
  561. return $1;
  562. }, function($ctx1) {$ctx1.fill(self,"visitCascadeNode:",{aNode:aNode},smalltalk.NodeVisitor)})},
  563. messageSends: ["visitNode:"]}),
  564. smalltalk.NodeVisitor);
  565. smalltalk.addMethod(
  566. smalltalk.method({
  567. selector: "visitClassReferenceNode:",
  568. fn: function (aNode){
  569. var self=this;
  570. return smalltalk.withContext(function($ctx1) {
  571. var $1;
  572. $1=self._visitVariableNode_(aNode);
  573. return $1;
  574. }, function($ctx1) {$ctx1.fill(self,"visitClassReferenceNode:",{aNode:aNode},smalltalk.NodeVisitor)})},
  575. messageSends: ["visitVariableNode:"]}),
  576. smalltalk.NodeVisitor);
  577. smalltalk.addMethod(
  578. smalltalk.method({
  579. selector: "visitDynamicArrayNode:",
  580. fn: function (aNode){
  581. var self=this;
  582. return smalltalk.withContext(function($ctx1) {
  583. var $1;
  584. $1=self._visitNode_(aNode);
  585. return $1;
  586. }, function($ctx1) {$ctx1.fill(self,"visitDynamicArrayNode:",{aNode:aNode},smalltalk.NodeVisitor)})},
  587. messageSends: ["visitNode:"]}),
  588. smalltalk.NodeVisitor);
  589. smalltalk.addMethod(
  590. smalltalk.method({
  591. selector: "visitDynamicDictionaryNode:",
  592. fn: function (aNode){
  593. var self=this;
  594. return smalltalk.withContext(function($ctx1) {
  595. var $1;
  596. $1=self._visitNode_(aNode);
  597. return $1;
  598. }, function($ctx1) {$ctx1.fill(self,"visitDynamicDictionaryNode:",{aNode:aNode},smalltalk.NodeVisitor)})},
  599. messageSends: ["visitNode:"]}),
  600. smalltalk.NodeVisitor);
  601. smalltalk.addMethod(
  602. smalltalk.method({
  603. selector: "visitJSStatementNode:",
  604. fn: function (aNode){
  605. var self=this;
  606. return smalltalk.withContext(function($ctx1) {
  607. var $1;
  608. $1=self._visitNode_(aNode);
  609. return $1;
  610. }, function($ctx1) {$ctx1.fill(self,"visitJSStatementNode:",{aNode:aNode},smalltalk.NodeVisitor)})},
  611. messageSends: ["visitNode:"]}),
  612. smalltalk.NodeVisitor);
  613. smalltalk.addMethod(
  614. smalltalk.method({
  615. selector: "visitMethodNode:",
  616. fn: function (aNode){
  617. var self=this;
  618. return smalltalk.withContext(function($ctx1) {
  619. var $1;
  620. $1=self._visitNode_(aNode);
  621. return $1;
  622. }, function($ctx1) {$ctx1.fill(self,"visitMethodNode:",{aNode:aNode},smalltalk.NodeVisitor)})},
  623. messageSends: ["visitNode:"]}),
  624. smalltalk.NodeVisitor);
  625. smalltalk.addMethod(
  626. smalltalk.method({
  627. selector: "visitNode:",
  628. fn: function (aNode){
  629. var self=this;
  630. return smalltalk.withContext(function($ctx1) {
  631. var $1;
  632. $1=self._visitAll_(_st(aNode)._nodes());
  633. return $1;
  634. }, function($ctx1) {$ctx1.fill(self,"visitNode:",{aNode:aNode},smalltalk.NodeVisitor)})},
  635. messageSends: ["visitAll:", "nodes"]}),
  636. smalltalk.NodeVisitor);
  637. smalltalk.addMethod(
  638. smalltalk.method({
  639. selector: "visitReturnNode:",
  640. fn: function (aNode){
  641. var self=this;
  642. return smalltalk.withContext(function($ctx1) {
  643. var $1;
  644. $1=self._visitNode_(aNode);
  645. return $1;
  646. }, function($ctx1) {$ctx1.fill(self,"visitReturnNode:",{aNode:aNode},smalltalk.NodeVisitor)})},
  647. messageSends: ["visitNode:"]}),
  648. smalltalk.NodeVisitor);
  649. smalltalk.addMethod(
  650. smalltalk.method({
  651. selector: "visitSendNode:",
  652. fn: function (aNode){
  653. var self=this;
  654. return smalltalk.withContext(function($ctx1) {
  655. var $1;
  656. $1=self._visitNode_(aNode);
  657. return $1;
  658. }, function($ctx1) {$ctx1.fill(self,"visitSendNode:",{aNode:aNode},smalltalk.NodeVisitor)})},
  659. messageSends: ["visitNode:"]}),
  660. smalltalk.NodeVisitor);
  661. smalltalk.addMethod(
  662. smalltalk.method({
  663. selector: "visitSequenceNode:",
  664. fn: function (aNode){
  665. var self=this;
  666. return smalltalk.withContext(function($ctx1) {
  667. var $1;
  668. $1=self._visitNode_(aNode);
  669. return $1;
  670. }, function($ctx1) {$ctx1.fill(self,"visitSequenceNode:",{aNode:aNode},smalltalk.NodeVisitor)})},
  671. messageSends: ["visitNode:"]}),
  672. smalltalk.NodeVisitor);
  673. smalltalk.addMethod(
  674. smalltalk.method({
  675. selector: "visitValueNode:",
  676. fn: function (aNode){
  677. var self=this;
  678. return smalltalk.withContext(function($ctx1) {
  679. var $1;
  680. $1=self._visitNode_(aNode);
  681. return $1;
  682. }, function($ctx1) {$ctx1.fill(self,"visitValueNode:",{aNode:aNode},smalltalk.NodeVisitor)})},
  683. messageSends: ["visitNode:"]}),
  684. smalltalk.NodeVisitor);
  685. smalltalk.addMethod(
  686. smalltalk.method({
  687. selector: "visitVariableNode:",
  688. fn: function (aNode){
  689. var self=this;
  690. return smalltalk.withContext(function($ctx1) {
  691. var $1;
  692. $1=self._visitNode_(aNode);
  693. return $1;
  694. }, function($ctx1) {$ctx1.fill(self,"visitVariableNode:",{aNode:aNode},smalltalk.NodeVisitor)})},
  695. messageSends: ["visitNode:"]}),
  696. smalltalk.NodeVisitor);
  697. })(global_smalltalk,global_nil,global__st);