resin 0.3.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. data/amber/bin/amberc +10 -350
  2. data/amber/js/Benchfib.deploy.js +80 -89
  3. data/amber/js/Benchfib.js +80 -89
  4. data/amber/js/Canvas.deploy.js +558 -545
  5. data/amber/js/Canvas.js +563 -545
  6. data/amber/js/Compiler-AST.deploy.js +431 -243
  7. data/amber/js/Compiler-AST.js +487 -244
  8. data/amber/js/Compiler-Core.deploy.js +201 -1045
  9. data/amber/js/Compiler-Core.js +208 -1207
  10. data/amber/js/Compiler-Exceptions.deploy.js +37 -18
  11. data/amber/js/Compiler-Exceptions.js +42 -18
  12. data/amber/js/Compiler-IR.deploy.js +1071 -774
  13. data/amber/js/Compiler-IR.js +1194 -848
  14. data/amber/js/Compiler-Inlining.deploy.js +395 -373
  15. data/amber/js/Compiler-Inlining.js +395 -373
  16. data/amber/js/Compiler-Interpreter.deploy.js +1202 -0
  17. data/amber/js/Compiler-Interpreter.js +1631 -0
  18. data/amber/js/Compiler-Semantic.deploy.js +695 -600
  19. data/amber/js/Compiler-Semantic.js +721 -611
  20. data/amber/js/Compiler-Tests.deploy.js +699 -376
  21. data/amber/js/Compiler-Tests.js +834 -381
  22. data/amber/js/Compiler.deploy.js +8563 -1805
  23. data/amber/js/Compiler.js +11476 -2633
  24. data/amber/js/Examples.deploy.js +29 -29
  25. data/amber/js/Examples.js +29 -29
  26. data/amber/js/IDE.deploy.js +3292 -2649
  27. data/amber/js/IDE.js +3318 -2710
  28. data/amber/js/Importer-Exporter.deploy.js +393 -349
  29. data/amber/js/Importer-Exporter.js +398 -354
  30. data/amber/js/Kernel-Announcements.deploy.js +53 -44
  31. data/amber/js/Kernel-Announcements.js +55 -44
  32. data/amber/js/Kernel-Classes.deploy.js +566 -368
  33. data/amber/js/Kernel-Classes.js +660 -402
  34. data/amber/js/Kernel-Collections.deploy.js +1149 -1098
  35. data/amber/js/Kernel-Collections.js +1183 -1116
  36. data/amber/js/Kernel-Exceptions.deploy.js +173 -75
  37. data/amber/js/Kernel-Exceptions.js +215 -77
  38. data/amber/js/Kernel-Methods.deploy.js +530 -313
  39. data/amber/js/Kernel-Methods.js +632 -338
  40. data/amber/js/Kernel-Objects.deploy.js +1734 -1577
  41. data/amber/js/Kernel-Objects.js +1867 -1654
  42. data/amber/js/Kernel-Tests.deploy.js +1416 -973
  43. data/amber/js/Kernel-Tests.js +1495 -981
  44. data/amber/js/Kernel-Transcript.deploy.js +23 -24
  45. data/amber/js/Kernel-Transcript.js +25 -26
  46. data/amber/js/SUnit-Tests.deploy.js +402 -0
  47. data/amber/js/SUnit-Tests.js +518 -0
  48. data/amber/js/SUnit.deploy.js +535 -237
  49. data/amber/js/SUnit.js +634 -246
  50. data/amber/js/amber.js +90 -53
  51. data/amber/js/boot.js +441 -255
  52. data/amber/js/init.js +1 -3
  53. data/amber/js/lib/CodeMirror/codemirror.css +3 -0
  54. data/amber/js/lib/CodeMirror/codemirror.js +104 -55
  55. data/amber/js/lib/peg-0.7.0.min.js +9 -0
  56. data/amber/js/parser.js +1504 -802
  57. data/amber/js/parser.pegjs +170 -165
  58. data/amber/st/Canvas.st +6 -0
  59. data/amber/st/Compiler-AST.st +54 -3
  60. data/amber/st/Compiler-Core.st +6 -551
  61. data/amber/st/Compiler-Exceptions.st +4 -0
  62. data/amber/st/Compiler-IR.st +205 -87
  63. data/amber/st/Compiler-Interpreter.st +597 -0
  64. data/amber/st/Compiler-Semantic.st +46 -21
  65. data/amber/st/Compiler-Tests.st +254 -7
  66. data/amber/st/Compiler.st +3172 -1541
  67. data/amber/st/IDE.st +57 -93
  68. data/amber/st/Importer-Exporter.st +4 -7
  69. data/amber/st/Kernel-Announcements.st +8 -0
  70. data/amber/st/Kernel-Classes.st +149 -40
  71. data/amber/st/Kernel-Collections.st +43 -32
  72. data/amber/st/Kernel-Exceptions.st +70 -1
  73. data/amber/st/Kernel-Methods.st +165 -27
  74. data/amber/st/Kernel-Objects.st +215 -140
  75. data/amber/st/Kernel-Tests.st +195 -10
  76. data/amber/st/Kernel-Transcript.st +1 -3
  77. data/amber/st/SUnit-Tests.st +186 -0
  78. data/amber/st/SUnit.st +186 -14
  79. data/bin/resin +6 -0
  80. data/lib/resin/cli.rb +19 -0
  81. metadata +41 -25
  82. data/amber/js/lib/peg-0.6.2.min.js +0 -2
  83. data/bin/resin-compile +0 -6
  84. data/bin/runresin +0 -12
@@ -8,32 +8,75 @@ selector: "alias:",
8
8
  category: 'visiting',
9
9
  fn: function (aNode){
10
10
  var self=this;
11
- var $1,$2,$3,$4,$5,$6;
12
11
  var variable;
13
- $1=smalltalk.send(aNode,"_isValueNode",[]);
12
+ return smalltalk.withContext(function($ctx1) {
13
+ $1=_st(aNode)._isImmutable();
14
14
  if(smalltalk.assert($1)){
15
- $2=smalltalk.send(self,"_visit_",[aNode]);
15
+ $2=_st(self)._visit_(aNode);
16
16
  return $2;
17
17
  };
18
- $3=smalltalk.send((smalltalk.IRVariable || IRVariable),"_new",[]);
19
- smalltalk.send($3,"_variable_",[smalltalk.send(smalltalk.send((smalltalk.AliasVar || AliasVar),"_new",[]),"_name_",[smalltalk.send("$","__comma",[smalltalk.send(self,"_nextAlias",[])])])]);
20
- $4=smalltalk.send($3,"_yourself",[]);
18
+ $3=_st((smalltalk.IRVariable || IRVariable))._new();
19
+ _st($3)._variable_(_st(_st((smalltalk.AliasVar || AliasVar))._new())._name_(_st("$").__comma(_st(self)._nextAlias())));
20
+ $4=_st($3)._yourself();
21
21
  variable=$4;
22
- $5=smalltalk.send((smalltalk.IRAssignment || IRAssignment),"_new",[]);
23
- smalltalk.send($5,"_add_",[variable]);
24
- smalltalk.send($5,"_add_",[smalltalk.send(self,"_visit_",[aNode])]);
25
- $6=smalltalk.send($5,"_yourself",[]);
26
- smalltalk.send(smalltalk.send(self,"_sequence",[]),"_add_",[$6]);
27
- smalltalk.send(smalltalk.send(smalltalk.send(self,"_method",[]),"_internalVariables",[]),"_add_",[variable]);
28
- return variable;
29
- },
22
+ $5=_st((smalltalk.IRAssignment || IRAssignment))._new();
23
+ _st($5)._add_(variable);
24
+ _st($5)._add_(_st(self)._visit_(aNode));
25
+ $6=_st($5)._yourself();
26
+ _st(_st(self)._sequence())._add_($6);
27
+ _st(_st(_st(self)._method())._internalVariables())._add_(variable);
28
+ $7=variable;
29
+ return $7;
30
+ }, function($ctx1) {$ctx1.fill(self,"alias:",{aNode:aNode,variable:variable}, smalltalk.IRASTTranslator)})},
30
31
  args: ["aNode"],
31
- source: "alias: aNode\x0a\x09| variable |\x0a\x0a\x09aNode isValueNode ifTrue: [ ^ self visit: aNode ].\x0a\x0a\x09variable := IRVariable new \x0a\x09\x09variable: (AliasVar new name: '$', self nextAlias); \x0a\x09\x09yourself.\x0a\x0a\x09self sequence add: (IRAssignment new\x0a\x09\x09add: variable;\x0a\x09\x09add: (self visit: aNode);\x0a\x09\x09yourself).\x0a\x0a\x09self method internalVariables add: variable.\x0a\x0a\x09^ variable",
32
- messageSends: ["ifTrue:", "visit:", "isValueNode", "variable:", "name:", ",", "nextAlias", "new", "yourself", "add:", "sequence", "internalVariables", "method"],
32
+ source: "alias: aNode\x0a\x09| variable |\x0a\x0a\x09aNode isImmutable ifTrue: [ ^ self visit: aNode ].\x0a\x0a\x09variable := IRVariable new \x0a\x09\x09variable: (AliasVar new name: '$', self nextAlias); \x0a\x09\x09yourself.\x0a\x0a\x09self sequence add: (IRAssignment new\x0a\x09\x09add: variable;\x0a\x09\x09add: (self visit: aNode);\x0a\x09\x09yourself).\x0a\x0a\x09self method internalVariables add: variable.\x0a\x0a\x09^ variable",
33
+ messageSends: ["ifTrue:", "visit:", "isImmutable", "variable:", "name:", ",", "nextAlias", "new", "yourself", "add:", "sequence", "internalVariables", "method"],
33
34
  referencedClasses: ["AliasVar", "IRVariable", "IRAssignment"]
34
35
  }),
35
36
  smalltalk.IRASTTranslator);
36
37
 
38
+ smalltalk.addMethod(
39
+ "_aliasTemporally_",
40
+ smalltalk.method({
41
+ selector: "aliasTemporally:",
42
+ category: 'visiting',
43
+ fn: function (aCollection){
44
+ var self=this;
45
+ var threshold,result;
46
+ return smalltalk.withContext(function($ctx1) {
47
+ threshold=(0);
48
+ $1=aCollection;
49
+ $2=(function(each,i){
50
+ return smalltalk.withContext(function($ctx2) {
51
+ if(smalltalk.assert($3)){
52
+ threshold=i;
53
+ return threshold;
54
+ };
55
+ }, function($ctx2) {$ctx2.fillBlock({each:each,i:i},$ctx1)})});
56
+ _st($1)._withIndexDo_($2);
57
+ result=_st((smalltalk.OrderedCollection || OrderedCollection))._new();
58
+ $4=aCollection;
59
+ $5=(function(each,i){
60
+ return smalltalk.withContext(function($ctx2) {
61
+ $8=_st(i).__lt_eq(threshold);
62
+ if(smalltalk.assert($8)){
63
+ $7=_st(self)._alias_(each);
64
+ } else {
65
+ $7=_st(self)._visit_(each);
66
+ };
67
+ return _st($6)._add_($7);
68
+ }, function($ctx2) {$ctx2.fillBlock({each:each,i:i},$ctx1)})});
69
+ _st($4)._withIndexDo_($5);
70
+ $9=result;
71
+ return $9;
72
+ }, function($ctx1) {$ctx1.fill(self,"aliasTemporally:",{aCollection:aCollection,threshold:threshold,result:result}, smalltalk.IRASTTranslator)})},
73
+ args: ["aCollection"],
74
+ source: "aliasTemporally: aCollection\x0a\x09\x22https://github.com/NicolasPetton/amber/issues/296\x0a \x0a If a node is aliased, all preceding ones are aliased as well.\x0a The tree is iterated twice. First we get the aliasing dependency, \x0a then the aliasing itself is done\x22\x0a\x0a\x09| threshold result |\x0a threshold := 0.\x0a \x0a aCollection withIndexDo: [ :each :i |\x0a each subtreeNeedsAliasing\x0a\x09\x09 ifTrue: [ threshold := i ]].\x0a\x0a\x09result := OrderedCollection new.\x0a\x09aCollection withIndexDo: [ :each :i | \x0a\x09\x09result add: (i <= threshold\x0a\x09\x09\x09ifTrue: [ self alias: each ]\x0a\x09\x09\x09ifFalse: [ self visit: each ])].\x0a\x0a ^result",
75
+ messageSends: ["withIndexDo:", "ifTrue:", "subtreeNeedsAliasing", "new", "add:", "ifTrue:ifFalse:", "alias:", "visit:", "<="],
76
+ referencedClasses: ["OrderedCollection"]
77
+ }),
78
+ smalltalk.IRASTTranslator);
79
+
37
80
  smalltalk.addMethod(
38
81
  "_method",
39
82
  smalltalk.method({
@@ -41,8 +84,10 @@ selector: "method",
41
84
  category: 'accessing',
42
85
  fn: function (){
43
86
  var self=this;
44
- return self["@method"];
45
- },
87
+ return smalltalk.withContext(function($ctx1) {
88
+ $1=self["@method"];
89
+ return $1;
90
+ }, function($ctx1) {$ctx1.fill(self,"method",{}, smalltalk.IRASTTranslator)})},
46
91
  args: [],
47
92
  source: "method\x0a\x09^ method",
48
93
  messageSends: [],
@@ -57,8 +102,8 @@ selector: "method:",
57
102
  category: 'accessing',
58
103
  fn: function (anIRMethod){
59
104
  var self=this;
60
- self["@method"]=anIRMethod;
61
- return self},
105
+ return smalltalk.withContext(function($ctx1) {
106
+ return self}, function($ctx1) {$ctx1.fill(self,"method:",{anIRMethod:anIRMethod}, smalltalk.IRASTTranslator)})},
62
107
  args: ["anIRMethod"],
63
108
  source: "method: anIRMethod\x0a\x09method := anIRMethod",
64
109
  messageSends: [],
@@ -73,17 +118,18 @@ selector: "nextAlias",
73
118
  category: 'accessing',
74
119
  fn: function (){
75
120
  var self=this;
76
- var $1;
77
- if(($receiver = self["@nextAlias"]) == nil || $receiver == undefined){
121
+ return smalltalk.withContext(function($ctx1) {
122
+ $1=self["@nextAlias"];
123
+ if(($receiver = $1) == nil || $receiver == undefined){
78
124
  self["@nextAlias"]=(0);
79
125
  self["@nextAlias"];
80
126
  } else {
81
- self["@nextAlias"];
127
+ $1;
82
128
  };
83
- self["@nextAlias"]=smalltalk.send(self["@nextAlias"],"__plus",[(1)]);
84
- $1=smalltalk.send(self["@nextAlias"],"_asString",[]);
85
- return $1;
86
- },
129
+ self["@nextAlias"]=_st(self["@nextAlias"]).__plus((1));
130
+ $2=_st(self["@nextAlias"])._asString();
131
+ return $2;
132
+ }, function($ctx1) {$ctx1.fill(self,"nextAlias",{}, smalltalk.IRASTTranslator)})},
87
133
  args: [],
88
134
  source: "nextAlias\x0a\x09nextAlias ifNil: [ nextAlias := 0 ].\x0a\x09nextAlias := nextAlias + 1.\x0a\x09^ nextAlias asString",
89
135
  messageSends: ["ifNil:", "+", "asString"],
@@ -98,8 +144,10 @@ selector: "sequence",
98
144
  category: 'accessing',
99
145
  fn: function (){
100
146
  var self=this;
101
- return self["@sequence"];
102
- },
147
+ return smalltalk.withContext(function($ctx1) {
148
+ $1=self["@sequence"];
149
+ return $1;
150
+ }, function($ctx1) {$ctx1.fill(self,"sequence",{}, smalltalk.IRASTTranslator)})},
103
151
  args: [],
104
152
  source: "sequence\x0a\x09^ sequence",
105
153
  messageSends: [],
@@ -114,8 +162,8 @@ selector: "sequence:",
114
162
  category: 'accessing',
115
163
  fn: function (anIRSequence){
116
164
  var self=this;
117
- self["@sequence"]=anIRSequence;
118
- return self},
165
+ return smalltalk.withContext(function($ctx1) {
166
+ return self}, function($ctx1) {$ctx1.fill(self,"sequence:",{anIRSequence:anIRSequence}, smalltalk.IRASTTranslator)})},
119
167
  args: ["anIRSequence"],
120
168
  source: "sequence: anIRSequence\x0a\x09sequence := anIRSequence",
121
169
  messageSends: [],
@@ -130,8 +178,10 @@ selector: "source",
130
178
  category: 'accessing',
131
179
  fn: function (){
132
180
  var self=this;
133
- return self["@source"];
134
- },
181
+ return smalltalk.withContext(function($ctx1) {
182
+ $1=self["@source"];
183
+ return $1;
184
+ }, function($ctx1) {$ctx1.fill(self,"source",{}, smalltalk.IRASTTranslator)})},
135
185
  args: [],
136
186
  source: "source\x0a\x09^ source",
137
187
  messageSends: [],
@@ -146,8 +196,8 @@ selector: "source:",
146
196
  category: 'accessing',
147
197
  fn: function (aString){
148
198
  var self=this;
149
- self["@source"]=aString;
150
- return self},
199
+ return smalltalk.withContext(function($ctx1) {
200
+ return self}, function($ctx1) {$ctx1.fill(self,"source:",{aString:aString}, smalltalk.IRASTTranslator)})},
151
201
  args: ["aString"],
152
202
  source: "source: aString\x0a\x09source := aString",
153
203
  messageSends: [],
@@ -162,8 +212,10 @@ selector: "theClass",
162
212
  category: 'accessing',
163
213
  fn: function (){
164
214
  var self=this;
165
- return self["@theClass"];
166
- },
215
+ return smalltalk.withContext(function($ctx1) {
216
+ $1=self["@theClass"];
217
+ return $1;
218
+ }, function($ctx1) {$ctx1.fill(self,"theClass",{}, smalltalk.IRASTTranslator)})},
167
219
  args: [],
168
220
  source: "theClass\x0a\x09^ theClass",
169
221
  messageSends: [],
@@ -178,8 +230,8 @@ selector: "theClass:",
178
230
  category: 'accessing',
179
231
  fn: function (aClass){
180
232
  var self=this;
181
- self["@theClass"]=aClass;
182
- return self},
233
+ return smalltalk.withContext(function($ctx1) {
234
+ return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass}, smalltalk.IRASTTranslator)})},
183
235
  args: ["aClass"],
184
236
  source: "theClass: aClass\x0a\x09theClass := aClass",
185
237
  messageSends: [],
@@ -194,19 +246,18 @@ selector: "visitAssignmentNode:",
194
246
  category: 'visiting',
195
247
  fn: function (aNode){
196
248
  var self=this;
197
- var $1,$2;
198
- var left;
199
- var right;
200
- var assignment;
201
- right=smalltalk.send(self,"_visit_",[smalltalk.send(aNode,"_right",[])]);
202
- left=smalltalk.send(self,"_visit_",[smalltalk.send(aNode,"_left",[])]);
203
- $1=smalltalk.send((smalltalk.IRAssignment || IRAssignment),"_new",[]);
204
- smalltalk.send($1,"_add_",[left]);
205
- smalltalk.send($1,"_add_",[right]);
206
- $2=smalltalk.send($1,"_yourself",[]);
207
- smalltalk.send(smalltalk.send(self,"_sequence",[]),"_add_",[$2]);
208
- return left;
209
- },
249
+ var left,right,assignment;
250
+ return smalltalk.withContext(function($ctx1) {
251
+ right=_st(self)._visit_(_st(aNode)._right());
252
+ left=_st(self)._visit_(_st(aNode)._left());
253
+ $1=_st((smalltalk.IRAssignment || IRAssignment))._new();
254
+ _st($1)._add_(left);
255
+ _st($1)._add_(right);
256
+ $2=_st($1)._yourself();
257
+ _st(_st(self)._sequence())._add_($2);
258
+ $3=left;
259
+ return $3;
260
+ }, function($ctx1) {$ctx1.fill(self,"visitAssignmentNode:",{aNode:aNode,left:left,right:right,assignment:assignment}, smalltalk.IRASTTranslator)})},
210
261
  args: ["aNode"],
211
262
  source: "visitAssignmentNode: aNode\x0a\x09| left right assignment |\x0a\x09right := self visit: aNode right.\x0a\x09left := self visit: aNode left.\x0a\x09self sequence add: (IRAssignment new \x0a\x09\x09add: left;\x0a\x09\x09add: right;\x0a\x09\x09yourself).\x0a\x09^ left",
212
263
  messageSends: ["visit:", "right", "left", "add:", "new", "yourself", "sequence"],
@@ -221,26 +272,28 @@ selector: "visitBlockNode:",
221
272
  category: 'visiting',
