Compiler-Interpreter.js 46 KB

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