| Index: tests/compiler/dart2js_extra/is_check_instanceof_test.dart
|
| diff --git a/tests/compiler/dart2js_extra/is_check_instanceof_test.dart b/tests/compiler/dart2js_extra/is_check_instanceof_test.dart
|
| index 024d538f21eb679ade324a1c606674d966041bb3..7e9c8a4a85f59e3881473ef99d00a869c3a56e25 100644
|
| --- a/tests/compiler/dart2js_extra/is_check_instanceof_test.dart
|
| +++ b/tests/compiler/dart2js_extra/is_check_instanceof_test.dart
|
| @@ -10,13 +10,19 @@ import "package:expect/expect.dart";
|
| // This test verifies is-checks work with simple classes that have various
|
| // degrees of instantiation.
|
|
|
| -class INSTANTIATED {} // instantiated and used in many ways
|
| -class DEFERRED {} // instantiated after first check
|
| -class UNUSED {} // used only in is-check
|
| -class REMOVED {} // allocated but optimized out of program
|
| -class DEFERRED_AND_REMOVED {} // allocated after first check and removed
|
| -class USED_AS_TYPE_PARAMETER {} // only used as a type parameter
|
| -class USED_AS_TESTED_TYPE_PARAMETER {} // only used as a type parameter
|
| +class INSTANTIATED {} // instantiated and used in many ways
|
| +
|
| +class DEFERRED {} // instantiated after first check
|
| +
|
| +class UNUSED {} // used only in is-check
|
| +
|
| +class REMOVED {} // allocated but optimized out of program
|
| +
|
| +class DEFERRED_AND_REMOVED {} // allocated after first check and removed
|
| +
|
| +class USED_AS_TYPE_PARAMETER {} // only used as a type parameter
|
| +
|
| +class USED_AS_TESTED_TYPE_PARAMETER {} // only used as a type parameter
|
|
|
| class Check<T> {
|
| bool check(x) => x is T;
|
| @@ -34,7 +40,7 @@ void main() {
|
| var checkU1 = new Check<USED_AS_TESTED_TYPE_PARAMETER>();
|
| var checkU2 = new Check<USED_AS_TYPE_PARAMETER>();
|
|
|
| - var removed = new REMOVED(); // This is optimized out.
|
| + var removed = new REMOVED(); // This is optimized out.
|
|
|
| // Tests that can be compiled to instanceof:
|
| Expect.isTrue(things[0] is INSTANTIATED);
|
| @@ -51,7 +57,7 @@ void main() {
|
| Expect.isFalse(checkU1.check(things[1]));
|
| Expect.isFalse(checkU2.check(things[1]));
|
|
|
| - var removed2 = new DEFERRED_AND_REMOVED(); // This is optimized out.
|
| + var removed2 = new DEFERRED_AND_REMOVED(); // This is optimized out.
|
|
|
| // First allocation of DEFERRED is after the above tests.
|
| things.setRange(0, 3, [new INSTANTIATED(), 1, new DEFERRED()]);
|
|
|