222
273
  fn: function (aNode){
223
274
  var self=this;
224
- var $1,$2,$3,$4;
225
275
  var closure;
226
- $1=smalltalk.send((smalltalk.IRClosure || IRClosure),"_new",[]);
227
- smalltalk.send($1,"_arguments_",[smalltalk.send(aNode,"_parameters",[])]);
228
- smalltalk.send($1,"_scope_",[smalltalk.send(aNode,"_scope",[])]);
229
- $2=smalltalk.send($1,"_yourself",[]);
276
+ return smalltalk.withContext(function($ctx1) {
277
+ $1=_st((smalltalk.IRClosure || IRClosure))._new();
278
+ _st($1)._arguments_(_st(aNode)._parameters());
279
+ _st($1)._scope_(_st(aNode)._scope());
280
+ $2=_st($1)._yourself();
230
281
  closure=$2;
231
- smalltalk.send(smalltalk.send(smalltalk.send(aNode,"_scope",[]),"_temps",[]),"_do_",[(function(each){
232
- $3=smalltalk.send((smalltalk.IRTempDeclaration || IRTempDeclaration),"_new",[]);
233
- smalltalk.send($3,"_name_",[smalltalk.send(each,"_name",[])]);
234
- $4=smalltalk.send($3,"_yourself",[]);
235
- return smalltalk.send(closure,"_add_",[$4]);
236
- })]);
237
- smalltalk.send(smalltalk.send(aNode,"_nodes",[]),"_do_",[(function(each){
238
- return smalltalk.send(closure,"_add_",[smalltalk.send(self,"_visit_",[each])]);
239
- })]);
240
- return closure;
241
- },
282
+ _st(_st(_st(aNode)._scope())._temps())._do_((function(each){
283
+ return smalltalk.withContext(function($ctx2) {
284
+ _st($3)._name_(_st(each)._name());
285
+ _st($3)._scope_(_st(aNode)._scope());
286
+ $4=_st($3)._yourself();
287
+ return _st(closure)._add_($4);
288
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
289
+ _st(_st(aNode)._nodes())._do_((function(each){
290
+ return smalltalk.withContext(function($ctx2) {
291
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
292
+ $5=closure;
293
+ return $5;
294
+ }, function($ctx1) {$ctx1.fill(self,"visitBlockNode:",{aNode:aNode,closure:closure}, smalltalk.IRASTTranslator)})},
242
295
  args: ["aNode"],
243
- source: "visitBlockNode: aNode\x0a\x09| closure |\x0a\x09closure := IRClosure new\x0a\x09\x09arguments: aNode parameters;\x0a\x09\x09scope: aNode scope;\x0a\x09\x09yourself.\x0a\x09aNode scope temps do: [ :each |\x0a\x09\x09closure add: (IRTempDeclaration new \x0a\x09\x09\x09name: each name;\x0a\x09\x09\x09yourself) ].\x0a\x09aNode nodes do: [ :each | closure add: (self visit: each) ].\x0a\x09^ closure",
296
+ source: "visitBlockNode: aNode\x0a\x09| closure |\x0a\x09closure := IRClosure new\x0a\x09\x09arguments: aNode parameters;\x0a\x09\x09scope: aNode scope;\x0a\x09\x09yourself.\x0a\x09aNode scope temps do: [ :each |\x0a\x09\x09closure add: (IRTempDeclaration new \x0a\x09\x09\x09name: each name;\x0a scope: aNode scope;\x0a\x09\x09\x09yourself) ].\x0a\x09aNode nodes do: [ :each | closure add: (self visit: each) ].\x0a\x09^ closure",
244
297
  messageSends: ["arguments:", "parameters", "new", "scope:", "scope", "yourself", "do:", "add:", "name:", "name", "temps", "visit:", "nodes"],
245
298
  referencedClasses: ["IRClosure", "IRTempDeclaration"]
246
299
  }),
@@ -253,25 +306,30 @@ selector: "visitBlockSequenceNode:",
253
306
  category: 'visiting',
254
307
  fn: function (aNode){
255
308
  var self=this;
256
- var $2,$3,$4,$1;
257
- $1=smalltalk.send(self,"_withSequence_do_",[smalltalk.send((smalltalk.IRBlockSequence || IRBlockSequence),"_new",[]),(function(){
258
- return smalltalk.send(smalltalk.send(aNode,"_nodes",[]),"_ifNotEmpty_",[(function(){
259
- smalltalk.send(smalltalk.send(smalltalk.send(aNode,"_nodes",[]),"_allButLast",[]),"_do_",[(function(each){
260
- return smalltalk.send(smalltalk.send(self,"_sequence",[]),"_add_",[smalltalk.send(self,"_visit_",[each])]);
261
- })]);
262
- $2=smalltalk.send(smalltalk.send(smalltalk.send(aNode,"_nodes",[]),"_last",[]),"_isReturnNode",[]);
263
- if(smalltalk.assert($2)){
264
- return smalltalk.send(smalltalk.send(self,"_sequence",[]),"_add_",[smalltalk.send(self,"_visit_",[smalltalk.send(smalltalk.send(aNode,"_nodes",[]),"_last",[])])]);
309
+ return smalltalk.withContext(function($ctx1) {
310
+ $2=self;
311
+ $3=_st((smalltalk.IRBlockSequence || IRBlockSequence))._new();
312
+ $4=(function(){
313
+ return smalltalk.withContext(function($ctx2) {
314
+ $6=(function(){
315
+ return smalltalk.withContext(function($ctx3) {
316
+ return smalltalk.withContext(function($ctx4) {
317
+ }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx1)})}));
318
+ $7=_st(_st(_st(aNode)._nodes())._last())._isReturnNode();
319
+ if(smalltalk.assert($7)){
320
+ return _st(_st(self)._sequence())._add_(_st(self)._visit_(_st(_st(aNode)._nodes())._last()));
265
321
  } else {
266
- $3=smalltalk.send((smalltalk.IRBlockReturn || IRBlockReturn),"_new",[]);
267
- smalltalk.send($3,"_add_",[smalltalk.send(self,"_visit_",[smalltalk.send(smalltalk.send(aNode,"_nodes",[]),"_last",[])])]);
268
- $4=smalltalk.send($3,"_yourself",[]);
269
- return smalltalk.send(smalltalk.send(self,"_sequence",[]),"_add_",[$4]);
322
+ $8=_st((smalltalk.IRBlockReturn || IRBlockReturn))._new();
323
+ _st($8)._add_(_st(self)._visit_(_st(_st(aNode)._nodes())._last()));
324
+ $9=_st($8)._yourself();
325
+ return _st(_st(self)._sequence())._add_($9);
270
326
  };
271
- })]);
272
- })]);
327
+ }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})});
328
+ return _st($5)._ifNotEmpty_($6);
329
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
330
+ $1=_st($2)._withSequence_do_($3,$4);
273
331
  return $1;
274
- },
332
+ }, function($ctx1) {$ctx1.fill(self,"visitBlockSequenceNode:",{aNode:aNode}, smalltalk.IRASTTranslator)})},
275
333
  args: ["aNode"],
276
334
  source: "visitBlockSequenceNode: aNode\x0a\x09^ self\x0a\x09\x09withSequence: IRBlockSequence new\x0a\x09\x09do: [ \x0a\x09\x09\x09aNode nodes ifNotEmpty: [\x0a\x09\x09\x09\x09aNode nodes allButLast do: [ :each | \x0a\x09\x09\x09\x09\x09self sequence add: (self visit: each) ].\x0a\x09\x09\x09\x09aNode nodes last isReturnNode \x0a\x09\x09\x09\x09\x09ifFalse: [ self sequence add: (IRBlockReturn new add: (self visit: aNode nodes last); yourself) ]\x0a\x09\x09\x09\x09\x09ifTrue: [ self sequence add: (self visit: aNode nodes last) ]]]",
277
335
  messageSends: ["withSequence:do:", "new", "ifNotEmpty:", "do:", "add:", "visit:", "sequence", "allButLast", "nodes", "ifFalse:ifTrue:", "last", "yourself", "isReturnNode"],
@@ -286,25 +344,25 @@ selector: "visitCascadeNode:",
286
344
  category: 'visiting',
287
345
  fn: function (aNode){
288
346
  var self=this;
289
- var $1,$2;
290
347
  var alias;
291
- $1=smalltalk.send(smalltalk.send(aNode,"_receiver",[]),"_isValueNode",[]);
348
+ return smalltalk.withContext(function($ctx1) {
349
+ $1=_st(_st(aNode)._receiver())._isImmutable();
292
350
  if(! smalltalk.assert($1)){
293
- alias=smalltalk.send(self,"_alias_",[smalltalk.send(aNode,"_receiver",[])]);
351
+ alias=_st(self)._alias_(_st(aNode)._receiver());
294
352
  alias;
295
- smalltalk.send(smalltalk.send(aNode,"_nodes",[]),"_do_",[(function(each){
296
- return smalltalk.send(each,"_receiver_",[smalltalk.send(smalltalk.send((smalltalk.VariableNode || VariableNode),"_new",[]),"_binding_",[smalltalk.send(alias,"_variable",[])])]);
297
- })]);
353
+ _st(_st(aNode)._nodes())._do_((function(each){
354
+ return smalltalk.withContext(function($ctx2) {
355
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
298
356
  };
299
- smalltalk.send(smalltalk.send(smalltalk.send(aNode,"_nodes",[]),"_allButLast",[]),"_do_",[(function(each){
300
- return smalltalk.send(smalltalk.send(self,"_sequence",[]),"_add_",[smalltalk.send(self,"_visit_",[each])]);
301
- })]);
302
- $2=smalltalk.send(self,"_alias_",[smalltalk.send(smalltalk.send(aNode,"_nodes",[]),"_last",[])]);
357
+ _st(_st(_st(aNode)._nodes())._allButLast())._do_((function(each){
358
+ return smalltalk.withContext(function($ctx2) {
359
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
360
+ $2=_st(self)._alias_(_st(_st(aNode)._nodes())._last());
303
361
  return $2;
304
- },
362
+ }, function($ctx1) {$ctx1.fill(self,"visitCascadeNode:",{aNode:aNode,alias:alias}, smalltalk.IRASTTranslator)})},
305
363
  args: ["aNode"],
306
- source: "visitCascadeNode: aNode\x0a\x09| alias |\x0a\x0a\x09aNode receiver isValueNode ifFalse: [ \x0a\x09\x09alias := self alias: aNode receiver.\x0a\x09\x09aNode nodes do: [ :each |\x0a\x09\x09\x09each receiver: (VariableNode new binding: alias variable) ]].\x0a\x0a\x09aNode nodes allButLast do: [ :each |\x0a\x09\x09self sequence add: (self visit: each) ].\x0a\x0a\x09^ self alias: aNode nodes last",
307
- messageSends: ["ifFalse:", "alias:", "receiver", "do:", "receiver:", "binding:", "variable", "new", "nodes", "isValueNode", "add:", "visit:", "sequence", "allButLast", "last"],
364
+ source: "visitCascadeNode: aNode\x0a\x09| alias |\x0a\x0a\x09aNode receiver isImmutable ifFalse: [ \x0a\x09\x09alias := self alias: aNode receiver.\x0a\x09\x09aNode nodes do: [ :each |\x0a\x09\x09\x09each receiver: (VariableNode new binding: alias variable) ]].\x0a\x0a\x09aNode nodes allButLast do: [ :each |\x0a\x09\x09self sequence add: (self visit: each) ].\x0a\x0a\x09^ self alias: aNode nodes last",
365
+ messageSends: ["ifFalse:", "alias:", "receiver", "do:", "receiver:", "binding:", "variable", "new", "nodes", "isImmutable", "add:", "visit:", "sequence", "allButLast", "last"],
308
366
  referencedClasses: ["VariableNode"]
309
367
  }),
310
368
  smalltalk.IRASTTranslator);
@@ -317,15 +375,17 @@ category: 'visiting',
317
375
  fn: function (aNode){
318
376
  var self=this;
319
377
  var array;
320
- array=smalltalk.send((smalltalk.IRDynamicArray || IRDynamicArray),"_new",[]);
321
- smalltalk.send(smalltalk.send(aNode,"_nodes",[]),"_do_",[(function(each){
322
- return smalltalk.send(array,"_add_",[smalltalk.send(self,"_visit_",[each])]);
323
- })]);
324
- return array;
325
- },
378
+ return smalltalk.withContext(function($ctx1) {
379
+ array=_st((smalltalk.IRDynamicArray || IRDynamicArray))._new();
380
+ _st(_st(self)._aliasTemporally_(_st(aNode)._nodes()))._do_((function(each){
381
+ return smalltalk.withContext(function($ctx2) {
382
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
383
+ $1=array;
384
+ return $1;
385
+ }, function($ctx1) {$ctx1.fill(self,"visitDynamicArrayNode:",{aNode:aNode,array:array}, smalltalk.IRASTTranslator)})},
326
386
  args: ["aNode"],
327
- source: "visitDynamicArrayNode: aNode\x0a\x09| array |\x0a\x09array := IRDynamicArray new.\x0a\x09aNode nodes do: [ :each | array add: (self visit: each) ].\x0a\x09^ array",
328
- messageSends: ["new", "do:", "add:", "visit:", "nodes"],
387
+ source: "visitDynamicArrayNode: aNode\x0a\x09| array |\x0a\x09array := IRDynamicArray new.\x0a\x09(self aliasTemporally: aNode nodes) do: [:each | array add: each].\x0a\x09^ array",
388
+ messageSends: ["new", "do:", "add:", "aliasTemporally:", "nodes"],
329
389
  referencedClasses: ["IRDynamicArray"]
330
390
  }),
331
391
  smalltalk.IRASTTranslator);
@@ -338,15 +398,17 @@ category: 'visiting',
338
398
  fn: function (aNode){
339
399
  var self=this;
340
400
  var dictionary;
341
- dictionary=smalltalk.send((smalltalk.IRDynamicDictionary || IRDynamicDictionary),"_new",[]);
342
- smalltalk.send(smalltalk.send(aNode,"_nodes",[]),"_do_",[(function(each){
343
- return smalltalk.send(dictionary,"_add_",[smalltalk.send(self,"_visit_",[each])]);
344
- })]);
345
- return dictionary;
346
- },
401
+ return smalltalk.withContext(function($ctx1) {
402
+ dictionary=_st((smalltalk.IRDynamicDictionary || IRDynamicDictionary))._new();
403
+ _st(_st(self)._aliasTemporally_(_st(aNode)._nodes()))._do_((function(each){
404
+ return smalltalk.withContext(function($ctx2) {
405
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
406
+ $1=dictionary;
407
+ return $1;
408
+ }, function($ctx1) {$ctx1.fill(self,"visitDynamicDictionaryNode:",{aNode:aNode,dictionary:dictionary}, smalltalk.IRASTTranslator)})},
347
409
  args: ["aNode"],
348
- source: "visitDynamicDictionaryNode: aNode\x0a\x09| dictionary |\x0a\x09dictionary := IRDynamicDictionary new.\x0a\x09aNode nodes do: [ :each | dictionary add: (self visit: each) ].\x0a\x09^ dictionary",
349
- messageSends: ["new", "do:", "add:", "visit:", "nodes"],
410
+ source: "visitDynamicDictionaryNode: aNode\x0a\x09| dictionary |\x0a\x09dictionary := IRDynamicDictionary new.\x0a (self aliasTemporally: aNode nodes) do: [:each | dictionary add: each].\x0a\x09^ dictionary",
411
+ messageSends: ["new", "do:", "add:", "aliasTemporally:", "nodes"],
350
412
  referencedClasses: ["IRDynamicDictionary"]
351
413
  }),
352
414
  smalltalk.IRASTTranslator);
@@ -358,13 +420,13 @@ selector: "visitJSStatementNode:",
358
420
  category: 'visiting',
359
421
  fn: function (aNode){
360
422
  var self=this;
361
- var $2,$3,$1;
362
- $2=smalltalk.send((smalltalk.IRVerbatim || IRVerbatim),"_new",[]);
363
- smalltalk.send($2,"_source_",[smalltalk.send(aNode,"_source",[])]);
364
- $3=smalltalk.send($2,"_yourself",[]);
423
+ return smalltalk.withContext(function($ctx1) {
424
+ $2=_st((smalltalk.IRVerbatim || IRVerbatim))._new();
425
+ _st($2)._source_(_st(aNode)._source());
426
+ $3=_st($2)._yourself();
365
427
  $1=$3;
366
428
  return $1;
367
- },
429
+ }, function($ctx1) {$ctx1.fill(self,"visitJSStatementNode:",{aNode:aNode}, smalltalk.IRASTTranslator)})},
368
430
  args: ["aNode"],
369
431
  source: "visitJSStatementNode: aNode\x0a\x09^ IRVerbatim new\x0a\x09\x09source: aNode source;\x0a\x09\x09yourself",
370
432
  messageSends: ["source:", "source", "new", "yourself"],
@@ -379,38 +441,41 @@ selector: "visitMethodNode:",
379
441
  category: 'visiting',
380
442
  fn: function (aNode){
381
443
  var self=this;
382
- var $1,$2,$3,$4,$5,$6,$7,$8;
383
- $1=smalltalk.send((smalltalk.IRMethod || IRMethod),"_new",[]);
384
- smalltalk.send($1,"_source_",[smalltalk.send(self,"_source",[])]);
385
- smalltalk.send($1,"_arguments_",[smalltalk.send(aNode,"_arguments",[])]);
386
- smalltalk.send($1,"_selector_",[smalltalk.send(aNode,"_selector",[])]);
387
- smalltalk.send($1,"_messageSends_",[smalltalk.send(aNode,"_messageSends",[])]);
388
- smalltalk.send($1,"_classReferences_",[smalltalk.send(aNode,"_classReferences",[])]);
389
- smalltalk.send($1,"_scope_",[smalltalk.send(aNode,"_scope",[])]);
390
- $2=smalltalk.send($1,"_yourself",[]);
391
- smalltalk.send(self,"_method_",[$2]);
392
- smalltalk.send(smalltalk.send(smalltalk.send(aNode,"_scope",[]),"_temps",[]),"_do_",[(function(each){
393
- $3=smalltalk.send((smalltalk.IRTempDeclaration || IRTempDeclaration),"_new",[]);
394
- smalltalk.send($3,"_name_",[smalltalk.send(each,"_name",[])]);
395
- $4=smalltalk.send($3,"_yourself",[]);
396
- return smalltalk.send(smalltalk.send(self,"_method",[]),"_add_",[$4]);
397
- })]);
398
- smalltalk.send(smalltalk.send(aNode,"_nodes",[]),"_do_",[(function(each){
399
- return smalltalk.send(smalltalk.send(self,"_method",[]),"_add_",[smalltalk.send(self,"_visit_",[each])]);
400
- })]);
401
- $5=smalltalk.send(smalltalk.send(aNode,"_scope",[]),"_hasLocalReturn",[]);
444
+ return smalltalk.withContext(function($ctx1) {
445
+ $1=_st((smalltalk.IRMethod || IRMethod))._new();
446
+ _st($1)._source_(_st(self)._source());
447
+ _st($1)._theClass_(_st(self)._theClass());
448
+ _st($1)._arguments_(_st(aNode)._arguments());
449
+ _st($1)._selector_(_st(aNode)._selector());
450
+ _st($1)._messageSends_(_st(aNode)._messageSends());
451
+ _st($1)._superSends_(_st(aNode)._superSends());
452
+ _st($1)._classReferences_(_st(aNode)._classReferences());
453
+ _st($1)._scope_(_st(aNode)._scope());
454
+ $2=_st($1)._yourself();
455
+ _st(self)._method_($2);
456
+ _st(_st(_st(aNode)._scope())._temps())._do_((function(each){
457
+ return smalltalk.withContext(function($ctx2) {
458
+ _st($3)._name_(_st(each)._name());
459
+ _st($3)._scope_(_st(aNode)._scope());
460
+ $4=_st($3)._yourself();
461
+ return _st(_st(self)._method())._add_($4);
462
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
463
+ _st(_st(aNode)._nodes())._do_((function(each){
464
+ return smalltalk.withContext(function($ctx2) {
465
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
466
+ $5=_st(_st(aNode)._scope())._hasLocalReturn();
402
467
  if(! smalltalk.assert($5)){
403
- $6=smalltalk.send((smalltalk.IRVariable || IRVariable),"_new",[]);
404
- smalltalk.send($6,"_variable_",[smalltalk.send(smalltalk.send(smalltalk.send(aNode,"_scope",[]),"_pseudoVars",[]),"_at_",["self"])]);
405
- $7=smalltalk.send($6,"_yourself",[]);
406
- smalltalk.send(smalltalk.send(smalltalk.send(self,"_method",[]),"_add_",[smalltalk.send((smalltalk.IRReturn || IRReturn),"_new",[])]),"_add_",[$7]);
468
+ $6=_st((smalltalk.IRVariable || IRVariable))._new();
469
+ _st($6)._variable_(_st(_st(_st(aNode)._scope())._pseudoVars())._at_("self"));
470
+ $7=_st($6)._yourself();
471
+ _st(_st(_st(self)._method())._add_(_st((smalltalk.IRReturn || IRReturn))._new()))._add_($7);
407
472
  };
408
- $8=smalltalk.send(self,"_method",[]);
473
+ $8=_st(self)._method();
409
474
  return $8;
410
- },
475
+ }, function($ctx1) {$ctx1.fill(self,"visitMethodNode:",{aNode:aNode}, smalltalk.IRASTTranslator)})},
411
476
  args: ["aNode"],
412
- source: "visitMethodNode: aNode\x0a\x0a\x09self method: (IRMethod new\x0a\x09\x09source: self source;\x0a\x09\x09arguments: aNode arguments;\x0a\x09\x09selector: aNode selector;\x0a\x09\x09messageSends: aNode messageSends;\x0a\x09\x09classReferences: aNode classReferences;\x0a\x09\x09scope: aNode scope;\x0a\x09\x09yourself).\x0a\x0a\x09aNode scope temps do: [ :each |\x0a\x09\x09self method add: (IRTempDeclaration new\x0a\x09\x09\x09name: each name;\x0a\x09\x09\x09yourself) ].\x0a\x0a\x09aNode nodes do: [ :each | self method add: (self visit: each) ].\x0a\x0a\x09aNode scope hasLocalReturn ifFalse: [\x0a\x09\x09(self method add: IRReturn new) add: (IRVariable new\x0a\x09\x09\x09variable: (aNode scope pseudoVars at: 'self');\x0a\x09\x09\x09yourself) ].\x0a\x0a\x09^ self method",
413
- messageSends: ["method:", "source:", "source", "new", "arguments:", "arguments", "selector:", "selector", "messageSends:", "messageSends", "classReferences:", "classReferences", "scope:", "scope", "yourself", "do:", "add:", "name:", "name", "method", "temps", "visit:", "nodes", "ifFalse:", "variable:", "at:", "pseudoVars", "hasLocalReturn"],
477
+ source: "visitMethodNode: aNode\x0a\x0a\x09self method: (IRMethod new\x0a\x09\x09source: self source;\x0a theClass: self theClass;\x0a\x09\x09arguments: aNode arguments;\x0a\x09\x09selector: aNode selector;\x0a\x09\x09messageSends: aNode messageSends;\x0a superSends: aNode superSends;\x0a\x09\x09classReferences: aNode classReferences;\x0a\x09\x09scope: aNode scope;\x0a\x09\x09yourself).\x0a\x0a\x09aNode scope temps do: [ :each |\x0a\x09\x09self method add: (IRTempDeclaration new\x0a\x09\x09\x09name: each name;\x0a scope: aNode scope;\x0a\x09\x09\x09yourself) ].\x0a\x0a\x09aNode nodes do: [ :each | self method add: (self visit: each) ].\x0a\x0a\x09aNode scope hasLocalReturn ifFalse: [\x0a\x09\x09(self method add: IRReturn new) add: (IRVariable new\x0a\x09\x09\x09variable: (aNode scope pseudoVars at: 'self');\x0a\x09\x09\x09yourself) ].\x0a\x0a\x09^ self method",
478
+ messageSends: ["method:", "source:", "source", "new", "theClass:", "theClass", "arguments:", "arguments", "selector:", "selector", "messageSends:", "messageSends", "superSends:", "superSends", "classReferences:", "classReferences", "scope:", "scope", "yourself", "do:", "add:", "name:", "name", "method", "temps", "visit:", "nodes", "ifFalse:", "variable:", "at:", "pseudoVars", "hasLocalReturn"],
414
479
  referencedClasses: ["IRMethod", "IRTempDeclaration", "IRVariable", "IRReturn"]
415
480
  }),
416
481
  smalltalk.IRASTTranslator);
@@ -422,20 +487,21 @@ selector: "visitReturnNode:",
422
487
  category: 'visiting',
423
488
  fn: function (aNode){
424
489
  var self=this;
425
- var $1;
426
490
  var return_;
427
- $1=smalltalk.send(aNode,"_nonLocalReturn",[]);
491
+ return smalltalk.withContext(function($ctx1) {
492
+ $1=_st(aNode)._nonLocalReturn();
428
493
  if(smalltalk.assert($1)){
429
- return_=smalltalk.send((smalltalk.IRNonLocalReturn || IRNonLocalReturn),"_new",[]);
494
+ return_=_st((smalltalk.IRNonLocalReturn || IRNonLocalReturn))._new();
430
495
  } else {
431
- return_=smalltalk.send((smalltalk.IRReturn || IRReturn),"_new",[]);
496
+ return_=_st((smalltalk.IRReturn || IRReturn))._new();
432
497
  };
433
- smalltalk.send(return_,"_scope_",[smalltalk.send(aNode,"_scope",[])]);
434
- smalltalk.send(smalltalk.send(aNode,"_nodes",[]),"_do_",[(function(each){
435
- return smalltalk.send(return_,"_add_",[smalltalk.send(self,"_alias_",[each])]);
436
- })]);
437
- return return_;
438
- },
498
+ _st(return_)._scope_(_st(aNode)._scope());
499
+ _st(_st(aNode)._nodes())._do_((function(each){
500
+ return smalltalk.withContext(function($ctx2) {
501
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
502
+ $2=return_;
503
+ return $2;
504
+ }, function($ctx1) {$ctx1.fill(self,"visitReturnNode:",{aNode:aNode,return_:return_}, smalltalk.IRASTTranslator)})},
439
505
  args: ["aNode"],
440
506
  source: "visitReturnNode: aNode\x0a\x09| return |\x0a\x09return := aNode nonLocalReturn \x0a\x09\x09ifTrue: [ IRNonLocalReturn new ]\x0a\x09\x09ifFalse: [ IRReturn new ].\x0a\x09return scope: aNode scope.\x0a\x09aNode nodes do: [ :each |\x0a\x09\x09return add: (self alias: each) ].\x0a\x09^ return",
441
507
  messageSends: ["ifTrue:ifFalse:", "new", "nonLocalReturn", "scope:", "scope", "do:", "add:", "alias:", "nodes"],
@@ -450,42 +516,29 @@ selector: "visitSendNode:",
450
516
  category: 'visiting',
451
517
  fn: function (aNode){
452
518
  var self=this;
453
- var $1,$2,$3,$4;
454
- var send;
455
- var receiver;
456
- var arguments;
457
- send=smalltalk.send((smalltalk.IRSend || IRSend),"_new",[]);
458
- smalltalk.send(send,"_selector_",[smalltalk.send(aNode,"_selector",[])]);
459
- $1=smalltalk.send(send,"_index_",[smalltalk.send(aNode,"_index",[])]);
460
- $2=smalltalk.send(aNode,"_superSend",[]);
461
- if(smalltalk.assert($2)){
462
- smalltalk.send(send,"_classSend_",[smalltalk.send(smalltalk.send(self,"_theClass",[]),"_superclass",[])]);
463
- };
464
- $3=smalltalk.send(smalltalk.send(smalltalk.send(aNode,"_receiver",[]),"_shouldBeInlined",[]),"_or_",[(function(){
465
- return smalltalk.send(smalltalk.send(aNode,"_receiver",[]),"_shouldBeAliased",[]);
466
- })]);
519
+ var send,all,receiver,arguments;
520
+ return smalltalk.withContext(function($ctx1) {
521
+ send=_st((smalltalk.IRSend || IRSend))._new();
522
+ $1=send;
523
+ _st($1)._selector_(_st(aNode)._selector());
524
+ $2=_st($1)._index_(_st(aNode)._index());
525
+ $3=_st(aNode)._superSend();
467
526
  if(smalltalk.assert($3)){
468
- receiver=smalltalk.send(self,"_alias_",[smalltalk.send(aNode,"_receiver",[])]);
469
- } else {
470
- receiver=smalltalk.send(self,"_visit_",[smalltalk.send(aNode,"_receiver",[])]);
471
- };
472
- arguments=smalltalk.send(smalltalk.send(aNode,"_arguments",[]),"_collect_",[(function(each){
473
- $4=smalltalk.send(each,"_shouldBeInlined",[]);
474
- if(smalltalk.assert($4)){
475
- return smalltalk.send(self,"_alias_",[each]);
476
- } else {
477
- return smalltalk.send(self,"_visit_",[each]);
527
+ _st(send)._classSend_(_st(_st(self)._theClass())._superclass());
478
528
  };
479
- })]);
480
- smalltalk.send(send,"_add_",[receiver]);
481
- smalltalk.send(arguments,"_do_",[(function(each){
482
- return smalltalk.send(send,"_add_",[each]);
483
- })]);
484
- return send;
485
- },
529
+ all=_st(self)._aliasTemporally_(_st([_st(aNode)._receiver()]).__comma(_st(aNode)._arguments()));
530
+ receiver=_st(all)._first();
531
+ arguments=_st(all)._allButFirst();
532
+ _st(send)._add_(receiver);
533
+ _st(arguments)._do_((function(each){
534
+ return smalltalk.withContext(function($ctx2) {
535
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
536
+ $4=send;
537
+ return $4;
538
+ }, function($ctx1) {$ctx1.fill(self,"visitSendNode:",{aNode:aNode,send:send,all:all,receiver:receiver,arguments:arguments}, smalltalk.IRASTTranslator)})},
486
539
  args: ["aNode"],
487
- source: "visitSendNode: aNode\x0a\x09| send receiver arguments |\x0a\x09send := IRSend new.\x0a\x09send \x0a\x09\x09selector: aNode selector;\x0a\x09\x09index: aNode index.\x0a\x09aNode superSend ifTrue: [ send classSend: self theClass superclass ].\x0a\x0a\x09receiver := (aNode receiver shouldBeInlined or: [ aNode receiver shouldBeAliased ])\x0a\x09\x09ifTrue: [ self alias: aNode receiver ]\x0a\x09\x09ifFalse: [ self visit: aNode receiver ].\x0a\x0a\x09arguments := aNode arguments collect: [ :each | \x0a\x09\x09each shouldBeInlined\x0a\x09\x09\x09ifTrue: [ self alias: each ]\x0a\x09\x09\x09ifFalse: [ self visit: each ]].\x0a\x0a\x09send add: receiver.\x0a\x09arguments do: [ :each | send add: each ].\x0a\x0a\x09^ send",
488
- messageSends: ["new", "selector:", "selector", "index:", "index", "ifTrue:", "classSend:", "superclass", "theClass", "superSend", "ifTrue:ifFalse:", "alias:", "receiver", "visit:", "or:", "shouldBeAliased", "shouldBeInlined", "collect:", "arguments", "add:", "do:"],
540
+ source: "visitSendNode: aNode\x0a\x09| send all receiver arguments |\x0a\x09send := IRSend new.\x0a\x09send \x0a\x09\x09selector: aNode selector;\x0a\x09\x09index: aNode index.\x0a\x09aNode superSend ifTrue: [ send classSend: self theClass superclass ].\x0a \x0a all := self aliasTemporally: { aNode receiver }, aNode arguments.\x0a\x09receiver := all first.\x0a\x09arguments := all allButFirst.\x0a\x0a\x09send add: receiver.\x0a\x09arguments do: [ :each | send add: each ].\x0a\x0a\x09^ send",
541
+ messageSends: ["new", "selector:", "selector", "index:", "index", "ifTrue:", "classSend:", "superclass", "theClass", "superSend", "aliasTemporally:", ",", "arguments", "receiver", "first", "allButFirst", "add:", "do:"],
489
542
  referencedClasses: ["IRSend"]
490
543
  }),
491
544
  smalltalk.IRASTTranslator);
@@ -497,20 +550,25 @@ selector: "visitSequenceNode:",
497
550
  category: 'visiting',
498
551
  fn: function (aNode){
499
552
  var self=this;
500
- var $2,$1;
501
- $1=smalltalk.send(self,"_withSequence_do_",[smalltalk.send((smalltalk.IRSequence || IRSequence),"_new",[]),(function(){
502
- return smalltalk.send(smalltalk.send(aNode,"_nodes",[]),"_do_",[(function(each){
553
+ return smalltalk.withContext(function($ctx1) {
554
+ $2=self;
555
+ $3=_st((smalltalk.IRSequence || IRSequence))._new();
556
+ $4=(function(){
557
+ return smalltalk.withContext(function($ctx2) {
558
+ $6=(function(each){
503
559
  var instruction;
504
- instruction=smalltalk.send(self,"_visit_",[each]);
560
+ return smalltalk.withContext(function($ctx3) {
505
561
  instruction;
506
- $2=smalltalk.send(instruction,"_isVariable",[]);
507
- if(! smalltalk.assert($2)){
508
- return smalltalk.send(smalltalk.send(self,"_sequence",[]),"_add_",[instruction]);
562
+ $7=_st(instruction)._isVariable();
563
+ if(! smalltalk.assert($7)){
564
+ return _st(_st(self)._sequence())._add_(instruction);
509
565
  };
510
- })]);
511
- })]);
566
+ }, function($ctx3) {$ctx3.fillBlock({each:each,instruction:instruction},$ctx1)})});
567
+ return _st($5)._do_($6);
568
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
569
+ $1=_st($2)._withSequence_do_($3,$4);
512
570
  return $1;
513
- },
571
+ }, function($ctx1) {$ctx1.fill(self,"visitSequenceNode:",{aNode:aNode}, smalltalk.IRASTTranslator)})},
514
572
  args: ["aNode"],
515
573
  source: "visitSequenceNode: aNode\x0a\x09^ self \x0a\x09\x09withSequence: IRSequence new \x09\x0a\x09\x09do: [\x0a\x09\x09\x09aNode nodes do: [ :each | | instruction |\x0a\x09\x09\x09\x09instruction := self visit: each.\x0a\x09\x09\x09\x09instruction isVariable ifFalse: [\x0a\x09\x09\x09\x09\x09self sequence add: instruction ]]]",
516
574
  messageSends: ["withSequence:do:", "new", "do:", "visit:", "ifFalse:", "add:", "sequence", "isVariable", "nodes"],
@@ -525,13 +583,13 @@ selector: "visitValueNode:",
525
583
  category: 'visiting',
526
584
  fn: function (aNode){
527
585
  var self=this;
528
- var $2,$3,$1;
529
- $2=smalltalk.send((smalltalk.IRValue || IRValue),"_new",[]);
530
- smalltalk.send($2,"_value_",[smalltalk.send(aNode,"_value",[])]);
531
- $3=smalltalk.send($2,"_yourself",[]);
586
+ return smalltalk.withContext(function($ctx1) {
587
+ $2=_st((smalltalk.IRValue || IRValue))._new();
588
+ _st($2)._value_(_st(aNode)._value());
589
+ $3=_st($2)._yourself();
532
590
  $1=$3;
533
591
  return $1;
534
- },
592
+ }, function($ctx1) {$ctx1.fill(self,"visitValueNode:",{aNode:aNode}, smalltalk.IRASTTranslator)})},
535
593
  args: ["aNode"],
536
594
  source: "visitValueNode: aNode\x0a\x09^ IRValue new \x0a\x09\x09value: aNode value; \x0a\x09\x09yourself",
537
595
  messageSends: ["value:", "value", "new", "yourself"],
@@ -546,13 +604,13 @@ selector: "visitVariableNode:",
546
604
  category: 'visiting',
547
605
  fn: function (aNode){
548
606
  var self=this;
549
- var $2,$3,$1;
550
- $2=smalltalk.send((smalltalk.IRVariable || IRVariable),"_new",[]);
551
- smalltalk.send($2,"_variable_",[smalltalk.send(aNode,"_binding",[])]);
552
- $3=smalltalk.send($2,"_yourself",[]);
607
+ return smalltalk.withContext(function($ctx1) {
608
+ $2=_st((smalltalk.IRVariable || IRVariable))._new();
609
+ _st($2)._variable_(_st(aNode)._binding());
610
+ $3=_st($2)._yourself();
553
611
  $1=$3;
554
612
  return $1;
555
- },
613
+ }, function($ctx1) {$ctx1.fill(self,"visitVariableNode:",{aNode:aNode}, smalltalk.IRASTTranslator)})},
556
614
  args: ["aNode"],
557
615
  source: "visitVariableNode: aNode\x0a\x09^ IRVariable new \x0a\x09\x09variable: aNode binding; \x0a\x09\x09yourself",
558
616
  messageSends: ["variable:", "binding", "new", "yourself"],
@@ -568,12 +626,14 @@ category: 'accessing',
568
626
  fn: function (aSequence,aBlock){
569
627
  var self=this;
570
628
  var outerSequence;
571
- outerSequence=smalltalk.send(self,"_sequence",[]);
572
- smalltalk.send(self,"_sequence_",[aSequence]);
573
- smalltalk.send(aBlock,"_value",[]);
574
- smalltalk.send(self,"_sequence_",[outerSequence]);
575
- return aSequence;
576
- },
629
+ return smalltalk.withContext(function($ctx1) {
630
+ outerSequence=_st(self)._sequence();
631
+ _st(self)._sequence_(aSequence);
632
+ _st(aBlock)._value();
633
+ _st(self)._sequence_(outerSequence);
634
+ $1=aSequence;
635
+ return $1;
636
+ }, function($ctx1) {$ctx1.fill(self,"withSequence:do:",{aSequence:aSequence,aBlock:aBlock,outerSequence:outerSequence}, smalltalk.IRASTTranslator)})},
577
637
  args: ["aSequence", "aBlock"],
578
638
  source: "withSequence: aSequence do: aBlock\x0a\x09| outerSequence |\x0a\x09outerSequence := self sequence.\x0a\x09self sequence: aSequence.\x0a\x09aBlock value.\x0a\x09self sequence: outerSequence.\x0a\x09^ aSequence",
579
639
  messageSends: ["sequence", "sequence:", "value"],
@@ -584,7 +644,7 @@ smalltalk.IRASTTranslator);
584
644
 
585
645
 
586
646
  smalltalk.addClass('IRInstruction', smalltalk.Object, ['parent', 'instructions'], 'Compiler-IR');
587
- smalltalk.IRInstruction.comment="I am the abstract root class of the IR (intermediate representation) instructions class hierarchy.\x0aThe IR graph is used to emit JavaScript code using a JSStream. "
647
+ smalltalk.IRInstruction.comment="I am the abstract root class of the IR (intermediate representation) instructions class hierarchy.\x0aThe IR graph is used to emit JavaScript code using a JSStream."
588
648
  smalltalk.addMethod(
589
649
  "_accept_",
590
650
  smalltalk.method({
@@ -592,10 +652,10 @@ selector: "accept:",
592
652
  category: 'visiting',
593
653
  fn: function (aVisitor){
594
654
  var self=this;
595
- var $1;
596
- $1=smalltalk.send(aVisitor,"_visitIRInstruction_",[self]);
655
+ return smalltalk.withContext(function($ctx1) {
656
+ $1=_st(aVisitor)._visitIRInstruction_(self);
597
657
  return $1;
598
- },
658
+ }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRInstruction)})},
599
659
  args: ["aVisitor"],
600
660
  source: "accept: aVisitor\x0a\x09^ aVisitor visitIRInstruction: self",
601
661
  messageSends: ["visitIRInstruction:"],
@@ -610,11 +670,11 @@ selector: "add:",
610
670
  category: 'building',
611
671
  fn: function (anObject){
612
672
  var self=this;
613
- var $1;
614
- smalltalk.send(anObject,"_parent_",[self]);
615
- $1=smalltalk.send(smalltalk.send(self,"_instructions",[]),"_add_",[anObject]);
673
+ return smalltalk.withContext(function($ctx1) {
674
+ _st(anObject)._parent_(self);
675
+ $1=_st(_st(self)._instructions())._add_(anObject);
616
676
  return $1;
617
- },
677
+ }, function($ctx1) {$ctx1.fill(self,"add:",{anObject:anObject}, smalltalk.IRInstruction)})},
618
678
  args: ["anObject"],
619
679
  source: "add: anObject\x0a\x09anObject parent: self.\x0a\x09^ self instructions add: anObject",
620
680
  messageSends: ["parent:", "add:", "instructions"],
@@ -629,8 +689,8 @@ selector: "canBeAssigned",
629
689
  category: 'testing',
630
690
  fn: function (){
631
691
  var self=this;
632
- return true;
633
- },
692
+ return smalltalk.withContext(function($ctx1) {
693
+ }, function($ctx1) {$ctx1.fill(self,"canBeAssigned",{}, smalltalk.IRInstruction)})},
634
694
  args: [],
635
695
  source: "canBeAssigned\x0a\x09^ true",
636
696
  messageSends: [],
@@ -645,15 +705,16 @@ selector: "instructions",
645
705
  category: 'accessing',
646
706
  fn: function (){
647
707
  var self=this;
648
- var $1;
649
- if(($receiver = self["@instructions"]) == nil || $receiver == undefined){
650
- self["@instructions"]=smalltalk.send((smalltalk.OrderedCollection || OrderedCollection),"_new",[]);
708
+ return smalltalk.withContext(function($ctx1) {
709
+ $2=self["@instructions"];
710
+ if(($receiver = $2) == nil || $receiver == undefined){
711
+ self["@instructions"]=_st((smalltalk.OrderedCollection || OrderedCollection))._new();
651
712
  $1=self["@instructions"];
652
713
  } else {
653
- $1=self["@instructions"];
714
+ $1=$2;
654
715
  };
655
716
  return $1;
656
- },
717
+ }, function($ctx1) {$ctx1.fill(self,"instructions",{}, smalltalk.IRInstruction)})},
657
718
  args: [],
658
719
  source: "instructions\x0a\x09^ instructions ifNil: [ instructions := OrderedCollection new ]",
659
720
  messageSends: ["ifNil:", "new"],
@@ -668,8 +729,8 @@ selector: "isClosure",
668
729
  category: 'testing',
669
730
  fn: function (){
670
731
  var self=this;
671
- return false;
672
- },
732
+ return smalltalk.withContext(function($ctx1) {
733
+ }, function($ctx1) {$ctx1.fill(self,"isClosure",{}, smalltalk.IRInstruction)})},
673
734
  args: [],
674
735
  source: "isClosure\x0a\x09^ false",
675
736
  messageSends: [],
@@ -684,8 +745,8 @@ selector: "isInlined",
684
745
  category: 'testing',
685
746
  fn: function (){
686
747
  var self=this;
687
- return false;
688
- },
748
+ return smalltalk.withContext(function($ctx1) {
749
+ }, function($ctx1) {$ctx1.fill(self,"isInlined",{}, smalltalk.IRInstruction)})},
689
750
  args: [],
690
751
  source: "isInlined\x0a\x09^ false",
691
752
  messageSends: [],
@@ -700,8 +761,8 @@ selector: "isLocalReturn",
700
761
  category: 'testing',
701
762
  fn: function (){
702
763
  var self=this;
703
- return false;
704
- },
764
+ return smalltalk.withContext(function($ctx1) {
765
+ }, function($ctx1) {$ctx1.fill(self,"isLocalReturn",{}, smalltalk.IRInstruction)})},
705
766
  args: [],
706
767
  source: "isLocalReturn\x0a\x09^ false",
707
768
  messageSends: [],
@@ -709,6 +770,22 @@ referencedClasses: []
709
770
  }),
710
771
  smalltalk.IRInstruction);
711
772
 
773
+ smalltalk.addMethod(
774
+ "_isMethod",
775
+ smalltalk.method({
776
+ selector: "isMethod",
777
+ category: 'testing',
778
+ fn: function (){
779
+ var self=this;
780
+ return smalltalk.withContext(function($ctx1) {
781
+ }, function($ctx1) {$ctx1.fill(self,"isMethod",{}, smalltalk.IRInstruction)})},
782
+ args: [],
783
+ source: "isMethod\x0a\x09^ false",
784
+ messageSends: [],
785
+ referencedClasses: []
786
+ }),
787
+ smalltalk.IRInstruction);
788
+
712
789
  smalltalk.addMethod(
713
790
  "_isReturn",
714
791
  smalltalk.method({
@@ -716,8 +793,8 @@ selector: "isReturn",
716
793
  category: 'testing',
717
794
  fn: function (){
718
795
  var self=this;
719
- return false;
720
- },
796
+ return smalltalk.withContext(function($ctx1) {
797
+ }, function($ctx1) {$ctx1.fill(self,"isReturn",{}, smalltalk.IRInstruction)})},
721
798
  args: [],
722
799
  source: "isReturn\x0a\x09^ false",
723
800
  messageSends: [],
@@ -732,8 +809,8 @@ selector: "isSend",
732
809
  category: 'testing',
733
810
  fn: function (){
734
811
  var self=this;
735
- return false;
736
- },
812
+ return smalltalk.withContext(function($ctx1) {
813
+ }, function($ctx1) {$ctx1.fill(self,"isSend",{}, smalltalk.IRInstruction)})},
737
814
  args: [],
738
815
  source: "isSend\x0a\x09^ false",
739
816
  messageSends: [],
@@ -748,8 +825,8 @@ selector: "isSequence",
748
825
  category: 'testing',
749
826
  fn: function (){
750
827
  var self=this;
751
- return false;
752
- },
828
+ return smalltalk.withContext(function($ctx1) {
829
+ }, function($ctx1) {$ctx1.fill(self,"isSequence",{}, smalltalk.IRInstruction)})},
753
830
  args: [],
754
831
  source: "isSequence\x0a\x09^ false",
755
832
  messageSends: [],
@@ -764,8 +841,8 @@ selector: "isTempDeclaration",
764
841
  category: 'testing',
765
842
  fn: function (){
766
843
  var self=this;
767
- return false;
768
- },
844
+ return smalltalk.withContext(function($ctx1) {
845
+ }, function($ctx1) {$ctx1.fill(self,"isTempDeclaration",{}, smalltalk.IRInstruction)})},
769
846
  args: [],
770
847
  source: "isTempDeclaration\x0a\x09^ false",
771
848
  messageSends: [],
@@ -780,8 +857,8 @@ selector: "isVariable",
780
857
  category: 'testing',
781
858
  fn: function (){
782
859
  var self=this;
783
- return false;
784
- },
860
+ return smalltalk.withContext(function($ctx1) {
861
+ }, function($ctx1) {$ctx1.fill(self,"isVariable",{}, smalltalk.IRInstruction)})},
785
862
  args: [],
786
863
  source: "isVariable\x0a\x09^ false",
787
864
  messageSends: [],
@@ -789,6 +866,24 @@ referencedClasses: []
789
866
  }),
790
867
  smalltalk.IRInstruction);
791
868
 
869
+ smalltalk.addMethod(
870
+ "_method",
871
+ smalltalk.method({
872
+ selector: "method",
873
+ category: 'accessing',
874
+ fn: function (){
875
+ var self=this;
876
+ return smalltalk.withContext(function($ctx1) {
877
+ $1=_st(_st(self)._parent())._method();
878
+ return $1;
879
+ }, function($ctx1) {$ctx1.fill(self,"method",{}, smalltalk.IRInstruction)})},
880
+ args: [],
881
+ source: "method\x0a\x09^ self parent method",
882
+ messageSends: ["method", "parent"],
883
+ referencedClasses: []
884
+ }),
885
+ smalltalk.IRInstruction);
886
+
792
887
  smalltalk.addMethod(
793
888
  "_parent",
794
889
  smalltalk.method({
@@ -796,8 +891,10 @@ selector: "parent",
796
891
  category: 'accessing',
797
892
  fn: function (){
798
893
  var self=this;
799
- return self["@parent"];
800
- },
894
+ return smalltalk.withContext(function($ctx1) {
895
+ $1=self["@parent"];
896
+ return $1;
897
+ }, function($ctx1) {$ctx1.fill(self,"parent",{}, smalltalk.IRInstruction)})},
801
898
  args: [],
802
899
  source: "parent\x0a\x09^ parent",
803
900
  messageSends: [],
@@ -812,8 +909,8 @@ selector: "parent:",
812
909
  category: 'accessing',
813
910
  fn: function (anIRInstruction){
814
911
  var self=this;
815
- self["@parent"]=anIRInstruction;
816
- return self},
912
+ return smalltalk.withContext(function($ctx1) {
913
+ return self}, function($ctx1) {$ctx1.fill(self,"parent:",{anIRInstruction:anIRInstruction}, smalltalk.IRInstruction)})},
817
914
  args: ["anIRInstruction"],
818
915
  source: "parent: anIRInstruction\x0a\x09parent := anIRInstruction",
819
916
  messageSends: [],
@@ -828,8 +925,8 @@ selector: "remove",
828
925
  category: 'building',
829
926
  fn: function (){
830
927
  var self=this;
831
- smalltalk.send(smalltalk.send(self,"_parent",[]),"_remove_",[self]);
832
- return self},
928
+ return smalltalk.withContext(function($ctx1) {
929
+ return self}, function($ctx1) {$ctx1.fill(self,"remove",{}, smalltalk.IRInstruction)})},
833
930
  args: [],
834
931
  source: "remove\x0a\x09self parent remove: self",
835
932
  messageSends: ["remove:", "parent"],
@@ -844,8 +941,8 @@ selector: "remove:",
844
941
  category: 'building',
845
942
  fn: function (anIRInstruction){
846
943
  var self=this;
847
- smalltalk.send(smalltalk.send(self,"_instructions",[]),"_remove_",[anIRInstruction]);
848
- return self},
944
+ return smalltalk.withContext(function($ctx1) {
945
+ return self}, function($ctx1) {$ctx1.fill(self,"remove:",{anIRInstruction:anIRInstruction}, smalltalk.IRInstruction)})},
849
946
  args: ["anIRInstruction"],
850
947
  source: "remove: anIRInstruction\x0a\x09self instructions remove: anIRInstruction",
851
948
  messageSends: ["remove:", "instructions"],
@@ -860,9 +957,9 @@ selector: "replace:with:",
860
957
  category: 'building',
861
958
  fn: function (anIRInstruction,anotherIRInstruction){
862
959
  var self=this;
863
- smalltalk.send(anotherIRInstruction,"_parent_",[self]);
864
- smalltalk.send(smalltalk.send(self,"_instructions",[]),"_at_put_",[smalltalk.send(smalltalk.send(self,"_instructions",[]),"_indexOf_",[anIRInstruction]),anotherIRInstruction]);
865
- return self},
960
+ return smalltalk.withContext(function($ctx1) {
961
+ _st(_st(self)._instructions())._at_put_(_st(_st(self)._instructions())._indexOf_(anIRInstruction),anotherIRInstruction);
962
+ return self}, function($ctx1) {$ctx1.fill(self,"replace:with:",{anIRInstruction:anIRInstruction,anotherIRInstruction:anotherIRInstruction}, smalltalk.IRInstruction)})},
866
963
  args: ["anIRInstruction", "anotherIRInstruction"],
867
964
  source: "replace: anIRInstruction with: anotherIRInstruction\x0a\x09anotherIRInstruction parent: self.\x0a\x09self instructions \x0a\x09\x09at: (self instructions indexOf: anIRInstruction)\x0a\x09\x09put: anotherIRInstruction",
868
965
  messageSends: ["parent:", "at:put:", "indexOf:", "instructions"],
@@ -877,8 +974,8 @@ selector: "replaceWith:",
877
974
  category: 'building',
878
975
  fn: function (anIRInstruction){
879
976
  var self=this;
880
- smalltalk.send(smalltalk.send(self,"_parent",[]),"_replace_with_",[self,anIRInstruction]);
881
- return self},
977
+ return smalltalk.withContext(function($ctx1) {
978
+ return self}, function($ctx1) {$ctx1.fill(self,"replaceWith:",{anIRInstruction:anIRInstruction}, smalltalk.IRInstruction)})},
882
979
  args: ["anIRInstruction"],
883
980
  source: "replaceWith: anIRInstruction\x0a\x09self parent replace: self with: anIRInstruction",
884
981
  messageSends: ["replace:with:", "parent"],
@@ -894,13 +991,13 @@ selector: "on:",
894
991
  category: 'instance creation',
895
992
  fn: function (aBuilder){
896
993
  var self=this;
897
- var $2,$3,$1;
898
- $2=smalltalk.send(self,"_new",[]);
899
- smalltalk.send($2,"_builder_",[aBuilder]);
900
- $3=smalltalk.send($2,"_yourself",[]);
994
+ return smalltalk.withContext(function($ctx1) {
995
+ $2=_st(self)._new();
996
+ _st($2)._builder_(aBuilder);
997
+ $3=_st($2)._yourself();
901
998
  $1=$3;
902
999
  return $1;
903
- },
1000
+ }, function($ctx1) {$ctx1.fill(self,"on:",{aBuilder:aBuilder}, smalltalk.IRInstruction.klass)})},
904
1001
  args: ["aBuilder"],
905
1002
  source: "on: aBuilder\x0a\x09^ self new\x0a\x09\x09builder: aBuilder;\x0a\x09\x09yourself",
906
1003
  messageSends: ["builder:", "new", "yourself"],
@@ -917,10 +1014,10 @@ selector: "accept:",
917
1014
  category: 'visiting',
918
1015
  fn: function (aVisitor){
919
1016
  var self=this;
920
- var $1;
921
- $1=smalltalk.send(aVisitor,"_visitIRAssignment_",[self]);
1017
+ return smalltalk.withContext(function($ctx1) {
1018
+ $1=_st(aVisitor)._visitIRAssignment_(self);
922
1019
  return $1;
923
- },
1020
+ }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRAssignment)})},
924
1021
  args: ["aVisitor"],
925
1022
  source: "accept: aVisitor\x0a\x09^ aVisitor visitIRAssignment: self",
926
1023
  messageSends: ["visitIRAssignment:"],
@@ -938,10 +1035,10 @@ selector: "accept:",
938
1035
  category: 'visiting',
939
1036
  fn: function (aVisitor){
940
1037
  var self=this;
941
- var $1;
942
- $1=smalltalk.send(aVisitor,"_visitIRDynamicArray_",[self]);
1038
+ return smalltalk.withContext(function($ctx1) {
1039
+ $1=_st(aVisitor)._visitIRDynamicArray_(self);
943
1040
  return $1;
944
- },
1041
+ }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRDynamicArray)})},
945
1042
  args: ["aVisitor"],
