1
0

Compiler-Interpreter.js 67 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786
  1. smalltalk.addPackage('Compiler-Interpreter');
  2. smalltalk.addClass('AIContext', smalltalk.NodeVisitor, ['outerContext', 'pc', 'locals', 'method'], 'Compiler-Interpreter');
  3. smalltalk.AIContext.comment="AIContext is like a `MethodContext`, used by the `ASTInterpreter`.\x0aUnlike a `MethodContext`, it is not read-only.\x0a\x0aWhen debugging, `AIContext` instances are created by copying the current `MethodContext` (thisContext)"
  4. smalltalk.addMethod(
  5. "_initializeFromMethodContext_",
  6. smalltalk.method({
  7. selector: "initializeFromMethodContext:",
  8. category: 'initialization',
  9. fn: function (aMethodContext) {
  10. var self=this;
  11. return smalltalk.withContext(function($ctx1) {
  12. var $1;
  13. _st(self)._pc_(_st(aMethodContext)._pc());
  14. _st(self)._receiver_(_st(aMethodContext)._receiver());
  15. _st(self)._method_(_st(aMethodContext)._method());
  16. $1=_st(aMethodContext)._outerContext();
  17. if(($receiver = $1) == nil || $receiver == undefined){
  18. $1;
  19. } else {
  20. _st(self)._outerContext_(_st(_st(self)._class())._fromMethodContext_(_st(aMethodContext)._outerContext()));
  21. };
  22. _st(_st(aMethodContext)._locals())._keysAndValuesDo_((function(key,value){
  23. return smalltalk.withContext(function($ctx2) {
  24. return _st(_st(self)._locals())._at_put_(key,value);
  25. }, function($ctx2) {$ctx2.fillBlock({key:key,value:value},$ctx1)})}));
  26. return self}, function($ctx1) {$ctx1.fill(self,"initializeFromMethodContext:",{aMethodContext:aMethodContext},smalltalk.AIContext)});},
  27. args: ["aMethodContext"],
  28. source: "initializeFromMethodContext: aMethodContext\x0a\x09self pc: aMethodContext pc.\x0a\x09self receiver: aMethodContext receiver.\x0a\x09self method: aMethodContext method.\x0a\x09aMethodContext outerContext ifNotNil: [\x0a\x09\x09self outerContext: (self class fromMethodContext: aMethodContext outerContext) ].\x0a\x09aMethodContext locals keysAndValuesDo: [ :key :value |\x0a\x09\x09self locals at: key put: value ]",
  29. messageSends: ["pc:", "pc", "receiver:", "receiver", "method:", "method", "ifNotNil:", "outerContext:", "fromMethodContext:", "outerContext", "class", "keysAndValuesDo:", "at:put:", "locals"],
  30. referencedClasses: []
  31. }),
  32. smalltalk.AIContext);
  33. smalltalk.addMethod(
  34. "_initializeLocals",
  35. smalltalk.method({
  36. selector: "initializeLocals",
  37. category: 'initialization',
  38. fn: function (){
  39. var self=this;
  40. function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  41. return smalltalk.withContext(function($ctx1) {
  42. self["@locals"]=_st($Dictionary())._new();
  43. _st(self["@locals"])._at_put_("thisContext",self);
  44. return self}, function($ctx1) {$ctx1.fill(self,"initializeLocals",{},smalltalk.AIContext)})},
  45. args: [],
  46. source: "initializeLocals\x0a\x09locals := Dictionary new.\x0a\x09locals at: 'thisContext' put: self.",
  47. messageSends: ["new", "at:put:"],
  48. referencedClasses: ["Dictionary"]
  49. }),
  50. smalltalk.AIContext);
  51. smalltalk.addMethod(
  52. "_localAt_",
  53. smalltalk.method({
  54. selector: "localAt:",
  55. category: 'accessing',
  56. fn: function (aString) {
  57. var self=this;
  58. return smalltalk.withContext(function($ctx1) {
  59. var $1;
  60. $1=_st(_st(self)._locals())._at_ifAbsent_(aString,(function(){
  61. return smalltalk.withContext(function($ctx2) {
  62. return nil;
  63. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  64. return $1;
  65. }, function($ctx1) {$ctx1.fill(self,"localAt:",{aString:aString},smalltalk.AIContext)});},
  66. args: ["aString"],
  67. source: "localAt: aString\x0a\x09^ self locals at: aString ifAbsent: [ nil ]",
  68. messageSends: ["at:ifAbsent:", "locals"],
  69. referencedClasses: []
  70. }),
  71. smalltalk.AIContext);
  72. smalltalk.addMethod(
  73. "_localAt_put_",
  74. smalltalk.method({
  75. selector: "localAt:put:",
  76. category: 'accessing',
  77. fn: function (aString, anObject) {
  78. var self=this;
  79. return smalltalk.withContext(function($ctx1) {
  80. _st(_st(self)._locals())._at_put_(aString,anObject);
  81. return self}, function($ctx1) {$ctx1.fill(self,"localAt:put:",{aString:aString,anObject:anObject},smalltalk.AIContext)});},
  82. args: ["aString", "anObject"],
  83. source: "localAt: aString put: anObject\x0a\x09self locals at: aString put: anObject",
  84. messageSends: ["at:put:", "locals"],
  85. referencedClasses: []
  86. }),
  87. smalltalk.AIContext);
  88. smalltalk.addMethod(
  89. "_locals",
  90. smalltalk.method({
  91. selector: "locals",
  92. category: 'accessing',
  93. fn: function (){
  94. var self=this;
  95. return smalltalk.withContext(function($ctx1) {
  96. var $1,$2;
  97. $1=self["@locals"];
  98. if(($receiver = $1) == nil || $receiver == undefined){
  99. _st(self)._initializeLocals();
  100. } else {
  101. $1;
  102. };
  103. $2=self["@locals"];
  104. return $2;
  105. }, function($ctx1) {$ctx1.fill(self,"locals",{},smalltalk.AIContext)})},
  106. args: [],
  107. source: "locals\x0a\x09locals ifNil: [ self initializeLocals ].\x0a\x09\x0a\x09^ locals",
  108. messageSends: ["ifNil:", "initializeLocals"],
  109. referencedClasses: []
  110. }),
  111. smalltalk.AIContext);
  112. smalltalk.addMethod(
  113. "_method",
  114. smalltalk.method({
  115. selector: "method",
  116. category: 'accessing',
  117. fn: function () {
  118. var self=this;
  119. return smalltalk.withContext(function($ctx1) {
  120. var $1;
  121. $1=self["@method"];
  122. return $1;
  123. }, function($ctx1) {$ctx1.fill(self,"method",{},smalltalk.AIContext)});},
  124. args: [],
  125. source: "method\x0a\x09^ method",
  126. messageSends: [],
  127. referencedClasses: []
  128. }),
  129. smalltalk.AIContext);
  130. smalltalk.addMethod(
  131. "_method_",
  132. smalltalk.method({
  133. selector: "method:",
  134. category: 'accessing',
  135. fn: function (aCompiledMethod) {
  136. var self=this;
  137. return smalltalk.withContext(function($ctx1) {
  138. self["@method"]=aCompiledMethod;
  139. return self}, function($ctx1) {$ctx1.fill(self,"method:",{aCompiledMethod:aCompiledMethod},smalltalk.AIContext)});},
  140. args: ["aCompiledMethod"],
  141. source: "method: aCompiledMethod\x0a\x09method := aCompiledMethod",
  142. messageSends: [],
  143. referencedClasses: []
  144. }),
  145. smalltalk.AIContext);
  146. smalltalk.addMethod(
  147. "_outerContext",
  148. smalltalk.method({
  149. selector: "outerContext",
  150. category: 'accessing',
  151. fn: function () {
  152. var self=this;
  153. return smalltalk.withContext(function($ctx1) {
  154. var $1;
  155. $1=self["@outerContext"];
  156. return $1;
  157. }, function($ctx1) {$ctx1.fill(self,"outerContext",{},smalltalk.AIContext)});},
  158. args: [],
  159. source: "outerContext\x0a\x09^ outerContext",
  160. messageSends: [],
  161. referencedClasses: []
  162. }),
  163. smalltalk.AIContext);
  164. smalltalk.addMethod(
  165. "_outerContext_",
  166. smalltalk.method({
  167. selector: "outerContext:",
  168. category: 'accessing',
  169. fn: function (anAIContext) {
  170. var self=this;
  171. return smalltalk.withContext(function($ctx1) {
  172. self["@outerContext"]=anAIContext;
  173. return self}, function($ctx1) {$ctx1.fill(self,"outerContext:",{anAIContext:anAIContext},smalltalk.AIContext)});},
  174. args: ["anAIContext"],
  175. source: "outerContext: anAIContext\x0a\x09outerContext := anAIContext",
  176. messageSends: [],
  177. referencedClasses: []
  178. }),
  179. smalltalk.AIContext);
  180. smalltalk.addMethod(
  181. "_pc",
  182. smalltalk.method({
  183. selector: "pc",
  184. category: 'accessing',
  185. fn: function () {
  186. var self=this;
  187. return smalltalk.withContext(function($ctx1) {
  188. var $2,$1;
  189. $2=self["@pc"];
  190. if(($receiver = $2) == nil || $receiver == undefined){
  191. self["@pc"]=(0);
  192. $1=self["@pc"];
  193. } else {
  194. $1=$2;
  195. };
  196. return $1;
  197. }, function($ctx1) {$ctx1.fill(self,"pc",{},smalltalk.AIContext)});},
  198. args: [],
  199. source: "pc\x0a\x09^ pc ifNil: [ pc := 0 ]",
  200. messageSends: ["ifNil:"],
  201. referencedClasses: []
  202. }),
  203. smalltalk.AIContext);
  204. smalltalk.addMethod(
  205. "_pc_",
  206. smalltalk.method({
  207. selector: "pc:",
  208. category: 'accessing',
  209. fn: function (anInteger) {
  210. var self=this;
  211. return smalltalk.withContext(function($ctx1) {
  212. self["@pc"]=anInteger;
  213. return self}, function($ctx1) {$ctx1.fill(self,"pc:",{anInteger:anInteger},smalltalk.AIContext)});},
  214. args: ["anInteger"],
  215. source: "pc: anInteger\x0a\x09pc := anInteger",
  216. messageSends: [],
  217. referencedClasses: []
  218. }),
  219. smalltalk.AIContext);
  220. smalltalk.addMethod(
  221. "_receiver",
  222. smalltalk.method({
  223. selector: "receiver",
  224. category: 'accessing',
  225. fn: function () {
  226. var self=this;
  227. return smalltalk.withContext(function($ctx1) {
  228. var $1;
  229. $1=_st(self)._localAt_("self");
  230. return $1;
  231. }, function($ctx1) {$ctx1.fill(self,"receiver",{},smalltalk.AIContext)});},
  232. args: [],
  233. source: "receiver\x0a\x09^ self localAt: 'self'",
  234. messageSends: ["localAt:"],
  235. referencedClasses: []
  236. }),
  237. smalltalk.AIContext);
  238. smalltalk.addMethod(
  239. "_receiver_",
  240. smalltalk.method({
  241. selector: "receiver:",
  242. category: 'accessing',
  243. fn: function (anObject) {
  244. var self=this;
  245. return smalltalk.withContext(function($ctx1) {
  246. _st(self)._localAt_put_("self",anObject);
  247. return self}, function($ctx1) {$ctx1.fill(self,"receiver:",{anObject:anObject},smalltalk.AIContext)});},
  248. args: ["anObject"],
  249. source: "receiver: anObject\x0a\x09self localAt: 'self' put: anObject",
  250. messageSends: ["localAt:put:"],
  251. referencedClasses: []
  252. }),
  253. smalltalk.AIContext);
  254. smalltalk.addMethod(
  255. "_selector",
  256. smalltalk.method({
  257. selector: "selector",
  258. category: 'accessing',
  259. fn: function (){
  260. var self=this;
  261. return smalltalk.withContext(function($ctx1) {
  262. var $2,$1;
  263. $2=_st(self)._method();
  264. if(($receiver = $2) == nil || $receiver == undefined){
  265. $1=$2;
  266. } else {
  267. $1=_st(_st(self)._method())._selector();
  268. };
  269. return $1;
  270. }, function($ctx1) {$ctx1.fill(self,"selector",{},smalltalk.AIContext)})},
  271. args: [],
  272. source: "selector\x0a\x09^ self method\x0a\x09\x09ifNotNil: [ self method selector ]",
  273. messageSends: ["ifNotNil:", "selector", "method"],
  274. referencedClasses: []
  275. }),
  276. smalltalk.AIContext);
  277. smalltalk.addMethod(
  278. "_fromMethodContext_",
  279. smalltalk.method({
  280. selector: "fromMethodContext:",
  281. category: 'instance creation',
  282. fn: function (aMethodContext) {
  283. var self=this;
  284. return smalltalk.withContext(function($ctx1) {
  285. var $2,$3,$1;
  286. $2=_st(self)._new();
  287. _st($2)._initializeFromMethodContext_(aMethodContext);
  288. $3=_st($2)._yourself();
  289. $1=$3;
  290. return $1;
  291. }, function($ctx1) {$ctx1.fill(self,"fromMethodContext:",{aMethodContext:aMethodContext},smalltalk.AIContext.klass)});},
  292. args: ["aMethodContext"],
  293. source: "fromMethodContext: aMethodContext\x0a\x09^ self new\x0a\x09\x09initializeFromMethodContext: aMethodContext;\x0a\x09\x09yourself",
  294. messageSends: ["initializeFromMethodContext:", "new", "yourself"],
  295. referencedClasses: []
  296. }),
  297. smalltalk.AIContext.klass);
  298. smalltalk.addClass('ASTDebugger', smalltalk.Object, ['interpreter', 'context'], 'Compiler-Interpreter');
  299. smalltalk.ASTDebugger.comment="ASTDebugger is a debugger to Amber.\x0aIt uses an AST interpreter to step through the code.\x0a\x0aASTDebugger instances are created from a `MethodContext` with `ASTDebugger class >> context:`.\x0aThey hold an `AIContext` instance internally, recursive copy of the `MethodContext`.\x0a\x0aUse the methods of the 'stepping' protocol to do stepping."
  300. smalltalk.addMethod(
  301. "_buildAST",
  302. smalltalk.method({
  303. selector: "buildAST",
  304. category: 'initialization',
  305. fn: function () {
  306. var self=this;
  307. var ast;
  308. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  309. function $SemanticAnalyzer(){return smalltalk.SemanticAnalyzer||(typeof SemanticAnalyzer=="undefined"?nil:SemanticAnalyzer)}
  310. return smalltalk.withContext(function($ctx1) {
  311. var $1;
  312. ast=_st(_st($Smalltalk())._current())._parse_(_st(_st(self)._method())._source());
  313. _st(_st($SemanticAnalyzer())._on_(_st(_st(_st(self)._context())._receiver())._class()))._visit_(ast);
  314. $1=ast;
  315. return $1;
  316. }, function($ctx1) {$ctx1.fill(self,"buildAST",{ast:ast},smalltalk.ASTDebugger)});},
  317. args: [],
  318. source: "buildAST\x0a\x09\x22Build the AST tree from the method source code.\x0a\x09The AST is annotated with a SemanticAnalyzer,\x0a\x09to know the semantics and bindings of each node needed for later debugging\x22\x0a\x09\x0a\x09| ast |\x0a\x09\x0a\x09ast := Smalltalk current parse: self method source.\x0a\x09(SemanticAnalyzer on: self context receiver class)\x0a\x09\x09visit: ast.\x0a\x09\x0a\x09^ ast",
  319. messageSends: ["parse:", "source", "method", "current", "visit:", "on:", "class", "receiver", "context"],
  320. referencedClasses: ["Smalltalk", "SemanticAnalyzer"]
  321. }),
  322. smalltalk.ASTDebugger);
  323. smalltalk.addMethod(
  324. "_context",
  325. smalltalk.method({
  326. selector: "context",
  327. category: 'accessing',
  328. fn: function () {
  329. var self=this;
  330. return smalltalk.withContext(function($ctx1) {
  331. var $1;
  332. $1=self["@context"];
  333. return $1;
  334. }, function($ctx1) {$ctx1.fill(self,"context",{},smalltalk.ASTDebugger)});},
  335. args: [],
  336. source: "context\x0a\x09^ context",
  337. messageSends: [],
  338. referencedClasses: []
  339. }),
  340. smalltalk.ASTDebugger);
  341. smalltalk.addMethod(
  342. "_context_",
  343. smalltalk.method({
  344. selector: "context:",
  345. category: 'accessing',
  346. fn: function (aContext) {
  347. var self=this;
  348. function $AIContext(){return smalltalk.AIContext||(typeof AIContext=="undefined"?nil:AIContext)}
  349. return smalltalk.withContext(function($ctx1) {
  350. self["@context"]=_st($AIContext())._new();
  351. return self}, function($ctx1) {$ctx1.fill(self,"context:",{aContext:aContext},smalltalk.ASTDebugger)});},
  352. args: ["aContext"],
  353. source: "context: aContext\x0a\x09context := AIContext new.",
  354. messageSends: ["new"],
  355. referencedClasses: ["AIContext"]
  356. }),
  357. smalltalk.ASTDebugger);
  358. smalltalk.addMethod(
  359. "_defaultInterpreterClass",
  360. smalltalk.method({
  361. selector: "defaultInterpreterClass",
  362. category: 'defaults',
  363. fn: function () {
  364. var self=this;
  365. function $ASTSteppingInterpreter(){return smalltalk.ASTSteppingInterpreter||(typeof ASTSteppingInterpreter=="undefined"?nil:ASTSteppingInterpreter)}
  366. return smalltalk.withContext(function($ctx1) {
  367. var $1;
  368. $1=$ASTSteppingInterpreter();
  369. return $1;
  370. }, function($ctx1) {$ctx1.fill(self,"defaultInterpreterClass",{},smalltalk.ASTDebugger)});},
  371. args: [],
  372. source: "defaultInterpreterClass\x0a\x09^ ASTSteppingInterpreter",
  373. messageSends: [],
  374. referencedClasses: ["ASTSteppingInterpreter"]
  375. }),
  376. smalltalk.ASTDebugger);
  377. smalltalk.addMethod(
  378. "_initializeInterpreter",
  379. smalltalk.method({
  380. selector: "initializeInterpreter",
  381. category: 'initialization',
  382. fn: function () {
  383. var self=this;
  384. return smalltalk.withContext(function($ctx1) {
  385. _st(_st(self)._interpreter())._interpret_(_st(_st(_st(self)._buildAST())._nodes())._first());
  386. return self}, function($ctx1) {$ctx1.fill(self,"initializeInterpreter",{},smalltalk.ASTDebugger)});},
  387. args: [],
  388. source: "initializeInterpreter\x0a\x09self interpreter interpret: self buildAST nodes first",
  389. messageSends: ["interpret:", "first", "nodes", "buildAST", "interpreter"],
  390. referencedClasses: []
  391. }),
  392. smalltalk.ASTDebugger);
  393. smalltalk.addMethod(
  394. "_initializeWithContext_",
  395. smalltalk.method({
  396. selector: "initializeWithContext:",
  397. category: 'initialization',
  398. fn: function (aMethodContext) {
  399. var self=this;
  400. function $AIContext(){return smalltalk.AIContext||(typeof AIContext=="undefined"?nil:AIContext)}
  401. return smalltalk.withContext(function($ctx1) {
  402. _st(self)._context_(_st($AIContext())._fromMethodContext_(aMethodContext));
  403. _st(self)._initializeInterpreter();
  404. return self}, function($ctx1) {$ctx1.fill(self,"initializeWithContext:",{aMethodContext:aMethodContext},smalltalk.ASTDebugger)});},
  405. args: ["aMethodContext"],
  406. source: "initializeWithContext: aMethodContext\x0a\x09\x22TODO: do we need to handle block contexts?\x22\x0a\x09\x0a\x09self context: (AIContext fromMethodContext: aMethodContext).\x0a\x09self initializeInterpreter",
  407. messageSends: ["context:", "fromMethodContext:", "initializeInterpreter"],
  408. referencedClasses: ["AIContext"]
  409. }),
  410. smalltalk.ASTDebugger);
  411. smalltalk.addMethod(
  412. "_interpreter",
  413. smalltalk.method({
  414. selector: "interpreter",
  415. category: 'accessing',
  416. fn: function () {
  417. var self=this;
  418. return smalltalk.withContext(function($ctx1) {
  419. var $2,$1;
  420. $2=self["@interpreter"];
  421. if(($receiver = $2) == nil || $receiver == undefined){
  422. self["@interpreter"]=_st(_st(self)._defaultInterpreterClass())._new();
  423. $1=self["@interpreter"];
  424. } else {
  425. $1=$2;
  426. };
  427. return $1;
  428. }, function($ctx1) {$ctx1.fill(self,"interpreter",{},smalltalk.ASTDebugger)});},
  429. args: [],
  430. source: "interpreter\x0a\x09^ interpreter ifNil: [ interpreter := self defaultInterpreterClass new ]",
  431. messageSends: ["ifNil:", "new", "defaultInterpreterClass"],
  432. referencedClasses: []
  433. }),
  434. smalltalk.ASTDebugger);
  435. smalltalk.addMethod(
  436. "_interpreter_",
  437. smalltalk.method({
  438. selector: "interpreter:",
  439. category: 'accessing',
  440. fn: function (anInterpreter) {
  441. var self=this;
  442. return smalltalk.withContext(function($ctx1) {
  443. self["@interpreter"]=anInterpreter;
  444. return self}, function($ctx1) {$ctx1.fill(self,"interpreter:",{anInterpreter:anInterpreter},smalltalk.ASTDebugger)});},
  445. args: ["anInterpreter"],
  446. source: "interpreter: anInterpreter\x0a\x09interpreter := anInterpreter",
  447. messageSends: [],
  448. referencedClasses: []
  449. }),
  450. smalltalk.ASTDebugger);
  451. smalltalk.addMethod(
  452. "_method",
  453. smalltalk.method({
  454. selector: "method",
  455. category: 'accessing',
  456. fn: function () {
  457. var self=this;
  458. return smalltalk.withContext(function($ctx1) {
  459. var $1;
  460. $1=_st(_st(self)._context())._method();
  461. return $1;
  462. }, function($ctx1) {$ctx1.fill(self,"method",{},smalltalk.ASTDebugger)});},
  463. args: [],
  464. source: "method\x0a\x09^ self context method",
  465. messageSends: ["method", "context"],
  466. referencedClasses: []
  467. }),
  468. smalltalk.ASTDebugger);
  469. smalltalk.addMethod(
  470. "_restart",
  471. smalltalk.method({
  472. selector: "restart",
  473. category: 'stepping',
  474. fn: function () {
  475. var self=this;
  476. return smalltalk.withContext(function($ctx1) {
  477. _st(self)._shouldBeImplemented();
  478. return self}, function($ctx1) {$ctx1.fill(self,"restart",{},smalltalk.ASTDebugger)});},
  479. args: [],
  480. source: "restart\x0a\x09self shouldBeImplemented",
  481. messageSends: ["shouldBeImplemented"],
  482. referencedClasses: []
  483. }),
  484. smalltalk.ASTDebugger);
  485. smalltalk.addMethod(
  486. "_resume",
  487. smalltalk.method({
  488. selector: "resume",
  489. category: 'stepping',
  490. fn: function () {
  491. var self=this;
  492. return smalltalk.withContext(function($ctx1) {
  493. _st(self)._shouldBeImplemented();
  494. return self}, function($ctx1) {$ctx1.fill(self,"resume",{},smalltalk.ASTDebugger)});},
  495. args: [],
  496. source: "resume\x0a\x09self shouldBeImplemented",
  497. messageSends: ["shouldBeImplemented"],
  498. referencedClasses: []
  499. }),
  500. smalltalk.ASTDebugger);
  501. smalltalk.addMethod(
  502. "_step",
  503. smalltalk.method({
  504. selector: "step",
  505. category: 'stepping',
  506. fn: function () {
  507. var self=this;
  508. return smalltalk.withContext(function($ctx1) {
  509. _st((function(){
  510. return smalltalk.withContext(function($ctx2) {
  511. return _st(_st(_st(_st(_st(self)._interpreter())._nextNode())._notNil())._and_((function(){
  512. return smalltalk.withContext(function($ctx3) {
  513. return _st(_st(_st(self)._interpreter())._nextNode())._stopOnStepping();
  514. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})})))._or_((function(){
  515. return smalltalk.withContext(function($ctx3) {
  516. return _st(_st(_st(self)._interpreter())._atEnd())._not();
  517. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  518. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileFalse_((function(){
  519. return smalltalk.withContext(function($ctx2) {
  520. _st(_st(self)._interpreter())._step();
  521. return _st(self)._step();
  522. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  523. return self}, function($ctx1) {$ctx1.fill(self,"step",{},smalltalk.ASTDebugger)});},
  524. args: [],
  525. source: "step\x0a\x09\x22The ASTSteppingInterpreter stops at each node interpretation.\x0a\x09One step will interpret nodes until:\x0a\x09- we get at the end\x0a\x09- the next node is a stepping node (send, assignment, etc.)\x22\x0a\x09\x0a\x09[ (self interpreter nextNode notNil and: [ self interpreter nextNode stopOnStepping ])\x0a\x09\x09or: [ self interpreter atEnd not ] ]\x0a\x09\x09\x09whileFalse: [\x0a\x09\x09\x09\x09self interpreter step.\x0a\x09\x09\x09\x09self step ]",
  526. messageSends: ["whileFalse:", "step", "interpreter", "or:", "not", "atEnd", "and:", "stopOnStepping", "nextNode", "notNil"],
  527. referencedClasses: []
  528. }),
  529. smalltalk.ASTDebugger);
  530. smalltalk.addMethod(
  531. "_stepInto",
  532. smalltalk.method({
  533. selector: "stepInto",
  534. category: 'stepping',
  535. fn: function () {
  536. var self=this;
  537. return smalltalk.withContext(function($ctx1) {
  538. _st(self)._shouldBeImplemented();
  539. return self}, function($ctx1) {$ctx1.fill(self,"stepInto",{},smalltalk.ASTDebugger)});},
  540. args: [],
  541. source: "stepInto\x0a\x09self shouldBeImplemented",
  542. messageSends: ["shouldBeImplemented"],
  543. referencedClasses: []
  544. }),
  545. smalltalk.ASTDebugger);
  546. smalltalk.addMethod(
  547. "_stepOver",
  548. smalltalk.method({
  549. selector: "stepOver",
  550. category: 'stepping',
  551. fn: function () {
  552. var self=this;
  553. return smalltalk.withContext(function($ctx1) {
  554. _st(self)._step();
  555. return self}, function($ctx1) {$ctx1.fill(self,"stepOver",{},smalltalk.ASTDebugger)});},
  556. args: [],
  557. source: "stepOver\x0a\x09self step",
  558. messageSends: ["step"],
  559. referencedClasses: []
  560. }),
  561. smalltalk.ASTDebugger);
  562. smalltalk.addMethod(
  563. "_context_",
  564. smalltalk.method({
  565. selector: "context:",
  566. category: 'instance creation',
  567. fn: function (aMethodContext) {
  568. var self=this;
  569. return smalltalk.withContext(function($ctx1) {
  570. var $2,$3,$1;
  571. $2=_st(self)._new();
  572. _st($2)._initializeWithContext_(aMethodContext);
  573. $3=_st($2)._yourself();
  574. $1=$3;
  575. return $1;
  576. }, function($ctx1) {$ctx1.fill(self,"context:",{aMethodContext:aMethodContext},smalltalk.ASTDebugger.klass)});},
  577. args: ["aMethodContext"],
  578. source: "context: aMethodContext\x0a\x09^ self new\x0a\x09\x09initializeWithContext: aMethodContext;\x0a\x09\x09yourself",
  579. messageSends: ["initializeWithContext:", "new", "yourself"],
  580. referencedClasses: []
  581. }),
  582. smalltalk.ASTDebugger.klass);
  583. smalltalk.addClass('ASTInterpreter', smalltalk.Object, ['currentNode', 'context', 'shouldReturn', 'result'], 'Compiler-Interpreter');
  584. smalltalk.ASTInterpreter.comment="ASTIntepreter is like a `NodeVisitor`, interpreting nodes one after each other.\x0aIt is built using Continuation Passing Style for stepping purposes.\x0a\x0aUsage example:\x0a\x0a\x09| ast interpreter |\x0a\x09ast := Smalltalk current parse: 'foo 1+2+4'.\x0a\x09(SemanticAnalyzer on: Object) visit: ast.\x0a\x0a\x09ASTInterpreter new\x0a\x09\x09interpret: ast nodes first;\x0a\x09\x09result \x22Answers 7\x22"
  585. smalltalk.addMethod(
  586. "_assign_to_",
  587. smalltalk.method({
  588. selector: "assign:to:",
  589. category: 'private',
  590. fn: function (aNode, anObject) {
  591. var self=this;
  592. return smalltalk.withContext(function($ctx1) {
  593. var $2,$1;
  594. $2=_st(_st(aNode)._binding())._isInstanceVar();
  595. if(smalltalk.assert($2)){
  596. $1=_st(_st(_st(self)._context())._receiver())._instVarAt_put_(_st(aNode)._value(),anObject);
  597. } else {
  598. $1=_st(_st(self)._context())._localAt_put_(_st(aNode)._value(),anObject);
  599. };
  600. return $1;
  601. }, function($ctx1) {$ctx1.fill(self,"assign:to:",{aNode:aNode,anObject:anObject},smalltalk.ASTInterpreter)});},
  602. args: ["aNode", "anObject"],
  603. source: "assign: aNode to: anObject\x0a\x09^ aNode binding isInstanceVar\x0a\x09\x09ifTrue: [ self context receiver instVarAt: aNode value put: anObject ]\x0a\x09\x09ifFalse: [ self context localAt: aNode value put: anObject ]",
  604. messageSends: ["ifTrue:ifFalse:", "instVarAt:put:", "value", "receiver", "context", "localAt:put:", "isInstanceVar", "binding"],
  605. referencedClasses: []
  606. }),
  607. smalltalk.ASTInterpreter);
  608. smalltalk.addMethod(
  609. "_context",
  610. smalltalk.method({
  611. selector: "context",
  612. category: 'accessing',
  613. fn: function () {
  614. var self=this;
  615. function $AIContext(){return smalltalk.AIContext||(typeof AIContext=="undefined"?nil:AIContext)}
  616. return smalltalk.withContext(function($ctx1) {
  617. var $2,$1;
  618. $2=self["@context"];
  619. if(($receiver = $2) == nil || $receiver == undefined){
  620. self["@context"]=_st($AIContext())._new();
  621. $1=self["@context"];
  622. } else {
  623. $1=$2;
  624. };
  625. return $1;
  626. }, function($ctx1) {$ctx1.fill(self,"context",{},smalltalk.ASTInterpreter)});},
  627. args: [],
  628. source: "context\x0a\x09^ context ifNil: [ context := AIContext new ]",
  629. messageSends: ["ifNil:", "new"],
  630. referencedClasses: ["AIContext"]
  631. }),
  632. smalltalk.ASTInterpreter);
  633. smalltalk.addMethod(
  634. "_context_",
  635. smalltalk.method({
  636. selector: "context:",
  637. category: 'accessing',
  638. fn: function (anAIContext) {
  639. var self=this;
  640. return smalltalk.withContext(function($ctx1) {
  641. self["@context"]=anAIContext;
  642. return self}, function($ctx1) {$ctx1.fill(self,"context:",{anAIContext:anAIContext},smalltalk.ASTInterpreter)});},
  643. args: ["anAIContext"],
  644. source: "context: anAIContext\x0a\x09context := anAIContext",
  645. messageSends: [],
  646. referencedClasses: []
  647. }),
  648. smalltalk.ASTInterpreter);
  649. smalltalk.addMethod(
  650. "_continue_value_",
  651. smalltalk.method({
  652. selector: "continue:value:",
  653. category: 'private',
  654. fn: function (aBlock, anObject) {
  655. var self=this;
  656. return smalltalk.withContext(function($ctx1) {
  657. self["@result"]=anObject;
  658. _st(aBlock)._value_(anObject);
  659. return self}, function($ctx1) {$ctx1.fill(self,"continue:value:",{aBlock:aBlock,anObject:anObject},smalltalk.ASTInterpreter)});},
  660. args: ["aBlock", "anObject"],
  661. source: "continue: aBlock value: anObject\x0a\x09result := anObject.\x0a\x09aBlock value: anObject",
  662. messageSends: ["value:"],
  663. referencedClasses: []
  664. }),
  665. smalltalk.ASTInterpreter);
  666. smalltalk.addMethod(
  667. "_currentNode",
  668. smalltalk.method({
  669. selector: "currentNode",
  670. category: 'accessing',
  671. fn: function () {
  672. var self=this;
  673. return smalltalk.withContext(function($ctx1) {
  674. var $1;
  675. $1=self["@currentNode"];
  676. return $1;
  677. }, function($ctx1) {$ctx1.fill(self,"currentNode",{},smalltalk.ASTInterpreter)});},
  678. args: [],
  679. source: "currentNode\x0a\x09^ currentNode",
  680. messageSends: [],
  681. referencedClasses: []
  682. }),
  683. smalltalk.ASTInterpreter);
  684. smalltalk.addMethod(
  685. "_eval_",
  686. smalltalk.method({
  687. selector: "eval:",
  688. category: 'private',
  689. fn: function (aString) {
  690. var self=this;
  691. var source,function_;
  692. function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
  693. function $Compiler(){return smalltalk.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}
  694. return smalltalk.withContext(function($ctx1) {
  695. var $1,$2,$3;
  696. source=_st($String())._streamContents_((function(str){
  697. return smalltalk.withContext(function($ctx2) {
  698. _st(str)._nextPutAll_("(function(");
  699. _st(_st(_st(_st(self)._context())._locals())._keys())._do_separatedBy_((function(each){
  700. return smalltalk.withContext(function($ctx3) {
  701. return _st(str)._nextPutAll_(each);
  702. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}),(function(){
  703. return smalltalk.withContext(function($ctx3) {
  704. return _st(str)._nextPutAll_(",");
  705. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  706. $1=str;
  707. _st($1)._nextPutAll_("){ return (function() {");
  708. _st($1)._nextPutAll_(aString);
  709. $2=_st($1)._nextPutAll_("})() })");
  710. return $2;
  711. }, function($ctx2) {$ctx2.fillBlock({str:str},$ctx1)})}));
  712. function_=_st(_st($Compiler())._new())._eval_(source);
  713. $3=_st(function_)._valueWithPossibleArguments_(_st(_st(_st(self)._context())._locals())._values());
  714. return $3;
  715. }, function($ctx1) {$ctx1.fill(self,"eval:",{aString:aString,source:source,function_:function_},smalltalk.ASTInterpreter)});},
  716. args: ["aString"],
  717. source: "eval: aString\x0a\x09\x22Evaluate aString as JS source inside an JS function.\x0a\x09aString is not sandboxed.\x22\x0a\x09\x0a\x09| source function |\x0a\x09\x0a\x09source := String streamContents: [ :str |\x0a\x09\x09str nextPutAll: '(function('.\x0a\x09\x09self context locals keys\x0a\x09\x09\x09do: [ :each | str nextPutAll: each ]\x0a\x09\x09\x09separatedBy: [ str nextPutAll: ',' ].\x0a\x09\x09str\x0a\x09\x09\x09nextPutAll: '){ return (function() {';\x0a\x09\x09\x09nextPutAll: aString;\x0a\x09\x09\x09nextPutAll: '})() })' ].\x0a\x09\x09\x09\x0a\x09function := Compiler new eval: source.\x0a\x09\x0a\x09^ function valueWithPossibleArguments: self context locals values",
  718. messageSends: ["streamContents:", "nextPutAll:", "do:separatedBy:", "keys", "locals", "context", "eval:", "new", "valueWithPossibleArguments:", "values"],
  719. referencedClasses: ["String", "Compiler"]
  720. }),
  721. smalltalk.ASTInterpreter);
  722. smalltalk.addMethod(
  723. "_initialize",
  724. smalltalk.method({
  725. selector: "initialize",
  726. category: 'initialization',
  727. fn: function () {
  728. var self=this;
  729. return smalltalk.withContext(function($ctx1) {
  730. smalltalk.Object.fn.prototype._initialize.apply(_st(self), []);
  731. self["@shouldReturn"]=false;
  732. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.ASTInterpreter)});},
  733. args: [],
  734. source: "initialize\x0a\x09super initialize.\x0a\x09shouldReturn := false",
  735. messageSends: ["initialize"],
  736. referencedClasses: []
  737. }),
  738. smalltalk.ASTInterpreter);
  739. smalltalk.addMethod(
  740. "_interpret_",
  741. smalltalk.method({
  742. selector: "interpret:",
  743. category: 'interpreting',
  744. fn: function (aNode) {
  745. var self=this;
  746. return smalltalk.withContext(function($ctx1) {
  747. self["@shouldReturn"]=false;
  748. _st(self)._interpret_continue_(aNode,(function(value){
  749. return smalltalk.withContext(function($ctx2) {
  750. self["@result"]=value;
  751. return self["@result"];
  752. }, function($ctx2) {$ctx2.fillBlock({value:value},$ctx1)})}));
  753. return self}, function($ctx1) {$ctx1.fill(self,"interpret:",{aNode:aNode},smalltalk.ASTInterpreter)});},
  754. args: ["aNode"],
  755. source: "interpret: aNode\x0a\x09shouldReturn := false.\x0a\x09self interpret: aNode continue: [ :value |\x0a\x09\x09result := value ]",
  756. messageSends: ["interpret:continue:"],
  757. referencedClasses: []
  758. }),
  759. smalltalk.ASTInterpreter);
  760. smalltalk.addMethod(
  761. "_interpret_continue_",
  762. smalltalk.method({
  763. selector: "interpret:continue:",
  764. category: 'interpreting',
  765. fn: function (aNode, aBlock) {
  766. var self=this;
  767. return smalltalk.withContext(function($ctx1) {
  768. var $1,$2,$3;
  769. $1=self["@shouldReturn"];
  770. if(smalltalk.assert($1)){
  771. $2=self;
  772. return $2;
  773. };
  774. $3=_st(aNode)._isNode();
  775. if(smalltalk.assert($3)){
  776. self["@currentNode"]=aNode;
  777. self["@currentNode"];
  778. _st(self)._interpretNode_continue_(aNode,(function(value){
  779. return smalltalk.withContext(function($ctx2) {
  780. return _st(self)._continue_value_(aBlock,value);
  781. }, function($ctx2) {$ctx2.fillBlock({value:value},$ctx1)})}));
  782. } else {
  783. _st(self)._continue_value_(aBlock,aNode);
  784. };
  785. return self}, function($ctx1) {$ctx1.fill(self,"interpret:continue:",{aNode:aNode,aBlock:aBlock},smalltalk.ASTInterpreter)});},
  786. args: ["aNode", "aBlock"],
  787. source: "interpret: aNode continue: aBlock\x0a\x09shouldReturn ifTrue: [ ^ self ].\x0a\x0a\x09aNode isNode\x0a\x09\x09ifTrue: [\x0a\x09\x09\x09currentNode := aNode.\x0a\x09\x09\x09self interpretNode: aNode continue: [ :value |\x0a\x09\x09\x09\x09self continue: aBlock value: value ] ]\x0a\x09\x09ifFalse: [ self continue: aBlock value: aNode ]",
  788. messageSends: ["ifTrue:", "ifTrue:ifFalse:", "interpretNode:continue:", "continue:value:", "isNode"],
  789. referencedClasses: []
  790. }),
  791. smalltalk.ASTInterpreter);
  792. smalltalk.addMethod(
  793. "_interpretAll_continue_",
  794. smalltalk.method({
  795. selector: "interpretAll:continue:",
  796. category: 'private',
  797. fn: function (aCollection, aBlock) {
  798. var self=this;
  799. function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  800. return smalltalk.withContext(function($ctx1) {
  801. _st(self)._interpretAll_continue_result_(aCollection,aBlock,_st($OrderedCollection())._new());
  802. return self}, function($ctx1) {$ctx1.fill(self,"interpretAll:continue:",{aCollection:aCollection,aBlock:aBlock},smalltalk.ASTInterpreter)});},
  803. args: ["aCollection", "aBlock"],
  804. source: "interpretAll: aCollection continue: aBlock\x0a\x09self\x0a\x09\x09interpretAll: aCollection\x0a\x09\x09continue: aBlock\x0a\x09\x09result: OrderedCollection new",
  805. messageSends: ["interpretAll:continue:result:", "new"],
  806. referencedClasses: ["OrderedCollection"]
  807. }),
  808. smalltalk.ASTInterpreter);
  809. smalltalk.addMethod(
  810. "_interpretAll_continue_result_",
  811. smalltalk.method({
  812. selector: "interpretAll:continue:result:",
  813. category: 'private',
  814. fn: function (nodes, aBlock, aCollection) {
  815. var self=this;
  816. return smalltalk.withContext(function($ctx1) {
  817. var $1;
  818. $1=_st(nodes)._isEmpty();
  819. if(smalltalk.assert($1)){
  820. _st(self)._continue_value_(aBlock,aCollection);
  821. } else {
  822. _st(self)._interpret_continue_(_st(nodes)._first(),(function(value){
  823. return smalltalk.withContext(function($ctx2) {
  824. return _st(self)._interpretAll_continue_result_(_st(nodes)._allButFirst(),aBlock,_st(aCollection).__comma([value]));
  825. }, function($ctx2) {$ctx2.fillBlock({value:value},$ctx1)})}));
  826. };
  827. return self}, function($ctx1) {$ctx1.fill(self,"interpretAll:continue:result:",{nodes:nodes,aBlock:aBlock,aCollection:aCollection},smalltalk.ASTInterpreter)});},
  828. args: ["nodes", "aBlock", "aCollection"],
  829. source: "interpretAll: nodes continue: aBlock result: aCollection\x0a\x09nodes isEmpty\x0a\x09\x09ifTrue: [ self continue: aBlock value: aCollection ]\x0a\x09\x09ifFalse: [\x0a\x09\x09\x09self interpret: nodes first continue: [:value |\x0a\x09\x09\x09\x09self\x0a\x09\x09\x09\x09\x09interpretAll: nodes allButFirst\x0a\x09\x09\x09\x09\x09continue: aBlock\x0a\x09\x09\x09\x09\x09result: aCollection, { value } ] ]",
  830. messageSends: ["ifTrue:ifFalse:", "continue:value:", "interpret:continue:", "first", "interpretAll:continue:result:", "allButFirst", ",", "isEmpty"],
  831. referencedClasses: []
  832. }),
  833. smalltalk.ASTInterpreter);
  834. smalltalk.addMethod(
  835. "_interpretAssignmentNode_continue_",
  836. smalltalk.method({
  837. selector: "interpretAssignmentNode:continue:",
  838. category: 'interpreting',
  839. fn: function (aNode, aBlock) {
  840. var self=this;
  841. return smalltalk.withContext(function($ctx1) {
  842. _st(self)._interpret_continue_(_st(aNode)._right(),(function(value){
  843. return smalltalk.withContext(function($ctx2) {
  844. return _st(self)._continue_value_(aBlock,_st(self)._assign_to_(_st(aNode)._left(),value));
  845. }, function($ctx2) {$ctx2.fillBlock({value:value},$ctx1)})}));
  846. return self}, function($ctx1) {$ctx1.fill(self,"interpretAssignmentNode:continue:",{aNode:aNode,aBlock:aBlock},smalltalk.ASTInterpreter)});},
  847. args: ["aNode", "aBlock"],
  848. source: "interpretAssignmentNode: aNode continue: aBlock\x0a\x09self interpret: aNode right continue: [ :value |\x0a\x09\x09self\x0a\x09\x09\x09continue: aBlock\x0a\x09\x09\x09value: (self assign: aNode left to: value) ]",
  849. messageSends: ["interpret:continue:", "right", "continue:value:", "assign:to:", "left"],
  850. referencedClasses: []
  851. }),
  852. smalltalk.ASTInterpreter);
  853. smalltalk.addMethod(
  854. "_interpretBlockNode_continue_",
  855. smalltalk.method({
  856. selector: "interpretBlockNode:continue:",
  857. category: 'interpreting',
  858. fn: function (aNode, aBlock) {
  859. var self=this;
  860. function $AIContext(){return smalltalk.AIContext||(typeof AIContext=="undefined"?nil:AIContext)}
  861. return smalltalk.withContext(function($ctx1) {
  862. var $1,$2,$3,$4;
  863. _st(self)._continue_value_(aBlock,(function(){
  864. var blockResult;
  865. return smalltalk.withContext(function($ctx2) {
  866. $1=_st($AIContext())._new();
  867. _st($1)._outerContext_(_st(self)._context());
  868. $2=_st($1)._yourself();
  869. _st(self)._context_($2);
  870. $3=self;
  871. _st($3)._interpret_(_st(_st(aNode)._nodes())._first());
  872. $4=_st($3)._result();
  873. blockResult=$4;
  874. blockResult;
  875. _st(self)._context_(_st(_st(self)._context())._outerContext());
  876. return blockResult;
  877. }, function($ctx2) {$ctx2.fillBlock({blockResult:blockResult},$ctx1)})}));
  878. return self}, function($ctx1) {$ctx1.fill(self,"interpretBlockNode:continue:",{aNode:aNode,aBlock:aBlock},smalltalk.ASTInterpreter)});},
  879. args: ["aNode", "aBlock"],
  880. source: "interpretBlockNode: aNode continue: aBlock\x0a\x09self\x0a\x09\x09continue: aBlock\x0a\x09\x09value: [ \x0a\x09\x09\x09| blockResult |\x0a\x09\x09\x09\x0a\x09\x09\x09self context: (AIContext new\x0a\x09\x09\x09\x09outerContext: self context;\x0a\x09\x09\x09\x09yourself).\x0a\x09\x09\x09\x0a\x09\x09\x09blockResult := self interpret: aNode nodes first; result.\x0a\x09\x09\x09\x0a\x09\x09\x09self context: self context outerContext.\x0a\x09\x09\x09blockResult ]",
  881. messageSends: ["continue:value:", "context:", "outerContext:", "context", "new", "yourself", "interpret:", "first", "nodes", "result", "outerContext"],
  882. referencedClasses: ["AIContext"]
  883. }),
  884. smalltalk.ASTInterpreter);
  885. smalltalk.addMethod(
  886. "_interpretBlockSequenceNode_continue_",
  887. smalltalk.method({
  888. selector: "interpretBlockSequenceNode:continue:",
  889. category: 'interpreting',
  890. fn: function (aNode, aBlock) {
  891. var self=this;
  892. return smalltalk.withContext(function($ctx1) {
  893. _st(self)._interpretSequenceNode_continue_(aNode,aBlock);
  894. return self}, function($ctx1) {$ctx1.fill(self,"interpretBlockSequenceNode:continue:",{aNode:aNode,aBlock:aBlock},smalltalk.ASTInterpreter)});},
  895. args: ["aNode", "aBlock"],
  896. source: "interpretBlockSequenceNode: aNode continue: aBlock\x0a\x09self interpretSequenceNode: aNode continue: aBlock",
  897. messageSends: ["interpretSequenceNode:continue:"],
  898. referencedClasses: []
  899. }),
  900. smalltalk.ASTInterpreter);
  901. smalltalk.addMethod(
  902. "_interpretCascadeNode_continue_",
  903. smalltalk.method({
  904. selector: "interpretCascadeNode:continue:",
  905. category: 'interpreting',
  906. fn: function (aNode, aBlock) {
  907. var self=this;
  908. return smalltalk.withContext(function($ctx1) {
  909. _st(self)._interpret_continue_(_st(aNode)._receiver(),(function(receiver){
  910. return smalltalk.withContext(function($ctx2) {
  911. _st(_st(aNode)._nodes())._do_((function(each){
  912. return smalltalk.withContext(function($ctx3) {
  913. return _st(each)._receiver_(receiver);
  914. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}));
  915. return _st(self)._interpretAll_continue_(_st(_st(aNode)._nodes())._allButLast(),(function(){
  916. return smalltalk.withContext(function($ctx3) {
  917. return _st(self)._interpret_continue_(_st(_st(aNode)._nodes())._last(),(function(val){
  918. return smalltalk.withContext(function($ctx4) {
  919. return _st(self)._continue_value_(aBlock,val);
  920. }, function($ctx4) {$ctx4.fillBlock({val:val},$ctx1)})}));
  921. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  922. }, function($ctx2) {$ctx2.fillBlock({receiver:receiver},$ctx1)})}));
  923. return self}, function($ctx1) {$ctx1.fill(self,"interpretCascadeNode:continue:",{aNode:aNode,aBlock:aBlock},smalltalk.ASTInterpreter)});},
  924. args: ["aNode", "aBlock"],
  925. source: "interpretCascadeNode: aNode continue: aBlock\x0a\x09\x22TODO: Handle super sends\x22\x0a\x09\x0a\x09self interpret: aNode receiver continue: [ :receiver |\x0a\x09\x09\x22Only interpret the receiver once\x22\x0a\x09\x09aNode nodes do: [ :each | each receiver: receiver ].\x0a\x0a\x09\x09self\x0a\x09\x09\x09interpretAll: aNode nodes allButLast\x0a\x09\x09\x09continue: [\x0a\x09\x09\x09\x09self\x0a\x09\x09\x09\x09\x09interpret: aNode nodes last\x0a\x09\x09\x09\x09\x09continue: [ :val | self continue: aBlock value: val ] ] ]",
  926. messageSends: ["interpret:continue:", "receiver", "do:", "receiver:", "nodes", "interpretAll:continue:", "allButLast", "last", "continue:value:"],
  927. referencedClasses: []
  928. }),
  929. smalltalk.ASTInterpreter);
  930. smalltalk.addMethod(
  931. "_interpretClassReferenceNode_continue_",
  932. smalltalk.method({
  933. selector: "interpretClassReferenceNode:continue:",
  934. category: 'interpreting',
  935. fn: function (aNode, aBlock) {
  936. var self=this;
  937. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  938. return smalltalk.withContext(function($ctx1) {
  939. _st(self)._continue_value_(aBlock,_st(_st($Smalltalk())._current())._at_(_st(aNode)._value()));
  940. return self}, function($ctx1) {$ctx1.fill(self,"interpretClassReferenceNode:continue:",{aNode:aNode,aBlock:aBlock},smalltalk.ASTInterpreter)});},
  941. args: ["aNode", "aBlock"],
  942. source: "interpretClassReferenceNode: aNode continue: aBlock\x0a\x09self continue: aBlock value: (Smalltalk current at: aNode value)",
  943. messageSends: ["continue:value:", "at:", "value", "current"],
  944. referencedClasses: ["Smalltalk"]
  945. }),
  946. smalltalk.ASTInterpreter);
  947. smalltalk.addMethod(
  948. "_interpretDynamicArrayNode_continue_",
  949. smalltalk.method({
  950. selector: "interpretDynamicArrayNode:continue:",
  951. category: 'interpreting',
  952. fn: function (aNode, aBlock) {
  953. var self=this;
  954. return smalltalk.withContext(function($ctx1) {
  955. _st(self)._interpretAll_continue_(_st(aNode)._nodes(),(function(array){
  956. return smalltalk.withContext(function($ctx2) {
  957. return _st(self)._continue_value_(aBlock,array);
  958. }, function($ctx2) {$ctx2.fillBlock({array:array},$ctx1)})}));
  959. return self}, function($ctx1) {$ctx1.fill(self,"interpretDynamicArrayNode:continue:",{aNode:aNode,aBlock:aBlock},smalltalk.ASTInterpreter)});},
  960. args: ["aNode", "aBlock"],
  961. source: "interpretDynamicArrayNode: aNode continue: aBlock\x0a\x09self interpretAll: aNode nodes continue: [ :array |\x0a\x09\x09self\x0a\x09\x09\x09continue: aBlock\x0a\x09\x09\x09value: array ]",
  962. messageSends: ["interpretAll:continue:", "nodes", "continue:value:"],
  963. referencedClasses: []
  964. }),
  965. smalltalk.ASTInterpreter);
  966. smalltalk.addMethod(
  967. "_interpretDynamicDictionaryNode_continue_",
  968. smalltalk.method({
  969. selector: "interpretDynamicDictionaryNode:continue:",
  970. category: 'interpreting',
  971. fn: function (aNode, aBlock) {
  972. var self=this;
  973. function $HashedCollection(){return smalltalk.HashedCollection||(typeof HashedCollection=="undefined"?nil:HashedCollection)}
  974. return smalltalk.withContext(function($ctx1) {
  975. _st(self)._interpretAll_continue_(_st(aNode)._nodes(),(function(array){
  976. var hashedCollection;
  977. return smalltalk.withContext(function($ctx2) {
  978. hashedCollection=_st($HashedCollection())._new();
  979. hashedCollection;
  980. _st(array)._do_((function(each){
  981. return smalltalk.withContext(function($ctx3) {
  982. return _st(hashedCollection)._add_(each);
  983. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}));
  984. return _st(self)._continue_value_(aBlock,hashedCollection);
  985. }, function($ctx2) {$ctx2.fillBlock({array:array,hashedCollection:hashedCollection},$ctx1)})}));
  986. return self}, function($ctx1) {$ctx1.fill(self,"interpretDynamicDictionaryNode:continue:",{aNode:aNode,aBlock:aBlock},smalltalk.ASTInterpreter)});},
  987. args: ["aNode", "aBlock"],
  988. source: "interpretDynamicDictionaryNode: aNode continue: aBlock\x0a\x09self interpretAll: aNode nodes continue: [ :array | | hashedCollection |\x0a\x09\x09hashedCollection := HashedCollection new.\x0a\x09\x09array do: [ :each | hashedCollection add: each ].\x0a\x09\x09self\x0a\x09\x09\x09continue: aBlock\x0a\x09\x09\x09value: hashedCollection ]",
  989. messageSends: ["interpretAll:continue:", "nodes", "new", "do:", "add:", "continue:value:"],
  990. referencedClasses: ["HashedCollection"]
  991. }),
  992. smalltalk.ASTInterpreter);
  993. smalltalk.addMethod(
  994. "_interpretJSStatementNode_continue_",
  995. smalltalk.method({
  996. selector: "interpretJSStatementNode:continue:",
  997. category: 'interpreting',
  998. fn: function (aNode, aBlock) {
  999. var self=this;
  1000. return smalltalk.withContext(function($ctx1) {
  1001. self["@shouldReturn"]=true;
  1002. _st(self)._continue_value_(aBlock,_st(self)._eval_(_st(aNode)._source()));
  1003. return self}, function($ctx1) {$ctx1.fill(self,"interpretJSStatementNode:continue:",{aNode:aNode,aBlock:aBlock},smalltalk.ASTInterpreter)});},
  1004. args: ["aNode", "aBlock"],
  1005. source: "interpretJSStatementNode: aNode continue: aBlock\x0a\x09shouldReturn := true.\x0a\x09self continue: aBlock value: (self eval: aNode source)",
  1006. messageSends: ["continue:value:", "eval:", "source"],
  1007. referencedClasses: []
  1008. }),
  1009. smalltalk.ASTInterpreter);
  1010. smalltalk.addMethod(
  1011. "_interpretMethodNode_continue_",
  1012. smalltalk.method({
  1013. selector: "interpretMethodNode:continue:",
  1014. category: 'interpreting',
  1015. fn: function (aNode, aBlock) {
  1016. var self=this;
  1017. return smalltalk.withContext(function($ctx1) {
  1018. _st(self)._interpretAll_continue_(_st(aNode)._nodes(),(function(array){
  1019. return smalltalk.withContext(function($ctx2) {
  1020. return _st(self)._continue_value_(aBlock,_st(array)._first());
  1021. }, function($ctx2) {$ctx2.fillBlock({array:array},$ctx1)})}));
  1022. return self}, function($ctx1) {$ctx1.fill(self,"interpretMethodNode:continue:",{aNode:aNode,aBlock:aBlock},smalltalk.ASTInterpreter)});},
  1023. args: ["aNode", "aBlock"],
  1024. source: "interpretMethodNode: aNode continue: aBlock\x0a\x09self interpretAll: aNode nodes continue: [ :array |\x0a\x09\x09self continue: aBlock value: array first ]",
  1025. messageSends: ["interpretAll:continue:", "nodes", "continue:value:", "first"],
  1026. referencedClasses: []
  1027. }),
  1028. smalltalk.ASTInterpreter);
  1029. smalltalk.addMethod(
  1030. "_interpretNode_continue_",
  1031. smalltalk.method({
  1032. selector: "interpretNode:continue:",
  1033. category: 'interpreting',
  1034. fn: function (aNode, aBlock) {
  1035. var self=this;
  1036. return smalltalk.withContext(function($ctx1) {
  1037. _st(aNode)._interpreter_continue_(self,aBlock);
  1038. return self}, function($ctx1) {$ctx1.fill(self,"interpretNode:continue:",{aNode:aNode,aBlock:aBlock},smalltalk.ASTInterpreter)});},
  1039. args: ["aNode", "aBlock"],
  1040. source: "interpretNode: aNode continue: aBlock\x0a\x09aNode interpreter: self continue: aBlock",
  1041. messageSends: ["interpreter:continue:"],
  1042. referencedClasses: []
  1043. }),
  1044. smalltalk.ASTInterpreter);
  1045. smalltalk.addMethod(
  1046. "_interpretReturnNode_continue_",
  1047. smalltalk.method({
  1048. selector: "interpretReturnNode:continue:",
  1049. category: 'interpreting',
  1050. fn: function (aNode, aBlock) {
  1051. var self=this;
  1052. return smalltalk.withContext(function($ctx1) {
  1053. _st(self)._interpret_continue_(_st(_st(aNode)._nodes())._first(),(function(value){
  1054. return smalltalk.withContext(function($ctx2) {
  1055. self["@shouldReturn"]=true;
  1056. self["@shouldReturn"];
  1057. return _st(self)._continue_value_(aBlock,value);
  1058. }, function($ctx2) {$ctx2.fillBlock({value:value},$ctx1)})}));
  1059. return self}, function($ctx1) {$ctx1.fill(self,"interpretReturnNode:continue:",{aNode:aNode,aBlock:aBlock},smalltalk.ASTInterpreter)});},
  1060. args: ["aNode", "aBlock"],
  1061. source: "interpretReturnNode: aNode continue: aBlock\x0a\x09self interpret: aNode nodes first continue: [ :value |\x0a\x09\x09shouldReturn := true.\x0a\x09\x09self continue: aBlock value: value ]",
  1062. messageSends: ["interpret:continue:", "first", "nodes", "continue:value:"],
  1063. referencedClasses: []
  1064. }),
  1065. smalltalk.ASTInterpreter);
  1066. smalltalk.addMethod(
  1067. "_interpretSendNode_continue_",
  1068. smalltalk.method({
  1069. selector: "interpretSendNode:continue:",
  1070. category: 'interpreting',
  1071. fn: function (aNode, aBlock) {
  1072. var self=this;
  1073. return smalltalk.withContext(function($ctx1) {
  1074. _st(self)._interpret_continue_(_st(aNode)._receiver(),(function(receiver){
  1075. return smalltalk.withContext(function($ctx2) {
  1076. return _st(self)._interpretAll_continue_(_st(aNode)._arguments(),(function(args){
  1077. return smalltalk.withContext(function($ctx3) {
  1078. return _st(self)._messageFromSendNode_arguments_do_(aNode,args,(function(message){
  1079. return smalltalk.withContext(function($ctx4) {
  1080. _st(_st(self)._context())._pc_(_st(_st(_st(self)._context())._pc()).__plus((1)));
  1081. return _st(self)._continue_value_(aBlock,_st(message)._sendTo_(receiver));
  1082. }, function($ctx4) {$ctx4.fillBlock({message:message},$ctx1)})}));
  1083. }, function($ctx3) {$ctx3.fillBlock({args:args},$ctx1)})}));
  1084. }, function($ctx2) {$ctx2.fillBlock({receiver:receiver},$ctx1)})}));
  1085. return self}, function($ctx1) {$ctx1.fill(self,"interpretSendNode:continue:",{aNode:aNode,aBlock:aBlock},smalltalk.ASTInterpreter)});},
  1086. args: ["aNode", "aBlock"],
  1087. source: "interpretSendNode: aNode continue: aBlock\x0a\x09\x22TODO: Handle super sends\x22\x0a\x09\x0a\x09self interpret: aNode receiver continue: [ :receiver |\x0a\x09\x09self interpretAll: aNode arguments continue: [ :args |\x0a\x09\x09\x09self\x0a\x09\x09\x09\x09messageFromSendNode: aNode\x0a\x09\x09\x09\x09arguments: args\x0a\x09\x09\x09\x09do: [ :message |\x0a\x09\x09\x09\x09\x09self context pc: self context pc + 1.\x0a\x09\x09\x09\x09\x09self\x0a\x09\x09\x09\x09\x09\x09continue: aBlock\x0a\x09\x09\x09\x09\x09\x09value: (message sendTo: receiver) ] ] ]",
  1088. messageSends: ["interpret:continue:", "receiver", "interpretAll:continue:", "arguments", "messageFromSendNode:arguments:do:", "pc:", "+", "pc", "context", "continue:value:", "sendTo:"],
  1089. referencedClasses: []
  1090. }),
  1091. smalltalk.ASTInterpreter);
  1092. smalltalk.addMethod(
  1093. "_interpretSequenceNode_continue_",
  1094. smalltalk.method({
  1095. selector: "interpretSequenceNode:continue:",
  1096. category: 'interpreting',
  1097. fn: function (aNode, aBlock) {
  1098. var self=this;
  1099. return smalltalk.withContext(function($ctx1) {
  1100. _st(self)._interpretAll_continue_(_st(aNode)._nodes(),(function(array){
  1101. return smalltalk.withContext(function($ctx2) {
  1102. return _st(self)._continue_value_(aBlock,_st(array)._last());
  1103. }, function($ctx2) {$ctx2.fillBlock({array:array},$ctx1)})}));
  1104. return self}, function($ctx1) {$ctx1.fill(self,"interpretSequenceNode:continue:",{aNode:aNode,aBlock:aBlock},smalltalk.ASTInterpreter)});},
  1105. args: ["aNode", "aBlock"],
  1106. source: "interpretSequenceNode: aNode continue: aBlock\x0a\x09self interpretAll: aNode nodes continue: [ :array |\x0a\x09\x09self continue: aBlock value: array last ]",
  1107. messageSends: ["interpretAll:continue:", "nodes", "continue:value:", "last"],
  1108. referencedClasses: []
  1109. }),
  1110. smalltalk.ASTInterpreter);
  1111. smalltalk.addMethod(
  1112. "_interpretValueNode_continue_",
  1113. smalltalk.method({
  1114. selector: "interpretValueNode:continue:",
  1115. category: 'interpreting',
  1116. fn: function (aNode, aBlock) {
  1117. var self=this;
  1118. return smalltalk.withContext(function($ctx1) {
  1119. _st(self)._continue_value_(aBlock,_st(aNode)._value());
  1120. return self}, function($ctx1) {$ctx1.fill(self,"interpretValueNode:continue:",{aNode:aNode,aBlock:aBlock},smalltalk.ASTInterpreter)});},
  1121. args: ["aNode", "aBlock"],
  1122. source: "interpretValueNode: aNode continue: aBlock\x0a\x09self continue: aBlock value: aNode value",
  1123. messageSends: ["continue:value:", "value"],
  1124. referencedClasses: []
  1125. }),
  1126. smalltalk.ASTInterpreter);
  1127. smalltalk.addMethod(
  1128. "_interpretVariableNode_continue_",
  1129. smalltalk.method({
  1130. selector: "interpretVariableNode:continue:",
  1131. category: 'interpreting',
  1132. fn: function (aNode, aBlock) {
  1133. var self=this;
  1134. return smalltalk.withContext(function($ctx1) {
  1135. var $1,$2,$4,$3;
  1136. $1=self;
  1137. $2=aBlock;
  1138. $4=_st(_st(aNode)._binding())._isInstanceVar();
  1139. if(smalltalk.assert($4)){
  1140. $3=_st(_st(_st(self)._context())._receiver())._instVarAt_(_st(aNode)._value());
  1141. } else {
  1142. $3=_st(_st(self)._context())._localAt_(_st(aNode)._value());
  1143. };
  1144. _st($1)._continue_value_($2,$3);
  1145. return self}, function($ctx1) {$ctx1.fill(self,"interpretVariableNode:continue:",{aNode:aNode,aBlock:aBlock},smalltalk.ASTInterpreter)});},
  1146. args: ["aNode", "aBlock"],
  1147. source: "interpretVariableNode: aNode continue: aBlock\x0a\x09self\x0a\x09\x09continue: aBlock\x0a\x09\x09value: (aNode binding isInstanceVar\x0a\x09\x09\x09ifTrue: [ self context receiver instVarAt: aNode value ]\x0a\x09\x09\x09ifFalse: [ self context localAt: aNode value ])",
  1148. messageSends: ["continue:value:", "ifTrue:ifFalse:", "instVarAt:", "value", "receiver", "context", "localAt:", "isInstanceVar", "binding"],
  1149. referencedClasses: []
  1150. }),
  1151. smalltalk.ASTInterpreter);
  1152. smalltalk.addMethod(
  1153. "_messageFromSendNode_arguments_do_",
  1154. smalltalk.method({
  1155. selector: "messageFromSendNode:arguments:do:",
  1156. category: 'private',
  1157. fn: function (aSendNode, aCollection, aBlock) {
  1158. var self=this;
  1159. function $Message(){return smalltalk.Message||(typeof Message=="undefined"?nil:Message)}
  1160. return smalltalk.withContext(function($ctx1) {
  1161. var $1,$2;
  1162. $1=_st($Message())._new();
  1163. _st($1)._selector_(_st(aSendNode)._selector());
  1164. _st($1)._arguments_(aCollection);
  1165. $2=_st($1)._yourself();
  1166. _st(self)._continue_value_(aBlock,$2);
  1167. return self}, function($ctx1) {$ctx1.fill(self,"messageFromSendNode:arguments:do:",{aSendNode:aSendNode,aCollection:aCollection,aBlock:aBlock},smalltalk.ASTInterpreter)});},
  1168. args: ["aSendNode", "aCollection", "aBlock"],
  1169. source: "messageFromSendNode: aSendNode arguments: aCollection do: aBlock\x0a\x09self\x0a\x09\x09continue: aBlock\x0a\x09\x09value: (Message new\x0a\x09\x09\x09selector: aSendNode selector;\x0a\x09\x09\x09arguments: aCollection;\x0a\x09\x09\x09yourself)",
  1170. messageSends: ["continue:value:", "selector:", "selector", "new", "arguments:", "yourself"],
  1171. referencedClasses: ["Message"]
  1172. }),
  1173. smalltalk.ASTInterpreter);
  1174. smalltalk.addMethod(
  1175. "_result",
  1176. smalltalk.method({
  1177. selector: "result",
  1178. category: 'accessing',
  1179. fn: function () {
  1180. var self=this;
  1181. return smalltalk.withContext(function($ctx1) {
  1182. var $1;
  1183. $1=self["@result"];
  1184. return $1;
  1185. }, function($ctx1) {$ctx1.fill(self,"result",{},smalltalk.ASTInterpreter)});},
  1186. args: [],
  1187. source: "result\x0a\x09^ result",
  1188. messageSends: [],
  1189. referencedClasses: []
  1190. }),
  1191. smalltalk.ASTInterpreter);
  1192. smalltalk.addMethod(
  1193. "_shouldReturn",
  1194. smalltalk.method({
  1195. selector: "shouldReturn",
  1196. category: 'testing',
  1197. fn: function () {
  1198. var self=this;
  1199. return smalltalk.withContext(function($ctx1) {
  1200. var $2,$1;
  1201. $2=self["@shouldReturn"];
  1202. if(($receiver = $2) == nil || $receiver == undefined){
  1203. $1=false;
  1204. } else {
  1205. $1=$2;
  1206. };
  1207. return $1;
  1208. }, function($ctx1) {$ctx1.fill(self,"shouldReturn",{},smalltalk.ASTInterpreter)});},
  1209. args: [],
  1210. source: "shouldReturn\x0a\x09^ shouldReturn ifNil: [ false ]",
  1211. messageSends: ["ifNil:"],
  1212. referencedClasses: []
  1213. }),
  1214. smalltalk.ASTInterpreter);
  1215. smalltalk.addClass('ASTSteppingInterpreter', smalltalk.ASTInterpreter, ['continuation', 'nextNode'], 'Compiler-Interpreter');
  1216. smalltalk.ASTSteppingInterpreter.comment="ASTSteppingInterpreter is an interpreter with stepping capabilities.\x0aUse `#step` to actually interpret the next node.\x0a\x0aUsage example:\x0a\x0a\x09| ast interpreter |\x0a\x09ast := Smalltalk current parse: 'foo 1+2+4'.\x0a\x09(SemanticAnalyzer on: Object) visit: ast.\x0a\x0a\x09interpreter := ASTSteppingInterpreter new\x0a\x09\x09interpret: ast nodes first;\x0a\x09\x09yourself.\x0a\x09\x09\x0a\x09debugger step; step.\x0a\x09debugger step; step.\x0a\x09debugger result.\x22Answers 1\x22\x0a\x09debugger step.\x0a\x09debugger result. \x22Answers 3\x22\x0a\x09debugger step.\x0a\x09debugger result. \x22Answers 7\x22"
  1217. smalltalk.addMethod(
  1218. "_atEnd",
  1219. smalltalk.method({
  1220. selector: "atEnd",
  1221. category: 'testing',
  1222. fn: function () {
  1223. var self=this;
  1224. return smalltalk.withContext(function($ctx1) {
  1225. var $1;
  1226. $1=_st(_st(self)._shouldReturn())._or_((function(){
  1227. return smalltalk.withContext(function($ctx2) {
  1228. return _st(_st(self)._nextNode()).__eq_eq(_st(self)._currentNode());
  1229. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1230. return $1;
  1231. }, function($ctx1) {$ctx1.fill(self,"atEnd",{},smalltalk.ASTSteppingInterpreter)});},
  1232. args: [],
  1233. source: "atEnd\x0a\x09^ self shouldReturn or: [ self nextNode == self currentNode ]",
  1234. messageSends: ["or:", "==", "currentNode", "nextNode", "shouldReturn"],
  1235. referencedClasses: []
  1236. }),
  1237. smalltalk.ASTSteppingInterpreter);
  1238. smalltalk.addMethod(
  1239. "_initialize",
  1240. smalltalk.method({
  1241. selector: "initialize",
  1242. category: 'initialization',
  1243. fn: function () {
  1244. var self=this;
  1245. return smalltalk.withContext(function($ctx1) {
  1246. smalltalk.ASTInterpreter.fn.prototype._initialize.apply(_st(self), []);
  1247. self["@continuation"]=(function(){
  1248. return smalltalk.withContext(function($ctx2) {
  1249. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
  1250. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.ASTSteppingInterpreter)});},
  1251. args: [],
  1252. source: "initialize\x0a\x09super initialize.\x0a\x09continuation := []",
  1253. messageSends: ["initialize"],
  1254. referencedClasses: []
  1255. }),
  1256. smalltalk.ASTSteppingInterpreter);
  1257. smalltalk.addMethod(
  1258. "_interpret_continue_",
  1259. smalltalk.method({
  1260. selector: "interpret:continue:",
  1261. category: 'interpreting',
  1262. fn: function (aNode, aBlock) {
  1263. var self=this;
  1264. return smalltalk.withContext(function($ctx1) {
  1265. self["@nextNode"]=aNode;
  1266. self["@continuation"]=(function(){
  1267. return smalltalk.withContext(function($ctx2) {
  1268. return smalltalk.ASTInterpreter.fn.prototype._interpret_continue_.apply(_st(self), [aNode,aBlock]);
  1269. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
  1270. return self}, function($ctx1) {$ctx1.fill(self,"interpret:continue:",{aNode:aNode,aBlock:aBlock},smalltalk.ASTSteppingInterpreter)});},
  1271. args: ["aNode", "aBlock"],
  1272. source: "interpret: aNode continue: aBlock\x0a\x09nextNode := aNode.\x0a\x09continuation := [\x0a\x09\x09super interpret: aNode continue: aBlock ]",
  1273. messageSends: ["interpret:continue:"],
  1274. referencedClasses: []
  1275. }),
  1276. smalltalk.ASTSteppingInterpreter);
  1277. smalltalk.addMethod(
  1278. "_nextNode",
  1279. smalltalk.method({
  1280. selector: "nextNode",
  1281. category: 'accessing',
  1282. fn: function () {
  1283. var self=this;
  1284. return smalltalk.withContext(function($ctx1) {
  1285. var $1;
  1286. $1=self["@nextNode"];
  1287. return $1;
  1288. }, function($ctx1) {$ctx1.fill(self,"nextNode",{},smalltalk.ASTSteppingInterpreter)});},
  1289. args: [],
  1290. source: "nextNode\x0a\x09^ nextNode",
  1291. messageSends: [],
  1292. referencedClasses: []
  1293. }),
  1294. smalltalk.ASTSteppingInterpreter);
  1295. smalltalk.addMethod(
  1296. "_step",
  1297. smalltalk.method({
  1298. selector: "step",
  1299. category: 'stepping',
  1300. fn: function () {
  1301. var self=this;
  1302. return smalltalk.withContext(function($ctx1) {
  1303. _st(self["@continuation"])._value();
  1304. return self}, function($ctx1) {$ctx1.fill(self,"step",{},smalltalk.ASTSteppingInterpreter)});},
  1305. args: [],
  1306. source: "step\x0a\x09continuation value",
  1307. messageSends: ["value"],
  1308. referencedClasses: []
  1309. }),
  1310. smalltalk.ASTSteppingInterpreter);
  1311. smalltalk.addMethod(
  1312. "_interpreter_continue_",
  1313. smalltalk.method({
  1314. selector: "interpreter:continue:",
  1315. category: '*Compiler-Interpreter',
  1316. fn: function (anInterpreter, aBlock) {
  1317. var self=this;
  1318. return smalltalk.withContext(function($ctx1) {
  1319. var $1;
  1320. $1=_st(anInterpreter)._interpretNode_continue_(self,aBlock);
  1321. return $1;
  1322. }, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock},smalltalk.Node)});},
  1323. args: ["anInterpreter", "aBlock"],
  1324. source: "interpreter: anInterpreter continue: aBlock\x0a\x09^ anInterpreter interpretNode: self continue: aBlock",
  1325. messageSends: ["interpretNode:continue:"],
  1326. referencedClasses: []
  1327. }),
  1328. smalltalk.Node);
  1329. smalltalk.addMethod(
  1330. "_isSteppingNode",
  1331. smalltalk.method({
  1332. selector: "isSteppingNode",
  1333. category: '*Compiler-Interpreter',
  1334. fn: function () {
  1335. var self=this;
  1336. return smalltalk.withContext(function($ctx1) {
  1337. return false;
  1338. }, function($ctx1) {$ctx1.fill(self,"isSteppingNode",{},smalltalk.Node)});},
  1339. args: [],
  1340. source: "isSteppingNode\x0a\x09^ false",
  1341. messageSends: [],
  1342. referencedClasses: []
  1343. }),
  1344. smalltalk.Node);
  1345. smalltalk.addMethod(
  1346. "_interpreter_continue_",
  1347. smalltalk.method({
  1348. selector: "interpreter:continue:",
  1349. category: '*Compiler-Interpreter',
  1350. fn: function (anInterpreter, aBlock) {
  1351. var self=this;
  1352. return smalltalk.withContext(function($ctx1) {
  1353. var $1;
  1354. $1=_st(anInterpreter)._interpretAssignmentNode_continue_(self,aBlock);
  1355. return $1;
  1356. }, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock},smalltalk.AssignmentNode)});},
  1357. args: ["anInterpreter", "aBlock"],
  1358. source: "interpreter: anInterpreter continue: aBlock\x0a\x09^ anInterpreter interpretAssignmentNode: self continue: aBlock",
  1359. messageSends: ["interpretAssignmentNode:continue:"],
  1360. referencedClasses: []
  1361. }),
  1362. smalltalk.AssignmentNode);
  1363. smalltalk.addMethod(
  1364. "_isSteppingNode",
  1365. smalltalk.method({
  1366. selector: "isSteppingNode",
  1367. category: '*Compiler-Interpreter',
  1368. fn: function () {
  1369. var self=this;
  1370. return smalltalk.withContext(function($ctx1) {
  1371. return true;
  1372. }, function($ctx1) {$ctx1.fill(self,"isSteppingNode",{},smalltalk.AssignmentNode)});},
  1373. args: [],
  1374. source: "isSteppingNode\x0a\x09^ true",
  1375. messageSends: [],
  1376. referencedClasses: []
  1377. }),
  1378. smalltalk.AssignmentNode);
  1379. smalltalk.addMethod(
  1380. "_interpreter_continue_",
  1381. smalltalk.method({
  1382. selector: "interpreter:continue:",
  1383. category: '*Compiler-Interpreter',
  1384. fn: function (anInterpreter, aBlock) {
  1385. var self=this;
  1386. return smalltalk.withContext(function($ctx1) {
  1387. var $1;
  1388. $1=_st(anInterpreter)._interpretBlockNode_continue_(self,aBlock);
  1389. return $1;
  1390. }, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock},smalltalk.BlockNode)});},
  1391. args: ["anInterpreter", "aBlock"],
  1392. source: "interpreter: anInterpreter continue: aBlock\x0a\x09^ anInterpreter interpretBlockNode: self continue: aBlock",
  1393. messageSends: ["interpretBlockNode:continue:"],
  1394. referencedClasses: []
  1395. }),
  1396. smalltalk.BlockNode);
  1397. smalltalk.addMethod(
  1398. "_isSteppingNode",
  1399. smalltalk.method({
  1400. selector: "isSteppingNode",
  1401. category: '*Compiler-Interpreter',
  1402. fn: function () {
  1403. var self=this;
  1404. return smalltalk.withContext(function($ctx1) {
  1405. return true;
  1406. }, function($ctx1) {$ctx1.fill(self,"isSteppingNode",{},smalltalk.BlockNode)});},
  1407. args: [],
  1408. source: "isSteppingNode\x0a\x09^ true",
  1409. messageSends: [],
  1410. referencedClasses: []
  1411. }),
  1412. smalltalk.BlockNode);
  1413. smalltalk.addMethod(
  1414. "_interpreter_continue_",
  1415. smalltalk.method({
  1416. selector: "interpreter:continue:",
  1417. category: '*Compiler-Interpreter',
  1418. fn: function (anInterpreter, aBlock) {
  1419. var self=this;
  1420. return smalltalk.withContext(function($ctx1) {
  1421. var $1;
  1422. $1=_st(anInterpreter)._interpretCascadeNode_continue_(self,aBlock);
  1423. return $1;
  1424. }, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock},smalltalk.CascadeNode)});},
  1425. args: ["anInterpreter", "aBlock"],
  1426. source: "interpreter: anInterpreter continue: aBlock\x0a\x09^ anInterpreter interpretCascadeNode: self continue: aBlock",
  1427. messageSends: ["interpretCascadeNode:continue:"],
  1428. referencedClasses: []
  1429. }),
  1430. smalltalk.CascadeNode);
  1431. smalltalk.addMethod(
  1432. "_interpreter_continue_",
  1433. smalltalk.method({
  1434. selector: "interpreter:continue:",
  1435. category: '*Compiler-Interpreter',
  1436. fn: function (anInterpreter, aBlock) {
  1437. var self=this;
  1438. return smalltalk.withContext(function($ctx1) {
  1439. var $1;
  1440. $1=_st(anInterpreter)._interpretDynamicArrayNode_continue_(self,aBlock);
  1441. return $1;
  1442. }, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock},smalltalk.DynamicArrayNode)});},
  1443. args: ["anInterpreter", "aBlock"],
  1444. source: "interpreter: anInterpreter continue: aBlock\x0a\x09^ anInterpreter interpretDynamicArrayNode: self continue: aBlock",
  1445. messageSends: ["interpretDynamicArrayNode:continue:"],
  1446. referencedClasses: []
  1447. }),
  1448. smalltalk.DynamicArrayNode);
  1449. smalltalk.addMethod(
  1450. "_isSteppingNode",
  1451. smalltalk.method({
  1452. selector: "isSteppingNode",
  1453. category: '*Compiler-Interpreter',
  1454. fn: function () {
  1455. var self=this;
  1456. return smalltalk.withContext(function($ctx1) {
  1457. return true;
  1458. }, function($ctx1) {$ctx1.fill(self,"isSteppingNode",{},smalltalk.DynamicArrayNode)});},
  1459. args: [],
  1460. source: "isSteppingNode\x0a\x09^ true",
  1461. messageSends: [],
  1462. referencedClasses: []
  1463. }),
  1464. smalltalk.DynamicArrayNode);
  1465. smalltalk.addMethod(
  1466. "_interpreter_continue_",
  1467. smalltalk.method({
  1468. selector: "interpreter:continue:",
  1469. category: '*Compiler-Interpreter',
  1470. fn: function (anInterpreter, aBlock) {
  1471. var self=this;
  1472. return smalltalk.withContext(function($ctx1) {
  1473. var $1;
  1474. $1=_st(anInterpreter)._interpretDynamicDictionaryNode_continue_(self,aBlock);
  1475. return $1;
  1476. }, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock},smalltalk.DynamicDictionaryNode)});},
  1477. args: ["anInterpreter", "aBlock"],
  1478. source: "interpreter: anInterpreter continue: aBlock\x0a\x09^ anInterpreter interpretDynamicDictionaryNode: self continue: aBlock",
  1479. messageSends: ["interpretDynamicDictionaryNode:continue:"],
  1480. referencedClasses: []
  1481. }),
  1482. smalltalk.DynamicDictionaryNode);
  1483. smalltalk.addMethod(
  1484. "_isSteppingNode",
  1485. smalltalk.method({
  1486. selector: "isSteppingNode",
  1487. category: '*Compiler-Interpreter',
  1488. fn: function () {
  1489. var self=this;
  1490. return smalltalk.withContext(function($ctx1) {
  1491. return true;
  1492. }, function($ctx1) {$ctx1.fill(self,"isSteppingNode",{},smalltalk.DynamicDictionaryNode)});},
  1493. args: [],
  1494. source: "isSteppingNode\x0a\x09^ true",
  1495. messageSends: [],
  1496. referencedClasses: []
  1497. }),
  1498. smalltalk.DynamicDictionaryNode);
  1499. smalltalk.addMethod(
  1500. "_interpreter_continue_",
  1501. smalltalk.method({
  1502. selector: "interpreter:continue:",
  1503. category: '*Compiler-Interpreter',
  1504. fn: function (anInterpreter, aBlock) {
  1505. var self=this;
  1506. return smalltalk.withContext(function($ctx1) {
  1507. var $1;
  1508. $1=_st(anInterpreter)._interpretJSStatementNode_continue_(self,aBlock);
  1509. return $1;
  1510. }, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock},smalltalk.JSStatementNode)});},
  1511. args: ["anInterpreter", "aBlock"],
  1512. source: "interpreter: anInterpreter continue: aBlock\x0a\x09^ anInterpreter interpretJSStatementNode: self continue: aBlock",
  1513. messageSends: ["interpretJSStatementNode:continue:"],
  1514. referencedClasses: []
  1515. }),
  1516. smalltalk.JSStatementNode);
  1517. smalltalk.addMethod(
  1518. "_isSteppingNode",
  1519. smalltalk.method({
  1520. selector: "isSteppingNode",
  1521. category: '*Compiler-Interpreter',
  1522. fn: function () {
  1523. var self=this;
  1524. return smalltalk.withContext(function($ctx1) {
  1525. return true;
  1526. }, function($ctx1) {$ctx1.fill(self,"isSteppingNode",{},smalltalk.JSStatementNode)});},
  1527. args: [],
  1528. source: "isSteppingNode\x0a\x09^ true",
  1529. messageSends: [],
  1530. referencedClasses: []
  1531. }),
  1532. smalltalk.JSStatementNode);
  1533. smalltalk.addMethod(
  1534. "_interpreter_continue_",
  1535. smalltalk.method({
  1536. selector: "interpreter:continue:",
  1537. category: '*Compiler-Interpreter',
  1538. fn: function (anInterpreter, aBlock) {
  1539. var self=this;
  1540. return smalltalk.withContext(function($ctx1) {
  1541. var $1;
  1542. $1=_st(anInterpreter)._interpretMethodNode_continue_(self,aBlock);
  1543. return $1;
  1544. }, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock},smalltalk.MethodNode)});},
  1545. args: ["anInterpreter", "aBlock"],
  1546. source: "interpreter: anInterpreter continue: aBlock\x0a\x09^ anInterpreter interpretMethodNode: self continue: aBlock",
  1547. messageSends: ["interpretMethodNode:continue:"],
  1548. referencedClasses: []
  1549. }),
  1550. smalltalk.MethodNode);
  1551. smalltalk.addMethod(
  1552. "_interpreter_continue_",
  1553. smalltalk.method({
  1554. selector: "interpreter:continue:",
  1555. category: '*Compiler-Interpreter',
  1556. fn: function (anInterpreter, aBlock) {
  1557. var self=this;
  1558. return smalltalk.withContext(function($ctx1) {
  1559. var $1;
  1560. $1=_st(anInterpreter)._interpretReturnNode_continue_(self,aBlock);
  1561. return $1;
  1562. }, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock},smalltalk.ReturnNode)});},
  1563. args: ["anInterpreter", "aBlock"],
  1564. source: "interpreter: anInterpreter continue: aBlock\x0a\x09^ anInterpreter interpretReturnNode: self continue: aBlock",
  1565. messageSends: ["interpretReturnNode:continue:"],
  1566. referencedClasses: []
  1567. }),
  1568. smalltalk.ReturnNode);
  1569. smalltalk.addMethod(
  1570. "_interpreter_continue_",
  1571. smalltalk.method({
  1572. selector: "interpreter:continue:",
  1573. category: '*Compiler-Interpreter',
  1574. fn: function (anInterpreter, aBlock) {
  1575. var self=this;
  1576. return smalltalk.withContext(function($ctx1) {
  1577. var $1;
  1578. $1=_st(anInterpreter)._interpretSendNode_continue_(self,aBlock);
  1579. return $1;
  1580. }, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock},smalltalk.SendNode)});},
  1581. args: ["anInterpreter", "aBlock"],
  1582. source: "interpreter: anInterpreter continue: aBlock\x0a\x09^ anInterpreter interpretSendNode: self continue: aBlock",
  1583. messageSends: ["interpretSendNode:continue:"],
  1584. referencedClasses: []
  1585. }),
  1586. smalltalk.SendNode);
  1587. smalltalk.addMethod(
  1588. "_isSteppingNode",
  1589. smalltalk.method({
  1590. selector: "isSteppingNode",
  1591. category: '*Compiler-Interpreter',
  1592. fn: function () {
  1593. var self=this;
  1594. return smalltalk.withContext(function($ctx1) {
  1595. return true;
  1596. }, function($ctx1) {$ctx1.fill(self,"isSteppingNode",{},smalltalk.SendNode)});},
  1597. args: [],
  1598. source: "isSteppingNode\x0a\x09^ true",
  1599. messageSends: [],
  1600. referencedClasses: []
  1601. }),
  1602. smalltalk.SendNode);
  1603. smalltalk.addMethod(
  1604. "_interpreter_continue_",
  1605. smalltalk.method({
  1606. selector: "interpreter:continue:",
  1607. category: '*Compiler-Interpreter',
  1608. fn: function (anInterpreter, aBlock) {
  1609. var self=this;
  1610. return smalltalk.withContext(function($ctx1) {
  1611. var $1;
  1612. $1=_st(anInterpreter)._interpretSequenceNode_continue_(self,aBlock);
  1613. return $1;
  1614. }, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock},smalltalk.SequenceNode)});},
  1615. args: ["anInterpreter", "aBlock"],
  1616. source: "interpreter: anInterpreter continue: aBlock\x0a\x09^ anInterpreter interpretSequenceNode: self continue: aBlock",
  1617. messageSends: ["interpretSequenceNode:continue:"],
  1618. referencedClasses: []
  1619. }),
  1620. smalltalk.SequenceNode);
  1621. smalltalk.addMethod(
  1622. "_interpreter_continue_",
  1623. smalltalk.method({
  1624. selector: "interpreter:continue:",
  1625. category: '*Compiler-Interpreter',
  1626. fn: function (anInterpreter, aBlock) {
  1627. var self=this;
  1628. return smalltalk.withContext(function($ctx1) {
  1629. var $1;
  1630. $1=_st(anInterpreter)._interpretBlockSequenceNode_continue_(self,aBlock);
  1631. return $1;
  1632. }, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock},smalltalk.BlockSequenceNode)});},
  1633. args: ["anInterpreter", "aBlock"],
  1634. source: "interpreter: anInterpreter continue: aBlock\x0a\x09^ anInterpreter interpretBlockSequenceNode: self continue: aBlock",
  1635. messageSends: ["interpretBlockSequenceNode:continue:"],
  1636. referencedClasses: []
  1637. }),
  1638. smalltalk.BlockSequenceNode);
  1639. smalltalk.addMethod(
  1640. "_interpreter_continue_",
  1641. smalltalk.method({
  1642. selector: "interpreter:continue:",
  1643. category: '*Compiler-Interpreter',
  1644. fn: function (anInterpreter, aBlock) {
  1645. var self=this;
  1646. return smalltalk.withContext(function($ctx1) {
  1647. var $1;
  1648. $1=_st(anInterpreter)._interpretValueNode_continue_(self,aBlock);
  1649. return $1;
  1650. }, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock},smalltalk.ValueNode)});},
  1651. args: ["anInterpreter", "aBlock"],
  1652. source: "interpreter: anInterpreter continue: aBlock\x0a\x09^ anInterpreter interpretValueNode: self continue: aBlock",
  1653. messageSends: ["interpretValueNode:continue:"],
  1654. referencedClasses: []
  1655. }),
  1656. smalltalk.ValueNode);
  1657. smalltalk.addMethod(
  1658. "_interpreter_continue_",
  1659. smalltalk.method({
  1660. selector: "interpreter:continue:",
  1661. category: '*Compiler-Interpreter',
  1662. fn: function (anInterpreter, aBlock) {
  1663. var self=this;
  1664. return smalltalk.withContext(function($ctx1) {
  1665. var $1;
  1666. $1=_st(anInterpreter)._interpretVariableNode_continue_(self,aBlock);
  1667. return $1;
  1668. }, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock},smalltalk.VariableNode)});},
  1669. args: ["anInterpreter", "aBlock"],
  1670. source: "interpreter: anInterpreter continue: aBlock\x0a\x09^ anInterpreter interpretVariableNode: self continue: aBlock",
  1671. messageSends: ["interpretVariableNode:continue:"],
  1672. referencedClasses: []
  1673. }),
  1674. smalltalk.VariableNode);
  1675. smalltalk.addMethod(
  1676. "_interpreter_continue_",
  1677. smalltalk.method({
  1678. selector: "interpreter:continue:",
  1679. category: '*Compiler-Interpreter',
  1680. fn: function (anInterpreter, aBlock) {
  1681. var self=this;
  1682. return smalltalk.withContext(function($ctx1) {
  1683. var $1;
  1684. $1=_st(anInterpreter)._interpretClassReferenceNode_continue_(self,aBlock);
  1685. return $1;
  1686. }, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock},smalltalk.ClassReferenceNode)});},
  1687. args: ["anInterpreter", "aBlock"],
  1688. source: "interpreter: anInterpreter continue: aBlock\x0a\x09^ anInterpreter interpretClassReferenceNode: self continue: aBlock",
  1689. messageSends: ["interpretClassReferenceNode:continue:"],
  1690. referencedClasses: []
  1691. }),
  1692. smalltalk.ClassReferenceNode);