Compiler-Interpreter.deploy.js 89 KB

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