946
1043
  source: "accept: aVisitor\x0a\x09^ aVisitor visitIRDynamicArray: self",
947
1044
  messageSends: ["visitIRDynamicArray:"],
@@ -959,10 +1056,10 @@ selector: "accept:",
959
1056
  category: 'visiting',
960
1057
  fn: function (aVisitor){
961
1058
  var self=this;
962
- var $1;
963
- $1=smalltalk.send(aVisitor,"_visitIRDynamicDictionary_",[self]);
1059
+ return smalltalk.withContext(function($ctx1) {
1060
+ $1=_st(aVisitor)._visitIRDynamicDictionary_(self);
964
1061
  return $1;
965
- },
1062
+ }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRDynamicDictionary)})},
966
1063
  args: ["aVisitor"],
967
1064
  source: "accept: aVisitor\x0a\x09^ aVisitor visitIRDynamicDictionary: self",
968
1065
  messageSends: ["visitIRDynamicDictionary:"],
@@ -980,8 +1077,10 @@ selector: "scope",
980
1077
  category: 'accessing',
981
1078
  fn: function (){
982
1079
  var self=this;
983
- return self["@scope"];
984
- },
1080
+ return smalltalk.withContext(function($ctx1) {
1081
+ $1=self["@scope"];
1082
+ return $1;
1083
+ }, function($ctx1) {$ctx1.fill(self,"scope",{}, smalltalk.IRScopedInstruction)})},
985
1084
  args: [],
986
1085
  source: "scope\x0a\x09^ scope",
987
1086
  messageSends: [],
@@ -996,8 +1095,8 @@ selector: "scope:",
996
1095
  category: 'accessing',
997
1096
  fn: function (aScope){
998
1097
  var self=this;
999
- self["@scope"]=aScope;
1000
- return self},
1098
+ return smalltalk.withContext(function($ctx1) {
1099
+ return self}, function($ctx1) {$ctx1.fill(self,"scope:",{aScope:aScope}, smalltalk.IRScopedInstruction)})},
1001
1100
  args: ["aScope"],
1002
1101
  source: "scope: aScope\x0a\x09scope := aScope",
1003
1102
  messageSends: [],
@@ -1007,25 +1106,7 @@ smalltalk.IRScopedInstruction);
1007
1106
 
1008
1107
 
1009
1108
 
1010
- smalltalk.addClass('IRClosure', smalltalk.IRScopedInstruction, ['arguments'], 'Compiler-IR');
1011
- smalltalk.addMethod(
1012
- "_accept_",
1013
- smalltalk.method({
1014
- selector: "accept:",
1015
- category: 'visiting',
1016
- fn: function (aVisitor){
1017
- var self=this;
1018
- var $1;
1019
- $1=smalltalk.send(aVisitor,"_visitIRClosure_",[self]);
1020
- return $1;
1021
- },
1022
- args: ["aVisitor"],
1023
- source: "accept: aVisitor\x0a\x09^ aVisitor visitIRClosure: self",
1024
- messageSends: ["visitIRClosure:"],
1025
- referencedClasses: []
1026
- }),
1027
- smalltalk.IRClosure);
1028
-
1109
+ smalltalk.addClass('IRClosureInstruction', smalltalk.IRScopedInstruction, ['arguments'], 'Compiler-IR');
1029
1110
  smalltalk.addMethod(
1030
1111
  "_arguments",
1031
1112
  smalltalk.method({
@@ -1033,20 +1114,21 @@ selector: "arguments",
1033
1114
  category: 'accessing',
1034
1115
  fn: function (){
1035
1116
  var self=this;
1036
- var $1;
1037
- if(($receiver = self["@arguments"]) == nil || $receiver == undefined){
1117
+ return smalltalk.withContext(function($ctx1) {
1118
+ $2=self["@arguments"];
1119
+ if(($receiver = $2) == nil || $receiver == undefined){
1038
1120
  $1=[];
1039
1121
  } else {
1040
- $1=self["@arguments"];
1122
+ $1=$2;
1041
1123
  };
1042
1124
  return $1;
1043
- },
1125
+ }, function($ctx1) {$ctx1.fill(self,"arguments",{}, smalltalk.IRClosureInstruction)})},
1044
1126
  args: [],
1045
1127
  source: "arguments\x0a\x09^ arguments ifNil: [ #() ]",
1046
1128
  messageSends: ["ifNil:"],
1047
1129
  referencedClasses: []
1048
1130
  }),
1049
- smalltalk.IRClosure);
1131
+ smalltalk.IRClosureInstruction);
1050
1132
 
1051
1133
  smalltalk.addMethod(
1052
1134
  "_arguments_",
@@ -1055,30 +1137,37 @@ selector: "arguments:",
1055
1137
  category: 'accessing',
1056
1138
  fn: function (aCollection){
1057
1139
  var self=this;
1058
- self["@arguments"]=aCollection;
1059
- return self},
1140
+ return smalltalk.withContext(function($ctx1) {
1141
+ return self}, function($ctx1) {$ctx1.fill(self,"arguments:",{aCollection:aCollection}, smalltalk.IRClosureInstruction)})},
1060
1142
  args: ["aCollection"],
1061
1143
  source: "arguments: aCollection\x0a\x09arguments := aCollection",
1062
1144
  messageSends: [],
1063
1145
  referencedClasses: []
1064
1146
  }),
1065
- smalltalk.IRClosure);
1147
+ smalltalk.IRClosureInstruction);
1066
1148
 
1067
1149
  smalltalk.addMethod(
1068
- "_isClosure",
1150
+ "_locals",
1069
1151
  smalltalk.method({
1070
- selector: "isClosure",
1071
- category: 'testing',
1152
+ selector: "locals",
1153
+ category: 'accessing',
1072
1154
  fn: function (){
1073
1155
  var self=this;
1074
- return true;
1075
- },
1156
+ return smalltalk.withContext(function($ctx1) {
1157
+ $2=_st(_st(self)._arguments())._copy();
1158
+ _st($2)._addAll_(_st(_st(self)._tempDeclarations())._collect_((function(each){
1159
+ return smalltalk.withContext(function($ctx2) {
1160
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})));
1161
+ $3=_st($2)._yourself();
1162
+ $1=$3;
1163
+ return $1;
1164
+ }, function($ctx1) {$ctx1.fill(self,"locals",{}, smalltalk.IRClosureInstruction)})},
1076
1165
  args: [],
1077
- source: "isClosure\x0a\x09^ true",
1078
- messageSends: [],
1166
+ source: "locals\x0a\x09^ self arguments copy\x0a \x09addAll: (self tempDeclarations collect: [ :each | each name ]); \x0a yourself",
1167
+ messageSends: ["addAll:", "collect:", "name", "tempDeclarations", "copy", "arguments", "yourself"],
1079
1168
  referencedClasses: []
1080
1169
  }),
1081
- smalltalk.IRClosure);
1170
+ smalltalk.IRClosureInstruction);
1082
1171
 
1083
1172
  smalltalk.addMethod(
1084
1173
  "_scope_",
@@ -1087,38 +1176,39 @@ selector: "scope:",
1087
1176
  category: 'accessing',
1088
1177
  fn: function (aScope){
1089
1178
  var self=this;
1090
- smalltalk.send(self,"_scope_",[aScope],smalltalk.IRScopedInstruction);
1091
- smalltalk.send(aScope,"_instruction_",[self]);
1092
- return self},
1179
+ return smalltalk.withContext(function($ctx1) {
1180
+ _st(aScope)._instruction_(self);
1181
+ return self}, function($ctx1) {$ctx1.fill(self,"scope:",{aScope:aScope}, smalltalk.IRClosureInstruction)})},
1093
1182
  args: ["aScope"],
1094
1183
  source: "scope: aScope\x0a\x09super scope: aScope.\x0a\x09aScope instruction: self",
1095
1184
  messageSends: ["scope:", "instruction:"],
1096
1185
  referencedClasses: []
1097
1186
  }),
1098
- smalltalk.IRClosure);
1187
+ smalltalk.IRClosureInstruction);
1099
1188
 
