File tree 4 files changed +7
-5
lines changed
test/codegen/expect/server_mode
4 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ var core;
7
7
var init = this [ name ] ;
8
8
var result = void 0 ;
9
9
if ( init )
10
- result = init . apply ( this , arguments$ ) ;
10
+ result = init . apply ( this , arguments ) ;
11
11
return result === void 0 ? this : result ;
12
12
}
13
13
[ '==' ] ( other ) {
Original file line number Diff line number Diff line change @@ -616,15 +616,17 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ConversionVisitor {
616
616
// settles. See <https://github.com/dart-lang/dev_compiler/issues/51>.
617
617
// Performance of this pattern is likely to be bad.
618
618
name = 'constructor' ;
619
+ // Mark the parameter as no-rename.
620
+ var args = new JS .Identifier ('arguments' , allowRename: false );
619
621
body = js.statement ('''{
620
622
// Get the class name for this instance.
621
623
var name = this.constructor.name;
622
624
// Call the default constructor.
623
625
var init = this[name];
624
626
var result = void 0;
625
- if (init) result = init.apply(this, arguments );
627
+ if (init) result = init.apply(this, # );
626
628
return result === void 0 ? this : result;
627
- }''' );
629
+ }''' , args );
628
630
} else {
629
631
body = _emitConstructorBody (node, fields);
630
632
}
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ class JSNamer extends LocalNamer {
40
40
var name = node.name;
41
41
if (node is JSTemporary ) {
42
42
return _rename (name, valid: true );
43
- } else if (invalidJSVariableName (name)) {
43
+ } else if (node.allowRename && invalidJSVariableName (name)) {
44
44
return _rename (name, valid: false );
45
45
}
46
46
return name;
Original file line number Diff line number Diff line change 1
1
< html > < head > </ head > < body >
2
2
< script src ="cached/c947f9f732203b97dd2882e63da78dbe/dev_compiler/runtime/harmony_feature_check.js "> </ script >
3
3
< script src ="cached/1e28faa1c245886eee30f7f61662b59a/dev_compiler/runtime/dart_runtime.js "> </ script >
4
- < script src ="cached/abad3421955ac52797f6445330bc291a /dev_compiler/runtime/dart/core.js "> </ script >
4
+ < script src ="cached/5a67eb20221232fcf6763601b852c520 /dev_compiler/runtime/dart/core.js "> </ script >
5
5
< script src ="cached/698a3052a4b95f9f1f6e7259c2a6f005/dev_compiler/runtime/dart/collection.js "> </ script >
6
6
< script src ="cached/2be62665885412f7ff01a6f7b0825ebd/dev_compiler/runtime/dart/math.js "> </ script >
7
7
< script src ="cached/c36af93826f645c97ae65b44badd998b/dev_compiler/runtime/messages_widget.js "> </ script >
You can’t perform that action at this time.
0 commit comments