1
0

Compiler-Core.deploy.js 24 KB

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