| Index: tests/compiler/dart2js/closure/data/nested_closures.dart
|
| diff --git a/tests/compiler/dart2js/closure/data/nested_closures.dart b/tests/compiler/dart2js/closure/data/nested_closures.dart
|
| index 37e4e8d22c31650eb8166d08d5ae2223b51e819a..4ba90f5bac2485cf4946018182a0b0cea1029fa0 100644
|
| --- a/tests/compiler/dart2js/closure/data/nested_closures.dart
|
| +++ b/tests/compiler/dart2js/closure/data/nested_closures.dart
|
| @@ -2,7 +2,35 @@
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
| -/*test:box=box0,boxed=[b1,b2,b3]*/ test(c1, /*boxed*/ b1) {
|
| +/// Test boxing/captures for nested closures.
|
| +
|
| +/*useOne:box=box0,boxed=[b1]*/ useOne(/*boxed*/ b1) {
|
| + /*box=box1,boxed=[b2],free=[b1,box0]*/ () {
|
| + var /*boxed*/ b2 = (b1 = 1);
|
| +
|
| + /*free=[b2,box1]*/ () {
|
| + return (b2 = 2);
|
| + };
|
| +
|
| + return b2;
|
| + };
|
| + return b1;
|
| +}
|
| +
|
| +/*useBoth:box=box0,boxed=[b1]*/ useBoth(/*boxed*/ b1) {
|
| + /*box=box1,boxed=[b2],free=[b1,box0]*/ () {
|
| + var /*boxed*/ b2 = (b1 = 1);
|
| +
|
| + /*free=[b1,b2,box0,box1]*/ () {
|
| + return b1 + (b2 = 2);
|
| + };
|
| +
|
| + return b2;
|
| + };
|
| + return b1;
|
| +}
|
| +
|
| +/*useMany:box=box0,boxed=[b1,b2,b3]*/ useMany(c1, /*boxed*/ b1) {
|
| var /*boxed*/ b2 = 2;
|
| var /*boxed*/ b3 = 3;
|
| var c2 = 2;
|
| @@ -21,5 +49,7 @@
|
| }
|
|
|
| main() {
|
| - test(1, 2);
|
| + useOne(1);
|
| + useBoth(1);
|
| + useMany(1, 2);
|
| }
|
|
|