| OLD | NEW |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 // Partial test that the closed world computed from [WorldImpact]s derived from | 5 // Partial test that the closed world computed from [WorldImpact]s derived from |
| 6 // kernel is equivalent to the original computed from resolution. | 6 // kernel is equivalent to the original computed from resolution. |
| 7 library dart2js.kernel.closed_world2_test; | 7 library dart2js.kernel.closed_world2_test; |
| 8 | 8 |
| 9 import 'package:async_helper/async_helper.dart'; | 9 import 'package:async_helper/async_helper.dart'; |
| 10 import 'package:compiler/src/closure.dart'; | 10 import 'package:compiler/src/closure.dart'; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 import '../serialization/model_test_helper.dart'; | 45 import '../serialization/model_test_helper.dart'; |
| 46 import '../serialization/test_helper.dart'; | 46 import '../serialization/test_helper.dart'; |
| 47 | 47 |
| 48 import 'closed_world_test.dart'; | 48 import 'closed_world_test.dart'; |
| 49 import 'impact_test.dart'; | 49 import 'impact_test.dart'; |
| 50 | 50 |
| 51 const SOURCE = const { | 51 const SOURCE = const { |
| 52 'main.dart': ''' | 52 'main.dart': ''' |
| 53 main() { | 53 main() { |
| 54 print('Hello World'); | 54 print('Hello World'); |
| 55 ''.contains; // Trigger member closurization. |
| 55 } | 56 } |
| 56 ''' | 57 ''' |
| 57 }; | 58 }; |
| 58 | 59 |
| 59 main(List<String> args) { | 60 main(List<String> args) { |
| 60 Arguments arguments = new Arguments.from(args); | 61 Arguments arguments = new Arguments.from(args); |
| 61 Uri entryPoint; | 62 Uri entryPoint; |
| 62 Map<String, String> memorySourceFiles; | 63 Map<String, String> memorySourceFiles; |
| 63 if (arguments.uri != null) { | 64 if (arguments.uri != null) { |
| 64 entryPoint = arguments.uri; | 65 entryPoint = arguments.uri; |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 usage2.isInvokeOnUsed); | 381 usage2.isInvokeOnUsed); |
| 381 check(usage1, usage2, 'isRuntimeTypeUsed', usage1.isRuntimeTypeUsed, | 382 check(usage1, usage2, 'isRuntimeTypeUsed', usage1.isRuntimeTypeUsed, |
| 382 usage2.isRuntimeTypeUsed); | 383 usage2.isRuntimeTypeUsed); |
| 383 check(usage1, usage2, 'isIsolateInUse', usage1.isIsolateInUse, | 384 check(usage1, usage2, 'isIsolateInUse', usage1.isIsolateInUse, |
| 384 usage2.isIsolateInUse); | 385 usage2.isIsolateInUse); |
| 385 check(usage1, usage2, 'isFunctionApplyUsed', usage1.isFunctionApplyUsed, | 386 check(usage1, usage2, 'isFunctionApplyUsed', usage1.isFunctionApplyUsed, |
| 386 usage2.isFunctionApplyUsed); | 387 usage2.isFunctionApplyUsed); |
| 387 check(usage1, usage2, 'isNoSuchMethodUsed', usage1.isNoSuchMethodUsed, | 388 check(usage1, usage2, 'isNoSuchMethodUsed', usage1.isNoSuchMethodUsed, |
| 388 usage2.isNoSuchMethodUsed); | 389 usage2.isNoSuchMethodUsed); |
| 389 } | 390 } |
| OLD | NEW |