resin 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (117) hide show
  1. data/amber/css/amber-normalize.css +73 -73
  2. data/amber/css/amber-normalize.less +1 -1
  3. data/amber/css/amber.css +106 -106
  4. data/amber/css/helios.css +242 -0
  5. data/amber/images/hsplitter.png +0 -0
  6. data/amber/images/vsplitter.png +0 -0
  7. data/amber/js/Benchfib.deploy.js +116 -38
  8. data/amber/js/Benchfib.js +120 -42
  9. data/amber/js/Canvas.deploy.js +674 -403
  10. data/amber/js/Canvas.js +682 -411
  11. data/amber/js/Compiler-AST.deploy.js +1150 -0
  12. data/amber/js/Compiler-AST.js +1591 -0
  13. data/amber/js/Compiler-Core.deploy.js +1562 -0
  14. data/amber/js/Compiler-Core.js +1972 -0
  15. data/amber/js/Compiler-Exceptions.deploy.js +114 -0
  16. data/amber/js/Compiler-Exceptions.js +161 -0
  17. data/amber/js/Compiler-IR.deploy.js +2326 -0
  18. data/amber/js/Compiler-IR.js +3146 -0
  19. data/amber/js/Compiler-Inlining.deploy.js +1147 -0
  20. data/amber/js/Compiler-Inlining.js +1514 -0
  21. data/amber/js/Compiler-Semantic.deploy.js +1207 -0
  22. data/amber/js/Compiler-Semantic.js +1628 -0
  23. data/amber/js/Compiler-Tests.deploy.js +646 -60
  24. data/amber/js/Compiler-Tests.js +843 -82
  25. data/amber/js/Compiler.deploy.js +1097 -159
  26. data/amber/js/Compiler.js +1414 -161
  27. data/amber/js/Examples.deploy.js +31 -15
  28. data/amber/js/Examples.js +33 -17
  29. data/amber/js/Helios-Announcements.deploy.js +127 -0
  30. data/amber/js/Helios-Announcements.js +157 -0
  31. data/amber/js/Helios-Browser.deploy.js +1473 -0
  32. data/amber/js/Helios-Browser.js +1953 -0
  33. data/amber/js/Helios-Commands.deploy.js +403 -0
  34. data/amber/js/Helios-Commands.js +563 -0
  35. data/amber/js/Helios-Core.deploy.js +1070 -0
  36. data/amber/js/Helios-Core.js +1445 -0
  37. data/amber/js/Helios-Environments.deploy.js +132 -0
  38. data/amber/js/Helios-Environments.js +179 -0
  39. data/amber/js/Helios-Inspector.deploy.js +855 -0
  40. data/amber/js/Helios-Inspector.js +1155 -0
  41. data/amber/js/Helios-KeyBindings.deploy.js +753 -0
  42. data/amber/js/Helios-KeyBindings.js +1023 -0
  43. data/amber/js/Helios-Layout.deploy.js +383 -0
  44. data/amber/js/Helios-Layout.js +523 -0
  45. data/amber/js/Helios-Workspace.deploy.js +799 -0
  46. data/amber/js/Helios-Workspace.js +1074 -0
  47. data/amber/js/IDE.deploy.js +2541 -1490
  48. data/amber/js/IDE.js +2721 -1660
  49. data/amber/js/Importer-Exporter.deploy.js +671 -0
  50. data/amber/js/Importer-Exporter.js +816 -0
  51. data/amber/js/Kernel-Announcements.deploy.js +137 -20
  52. data/amber/js/Kernel-Announcements.js +176 -22
  53. data/amber/js/Kernel-Classes.deploy.js +555 -168
  54. data/amber/js/Kernel-Classes.js +662 -205
  55. data/amber/js/Kernel-Collections.deploy.js +1403 -618
  56. data/amber/js/Kernel-Collections.js +1545 -690
  57. data/amber/js/Kernel-Exceptions.deploy.js +109 -45
  58. data/amber/js/Kernel-Exceptions.js +123 -49
  59. data/amber/js/Kernel-Methods.deploy.js +196 -81
  60. data/amber/js/Kernel-Methods.js +214 -89
  61. data/amber/js/Kernel-Objects.deploy.js +1542 -1117
  62. data/amber/js/Kernel-Objects.js +1593 -1148
  63. data/amber/js/Kernel-Tests.deploy.js +1725 -772
  64. data/amber/js/Kernel-Tests.js +2301 -1123
  65. data/amber/js/Kernel-Transcript.deploy.js +23 -25
  66. data/amber/js/Kernel-Transcript.js +24 -26
  67. data/amber/js/SUnit.deploy.js +204 -131
  68. data/amber/js/SUnit.js +222 -139
  69. data/amber/js/Spaces.deploy.js +240 -0
  70. data/amber/js/Spaces.js +326 -0
  71. data/amber/js/amber.js +26 -7
  72. data/amber/js/boot.js +65 -47
  73. data/amber/js/init.js +1 -1
  74. data/amber/js/lib/CodeMirror/amber.css +21 -21
  75. data/amber/js/lib/CodeMirror/codemirror.css +119 -13
  76. data/amber/js/lib/CodeMirror/codemirror.js +2219 -1220
  77. data/amber/js/lib/CodeMirror/smalltalk.js +134 -129
  78. data/amber/js/lib/bootstrap/css/bootstrap.css +5837 -0
  79. data/amber/js/lib/bootstrap/css/bootstrap.min.css +841 -0
  80. data/amber/js/lib/bootstrap/img/glyphicons-halflings-white.png +0 -0
  81. data/amber/js/lib/bootstrap/img/glyphicons-halflings.png +0 -0
  82. data/amber/js/lib/bootstrap/js/bootstrap.js +2038 -0
  83. data/amber/js/lib/bootstrap/js/bootstrap.min.js +7 -0
  84. data/amber/js/lib/jQuery/jquery-1.8.2.min.js +2 -0
  85. data/amber/js/lib/jQuery/jquery-ui-1.8.24.custom.min.js +125 -0
  86. data/amber/st/Compiler-AST.st +505 -0
  87. data/amber/st/Compiler-Core.st +835 -0
  88. data/amber/st/Compiler-Exceptions.st +87 -0
  89. data/amber/st/Compiler-IR.st +1097 -0
  90. data/amber/st/Compiler-Inlining.st +650 -0
  91. data/amber/st/Compiler-Semantic.st +558 -0
  92. data/amber/st/Compiler-Tests.st +285 -381
  93. data/amber/st/Compiler.st +725 -2
  94. data/amber/st/Helios-Announcements.st +104 -0
  95. data/amber/st/Helios-Browser.st +708 -0
  96. data/amber/st/Helios-Commands.st +223 -0
  97. data/amber/st/Helios-Core.st +532 -0
  98. data/amber/st/Helios-Environments.st +98 -0
  99. data/amber/st/Helios-Inspector.st +367 -0
  100. data/amber/st/Helios-KeyBindings.st +337 -0
  101. data/amber/st/Helios-Layout.st +199 -0
  102. data/amber/st/Helios-Workspace.st +367 -0
  103. data/amber/st/IDE.st +75 -53
  104. data/amber/st/Importer-Exporter.st +386 -0
  105. data/amber/st/Kernel-Announcements.st +92 -0
  106. data/amber/st/Kernel-Classes.st +137 -15
  107. data/amber/st/Kernel-Collections.st +137 -47
  108. data/amber/st/Kernel-Exceptions.st +14 -0
  109. data/amber/st/Kernel-Methods.st +9 -1
  110. data/amber/st/Kernel-Objects.st +29 -5
  111. data/amber/st/Kernel-Tests.st +545 -199
  112. data/amber/st/SUnit.st +10 -0
  113. data/amber/st/Spaces.st +142 -0
  114. data/lib/resin/app.rb +1 -1
  115. metadata +86 -31
  116. data/amber/js/lib/jQuery/jquery-1.4.4.min.js +0 -167
  117. data/amber/js/lib/jQuery/jquery-1.6.4.min.js +0 -4