1100
1189
  smalltalk.addMethod(
1101
- "_sequence",
1190
+ "_tempDeclarations",
1102
1191
  smalltalk.method({
1103
- selector: "sequence",
1192
+ selector: "tempDeclarations",
1104
1193
  category: 'accessing',
1105
1194
  fn: function (){
1106
1195
  var self=this;
1107
- var $1;
1108
- $1=smalltalk.send(smalltalk.send(self,"_instructions",[]),"_last",[]);
1196
+ return smalltalk.withContext(function($ctx1) {
1197
+ $1=_st(_st(self)._instructions())._select_((function(each){
1198
+ return smalltalk.withContext(function($ctx2) {
1199
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
1109
1200
  return $1;
1110
- },
1201
+ }, function($ctx1) {$ctx1.fill(self,"tempDeclarations",{}, smalltalk.IRClosureInstruction)})},
1111
1202
  args: [],
1112
- source: "sequence\x0a\x09^ self instructions last",
1113
- messageSends: ["last", "instructions"],
1203
+ source: "tempDeclarations\x0a\x09^ self instructions select: [ :each | \x0a \x09each isTempDeclaration ]",
1204
+ messageSends: ["select:", "isTempDeclaration", "instructions"],
1114
1205
  referencedClasses: []
1115
1206
  }),
1116
- smalltalk.IRClosure);
1207
+ smalltalk.IRClosureInstruction);
1117
1208
 
1118
1209
 
1119
1210
 
1120
- smalltalk.addClass('IRMethod', smalltalk.IRScopedInstruction, ['source', 'selector', 'classReferences', 'messageSends', 'arguments', 'internalVariables'], 'Compiler-IR');
1121
- smalltalk.IRMethod.comment="I am a method instruction"
1211
+ smalltalk.addClass('IRClosure', smalltalk.IRClosureInstruction, [], 'Compiler-IR');
1122
1212
  smalltalk.addMethod(
1123
1213
  "_accept_",
1124
1214
  smalltalk.method({
@@ -1126,45 +1216,69 @@ selector: "accept:",
1126
1216
  category: 'visiting',
1127
1217
  fn: function (aVisitor){
1128
1218
  var self=this;
1129
- var $1;
1130
- $1=smalltalk.send(aVisitor,"_visitIRMethod_",[self]);
1219
+ return smalltalk.withContext(function($ctx1) {
1220
+ $1=_st(aVisitor)._visitIRClosure_(self);
1131
1221
  return $1;
1132
- },
1222
+ }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRClosure)})},
1133
1223
  args: ["aVisitor"],
1134
- source: "accept: aVisitor\x0a\x09^ aVisitor visitIRMethod: self",
1135
- messageSends: ["visitIRMethod:"],
1224
+ source: "accept: aVisitor\x0a\x09^ aVisitor visitIRClosure: self",
1225
+ messageSends: ["visitIRClosure:"],
1136
1226
  referencedClasses: []
1137
1227
  }),
1138
- smalltalk.IRMethod);
1228
+ smalltalk.IRClosure);
1139
1229
 
1140
1230
  smalltalk.addMethod(
1141
- "_arguments",
1231
+ "_isClosure",
1142
1232
  smalltalk.method({
1143
- selector: "arguments",
1144
- category: 'accessing',
1233
+ selector: "isClosure",
1234
+ category: 'testing',
1145
1235
  fn: function (){
1146
1236
  var self=this;
1147
- return self["@arguments"];
1148
- },
1237
+ return smalltalk.withContext(function($ctx1) {
1238
+ }, function($ctx1) {$ctx1.fill(self,"isClosure",{}, smalltalk.IRClosure)})},
1149
1239
  args: [],
1150
- source: "arguments\x0a\x09^ arguments",
1240
+ source: "isClosure\x0a\x09^ true",
1151
1241
  messageSends: [],
1152
1242
  referencedClasses: []
1153
1243
  }),
1154
- smalltalk.IRMethod);
1244
+ smalltalk.IRClosure);
1155
1245
 
1156
1246
  smalltalk.addMethod(
1157
- "_arguments_",
1247
+ "_sequence",
1158
1248
  smalltalk.method({
1159
- selector: "arguments:",
1249
+ selector: "sequence",
1160
1250
  category: 'accessing',
1161
- fn: function (aCollection){
1251
+ fn: function (){
1162
1252
  var self=this;
1163
- self["@arguments"]=aCollection;
1164
- return self},
1165
- args: ["aCollection"],
1166
- source: "arguments: aCollection\x0a\x09arguments := aCollection",
1167
- messageSends: [],
1253
+ return smalltalk.withContext(function($ctx1) {
1254
+ $1=_st(_st(self)._instructions())._last();
1255
+ return $1;
1256
+ }, function($ctx1) {$ctx1.fill(self,"sequence",{}, smalltalk.IRClosure)})},
1257
+ args: [],
1258
+ source: "sequence\x0a\x09^ self instructions last",
1259
+ messageSends: ["last", "instructions"],
1260
+ referencedClasses: []
1261
+ }),
1262
+ smalltalk.IRClosure);
1263
+
1264
+
1265
+
1266
+ smalltalk.addClass('IRMethod', smalltalk.IRClosureInstruction, ['theClass', 'source', 'selector', 'classReferences', 'messageSends', 'superSends', 'internalVariables'], 'Compiler-IR');
1267
+ smalltalk.IRMethod.comment="I am a method instruction"
1268
+ smalltalk.addMethod(
1269
+ "_accept_",
1270
+ smalltalk.method({
1271
+ selector: "accept:",
1272
+ category: 'visiting',
1273
+ fn: function (aVisitor){
1274
+ var self=this;
1275
+ return smalltalk.withContext(function($ctx1) {
1276
+ $1=_st(aVisitor)._visitIRMethod_(self);
1277
+ return $1;
1278
+ }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRMethod)})},
1279
+ args: ["aVisitor"],
1280
+ source: "accept: aVisitor\x0a\x09^ aVisitor visitIRMethod: self",
1281
+ messageSends: ["visitIRMethod:"],
1168
1282
  referencedClasses: []
1169
1283
  }),
1170
1284
  smalltalk.IRMethod);
@@ -1176,8 +1290,10 @@ selector: "classReferences",
1176
1290
  category: 'accessing',
1177
1291
  fn: function (){
1178
1292
  var self=this;
1179
- return self["@classReferences"];
1180
- },
1293
+ return smalltalk.withContext(function($ctx1) {
1294
+ $1=self["@classReferences"];
1295
+ return $1;
1296
+ }, function($ctx1) {$ctx1.fill(self,"classReferences",{}, smalltalk.IRMethod)})},
1181
1297
  args: [],
1182
1298
  source: "classReferences\x0a\x09^ classReferences",
1183
1299
  messageSends: [],
@@ -1192,8 +1308,8 @@ selector: "classReferences:",
1192
1308
  category: 'accessing',
1193
1309
  fn: function (aCollection){
1194
1310
  var self=this;
1195
- self["@classReferences"]=aCollection;
1196
- return self},
1311
+ return smalltalk.withContext(function($ctx1) {
1312
+ return self}, function($ctx1) {$ctx1.fill(self,"classReferences:",{aCollection:aCollection}, smalltalk.IRMethod)})},
1197
1313
  args: ["aCollection"],
1198
1314
  source: "classReferences: aCollection\x0a\x09classReferences := aCollection",
1199
1315
  messageSends: [],
@@ -1208,15 +1324,16 @@ selector: "internalVariables",
1208
1324
  category: 'accessing',
1209
1325
  fn: function (){
1210
1326
  var self=this;
1211
- var $1;
1212
- if(($receiver = self["@internalVariables"]) == nil || $receiver == undefined){
1213
- self["@internalVariables"]=smalltalk.send((smalltalk.Set || Set),"_new",[]);
1327
+ return smalltalk.withContext(function($ctx1) {
1328
+ $2=self["@internalVariables"];
1329
+ if(($receiver = $2) == nil || $receiver == undefined){
1330
+ self["@internalVariables"]=_st((smalltalk.Set || Set))._new();
1214
1331
  $1=self["@internalVariables"];
1215
1332
  } else {
1216
- $1=self["@internalVariables"];
1333
+ $1=$2;
1217
1334
  };
1218
1335
  return $1;
1219
- },
1336
+ }, function($ctx1) {$ctx1.fill(self,"internalVariables",{}, smalltalk.IRMethod)})},
1220
1337
  args: [],
1221
1338
  source: "internalVariables\x0a\x09^ internalVariables ifNil: [ internalVariables := Set new ]",
1222
1339
  messageSends: ["ifNil:", "new"],
@@ -1224,6 +1341,22 @@ referencedClasses: ["Set"]
1224
1341
  }),
1225
1342
  smalltalk.IRMethod);
1226
1343
 
1344
+ smalltalk.addMethod(
1345
+ "_isMethod",
1346
+ smalltalk.method({
1347
+ selector: "isMethod",
1348
+ category: 'accessing',
1349
+ fn: function (){
1350
+ var self=this;
1351
+ return smalltalk.withContext(function($ctx1) {
1352
+ }, function($ctx1) {$ctx1.fill(self,"isMethod",{}, smalltalk.IRMethod)})},
1353
+ args: [],
1354
+ source: "isMethod\x0a\x09^ true",
1355
+ messageSends: [],
1356
+ referencedClasses: []
1357
+ }),
1358
+ smalltalk.IRMethod);
1359
+
1227
1360
  smalltalk.addMethod(
1228
1361
  "_messageSends",
1229
1362
  smalltalk.method({
@@ -1231,8 +1364,10 @@ selector: "messageSends",
1231
1364
  category: 'accessing',
1232
1365
  fn: function (){
1233
1366
  var self=this;
1234
- return self["@messageSends"];
1235
- },
1367
+ return smalltalk.withContext(function($ctx1) {
1368
+ $1=self["@messageSends"];
1369
+ return $1;
1370
+ }, function($ctx1) {$ctx1.fill(self,"messageSends",{}, smalltalk.IRMethod)})},
1236
1371
  args: [],
1237
1372
  source: "messageSends\x0a\x09^ messageSends",
1238
1373
  messageSends: [],
@@ -1247,8 +1382,8 @@ selector: "messageSends:",
1247
1382
  category: 'accessing',
1248
1383
  fn: function (aCollection){
1249
1384
  var self=this;
1250
- self["@messageSends"]=aCollection;
1251
- return self},
1385
+ return smalltalk.withContext(function($ctx1) {
1386
+ return self}, function($ctx1) {$ctx1.fill(self,"messageSends:",{aCollection:aCollection}, smalltalk.IRMethod)})},
1252
1387
  args: ["aCollection"],
1253
1388
  source: "messageSends: aCollection\x0a\x09messageSends := aCollection",
1254
1389
  messageSends: [],
@@ -1257,18 +1392,19 @@ referencedClasses: []
1257
1392
  smalltalk.IRMethod);
1258
1393
 
1259
1394
  smalltalk.addMethod(
1260
- "_scope_",
1395
+ "_method",
1261
1396
  smalltalk.method({
1262
- selector: "scope:",
1397
+ selector: "method",
1263
1398
  category: 'accessing',
1264
- fn: function (aScope){
1399
+ fn: function (){
1265
1400
  var self=this;
1266
- smalltalk.send(self,"_scope_",[aScope],smalltalk.IRScopedInstruction);
1267
- smalltalk.send(aScope,"_instruction_",[self]);
1268
- return self},
1269
- args: ["aScope"],
1270
- source: "scope: aScope\x0a\x09super scope: aScope.\x0a\x09aScope instruction: self",
1271
- messageSends: ["scope:", "instruction:"],
1401
+ return smalltalk.withContext(function($ctx1) {
1402
+ $1=self;
1403
+ return $1;
1404
+ }, function($ctx1) {$ctx1.fill(self,"method",{}, smalltalk.IRMethod)})},
1405
+ args: [],
1406
+ source: "method\x0a\x09^ self",
1407
+ messageSends: [],
1272
1408
  referencedClasses: []
1273
1409
  }),
1274
1410
  smalltalk.IRMethod);
@@ -1280,8 +1416,10 @@ selector: "selector",
1280
1416
  category: 'accessing',
1281
1417
  fn: function (){
1282
1418
  var self=this;
1283
- return self["@selector"];
1284
- },
1419
+ return smalltalk.withContext(function($ctx1) {
1420
+ $1=self["@selector"];
1421
+ return $1;
1422
+ }, function($ctx1) {$ctx1.fill(self,"selector",{}, smalltalk.IRMethod)})},
1285
1423
  args: [],
1286
1424
  source: "selector\x0a\x09^ selector",
1287
1425
  messageSends: [],
@@ -1296,8 +1434,8 @@ selector: "selector:",
1296
1434
  category: 'accessing',
1297
1435
  fn: function (aString){
1298
1436
  var self=this;
1299
- self["@selector"]=aString;
1300
- return self},
1437
+ return smalltalk.withContext(function($ctx1) {
1438
+ return self}, function($ctx1) {$ctx1.fill(self,"selector:",{aString:aString}, smalltalk.IRMethod)})},
1301
1439
  args: ["aString"],
1302
1440
  source: "selector: aString\x0a\x09selector := aString",
1303
1441
  messageSends: [],
@@ -1312,8 +1450,10 @@ selector: "source",
1312
1450
  category: 'accessing',
1313
1451
  fn: function (){
1314
1452
  var self=this;
1315
- return self["@source"];
1316
- },
1453
+ return smalltalk.withContext(function($ctx1) {
1454
+ $1=self["@source"];
1455
+ return $1;
1456
+ }, function($ctx1) {$ctx1.fill(self,"source",{}, smalltalk.IRMethod)})},
1317
1457
  args: [],
1318
1458
  source: "source\x0a\x09^ source",
1319
1459
  messageSends: [],
@@ -1328,8 +1468,8 @@ selector: "source:",
1328
1468
  category: 'accessing',
1329
1469
  fn: function (aString){
1330
1470
  var self=this;
1331
- self["@source"]=aString;
1332
- return self},
1471
+ return smalltalk.withContext(function($ctx1) {
1472
+ return self}, function($ctx1) {$ctx1.fill(self,"source:",{aString:aString}, smalltalk.IRMethod)})},
1333
1473
  args: ["aString"],
1334
1474
  source: "source: aString\x0a\x09source := aString",
1335
1475
  messageSends: [],
@@ -1337,6 +1477,74 @@ referencedClasses: []
1337
1477
  }),
1338
1478
  smalltalk.IRMethod);
1339
1479
 
1480
+ smalltalk.addMethod(
1481
+ "_superSends",
1482
+ smalltalk.method({
1483
+ selector: "superSends",
1484
+ category: 'accessing',
1485
+ fn: function (){
1486
+ var self=this;
1487
+ return smalltalk.withContext(function($ctx1) {
1488
+ $1=self["@superSends"];
1489
+ return $1;
1490
+ }, function($ctx1) {$ctx1.fill(self,"superSends",{}, smalltalk.IRMethod)})},
1491
+ args: [],
1492
+ source: "superSends\x0a\x09^ superSends",
1493
+ messageSends: [],
1494
+ referencedClasses: []
1495
+ }),
1496
+ smalltalk.IRMethod);
1497
+
1498
+ smalltalk.addMethod(
1499
+ "_superSends_",
1500
+ smalltalk.method({
1501
+ selector: "superSends:",
1502
+ category: 'accessing',
1503
+ fn: function (aCollection){
1504
+ var self=this;
1505
+ return smalltalk.withContext(function($ctx1) {
1506
+ return self}, function($ctx1) {$ctx1.fill(self,"superSends:",{aCollection:aCollection}, smalltalk.IRMethod)})},
1507
+ args: ["aCollection"],
1508
+ source: "superSends: aCollection\x0a\x09superSends := aCollection",
1509
+ messageSends: [],
1510
+ referencedClasses: []
1511
+ }),
1512
+ smalltalk.IRMethod);
1513
+
1514
+ smalltalk.addMethod(
1515
+ "_theClass",
1516
+ smalltalk.method({
1517
+ selector: "theClass",
1518
+ category: 'accessing',
1519
+ fn: function (){
1520
+ var self=this;
1521
+ return smalltalk.withContext(function($ctx1) {
1522
+ $1=self["@theClass"];
1523
+ return $1;
1524
+ }, function($ctx1) {$ctx1.fill(self,"theClass",{}, smalltalk.IRMethod)})},
1525
+ args: [],
1526
+ source: "theClass\x0a\x09^ theClass",
1527
+ messageSends: [],
1528
+ referencedClasses: []
1529
+ }),
1530
+ smalltalk.IRMethod);
1531
+
1532
+ smalltalk.addMethod(
1533
+ "_theClass_",
1534
+ smalltalk.method({
1535
+ selector: "theClass:",
1536
+ category: 'accessing',
1537
+ fn: function (aClass){
1538
+ var self=this;
1539
+ return smalltalk.withContext(function($ctx1) {
1540
+ return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass}, smalltalk.IRMethod)})},
1541
+ args: ["aClass"],
1542
+ source: "theClass: aClass\x0a\x09theClass := aClass",
1543
+ messageSends: [],
1544
+ referencedClasses: []
1545
+ }),
1546
+ smalltalk.IRMethod);
1547
+
1340
1548
 
1341
1549
 
1342
1550
  smalltalk.addClass('IRReturn', smalltalk.IRScopedInstruction, [], 'Compiler-IR');
@@ -1348,10 +1556,10 @@ selector: "accept:",
1348
1556
  category: 'visiting',
1349
1557
  fn: function (aVisitor){
1350
1558
  var self=this;
1351
- var $1;
1352
- $1=smalltalk.send(aVisitor,"_visitIRReturn_",[self]);
1559
+ return smalltalk.withContext(function($ctx1) {
1560
+ $1=_st(aVisitor)._visitIRReturn_(self);
1353
1561
  return $1;
1354
- },
1562
+ }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRReturn)})},
1355
1563
  args: ["aVisitor"],
1356
1564
  source: "accept: aVisitor\x0a\x09^ aVisitor visitIRReturn: self",
1357
1565
  messageSends: ["visitIRReturn:"],
@@ -1366,8 +1574,8 @@ selector: "canBeAssigned",
1366
1574
  category: 'testing',
1367
1575
  fn: function (){
1368
1576
  var self=this;
1369
- return false;
1370
- },
1577
+ return smalltalk.withContext(function($ctx1) {
1578
+ }, function($ctx1) {$ctx1.fill(self,"canBeAssigned",{}, smalltalk.IRReturn)})},
1371
1579
  args: [],
1372
1580
  source: "canBeAssigned\x0a\x09^ false",
1373
1581
  messageSends: [],
@@ -1382,8 +1590,8 @@ selector: "isBlockReturn",
1382
1590
  category: 'testing',
1383
1591
  fn: function (){
1384
1592
  var self=this;
1385
- return false;
1386
- },
1593
+ return smalltalk.withContext(function($ctx1) {
1594
+ }, function($ctx1) {$ctx1.fill(self,"isBlockReturn",{}, smalltalk.IRReturn)})},
1387
1595
  args: [],
1388
1596
  source: "isBlockReturn\x0a\x09^ false",
1389
1597
  messageSends: [],
@@ -1398,8 +1606,8 @@ selector: "isLocalReturn",
1398
1606
  category: 'testing',
1399
1607
  fn: function (){
1400
1608
  var self=this;
1401
- return true;
1402
- },
1609
+ return smalltalk.withContext(function($ctx1) {
1610
+ }, function($ctx1) {$ctx1.fill(self,"isLocalReturn",{}, smalltalk.IRReturn)})},
1403
1611
  args: [],
1404
1612
  source: "isLocalReturn\x0a\x09^ true",
1405
1613
  messageSends: [],
@@ -1414,10 +1622,10 @@ selector: "isNonLocalReturn",
1414
1622
  category: 'testing',
1415
1623
  fn: function (){
1416
1624
  var self=this;
1417
- var $1;
1418
- $1=smalltalk.send(smalltalk.send(self,"_isLocalReturn",[]),"_not",[]);
1625
+ return smalltalk.withContext(function($ctx1) {
1626
+ $1=_st(_st(self)._isLocalReturn())._not();
1419
1627
  return $1;
1420
- },
1628
+ }, function($ctx1) {$ctx1.fill(self,"isNonLocalReturn",{}, smalltalk.IRReturn)})},
1421
1629
  args: [],
1422
1630
  source: "isNonLocalReturn\x0a\x09^ self isLocalReturn not",
1423
1631
  messageSends: ["not", "isLocalReturn"],
@@ -1432,8 +1640,8 @@ selector: "isReturn",
1432
1640
  category: 'testing',
1433
1641
  fn: function (){
1434
1642
  var self=this;
1435
- return true;
1436
- },
1643
+ return smalltalk.withContext(function($ctx1) {
1644
+ }, function($ctx1) {$ctx1.fill(self,"isReturn",{}, smalltalk.IRReturn)})},
1437
1645
  args: [],
1438
1646
  source: "isReturn\x0a\x09^ true",
1439
1647
  messageSends: [],
@@ -1452,10 +1660,10 @@ selector: "accept:",
1452
1660
  category: 'visiting',
1453
1661
  fn: function (aVisitor){
1454
1662
  var self=this;
1455
- var $1;
1456
- $1=smalltalk.send(aVisitor,"_visitIRBlockReturn_",[self]);
1663
+ return smalltalk.withContext(function($ctx1) {
1664
+ $1=_st(aVisitor)._visitIRBlockReturn_(self);
1457
1665
  return $1;
1458
- },
1666
+ }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRBlockReturn)})},
1459
1667
  args: ["aVisitor"],
1460
1668
  source: "accept: aVisitor\x0a\x09^ aVisitor visitIRBlockReturn: self",
1461
1669
  messageSends: ["visitIRBlockReturn:"],
@@ -1470,8 +1678,8 @@ selector: "isBlockReturn",
1470
1678
  category: 'testing',
1471
1679
  fn: function (){
1472
1680
  var self=this;
1473
- return true;
1474
- },
1681
+ return smalltalk.withContext(function($ctx1) {
1682
+ }, function($ctx1) {$ctx1.fill(self,"isBlockReturn",{}, smalltalk.IRBlockReturn)})},
1475
1683
  args: [],
1476
1684
  source: "isBlockReturn\x0a\x09^ true",
1477
1685
  messageSends: [],
@@ -1490,10 +1698,10 @@ selector: "accept:",
1490
1698
  category: 'visiting',
1491
1699
  fn: function (aVisitor){
1492
1700
  var self=this;
1493
- var $1;
1494
- $1=smalltalk.send(aVisitor,"_visitIRNonLocalReturn_",[self]);
1701
+ return smalltalk.withContext(function($ctx1) {
1702
+ $1=_st(aVisitor)._visitIRNonLocalReturn_(self);
1495
1703
  return $1;
1496
- },
1704
+ }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRNonLocalReturn)})},
1497
1705
  args: ["aVisitor"],
1498
1706
  source: "accept: aVisitor\x0a\x09^ aVisitor visitIRNonLocalReturn: self",
1499
1707
  messageSends: ["visitIRNonLocalReturn:"],
@@ -1508,8 +1716,8 @@ selector: "isLocalReturn",
1508
1716
  category: 'testing',
1509
1717
  fn: function (){
1510
1718
  var self=this;
1511
- return false;
1512
- },
1719
+ return smalltalk.withContext(function($ctx1) {
1720
+ }, function($ctx1) {$ctx1.fill(self,"isLocalReturn",{}, smalltalk.IRNonLocalReturn)})},
1513
1721
  args: [],
1514
1722
  source: "isLocalReturn\x0a\x09^ false",
1515
1723
  messageSends: [],
@@ -1519,8 +1727,79 @@ smalltalk.IRNonLocalReturn);
1519
1727
 
1520
1728
 
1521
1729
 
1730
+ smalltalk.addClass('IRTempDeclaration', smalltalk.IRScopedInstruction, ['name'], 'Compiler-IR');
1731
+ smalltalk.addMethod(
1732
+ "_accept_",
1733
+ smalltalk.method({
1734
+ selector: "accept:",
1735
+ category: 'visiting',
1736
+ fn: function (aVisitor){
1737
+ var self=this;
1738
+ return smalltalk.withContext(function($ctx1) {
1739
+ $1=_st(aVisitor)._visitIRTempDeclaration_(self);
1740
+ return $1;
1741
+ }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRTempDeclaration)})},
1742
+ args: ["aVisitor"],
1743
+ source: "accept: aVisitor\x0a\x09^ aVisitor visitIRTempDeclaration: self",
1744
+ messageSends: ["visitIRTempDeclaration:"],
1745
+ referencedClasses: []
1746
+ }),
1747
+ smalltalk.IRTempDeclaration);
1748
+
1749
+ smalltalk.addMethod(
1750
+ "_isTempDeclaration",
1751
+ smalltalk.method({
1752
+ selector: "isTempDeclaration",
1753
+ category: 'testing',
1754
+ fn: function (){
1755
+ var self=this;
1756
+ return smalltalk.withContext(function($ctx1) {
1757
+ }, function($ctx1) {$ctx1.fill(self,"isTempDeclaration",{}, smalltalk.IRTempDeclaration)})},
1758
+ args: [],
1759
+ source: "isTempDeclaration\x0a\x09^ true",
1760
+ messageSends: [],
1761
+ referencedClasses: []
1762
+ }),
1763
+ smalltalk.IRTempDeclaration);
1764
+
1765
+ smalltalk.addMethod(
1766
+ "_name",
1767
+ smalltalk.method({
1768
+ selector: "name",
1769
+ category: 'accessing',
1770
+ fn: function (){
1771
+ var self=this;
1772
+ return smalltalk.withContext(function($ctx1) {
1773
+ $1=self["@name"];
1774
+ return $1;
1775
+ }, function($ctx1) {$ctx1.fill(self,"name",{}, smalltalk.IRTempDeclaration)})},
1776
+ args: [],
1777
+ source: "name\x0a\x09^ name",
1778
+ messageSends: [],
1779
+ referencedClasses: []
1780
+ }),
1781
+ smalltalk.IRTempDeclaration);
1782
+
1783
+ smalltalk.addMethod(
1784
+ "_name_",
1785
+ smalltalk.method({
1786
+ selector: "name:",
1787
+ category: 'accessing',
1788
+ fn: function (aString){
1789
+ var self=this;
1790
+ return smalltalk.withContext(function($ctx1) {
1791
+ return self}, function($ctx1) {$ctx1.fill(self,"name:",{aString:aString}, smalltalk.IRTempDeclaration)})},
1792
+ args: ["aString"],
1793
+ source: "name: aString\x0a\x09name := aString",
1794
+ messageSends: [],
1795
+ referencedClasses: []
1796
+ }),
1797
+ smalltalk.IRTempDeclaration);
1798
+
1799
+
1800
+
1522
1801
  smalltalk.addClass('IRSend', smalltalk.IRInstruction, ['selector', 'classSend', 'index'], 'Compiler-IR');
1523
- smalltalk.IRSend.comment="I am a message send instruction. "
1802
+ smalltalk.IRSend.comment="I am a message send instruction."
1524
1803
  smalltalk.addMethod(
1525
1804
  "_accept_",
1526
1805
  smalltalk.method({
@@ -1528,10 +1807,10 @@ selector: "accept:",
1528
1807
  category: 'visiting',
1529
1808
  fn: function (aVisitor){
1530
1809
  var self=this;
1531
- var $1;
1532
- $1=smalltalk.send(aVisitor,"_visitIRSend_",[self]);
1810
+ return smalltalk.withContext(function($ctx1) {
1811
+ $1=_st(aVisitor)._visitIRSend_(self);
1533
1812
  return $1;
1534
- },
1813
+ }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRSend)})},
1535
1814
  args: ["aVisitor"],
1536
1815
  source: "accept: aVisitor\x0a\x09^ aVisitor visitIRSend: self",
1537
1816
  messageSends: ["visitIRSend:"],
@@ -1546,8 +1825,10 @@ selector: "classSend",
1546
1825
  category: 'accessing',
1547
1826
  fn: function (){
1548
1827
  var self=this;
1549
- return self["@classSend"];
1550
- },
1828
+ return smalltalk.withContext(function($ctx1) {
1829
+ $1=self["@classSend"];
1830
+ return $1;
1831
+ }, function($ctx1) {$ctx1.fill(self,"classSend",{}, smalltalk.IRSend)})},
1551
1832
  args: [],
1552
1833
  source: "classSend\x0a\x09^ classSend",
1553
1834
  messageSends: [],
@@ -1562,8 +1843,8 @@ selector: "classSend:",
1562
1843
  category: 'accessing',
