1
0

Compiler-Interpreter.deploy.js 45 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202
  1. smalltalk.addPackage('Compiler-Interpreter');
  2. smalltalk.addClass('AIContext', smalltalk.NodeVisitor, ['outerContext', 'pc', 'locals', 'method'], 'Compiler-Interpreter');
  3. smalltalk.addMethod(
  4. "_initializeFromMethodContext_",
  5. smalltalk.method({
  6. selector: "initializeFromMethodContext:",
  7. fn: function (aMethodContext){
  8. var self=this;
  9. return smalltalk.withContext(function($ctx1) { var $1;
  10. _st(self)._pc_(_st(aMethodContext)._pc());
  11. _st(self)._receiver_(_st(aMethodContext)._receiver());
  12. _st(self)._method_(_st(aMethodContext)._method());
  13. $1=_st(aMethodContext)._outerContext();
  14. if(($receiver = $1) == nil || $receiver == undefined){
  15. $1;
  16. } else {
  17. _st(self)._outerContext_(_st(_st(self)._class())._fromMethodContext_(_st(aMethodContext)._outerContext()));
  18. };
  19. _st(_st(aMethodContext)._locals())._keysAndValuesDo_((function(key,value){
  20. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._locals())._at_put_(key,value);
  21. }, function($ctx2) {$ctx2.fillBlock({key:key,value:value},$ctx1)})}));
  22. return self}, function($ctx1) {$ctx1.fill(self,"initializeFromMethodContext:",{aMethodContext:aMethodContext},smalltalk.AIContext)})},
  23. messageSends: ["pc:", "pc", "receiver:", "receiver", "method:", "method", "ifNotNil:", "outerContext:", "fromMethodContext:", "outerContext", "class", "keysAndValuesDo:", "at:put:", "locals"]}),
  24. smalltalk.AIContext);
  25. smalltalk.addMethod(
  26. "_localAt_",
  27. smalltalk.method({
  28. selector: "localAt:",
  29. fn: function (aString){
  30. var self=this;
  31. return smalltalk.withContext(function($ctx1) { var $1;
  32. $1=_st(_st(self)._locals())._at_ifAbsent_(aString,(function(){
  33. return smalltalk.withContext(function($ctx2) { return nil;
  34. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  35. return $1;
  36. }, function($ctx1) {$ctx1.fill(self,"localAt:",{aString:aString},smalltalk.AIContext)})},
  37. messageSends: ["at:ifAbsent:", "locals"]}),
  38. smalltalk.AIContext);
  39. smalltalk.addMethod(
  40. "_localAt_put_",
  41. smalltalk.method({
  42. selector: "localAt:put:",
  43. fn: function (aString,anObject){
  44. var self=this;
  45. return smalltalk.withContext(function($ctx1) { _st(_st(self)._locals())._at_put_(aString,anObject);
  46. return self}, function($ctx1) {$ctx1.fill(self,"localAt:put:",{aString:aString,anObject:anObject},smalltalk.AIContext)})},
  47. messageSends: ["at:put:", "locals"]}),
  48. smalltalk.AIContext);
  49. smalltalk.addMethod(
  50. "_locals",
  51. smalltalk.method({
  52. selector: "locals",
  53. fn: function (){
  54. var self=this;
  55. return smalltalk.withContext(function($ctx1) { var $2,$1;
  56. $2=self["@locals"];
  57. if(($receiver = $2) == nil || $receiver == undefined){
  58. self["@locals"]=_st((smalltalk.Dictionary || Dictionary))._new();
  59. $1=self["@locals"];
  60. } else {
  61. $1=$2;
  62. };
  63. return $1;
  64. }, function($ctx1) {$ctx1.fill(self,"locals",{},smalltalk.AIContext)})},
  65. messageSends: ["ifNil:", "new"]}),
  66. smalltalk.AIContext);
  67. smalltalk.addMethod(
  68. "_method",
  69. smalltalk.method({
  70. selector: "method",
  71. fn: function (){
  72. var self=this;
  73. return smalltalk.withContext(function($ctx1) { var $1;
  74. $1=self["@method"];
  75. return $1;
  76. }, function($ctx1) {$ctx1.fill(self,"method",{},smalltalk.AIContext)})},
  77. messageSends: []}),
  78. smalltalk.AIContext);
  79. smalltalk.addMethod(
  80. "_method_",
  81. smalltalk.method({
  82. selector: "method:",
  83. fn: function (aCompiledMethod){
  84. var self=this;
  85. return smalltalk.withContext(function($ctx1) { self["@method"]=aCompiledMethod;
  86. return self}, function($ctx1) {$ctx1.fill(self,"method:",{aCompiledMethod:aCompiledMethod},smalltalk.AIContext)})},
  87. messageSends: []}),
  88. smalltalk.AIContext);
  89. smalltalk.addMethod(
  90. "_outerContext",
  91. smalltalk.method({
  92. selector: "outerContext",
  93. fn: function (){
  94. var self=this;
  95. return smalltalk.withContext(function($ctx1) { var $1;
  96. $1=self["@outerContext"];
  97. return $1;
  98. }, function($ctx1) {$ctx1.fill(self,"outerContext",{},smalltalk.AIContext)})},
  99. messageSends: []}),
  100. smalltalk.AIContext);
  101. smalltalk.addMethod(
  102. "_outerContext_",
  103. smalltalk.method({
  104. selector: "outerContext:",
  105. fn: function (anAIContext){
  106. var self=this;
  107. return smalltalk.withContext(function($ctx1) { self["@outerContext"]=anAIContext;
  108. return self}, function($ctx1) {$ctx1.fill(self,"outerContext:",{anAIContext:anAIContext},smalltalk.AIContext)})},
  109. messageSends: []}),
  110. smalltalk.AIContext);
  111. smalltalk.addMethod(
  112. "_pc",
  113. smalltalk.method({
  114. selector: "pc",
  115. fn: function (){
  116. var self=this;
  117. return smalltalk.withContext(function($ctx1) { var $2,$1;
  118. $2=self["@pc"];
  119. if(($receiver = $2) == nil || $receiver == undefined){
  120. self["@pc"]=(0);
  121. $1=self["@pc"];
  122. } else {
  123. $1=$2;
  124. };
  125. return $1;
  126. }, function($ctx1) {$ctx1.fill(self,"pc",{},smalltalk.AIContext)})},
  127. messageSends: ["ifNil:"]}),
  128. smalltalk.AIContext);
  129. smalltalk.addMethod(
  130. "_pc_",
  131. smalltalk.method({
  132. selector: "pc:",
  133. fn: function (anInteger){
  134. var self=this;
  135. return smalltalk.withContext(function($ctx1) { self["@pc"]=anInteger;
  136. return self}, function($ctx1) {$ctx1.fill(self,"pc:",{anInteger:anInteger},smalltalk.AIContext)})},
  137. messageSends: []}),
  138. smalltalk.AIContext);
  139. smalltalk.addMethod(
  140. "_receiver",
  141. smalltalk.method({
  142. selector: "receiver",
  143. fn: function (){
  144. var self=this;
  145. return smalltalk.withContext(function($ctx1) { var $1;
  146. $1=_st(self)._localAt_("self");
  147. return $1;
  148. }, function($ctx1) {$ctx1.fill(self,"receiver",{},smalltalk.AIContext)})},
  149. messageSends: ["localAt:"]}),
  150. smalltalk.AIContext);
  151. smalltalk.addMethod(
  152. "_receiver_",
  153. smalltalk.method({
  154. selector: "receiver:",
  155. fn: function (anObject){
  156. var self=this;
  157. return smalltalk.withContext(function($ctx1) { _st(self)._localAt_put_("self",anObject);
  158. return self}, function($ctx1) {$ctx1.fill(self,"receiver:",{anObject:anObject},smalltalk.AIContext)})},
  159. messageSends: ["localAt:put:"]}),
  160. smalltalk.AIContext);
  161. smalltalk.addMethod(
  162. "_selector",
  163. smalltalk.method({
  164. selector: "selector",
  165. fn: function (){
  166. var self=this;
  167. return smalltalk.withContext(function($ctx1) { var $2,$1;
  168. $2=_st(self)._metod();
  169. if(($receiver = $2) == nil || $receiver == undefined){
  170. $1=$2;
  171. } else {
  172. $1=_st(_st(self)._method())._selector();
  173. };
  174. return $1;
  175. }, function($ctx1) {$ctx1.fill(self,"selector",{},smalltalk.AIContext)})},
  176. messageSends: ["ifNotNil:", "selector", "method", "metod"]}),
  177. smalltalk.AIContext);
  178. smalltalk.addMethod(
  179. "_fromMethodContext_",
  180. smalltalk.method({
  181. selector: "fromMethodContext:",
  182. fn: function (aMethodContext){
  183. var self=this;
  184. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  185. $2=_st(self)._new();
  186. _st($2)._initializeFromMethodContext_(aMethodContext);
  187. $3=_st($2)._yourself();
  188. $1=$3;
  189. return $1;
  190. }, function($ctx1) {$ctx1.fill(self,"fromMethodContext:",{aMethodContext:aMethodContext},smalltalk.AIContext.klass)})},
  191. messageSends: ["initializeFromMethodContext:", "new", "yourself"]}),
  192. smalltalk.AIContext.klass);
  193. smalltalk.addClass('ASTDebugger', smalltalk.Object, ['interpreter', 'context'], 'Compiler-Interpreter');
  194. smalltalk.addMethod(
  195. "_buildAST",
  196. smalltalk.method({
  197. selector: "buildAST",
  198. fn: function (){
  199. var self=this;
  200. var ast;
  201. return smalltalk.withContext(function($ctx1) { var $1;
  202. ast=_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._parse_(_st(_st(self)._method())._source());
  203. _st(_st((smalltalk.SemanticAnalyzer || SemanticAnalyzer))._on_(_st(_st(_st(self)._context())._receiver())._class()))._visit_(ast);
  204. $1=ast;
  205. return $1;
  206. }, function($ctx1) {$ctx1.fill(self,"buildAST",{ast:ast},smalltalk.ASTDebugger)})},
  207. messageSends: ["parse:", "source", "method", "current", "visit:", "on:", "class", "receiver", "context"]}),
  208. smalltalk.ASTDebugger);
  209. smalltalk.addMethod(
  210. "_context",
  211. smalltalk.method({
  212. selector: "context",
  213. fn: function (){
  214. var self=this;
  215. return smalltalk.withContext(function($ctx1) { var $1;
  216. $1=self["@context"];
  217. return $1;
  218. }, function($ctx1) {$ctx1.fill(self,"context",{},smalltalk.ASTDebugger)})},
  219. messageSends: []}),
  220. smalltalk.ASTDebugger);
  221. smalltalk.addMethod(
  222. "_context_",
  223. smalltalk.method({
  224. selector: "context:",
  225. fn: function (aContext){
  226. var self=this;
  227. return smalltalk.withContext(function($ctx1) { self["@context"]=_st((smalltalk.AIContext || AIContext))._new();
  228. return self}, function($ctx1) {$ctx1.fill(self,"context:",{aContext:aContext},smalltalk.ASTDebugger)})},
  229. messageSends: ["new"]}),
  230. smalltalk.ASTDebugger);
  231. smalltalk.addMethod(
  232. "_defaultInterpreterClass",
  233. smalltalk.method({
  234. selector: "defaultInterpreterClass",
  235. fn: function (){
  236. var self=this;
  237. return smalltalk.withContext(function($ctx1) { var $1;
  238. $1=(smalltalk.ASTSteppingInterpreter || ASTSteppingInterpreter);
  239. return $1;
  240. }, function($ctx1) {$ctx1.fill(self,"defaultInterpreterClass",{},smalltalk.ASTDebugger)})},
  241. messageSends: []}),
  242. smalltalk.ASTDebugger);
  243. smalltalk.addMethod(
  244. "_initializeInterpreter",
  245. smalltalk.method({
  246. selector: "initializeInterpreter",
  247. fn: function (){
  248. var self=this;
  249. return smalltalk.withContext(function($ctx1) { _st(_st(self)._interpreter())._interpret_(_st(_st(_st(self)._buildAST())._nodes())._first());
  250. return self}, function($ctx1) {$ctx1.fill(self,"initializeInterpreter",{},smalltalk.ASTDebugger)})},
  251. messageSends: ["interpret:", "first", "nodes", "buildAST", "interpreter"]}),
  252. smalltalk.ASTDebugger);
  253. smalltalk.addMethod(
  254. "_initializeWithContext_",
  255. smalltalk.method({
  256. selector: "initializeWithContext:",
  257. fn: function (aMethodContext){
  258. var self=this;
  259. return smalltalk.withContext(function($ctx1) { _st(self)._context_(_st((smalltalk.AIContext || AIContext))._fromMethodContext_(aMethodContext));
  260. _st(self)._initializeInterpreter();
  261. return self}, function($ctx1) {$ctx1.fill(self,"initializeWithContext:",{aMethodContext:aMethodContext},smalltalk.ASTDebugger)})},
  262. messageSends: ["context:", "fromMethodContext:", "initializeInterpreter"]}),
  263. smalltalk.ASTDebugger);
  264. smalltalk.addMethod(
  265. "_interpreter",
  266. smalltalk.method({
  267. selector: "interpreter",
  268. fn: function (){
  269. var self=this;
  270. return smalltalk.withContext(function($ctx1) { var $2,$1;
  271. $2=self["@interpreter"];
  272. if(($receiver = $2) == nil || $receiver == undefined){
  273. self["@interpreter"]=_st(_st(self)._defaultInterpreterClass())._new();
  274. $1=self["@interpreter"];
  275. } else {
  276. $1=$2;
  277. };
  278. return $1;
  279. }, function($ctx1) {$ctx1.fill(self,"interpreter",{},smalltalk.ASTDebugger)})},
  280. messageSends: ["ifNil:", "new", "defaultInterpreterClass"]}),
  281. smalltalk.ASTDebugger);
  282. smalltalk.addMethod(
  283. "_interpreter_",
  284. smalltalk.method({
  285. selector: "interpreter:",
  286. fn: function (anInterpreter){
  287. var self=this;
  288. return smalltalk.withContext(function($ctx1) { self["@interpreter"]=anInterpreter;
  289. return self}, function($ctx1) {$ctx1.fill(self,"interpreter:",{anInterpreter:anInterpreter},smalltalk.ASTDebugger)})},
  290. messageSends: []}),
  291. smalltalk.ASTDebugger);
  292. smalltalk.addMethod(
  293. "_method",
  294. smalltalk.method({
  295. selector: "method",
  296. fn: function (){
  297. var self=this;
  298. return smalltalk.withContext(function($ctx1) { var $1;
  299. $1=_st(_st(self)._context())._method();
  300. return $1;
  301. }, function($ctx1) {$ctx1.fill(self,"method",{},smalltalk.ASTDebugger)})},
  302. messageSends: ["method", "context"]}),
  303. smalltalk.ASTDebugger);
  304. smalltalk.addMethod(
  305. "_restart",
  306. smalltalk.method({
  307. selector: "restart",
  308. fn: function (){
  309. var self=this;
  310. return smalltalk.withContext(function($ctx1) { _st(self)._shouldBeImplemented();
  311. return self}, function($ctx1) {$ctx1.fill(self,"restart",{},smalltalk.ASTDebugger)})},
  312. messageSends: ["shouldBeImplemented"]}),
  313. smalltalk.ASTDebugger);
  314. smalltalk.addMethod(
  315. "_resume",
  316. smalltalk.method({
  317. selector: "resume",
  318. fn: function (){
  319. var self=this;
  320. return smalltalk.withContext(function($ctx1) { _st(self)._shouldBeImplemented();
  321. return self}, function($ctx1) {$ctx1.fill(self,"resume",{},smalltalk.ASTDebugger)})},
  322. messageSends: ["shouldBeImplemented"]}),
  323. smalltalk.ASTDebugger);
  324. smalltalk.addMethod(
  325. "_step",
  326. smalltalk.method({
  327. selector: "step",
  328. fn: function (){
  329. var self=this;
  330. return smalltalk.withContext(function($ctx1) { _st((function(){
  331. return smalltalk.withContext(function($ctx2) { return _st(_st(_st(_st(_st(self)._interpreter())._nextNode())._notNil())._and_((function(){
  332. return smalltalk.withContext(function($ctx3) { return _st(_st(_st(self)._interpreter())._nextNode())._stopOnStepping();
  333. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})})))._or_((function(){
  334. return smalltalk.withContext(function($ctx3) { return _st(_st(_st(self)._interpreter())._atEnd())._not();
  335. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  336. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileFalse_((function(){
  337. return smalltalk.withContext(function($ctx2) { _st(_st(self)._interpreter())._step();
  338. return _st(self)._step();
  339. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  340. return self}, function($ctx1) {$ctx1.fill(self,"step",{},smalltalk.ASTDebugger)})},
  341. messageSends: ["whileFalse:", "step", "interpreter", "or:", "not", "atEnd", "and:", "stopOnStepping", "nextNode", "notNil"]}),
  342. smalltalk.ASTDebugger);
  343. smalltalk.addMethod(
  344. "_stepInto",
  345. smalltalk.method({
  346. selector: "stepInto",
  347. fn: function (){
  348. var self=this;
  349. return smalltalk.withContext(function($ctx1) { _st(self)._shouldBeImplemented();
  350. return self}, function($ctx1) {$ctx1.fill(self,"stepInto",{},smalltalk.ASTDebugger)})},
  351. messageSends: ["shouldBeImplemented"]}),
  352. smalltalk.ASTDebugger);
  353. smalltalk.addMethod(
  354. "_stepOver",
  355. smalltalk.method({
  356. selector: "stepOver",
  357. fn: function (){
  358. var self=this;
  359. return smalltalk.withContext(function($ctx1) { _st(self)._step();
  360. return self}, function($ctx1) {$ctx1.fill(self,"stepOver",{},smalltalk.ASTDebugger)})},
  361. messageSends: ["step"]}),
  362. smalltalk.ASTDebugger);
  363. smalltalk.addMethod(
  364. "_context_",
  365. smalltalk.method({
  366. selector: "context:",
  367. fn: function (aMethodContext){
  368. var self=this;
  369. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  370. $2=_st(self)._new();
  371. _st($2)._initializeWithContext_(aMethodContext);
  372. $3=_st($2)._yourself();
  373. $1=$3;
  374. return $1;
  375. }, function($ctx1) {$ctx1.fill(self,"context:",{aMethodContext:aMethodContext},smalltalk.ASTDebugger.klass)})},
  376. messageSends: ["initializeWithContext:", "new", "yourself"]}),
  377. smalltalk.ASTDebugger.klass);
  378. smalltalk.addClass('ASTInterpreter', smalltalk.Object, ['currentNode', 'context', 'shouldReturn', 'result'], 'Compiler-Interpreter');
  379. smalltalk.addMethod(
  380. "_assign_to_",
  381. smalltalk.method({
  382. selector: "assign:to:",
  383. fn: function (aNode,anObject){
  384. var self=this;
  385. return smalltalk.withContext(function($ctx1) { var $2,$1;
  386. $2=_st(_st(aNode)._binding())._isInstanceVar();
  387. if(smalltalk.assert($2)){
  388. $1=_st(_st(_st(self)._context())._receiver())._instVarAt_put_(_st(aNode)._value(),anObject);
  389. } else {
  390. $1=_st(_st(self)._context())._localAt_put_(_st(aNode)._value(),anObject);
  391. };
  392. return $1;
  393. }, function($ctx1) {$ctx1.fill(self,"assign:to:",{aNode:aNode,anObject:anObject},smalltalk.ASTInterpreter)})},
  394. messageSends: ["ifTrue:ifFalse:", "instVarAt:put:", "value", "receiver", "context", "localAt:put:", "isInstanceVar", "binding"]}),
  395. smalltalk.ASTInterpreter);
  396. smalltalk.addMethod(
  397. "_context",
  398. smalltalk.method({
  399. selector: "context",
  400. fn: function (){
  401. var self=this;
  402. return smalltalk.withContext(function($ctx1) { var $2,$1;
  403. $2=self["@context"];
  404. if(($receiver = $2) == nil || $receiver == undefined){
  405. self["@context"]=_st((smalltalk.AIContext || AIContext))._new();
  406. $1=self["@context"];
  407. } else {
  408. $1=$2;
  409. };
  410. return $1;
  411. }, function($ctx1) {$ctx1.fill(self,"context",{},smalltalk.ASTInterpreter)})},
  412. messageSends: ["ifNil:", "new"]}),
  413. smalltalk.ASTInterpreter);
  414. smalltalk.addMethod(
  415. "_context_",
  416. smalltalk.method({
  417. selector: "context:",
  418. fn: function (anAIContext){
  419. var self=this;
  420. return smalltalk.withContext(function($ctx1) { self["@context"]=anAIContext;
  421. return self}, function($ctx1) {$ctx1.fill(self,"context:",{anAIContext:anAIContext},smalltalk.ASTInterpreter)})},
  422. messageSends: []}),
  423. smalltalk.ASTInterpreter);
  424. smalltalk.addMethod(
  425. "_continue_value_",
  426. smalltalk.method({
  427. selector: "continue:value:",
  428. fn: function (aBlock,anObject){
  429. var self=this;
  430. return smalltalk.withContext(function($ctx1) { self["@result"]=anObject;
  431. _st(aBlock)._value_(anObject);
  432. return self}, function($ctx1) {$ctx1.fill(self,"continue:value:",{aBlock:aBlock,anObject:anObject},smalltalk.ASTInterpreter)})},
  433. messageSends: ["value:"]}),
  434. smalltalk.ASTInterpreter);
  435. smalltalk.addMethod(
  436. "_currentNode",
  437. smalltalk.method({
  438. selector: "currentNode",
  439. fn: function (){
  440. var self=this;
  441. return smalltalk.withContext(function($ctx1) { var $1;
  442. $1=self["@currentNode"];
  443. return $1;
  444. }, function($ctx1) {$ctx1.fill(self,"currentNode",{},smalltalk.ASTInterpreter)})},
  445. messageSends: []}),
  446. smalltalk.ASTInterpreter);
  447. smalltalk.addMethod(
  448. "_eval_",
  449. smalltalk.method({
  450. selector: "eval:",
  451. fn: function (aString){
  452. var self=this;
  453. var source,function_;
  454. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  455. source=_st((smalltalk.String || String))._streamContents_((function(str){
  456. return smalltalk.withContext(function($ctx2) { _st(str)._nextPutAll_("(function(");
  457. _st(_st(_st(_st(self)._context())._locals())._keys())._do_separatedBy_((function(each){
  458. return smalltalk.withContext(function($ctx3) { return _st(str)._nextPutAll_(each);
  459. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}),(function(){
  460. return smalltalk.withContext(function($ctx3) { return _st(str)._nextPutAll_(",");
  461. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  462. $1=str;
  463. _st($1)._nextPutAll_("){ return (function() {");
  464. _st($1)._nextPutAll_(aString);
  465. $2=_st($1)._nextPutAll_("})() })");
  466. return $2;
  467. }, function($ctx2) {$ctx2.fillBlock({str:str},$ctx1)})}));
  468. function_=_st(_st((smalltalk.Compiler || Compiler))._new())._eval_(source);
  469. $3=_st(function_)._valueWithPossibleArguments_(_st(_st(_st(self)._context())._locals())._values());
  470. return $3;
  471. }, function($ctx1) {$ctx1.fill(self,"eval:",{aString:aString,source:source,function_:function_},smalltalk.ASTInterpreter)})},
  472. messageSends: ["streamContents:", "nextPutAll:", "do:separatedBy:", "keys", "locals", "context", "eval:", "new", "valueWithPossibleArguments:", "values"]}),
  473. smalltalk.ASTInterpreter);
  474. smalltalk.addMethod(
  475. "_initialize",
  476. smalltalk.method({
  477. selector: "initialize",
  478. fn: function (){
  479. var self=this;
  480. return smalltalk.withContext(function($ctx1) { smalltalk.Object.fn.prototype._initialize.apply(_st(self), []);
  481. self["@shouldReturn"]=false;
  482. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.ASTInterpreter)})},
  483. messageSends: ["initialize"]}),
  484. smalltalk.ASTInterpreter);
  485. smalltalk.addMethod(
  486. "_interpret_",
  487. smalltalk.method({
  488. selector: "interpret:",
  489. fn: function (aNode){
  490. var self=this;
  491. return smalltalk.withContext(function($ctx1) { self["@shouldReturn"]=false;
  492. _st(self)._interpret_continue_(aNode,(function(value){
  493. return smalltalk.withContext(function($ctx2) { self["@result"]=value;
  494. return self["@result"];
  495. }, function($ctx2) {$ctx2.fillBlock({value:value},$ctx1)})}));
  496. return self}, function($ctx1) {$ctx1.fill(self,"interpret:",{aNode:aNode},smalltalk.ASTInterpreter)})},
  497. messageSends: ["interpret:continue:"]}),
  498. smalltalk.ASTInterpreter);
  499. smalltalk.addMethod(
  500. "_interpret_continue_",
  501. smalltalk.method({
  502. selector: "interpret:continue:",
  503. fn: function (aNode,aBlock){
  504. var self=this;
  505. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  506. $1=self["@shouldReturn"];
  507. if(smalltalk.assert($1)){
  508. $2=self;
  509. return $2;
  510. };
  511. $3=_st(aNode)._isNode();
  512. if(smalltalk.assert($3)){
  513. self["@currentNode"]=aNode;
  514. self["@currentNode"];
  515. _st(self)._interpretNode_continue_(aNode,(function(value){
  516. return smalltalk.withContext(function($ctx2) { return _st(self)._continue_value_(aBlock,value);
  517. }, function($ctx2) {$ctx2.fillBlock({value:value},$ctx1)})}));
  518. } else {
  519. _st(self)._continue_value_(aBlock,aNode);
  520. };
  521. return self}, function($ctx1) {$ctx1.fill(self,"interpret:continue:",{aNode:aNode,aBlock:aBlock},smalltalk.ASTInterpreter)})},
  522. messageSends: ["ifTrue:", "ifTrue:ifFalse:", "interpretNode:continue:", "continue:value:", "isNode"]}),
  523. smalltalk.ASTInterpreter);
  524. smalltalk.addMethod(
  525. "_interpretAll_continue_",
  526. smalltalk.method({
  527. selector: "interpretAll:continue:",
  528. fn: function (aCollection,aBlock){
  529. var self=this;
  530. return smalltalk.withContext(function($ctx1) { _st(self)._interpretAll_continue_result_(aCollection,aBlock,_st((smalltalk.OrderedCollection || OrderedCollection))._new());
  531. return self}, function($ctx1) {$ctx1.fill(self,"interpretAll:continue:",{aCollection:aCollection,aBlock:aBlock},smalltalk.ASTInterpreter)})},
  532. messageSends: ["interpretAll:continue:result:", "new"]}),
  533. smalltalk.ASTInterpreter);
  534. smalltalk.addMethod(
  535. "_interpretAll_continue_result_",
  536. smalltalk.method({
  537. selector: "interpretAll:continue:result:",
  538. fn: function (nodes,aBlock,aCollection){
  539. var self=this;
  540. return smalltalk.withContext(function($ctx1) { var $1;
  541. $1=_st(nodes)._isEmpty();
  542. if(smalltalk.assert($1)){
  543. _st(self)._continue_value_(aBlock,aCollection);
  544. } else {
  545. _st(self)._interpret_continue_(_st(nodes)._first(),(function(value){
  546. return smalltalk.withContext(function($ctx2) { return _st(self)._interpretAll_continue_result_(_st(nodes)._allButFirst(),aBlock,_st(aCollection).__comma([value]));
  547. }, function($ctx2) {$ctx2.fillBlock({value:value},$ctx1)})}));
  548. };
  549. return self}, function($ctx1) {$ctx1.fill(self,"interpretAll:continue:result:",{nodes:nodes,aBlock:aBlock,aCollection:aCollection},smalltalk.ASTInterpreter)})},
  550. messageSends: ["ifTrue:ifFalse:", "continue:value:", "interpret:continue:", "first", "interpretAll:continue:result:", "allButFirst", ",", "isEmpty"]}),
  551. smalltalk.ASTInterpreter);
  552. smalltalk.addMethod(
  553. "_interpretAssignmentNode_continue_",
  554. smalltalk.method({
  555. selector: "interpretAssignmentNode:continue:",
  556. fn: function (aNode,aBlock){
  557. var self=this;
  558. return smalltalk.withContext(function($ctx1) { _st(self)._interpret_continue_(_st(aNode)._right(),(function(value){
  559. return smalltalk.withContext(function($ctx2) { return _st(self)._continue_value_(aBlock,_st(self)._assign_to_(_st(aNode)._left(),value));
  560. }, function($ctx2) {$ctx2.fillBlock({value:value},$ctx1)})}));
  561. return self}, function($ctx1) {$ctx1.fill(self,"interpretAssignmentNode:continue:",{aNode:aNode,aBlock:aBlock},smalltalk.ASTInterpreter)})},
  562. messageSends: ["interpret:continue:", "right", "continue:value:", "assign:to:", "left"]}),
  563. smalltalk.ASTInterpreter);
  564. smalltalk.addMethod(
  565. "_interpretBlockNode_continue_",
  566. smalltalk.method({
  567. selector: "interpretBlockNode:continue:",
  568. fn: function (aNode,aBlock){
  569. var self=this;
  570. return smalltalk.withContext(function($ctx1) { var $1,$2;
  571. _st(self)._continue_value_(aBlock,(function(){
  572. return smalltalk.withContext(function($ctx2) { $1=self;
  573. _st($1)._interpret_(_st(_st(aNode)._nodes())._first());
  574. $2=_st($1)._result();
  575. return $2;
  576. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  577. return self}, function($ctx1) {$ctx1.fill(self,"interpretBlockNode:continue:",{aNode:aNode,aBlock:aBlock},smalltalk.ASTInterpreter)})},
  578. messageSends: ["continue:value:", "interpret:", "first", "nodes", "result"]}),
  579. smalltalk.ASTInterpreter);
  580. smalltalk.addMethod(
  581. "_interpretBlockSequenceNode_continue_",
  582. smalltalk.method({
  583. selector: "interpretBlockSequenceNode:continue:",
  584. fn: function (aNode,aBlock){
  585. var self=this;
  586. return smalltalk.withContext(function($ctx1) { _st(self)._interpretSequenceNode_continue_(aNode,aBlock);
  587. return self}, function($ctx1) {$ctx1.fill(self,"interpretBlockSequenceNode:continue:",{aNode:aNode,aBlock:aBlock},smalltalk.ASTInterpreter)})},
  588. messageSends: ["interpretSequenceNode:continue:"]}),
  589. smalltalk.ASTInterpreter);
  590. smalltalk.addMethod(
  591. "_interpretCascadeNode_continue_",
  592. smalltalk.method({
  593. selector: "interpretCascadeNode:continue:",
  594. fn: function (aNode,aBlock){
  595. var self=this;
  596. return smalltalk.withContext(function($ctx1) { _st(self)._interpret_continue_(_st(aNode)._receiver(),(function(receiver){
  597. return smalltalk.withContext(function($ctx2) { _st(_st(aNode)._nodes())._do_((function(each){
  598. return smalltalk.withContext(function($ctx3) { return _st(each)._receiver_(receiver);
  599. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}));
  600. return _st(self)._interpretAll_continue_(_st(_st(aNode)._nodes())._allButLast(),(function(){
  601. return smalltalk.withContext(function($ctx3) { return _st(self)._interpret_continue_(_st(_st(aNode)._nodes())._last(),(function(val){
  602. return smalltalk.withContext(function($ctx4) { return _st(self)._continue_value_(aBlock,val);
  603. }, function($ctx4) {$ctx4.fillBlock({val:val},$ctx1)})}));
  604. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  605. }, function($ctx2) {$ctx2.fillBlock({receiver:receiver},$ctx1)})}));
  606. return self}, function($ctx1) {$ctx1.fill(self,"interpretCascadeNode:continue:",{aNode:aNode,aBlock:aBlock},smalltalk.ASTInterpreter)})},
  607. messageSends: ["interpret:continue:", "receiver", "do:", "receiver:", "nodes", "interpretAll:continue:", "allButLast", "last", "continue:value:"]}),
  608. smalltalk.ASTInterpreter);
  609. smalltalk.addMethod(
  610. "_interpretClassReferenceNode_continue_",
  611. smalltalk.method({
  612. selector: "interpretClassReferenceNode:continue:",
  613. fn: function (aNode,aBlock){
  614. var self=this;
  615. return smalltalk.withContext(function($ctx1) { _st(self)._continue_value_(aBlock,_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._at_(_st(aNode)._value()));
  616. return self}, function($ctx1) {$ctx1.fill(self,"interpretClassReferenceNode:continue:",{aNode:aNode,aBlock:aBlock},smalltalk.ASTInterpreter)})},
  617. messageSends: ["continue:value:", "at:", "value", "current"]}),
  618. smalltalk.ASTInterpreter);
  619. smalltalk.addMethod(
  620. "_interpretDynamicArrayNode_continue_",
  621. smalltalk.method({
  622. selector: "interpretDynamicArrayNode:continue:",
  623. fn: function (aNode,aBlock){
  624. var self=this;
  625. return smalltalk.withContext(function($ctx1) { _st(self)._interpretAll_continue_(_st(aNode)._nodes(),(function(array){
  626. return smalltalk.withContext(function($ctx2) { return _st(self)._continue_value_(aBlock,array);
  627. }, function($ctx2) {$ctx2.fillBlock({array:array},$ctx1)})}));
  628. return self}, function($ctx1) {$ctx1.fill(self,"interpretDynamicArrayNode:continue:",{aNode:aNode,aBlock:aBlock},smalltalk.ASTInterpreter)})},
  629. messageSends: ["interpretAll:continue:", "nodes", "continue:value:"]}),
  630. smalltalk.ASTInterpreter);
  631. smalltalk.addMethod(
  632. "_interpretDynamicDictionaryNode_continue_",
  633. smalltalk.method({
  634. selector: "interpretDynamicDictionaryNode:continue:",
  635. fn: function (aNode,aBlock){
  636. var self=this;
  637. return smalltalk.withContext(function($ctx1) { _st(self)._interpretAll_continue_(_st(aNode)._nodes(),(function(array){
  638. var hashedCollection;
  639. return smalltalk.withContext(function($ctx2) { hashedCollection=_st((smalltalk.HashedCollection || HashedCollection))._new();
  640. hashedCollection;
  641. _st(array)._do_((function(each){
  642. return smalltalk.withContext(function($ctx3) { return _st(hashedCollection)._add_(each);
  643. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}));
  644. return _st(self)._continue_value_(aBlock,hashedCollection);
  645. }, function($ctx2) {$ctx2.fillBlock({array:array,hashedCollection:hashedCollection},$ctx1)})}));
  646. return self}, function($ctx1) {$ctx1.fill(self,"interpretDynamicDictionaryNode:continue:",{aNode:aNode,aBlock:aBlock},smalltalk.ASTInterpreter)})},
  647. messageSends: ["interpretAll:continue:", "nodes", "new", "do:", "add:", "continue:value:"]}),
  648. smalltalk.ASTInterpreter);
  649. smalltalk.addMethod(
  650. "_interpretJSStatementNode_continue_",
  651. smalltalk.method({
  652. selector: "interpretJSStatementNode:continue:",
  653. fn: function (aNode,aBlock){
  654. var self=this;
  655. return smalltalk.withContext(function($ctx1) { self["@shouldReturn"]=true;
  656. _st(self)._continue_value_(aBlock,_st(self)._eval_(_st(aNode)._source()));
  657. return self}, function($ctx1) {$ctx1.fill(self,"interpretJSStatementNode:continue:",{aNode:aNode,aBlock:aBlock},smalltalk.ASTInterpreter)})},
  658. messageSends: ["continue:value:", "eval:", "source"]}),
  659. smalltalk.ASTInterpreter);
  660. smalltalk.addMethod(
  661. "_interpretMethodNode_continue_",
  662. smalltalk.method({
  663. selector: "interpretMethodNode:continue:",
  664. fn: function (aNode,aBlock){
  665. var self=this;
  666. return smalltalk.withContext(function($ctx1) { _st(self)._interpretAll_continue_(_st(aNode)._nodes(),(function(array){
  667. return smalltalk.withContext(function($ctx2) { return _st(self)._continue_value_(aBlock,_st(array)._first());
  668. }, function($ctx2) {$ctx2.fillBlock({array:array},$ctx1)})}));
  669. return self}, function($ctx1) {$ctx1.fill(self,"interpretMethodNode:continue:",{aNode:aNode,aBlock:aBlock},smalltalk.ASTInterpreter)})},
  670. messageSends: ["interpretAll:continue:", "nodes", "continue:value:", "first"]}),
  671. smalltalk.ASTInterpreter);
  672. smalltalk.addMethod(
  673. "_interpretNode_continue_",
  674. smalltalk.method({
  675. selector: "interpretNode:continue:",
  676. fn: function (aNode,aBlock){
  677. var self=this;
  678. return smalltalk.withContext(function($ctx1) { _st(aNode)._interpreter_continue_(self,aBlock);
  679. return self}, function($ctx1) {$ctx1.fill(self,"interpretNode:continue:",{aNode:aNode,aBlock:aBlock},smalltalk.ASTInterpreter)})},
  680. messageSends: ["interpreter:continue:"]}),
  681. smalltalk.ASTInterpreter);
  682. smalltalk.addMethod(
  683. "_interpretReturnNode_continue_",
  684. smalltalk.method({
  685. selector: "interpretReturnNode:continue:",
  686. fn: function (aNode,aBlock){
  687. var self=this;
  688. return smalltalk.withContext(function($ctx1) { _st(self)._interpret_continue_(_st(_st(aNode)._nodes())._first(),(function(value){
  689. return smalltalk.withContext(function($ctx2) { self["@shouldReturn"]=true;
  690. self["@shouldReturn"];
  691. return _st(self)._continue_value_(aBlock,value);
  692. }, function($ctx2) {$ctx2.fillBlock({value:value},$ctx1)})}));
  693. return self}, function($ctx1) {$ctx1.fill(self,"interpretReturnNode:continue:",{aNode:aNode,aBlock:aBlock},smalltalk.ASTInterpreter)})},
  694. messageSends: ["interpret:continue:", "first", "nodes", "continue:value:"]}),
  695. smalltalk.ASTInterpreter);
  696. smalltalk.addMethod(
  697. "_interpretSendNode_continue_",
  698. smalltalk.method({
  699. selector: "interpretSendNode:continue:",
  700. fn: function (aNode,aBlock){
  701. var self=this;
  702. return smalltalk.withContext(function($ctx1) { _st(self)._interpret_continue_(_st(aNode)._receiver(),(function(receiver){
  703. return smalltalk.withContext(function($ctx2) { return _st(self)._interpretAll_continue_(_st(aNode)._arguments(),(function(args){
  704. return smalltalk.withContext(function($ctx3) { return _st(self)._messageFromSendNode_arguments_do_(aNode,args,(function(message){
  705. return smalltalk.withContext(function($ctx4) { _st(_st(self)._context())._pc_(_st(_st(_st(self)._context())._pc()).__plus((1)));
  706. return _st(self)._continue_value_(aBlock,_st(message)._sendTo_(receiver));
  707. }, function($ctx4) {$ctx4.fillBlock({message:message},$ctx1)})}));
  708. }, function($ctx3) {$ctx3.fillBlock({args:args},$ctx1)})}));
  709. }, function($ctx2) {$ctx2.fillBlock({receiver:receiver},$ctx1)})}));
  710. return self}, function($ctx1) {$ctx1.fill(self,"interpretSendNode:continue:",{aNode:aNode,aBlock:aBlock},smalltalk.ASTInterpreter)})},
  711. messageSends: ["interpret:continue:", "receiver", "interpretAll:continue:", "arguments", "messageFromSendNode:arguments:do:", "pc:", "+", "pc", "context", "continue:value:", "sendTo:"]}),
  712. smalltalk.ASTInterpreter);
  713. smalltalk.addMethod(
  714. "_interpretSequenceNode_continue_",
  715. smalltalk.method({
  716. selector: "interpretSequenceNode:continue:",
  717. fn: function (aNode,aBlock){
  718. var self=this;
  719. return smalltalk.withContext(function($ctx1) { _st(self)._interpretAll_continue_(_st(aNode)._nodes(),(function(array){
  720. return smalltalk.withContext(function($ctx2) { return _st(self)._continue_value_(aBlock,_st(array)._last());
  721. }, function($ctx2) {$ctx2.fillBlock({array:array},$ctx1)})}));
  722. return self}, function($ctx1) {$ctx1.fill(self,"interpretSequenceNode:continue:",{aNode:aNode,aBlock:aBlock},smalltalk.ASTInterpreter)})},
  723. messageSends: ["interpretAll:continue:", "nodes", "continue:value:", "last"]}),
  724. smalltalk.ASTInterpreter);
  725. smalltalk.addMethod(
  726. "_interpretValueNode_continue_",
  727. smalltalk.method({
  728. selector: "interpretValueNode:continue:",
  729. fn: function (aNode,aBlock){
  730. var self=this;
  731. return smalltalk.withContext(function($ctx1) { _st(self)._continue_value_(aBlock,_st(aNode)._value());
  732. return self}, function($ctx1) {$ctx1.fill(self,"interpretValueNode:continue:",{aNode:aNode,aBlock:aBlock},smalltalk.ASTInterpreter)})},
  733. messageSends: ["continue:value:", "value"]}),
  734. smalltalk.ASTInterpreter);
  735. smalltalk.addMethod(
  736. "_interpretVariableNode_continue_",
  737. smalltalk.method({
  738. selector: "interpretVariableNode:continue:",
  739. fn: function (aNode,aBlock){
  740. var self=this;
  741. return smalltalk.withContext(function($ctx1) { var $1,$2,$4,$3;
  742. $1=self;
  743. $2=aBlock;
  744. $4=_st(_st(aNode)._binding())._isInstanceVar();
  745. if(smalltalk.assert($4)){
  746. $3=_st(_st(_st(self)._context())._receiver())._instVarAt_(_st(aNode)._value());
  747. } else {
  748. $3=_st(_st(self)._context())._localAt_(_st(aNode)._value());
  749. };
  750. _st($1)._continue_value_($2,$3);
  751. return self}, function($ctx1) {$ctx1.fill(self,"interpretVariableNode:continue:",{aNode:aNode,aBlock:aBlock},smalltalk.ASTInterpreter)})},
  752. messageSends: ["continue:value:", "ifTrue:ifFalse:", "instVarAt:", "value", "receiver", "context", "localAt:", "isInstanceVar", "binding"]}),
  753. smalltalk.ASTInterpreter);
  754. smalltalk.addMethod(
  755. "_messageFromSendNode_arguments_do_",
  756. smalltalk.method({
  757. selector: "messageFromSendNode:arguments:do:",
  758. fn: function (aSendNode,aCollection,aBlock){
  759. var self=this;
  760. return smalltalk.withContext(function($ctx1) { var $1,$2;
  761. $1=_st((smalltalk.Message || Message))._new();
  762. _st($1)._selector_(_st(aSendNode)._selector());
  763. _st($1)._arguments_(aCollection);
  764. $2=_st($1)._yourself();
  765. _st(self)._continue_value_(aBlock,$2);
  766. return self}, function($ctx1) {$ctx1.fill(self,"messageFromSendNode:arguments:do:",{aSendNode:aSendNode,aCollection:aCollection,aBlock:aBlock},smalltalk.ASTInterpreter)})},
  767. messageSends: ["continue:value:", "selector:", "selector", "new", "arguments:", "yourself"]}),
  768. smalltalk.ASTInterpreter);
  769. smalltalk.addMethod(
  770. "_result",
  771. smalltalk.method({
  772. selector: "result",
  773. fn: function (){
  774. var self=this;
  775. return smalltalk.withContext(function($ctx1) { var $1;
  776. $1=self["@result"];
  777. return $1;
  778. }, function($ctx1) {$ctx1.fill(self,"result",{},smalltalk.ASTInterpreter)})},
  779. messageSends: []}),
  780. smalltalk.ASTInterpreter);
  781. smalltalk.addMethod(
  782. "_shouldReturn",
  783. smalltalk.method({
  784. selector: "shouldReturn",
  785. fn: function (){
  786. var self=this;
  787. return smalltalk.withContext(function($ctx1) { var $2,$1;
  788. $2=self["@shouldReturn"];
  789. if(($receiver = $2) == nil || $receiver == undefined){
  790. $1=false;
  791. } else {
  792. $1=$2;
  793. };
  794. return $1;
  795. }, function($ctx1) {$ctx1.fill(self,"shouldReturn",{},smalltalk.ASTInterpreter)})},
  796. messageSends: ["ifNil:"]}),
  797. smalltalk.ASTInterpreter);
  798. smalltalk.addClass('ASTSteppingInterpreter', smalltalk.ASTInterpreter, ['continuation', 'nextNode'], 'Compiler-Interpreter');
  799. smalltalk.addMethod(
  800. "_atEnd",
  801. smalltalk.method({
  802. selector: "atEnd",
  803. fn: function (){
  804. var self=this;
  805. return smalltalk.withContext(function($ctx1) { var $1;
  806. $1=_st(_st(self)._shouldReturn())._or_((function(){
  807. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._nextNode()).__eq_eq(_st(self)._currentNode());
  808. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  809. return $1;
  810. }, function($ctx1) {$ctx1.fill(self,"atEnd",{},smalltalk.ASTSteppingInterpreter)})},
  811. messageSends: ["or:", "==", "currentNode", "nextNode", "shouldReturn"]}),
  812. smalltalk.ASTSteppingInterpreter);
  813. smalltalk.addMethod(
  814. "_initialize",
  815. smalltalk.method({
  816. selector: "initialize",
  817. fn: function (){
  818. var self=this;
  819. return smalltalk.withContext(function($ctx1) { smalltalk.ASTInterpreter.fn.prototype._initialize.apply(_st(self), []);
  820. self["@continuation"]=(function(){
  821. return smalltalk.withContext(function($ctx2) { }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
  822. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.ASTSteppingInterpreter)})},
  823. messageSends: ["initialize"]}),
  824. smalltalk.ASTSteppingInterpreter);
  825. smalltalk.addMethod(
  826. "_interpret_continue_",
  827. smalltalk.method({
  828. selector: "interpret:continue:",
  829. fn: function (aNode,aBlock){
  830. var self=this;
  831. return smalltalk.withContext(function($ctx1) { self["@nextNode"]=aNode;
  832. self["@continuation"]=(function(){
  833. return smalltalk.withContext(function($ctx2) { return smalltalk.ASTInterpreter.fn.prototype._interpret_continue_.apply(_st(self), [aNode,aBlock]);
  834. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
  835. return self}, function($ctx1) {$ctx1.fill(self,"interpret:continue:",{aNode:aNode,aBlock:aBlock},smalltalk.ASTSteppingInterpreter)})},
  836. messageSends: ["interpret:continue:"]}),
  837. smalltalk.ASTSteppingInterpreter);
  838. smalltalk.addMethod(
  839. "_nextNode",
  840. smalltalk.method({
  841. selector: "nextNode",
  842. fn: function (){
  843. var self=this;
  844. return smalltalk.withContext(function($ctx1) { var $1;
  845. $1=self["@nextNode"];
  846. return $1;
  847. }, function($ctx1) {$ctx1.fill(self,"nextNode",{},smalltalk.ASTSteppingInterpreter)})},
  848. messageSends: []}),
  849. smalltalk.ASTSteppingInterpreter);
  850. smalltalk.addMethod(
  851. "_step",
  852. smalltalk.method({
  853. selector: "step",
  854. fn: function (){
  855. var self=this;
  856. return smalltalk.withContext(function($ctx1) { _st(self["@continuation"])._value();
  857. return self}, function($ctx1) {$ctx1.fill(self,"step",{},smalltalk.ASTSteppingInterpreter)})},
  858. messageSends: ["value"]}),
  859. smalltalk.ASTSteppingInterpreter);
  860. smalltalk.addMethod(
  861. "_interpreter_continue_",
  862. smalltalk.method({
  863. selector: "interpreter:continue:",
  864. fn: function (anInterpreter,aBlock){
  865. var self=this;
  866. return smalltalk.withContext(function($ctx1) { var $1;
  867. $1=_st(anInterpreter)._interpretNode_continue_(self,aBlock);
  868. return $1;
  869. }, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock},smalltalk.Node)})},
  870. messageSends: ["interpretNode:continue:"]}),
  871. smalltalk.Node);
  872. smalltalk.addMethod(
  873. "_isSteppingNode",
  874. smalltalk.method({
  875. selector: "isSteppingNode",
  876. fn: function (){
  877. var self=this;
  878. return smalltalk.withContext(function($ctx1) { return false;
  879. }, function($ctx1) {$ctx1.fill(self,"isSteppingNode",{},smalltalk.Node)})},
  880. messageSends: []}),
  881. smalltalk.Node);
  882. smalltalk.addMethod(
  883. "_interpreter_continue_",
  884. smalltalk.method({
  885. selector: "interpreter:continue:",
  886. fn: function (anInterpreter,aBlock){
  887. var self=this;
  888. return smalltalk.withContext(function($ctx1) { var $1;
  889. $1=_st(anInterpreter)._interpretAssignmentNode_continue_(self,aBlock);
  890. return $1;
  891. }, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock},smalltalk.AssignmentNode)})},
  892. messageSends: ["interpretAssignmentNode:continue:"]}),
  893. smalltalk.AssignmentNode);
  894. smalltalk.addMethod(
  895. "_isSteppingNode",
  896. smalltalk.method({
  897. selector: "isSteppingNode",
  898. fn: function (){
  899. var self=this;
  900. return smalltalk.withContext(function($ctx1) { return true;
  901. }, function($ctx1) {$ctx1.fill(self,"isSteppingNode",{},smalltalk.AssignmentNode)})},
  902. messageSends: []}),
  903. smalltalk.AssignmentNode);
  904. smalltalk.addMethod(
  905. "_interpreter_continue_",
  906. smalltalk.method({
  907. selector: "interpreter:continue:",
  908. fn: function (anInterpreter,aBlock){
  909. var self=this;
  910. return smalltalk.withContext(function($ctx1) { var $1;
  911. $1=_st(anInterpreter)._interpretBlockNode_continue_(self,aBlock);
  912. return $1;
  913. }, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock},smalltalk.BlockNode)})},
  914. messageSends: ["interpretBlockNode:continue:"]}),
  915. smalltalk.BlockNode);
  916. smalltalk.addMethod(
  917. "_isSteppingNode",
  918. smalltalk.method({
  919. selector: "isSteppingNode",
  920. fn: function (){
  921. var self=this;
  922. return smalltalk.withContext(function($ctx1) { return true;
  923. }, function($ctx1) {$ctx1.fill(self,"isSteppingNode",{},smalltalk.BlockNode)})},
  924. messageSends: []}),
  925. smalltalk.BlockNode);
  926. smalltalk.addMethod(
  927. "_interpreter_continue_",
  928. smalltalk.method({
  929. selector: "interpreter:continue:",
  930. fn: function (anInterpreter,aBlock){
  931. var self=this;
  932. return smalltalk.withContext(function($ctx1) { var $1;
  933. $1=_st(anInterpreter)._interpretCascadeNode_continue_(self,aBlock);
  934. return $1;
  935. }, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock},smalltalk.CascadeNode)})},
  936. messageSends: ["interpretCascadeNode:continue:"]}),
  937. smalltalk.CascadeNode);
  938. smalltalk.addMethod(
  939. "_interpreter_continue_",
  940. smalltalk.method({
  941. selector: "interpreter:continue:",
  942. fn: function (anInterpreter,aBlock){
  943. var self=this;
  944. return smalltalk.withContext(function($ctx1) { var $1;
  945. $1=_st(anInterpreter)._interpretDynamicArrayNode_continue_(self,aBlock);
  946. return $1;
  947. }, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock},smalltalk.DynamicArrayNode)})},
  948. messageSends: ["interpretDynamicArrayNode:continue:"]}),
  949. smalltalk.DynamicArrayNode);
  950. smalltalk.addMethod(
  951. "_isSteppingNode",
  952. smalltalk.method({
  953. selector: "isSteppingNode",
  954. fn: function (){
  955. var self=this;
  956. return smalltalk.withContext(function($ctx1) { return true;
  957. }, function($ctx1) {$ctx1.fill(self,"isSteppingNode",{},smalltalk.DynamicArrayNode)})},
  958. messageSends: []}),
  959. smalltalk.DynamicArrayNode);
  960. smalltalk.addMethod(
  961. "_interpreter_continue_",
  962. smalltalk.method({
  963. selector: "interpreter:continue:",
  964. fn: function (anInterpreter,aBlock){
  965. var self=this;
  966. return smalltalk.withContext(function($ctx1) { var $1;
  967. $1=_st(anInterpreter)._interpretDynamicDictionaryNode_continue_(self,aBlock);
  968. return $1;
  969. }, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock},smalltalk.DynamicDictionaryNode)})},
  970. messageSends: ["interpretDynamicDictionaryNode:continue:"]}),
  971. smalltalk.DynamicDictionaryNode);
  972. smalltalk.addMethod(
  973. "_isSteppingNode",
  974. smalltalk.method({
  975. selector: "isSteppingNode",
  976. fn: function (){
  977. var self=this;
  978. return smalltalk.withContext(function($ctx1) { return true;
  979. }, function($ctx1) {$ctx1.fill(self,"isSteppingNode",{},smalltalk.DynamicDictionaryNode)})},
  980. messageSends: []}),
  981. smalltalk.DynamicDictionaryNode);
  982. smalltalk.addMethod(
  983. "_interpreter_continue_",
  984. smalltalk.method({
  985. selector: "interpreter:continue:",
  986. fn: function (anInterpreter,aBlock){
  987. var self=this;
  988. return smalltalk.withContext(function($ctx1) { var $1;
  989. $1=_st(anInterpreter)._interpretJSStatementNode_continue_(self,aBlock);
  990. return $1;
  991. }, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock},smalltalk.JSStatementNode)})},
  992. messageSends: ["interpretJSStatementNode:continue:"]}),
  993. smalltalk.JSStatementNode);
  994. smalltalk.addMethod(
  995. "_isSteppingNode",
  996. smalltalk.method({
  997. selector: "isSteppingNode",
  998. fn: function (){
  999. var self=this;
  1000. return smalltalk.withContext(function($ctx1) { return true;
  1001. }, function($ctx1) {$ctx1.fill(self,"isSteppingNode",{},smalltalk.JSStatementNode)})},
  1002. messageSends: []}),
  1003. smalltalk.JSStatementNode);
  1004. smalltalk.addMethod(
  1005. "_interpreter_continue_",
  1006. smalltalk.method({
  1007. selector: "interpreter:continue:",
  1008. fn: function (anInterpreter,aBlock){
  1009. var self=this;
  1010. return smalltalk.withContext(function($ctx1) { var $1;
  1011. $1=_st(anInterpreter)._interpretMethodNode_continue_(self,aBlock);
  1012. return $1;
  1013. }, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock},smalltalk.MethodNode)})},
  1014. messageSends: ["interpretMethodNode:continue:"]}),
  1015. smalltalk.MethodNode);
  1016. smalltalk.addMethod(
  1017. "_interpreter_continue_",
  1018. smalltalk.method({
  1019. selector: "interpreter:continue:",
  1020. fn: function (anInterpreter,aBlock){
  1021. var self=this;
  1022. return smalltalk.withContext(function($ctx1) { var $1;
  1023. $1=_st(anInterpreter)._interpretReturnNode_continue_(self,aBlock);
  1024. return $1;
  1025. }, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock},smalltalk.ReturnNode)})},
  1026. messageSends: ["interpretReturnNode:continue:"]}),
  1027. smalltalk.ReturnNode);
  1028. smalltalk.addMethod(
  1029. "_interpreter_continue_",
  1030. smalltalk.method({
  1031. selector: "interpreter:continue:",
  1032. fn: function (anInterpreter,aBlock){
  1033. var self=this;
  1034. return smalltalk.withContext(function($ctx1) { var $1;
  1035. $1=_st(anInterpreter)._interpretSendNode_continue_(self,aBlock);
  1036. return $1;
  1037. }, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock},smalltalk.SendNode)})},
  1038. messageSends: ["interpretSendNode:continue:"]}),
  1039. smalltalk.SendNode);
  1040. smalltalk.addMethod(
  1041. "_isSteppingNode",
  1042. smalltalk.method({
  1043. selector: "isSteppingNode",
  1044. fn: function (){
  1045. var self=this;
  1046. return smalltalk.withContext(function($ctx1) { return true;
  1047. }, function($ctx1) {$ctx1.fill(self,"isSteppingNode",{},smalltalk.SendNode)})},
  1048. messageSends: []}),
  1049. smalltalk.SendNode);
  1050. smalltalk.addMethod(
  1051. "_interpreter_continue_",
  1052. smalltalk.method({
  1053. selector: "interpreter:continue:",
  1054. fn: function (anInterpreter,aBlock){
  1055. var self=this;
  1056. return smalltalk.withContext(function($ctx1) { var $1;
  1057. $1=_st(anInterpreter)._interpretSequenceNode_continue_(self,aBlock);
  1058. return $1;
  1059. }, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock},smalltalk.SequenceNode)})},
  1060. messageSends: ["interpretSequenceNode:continue:"]}),
  1061. smalltalk.SequenceNode);
  1062. smalltalk.addMethod(
  1063. "_interpreter_continue_",
  1064. smalltalk.method({
  1065. selector: "interpreter:continue:",
  1066. fn: function (anInterpreter,aBlock){
  1067. var self=this;
  1068. return smalltalk.withContext(function($ctx1) { var $1;
  1069. $1=_st(anInterpreter)._interpretBlockSequenceNode_continue_(self,aBlock);
  1070. return $1;
  1071. }, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock},smalltalk.BlockSequenceNode)})},
  1072. messageSends: ["interpretBlockSequenceNode:continue:"]}),
  1073. smalltalk.BlockSequenceNode);
  1074. smalltalk.addMethod(
  1075. "_interpreter_continue_",
  1076. smalltalk.method({
  1077. selector: "interpreter:continue:",
  1078. fn: function (anInterpreter,aBlock){
  1079. var self=this;
  1080. return smalltalk.withContext(function($ctx1) { var $1;
  1081. $1=_st(anInterpreter)._interpretValueNode_continue_(self,aBlock);
  1082. return $1;
  1083. }, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock},smalltalk.ValueNode)})},
  1084. messageSends: ["interpretValueNode:continue:"]}),
  1085. smalltalk.ValueNode);
  1086. smalltalk.addMethod(
  1087. "_interpreter_continue_",
  1088. smalltalk.method({
  1089. selector: "interpreter:continue:",
  1090. fn: function (anInterpreter,aBlock){
  1091. var self=this;
  1092. return smalltalk.withContext(function($ctx1) { var $1;
  1093. $1=_st(anInterpreter)._interpretVariableNode_continue_(self,aBlock);
  1094. return $1;
  1095. }, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock},smalltalk.VariableNode)})},
  1096. messageSends: ["interpretVariableNode:continue:"]}),
  1097. smalltalk.VariableNode);
  1098. smalltalk.addMethod(
  1099. "_interpreter_continue_",
  1100. smalltalk.method({
  1101. selector: "interpreter:continue:",
  1102. fn: function (anInterpreter,aBlock){
  1103. var self=this;
  1104. return smalltalk.withContext(function($ctx1) { var $1;
  1105. $1=_st(anInterpreter)._interpretClassReferenceNode_continue_(self,aBlock);
  1106. return $1;
  1107. }, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock},smalltalk.ClassReferenceNode)})},
  1108. messageSends: ["interpretClassReferenceNode:continue:"]}),
  1109. smalltalk.ClassReferenceNode);