Browse Source

Merge branch 'master' into traits-in-core

# Conflicts:
#	API-CHANGES.txt
#	src/Kernel-Classes.js
#	src/Kernel-Promises.js
#	src/Kernel-Promises.st
#	src/Platform-ImportExport.js
#	src/SUnit.js
Herbert Vojčík 6 months ago
parent
commit
f0cb469727

+ 22 - 0
API-CHANGES.txt

@@ -6,6 +6,28 @@
6 6
   + isNativeFunction:
7 7
 
8 8
 
9
+0.18.6:
10
+
11
++ IRInstructions >>
12
+  + isSelf
13
+  + isSuper
14
++ IRVariable >>
15
+  + isSelf
16
+  + isSuper
17
++ ScopeVar >>
18
+  + isSelf
19
+  + isSuper
20
++ PseudoVar >>
21
+  + isSelf
22
+  + isSuper
23
++UndefinedObject >>
24
+  + identityHash
25
+  + value
26
+
27
+- IRSend >>
28
+  - isSuperSend
29
+
30
+
9 31
 0.18.3:
10 32
 
11 33
 * Move {add,remove}Element from Array.prototype to kernel API.

+ 6 - 0
CHANGELOG

@@ -13,6 +13,12 @@ Commits: https://lolg.it/amber/amber/commits/0.19.0.
13 13
 * Removed `.allowJavaScriptCalls` flag.
14 14
 * Internal `.isNil` deprecated in favour of `.a$nil`.
15 15
 * Internal `.klass` deprecated in favour of `.a$cls`.
16
+* Both 'self' and '$self' compiled in method code.
17
+  * '$self' used as receiver, 'self' used to pass a value.
18
+
19
+Breaks fw compat, uses `a$nil` and `a$cls` when compiling / saving code.
20
+
21
+May break bw compat for code using `.allowJavaScriptCalls` (very unlikely).
16 22
 
17 23
 Commits: https://lolg.it/amber/amber/commits/0.18.6.
18 24
 

File diff suppressed because it is too large
+ 243 - 243
external/amber-cli/src/AmberCli.js


+ 5 - 5
external/amber-dev/lib/NodeTestRunner.js