1563
1844
  fn: function (aClass){
1564
1845
  var self=this;
1565
- self["@classSend"]=aClass;
1566
- return self},
1846
+ return smalltalk.withContext(function($ctx1) {
1847
+ return self}, function($ctx1) {$ctx1.fill(self,"classSend:",{aClass:aClass}, smalltalk.IRSend)})},
1567
1848
  args: ["aClass"],
1568
1849
  source: "classSend: aClass\x0a\x09classSend := aClass",
1569
1850
  messageSends: [],
@@ -1578,8 +1859,10 @@ selector: "index",
1578
1859
  category: 'accessing',
1579
1860
  fn: function (){
1580
1861
  var self=this;
1581
- return self["@index"];
1582
- },
1862
+ return smalltalk.withContext(function($ctx1) {
1863
+ $1=self["@index"];
1864
+ return $1;
1865
+ }, function($ctx1) {$ctx1.fill(self,"index",{}, smalltalk.IRSend)})},
1583
1866
  args: [],
1584
1867
  source: "index\x0a\x09^ index",
1585
1868
  messageSends: [],
@@ -1594,8 +1877,8 @@ selector: "index:",
1594
1877
  category: 'accessing',
1595
1878
  fn: function (anInteger){
1596
1879
  var self=this;
1597
- self["@index"]=anInteger;
1598
- return self},
1880
+ return smalltalk.withContext(function($ctx1) {
1881
+ return self}, function($ctx1) {$ctx1.fill(self,"index:",{anInteger:anInteger}, smalltalk.IRSend)})},
1599
1882
  args: ["anInteger"],
1600
1883
  source: "index: anInteger\x0a\x09index := anInteger",
1601
1884
  messageSends: [],
@@ -1610,8 +1893,8 @@ selector: "isSend",
1610
1893
  category: 'testing',
1611
1894
  fn: function (){
1612
1895
  var self=this;
1613
- return true;
1614
- },
1896
+ return smalltalk.withContext(function($ctx1) {
1897
+ }, function($ctx1) {$ctx1.fill(self,"isSend",{}, smalltalk.IRSend)})},
1615
1898
  args: [],
1616
1899
  source: "isSend\x0a\x09^ true",
1617
1900
  messageSends: [],
@@ -1619,6 +1902,29 @@ referencedClasses: []
1619
1902
  }),
1620
1903
  smalltalk.IRSend);
1621
1904
 
1905
+ smalltalk.addMethod(
1906
+ "_javascriptSelector",
1907
+ smalltalk.method({
1908
+ selector: "javascriptSelector",
1909
+ category: 'accessing',
1910
+ fn: function (){
1911
+ var self=this;
1912
+ return smalltalk.withContext(function($ctx1) {
1913
+ $2=_st(self)._classSend();
1914
+ if(($receiver = $2) == nil || $receiver == undefined){
1915
+ $1=_st(_st(self)._selector())._asSelector();
1916
+ } else {
1917
+ $1=_st(_st(self)._selector())._asSuperSelector();
1918
+ };
1919
+ return $1;
1920
+ }, function($ctx1) {$ctx1.fill(self,"javascriptSelector",{}, smalltalk.IRSend)})},
1921
+ args: [],
1922
+ source: "javascriptSelector\x0a\x09^ self classSend \x0a \x09ifNil: [ self selector asSelector ]\x0a \x09ifNotNil: [ self selector asSuperSelector ]",
1923
+ messageSends: ["ifNil:ifNotNil:", "asSelector", "selector", "asSuperSelector", "classSend"],
1924
+ referencedClasses: []
1925
+ }),
1926
+ smalltalk.IRSend);
1927
+
1622
1928
  smalltalk.addMethod(
1623
1929
  "_selector",
1624
1930
  smalltalk.method({
@@ -1626,8 +1932,10 @@ selector: "selector",
1626
1932
  category: 'accessing',
1627
1933
  fn: function (){
1628
1934
  var self=this;
1629
- return self["@selector"];
1630
- },
1935
+ return smalltalk.withContext(function($ctx1) {
1936
+ $1=self["@selector"];
1937
+ return $1;
1938
+ }, function($ctx1) {$ctx1.fill(self,"selector",{}, smalltalk.IRSend)})},
1631
1939
  args: [],
1632
1940
  source: "selector\x0a\x09^ selector",
1633
1941
  messageSends: [],
@@ -1642,8 +1950,8 @@ selector: "selector:",
1642
1950
  category: 'accessing',
1643
1951
  fn: function (aString){
1644
1952
  var self=this;
1645
- self["@selector"]=aString;
1646
- return self},
1953
+ return smalltalk.withContext(function($ctx1) {
1954
+ return self}, function($ctx1) {$ctx1.fill(self,"selector:",{aString:aString}, smalltalk.IRSend)})},
1647
1955
  args: ["aString"],
1648
1956
  source: "selector: aString\x0a\x09selector := aString",
1649
1957
  messageSends: [],
@@ -1661,10 +1969,10 @@ selector: "accept:",
1661
1969
  category: 'visiting',
1662
1970
  fn: function (aVisitor){
1663
1971
  var self=this;
1664
- var $1;
1665
- $1=smalltalk.send(aVisitor,"_visitIRSequence_",[self]);
1972
+ return smalltalk.withContext(function($ctx1) {
1973
+ $1=_st(aVisitor)._visitIRSequence_(self);
1666
1974
  return $1;
1667
- },
1975
+ }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRSequence)})},
1668
1976
  args: ["aVisitor"],
1669
1977
  source: "accept: aVisitor\x0a\x09^ aVisitor visitIRSequence: self",
1670
1978
  messageSends: ["visitIRSequence:"],
@@ -1679,8 +1987,8 @@ selector: "isSequence",
1679
1987
  category: 'testing',
1680
1988
  fn: function (){
1681
1989
  var self=this;
1682
- return true;
1683
- },
1990
+ return smalltalk.withContext(function($ctx1) {
1991
+ }, function($ctx1) {$ctx1.fill(self,"isSequence",{}, smalltalk.IRSequence)})},
1684
1992
  args: [],
1685
1993
  source: "isSequence\x0a\x09^ true",
1686
1994
  messageSends: [],
@@ -1698,10 +2006,10 @@ selector: "accept:",
1698
2006
  category: 'visiting',
1699
2007
  fn: function (aVisitor){
1700
2008
  var self=this;
1701
- var $1;
1702
- $1=smalltalk.send(aVisitor,"_visitIRBlockSequence_",[self]);
2009
+ return smalltalk.withContext(function($ctx1) {
2010
+ $1=_st(aVisitor)._visitIRBlockSequence_(self);
1703
2011
  return $1;
1704
- },
2012
+ }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRBlockSequence)})},
1705
2013
  args: ["aVisitor"],
1706
2014
  source: "accept: aVisitor\x0a\x09^ aVisitor visitIRBlockSequence: self",
1707
2015
  messageSends: ["visitIRBlockSequence:"],
@@ -1711,76 +2019,6 @@ smalltalk.IRBlockSequence);
1711
2019
 
1712
2020
 
1713
2021
 
1714
- smalltalk.addClass('IRTempDeclaration', smalltalk.IRInstruction, ['name'], 'Compiler-IR');
1715
- smalltalk.IRTempDeclaration.comment="I am a temporary variable declaration instruction"
1716
- smalltalk.addMethod(
1717
- "_accept_",
1718
- smalltalk.method({
1719
- selector: "accept:",
1720
- category: 'visiting',
1721
- fn: function (aVisitor){
1722
- var self=this;
1723
- var $1;
1724
- $1=smalltalk.send(aVisitor,"_visitIRTempDeclaration_",[self]);
1725
- return $1;
1726
- },
1727
- args: ["aVisitor"],
1728
- source: "accept: aVisitor\x0a\x09^ aVisitor visitIRTempDeclaration: self",
1729
- messageSends: ["visitIRTempDeclaration:"],
1730
- referencedClasses: []
1731
- }),
1732
- smalltalk.IRTempDeclaration);
1733
-
1734
- smalltalk.addMethod(
1735
- "_isTempDeclaration",
1736
- smalltalk.method({
1737
- selector: "isTempDeclaration",
1738
- category: 'visiting',
1739
- fn: function (){
1740
- var self=this;
1741
- return true;
1742
- },
1743
- args: [],
1744
- source: "isTempDeclaration\x0a\x09^ true",
1745
- messageSends: [],
1746
- referencedClasses: []
1747
- }),
1748
- smalltalk.IRTempDeclaration);
1749
-
1750
- smalltalk.addMethod(
1751
- "_name",
1752
- smalltalk.method({
1753
- selector: "name",
1754
- category: 'accessing',
1755
- fn: function (){
1756
- var self=this;
1757
- return self["@name"];
1758
- },
1759
- args: [],
1760
- source: "name\x0a\x09^ name",
1761
- messageSends: [],
1762
- referencedClasses: []
1763
- }),
1764
- smalltalk.IRTempDeclaration);
1765
-
1766
- smalltalk.addMethod(
1767
- "_name_",
1768
- smalltalk.method({
1769
- selector: "name:",
1770
- category: 'accessing',
1771
- fn: function (aString){
1772
- var self=this;
1773
- self["@name"]=aString;
1774
- return self},
1775
- args: ["aString"],
1776
- source: "name: aString\x0a\x09name := aString",
1777
- messageSends: [],
1778
- referencedClasses: []
1779
- }),
1780
- smalltalk.IRTempDeclaration);
1781
-
1782
-
1783
-
1784
2022
  smalltalk.addClass('IRValue', smalltalk.IRInstruction, ['value'], 'Compiler-IR');
1785
2023
  smalltalk.IRValue.comment="I am the simplest possible instruction. I represent a value."
1786
2024
  smalltalk.addMethod(
@@ -1790,10 +2028,10 @@ selector: "accept:",
1790
2028
  category: 'visiting',
1791
2029
  fn: function (aVisitor){
1792
2030
  var self=this;
1793
- var $1;
1794
- $1=smalltalk.send(aVisitor,"_visitIRValue_",[self]);
2031
+ return smalltalk.withContext(function($ctx1) {
2032
+ $1=_st(aVisitor)._visitIRValue_(self);
1795
2033
  return $1;
1796
- },
2034
+ }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRValue)})},
1797
2035
  args: ["aVisitor"],
1798
2036
  source: "accept: aVisitor\x0a\x09^ aVisitor visitIRValue: self",
1799
2037
  messageSends: ["visitIRValue:"],
@@ -1808,8 +2046,10 @@ selector: "value",
1808
2046
  category: 'accessing',
1809
2047
  fn: function (){
1810
2048
  var self=this;
1811
- return self["@value"];
1812
- },
2049
+ return smalltalk.withContext(function($ctx1) {
2050
+ $1=self["@value"];
2051
+ return $1;
2052
+ }, function($ctx1) {$ctx1.fill(self,"value",{}, smalltalk.IRValue)})},
1813
2053
  args: [],
1814
2054
  source: "value\x0a\x09^value",
1815
2055
  messageSends: [],
@@ -1824,8 +2064,8 @@ selector: "value:",
1824
2064
  category: 'accessing',
1825
2065
  fn: function (aString){
1826
2066
  var self=this;
1827
- self["@value"]=aString;
1828
- return self},
2067
+ return smalltalk.withContext(function($ctx1) {
2068
+ return self}, function($ctx1) {$ctx1.fill(self,"value:",{aString:aString}, smalltalk.IRValue)})},
1829
2069
  args: ["aString"],
1830
2070
  source: "value: aString\x0a\x09value := aString",
1831
2071
  messageSends: [],
@@ -1844,10 +2084,10 @@ selector: "accept:",
1844
2084
  category: 'visiting',
1845
2085
  fn: function (aVisitor){
1846
2086
  var self=this;
1847
- var $1;
1848
- $1=smalltalk.send(aVisitor,"_visitIRVariable_",[self]);
2087
+ return smalltalk.withContext(function($ctx1) {
2088
+ $1=_st(aVisitor)._visitIRVariable_(self);
1849
2089
  return $1;
1850
- },
2090
+ }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRVariable)})},
1851
2091
  args: ["aVisitor"],
1852
2092
  source: "accept: aVisitor\x0a\x09^ aVisitor visitIRVariable: self",
1853
2093
  messageSends: ["visitIRVariable:"],
@@ -1862,8 +2102,8 @@ selector: "isVariable",
1862
2102
  category: 'testing',
1863
2103
  fn: function (){
1864
2104
  var self=this;
1865
- return true;
1866
- },
2105
+ return smalltalk.withContext(function($ctx1) {
2106
+ }, function($ctx1) {$ctx1.fill(self,"isVariable",{}, smalltalk.IRVariable)})},
1867
2107
  args: [],
1868
2108
  source: "isVariable\x0a\x09^ true",
1869
2109
  messageSends: [],
@@ -1878,8 +2118,10 @@ selector: "variable",
1878
2118
  category: 'accessing',
1879
2119
  fn: function (){
1880
2120
  var self=this;
1881
- return self["@variable"];
1882
- },
2121
+ return smalltalk.withContext(function($ctx1) {
2122
+ $1=self["@variable"];
2123
+ return $1;
2124
+ }, function($ctx1) {$ctx1.fill(self,"variable",{}, smalltalk.IRVariable)})},
1883
2125
  args: [],
1884
2126
  source: "variable\x0a\x09^ variable",
1885
2127
  messageSends: [],
@@ -1894,8 +2136,8 @@ selector: "variable:",
1894
2136
  category: 'accessing',
1895
2137
  fn: function (aScopeVariable){
1896
2138
  var self=this;
1897
- self["@variable"]=aScopeVariable;
1898
- return self},
2139
+ return smalltalk.withContext(function($ctx1) {
2140
+ return self}, function($ctx1) {$ctx1.fill(self,"variable:",{aScopeVariable:aScopeVariable}, smalltalk.IRVariable)})},
1899
2141
  args: ["aScopeVariable"],
1900
2142
  source: "variable: aScopeVariable\x0a\x09variable := aScopeVariable",
1901
2143
  messageSends: [],
@@ -1913,10 +2155,10 @@ selector: "accept:",
1913
2155
  category: 'visiting',
1914
2156
  fn: function (aVisitor){
1915
2157
  var self=this;
1916
- var $1;
1917
- $1=smalltalk.send(aVisitor,"_visitIRVerbatim_",[self]);
2158
+ return smalltalk.withContext(function($ctx1) {
2159
+ $1=_st(aVisitor)._visitIRVerbatim_(self);
1918
2160
  return $1;
1919
- },
2161
+ }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRVerbatim)})},
1920
2162
  args: ["aVisitor"],
1921
2163
  source: "accept: aVisitor\x0a\x09^ aVisitor visitIRVerbatim: self",
1922
2164
  messageSends: ["visitIRVerbatim:"],
@@ -1931,8 +2173,10 @@ selector: "source",
1931
2173
  category: 'accessing',
1932
2174
  fn: function (){
1933
2175
  var self=this;
1934
- return self["@source"];
1935
- },
2176
+ return smalltalk.withContext(function($ctx1) {
2177
+ $1=self["@source"];
2178
+ return $1;
2179
+ }, function($ctx1) {$ctx1.fill(self,"source",{}, smalltalk.IRVerbatim)})},
1936
2180
  args: [],
1937
2181
  source: "source\x0a\x09^ source",
1938
2182
  messageSends: [],
@@ -1947,8 +2191,8 @@ selector: "source:",
1947
2191
  category: 'accessing',
1948
2192
  fn: function (aString){
1949
2193
  var self=this;
1950
- self["@source"]=aString;
1951
- return self},
2194
+ return smalltalk.withContext(function($ctx1) {
2195
+ return self}, function($ctx1) {$ctx1.fill(self,"source:",{aString:aString}, smalltalk.IRVerbatim)})},
1952
2196
  args: ["aString"],
1953
2197
  source: "source: aString\x0a\x09source := aString",
1954
2198
  messageSends: [],
@@ -1966,10 +2210,10 @@ selector: "visit:",
1966
2210
  category: 'visiting',
1967
2211
  fn: function (anIRInstruction){
1968
2212
  var self=this;
1969
- var $1;
1970
- $1=smalltalk.send(anIRInstruction,"_accept_",[self]);
2213
+ return smalltalk.withContext(function($ctx1) {
2214
+ $1=_st(anIRInstruction)._accept_(self);
1971
2215
  return $1;
1972
- },
2216
+ }, function($ctx1) {$ctx1.fill(self,"visit:",{anIRInstruction:anIRInstruction}, smalltalk.IRVisitor)})},
1973
2217
  args: ["anIRInstruction"],
1974
2218
  source: "visit: anIRInstruction\x0a\x09^ anIRInstruction accept: self",
1975
2219
  messageSends: ["accept:"],
@@ -1984,10 +2228,10 @@ selector: "visitIRAssignment:",
1984
2228
  category: 'visiting',
1985
2229
  fn: function (anIRAssignment){
1986
2230
  var self=this;
1987
- var $1;
1988
- $1=smalltalk.send(self,"_visitIRInstruction_",[anIRAssignment]);
2231
+ return smalltalk.withContext(function($ctx1) {
2232
+ $1=_st(self)._visitIRInstruction_(anIRAssignment);
1989
2233
  return $1;
1990
- },
2234
+ }, function($ctx1) {$ctx1.fill(self,"visitIRAssignment:",{anIRAssignment:anIRAssignment}, smalltalk.IRVisitor)})},
1991
2235
  args: ["anIRAssignment"],
1992
2236
  source: "visitIRAssignment: anIRAssignment\x0a\x09^ self visitIRInstruction: anIRAssignment",
1993
2237
  messageSends: ["visitIRInstruction:"],
@@ -2002,10 +2246,10 @@ selector: "visitIRBlockReturn:",
2002
2246
  category: 'visiting',
2003
2247
  fn: function (anIRBlockReturn){
2004
2248
  var self=this;
2005
- var $1;
2006
- $1=smalltalk.send(self,"_visitIRReturn_",[anIRBlockReturn]);
2249
+ return smalltalk.withContext(function($ctx1) {
2250
+ $1=_st(self)._visitIRReturn_(anIRBlockReturn);
2007
2251
  return $1;
2008
- },
2252
+ }, function($ctx1) {$ctx1.fill(self,"visitIRBlockReturn:",{anIRBlockReturn:anIRBlockReturn}, smalltalk.IRVisitor)})},
2009
2253
  args: ["anIRBlockReturn"],
2010
2254
  source: "visitIRBlockReturn: anIRBlockReturn\x0a\x09^ self visitIRReturn: anIRBlockReturn",
2011
2255
  messageSends: ["visitIRReturn:"],
@@ -2020,10 +2264,10 @@ selector: "visitIRBlockSequence:",
2020
2264
  category: 'visiting',
2021
2265
  fn: function (anIRBlockSequence){
2022
2266
  var self=this;
2023
- var $1;
2024
- $1=smalltalk.send(self,"_visitIRSequence_",[anIRBlockSequence]);
2267
+ return smalltalk.withContext(function($ctx1) {
2268
+ $1=_st(self)._visitIRSequence_(anIRBlockSequence);
2025
2269
  return $1;
2026
- },
2270
+ }, function($ctx1) {$ctx1.fill(self,"visitIRBlockSequence:",{anIRBlockSequence:anIRBlockSequence}, smalltalk.IRVisitor)})},
2027
2271
  args: ["anIRBlockSequence"],
2028
2272
  source: "visitIRBlockSequence: anIRBlockSequence\x0a\x09^ self visitIRSequence: anIRBlockSequence",
2029
2273
  messageSends: ["visitIRSequence:"],
@@ -2038,10 +2282,10 @@ selector: "visitIRClosure:",
2038
2282
  category: 'visiting',
2039
2283
  fn: function (anIRClosure){
2040
2284
  var self=this;
2041
- var $1;
2042
- $1=smalltalk.send(self,"_visitIRInstruction_",[anIRClosure]);
2285
+ return smalltalk.withContext(function($ctx1) {
2286
+ $1=_st(self)._visitIRInstruction_(anIRClosure);
2043
2287
  return $1;
2044
- },
2288
+ }, function($ctx1) {$ctx1.fill(self,"visitIRClosure:",{anIRClosure:anIRClosure}, smalltalk.IRVisitor)})},
2045
2289
  args: ["anIRClosure"],
2046
2290
  source: "visitIRClosure: anIRClosure\x0a\x09^ self visitIRInstruction: anIRClosure",
2047
2291
  messageSends: ["visitIRInstruction:"],
@@ -2056,10 +2300,10 @@ selector: "visitIRDynamicArray:",
2056
2300
  category: 'visiting',
2057
2301
  fn: function (anIRDynamicArray){
2058
2302
  var self=this;
2059
- var $1;
2060
- $1=smalltalk.send(self,"_visitIRInstruction_",[anIRDynamicArray]);
2303
+ return smalltalk.withContext(function($ctx1) {
2304
+ $1=_st(self)._visitIRInstruction_(anIRDynamicArray);
2061
2305
  return $1;
2062
- },
2306
+ }, function($ctx1) {$ctx1.fill(self,"visitIRDynamicArray:",{anIRDynamicArray:anIRDynamicArray}, smalltalk.IRVisitor)})},
2063
2307
  args: ["anIRDynamicArray"],
2064
2308
  source: "visitIRDynamicArray: anIRDynamicArray\x0a\x09^ self visitIRInstruction: anIRDynamicArray",
2065
2309
  messageSends: ["visitIRInstruction:"],
@@ -2074,10 +2318,10 @@ selector: "visitIRDynamicDictionary:",
2074
2318
  category: 'visiting',
2075
2319
  fn: function (anIRDynamicDictionary){
2076
2320
  var self=this;
2077
- var $1;
2078
- $1=smalltalk.send(self,"_visitIRInstruction_",[anIRDynamicDictionary]);
2321
+ return smalltalk.withContext(function($ctx1) {
2322
+ $1=_st(self)._visitIRInstruction_(anIRDynamicDictionary);
2079
2323
  return $1;
2080
- },
2324
+ }, function($ctx1) {$ctx1.fill(self,"visitIRDynamicDictionary:",{anIRDynamicDictionary:anIRDynamicDictionary}, smalltalk.IRVisitor)})},
2081
2325
  args: ["anIRDynamicDictionary"],
2082
2326
  source: "visitIRDynamicDictionary: anIRDynamicDictionary\x0a\x09^ self visitIRInstruction: anIRDynamicDictionary",
2083
2327
  messageSends: ["visitIRInstruction:"],
@@ -2092,10 +2336,10 @@ selector: "visitIRInlinedClosure:",
2092
2336
  category: 'visiting',
2093
2337
  fn: function (anIRInlinedClosure){
2094
2338
  var self=this;
2095
- var $1;
2096
- $1=smalltalk.send(self,"_visitIRClosure_",[anIRInlinedClosure]);
2339
+ return smalltalk.withContext(function($ctx1) {
2340
+ $1=_st(self)._visitIRClosure_(anIRInlinedClosure);
2097
2341
  return $1;
2098
- },
2342
+ }, function($ctx1) {$ctx1.fill(self,"visitIRInlinedClosure:",{anIRInlinedClosure:anIRInlinedClosure}, smalltalk.IRVisitor)})},
2099
2343
  args: ["anIRInlinedClosure"],
2100
2344
  source: "visitIRInlinedClosure: anIRInlinedClosure\x0a\x09^ self visitIRClosure: anIRInlinedClosure",
2101
2345
  messageSends: ["visitIRClosure:"],
@@ -2110,10 +2354,10 @@ selector: "visitIRInlinedSequence:",
2110
2354
  category: 'visiting',
2111
2355
  fn: function (anIRInlinedSequence){
2112
2356
  var self=this;
2113
- var $1;
2114
- $1=smalltalk.send(self,"_visitIRSequence_",[anIRInlinedSequence]);
2357
+ return smalltalk.withContext(function($ctx1) {
2358
+ $1=_st(self)._visitIRSequence_(anIRInlinedSequence);
2115
2359
  return $1;
2116
- },
2360
+ }, function($ctx1) {$ctx1.fill(self,"visitIRInlinedSequence:",{anIRInlinedSequence:anIRInlinedSequence}, smalltalk.IRVisitor)})},
2117
2361
  args: ["anIRInlinedSequence"],
2118
2362
  source: "visitIRInlinedSequence: anIRInlinedSequence\x0a\x09^ self visitIRSequence: anIRInlinedSequence",
2119
2363
  messageSends: ["visitIRSequence:"],
@@ -2128,11 +2372,13 @@ selector: "visitIRInstruction:",
2128
2372
  category: 'visiting',
2129
2373
  fn: function (anIRInstruction){
2130
2374
  var self=this;
2131
- smalltalk.send(smalltalk.send(anIRInstruction,"_instructions",[]),"_do_",[(function(each){
2132
- return smalltalk.send(self,"_visit_",[each]);
2133
- })]);
2134
- return anIRInstruction;
2135
- },
2375
+ return smalltalk.withContext(function($ctx1) {
2376
+ _st(_st(anIRInstruction)._instructions())._do_((function(each){
2377
+ return smalltalk.withContext(function($ctx2) {
2378
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
2379
+ $1=anIRInstruction;
2380
+ return $1;
2381
+ }, function($ctx1) {$ctx1.fill(self,"visitIRInstruction:",{anIRInstruction:anIRInstruction}, smalltalk.IRVisitor)})},
2136
2382
  args: ["anIRInstruction"],
2137
2383
  source: "visitIRInstruction: anIRInstruction\x0a\x09anIRInstruction instructions do: [ :each | self visit: each ].\x0a\x09^ anIRInstruction",
2138
2384
  messageSends: ["do:", "visit:", "instructions"],
@@ -2147,10 +2393,10 @@ selector: "visitIRMethod:",
2147
2393
  category: 'visiting',
2148
2394
  fn: function (anIRMethod){
2149
2395
  var self=this;
2150
- var $1;
2151
- $1=smalltalk.send(self,"_visitIRInstruction_",[anIRMethod]);
2396
+ return smalltalk.withContext(function($ctx1) {
2397
+ $1=_st(self)._visitIRInstruction_(anIRMethod);
2152
2398
  return $1;
2153
- },
2399
+ }, function($ctx1) {$ctx1.fill(self,"visitIRMethod:",{anIRMethod:anIRMethod}, smalltalk.IRVisitor)})},
2154
2400
  args: ["anIRMethod"],
2155
2401
  source: "visitIRMethod: anIRMethod\x0a\x09^ self visitIRInstruction: anIRMethod",
2156
2402
  messageSends: ["visitIRInstruction:"],
@@ -2165,10 +2411,10 @@ selector: "visitIRNonLocalReturn:",
2165
2411
  category: 'visiting',
2166
2412
  fn: function (anIRNonLocalReturn){
2167
2413
  var self=this;
2168
- var $1;
2169
- $1=smalltalk.send(self,"_visitIRInstruction_",[anIRNonLocalReturn]);
2414
+ return smalltalk.withContext(function($ctx1) {
2415
+ $1=_st(self)._visitIRInstruction_(anIRNonLocalReturn);
2170
2416
  return $1;
2171
- },
2417
+ }, function($ctx1) {$ctx1.fill(self,"visitIRNonLocalReturn:",{anIRNonLocalReturn:anIRNonLocalReturn}, smalltalk.IRVisitor)})},
2172
2418
  args: ["anIRNonLocalReturn"],
2173
2419
  source: "visitIRNonLocalReturn: anIRNonLocalReturn\x0a\x09^ self visitIRInstruction: anIRNonLocalReturn",
2174
2420
  messageSends: ["visitIRInstruction:"],
@@ -2183,10 +2429,10 @@ selector: "visitIRNonLocalReturnHandling:",
2183
2429
  category: 'visiting',
2184
2430
  fn: function (anIRNonLocalReturnHandling){
2185
2431
  var self=this;
2186
- var $1;
2187
- $1=smalltalk.send(self,"_visitIRInstruction_",[anIRNonLocalReturnHandling]);
2432
+ return smalltalk.withContext(function($ctx1) {
2433
+ $1=_st(self)._visitIRInstruction_(anIRNonLocalReturnHandling);
2188
2434
  return $1;
2189
- },
2435
+ }, function($ctx1) {$ctx1.fill(self,"visitIRNonLocalReturnHandling:",{anIRNonLocalReturnHandling:anIRNonLocalReturnHandling}, smalltalk.IRVisitor)})},
2190
2436
  args: ["anIRNonLocalReturnHandling"],
2191
2437
  source: "visitIRNonLocalReturnHandling: anIRNonLocalReturnHandling\x0a\x09^ self visitIRInstruction: anIRNonLocalReturnHandling",
2192
2438
  messageSends: ["visitIRInstruction:"],
@@ -2201,10 +2447,10 @@ selector: "visitIRReturn:",
2201
2447
  category: 'visiting',
2202
2448
  fn: function (anIRReturn){
2203
2449
  var self=this;
2204
- var $1;
2205
- $1=smalltalk.send(self,"_visitIRInstruction_",[anIRReturn]);
2450
+ return smalltalk.withContext(function($ctx1) {
2451
+ $1=_st(self)._visitIRInstruction_(anIRReturn);
2206
2452
  return $1;
2207
- },
2453
+ }, function($ctx1) {$ctx1.fill(self,"visitIRReturn:",{anIRReturn:anIRReturn}, smalltalk.IRVisitor)})},
2208
2454
  args: ["anIRReturn"],
