Compiler-Interpreter.deploy.js 89 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625
  1. (function(smalltalk,nil,_st){
  2. smalltalk.addPackage('Compiler-Interpreter');
  3. smalltalk.addClass('AIBlockClosure', smalltalk.BlockClosure, ['node', 'outerContext'], 'Compiler-Interpreter');
  4. smalltalk.addMethod(
  5. smalltalk.method({
  6. selector: "applyTo:arguments:",
  7. fn: function (anObject,aCollection){
  8. var self=this;
  9. return smalltalk.withContext(function($ctx1) {
  10. self._interpreterError();
  11. return self}, function($ctx1) {$ctx1.fill(self,"applyTo:arguments:",{anObject:anObject,aCollection:aCollection},smalltalk.AIBlockClosure)})},
  12. messageSends: ["interpreterError"]}),
  13. smalltalk.AIBlockClosure);
  14. smalltalk.addMethod(
  15. smalltalk.method({
  16. selector: "compiledSource",
  17. fn: function (){
  18. var self=this;
  19. return smalltalk.withContext(function($ctx1) {
  20. return "[ AST Block closure ]";
  21. }, function($ctx1) {$ctx1.fill(self,"compiledSource",{},smalltalk.AIBlockClosure)})},
  22. messageSends: []}),
  23. smalltalk.AIBlockClosure);
  24. smalltalk.addMethod(
  25. smalltalk.method({
  26. selector: "currySelf",
  27. fn: function (){
  28. var self=this;
  29. return smalltalk.withContext(function($ctx1) {
  30. self._interpreterError();
  31. return self}, function($ctx1) {$ctx1.fill(self,"currySelf",{},smalltalk.AIBlockClosure)})},
  32. messageSends: ["interpreterError"]}),
  33. smalltalk.AIBlockClosure);
  34. smalltalk.addMethod(
  35. smalltalk.method({
  36. selector: "initializeWithContext:node:",
  37. fn: function (aContext,aNode){
  38. var self=this;
  39. return smalltalk.withContext(function($ctx1) {
  40. self["@node"]=aNode;
  41. self["@outerContext"]=aContext;
  42. return self}, function($ctx1) {$ctx1.fill(self,"initializeWithContext:node:",{aContext:aContext,aNode:aNode},smalltalk.AIBlockClosure)})},
  43. messageSends: []}),
  44. smalltalk.AIBlockClosure);
  45. smalltalk.addMethod(
  46. smalltalk.method({
  47. selector: "interpreterError",
  48. fn: function (){
  49. var self=this;
  50. function $AIInterpreterError(){return smalltalk.AIInterpreterError||(typeof AIInterpreterError=="undefined"?nil:AIInterpreterError)}
  51. return smalltalk.withContext(function($ctx1) {
  52. _st($AIInterpreterError())._signal_("Method cannot be interpreted by the interpreter.");
  53. return self}, function($ctx1) {$ctx1.fill(self,"interpreterError",{},smalltalk.AIBlockClosure)})},
  54. messageSends: ["signal:"]}),
  55. smalltalk.AIBlockClosure);
  56. smalltalk.addMethod(
  57. smalltalk.method({
  58. selector: "numArgs",
  59. fn: function (){
  60. var self=this;
  61. return smalltalk.withContext(function($ctx1) {
  62. var $1;
  63. $1=_st(_st(self["@node"])._temps())._size();
  64. return $1;
  65. }, function($ctx1) {$ctx1.fill(self,"numArgs",{},smalltalk.AIBlockClosure)})},
  66. messageSends: ["size", "temps"]}),
  67. smalltalk.AIBlockClosure);
  68. smalltalk.addMethod(
  69. smalltalk.method({
  70. selector: "value",
  71. fn: function (){
  72. var self=this;
  73. return smalltalk.withContext(function($ctx1) {
  74. var $1;
  75. $1=self._valueWithPossibleArguments_([]);
  76. return $1;
  77. }, function($ctx1) {$ctx1.fill(self,"value",{},smalltalk.AIBlockClosure)})},
  78. messageSends: ["valueWithPossibleArguments:"]}),
  79. smalltalk.AIBlockClosure);
  80. smalltalk.addMethod(
  81. smalltalk.method({
  82. selector: "value:",
  83. fn: function (anArgument){
  84. var self=this;
  85. return smalltalk.withContext(function($ctx1) {
  86. var $1;
  87. $1=self._valueWithPossibleArguments_([anArgument]);
  88. return $1;
  89. }, function($ctx1) {$ctx1.fill(self,"value:",{anArgument:anArgument},smalltalk.AIBlockClosure)})},
  90. messageSends: ["valueWithPossibleArguments:"]}),
  91. smalltalk.AIBlockClosure);
  92. smalltalk.addMethod(
  93. smalltalk.method({
  94. selector: "value:value:",
  95. fn: function (firstArgument,secondArgument){
  96. var self=this;
  97. return smalltalk.withContext(function($ctx1) {
  98. var $1;
  99. $1=self._valueWithPossibleArguments_([firstArgument,secondArgument]);
  100. return $1;
  101. }, function($ctx1) {$ctx1.fill(self,"value:value:",{firstArgument:firstArgument,secondArgument:secondArgument},smalltalk.AIBlockClosure)})},
  102. messageSends: ["valueWithPossibleArguments:"]}),
  103. smalltalk.AIBlockClosure);
  104. smalltalk.addMethod(
  105. smalltalk.method({
  106. selector: "value:value:value:",
  107. fn: function (firstArgument,secondArgument,thirdArgument){
  108. var self=this;
  109. return smalltalk.withContext(function($ctx1) {
  110. var $1;
  111. $1=self._valueWithPossibleArguments_([firstArgument,secondArgument,thirdArgument]);
  112. return $1;
  113. }, function($ctx1) {$ctx1.fill(self,"value:value:value:",{firstArgument:firstArgument,secondArgument:secondArgument,thirdArgument:thirdArgument},smalltalk.AIBlockClosure)})},
  114. messageSends: ["valueWithPossibleArguments:"]}),
  115. smalltalk.AIBlockClosure);
  116. smalltalk.addMethod(
  117. smalltalk.method({
  118. selector: "valueWithPossibleArguments:",
  119. fn: function (aCollection){
  120. var self=this;
  121. var context,sequenceNode;
  122. return smalltalk.withContext(function($ctx1) {
  123. var $1,$2,$3,$4,$5;
  124. context=_st(self["@outerContext"])._newBlockContext();
  125. $1=_st(_st(_st(self["@node"])._nodes())._first())._copy();
  126. _st($1)._parent_(nil);
  127. $2=_st($1)._yourself();
  128. sequenceNode=$2;
  129. _st(_st(self["@node"])._parameters())._withIndexDo_((function(each,index){
  130. return smalltalk.withContext(function($ctx2) {
  131. return _st(context)._localAt_put_(each,_st(aCollection)._at_ifAbsent_(index,(function(){
  132. return smalltalk.withContext(function($ctx3) {
  133. return nil;
  134. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})})));
  135. }, function($ctx2) {$ctx2.fillBlock({each:each,index:index},$ctx1,1)})}));
  136. $3=_st(context)._interpreter();
  137. _st($3)._node_(_st(sequenceNode)._nextChild());
  138. $4=_st($3)._proceed();
  139. _st(_st(self["@outerContext"])._interpreter())._returnValue_(_st(_st(context)._interpreter())._returnValue());
  140. _st(console)._log_(_st(_st(context)._interpreter())._returnValue());
  141. $5=_st(_st(context)._interpreter())._pop();
  142. return $5;
  143. }, function($ctx1) {$ctx1.fill(self,"valueWithPossibleArguments:",{aCollection:aCollection,context:context,sequenceNode:sequenceNode},smalltalk.AIBlockClosure)})},
  144. messageSends: ["newBlockContext", "parent:", "copy", "first", "nodes", "yourself", "withIndexDo:", "parameters", "localAt:put:", "at:ifAbsent:", "node:", "interpreter", "nextChild", "proceed", "returnValue:", "returnValue", "log:", "pop"]}),
  145. smalltalk.AIBlockClosure);
  146. smalltalk.addMethod(
  147. smalltalk.method({
  148. selector: "forContext:node:",
  149. fn: function (aContext,aNode){
  150. var self=this;
  151. return smalltalk.withContext(function($ctx1) {
  152. var $2,$3,$1;
  153. $2=self._new();
  154. _st($2)._initializeWithContext_node_(aContext,aNode);
  155. $3=_st($2)._yourself();
  156. $1=$3;
  157. return $1;
  158. }, function($ctx1) {$ctx1.fill(self,"forContext:node:",{aContext:aContext,aNode:aNode},smalltalk.AIBlockClosure.klass)})},
  159. messageSends: ["initializeWithContext:node:", "new", "yourself"]}),
  160. smalltalk.AIBlockClosure.klass);
  161. smalltalk.addClass('AIContext', smalltalk.Object, ['outerContext', 'innerContext', 'pc', 'locals', 'method', 'index', 'ast', 'interpreter'], 'Compiler-Interpreter');
  162. smalltalk.addMethod(
  163. smalltalk.method({
  164. selector: "arguments",
  165. fn: function (){
  166. var self=this;
  167. return smalltalk.withContext(function($ctx1) {
  168. var $1;
  169. $1=_st(_st(self._ast())._arguments())._collect_((function(each){
  170. return smalltalk.withContext(function($ctx2) {
  171. return self._localAt_(each);
  172. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  173. return $1;
  174. }, function($ctx1) {$ctx1.fill(self,"arguments",{},smalltalk.AIContext)})},
  175. messageSends: ["collect:", "arguments", "ast", "localAt:"]}),
  176. smalltalk.AIContext);
  177. smalltalk.addMethod(
  178. smalltalk.method({
  179. selector: "asString",
  180. fn: function (){
  181. var self=this;
  182. return smalltalk.withContext(function($ctx1) {
  183. var $2,$1;
  184. $2=self._isBlockContext();
  185. if(smalltalk.assert($2)){
  186. $1=_st("a block (in ".__comma(_st(self._methodContext())._asString())).__comma(")");
  187. } else {
  188. $1=_st(_st(_st(_st(self._receiver())._class())._name()).__comma(" >> ")).__comma(self._selector());
  189. };
  190. return $1;
  191. }, function($ctx1) {$ctx1.fill(self,"asString",{},smalltalk.AIContext)})},
  192. messageSends: ["ifTrue:ifFalse:", "isBlockContext", ",", "asString", "methodContext", "name", "class", "receiver", "selector"]}),
  193. smalltalk.AIContext);
  194. smalltalk.addMethod(
  195. smalltalk.method({
  196. selector: "ast",
  197. fn: function (){
  198. var self=this;
  199. return smalltalk.withContext(function($ctx1) {
  200. var $1,$2,$3,$4;
  201. $1=self._isBlockContext();
  202. if(smalltalk.assert($1)){
  203. $2=_st(self._outerContext())._ast();
  204. return $2;
  205. };
  206. $3=self["@ast"];
  207. if(($receiver = $3) == nil || $receiver == undefined){
  208. self._initializeAST();
  209. } else {
  210. $3;
  211. };
  212. $4=self["@ast"];
  213. return $4;
  214. }, function($ctx1) {$ctx1.fill(self,"ast",{},smalltalk.AIContext)})},
  215. messageSends: ["ifTrue:", "isBlockContext", "ast", "outerContext", "ifNil:", "initializeAST"]}),
  216. smalltalk.AIContext);
  217. smalltalk.addMethod(
  218. smalltalk.method({
  219. selector: "index",
  220. fn: function (){
  221. var self=this;
  222. return smalltalk.withContext(function($ctx1) {
  223. var $2,$1;
  224. $2=self["@index"];
  225. if(($receiver = $2) == nil || $receiver == undefined){
  226. $1=(0);
  227. } else {
  228. $1=$2;
  229. };
  230. return $1;
  231. }, function($ctx1) {$ctx1.fill(self,"index",{},smalltalk.AIContext)})},
  232. messageSends: ["ifNil:"]}),
  233. smalltalk.AIContext);
  234. smalltalk.addMethod(
  235. smalltalk.method({
  236. selector: "index:",
  237. fn: function (anInteger){
  238. var self=this;
  239. return smalltalk.withContext(function($ctx1) {
  240. self["@index"]=anInteger;
  241. return self}, function($ctx1) {$ctx1.fill(self,"index:",{anInteger:anInteger},smalltalk.AIContext)})},
  242. messageSends: []}),
  243. smalltalk.AIContext);
  244. smalltalk.addMethod(
  245. smalltalk.method({
  246. selector: "initializeAST",
  247. fn: function (){
  248. var self=this;
  249. function $SemanticAnalyzer(){return smalltalk.SemanticAnalyzer||(typeof SemanticAnalyzer=="undefined"?nil:SemanticAnalyzer)}
  250. return smalltalk.withContext(function($ctx1) {
  251. self["@ast"]=_st(self._method())._ast();
  252. _st(_st($SemanticAnalyzer())._on_(_st(self._method())._methodClass()))._visit_(self["@ast"]);
  253. return self}, function($ctx1) {$ctx1.fill(self,"initializeAST",{},smalltalk.AIContext)})},
  254. messageSends: ["ast", "method", "visit:", "on:", "methodClass"]}),
  255. smalltalk.AIContext);
  256. smalltalk.addMethod(
  257. smalltalk.method({
  258. selector: "initializeFromMethodContext:",
  259. fn: function (aMethodContext){
  260. var self=this;
  261. return smalltalk.withContext(function($ctx1) {
  262. var $1,$2,$3,$4;
  263. $1=self;
  264. _st($1)._pc_(_st(aMethodContext)._pc());
  265. _st($1)._index_(_st(aMethodContext)._index());
  266. _st($1)._receiver_(_st(aMethodContext)._receiver());
  267. $2=_st($1)._method_(_st(aMethodContext)._method());
  268. $3=_st(aMethodContext)._outerContext();
  269. if(($receiver = $3) == nil || $receiver == undefined){
  270. $3;
  271. } else {
  272. var outer;
  273. outer=$receiver;
  274. $4=_st(outer)._methodContext();
  275. if(($receiver = $4) == nil || $receiver == undefined){
  276. $4;
  277. } else {
  278. self._outerContext_(_st(self._class())._fromMethodContext_(_st(aMethodContext)._outerContext()));
  279. };
  280. _st(_st(aMethodContext)._locals())._keysAndValuesDo_((function(key,value){
  281. return smalltalk.withContext(function($ctx2) {
  282. return _st(self._locals())._at_put_(key,value);
  283. }, function($ctx2) {$ctx2.fillBlock({key:key,value:value},$ctx1,3)})}));
  284. };
  285. return self}, function($ctx1) {$ctx1.fill(self,"initializeFromMethodContext:",{aMethodContext:aMethodContext},smalltalk.AIContext)})},
  286. messageSends: ["pc:", "pc", "index:", "index", "receiver:", "receiver", "method:", "method", "ifNotNil:", "outerContext", "methodContext", "outerContext:", "fromMethodContext:", "class", "keysAndValuesDo:", "locals", "at:put:"]}),
  287. smalltalk.AIContext);
  288. smalltalk.addMethod(
  289. smalltalk.method({
  290. selector: "initializeInterpreter",
  291. fn: function (){
  292. var self=this;
  293. function $Interpreter(){return smalltalk.Interpreter||(typeof Interpreter=="undefined"?nil:Interpreter)}
  294. return smalltalk.withContext(function($ctx1) {
  295. var $1,$2,$3,$4;
  296. $1=_st($Interpreter())._new();
  297. _st($1)._context_(self);
  298. $2=_st($1)._yourself();
  299. self["@interpreter"]=$2;
  300. $3=self["@ast"];
  301. if(($receiver = $3) == nil || $receiver == undefined){
  302. $3;
  303. } else {
  304. _st(self["@interpreter"])._node_(self._retrieveNode());
  305. };
  306. $4=_st(_st(self._innerContext())._notNil())._and_((function(){
  307. return smalltalk.withContext(function($ctx2) {
  308. return _st(_st(self._innerContext())._isBlockContext())._not();
  309. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  310. if(smalltalk.assert($4)){
  311. self._setupInterpreter_(self["@interpreter"]);
  312. };
  313. return self}, function($ctx1) {$ctx1.fill(self,"initializeInterpreter",{},smalltalk.AIContext)})},
  314. messageSends: ["context:", "new", "yourself", "ifNotNil:", "node:", "retrieveNode", "ifTrue:", "and:", "notNil", "innerContext", "not", "isBlockContext", "setupInterpreter:"]}),
  315. smalltalk.AIContext);
  316. smalltalk.addMethod(
  317. smalltalk.method({
  318. selector: "initializeLocals",
  319. fn: function (){
  320. var self=this;
  321. function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  322. return smalltalk.withContext(function($ctx1) {
  323. self["@locals"]=_st($Dictionary())._new();
  324. _st(self["@locals"])._at_put_("thisContext",self);
  325. return self}, function($ctx1) {$ctx1.fill(self,"initializeLocals",{},smalltalk.AIContext)})},
  326. messageSends: ["new", "at:put:"]}),
  327. smalltalk.AIContext);
  328. smalltalk.addMethod(
  329. smalltalk.method({
  330. selector: "innerContext",
  331. fn: function (){
  332. var self=this;
  333. return smalltalk.withContext(function($ctx1) {
  334. var $1;
  335. $1=self["@innerContext"];
  336. return $1;
  337. }, function($ctx1) {$ctx1.fill(self,"innerContext",{},smalltalk.AIContext)})},
  338. messageSends: []}),
  339. smalltalk.AIContext);
  340. smalltalk.addMethod(
  341. smalltalk.method({
  342. selector: "innerContext:",
  343. fn: function (anAIContext){
  344. var self=this;
  345. return smalltalk.withContext(function($ctx1) {
  346. self["@innerContext"]=anAIContext;
  347. return self}, function($ctx1) {$ctx1.fill(self,"innerContext:",{anAIContext:anAIContext},smalltalk.AIContext)})},
  348. messageSends: []}),
  349. smalltalk.AIContext);
  350. smalltalk.addMethod(
  351. smalltalk.method({
  352. selector: "interpreter",
  353. fn: function (){
  354. var self=this;
  355. return smalltalk.withContext(function($ctx1) {
  356. var $1,$2;
  357. $1=self["@interpreter"];
  358. if(($receiver = $1) == nil || $receiver == undefined){
  359. self._initializeInterpreter();
  360. } else {
  361. $1;
  362. };
  363. $2=self["@interpreter"];
  364. return $2;
  365. }, function($ctx1) {$ctx1.fill(self,"interpreter",{},smalltalk.AIContext)})},
  366. messageSends: ["ifNil:", "initializeInterpreter"]}),
  367. smalltalk.AIContext);
  368. smalltalk.addMethod(
  369. smalltalk.method({
  370. selector: "interpreter:",
  371. fn: function (anInterpreter){
  372. var self=this;
  373. return smalltalk.withContext(function($ctx1) {
  374. self["@interpreter"]=anInterpreter;
  375. return self}, function($ctx1) {$ctx1.fill(self,"interpreter:",{anInterpreter:anInterpreter},smalltalk.AIContext)})},
  376. messageSends: []}),
  377. smalltalk.AIContext);
  378. smalltalk.addMethod(
  379. smalltalk.method({
  380. selector: "isBlockContext",
  381. fn: function (){
  382. var self=this;
  383. return smalltalk.withContext(function($ctx1) {
  384. var $1;
  385. $1=_st(self._selector())._isNil();
  386. return $1;
  387. }, function($ctx1) {$ctx1.fill(self,"isBlockContext",{},smalltalk.AIContext)})},
  388. messageSends: ["isNil", "selector"]}),
  389. smalltalk.AIContext);
  390. smalltalk.addMethod(
  391. smalltalk.method({
  392. selector: "localAt:",
  393. fn: function (aString){
  394. var self=this;
  395. return smalltalk.withContext(function($ctx1) {
  396. var $2,$1;
  397. $1=_st(self._locals())._at_ifAbsent_(aString,(function(){
  398. return smalltalk.withContext(function($ctx2) {
  399. $2=self._isBlockContext();
  400. if(smalltalk.assert($2)){
  401. return nil;
  402. } else {
  403. return _st(self._outerContext())._localAt_(aString);
  404. };
  405. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  406. return $1;
  407. }, function($ctx1) {$ctx1.fill(self,"localAt:",{aString:aString},smalltalk.AIContext)})},
  408. messageSends: ["at:ifAbsent:", "locals", "ifTrue:ifFalse:", "isBlockContext", "localAt:", "outerContext"]}),
  409. smalltalk.AIContext);
  410. smalltalk.addMethod(
  411. smalltalk.method({
  412. selector: "localAt:put:",
  413. fn: function (aString,anObject){
  414. var self=this;
  415. return smalltalk.withContext(function($ctx1) {
  416. _st(self._locals())._at_put_(aString,anObject);
  417. return self}, function($ctx1) {$ctx1.fill(self,"localAt:put:",{aString:aString,anObject:anObject},smalltalk.AIContext)})},
  418. messageSends: ["at:put:", "locals"]}),
  419. smalltalk.AIContext);
  420. smalltalk.addMethod(
  421. smalltalk.method({
  422. selector: "locals",
  423. fn: function (){
  424. var self=this;
  425. return smalltalk.withContext(function($ctx1) {
  426. var $1,$2;
  427. $1=self["@locals"];
  428. if(($receiver = $1) == nil || $receiver == undefined){
  429. self._initializeLocals();
  430. } else {
  431. $1;
  432. };
  433. $2=self["@locals"];
  434. return $2;
  435. }, function($ctx1) {$ctx1.fill(self,"locals",{},smalltalk.AIContext)})},
  436. messageSends: ["ifNil:", "initializeLocals"]}),
  437. smalltalk.AIContext);
  438. smalltalk.addMethod(
  439. smalltalk.method({
  440. selector: "method",
  441. fn: function (){
  442. var self=this;
  443. return smalltalk.withContext(function($ctx1) {
  444. var $1;
  445. $1=self["@method"];
  446. return $1;
  447. }, function($ctx1) {$ctx1.fill(self,"method",{},smalltalk.AIContext)})},
  448. messageSends: []}),
  449. smalltalk.AIContext);
  450. smalltalk.addMethod(
  451. smalltalk.method({
  452. selector: "method:",
  453. fn: function (aCompiledMethod){
  454. var self=this;
  455. return smalltalk.withContext(function($ctx1) {
  456. self["@method"]=aCompiledMethod;
  457. return self}, function($ctx1) {$ctx1.fill(self,"method:",{aCompiledMethod:aCompiledMethod},smalltalk.AIContext)})},
  458. messageSends: []}),
  459. smalltalk.AIContext);
  460. smalltalk.addMethod(
  461. smalltalk.method({
  462. selector: "methodContext",
  463. fn: function (){
  464. var self=this;
  465. return smalltalk.withContext(function($ctx1) {
  466. var $1,$2,$4,$3;
  467. $1=self._isBlockContext();
  468. if(! smalltalk.assert($1)){
  469. $2=self;
  470. return $2;
  471. };
  472. $4=self._outerContext();
  473. if(($receiver = $4) == nil || $receiver == undefined){
  474. $3=$4;
  475. } else {
  476. var outer;
  477. outer=$receiver;
  478. $3=_st(outer)._methodContext();
  479. };
  480. return $3;
  481. }, function($ctx1) {$ctx1.fill(self,"methodContext",{},smalltalk.AIContext)})},
  482. messageSends: ["ifFalse:", "isBlockContext", "ifNotNil:", "outerContext", "methodContext"]}),
  483. smalltalk.AIContext);
  484. smalltalk.addMethod(
  485. smalltalk.method({
  486. selector: "newBlockContext",
  487. fn: function (){
  488. var self=this;
  489. return smalltalk.withContext(function($ctx1) {
  490. var $2,$3,$1;
  491. $2=_st(self._class())._new();
  492. _st($2)._outerContext_(self);
  493. $3=_st($2)._yourself();
  494. $1=$3;
  495. return $1;
  496. }, function($ctx1) {$ctx1.fill(self,"newBlockContext",{},smalltalk.AIContext)})},
  497. messageSends: ["outerContext:", "new", "class", "yourself"]}),
  498. smalltalk.AIContext);
  499. smalltalk.addMethod(
  500. smalltalk.method({
  501. selector: "outerContext",
  502. fn: function (){
  503. var self=this;
  504. return smalltalk.withContext(function($ctx1) {
  505. var $1;
  506. $1=self["@outerContext"];
  507. return $1;
  508. }, function($ctx1) {$ctx1.fill(self,"outerContext",{},smalltalk.AIContext)})},
  509. messageSends: []}),
  510. smalltalk.AIContext);
  511. smalltalk.addMethod(
  512. smalltalk.method({
  513. selector: "outerContext:",
  514. fn: function (anAIContext){
  515. var self=this;
  516. return smalltalk.withContext(function($ctx1) {
  517. self["@outerContext"]=anAIContext;
  518. _st(self["@outerContext"])._innerContext_(self);
  519. return self}, function($ctx1) {$ctx1.fill(self,"outerContext:",{anAIContext:anAIContext},smalltalk.AIContext)})},
  520. messageSends: ["innerContext:"]}),
  521. smalltalk.AIContext);
  522. smalltalk.addMethod(
  523. smalltalk.method({
  524. selector: "pc",
  525. fn: function (){
  526. var self=this;
  527. return smalltalk.withContext(function($ctx1) {
  528. var $2,$1;
  529. $2=self["@pc"];
  530. if(($receiver = $2) == nil || $receiver == undefined){
  531. self["@pc"]=(0);
  532. $1=self["@pc"];
  533. } else {
  534. $1=$2;
  535. };
  536. return $1;
  537. }, function($ctx1) {$ctx1.fill(self,"pc",{},smalltalk.AIContext)})},
  538. messageSends: ["ifNil:"]}),
  539. smalltalk.AIContext);
  540. smalltalk.addMethod(
  541. smalltalk.method({
  542. selector: "pc:",
  543. fn: function (anInteger){
  544. var self=this;
  545. return smalltalk.withContext(function($ctx1) {
  546. self["@pc"]=anInteger;
  547. return self}, function($ctx1) {$ctx1.fill(self,"pc:",{anInteger:anInteger},smalltalk.AIContext)})},
  548. messageSends: []}),
  549. smalltalk.AIContext);
  550. smalltalk.addMethod(
  551. smalltalk.method({
  552. selector: "receiver",
  553. fn: function (){
  554. var self=this;
  555. return smalltalk.withContext(function($ctx1) {
  556. var $1;
  557. $1=self._localAt_("self");
  558. return $1;
  559. }, function($ctx1) {$ctx1.fill(self,"receiver",{},smalltalk.AIContext)})},
  560. messageSends: ["localAt:"]}),
  561. smalltalk.AIContext);
  562. smalltalk.addMethod(
  563. smalltalk.method({
  564. selector: "receiver:",
  565. fn: function (anObject){
  566. var self=this;
  567. return smalltalk.withContext(function($ctx1) {
  568. self._localAt_put_("self",anObject);
  569. return self}, function($ctx1) {$ctx1.fill(self,"receiver:",{anObject:anObject},smalltalk.AIContext)})},
  570. messageSends: ["localAt:put:"]}),
  571. smalltalk.AIContext);
  572. smalltalk.addMethod(
  573. smalltalk.method({
  574. selector: "retrieveNode",
  575. fn: function (){
  576. var self=this;
  577. function $ASTPCNodeVisitor(){return smalltalk.ASTPCNodeVisitor||(typeof ASTPCNodeVisitor=="undefined"?nil:ASTPCNodeVisitor)}
  578. return smalltalk.withContext(function($ctx1) {
  579. var $2,$3,$1;
  580. $2=_st($ASTPCNodeVisitor())._new();
  581. _st($2)._context_(self);
  582. _st($2)._visit_(self._ast());
  583. $3=_st($2)._currentNode();
  584. $1=$3;
  585. return $1;
  586. }, function($ctx1) {$ctx1.fill(self,"retrieveNode",{},smalltalk.AIContext)})},
  587. messageSends: ["context:", "new", "visit:", "ast", "currentNode"]}),
  588. smalltalk.AIContext);
  589. smalltalk.addMethod(
  590. smalltalk.method({
  591. selector: "selector",
  592. fn: function (){
  593. var self=this;
  594. return smalltalk.withContext(function($ctx1) {
  595. var $2,$1;
  596. $2=self._method();
  597. if(($receiver = $2) == nil || $receiver == undefined){
  598. $1=$2;
  599. } else {
  600. $1=_st(self._method())._selector();
  601. };
  602. return $1;
  603. }, function($ctx1) {$ctx1.fill(self,"selector",{},smalltalk.AIContext)})},
  604. messageSends: ["ifNotNil:", "method", "selector"]}),
  605. smalltalk.AIContext);
  606. smalltalk.addMethod(
  607. smalltalk.method({
  608. selector: "setupInterpreter:",
  609. fn: function (anInterpreter){
  610. var self=this;
  611. return smalltalk.withContext(function($ctx1) {
  612. _st(_st(_st(self._innerContext())._arguments())._reversed())._do_((function(each){
  613. return smalltalk.withContext(function($ctx2) {
  614. return _st(anInterpreter)._push_(each);
  615. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  616. _st(anInterpreter)._push_(_st(self._innerContext())._receiver());
  617. return self}, function($ctx1) {$ctx1.fill(self,"setupInterpreter:",{anInterpreter:anInterpreter},smalltalk.AIContext)})},
  618. messageSends: ["do:", "reversed", "arguments", "innerContext", "push:", "receiver"]}),
  619. smalltalk.AIContext);
  620. smalltalk.addMethod(
  621. smalltalk.method({
  622. selector: "fromMethodContext:",
  623. fn: function (aMethodContext){
  624. var self=this;
  625. return smalltalk.withContext(function($ctx1) {
  626. var $2,$3,$1;
  627. $2=self._new();
  628. _st($2)._initializeFromMethodContext_(aMethodContext);
  629. $3=_st($2)._yourself();
  630. $1=$3;
  631. return $1;
  632. }, function($ctx1) {$ctx1.fill(self,"fromMethodContext:",{aMethodContext:aMethodContext},smalltalk.AIContext.klass)})},
  633. messageSends: ["initializeFromMethodContext:", "new", "yourself"]}),
  634. smalltalk.AIContext.klass);
  635. smalltalk.addClass('AIInterpreterError', smalltalk.Error, [], 'Compiler-Interpreter');
  636. smalltalk.addClass('ASTDebugger', smalltalk.Object, ['interpreter', 'context'], 'Compiler-Interpreter');
  637. smalltalk.addMethod(
  638. smalltalk.method({
  639. selector: "atEnd",
  640. fn: function (){
  641. var self=this;
  642. return smalltalk.withContext(function($ctx1) {
  643. var $1;
  644. $1=_st(self._interpreter())._atEnd();
  645. return $1;
  646. }, function($ctx1) {$ctx1.fill(self,"atEnd",{},smalltalk.ASTDebugger)})},
  647. messageSends: ["atEnd", "interpreter"]}),
  648. smalltalk.ASTDebugger);
  649. smalltalk.addMethod(
  650. smalltalk.method({
  651. selector: "buildAST",
  652. fn: function (){
  653. var self=this;
  654. var ast;
  655. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  656. function $SemanticAnalyzer(){return smalltalk.SemanticAnalyzer||(typeof SemanticAnalyzer=="undefined"?nil:SemanticAnalyzer)}
  657. return smalltalk.withContext(function($ctx1) {
  658. var $1;
  659. ast=_st(_st($Smalltalk())._current())._parse_(_st(self._method())._source());
  660. _st(_st($SemanticAnalyzer())._on_(_st(_st(self._context())._receiver())._class()))._visit_(ast);
  661. $1=ast;
  662. return $1;
  663. }, function($ctx1) {$ctx1.fill(self,"buildAST",{ast:ast},smalltalk.ASTDebugger)})},
  664. messageSends: ["parse:", "current", "source", "method", "visit:", "on:", "class", "receiver", "context"]}),
  665. smalltalk.ASTDebugger);
  666. smalltalk.addMethod(
  667. smalltalk.method({
  668. selector: "context",
  669. fn: function (){
  670. var self=this;
  671. return smalltalk.withContext(function($ctx1) {
  672. var $1;
  673. $1=self["@context"];
  674. return $1;
  675. }, function($ctx1) {$ctx1.fill(self,"context",{},smalltalk.ASTDebugger)})},
  676. messageSends: []}),
  677. smalltalk.ASTDebugger);
  678. smalltalk.addMethod(
  679. smalltalk.method({
  680. selector: "context:",
  681. fn: function (aContext){
  682. var self=this;
  683. return smalltalk.withContext(function($ctx1) {
  684. self["@context"]=aContext;
  685. return self}, function($ctx1) {$ctx1.fill(self,"context:",{aContext:aContext},smalltalk.ASTDebugger)})},
  686. messageSends: []}),
  687. smalltalk.ASTDebugger);
  688. smalltalk.addMethod(
  689. smalltalk.method({
  690. selector: "defaultInterpreterClass",
  691. fn: function (){
  692. var self=this;
  693. function $ASTSteppingInterpreter(){return smalltalk.ASTSteppingInterpreter||(typeof ASTSteppingInterpreter=="undefined"?nil:ASTSteppingInterpreter)}
  694. return smalltalk.withContext(function($ctx1) {
  695. var $1;
  696. $1=$ASTSteppingInterpreter();
  697. return $1;
  698. }, function($ctx1) {$ctx1.fill(self,"defaultInterpreterClass",{},smalltalk.ASTDebugger)})},
  699. messageSends: []}),
  700. smalltalk.ASTDebugger);
  701. smalltalk.addMethod(
  702. smalltalk.method({
  703. selector: "initializeInterpreter",
  704. fn: function (){
  705. var self=this;
  706. var ast,next;
  707. function $ASTPCNodeVisitor(){return smalltalk.ASTPCNodeVisitor||(typeof ASTPCNodeVisitor=="undefined"?nil:ASTPCNodeVisitor)}
  708. return smalltalk.withContext(function($ctx1) {
  709. var $1,$2;
  710. ast=self._buildAST();
  711. $1=_st($ASTPCNodeVisitor())._new();
  712. _st($1)._context_(self._context());
  713. _st($1)._visit_(ast);
  714. $2=_st($1)._currentNode();
  715. next=$2;
  716. _st(self._interpreter())._interpret_(next);
  717. return self}, function($ctx1) {$ctx1.fill(self,"initializeInterpreter",{ast:ast,next:next},smalltalk.ASTDebugger)})},
  718. messageSends: ["buildAST", "context:", "new", "context", "visit:", "currentNode", "interpret:", "interpreter"]}),
  719. smalltalk.ASTDebugger);
  720. smalltalk.addMethod(
  721. smalltalk.method({
  722. selector: "initializeWithContext:",
  723. fn: function (aContext){
  724. var self=this;
  725. return smalltalk.withContext(function($ctx1) {
  726. self._context_(aContext);
  727. self._initializeInterpreter();
  728. return self}, function($ctx1) {$ctx1.fill(self,"initializeWithContext:",{aContext:aContext},smalltalk.ASTDebugger)})},
  729. messageSends: ["context:", "initializeInterpreter"]}),
  730. smalltalk.ASTDebugger);
  731. smalltalk.addMethod(
  732. smalltalk.method({
  733. selector: "interpreter",
  734. fn: function (){
  735. var self=this;
  736. return smalltalk.withContext(function($ctx1) {
  737. var $2,$1;
  738. $2=self["@interpreter"];
  739. if(($receiver = $2) == nil || $receiver == undefined){
  740. self["@interpreter"]=_st(self._defaultInterpreterClass())._new();
  741. $1=self["@interpreter"];
  742. } else {
  743. $1=$2;
  744. };
  745. return $1;
  746. }, function($ctx1) {$ctx1.fill(self,"interpreter",{},smalltalk.ASTDebugger)})},
  747. messageSends: ["ifNil:", "new", "defaultInterpreterClass"]}),
  748. smalltalk.ASTDebugger);
  749. smalltalk.addMethod(
  750. smalltalk.method({
  751. selector: "interpreter:",
  752. fn: function (anInterpreter){
  753. var self=this;
  754. return smalltalk.withContext(function($ctx1) {
  755. self["@interpreter"]=anInterpreter;
  756. return self}, function($ctx1) {$ctx1.fill(self,"interpreter:",{anInterpreter:anInterpreter},smalltalk.ASTDebugger)})},
  757. messageSends: []}),
  758. smalltalk.ASTDebugger);
  759. smalltalk.addMethod(
  760. smalltalk.method({
  761. selector: "method",
  762. fn: function (){
  763. var self=this;
  764. return smalltalk.withContext(function($ctx1) {
  765. var $1;
  766. $1=_st(self._context())._method();
  767. return $1;
  768. }, function($ctx1) {$ctx1.fill(self,"method",{},smalltalk.ASTDebugger)})},
  769. messageSends: ["method", "context"]}),
  770. smalltalk.ASTDebugger);
  771. smalltalk.addMethod(
  772. smalltalk.method({
  773. selector: "nextNode",
  774. fn: function (){
  775. var self=this;
  776. return smalltalk.withContext(function($ctx1) {
  777. var $1;
  778. $1=_st(self._interpreter())._nextNode();
  779. return $1;
  780. }, function($ctx1) {$ctx1.fill(self,"nextNode",{},smalltalk.ASTDebugger)})},
  781. messageSends: ["nextNode", "interpreter"]}),
  782. smalltalk.ASTDebugger);
  783. smalltalk.addMethod(
  784. smalltalk.method({
  785. selector: "proceed",
  786. fn: function (){
  787. var self=this;
  788. return smalltalk.withContext(function($ctx1) {
  789. self._shouldBeImplemented();
  790. return self}, function($ctx1) {$ctx1.fill(self,"proceed",{},smalltalk.ASTDebugger)})},
  791. messageSends: ["shouldBeImplemented"]}),
  792. smalltalk.ASTDebugger);
  793. smalltalk.addMethod(
  794. smalltalk.method({
  795. selector: "restart",
  796. fn: function (){
  797. var self=this;
  798. return smalltalk.withContext(function($ctx1) {
  799. self._shouldBeImplemented();
  800. return self}, function($ctx1) {$ctx1.fill(self,"restart",{},smalltalk.ASTDebugger)})},
  801. messageSends: ["shouldBeImplemented"]}),
  802. smalltalk.ASTDebugger);
  803. smalltalk.addMethod(
  804. smalltalk.method({
  805. selector: "step",
  806. fn: function (){
  807. var self=this;
  808. return smalltalk.withContext(function($ctx1) {
  809. _st((function(){
  810. return smalltalk.withContext(function($ctx2) {
  811. return _st(_st(_st(_st(self._interpreter())._nextNode())._notNil())._and_((function(){
  812. return smalltalk.withContext(function($ctx3) {
  813. return _st(_st(self._interpreter())._nextNode())._stopOnStepping();
  814. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})})))._or_((function(){
  815. return smalltalk.withContext(function($ctx3) {
  816. return _st(_st(self._interpreter())._atEnd())._not();
  817. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  818. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}))._whileFalse_((function(){
  819. return smalltalk.withContext(function($ctx2) {
  820. _st(self._interpreter())._step();
  821. return self._step();
  822. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)})}));
  823. return self}, function($ctx1) {$ctx1.fill(self,"step",{},smalltalk.ASTDebugger)})},
  824. messageSends: ["whileFalse:", "or:", "and:", "notNil", "nextNode", "interpreter", "stopOnStepping", "not", "atEnd", "step"]}),
  825. smalltalk.ASTDebugger);
  826. smalltalk.addMethod(
  827. smalltalk.method({
  828. selector: "stepInto",
  829. fn: function (){
  830. var self=this;
  831. return smalltalk.withContext(function($ctx1) {
  832. self._shouldBeImplemented();
  833. return self}, function($ctx1) {$ctx1.fill(self,"stepInto",{},smalltalk.ASTDebugger)})},
  834. messageSends: ["shouldBeImplemented"]}),
  835. smalltalk.ASTDebugger);
  836. smalltalk.addMethod(
  837. smalltalk.method({
  838. selector: "stepOver",
  839. fn: function (){
  840. var self=this;
  841. return smalltalk.withContext(function($ctx1) {
  842. self._step();
  843. return self}, function($ctx1) {$ctx1.fill(self,"stepOver",{},smalltalk.ASTDebugger)})},
  844. messageSends: ["step"]}),
  845. smalltalk.ASTDebugger);
  846. smalltalk.addMethod(
  847. smalltalk.method({
  848. selector: "context:",
  849. fn: function (aContext){
  850. var self=this;
  851. return smalltalk.withContext(function($ctx1) {
  852. var $2,$3,$1;
  853. $2=self._new();
  854. _st($2)._initializeWithContext_(aContext);
  855. $3=_st($2)._yourself();
  856. $1=$3;
  857. return $1;
  858. }, function($ctx1) {$ctx1.fill(self,"context:",{aContext:aContext},smalltalk.ASTDebugger.klass)})},
  859. messageSends: ["initializeWithContext:", "new", "yourself"]}),
  860. smalltalk.ASTDebugger.klass);
  861. smalltalk.addClass('ASTInterpreter', smalltalk.Object, ['currentNode', 'nextNode', 'context', 'shouldReturn', 'result'], 'Compiler-Interpreter');
  862. smalltalk.addMethod(
  863. smalltalk.method({
  864. selector: "assign:to:",
  865. fn: function (aNode,anObject){
  866. var self=this;
  867. return smalltalk.withContext(function($ctx1) {
  868. var $2,$1;
  869. $2=_st(_st(aNode)._binding())._isInstanceVar();
  870. if(smalltalk.assert($2)){
  871. $1=_st(_st(self._context())._receiver())._instVarAt_put_(_st(aNode)._value(),anObject);
  872. } else {
  873. $1=_st(self._context())._localAt_put_(_st(aNode)._value(),anObject);
  874. };
  875. return $1;
  876. }, function($ctx1) {$ctx1.fill(self,"assign:to:",{aNode:aNode,anObject:anObject},smalltalk.ASTInterpreter)})},
  877. messageSends: ["ifTrue:ifFalse:", "isInstanceVar", "binding", "instVarAt:put:", "receiver", "context", "value", "localAt:put:"]}),
  878. smalltalk.ASTInterpreter);
  879. smalltalk.addMethod(
  880. smalltalk.method({
  881. selector: "context",
  882. fn: function (){
  883. var self=this;
  884. function $AIContext(){return smalltalk.AIContext||(typeof AIContext=="undefined"?nil:AIContext)}
  885. return smalltalk.withContext(function($ctx1) {
  886. var $2,$1;
  887. $2=self["@context"];
  888. if(($receiver = $2) == nil || $receiver == undefined){
  889. self["@context"]=_st($AIContext())._new();
  890. $1=self["@context"];
  891. } else {
  892. $1=$2;
  893. };
  894. return $1;
  895. }, function($ctx1) {$ctx1.fill(self,"context",{},smalltalk.ASTInterpreter)})},
  896. messageSends: ["ifNil:", "new"]}),
  897. smalltalk.ASTInterpreter);
  898. smalltalk.addMethod(
  899. smalltalk.method({
  900. selector: "context:",
  901. fn: function (anAIContext){
  902. var self=this;
  903. return smalltalk.withContext(function($ctx1) {
  904. self["@context"]=anAIContext;
  905. return self}, function($ctx1) {$ctx1.fill(self,"context:",{anAIContext:anAIContext},smalltalk.ASTInterpreter)})},
  906. messageSends: []}),
  907. smalltalk.ASTInterpreter);
  908. smalltalk.addMethod(
  909. smalltalk.method({
  910. selector: "continue:value:",
  911. fn: function (aBlock,anObject){
  912. var self=this;
  913. return smalltalk.withContext(function($ctx1) {
  914. self["@result"]=anObject;
  915. _st(aBlock)._value_(anObject);
  916. return self}, function($ctx1) {$ctx1.fill(self,"continue:value:",{aBlock:aBlock,anObject:anObject},smalltalk.ASTInterpreter)})},
  917. messageSends: ["value:"]}),
  918. smalltalk.ASTInterpreter);
  919. smalltalk.addMethod(
  920. smalltalk.method({
  921. selector: "currentNode",
  922. fn: function (){
  923. var self=this;
  924. return smalltalk.withContext(function($ctx1) {
  925. var $1;
  926. $1=self["@currentNode"];
  927. return $1;
  928. }, function($ctx1) {$ctx1.fill(self,"currentNode",{},smalltalk.ASTInterpreter)})},
  929. messageSends: []}),
  930. smalltalk.ASTInterpreter);
  931. smalltalk.addMethod(
  932. smalltalk.method({
  933. selector: "eval:",
  934. fn: function (aString){
  935. var self=this;
  936. var source,function_;
  937. function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
  938. function $Compiler(){return smalltalk.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}
  939. return smalltalk.withContext(function($ctx1) {
  940. var $1,$2,$3;
  941. source=_st($String())._streamContents_((function(str){
  942. return smalltalk.withContext(function($ctx2) {
  943. _st(str)._nextPutAll_("(function(");
  944. _st(_st(_st(self._context())._locals())._keys())._do_separatedBy_((function(each){
  945. return smalltalk.withContext(function($ctx3) {
  946. return _st(str)._nextPutAll_(each);
  947. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)})}),(function(){
  948. return smalltalk.withContext(function($ctx3) {
  949. return _st(str)._nextPutAll_(",");
  950. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  951. $1=str;
  952. _st($1)._nextPutAll_("){ return (function() {");
  953. _st($1)._nextPutAll_(aString);
  954. $2=_st($1)._nextPutAll_("})() })");
  955. return $2;
  956. }, function($ctx2) {$ctx2.fillBlock({str:str},$ctx1,1)})}));
  957. function_=_st(_st($Compiler())._new())._eval_(source);
  958. $3=_st(function_)._valueWithPossibleArguments_(_st(_st(self._context())._locals())._values());
  959. return $3;
  960. }, function($ctx1) {$ctx1.fill(self,"eval:",{aString:aString,source:source,function_:function_},smalltalk.ASTInterpreter)})},
  961. messageSends: ["streamContents:", "nextPutAll:", "do:separatedBy:", "keys", "locals", "context", "eval:", "new", "valueWithPossibleArguments:", "values"]}),
  962. smalltalk.ASTInterpreter);
  963. smalltalk.addMethod(
  964. smalltalk.method({
  965. selector: "initialize",
  966. fn: function (){
  967. var self=this;
  968. return smalltalk.withContext(function($ctx1) {
  969. smalltalk.ASTInterpreter.superclass.fn.prototype._initialize.apply(_st(self), []);
  970. self["@shouldReturn"]=false;
  971. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.ASTInterpreter)})},
  972. messageSends: ["initialize"]}),
  973. smalltalk.ASTInterpreter);
  974. smalltalk.addMethod(
  975. smalltalk.method({
  976. selector: "interpret:",
  977. fn: function (aNode){
  978. var self=this;
  979. return smalltalk.withContext(function($ctx1) {
  980. self["@shouldReturn"]=false;
  981. self._interpret_continue_(aNode,(function(value){
  982. return smalltalk.withContext(function($ctx2) {
  983. self["@result"]=value;
  984. return self["@result"];
  985. }, function($ctx2) {$ctx2.fillBlock({value:value},$ctx1,1)})}));
  986. return self}, function($ctx1) {$ctx1.fill(self,"interpret:",{aNode:aNode},smalltalk.ASTInterpreter)})},
  987. messageSends: ["interpret:continue:"]}),
  988. smalltalk.ASTInterpreter);
  989. smalltalk.addMethod(
  990. smalltalk.method({
  991. selector: "interpret:continue:",
  992. fn: function (aNode,aBlock){
  993. var self=this;
  994. return smalltalk.withContext(function($ctx1) {
  995. var $1,$2,$3;
  996. $1=self["@shouldReturn"];
  997. if(smalltalk.assert($1)){
  998. $2=self;
  999. return $2;
  1000. };
  1001. $3=_st(aNode)._isNode();
  1002. if(smalltalk.assert($3)){
  1003. self["@currentNode"]=aNode;
  1004. self["@currentNode"];
  1005. self._interpretNode_continue_(aNode,(function(value){
  1006. return smalltalk.withContext(function($ctx2) {
  1007. return self._continue_value_(aBlock,value);
  1008. }, function($ctx2) {$ctx2.fillBlock({value:value},$ctx1,3)})}));
  1009. } else {
  1010. self._continue_value_(aBlock,aNode);
  1011. };
  1012. return self}, function($ctx1) {$ctx1.fill(self,"interpret:continue:",{aNode:aNode,aBlock:aBlock},smalltalk.ASTInterpreter)})},
  1013. messageSends: ["ifTrue:", "ifTrue:ifFalse:", "isNode", "interpretNode:continue:", "continue:value:"]}),
  1014. smalltalk.ASTInterpreter);
  1015. smalltalk.addMethod(
  1016. smalltalk.method({
  1017. selector: "interpretAll:continue:",
  1018. fn: function (aCollection,aBlock){
  1019. var self=this;
  1020. function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  1021. return smalltalk.withContext(function($ctx1) {
  1022. self._interpretAll_continue_result_(aCollection,aBlock,_st($OrderedCollection())._new());
  1023. return self}, function($ctx1) {$ctx1.fill(self,"interpretAll:continue:",{aCollection:aCollection,aBlock:aBlock},smalltalk.ASTInterpreter)})},
  1024. messageSends: ["interpretAll:continue:result:", "new"]}),
  1025. smalltalk.ASTInterpreter);
  1026. smalltalk.addMethod(
  1027. smalltalk.method({
  1028. selector: "interpretAll:continue:result:",
  1029. fn: function (nodes,aBlock,aCollection){
  1030. var self=this;
  1031. return smalltalk.withContext(function($ctx1) {
  1032. var $1;
  1033. $1=_st(nodes)._isEmpty();
  1034. if(smalltalk.assert($1)){
  1035. self._continue_value_(aBlock,aCollection);
  1036. } else {
  1037. self._interpret_continue_(_st(nodes)._first(),(function(value){
  1038. return smalltalk.withContext(function($ctx2) {
  1039. return self._interpretAll_continue_result_(_st(nodes)._allButFirst(),aBlock,_st(aCollection).__comma([value]));
  1040. }, function($ctx2) {$ctx2.fillBlock({value:value},$ctx1,3)})}));
  1041. };
  1042. return self}, function($ctx1) {$ctx1.fill(self,"interpretAll:continue:result:",{nodes:nodes,aBlock:aBlock,aCollection:aCollection},smalltalk.ASTInterpreter)})},
  1043. messageSends: ["ifTrue:ifFalse:", "isEmpty", "continue:value:", "interpret:continue:", "first", "interpretAll:continue:result:", "allButFirst", ","]}),
  1044. smalltalk.ASTInterpreter);
  1045. smalltalk.addMethod(
  1046. smalltalk.method({
  1047. selector: "interpretAssignmentNode:continue:",
  1048. fn: function (aNode,aBlock){
  1049. var self=this;
  1050. return smalltalk.withContext(function($ctx1) {
  1051. self._interpret_continue_(_st(aNode)._right(),(function(value){
  1052. return smalltalk.withContext(function($ctx2) {
  1053. return self._continue_value_(aBlock,self._assign_to_(_st(aNode)._left(),value));
  1054. }, function($ctx2) {$ctx2.fillBlock({value:value},$ctx1,1)})}));
  1055. return self}, function($ctx1) {$ctx1.fill(self,"interpretAssignmentNode:continue:",{aNode:aNode,aBlock:aBlock},smalltalk.ASTInterpreter)})},
  1056. messageSends: ["interpret:continue:", "right", "continue:value:", "assign:to:", "left"]}),
  1057. smalltalk.ASTInterpreter);
  1058. smalltalk.addMethod(
  1059. smalltalk.method({
  1060. selector: "interpretBlockNode:continue:",
  1061. fn: function (aNode,aBlock){
  1062. var self=this;
  1063. return smalltalk.withContext(function($ctx1) {
  1064. var $1,$2;
  1065. self._continue_value_(aBlock,(function(){
  1066. return smalltalk.withContext(function($ctx2) {
  1067. return self._withBlockContext_((function(){
  1068. return smalltalk.withContext(function($ctx3) {
  1069. $1=self;
  1070. _st($1)._interpret_(_st(_st(aNode)._nodes())._first());
  1071. $2=_st($1)._result();
  1072. return $2;
  1073. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  1074. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  1075. return self}, function($ctx1) {$ctx1.fill(self,"interpretBlockNode:continue:",{aNode:aNode,aBlock:aBlock},smalltalk.ASTInterpreter)})},
  1076. messageSends: ["continue:value:", "withBlockContext:", "interpret:", "first", "nodes", "result"]}),
  1077. smalltalk.ASTInterpreter);
  1078. smalltalk.addMethod(
  1079. smalltalk.method({
  1080. selector: "interpretBlockSequenceNode:continue:",
  1081. fn: function (aNode,aBlock){
  1082. var self=this;
  1083. return smalltalk.withContext(function($ctx1) {
  1084. self._interpretSequenceNode_continue_(aNode,aBlock);
  1085. return self}, function($ctx1) {$ctx1.fill(self,"interpretBlockSequenceNode:continue:",{aNode:aNode,aBlock:aBlock},smalltalk.ASTInterpreter)})},
  1086. messageSends: ["interpretSequenceNode:continue:"]}),
  1087. smalltalk.ASTInterpreter);
  1088. smalltalk.addMethod(
  1089. smalltalk.method({
  1090. selector: "interpretCascadeNode:continue:",
  1091. fn: function (aNode,aBlock){
  1092. var self=this;
  1093. return smalltalk.withContext(function($ctx1) {
  1094. self._interpret_continue_(_st(aNode)._receiver(),(function(receiver){
  1095. return smalltalk.withContext(function($ctx2) {
  1096. _st(_st(aNode)._nodes())._do_((function(each){
  1097. return smalltalk.withContext(function($ctx3) {
  1098. return _st(each)._receiver_(receiver);
  1099. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)})}));
  1100. return self._interpretAll_continue_(_st(_st(aNode)._nodes())._allButLast(),(function(){
  1101. return smalltalk.withContext(function($ctx3) {
  1102. return self._interpret_continue_(_st(_st(aNode)._nodes())._last(),(function(val){
  1103. return smalltalk.withContext(function($ctx4) {
  1104. return self._continue_value_(aBlock,val);
  1105. }, function($ctx4) {$ctx4.fillBlock({val:val},$ctx3,4)})}));
  1106. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  1107. }, function($ctx2) {$ctx2.fillBlock({receiver:receiver},$ctx1,1)})}));
  1108. return self}, function($ctx1) {$ctx1.fill(self,"interpretCascadeNode:continue:",{aNode:aNode,aBlock:aBlock},smalltalk.ASTInterpreter)})},
  1109. messageSends: ["interpret:continue:", "receiver", "do:", "nodes", "receiver:", "interpretAll:continue:", "allButLast", "last", "continue:value:"]}),
  1110. smalltalk.ASTInterpreter);
  1111. smalltalk.addMethod(
  1112. smalltalk.method({
  1113. selector: "interpretClassReferenceNode:continue:",
  1114. fn: function (aNode,aBlock){
  1115. var self=this;
  1116. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1117. return smalltalk.withContext(function($ctx1) {
  1118. self._continue_value_(aBlock,_st(_st($Smalltalk())._current())._at_(_st(aNode)._value()));
  1119. return self}, function($ctx1) {$ctx1.fill(self,"interpretClassReferenceNode:continue:",{aNode:aNode,aBlock:aBlock},smalltalk.ASTInterpreter)})},
  1120. messageSends: ["continue:value:", "at:", "current", "value"]}),
  1121. smalltalk.ASTInterpreter);
  1122. smalltalk.addMethod(
  1123. smalltalk.method({
  1124. selector: "interpretDynamicArrayNode:continue:",
  1125. fn: function (aNode,aBlock){
  1126. var self=this;
  1127. return smalltalk.withContext(function($ctx1) {
  1128. self._interpretAll_continue_(_st(aNode)._nodes(),(function(array){
  1129. return smalltalk.withContext(function($ctx2) {
  1130. return self._continue_value_(aBlock,array);
  1131. }, function($ctx2) {$ctx2.fillBlock({array:array},$ctx1,1)})}));
  1132. return self}, function($ctx1) {$ctx1.fill(self,"interpretDynamicArrayNode:continue:",{aNode:aNode,aBlock:aBlock},smalltalk.ASTInterpreter)})},
  1133. messageSends: ["interpretAll:continue:", "nodes", "continue:value:"]}),
  1134. smalltalk.ASTInterpreter);
  1135. smalltalk.addMethod(
  1136. smalltalk.method({
  1137. selector: "interpretDynamicDictionaryNode:continue:",
  1138. fn: function (aNode,aBlock){
  1139. var self=this;
  1140. function $HashedCollection(){return smalltalk.HashedCollection||(typeof HashedCollection=="undefined"?nil:HashedCollection)}
  1141. return smalltalk.withContext(function($ctx1) {
  1142. self._interpretAll_continue_(_st(aNode)._nodes(),(function(array){
  1143. var hashedCollection;
  1144. return smalltalk.withContext(function($ctx2) {
  1145. hashedCollection=_st($HashedCollection())._new();
  1146. hashedCollection;
  1147. _st(array)._do_((function(each){
  1148. return smalltalk.withContext(function($ctx3) {
  1149. return _st(hashedCollection)._add_(each);
  1150. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)})}));
  1151. return self._continue_value_(aBlock,hashedCollection);
  1152. }, function($ctx2) {$ctx2.fillBlock({array:array,hashedCollection:hashedCollection},$ctx1,1)})}));
  1153. return self}, function($ctx1) {$ctx1.fill(self,"interpretDynamicDictionaryNode:continue:",{aNode:aNode,aBlock:aBlock},smalltalk.ASTInterpreter)})},
  1154. messageSends: ["interpretAll:continue:", "nodes", "new", "do:", "add:", "continue:value:"]}),
  1155. smalltalk.ASTInterpreter);
  1156. smalltalk.addMethod(
  1157. smalltalk.method({
  1158. selector: "interpretJSStatementNode:continue:",
  1159. fn: function (aNode,aBlock){
  1160. var self=this;
  1161. return smalltalk.withContext(function($ctx1) {
  1162. self["@shouldReturn"]=true;
  1163. self._continue_value_(aBlock,self._eval_(_st(aNode)._source()));
  1164. return self}, function($ctx1) {$ctx1.fill(self,"interpretJSStatementNode:continue:",{aNode:aNode,aBlock:aBlock},smalltalk.ASTInterpreter)})},
  1165. messageSends: ["continue:value:", "eval:", "source"]}),
  1166. smalltalk.ASTInterpreter);
  1167. smalltalk.addMethod(
  1168. smalltalk.method({
  1169. selector: "interpretMethodNode:continue:",
  1170. fn: function (aNode,aBlock){
  1171. var self=this;
  1172. return smalltalk.withContext(function($ctx1) {
  1173. self._interpretAll_continue_(_st(aNode)._nodes(),(function(array){
  1174. return smalltalk.withContext(function($ctx2) {
  1175. return self._continue_value_(aBlock,_st(array)._first());
  1176. }, function($ctx2) {$ctx2.fillBlock({array:array},$ctx1,1)})}));
  1177. return self}, function($ctx1) {$ctx1.fill(self,"interpretMethodNode:continue:",{aNode:aNode,aBlock:aBlock},smalltalk.ASTInterpreter)})},
  1178. messageSends: ["interpretAll:continue:", "nodes", "continue:value:", "first"]}),
  1179. smalltalk.ASTInterpreter);
  1180. smalltalk.addMethod(
  1181. smalltalk.method({
  1182. selector: "interpretNode:continue:",
  1183. fn: function (aNode,aBlock){
  1184. var self=this;
  1185. return smalltalk.withContext(function($ctx1) {
  1186. _st(aNode)._interpreter_continue_(self,aBlock);
  1187. return self}, function($ctx1) {$ctx1.fill(self,"interpretNode:continue:",{aNode:aNode,aBlock:aBlock},smalltalk.ASTInterpreter)})},
  1188. messageSends: ["interpreter:continue:"]}),
  1189. smalltalk.ASTInterpreter);
  1190. smalltalk.addMethod(
  1191. smalltalk.method({
  1192. selector: "interpretReturnNode:continue:",
  1193. fn: function (aNode,aBlock){
  1194. var self=this;
  1195. return smalltalk.withContext(function($ctx1) {
  1196. self._interpret_continue_(_st(_st(aNode)._nodes())._first(),(function(value){
  1197. return smalltalk.withContext(function($ctx2) {
  1198. self["@shouldReturn"]=true;
  1199. self["@shouldReturn"];
  1200. return self._continue_value_(aBlock,value);
  1201. }, function($ctx2) {$ctx2.fillBlock({value:value},$ctx1,1)})}));
  1202. return self}, function($ctx1) {$ctx1.fill(self,"interpretReturnNode:continue:",{aNode:aNode,aBlock:aBlock},smalltalk.ASTInterpreter)})},
  1203. messageSends: ["interpret:continue:", "first", "nodes", "continue:value:"]}),
  1204. smalltalk.ASTInterpreter);
  1205. smalltalk.addMethod(
  1206. smalltalk.method({
  1207. selector: "interpretSendNode:continue:",
  1208. fn: function (aNode,aBlock){
  1209. var self=this;
  1210. return smalltalk.withContext(function($ctx1) {
  1211. self._interpret_continue_(_st(aNode)._receiver(),(function(receiver){
  1212. return smalltalk.withContext(function($ctx2) {
  1213. return self._interpretAll_continue_(_st(aNode)._arguments(),(function(args){
  1214. return smalltalk.withContext(function($ctx3) {
  1215. return self._messageFromSendNode_arguments_do_(aNode,args,(function(message){
  1216. return smalltalk.withContext(function($ctx4) {
  1217. _st(self._context())._pc_(_st(_st(self._context())._pc()).__plus((1)));
  1218. return self._continue_value_(aBlock,self._sendMessage_to_superSend_(message,receiver,_st(aNode)._superSend()));
  1219. }, function($ctx4) {$ctx4.fillBlock({message:message},$ctx3,3)})}));
  1220. }, function($ctx3) {$ctx3.fillBlock({args:args},$ctx2,2)})}));
  1221. }, function($ctx2) {$ctx2.fillBlock({receiver:receiver},$ctx1,1)})}));
  1222. return self}, function($ctx1) {$ctx1.fill(self,"interpretSendNode:continue:",{aNode:aNode,aBlock:aBlock},smalltalk.ASTInterpreter)})},
  1223. messageSends: ["interpret:continue:", "receiver", "interpretAll:continue:", "arguments", "messageFromSendNode:arguments:do:", "pc:", "context", "+", "pc", "continue:value:", "sendMessage:to:superSend:", "superSend"]}),
  1224. smalltalk.ASTInterpreter);
  1225. smalltalk.addMethod(
  1226. smalltalk.method({
  1227. selector: "interpretSequenceNode:continue:",
  1228. fn: function (aNode,aBlock){
  1229. var self=this;
  1230. return smalltalk.withContext(function($ctx1) {
  1231. self._interpretAll_continue_(_st(aNode)._nodes(),(function(array){
  1232. return smalltalk.withContext(function($ctx2) {
  1233. return self._continue_value_(aBlock,_st(array)._last());
  1234. }, function($ctx2) {$ctx2.fillBlock({array:array},$ctx1,1)})}));
  1235. return self}, function($ctx1) {$ctx1.fill(self,"interpretSequenceNode:continue:",{aNode:aNode,aBlock:aBlock},smalltalk.ASTInterpreter)})},
  1236. messageSends: ["interpretAll:continue:", "nodes", "continue:value:", "last"]}),
  1237. smalltalk.ASTInterpreter);
  1238. smalltalk.addMethod(
  1239. smalltalk.method({
  1240. selector: "interpretValueNode:continue:",
  1241. fn: function (aNode,aBlock){
  1242. var self=this;
  1243. return smalltalk.withContext(function($ctx1) {
  1244. self._continue_value_(aBlock,_st(aNode)._value());
  1245. return self}, function($ctx1) {$ctx1.fill(self,"interpretValueNode:continue:",{aNode:aNode,aBlock:aBlock},smalltalk.ASTInterpreter)})},
  1246. messageSends: ["continue:value:", "value"]}),
  1247. smalltalk.ASTInterpreter);
  1248. smalltalk.addMethod(
  1249. smalltalk.method({
  1250. selector: "interpretVariableNode:continue:",
  1251. fn: function (aNode,aBlock){
  1252. var self=this;
  1253. return smalltalk.withContext(function($ctx1) {
  1254. var $1,$2,$4,$3;
  1255. $1=self;
  1256. $2=aBlock;
  1257. $4=_st(_st(aNode)._binding())._isInstanceVar();
  1258. if(smalltalk.assert($4)){
  1259. $3=_st(_st(self._context())._receiver())._instVarAt_(_st(aNode)._value());
  1260. } else {
  1261. $3=_st(self._context())._localAt_(_st(aNode)._value());
  1262. };
  1263. _st($1)._continue_value_($2,$3);
  1264. return self}, function($ctx1) {$ctx1.fill(self,"interpretVariableNode:continue:",{aNode:aNode,aBlock:aBlock},smalltalk.ASTInterpreter)})},
  1265. messageSends: ["continue:value:", "ifTrue:ifFalse:", "isInstanceVar", "binding", "instVarAt:", "receiver", "context", "value", "localAt:"]}),
  1266. smalltalk.ASTInterpreter);
  1267. smalltalk.addMethod(
  1268. smalltalk.method({
  1269. selector: "messageFromSendNode:arguments:do:",
  1270. fn: function (aSendNode,aCollection,aBlock){
  1271. var self=this;
  1272. function $Message(){return smalltalk.Message||(typeof Message=="undefined"?nil:Message)}
  1273. return smalltalk.withContext(function($ctx1) {
  1274. var $1,$2;
  1275. $1=_st($Message())._new();
  1276. _st($1)._selector_(_st(aSendNode)._selector());
  1277. _st($1)._arguments_(aCollection);
  1278. $2=_st($1)._yourself();
  1279. self._continue_value_(aBlock,$2);
  1280. return self}, function($ctx1) {$ctx1.fill(self,"messageFromSendNode:arguments:do:",{aSendNode:aSendNode,aCollection:aCollection,aBlock:aBlock},smalltalk.ASTInterpreter)})},
  1281. messageSends: ["continue:value:", "selector:", "new", "selector", "arguments:", "yourself"]}),
  1282. smalltalk.ASTInterpreter);
  1283. smalltalk.addMethod(
  1284. smalltalk.method({
  1285. selector: "nextNode",
  1286. fn: function (){
  1287. var self=this;
  1288. return smalltalk.withContext(function($ctx1) {
  1289. var $2,$1;
  1290. $2=self["@nextNode"];
  1291. if(($receiver = $2) == nil || $receiver == undefined){
  1292. $1=self._currentNode();
  1293. } else {
  1294. $1=$2;
  1295. };
  1296. return $1;
  1297. }, function($ctx1) {$ctx1.fill(self,"nextNode",{},smalltalk.ASTInterpreter)})},
  1298. messageSends: ["ifNil:", "currentNode"]}),
  1299. smalltalk.ASTInterpreter);
  1300. smalltalk.addMethod(
  1301. smalltalk.method({
  1302. selector: "nextNode:",
  1303. fn: function (aNode){
  1304. var self=this;
  1305. return smalltalk.withContext(function($ctx1) {
  1306. self["@nextNode"]=aNode;
  1307. return self}, function($ctx1) {$ctx1.fill(self,"nextNode:",{aNode:aNode},smalltalk.ASTInterpreter)})},
  1308. messageSends: []}),
  1309. smalltalk.ASTInterpreter);
  1310. smalltalk.addMethod(
  1311. smalltalk.method({
  1312. selector: "result",
  1313. fn: function (){
  1314. var self=this;
  1315. return smalltalk.withContext(function($ctx1) {
  1316. var $1;
  1317. $1=self["@result"];
  1318. return $1;
  1319. }, function($ctx1) {$ctx1.fill(self,"result",{},smalltalk.ASTInterpreter)})},
  1320. messageSends: []}),
  1321. smalltalk.ASTInterpreter);
  1322. smalltalk.addMethod(
  1323. smalltalk.method({
  1324. selector: "sendMessage:to:superSend:",
  1325. fn: function (aMessage,anObject,aBoolean){
  1326. var self=this;
  1327. var method;
  1328. return smalltalk.withContext(function($ctx1) {
  1329. var $1,$2,$3,$4,$5,$6;
  1330. var $early={};
  1331. try {
  1332. $1=aBoolean;
  1333. if(! smalltalk.assert($1)){
  1334. $2=_st(aMessage)._sendTo_(anObject);
  1335. return $2;
  1336. };
  1337. $3=_st(_st(anObject)._class())._superclass();
  1338. if(($receiver = $3) == nil || $receiver == undefined){
  1339. $4=self._messageNotUnderstood_receiver_(aMessage,anObject);
  1340. return $4;
  1341. } else {
  1342. $3;
  1343. };
  1344. method=_st(_st(_st(_st(anObject)._class())._superclass())._methodDictionary())._at_ifAbsent_(_st(aMessage)._selector(),(function(){
  1345. return smalltalk.withContext(function($ctx2) {
  1346. $5=self._messageNotUnderstood_receiver_(aMessage,anObject);
  1347. throw $early=[$5];
  1348. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  1349. $6=_st(_st(method)._fn())._applyTo_arguments_(anObject,_st(aMessage)._arguments());
  1350. return $6;
  1351. }
  1352. catch(e) {if(e===$early)return e[0]; throw e}
  1353. }, function($ctx1) {$ctx1.fill(self,"sendMessage:to:superSend:",{aMessage:aMessage,anObject:anObject,aBoolean:aBoolean,method:method},smalltalk.ASTInterpreter)})},
  1354. messageSends: ["ifFalse:", "sendTo:", "ifNil:", "superclass", "class", "messageNotUnderstood:receiver:", "at:ifAbsent:", "methodDictionary", "selector", "applyTo:arguments:", "fn", "arguments"]}),
  1355. smalltalk.ASTInterpreter);
  1356. smalltalk.addMethod(
  1357. smalltalk.method({
  1358. selector: "shouldReturn",
  1359. fn: function (){
  1360. var self=this;
  1361. return smalltalk.withContext(function($ctx1) {
  1362. var $2,$1;
  1363. $2=self["@shouldReturn"];
  1364. if(($receiver = $2) == nil || $receiver == undefined){
  1365. $1=false;
  1366. } else {
  1367. $1=$2;
  1368. };
  1369. return $1;
  1370. }, function($ctx1) {$ctx1.fill(self,"shouldReturn",{},smalltalk.ASTInterpreter)})},
  1371. messageSends: ["ifNil:"]}),
  1372. smalltalk.ASTInterpreter);
  1373. smalltalk.addMethod(
  1374. smalltalk.method({
  1375. selector: "withBlockContext:",
  1376. fn: function (aBlock){
  1377. var self=this;
  1378. var blockResult;
  1379. function $AIContext(){return smalltalk.AIContext||(typeof AIContext=="undefined"?nil:AIContext)}
  1380. return smalltalk.withContext(function($ctx1) {
  1381. var $1,$2,$3;
  1382. $1=_st($AIContext())._new();
  1383. _st($1)._outerContext_(self._context());
  1384. $2=_st($1)._yourself();
  1385. self._context_($2);
  1386. blockResult=_st(aBlock)._value();
  1387. self._context_(_st(self._context())._outerContext());
  1388. $3=blockResult;
  1389. return $3;
  1390. }, function($ctx1) {$ctx1.fill(self,"withBlockContext:",{aBlock:aBlock,blockResult:blockResult},smalltalk.ASTInterpreter)})},
  1391. messageSends: ["context:", "outerContext:", "new", "context", "yourself", "value", "outerContext"]}),
  1392. smalltalk.ASTInterpreter);
  1393. smalltalk.addClass('ASTSteppingInterpreter', smalltalk.ASTInterpreter, ['continuation', 'nextNode'], 'Compiler-Interpreter');
  1394. smalltalk.addMethod(
  1395. smalltalk.method({
  1396. selector: "atEnd",
  1397. fn: function (){
  1398. var self=this;
  1399. return smalltalk.withContext(function($ctx1) {
  1400. var $1;
  1401. $1=_st(self._shouldReturn())._or_((function(){
  1402. return smalltalk.withContext(function($ctx2) {
  1403. return _st(self._nextNode()).__eq_eq(self._currentNode());
  1404. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  1405. return $1;
  1406. }, function($ctx1) {$ctx1.fill(self,"atEnd",{},smalltalk.ASTSteppingInterpreter)})},
  1407. messageSends: ["or:", "shouldReturn", "==", "nextNode", "currentNode"]}),
  1408. smalltalk.ASTSteppingInterpreter);
  1409. smalltalk.addMethod(
  1410. smalltalk.method({
  1411. selector: "initialize",
  1412. fn: function (){
  1413. var self=this;
  1414. return smalltalk.withContext(function($ctx1) {
  1415. smalltalk.ASTSteppingInterpreter.superclass.fn.prototype._initialize.apply(_st(self), []);
  1416. self["@continuation"]=(function(){
  1417. return smalltalk.withContext(function($ctx2) {
  1418. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})});
  1419. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.ASTSteppingInterpreter)})},
  1420. messageSends: ["initialize"]}),
  1421. smalltalk.ASTSteppingInterpreter);
  1422. smalltalk.addMethod(
  1423. smalltalk.method({
  1424. selector: "interpret:continue:",
  1425. fn: function (aNode,aBlock){
  1426. var self=this;
  1427. return smalltalk.withContext(function($ctx1) {
  1428. self["@nextNode"]=aNode;
  1429. self["@continuation"]=(function(){
  1430. return smalltalk.withContext(function($ctx2) {
  1431. return smalltalk.ASTSteppingInterpreter.superclass.fn.prototype._interpret_continue_.apply(_st(self), [aNode,aBlock]);
  1432. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})});
  1433. return self}, function($ctx1) {$ctx1.fill(self,"interpret:continue:",{aNode:aNode,aBlock:aBlock},smalltalk.ASTSteppingInterpreter)})},
  1434. messageSends: ["interpret:continue:"]}),
  1435. smalltalk.ASTSteppingInterpreter);
  1436. smalltalk.addMethod(
  1437. smalltalk.method({
  1438. selector: "nextNode",
  1439. fn: function (){
  1440. var self=this;
  1441. return smalltalk.withContext(function($ctx1) {
  1442. var $1;
  1443. $1=self["@nextNode"];
  1444. return $1;
  1445. }, function($ctx1) {$ctx1.fill(self,"nextNode",{},smalltalk.ASTSteppingInterpreter)})},
  1446. messageSends: []}),
  1447. smalltalk.ASTSteppingInterpreter);
  1448. smalltalk.addMethod(
  1449. smalltalk.method({
  1450. selector: "step",
  1451. fn: function (){
  1452. var self=this;
  1453. return smalltalk.withContext(function($ctx1) {
  1454. _st(self["@continuation"])._value();
  1455. return self}, function($ctx1) {$ctx1.fill(self,"step",{},smalltalk.ASTSteppingInterpreter)})},
  1456. messageSends: ["value"]}),
  1457. smalltalk.ASTSteppingInterpreter);
  1458. smalltalk.addClass('ASTPCNodeVisitor', smalltalk.NodeVisitor, ['useInlinings', 'pc', 'context', 'blockIndex', 'currentNode'], 'Compiler-Interpreter');
  1459. smalltalk.addMethod(
  1460. smalltalk.method({
  1461. selector: "blockIndex",
  1462. fn: function (){
  1463. var self=this;
  1464. return smalltalk.withContext(function($ctx1) {
  1465. var $2,$1;
  1466. $2=self["@blockIndex"];
  1467. if(($receiver = $2) == nil || $receiver == undefined){
  1468. self["@blockIndex"]=(0);
  1469. $1=self["@blockIndex"];
  1470. } else {
  1471. $1=$2;
  1472. };
  1473. return $1;
  1474. }, function($ctx1) {$ctx1.fill(self,"blockIndex",{},smalltalk.ASTPCNodeVisitor)})},
  1475. messageSends: ["ifNil:"]}),
  1476. smalltalk.ASTPCNodeVisitor);
  1477. smalltalk.addMethod(
  1478. smalltalk.method({
  1479. selector: "context",
  1480. fn: function (){
  1481. var self=this;
  1482. return smalltalk.withContext(function($ctx1) {
  1483. var $1;
  1484. $1=self["@context"];
  1485. return $1;
  1486. }, function($ctx1) {$ctx1.fill(self,"context",{},smalltalk.ASTPCNodeVisitor)})},
  1487. messageSends: []}),
  1488. smalltalk.ASTPCNodeVisitor);
  1489. smalltalk.addMethod(
  1490. smalltalk.method({
  1491. selector: "context:",
  1492. fn: function (aContext){
  1493. var self=this;
  1494. return smalltalk.withContext(function($ctx1) {
  1495. self["@context"]=aContext;
  1496. return self}, function($ctx1) {$ctx1.fill(self,"context:",{aContext:aContext},smalltalk.ASTPCNodeVisitor)})},
  1497. messageSends: []}),
  1498. smalltalk.ASTPCNodeVisitor);
  1499. smalltalk.addMethod(
  1500. smalltalk.method({
  1501. selector: "currentNode",
  1502. fn: function (){
  1503. var self=this;
  1504. return smalltalk.withContext(function($ctx1) {
  1505. var $1;
  1506. $1=self["@currentNode"];
  1507. return $1;
  1508. }, function($ctx1) {$ctx1.fill(self,"currentNode",{},smalltalk.ASTPCNodeVisitor)})},
  1509. messageSends: []}),
  1510. smalltalk.ASTPCNodeVisitor);
  1511. smalltalk.addMethod(
  1512. smalltalk.method({
  1513. selector: "increaseBlockIndex",
  1514. fn: function (){
  1515. var self=this;
  1516. return smalltalk.withContext(function($ctx1) {
  1517. self["@blockIndex"]=_st(self._blockIndex()).__plus((1));
  1518. return self}, function($ctx1) {$ctx1.fill(self,"increaseBlockIndex",{},smalltalk.ASTPCNodeVisitor)})},
  1519. messageSends: ["+", "blockIndex"]}),
  1520. smalltalk.ASTPCNodeVisitor);
  1521. smalltalk.addMethod(
  1522. smalltalk.method({
  1523. selector: "pc",
  1524. fn: function (){
  1525. var self=this;
  1526. return smalltalk.withContext(function($ctx1) {
  1527. var $2,$1;
  1528. $2=self["@pc"];
  1529. if(($receiver = $2) == nil || $receiver == undefined){
  1530. $1=(0);
  1531. } else {
  1532. $1=$2;
  1533. };
  1534. return $1;
  1535. }, function($ctx1) {$ctx1.fill(self,"pc",{},smalltalk.ASTPCNodeVisitor)})},
  1536. messageSends: ["ifNil:"]}),
  1537. smalltalk.ASTPCNodeVisitor);
  1538. smalltalk.addMethod(
  1539. smalltalk.method({
  1540. selector: "pc:",
  1541. fn: function (anInteger){
  1542. var self=this;
  1543. return smalltalk.withContext(function($ctx1) {
  1544. self["@pc"]=anInteger;
  1545. return self}, function($ctx1) {$ctx1.fill(self,"pc:",{anInteger:anInteger},smalltalk.ASTPCNodeVisitor)})},
  1546. messageSends: []}),
  1547. smalltalk.ASTPCNodeVisitor);
  1548. smalltalk.addMethod(
  1549. smalltalk.method({
  1550. selector: "useInlinings",
  1551. fn: function (){
  1552. var self=this;
  1553. return smalltalk.withContext(function($ctx1) {
  1554. var $2,$1;
  1555. $2=self["@useInlinings"];
  1556. if(($receiver = $2) == nil || $receiver == undefined){
  1557. $1=true;
  1558. } else {
  1559. $1=$2;
  1560. };
  1561. return $1;
  1562. }, function($ctx1) {$ctx1.fill(self,"useInlinings",{},smalltalk.ASTPCNodeVisitor)})},
  1563. messageSends: ["ifNil:"]}),
  1564. smalltalk.ASTPCNodeVisitor);
  1565. smalltalk.addMethod(
  1566. smalltalk.method({
  1567. selector: "useInlinings:",
  1568. fn: function (aBoolean){
  1569. var self=this;
  1570. return smalltalk.withContext(function($ctx1) {
  1571. self["@useInlinings"]=aBoolean;
  1572. return self}, function($ctx1) {$ctx1.fill(self,"useInlinings:",{aBoolean:aBoolean},smalltalk.ASTPCNodeVisitor)})},
  1573. messageSends: []}),
  1574. smalltalk.ASTPCNodeVisitor);
  1575. smalltalk.addMethod(
  1576. smalltalk.method({
  1577. selector: "visitBlockNode:",
  1578. fn: function (aNode){
  1579. var self=this;
  1580. return smalltalk.withContext(function($ctx1) {
  1581. var $1;
  1582. $1=_st(self._blockIndex()).__gt_eq(_st(self._context())._index());
  1583. if(! smalltalk.assert($1)){
  1584. self._increaseBlockIndex();
  1585. smalltalk.ASTPCNodeVisitor.superclass.fn.prototype._visitBlockNode_.apply(_st(self), [aNode]);
  1586. };
  1587. return self}, function($ctx1) {$ctx1.fill(self,"visitBlockNode:",{aNode:aNode},smalltalk.ASTPCNodeVisitor)})},
  1588. messageSends: ["ifFalse:", ">=", "blockIndex", "index", "context", "increaseBlockIndex", "visitBlockNode:"]}),
  1589. smalltalk.ASTPCNodeVisitor);
  1590. smalltalk.addMethod(
  1591. smalltalk.method({
  1592. selector: "visitJSStatementNode:",
  1593. fn: function (aNode){
  1594. var self=this;
  1595. return smalltalk.withContext(function($ctx1) {
  1596. self["@currentNode"]=aNode;
  1597. return self}, function($ctx1) {$ctx1.fill(self,"visitJSStatementNode:",{aNode:aNode},smalltalk.ASTPCNodeVisitor)})},
  1598. messageSends: []}),
  1599. smalltalk.ASTPCNodeVisitor);
  1600. smalltalk.addMethod(
  1601. smalltalk.method({
  1602. selector: "visitSendNode:",
  1603. fn: function (aNode){
  1604. var self=this;
  1605. return smalltalk.withContext(function($ctx1) {
  1606. var $1,$2,$3;
  1607. smalltalk.ASTPCNodeVisitor.superclass.fn.prototype._visitSendNode_.apply(_st(self), [aNode]);
  1608. $1=_st(self._pc()).__eq(_st(self._context())._pc());
  1609. if(! smalltalk.assert($1)){
  1610. $2=_st(aNode)._shouldBeInlined();
  1611. if(! smalltalk.assert($2)){
  1612. $3=_st(self._blockIndex()).__eq(_st(self._context())._index());
  1613. if(smalltalk.assert($3)){
  1614. self._pc_(_st(self._pc()).__plus((1)));
  1615. self["@currentNode"]=aNode;
  1616. self["@currentNode"];
  1617. };
  1618. };
  1619. };
  1620. return self}, function($ctx1) {$ctx1.fill(self,"visitSendNode:",{aNode:aNode},smalltalk.ASTPCNodeVisitor)})},
  1621. messageSends: ["visitSendNode:", "ifFalse:", "=", "pc", "context", "shouldBeInlined", "ifTrue:", "blockIndex", "index", "pc:", "+"]}),
  1622. smalltalk.ASTPCNodeVisitor);
  1623. smalltalk.addClass('Interpreter', smalltalk.NodeVisitor, ['node', 'context', 'stack', 'returnValue'], 'Compiler-Interpreter');
  1624. smalltalk.addMethod(
  1625. smalltalk.method({
  1626. selector: "assign:to:",
  1627. fn: function (aNode,anObject){
  1628. var self=this;
  1629. return smalltalk.withContext(function($ctx1) {
  1630. var $1;
  1631. $1=_st(_st(aNode)._binding())._isInstanceVar();
  1632. if(smalltalk.assert($1)){
  1633. _st(_st(self._context())._receiver())._instVarAt_put_(_st(aNode)._value(),anObject);
  1634. } else {
  1635. _st(self._context())._localAt_put_(_st(aNode)._value(),anObject);
  1636. };
  1637. return self}, function($ctx1) {$ctx1.fill(self,"assign:to:",{aNode:aNode,anObject:anObject},smalltalk.Interpreter)})},
  1638. messageSends: ["ifTrue:ifFalse:", "isInstanceVar", "binding", "instVarAt:put:", "receiver", "context", "value", "localAt:put:"]}),
  1639. smalltalk.Interpreter);
  1640. smalltalk.addMethod(
  1641. smalltalk.method({
  1642. selector: "atEnd",
  1643. fn: function (){
  1644. var self=this;
  1645. return smalltalk.withContext(function($ctx1) {
  1646. var $1;
  1647. $1=_st(self._shouldReturn())._or_((function(){
  1648. return smalltalk.withContext(function($ctx2) {
  1649. return _st(self._node())._isNil();
  1650. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  1651. return $1;
  1652. }, function($ctx1) {$ctx1.fill(self,"atEnd",{},smalltalk.Interpreter)})},
  1653. messageSends: ["or:", "shouldReturn", "isNil", "node"]}),
  1654. smalltalk.Interpreter);
  1655. smalltalk.addMethod(
  1656. smalltalk.method({
  1657. selector: "context",
  1658. fn: function (){
  1659. var self=this;
  1660. return smalltalk.withContext(function($ctx1) {
  1661. var $1;
  1662. $1=self["@context"];
  1663. return $1;
  1664. }, function($ctx1) {$ctx1.fill(self,"context",{},smalltalk.Interpreter)})},
  1665. messageSends: []}),
  1666. smalltalk.Interpreter);
  1667. smalltalk.addMethod(
  1668. smalltalk.method({
  1669. selector: "context:",
  1670. fn: function (aContext){
  1671. var self=this;
  1672. return smalltalk.withContext(function($ctx1) {
  1673. self["@context"]=aContext;
  1674. return self}, function($ctx1) {$ctx1.fill(self,"context:",{aContext:aContext},smalltalk.Interpreter)})},
  1675. messageSends: []}),
  1676. smalltalk.Interpreter);
  1677. smalltalk.addMethod(
  1678. smalltalk.method({
  1679. selector: "eval:",
  1680. fn: function (aString){
  1681. var self=this;
  1682. var source,function_;
  1683. function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
  1684. function $Compiler(){return smalltalk.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}
  1685. return smalltalk.withContext(function($ctx1) {
  1686. var $1,$2,$3;
  1687. source=_st($String())._streamContents_((function(str){
  1688. return smalltalk.withContext(function($ctx2) {
  1689. _st(str)._nextPutAll_("(function(");
  1690. _st(_st(_st(self._context())._locals())._keys())._do_separatedBy_((function(each){
  1691. return smalltalk.withContext(function($ctx3) {
  1692. return _st(str)._nextPutAll_(each);
  1693. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)})}),(function(){
  1694. return smalltalk.withContext(function($ctx3) {
  1695. return _st(str)._nextPutAll_(",");
  1696. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  1697. $1=str;
  1698. _st($1)._nextPutAll_("){ return (function() {");
  1699. _st($1)._nextPutAll_(aString);
  1700. $2=_st($1)._nextPutAll_("})() })");
  1701. return $2;
  1702. }, function($ctx2) {$ctx2.fillBlock({str:str},$ctx1,1)})}));
  1703. function_=_st(_st($Compiler())._new())._eval_(source);
  1704. $3=_st(function_)._valueWithPossibleArguments_(_st(_st(self._context())._locals())._values());
  1705. return $3;
  1706. }, function($ctx1) {$ctx1.fill(self,"eval:",{aString:aString,source:source,function_:function_},smalltalk.Interpreter)})},
  1707. messageSends: ["streamContents:", "nextPutAll:", "do:separatedBy:", "keys", "locals", "context", "eval:", "new", "valueWithPossibleArguments:", "values"]}),
  1708. smalltalk.Interpreter);
  1709. smalltalk.addMethod(
  1710. smalltalk.method({
  1711. selector: "interpret",
  1712. fn: function (){
  1713. var self=this;
  1714. return smalltalk.withContext(function($ctx1) {
  1715. self._visit_(self._node());
  1716. return self}, function($ctx1) {$ctx1.fill(self,"interpret",{},smalltalk.Interpreter)})},
  1717. messageSends: ["visit:", "node"]}),
  1718. smalltalk.Interpreter);
  1719. smalltalk.addMethod(
  1720. smalltalk.method({
  1721. selector: "interpret:",
  1722. fn: function (aNode){
  1723. var self=this;
  1724. return smalltalk.withContext(function($ctx1) {
  1725. self._node_(aNode);
  1726. self._interpret();
  1727. return self}, function($ctx1) {$ctx1.fill(self,"interpret:",{aNode:aNode},smalltalk.Interpreter)})},
  1728. messageSends: ["node:", "interpret"]}),
  1729. smalltalk.Interpreter);
  1730. smalltalk.addMethod(
  1731. smalltalk.method({
  1732. selector: "messageFromSendNode:arguments:",
  1733. fn: function (aSendNode,aCollection){
  1734. var self=this;
  1735. function $Message(){return smalltalk.Message||(typeof Message=="undefined"?nil:Message)}
  1736. return smalltalk.withContext(function($ctx1) {
  1737. var $2,$3,$1;
  1738. $2=_st($Message())._new();
  1739. _st($2)._selector_(_st(aSendNode)._selector());
  1740. _st($2)._arguments_(aCollection);
  1741. $3=_st($2)._yourself();
  1742. $1=$3;
  1743. return $1;
  1744. }, function($ctx1) {$ctx1.fill(self,"messageFromSendNode:arguments:",{aSendNode:aSendNode,aCollection:aCollection},smalltalk.Interpreter)})},
  1745. messageSends: ["selector:", "new", "selector", "arguments:", "yourself"]}),
  1746. smalltalk.Interpreter);
  1747. smalltalk.addMethod(
  1748. smalltalk.method({
  1749. selector: "messageNotUnderstood:receiver:",
  1750. fn: function (aMessage,anObject){
  1751. var self=this;
  1752. function $MessageNotUnderstood(){return smalltalk.MessageNotUnderstood||(typeof MessageNotUnderstood=="undefined"?nil:MessageNotUnderstood)}
  1753. return smalltalk.withContext(function($ctx1) {
  1754. var $1,$2;
  1755. $1=_st($MessageNotUnderstood())._new();
  1756. _st($1)._meesage_(aMessage);
  1757. _st($1)._receiver_(anObject);
  1758. $2=_st($1)._signal();
  1759. return self}, function($ctx1) {$ctx1.fill(self,"messageNotUnderstood:receiver:",{aMessage:aMessage,anObject:anObject},smalltalk.Interpreter)})},
  1760. messageSends: ["meesage:", "new", "receiver:", "signal"]}),
  1761. smalltalk.Interpreter);
  1762. smalltalk.addMethod(
  1763. smalltalk.method({
  1764. selector: "next",
  1765. fn: function (){
  1766. var self=this;
  1767. return smalltalk.withContext(function($ctx1) {
  1768. self._node_(_st(self._node())._nextNode());
  1769. return self}, function($ctx1) {$ctx1.fill(self,"next",{},smalltalk.Interpreter)})},
  1770. messageSends: ["node:", "nextNode", "node"]}),
  1771. smalltalk.Interpreter);
  1772. smalltalk.addMethod(
  1773. smalltalk.method({
  1774. selector: "node",
  1775. fn: function (){
  1776. var self=this;
  1777. return smalltalk.withContext(function($ctx1) {
  1778. var $1;
  1779. $1=self["@node"];
  1780. return $1;
  1781. }, function($ctx1) {$ctx1.fill(self,"node",{},smalltalk.Interpreter)})},
  1782. messageSends: []}),
  1783. smalltalk.Interpreter);
  1784. smalltalk.addMethod(
  1785. smalltalk.method({
  1786. selector: "node:",
  1787. fn: function (aNode){
  1788. var self=this;
  1789. return smalltalk.withContext(function($ctx1) {
  1790. self["@node"]=aNode;
  1791. return self}, function($ctx1) {$ctx1.fill(self,"node:",{aNode:aNode},smalltalk.Interpreter)})},
  1792. messageSends: []}),
  1793. smalltalk.Interpreter);
  1794. smalltalk.addMethod(
  1795. smalltalk.method({
  1796. selector: "peek",
  1797. fn: function (){
  1798. var self=this;
  1799. return smalltalk.withContext(function($ctx1) {
  1800. var $1;
  1801. var $early={};
  1802. try {
  1803. _st(self._stack())._ifEmpty_((function(){
  1804. return smalltalk.withContext(function($ctx2) {
  1805. throw $early=[nil];
  1806. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  1807. $1=_st(self._stack())._last();
  1808. return $1;
  1809. }
  1810. catch(e) {if(e===$early)return e[0]; throw e}
  1811. }, function($ctx1) {$ctx1.fill(self,"peek",{},smalltalk.Interpreter)})},
  1812. messageSends: ["ifEmpty:", "stack", "last"]}),
  1813. smalltalk.Interpreter);
  1814. smalltalk.addMethod(
  1815. smalltalk.method({
  1816. selector: "pop",
  1817. fn: function (){
  1818. var self=this;
  1819. var peekedValue;
  1820. return smalltalk.withContext(function($ctx1) {
  1821. var $1;
  1822. peekedValue=self._peek();
  1823. _st(self._stack())._removeLast();
  1824. $1=peekedValue;
  1825. return $1;
  1826. }, function($ctx1) {$ctx1.fill(self,"pop",{peekedValue:peekedValue},smalltalk.Interpreter)})},
  1827. messageSends: ["peek", "removeLast", "stack"]}),
  1828. smalltalk.Interpreter);
  1829. smalltalk.addMethod(
  1830. smalltalk.method({
  1831. selector: "proceed",
  1832. fn: function (){
  1833. var self=this;
  1834. return smalltalk.withContext(function($ctx1) {
  1835. _st((function(){
  1836. return smalltalk.withContext(function($ctx2) {
  1837. return self._atEnd();
  1838. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}))._whileFalse_((function(){
  1839. return smalltalk.withContext(function($ctx2) {
  1840. return self._step();
  1841. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  1842. return self}, function($ctx1) {$ctx1.fill(self,"proceed",{},smalltalk.Interpreter)})},
  1843. messageSends: ["whileFalse:", "atEnd", "step"]}),
  1844. smalltalk.Interpreter);
  1845. smalltalk.addMethod(
  1846. smalltalk.method({
  1847. selector: "push:",
  1848. fn: function (anObject){
  1849. var self=this;
  1850. return smalltalk.withContext(function($ctx1) {
  1851. var $1;
  1852. $1=_st(self._stack())._add_(anObject);
  1853. return $1;
  1854. }, function($ctx1) {$ctx1.fill(self,"push:",{anObject:anObject},smalltalk.Interpreter)})},
  1855. messageSends: ["add:", "stack"]}),
  1856. smalltalk.Interpreter);
  1857. smalltalk.addMethod(
  1858. smalltalk.method({
  1859. selector: "restart",
  1860. fn: function (){
  1861. var self=this;
  1862. return smalltalk.withContext(function($ctx1) {
  1863. self._node_(_st(_st(self._context())._ast())._nextChild());
  1864. return self}, function($ctx1) {$ctx1.fill(self,"restart",{},smalltalk.Interpreter)})},
  1865. messageSends: ["node:", "nextChild", "ast", "context"]}),
  1866. smalltalk.Interpreter);
  1867. smalltalk.addMethod(
  1868. smalltalk.method({
  1869. selector: "result",
  1870. fn: function (){
  1871. var self=this;
  1872. return smalltalk.withContext(function($ctx1) {
  1873. var $2,$1;
  1874. $2=self._returnValue();
  1875. if(($receiver = $2) == nil || $receiver == undefined){
  1876. $1=_st(self._context())._receiver();
  1877. } else {
  1878. $1=$2;
  1879. };
  1880. return $1;
  1881. }, function($ctx1) {$ctx1.fill(self,"result",{},smalltalk.Interpreter)})},
  1882. messageSends: ["ifNil:", "returnValue", "receiver", "context"]}),
  1883. smalltalk.Interpreter);
  1884. smalltalk.addMethod(
  1885. smalltalk.method({
  1886. selector: "returnValue",
  1887. fn: function (){
  1888. var self=this;
  1889. return smalltalk.withContext(function($ctx1) {
  1890. var $1;
  1891. $1=self["@returnValue"];
  1892. return $1;
  1893. }, function($ctx1) {$ctx1.fill(self,"returnValue",{},smalltalk.Interpreter)})},
  1894. messageSends: []}),
  1895. smalltalk.Interpreter);
  1896. smalltalk.addMethod(
  1897. smalltalk.method({
  1898. selector: "returnValue:",
  1899. fn: function (anObject){
  1900. var self=this;
  1901. return smalltalk.withContext(function($ctx1) {
  1902. self["@returnValue"]=anObject;
  1903. return self}, function($ctx1) {$ctx1.fill(self,"returnValue:",{anObject:anObject},smalltalk.Interpreter)})},
  1904. messageSends: []}),
  1905. smalltalk.Interpreter);
  1906. smalltalk.addMethod(
  1907. smalltalk.method({
  1908. selector: "sendMessage:to:superSend:",
  1909. fn: function (aMessage,anObject,aBoolean){
  1910. var self=this;
  1911. var method;
  1912. return smalltalk.withContext(function($ctx1) {
  1913. var $1,$2,$3,$4,$5,$6;
  1914. var $early={};
  1915. try {
  1916. $1=aBoolean;
  1917. if(! smalltalk.assert($1)){
  1918. $2=_st(aMessage)._sendTo_(anObject);
  1919. return $2;
  1920. };
  1921. $3=_st(_st(anObject)._class())._superclass();
  1922. if(($receiver = $3) == nil || $receiver == undefined){
  1923. $4=self._messageNotUnderstood_receiver_(aMessage,anObject);
  1924. return $4;
  1925. } else {
  1926. $3;
  1927. };
  1928. method=_st(_st(_st(_st(anObject)._class())._superclass())._methodDictionary())._at_ifAbsent_(_st(aMessage)._selector(),(function(){
  1929. return smalltalk.withContext(function($ctx2) {
  1930. $5=self._messageNotUnderstood_receiver_(aMessage,anObject);
  1931. throw $early=[$5];
  1932. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  1933. $6=_st(method)._sendTo_arguments_(anObject,_st(aMessage)._arguments());
  1934. return $6;
  1935. }
  1936. catch(e) {if(e===$early)return e[0]; throw e}
  1937. }, function($ctx1) {$ctx1.fill(self,"sendMessage:to:superSend:",{aMessage:aMessage,anObject:anObject,aBoolean:aBoolean,method:method},smalltalk.Interpreter)})},
  1938. messageSends: ["ifFalse:", "sendTo:", "ifNil:", "superclass", "class", "messageNotUnderstood:receiver:", "at:ifAbsent:", "methodDictionary", "selector", "sendTo:arguments:", "arguments"]}),
  1939. smalltalk.Interpreter);
  1940. smalltalk.addMethod(
  1941. smalltalk.method({
  1942. selector: "shouldReturn",
  1943. fn: function (){
  1944. var self=this;
  1945. return smalltalk.withContext(function($ctx1) {
  1946. var $1;
  1947. $1=_st(self._returnValue())._notNil();
  1948. return $1;
  1949. }, function($ctx1) {$ctx1.fill(self,"shouldReturn",{},smalltalk.Interpreter)})},
  1950. messageSends: ["notNil", "returnValue"]}),
  1951. smalltalk.Interpreter);
  1952. smalltalk.addMethod(
  1953. smalltalk.method({
  1954. selector: "skip",
  1955. fn: function (){
  1956. var self=this;
  1957. return smalltalk.withContext(function($ctx1) {
  1958. self._next();
  1959. return self}, function($ctx1) {$ctx1.fill(self,"skip",{},smalltalk.Interpreter)})},
  1960. messageSends: ["next"]}),
  1961. smalltalk.Interpreter);
  1962. smalltalk.addMethod(
  1963. smalltalk.method({
  1964. selector: "stack",
  1965. fn: function (){
  1966. var self=this;
  1967. function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  1968. return smalltalk.withContext(function($ctx1) {
  1969. var $2,$1;
  1970. $2=self["@stack"];
  1971. if(($receiver = $2) == nil || $receiver == undefined){
  1972. self["@stack"]=_st($OrderedCollection())._new();
  1973. $1=self["@stack"];
  1974. } else {
  1975. $1=$2;
  1976. };
  1977. return $1;
  1978. }, function($ctx1) {$ctx1.fill(self,"stack",{},smalltalk.Interpreter)})},
  1979. messageSends: ["ifNil:", "new"]}),
  1980. smalltalk.Interpreter);
  1981. smalltalk.addMethod(
  1982. smalltalk.method({
  1983. selector: "step",
  1984. fn: function (){
  1985. var self=this;
  1986. return smalltalk.withContext(function($ctx1) {
  1987. var $1,$2;
  1988. $1=self;
  1989. _st($1)._interpret();
  1990. $2=_st($1)._next();
  1991. return self}, function($ctx1) {$ctx1.fill(self,"step",{},smalltalk.Interpreter)})},
  1992. messageSends: ["interpret", "next"]}),
  1993. smalltalk.Interpreter);
  1994. smalltalk.addMethod(
  1995. smalltalk.method({
  1996. selector: "stepOver",
  1997. fn: function (){
  1998. var self=this;
  1999. return smalltalk.withContext(function($ctx1) {
  2000. self._step();
  2001. _st((function(){
  2002. return smalltalk.withContext(function($ctx2) {
  2003. return _st(self._node())._isSteppingNode();
  2004. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}))._whileFalse_((function(){
  2005. return smalltalk.withContext(function($ctx2) {
  2006. return self._step();
  2007. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  2008. return self}, function($ctx1) {$ctx1.fill(self,"stepOver",{},smalltalk.Interpreter)})},
  2009. messageSends: ["step", "whileFalse:", "isSteppingNode", "node"]}),
  2010. smalltalk.Interpreter);
  2011. smalltalk.addMethod(
  2012. smalltalk.method({
  2013. selector: "visit:",
  2014. fn: function (aNode){
  2015. var self=this;
  2016. return smalltalk.withContext(function($ctx1) {
  2017. var $1;
  2018. $1=self._shouldReturn();
  2019. if(! smalltalk.assert($1)){
  2020. smalltalk.Interpreter.superclass.fn.prototype._visit_.apply(_st(self), [aNode]);
  2021. };
  2022. return self}, function($ctx1) {$ctx1.fill(self,"visit:",{aNode:aNode},smalltalk.Interpreter)})},
  2023. messageSends: ["ifFalse:", "shouldReturn", "visit:"]}),
  2024. smalltalk.Interpreter);
  2025. smalltalk.addMethod(
  2026. smalltalk.method({
  2027. selector: "visitAssignmentNode:",
  2028. fn: function (aNode){
  2029. var self=this;
  2030. var poppedValue;
  2031. return smalltalk.withContext(function($ctx1) {
  2032. poppedValue=self._pop();
  2033. self._pop();
  2034. self._push_(poppedValue);
  2035. self._assign_to_(_st(aNode)._left(),poppedValue);
  2036. return self}, function($ctx1) {$ctx1.fill(self,"visitAssignmentNode:",{aNode:aNode,poppedValue:poppedValue},smalltalk.Interpreter)})},
  2037. messageSends: ["pop", "push:", "assign:to:", "left"]}),
  2038. smalltalk.Interpreter);
  2039. smalltalk.addMethod(
  2040. smalltalk.method({
  2041. selector: "visitBlockNode:",
  2042. fn: function (aNode){
  2043. var self=this;
  2044. var block;
  2045. function $AIBlockClosure(){return smalltalk.AIBlockClosure||(typeof AIBlockClosure=="undefined"?nil:AIBlockClosure)}
  2046. return smalltalk.withContext(function($ctx1) {
  2047. block=_st($AIBlockClosure())._forContext_node_(self._context(),aNode);
  2048. self._push_(block);
  2049. return self}, function($ctx1) {$ctx1.fill(self,"visitBlockNode:",{aNode:aNode,block:block},smalltalk.Interpreter)})},
  2050. messageSends: ["forContext:node:", "context", "push:"]}),
  2051. smalltalk.Interpreter);
  2052. smalltalk.addMethod(
  2053. smalltalk.method({
  2054. selector: "visitClassReferenceNode:",
  2055. fn: function (aNode){
  2056. var self=this;
  2057. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  2058. return smalltalk.withContext(function($ctx1) {
  2059. self._push_(_st(_st($Smalltalk())._current())._at_(_st(aNode)._value()));
  2060. return self}, function($ctx1) {$ctx1.fill(self,"visitClassReferenceNode:",{aNode:aNode},smalltalk.Interpreter)})},
  2061. messageSends: ["push:", "at:", "current", "value"]}),
  2062. smalltalk.Interpreter);
  2063. smalltalk.addMethod(
  2064. smalltalk.method({
  2065. selector: "visitDynamicArrayNode:",
  2066. fn: function (aNode){
  2067. var self=this;
  2068. var array;
  2069. return smalltalk.withContext(function($ctx1) {
  2070. array=[];
  2071. _st(_st(aNode)._nodes())._do_((function(each){
  2072. return smalltalk.withContext(function($ctx2) {
  2073. return _st(array)._addFirst_(self._pop());
  2074. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  2075. self._push_(array);
  2076. return self}, function($ctx1) {$ctx1.fill(self,"visitDynamicArrayNode:",{aNode:aNode,array:array},smalltalk.Interpreter)})},
  2077. messageSends: ["do:", "nodes", "addFirst:", "pop", "push:"]}),
  2078. smalltalk.Interpreter);
  2079. smalltalk.addMethod(
  2080. smalltalk.method({
  2081. selector: "visitDynamicDictionaryNode:",
  2082. fn: function (aNode){
  2083. var self=this;
  2084. var hashedCollection;
  2085. function $HashedCollection(){return smalltalk.HashedCollection||(typeof HashedCollection=="undefined"?nil:HashedCollection)}
  2086. return smalltalk.withContext(function($ctx1) {
  2087. hashedCollection=_st($HashedCollection())._new();
  2088. _st(_st(aNode)._nodes())._do_((function(each){
  2089. return smalltalk.withContext(function($ctx2) {
  2090. return _st(hashedCollection)._add_(self._pop());
  2091. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  2092. self._push_(hashedCollection);
  2093. return self}, function($ctx1) {$ctx1.fill(self,"visitDynamicDictionaryNode:",{aNode:aNode,hashedCollection:hashedCollection},smalltalk.Interpreter)})},
  2094. messageSends: ["new", "do:", "nodes", "add:", "pop", "push:"]}),
  2095. smalltalk.Interpreter);
  2096. smalltalk.addMethod(
  2097. smalltalk.method({
  2098. selector: "visitJSStatementNode:",
  2099. fn: function (aNode){
  2100. var self=this;
  2101. return smalltalk.withContext(function($ctx1) {
  2102. self._returnValue_(self._eval_(_st(aNode)._source()));
  2103. return self}, function($ctx1) {$ctx1.fill(self,"visitJSStatementNode:",{aNode:aNode},smalltalk.Interpreter)})},
  2104. messageSends: ["returnValue:", "eval:", "source"]}),
  2105. smalltalk.Interpreter);
  2106. smalltalk.addMethod(
  2107. smalltalk.method({
  2108. selector: "visitNode:",
  2109. fn: function (aNode){
  2110. var self=this;
  2111. return smalltalk.withContext(function($ctx1) {
  2112. return self}, function($ctx1) {$ctx1.fill(self,"visitNode:",{aNode:aNode},smalltalk.Interpreter)})},
  2113. messageSends: []}),
  2114. smalltalk.Interpreter);
  2115. smalltalk.addMethod(
  2116. smalltalk.method({
  2117. selector: "visitReturnNode:",
  2118. fn: function (aNode){
  2119. var self=this;
  2120. return smalltalk.withContext(function($ctx1) {
  2121. self._returnValue_(self._pop());
  2122. return self}, function($ctx1) {$ctx1.fill(self,"visitReturnNode:",{aNode:aNode},smalltalk.Interpreter)})},
  2123. messageSends: ["returnValue:", "pop"]}),
  2124. smalltalk.Interpreter);
  2125. smalltalk.addMethod(
  2126. smalltalk.method({
  2127. selector: "visitSendNode:",
  2128. fn: function (aNode){
  2129. var self=this;
  2130. var receiver,args,message,result;
  2131. return smalltalk.withContext(function($ctx1) {
  2132. var $1;
  2133. args=_st(_st(aNode)._arguments())._collect_((function(each){
  2134. return smalltalk.withContext(function($ctx2) {
  2135. return self._pop();
  2136. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  2137. receiver=self._pop();
  2138. message=self._messageFromSendNode_arguments_(aNode,_st(args)._reversed());
  2139. result=self._sendMessage_to_superSend_(message,receiver,_st(aNode)._superSend());
  2140. _st(self._context())._pc_(_st(_st(self._context())._pc()).__plus((1)));
  2141. $1=_st(_st(aNode)._isCascadeSendNode())._and_((function(){
  2142. return smalltalk.withContext(function($ctx2) {
  2143. return _st(_st(aNode)._isLastChild())._not();
  2144. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  2145. if(smalltalk.assert($1)){
  2146. self._push_(receiver);
  2147. } else {
  2148. self._push_(result);
  2149. };
  2150. return self}, function($ctx1) {$ctx1.fill(self,"visitSendNode:",{aNode:aNode,receiver:receiver,args:args,message:message,result:result},smalltalk.Interpreter)})},
  2151. messageSends: ["collect:", "arguments", "pop", "messageFromSendNode:arguments:", "reversed", "sendMessage:to:superSend:", "superSend", "pc:", "context", "+", "pc", "ifTrue:ifFalse:", "and:", "isCascadeSendNode", "not", "isLastChild", "push:"]}),
  2152. smalltalk.Interpreter);
  2153. smalltalk.addMethod(
  2154. smalltalk.method({
  2155. selector: "visitValueNode:",
  2156. fn: function (aNode){
  2157. var self=this;
  2158. return smalltalk.withContext(function($ctx1) {
  2159. self._push_(_st(aNode)._value());
  2160. return self}, function($ctx1) {$ctx1.fill(self,"visitValueNode:",{aNode:aNode},smalltalk.Interpreter)})},
  2161. messageSends: ["push:", "value"]}),
  2162. smalltalk.Interpreter);
  2163. smalltalk.addMethod(
  2164. smalltalk.method({
  2165. selector: "visitVariableNode:",
  2166. fn: function (aNode){
  2167. var self=this;
  2168. return smalltalk.withContext(function($ctx1) {
  2169. var $1,$2,$3,$5,$4;
  2170. $1=_st(_st(aNode)._binding())._isUnknownVar();
  2171. if(smalltalk.assert($1)){
  2172. $2=self._push_(_st(window)._at_ifAbsent_(_st(aNode)._value(),(function(){
  2173. return smalltalk.withContext(function($ctx2) {
  2174. return self._error_("Unknown variable");
  2175. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})})));
  2176. return $2;
  2177. };
  2178. $3=self;
  2179. $5=_st(_st(aNode)._binding())._isInstanceVar();
  2180. if(smalltalk.assert($5)){
  2181. $4=_st(_st(self._context())._receiver())._instVarAt_(_st(aNode)._value());
  2182. } else {
  2183. $4=_st(self._context())._localAt_(_st(aNode)._value());
  2184. };
  2185. _st($3)._push_($4);
  2186. return self}, function($ctx1) {$ctx1.fill(self,"visitVariableNode:",{aNode:aNode},smalltalk.Interpreter)})},
  2187. messageSends: ["ifTrue:", "isUnknownVar", "binding", "push:", "at:ifAbsent:", "value", "error:", "ifTrue:ifFalse:", "isInstanceVar", "instVarAt:", "receiver", "context", "localAt:"]}),
  2188. smalltalk.Interpreter);
  2189. smalltalk.addMethod(
  2190. smalltalk.method({
  2191. selector: "interpreter:continue:",
  2192. fn: function (anInterpreter,aBlock){
  2193. var self=this;
  2194. return smalltalk.withContext(function($ctx1) {
  2195. var $1;
  2196. $1=_st(anInterpreter)._interpretNode_continue_(self,aBlock);
  2197. return $1;
  2198. }, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock},smalltalk.Node)})},
  2199. messageSends: ["interpretNode:continue:"]}),
  2200. smalltalk.Node);
  2201. smalltalk.addMethod(
  2202. smalltalk.method({
  2203. selector: "isSteppingNode",
  2204. fn: function (){
  2205. var self=this;
  2206. return smalltalk.withContext(function($ctx1) {
  2207. return false;
  2208. }, function($ctx1) {$ctx1.fill(self,"isSteppingNode",{},smalltalk.Node)})},
  2209. messageSends: []}),
  2210. smalltalk.Node);
  2211. smalltalk.addMethod(
  2212. smalltalk.method({
  2213. selector: "interpreter:continue:",
  2214. fn: function (anInterpreter,aBlock){
  2215. var self=this;
  2216. return smalltalk.withContext(function($ctx1) {
  2217. var $1;
  2218. $1=_st(anInterpreter)._interpretAssignmentNode_continue_(self,aBlock);
  2219. return $1;
  2220. }, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock},smalltalk.AssignmentNode)})},
  2221. messageSends: ["interpretAssignmentNode:continue:"]}),
  2222. smalltalk.AssignmentNode);
  2223. smalltalk.addMethod(
  2224. smalltalk.method({
  2225. selector: "isSteppingNode",
  2226. fn: function (){
  2227. var self=this;
  2228. return smalltalk.withContext(function($ctx1) {
  2229. return true;
  2230. }, function($ctx1) {$ctx1.fill(self,"isSteppingNode",{},smalltalk.AssignmentNode)})},
  2231. messageSends: []}),
  2232. smalltalk.AssignmentNode);
  2233. smalltalk.addMethod(
  2234. smalltalk.method({
  2235. selector: "interpreter:continue:",
  2236. fn: function (anInterpreter,aBlock){
  2237. var self=this;
  2238. return smalltalk.withContext(function($ctx1) {
  2239. var $1;
  2240. $1=_st(anInterpreter)._interpretBlockNode_continue_(self,aBlock);
  2241. return $1;
  2242. }, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock},smalltalk.BlockNode)})},
  2243. messageSends: ["interpretBlockNode:continue:"]}),
  2244. smalltalk.BlockNode);
  2245. smalltalk.addMethod(
  2246. smalltalk.method({
  2247. selector: "isSteppingNode",
  2248. fn: function (){
  2249. var self=this;
  2250. return smalltalk.withContext(function($ctx1) {
  2251. return true;
  2252. }, function($ctx1) {$ctx1.fill(self,"isSteppingNode",{},smalltalk.BlockNode)})},
  2253. messageSends: []}),
  2254. smalltalk.BlockNode);
  2255. smalltalk.addMethod(
  2256. smalltalk.method({
  2257. selector: "interpreter:continue:",
  2258. fn: function (anInterpreter,aBlock){
  2259. var self=this;
  2260. return smalltalk.withContext(function($ctx1) {
  2261. var $1;
  2262. $1=_st(anInterpreter)._interpretCascadeNode_continue_(self,aBlock);
  2263. return $1;
  2264. }, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock},smalltalk.CascadeNode)})},
  2265. messageSends: ["interpretCascadeNode:continue:"]}),
  2266. smalltalk.CascadeNode);
  2267. smalltalk.addMethod(
  2268. smalltalk.method({
  2269. selector: "interpreter:continue:",
  2270. fn: function (anInterpreter,aBlock){
  2271. var self=this;
  2272. return smalltalk.withContext(function($ctx1) {
  2273. var $1;
  2274. $1=_st(anInterpreter)._interpretDynamicArrayNode_continue_(self,aBlock);
  2275. return $1;
  2276. }, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock},smalltalk.DynamicArrayNode)})},
  2277. messageSends: ["interpretDynamicArrayNode:continue:"]}),
  2278. smalltalk.DynamicArrayNode);
  2279. smalltalk.addMethod(
  2280. smalltalk.method({
  2281. selector: "isSteppingNode",
  2282. fn: function (){
  2283. var self=this;
  2284. return smalltalk.withContext(function($ctx1) {
  2285. return true;
  2286. }, function($ctx1) {$ctx1.fill(self,"isSteppingNode",{},smalltalk.DynamicArrayNode)})},
  2287. messageSends: []}),
  2288. smalltalk.DynamicArrayNode);
  2289. smalltalk.addMethod(
  2290. smalltalk.method({
  2291. selector: "interpreter:continue:",
  2292. fn: function (anInterpreter,aBlock){
  2293. var self=this;
  2294. return smalltalk.withContext(function($ctx1) {
  2295. var $1;
  2296. $1=_st(anInterpreter)._interpretDynamicDictionaryNode_continue_(self,aBlock);
  2297. return $1;
  2298. }, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock},smalltalk.DynamicDictionaryNode)})},
  2299. messageSends: ["interpretDynamicDictionaryNode:continue:"]}),
  2300. smalltalk.DynamicDictionaryNode);
  2301. smalltalk.addMethod(
  2302. smalltalk.method({
  2303. selector: "isSteppingNode",
  2304. fn: function (){
  2305. var self=this;
  2306. return smalltalk.withContext(function($ctx1) {
  2307. return true;
  2308. }, function($ctx1) {$ctx1.fill(self,"isSteppingNode",{},smalltalk.DynamicDictionaryNode)})},
  2309. messageSends: []}),
  2310. smalltalk.DynamicDictionaryNode);
  2311. smalltalk.addMethod(
  2312. smalltalk.method({
  2313. selector: "interpreter:continue:",
  2314. fn: function (anInterpreter,aBlock){
  2315. var self=this;
  2316. return smalltalk.withContext(function($ctx1) {
  2317. var $1;
  2318. $1=_st(anInterpreter)._interpretJSStatementNode_continue_(self,aBlock);
  2319. return $1;
  2320. }, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock},smalltalk.JSStatementNode)})},
  2321. messageSends: ["interpretJSStatementNode:continue:"]}),
  2322. smalltalk.JSStatementNode);
  2323. smalltalk.addMethod(
  2324. smalltalk.method({
  2325. selector: "isSteppingNode",
  2326. fn: function (){
  2327. var self=this;
  2328. return smalltalk.withContext(function($ctx1) {
  2329. return true;
  2330. }, function($ctx1) {$ctx1.fill(self,"isSteppingNode",{},smalltalk.JSStatementNode)})},
  2331. messageSends: []}),
  2332. smalltalk.JSStatementNode);
  2333. smalltalk.addMethod(
  2334. smalltalk.method({
  2335. selector: "interpreter:continue:",
  2336. fn: function (anInterpreter,aBlock){
  2337. var self=this;
  2338. return smalltalk.withContext(function($ctx1) {
  2339. var $1;
  2340. $1=_st(anInterpreter)._interpretMethodNode_continue_(self,aBlock);
  2341. return $1;
  2342. }, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock},smalltalk.MethodNode)})},
  2343. messageSends: ["interpretMethodNode:continue:"]}),
  2344. smalltalk.MethodNode);
  2345. smalltalk.addMethod(
  2346. smalltalk.method({
  2347. selector: "interpreter:continue:",
  2348. fn: function (anInterpreter,aBlock){
  2349. var self=this;
  2350. return smalltalk.withContext(function($ctx1) {
  2351. var $1;
  2352. $1=_st(anInterpreter)._interpretReturnNode_continue_(self,aBlock);
  2353. return $1;
  2354. }, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock},smalltalk.ReturnNode)})},
  2355. messageSends: ["interpretReturnNode:continue:"]}),
  2356. smalltalk.ReturnNode);
  2357. smalltalk.addMethod(
  2358. smalltalk.method({
  2359. selector: "interpreter:continue:",
  2360. fn: function (anInterpreter,aBlock){
  2361. var self=this;
  2362. return smalltalk.withContext(function($ctx1) {
  2363. var $1;
  2364. $1=_st(anInterpreter)._interpretSendNode_continue_(self,aBlock);
  2365. return $1;
  2366. }, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock},smalltalk.SendNode)})},
  2367. messageSends: ["interpretSendNode:continue:"]}),
  2368. smalltalk.SendNode);
  2369. smalltalk.addMethod(
  2370. smalltalk.method({
  2371. selector: "isSteppingNode",
  2372. fn: function (){
  2373. var self=this;
  2374. return smalltalk.withContext(function($ctx1) {
  2375. return true;
  2376. }, function($ctx1) {$ctx1.fill(self,"isSteppingNode",{},smalltalk.SendNode)})},
  2377. messageSends: []}),
  2378. smalltalk.SendNode);
  2379. smalltalk.addMethod(
  2380. smalltalk.method({
  2381. selector: "interpreter:continue:",
  2382. fn: function (anInterpreter,aBlock){
  2383. var self=this;
  2384. return smalltalk.withContext(function($ctx1) {
  2385. var $1;
  2386. $1=_st(anInterpreter)._interpretSequenceNode_continue_(self,aBlock);
  2387. return $1;
  2388. }, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock},smalltalk.SequenceNode)})},
  2389. messageSends: ["interpretSequenceNode:continue:"]}),
  2390. smalltalk.SequenceNode);
  2391. smalltalk.addMethod(
  2392. smalltalk.method({
  2393. selector: "interpreter:continue:",
  2394. fn: function (anInterpreter,aBlock){
  2395. var self=this;
  2396. return smalltalk.withContext(function($ctx1) {
  2397. var $1;
  2398. $1=_st(anInterpreter)._interpretBlockSequenceNode_continue_(self,aBlock);
  2399. return $1;
  2400. }, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock},smalltalk.BlockSequenceNode)})},
  2401. messageSends: ["interpretBlockSequenceNode:continue:"]}),
  2402. smalltalk.BlockSequenceNode);
  2403. smalltalk.addMethod(
  2404. smalltalk.method({
  2405. selector: "interpreter:continue:",
  2406. fn: function (anInterpreter,aBlock){
  2407. var self=this;
  2408. return smalltalk.withContext(function($ctx1) {
  2409. var $1;
  2410. $1=_st(anInterpreter)._interpretValueNode_continue_(self,aBlock);
  2411. return $1;
  2412. }, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock},smalltalk.ValueNode)})},
  2413. messageSends: ["interpretValueNode:continue:"]}),
  2414. smalltalk.ValueNode);
  2415. smalltalk.addMethod(
  2416. smalltalk.method({
  2417. selector: "interpreter:continue:",
  2418. fn: function (anInterpreter,aBlock){
  2419. var self=this;
  2420. return smalltalk.withContext(function($ctx1) {
  2421. var $1;
  2422. $1=_st(anInterpreter)._interpretVariableNode_continue_(self,aBlock);
  2423. return $1;
  2424. }, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock},smalltalk.VariableNode)})},
  2425. messageSends: ["interpretVariableNode:continue:"]}),
  2426. smalltalk.VariableNode);
  2427. smalltalk.addMethod(
  2428. smalltalk.method({
  2429. selector: "interpreter:continue:",
  2430. fn: function (anInterpreter,aBlock){
  2431. var self=this;
  2432. return smalltalk.withContext(function($ctx1) {
  2433. var $1;
  2434. $1=_st(anInterpreter)._interpretClassReferenceNode_continue_(self,aBlock);
  2435. return $1;
  2436. }, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock},smalltalk.ClassReferenceNode)})},
  2437. messageSends: ["interpretClassReferenceNode:continue:"]}),
  2438. smalltalk.ClassReferenceNode);
  2439. })(global_smalltalk,global_nil,global__st);