@@ -0,0 +1,3146 @@
1
+ smalltalk.addPackage('Compiler-IR', {});
2
+ smalltalk.addClass('IRASTTranslator', smalltalk.NodeVisitor, ['source', 'theClass', 'method', 'sequence', 'nextAlias'], 'Compiler-IR');
3
+ smalltalk.IRASTTranslator.comment="I am the AST (abstract syntax tree) visitor responsible for building the intermediate representation graph.\x0aI rely on a builder object, instance of IRBuilder."
4
+ smalltalk.addMethod(
5
+ "_alias_",
6
+ smalltalk.method({
7
+ selector: "alias:",
8
+ category: 'visiting',
9
+ fn: function (aNode){
10
+ var self=this;
11
+ var $1,$2,$3,$4,$5,$6;
12
+ var variable;
13
+ $1=smalltalk.send(aNode,"_isValueNode",[]);
14
+ if(smalltalk.assert($1)){
15
+ $2=smalltalk.send(self,"_visit_",[aNode]);
16
+ return $2;
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",[]);
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
+ },
30
+ 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"],
33
+ referencedClasses: ["AliasVar", "IRVariable", "IRAssignment"]
34
+ }),
35
+ smalltalk.IRASTTranslator);
36
+
37
+ smalltalk.addMethod(
38
+ "_method",
39
+ smalltalk.method({
40
+ selector: "method",
41
+ category: 'accessing',
42
+ fn: function (){
43
+ var self=this;
44
+ return self["@method"];
45
+ },
46
+ args: [],
47
+ source: "method\x0a\x09^ method",
48
+ messageSends: [],
49
+ referencedClasses: []
50
+ }),
51
+ smalltalk.IRASTTranslator);
52
+
53
+ smalltalk.addMethod(
54
+ "_method_",
55
+ smalltalk.method({
56
+ selector: "method:",
57
+ category: 'accessing',
58
+ fn: function (anIRMethod){
59
+ var self=this;
60
+ self["@method"]=anIRMethod;
61
+ return self},
62
+ args: ["anIRMethod"],
63
+ source: "method: anIRMethod\x0a\x09method := anIRMethod",
64
+ messageSends: [],
65
+ referencedClasses: []
66
+ }),
67
+ smalltalk.IRASTTranslator);
68
+
69
+ smalltalk.addMethod(
70
+ "_nextAlias",
71
+ smalltalk.method({
72
+ selector: "nextAlias",
73
+ category: 'accessing',
74
+ fn: function (){
75
+ var self=this;
76
+ var $1;
77
+ if(($receiver = self["@nextAlias"]) == nil || $receiver == undefined){
78
+ self["@nextAlias"]=(0);
79
+ self["@nextAlias"];
80
+ } else {
81
+ self["@nextAlias"];
82
+ };
83
+ self["@nextAlias"]=smalltalk.send(self["@nextAlias"],"__plus",[(1)]);
84
+ $1=smalltalk.send(self["@nextAlias"],"_asString",[]);
85
+ return $1;
86
+ },
87
+ args: [],
88
+ source: "nextAlias\x0a\x09nextAlias ifNil: [ nextAlias := 0 ].\x0a\x09nextAlias := nextAlias + 1.\x0a\x09^ nextAlias asString",
89
+ messageSends: ["ifNil:", "+", "asString"],
90
+ referencedClasses: []
91
+ }),
92
+ smalltalk.IRASTTranslator);
93
+
94
+ smalltalk.addMethod(
95
+ "_sequence",
96
+ smalltalk.method({
97
+ selector: "sequence",
98
+ category: 'accessing',
99
+ fn: function (){
100
+ var self=this;
101
+ return self["@sequence"];
102
+ },
103
+ args: [],
104
+ source: "sequence\x0a\x09^ sequence",
105
+ messageSends: [],
106
+ referencedClasses: []
107
+ }),
108
+ smalltalk.IRASTTranslator);
109
+
110
+ smalltalk.addMethod(
111
+ "_sequence_",
112
+ smalltalk.method({
113
+ selector: "sequence:",
114
+ category: 'accessing',
115
+ fn: function (anIRSequence){
116
+ var self=this;
117
+ self["@sequence"]=anIRSequence;
118
+ return self},
119
+ args: ["anIRSequence"],
120
+ source: "sequence: anIRSequence\x0a\x09sequence := anIRSequence",
121
+ messageSends: [],
122
+ referencedClasses: []
123
+ }),
124
+ smalltalk.IRASTTranslator);
125
+
126
+ smalltalk.addMethod(
127
+ "_source",
128
+ smalltalk.method({
129
+ selector: "source",
130
+ category: 'accessing',
131
+ fn: function (){
132
+ var self=this;
133
+ return self["@source"];
134
+ },
135
+ args: [],
136
+ source: "source\x0a\x09^ source",
137
+ messageSends: [],
138
+ referencedClasses: []
139
+ }),
140
+ smalltalk.IRASTTranslator);
141
+
142
+ smalltalk.addMethod(
143
+ "_source_",
144
+ smalltalk.method({
145
+ selector: "source:",
146
+ category: 'accessing',
147
+ fn: function (aString){
148
+ var self=this;
149
+ self["@source"]=aString;
150
+ return self},
151
+ args: ["aString"],
152
+ source: "source: aString\x0a\x09source := aString",
153
+ messageSends: [],
154
+ referencedClasses: []
155
+ }),
156
+ smalltalk.IRASTTranslator);
157
+
158
+ smalltalk.addMethod(
159
+ "_theClass",
160
+ smalltalk.method({
161
+ selector: "theClass",
162
+ category: 'accessing',
163
+ fn: function (){
164
+ var self=this;
165
+ return self["@theClass"];
166
+ },
167
+ args: [],
168
+ source: "theClass\x0a\x09^ theClass",
169
+ messageSends: [],
170
+ referencedClasses: []
171
+ }),
172
+ smalltalk.IRASTTranslator);
173
+
174
+ smalltalk.addMethod(
175
+ "_theClass_",
176
+ smalltalk.method({
177
+ selector: "theClass:",
178
+ category: 'accessing',
179
+ fn: function (aClass){
180
+ var self=this;
181
+ self["@theClass"]=aClass;
182
+ return self},
183
+ args: ["aClass"],
184
+ source: "theClass: aClass\x0a\x09theClass := aClass",
185
+ messageSends: [],
186
+ referencedClasses: []
187
+ }),
188
+ smalltalk.IRASTTranslator);
189
+
190
+ smalltalk.addMethod(
191
+ "_visitAssignmentNode_",
192
+ smalltalk.method({
193
+ selector: "visitAssignmentNode:",
194
+ category: 'visiting',
195
+ fn: function (aNode){
196
+ 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
+ },
210
+ args: ["aNode"],
211
+ 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
+ messageSends: ["visit:", "right", "left", "add:", "new", "yourself", "sequence"],
213
+ referencedClasses: ["IRAssignment"]
214
+ }),
215
+ smalltalk.IRASTTranslator);
216
+
217
+ smalltalk.addMethod(
218
+ "_visitBlockNode_",
219
+ smalltalk.method({
220
+ selector: "visitBlockNode:",
221
+ category: 'visiting',
222
+ fn: function (aNode){
223
+ var self=this;
224
+ var $1,$2,$3,$4;
225
+ 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",[]);
230
+ 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
+ },
242
+ 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",
244
+ messageSends: ["arguments:", "parameters", "new", "scope:", "scope", "yourself", "do:", "add:", "name:", "name", "temps", "visit:", "nodes"],
245
+ referencedClasses: ["IRClosure", "IRTempDeclaration"]
246
+ }),
247
+ smalltalk.IRASTTranslator);
248
+
249
+ smalltalk.addMethod(
250
+ "_visitBlockSequenceNode_",
251
+ smalltalk.method({
252
+ selector: "visitBlockSequenceNode:",
253
+ category: 'visiting',
254
+ fn: function (aNode){
255
+ 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",[])])]);
265
+ } 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]);
270
+ };
271
+ })]);
272
+ })]);
273
+ return $1;
274
+ },
275
+ args: ["aNode"],
276
+ 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
+ messageSends: ["withSequence:do:", "new", "ifNotEmpty:", "do:", "add:", "visit:", "sequence", "allButLast", "nodes", "ifFalse:ifTrue:", "last", "yourself", "isReturnNode"],
278
+ referencedClasses: ["IRBlockSequence", "IRBlockReturn"]
279
+ }),
280
+ smalltalk.IRASTTranslator);
281
+
282
+ smalltalk.addMethod(
283
+ "_visitCascadeNode_",
284
+ smalltalk.method({
285
+ selector: "visitCascadeNode:",
286
+ category: 'visiting',
287
+ fn: function (aNode){
288
+ var self=this;
289
+ var $1,$2;
290
+ var alias;
291
+ $1=smalltalk.send(smalltalk.send(aNode,"_receiver",[]),"_isValueNode",[]);
292
+ if(! smalltalk.assert($1)){
293
+ alias=smalltalk.send(self,"_alias_",[smalltalk.send(aNode,"_receiver",[])]);
294
+ 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
+ })]);
298
+ };
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",[])]);
303
+ return $2;
304
+ },
305
+ 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"],
308
+ referencedClasses: ["VariableNode"]
309
+ }),
310
+ smalltalk.IRASTTranslator);
311
+
312
+ smalltalk.addMethod(
313
+ "_visitDynamicArrayNode_",
314
+ smalltalk.method({
315
+ selector: "visitDynamicArrayNode:",
316
+ category: 'visiting',
317
+ fn: function (aNode){
318
+ var self=this;
319
+ 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
+ },
326
+ 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"],
329
+ referencedClasses: ["IRDynamicArray"]
330
+ }),
331
+ smalltalk.IRASTTranslator);
332
+
333
+ smalltalk.addMethod(
334
+ "_visitDynamicDictionaryNode_",
335
+ smalltalk.method({
336
+ selector: "visitDynamicDictionaryNode:",
337
+ category: 'visiting',
338
+ fn: function (aNode){
339
+ var self=this;
340
+ 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
+ },
347
+ 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"],
350
+ referencedClasses: ["IRDynamicDictionary"]
351
+ }),
352
+ smalltalk.IRASTTranslator);
353
+
354
+ smalltalk.addMethod(
355
+ "_visitJSStatementNode_",
356
+ smalltalk.method({
357
+ selector: "visitJSStatementNode:",
358
+ category: 'visiting',
359
+ fn: function (aNode){
360
+ 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",[]);
365
+ $1=$3;
366
+ return $1;
367
+ },
368
+ args: ["aNode"],
369
+ source: "visitJSStatementNode: aNode\x0a\x09^ IRVerbatim new\x0a\x09\x09source: aNode source;\x0a\x09\x09yourself",
370
+ messageSends: ["source:", "source", "new", "yourself"],
371
+ referencedClasses: ["IRVerbatim"]
372
+ }),
373
+ smalltalk.IRASTTranslator);
374
+
375
+ smalltalk.addMethod(
376
+ "_visitMethodNode_",
377
+ smalltalk.method({
378
+ selector: "visitMethodNode:",
379
+ category: 'visiting',
380
+ fn: function (aNode){
381
+ 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",[]);
402
+ 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]);
407
+ };
408
+ $8=smalltalk.send(self,"_method",[]);
409
+ return $8;
410
+ },
411
+ 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"],
414
+ referencedClasses: ["IRMethod", "IRTempDeclaration", "IRVariable", "IRReturn"]
415
+ }),
416
+ smalltalk.IRASTTranslator);
417
+
418
+ smalltalk.addMethod(
419
+ "_visitReturnNode_",
420
+ smalltalk.method({
421
+ selector: "visitReturnNode:",
422
+ category: 'visiting',
423
+ fn: function (aNode){
424
+ var self=this;
425
+ var $1;
426
+ var return_;
427
+ $1=smalltalk.send(aNode,"_nonLocalReturn",[]);
428
+ if(smalltalk.assert($1)){
429
+ return_=smalltalk.send((smalltalk.IRNonLocalReturn || IRNonLocalReturn),"_new",[]);
430
+ } else {
431
+ return_=smalltalk.send((smalltalk.IRReturn || IRReturn),"_new",[]);
432
+ };
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
+ },
439
+ args: ["aNode"],
440
+ 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
+ messageSends: ["ifTrue:ifFalse:", "new", "nonLocalReturn", "scope:", "scope", "do:", "add:", "alias:", "nodes"],
442
+ referencedClasses: ["IRNonLocalReturn", "IRReturn"]
443
+ }),
444
+ smalltalk.IRASTTranslator);
445
+
446
+ smalltalk.addMethod(
447
+ "_visitSendNode_",
448
+ smalltalk.method({
449
+ selector: "visitSendNode:",
450
+ category: 'visiting',
451
+ fn: function (aNode){
452
+ 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
+ })]);
467
+ 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]);
478
+ };
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
+ },
486
+ 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:"],
489
+ referencedClasses: ["IRSend"]
490
+ }),
491
+ smalltalk.IRASTTranslator);
492
+
493
+ smalltalk.addMethod(
494
+ "_visitSequenceNode_",
495
+ smalltalk.method({
496
+ selector: "visitSequenceNode:",
497
+ category: 'visiting',
498
+ fn: function (aNode){
499
+ 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){
503
+ var instruction;
504
+ instruction=smalltalk.send(self,"_visit_",[each]);
505
+ instruction;
506
+ $2=smalltalk.send(instruction,"_isVariable",[]);
507
+ if(! smalltalk.assert($2)){
508
+ return smalltalk.send(smalltalk.send(self,"_sequence",[]),"_add_",[instruction]);
509
+ };
510
+ })]);
511
+ })]);
512
+ return $1;
513
+ },
514
+ args: ["aNode"],
515
+ 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
+ messageSends: ["withSequence:do:", "new", "do:", "visit:", "ifFalse:", "add:", "sequence", "isVariable", "nodes"],
517
+ referencedClasses: ["IRSequence"]
518
+ }),
519
+ smalltalk.IRASTTranslator);
520
+
521
+ smalltalk.addMethod(
522
+ "_visitValueNode_",
523
+ smalltalk.method({
524
+ selector: "visitValueNode:",
525
+ category: 'visiting',
526
+ fn: function (aNode){
527
+ 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",[]);
532
+ $1=$3;
533
+ return $1;
534
+ },
535
+ args: ["aNode"],
536
+ source: "visitValueNode: aNode\x0a\x09^ IRValue new \x0a\x09\x09value: aNode value; \x0a\x09\x09yourself",
537
+ messageSends: ["value:", "value", "new", "yourself"],
538
+ referencedClasses: ["IRValue"]
539
+ }),
540
+ smalltalk.IRASTTranslator);
541
+
542
+ smalltalk.addMethod(
543
+ "_visitVariableNode_",
544
+ smalltalk.method({
545
+ selector: "visitVariableNode:",
546
+ category: 'visiting',
547
+ fn: function (aNode){
548
+ 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",[]);
553
+ $1=$3;
554
+ return $1;
555
+ },
556
+ args: ["aNode"],
557
+ source: "visitVariableNode: aNode\x0a\x09^ IRVariable new \x0a\x09\x09variable: aNode binding; \x0a\x09\x09yourself",
558
+ messageSends: ["variable:", "binding", "new", "yourself"],
559
+ referencedClasses: ["IRVariable"]
560
+ }),
561
+ smalltalk.IRASTTranslator);
562
+
563
+ smalltalk.addMethod(
564
+ "_withSequence_do_",
565
+ smalltalk.method({
566
+ selector: "withSequence:do:",
567
+ category: 'accessing',
568
+ fn: function (aSequence,aBlock){
569
+ var self=this;
570
+ 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
+ },
577
+ args: ["aSequence", "aBlock"],
578
+ 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
+ messageSends: ["sequence", "sequence:", "value"],
580
+ referencedClasses: []
581
+ }),
582
+ smalltalk.IRASTTranslator);
583
+
584
+
585
+
586
+ 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. "
588
+ smalltalk.addMethod(
589
+ "_accept_",
590
+ smalltalk.method({
591
+ selector: "accept:",
592
+ category: 'visiting',
593
+ fn: function (aVisitor){
594
+ var self=this;
595
+ var $1;
596
+ $1=smalltalk.send(aVisitor,"_visitIRInstruction_",[self]);
597
+ return $1;
598
+ },
599
+ args: ["aVisitor"],
600
+ source: "accept: aVisitor\x0a\x09^ aVisitor visitIRInstruction: self",
601
+ messageSends: ["visitIRInstruction:"],
602
+ referencedClasses: []
603
+ }),
604
+ smalltalk.IRInstruction);
605
+
606
+ smalltalk.addMethod(
607
+ "_add_",
608
+ smalltalk.method({
609
+ selector: "add:",
610
+ category: 'building',
611
+ fn: function (anObject){
612
+ var self=this;
613
+ var $1;
614
+ smalltalk.send(anObject,"_parent_",[self]);
615
+ $1=smalltalk.send(smalltalk.send(self,"_instructions",[]),"_add_",[anObject]);
616
+ return $1;
617
+ },
618
+ args: ["anObject"],
619
+ source: "add: anObject\x0a\x09anObject parent: self.\x0a\x09^ self instructions add: anObject",
620
+ messageSends: ["parent:", "add:", "instructions"],
621
+ referencedClasses: []
622
+ }),
623
+ smalltalk.IRInstruction);
624
+
625
+ smalltalk.addMethod(
626
+ "_canBeAssigned",
627
+ smalltalk.method({
628
+ selector: "canBeAssigned",
629
+ category: 'testing',
630
+ fn: function (){
631
+ var self=this;
632
+ return true;
633
+ },
634
+ args: [],
635
+ source: "canBeAssigned\x0a\x09^ true",
636
+ messageSends: [],
637
+ referencedClasses: []
638
+ }),
639
+ smalltalk.IRInstruction);
640
+
641
+ smalltalk.addMethod(
642
+ "_instructions",
643
+ smalltalk.method({
644
+ selector: "instructions",
645
+ category: 'accessing',
646
+ fn: function (){
647
+ var self=this;
648
+ var $1;
649
+ if(($receiver = self["@instructions"]) == nil || $receiver == undefined){
650
+ self["@instructions"]=smalltalk.send((smalltalk.OrderedCollection || OrderedCollection),"_new",[]);
651
+ $1=self["@instructions"];
652
+ } else {
653
+ $1=self["@instructions"];
654
+ };
655
+ return $1;
656
+ },
657
+ args: [],
658
+ source: "instructions\x0a\x09^ instructions ifNil: [ instructions := OrderedCollection new ]",
659
+ messageSends: ["ifNil:", "new"],
660
+ referencedClasses: ["OrderedCollection"]
661
+ }),
662
+ smalltalk.IRInstruction);
663
+
664
+ smalltalk.addMethod(
665
+ "_isClosure",
666
+ smalltalk.method({
667
+ selector: "isClosure",
668
+ category: 'testing',
669
+ fn: function (){
670
+ var self=this;
671
+ return false;
672
+ },
673
+ args: [],
674
+ source: "isClosure\x0a\x09^ false",
675
+ messageSends: [],
676
+ referencedClasses: []
677
+ }),
678
+ smalltalk.IRInstruction);
679
+
680
+ smalltalk.addMethod(
681
+ "_isInlined",
682
+ smalltalk.method({
683
+ selector: "isInlined",
684
+ category: 'testing',
685
+ fn: function (){
686
+ var self=this;
687
+ return false;
688
+ },
689
+ args: [],
690
+ source: "isInlined\x0a\x09^ false",
691
+ messageSends: [],
692
+ referencedClasses: []
693
+ }),
694
+ smalltalk.IRInstruction);
695
+
696
+ smalltalk.addMethod(
697
+ "_isLocalReturn",
698
+ smalltalk.method({
699
+ selector: "isLocalReturn",
700
+ category: 'testing',
701
+ fn: function (){
702
+ var self=this;
703
+ return false;
704
+ },
705
+ args: [],
706
+ source: "isLocalReturn\x0a\x09^ false",
707
+ messageSends: [],
708
+ referencedClasses: []
709
+ }),
710
+ smalltalk.IRInstruction);
711
+
712
+ smalltalk.addMethod(
713
+ "_isReturn",
714
+ smalltalk.method({
715
+ selector: "isReturn",
716
+ category: 'testing',
717
+ fn: function (){
718
+ var self=this;
719
+ return false;
720
+ },
721
+ args: [],
722
+ source: "isReturn\x0a\x09^ false",
723
+ messageSends: [],
724
+ referencedClasses: []
725
+ }),
726
+ smalltalk.IRInstruction);
727
+
728
+ smalltalk.addMethod(
729
+ "_isSend",
730
+ smalltalk.method({
731
+ selector: "isSend",
732
+ category: 'testing',
733
+ fn: function (){
734
+ var self=this;
735
+ return false;
736
+ },
737
+ args: [],
738
+ source: "isSend\x0a\x09^ false",
739
+ messageSends: [],
740
+ referencedClasses: []
741
+ }),
742
+ smalltalk.IRInstruction);
743
+
744
+ smalltalk.addMethod(
745
+ "_isSequence",
746
+ smalltalk.method({
747
+ selector: "isSequence",
748
+ category: 'testing',
749
+ fn: function (){
750
+ var self=this;
751
+ return false;
752
+ },
753
+ args: [],
754
+ source: "isSequence\x0a\x09^ false",
755
+ messageSends: [],
756
+ referencedClasses: []
757
+ }),
758
+ smalltalk.IRInstruction);
759
+
760
+ smalltalk.addMethod(
761
+ "_isTempDeclaration",
762
+ smalltalk.method({
763
+ selector: "isTempDeclaration",
764
+ category: 'testing',
765
+ fn: function (){
766
+ var self=this;
767
+ return false;
768
+ },
769
+ args: [],
770
+ source: "isTempDeclaration\x0a\x09^ false",
771
+ messageSends: [],
772
+ referencedClasses: []
773
+ }),
774
+ smalltalk.IRInstruction);
775
+
776
+ smalltalk.addMethod(
777
+ "_isVariable",
778
+ smalltalk.method({
779
+ selector: "isVariable",
780
+ category: 'testing',
781
+ fn: function (){
782
+ var self=this;
783
+ return false;
784
+ },
785
+ args: [],
786
+ source: "isVariable\x0a\x09^ false",
787
+ messageSends: [],
788
+ referencedClasses: []
789
+ }),
790
+ smalltalk.IRInstruction);
791
+
792
+ smalltalk.addMethod(
793
+ "_parent",
794
+ smalltalk.method({
795
+ selector: "parent",
796
+ category: 'accessing',
797
+ fn: function (){
798
+ var self=this;
799
+ return self["@parent"];
800
+ },
801
+ args: [],
802
+ source: "parent\x0a\x09^ parent",
803
+ messageSends: [],
804
+ referencedClasses: []
805
+ }),
806
+ smalltalk.IRInstruction);
807
+
808
+ smalltalk.addMethod(
809
+ "_parent_",
810
+ smalltalk.method({
811
+ selector: "parent:",
812
+ category: 'accessing',
813
+ fn: function (anIRInstruction){
814
+ var self=this;
815
+ self["@parent"]=anIRInstruction;
816
+ return self},
817
+ args: ["anIRInstruction"],
818
+ source: "parent: anIRInstruction\x0a\x09parent := anIRInstruction",
819
+ messageSends: [],
820
+ referencedClasses: []
821
+ }),
822
+ smalltalk.IRInstruction);
823
+
824
+ smalltalk.addMethod(
825
+ "_remove",
826
+ smalltalk.method({
827
+ selector: "remove",
828
+ category: 'building',
829
+ fn: function (){
830
+ var self=this;
831
+ smalltalk.send(smalltalk.send(self,"_parent",[]),"_remove_",[self]);
832
+ return self},
833
+ args: [],
834
+ source: "remove\x0a\x09self parent remove: self",
835
+ messageSends: ["remove:", "parent"],
836
+ referencedClasses: []
837
+ }),
838
+ smalltalk.IRInstruction);
839
+
840
+ smalltalk.addMethod(
841
+ "_remove_",
842
+ smalltalk.method({
843
+ selector: "remove:",
844
+ category: 'building',
845
+ fn: function (anIRInstruction){
846
+ var self=this;
847
+ smalltalk.send(smalltalk.send(self,"_instructions",[]),"_remove_",[anIRInstruction]);
848
+ return self},
849
+ args: ["anIRInstruction"],
850
+ source: "remove: anIRInstruction\x0a\x09self instructions remove: anIRInstruction",
851
+ messageSends: ["remove:", "instructions"],
852
+ referencedClasses: []
853
+ }),
854
+ smalltalk.IRInstruction);
855
+
856
+ smalltalk.addMethod(
857
+ "_replace_with_",
858
+ smalltalk.method({
859
+ selector: "replace:with:",
860
+ category: 'building',
861
+ fn: function (anIRInstruction,anotherIRInstruction){
862
+ 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},
866
+ args: ["anIRInstruction", "anotherIRInstruction"],
867
+ source: "replace: anIRInstruction with: anotherIRInstruction\x0a\x09anotherIRInstruction parent: self.\x0a\x09self instructions \x0a\x09\x09at: (self instructions indexOf: anIRInstruction)\x0a\x09\x09put: anotherIRInstruction",
868
+ messageSends: ["parent:", "at:put:", "indexOf:", "instructions"],
869
+ referencedClasses: []
870
+ }),
871
+ smalltalk.IRInstruction);
872
+
873
+ smalltalk.addMethod(
874
+ "_replaceWith_",
875
+ smalltalk.method({
876
+ selector: "replaceWith:",
877
+ category: 'building',
878
+ fn: function (anIRInstruction){
879
+ var self=this;
880
+ smalltalk.send(smalltalk.send(self,"_parent",[]),"_replace_with_",[self,anIRInstruction]);
881
+ return self},
882
+ args: ["anIRInstruction"],
883
+ source: "replaceWith: anIRInstruction\x0a\x09self parent replace: self with: anIRInstruction",
884
+ messageSends: ["replace:with:", "parent"],
885
+ referencedClasses: []
886
+ }),
887
+ smalltalk.IRInstruction);
888
+
889
+
890
+ smalltalk.addMethod(
891
+ "_on_",
892
+ smalltalk.method({
893
+ selector: "on:",
894
+ category: 'instance creation',
895
+ fn: function (aBuilder){
896
+ 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",[]);
901
+ $1=$3;
902
+ return $1;
903
+ },
904
+ args: ["aBuilder"],
905
+ source: "on: aBuilder\x0a\x09^ self new\x0a\x09\x09builder: aBuilder;\x0a\x09\x09yourself",
906
+ messageSends: ["builder:", "new", "yourself"],
907
+ referencedClasses: []
908
+ }),
909
+ smalltalk.IRInstruction.klass);
910
+
911
+
912
+ smalltalk.addClass('IRAssignment', smalltalk.IRInstruction, [], 'Compiler-IR');
913
+ smalltalk.addMethod(
914
+ "_accept_",
915
+ smalltalk.method({
916
+ selector: "accept:",
917
+ category: 'visiting',
918
+ fn: function (aVisitor){
919
+ var self=this;
920
+ var $1;
921
+ $1=smalltalk.send(aVisitor,"_visitIRAssignment_",[self]);
922
+ return $1;
923
+ },
924
+ args: ["aVisitor"],
925
+ source: "accept: aVisitor\x0a\x09^ aVisitor visitIRAssignment: self",
926
+ messageSends: ["visitIRAssignment:"],
927
+ referencedClasses: []
928
+ }),
929
+ smalltalk.IRAssignment);
930
+
931
+
932
+
933
+ smalltalk.addClass('IRDynamicArray', smalltalk.IRInstruction, [], 'Compiler-IR');
934
+ smalltalk.addMethod(
935
+ "_accept_",
936
+ smalltalk.method({
937
+ selector: "accept:",
938
+ category: 'visiting',
939
+ fn: function (aVisitor){
940
+ var self=this;
941
+ var $1;
942
+ $1=smalltalk.send(aVisitor,"_visitIRDynamicArray_",[self]);
943
+ return $1;
944
+ },
945
+ args: ["aVisitor"],
946
+ source: "accept: aVisitor\x0a\x09^ aVisitor visitIRDynamicArray: self",
947
+ messageSends: ["visitIRDynamicArray:"],
948
+ referencedClasses: []
949
+ }),
950
+ smalltalk.IRDynamicArray);
951
+
952
+
953
+
954
+ smalltalk.addClass('IRDynamicDictionary', smalltalk.IRInstruction, [], 'Compiler-IR');
955
+ smalltalk.addMethod(
956
+ "_accept_",
957
+ smalltalk.method({
958
+ selector: "accept:",
959
+ category: 'visiting',
960
+ fn: function (aVisitor){
961
+ var self=this;
962
+ var $1;
963
+ $1=smalltalk.send(aVisitor,"_visitIRDynamicDictionary_",[self]);
964
+ return $1;
965
+ },
966
+ args: ["aVisitor"],
967
+ source: "accept: aVisitor\x0a\x09^ aVisitor visitIRDynamicDictionary: self",
968
+ messageSends: ["visitIRDynamicDictionary:"],
969
+ referencedClasses: []
970
+ }),
971
+ smalltalk.IRDynamicDictionary);
972
+
973
+
974
+
975
+ smalltalk.addClass('IRScopedInstruction', smalltalk.IRInstruction, ['scope'], 'Compiler-IR');
976
+ smalltalk.addMethod(
977
+ "_scope",
978
+ smalltalk.method({
979
+ selector: "scope",
980
+ category: 'accessing',
981
+ fn: function (){
982
+ var self=this;
983
+ return self["@scope"];
984
+ },
985
+ args: [],
986
+ source: "scope\x0a\x09^ scope",
987
+ messageSends: [],
988
+ referencedClasses: []
989
+ }),
990
+ smalltalk.IRScopedInstruction);
991
+
992
+ smalltalk.addMethod(
993
+ "_scope_",
994
+ smalltalk.method({
995
+ selector: "scope:",
996
+ category: 'accessing',
997
+ fn: function (aScope){
998
+ var self=this;
999
+ self["@scope"]=aScope;
1000
+ return self},
1001
+ args: ["aScope"],
1002
+ source: "scope: aScope\x0a\x09scope := aScope",
1003
+ messageSends: [],
1004
+ referencedClasses: []
1005
+ }),
1006
+ smalltalk.IRScopedInstruction);
1007
+
1008
+
1009
+
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
+
1029
+ smalltalk.addMethod(
1030
+ "_arguments",
1031
+ smalltalk.method({
1032
+ selector: "arguments",
1033
+ category: 'accessing',
1034
+ fn: function (){
1035
+ var self=this;
1036
+ var $1;
1037
+ if(($receiver = self["@arguments"]) == nil || $receiver == undefined){
1038
+ $1=[];
1039
+ } else {
1040
+ $1=self["@arguments"];
1041
+ };
1042
+ return $1;
1043
+ },
1044
+ args: [],
1045
+ source: "arguments\x0a\x09^ arguments ifNil: [ #() ]",
1046
+ messageSends: ["ifNil:"],
1047
+ referencedClasses: []
1048
+ }),
1049
+ smalltalk.IRClosure);
1050
+
1051
+ smalltalk.addMethod(
1052
+ "_arguments_",
1053
+ smalltalk.method({
1054
+ selector: "arguments:",
1055
+ category: 'accessing',
1056
+ fn: function (aCollection){
1057
+ var self=this;
1058
+ self["@arguments"]=aCollection;
1059
+ return self},
1060
+ args: ["aCollection"],
1061
+ source: "arguments: aCollection\x0a\x09arguments := aCollection",
1062
+ messageSends: [],
1063
+ referencedClasses: []
1064
+ }),
1065
+ smalltalk.IRClosure);
1066
+
1067
+ smalltalk.addMethod(
1068
+ "_isClosure",
1069
+ smalltalk.method({
1070
+ selector: "isClosure",
1071
+ category: 'testing',
1072
+ fn: function (){
1073
+ var self=this;
1074
+ return true;
1075
+ },
1076
+ args: [],
1077
+ source: "isClosure\x0a\x09^ true",
1078
+ messageSends: [],
1079
+ referencedClasses: []
1080
+ }),
1081
+ smalltalk.IRClosure);
1082
+
1083
+ smalltalk.addMethod(
1084
+ "_scope_",
1085
+ smalltalk.method({
1086
+ selector: "scope:",
1087
+ category: 'accessing',
1088
+ fn: function (aScope){
1089
+ var self=this;
1090
+ smalltalk.send(self,"_scope_",[aScope],smalltalk.IRScopedInstruction);
1091
+ smalltalk.send(aScope,"_instruction_",[self]);
1092
+ return self},
1093
+ args: ["aScope"],
1094
+ source: "scope: aScope\x0a\x09super scope: aScope.\x0a\x09aScope instruction: self",
1095
+ messageSends: ["scope:", "instruction:"],
1096
+ referencedClasses: []
1097
+ }),
1098
+ smalltalk.IRClosure);
1099
+
1100
+ smalltalk.addMethod(
1101
+ "_sequence",
1102
+ smalltalk.method({
1103
+ selector: "sequence",
1104
+ category: 'accessing',
1105
+ fn: function (){
1106
+ var self=this;
1107
+ var $1;
1108
+ $1=smalltalk.send(smalltalk.send(self,"_instructions",[]),"_last",[]);
1109
+ return $1;
1110
+ },
1111
+ args: [],
1112
+ source: "sequence\x0a\x09^ self instructions last",
1113
+ messageSends: ["last", "instructions"],
1114
+ referencedClasses: []
1115
+ }),
1116
+ smalltalk.IRClosure);
1117
+
1118
+
1119
+
1120
+ smalltalk.addClass('IRMethod', smalltalk.IRScopedInstruction, ['source', 'selector', 'classReferences', 'messageSends', 'arguments', 'internalVariables'], 'Compiler-IR');
1121
+ smalltalk.IRMethod.comment="I am a method instruction"
1122
+ smalltalk.addMethod(
1123
+ "_accept_",
1124
+ smalltalk.method({
1125
+ selector: "accept:",
1126
+ category: 'visiting',
1127
+ fn: function (aVisitor){
1128
+ var self=this;
1129
+ var $1;
1130
+ $1=smalltalk.send(aVisitor,"_visitIRMethod_",[self]);
1131
+ return $1;
1132
+ },
1133
+ args: ["aVisitor"],
1134
+ source: "accept: aVisitor\x0a\x09^ aVisitor visitIRMethod: self",
1135
+ messageSends: ["visitIRMethod:"],
1136
+ referencedClasses: []
1137
+ }),
1138
+ smalltalk.IRMethod);
1139
+
1140
+ smalltalk.addMethod(
1141
+ "_arguments",
1142
+ smalltalk.method({
1143
+ selector: "arguments",
1144
+ category: 'accessing',
1145
+ fn: function (){
1146
+ var self=this;
1147
+ return self["@arguments"];
1148
+ },
1149
+ args: [],
1150
+ source: "arguments\x0a\x09^ arguments",
1151
+ messageSends: [],
1152
+ referencedClasses: []
1153
+ }),
1154
+ smalltalk.IRMethod);
1155
+
1156
+ smalltalk.addMethod(
1157
+ "_arguments_",
1158
+ smalltalk.method({
1159
+ selector: "arguments:",
1160
+ category: 'accessing',
1161
+ fn: function (aCollection){
1162
+ var self=this;
1163
+ self["@arguments"]=aCollection;
1164
+ return self},
1165
+ args: ["aCollection"],
1166
+ source: "arguments: aCollection\x0a\x09arguments := aCollection",
1167
+ messageSends: [],
1168
+ referencedClasses: []
1169
+ }),
1170
+ smalltalk.IRMethod);
1171
+
1172
+ smalltalk.addMethod(
1173
+ "_classReferences",
1174
+ smalltalk.method({
1175
+ selector: "classReferences",
1176
+ category: 'accessing',
1177
+ fn: function (){
1178
+ var self=this;
1179
+ return self["@classReferences"];
1180
+ },
1181
+ args: [],
1182
+ source: "classReferences\x0a\x09^ classReferences",
1183
+ messageSends: [],
1184
+ referencedClasses: []
1185
+ }),
1186
+ smalltalk.IRMethod);
1187
+
1188
+ smalltalk.addMethod(
1189
+ "_classReferences_",
1190
+ smalltalk.method({
1191
+ selector: "classReferences:",
1192
+ category: 'accessing',
1193
+ fn: function (aCollection){
1194
+ var self=this;
1195
+ self["@classReferences"]=aCollection;
1196
+ return self},
1197
+ args: ["aCollection"],
1198
+ source: "classReferences: aCollection\x0a\x09classReferences := aCollection",
1199
+ messageSends: [],
1200
+ referencedClasses: []
1201
+ }),
1202
+ smalltalk.IRMethod);
1203
+
1204
+ smalltalk.addMethod(
1205
+ "_internalVariables",
1206
+ smalltalk.method({
1207
+ selector: "internalVariables",
1208
+ category: 'accessing',
1209
+ fn: function (){
1210
+ var self=this;
1211
+ var $1;
1212
+ if(($receiver = self["@internalVariables"]) == nil || $receiver == undefined){
1213
+ self["@internalVariables"]=smalltalk.send((smalltalk.Set || Set),"_new",[]);
1214
+ $1=self["@internalVariables"];
1215
+ } else {
1216
+ $1=self["@internalVariables"];
1217
+ };
1218
+ return $1;
1219
+ },
1220
+ args: [],
1221
+ source: "internalVariables\x0a\x09^ internalVariables ifNil: [ internalVariables := Set new ]",
1222
+ messageSends: ["ifNil:", "new"],
1223
+ referencedClasses: ["Set"]
1224
+ }),
1225
+ smalltalk.IRMethod);
1226
+
1227
+ smalltalk.addMethod(
1228
+ "_messageSends",
1229
+ smalltalk.method({
1230
+ selector: "messageSends",
1231
+ category: 'accessing',
1232
+ fn: function (){
1233
+ var self=this;
1234
+ return self["@messageSends"];
1235
+ },
1236
+ args: [],
1237
+ source: "messageSends\x0a\x09^ messageSends",
1238
+ messageSends: [],
1239
+ referencedClasses: []
1240
+ }),
1241
+ smalltalk.IRMethod);
1242
+
1243
+ smalltalk.addMethod(
1244
+ "_messageSends_",
1245
+ smalltalk.method({
1246
+ selector: "messageSends:",
1247
+ category: 'accessing',
1248
+ fn: function (aCollection){
1249
+ var self=this;
1250
+ self["@messageSends"]=aCollection;
1251
+ return self},
1252
+ args: ["aCollection"],
1253
+ source: "messageSends: aCollection\x0a\x09messageSends := aCollection",
1254
+ messageSends: [],
1255
+ referencedClasses: []
1256
+ }),
1257
+ smalltalk.IRMethod);
1258
+
1259
+ smalltalk.addMethod(
1260
+ "_scope_",
1261
+ smalltalk.method({
1262
+ selector: "scope:",
1263
+ category: 'accessing',
1264
+ fn: function (aScope){
1265
+ 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:"],
1272
+ referencedClasses: []
1273
+ }),
1274
+ smalltalk.IRMethod);
1275
+
1276
+ smalltalk.addMethod(
1277
+ "_selector",
1278
+ smalltalk.method({
1279
+ selector: "selector",
1280
+ category: 'accessing',
1281
+ fn: function (){
1282
+ var self=this;
1283
+ return self["@selector"];
1284
+ },
1285
+ args: [],
1286
+ source: "selector\x0a\x09^ selector",
1287
+ messageSends: [],
1288
+ referencedClasses: []
1289
+ }),
1290
+ smalltalk.IRMethod);
1291
+
1292
+ smalltalk.addMethod(
1293
+ "_selector_",
1294
+ smalltalk.method({
1295
+ selector: "selector:",
1296
+ category: 'accessing',
1297
+ fn: function (aString){
1298
+ var self=this;
1299
+ self["@selector"]=aString;
1300
+ return self},
1301
+ args: ["aString"],
1302
+ source: "selector: aString\x0a\x09selector := aString",
1303
+ messageSends: [],
1304
+ referencedClasses: []
1305
+ }),
1306
+ smalltalk.IRMethod);
1307
+
1308
+ smalltalk.addMethod(
1309
+ "_source",
1310
+ smalltalk.method({
1311
+ selector: "source",
1312
+ category: 'accessing',
1313
+ fn: function (){
1314
+ var self=this;
1315
+ return self["@source"];
1316
+ },
1317
+ args: [],
1318
+ source: "source\x0a\x09^ source",
1319
+ messageSends: [],
1320
+ referencedClasses: []
1321
+ }),
1322
+ smalltalk.IRMethod);
1323
+
1324
+ smalltalk.addMethod(
1325
+ "_source_",
1326
+ smalltalk.method({
1327
+ selector: "source:",
1328
+ category: 'accessing',
1329
+ fn: function (aString){
1330
+ var self=this;
1331
+ self["@source"]=aString;
1332
+ return self},
1333
+ args: ["aString"],
1334
+ source: "source: aString\x0a\x09source := aString",
1335
+ messageSends: [],
1336
+ referencedClasses: []
1337
+ }),
1338
+ smalltalk.IRMethod);
1339
+
1340
+
1341
+
1342
+ smalltalk.addClass('IRReturn', smalltalk.IRScopedInstruction, [], 'Compiler-IR');
1343
+ smalltalk.IRReturn.comment="I am a local return instruction."
1344
+ smalltalk.addMethod(
1345
+ "_accept_",
1346
+ smalltalk.method({
1347
+ selector: "accept:",
1348
+ category: 'visiting',
1349
+ fn: function (aVisitor){
1350
+ var self=this;
1351
+ var $1;
1352
+ $1=smalltalk.send(aVisitor,"_visitIRReturn_",[self]);
1353
+ return $1;
1354
+ },
1355
+ args: ["aVisitor"],
1356
+ source: "accept: aVisitor\x0a\x09^ aVisitor visitIRReturn: self",
1357
+ messageSends: ["visitIRReturn:"],
1358
+ referencedClasses: []
1359
+ }),
1360
+ smalltalk.IRReturn);
1361
+
1362
+ smalltalk.addMethod(
1363
+ "_canBeAssigned",
1364
+ smalltalk.method({
1365
+ selector: "canBeAssigned",
1366
+ category: 'testing',
1367
+ fn: function (){
1368
+ var self=this;
1369
+ return false;
1370
+ },
1371
+ args: [],
1372
+ source: "canBeAssigned\x0a\x09^ false",
1373
+ messageSends: [],
1374
+ referencedClasses: []
1375
+ }),
1376
+ smalltalk.IRReturn);
1377
+
1378
+ smalltalk.addMethod(
1379
+ "_isBlockReturn",
1380
+ smalltalk.method({
1381
+ selector: "isBlockReturn",
1382
+ category: 'testing',
1383
+ fn: function (){
1384
+ var self=this;
1385
+ return false;
1386
+ },
1387
+ args: [],
1388
+ source: "isBlockReturn\x0a\x09^ false",
1389
+ messageSends: [],
1390
+ referencedClasses: []
1391
+ }),
1392
+ smalltalk.IRReturn);
1393
+
1394
+ smalltalk.addMethod(
1395
+ "_isLocalReturn",
1396
+ smalltalk.method({
1397
+ selector: "isLocalReturn",
1398
+ category: 'testing',
1399
+ fn: function (){
1400
+ var self=this;
1401
+ return true;
1402
+ },
1403
+ args: [],
1404
+ source: "isLocalReturn\x0a\x09^ true",
1405
+ messageSends: [],
1406
+ referencedClasses: []
1407
+ }),
1408
+ smalltalk.IRReturn);
1409
+
1410
+ smalltalk.addMethod(
1411
+ "_isNonLocalReturn",
1412
+ smalltalk.method({
1413
+ selector: "isNonLocalReturn",
1414
+ category: 'testing',
1415
+ fn: function (){
1416
+ var self=this;
1417
+ var $1;
1418
+ $1=smalltalk.send(smalltalk.send(self,"_isLocalReturn",[]),"_not",[]);
1419
+ return $1;
1420
+ },
1421
+ args: [],
1422
+ source: "isNonLocalReturn\x0a\x09^ self isLocalReturn not",
1423
+ messageSends: ["not", "isLocalReturn"],
1424
+ referencedClasses: []
1425
+ }),
1426
+ smalltalk.IRReturn);
1427
+
1428
+ smalltalk.addMethod(
1429
+ "_isReturn",
1430
+ smalltalk.method({
1431
+ selector: "isReturn",
1432
+ category: 'testing',
1433
+ fn: function (){
1434
+ var self=this;
1435
+ return true;
1436
+ },
1437
+ args: [],
1438
+ source: "isReturn\x0a\x09^ true",
1439
+ messageSends: [],
1440
+ referencedClasses: []
1441
+ }),
1442
+ smalltalk.IRReturn);
1443
+
1444
+
1445
+
1446
+ smalltalk.addClass('IRBlockReturn', smalltalk.IRReturn, [], 'Compiler-IR');
1447
+ smalltalk.IRBlockReturn.comment="Smalltalk blocks return their last statement. I am a implicit block return instruction."
1448
+ smalltalk.addMethod(
1449
+ "_accept_",
1450
+ smalltalk.method({
1451
+ selector: "accept:",
1452
+ category: 'visiting',
1453
+ fn: function (aVisitor){
1454
+ var self=this;
1455
+ var $1;
1456
+ $1=smalltalk.send(aVisitor,"_visitIRBlockReturn_",[self]);
1457
+ return $1;
1458
+ },
1459
+ args: ["aVisitor"],
1460
+ source: "accept: aVisitor\x0a\x09^ aVisitor visitIRBlockReturn: self",
1461
+ messageSends: ["visitIRBlockReturn:"],
1462
+ referencedClasses: []
1463
+ }),
1464
+ smalltalk.IRBlockReturn);
1465
+
1466
+ smalltalk.addMethod(
1467
+ "_isBlockReturn",
1468
+ smalltalk.method({
1469
+ selector: "isBlockReturn",
1470
+ category: 'testing',
1471
+ fn: function (){
1472
+ var self=this;
1473
+ return true;
1474
+ },
1475
+ args: [],
1476
+ source: "isBlockReturn\x0a\x09^ true",
1477
+ messageSends: [],
1478
+ referencedClasses: []
1479
+ }),
1480
+ smalltalk.IRBlockReturn);
1481
+
1482
+
1483
+
1484
+ smalltalk.addClass('IRNonLocalReturn', smalltalk.IRReturn, [], 'Compiler-IR');
1485
+ smalltalk.IRNonLocalReturn.comment="I am a non local return instruction.\x0aNon local returns are handled using a try/catch JS statement.\x0a\x0aSee IRNonLocalReturnHandling class"
1486
+ smalltalk.addMethod(
1487
+ "_accept_",
1488
+ smalltalk.method({
1489
+ selector: "accept:",
1490
+ category: 'visiting',
1491
+ fn: function (aVisitor){
1492
+ var self=this;
1493
+ var $1;
1494
+ $1=smalltalk.send(aVisitor,"_visitIRNonLocalReturn_",[self]);
1495
+ return $1;
1496
+ },
1497
+ args: ["aVisitor"],
1498
+ source: "accept: aVisitor\x0a\x09^ aVisitor visitIRNonLocalReturn: self",
1499
+ messageSends: ["visitIRNonLocalReturn:"],
1500
+ referencedClasses: []
1501
+ }),
1502
+ smalltalk.IRNonLocalReturn);
1503
+
1504
+ smalltalk.addMethod(
1505
+ "_isLocalReturn",
1506
+ smalltalk.method({
1507
+ selector: "isLocalReturn",
1508
+ category: 'testing',
1509
+ fn: function (){
1510
+ var self=this;
1511
+ return false;
1512
+ },
1513
+ args: [],
1514
+ source: "isLocalReturn\x0a\x09^ false",
1515
+ messageSends: [],
1516
+ referencedClasses: []
1517
+ }),
1518
+ smalltalk.IRNonLocalReturn);
1519
+
1520
+
1521
+
1522
+ smalltalk.addClass('IRSend', smalltalk.IRInstruction, ['selector', 'classSend', 'index'], 'Compiler-IR');
1523
+ smalltalk.IRSend.comment="I am a message send instruction. "
1524
+ smalltalk.addMethod(
1525
+ "_accept_",
1526
+ smalltalk.method({
1527
+ selector: "accept:",
1528
+ category: 'visiting',
1529
+ fn: function (aVisitor){
1530
+ var self=this;
1531
+ var $1;
1532
+ $1=smalltalk.send(aVisitor,"_visitIRSend_",[self]);
1533
+ return $1;
1534
+ },
1535
+ args: ["aVisitor"],
1536
+ source: "accept: aVisitor\x0a\x09^ aVisitor visitIRSend: self",
1537
+ messageSends: ["visitIRSend:"],
1538
+ referencedClasses: []
1539
+ }),
1540
+ smalltalk.IRSend);
1541
+
1542
+ smalltalk.addMethod(
1543
+ "_classSend",
1544
+ smalltalk.method({
1545
+ selector: "classSend",
1546
+ category: 'accessing',
1547
+ fn: function (){
1548
+ var self=this;
1549
+ return self["@classSend"];
1550
+ },
1551
+ args: [],
1552
+ source: "classSend\x0a\x09^ classSend",
1553
+ messageSends: [],
1554
+ referencedClasses: []
1555
+ }),
1556
+ smalltalk.IRSend);
1557
+
1558
+ smalltalk.addMethod(
1559
+ "_classSend_",
1560
+ smalltalk.method({
1561
+ selector: "classSend:",
1562
+ category: 'accessing',
1563
+ fn: function (aClass){
1564
+ var self=this;
1565
+ self["@classSend"]=aClass;
1566
+ return self},
1567
+ args: ["aClass"],
1568
+ source: "classSend: aClass\x0a\x09classSend := aClass",
1569
+ messageSends: [],
1570
+ referencedClasses: []
1571
+ }),
1572
+ smalltalk.IRSend);
1573
+
1574
+ smalltalk.addMethod(
1575
+ "_index",
1576
+ smalltalk.method({
1577
+ selector: "index",
1578
+ category: 'accessing',
1579
+ fn: function (){
1580
+ var self=this;
1581
+ return self["@index"];
1582
+ },
1583
+ args: [],
1584
+ source: "index\x0a\x09^ index",
1585
+ messageSends: [],
1586
+ referencedClasses: []
1587
+ }),
1588
+ smalltalk.IRSend);
1589
+
1590
+ smalltalk.addMethod(
1591
+ "_index_",
1592
+ smalltalk.method({
1593
+ selector: "index:",
1594
+ category: 'accessing',
1595
+ fn: function (anInteger){
1596
+ var self=this;
1597
+ self["@index"]=anInteger;
1598
+ return self},
1599
+ args: ["anInteger"],
1600
+ source: "index: anInteger\x0a\x09index := anInteger",
1601
+ messageSends: [],
1602
+ referencedClasses: []
1603
+ }),
1604
+ smalltalk.IRSend);
1605
+
1606
+ smalltalk.addMethod(
1607
+ "_isSend",
1608
+ smalltalk.method({
1609
+ selector: "isSend",
1610
+ category: 'testing',
1611
+ fn: function (){
1612
+ var self=this;
1613
+ return true;
1614
+ },
1615
+ args: [],
1616
+ source: "isSend\x0a\x09^ true",
1617
+ messageSends: [],
1618
+ referencedClasses: []
1619
+ }),
1620
+ smalltalk.IRSend);
1621
+
1622
+ smalltalk.addMethod(
1623
+ "_selector",
1624
+ smalltalk.method({
1625
+ selector: "selector",
1626
+ category: 'accessing',
1627
+ fn: function (){
1628
+ var self=this;
1629
+ return self["@selector"];
1630
+ },
1631
+ args: [],
1632
+ source: "selector\x0a\x09^ selector",
1633
+ messageSends: [],
1634
+ referencedClasses: []
1635
+ }),
1636
+ smalltalk.IRSend);
1637
+
1638
+ smalltalk.addMethod(
1639
+ "_selector_",
1640
+ smalltalk.method({
1641
+ selector: "selector:",
1642
+ category: 'accessing',
1643
+ fn: function (aString){
1644
+ var self=this;
1645
+ self["@selector"]=aString;
1646
+ return self},
1647
+ args: ["aString"],
1648
+ source: "selector: aString\x0a\x09selector := aString",
1649
+ messageSends: [],
1650
+ referencedClasses: []
1651
+ }),
1652
+ smalltalk.IRSend);
1653
+
1654
+
1655
+
1656
+ smalltalk.addClass('IRSequence', smalltalk.IRInstruction, [], 'Compiler-IR');
1657
+ smalltalk.addMethod(
1658
+ "_accept_",
1659
+ smalltalk.method({
1660
+ selector: "accept:",
1661
+ category: 'visiting',
1662
+ fn: function (aVisitor){
1663
+ var self=this;
1664
+ var $1;
1665
+ $1=smalltalk.send(aVisitor,"_visitIRSequence_",[self]);
1666
+ return $1;
1667
+ },
1668
+ args: ["aVisitor"],
1669
+ source: "accept: aVisitor\x0a\x09^ aVisitor visitIRSequence: self",
1670
+ messageSends: ["visitIRSequence:"],
1671
+ referencedClasses: []
1672
+ }),
1673
+ smalltalk.IRSequence);
1674
+
1675
+ smalltalk.addMethod(
1676
+ "_isSequence",
1677
+ smalltalk.method({
1678
+ selector: "isSequence",
1679
+ category: 'testing',
1680
+ fn: function (){
1681
+ var self=this;
1682
+ return true;
1683
+ },
1684
+ args: [],
1685
+ source: "isSequence\x0a\x09^ true",
1686
+ messageSends: [],
1687
+ referencedClasses: []
1688
+ }),
1689
+ smalltalk.IRSequence);
1690
+
1691
+
1692
+
1693
+ smalltalk.addClass('IRBlockSequence', smalltalk.IRSequence, [], 'Compiler-IR');
1694
+ smalltalk.addMethod(
1695
+ "_accept_",
1696
+ smalltalk.method({
1697
+ selector: "accept:",
1698
+ category: 'visiting',
1699
+ fn: function (aVisitor){
1700
+ var self=this;
1701
+ var $1;
1702
+ $1=smalltalk.send(aVisitor,"_visitIRBlockSequence_",[self]);
1703
+ return $1;
1704
+ },
1705
+ args: ["aVisitor"],
1706
+ source: "accept: aVisitor\x0a\x09^ aVisitor visitIRBlockSequence: self",
1707
+ messageSends: ["visitIRBlockSequence:"],
1708
+ referencedClasses: []
1709
+ }),
1710
+ smalltalk.IRBlockSequence);
1711
+
1712
+
1713
+
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
+ smalltalk.addClass('IRValue', smalltalk.IRInstruction, ['value'], 'Compiler-IR');
1785
+ smalltalk.IRValue.comment="I am the simplest possible instruction. I represent a value."
1786
+ smalltalk.addMethod(
1787
+ "_accept_",
1788
+ smalltalk.method({
1789
+ selector: "accept:",
1790
+ category: 'visiting',
1791
+ fn: function (aVisitor){
1792
+ var self=this;
1793
+ var $1;
1794
+ $1=smalltalk.send(aVisitor,"_visitIRValue_",[self]);
1795
+ return $1;
1796
+ },
1797
+ args: ["aVisitor"],
1798
+ source: "accept: aVisitor\x0a\x09^ aVisitor visitIRValue: self",
1799
+ messageSends: ["visitIRValue:"],
1800
+ referencedClasses: []
1801
+ }),
1802
+ smalltalk.IRValue);
1803
+
1804
+ smalltalk.addMethod(
1805
+ "_value",
1806
+ smalltalk.method({
1807
+ selector: "value",
1808
+ category: 'accessing',
1809
+ fn: function (){
1810
+ var self=this;
1811
+ return self["@value"];
1812
+ },
1813
+ args: [],
1814
+ source: "value\x0a\x09^value",
1815
+ messageSends: [],
1816
+ referencedClasses: []
1817
+ }),
1818
+ smalltalk.IRValue);
1819
+
1820
+ smalltalk.addMethod(
1821
+ "_value_",
1822
+ smalltalk.method({
1823
+ selector: "value:",
1824
+ category: 'accessing',
1825
+ fn: function (aString){
1826
+ var self=this;
1827
+ self["@value"]=aString;
1828
+ return self},
1829
+ args: ["aString"],
1830
+ source: "value: aString\x0a\x09value := aString",
1831
+ messageSends: [],
1832
+ referencedClasses: []
1833
+ }),
1834
+ smalltalk.IRValue);
1835
+
1836
+
1837
+
1838
+ smalltalk.addClass('IRVariable', smalltalk.IRInstruction, ['variable'], 'Compiler-IR');
1839
+ smalltalk.IRVariable.comment="I am a variable instruction."
1840
+ smalltalk.addMethod(
1841
+ "_accept_",
1842
+ smalltalk.method({
1843
+ selector: "accept:",
1844
+ category: 'visiting',
1845
+ fn: function (aVisitor){
1846
+ var self=this;
1847
+ var $1;
1848
+ $1=smalltalk.send(aVisitor,"_visitIRVariable_",[self]);
1849
+ return $1;
1850
+ },
1851
+ args: ["aVisitor"],
1852
+ source: "accept: aVisitor\x0a\x09^ aVisitor visitIRVariable: self",
1853
+ messageSends: ["visitIRVariable:"],
1854
+ referencedClasses: []
1855
+ }),
1856
+ smalltalk.IRVariable);
1857
+
1858
+ smalltalk.addMethod(
1859
+ "_isVariable",
1860
+ smalltalk.method({
1861
+ selector: "isVariable",
1862
+ category: 'testing',
1863
+ fn: function (){
1864
+ var self=this;
1865
+ return true;
1866
+ },
1867
+ args: [],
1868
+ source: "isVariable\x0a\x09^ true",
1869
+ messageSends: [],
1870
+ referencedClasses: []
1871
+ }),
1872
+ smalltalk.IRVariable);
1873
+
1874
+ smalltalk.addMethod(
1875
+ "_variable",
1876
+ smalltalk.method({
1877
+ selector: "variable",
1878
+ category: 'accessing',
1879
+ fn: function (){
1880
+ var self=this;
1881
+ return self["@variable"];
1882
+ },
1883
+ args: [],
1884
+ source: "variable\x0a\x09^ variable",
1885
+ messageSends: [],
1886
+ referencedClasses: []
1887
+ }),
1888
+ smalltalk.IRVariable);
1889
+
1890
+ smalltalk.addMethod(
1891
+ "_variable_",
1892
+ smalltalk.method({
1893
+ selector: "variable:",
1894
+ category: 'accessing',
1895
+ fn: function (aScopeVariable){
1896
+ var self=this;
1897
+ self["@variable"]=aScopeVariable;
1898
+ return self},
1899
+ args: ["aScopeVariable"],
1900
+ source: "variable: aScopeVariable\x0a\x09variable := aScopeVariable",
1901
+ messageSends: [],
1902
+ referencedClasses: []
1903
+ }),
1904
+ smalltalk.IRVariable);
1905
+
1906
+
1907
+
1908
+ smalltalk.addClass('IRVerbatim', smalltalk.IRInstruction, ['source'], 'Compiler-IR');
1909
+ smalltalk.addMethod(
1910
+ "_accept_",
1911
+ smalltalk.method({
1912
+ selector: "accept:",
1913
+ category: 'visiting',
1914
+ fn: function (aVisitor){
1915
+ var self=this;
1916
+ var $1;
1917
+ $1=smalltalk.send(aVisitor,"_visitIRVerbatim_",[self]);
1918
+ return $1;
1919
+ },
1920
+ args: ["aVisitor"],
1921
+ source: "accept: aVisitor\x0a\x09^ aVisitor visitIRVerbatim: self",
1922
+ messageSends: ["visitIRVerbatim:"],
1923
+ referencedClasses: []
1924
+ }),
1925
+ smalltalk.IRVerbatim);
1926
+
1927
+ smalltalk.addMethod(
1928
+ "_source",
1929
+ smalltalk.method({
1930
+ selector: "source",
1931
+ category: 'accessing',
1932
+ fn: function (){
1933
+ var self=this;
1934
+ return self["@source"];
1935
+ },
1936
+ args: [],
1937
+ source: "source\x0a\x09^ source",
1938
+ messageSends: [],
1939
+ referencedClasses: []
1940
+ }),
1941
+ smalltalk.IRVerbatim);
1942
+
1943
+ smalltalk.addMethod(
1944
+ "_source_",
1945
+ smalltalk.method({
1946
+ selector: "source:",
1947
+ category: 'accessing',
1948
+ fn: function (aString){
1949
+ var self=this;
1950
+ self["@source"]=aString;
1951
+ return self},
1952
+ args: ["aString"],
1953
+ source: "source: aString\x0a\x09source := aString",
1954
+ messageSends: [],
1955
+ referencedClasses: []
1956
+ }),
1957
+ smalltalk.IRVerbatim);
1958
+
1959
+
1960
+
1961
+ smalltalk.addClass('IRVisitor', smalltalk.Object, [], 'Compiler-IR');
1962
+ smalltalk.addMethod(
1963
+ "_visit_",
1964
+ smalltalk.method({
1965
+ selector: "visit:",
1966
+ category: 'visiting',
1967
+ fn: function (anIRInstruction){
1968
+ var self=this;
1969
+ var $1;
1970
+ $1=smalltalk.send(anIRInstruction,"_accept_",[self]);
1971
+ return $1;
1972
+ },
1973
+ args: ["anIRInstruction"],
1974
+ source: "visit: anIRInstruction\x0a\x09^ anIRInstruction accept: self",
1975
+ messageSends: ["accept:"],
1976
+ referencedClasses: []
1977
+ }),
1978
+ smalltalk.IRVisitor);
1979
+
1980
+ smalltalk.addMethod(
1981
+ "_visitIRAssignment_",
1982
+ smalltalk.method({
1983
+ selector: "visitIRAssignment:",
1984
+ category: 'visiting',
1985
+ fn: function (anIRAssignment){
1986
+ var self=this;
1987
+ var $1;
1988
+ $1=smalltalk.send(self,"_visitIRInstruction_",[anIRAssignment]);
1989
+ return $1;
1990
+ },
1991
+ args: ["anIRAssignment"],
1992
+ source: "visitIRAssignment: anIRAssignment\x0a\x09^ self visitIRInstruction: anIRAssignment",
1993
+ messageSends: ["visitIRInstruction:"],
1994
+ referencedClasses: []
1995
+ }),
1996
+ smalltalk.IRVisitor);
1997
+
1998
+ smalltalk.addMethod(
1999
+ "_visitIRBlockReturn_",
2000
+ smalltalk.method({
2001
+ selector: "visitIRBlockReturn:",
2002
+ category: 'visiting',
2003
+ fn: function (anIRBlockReturn){
2004
+ var self=this;
2005
+ var $1;
2006
+ $1=smalltalk.send(self,"_visitIRReturn_",[anIRBlockReturn]);
2007
+ return $1;
2008
+ },
2009
+ args: ["anIRBlockReturn"],
2010
+ source: "visitIRBlockReturn: anIRBlockReturn\x0a\x09^ self visitIRReturn: anIRBlockReturn",
2011
+ messageSends: ["visitIRReturn:"],
2012
+ referencedClasses: []
2013
+ }),
2014
+ smalltalk.IRVisitor);
2015
+
2016
+ smalltalk.addMethod(
2017
+ "_visitIRBlockSequence_",
2018
+ smalltalk.method({
2019
+ selector: "visitIRBlockSequence:",
2020
+ category: 'visiting',
2021
+ fn: function (anIRBlockSequence){
2022
+ var self=this;
2023
+ var $1;
2024
+ $1=smalltalk.send(self,"_visitIRSequence_",[anIRBlockSequence]);
2025
+ return $1;
2026
+ },
2027
+ args: ["anIRBlockSequence"],
2028
+ source: "visitIRBlockSequence: anIRBlockSequence\x0a\x09^ self visitIRSequence: anIRBlockSequence",
2029
+ messageSends: ["visitIRSequence:"],
2030
+ referencedClasses: []
2031
+ }),
2032
+ smalltalk.IRVisitor);
2033
+
2034
+ smalltalk.addMethod(
2035
+ "_visitIRClosure_",
2036
+ smalltalk.method({
2037
+ selector: "visitIRClosure:",
2038
+ category: 'visiting',
2039
+ fn: function (anIRClosure){
2040
+ var self=this;
2041
+ var $1;
2042
+ $1=smalltalk.send(self,"_visitIRInstruction_",[anIRClosure]);
2043
+ return $1;
2044
+ },
2045
+ args: ["anIRClosure"],
2046
+ source: "visitIRClosure: anIRClosure\x0a\x09^ self visitIRInstruction: anIRClosure",
2047
+ messageSends: ["visitIRInstruction:"],
2048
+ referencedClasses: []
2049
+ }),
2050
+ smalltalk.IRVisitor);
2051
+
2052
+ smalltalk.addMethod(
2053
+ "_visitIRDynamicArray_",
2054
+ smalltalk.method({
2055
+ selector: "visitIRDynamicArray:",
2056
+ category: 'visiting',
2057
+ fn: function (anIRDynamicArray){
2058
+ var self=this;
2059
+ var $1;
2060
+ $1=smalltalk.send(self,"_visitIRInstruction_",[anIRDynamicArray]);
2061
+ return $1;
2062
+ },
2063
+ args: ["anIRDynamicArray"],
2064
+ source: "visitIRDynamicArray: anIRDynamicArray\x0a\x09^ self visitIRInstruction: anIRDynamicArray",
2065
+ messageSends: ["visitIRInstruction:"],
2066
+ referencedClasses: []
2067
+ }),
2068
+ smalltalk.IRVisitor);
2069
+
2070
+ smalltalk.addMethod(
2071
+ "_visitIRDynamicDictionary_",
2072
+ smalltalk.method({
2073
+ selector: "visitIRDynamicDictionary:",
2074
+ category: 'visiting',
2075
+ fn: function (anIRDynamicDictionary){
2076
+ var self=this;
2077
+ var $1;
2078
+ $1=smalltalk.send(self,"_visitIRInstruction_",[anIRDynamicDictionary]);
2079
+ return $1;
2080
+ },
2081
+ args: ["anIRDynamicDictionary"],
2082
+ source: "visitIRDynamicDictionary: anIRDynamicDictionary\x0a\x09^ self visitIRInstruction: anIRDynamicDictionary",
2083
+ messageSends: ["visitIRInstruction:"],
2084
+ referencedClasses: []
2085
+ }),
2086
+ smalltalk.IRVisitor);
2087
+
2088
+ smalltalk.addMethod(
2089
+ "_visitIRInlinedClosure_",
2090
+ smalltalk.method({
2091
+ selector: "visitIRInlinedClosure:",
2092
+ category: 'visiting',
2093
+ fn: function (anIRInlinedClosure){
2094
+ var self=this;
2095
+ var $1;
2096
+ $1=smalltalk.send(self,"_visitIRClosure_",[anIRInlinedClosure]);
2097
+ return $1;
2098
+ },
2099
+ args: ["anIRInlinedClosure"],
2100
+ source: "visitIRInlinedClosure: anIRInlinedClosure\x0a\x09^ self visitIRClosure: anIRInlinedClosure",
2101
+ messageSends: ["visitIRClosure:"],
2102
+ referencedClasses: []
2103
+ }),
2104
+ smalltalk.IRVisitor);
2105
+
2106
+ smalltalk.addMethod(
2107
+ "_visitIRInlinedSequence_",
2108
+ smalltalk.method({
2109
+ selector: "visitIRInlinedSequence:",
2110
+ category: 'visiting',
2111
+ fn: function (anIRInlinedSequence){
2112
+ var self=this;
2113
+ var $1;
2114
+ $1=smalltalk.send(self,"_visitIRSequence_",[anIRInlinedSequence]);
2115
+ return $1;
2116
+ },
2117
+ args: ["anIRInlinedSequence"],
2118
+ source: "visitIRInlinedSequence: anIRInlinedSequence\x0a\x09^ self visitIRSequence: anIRInlinedSequence",
2119
+ messageSends: ["visitIRSequence:"],
2120
+ referencedClasses: []
2121
+ }),
2122
+ smalltalk.IRVisitor);
2123
+
2124
+ smalltalk.addMethod(
2125
+ "_visitIRInstruction_",
2126
+ smalltalk.method({
2127
+ selector: "visitIRInstruction:",
2128
+ category: 'visiting',
2129
+ fn: function (anIRInstruction){
2130
+ 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
+ },
2136
+ args: ["anIRInstruction"],
2137
+ source: "visitIRInstruction: anIRInstruction\x0a\x09anIRInstruction instructions do: [ :each | self visit: each ].\x0a\x09^ anIRInstruction",
2138
+ messageSends: ["do:", "visit:", "instructions"],
2139
+ referencedClasses: []
2140
+ }),
2141
+ smalltalk.IRVisitor);
2142
+
2143
+ smalltalk.addMethod(
2144
+ "_visitIRMethod_",
2145
+ smalltalk.method({
2146
+ selector: "visitIRMethod:",
2147
+ category: 'visiting',
2148
+ fn: function (anIRMethod){
2149
+ var self=this;
2150
+ var $1;
2151
+ $1=smalltalk.send(self,"_visitIRInstruction_",[anIRMethod]);
2152
+ return $1;
2153
+ },
2154
+ args: ["anIRMethod"],
2155
+ source: "visitIRMethod: anIRMethod\x0a\x09^ self visitIRInstruction: anIRMethod",
2156
+ messageSends: ["visitIRInstruction:"],
2157
+ referencedClasses: []
2158
+ }),
2159
+ smalltalk.IRVisitor);
2160
+
2161
+ smalltalk.addMethod(
2162
+ "_visitIRNonLocalReturn_",
2163
+ smalltalk.method({
2164
+ selector: "visitIRNonLocalReturn:",
2165
+ category: 'visiting',
2166
+ fn: function (anIRNonLocalReturn){
2167
+ var self=this;
2168
+ var $1;
2169
+ $1=smalltalk.send(self,"_visitIRInstruction_",[anIRNonLocalReturn]);
2170
+ return $1;
2171
+ },
2172
+ args: ["anIRNonLocalReturn"],
2173
+ source: "visitIRNonLocalReturn: anIRNonLocalReturn\x0a\x09^ self visitIRInstruction: anIRNonLocalReturn",
2174
+ messageSends: ["visitIRInstruction:"],
2175
+ referencedClasses: []
2176
+ }),
2177
+ smalltalk.IRVisitor);
2178
+
2179
+ smalltalk.addMethod(
2180
+ "_visitIRNonLocalReturnHandling_",
2181
+ smalltalk.method({
2182
+ selector: "visitIRNonLocalReturnHandling:",
2183
+ category: 'visiting',
2184
+ fn: function (anIRNonLocalReturnHandling){
2185
+ var self=this;
2186
+ var $1;
2187
+ $1=smalltalk.send(self,"_visitIRInstruction_",[anIRNonLocalReturnHandling]);
2188
+ return $1;
2189
+ },
2190
+ args: ["anIRNonLocalReturnHandling"],
2191
+ source: "visitIRNonLocalReturnHandling: anIRNonLocalReturnHandling\x0a\x09^ self visitIRInstruction: anIRNonLocalReturnHandling",
2192
+ messageSends: ["visitIRInstruction:"],
2193
+ referencedClasses: []
2194
+ }),
2195
+ smalltalk.IRVisitor);
2196
+
2197
+ smalltalk.addMethod(
2198
+ "_visitIRReturn_",
2199
+ smalltalk.method({
2200
+ selector: "visitIRReturn:",
2201
+ category: 'visiting',
2202
+ fn: function (anIRReturn){
2203
+ var self=this;
2204
+ var $1;
2205
+ $1=smalltalk.send(self,"_visitIRInstruction_",[anIRReturn]);
2206
+ return $1;
2207
+ },
2208
+ args: ["anIRReturn"],
2209
+ source: "visitIRReturn: anIRReturn\x0a\x09^ self visitIRInstruction: anIRReturn",
2210
+ messageSends: ["visitIRInstruction:"],
2211
+ referencedClasses: []
2212
+ }),
2213
+ smalltalk.IRVisitor);
2214
+
2215
+ smalltalk.addMethod(
2216
+ "_visitIRSend_",
2217
+ smalltalk.method({
2218
+ selector: "visitIRSend:",
2219
+ category: 'visiting',
2220
+ fn: function (anIRSend){
2221
+ var self=this;
2222
+ var $1;
2223
+ $1=smalltalk.send(self,"_visitIRInstruction_",[anIRSend]);
2224
+ return $1;
2225
+ },
2226
+ args: ["anIRSend"],
2227
+ source: "visitIRSend: anIRSend\x0a\x09^ self visitIRInstruction: anIRSend",
2228
+ messageSends: ["visitIRInstruction:"],
2229
+ referencedClasses: []
2230
+ }),
2231
+ smalltalk.IRVisitor);
2232
+
2233
+ smalltalk.addMethod(
2234
+ "_visitIRSequence_",
2235
+ smalltalk.method({
2236
+ selector: "visitIRSequence:",
2237
+ category: 'visiting',
2238
+ fn: function (anIRSequence){
2239
+ var self=this;
2240
+ var $1;
2241
+ $1=smalltalk.send(self,"_visitIRInstruction_",[anIRSequence]);
2242
+ return $1;
2243
+ },
2244
+ args: ["anIRSequence"],
2245
+ source: "visitIRSequence: anIRSequence\x0a\x09^ self visitIRInstruction: anIRSequence",
2246
+ messageSends: ["visitIRInstruction:"],
2247
+ referencedClasses: []
2248
+ }),
2249
+ smalltalk.IRVisitor);
2250
+
2251
+ smalltalk.addMethod(
2252
+ "_visitIRTempDeclaration_",
2253
+ smalltalk.method({
2254
+ selector: "visitIRTempDeclaration:",
2255
+ category: 'visiting',
2256
+ fn: function (anIRTempDeclaration){
2257
+ var self=this;
2258
+ var $1;
2259
+ $1=smalltalk.send(self,"_visitIRInstruction_",[anIRTempDeclaration]);
2260
+ return $1;
2261
+ },
2262
+ args: ["anIRTempDeclaration"],
2263
+ source: "visitIRTempDeclaration: anIRTempDeclaration\x0a\x09^ self visitIRInstruction: anIRTempDeclaration",
2264
+ messageSends: ["visitIRInstruction:"],
2265
+ referencedClasses: []
2266
+ }),
2267
+ smalltalk.IRVisitor);
2268
+
2269
+ smalltalk.addMethod(
2270
+ "_visitIRValue_",
2271
+ smalltalk.method({
2272
+ selector: "visitIRValue:",
2273
+ category: 'visiting',
2274
+ fn: function (anIRValue){
2275
+ var self=this;
2276
+ var $1;
2277
+ $1=smalltalk.send(self,"_visitIRInstruction_",[anIRValue]);
2278
+ return $1;
2279
+ },
2280
+ args: ["anIRValue"],
2281
+ source: "visitIRValue: anIRValue\x0a\x09^ self visitIRInstruction: anIRValue",
2282
+ messageSends: ["visitIRInstruction:"],
2283
+ referencedClasses: []
2284
+ }),
2285
+ smalltalk.IRVisitor);
2286
+
2287
+ smalltalk.addMethod(
2288
+ "_visitIRVariable_",
2289
+ smalltalk.method({
2290
+ selector: "visitIRVariable:",
2291
+ category: 'visiting',
2292
+ fn: function (anIRVariable){
2293
+ var self=this;
2294
+ var $1;
2295
+ $1=smalltalk.send(self,"_visitIRInstruction_",[anIRVariable]);
2296
+ return $1;
2297
+ },
2298
+ args: ["anIRVariable"],
2299
+ source: "visitIRVariable: anIRVariable\x0a\x09^ self visitIRInstruction: anIRVariable",
2300
+ messageSends: ["visitIRInstruction:"],
2301
+ referencedClasses: []
2302
+ }),
2303
+ smalltalk.IRVisitor);
2304
+
2305
+ smalltalk.addMethod(
2306
+ "_visitIRVerbatim_",
2307
+ smalltalk.method({
2308
+ selector: "visitIRVerbatim:",
2309
+ category: 'visiting',
2310
+ fn: function (anIRVerbatim){
2311
+ var self=this;
2312
+ var $1;
2313
+ $1=smalltalk.send(self,"_visitIRInstruction_",[anIRVerbatim]);
2314
+ return $1;
2315
+ },
2316
+ args: ["anIRVerbatim"],
2317
+ source: "visitIRVerbatim: anIRVerbatim\x0a\x09^ self visitIRInstruction: anIRVerbatim",
2318
+ messageSends: ["visitIRInstruction:"],
2319
+ referencedClasses: []
2320
+ }),
2321
+ smalltalk.IRVisitor);
2322
+
2323
+
2324
+
2325
+ smalltalk.addClass('IRJSTranslator', smalltalk.IRVisitor, ['stream'], 'Compiler-IR');
2326
+ smalltalk.addMethod(
2327
+ "_contents",
2328
+ smalltalk.method({
2329
+ selector: "contents",
2330
+ category: 'accessing',
2331
+ fn: function (){
2332
+ var self=this;
2333
+ var $1;
2334
+ $1=smalltalk.send(smalltalk.send(self,"_stream",[]),"_contents",[]);
2335
+ return $1;
2336
+ },
2337
+ args: [],
2338
+ source: "contents\x0a\x09^ self stream contents",
2339
+ messageSends: ["contents", "stream"],
2340
+ referencedClasses: []
2341
+ }),
2342
+ smalltalk.IRJSTranslator);
2343
+
2344
+ smalltalk.addMethod(
2345
+ "_initialize",
2346
+ smalltalk.method({
2347
+ selector: "initialize",
2348
+ category: 'initialization',
2349
+ fn: function (){
2350
+ var self=this;
2351
+ smalltalk.send(self,"_initialize",[],smalltalk.IRVisitor);
2352
+ self["@stream"]=smalltalk.send((smalltalk.JSStream || JSStream),"_new",[]);
2353
+ return self},
2354
+ args: [],
2355
+ source: "initialize\x0a\x09super initialize.\x0a\x09stream := JSStream new.",
2356
+ messageSends: ["initialize", "new"],
2357
+ referencedClasses: ["JSStream"]
2358
+ }),
2359
+ smalltalk.IRJSTranslator);
2360
+
2361
+ smalltalk.addMethod(
2362
+ "_stream",
2363
+ smalltalk.method({
2364
+ selector: "stream",
2365
+ category: 'accessing',
2366
+ fn: function (){
2367
+ var self=this;
2368
+ return self["@stream"];
2369
+ },
2370
+ args: [],
2371
+ source: "stream\x0a\x09^ stream",
2372
+ messageSends: [],
2373
+ referencedClasses: []
2374
+ }),
2375
+ smalltalk.IRJSTranslator);
2376
+
2377
+ smalltalk.addMethod(
2378
+ "_stream_",
2379
+ smalltalk.method({
2380
+ selector: "stream:",
2381
+ category: 'accessing',
2382
+ fn: function (aStream){
2383
+ var self=this;
2384
+ self["@stream"]=aStream;
2385
+ return self},
2386
+ args: ["aStream"],
2387
+ source: "stream: aStream\x0a\x09stream := aStream",
2388
+ messageSends: [],
2389
+ referencedClasses: []
2390
+ }),
2391
+ smalltalk.IRJSTranslator);
2392
+
2393
+ smalltalk.addMethod(
2394
+ "_visitIRAssignment_",
2395
+ smalltalk.method({
2396
+ selector: "visitIRAssignment:",
2397
+ category: 'visiting',
2398
+ fn: function (anIRAssignment){
2399
+ 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},
2404
+ args: ["anIRAssignment"],
2405
+ source: "visitIRAssignment: anIRAssignment\x0a\x09self visit: anIRAssignment instructions first.\x0a\x09self stream nextPutAssignment.\x0a\x09self visit: anIRAssignment instructions last.",
2406
+ messageSends: ["visit:", "first", "instructions", "nextPutAssignment", "stream", "last"],
2407
+ referencedClasses: []
2408
+ }),
2409
+ smalltalk.IRJSTranslator);
2410
+
2411
+ smalltalk.addMethod(
2412
+ "_visitIRClosure_",
2413
+ smalltalk.method({
2414
+ selector: "visitIRClosure:",
2415
+ category: 'visiting',
2416
+ fn: function (anIRClosure){
2417
+ 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},
2422
+ 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"],
2425
+ referencedClasses: []
2426
+ }),
2427
+ smalltalk.IRJSTranslator);
2428
+
2429
+ smalltalk.addMethod(
2430
+ "_visitIRDynamicArray_",
2431
+ smalltalk.method({
2432
+ selector: "visitIRDynamicArray:",
2433
+ category: 'visiting',
2434
+ fn: function (anIRDynamicArray){
2435
+ 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},
2444
+ args: ["anIRDynamicArray"],
2445
+ 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
+ messageSends: ["nextPutAll:", "stream", "do:separatedBy:", "visit:", "instructions"],
2447
+ referencedClasses: []
2448
+ }),
2449
+ smalltalk.IRJSTranslator);
2450
+
2451
+ smalltalk.addMethod(
2452
+ "_visitIRDynamicDictionary_",
2453
+ smalltalk.method({
2454
+ selector: "visitIRDynamicDictionary:",
2455
+ category: 'visiting',
2456
+ fn: function (anIRDynamicDictionary){
2457
+ 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},
2466
+ args: ["anIRDynamicDictionary"],
2467
+ 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
+ messageSends: ["nextPutAll:", "stream", "do:separatedBy:", "visit:", "instructions"],
2469
+ referencedClasses: []
2470
+ }),
2471
+ smalltalk.IRJSTranslator);
2472
+
2473
+ smalltalk.addMethod(
2474
+ "_visitIRMethod_",
2475
+ smalltalk.method({
2476
+ selector: "visitIRMethod:",
2477
+ category: 'visiting',
2478
+ fn: function (anIRMethod){
2479
+ 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
+ })])]);
2488
+ };
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
+ })]);
2494
+ } else {
2495
+ return smalltalk.send(self,"_visitIRMethod_",[anIRMethod],smalltalk.IRVisitor);
2496
+ };
2497
+ }),smalltalk.send(anIRMethod,"_arguments",[])]);
2498
+ })]);
2499
+ return self},
2500
+ 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"],
2503
+ referencedClasses: []
2504
+ }),
2505
+ smalltalk.IRJSTranslator);
2506
+
2507
+ smalltalk.addMethod(
2508
+ "_visitIRNonLocalReturn_",
2509
+ smalltalk.method({
2510
+ selector: "visitIRNonLocalReturn:",
2511
+ category: 'visiting',
2512
+ fn: function (anIRNonLocalReturn){
2513
+ 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},
2518
+ args: ["anIRNonLocalReturn"],
2519
+ source: "visitIRNonLocalReturn: anIRNonLocalReturn\x0a\x09self stream nextPutNonLocalReturnWith: [\x0a\x09\x09super visitIRNonLocalReturn: anIRNonLocalReturn ]",
2520
+ messageSends: ["nextPutNonLocalReturnWith:", "visitIRNonLocalReturn:", "stream"],
2521
+ referencedClasses: []
2522
+ }),
2523
+ smalltalk.IRJSTranslator);
2524
+
2525
+ smalltalk.addMethod(
2526
+ "_visitIRReturn_",
2527
+ smalltalk.method({
2528
+ selector: "visitIRReturn:",
2529
+ category: 'visiting',
2530
+ fn: function (anIRReturn){
2531
+ 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},
2536
+ args: ["anIRReturn"],
2537
+ source: "visitIRReturn: anIRReturn\x0a\x09self stream nextPutReturnWith: [\x0a\x09\x09super visitIRReturn: anIRReturn ]",
2538
+ messageSends: ["nextPutReturnWith:", "visitIRReturn:", "stream"],
2539
+ referencedClasses: []
2540
+ }),
2541
+ smalltalk.IRJSTranslator);
2542
+
2543
+ smalltalk.addMethod(
2544
+ "_visitIRSend_",
2545
+ smalltalk.method({
2546
+ selector: "visitIRSend:",
2547
+ category: 'visiting',
2548
+ fn: function (anIRSend){
2549
+ 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",[]);
2561
+ if(($receiver = $1) == nil || $receiver == undefined){
2562
+ $1;
2563
+ } else {
2564
+ smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutAll_",[smalltalk.send(",","__comma",[smalltalk.send(smalltalk.send(anIRSend,"_classSend",[]),"_asJavascript",[])])]);
2565
+ };
2566
+ smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutAll_",[")"]);
2567
+ return self},
2568
+ 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"],
2571
+ referencedClasses: []
2572
+ }),
2573
+ smalltalk.IRJSTranslator);
2574
+
2575
+ smalltalk.addMethod(
2576
+ "_visitIRSequence_",
2577
+ smalltalk.method({
2578
+ selector: "visitIRSequence:",
2579
+ category: 'visiting',
2580
+ fn: function (anIRSequence){
2581
+ 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},
2588
+ args: ["anIRSequence"],
2589
+ source: "visitIRSequence: anIRSequence\x0a\x09self stream nextPutSequenceWith: [\x0a\x09\x09anIRSequence instructions do: [ :each |\x0a\x09\x09\x09self stream nextPutStatementWith: (self visit: each) ]]",
2590
+ messageSends: ["nextPutSequenceWith:", "do:", "nextPutStatementWith:", "visit:", "stream", "instructions"],
2591
+ referencedClasses: []
2592
+ }),
2593
+ smalltalk.IRJSTranslator);
2594
+
2595
+ smalltalk.addMethod(
2596
+ "_visitIRTempDeclaration_",
2597
+ smalltalk.method({
2598
+ selector: "visitIRTempDeclaration:",
2599
+ category: 'visiting',
2600
+ fn: function (anIRTempDeclaration){
2601
+ var self=this;
2602
+ smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutVar_",[smalltalk.send(smalltalk.send(anIRTempDeclaration,"_name",[]),"_asVariableName",[])]);
2603
+ return self},
2604
+ args: ["anIRTempDeclaration"],
2605
+ source: "visitIRTempDeclaration: anIRTempDeclaration\x0a\x09self stream nextPutVar: anIRTempDeclaration name asVariableName",
2606
+ messageSends: ["nextPutVar:", "asVariableName", "name", "stream"],
2607
+ referencedClasses: []
2608
+ }),
2609
+ smalltalk.IRJSTranslator);
2610
+
2611
+ smalltalk.addMethod(
2612
+ "_visitIRValue_",
2613
+ smalltalk.method({
2614
+ selector: "visitIRValue:",
2615
+ category: 'visiting',
2616
+ fn: function (anIRValue){
2617
+ var self=this;
2618
+ smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutAll_",[smalltalk.send(smalltalk.send(anIRValue,"_value",[]),"_asJavascript",[])]);
2619
+ return self},
2620
+ args: ["anIRValue"],
2621
+ source: "visitIRValue: anIRValue\x0a\x09self stream nextPutAll: anIRValue value asJavascript",
2622
+ messageSends: ["nextPutAll:", "asJavascript", "value", "stream"],
2623
+ referencedClasses: []
2624
+ }),
2625
+ smalltalk.IRJSTranslator);
2626
+
2627
+ smalltalk.addMethod(
2628
+ "_visitIRVariable_",
2629
+ smalltalk.method({
2630
+ selector: "visitIRVariable:",
2631
+ category: 'visiting',
2632
+ fn: function (anIRVariable){
2633
+ var self=this;
2634
+ var $1;
2635
+ $1=smalltalk.send(smalltalk.send(smalltalk.send(anIRVariable,"_variable",[]),"_name",[]),"__eq",["thisContext"]);
2636
+ if(smalltalk.assert($1)){
2637
+ smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutAll_",["smalltalk.getThisContext()"]);
2638
+ } else {
2639
+ smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutAll_",[smalltalk.send(smalltalk.send(anIRVariable,"_variable",[]),"_alias",[])]);
2640
+ };
2641
+ return self},
2642
+ args: ["anIRVariable"],
2643
+ source: "visitIRVariable: anIRVariable\x0a\x09anIRVariable variable name = 'thisContext'\x0a \x09ifTrue: [ self stream nextPutAll: 'smalltalk.getThisContext()' ]\x0a \x09ifFalse: [ self stream nextPutAll: anIRVariable variable alias ]",
2644
+ messageSends: ["ifTrue:ifFalse:", "nextPutAll:", "stream", "alias", "variable", "=", "name"],
2645
+ referencedClasses: []
2646
+ }),
2647
+ smalltalk.IRJSTranslator);
2648
+
2649
+ smalltalk.addMethod(
2650
+ "_visitIRVerbatim_",
2651
+ smalltalk.method({
2652
+ selector: "visitIRVerbatim:",
2653
+ category: 'visiting',
2654
+ fn: function (anIRVerbatim){
2655
+ 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},
2660
+ args: ["anIRVerbatim"],
2661
+ source: "visitIRVerbatim: anIRVerbatim\x0a\x09self stream nextPutStatementWith: [\x0a\x09\x09self stream nextPutAll: anIRVerbatim source ]",
2662
+ messageSends: ["nextPutStatementWith:", "nextPutAll:", "source", "stream"],
2663
+ referencedClasses: []
2664
+ }),
2665
+ smalltalk.IRJSTranslator);
2666
+
2667
+
2668
+
2669
+ smalltalk.addClass('JSStream', smalltalk.Object, ['stream'], 'Compiler-IR');
2670
+ smalltalk.addMethod(
2671
+ "_contents",
2672
+ smalltalk.method({
2673
+ selector: "contents",
2674
+ category: 'accessing',
2675
+ fn: function (){
2676
+ var self=this;
2677
+ var $1;
2678
+ $1=smalltalk.send(self["@stream"],"_contents",[]);
2679
+ return $1;
2680
+ },
2681
+ args: [],
2682
+ source: "contents\x0a\x09^ stream contents",
2683
+ messageSends: ["contents"],
2684
+ referencedClasses: []
2685
+ }),
2686
+ smalltalk.JSStream);
2687
+
2688
+ smalltalk.addMethod(
2689
+ "_initialize",
2690
+ smalltalk.method({
2691
+ selector: "initialize",
2692
+ category: 'initialization',
2693
+ fn: function (){
2694
+ var self=this;
2695
+ smalltalk.send(self,"_initialize",[],smalltalk.Object);
2696
+ self["@stream"]=smalltalk.send("","_writeStream",[]);
2697
+ return self},
2698
+ args: [],
2699
+ source: "initialize\x0a\x09super initialize.\x0a\x09stream := '' writeStream.",
2700
+ messageSends: ["initialize", "writeStream"],
2701
+ referencedClasses: []
2702
+ }),
2703
+ smalltalk.JSStream);
2704
+
2705
+ smalltalk.addMethod(
2706
+ "_lf",
2707
+ smalltalk.method({
2708
+ selector: "lf",
2709
+ category: 'streaming',
2710
+ fn: function (){
2711
+ var self=this;
2712
+ smalltalk.send(self["@stream"],"_lf",[]);
2713
+ return self},
2714
+ args: [],
2715
+ source: "lf\x0a\x09stream lf",
2716
+ messageSends: ["lf"],
2717
+ referencedClasses: []
2718
+ }),
2719
+ smalltalk.JSStream);
2720
+
2721
+ smalltalk.addMethod(
2722
+ "_nextPut_",
2723
+ smalltalk.method({
2724
+ selector: "nextPut:",
2725
+ category: 'streaming',
2726
+ fn: function (aString){
2727
+ var self=this;
2728
+ smalltalk.send(self["@stream"],"_nextPut_",[aString]);
2729
+ return self},
2730
+ args: ["aString"],
2731
+ source: "nextPut: aString\x0a\x09stream nextPut: aString",
2732
+ messageSends: ["nextPut:"],
2733
+ referencedClasses: []
2734
+ }),
2735
+ smalltalk.JSStream);
2736
+
2737
+ smalltalk.addMethod(
2738
+ "_nextPutAll_",
2739
+ smalltalk.method({
2740
+ selector: "nextPutAll:",
2741
+ category: 'streaming',
2742
+ fn: function (aString){
2743
+ var self=this;
2744
+ smalltalk.send(self["@stream"],"_nextPutAll_",[aString]);
2745
+ return self},
2746
+ args: ["aString"],
2747
+ source: "nextPutAll: aString\x0a\x09stream nextPutAll: aString",
2748
+ messageSends: ["nextPutAll:"],
2749
+ referencedClasses: []
2750
+ }),
2751
+ smalltalk.JSStream);
2752
+
2753
+ smalltalk.addMethod(
2754
+ "_nextPutAssignment",
2755
+ smalltalk.method({
2756
+ selector: "nextPutAssignment",
2757
+ category: 'streaming',
2758
+ fn: function (){
2759
+ var self=this;
2760
+ smalltalk.send(self["@stream"],"_nextPutAll_",["="]);
2761
+ return self},
2762
+ args: [],
2763
+ source: "nextPutAssignment\x0a\x09stream nextPutAll: '='",
2764
+ messageSends: ["nextPutAll:"],
2765
+ referencedClasses: []
2766
+ }),
2767
+ smalltalk.JSStream);
2768
+
2769
+ smalltalk.addMethod(
2770
+ "_nextPutClosureWith_arguments_",
2771
+ smalltalk.method({
2772
+ selector: "nextPutClosureWith:arguments:",
2773
+ category: 'streaming',
2774
+ fn: function (aBlock,anArray){
2775
+ 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},
2788
+ args: ["aBlock", "anArray"],
2789
+ 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
+ messageSends: ["nextPutAll:", "do:separatedBy:", "asVariableName", "nextPut:", "lf", "value"],
2791
+ referencedClasses: []
2792
+ }),
2793
+ smalltalk.JSStream);
2794
+
2795
+ smalltalk.addMethod(
2796
+ "_nextPutFunctionWith_arguments_",
2797
+ smalltalk.method({
2798
+ selector: "nextPutFunctionWith:arguments:",
2799
+ category: 'streaming',
2800
+ fn: function (aBlock,anArray){
2801
+ 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},
2816
+ args: ["aBlock", "anArray"],
2817
+ 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
+ messageSends: ["nextPutAll:", "do:separatedBy:", "asVariableName", "nextPut:", "lf", "value"],
2819
+ referencedClasses: []
2820
+ }),
2821
+ smalltalk.JSStream);
2822
+
2823
+ smalltalk.addMethod(
2824
+ "_nextPutIf_with_",
2825
+ smalltalk.method({
2826
+ selector: "nextPutIf:with:",
2827
+ category: 'streaming',
2828
+ fn: function (aBlock,anotherBlock){
2829
+ 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},
2838
+ args: ["aBlock", "anotherBlock"],
2839
+ source: "nextPutIf: aBlock with: anotherBlock\x0a\x09stream nextPutAll: 'if('.\x0a\x09aBlock value.\x0a\x09stream nextPutAll: '){'; lf.\x0a\x09anotherBlock value.\x0a\x09stream nextPutAll: '}'",
2840
+ messageSends: ["nextPutAll:", "value", "lf"],
2841
+ referencedClasses: []
2842
+ }),
2843
+ smalltalk.JSStream);
2844
+
2845
+ smalltalk.addMethod(
2846
+ "_nextPutIfElse_with_with_",
2847
+ smalltalk.method({
2848
+ selector: "nextPutIfElse:with:with:",
2849
+ category: 'streaming',
2850
+ fn: function (aBlock,ifBlock,elseBlock){
2851
+ 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},
2863
+ args: ["aBlock", "ifBlock", "elseBlock"],
2864
+ 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
+ messageSends: ["nextPutAll:", "value", "lf"],
2866
+ referencedClasses: []
2867
+ }),
2868
+ smalltalk.JSStream);
2869
+
2870
+ smalltalk.addMethod(
2871
+ "_nextPutMethodDeclaration_with_",
2872
+ smalltalk.method({
2873
+ selector: "nextPutMethodDeclaration:with:",
2874
+ category: 'streaming',
2875
+ fn: function (aMethod,aBlock){
2876
+ 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},
2901
+ 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: '})'",
2903
+ messageSends: ["nextPutAll:", "lf", ",", "selector", "asJavascript", "source", "value", "asArray", "messageSends", "collect:", "arguments", "do:separatedBy:", "classReferences"],
2904
+ referencedClasses: ["String"]
2905
+ }),
2906
+ smalltalk.JSStream);
2907
+
2908
+ smalltalk.addMethod(
2909
+ "_nextPutNonLocalReturnHandlingWith_",
2910
+ smalltalk.method({
2911
+ selector: "nextPutNonLocalReturnHandlingWith:",
2912
+ category: 'streaming',
2913
+ fn: function (aBlock){
2914
+ 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},
2926
+ args: ["aBlock"],
2927
+ 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
+ messageSends: ["nextPutAll:", "lf", "value"],
2929
+ referencedClasses: []
2930
+ }),
2931
+ smalltalk.JSStream);
2932
+
2933
+ smalltalk.addMethod(
2934
+ "_nextPutNonLocalReturnWith_",
2935
+ smalltalk.method({
2936
+ selector: "nextPutNonLocalReturnWith:",
2937
+ category: 'streaming',
2938
+ fn: function (aBlock){
2939
+ 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},
2944
+ args: ["aBlock"],
2945
+ source: "nextPutNonLocalReturnWith: aBlock\x0a\x09stream nextPutAll: 'throw $early=['.\x0a\x09aBlock value.\x0a\x09stream nextPutAll: ']'",
2946
+ messageSends: ["nextPutAll:", "value"],
2947
+ referencedClasses: []
2948
+ }),
2949
+ smalltalk.JSStream);
2950
+
2951
+ smalltalk.addMethod(
2952
+ "_nextPutReturn",
2953
+ smalltalk.method({
2954
+ selector: "nextPutReturn",
2955
+ category: 'streaming',
2956
+ fn: function (){
2957
+ var self=this;
2958
+ smalltalk.send(self["@stream"],"_nextPutAll_",["return "]);
2959
+ return self},
2960
+ args: [],
2961
+ source: "nextPutReturn\x0a\x09stream nextPutAll: 'return '",
2962
+ messageSends: ["nextPutAll:"],
2963
+ referencedClasses: []
2964
+ }),
2965
+ smalltalk.JSStream);
2966
+
2967
+ smalltalk.addMethod(
2968
+ "_nextPutReturnWith_",
2969
+ smalltalk.method({
2970
+ selector: "nextPutReturnWith:",
2971
+ category: 'streaming',
2972
+ fn: function (aBlock){
2973
+ var self=this;
2974
+ smalltalk.send(self,"_nextPutReturn",[]);
2975
+ smalltalk.send(aBlock,"_value",[]);
2976
+ return self},
2977
+ args: ["aBlock"],
2978
+ source: "nextPutReturnWith: aBlock\x0a\x09self nextPutReturn.\x0a\x09aBlock value",
2979
+ messageSends: ["nextPutReturn", "value"],
2980
+ referencedClasses: []
2981
+ }),
2982
+ smalltalk.JSStream);
2983
+
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
+ smalltalk.addMethod(
3009
+ "_nextPutSequenceWith_",
3010
+ smalltalk.method({
3011
+ selector: "nextPutSequenceWith:",
3012
+ category: 'streaming',
3013
+ fn: function (aBlock){
3014
+ var self=this;
3015
+ smalltalk.send(aBlock,"_value",[]);
3016
+ return self},
3017
+ args: ["aBlock"],
3018
+ 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
+ messageSends: ["value"],
3020
+ referencedClasses: []
3021
+ }),
3022
+ smalltalk.JSStream);
3023
+
3024
+ smalltalk.addMethod(
3025
+ "_nextPutStatement_with_",
3026
+ smalltalk.method({
3027
+ selector: "nextPutStatement:with:",
3028
+ category: 'streaming',
3029
+ fn: function (anInteger,aBlock){
3030
+ 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},
3038
+ args: ["anInteger", "aBlock"],
3039
+ 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
+ messageSends: ["nextPutAll:", ",", "asString", "lf", "nextPutStatementWith:", "+"],
3041
+ referencedClasses: []
3042
+ }),
3043
+ smalltalk.JSStream);
3044
+
3045
+ smalltalk.addMethod(
3046
+ "_nextPutStatementWith_",
3047
+ smalltalk.method({
3048
+ selector: "nextPutStatementWith:",
3049
+ category: 'streaming',
3050
+ fn: function (aBlock){
3051
+ 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},
3057
+ args: ["aBlock"],
3058
+ source: "nextPutStatementWith: aBlock\x0a\x09aBlock value.\x0a\x09stream nextPutAll: ';'; lf",
3059
+ messageSends: ["value", "nextPutAll:", "lf"],
3060
+ referencedClasses: []
3061
+ }),
3062
+ smalltalk.JSStream);
3063
+
3064
+ smalltalk.addMethod(
3065
+ "_nextPutVar_",
3066
+ smalltalk.method({
3067
+ selector: "nextPutVar:",
3068
+ category: 'streaming',
3069
+ fn: function (aString){
3070
+ 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},
3075
+ args: ["aString"],
3076
+ source: "nextPutVar: aString\x0a\x09stream nextPutAll: 'var ', aString, ';'; lf",
3077
+ messageSends: ["nextPutAll:", ",", "lf"],
3078
+ referencedClasses: []
3079
+ }),
3080
+ smalltalk.JSStream);
3081
+
3082
+ smalltalk.addMethod(
3083
+ "_nextPutVars_",
3084
+ smalltalk.method({
3085
+ selector: "nextPutVars:",
3086
+ category: 'streaming',
3087
+ fn: function (aCollection){
3088
+ 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},
3099
+ 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"],
3102
+ referencedClasses: []
3103
+ }),
3104
+ smalltalk.JSStream);
3105
+
3106
+
3107
+
3108
+ smalltalk.addMethod(
3109
+ "_appendToInstruction_",
3110
+ smalltalk.method({
3111
+ selector: "appendToInstruction:",
3112
+ category: '*Compiler-IR',
3113
+ fn: function (anIRInstruction){
3114
+ var self=this;
3115
+ smalltalk.send(anIRInstruction,"_appendBlock_",[self]);
3116
+ return self},
3117
+ args: ["anIRInstruction"],
3118
+ source: "appendToInstruction: anIRInstruction\x0a anIRInstruction appendBlock: self",
3119
+ messageSends: ["appendBlock:"],
3120
+ referencedClasses: []
3121
+ }),
3122
+ smalltalk.BlockClosure);
3123
+
3124
+ smalltalk.addMethod(
3125
+ "_asVariableName",
3126
+ smalltalk.method({
3127
+ selector: "asVariableName",
3128
+ category: '*Compiler-IR',
3129
+ fn: function (){
3130
+ var self=this;
3131
+ var $2,$1;
3132
+ $2=smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk),"_current",[]),"_reservedWords",[]),"_includes_",[self]);
3133
+ if(smalltalk.assert($2)){
3134
+ $1=smalltalk.send(self,"__comma",["_"]);
3135
+ } else {
3136
+ $1=self;
3137
+ };
3138
+ return $1;
3139
+ },
3140
+ args: [],
3141
+ source: "asVariableName\x0a\x09^ (Smalltalk current reservedWords includes: self)\x0a\x09\x09ifTrue: [ self, '_' ]\x0a\x09\x09ifFalse: [ self ]",
3142
+ messageSends: ["ifTrue:ifFalse:", ",", "includes:", "reservedWords", "current"],
3143
+ referencedClasses: ["Smalltalk"]
3144
+ }),
3145
+ smalltalk.String);
3146
+