2209
2455
  source: "visitIRReturn: anIRReturn\x0a\x09^ self visitIRInstruction: anIRReturn",
2210
2456
  messageSends: ["visitIRInstruction:"],
@@ -2219,10 +2465,10 @@ selector: "visitIRSend:",
2219
2465
  category: 'visiting',
2220
2466
  fn: function (anIRSend){
2221
2467
  var self=this;
2222
- var $1;
2223
- $1=smalltalk.send(self,"_visitIRInstruction_",[anIRSend]);
2468
+ return smalltalk.withContext(function($ctx1) {
2469
+ $1=_st(self)._visitIRInstruction_(anIRSend);
2224
2470
  return $1;
2225
- },
2471
+ }, function($ctx1) {$ctx1.fill(self,"visitIRSend:",{anIRSend:anIRSend}, smalltalk.IRVisitor)})},
2226
2472
  args: ["anIRSend"],
2227
2473
  source: "visitIRSend: anIRSend\x0a\x09^ self visitIRInstruction: anIRSend",
2228
2474
  messageSends: ["visitIRInstruction:"],
@@ -2237,10 +2483,10 @@ selector: "visitIRSequence:",
2237
2483
  category: 'visiting',
2238
2484
  fn: function (anIRSequence){
2239
2485
  var self=this;
2240
- var $1;
2241
- $1=smalltalk.send(self,"_visitIRInstruction_",[anIRSequence]);
2486
+ return smalltalk.withContext(function($ctx1) {
2487
+ $1=_st(self)._visitIRInstruction_(anIRSequence);
2242
2488
  return $1;
2243
- },
2489
+ }, function($ctx1) {$ctx1.fill(self,"visitIRSequence:",{anIRSequence:anIRSequence}, smalltalk.IRVisitor)})},
2244
2490
  args: ["anIRSequence"],
2245
2491
  source: "visitIRSequence: anIRSequence\x0a\x09^ self visitIRInstruction: anIRSequence",
2246
2492
  messageSends: ["visitIRInstruction:"],
@@ -2255,10 +2501,10 @@ selector: "visitIRTempDeclaration:",
2255
2501
  category: 'visiting',
2256
2502
  fn: function (anIRTempDeclaration){
2257
2503
  var self=this;
2258
- var $1;
2259
- $1=smalltalk.send(self,"_visitIRInstruction_",[anIRTempDeclaration]);
2504
+ return smalltalk.withContext(function($ctx1) {
2505
+ $1=_st(self)._visitIRInstruction_(anIRTempDeclaration);
2260
2506
  return $1;
2261
- },
2507
+ }, function($ctx1) {$ctx1.fill(self,"visitIRTempDeclaration:",{anIRTempDeclaration:anIRTempDeclaration}, smalltalk.IRVisitor)})},
2262
2508
  args: ["anIRTempDeclaration"],
2263
2509
  source: "visitIRTempDeclaration: anIRTempDeclaration\x0a\x09^ self visitIRInstruction: anIRTempDeclaration",
2264
2510
  messageSends: ["visitIRInstruction:"],
@@ -2273,10 +2519,10 @@ selector: "visitIRValue:",
2273
2519
  category: 'visiting',
2274
2520
  fn: function (anIRValue){
2275
2521
  var self=this;
2276
- var $1;
2277
- $1=smalltalk.send(self,"_visitIRInstruction_",[anIRValue]);
2522
+ return smalltalk.withContext(function($ctx1) {
2523
+ $1=_st(self)._visitIRInstruction_(anIRValue);
2278
2524
  return $1;
2279
- },
2525
+ }, function($ctx1) {$ctx1.fill(self,"visitIRValue:",{anIRValue:anIRValue}, smalltalk.IRVisitor)})},
2280
2526
  args: ["anIRValue"],
2281
2527
  source: "visitIRValue: anIRValue\x0a\x09^ self visitIRInstruction: anIRValue",
2282
2528
  messageSends: ["visitIRInstruction:"],
@@ -2291,10 +2537,10 @@ selector: "visitIRVariable:",
2291
2537
  category: 'visiting',
2292
2538
  fn: function (anIRVariable){
2293
2539
  var self=this;
2294
- var $1;
2295
- $1=smalltalk.send(self,"_visitIRInstruction_",[anIRVariable]);
2540
+ return smalltalk.withContext(function($ctx1) {
2541
+ $1=_st(self)._visitIRInstruction_(anIRVariable);
2296
2542
  return $1;
2297
- },
2543
+ }, function($ctx1) {$ctx1.fill(self,"visitIRVariable:",{anIRVariable:anIRVariable}, smalltalk.IRVisitor)})},
2298
2544
  args: ["anIRVariable"],
2299
2545
  source: "visitIRVariable: anIRVariable\x0a\x09^ self visitIRInstruction: anIRVariable",
2300
2546
  messageSends: ["visitIRInstruction:"],
@@ -2309,10 +2555,10 @@ selector: "visitIRVerbatim:",
2309
2555
  category: 'visiting',
2310
2556
  fn: function (anIRVerbatim){
2311
2557
  var self=this;
2312
- var $1;
2313
- $1=smalltalk.send(self,"_visitIRInstruction_",[anIRVerbatim]);
2558
+ return smalltalk.withContext(function($ctx1) {
2559
+ $1=_st(self)._visitIRInstruction_(anIRVerbatim);
2314
2560
  return $1;
2315
- },
2561
+ }, function($ctx1) {$ctx1.fill(self,"visitIRVerbatim:",{anIRVerbatim:anIRVerbatim}, smalltalk.IRVisitor)})},
2316
2562
  args: ["anIRVerbatim"],
2317
2563
  source: "visitIRVerbatim: anIRVerbatim\x0a\x09^ self visitIRInstruction: anIRVerbatim",
2318
2564
  messageSends: ["visitIRInstruction:"],
@@ -2330,10 +2576,10 @@ selector: "contents",
2330
2576
  category: 'accessing',
2331
2577
  fn: function (){
2332
2578
  var self=this;
2333
- var $1;
2334
- $1=smalltalk.send(smalltalk.send(self,"_stream",[]),"_contents",[]);
2579
+ return smalltalk.withContext(function($ctx1) {
2580
+ $1=_st(_st(self)._stream())._contents();
2335
2581
  return $1;
2336
- },
2582
+ }, function($ctx1) {$ctx1.fill(self,"contents",{}, smalltalk.IRJSTranslator)})},
2337
2583
  args: [],
2338
2584
  source: "contents\x0a\x09^ self stream contents",
2339
2585
  messageSends: ["contents", "stream"],
@@ -2348,9 +2594,9 @@ selector: "initialize",
2348
2594
  category: 'initialization',
2349
2595
  fn: function (){
2350
2596
  var self=this;
2351
- smalltalk.send(self,"_initialize",[],smalltalk.IRVisitor);
2352
- self["@stream"]=smalltalk.send((smalltalk.JSStream || JSStream),"_new",[]);
2353
- return self},
2597
+ return smalltalk.withContext(function($ctx1) {
2598
+ self["@stream"]=_st((smalltalk.JSStream || JSStream))._new();
2599
+ return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.IRJSTranslator)})},
2354
2600
  args: [],
2355
2601
  source: "initialize\x0a\x09super initialize.\x0a\x09stream := JSStream new.",
2356
2602
  messageSends: ["initialize", "new"],
@@ -2365,8 +2611,10 @@ selector: "stream",
2365
2611
  category: 'accessing',
2366
2612
  fn: function (){
2367
2613
  var self=this;
2368
- return self["@stream"];
2369
- },
2614
+ return smalltalk.withContext(function($ctx1) {
2615
+ $1=self["@stream"];
2616
+ return $1;
2617
+ }, function($ctx1) {$ctx1.fill(self,"stream",{}, smalltalk.IRJSTranslator)})},
2370
2618
  args: [],
2371
2619
  source: "stream\x0a\x09^ stream",
2372
2620
  messageSends: [],
@@ -2381,8 +2629,8 @@ selector: "stream:",
2381
2629
  category: 'accessing',
2382
2630
  fn: function (aStream){
2383
2631
  var self=this;
2384
- self["@stream"]=aStream;
2385
- return self},
2632
+ return smalltalk.withContext(function($ctx1) {
2633
+ return self}, function($ctx1) {$ctx1.fill(self,"stream:",{aStream:aStream}, smalltalk.IRJSTranslator)})},
2386
2634
  args: ["aStream"],
2387
2635
  source: "stream: aStream\x0a\x09stream := aStream",
2388
2636
  messageSends: [],
@@ -2397,10 +2645,10 @@ selector: "visitIRAssignment:",
2397
2645
  category: 'visiting',
2398
2646
  fn: function (anIRAssignment){
2399
2647
  var self=this;
2400
- smalltalk.send(self,"_visit_",[smalltalk.send(smalltalk.send(anIRAssignment,"_instructions",[]),"_first",[])]);
2401
- smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutAssignment",[]);
2402
- smalltalk.send(self,"_visit_",[smalltalk.send(smalltalk.send(anIRAssignment,"_instructions",[]),"_last",[])]);
2403
- return self},
2648
+ return smalltalk.withContext(function($ctx1) {
2649
+ _st(_st(self)._stream())._nextPutAssignment();
2650
+ _st(self)._visit_(_st(_st(anIRAssignment)._instructions())._last());
2651
+ return self}, function($ctx1) {$ctx1.fill(self,"visitIRAssignment:",{anIRAssignment:anIRAssignment}, smalltalk.IRJSTranslator)})},
2404
2652
  args: ["anIRAssignment"],
2405
2653
  source: "visitIRAssignment: anIRAssignment\x0a\x09self visit: anIRAssignment instructions first.\x0a\x09self stream nextPutAssignment.\x0a\x09self visit: anIRAssignment instructions last.",
2406
2654
  messageSends: ["visit:", "first", "instructions", "nextPutAssignment", "stream", "last"],
@@ -2415,13 +2663,18 @@ selector: "visitIRClosure:",
2415
2663
  category: 'visiting',
2416
2664
  fn: function (anIRClosure){
2417
2665
  var self=this;
2418
- smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutClosureWith_arguments_",[(function(){
2419
- return smalltalk.send(self,"_visitIRClosure_",[anIRClosure],smalltalk.IRVisitor);
2420
- }),smalltalk.send(anIRClosure,"_arguments",[])]);
2421
- return self},
2666
+ return smalltalk.withContext(function($ctx1) {
2667
+ return smalltalk.withContext(function($ctx2) {
2668
+ return smalltalk.withContext(function($ctx3) {
2669
+ }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})})));
2670
+ return _st(_st(self)._stream())._nextPutBlockContextFor_during_(anIRClosure,(function(){
2671
+ return smalltalk.withContext(function($ctx3) {
2672
+ }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
2673
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),_st(anIRClosure)._arguments());
2674
+ return self}, function($ctx1) {$ctx1.fill(self,"visitIRClosure:",{anIRClosure:anIRClosure}, smalltalk.IRJSTranslator)})},
2422
2675
  args: ["anIRClosure"],
2423
- source: "visitIRClosure: anIRClosure\x0a\x09self stream \x0a\x09\x09nextPutClosureWith: [ super visitIRClosure: anIRClosure ] \x0a\x09\x09arguments: anIRClosure arguments",
2424
- messageSends: ["nextPutClosureWith:arguments:", "visitIRClosure:", "arguments", "stream"],
2676
+ source: "visitIRClosure: anIRClosure\x0a\x09self stream \x0a\x09\x09nextPutClosureWith: [ \x0a \x09self stream nextPutVars: (anIRClosure tempDeclarations collect: [ :each |\x0a \x09\x09\x09\x09each name asVariableName ]).\x0a \x09self stream \x0a \x09nextPutBlockContextFor: anIRClosure\x0a during: [ super visitIRClosure: anIRClosure ] ]\x0a\x09\x09arguments: anIRClosure arguments",
2677
+ messageSends: ["nextPutClosureWith:arguments:", "nextPutVars:", "collect:", "asVariableName", "name", "tempDeclarations", "stream", "nextPutBlockContextFor:during:", "visitIRClosure:", "arguments"],
2425
2678
  referencedClasses: []
2426
2679
  }),
2427
2680
  smalltalk.IRJSTranslator);
@@ -2433,14 +2686,14 @@ selector: "visitIRDynamicArray:",
2433
2686
  category: 'visiting',
2434
2687
  fn: function (anIRDynamicArray){
2435
2688
  var self=this;
2436
- smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutAll_",["["]);
2437
- smalltalk.send(smalltalk.send(anIRDynamicArray,"_instructions",[]),"_do_separatedBy_",[(function(each){
2438
- return smalltalk.send(self,"_visit_",[each]);
2439
- }),(function(){
2440
- return smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutAll_",[","]);
2441
- })]);
2442
- smalltalk.send(self["@stream"],"_nextPutAll_",["]"]);
2443
- return self},
2689
+ return smalltalk.withContext(function($ctx1) {
2690
+ _st(_st(anIRDynamicArray)._instructions())._do_separatedBy_((function(each){
2691
+ return smalltalk.withContext(function($ctx2) {
2692
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
2693
+ return smalltalk.withContext(function($ctx2) {
2694
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
2695
+ _st(self["@stream"])._nextPutAll_("]");
2696
+ return self}, function($ctx1) {$ctx1.fill(self,"visitIRDynamicArray:",{anIRDynamicArray:anIRDynamicArray}, smalltalk.IRJSTranslator)})},
2444
2697
  args: ["anIRDynamicArray"],
2445
2698
  source: "visitIRDynamicArray: anIRDynamicArray\x0a\x09self stream nextPutAll: '['.\x0a\x09anIRDynamicArray instructions\x0a\x09\x09do: [ :each | self visit: each ]\x0a\x09\x09separatedBy: [ self stream nextPutAll: ',' ].\x0a\x09stream nextPutAll: ']'",
2446
2699
  messageSends: ["nextPutAll:", "stream", "do:separatedBy:", "visit:", "instructions"],
@@ -2455,14 +2708,14 @@ selector: "visitIRDynamicDictionary:",
2455
2708
  category: 'visiting',
2456
2709
  fn: function (anIRDynamicDictionary){
2457
2710
  var self=this;
2458
- smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutAll_",["smalltalk.HashedCollection._fromPairs_(["]);
2459
- smalltalk.send(smalltalk.send(anIRDynamicDictionary,"_instructions",[]),"_do_separatedBy_",[(function(each){
2460
- return smalltalk.send(self,"_visit_",[each]);
2461
- }),(function(){
2462
- return smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutAll_",[","]);
2463
- })]);
2464
- smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutAll_",["])"]);
2465
- return self},
2711
+ return smalltalk.withContext(function($ctx1) {
2712
+ _st(_st(anIRDynamicDictionary)._instructions())._do_separatedBy_((function(each){
2713
+ return smalltalk.withContext(function($ctx2) {
2714
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
2715
+ return smalltalk.withContext(function($ctx2) {
2716
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
2717
+ _st(_st(self)._stream())._nextPutAll_("])");
2718
+ return self}, function($ctx1) {$ctx1.fill(self,"visitIRDynamicDictionary:",{anIRDynamicDictionary:anIRDynamicDictionary}, smalltalk.IRJSTranslator)})},
2466
2719
  args: ["anIRDynamicDictionary"],
2467
2720
  source: "visitIRDynamicDictionary: anIRDynamicDictionary\x0a\x09self stream nextPutAll: 'smalltalk.HashedCollection._fromPairs_(['.\x0a\x09\x09anIRDynamicDictionary instructions \x0a\x09\x09\x09do: [ :each | self visit: each ]\x0a\x09\x09\x09separatedBy: [self stream nextPutAll: ',' ].\x0a\x09self stream nextPutAll: '])'",
2468
2721
  messageSends: ["nextPutAll:", "stream", "do:separatedBy:", "visit:", "instructions"],
@@ -2477,29 +2730,42 @@ selector: "visitIRMethod:",
2477
2730
  category: 'visiting',
2478
2731
  fn: function (anIRMethod){
2479
2732
  var self=this;
2480
- var $1,$2;
2481
- smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutMethodDeclaration_with_",[anIRMethod,(function(){
2482
- return smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutFunctionWith_arguments_",[(function(){
2483
- $1=smalltalk.send(smalltalk.send(anIRMethod,"_internalVariables",[]),"_notEmpty",[]);
2484
- if(smalltalk.assert($1)){
2485
- smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutVars_",[smalltalk.send(smalltalk.send(smalltalk.send(anIRMethod,"_internalVariables",[]),"_asArray",[]),"_collect_",[(function(each){
2486
- return smalltalk.send(smalltalk.send(each,"_variable",[]),"_alias",[]);
2487
- })])]);
2733
+ return smalltalk.withContext(function($ctx1) {
2734
+ $1=_st(self)._stream();
2735
+ $2=anIRMethod;
2736
+ $3=(function(){
2737
+ return smalltalk.withContext(function($ctx2) {
2738
+ $5=(function(){
2739
+ return smalltalk.withContext(function($ctx3) {
2740
+ return smalltalk.withContext(function($ctx4) {
2741
+ }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx1)})})));
2742
+ $6=_st(self)._stream();
2743
+ $7=anIRMethod;
2744
+ $8=(function(){
2745
+ return smalltalk.withContext(function($ctx4) {
2746
+ if(smalltalk.assert($9)){
2747
+ _st(_st(self)._stream())._nextPutVars_(_st(_st(_st(anIRMethod)._internalVariables())._asArray())._collect_((function(each){
2748
+ return smalltalk.withContext(function($ctx5) {
2749
+ }, function($ctx5) {$ctx5.fillBlock({each:each},$ctx1)})})));
2488
2750
  };
2489
- $2=smalltalk.send(smalltalk.send(anIRMethod,"_scope",[]),"_hasNonLocalReturn",[]);
2490
- if(smalltalk.assert($2)){
2491
- return smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutNonLocalReturnHandlingWith_",[(function(){
2492
- return smalltalk.send(self,"_visitIRMethod_",[anIRMethod],smalltalk.IRVisitor);
2493
- })]);
2751
+ $10=_st(_st(anIRMethod)._scope())._hasNonLocalReturn();
2752
+ if(smalltalk.assert($10)){
2753
+ return _st(_st(self)._stream())._nextPutNonLocalReturnHandlingWith_((function(){
2754
+ return smalltalk.withContext(function($ctx5) {
2755
+ }, function($ctx5) {$ctx5.fillBlock({},$ctx1)})}));
2494
2756
  } else {
2495
- return smalltalk.send(self,"_visitIRMethod_",[anIRMethod],smalltalk.IRVisitor);
2757
+ return smalltalk.IRVisitor.fn.prototype._visitIRMethod_.apply(_st(self), [anIRMethod]);
2496
2758
  };
2497
- }),smalltalk.send(anIRMethod,"_arguments",[])]);
2498
- })]);
2499
- return self},
2759
+ }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})});
2760
+ return _st($6)._nextPutContextFor_during_($7,$8);
2761
+ }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})});
2762
+ return _st($4)._nextPutFunctionWith_arguments_($5,_st(anIRMethod)._arguments());
2763
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
2764
+ _st($1)._nextPutMethodDeclaration_with_($2,$3);
2765
+ return self}, function($ctx1) {$ctx1.fill(self,"visitIRMethod:",{anIRMethod:anIRMethod}, smalltalk.IRJSTranslator)})},
2500
2766
  args: ["anIRMethod"],
2501
- source: "visitIRMethod: anIRMethod\x0a\x09self stream\x0a\x09\x09nextPutMethodDeclaration: anIRMethod \x0a\x09\x09with: [ self stream \x0a\x09\x09\x09nextPutFunctionWith: [ \x0a\x09\x09\x09\x09anIRMethod internalVariables notEmpty ifTrue: [\x0a\x09\x09\x09\x09\x09self stream nextPutVars: (anIRMethod internalVariables asArray collect: [ :each |\x0a\x09\x09\x09\x09\x09\x09each variable alias ]) ].\x0a\x09\x09\x09\x09anIRMethod scope hasNonLocalReturn \x0a\x09\x09\x09\x09\x09ifTrue: [\x0a\x09\x09\x09\x09\x09\x09self stream nextPutNonLocalReturnHandlingWith: [\x0a\x09\x09\x09\x09\x09\x09\x09super visitIRMethod: anIRMethod ]]\x0a\x09\x09\x09\x09\x09ifFalse: [ super visitIRMethod: anIRMethod ]]\x0a\x09\x09\x09arguments: anIRMethod arguments ]",
2502
- messageSends: ["nextPutMethodDeclaration:with:", "nextPutFunctionWith:arguments:", "ifTrue:", "nextPutVars:", "collect:", "alias", "variable", "asArray", "internalVariables", "stream", "notEmpty", "ifTrue:ifFalse:", "nextPutNonLocalReturnHandlingWith:", "visitIRMethod:", "hasNonLocalReturn", "scope", "arguments"],
2767
+ source: "visitIRMethod: anIRMethod\x0a\x0a\x09self stream\x0a\x09\x09nextPutMethodDeclaration: anIRMethod \x0a\x09\x09with: [ self stream \x0a\x09\x09\x09nextPutFunctionWith: [ \x0a \x09self stream nextPutVars: (anIRMethod tempDeclarations collect: [ :each |\x0a \x09\x09\x09\x09each name asVariableName ]).\x0a \x09self stream nextPutContextFor: anIRMethod during: [\x0a\x09\x09\x09\x09anIRMethod internalVariables notEmpty ifTrue: [\x0a\x09\x09\x09\x09\x09self stream nextPutVars: (anIRMethod internalVariables asArray collect: [ :each |\x0a\x09\x09\x09\x09\x09\x09each variable alias ]) ].\x0a\x09\x09\x09\x09anIRMethod scope hasNonLocalReturn \x0a\x09\x09\x09\x09\x09ifTrue: [\x0a\x09\x09\x09\x09\x09\x09self stream nextPutNonLocalReturnHandlingWith: [\x0a\x09\x09\x09\x09\x09\x09\x09super visitIRMethod: anIRMethod ]]\x0a\x09\x09\x09\x09\x09ifFalse: [ super visitIRMethod: anIRMethod ]]]\x0a\x09\x09\x09arguments: anIRMethod arguments ]",
2768
+ messageSends: ["nextPutMethodDeclaration:with:", "nextPutFunctionWith:arguments:", "nextPutVars:", "collect:", "asVariableName", "name", "tempDeclarations", "stream", "nextPutContextFor:during:", "ifTrue:", "alias", "variable", "asArray", "internalVariables", "notEmpty", "ifTrue:ifFalse:", "nextPutNonLocalReturnHandlingWith:", "visitIRMethod:", "hasNonLocalReturn", "scope", "arguments"],
2503
2769
  referencedClasses: []
2504
2770
  }),
2505
2771
  smalltalk.IRJSTranslator);
@@ -2511,10 +2777,10 @@ selector: "visitIRNonLocalReturn:",
2511
2777
  category: 'visiting',