@@ -13,11 +13,11 @@ $core.method({
13 13
 selector: "main",
14 14
 protocol: "not yet classified",
15 15
 fn: function (){
16
-var self=this;
16
+var self=this,$self=this;
17 17
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
18 18
 return $core.withContext(function($ctx1) {
19 19
 //>>excludeEnd("ctx");
20
-self._runTestSuite();
20
+$self._runTestSuite();
21 21
 return self;
22 22
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
23 23
 }, function($ctx1) {$ctx1.fill(self,"main",{},$globals.NodeTestRunner.a$cls)});
@@ -37,7 +37,7 @@ $core.method({
37 37
 selector: "runTestSuite",
38 38
 protocol: "not yet classified",
39 39
 fn: function (){
40
-var self=this;
40
+var self=this,$self=this;
41 41
 var suite,worker;
42 42
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
43 43
 return $core.withContext(function($ctx1) {
@@ -176,7 +176,7 @@ $20=$recv($21).__comma(" is failing!");
176 176
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
177 177
 $ctx2.sendIdx[","]=6;
178 178
 //>>excludeEnd("ctx");
179
-self._throw_($20);
179
+$self._throw_($20);
180 180
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
181 181
 $ctx2.sendIdx["throw:"]=1;
182 182
 //>>excludeEnd("ctx");
@@ -215,7 +215,7 @@ $33=$recv($34).__comma(" has errors!");
215 215
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
216 216
 $ctx2.sendIdx[","]=9;
217 217
 //>>excludeEnd("ctx");
218
-return self._throw_($33);
218
+return $self._throw_($33);
219 219
 }
220 220
 }
221 221
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);

+ 1 - 1
internal/index.html

@@ -30,7 +30,7 @@
30 30
     startHelios.parentNode.removeChild(startHelios);
31 31
     var loadHelpers = new Promise(function (resolve, reject) {
32 32
         setTimeout(function () {
33
-            require(["amber/legacy/IDE", "amber/web/Web", "amber/legacy/Benchfib", "helios/all", "amber_cli/AmberCli"], resolve, reject);
33
+            require(["amber/legacy/IDE", "amber/web/Web", "amber/web/Web-Snippets", "my/silk/devel", "helios/all", "amber_cli/AmberCli"], resolve, reject);
34 34
         }, 250);
35 35
     });
36 36
     require(["amber/devel"], function (amber) {

File diff suppressed because it is too large
+ 243 - 243
src/Compiler-AST.js


+ 93 - 93
src/Compiler-Core.js

@@ -15,11 +15,11 @@ $core.method({
15 15
 selector: "compileNode:",
16 16
 protocol: "compiling",
17 17
 fn: function (aNode){
18
-var self=this;
18
+var self=this,$self=this;
19 19
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
20 20
 return $core.withContext(function($ctx1) {
21 21
 //>>excludeEnd("ctx");
22
-return $recv(self._transformers())._inject_into_(aNode,(function(input,transformer){
22
+return $recv($self._transformers())._inject_into_(aNode,(function(input,transformer){
23 23
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
24 24
 return $core.withContext(function($ctx2) {
25 25
 //>>excludeEnd("ctx");
@@ -46,8 +46,8 @@ $core.method({
46 46
 selector: "currentClass",
47 47
 protocol: "accessing",
48 48
 fn: function (){
49
-var self=this;
50
-return self["@currentClass"];
49
+var self=this,$self=this;
50
+return $self["@currentClass"];
51 51
 
52 52
 },
53 53
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -64,8 +64,8 @@ $core.method({
64 64
 selector: "currentClass:",
65 65
 protocol: "accessing",
66 66
 fn: function (aClass){
67
-var self=this;
68
-self["@currentClass"]=aClass;
67
+var self=this,$self=this;
68
+$self["@currentClass"]=aClass;
69 69
 return self;
70 70
 
71 71
 },
@@ -83,8 +83,8 @@ $core.method({
83 83
 selector: "currentPackage",
84 84
 protocol: "accessing",
85 85
 fn: function (){
86
-var self=this;
87
-return self["@currentPackage"];
86
+var self=this,$self=this;
87
+return $self["@currentPackage"];
88 88
 
89 89
 },
90 90
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -101,8 +101,8 @@ $core.method({
101 101
 selector: "currentPackage:",
102 102
 protocol: "accessing",
103 103
 fn: function (anObject){
104
-var self=this;
105
-self["@currentPackage"]=anObject;
104
+var self=this,$self=this;
105
+$self["@currentPackage"]=anObject;
106 106
 return self;
107 107
 
108 108
 },
@@ -120,7 +120,7 @@ $core.method({
120 120
 selector: "pseudoVariables",
121 121
 protocol: "accessing",
122 122
 fn: function (){
123
-var self=this;
123
+var self=this,$self=this;
124 124
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
125 125
 return $core.withContext(function($ctx1) {
126 126
 //>>excludeEnd("ctx");
@@ -143,12 +143,12 @@ $core.method({
143 143
 selector: "source",
144 144
 protocol: "accessing",
145 145
 fn: function (){
146
-var self=this;
146
+var self=this,$self=this;
147 147
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
148 148
 return $core.withContext(function($ctx1) {
149 149
 //>>excludeEnd("ctx");
150 150
 var $1,$receiver;
151
-$1=self["@source"];
151
+$1=$self["@source"];
152 152
 if(($receiver = $1) == null || $receiver.a$nil){
153 153
 return "";
154 154
 } else {
@@ -172,8 +172,8 @@ $core.method({
172 172
 selector: "source:",
173 173
 protocol: "accessing",
174 174
 fn: function (aString){
175
-var self=this;
176
-self["@source"]=aString;
175
+var self=this,$self=this;
176
+$self["@source"]=aString;
177 177
 return self;
178 178
 
179 179
 },
@@ -191,12 +191,12 @@ $core.method({
191 191
 selector: "transformers",
192 192
 protocol: "compiling",
193 193
 fn: function (){
194
-var self=this;
194
+var self=this,$self=this;
195 195
 var dict;
196 196
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
197 197
 return $core.withContext(function($ctx1) {
198 198
 //>>excludeEnd("ctx");
199
-dict=self._transformersDictionary();
199
+dict=$self._transformersDictionary();
200 200
 return $recv($recv($recv($recv(dict)._keys())._asArray())._sort())._collect_((function(each){
201 201
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
202 202
 return $core.withContext(function($ctx2) {
@@ -224,11 +224,11 @@ $core.method({
224 224
 selector: "transformersDictionary",
225 225
 protocol: "compiling",
226 226
 fn: function (){
227
-var self=this;
227
+var self=this,$self=this;
228 228
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
229 229
 return $core.withContext(function($ctx1) {
230 230
 //>>excludeEnd("ctx");
231
-self._subclassResponsibility();
231
+$self._subclassResponsibility();
232 232
 return self;
233 233
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
234 234
 }, function($ctx1) {$ctx1.fill(self,"transformersDictionary",{},$globals.AbstractCodeGenerator)});
@@ -254,13 +254,13 @@ $core.method({
254 254
 selector: "irTranslator",
255 255
 protocol: "compiling",
256 256
 fn: function (){
257
-var self=this;
257
+var self=this,$self=this;
258 258
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
259 259
 return $core.withContext(function($ctx1) {
260 260
 //>>excludeEnd("ctx");
261 261
 var $1;
262
-$1=$recv(self._irTranslatorClass())._new();
263
-$recv($1)._currentClass_(self._currentClass());
262
+$1=$recv($self._irTranslatorClass())._new();
263
+$recv($1)._currentClass_($self._currentClass());
264 264
 return $recv($1)._yourself();
265 265
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
266 266
 }, function($ctx1) {$ctx1.fill(self,"irTranslator",{},$globals.CodeGenerator)});
@@ -280,7 +280,7 @@ $core.method({
280 280
 selector: "irTranslatorClass",
281 281
 protocol: "compiling",
282 282
 fn: function (){
283
-var self=this;
283
+var self=this,$self=this;
284 284
 return $globals.IRJSTranslator;
285 285
 
286 286
 },
@@ -298,13 +298,13 @@ $core.method({
298 298
 selector: "semanticAnalyzer",
299 299
 protocol: "compiling",
300 300
 fn: function (){
301
-var self=this;
301
+var self=this,$self=this;
302 302
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
303 303
 return $core.withContext(function($ctx1) {
304 304
 //>>excludeEnd("ctx");
305 305
 var $1;
306
-$1=$recv($globals.SemanticAnalyzer)._on_(self._currentClass());
307
-$recv($1)._thePackage_(self._currentPackage());
306
+$1=$recv($globals.SemanticAnalyzer)._on_($self._currentClass());
307
+$recv($1)._thePackage_($self._currentPackage());
308 308
 return $recv($1)._yourself();
309 309
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
310 310
 }, function($ctx1) {$ctx1.fill(self,"semanticAnalyzer",{},$globals.CodeGenerator)});
@@ -324,25 +324,25 @@ $core.method({
324 324
 selector: "transformersDictionary",
325 325
 protocol: "compiling",
326 326
 fn: function (){
327
-var self=this;
327
+var self=this,$self=this;
328 328
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
329 329
 return $core.withContext(function($ctx1) {
330 330
 //>>excludeEnd("ctx");
331 331
 var $1,$2,$receiver;
332
-$1=self["@transformersDictionary"];
332
+$1=$self["@transformersDictionary"];
333 333
 if(($receiver = $1) == null || $receiver.a$nil){
334 334
 $2=$recv($globals.Dictionary)._new();
335
-$recv($2)._at_put_("2000-semantic",self._semanticAnalyzer());
335
+$recv($2)._at_put_("2000-semantic",$self._semanticAnalyzer());
336 336
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
337 337
 $ctx1.sendIdx["at:put:"]=1;
338 338
 //>>excludeEnd("ctx");
339
-$recv($2)._at_put_("5000-astToIr",self._translator());
339
+$recv($2)._at_put_("5000-astToIr",$self._translator());
340 340
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
341 341
 $ctx1.sendIdx["at:put:"]=2;
342 342
 //>>excludeEnd("ctx");
343
-$recv($2)._at_put_("8000-irToJs",self._irTranslator());
344
-self["@transformersDictionary"]=$recv($2)._yourself();
345
-return self["@transformersDictionary"];
343
+$recv($2)._at_put_("8000-irToJs",$self._irTranslator());
344
+$self["@transformersDictionary"]=$recv($2)._yourself();
345
+return $self["@transformersDictionary"];
346 346
 } else {
347 347
 return $1;
348 348
 }
@@ -364,14 +364,14 @@ $core.method({
364 364
 selector: "translator",
365 365
 protocol: "compiling",
366 366
 fn: function (){
367
-var self=this;
367
+var self=this,$self=this;
368 368
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
369 369
 return $core.withContext(function($ctx1) {
370 370
 //>>excludeEnd("ctx");
371 371
 var $1;
372 372
 $1=$recv($globals.IRASTTranslator)._new();
373
-$recv($1)._source_(self._source());
374
-$recv($1)._theClass_(self._currentClass());
373
+$recv($1)._source_($self._source());
374
+$recv($1)._theClass_($self._currentClass());
375 375
 return $recv($1)._yourself();
376 376
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
377 377
 }, function($ctx1) {$ctx1.fill(self,"translator",{},$globals.CodeGenerator)});
@@ -397,12 +397,12 @@ $core.method({
397 397
 selector: "codeGeneratorClass",
398 398
 protocol: "accessing",
399 399
 fn: function (){
400
-var self=this;
400
+var self=this,$self=this;
401 401
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
402 402
 return $core.withContext(function($ctx1) {
403 403
 //>>excludeEnd("ctx");
404 404
 var $1,$receiver;
405
-$1=self["@codeGeneratorClass"];
405
+$1=$self["@codeGeneratorClass"];
406 406
 if(($receiver = $1) == null || $receiver.a$nil){
407 407
 return $globals.InliningCodeGenerator;
408 408
 } else {
@@ -426,8 +426,8 @@ $core.method({
426 426
 selector: "codeGeneratorClass:",
427 427
 protocol: "accessing",
428 428
 fn: function (aClass){
429
-var self=this;
430
-self["@codeGeneratorClass"]=aClass;
429
+var self=this,$self=this;
430
+$self["@codeGeneratorClass"]=aClass;
431 431
 return self;
432 432
 
433 433
 },
@@ -445,12 +445,12 @@ $core.method({
445 445
 selector: "compile:forClass:protocol:",
446 446
 protocol: "compiling",
447 447
 fn: function (aString,aClass,anotherString){
448
-var self=this;
448
+var self=this,$self=this;
449 449
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
450 450
 return $core.withContext(function($ctx1) {
451 451
 //>>excludeEnd("ctx");
452
-self._source_(aString);
453
-return self._compileNode_forClass_package_(self._parse_(aString),aClass,$recv(aClass)._packageOfProtocol_(anotherString));
452
+$self._source_(aString);
453
+return $self._compileNode_forClass_package_($self._parse_(aString),aClass,$recv(aClass)._packageOfProtocol_(anotherString));
454 454
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
455 455
 }, function($ctx1) {$ctx1.fill(self,"compile:forClass:protocol:",{aString:aString,aClass:aClass,anotherString:anotherString},$globals.Compiler)});
456 456
 //>>excludeEnd("ctx");
@@ -469,7 +469,7 @@ $core.method({
469 469
 selector: "compileExpression:on:",
470 470
 protocol: "compiling",
471 471
 fn: function (aString,anObject){
472
-var self=this;
472
+var self=this,$self=this;
473 473
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
474 474
 return $core.withContext(function($ctx1) {
475 475
 //>>excludeEnd("ctx");
@@ -478,7 +478,7 @@ $1=$recv("xxxDoIt ^ [ ".__comma(aString)).__comma(" ] value");
478 478
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
479 479
 $ctx1.sendIdx[","]=1;
480 480
 //>>excludeEnd("ctx");
481
-return self._compile_forClass_protocol_($1,$recv(anObject)._class(),"**xxxDoIt");
481
+return $self._compile_forClass_protocol_($1,$recv(anObject)._class(),"**xxxDoIt");
482 482
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
483 483
 }, function($ctx1) {$ctx1.fill(self,"compileExpression:on:",{aString:aString,anObject:anObject},$globals.Compiler)});
484 484
 //>>excludeEnd("ctx");
@@ -497,17 +497,17 @@ $core.method({
497 497
 selector: "compileNode:",
498 498
 protocol: "compiling",
499 499
 fn: function (aNode){
500
-var self=this;
500
+var self=this,$self=this;
501 501
 var generator,result;
502 502
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
503 503
 return $core.withContext(function($ctx1) {
504 504
 //>>excludeEnd("ctx");
505 505
 var $1;
506
-generator=$recv(self._codeGeneratorClass())._new();
506
+generator=$recv($self._codeGeneratorClass())._new();
507 507
 $1=generator;
508
-$recv($1)._source_(self._source());
509
-$recv($1)._currentClass_(self._currentClass());
510
-$recv($1)._currentPackage_(self._currentPackage());
508
+$recv($1)._source_($self._source());
509
+$recv($1)._currentClass_($self._currentClass());
510
+$recv($1)._currentPackage_($self._currentPackage());
511 511
 result=$recv(generator)._compileNode_(aNode);
512 512
 return result;
513 513
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -528,13 +528,13 @@ $core.method({
528 528
 selector: "compileNode:forClass:package:",
529 529
 protocol: "compiling",
530 530
 fn: function (aNode,aClass,aPackage){
531
-var self=this;
531
+var self=this,$self=this;
532 532
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
533 533
 return $core.withContext(function($ctx1) {
534 534
 //>>excludeEnd("ctx");
535
-self._currentClass_(aClass);
536
-self._currentPackage_(aPackage);
537
-return self._compileNode_(aNode);
535
+$self._currentClass_(aClass);
536
+$self._currentPackage_(aPackage);
537
+return $self._compileNode_(aNode);
538 538
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
539 539
 }, function($ctx1) {$ctx1.fill(self,"compileNode:forClass:package:",{aNode:aNode,aClass:aClass,aPackage:aPackage},$globals.Compiler)});
540 540
 //>>excludeEnd("ctx");
@@ -553,8 +553,8 @@ $core.method({
553 553
 selector: "currentClass",
554 554
 protocol: "accessing",
555 555
 fn: function (){
556
-var self=this;
557
-return self["@currentClass"];
556
+var self=this,$self=this;
557
+return $self["@currentClass"];
558 558
 
559 559
 },
560 560
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -571,8 +571,8 @@ $core.method({
571 571
 selector: "currentClass:",
572 572
 protocol: "accessing",
573 573
 fn: function (aClass){
574
-var self=this;
575
-self["@currentClass"]=aClass;
574
+var self=this,$self=this;
575
+$self["@currentClass"]=aClass;
576 576
 return self;
577 577
 
578 578
 },
@@ -590,8 +590,8 @@ $core.method({
590 590
 selector: "currentPackage",
591 591
 protocol: "accessing",
592 592
 fn: function (){
593
-var self=this;
594
-return self["@currentPackage"];
593
+var self=this,$self=this;
594
+return $self["@currentPackage"];
595 595
 
596 596
 },
597 597
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -608,8 +608,8 @@ $core.method({
608 608
 selector: "currentPackage:",
609 609
 protocol: "accessing",
610 610
 fn: function (anObject){
611
-var self=this;
612
-self["@currentPackage"]=anObject;
611
+var self=this,$self=this;
612
+$self["@currentPackage"]=anObject;
613 613
 return self;
614 614
 
615 615
 },
@@ -627,7 +627,7 @@ $core.method({
627 627
 selector: "eval:",
628 628
 protocol: "compiling",
629 629
 fn: function (aString){
630
-var self=this;
630
+var self=this,$self=this;
631 631
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
632 632
 return $core.withContext(function($ctx1) {
633 633
 //>>excludeEnd("ctx");
@@ -651,7 +651,7 @@ $core.method({
651 651
 selector: "eval:forPackage:",
652 652
 protocol: "compiling",
653 653
 fn: function (aString,aPackage){
654
-var self=this;
654
+var self=this,$self=this;
655 655
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
656 656
 return $core.withContext(function($ctx1) {
657 657
 //>>excludeEnd("ctx");
@@ -677,11 +677,11 @@ $core.method({
677 677
 selector: "evaluateExpression:",
678 678
 protocol: "compiling",
679 679
 fn: function (aString){
680
-var self=this;
680
+var self=this,$self=this;
681 681
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
682 682
 return $core.withContext(function($ctx1) {
683 683
 //>>excludeEnd("ctx");
684
-return self._evaluateExpression_on_(aString,$recv($globals.DoIt)._new());
684
+return $self._evaluateExpression_on_(aString,$recv($globals.DoIt)._new());
685 685
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
686 686
 }, function($ctx1) {$ctx1.fill(self,"evaluateExpression:",{aString:aString},$globals.Compiler)});
687 687
 //>>excludeEnd("ctx");
@@ -700,13 +700,13 @@ $core.method({
700 700
 selector: "evaluateExpression:on:",
701 701
 protocol: "compiling",
702 702
 fn: function (aString,anObject){
703
-var self=this;
703
+var self=this,$self=this;
704 704
 var result,method;
705 705
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
706 706
 return $core.withContext(function($ctx1) {
707 707
 //>>excludeEnd("ctx");
708 708
 var $1;
709
-method=self._eval_(self._compileExpression_on_(aString,anObject));
709
+method=$self._eval_($self._compileExpression_on_(aString,anObject));
710 710
 $recv(method)._protocol_("**xxxDoIt");
711 711
 $1=$recv(anObject)._class();
712 712
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -734,12 +734,12 @@ $core.method({
734 734
 selector: "install:forClass:protocol:",
735 735
 protocol: "compiling",
736 736
 fn: function (aString,aBehavior,anotherString){
737
-var self=this;
737
+var self=this,$self=this;
738 738
 var compiledMethod;
739 739
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
740 740
 return $core.withContext(function($ctx1) {
741 741
 //>>excludeEnd("ctx");
742
-compiledMethod=self._eval_forPackage_(self._compile_forClass_protocol_(aString,aBehavior,anotherString),$recv(aBehavior)._packageOfProtocol_(anotherString));
742
+compiledMethod=$self._eval_forPackage_($self._compile_forClass_protocol_(aString,aBehavior,anotherString),$recv(aBehavior)._packageOfProtocol_(anotherString));
743 743
 return $recv($recv($globals.ClassBuilder)._new())._installMethod_forClass_protocol_(compiledMethod,aBehavior,anotherString);
744 744
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
745 745
 }, function($ctx1) {$ctx1.fill(self,"install:forClass:protocol:",{aString:aString,aBehavior:aBehavior,anotherString:anotherString,compiledMethod:compiledMethod},$globals.Compiler)});
@@ -759,7 +759,7 @@ $core.method({
759 759
 selector: "parse:",
760 760
 protocol: "compiling",
761 761
 fn: function (aString){
762
-var self=this;
762
+var self=this,$self=this;
763 763
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
764 764
 return $core.withContext(function($ctx1) {
765 765
 //>>excludeEnd("ctx");
@@ -782,7 +782,7 @@ $core.method({
782 782
 selector: "parseExpression:",
783 783
 protocol: "compiling",
784 784
 fn: function (aString){
785
-var self=this;
785
+var self=this,$self=this;
786 786
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
787 787
 return $core.withContext(function($ctx1) {
788 788
 //>>excludeEnd("ctx");
@@ -791,7 +791,7 @@ $1=$recv("doIt ^ [ ".__comma(aString)).__comma(" ] value");
791 791
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
792 792
 $ctx1.sendIdx[","]=1;
793 793
 //>>excludeEnd("ctx");
794
-return self._parse_($1);
794
+return $self._parse_($1);
795 795
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
796 796
 }, function($ctx1) {$ctx1.fill(self,"parseExpression:",{aString:aString},$globals.Compiler)});
797 797
 //>>excludeEnd("ctx");
@@ -810,7 +810,7 @@ $core.method({
810 810
 selector: "recompile:",
811 811
 protocol: "compiling",
812 812
 fn: function (aClass){
813
-var self=this;
813
+var self=this,$self=this;
814 814
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
815 815
 return $core.withContext(function($ctx1) {
816 816
 //>>excludeEnd("ctx");
@@ -824,7 +824,7 @@ $1=$recv($recv(each)._methodClass()).__eq(aClass);
824 824
 $ctx2.sendIdx["="]=1;
825 825
 //>>excludeEnd("ctx");
826 826
 if($core.assert($1)){
827
-return self._install_forClass_protocol_($recv(each)._source(),aClass,$recv(each)._protocol());
827
+return $self._install_forClass_protocol_($recv(each)._source(),aClass,$recv(each)._protocol());
828 828
 }
829 829
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
830 830
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
@@ -838,7 +838,7 @@ var meta;
838 838
 meta=$receiver;
839 839
 $3=$recv(meta).__eq(aClass);
840 840
 if(!$core.assert($3)){
841
-self._recompile_(meta);
841
+$self._recompile_(meta);
842 842
 }
843 843
 }
844 844
 return self;
@@ -860,7 +860,7 @@ $core.method({
860 860
 selector: "recompileAll",
861 861
 protocol: "compiling",
862 862
 fn: function (){
863
-var self=this;
863
+var self=this,$self=this;
864 864
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
865 865
 return $core.withContext(function($ctx1) {
866 866
 //>>excludeEnd("ctx");
@@ -868,7 +868,7 @@ $recv($recv($globals.Smalltalk)._classes())._do_displayingProgress_((function(ea
868 868
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
869 869
 return $core.withContext(function($ctx2) {
870 870
 //>>excludeEnd("ctx");
871
-return self._recompile_(each);
871
+return $self._recompile_(each);
872 872
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
873 873
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
874 874
 //>>excludeEnd("ctx");
@@ -892,12 +892,12 @@ $core.method({
892 892
 selector: "source",
893 893
 protocol: "accessing",
894 894
 fn: function (){
895
-var self=this;
895
+var self=this,$self=this;
896 896
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
897 897
 return $core.withContext(function($ctx1) {
898 898
 //>>excludeEnd("ctx");
899 899
 var $1,$receiver;
900
-$1=self["@source"];
900
+$1=$self["@source"];
901 901
 if(($receiver = $1) == null || $receiver.a$nil){
902 902
 return "";
903 903
 } else {
@@ -921,8 +921,8 @@ $core.method({
921 921
 selector: "source:",
922 922
 protocol: "accessing",
923 923
 fn: function (aString){
924
-var self=this;
925
-self["@source"]=aString;
924
+var self=this,$self=this;
925
+$self["@source"]=aString;
926 926
 return self;
927 927
 
928 928
 },
@@ -941,11 +941,11 @@ $core.method({
941 941
 selector: "recompile:",
942 942
 protocol: "compiling",
943 943
 fn: function (aClass){
944
-var self=this;
944
+var self=this,$self=this;
945 945
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
946 946
 return $core.withContext(function($ctx1) {
947 947
 //>>excludeEnd("ctx");
948
-$recv(self._new())._recompile_(aClass);
948
+$recv($self._new())._recompile_(aClass);
949 949
 return self;
950 950
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
951 951
 }, function($ctx1) {$ctx1.fill(self,"recompile:",{aClass:aClass},$globals.Compiler.a$cls)});
@@ -965,7 +965,7 @@ $core.method({
965 965
 selector: "recompileAll",
966 966
 protocol: "compiling",
967 967
 fn: function (){
968
-var self=this;
968
+var self=this,$self=this;
969 969
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
970 970
 return $core.withContext(function($ctx1) {
971 971
 //>>excludeEnd("ctx");
@@ -973,7 +973,7 @@ $recv($recv($globals.Smalltalk)._classes())._do_((function(each){
973 973
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
974 974
 return $core.withContext(function($ctx2) {
975 975
 //>>excludeEnd("ctx");
976
-return self._recompile_(each);
976
+return $self._recompile_(each);
977 977
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
978 978
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
979 979
 //>>excludeEnd("ctx");
@@ -1014,7 +1014,7 @@ $core.method({
1014 1014
 selector: "evaluate:context:",
1015 1015
 protocol: "evaluating",
1016 1016
 fn: function (aString,aContext){
1017
-var self=this;
1017
+var self=this,$self=this;
1018 1018
 var compiler,ast;
1019 1019
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
1020 1020
 return $core.withContext(function($ctx1) {
@@ -1065,7 +1065,7 @@ $core.method({
1065 1065
 selector: "evaluate:for:",
1066 1066
 protocol: "evaluating",
1067 1067
 fn: function (aString,anObject){
1068
-var self=this;
1068
+var self=this,$self=this;
1069 1069
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
1070 1070
 return $core.withContext(function($ctx1) {
1071 1071
 //>>excludeEnd("ctx");
@@ -1088,7 +1088,7 @@ $core.method({
1088 1088
 selector: "evaluate:receiver:",
1089 1089
 protocol: "evaluating",
1090 1090
 fn: function (aString,anObject){
1091
-var self=this;
1091
+var self=this,$self=this;
1092 1092
 var compiler;
1093 1093
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
1094 1094
 return $core.withContext(function($ctx1) {
@@ -1135,11 +1135,11 @@ $core.method({
1135 1135
 selector: "evaluate:for:",
1136 1136
 protocol: "instance creation",
1137 1137
 fn: function (aString,anObject){
1138
-var self=this;
1138
+var self=this,$self=this;
1139 1139
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
1140 1140
 return $core.withContext(function($ctx1) {
1141 1141
 //>>excludeEnd("ctx");
1142
-return $recv(self._new())._evaluate_for_(aString,anObject);
1142
+return $recv($self._new())._evaluate_for_(aString,anObject);
1143 1143
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
1144 1144
 }, function($ctx1) {$ctx1.fill(self,"evaluate:for:",{aString:aString,anObject:anObject},$globals.Evaluator.a$cls)});
1145 1145
 //>>excludeEnd("ctx");
@@ -1158,14 +1158,14 @@ $core.method({
1158 1158
 selector: "asVariableName",
1159 1159
 protocol: "*Compiler-Core",
1160 1160
 fn: function (){
1161
-var self=this;
1161
+var self=this,$self=this;
1162 1162
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
1163 1163
 return $core.withContext(function($ctx1) {
1164 1164
 //>>excludeEnd("ctx");
1165 1165
 var $1;
1166 1166
 $1=$recv($recv($globals.Smalltalk)._reservedWords())._includes_(self);
1167 1167
 if($core.assert($1)){
1168
-return self.__comma("_");
1168
+return $self.__comma("_");
1169 1169
 } else {
1170 1170
 return self;
1171 1171
 }

File diff suppressed because it is too large
+ 576 - 520
src/Compiler-IR.js


+ 22 - 9
src/Compiler-IR.st

@@ -317,6 +317,10 @@ isMethod
317 317
 	^ false
318 318
 !
319 319
 
320
+isSelf
321
+	^ false
322
+!
323
+
320 324
 isSend
321 325
 	^ false
322 326
 !
@@ -325,6 +329,10 @@ isSequence
325 329
 	^ false
326 330
 !
327 331
 
332
+isSuper
333
+	^ false
334
+!
335
+
328 336
 isTempDeclaration
329 337
 	^ false
330 338
 !
@@ -652,12 +660,6 @@ selector: aString
652 660
 
653 661
 isSend
654 662
 	^ true
655
-!
656
-
657
-isSuperSend
658
-	| receiver |
659
-	receiver := self receiver.
660
-	^ receiver isVariable and: [ receiver variable name = 'super' ]
661 663
 ! !
662 664
 
663 665
 !IRSend methodsFor: 'visiting'!
@@ -738,6 +740,14 @@ variable: aScopeVariable
738 740
 
739 741
 !IRVariable methodsFor: 'testing'!
740 742
 
743
+isSelf
744
+	^ self variable isSelf
745
+!
746
+
747
+isSuper
748
+	^ self variable isSuper
749
+!
750
+
741 751
 isVariable
742 752
 	^ true
743 753
 !
@@ -953,7 +963,7 @@ visitIRSend: anIRSend
953 963
 	| sends superclass |
954 964
 	sends := (anIRSend method sendIndexes at: anIRSend selector) size.
955 965
 	
956
-	anIRSend isSuperSend
966
+	anIRSend receiver isSuper
957 967
 		ifTrue: [ self visitSuperSend: anIRSend ]
958 968
 		ifFalse: [ self visitSend: anIRSend ].
959 969
 		
@@ -996,6 +1006,9 @@ visitInstructionList: anArray enclosedBetween: aString and: anotherString
996 1006
 !
997 1007
 
998 1008
 visitReceiver: anIRInstruction
1009
+	"Ugly hack, mutation"
1010
+	anIRInstruction isSelf ifTrue: [ anIRInstruction variable: (anIRInstruction variable copy name: '$self'; yourself) ].
1011
+	
999 1012
 	anIRInstruction needsBoxingAsReceiver ifFalse: [ ^ self visit: anIRInstruction ].
1000 1013
 	
1001 1014
 	self stream nextPutAll: '$recv('.
@@ -1020,7 +1033,7 @@ visitSuperSend: anIRSend
1020 1033
 		nextPutAll: '(', self currentClass asJavaScriptSource;
1021 1034
 		nextPutAll: '.superclass||$boot.nilAsClass).fn.prototype.';
1022 1035
 		nextPutAll: anIRSend selector asJavaScriptMethodName, '.apply(';
1023
-		nextPutAll: '$recv(self), '.
1036
+		nextPutAll: '$self, '.
1024 1037
 	self
1025 1038
 		visitInstructionList: anIRSend arguments
1026 1039
 		enclosedBetween: '[' and: ']'.
@@ -1160,7 +1173,7 @@ nextPutFunctionWith: aBlock arguments: anArray
1160 1173
 		do: [ :each | stream nextPutAll: each asVariableName ]
1161 1174
 		separatedBy: [ stream nextPut: ',' ].
1162 1175
 	stream nextPutAll: '){'; lf.
1163
-	stream nextPutAll: 'var self=this;'; lf.
1176
+	stream nextPutAll: 'var self=this,$self=this;'; lf.
1164 1177
 	aBlock value.
1165 1178
 	stream lf; nextPutAll: '}'
1166 1179
 !

File diff suppressed because it is too large
+ 155 - 155
src/Compiler-Inlining.js


File diff suppressed because it is too large
+ 360 - 360
src/Compiler-Interpreter.js


File diff suppressed because it is too large
+ 336 - 254
src/Compiler-Semantic.js


+ 17 - 1
src/Compiler-Semantic.st

@@ -258,6 +258,14 @@ isPseudoVar
258 258
 	^ false
259 259
 !
260 260
 
261
+isSelf
262
+	^ false
263
+!
264
+
265
+isSuper
266
+	^ false
267
+!
268
+
261 269
 isTempVar
262 270
 	^ false
263 271
 !
@@ -354,7 +362,7 @@ I am an instance variable of a method or block.!
354 362
 !InstanceVar methodsFor: 'testing'!
355 363
 
356 364
 alias
357
-	^ 'self["@', self name, '"]'
365
+	^ '$self["@', self name, '"]'
358 366
 !
359 367
 
360 368
 isInstanceVar
@@ -383,6 +391,14 @@ isImmutable
383 391
 
384 392
 isPseudoVar
385 393
 	^ true
394
+!
395
+
396
+isSelf
397
+	^ name = 'self'
398
+!
399
+
400
+isSuper
401
+	^ name = 'super'
386 402
 ! !
387 403
 
388 404
 ScopeVar subclass: #TempVar

File diff suppressed because it is too large
+ 278 - 278
src/Compiler-Tests.js


+ 90 - 90
src/Kernel-Announcements.js

@@ -15,8 +15,8 @@ $core.method({
15 15
 selector: "announcementClass",
16 16
 protocol: "accessing",
17 17
 fn: function (){
18
-var self=this;
19
-return self["@announcementClass"];
18
+var self=this,$self=this;
19
+return $self["@announcementClass"];
20 20
 
21 21
 },
22 22
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -33,8 +33,8 @@ $core.method({
33 33
 selector: "announcementClass:",
34 34
 protocol: "accessing",
35 35
 fn: function (aClass){
36
-var self=this;
37
-self["@announcementClass"]=aClass;
36
+var self=this,$self=this;
37
+$self["@announcementClass"]=aClass;
38 38
 return self;
39 39
 
40 40
 },
@@ -52,14 +52,14 @@ $core.method({
52 52
 selector: "deliver:",
53 53
 protocol: "announcing",
54 54
 fn: function (anAnnouncement){
55
-var self=this;
55
+var self=this,$self=this;
56 56
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
57 57
 return $core.withContext(function($ctx1) {
58 58
 //>>excludeEnd("ctx");
59 59
 var $1;
60
-$1=self._handlesAnnouncement_(anAnnouncement);
60
+$1=$self._handlesAnnouncement_(anAnnouncement);
61 61
 if($core.assert($1)){
62
-$recv(self._valuable())._value_(anAnnouncement);
62
+$recv($self._valuable())._value_(anAnnouncement);
63 63
 }
64 64
 return self;
65 65
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -80,7 +80,7 @@ $core.method({
80 80
 selector: "handlesAnnouncement:",
81 81
 protocol: "announcing",
82 82
 fn: function (anAnnouncement){
83
-var self=this;
83
+var self=this,$self=this;
84 84
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
85 85
 return $core.withContext(function($ctx1) {
86 86
 //>>excludeEnd("ctx");
@@ -89,7 +89,7 @@ $2=$recv($globals.Smalltalk)._globals();
89 89
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
90 90
 $ctx1.sendIdx["globals"]=1;
91 91
 //>>excludeEnd("ctx");
92
-$3=$recv(self._announcementClass())._name();
92
+$3=$recv($self._announcementClass())._name();
93 93
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
94 94
 $ctx1.sendIdx["name"]=1;
95 95
 //>>excludeEnd("ctx");
@@ -122,11 +122,11 @@ $core.method({
122 122
 selector: "receiver",
123 123
 protocol: "accessing",
124 124
 fn: function (){
125
-var self=this;
125
+var self=this,$self=this;
126 126
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
127 127
 return $core.withContext(function($ctx1) {
128 128
 //>>excludeEnd("ctx");
129
-return $recv(self._valuable())._receiver();
129
+return $recv($self._valuable())._receiver();
130 130
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
131 131
 }, function($ctx1) {$ctx1.fill(self,"receiver",{},$globals.AnnouncementSubscription)});
132 132
 //>>excludeEnd("ctx");
@@ -145,8 +145,8 @@ $core.method({
145 145
 selector: "valuable",
146 146
 protocol: "accessing",
147 147
 fn: function (){
148
-var self=this;
149
-return self["@valuable"];
148
+var self=this,$self=this;
149
+return $self["@valuable"];
150 150
 
151 151
 },
152 152
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -163,8 +163,8 @@ $core.method({
163 163
 selector: "valuable:",
164 164
 protocol: "accessing",
165 165
 fn: function (aValuable){
166
-var self=this;
167
-self["@valuable"]=aValuable;
166
+var self=this,$self=this;
167
+$self["@valuable"]=aValuable;
168 168
 return self;
169 169
 
170 170
 },
@@ -188,8 +188,8 @@ $core.method({
188 188
 selector: "receiver",
189 189
 protocol: "accessing",
190 190
 fn: function (){
191
-var self=this;
192
-return self["@receiver"];
191
+var self=this,$self=this;
192
+return $self["@receiver"];
193 193
 
194 194
 },
195 195
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -206,8 +206,8 @@ $core.method({
206 206
 selector: "receiver:",
207 207
 protocol: "accessing",
208 208
 fn: function (anObject){
209
-var self=this;
210
-self["@receiver"]=anObject;
209
+var self=this,$self=this;
210
+$self["@receiver"]=anObject;
211 211
 return self;
212 212
 
213 213
 },
@@ -225,8 +225,8 @@ $core.method({
225 225
 selector: "valuable",
226 226
 protocol: "accessing",
227 227
 fn: function (){
228
-var self=this;
229
-return self["@valuable"];
228
+var self=this,$self=this;
229
+return $self["@valuable"];
230 230
 
231 231
 },
232 232
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -243,8 +243,8 @@ $core.method({
243 243
 selector: "valuable:",
244 244
 protocol: "accessing",
245 245
 fn: function (anObject){
246
-var self=this;
247
-self["@valuable"]=anObject;
246
+var self=this,$self=this;
247
+$self["@valuable"]=anObject;
248 248
 return self;
249 249
 
250 250
 },
@@ -262,11 +262,11 @@ $core.method({
262 262
 selector: "value",
263 263
 protocol: "evaluating",
264 264
 fn: function (){
265
-var self=this;
265
+var self=this,$self=this;
266 266
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
267 267
 return $core.withContext(function($ctx1) {
268 268
 //>>excludeEnd("ctx");
269
-return $recv(self._valuable())._value();
269
+return $recv($self._valuable())._value();
270 270
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
271 271
 }, function($ctx1) {$ctx1.fill(self,"value",{},$globals.AnnouncementValuable)});
272 272
 //>>excludeEnd("ctx");
@@ -285,11 +285,11 @@ $core.method({
285 285
 selector: "value:",
286 286
 protocol: "evaluating",
287 287
 fn: function (anObject){
288
-var self=this;
288
+var self=this,$self=this;
289 289
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
290 290
 return $core.withContext(function($ctx1) {
291 291
 //>>excludeEnd("ctx");
292
-return $recv(self._valuable())._value_(anObject);
292
+return $recv($self._valuable())._value_(anObject);
293 293
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
294 294
 }, function($ctx1) {$ctx1.fill(self,"value:",{anObject:anObject},$globals.AnnouncementValuable)});
295 295
 //>>excludeEnd("ctx");
@@ -314,11 +314,11 @@ $core.method({
314 314
 selector: "announce:",
315 315
 protocol: "announcing",
316 316
 fn: function (anAnnouncement){
317
-var self=this;
317
+var self=this,$self=this;
318 318
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
319 319
 return $core.withContext(function($ctx1) {
320 320
 //>>excludeEnd("ctx");
321
-$recv(self["@subscriptions"])._do_((function(each){
321
+$recv($self["@subscriptions"])._do_((function(each){
322 322
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
323 323
 return $core.withContext(function($ctx2) {
324 324
 //>>excludeEnd("ctx");
@@ -346,7 +346,7 @@ $core.method({
346 346
 selector: "initialize",
347 347
 protocol: "initialization",
348 348
 fn: function (){
349
-var self=this;
349
+var self=this,$self=this;
350 350
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
351 351
 return $core.withContext(function($ctx1) {
352 352
 //>>excludeEnd("ctx");
@@ -354,11 +354,11 @@ return $core.withContext(function($ctx1) {
354 354
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
355 355
 $ctx1.supercall = true,
356 356
 //>>excludeEnd("ctx");
357
-($globals.Announcer.superclass||$boot.nilAsClass).fn.prototype._initialize.apply($recv(self), []));
357
+($globals.Announcer.superclass||$boot.nilAsClass).fn.prototype._initialize.apply($self, []));
358 358
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
359 359
 $ctx1.supercall = false;
360 360
 //>>excludeEnd("ctx");;
361
-self["@subscriptions"]=$recv($globals.OrderedCollection)._new();
361
+$self["@subscriptions"]=$recv($globals.OrderedCollection)._new();
362 362
 return self;
363 363
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
364 364
 }, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.Announcer)});
@@ -378,11 +378,11 @@ $core.method({
378 378
 selector: "on:do:",
379 379
 protocol: "subscribing",
380 380
 fn: function (aClass,aBlock){
381
-var self=this;
381
+var self=this,$self=this;
382 382
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
383 383
 return $core.withContext(function($ctx1) {
384 384
 //>>excludeEnd("ctx");
385
-self._on_do_for_(aClass,aBlock,nil);
385
+$self._on_do_for_(aClass,aBlock,nil);
386 386
 return self;
387 387
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
388 388
 }, function($ctx1) {$ctx1.fill(self,"on:do:",{aClass:aClass,aBlock:aBlock},$globals.Announcer)});
@@ -402,12 +402,12 @@ $core.method({
402 402
 selector: "on:do:for:",
403 403
 protocol: "subscribing",
404 404
 fn: function (aClass,aBlock,aReceiver){
405
-var self=this;
405
+var self=this,$self=this;
406 406
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
407 407
 return $core.withContext(function($ctx1) {
408 408
 //>>excludeEnd("ctx");
409 409
 var $1,$3,$5,$6,$4,$2;
410
-$1=self["@subscriptions"];
410
+$1=$self["@subscriptions"];
411 411
 $3=$recv($globals.AnnouncementSubscription)._new();
412 412
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
413 413
 $ctx1.sendIdx["new"]=1;
@@ -446,7 +446,7 @@ $core.method({
446 446
 selector: "on:doOnce:",
447 447
 protocol: "subscribing",
448 448
 fn: function (aClass,aBlock){
449
-var self=this;
449
+var self=this,$self=this;
450 450
 var subscription;
451 451
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
452 452
 return $core.withContext(function($ctx1) {
@@ -459,13 +459,13 @@ $recv(subscription)._valuable_((function(ann){
459 459
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
460 460
 return $core.withContext(function($ctx2) {
461 461
 //>>excludeEnd("ctx");
462
-$recv(self["@subscriptions"])._remove_(subscription);
462
+$recv($self["@subscriptions"])._remove_(subscription);
463 463
 return $recv(aBlock)._value_(ann);
464 464
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
465 465
 }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1,1)});
466 466
 //>>excludeEnd("ctx");
467 467
 }));
468
-$recv(self["@subscriptions"])._add_(subscription);
468
+$recv($self["@subscriptions"])._add_(subscription);
469 469
 return self;
470 470
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
471 471
 }, function($ctx1) {$ctx1.fill(self,"on:doOnce:",{aClass:aClass,aBlock:aBlock,subscription:subscription},$globals.Announcer)});
@@ -485,12 +485,12 @@ $core.method({
485 485
 selector: "on:send:to:",
486 486
 protocol: "subscribing",
487 487
 fn: function (aClass,aSelector,anObject){
488
-var self=this;
488
+var self=this,$self=this;
489 489
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
490 490
 return $core.withContext(function($ctx1) {
491 491
 //>>excludeEnd("ctx");
492 492
 var $1,$3,$5,$6,$4,$2;
493
-$1=self["@subscriptions"];
493
+$1=$self["@subscriptions"];
494 494
 $3=$recv($globals.AnnouncementSubscription)._new();
495 495
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
496 496
 $ctx1.sendIdx["new"]=1;
@@ -526,11 +526,11 @@ $core.method({
526 526
 selector: "unsubscribe:",
527 527
 protocol: "subscribing",
528 528
 fn: function (anObject){
529
-var self=this;
529
+var self=this,$self=this;
530 530
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
531 531
 return $core.withContext(function($ctx1) {
532 532
 //>>excludeEnd("ctx");
533
-self["@subscriptions"]=$recv(self["@subscriptions"])._reject_((function(each){
533
+$self["@subscriptions"]=$recv($self["@subscriptions"])._reject_((function(each){
534 534
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
535 535
 return $core.withContext(function($ctx2) {
536 536
 //>>excludeEnd("ctx");
@@ -566,22 +566,22 @@ $core.method({
566 566
 selector: "current",
567 567
 protocol: "accessing",
568 568
 fn: function (){
569
-var self=this;
569
+var self=this,$self=this;
570 570
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
571 571
 return $core.withContext(function($ctx1) {
572 572
 //>>excludeEnd("ctx");
573 573
 var $1,$receiver;
574
-$1=self["@current"];
574
+$1=$self["@current"];
575 575
 if(($receiver = $1) == null || $receiver.a$nil){
576
-self["@current"]=(
576
+$self["@current"]=(
577 577
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
578 578
 $ctx1.supercall = true,
579 579
 //>>excludeEnd("ctx");
580
-($globals.SystemAnnouncer.a$cls.superclass||$boot.nilAsClass).fn.prototype._new.apply($recv(self), []));
580
+($globals.SystemAnnouncer.a$cls.superclass||$boot.nilAsClass).fn.prototype._new.apply($self, []));
581 581
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
582 582
 $ctx1.supercall = false;
583 583
 //>>excludeEnd("ctx");;
584
-return self["@current"];
584
+return $self["@current"];
585 585
 } else {
586 586
 return $1;
587 587
 }
@@ -603,11 +603,11 @@ $core.method({
603 603
 selector: "new",
604 604
 protocol: "instance creation",
605 605
 fn: function (){
606
-var self=this;
606
+var self=this,$self=this;
607 607
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
608 608
 return $core.withContext(function($ctx1) {
609 609
 //>>excludeEnd("ctx");
610
-self._shouldNotImplement();
610
+$self._shouldNotImplement();
611 611
 return self;
612 612
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
613 613
 }, function($ctx1) {$ctx1.fill(self,"new",{},$globals.SystemAnnouncer.a$cls)});
@@ -633,7 +633,7 @@ $core.method({
633 633
 selector: "classTag",
634 634
 protocol: "accessing",
635 635
 fn: function (){
636
-var self=this;
636
+var self=this,$self=this;
637 637
 return "announcement";
638 638
 
639 639
 },
@@ -656,8 +656,8 @@ $core.method({
656 656
 selector: "theClass",
657 657
 protocol: "accessing",
658 658
 fn: function (){
659
-var self=this;
660
-return self["@theClass"];
659
+var self=this,$self=this;
660
+return $self["@theClass"];
661 661
 
662 662
 },
663 663
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -674,8 +674,8 @@ $core.method({
674 674
 selector: "theClass:",
675 675
 protocol: "accessing",
676 676
 fn: function (aClass){
677
-var self=this;
678
-self["@theClass"]=aClass;
677
+var self=this,$self=this;
678
+$self["@theClass"]=aClass;
679 679
 return self;
680 680
 
681 681
 },
@@ -717,8 +717,8 @@ $core.method({
717 717
 selector: "oldClass",
718 718
 protocol: "accessing",
719 719
 fn: function (){
720
-var self=this;
721
-return self["@oldClass"];
720
+var self=this,$self=this;
721
+return $self["@oldClass"];
722 722
 
723 723
 },
724 724
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -735,8 +735,8 @@ $core.method({
735 735
 selector: "oldClass:",
736 736
 protocol: "accessing",
737 737
 fn: function (aClass){
738
-var self=this;
739
-self["@oldClass"]=aClass;
738
+var self=this,$self=this;
739
+$self["@oldClass"]=aClass;
740 740
 return self;
741 741
 
742 742
 },
@@ -760,8 +760,8 @@ $core.method({
760 760
 selector: "oldPackage",
761 761
 protocol: "accessing",
762 762
 fn: function (){
763
-var self=this;
764
-return self["@oldPackage"];
763
+var self=this,$self=this;
764
+return $self["@oldPackage"];
765 765
 
766 766
 },
767 767
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -778,8 +778,8 @@ $core.method({
778 778
 selector: "oldPackage:",
779 779
 protocol: "accessing",
780 780
 fn: function (aPackage){
781
-var self=this;
782
-self["@oldPackage"]=aPackage;
781
+var self=this,$self=this;
782
+$self["@oldPackage"]=aPackage;
783 783
 return self;
784 784
 
785 785
 },
@@ -815,8 +815,8 @@ $core.method({
815 815
 selector: "method",
816 816
 protocol: "accessing",
817 817
 fn: function (){
818
-var self=this;
819
-return self["@method"];
818
+var self=this,$self=this;
819
+return $self["@method"];
820 820
 
821 821
 },
822 822
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -833,8 +833,8 @@ $core.method({
833 833
 selector: "method:",
834 834
 protocol: "accessing",
835 835
 fn: function (aCompiledMethod){
836
-var self=this;
837
-self["@method"]=aCompiledMethod;
836
+var self=this,$self=this;
837
+$self["@method"]=aCompiledMethod;
838 838
 return self;
839 839
 
840 840
 },
@@ -864,8 +864,8 @@ $core.method({
864 864
 selector: "oldMethod",
865 865
 protocol: "accessing",
866 866
 fn: function (){
867
-var self=this;
868
-return self["@oldMethod"];
867
+var self=this,$self=this;
868
+return $self["@oldMethod"];
869 869
 
870 870
 },
871 871
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -882,8 +882,8 @@ $core.method({
882 882
 selector: "oldMethod:",
883 883
 protocol: "accessing",
884 884
 fn: function (aMethod){
885
-var self=this;
886
-self["@oldMethod"]=aMethod;
885
+var self=this,$self=this;
886
+$self["@oldMethod"]=aMethod;
887 887
 return self;
888 888
 
889 889
 },
@@ -907,8 +907,8 @@ $core.method({
907 907
 selector: "oldProtocol",
908 908
 protocol: "accessing",
909 909
 fn: function (){
910
-var self=this;
911
-return self["@oldProtocol"];
910
+var self=this,$self=this;
911
+return $self["@oldProtocol"];
912 912
 
913 913
 },
914 914
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -925,8 +925,8 @@ $core.method({
925 925
 selector: "oldProtocol:",
926 926
 protocol: "accessing",
927 927
 fn: function (aString){
928
-var self=this;
929
-self["@oldProtocol"]=aString;
928
+var self=this,$self=this;
929
+$self["@oldProtocol"]=aString;
930 930
 return self;
931 931
 
932 932
 },
@@ -956,8 +956,8 @@ $core.method({
956 956
 selector: "package",
957 957
 protocol: "accessing",
958 958
 fn: function (){
959
-var self=this;
960
-return self["@package"];
959
+var self=this,$self=this;
960
+return $self["@package"];
961 961
 
962 962
 },
963 963
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -974,8 +974,8 @@ $core.method({
974 974
 selector: "package:",
975 975
 protocol: "accessing",
976 976
 fn: function (aPackage){
977
-var self=this;
978
-self["@package"]=aPackage;
977
+var self=this,$self=this;
978
+$self["@package"]=aPackage;
979 979
 return self;
980 980
 
981 981
 },
@@ -1023,18 +1023,18 @@ $core.method({
1023 1023
 selector: "package",
1024 1024
 protocol: "accessing",
1025 1025
 fn: function (){
1026
-var self=this;
1026
+var self=this,$self=this;
1027 1027
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
1028 1028
 return $core.withContext(function($ctx1) {
1029 1029
 //>>excludeEnd("ctx");
1030 1030
 var $1,$receiver;
1031
-$1=self._theClass();
1031
+$1=$self._theClass();
1032 1032
 if(($receiver = $1) == null || $receiver.a$nil){
1033 1033
 return $1;
1034 1034
 } else {
1035 1035
 var class_;
1036 1036
 class_=$receiver;
1037
-return $recv(class_)._packageOfProtocol_(self._protocol());
1037
+return $recv(class_)._packageOfProtocol_($self._protocol());
1038 1038
 }
1039 1039
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
1040 1040
 }, function($ctx1) {$ctx1.fill(self,"package",{},$globals.ProtocolAnnouncement)});
@@ -1054,8 +1054,8 @@ $core.method({
1054 1054
 selector: "protocol",
1055 1055
 protocol: "accessing",
1056 1056
 fn: function (){
1057
-var self=this;
1058
-return self["@protocol"];
1057
+var self=this,$self=this;
1058
+return $self["@protocol"];
1059 1059
 
1060 1060
 },
1061 1061
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -1072,8 +1072,8 @@ $core.method({
1072 1072
 selector: "protocol:",
1073 1073
 protocol: "accessing",
1074 1074
 fn: function (aString){
1075
-var self=this;
1076
-self["@protocol"]=aString;
1075
+var self=this,$self=this;
1076
+$self["@protocol"]=aString;
1077 1077
 return self;
1078 1078
 
1079 1079
 },
@@ -1091,8 +1091,8 @@ $core.method({
1091 1091
 selector: "theClass",
1092 1092
 protocol: "accessing",
1093 1093
 fn: function (){
1094
-var self=this;
1095
-return self["@theClass"];
1094
+var self=this,$self=this;
1095
+return $self["@theClass"];
1096 1096
 
1097 1097
 },
1098 1098
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -1109,8 +1109,8 @@ $core.method({
1109 1109
 selector: "theClass:",
1110 1110
 protocol: "accessing",
1111 1111
 fn: function (aClass){
1112
-var self=this;
1113
-self["@theClass"]=aClass;
1112
+var self=this,$self=this;
1113
+$self["@theClass"]=aClass;
1114 1114
 return self;
1115 1115
 
1116 1116
 },

File diff suppressed because it is too large
+ 278 - 278
src/Kernel-Classes.js


File diff suppressed because it is too large
+ 814 - 814
src/Kernel-Collections.js


+ 51 - 51
src/Kernel-Collections.st

@@ -76,11 +76,11 @@ Types of buckets are the responsibility of subclasses via `#newBucket`.!
76 76
 
77 77
 bucketOfElement: anObject
78 78
 	<inlineJS: '
79
-		var hash = self[''@hashBlock''](anObject);
79
+		var hash = $self[''@hashBlock''](anObject);
80 80
 		if (!!hash) return null;
81
-		var buckets = self[''@buckets''],
81
+		var buckets = $self[''@buckets''],
82 82
 			bucket = buckets[hash];
83
-		if (!!bucket) { bucket = buckets[hash] = self._newBucket(); }
83
+		if (!!bucket) { bucket = buckets[hash] = $self._newBucket(); }
84 84
 		return bucket;
85 85
 	'>
86 86
 !
@@ -92,14 +92,14 @@ hashBlock: aBlock
92 92
 !BucketStore methodsFor: 'adding/removing'!
93 93
 
94 94
 removeAll
95
-	<inlineJS: 'self[''@buckets''] = Object.create(null);'>
95
+	<inlineJS: '$self[''@buckets''] = Object.create(null);'>
96 96
 ! !
97 97
 
98 98
 !BucketStore methodsFor: 'enumerating'!
99 99
 
100 100
 do: aBlock
101 101
 	<inlineJS: '
102
-		var buckets = self[''@buckets''];
102
+		var buckets = $self[''@buckets''];
103 103
 		var keys = Object.keys(buckets);
104 104
 		for (var i = 0; i < keys.length; ++i) { buckets[keys[i]]._do_(aBlock); }
105 105
 	'>
@@ -789,21 +789,21 @@ The external name is referred to as the key.!
789 789
 
790 790
 at: aKey ifAbsent: aBlock
791 791
 	<inlineJS: '
792
-		var index = self._positionOfKey_(aKey);
793
-		return index >=0 ? self[''@values''][index] : aBlock._value();
792
+		var index = $self._positionOfKey_(aKey);
793
+		return index >=0 ? $self[''@values''][index] : aBlock._value();
794 794
 	'>
795 795
 !
796 796
 
797 797
 at: aKey put: aValue
798 798
 	<inlineJS: '
799
-		var index = self._positionOfKey_(aKey);
799
+		var index = $self._positionOfKey_(aKey);
800 800
 		if(index === -1) {
801
-			var keys = self[''@keys''];
801
+			var keys = $self[''@keys''];
802 802
 			index = keys.length;
803 803
 			keys.push(aKey);
804 804
 		}
805 805
 
806
-		return self[''@values''][index] = aValue;
806
+		return $self[''@values''][index] = aValue;
807 807
 	'>
808 808
 !
809 809
 
@@ -834,11 +834,11 @@ removeAll
834 834
 
835 835
 removeKey: aKey ifAbsent: aBlock
836 836
 	<inlineJS: '
837
-		var index = self._positionOfKey_(aKey);
837
+		var index = $self._positionOfKey_(aKey);
838 838
 		if(index === -1) {
839 839
 			return aBlock._value()
840 840
 		} else {
841
-			var keys = self[''@keys''], values = self[''@values''];
841
+			var keys = $self[''@keys''], values = $self[''@values''];
842 842
 			var value = values[index], l = keys.length;
843 843
 			keys[index] = keys[l-1];
844 844
 			keys.pop();
@@ -875,7 +875,7 @@ initialize
875 875
 
876 876
 positionOfKey: anObject
877 877
 	<inlineJS: '
878
-		var keys = self[''@keys''];
878
+		var keys = $self[''@keys''];
879 879
 		for(var i=0;i<keys.length;i++){
880 880
 			if(keys[i].__eq(anObject)) { return i;}
881 881
 		}
@@ -886,7 +886,7 @@ positionOfKey: anObject
886 886
 !Dictionary methodsFor: 'testing'!
887 887
 
888 888
 includesKey: aKey
889
-	<inlineJS: 'return self._positionOfKey_(aKey) >= 0;'>
889
+	<inlineJS: 'return $self._positionOfKey_(aKey) >= 0;'>
890 890
 ! !
891 891
 
892 892
 AssociativeCollection subclass: #HashedCollection
@@ -915,8 +915,8 @@ keys
915 915
 
916 916
 values
917 917
 	<inlineJS: '
918
-		return self._keys().map(function(key){
919
-			return self._at_(key);
918
+		return $self._keys().map(function(key){
919
+			return $self._at_(key);
920 920
 		});
921 921
 	'>
922 922
 ! !
@@ -990,9 +990,9 @@ fourth
990 990
 
991 991
 indexOf: anObject ifAbsent: aBlock
992 992
 	<inlineJS: '
993
-		self = self._numericallyIndexable();
994
-		for(var i=0; i < self.length; i++) {
995
-			if($recv(self[i]).__eq(anObject)) {return i+1}
993
+		var nself = $self._numericallyIndexable();
994
+		for(var i=0; i < nself.length; i++) {
995
+			if($recv(nself[i]).__eq(anObject)) {return i+1}
996 996
 		};
997 997
 		return aBlock._value();
998 998
 	'>
@@ -1007,9 +1007,9 @@ indexOf: anObject startingAt: start
1007 1007
 
1008 1008
 indexOf: anObject startingAt: start ifAbsent: aBlock
1009 1009
 	<inlineJS: '
1010
-		self = self._numericallyIndexable();
1011
-		for(var i=start - 1; i < self.length; i++){
1012
-			if($recv(self[i]).__eq(anObject)) {return i+1}
1010
+		var nself = $self._numericallyIndexable();
1011
+		for(var i=start - 1; i < nself.length; i++){
1012
+			if($recv(nself[i]).__eq(anObject)) {return i+1}
1013 1013
 		}
1014 1014
 		return aBlock._value();
1015 1015
 	'>
@@ -1036,7 +1036,7 @@ single
1036 1036
 <inlineJS: '
1037 1037
 	if (self.length == 0) throw new Error("Collection is empty");
1038 1038
 	if (self.length > 1) throw new Error("Collection holds more than one element.");
1039
-	return self[0];
1039
+	return $self._numericallyIndexable()[0];
1040 1040
 '>
1041 1041
 !
1042 1042
 
@@ -1080,19 +1080,19 @@ copyFrom: anIndex to: anotherIndex
1080 1080
 
1081 1081
 detect: aBlock ifNone: anotherBlock
1082 1082
 	<inlineJS: '
1083
-		self = self._numericallyIndexable();
1084
-		for(var i = 0; i < self.length; i++)
1085
-			if(aBlock._value_(self[i]))
1086
-				return self[i];
1083
+		var nself = $self._numericallyIndexable();
1084
+		for(var i = 0; i < nself.length; i++)
1085
+			if(aBlock._value_(nself[i]))
1086
+				return nself[i];
1087 1087
 		return anotherBlock._value();
1088 1088
 	'>
1089 1089
 !
1090 1090
 
1091 1091
 do: aBlock
1092 1092
 	<inlineJS: '
1093
-		self = self._numericallyIndexable();
1094
-		for(var i=0; i < self.length; i++) {
1095
-			aBlock._value_(self[i]);
1093
+		var nself = $self._numericallyIndexable();
1094
+		for(var i=0; i < nself.length; i++) {
1095
+			aBlock._value_(nself[i]);
1096 1096
 		}
1097 1097
 	'>
1098 1098
 !
@@ -1103,19 +1103,19 @@ reverseDo: aBlock
1103 1103
 
1104 1104
 with: anotherCollection do: aBlock
1105 1105
 	<inlineJS: '
1106
-		self = self._numericallyIndexable();
1106
+		var nself = $self._numericallyIndexable();
1107 1107
 		anotherCollection = anotherCollection._numericallyIndexable();
1108
-		for(var i=0; i<self.length; i++) {
1109
-			aBlock._value_value_(self[i], anotherCollection[i]);
1108
+		for(var i=0; i<nself.length; i++) {
1109
+			aBlock._value_value_(nself[i], anotherCollection[i]);
1110 1110
 		}
1111 1111
 	'>
1112 1112
 !
1113 1113
 
1114 1114
 withIndexDo: aBlock
1115 1115
 	<inlineJS: '
1116
-		self = self._numericallyIndexable();
1117
-		for(var i=0; i < self.length; i++) {
1118
-			aBlock._value_value_(self[i], i+1);
1116
+		var nself = $self._numericallyIndexable();
1117
+		for(var i=0; i < nself.length; i++) {
1118
+			aBlock._value_value_(nself[i], i+1);
1119 1119
 		}
1120 1120
 	'>
1121 1121
 ! !
@@ -1236,7 +1236,7 @@ add: anObject
1236 1236
 addAll: aCollection
1237 1237
 <inlineJS: '
1238 1238
 	if (Array.isArray(aCollection) && aCollection.length < 65000) self.push.apply(self, aCollection);
1239
-	else $globals.Array.superclass.fn.prototype._addAll_.call(self, aCollection);
1239
+	else $globals.Array.superclass.fn.prototype._addAll_.call($self, aCollection);
1240 1240
 	return aCollection;
1241 1241
 '>
1242 1242
 !
@@ -1938,14 +1938,14 @@ remove: anObject ifAbsent: aBlock
1938 1938
 
1939 1939
 removeAll
1940 1940
 	<inlineJS: '
1941
-		self[''@fastBuckets''] = {
1941
+		$self[''@fastBuckets''] = {
1942 1942
 			"boolean": { store: Object.create(null), fn: function (x) { return {"true": true, "false": false, "null": null}[x]; } },
1943 1943
 			"number": { store: Object.create(null), fn: Number },
1944 1944
 			"string": { store: Object.create(null) }
1945 1945
 		};
1946
-		self[''@slowBucketStores''].forEach(function (x) { x._removeAll(); });
1947
-		self[''@defaultBucket'']._removeAll();
1948
-		self[''@size''] = 0;
1946
+		$self[''@slowBucketStores''].forEach(function (x) { x._removeAll(); });
1947
+		$self[''@defaultBucket'']._removeAll();
1948
+		$self[''@size''] = 0;
1949 1949
 	'>
1950 1950
 ! !
1951 1951
 
@@ -1975,16 +1975,16 @@ detect: aBlock ifNone: anotherBlock
1975 1975
 do: aBlock
1976 1976
 	<inlineJS: '
1977 1977
 		var el, keys, i;
1978
-		el = self[''@fastBuckets''];
1978
+		el = $self[''@fastBuckets''];
1979 1979
 		keys = Object.keys(el);
1980 1980
 		for (i = 0; i < keys.length; ++i) {
1981 1981
 			var fastBucket = el[keys[i]], fn = fastBucket.fn, store = Object.keys(fastBucket.store);
1982 1982
 			if (fn) { for (var j = 0; j < store.length; ++j) { aBlock._value_(fn(store[j])); } }
1983 1983
 			else { store._do_(aBlock); }
1984 1984
 		}
1985
-		el = self[''@slowBucketStores''];
1985
+		el = $self[''@slowBucketStores''];
1986 1986
 		for (i = 0; i < el.length; ++i) { el[i]._do_(aBlock); }
1987
-		self[''@defaultBucket'']._do_(aBlock);
1987
+		$self[''@defaultBucket'']._do_(aBlock);
1988 1988
 	'>
1989 1989
 !
1990 1990
 
@@ -2041,7 +2041,7 @@ printOn: aStream
2041 2041
 add: anObject in: anotherObject
2042 2042
 	<inlineJS: '
2043 2043
 		if (anObject in anotherObject.store) { return false; }
2044
-		self[''@size'']++;
2044
+		$self[''@size'']++;
2045 2045
 		anotherObject.store[anObject] = true;
2046 2046
 		return anObject;
2047 2047
 	'>
@@ -2056,17 +2056,17 @@ bucketsOfElement: anObject
2056 2056
 	
2057 2057
 	<inlineJS: '
2058 2058
 		// include nil to well-known objects under "boolean" fastBucket
2059
-		if (anObject == null || anObject.a$nil) return [ null, self[''@fastBuckets''].boolean ];
2059
+		if (anObject == null || anObject.a$nil) return [ null, $self[''@fastBuckets''].boolean ];
2060 2060
 		
2061 2061
 		var prim = anObject.valueOf();
2062
-		if (typeof prim === "object" || typeof prim === "function" || !!self[''@fastBuckets''][typeof prim]) {
2062
+		if (typeof prim === "object" || typeof prim === "function" || !!$self[''@fastBuckets''][typeof prim]) {
2063 2063
 			var bucket = null;
2064
-			self[''@slowBucketStores''].some(function (store) {
2064
+			$self[''@slowBucketStores''].some(function (store) {
2065 2065
 				return bucket = store._bucketOfElement_(anObject);
2066 2066
 			});
2067
-			return [ anObject, null, bucket || self[''@defaultBucket''] ];
2067
+			return [ anObject, null, bucket || $self[''@defaultBucket''] ];
2068 2068
 		}
2069
-		return [ prim, self[''@fastBuckets''][typeof prim] ];
2069
+		return [ prim, $self[''@fastBuckets''][typeof prim] ];
2070 2070
 	'>
2071 2071
 !
2072 2072
 
@@ -2086,7 +2086,7 @@ jsConstructorNameOf: anObject
2086 2086
 !
2087 2087
 
2088 2088
 remove: anObject in: anotherObject
2089
-	<inlineJS: 'if (delete anotherObject.store[anObject]) self[''@size'']--'>
2089
+	<inlineJS: 'if (delete anotherObject.store[anObject]) $self[''@size'']--'>
2090 2090
 ! !
2091 2091
 
2092 2092
 !Set methodsFor: 'testing'!

+ 49 - 49
src/Kernel-Dag.js

@@ -15,11 +15,11 @@ $core.method({
15 15
 selector: "value:",
16 16
 protocol: "evaluating",
17 17
 fn: function (anObject){
18
-var self=this;
18
+var self=this,$self=this;
19 19
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
20 20
 return $core.withContext(function($ctx1) {
21 21
 //>>excludeEnd("ctx");
22
-return self._visit_(anObject);
22
+return $self._visit_(anObject);
23 23
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
24 24
 }, function($ctx1) {$ctx1.fill(self,"value:",{anObject:anObject},$globals.AbstractDagVisitor)});
25 25
 //>>excludeEnd("ctx");
@@ -38,7 +38,7 @@ $core.method({
38 38
 selector: "visit:",
39 39
 protocol: "visiting",
40 40
 fn: function (aNode){
41
-var self=this;
41
+var self=this,$self=this;
42 42
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
43 43
 return $core.withContext(function($ctx1) {
44 44
 //>>excludeEnd("ctx");
@@ -61,7 +61,7 @@ $core.method({
61 61
 selector: "visitAll:",
62 62
 protocol: "visiting",
63 63
 fn: function (aCollection){
64
-var self=this;
64
+var self=this,$self=this;
65 65
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
66 66
 return $core.withContext(function($ctx1) {
67 67
 //>>excludeEnd("ctx");
@@ -69,7 +69,7 @@ return $recv(aCollection)._collect_((function(each){
69 69
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
70 70
 return $core.withContext(function($ctx2) {
71 71
 //>>excludeEnd("ctx");
72
-return self._visit_(each);
72
+return $self._visit_(each);
73 73
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
74 74
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
75 75
 //>>excludeEnd("ctx");
@@ -92,11 +92,11 @@ $core.method({
92 92
 selector: "visitAllChildren:",
93 93
 protocol: "visiting",
94 94
 fn: function (aDagNode){
95
-var self=this;
95
+var self=this,$self=this;
96 96
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
97 97
 return $core.withContext(function($ctx1) {
98 98
 //>>excludeEnd("ctx");
99
-return self._visitAll_($recv(aDagNode)._dagChildren());
99
+return $self._visitAll_($recv(aDagNode)._dagChildren());
100 100
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
101 101
 }, function($ctx1) {$ctx1.fill(self,"visitAllChildren:",{aDagNode:aDagNode},$globals.AbstractDagVisitor)});
102 102
 //>>excludeEnd("ctx");
@@ -115,11 +115,11 @@ $core.method({
115 115
 selector: "visitDagNode:",
116 116
 protocol: "visiting",
117 117
 fn: function (aNode){
118
-var self=this;
118
+var self=this,$self=this;
119 119
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
120 120
 return $core.withContext(function($ctx1) {
121 121
 //>>excludeEnd("ctx");
122
-self._subclassResponsibility();
122
+$self._subclassResponsibility();
123 123
 return self;
124 124
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
125 125
 }, function($ctx1) {$ctx1.fill(self,"visitDagNode:",{aNode:aNode},$globals.AbstractDagVisitor)});
@@ -139,7 +139,7 @@ $core.method({
139 139
 selector: "visitDagNodeVariantRedux:",
140 140
 protocol: "visiting",
141 141
 fn: function (aNode){
142
-var self=this;
142
+var self=this,$self=this;
143 143
 var newChildren,oldChildren;
144 144
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
145 145
 return $core.withContext(function($ctx1) {
@@ -148,7 +148,7 @@ var $2,$3,$1,$4,$5;
148 148
 var $early={};
149 149
 try {
150 150
 oldChildren=$recv(aNode)._dagChildren();
151
-newChildren=self._visitAllChildren_(aNode);
151
+newChildren=$self._visitAllChildren_(aNode);
152 152
 $2=$recv(oldChildren)._size();
153 153
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
154 154
 $ctx1.sendIdx["size"]=1;
@@ -199,11 +199,11 @@ $core.method({
199 199
 selector: "visitDagNodeVariantSimple:",
200 200
 protocol: "visiting",
201 201
 fn: function (aNode){
202
-var self=this;
202
+var self=this,$self=this;
203 203
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
204 204
 return $core.withContext(function($ctx1) {
205 205
 //>>excludeEnd("ctx");
206
-self._visitAllChildren_(aNode);
206
+$self._visitAllChildren_(aNode);
207 207
 return aNode;
208 208
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
209 209
 }, function($ctx1) {$ctx1.fill(self,"visitDagNodeVariantSimple:",{aNode:aNode},$globals.AbstractDagVisitor)});
@@ -229,7 +229,7 @@ $core.method({
229 229
 selector: "initialize",
230 230
 protocol: "initialization",
231 231
 fn: function (){
232
-var self=this;
232
+var self=this,$self=this;
233 233
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
234 234
 return $core.withContext(function($ctx1) {
235 235
 //>>excludeEnd("ctx");
@@ -237,11 +237,11 @@ return $core.withContext(function($ctx1) {
237 237
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
238 238
 $ctx1.supercall = true,
239 239
 //>>excludeEnd("ctx");
240
-($globals.PathDagVisitor.superclass||$boot.nilAsClass).fn.prototype._initialize.apply($recv(self), []));
240
+($globals.PathDagVisitor.superclass||$boot.nilAsClass).fn.prototype._initialize.apply($self, []));
241 241
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
242 242
 $ctx1.supercall = false;
243 243
 //>>excludeEnd("ctx");;
244
-self["@path"]=[];
244
+$self["@path"]=[];
245 245
 return self;
246 246
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
247 247
 }, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.PathDagVisitor)});
@@ -261,8 +261,8 @@ $core.method({
261 261
 selector: "path",
262 262
 protocol: "accessing",
263 263
 fn: function (){
264
-var self=this;
265
-return self["@path"];
264
+var self=this,$self=this;
265
+return $self["@path"];
266 266
 
267 267
 },
268 268
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -279,24 +279,24 @@ $core.method({
279 279
 selector: "visit:",
280 280
 protocol: "visiting",
281 281
 fn: function (aNode){
282
-var self=this;
282
+var self=this,$self=this;
283 283
 var oldPath,result;
284 284
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
285 285
 return $core.withContext(function($ctx1) {
286 286
 //>>excludeEnd("ctx");
287 287
 result=aNode;
288
-oldPath=self["@path"];
288
+oldPath=$self["@path"];
289 289
 $recv((function(){
290 290
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
291 291
 return $core.withContext(function($ctx2) {
292 292
 //>>excludeEnd("ctx");
293
-self["@path"]=$recv(self["@path"]).__comma([aNode]);
294
-self["@path"];
293
+$self["@path"]=$recv($self["@path"]).__comma([aNode]);
294
+$self["@path"];
295 295
 result=(
296 296
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
297 297
 $ctx2.supercall = true,
298 298
 //>>excludeEnd("ctx");
299
-($globals.PathDagVisitor.superclass||$boot.nilAsClass).fn.prototype._visit_.apply($recv(self), [aNode]));
299
+($globals.PathDagVisitor.superclass||$boot.nilAsClass).fn.prototype._visit_.apply($self, [aNode]));
300 300
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
301 301
 $ctx2.supercall = false;
302 302
 //>>excludeEnd("ctx");;
@@ -305,8 +305,8 @@ return result;
305 305
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
306 306
 //>>excludeEnd("ctx");
307 307
 }))._ensure_((function(){
308
-self["@path"]=oldPath;
309
-return self["@path"];
308
+$self["@path"]=oldPath;
309
+return $self["@path"];
310 310
 
311 311
 }));
312 312
 return result;
@@ -328,7 +328,7 @@ $core.method({
328 328
 selector: "visitDagNodeVariantRedux:",
329 329
 protocol: "visiting",
330 330
 fn: function (aNode){
331
-var self=this;
331
+var self=this,$self=this;
332 332
 var newNode;
333 333
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
334 334
 return $core.withContext(function($ctx1) {
@@ -338,13 +338,13 @@ newNode=(
338 338
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
339 339
 $ctx1.supercall = true,
340 340
 //>>excludeEnd("ctx");
341
-($globals.PathDagVisitor.superclass||$boot.nilAsClass).fn.prototype._visitDagNodeVariantRedux_.apply($recv(self), [aNode]));
341
+($globals.PathDagVisitor.superclass||$boot.nilAsClass).fn.prototype._visitDagNodeVariantRedux_.apply($self, [aNode]));
342 342
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
343 343
 $ctx1.supercall = false;
344 344
 //>>excludeEnd("ctx");;
345 345
 $1=$recv(aNode).__eq_eq(newNode);
346 346
 if(!$core.assert($1)){
347
-$recv(self["@path"])._at_put_($recv(self["@path"])._size(),newNode);
347
+$recv($self["@path"])._at_put_($recv($self["@path"])._size(),newNode);
348 348
 }
349 349
 return newNode;
350 350
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -371,7 +371,7 @@ $core.method({
371 371
 selector: "acceptDagVisitor:",
372 372
 protocol: "visiting",
373 373
 fn: function (aVisitor){
374
-var self=this;
374
+var self=this,$self=this;
375 375
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
376 376
 return $core.withContext(function($ctx1) {
377 377
 //>>excludeEnd("ctx");
@@ -394,18 +394,18 @@ $core.method({
394 394
 selector: "allDagChildren",
395 395
 protocol: "accessing",
396 396
 fn: function (){
397
-var self=this;
397
+var self=this,$self=this;
398 398
 var allNodes;
399 399
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
400 400
 return $core.withContext(function($ctx1) {
401 401
 //>>excludeEnd("ctx");
402 402
 var $1;
403
-$1=self._dagChildren();
403
+$1=$self._dagChildren();
404 404
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
405 405
 $ctx1.sendIdx["dagChildren"]=1;
406 406
 //>>excludeEnd("ctx");
407 407
 allNodes=$recv($1)._asSet();
408
-$recv(self._dagChildren())._do_((function(each){
408
+$recv($self._dagChildren())._do_((function(each){
409 409
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
410 410
 return $core.withContext(function($ctx2) {
411 411
 //>>excludeEnd("ctx");
@@ -433,11 +433,11 @@ $core.method({
433 433
 selector: "dagChildren",
434 434
 protocol: "accessing",
435 435
 fn: function (){
436
-var self=this;
436
+var self=this,$self=this;
437 437
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
438 438
 return $core.withContext(function($ctx1) {
439 439
 //>>excludeEnd("ctx");
440
-self._subclassResponsibility();
440
+$self._subclassResponsibility();
441 441
 return self;
442 442
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
443 443
 }, function($ctx1) {$ctx1.fill(self,"dagChildren",{},$globals.DagNode)});
@@ -457,11 +457,11 @@ $core.method({
457 457
 selector: "dagChildren:",
458 458
 protocol: "accessing",
459 459
 fn: function (aCollection){
460
-var self=this;
460
+var self=this,$self=this;
461 461
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
462 462
 return $core.withContext(function($ctx1) {
463 463
 //>>excludeEnd("ctx");
464
-self._subclassResponsibility();
464
+$self._subclassResponsibility();
465 465
 return self;
466 466
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
467 467
 }, function($ctx1) {$ctx1.fill(self,"dagChildren:",{aCollection:aCollection},$globals.DagNode)});
@@ -481,7 +481,7 @@ $core.method({
481 481
 selector: "isDagNode",
482 482
 protocol: "testing",
483 483
 fn: function (){
484
-var self=this;
484
+var self=this,$self=this;
485 485
 return true;
486 486
 
487 487
 },
@@ -505,11 +505,11 @@ $core.method({
505 505
 selector: "addDagChild:",
506 506
 protocol: "accessing",
507 507
 fn: function (aDagNode){
508
-var self=this;
508
+var self=this,$self=this;
509 509
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
510 510
 return $core.withContext(function($ctx1) {
511 511
 //>>excludeEnd("ctx");
512
-$recv(self._dagChildren())._add_(aDagNode);
512
+$recv($self._dagChildren())._add_(aDagNode);
513 513
 return self;
514 514
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
515 515
 }, function($ctx1) {$ctx1.fill(self,"addDagChild:",{aDagNode:aDagNode},$globals.DagParentNode)});
@@ -529,15 +529,15 @@ $core.method({
529 529
 selector: "dagChildren",
530 530
 protocol: "accessing",
531 531
 fn: function (){
532
-var self=this;
532
+var self=this,$self=this;
533 533
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
534 534
 return $core.withContext(function($ctx1) {
535 535
 //>>excludeEnd("ctx");
536 536
 var $1,$receiver;
537
-$1=self["@nodes"];
537
+$1=$self["@nodes"];
538 538
 if(($receiver = $1) == null || $receiver.a$nil){
539
-self["@nodes"]=$recv($globals.Array)._new();
540
-return self["@nodes"];
539
+$self["@nodes"]=$recv($globals.Array)._new();
540
+return $self["@nodes"];
541 541
 } else {
542 542
 return $1;
543 543
 }
@@ -559,8 +559,8 @@ $core.method({
559 559
 selector: "dagChildren:",
560 560
 protocol: "accessing",
561 561
 fn: function (aCollection){
562
-var self=this;
563
-self["@nodes"]=aCollection;
562
+var self=this,$self=this;
563
+$self["@nodes"]=aCollection;
564 564
 return self;
565 565
 
566 566
 },
@@ -584,7 +584,7 @@ $core.method({
584 584
 selector: "dagChildren",
585 585
 protocol: "accessing",
586 586
 fn: function (){
587
-var self=this;
587
+var self=this,$self=this;
588 588
 return [];
589 589
 
590 590
 },
@@ -602,7 +602,7 @@ $core.method({
602 602
 selector: "dagChildren:",
603 603
 protocol: "accessing",
604 604
 fn: function (aCollection){
605
-var self=this;
605
+var self=this,$self=this;
606 606
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
607 607
 return $core.withContext(function($ctx1) {
608 608
 //>>excludeEnd("ctx");
@@ -610,7 +610,7 @@ $recv(aCollection)._ifNotEmpty_((function(){
610 610
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
611 611
 return $core.withContext(function($ctx2) {
612 612
 //>>excludeEnd("ctx");
613
-return self._error_("A DagSink cannot have children.");
613
+return $self._error_("A DagSink cannot have children.");
614 614
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
615 615
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
616 616
 //>>excludeEnd("ctx");
@@ -635,7 +635,7 @@ $core.method({
635 635
 selector: "isDagNode",
636 636
 protocol: "*Kernel-Dag",
637 637
 fn: function (){
638
-var self=this;
638
+var self=this,$self=this;
639 639
 return false;
640 640
 
641 641
 },

+ 55 - 55
src/Kernel-Exceptions.js

@@ -15,7 +15,7 @@ $core.method({
15 15
 selector: "beHandled",
16 16
 protocol: "accessing",
17 17
 fn: function (){
18
-var self=this;
18
+var self=this,$self=this;
19 19
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
20 20
 return $core.withContext(function($ctx1) {
21 21
 //>>excludeEnd("ctx");
@@ -39,7 +39,7 @@ $core.method({
39 39
 selector: "beUnhandled",
40 40
 protocol: "accessing",
41 41
 fn: function (){
42
-var self=this;
42
+var self=this,$self=this;
43 43
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
44 44
 return $core.withContext(function($ctx1) {
45 45
 //>>excludeEnd("ctx");
@@ -63,7 +63,7 @@ $core.method({
63 63
 selector: "context",
64 64
 protocol: "accessing",
65 65
 fn: function (){
66
-var self=this;
66
+var self=this,$self=this;
67 67
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
68 68
 return $core.withContext(function($ctx1) {
69 69
 //>>excludeEnd("ctx");
@@ -87,11 +87,11 @@ $core.method({
87 87
 selector: "initialize",
88 88
 protocol: "initialization",
89 89
 fn: function (){
90
-var self=this;
90
+var self=this,$self=this;
91 91
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
92 92
 return $core.withContext(function($ctx1) {
93 93
 //>>excludeEnd("ctx");
94
-self._messageText_("Errorclass: ".__comma($recv(self._class())._name()));
94
+$self._messageText_("Errorclass: ".__comma($recv($self._class())._name()));
95 95
 return self;
96 96
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
97 97
 }, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.Error)});
@@ -111,7 +111,7 @@ $core.method({
111 111
 selector: "isSmalltalkError",
112 112
 protocol: "testing",
113 113
 fn: function (){
114
-var self=this;
114
+var self=this,$self=this;
115 115
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
116 116
 return $core.withContext(function($ctx1) {
117 117
 //>>excludeEnd("ctx");
@@ -135,7 +135,7 @@ $core.method({
135 135
 selector: "jsStack",
136 136
 protocol: "accessing",
137 137
 fn: function (){
138
-var self=this;
138
+var self=this,$self=this;
139 139
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
140 140
 return $core.withContext(function($ctx1) {
141 141
 //>>excludeEnd("ctx");
@@ -159,8 +159,8 @@ $core.method({
159 159
 selector: "messageText",
160 160
 protocol: "accessing",
161 161
 fn: function (){
162
-var self=this;
163
-return self["@messageText"];
162
+var self=this,$self=this;
163
+return $self["@messageText"];
164 164
 
165 165
 },
166 166
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -177,8 +177,8 @@ $core.method({
177 177
 selector: "messageText:",
178 178
 protocol: "accessing",
179 179
 fn: function (aString){
180
-var self=this;
181
-self["@messageText"]=aString;
180
+var self=this,$self=this;
181
+$self["@messageText"]=aString;
182 182
 return self;
183 183
 
184 184
 },
@@ -196,7 +196,7 @@ $core.method({
196 196
 selector: "resignal",
197 197
 protocol: "signaling",
198 198
 fn: function (){
199
-var self=this;
199
+var self=this,$self=this;
200 200
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
201 201
 return $core.withContext(function($ctx1) {
202 202
 //>>excludeEnd("ctx");
@@ -223,7 +223,7 @@ $core.method({
223 223
 selector: "signal",
224 224
 protocol: "signaling",
225 225
 fn: function (){
226
-var self=this;
226
+var self=this,$self=this;
227 227
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
228 228
 return $core.withContext(function($ctx1) {
229 229
 //>>excludeEnd("ctx");
@@ -252,12 +252,12 @@ $core.method({
252 252
 selector: "signal:",
253 253
 protocol: "signaling",
254 254
 fn: function (aString){
255
-var self=this;
255
+var self=this,$self=this;
256 256
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
257 257
 return $core.withContext(function($ctx1) {
258 258
 //>>excludeEnd("ctx");
259
-self._messageText_(aString);
260
-self._signal();
259
+$self._messageText_(aString);
260
+$self._signal();
261 261
 return self;
262 262
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
263 263
 }, function($ctx1) {$ctx1.fill(self,"signal:",{aString:aString},$globals.Error)});
@@ -277,11 +277,11 @@ $core.method({
277 277
 selector: "signalerContext",
278 278
 protocol: "accessing",
279 279
 fn: function (){
280
-var self=this;
280
+var self=this,$self=this;
281 281
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
282 282
 return $core.withContext(function($ctx1) {
283 283
 //>>excludeEnd("ctx");
284
-return self._signalerContextFrom_(self._context());
284
+return $self._signalerContextFrom_($self._context());
285 285
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
286 286
 }, function($ctx1) {$ctx1.fill(self,"signalerContext",{},$globals.Error)});
287 287
 //>>excludeEnd("ctx");
@@ -300,7 +300,7 @@ $core.method({
300 300
 selector: "signalerContextFrom:",
301 301
 protocol: "accessing",
302 302
 fn: function (aContext){
303
-var self=this;
303
+var self=this,$self=this;
304 304
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
305 305
 return $core.withContext(function($ctx1) {
306 306
 //>>excludeEnd("ctx");
@@ -321,7 +321,7 @@ $1=$recv($2)._or_((function(){
321 321
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
322 322
 return $core.withContext(function($ctx3) {
323 323
 //>>excludeEnd("ctx");
324
-return $recv($recv(context)._receiver()).__eq_eq(self._class());
324
+return $recv($recv(context)._receiver()).__eq_eq($self._class());
325 325
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
326 326
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
327 327
 //>>excludeEnd("ctx");
@@ -349,7 +349,7 @@ $core.method({
349 349
 selector: "wasHandled",
350 350
 protocol: "testing",
351 351
 fn: function (){
352
-var self=this;
352
+var self=this,$self=this;
353 353
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
354 354
 return $core.withContext(function($ctx1) {
355 355
 //>>excludeEnd("ctx");
@@ -374,7 +374,7 @@ $core.method({
374 374
 selector: "classTag",
375 375
 protocol: "accessing",
376 376
 fn: function (){
377
-var self=this;
377
+var self=this,$self=this;
378 378
 return "exception";
379 379
 
380 380
 },
@@ -392,11 +392,11 @@ $core.method({
392 392
 selector: "signal",
393 393
 protocol: "instance creation",
394 394
 fn: function (){
395
-var self=this;
395
+var self=this,$self=this;
396 396
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
397 397
 return $core.withContext(function($ctx1) {
398 398
 //>>excludeEnd("ctx");
399
-return $recv(self._new())._signal();
399
+return $recv($self._new())._signal();
400 400
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
401 401
 }, function($ctx1) {$ctx1.fill(self,"signal",{},$globals.Error.a$cls)});
402 402
 //>>excludeEnd("ctx");
@@ -415,11 +415,11 @@ $core.method({
415 415
 selector: "signal:",
416 416
 protocol: "instance creation",
417 417
 fn: function (aString){
418
-var self=this;
418
+var self=this,$self=this;
419 419
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
420 420
 return $core.withContext(function($ctx1) {
421 421
 //>>excludeEnd("ctx");
422
-return $recv(self._new())._signal_(aString);
422
+return $recv($self._new())._signal_(aString);
423 423
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
424 424
 }, function($ctx1) {$ctx1.fill(self,"signal:",{aString:aString},$globals.Error.a$cls)});
425 425
 //>>excludeEnd("ctx");
@@ -443,7 +443,7 @@ $core.method({
443 443
 selector: "messageText",
444 444
 protocol: "accessing",
445 445
 fn: function (){
446
-var self=this;
446
+var self=this,$self=this;
447 447
 return "Halt encountered";
448 448
 
449 449
 },
@@ -461,7 +461,7 @@ $core.method({
461 461
 selector: "signalerContextFrom:",
462 462
 protocol: "accessing",
463 463
 fn: function (aContext){
464
-var self=this;
464
+var self=this,$self=this;
465 465
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
466 466
 return $core.withContext(function($ctx1) {
467 467
 //>>excludeEnd("ctx");
@@ -482,7 +482,7 @@ $1=$recv($2)._or_((function(){
482 482
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
483 483
 return $core.withContext(function($ctx3) {
484 484
 //>>excludeEnd("ctx");
485
-return $recv($recv($recv(context)._receiver()).__eq_eq(self._class()))._or_((function(){
485
+return $recv($recv($recv(context)._receiver()).__eq_eq($self._class()))._or_((function(){
486 486
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
487 487
 return $core.withContext(function($ctx4) {
488 488
 //>>excludeEnd("ctx");
@@ -527,7 +527,7 @@ $core.method({
527 527
 selector: "context:",
528 528
 protocol: "accessing",
529 529
 fn: function (aMethodContext){
530
-var self=this;
530
+var self=this,$self=this;
531 531
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
532 532
 return $core.withContext(function($ctx1) {
533 533
 //>>excludeEnd("ctx");
@@ -551,8 +551,8 @@ $core.method({
551 551
 selector: "exception",
552 552
 protocol: "accessing",
553 553
 fn: function (){
554
-var self=this;
555
-return self["@exception"];
554
+var self=this,$self=this;
555
+return $self["@exception"];
556 556
 
557 557
 },
558 558
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -569,8 +569,8 @@ $core.method({
569 569
 selector: "exception:",
570 570
 protocol: "accessing",
571 571
 fn: function (anException){
572
-var self=this;
573
-self["@exception"]=anException;
572
+var self=this,$self=this;
573
+$self["@exception"]=anException;
574 574
 return self;
575 575
 
576 576
 },
@@ -588,11 +588,11 @@ $core.method({
588 588
 selector: "messageText",
589 589
 protocol: "accessing",
590 590
 fn: function (){
591
-var self=this;
591
+var self=this,$self=this;
592 592
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
593 593
 return $core.withContext(function($ctx1) {
594 594
 //>>excludeEnd("ctx");
595
-return "JavaScript exception: " + self["@exception"].toString();
595
+return "JavaScript exception: " + $self["@exception"].toString();
596 596
 return self;
597 597
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
598 598
 }, function($ctx1) {$ctx1.fill(self,"messageText",{},$globals.JavaScriptException)});
@@ -600,7 +600,7 @@ return self;
600 600
 },
601 601
 //>>excludeStart("ide", pragmas.excludeIdeData);
602 602
 args: [],
603
-source: "messageText\x0a\x09<inlineJS: 'return \x22JavaScript exception: \x22 + self[\x22@exception\x22].toString()'>",
603
+source: "messageText\x0a\x09<inlineJS: 'return \x22JavaScript exception: \x22 + $self[\x22@exception\x22].toString()'>",
604 604
 referencedClasses: [],
605 605
 //>>excludeEnd("ide");
606 606
 messageSends: []
@@ -613,12 +613,12 @@ $core.method({
613 613
 selector: "on:",
614 614
 protocol: "instance creation",
615 615
 fn: function (anException){
616
-var self=this;
616
+var self=this,$self=this;
617 617
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
618 618
 return $core.withContext(function($ctx1) {
619 619
 //>>excludeEnd("ctx");
620 620
 var $1;
621
-$1=self._new();
621
+$1=$self._new();
622 622
 $recv($1)._exception_(anException);
623 623
 return $recv($1)._yourself();
624 624
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -639,12 +639,12 @@ $core.method({
639 639
 selector: "on:context:",
640 640
 protocol: "instance creation",
641 641
 fn: function (anException,aMethodContext){
642
-var self=this;
642
+var self=this,$self=this;
643 643
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
644 644
 return $core.withContext(function($ctx1) {
645 645
 //>>excludeEnd("ctx");
646 646
 var $1;
647
-$1=self._new();
647
+$1=$self._new();
648 648
 $recv($1)._exception_(anException);
649 649
 $recv($1)._context_(aMethodContext);
650 650
 return $recv($1)._yourself();
@@ -671,8 +671,8 @@ $core.method({
671 671
 selector: "message",
672 672
 protocol: "accessing",
673 673
 fn: function (){
674
-var self=this;
675
-return self["@message"];
674
+var self=this,$self=this;
675
+return $self["@message"];
676 676
 
677 677
 },
678 678
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -689,8 +689,8 @@ $core.method({
689 689
 selector: "message:",
690 690
 protocol: "accessing",
691 691
 fn: function (aMessage){
692
-var self=this;
693
-self["@message"]=aMessage;
692
+var self=this,$self=this;
693
+$self["@message"]=aMessage;
694 694
 return self;
695 695
 
696 696
 },
@@ -708,12 +708,12 @@ $core.method({
708 708
 selector: "messageText",
709 709
 protocol: "accessing",
710 710
 fn: function (){
711
-var self=this;
711
+var self=this,$self=this;
712 712
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
713 713
 return $core.withContext(function($ctx1) {
714 714
 //>>excludeEnd("ctx");
715 715
 var $1;
716
-$1=$recv($recv($recv(self._receiver())._asString()).__comma(" does not understand #")).__comma($recv(self._message())._selector());
716
+$1=$recv($recv($recv($self._receiver())._asString()).__comma(" does not understand #")).__comma($recv($self._message())._selector());
717 717
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
718 718
 $ctx1.sendIdx[","]=1;
719 719
 //>>excludeEnd("ctx");
@@ -736,8 +736,8 @@ $core.method({
736 736
 selector: "receiver",
737 737
 protocol: "accessing",
738 738
 fn: function (){
739
-var self=this;
740
-return self["@receiver"];
739
+var self=this,$self=this;
740
+return $self["@receiver"];
741 741
 
742 742
 },
743 743
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -754,8 +754,8 @@ $core.method({
754 754
 selector: "receiver:",
755 755
 protocol: "accessing",
756 756
 fn: function (anObject){
757
-var self=this;
758
-self["@receiver"]=anObject;
757
+var self=this,$self=this;
758
+$self["@receiver"]=anObject;
759 759
 return self;
760 760
 
761 761
 },
@@ -779,8 +779,8 @@ $core.method({
779 779
 selector: "object",
780 780
 protocol: "accessing",
781 781
 fn: function (){
782
-var self=this;
783
-return self["@object"];
782
+var self=this,$self=this;
783
+return $self["@object"];
784 784
 
785 785
 },
786 786
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -797,8 +797,8 @@ $core.method({
797 797
 selector: "object:",
798 798
 protocol: "accessing",
799 799
 fn: function (anObject){
800
-var self=this;
801
-self["@object"]=anObject;
800
+var self=this,$self=this;
801
+$self["@object"]=anObject;
802 802
 return self;
803 803
 
804 804
 },

+ 1 - 1
src/Kernel-Exceptions.st

@@ -161,7 +161,7 @@ exception: anException
161 161
 !
162 162
 
163 163
 messageText
164
-	<inlineJS: 'return "JavaScript exception: " + self["@exception"].toString()'>
164
+	<inlineJS: 'return "JavaScript exception: " + $self["@exception"].toString()'>
165 165
 ! !
166 166
 
167 167
 !JavaScriptException class methodsFor: 'instance creation'!

+ 19 - 19
src/Kernel-Helpers.js

@@ -12,11 +12,11 @@ $core.method({
12 12
 selector: "subclass:",
13 13
 protocol: "class creation",
14 14
 fn: function (aString){
15
-var self=this;
15
+var self=this,$self=this;
16 16
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
17 17
 return $core.withContext(function($ctx1) {
18 18
 //>>excludeEnd("ctx");
19
-return self._subclass_instanceVariableNames_package_(aString,"",nil);
19
+return $self._subclass_instanceVariableNames_package_(aString,"",nil);
20 20
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
21 21
 }, function($ctx1) {$ctx1.fill(self,"subclass:",{aString:aString},$globals.TSubclassable)});
22 22
 //>>excludeEnd("ctx");
@@ -35,11 +35,11 @@ $core.method({
35 35
 selector: "subclass:instanceVariableNames:",
36 36
 protocol: "class creation",
37 37
 fn: function (aString,anotherString){
38
-var self=this;
38
+var self=this,$self=this;
39 39
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
40 40
 return $core.withContext(function($ctx1) {
41 41
 //>>excludeEnd("ctx");
42
-return self._subclass_instanceVariableNames_package_(aString,anotherString,nil);
42
+return $self._subclass_instanceVariableNames_package_(aString,anotherString,nil);
43 43
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
44 44
 }, function($ctx1) {$ctx1.fill(self,"subclass:instanceVariableNames:",{aString:aString,anotherString:anotherString},$globals.TSubclassable)});
45 45
 //>>excludeEnd("ctx");
@@ -58,11 +58,11 @@ $core.method({
58 58
 selector: "subclass:instanceVariableNames:category:",
59 59
 protocol: "class creation",
60 60
 fn: function (aString,aString2,aString3){
61
-var self=this;
61
+var self=this,$self=this;
62 62
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
63 63
 return $core.withContext(function($ctx1) {
64 64
 //>>excludeEnd("ctx");
65
-return self._subclass_instanceVariableNames_package_(aString,aString2,aString3);
65
+return $self._subclass_instanceVariableNames_package_(aString,aString2,aString3);
66 66
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
67 67
 }, function($ctx1) {$ctx1.fill(self,"subclass:instanceVariableNames:category:",{aString:aString,aString2:aString2,aString3:aString3},$globals.TSubclassable)});
68 68
 //>>excludeEnd("ctx");
@@ -81,11 +81,11 @@ $core.method({
81 81
 selector: "subclass:instanceVariableNames:classVariableNames:poolDictionaries:category:",
82 82
 protocol: "class creation",
83 83
 fn: function (aString,aString2,classVars,pools,aString3){
84
-var self=this;
84
+var self=this,$self=this;
85 85
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
86 86
 return $core.withContext(function($ctx1) {
87 87
 //>>excludeEnd("ctx");
88
-return self._subclass_instanceVariableNames_package_(aString,aString2,aString3);
88
+return $self._subclass_instanceVariableNames_package_(aString,aString2,aString3);
89 89
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
90 90
 }, function($ctx1) {$ctx1.fill(self,"subclass:instanceVariableNames:classVariableNames:poolDictionaries:category:",{aString:aString,aString2:aString2,classVars:classVars,pools:pools,aString3:aString3},$globals.TSubclassable)});
91 91
 //>>excludeEnd("ctx");
@@ -104,7 +104,7 @@ $core.method({