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,1207 @@
1
+ smalltalk.addPackage('Compiler-Semantic', {});
2
+ smalltalk.addClass('LexicalScope', smalltalk.Object, ['node', 'instruction', 'temps', 'args', 'outerScope'], 'Compiler-Semantic');
3
+ smalltalk.addMethod(
4
+ "_addArg_",
5
+ smalltalk.method({
6
+ selector: "addArg:",
7
+ fn: function (aString) {
8
+ var self = this;
9
+ smalltalk.send(smalltalk.send(self, "_args", []), "_at_put_", [aString, smalltalk.send(smalltalk.ArgVar || ArgVar, "_on_", [aString])]);
10
+ smalltalk.send(smalltalk.send(smalltalk.send(self, "_args", []), "_at_", [aString]), "_scope_", [self]);
11
+ return self;
12
+ }
13
+ }),
14
+ smalltalk.LexicalScope);
15
+
16
+ smalltalk.addMethod(
17
+ "_addTemp_",
18
+ smalltalk.method({
19
+ selector: "addTemp:",
20
+ fn: function (aString) {
21
+ var self = this;
22
+ smalltalk.send(smalltalk.send(self, "_temps", []), "_at_put_", [aString, smalltalk.send(smalltalk.TempVar || TempVar, "_on_", [aString])]);
23
+ smalltalk.send(smalltalk.send(smalltalk.send(self, "_temps", []), "_at_", [aString]), "_scope_", [self]);
24
+ return self;
25
+ }
26
+ }),
27
+ smalltalk.LexicalScope);
28
+
29
+ smalltalk.addMethod(
30
+ "_allVariableNames",
31
+ smalltalk.method({
32
+ selector: "allVariableNames",
33
+ fn: function () {
34
+ var self = this;
35
+ var $1;
36
+ $1 = smalltalk.send(smalltalk.send(smalltalk.send(self, "_args", []), "_keys", []), "__comma", [smalltalk.send(smalltalk.send(self, "_temps", []), "_keys", [])]);
37
+ return $1;
38
+ }
39
+ }),
40
+ smalltalk.LexicalScope);
41
+
42
+ smalltalk.addMethod(
43
+ "_args",
44
+ smalltalk.method({
45
+ selector: "args",
46
+ fn: function () {
47
+ var self = this;
48
+ var $1;
49
+ if (($receiver = self['@args']) == nil || $receiver == undefined) {
50
+ self['@args'] = smalltalk.send(smalltalk.Dictionary || Dictionary, "_new", []);
51
+ $1 = self['@args'];
52
+ } else {
53
+ $1 = self['@args'];
54
+ }
55
+ return $1;
56
+ }
57
+ }),
58
+ smalltalk.LexicalScope);
59
+
60
+ smalltalk.addMethod(
61
+ "_bindingFor_",
62
+ smalltalk.method({
63
+ selector: "bindingFor:",
64
+ fn: function (aStringOrNode) {
65
+ var self = this;
66
+ var $1;
67
+ $1 = smalltalk.send(smalltalk.send(self, "_pseudoVars", []), "_at_ifAbsent_", [smalltalk.send(aStringOrNode, "_value", []), function () {return smalltalk.send(smalltalk.send(self, "_args", []), "_at_ifAbsent_", [smalltalk.send(aStringOrNode, "_value", []), function () {return smalltalk.send(smalltalk.send(self, "_temps", []), "_at_ifAbsent_", [smalltalk.send(aStringOrNode, "_value", []), function () {return nil;}]);}]);}]);
68
+ return $1;
69
+ }
70
+ }),
71
+ smalltalk.LexicalScope);
72
+
73
+ smalltalk.addMethod(
74
+ "_canInlineNonLocalReturns",
75
+ smalltalk.method({
76
+ selector: "canInlineNonLocalReturns",
77
+ fn: function () {
78
+ var self = this;
79
+ var $1;
80
+ $1 = smalltalk.send(smalltalk.send(self, "_isInlined", []), "_and_", [function () {return smalltalk.send(smalltalk.send(self, "_outerScope", []), "_canInlineNonLocalReturns", []);}]);
81
+ return $1;
82
+ }
83
+ }),
84
+ smalltalk.LexicalScope);
85
+
86
+ smalltalk.addMethod(
87
+ "_instruction",
88
+ smalltalk.method({
89
+ selector: "instruction",
90
+ fn: function () {
91
+ var self = this;
92
+ return self['@instruction'];
93
+ }
94
+ }),
95
+ smalltalk.LexicalScope);
96
+
97
+ smalltalk.addMethod(
98
+ "_instruction_",
99
+ smalltalk.method({
100
+ selector: "instruction:",
101
+ fn: function (anIRInstruction) {
102
+ var self = this;
103
+ self['@instruction'] = anIRInstruction;
104
+ return self;
105
+ }
106
+ }),
107
+ smalltalk.LexicalScope);
108
+
109
+ smalltalk.addMethod(
110
+ "_isBlockScope",
111
+ smalltalk.method({
112
+ selector: "isBlockScope",
113
+ fn: function () {
114
+ var self = this;
115
+ var $1;
116
+ $1 = smalltalk.send(smalltalk.send(self, "_isMethodScope", []), "_not", []);
117
+ return $1;
118
+ }
119
+ }),
120
+ smalltalk.LexicalScope);
121
+
122
+ smalltalk.addMethod(
123
+ "_isInlined",
124
+ smalltalk.method({
125
+ selector: "isInlined",
126
+ fn: function () {
127
+ var self = this;
128
+ var $1;
129
+ $1 = smalltalk.send(smalltalk.send(self, "_instruction", []), "_isInlined", []);
130
+ return $1;
131
+ }
132
+ }),
133
+ smalltalk.LexicalScope);
134
+
135
+ smalltalk.addMethod(
136
+ "_isMethodScope",
137
+ smalltalk.method({
138
+ selector: "isMethodScope",
139
+ fn: function () {
140
+ var self = this;
141
+ return false;
142
+ }
143
+ }),
144
+ smalltalk.LexicalScope);
145
+
146
+ smalltalk.addMethod(
147
+ "_lookupVariable_",
148
+ smalltalk.method({
149
+ selector: "lookupVariable:",
150
+ fn: function (aNode) {
151
+ var self = this;
152
+ var $1;
153
+ var lookup;
154
+ lookup = smalltalk.send(self, "_bindingFor_", [aNode]);
155
+ if (($receiver = lookup) == nil || $receiver == undefined) {
156
+ $1 = smalltalk.send(self, "_outerScope", []);
157
+ if (($receiver = $1) == nil || $receiver == undefined) {
158
+ lookup = $1;
159
+ } else {
160
+ lookup = smalltalk.send(smalltalk.send(self, "_outerScope", []), "_lookupVariable_", [aNode]);
161
+ }
162
+ } else {
163
+ }
164
+ return lookup;
165
+ }
166
+ }),
167
+ smalltalk.LexicalScope);
168
+
169
+ smalltalk.addMethod(
170
+ "_methodScope",
171
+ smalltalk.method({
172
+ selector: "methodScope",
173
+ fn: function () {
174
+ var self = this;
175
+ var $2, $1;
176
+ $2 = smalltalk.send(self, "_outerScope", []);
177
+ if (($receiver = $2) == nil || $receiver == undefined) {
178
+ $1 = $2;
179
+ } else {
180
+ $1 = smalltalk.send(smalltalk.send(self, "_outerScope", []), "_methodScope", []);
181
+ }
182
+ return $1;
183
+ }
184
+ }),
185
+ smalltalk.LexicalScope);
186
+
187
+ smalltalk.addMethod(
188
+ "_node",
189
+ smalltalk.method({
190
+ selector: "node",
191
+ fn: function () {
192
+ var self = this;
193
+ return self['@node'];
194
+ }
195
+ }),
196
+ smalltalk.LexicalScope);
197
+
198
+ smalltalk.addMethod(
199
+ "_node_",
200
+ smalltalk.method({
201
+ selector: "node:",
202
+ fn: function (aNode) {
203
+ var self = this;
204
+ self['@node'] = aNode;
205
+ return self;
206
+ }
207
+ }),
208
+ smalltalk.LexicalScope);
209
+
210
+ smalltalk.addMethod(
211
+ "_outerScope",
212
+ smalltalk.method({
213
+ selector: "outerScope",
214
+ fn: function () {
215
+ var self = this;
216
+ return self['@outerScope'];
217
+ }
218
+ }),
219
+ smalltalk.LexicalScope);
220
+
221
+ smalltalk.addMethod(
222
+ "_outerScope_",
223
+ smalltalk.method({
224
+ selector: "outerScope:",
225
+ fn: function (aLexicalScope) {
226
+ var self = this;
227
+ self['@outerScope'] = aLexicalScope;
228
+ return self;
229
+ }
230
+ }),
231
+ smalltalk.LexicalScope);
232
+
233
+ smalltalk.addMethod(
234
+ "_pseudoVars",
235
+ smalltalk.method({
236
+ selector: "pseudoVars",
237
+ fn: function () {
238
+ var self = this;
239
+ var $1;
240
+ $1 = smalltalk.send(smalltalk.send(self, "_methodScope", []), "_pseudoVars", []);
241
+ return $1;
242
+ }
243
+ }),
244
+ smalltalk.LexicalScope);
245
+
246
+ smalltalk.addMethod(
247
+ "_scopeLevel",
248
+ smalltalk.method({
249
+ selector: "scopeLevel",
250
+ fn: function () {
251
+ var self = this;
252
+ var $3, $2, $1;
253
+ $3 = smalltalk.send(self, "_outerScope", []);
254
+ if (($receiver = $3) == nil || $receiver == undefined) {
255
+ $2 = 0;
256
+ } else {
257
+ $2 = smalltalk.send(smalltalk.send(self, "_outerScope", []), "_scopeLevel", []);
258
+ }
259
+ $1 = smalltalk.send($2, "__plus", [1]);
260
+ return $1;
261
+ }
262
+ }),
263
+ smalltalk.LexicalScope);
264
+
265
+ smalltalk.addMethod(
266
+ "_temps",
267
+ smalltalk.method({
268
+ selector: "temps",
269
+ fn: function () {
270
+ var self = this;
271
+ var $1;
272
+ if (($receiver = self['@temps']) == nil || $receiver == undefined) {
273
+ self['@temps'] = smalltalk.send(smalltalk.Dictionary || Dictionary, "_new", []);
274
+ $1 = self['@temps'];
275
+ } else {
276
+ $1 = self['@temps'];
277
+ }
278
+ return $1;
279
+ }
280
+ }),
281
+ smalltalk.LexicalScope);
282
+
283
+
284
+
285
+ smalltalk.addClass('MethodLexicalScope', smalltalk.LexicalScope, ['iVars', 'pseudoVars', 'unknownVariables', 'localReturn', 'nonLocalReturns'], 'Compiler-Semantic');
286
+ smalltalk.addMethod(
287
+ "_addIVar_",
288
+ smalltalk.method({
289
+ selector: "addIVar:",
290
+ fn: function (aString) {
291
+ var self = this;
292
+ smalltalk.send(smalltalk.send(self, "_iVars", []), "_at_put_", [aString, smalltalk.send(smalltalk.InstanceVar || InstanceVar, "_on_", [aString])]);
293
+ smalltalk.send(smalltalk.send(smalltalk.send(self, "_iVars", []), "_at_", [aString]), "_scope_", [self]);
294
+ return self;
295
+ }
296
+ }),
297
+ smalltalk.MethodLexicalScope);
298
+
299
+ smalltalk.addMethod(
300
+ "_addNonLocalReturn_",
301
+ smalltalk.method({
302
+ selector: "addNonLocalReturn:",
303
+ fn: function (aScope) {
304
+ var self = this;
305
+ smalltalk.send(smalltalk.send(self, "_nonLocalReturns", []), "_add_", [aScope]);
306
+ return self;
307
+ }
308
+ }),
309
+ smalltalk.MethodLexicalScope);
310
+
311
+ smalltalk.addMethod(
312
+ "_allVariableNames",
313
+ smalltalk.method({
314
+ selector: "allVariableNames",
315
+ fn: function () {
316
+ var self = this;
317
+ var $1;
318
+ $1 = smalltalk.send(smalltalk.send(self, "_allVariableNames", [], smalltalk.LexicalScope), "__comma", [smalltalk.send(smalltalk.send(self, "_iVars", []), "_keys", [])]);
319
+ return $1;
320
+ }
321
+ }),
322
+ smalltalk.MethodLexicalScope);
323
+
324
+ smalltalk.addMethod(
325
+ "_bindingFor_",
326
+ smalltalk.method({
327
+ selector: "bindingFor:",
328
+ fn: function (aNode) {
329
+ var self = this;
330
+ var $2, $1;
331
+ $2 = smalltalk.send(self, "_bindingFor_", [aNode], smalltalk.LexicalScope);
332
+ if (($receiver = $2) == nil || $receiver == undefined) {
333
+ $1 = smalltalk.send(smalltalk.send(self, "_iVars", []), "_at_ifAbsent_", [smalltalk.send(aNode, "_value", []), function () {return nil;}]);
334
+ } else {
335
+ $1 = $2;
336
+ }
337
+ return $1;
338
+ }
339
+ }),
340
+ smalltalk.MethodLexicalScope);
341
+
342
+ smalltalk.addMethod(
343
+ "_canInlineNonLocalReturns",
344
+ smalltalk.method({
345
+ selector: "canInlineNonLocalReturns",
346
+ fn: function () {
347
+ var self = this;
348
+ return true;
349
+ }
350
+ }),
351
+ smalltalk.MethodLexicalScope);
352
+
353
+ smalltalk.addMethod(
354
+ "_hasLocalReturn",
355
+ smalltalk.method({
356
+ selector: "hasLocalReturn",
357
+ fn: function () {
358
+ var self = this;
359
+ var $1;
360
+ $1 = smalltalk.send(self, "_localReturn", []);
361
+ return $1;
362
+ }
363
+ }),
364
+ smalltalk.MethodLexicalScope);
365
+
366
+ smalltalk.addMethod(
367
+ "_hasNonLocalReturn",
368
+ smalltalk.method({
369
+ selector: "hasNonLocalReturn",
370
+ fn: function () {
371
+ var self = this;
372
+ var $1;
373
+ $1 = smalltalk.send(smalltalk.send(self, "_nonLocalReturns", []), "_notEmpty", []);
374
+ return $1;
375
+ }
376
+ }),
377
+ smalltalk.MethodLexicalScope);
378
+
379
+ smalltalk.addMethod(
380
+ "_iVars",
381
+ smalltalk.method({
382
+ selector: "iVars",
383
+ fn: function () {
384
+ var self = this;
385
+ var $1;
386
+ if (($receiver = self['@iVars']) == nil || $receiver == undefined) {
387
+ self['@iVars'] = smalltalk.send(smalltalk.Dictionary || Dictionary, "_new", []);
388
+ $1 = self['@iVars'];
389
+ } else {
390
+ $1 = self['@iVars'];
391
+ }
392
+ return $1;
393
+ }
394
+ }),
395
+ smalltalk.MethodLexicalScope);
396
+
397
+ smalltalk.addMethod(
398
+ "_isMethodScope",
399
+ smalltalk.method({
400
+ selector: "isMethodScope",
401
+ fn: function () {
402
+ var self = this;
403
+ return true;
404
+ }
405
+ }),
406
+ smalltalk.MethodLexicalScope);
407
+
408
+ smalltalk.addMethod(
409
+ "_localReturn",
410
+ smalltalk.method({
411
+ selector: "localReturn",
412
+ fn: function () {
413
+ var self = this;
414
+ var $1;
415
+ if (($receiver = self['@localReturn']) == nil || $receiver == undefined) {
416
+ $1 = false;
417
+ } else {
418
+ $1 = self['@localReturn'];
419
+ }
420
+ return $1;
421
+ }
422
+ }),
423
+ smalltalk.MethodLexicalScope);
424
+
425
+ smalltalk.addMethod(
426
+ "_localReturn_",
427
+ smalltalk.method({
428
+ selector: "localReturn:",
429
+ fn: function (aBoolean) {
430
+ var self = this;
431
+ self['@localReturn'] = aBoolean;
432
+ return self;
433
+ }
434
+ }),
435
+ smalltalk.MethodLexicalScope);
436
+
437
+ smalltalk.addMethod(
438
+ "_methodScope",
439
+ smalltalk.method({
440
+ selector: "methodScope",
441
+ fn: function () {
442
+ var self = this;
443
+ return self;
444
+ }
445
+ }),
446
+ smalltalk.MethodLexicalScope);
447
+
448
+ smalltalk.addMethod(
449
+ "_nonLocalReturns",
450
+ smalltalk.method({
451
+ selector: "nonLocalReturns",
452
+ fn: function () {
453
+ var self = this;
454
+ var $1;
455
+ if (($receiver = self['@nonLocalReturns']) == nil ||
456
+ $receiver == undefined) {
457
+ self['@nonLocalReturns'] = smalltalk.send(smalltalk.OrderedCollection || OrderedCollection, "_new", []);
458
+ $1 = self['@nonLocalReturns'];
459
+ } else {
460
+ $1 = self['@nonLocalReturns'];
461
+ }
462
+ return $1;
463
+ }
464
+ }),
465
+ smalltalk.MethodLexicalScope);
466
+
467
+ smalltalk.addMethod(
468
+ "_pseudoVars",
469
+ smalltalk.method({
470
+ selector: "pseudoVars",
471
+ fn: function () {
472
+ var self = this;
473
+ var $1, $2;
474
+ if (($receiver = self['@pseudoVars']) == nil || $receiver == undefined) {
475
+ self['@pseudoVars'] = smalltalk.send(smalltalk.Dictionary || Dictionary, "_new", []);
476
+ self['@pseudoVars'];
477
+ smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_pseudoVariableNames", []), "_do_", [function (each) {$1 = smalltalk.send(smalltalk.PseudoVar || PseudoVar, "_on_", [each]);smalltalk.send($1, "_scope_", [smalltalk.send(self, "_methodScope", [])]);$2 = smalltalk.send($1, "_yourself", []);return smalltalk.send(self['@pseudoVars'], "_at_put_", [each, $2]);}]);
478
+ } else {
479
+ self['@pseudoVars'];
480
+ }
481
+ return self['@pseudoVars'];
482
+ }
483
+ }),
484
+ smalltalk.MethodLexicalScope);
485
+
486
+ smalltalk.addMethod(
487
+ "_removeNonLocalReturn_",
488
+ smalltalk.method({
489
+ selector: "removeNonLocalReturn:",
490
+ fn: function (aScope) {
491
+ var self = this;
492
+ smalltalk.send(smalltalk.send(self, "_nonLocalReturns", []), "_remove_ifAbsent_", [aScope, function () {}]);
493
+ return self;
494
+ }
495
+ }),
496
+ smalltalk.MethodLexicalScope);
497
+
498
+ smalltalk.addMethod(
499
+ "_unknownVariables",
500
+ smalltalk.method({
501
+ selector: "unknownVariables",
502
+ fn: function () {
503
+ var self = this;
504
+ var $1;
505
+ if (($receiver = self['@unknownVariables']) == nil ||
506
+ $receiver == undefined) {
507
+ self['@unknownVariables'] = smalltalk.send(smalltalk.OrderedCollection || OrderedCollection, "_new", []);
508
+ $1 = self['@unknownVariables'];
509
+ } else {
510
+ $1 = self['@unknownVariables'];
511
+ }
512
+ return $1;
513
+ }
514
+ }),
515
+ smalltalk.MethodLexicalScope);
516
+
517
+
518
+
519
+ smalltalk.addClass('ScopeVar', smalltalk.Object, ['scope', 'name'], 'Compiler-Semantic');
520
+ smalltalk.addMethod(
521
+ "_alias",
522
+ smalltalk.method({
523
+ selector: "alias",
524
+ fn: function () {
525
+ var self = this;
526
+ var $1;
527
+ $1 = smalltalk.send(smalltalk.send(self, "_name", []), "_asVariableName", []);
528
+ return $1;
529
+ }
530
+ }),
531
+ smalltalk.ScopeVar);
532
+
533
+ smalltalk.addMethod(
534
+ "_isArgVar",
535
+ smalltalk.method({
536
+ selector: "isArgVar",
537
+ fn: function () {
538
+ var self = this;
539
+ return false;
540
+ }
541
+ }),
542
+ smalltalk.ScopeVar);
543
+
544
+ smalltalk.addMethod(
545
+ "_isClassRefVar",
546
+ smalltalk.method({
547
+ selector: "isClassRefVar",
548
+ fn: function () {
549
+ var self = this;
550
+ return false;
551
+ }
552
+ }),
553
+ smalltalk.ScopeVar);
554
+
555
+ smalltalk.addMethod(
556
+ "_isInstanceVar",
557
+ smalltalk.method({
558
+ selector: "isInstanceVar",
559
+ fn: function () {
560
+ var self = this;
561
+ return false;
562
+ }
563
+ }),
564
+ smalltalk.ScopeVar);
565
+
566
+ smalltalk.addMethod(
567
+ "_isPseudoVar",
568
+ smalltalk.method({
569
+ selector: "isPseudoVar",
570
+ fn: function () {
571
+ var self = this;
572
+ return false;
573
+ }
574
+ }),
575
+ smalltalk.ScopeVar);
576
+
577
+ smalltalk.addMethod(
578
+ "_isTempVar",
579
+ smalltalk.method({
580
+ selector: "isTempVar",
581
+ fn: function () {
582
+ var self = this;
583
+ return false;
584
+ }
585
+ }),
586
+ smalltalk.ScopeVar);
587
+
588
+ smalltalk.addMethod(
589
+ "_isUnknownVar",
590
+ smalltalk.method({
591
+ selector: "isUnknownVar",
592
+ fn: function () {
593
+ var self = this;
594
+ return false;
595
+ }
596
+ }),
597
+ smalltalk.ScopeVar);
598
+
599
+ smalltalk.addMethod(
600
+ "_name",
601
+ smalltalk.method({
602
+ selector: "name",
603
+ fn: function () {
604
+ var self = this;
605
+ return self['@name'];
606
+ }
607
+ }),
608
+ smalltalk.ScopeVar);
609
+
610
+ smalltalk.addMethod(
611
+ "_name_",
612
+ smalltalk.method({
613
+ selector: "name:",
614
+ fn: function (aString) {
615
+ var self = this;
616
+ self['@name'] = aString;
617
+ return self;
618
+ }
619
+ }),
620
+ smalltalk.ScopeVar);
621
+
622
+ smalltalk.addMethod(
623
+ "_scope",
624
+ smalltalk.method({
625
+ selector: "scope",
626
+ fn: function () {
627
+ var self = this;
628
+ return self['@scope'];
629
+ }
630
+ }),
631
+ smalltalk.ScopeVar);
632
+
633
+ smalltalk.addMethod(
634
+ "_scope_",
635
+ smalltalk.method({
636
+ selector: "scope:",
637
+ fn: function (aScope) {
638
+ var self = this;
639
+ self['@scope'] = aScope;
640
+ return self;
641
+ }
642
+ }),
643
+ smalltalk.ScopeVar);
644
+
645
+ smalltalk.addMethod(
646
+ "_validateAssignment",
647
+ smalltalk.method({
648
+ selector: "validateAssignment",
649
+ fn: function () {
650
+ var self = this;
651
+ var $1, $2, $3;
652
+ $1 = smalltalk.send(smalltalk.send(self, "_isArgVar", []), "_or_", [function () {return smalltalk.send(self, "_isPseudoVar", []);}]);
653
+ if (smalltalk.assert($1)) {
654
+ $2 = smalltalk.send(smalltalk.InvalidAssignmentError || InvalidAssignmentError, "_new", []);
655
+ smalltalk.send($2, "_variableName_", [smalltalk.send(self, "_name", [])]);
656
+ $3 = smalltalk.send($2, "_signal", []);
657
+ }
658
+ return self;
659
+ }
660
+ }),
661
+ smalltalk.ScopeVar);
662
+
663
+
664
+ smalltalk.addMethod(
665
+ "_on_",
666
+ smalltalk.method({
667
+ selector: "on:",
668
+ fn: function (aString) {
669
+ var self = this;
670
+ var $2, $3, $1;
671
+ $2 = smalltalk.send(self, "_new", []);
672
+ smalltalk.send($2, "_name_", [aString]);
673
+ $3 = smalltalk.send($2, "_yourself", []);
674
+ $1 = $3;
675
+ return $1;
676
+ }
677
+ }),
678
+ smalltalk.ScopeVar.klass);
679
+
680
+
681
+ smalltalk.addClass('AliasVar', smalltalk.ScopeVar, ['node'], 'Compiler-Semantic');
682
+ smalltalk.addMethod(
683
+ "_node",
684
+ smalltalk.method({
685
+ selector: "node",
686
+ fn: function () {
687
+ var self = this;
688
+ return self['@node'];
689
+ }
690
+ }),
691
+ smalltalk.AliasVar);
692
+
693
+ smalltalk.addMethod(
694
+ "_node_",
695
+ smalltalk.method({
696
+ selector: "node:",
697
+ fn: function (aNode) {
698
+ var self = this;
699
+ self['@node'] = aNode;
700
+ return self;
701
+ }
702
+ }),
703
+ smalltalk.AliasVar);
704
+
705
+
706
+
707
+ smalltalk.addClass('ArgVar', smalltalk.ScopeVar, [], 'Compiler-Semantic');
708
+ smalltalk.addMethod(
709
+ "_isArgVar",
710
+ smalltalk.method({
711
+ selector: "isArgVar",
712
+ fn: function () {
713
+ var self = this;
714
+ return true;
715
+ }
716
+ }),
717
+ smalltalk.ArgVar);
718
+
719
+
720
+
721
+ smalltalk.addClass('ClassRefVar', smalltalk.ScopeVar, [], 'Compiler-Semantic');
722
+ smalltalk.addMethod(
723
+ "_alias",
724
+ smalltalk.method({
725
+ selector: "alias",
726
+ fn: function () {
727
+ var self = this;
728
+ var $1;
729
+ $1 = smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("(smalltalk.", "__comma", [smalltalk.send(self, "_name", [])]), "__comma", [" || "]), "__comma", [smalltalk.send(self, "_name", [])]), "__comma", [")"]);
730
+ return $1;
731
+ }
732
+ }),
733
+ smalltalk.ClassRefVar);
734
+
735
+ smalltalk.addMethod(
736
+ "_isClassRefVar",
737
+ smalltalk.method({
738
+ selector: "isClassRefVar",
739
+ fn: function () {
740
+ var self = this;
741
+ return true;
742
+ }
743
+ }),
744
+ smalltalk.ClassRefVar);
745
+
746
+
747
+
748
+ smalltalk.addClass('InstanceVar', smalltalk.ScopeVar, [], 'Compiler-Semantic');
749
+ smalltalk.addMethod(
750
+ "_alias",
751
+ smalltalk.method({
752
+ selector: "alias",
753
+ fn: function () {
754
+ var self = this;
755
+ var $1;
756
+ $1 = smalltalk.send(smalltalk.send("self[\"@", "__comma", [smalltalk.send(self, "_name", [])]), "__comma", ["\"]"]);
757
+ return $1;
758
+ }
759
+ }),
760
+ smalltalk.InstanceVar);
761
+
762
+ smalltalk.addMethod(
763
+ "_isInstanceVar",
764
+ smalltalk.method({
765
+ selector: "isInstanceVar",
766
+ fn: function () {
767
+ var self = this;
768
+ return true;
769
+ }
770
+ }),
771
+ smalltalk.InstanceVar);
772
+
773
+
774
+
775
+ smalltalk.addClass('PseudoVar', smalltalk.ScopeVar, [], 'Compiler-Semantic');
776
+ smalltalk.addMethod(
777
+ "_alias",
778
+ smalltalk.method({
779
+ selector: "alias",
780
+ fn: function () {
781
+ var self = this;
782
+ var $1;
783
+ $1 = smalltalk.send(self, "_name", []);
784
+ return $1;
785
+ }
786
+ }),
787
+ smalltalk.PseudoVar);
788
+
789
+ smalltalk.addMethod(
790
+ "_isPseudoVar",
791
+ smalltalk.method({
792
+ selector: "isPseudoVar",
793
+ fn: function () {
794
+ var self = this;
795
+ return true;
796
+ }
797
+ }),
798
+ smalltalk.PseudoVar);
799
+
800
+
801
+
802
+ smalltalk.addClass('TempVar', smalltalk.ScopeVar, [], 'Compiler-Semantic');
803
+ smalltalk.addMethod(
804
+ "_isTempVar",
805
+ smalltalk.method({
806
+ selector: "isTempVar",
807
+ fn: function () {
808
+ var self = this;
809
+ return true;
810
+ }
811
+ }),
812
+ smalltalk.TempVar);
813
+
814
+
815
+
816
+ smalltalk.addClass('UnknownVar', smalltalk.ScopeVar, [], 'Compiler-Semantic');
817
+ smalltalk.addMethod(
818
+ "_isUnknownVar",
819
+ smalltalk.method({
820
+ selector: "isUnknownVar",
821
+ fn: function () {
822
+ var self = this;
823
+ return true;
824
+ }
825
+ }),
826
+ smalltalk.UnknownVar);
827
+
828
+
829
+
830
+ smalltalk.addClass('SemanticAnalyzer', smalltalk.NodeVisitor, ['currentScope', 'theClass', 'classReferences', 'messageSends'], 'Compiler-Semantic');
831
+ smalltalk.addMethod(
832
+ "_classReferences",
833
+ smalltalk.method({
834
+ selector: "classReferences",
835
+ fn: function () {
836
+ var self = this;
837
+ var $1;
838
+ if (($receiver = self['@classReferences']) == nil ||
839
+ $receiver == undefined) {
840
+ self['@classReferences'] = smalltalk.send(smalltalk.Set || Set, "_new", []);
841
+ $1 = self['@classReferences'];
842
+ } else {
843
+ $1 = self['@classReferences'];
844
+ }
845
+ return $1;
846
+ }
847
+ }),
848
+ smalltalk.SemanticAnalyzer);
849
+
850
+ smalltalk.addMethod(
851
+ "_errorShadowingVariable_",
852
+ smalltalk.method({
853
+ selector: "errorShadowingVariable:",
854
+ fn: function (aString) {
855
+ var self = this;
856
+ var $1, $2;
857
+ $1 = smalltalk.send(smalltalk.ShadowingVariableError || ShadowingVariableError, "_new", []);
858
+ smalltalk.send($1, "_variableName_", [aString]);
859
+ $2 = smalltalk.send($1, "_signal", []);
860
+ return self;
861
+ }
862
+ }),
863
+ smalltalk.SemanticAnalyzer);
864
+
865
+ smalltalk.addMethod(
866
+ "_errorUnknownVariable_",
867
+ smalltalk.method({
868
+ selector: "errorUnknownVariable:",
869
+ fn: function (aNode) {
870
+ var self = this;
871
+ var $1, $2;
872
+ var notDefined;
873
+ notDefined = eval("typeof " + aNode._value() + " == \"undefined\"");
874
+ if (smalltalk.assert(notDefined)) {
875
+ $1 = smalltalk.send(smalltalk.UnknownVariableError || UnknownVariableError, "_new", []);
876
+ smalltalk.send($1, "_variableName_", [smalltalk.send(aNode, "_value", [])]);
877
+ $2 = smalltalk.send($1, "_signal", []);
878
+ } else {
879
+ smalltalk.send(smalltalk.send(smalltalk.send(self['@currentScope'], "_methodScope", []), "_unknownVariables", []), "_add_", [smalltalk.send(aNode, "_value", [])]);
880
+ }
881
+ return self;
882
+ }
883
+ }),
884
+ smalltalk.SemanticAnalyzer);
885
+
886
+ smalltalk.addMethod(
887
+ "_messageSends",
888
+ smalltalk.method({
889
+ selector: "messageSends",
890
+ fn: function () {
891
+ var self = this;
892
+ var $1;
893
+ if (($receiver = self['@messageSends']) == nil ||
894
+ $receiver == undefined) {
895
+ self['@messageSends'] = smalltalk.send(smalltalk.Dictionary || Dictionary, "_new", []);
896
+ $1 = self['@messageSends'];
897
+ } else {
898
+ $1 = self['@messageSends'];
899
+ }
900
+ return $1;
901
+ }
902
+ }),
903
+ smalltalk.SemanticAnalyzer);
904
+
905
+ smalltalk.addMethod(
906
+ "_newBlockScope",
907
+ smalltalk.method({
908
+ selector: "newBlockScope",
909
+ fn: function () {
910
+ var self = this;
911
+ var $1;
912
+ $1 = smalltalk.send(self, "_newScopeOfClass_", [smalltalk.LexicalScope || LexicalScope]);
913
+ return $1;
914
+ }
915
+ }),
916
+ smalltalk.SemanticAnalyzer);
917
+
918
+ smalltalk.addMethod(
919
+ "_newMethodScope",
920
+ smalltalk.method({
921
+ selector: "newMethodScope",
922
+ fn: function () {
923
+ var self = this;
924
+ var $1;
925
+ $1 = smalltalk.send(self, "_newScopeOfClass_", [smalltalk.MethodLexicalScope || MethodLexicalScope]);
926
+ return $1;
927
+ }
928
+ }),
929
+ smalltalk.SemanticAnalyzer);
930
+
931
+ smalltalk.addMethod(
932
+ "_newScopeOfClass_",
933
+ smalltalk.method({
934
+ selector: "newScopeOfClass:",
935
+ fn: function (aLexicalScopeClass) {
936
+ var self = this;
937
+ var $2, $3, $1;
938
+ $2 = smalltalk.send(aLexicalScopeClass, "_new", []);
939
+ smalltalk.send($2, "_outerScope_", [self['@currentScope']]);
940
+ $3 = smalltalk.send($2, "_yourself", []);
941
+ $1 = $3;
942
+ return $1;
943
+ }
944
+ }),
945
+ smalltalk.SemanticAnalyzer);
946
+
947
+ smalltalk.addMethod(
948
+ "_popScope",
949
+ smalltalk.method({
950
+ selector: "popScope",
951
+ fn: function () {
952
+ var self = this;
953
+ if (($receiver = self['@currentScope']) == nil ||
954
+ $receiver == undefined) {
955
+ self['@currentScope'];
956
+ } else {
957
+ self['@currentScope'] = smalltalk.send(self['@currentScope'], "_outerScope", []);
958
+ self['@currentScope'];
959
+ }
960
+ return self;
961
+ }
962
+ }),
963
+ smalltalk.SemanticAnalyzer);
964
+
965
+ smalltalk.addMethod(
966
+ "_pushScope_",
967
+ smalltalk.method({
968
+ selector: "pushScope:",
969
+ fn: function (aScope) {
970
+ var self = this;
971
+ smalltalk.send(aScope, "_outerScope_", [self['@currentScope']]);
972
+ self['@currentScope'] = aScope;
973
+ return self;
974
+ }
975
+ }),
976
+ smalltalk.SemanticAnalyzer);
977
+
978
+ smalltalk.addMethod(
979
+ "_theClass",
980
+ smalltalk.method({
981
+ selector: "theClass",
982
+ fn: function () {
983
+ var self = this;
984
+ return self['@theClass'];
985
+ }
986
+ }),
987
+ smalltalk.SemanticAnalyzer);
988
+
989
+ smalltalk.addMethod(
990
+ "_theClass_",
991
+ smalltalk.method({
992
+ selector: "theClass:",
993
+ fn: function (aClass) {
994
+ var self = this;
995
+ self['@theClass'] = aClass;
996
+ return self;
997
+ }
998
+ }),
999
+ smalltalk.SemanticAnalyzer);
1000
+
1001
+ smalltalk.addMethod(
1002
+ "_validateVariableScope_",
1003
+ smalltalk.method({
1004
+ selector: "validateVariableScope:",
1005
+ fn: function (aString) {
1006
+ var self = this;
1007
+ var $1;
1008
+ $1 = smalltalk.send(self['@currentScope'], "_lookupVariable_", [aString]);
1009
+ if (($receiver = $1) == nil || $receiver == undefined) {
1010
+ } else {
1011
+ smalltalk.send(self, "_errorShadowingVariable_", [aString]);
1012
+ }
1013
+ return self;
1014
+ }
1015
+ }),
1016
+ smalltalk.SemanticAnalyzer);
1017
+
1018
+ smalltalk.addMethod(
1019
+ "_visitAssignmentNode_",
1020
+ smalltalk.method({
1021
+ selector: "visitAssignmentNode:",
1022
+ fn: function (aNode) {
1023
+ var self = this;
1024
+ smalltalk.send(self, "_visitAssignmentNode_", [aNode], smalltalk.NodeVisitor);
1025
+ smalltalk.send(smalltalk.send(aNode, "_left", []), "_beAssigned", []);
1026
+ return self;
1027
+ }
1028
+ }),
1029
+ smalltalk.SemanticAnalyzer);
1030
+
1031
+ smalltalk.addMethod(
1032
+ "_visitBlockNode_",
1033
+ smalltalk.method({
1034
+ selector: "visitBlockNode:",
1035
+ fn: function (aNode) {
1036
+ var self = this;
1037
+ smalltalk.send(self, "_pushScope_", [smalltalk.send(self, "_newBlockScope", [])]);
1038
+ smalltalk.send(aNode, "_scope_", [self['@currentScope']]);
1039
+ smalltalk.send(self['@currentScope'], "_node_", [aNode]);
1040
+ smalltalk.send(smalltalk.send(aNode, "_parameters", []), "_do_", [function (each) {smalltalk.send(self, "_validateVariableScope_", [each]);return smalltalk.send(self['@currentScope'], "_addArg_", [each]);}]);
1041
+ smalltalk.send(self, "_visitBlockNode_", [aNode], smalltalk.NodeVisitor);
1042
+ smalltalk.send(self, "_popScope", []);
1043
+ return self;
1044
+ }
1045
+ }),
1046
+ smalltalk.SemanticAnalyzer);
1047
+
1048
+ smalltalk.addMethod(
1049
+ "_visitCascadeNode_",
1050
+ smalltalk.method({
1051
+ selector: "visitCascadeNode:",
1052
+ fn: function (aNode) {
1053
+ var self = this;
1054
+ var $1;
1055
+ smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_do_", [function (each) {return smalltalk.send(each, "_receiver_", [smalltalk.send(aNode, "_receiver", [])]);}]);
1056
+ smalltalk.send(self, "_visitCascadeNode_", [aNode], smalltalk.NodeVisitor);
1057
+ $1 = smalltalk.send(smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_first", []), "_superSend", []);
1058
+ if (smalltalk.assert($1)) {
1059
+ smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_do_", [function (each) {return smalltalk.send(each, "_superSend_", [true]);}]);
1060
+ }
1061
+ return self;
1062
+ }
1063
+ }),
1064
+ smalltalk.SemanticAnalyzer);
1065
+
1066
+ smalltalk.addMethod(
1067
+ "_visitClassReferenceNode_",
1068
+ smalltalk.method({
1069
+ selector: "visitClassReferenceNode:",
1070
+ fn: function (aNode) {
1071
+ var self = this;
1072
+ var $1, $2;
1073
+ smalltalk.send(smalltalk.send(self, "_classReferences", []), "_add_", [smalltalk.send(aNode, "_value", [])]);
1074
+ $1 = smalltalk.send(smalltalk.ClassRefVar || ClassRefVar, "_new", []);
1075
+ smalltalk.send($1, "_name_", [smalltalk.send(aNode, "_value", [])]);
1076
+ $2 = smalltalk.send($1, "_yourself", []);
1077
+ smalltalk.send(aNode, "_binding_", [$2]);
1078
+ return self;
1079
+ }
1080
+ }),
1081
+ smalltalk.SemanticAnalyzer);
1082
+
1083
+ smalltalk.addMethod(
1084
+ "_visitMethodNode_",
1085
+ smalltalk.method({
1086
+ selector: "visitMethodNode:",
1087
+ fn: function (aNode) {
1088
+ var self = this;
1089
+ var $1;
1090
+ smalltalk.send(self, "_pushScope_", [smalltalk.send(self, "_newMethodScope", [])]);
1091
+ smalltalk.send(aNode, "_scope_", [self['@currentScope']]);
1092
+ smalltalk.send(self['@currentScope'], "_node_", [aNode]);
1093
+ smalltalk.send(smalltalk.send(smalltalk.send(self, "_theClass", []), "_allInstanceVariableNames", []), "_do_", [function (each) {return smalltalk.send(self['@currentScope'], "_addIVar_", [each]);}]);
1094
+ smalltalk.send(smalltalk.send(aNode, "_arguments", []), "_do_", [function (each) {smalltalk.send(self, "_validateVariableScope_", [each]);return smalltalk.send(self['@currentScope'], "_addArg_", [each]);}]);
1095
+ smalltalk.send(self, "_visitMethodNode_", [aNode], smalltalk.NodeVisitor);
1096
+ smalltalk.send(aNode, "_classReferences_", [smalltalk.send(self, "_classReferences", [])]);
1097
+ $1 = smalltalk.send(aNode, "_messageSends_", [smalltalk.send(smalltalk.send(self, "_messageSends", []), "_keys", [])]);
1098
+ smalltalk.send(self, "_popScope", []);
1099
+ return self;
1100
+ }
1101
+ }),
1102
+ smalltalk.SemanticAnalyzer);
1103
+
1104
+ smalltalk.addMethod(
1105
+ "_visitReturnNode_",
1106
+ smalltalk.method({
1107
+ selector: "visitReturnNode:",
1108
+ fn: function (aNode) {
1109
+ var self = this;
1110
+ var $1;
1111
+ smalltalk.send(aNode, "_scope_", [self['@currentScope']]);
1112
+ $1 = smalltalk.send(self['@currentScope'], "_isMethodScope", []);
1113
+ if (smalltalk.assert($1)) {
1114
+ smalltalk.send(self['@currentScope'], "_localReturn_", [true]);
1115
+ } else {
1116
+ smalltalk.send(smalltalk.send(self['@currentScope'], "_methodScope", []), "_addNonLocalReturn_", [self['@currentScope']]);
1117
+ }
1118
+ smalltalk.send(self, "_visitReturnNode_", [aNode], smalltalk.NodeVisitor);
1119
+ return self;
1120
+ }
1121
+ }),
1122
+ smalltalk.SemanticAnalyzer);
1123
+
1124
+ smalltalk.addMethod(
1125
+ "_visitSendNode_",
1126
+ smalltalk.method({
1127
+ selector: "visitSendNode:",
1128
+ fn: function (aNode) {
1129
+ var self = this;
1130
+ var $1, $2, $3;
1131
+ $1 = smalltalk.send(smalltalk.send(smalltalk.send(aNode, "_receiver", []), "_value", []), "__eq", ["super"]);
1132
+ if (smalltalk.assert($1)) {
1133
+ smalltalk.send(aNode, "_superSend_", [true]);
1134
+ smalltalk.send(smalltalk.send(aNode, "_receiver", []), "_value_", ["self"]);
1135
+ } else {
1136
+ $2 = smalltalk.send(smalltalk.send(smalltalk.IRSendInliner || IRSendInliner, "_inlinedSelectors", []), "_includes_", [smalltalk.send(aNode, "_selector", [])]);
1137
+ if (smalltalk.assert($2)) {
1138
+ smalltalk.send(aNode, "_shouldBeInlined_", [true]);
1139
+ $3 = smalltalk.send(smalltalk.send(aNode, "_receiver", []), "_isValueNode", []);
1140
+ if (!smalltalk.assert($3)) {
1141
+ smalltalk.send(smalltalk.send(aNode, "_receiver", []), "_shouldBeAliased_", [true]);
1142
+ }
1143
+ }
1144
+ }
1145
+ smalltalk.send(smalltalk.send(self, "_messageSends", []), "_at_ifAbsentPut_", [smalltalk.send(aNode, "_selector", []), function () {return smalltalk.send(smalltalk.Set || Set, "_new", []);}]);
1146
+ smalltalk.send(smalltalk.send(smalltalk.send(self, "_messageSends", []), "_at_", [smalltalk.send(aNode, "_selector", [])]), "_add_", [aNode]);
1147
+ smalltalk.send(aNode, "_index_", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_messageSends", []), "_at_", [smalltalk.send(aNode, "_selector", [])]), "_size", [])]);
1148
+ smalltalk.send(self, "_visitSendNode_", [aNode], smalltalk.NodeVisitor);
1149
+ return self;
1150
+ }
1151
+ }),
1152
+ smalltalk.SemanticAnalyzer);
1153
+
1154
+ smalltalk.addMethod(
1155
+ "_visitSequenceNode_",
1156
+ smalltalk.method({
1157
+ selector: "visitSequenceNode:",
1158
+ fn: function (aNode) {
1159
+ var self = this;
1160
+ smalltalk.send(smalltalk.send(aNode, "_temps", []), "_do_", [function (each) {smalltalk.send(self, "_validateVariableScope_", [each]);return smalltalk.send(self['@currentScope'], "_addTemp_", [each]);}]);
1161
+ smalltalk.send(self, "_visitSequenceNode_", [aNode], smalltalk.NodeVisitor);
1162
+ return self;
1163
+ }
1164
+ }),
1165
+ smalltalk.SemanticAnalyzer);
1166
+
1167
+ smalltalk.addMethod(
1168
+ "_visitVariableNode_",
1169
+ smalltalk.method({
1170
+ selector: "visitVariableNode:",
1171
+ fn: function (aNode) {
1172
+ var self = this;
1173
+ var $2, $3, $4, $1;
1174
+ $2 = smalltalk.send(self['@currentScope'], "_lookupVariable_", [aNode]);
1175
+ if (($receiver = $2) == nil || $receiver == undefined) {
1176
+ smalltalk.send(self, "_errorUnknownVariable_", [aNode]);
1177
+ $3 = smalltalk.send(smalltalk.UnknownVar || UnknownVar, "_new", []);
1178
+ smalltalk.send($3, "_name_", [smalltalk.send(aNode, "_value", [])]);
1179
+ $4 = smalltalk.send($3, "_yourself", []);
1180
+ $1 = $4;
1181
+ } else {
1182
+ $1 = $2;
1183
+ }
1184
+ smalltalk.send(aNode, "_binding_", [$1]);
1185
+ return self;
1186
+ }
1187
+ }),
1188
+ smalltalk.SemanticAnalyzer);
1189
+
1190
+
1191
+ smalltalk.addMethod(
1192
+ "_on_",
1193
+ smalltalk.method({
1194
+ selector: "on:",
1195
+ fn: function (aClass) {
1196
+ var self = this;
1197
+ var $2, $3, $1;
1198
+ $2 = smalltalk.send(self, "_new", []);
1199
+ smalltalk.send($2, "_theClass_", [aClass]);
1200
+ $3 = smalltalk.send($2, "_yourself", []);
1201
+ $1 = $3;
1202
+ return $1;
1203
+ }
1204
+ }),
1205
+ smalltalk.SemanticAnalyzer.klass);
1206
+
1207
+