2512
2778
  fn: function (anIRNonLocalReturn){
2513
2779
  var self=this;
2514
- smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutNonLocalReturnWith_",[(function(){
2515
- return smalltalk.send(self,"_visitIRNonLocalReturn_",[anIRNonLocalReturn],smalltalk.IRVisitor);
2516
- })]);
2517
- return self},
2780
+ return smalltalk.withContext(function($ctx1) {
2781
+ return smalltalk.withContext(function($ctx2) {
2782
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
2783
+ return self}, function($ctx1) {$ctx1.fill(self,"visitIRNonLocalReturn:",{anIRNonLocalReturn:anIRNonLocalReturn}, smalltalk.IRJSTranslator)})},
2518
2784
  args: ["anIRNonLocalReturn"],
2519
2785
  source: "visitIRNonLocalReturn: anIRNonLocalReturn\x0a\x09self stream nextPutNonLocalReturnWith: [\x0a\x09\x09super visitIRNonLocalReturn: anIRNonLocalReturn ]",
2520
2786
  messageSends: ["nextPutNonLocalReturnWith:", "visitIRNonLocalReturn:", "stream"],
@@ -2529,10 +2795,10 @@ selector: "visitIRReturn:",
2529
2795
  category: 'visiting',
2530
2796
  fn: function (anIRReturn){
2531
2797
  var self=this;
2532
- smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutReturnWith_",[(function(){
2533
- return smalltalk.send(self,"_visitIRReturn_",[anIRReturn],smalltalk.IRVisitor);
2534
- })]);
2535
- return self},
2798
+ return smalltalk.withContext(function($ctx1) {
2799
+ return smalltalk.withContext(function($ctx2) {
2800
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
2801
+ return self}, function($ctx1) {$ctx1.fill(self,"visitIRReturn:",{anIRReturn:anIRReturn}, smalltalk.IRJSTranslator)})},
2536
2802
  args: ["anIRReturn"],
2537
2803
  source: "visitIRReturn: anIRReturn\x0a\x09self stream nextPutReturnWith: [\x0a\x09\x09super visitIRReturn: anIRReturn ]",
2538
2804
  messageSends: ["nextPutReturnWith:", "visitIRReturn:", "stream"],
@@ -2547,27 +2813,37 @@ selector: "visitIRSend:",
2547
2813
  category: 'visiting',
2548
2814
  fn: function (anIRSend){
2549
2815
  var self=this;
2550
- var $1;
2551
- smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutAll_",["smalltalk.send("]);
2552
- smalltalk.send(self,"_visit_",[smalltalk.send(smalltalk.send(anIRSend,"_instructions",[]),"_first",[])]);
2553
- smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutAll_",[smalltalk.send(smalltalk.send(",\x22","__comma",[smalltalk.send(smalltalk.send(anIRSend,"_selector",[]),"_asSelector",[])]),"__comma",["\x22,["])]);
2554
- smalltalk.send(smalltalk.send(smalltalk.send(anIRSend,"_instructions",[]),"_allButFirst",[]),"_do_separatedBy_",[(function(each){
2555
- return smalltalk.send(self,"_visit_",[each]);
2556
- }),(function(){
2557
- return smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutAll_",[","]);
2558
- })]);
2559
- smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutAll_",["]"]);
2560
- $1=smalltalk.send(anIRSend,"_classSend",[]);
2816
+ return smalltalk.withContext(function($ctx1) {
2817
+ $1=_st(anIRSend)._classSend();
2561
2818
  if(($receiver = $1) == nil || $receiver == undefined){
2562
- $1;
2819
+ _st(_st(self)._stream())._nextPutAll_("_st(");
2820
+ _st(self)._visit_(_st(_st(anIRSend)._instructions())._first());
2821
+ _st(_st(self)._stream())._nextPutAll_(_st(_st(").").__comma(_st(_st(anIRSend)._selector())._asSelector())).__comma("("));
2822
+ _st(_st(_st(anIRSend)._instructions())._allButFirst())._do_separatedBy_((function(each){
2823
+ return smalltalk.withContext(function($ctx2) {
2824
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
2825
+ return smalltalk.withContext(function($ctx2) {
2826
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
2827
+ _st(_st(self)._stream())._nextPutAll_(")");
2563
2828
  } else {
2564
- smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutAll_",[smalltalk.send(",","__comma",[smalltalk.send(smalltalk.send(anIRSend,"_classSend",[]),"_asJavascript",[])])]);
2829
+ $2=_st(self)._stream();
2830
+ _st($2)._nextPutAll_(_st(_st(_st(anIRSend)._classSend())._asJavascript()).__comma(".fn.prototype."));
2831
+ _st($2)._nextPutAll_(_st(_st(_st(anIRSend)._selector())._asSelector()).__comma(".apply("));
2832
+ $3=_st($2)._nextPutAll_("_st(");
2833
+ $3;
2834
+ _st(self)._visit_(_st(_st(anIRSend)._instructions())._first());
2835
+ _st(_st(self)._stream())._nextPutAll_("), [");
2836
+ _st(_st(_st(anIRSend)._instructions())._allButFirst())._do_separatedBy_((function(each){
2837
+ return smalltalk.withContext(function($ctx2) {
2838
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
2839
+ return smalltalk.withContext(function($ctx2) {
2840
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
2841
+ _st(_st(self)._stream())._nextPutAll_("])");
2565
2842
  };
2566
- smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutAll_",[")"]);
2567
- return self},
2843
+ return self}, function($ctx1) {$ctx1.fill(self,"visitIRSend:",{anIRSend:anIRSend}, smalltalk.IRJSTranslator)})},
2568
2844
  args: ["anIRSend"],
2569
- source: "visitIRSend: anIRSend\x0a\x09self stream nextPutAll: 'smalltalk.send('.\x0a\x09self visit: anIRSend instructions first.\x0a\x09self stream nextPutAll: ',\x22', anIRSend selector asSelector, '\x22,['.\x0a\x09anIRSend instructions allButFirst\x0a\x09\x09do: [ :each | self visit: each ]\x0a\x09\x09separatedBy: [ self stream nextPutAll: ',' ].\x0a\x09self stream nextPutAll: ']'.\x0a\x09\x22anIRSend index > 1 \x0a\x09\x09ifTrue: [\x0a\x09\x09\x09anIRSend classSend \x0a\x09\x09\x09\x09ifNil: [ self stream nextPutAll: ',undefined' ]\x0a\x09\x09\x09\x09ifNotNil: [ self stream nextPutAll: ',', anIRSend classSend asJavascript ].\x0a\x09\x09\x09self stream nextPutAll: ',', anIRSend index asString ]\x0a\x09\x09ifFalse: [\x22\x0a\x09\x09\x09anIRSend classSend ifNotNil: [ \x0a\x09\x09\x09\x09self stream nextPutAll: ',', anIRSend classSend asJavascript ]\x22]\x22.\x0a\x09self stream nextPutAll: ')'",
2570
- messageSends: ["nextPutAll:", "stream", "visit:", "first", "instructions", ",", "asSelector", "selector", "do:separatedBy:", "allButFirst", "ifNotNil:", "asJavascript", "classSend"],
2845
+ source: "visitIRSend: anIRSend\x0a\x09anIRSend classSend \x0a \x09ifNil: [\x0a\x09\x09\x09self stream nextPutAll: '_st('.\x0a\x09\x09\x09self visit: anIRSend instructions first.\x0a \x09\x09 \x09self stream nextPutAll: ').', anIRSend selector asSelector, '('.\x0a\x09\x09\x09anIRSend instructions allButFirst\x0a\x09\x09\x09\x09do: [ :each | self visit: each ]\x0a\x09\x09\x09\x09separatedBy: [ self stream nextPutAll: ',' ].\x0a\x09\x09\x09self stream nextPutAll: ')' ]\x0a\x09\x09ifNotNil: [ \x0a\x09\x09\x09self stream \x0a \x09nextPutAll: anIRSend classSend asJavascript, '.fn.prototype.';\x0a\x09\x09\x09\x09nextPutAll: anIRSend selector asSelector, '.apply(';\x0a\x09\x09\x09\x09nextPutAll: '_st('.\x0a\x09\x09\x09self visit: anIRSend instructions first.\x0a\x09\x09\x09self stream nextPutAll: '), ['.\x0a\x09\x09\x09anIRSend instructions allButFirst\x0a\x09\x09\x09\x09do: [ :each | self visit: each ]\x0a\x09\x09\x09\x09separatedBy: [ self stream nextPutAll: ',' ].\x0a\x09\x09\x09self stream nextPutAll: '])' ]",
2846
+ messageSends: ["ifNil:ifNotNil:", "nextPutAll:", "stream", "visit:", "first", "instructions", ",", "asSelector", "selector", "do:separatedBy:", "allButFirst", "asJavascript", "classSend"],
2571
2847
  referencedClasses: []
2572
2848
  }),
2573
2849
  smalltalk.IRJSTranslator);
@@ -2579,12 +2855,12 @@ selector: "visitIRSequence:",
2579
2855
  category: 'visiting',
2580
2856
  fn: function (anIRSequence){
2581
2857
  var self=this;
2582
- smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutSequenceWith_",[(function(){
2583
- return smalltalk.send(smalltalk.send(anIRSequence,"_instructions",[]),"_do_",[(function(each){
2584
- return smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutStatementWith_",[smalltalk.send(self,"_visit_",[each])]);
2585
- })]);
2586
- })]);
2587
- return self},
2858
+ return smalltalk.withContext(function($ctx1) {
2859
+ return smalltalk.withContext(function($ctx2) {
2860
+ return smalltalk.withContext(function($ctx3) {
2861
+ }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}));
2862
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
2863
+ return self}, function($ctx1) {$ctx1.fill(self,"visitIRSequence:",{anIRSequence:anIRSequence}, smalltalk.IRJSTranslator)})},
2588
2864
  args: ["anIRSequence"],
2589
2865
  source: "visitIRSequence: anIRSequence\x0a\x09self stream nextPutSequenceWith: [\x0a\x09\x09anIRSequence instructions do: [ :each |\x0a\x09\x09\x09self stream nextPutStatementWith: (self visit: each) ]]",
2590
2866
  messageSends: ["nextPutSequenceWith:", "do:", "nextPutStatementWith:", "visit:", "stream", "instructions"],
@@ -2599,11 +2875,10 @@ selector: "visitIRTempDeclaration:",
2599
2875
  category: 'visiting',
2600
2876
  fn: function (anIRTempDeclaration){
2601
2877
  var self=this;
2602
- smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutVar_",[smalltalk.send(smalltalk.send(anIRTempDeclaration,"_name",[]),"_asVariableName",[])]);
2603
- return self},
2878
+ return smalltalk.withContext(function($ctx1) {
2604
2879
  args: ["anIRTempDeclaration"],
2605
- source: "visitIRTempDeclaration: anIRTempDeclaration\x0a\x09self stream nextPutVar: anIRTempDeclaration name asVariableName",
2606
- messageSends: ["nextPutVar:", "asVariableName", "name", "stream"],
2880
+ source: "visitIRTempDeclaration: anIRTempDeclaration\x0a\x09\x22self stream \x0a \x09nextPutAll: 'var ', anIRTempDeclaration name asVariableName, ';'; \x0a lf\x22",
2881
+ messageSends: [],
2607
2882
  referencedClasses: []
2608
2883
  }),
2609
2884
  smalltalk.IRJSTranslator);
@@ -2615,8 +2890,8 @@ selector: "visitIRValue:",
2615
2890
  category: 'visiting',
2616
2891
  fn: function (anIRValue){
2617
2892
  var self=this;
2618
- smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutAll_",[smalltalk.send(smalltalk.send(anIRValue,"_value",[]),"_asJavascript",[])]);
2619
- return self},
2893
+ return smalltalk.withContext(function($ctx1) {
2894
+ return self}, function($ctx1) {$ctx1.fill(self,"visitIRValue:",{anIRValue:anIRValue}, smalltalk.IRJSTranslator)})},
2620
2895
  args: ["anIRValue"],
2621
2896
  source: "visitIRValue: anIRValue\x0a\x09self stream nextPutAll: anIRValue value asJavascript",
2622
2897
  messageSends: ["nextPutAll:", "asJavascript", "value", "stream"],
@@ -2631,14 +2906,14 @@ selector: "visitIRVariable:",
2631
2906
  category: 'visiting',
2632
2907
  fn: function (anIRVariable){
2633
2908
  var self=this;
2634
- var $1;
2635
- $1=smalltalk.send(smalltalk.send(smalltalk.send(anIRVariable,"_variable",[]),"_name",[]),"__eq",["thisContext"]);
2909
+ return smalltalk.withContext(function($ctx1) {
2910
+ $1=_st(_st(_st(anIRVariable)._variable())._name()).__eq("thisContext");
2636
2911
  if(smalltalk.assert($1)){
2637
- smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutAll_",["smalltalk.getThisContext()"]);
2912
+ _st(_st(self)._stream())._nextPutAll_("smalltalk.getThisContext()");
2638
2913
  } else {
2639
- smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutAll_",[smalltalk.send(smalltalk.send(anIRVariable,"_variable",[]),"_alias",[])]);
2914
+ _st(_st(self)._stream())._nextPutAll_(_st(_st(anIRVariable)._variable())._alias());
2640
2915
  };
2641
- return self},
2916
+ return self}, function($ctx1) {$ctx1.fill(self,"visitIRVariable:",{anIRVariable:anIRVariable}, smalltalk.IRJSTranslator)})},
2642
2917
  args: ["anIRVariable"],
2643
2918
  source: "visitIRVariable: anIRVariable\x0a\x09anIRVariable variable name = 'thisContext'\x0a \x09ifTrue: [ self stream nextPutAll: 'smalltalk.getThisContext()' ]\x0a \x09ifFalse: [ self stream nextPutAll: anIRVariable variable alias ]",
2644
2919
  messageSends: ["ifTrue:ifFalse:", "nextPutAll:", "stream", "alias", "variable", "=", "name"],
@@ -2653,10 +2928,10 @@ selector: "visitIRVerbatim:",
2653
2928
  category: 'visiting',
2654
2929
  fn: function (anIRVerbatim){
2655
2930
  var self=this;
2656
- smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutStatementWith_",[(function(){
2657
- return smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutAll_",[smalltalk.send(anIRVerbatim,"_source",[])]);
2658
- })]);
2659
- return self},
2931
+ return smalltalk.withContext(function($ctx1) {
2932
+ return smalltalk.withContext(function($ctx2) {
2933
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
2934
+ return self}, function($ctx1) {$ctx1.fill(self,"visitIRVerbatim:",{anIRVerbatim:anIRVerbatim}, smalltalk.IRJSTranslator)})},
2660
2935
  args: ["anIRVerbatim"],
2661
2936
  source: "visitIRVerbatim: anIRVerbatim\x0a\x09self stream nextPutStatementWith: [\x0a\x09\x09self stream nextPutAll: anIRVerbatim source ]",
2662
2937
  messageSends: ["nextPutStatementWith:", "nextPutAll:", "source", "stream"],
@@ -2674,10 +2949,10 @@ selector: "contents",
2674
2949
  category: 'accessing',
2675
2950
  fn: function (){
2676
2951
  var self=this;
2677
- var $1;
2678
- $1=smalltalk.send(self["@stream"],"_contents",[]);
2952
+ return smalltalk.withContext(function($ctx1) {
2953
+ $1=_st(self["@stream"])._contents();
2679
2954
  return $1;
2680
- },
2955
+ }, function($ctx1) {$ctx1.fill(self,"contents",{}, smalltalk.JSStream)})},
2681
2956
  args: [],
2682
2957
  source: "contents\x0a\x09^ stream contents",
2683
2958
  messageSends: ["contents"],
@@ -2692,9 +2967,9 @@ selector: "initialize",
2692
2967
  category: 'initialization',
2693
2968
  fn: function (){
2694
2969
  var self=this;
2695
- smalltalk.send(self,"_initialize",[],smalltalk.Object);
2696
- self["@stream"]=smalltalk.send("","_writeStream",[]);
2697
- return self},
2970
+ return smalltalk.withContext(function($ctx1) {
2971
+ self["@stream"]=_st("")._writeStream();
2972
+ return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.JSStream)})},
2698
2973
  args: [],
2699
2974
  source: "initialize\x0a\x09super initialize.\x0a\x09stream := '' writeStream.",
2700
2975
  messageSends: ["initialize", "writeStream"],
@@ -2709,8 +2984,8 @@ selector: "lf",
2709
2984
  category: 'streaming',
2710
2985
  fn: function (){
2711
2986
  var self=this;
2712
- smalltalk.send(self["@stream"],"_lf",[]);
2713
- return self},
2987
+ return smalltalk.withContext(function($ctx1) {
2988
+ return self}, function($ctx1) {$ctx1.fill(self,"lf",{}, smalltalk.JSStream)})},
2714
2989
  args: [],
2715
2990
  source: "lf\x0a\x09stream lf",
2716
2991
  messageSends: ["lf"],
@@ -2725,8 +3000,8 @@ selector: "nextPut:",
2725
3000
  category: 'streaming',
2726
3001
  fn: function (aString){
2727
3002
  var self=this;
2728
- smalltalk.send(self["@stream"],"_nextPut_",[aString]);
2729
- return self},
3003
+ return smalltalk.withContext(function($ctx1) {
3004
+ return self}, function($ctx1) {$ctx1.fill(self,"nextPut:",{aString:aString}, smalltalk.JSStream)})},
2730
3005
  args: ["aString"],
2731
3006
  source: "nextPut: aString\x0a\x09stream nextPut: aString",
2732
3007
  messageSends: ["nextPut:"],
@@ -2741,8 +3016,8 @@ selector: "nextPutAll:",
2741
3016
  category: 'streaming',
2742
3017
  fn: function (aString){
2743
3018
  var self=this;
2744
- smalltalk.send(self["@stream"],"_nextPutAll_",[aString]);
2745
- return self},
3019
+ return smalltalk.withContext(function($ctx1) {
3020
+ return self}, function($ctx1) {$ctx1.fill(self,"nextPutAll:",{aString:aString}, smalltalk.JSStream)})},
2746
3021
  args: ["aString"],
2747
3022
  source: "nextPutAll: aString\x0a\x09stream nextPutAll: aString",
2748
3023
  messageSends: ["nextPutAll:"],
@@ -2757,8 +3032,8 @@ selector: "nextPutAssignment",
2757
3032
  category: 'streaming',
2758
3033
  fn: function (){
2759
3034
  var self=this;
2760
- smalltalk.send(self["@stream"],"_nextPutAll_",["="]);
2761
- return self},
3035
+ return smalltalk.withContext(function($ctx1) {
3036
+ return self}, function($ctx1) {$ctx1.fill(self,"nextPutAssignment",{}, smalltalk.JSStream)})},
2762
3037
  args: [],
2763
3038
  source: "nextPutAssignment\x0a\x09stream nextPutAll: '='",
2764
3039
  messageSends: ["nextPutAll:"],
@@ -2766,6 +3041,41 @@ referencedClasses: []
2766
3041
  }),
2767
3042
  smalltalk.JSStream);
2768
3043
 
