1
0

Compiler-Interpreter.deploy.js 88 KB

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