Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(637)

Side by Side Diff: tests/compiler/dart2js/js_backend_cps_ir_constructor_test.dart

Issue 1428853004: Use better names for captured variables in closures. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address comments Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tests/compiler/dart2js/js_backend_cps_ir_closures_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // Tests of interceptors. 5 // Tests of interceptors.
6 6
7 library constructor_test; 7 library constructor_test;
8 8
9 import 'js_backend_cps_ir.dart'; 9 import 'js_backend_cps_ir.dart';
10 10
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 Sub(x, this.y) : super(x) { 89 Sub(x, this.y) : super(x) {
90 print(x); 90 print(x);
91 } 91 }
92 } 92 }
93 main() { 93 main() {
94 print(new Sub(1, 2).x); 94 print(new Sub(1, 2).x);
95 }""", 95 }""",
96 r""" 96 r"""
97 function(x, y) { 97 function(x, y) {
98 var _box_0 = {}, v0 = new V.Sub(y, new V.Base_closure(_box_0)); 98 var _box_0 = {}, v0 = new V.Sub(y, new V.Base_closure(_box_0));
99 _box_0._captured_x1_0 = x; 99 _box_0.x1 = x;
100 v0.Base0$0(); 100 v0.Base0$0();
101 v0.Base$1(_box_0); 101 v0.Base$1(_box_0);
102 v0.Sub$2(x, y); 102 v0.Sub$2(x, y);
103 return v0; 103 return v0;
104 }"""), 104 }"""),
105 105
106 const TestEntry.forMethod('generative_constructor(Sub#)', """ 106 const TestEntry.forMethod('generative_constructor(Sub#)', """
107 foo(x) { 107 foo(x) {
108 print(x); 108 print(x);
109 } 109 }
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 new A(5).typevar; 259 new A(5).typevar;
260 }""", r""" 260 }""", r"""
261 function() { 261 function() {
262 V.B$(5, P.$int).get$typevar(); 262 V.B$(5, P.$int).get$typevar();
263 }"""), 263 }"""),
264 ]; 264 ];
265 265
266 void main() { 266 void main() {
267 runTests(tests); 267 runTests(tests);
268 } 268 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/js_backend_cps_ir_closures_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698