3044
+ smalltalk.addMethod(
3045
+ "_nextPutBlockContextFor_during_",
3046
+ smalltalk.method({
3047
+ selector: "nextPutBlockContextFor:during:",
3048
+ category: 'streaming',
3049
+ fn: function (anIRClosure,aBlock){
3050
+ var self=this;
3051
+ return smalltalk.withContext(function($ctx1) {
3052
+ $1=self;
3053
+ _st($1)._nextPutAll_(_st(_st("return smalltalk.withContext(function(").__comma(_st(_st(anIRClosure)._scope())._alias())).__comma(") {"));
3054
+ $2=_st($1)._nextPutAll_(_st((smalltalk.String || String))._cr());
3055
+ _st(aBlock)._value();
3056
+ $3=self;
3057
+ _st($3)._nextPutAll_(_st(_st("}, function(").__comma(_st(_st(anIRClosure)._scope())._alias())).__comma(") {"));
3058
+ $4=_st($3)._nextPutAll_(_st(_st(_st(anIRClosure)._scope())._alias()).__comma(".fillBlock({"));
3059
+ _st(_st(anIRClosure)._locals())._do_separatedBy_((function(each){
3060
+ return smalltalk.withContext(function($ctx2) {
3061
+ _st($5)._nextPutAll_(_st(each)._asVariableName());
3062
+ _st($5)._nextPutAll_(":");
3063
+ $6=_st($5)._nextPutAll_(_st(each)._asVariableName());
3064
+ return $6;
3065
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
3066
+ return smalltalk.withContext(function($ctx2) {
3067
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
3068
+ $7=self;
3069
+ _st($7)._nextPutAll_("},");
3070
+ $8=_st($7)._nextPutAll_(_st(_st(_st(_st(anIRClosure)._method())._scope())._alias()).__comma(")})"));
3071
+ return self}, function($ctx1) {$ctx1.fill(self,"nextPutBlockContextFor:during:",{anIRClosure:anIRClosure,aBlock:aBlock}, smalltalk.JSStream)})},
3072
+ args: ["anIRClosure", "aBlock"],
3073
+ source: "nextPutBlockContextFor: anIRClosure during: aBlock\x0a\x09self \x0a \x09nextPutAll: 'return smalltalk.withContext(function(', anIRClosure scope alias, ') {'; \x0a nextPutAll: String cr.\x0a \x0a aBlock value.\x0a \x0a self \x0a \x09nextPutAll: '}, function(', anIRClosure scope alias, ') {';\x0a nextPutAll: anIRClosure scope alias, '.fillBlock({'.\x0a \x0a anIRClosure locals \x0a \x09do: [ :each |\x0a \x09\x09self \x0a \x09\x09nextPutAll: each asVariableName;\x0a \x09 \x09nextPutAll: ':';\x0a \x09\x09nextPutAll: each asVariableName]\x0a\x09\x09separatedBy: [ self nextPutAll: ',' ].\x0a \x0a self\x0a \x09nextPutAll: '},';\x0a nextPutAll: anIRClosure method scope alias, ')})'",
3074
+ messageSends: ["nextPutAll:", ",", "alias", "scope", "cr", "value", "do:separatedBy:", "asVariableName", "locals", "method"],
3075
+ referencedClasses: ["String"]
3076
+ }),
3077
+ smalltalk.JSStream);
3078
+
2769
3079
  smalltalk.addMethod(
2770
3080
  "_nextPutClosureWith_arguments_",
2771
3081
  smalltalk.method({
@@ -2773,18 +3083,19 @@ selector: "nextPutClosureWith:arguments:",
2773
3083
  category: 'streaming',
2774
3084
  fn: function (aBlock,anArray){
2775
3085
  var self=this;
2776
- var $1;
2777
- smalltalk.send(self["@stream"],"_nextPutAll_",["(function("]);
2778
- smalltalk.send(anArray,"_do_separatedBy_",[(function(each){
2779
- return smalltalk.send(self["@stream"],"_nextPutAll_",[smalltalk.send(each,"_asVariableName",[])]);
2780
- }),(function(){
2781
- return smalltalk.send(self["@stream"],"_nextPut_",[","]);
2782
- })]);
2783
- smalltalk.send(self["@stream"],"_nextPutAll_",["){"]);
2784
- $1=smalltalk.send(self["@stream"],"_lf",[]);
2785
- smalltalk.send(aBlock,"_value",[]);
2786
- smalltalk.send(self["@stream"],"_nextPutAll_",["})"]);
2787
- return self},
3086
+ return smalltalk.withContext(function($ctx1) {
3087
+ _st(self["@stream"])._nextPutAll_("(function(");
3088
+ _st(anArray)._do_separatedBy_((function(each){
3089
+ return smalltalk.withContext(function($ctx2) {
3090
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
3091
+ return smalltalk.withContext(function($ctx2) {
3092
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
3093
+ $1=self["@stream"];
3094
+ _st($1)._nextPutAll_("){");
3095
+ $2=_st($1)._lf();
3096
+ _st(aBlock)._value();
3097
+ _st(self["@stream"])._nextPutAll_("})");
3098
+ return self}, function($ctx1) {$ctx1.fill(self,"nextPutClosureWith:arguments:",{aBlock:aBlock,anArray:anArray}, smalltalk.JSStream)})},
2788
3099
  args: ["aBlock", "anArray"],
2789
3100
  source: "nextPutClosureWith: aBlock arguments: anArray\x0a\x09stream nextPutAll: '(function('.\x0a\x09anArray \x0a\x09\x09do: [ :each | stream nextPutAll: each asVariableName ]\x0a\x09\x09separatedBy: [ stream nextPut: ',' ].\x0a\x09stream nextPutAll: '){'; lf.\x0a\x09aBlock value.\x0a\x09stream nextPutAll: '})'",
2790
3101
  messageSends: ["nextPutAll:", "do:separatedBy:", "asVariableName", "nextPut:", "lf", "value"],
@@ -2792,6 +3103,42 @@ referencedClasses: []
2792
3103
  }),
2793
3104
  smalltalk.JSStream);
2794
3105
 
3106
+ smalltalk.addMethod(
3107
+ "_nextPutContextFor_during_",
3108
+ smalltalk.method({
3109
+ selector: "nextPutContextFor:during:",
3110
+ category: 'streaming',
3111
+ fn: function (aMethod,aBlock){
3112
+ var self=this;
3113
+ return smalltalk.withContext(function($ctx1) {
3114
+ $1=self;
3115
+ _st($1)._nextPutAll_(_st(_st("return smalltalk.withContext(function(").__comma(_st(_st(aMethod)._scope())._alias())).__comma(") { "));
3116
+ $2=_st($1)._nextPutAll_(_st((smalltalk.String || String))._cr());
3117
+ _st(aBlock)._value();
3118
+ $3=self;
3119
+ _st($3)._nextPutAll_(_st(_st(_st("}, function(").__comma(_st(_st(aMethod)._scope())._alias())).__comma(") {")).__comma(_st(_st(aMethod)._scope())._alias()));
3120
+ $4=_st($3)._nextPutAll_(_st(_st(".fill(self,").__comma(_st(_st(aMethod)._selector())._asJavascript())).__comma(",{"));
3121
+ _st(_st(aMethod)._locals())._do_separatedBy_((function(each){
3122
+ return smalltalk.withContext(function($ctx2) {
3123
+ _st($5)._nextPutAll_(_st(each)._asVariableName());
3124
+ _st($5)._nextPutAll_(":");
3125
+ $6=_st($5)._nextPutAll_(_st(each)._asVariableName());
3126
+ return $6;
3127
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
3128
+ return smalltalk.withContext(function($ctx2) {
3129
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
3130
+ $7=self;
3131
+ _st($7)._nextPutAll_("}, ");
3132
+ _st($7)._nextPutAll_(_st(_st(aMethod)._theClass())._asJavascript());
3133
+ $8=_st($7)._nextPutAll_(")})");
3134
+ return self}, function($ctx1) {$ctx1.fill(self,"nextPutContextFor:during:",{aMethod:aMethod,aBlock:aBlock}, smalltalk.JSStream)})},
3135
+ args: ["aMethod", "aBlock"],
3136
+ source: "nextPutContextFor: aMethod during: aBlock\x0a\x09self \x0a \x09nextPutAll: 'return smalltalk.withContext(function(', aMethod scope alias, ') { '; \x0a nextPutAll: String cr.\x0a aBlock value.\x0a \x0a self \x0a \x09nextPutAll: '}, function(', aMethod scope alias, ') {', aMethod scope alias; \x0a nextPutAll: '.fill(self,', aMethod selector asJavascript, ',{'.\x0a\x0a aMethod locals \x0a \x09do: [ :each |\x0a \x09\x09self \x0a \x09\x09nextPutAll: each asVariableName;\x0a \x09 \x09nextPutAll: ':';\x0a \x09\x09nextPutAll: each asVariableName]\x0a\x09\x09separatedBy: [ self nextPutAll: ',' ].\x0a \x0a self\x0a \x09nextPutAll: '}, ';\x0a nextPutAll: aMethod theClass asJavascript;\x0a nextPutAll: ')})'",
3137
+ messageSends: ["nextPutAll:", ",", "alias", "scope", "cr", "value", "asJavascript", "selector", "do:separatedBy:", "asVariableName", "locals", "theClass"],
3138
+ referencedClasses: ["String"]
3139
+ }),
3140
+ smalltalk.JSStream);
3141
+
2795
3142
  smalltalk.addMethod(
2796
3143
  "_nextPutFunctionWith_arguments_",
2797
3144
  smalltalk.method({
@@ -2799,20 +3146,22 @@ selector: "nextPutFunctionWith:arguments:",
2799
3146
  category: 'streaming',
2800
3147
  fn: function (aBlock,anArray){
2801
3148
  var self=this;
2802
- var $1,$2;
2803
- smalltalk.send(self["@stream"],"_nextPutAll_",["fn: function("]);
2804
- smalltalk.send(anArray,"_do_separatedBy_",[(function(each){
2805
- return smalltalk.send(self["@stream"],"_nextPutAll_",[smalltalk.send(each,"_asVariableName",[])]);
2806
- }),(function(){
2807
- return smalltalk.send(self["@stream"],"_nextPut_",[","]);
2808
- })]);
2809
- smalltalk.send(self["@stream"],"_nextPutAll_",["){"]);
2810
- $1=smalltalk.send(self["@stream"],"_lf",[]);
2811
- smalltalk.send(self["@stream"],"_nextPutAll_",["var self=this;"]);
2812
- $2=smalltalk.send(self["@stream"],"_lf",[]);
2813
- smalltalk.send(aBlock,"_value",[]);
2814
- smalltalk.send(self["@stream"],"_nextPutAll_",["}"]);
2815
- return self},
3149
+ return smalltalk.withContext(function($ctx1) {
3150
+ _st(self["@stream"])._nextPutAll_("fn: function(");
3151
+ _st(anArray)._do_separatedBy_((function(each){
3152
+ return smalltalk.withContext(function($ctx2) {
3153
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
3154
+ return smalltalk.withContext(function($ctx2) {
3155
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
3156
+ $1=self["@stream"];
3157
+ _st($1)._nextPutAll_("){");
3158
+ $2=_st($1)._lf();
3159
+ $3=self["@stream"];
3160
+ _st($3)._nextPutAll_("var self=this;");
3161
+ $4=_st($3)._lf();
3162
+ _st(aBlock)._value();
3163
+ _st(self["@stream"])._nextPutAll_("}");
3164
+ return self}, function($ctx1) {$ctx1.fill(self,"nextPutFunctionWith:arguments:",{aBlock:aBlock,anArray:anArray}, smalltalk.JSStream)})},
2816
3165
  args: ["aBlock", "anArray"],
2817
3166
  source: "nextPutFunctionWith: aBlock arguments: anArray\x0a\x09stream nextPutAll: 'fn: function('.\x0a\x09anArray \x0a\x09\x09do: [ :each | stream nextPutAll: each asVariableName ]\x0a\x09\x09separatedBy: [ stream nextPut: ',' ].\x0a\x09stream nextPutAll: '){'; lf.\x0a\x09stream nextPutAll: 'var self=this;'; lf.\x0a\x09aBlock value.\x0a\x09stream nextPutAll: '}'",
2818
3167
  messageSends: ["nextPutAll:", "do:separatedBy:", "asVariableName", "nextPut:", "lf", "value"],
@@ -2827,14 +3176,15 @@ selector: "nextPutIf:with:",
2827
3176
  category: 'streaming',
2828
3177
  fn: function (aBlock,anotherBlock){
2829
3178
  var self=this;
2830
- var $1;
2831
- smalltalk.send(self["@stream"],"_nextPutAll_",["if("]);
2832
- smalltalk.send(aBlock,"_value",[]);
2833
- smalltalk.send(self["@stream"],"_nextPutAll_",["){"]);
2834
- $1=smalltalk.send(self["@stream"],"_lf",[]);
2835
- smalltalk.send(anotherBlock,"_value",[]);
2836
- smalltalk.send(self["@stream"],"_nextPutAll_",["}"]);
2837
- return self},
3179
+ return smalltalk.withContext(function($ctx1) {
3180
+ _st(self["@stream"])._nextPutAll_("if(");
3181
+ _st(aBlock)._value();
3182
+ $1=self["@stream"];
3183
+ _st($1)._nextPutAll_("){");
3184
+ $2=_st($1)._lf();
3185
+ _st(anotherBlock)._value();
3186
+ _st(self["@stream"])._nextPutAll_("}");
3187
+ return self}, function($ctx1) {$ctx1.fill(self,"nextPutIf:with:",{aBlock:aBlock,anotherBlock:anotherBlock}, smalltalk.JSStream)})},
2838
3188
  args: ["aBlock", "anotherBlock"],
2839
3189
  source: "nextPutIf: aBlock with: anotherBlock\x0a\x09stream nextPutAll: 'if('.\x0a\x09aBlock value.\x0a\x09stream nextPutAll: '){'; lf.\x0a\x09anotherBlock value.\x0a\x09stream nextPutAll: '}'",
2840
3190
  messageSends: ["nextPutAll:", "value", "lf"],
@@ -2849,17 +3199,19 @@ selector: "nextPutIfElse:with:with:",
2849
3199
  category: 'streaming',
2850
3200
  fn: function (aBlock,ifBlock,elseBlock){
2851
3201
  var self=this;
2852
- var $1,$2;
2853
- smalltalk.send(self["@stream"],"_nextPutAll_",["if("]);
2854
- smalltalk.send(aBlock,"_value",[]);
2855
- smalltalk.send(self["@stream"],"_nextPutAll_",["){"]);
2856
- $1=smalltalk.send(self["@stream"],"_lf",[]);
2857
- smalltalk.send(ifBlock,"_value",[]);
2858
- smalltalk.send(self["@stream"],"_nextPutAll_",["} else {"]);
2859
- $2=smalltalk.send(self["@stream"],"_lf",[]);
2860
- smalltalk.send(elseBlock,"_value",[]);
2861
- smalltalk.send(self["@stream"],"_nextPutAll_",["}"]);
2862
- return self},
3202
+ return smalltalk.withContext(function($ctx1) {
3203
+ _st(self["@stream"])._nextPutAll_("if(");
3204
+ _st(aBlock)._value();
3205
+ $1=self["@stream"];
3206
+ _st($1)._nextPutAll_("){");
3207
+ $2=_st($1)._lf();
3208
+ _st(ifBlock)._value();
3209
+ $3=self["@stream"];
3210
+ _st($3)._nextPutAll_("} else {");
3211
+ $4=_st($3)._lf();
3212
+ _st(elseBlock)._value();
3213
+ _st(self["@stream"])._nextPutAll_("}");
3214
+ return self}, function($ctx1) {$ctx1.fill(self,"nextPutIfElse:with:with:",{aBlock:aBlock,ifBlock:ifBlock,elseBlock:elseBlock}, smalltalk.JSStream)})},
2863
3215
  args: ["aBlock", "ifBlock", "elseBlock"],
2864
3216
  source: "nextPutIfElse: aBlock with: ifBlock with: elseBlock\x0a\x09stream nextPutAll: 'if('.\x0a\x09aBlock value.\x0a\x09stream nextPutAll: '){'; lf.\x0a\x09ifBlock value.\x0a\x09stream nextPutAll: '} else {'; lf.\x0a\x09elseBlock value.\x0a\x09stream nextPutAll: '}'",
2865
3217
  messageSends: ["nextPutAll:", "value", "lf"],
@@ -2874,32 +3226,35 @@ selector: "nextPutMethodDeclaration:with:",
2874
3226
  category: 'streaming',
2875
3227
  fn: function (aMethod,aBlock){
2876
3228
  var self=this;
2877
- var $1,$2,$3;
2878
- smalltalk.send(self["@stream"],"_nextPutAll_",["smalltalk.method({"]);
2879
- smalltalk.send(self["@stream"],"_lf",[]);
2880
- smalltalk.send(self["@stream"],"_nextPutAll_",[smalltalk.send(smalltalk.send("selector: \x22","__comma",[smalltalk.send(aMethod,"_selector",[])]),"__comma",["\x22,"])]);
2881
- smalltalk.send(self["@stream"],"_lf",[]);
2882
- smalltalk.send(self["@stream"],"_nextPutAll_",[smalltalk.send(smalltalk.send("source: ","__comma",[smalltalk.send(smalltalk.send(aMethod,"_source",[]),"_asJavascript",[])]),"__comma",[","])]);
2883
- $1=smalltalk.send(self["@stream"],"_lf",[]);
2884
- smalltalk.send(aBlock,"_value",[]);
2885
- smalltalk.send(self["@stream"],"_nextPutAll_",[smalltalk.send(smalltalk.send(",","__comma",[smalltalk.send((smalltalk.String || String),"_lf",[])]),"__comma",["messageSends: "])]);
2886
- smalltalk.send(self["@stream"],"_nextPutAll_",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aMethod,"_messageSends",[]),"_asArray",[]),"_asJavascript",[]),"__comma",[","])]);
2887
- smalltalk.send(self["@stream"],"_lf",[]);
2888
- smalltalk.send(self["@stream"],"_nextPutAll_",[smalltalk.send(smalltalk.send("args: ","__comma",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aMethod,"_arguments",[]),"_collect_",[(function(each){
2889
- return smalltalk.send(each,"_value",[]);
2890
- })]),"_asArray",[]),"_asJavascript",[])]),"__comma",[","])]);
2891
- smalltalk.send(self["@stream"],"_lf",[]);
2892
- $2=smalltalk.send(self["@stream"],"_nextPutAll_",["referencedClasses: ["]);
2893
- smalltalk.send(smalltalk.send(aMethod,"_classReferences",[]),"_do_separatedBy_",[(function(each){
2894
- return smalltalk.send(self["@stream"],"_nextPutAll_",[smalltalk.send(each,"_asJavascript",[])]);
2895
- }),(function(){
2896
- return smalltalk.send(self["@stream"],"_nextPutAll_",[","]);
2897
- })]);
2898
- smalltalk.send(self["@stream"],"_nextPutAll_",["]"]);
2899
- $3=smalltalk.send(self["@stream"],"_nextPutAll_",["})"]);
2900
- return self},
3229
+ return smalltalk.withContext(function($ctx1) {
3230
+ $1=self["@stream"];
3231
+ _st($1)._nextPutAll_("smalltalk.method({");
3232
+ _st($1)._lf();
3233
+ _st($1)._nextPutAll_(_st(_st("selector: \x22").__comma(_st(aMethod)._selector())).__comma("\x22,"));
3234
+ _st($1)._lf();
3235
+ _st($1)._nextPutAll_(_st(_st("source: ").__comma(_st(_st(aMethod)._source())._asJavascript())).__comma(","));
3236
+ $2=_st($1)._lf();
3237
+ _st(aBlock)._value();
3238
+ $3=self["@stream"];
3239
+ _st($3)._nextPutAll_(_st(_st(",").__comma(_st((smalltalk.String || String))._lf())).__comma("messageSends: "));
3240
+ _st($3)._nextPutAll_(_st(_st(_st(_st(aMethod)._messageSends())._asArray())._asJavascript()).__comma(","));
3241
+ _st($3)._lf();
3242
+ _st($3)._nextPutAll_(_st(_st("args: ").__comma(_st(_st(_st(_st(aMethod)._arguments())._collect_((function(each){
3243
+ return smalltalk.withContext(function($ctx2) {
3244
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._asArray())._asJavascript())).__comma(","));
3245
+ _st($3)._lf();
3246
+ $4=_st($3)._nextPutAll_("referencedClasses: [");
3247
+ _st(_st(aMethod)._classReferences())._do_separatedBy_((function(each){
3248
+ return smalltalk.withContext(function($ctx2) {
3249
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
3250
+ return smalltalk.withContext(function($ctx2) {
3251
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
3252
+ $5=self["@stream"];
3253
+ _st($5)._nextPutAll_("]");
3254
+ $6=_st($5)._nextPutAll_("})");
3255
+ return self}, function($ctx1) {$ctx1.fill(self,"nextPutMethodDeclaration:with:",{aMethod:aMethod,aBlock:aBlock}, smalltalk.JSStream)})},
2901
3256
  args: ["aMethod", "aBlock"],
2902
- source: "nextPutMethodDeclaration: aMethod with: aBlock\x0a\x09stream \x0a\x09\x09nextPutAll: 'smalltalk.method({'; lf;\x0a\x09\x09nextPutAll: 'selector: \x22', aMethod selector, '\x22,'; lf;\x0a\x09\x09nextPutAll: 'source: ', aMethod source asJavascript, ',';lf.\x0a\x09aBlock value.\x0a\x09stream \x0a\x09\x09nextPutAll: ',', String lf, 'messageSends: ';\x0a\x09\x09nextPutAll: aMethod messageSends asArray asJavascript, ','; lf;\x0a \x09nextPutAll: 'args: ', (aMethod arguments collect: [ :each | each value ]) asArray asJavascript, ','; lf;\x0a\x09\x09nextPutAll: 'referencedClasses: ['.\x0a\x09aMethod classReferences \x0a\x09\x09do: [:each | stream nextPutAll: each asJavascript]\x0a\x09\x09separatedBy: [stream nextPutAll: ','].\x0a\x09stream \x0a\x09\x09nextPutAll: ']';\x0a\x09\x09nextPutAll: '})'",
3257
+ source: "nextPutMethodDeclaration: aMethod with: aBlock\x0a\x09stream \x0a\x09\x09nextPutAll: 'smalltalk.method({'; lf;\x0a\x09\x09nextPutAll: 'selector: \x22', aMethod selector, '\x22,'; lf;\x0a\x09\x09nextPutAll: 'source: ', aMethod source asJavascript, ',';lf. \x0a\x09aBlock value.\x0a\x09stream \x0a\x09\x09nextPutAll: ',', String lf, 'messageSends: ';\x0a\x09\x09nextPutAll: aMethod messageSends asArray asJavascript, ','; lf;\x0a nextPutAll: 'args: ', (aMethod arguments collect: [ :each | each value ]) asArray asJavascript, ','; lf;\x0a\x09\x09nextPutAll: 'referencedClasses: ['.\x0a\x09aMethod classReferences \x0a\x09\x09do: [:each | stream nextPutAll: each asJavascript]\x0a\x09\x09separatedBy: [stream nextPutAll: ','].\x0a\x09stream \x0a\x09\x09nextPutAll: ']';\x0a\x09\x09nextPutAll: '})'",
2903
3258
  messageSends: ["nextPutAll:", "lf", ",", "selector", "asJavascript", "source", "value", "asArray", "messageSends", "collect:", "arguments", "do:separatedBy:", "classReferences"],
2904
3259
  referencedClasses: ["String"]
2905
3260
  }),
@@ -2912,17 +3267,19 @@ selector: "nextPutNonLocalReturnHandlingWith:",
2912
3267
  category: 'streaming',
2913
3268
  fn: function (aBlock){
2914
3269
  var self=this;
2915
- var $1,$2;
2916
- smalltalk.send(self["@stream"],"_nextPutAll_",["var $early={};"]);
2917
- smalltalk.send(self["@stream"],"_lf",[]);
2918
- smalltalk.send(self["@stream"],"_nextPutAll_",["try {"]);
2919
- $1=smalltalk.send(self["@stream"],"_lf",[]);
2920
- smalltalk.send(aBlock,"_value",[]);
2921
- smalltalk.send(self["@stream"],"_nextPutAll_",["}"]);
2922
- smalltalk.send(self["@stream"],"_lf",[]);
2923
- smalltalk.send(self["@stream"],"_nextPutAll_",["catch(e) {if(e===$early)return e[0]; throw e}"]);
2924
- $2=smalltalk.send(self["@stream"],"_lf",[]);
2925
- return self},
3270
+ return smalltalk.withContext(function($ctx1) {
3271
+ $1=self["@stream"];
3272
+ _st($1)._nextPutAll_("var $early={};");
3273
+ _st($1)._lf();
3274
+ _st($1)._nextPutAll_("try {");
3275
+ $2=_st($1)._lf();
3276
+ _st(aBlock)._value();
3277
+ $3=self["@stream"];
3278
+ _st($3)._nextPutAll_("}");
3279
+ _st($3)._lf();
3280
+ _st($3)._nextPutAll_("catch(e) {if(e===$early)return e[0]; throw e}");
3281
+ $4=_st($3)._lf();
3282
+ return self}, function($ctx1) {$ctx1.fill(self,"nextPutNonLocalReturnHandlingWith:",{aBlock:aBlock}, smalltalk.JSStream)})},
2926
3283
  args: ["aBlock"],
2927
3284
  source: "nextPutNonLocalReturnHandlingWith: aBlock\x0a\x09stream \x0a\x09\x09nextPutAll: 'var $early={};'; lf;\x0a\x09\x09nextPutAll: 'try {'; lf.\x0a\x09aBlock value.\x0a\x09stream \x0a\x09\x09nextPutAll: '}'; lf;\x0a\x09\x09nextPutAll: 'catch(e) {if(e===$early)return e[0]; throw e}'; lf",
2928
3285
  messageSends: ["nextPutAll:", "lf", "value"],
@@ -2937,10 +3294,10 @@ selector: "nextPutNonLocalReturnWith:",
2937
3294
  category: 'streaming',
2938
3295
  fn: function (aBlock){
2939
3296
  var self=this;
2940
- smalltalk.send(self["@stream"],"_nextPutAll_",["throw $early=["]);
2941
- smalltalk.send(aBlock,"_value",[]);
2942
- smalltalk.send(self["@stream"],"_nextPutAll_",["]"]);
2943
- return self},
3297
+ return smalltalk.withContext(function($ctx1) {
3298
+ _st(aBlock)._value();
3299
+ _st(self["@stream"])._nextPutAll_("]");
3300
+ return self}, function($ctx1) {$ctx1.fill(self,"nextPutNonLocalReturnWith:",{aBlock:aBlock}, smalltalk.JSStream)})},
2944
3301
  args: ["aBlock"],
2945
3302
  source: "nextPutNonLocalReturnWith: aBlock\x0a\x09stream nextPutAll: 'throw $early=['.\x0a\x09aBlock value.\x0a\x09stream nextPutAll: ']'",
2946
3303
  messageSends: ["nextPutAll:", "value"],
@@ -2955,8 +3312,8 @@ selector: "nextPutReturn",
2955
3312
  category: 'streaming',
2956
3313
  fn: function (){
2957
3314
  var self=this;
2958
- smalltalk.send(self["@stream"],"_nextPutAll_",["return "]);
2959
- return self},
3315
+ return smalltalk.withContext(function($ctx1) {
3316
+ return self}, function($ctx1) {$ctx1.fill(self,"nextPutReturn",{}, smalltalk.JSStream)})},
2960
3317
  args: [],
2961
3318
  source: "nextPutReturn\x0a\x09stream nextPutAll: 'return '",
2962
3319
  messageSends: ["nextPutAll:"],
@@ -2971,9 +3328,9 @@ selector: "nextPutReturnWith:",
2971
3328
  category: 'streaming',
2972
3329
  fn: function (aBlock){
2973
3330
  var self=this;
2974
- smalltalk.send(self,"_nextPutReturn",[]);
2975
- smalltalk.send(aBlock,"_value",[]);
2976
- return self},
3331
+ return smalltalk.withContext(function($ctx1) {
3332
+ _st(aBlock)._value();
3333
+ return self}, function($ctx1) {$ctx1.fill(self,"nextPutReturnWith:",{aBlock:aBlock}, smalltalk.JSStream)})},
2977
3334
  args: ["aBlock"],
2978
3335
  source: "nextPutReturnWith: aBlock\x0a\x09self nextPutReturn.\x0a\x09aBlock value",
2979
3336
  messageSends: ["nextPutReturn", "value"],
@@ -2981,30 +3338,6 @@ referencedClasses: []
2981
3338
  }),
2982
3339
  smalltalk.JSStream);
2983
3340
 
2984
- smalltalk.addMethod(
2985
- "_nextPutSendTo_selector_arguments_",
2986
- smalltalk.method({
2987
- selector: "nextPutSendTo:selector:arguments:",
2988
- category: 'streaming',
2989
- fn: function (receiver,selector,arguments){
2990
- var self=this;
2991
- smalltalk.send(self["@stream"],"_nextPutAll_",["smalltalk.send("]);
2992
- smalltalk.send(receiver,"_emitOn_",[self]);
2993
- smalltalk.send(self["@stream"],"_nextPutAll_",[smalltalk.send(smalltalk.send(",\x22","__comma",[smalltalk.send(selector,"_asSelector",[])]),"__comma",["\x22,["])]);
2994
- smalltalk.send(arguments,"_do_separatedBy_",[(function(each){
2995
- return smalltalk.send(each,"_emitOn_",[self]);
2996
- }),(function(){
2997
- return smalltalk.send(self["@stream"],"_nextPutAll_",[","]);
2998
- })]);
2999
- smalltalk.send(self["@stream"],"_nextPutAll_",["])"]);
3000
- return self},
3001
- args: ["receiver", "selector", "arguments"],
3002
- source: "nextPutSendTo: receiver selector: selector arguments: arguments\x0a\x09stream nextPutAll: 'smalltalk.send('.\x0a\x09receiver emitOn: self. \x0a\x09stream nextPutAll: ',\x22', selector asSelector, '\x22,['.\x0a\x09arguments \x0a\x09\x09do: [ :each | each emitOn: self ]\x0a\x09\x09separatedBy: [ stream nextPutAll: ',' ].\x0a\x09stream nextPutAll: '])'",
3003
- messageSends: ["nextPutAll:", "emitOn:", ",", "asSelector", "do:separatedBy:"],
3004
- referencedClasses: []
3005
- }),
3006
- smalltalk.JSStream);
3007
-
3008
3341
  smalltalk.addMethod(
3009
3342
  "_nextPutSequenceWith_",
3010
3343
  smalltalk.method({
@@ -3012,8 +3345,8 @@ selector: "nextPutSequenceWith:",
3012
3345
  category: 'streaming',
3013
3346
  fn: function (aBlock){
3014
3347
  var self=this;
3015
- smalltalk.send(aBlock,"_value",[]);
3016
- return self},
3348
+ return smalltalk.withContext(function($ctx1) {
3349
+ return self}, function($ctx1) {$ctx1.fill(self,"nextPutSequenceWith:",{aBlock:aBlock}, smalltalk.JSStream)})},
3017
3350
  args: ["aBlock"],
3018
3351
  source: "nextPutSequenceWith: aBlock\x0a\x09\x22stream \x0a\x09\x09nextPutAll: 'switch(smalltalk.thisContext.pc){'; lf.\x22\x0a\x09aBlock value.\x0a\x09\x22stream \x0a\x09\x09nextPutAll: '};'; lf\x22",
3019
3352
  messageSends: ["value"],
@@ -3028,13 +3361,15 @@ selector: "nextPutStatement:with:",
3028
3361
  category: 'streaming',
3029
3362
  fn: function (anInteger,aBlock){
3030
3363
  var self=this;
3031
- var $1,$2;
3032
- smalltalk.send(self["@stream"],"_nextPutAll_",[smalltalk.send(smalltalk.send("case ","__comma",[smalltalk.send(anInteger,"_asString",[])]),"__comma",[":"])]);
3033
- $1=smalltalk.send(self["@stream"],"_lf",[]);
3034
- smalltalk.send(self,"_nextPutStatementWith_",[aBlock]);
3035
- smalltalk.send(self["@stream"],"_nextPutAll_",[smalltalk.send(smalltalk.send("smalltalk.thisContext.pc=","__comma",[smalltalk.send(smalltalk.send(anInteger,"__plus",[(1)]),"_asString",[])]),"__comma",[";"])]);
3036
- $2=smalltalk.send(self["@stream"],"_lf",[]);
3037
- return self},
3364
+ return smalltalk.withContext(function($ctx1) {
3365
+ $1=self["@stream"];
3366
+ _st($1)._nextPutAll_(_st(_st("case ").__comma(_st(anInteger)._asString())).__comma(":"));
3367
+ $2=_st($1)._lf();
3368
+ _st(self)._nextPutStatementWith_(aBlock);
3369
+ $3=self["@stream"];
3370
+ _st($3)._nextPutAll_(_st(_st("smalltalk.thisContext.pc=").__comma(_st(_st(anInteger).__plus((1)))._asString())).__comma(";"));
3371
+ $4=_st($3)._lf();
3372
+ return self}, function($ctx1) {$ctx1.fill(self,"nextPutStatement:with:",{anInteger:anInteger,aBlock:aBlock}, smalltalk.JSStream)})},
3038
3373
  args: ["anInteger", "aBlock"],
3039
3374
  source: "nextPutStatement: anInteger with: aBlock\x0a\x09stream nextPutAll: 'case ', anInteger asString, ':'; lf.\x0a\x09self nextPutStatementWith: aBlock.\x0a\x09stream nextPutAll: 'smalltalk.thisContext.pc=', (anInteger + 1) asString, ';'; lf",
3040
3375
  messageSends: ["nextPutAll:", ",", "asString", "lf", "nextPutStatementWith:", "+"],
@@ -3049,11 +3384,12 @@ selector: "nextPutStatementWith:",
3049
3384
  category: 'streaming',
3050
3385
  fn: function (aBlock){
3051
3386
  var self=this;
3052
- var $1;
3053
- smalltalk.send(aBlock,"_value",[]);
3054
- smalltalk.send(self["@stream"],"_nextPutAll_",[";"]);
3055
- $1=smalltalk.send(self["@stream"],"_lf",[]);
3056
- return self},
3387
+ return smalltalk.withContext(function($ctx1) {
3388
+ _st(aBlock)._value();
3389
+ $1=self["@stream"];
3390
+ _st($1)._nextPutAll_(";");
3391
+ $2=_st($1)._lf();
3392
+ return self}, function($ctx1) {$ctx1.fill(self,"nextPutStatementWith:",{aBlock:aBlock}, smalltalk.JSStream)})},
3057
3393
  args: ["aBlock"],
3058
3394
  source: "nextPutStatementWith: aBlock\x0a\x09aBlock value.\x0a\x09stream nextPutAll: ';'; lf",
3059
3395
  messageSends: ["value", "nextPutAll:", "lf"],
@@ -3068,10 +3404,11 @@ selector: "nextPutVar:",
3068
3404
  category: 'streaming',
3069
3405
  fn: function (aString){
3070
3406
  var self=this;
3071
- var $1;
3072
- smalltalk.send(self["@stream"],"_nextPutAll_",[smalltalk.send(smalltalk.send("var ","__comma",[aString]),"__comma",[";"])]);
3073
- $1=smalltalk.send(self["@stream"],"_lf",[]);
3074
- return self},
3407
+ return smalltalk.withContext(function($ctx1) {
3408
+ $1=self["@stream"];
3409
+ _st($1)._nextPutAll_(_st(_st("var ").__comma(aString)).__comma(";"));
3410
+ $2=_st($1)._lf();
3411
+ return self}, function($ctx1) {$ctx1.fill(self,"nextPutVar:",{aString:aString}, smalltalk.JSStream)})},
3075
3412
  args: ["aString"],
3076
3413
  source: "nextPutVar: aString\x0a\x09stream nextPutAll: 'var ', aString, ';'; lf",
3077
3414
  messageSends: ["nextPutAll:", ",", "lf"],
@@ -3086,19 +3423,28 @@ selector: "nextPutVars:",
3086
3423
  category: 'streaming',
3087
3424
  fn: function (aCollection){
3088
3425
  var self=this;
3089
- var $1;
3090
- smalltalk.send(self["@stream"],"_nextPutAll_",["var "]);
3091
- smalltalk.send(aCollection,"_do_separatedBy_",[(function(each){
3092
- return smalltalk.send(self["@stream"],"_nextPutAll_",[each]);
3093
- }),(function(){
3094
- return smalltalk.send(self["@stream"],"_nextPutAll_",[","]);
3095
- })]);
3096
- smalltalk.send(self["@stream"],"_nextPutAll_",[";"]);
3097
- $1=smalltalk.send(self["@stream"],"_lf",[]);
3098
- return self},
3426
+ return smalltalk.withContext(function($ctx1) {
3427
+ var $early={};
3428
+ try {
3429
+ _st(aCollection)._ifEmpty_((function(){
3430
+ return smalltalk.withContext(function($ctx2) {
3431
+ throw $early=[$1];
3432
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
3433
+ _st(self["@stream"])._nextPutAll_("var ");
3434
+ _st(aCollection)._do_separatedBy_((function(each){
3435
+ return smalltalk.withContext(function($ctx2) {
3436
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
3437
+ return smalltalk.withContext(function($ctx2) {
3438
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
3439
+ $2=self["@stream"];
3440
+ _st($2)._nextPutAll_(";");
3441
+ $3=_st($2)._lf();
3442
+ return self}
3443
+ catch(e) {if(e===$early)return e[0]; throw e}
3444
+ }, function($ctx1) {$ctx1.fill(self,"nextPutVars:",{aCollection:aCollection}, smalltalk.JSStream)})},
3099
3445
  args: ["aCollection"],
3100
- source: "nextPutVars: aCollection\x0a\x09stream nextPutAll: 'var '.\x0a\x09aCollection \x0a\x09\x09do: [ :each | stream nextPutAll: each ]\x0a\x09\x09separatedBy: [ stream nextPutAll: ',' ].\x0a\x09stream nextPutAll: ';'; lf",
3101
- messageSends: ["nextPutAll:", "do:separatedBy:", "lf"],
3446
+ source: "nextPutVars: aCollection\x0a\x09aCollection ifEmpty: [ ^self ].\x0a \x0a\x09stream nextPutAll: 'var '.\x0a\x09aCollection \x0a\x09\x09do: [ :each | stream nextPutAll: each ]\x0a\x09\x09separatedBy: [ stream nextPutAll: ',' ].\x0a\x09stream nextPutAll: ';'; lf",
3447
+ messageSends: ["ifEmpty:", "nextPutAll:", "do:separatedBy:", "lf"],
3102
3448
  referencedClasses: []
3103
3449
  }),
3104
3450
  smalltalk.JSStream);
@@ -3112,8 +3458,8 @@ selector: "appendToInstruction:",
3112
3458
  category: '*Compiler-IR',
3113
3459
  fn: function (anIRInstruction){
3114
3460
  var self=this;
3115
- smalltalk.send(anIRInstruction,"_appendBlock_",[self]);
3116
- return self},
3461
+ return smalltalk.withContext(function($ctx1) {
3462
+ return self}, function($ctx1) {$ctx1.fill(self,"appendToInstruction:",{anIRInstruction:anIRInstruction}, smalltalk.BlockClosure)})},
3117
3463
  args: ["anIRInstruction"],
3118
3464
  source: "appendToInstruction: anIRInstruction\x0a anIRInstruction appendBlock: self",
3119
3465
  messageSends: ["appendBlock:"],
@@ -3128,15 +3474,15 @@ selector: "asVariableName",
3128
3474
  category: '*Compiler-IR',
3129
3475
  fn: function (){
3130
3476
  var self=this;
3131
- var $2,$1;
3132
- $2=smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk),"_current",[]),"_reservedWords",[]),"_includes_",[self]);
3477
+ return smalltalk.withContext(function($ctx1) {
3478
+ $2=_st(_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._reservedWords())._includes_(self);
3133
3479
  if(smalltalk.assert($2)){
3134
- $1=smalltalk.send(self,"__comma",["_"]);
3480
+ $1=_st(self).__comma("_");
3135
3481
  } else {
3136
3482
  $1=self;
3137
3483
  };
3138
3484
  return $1;
3139
- },
3485
+ }, function($ctx1) {$ctx1.fill(self,"asVariableName",{}, smalltalk.String)})},
3140
3486
  args: [],
3141
3487
  source: "asVariableName\x0a\x09^ (Smalltalk current reservedWords includes: self)\x0a\x09\x09ifTrue: [ self, '_' ]\x0a\x09\x09ifFalse: [ self ]",
3142
3488
  messageSends: ["ifTrue:ifFalse:", ",", "includes:", "reservedWords", "current"],