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 'dart:async'; | 9 import 'dart:async'; |
10 | 10 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 import '../serialization/helper.dart'; | 49 import '../serialization/helper.dart'; |
50 import '../serialization/model_test_helper.dart'; | 50 import '../serialization/model_test_helper.dart'; |
51 import '../serialization/test_helper.dart'; | 51 import '../serialization/test_helper.dart'; |
52 | 52 |
53 import 'closed_world_test.dart' hide KernelWorkItemBuilder; | 53 import 'closed_world_test.dart' hide KernelWorkItemBuilder; |
54 import 'impact_test.dart'; | 54 import 'impact_test.dart'; |
55 | 55 |
56 const SOURCE = const { | 56 const SOURCE = const { |
57 'main.dart': ''' | 57 'main.dart': ''' |
58 import 'dart:html'; | 58 import 'dart:html'; |
| 59 import 'dart:typed_data'; |
59 import 'package:expect/expect.dart'; | 60 import 'package:expect/expect.dart'; |
60 | 61 |
61 class ClassWithSetter { | 62 class ClassWithSetter { |
62 void set setter(_) {} | 63 void set setter(_) {} |
63 } | 64 } |
64 | 65 |
65 class Mixin { | 66 class Mixin { |
66 method1() {} | 67 method1() {} |
67 method2() {} | 68 method2() {} |
68 method3() {} | 69 method3() {} |
(...skipping 10 matching lines...) Expand all Loading... |
79 print('Hello World'); | 80 print('Hello World'); |
80 ''.contains; // Trigger member closurization. | 81 ''.contains; // Trigger member closurization. |
81 new Element.div(); | 82 new Element.div(); |
82 new ClassWithSetter().setter = null; | 83 new ClassWithSetter().setter = null; |
83 new Class1().method1(); | 84 new Class1().method1(); |
84 new Class2().method2(); | 85 new Class2().method2(); |
85 new Class2().method3(); | 86 new Class2().method3(); |
86 null is List<int>; | 87 null is List<int>; |
87 method1(); // Both top level and instance method named 'method1' are live. | 88 method1(); // Both top level and instance method named 'method1' are live. |
88 #main; // Use a const symbol. | 89 #main; // Use a const symbol. |
| 90 new Int8List(0); |
89 } | 91 } |
90 ''' | 92 ''' |
91 }; | 93 }; |
92 | 94 |
93 main(List<String> args) { | 95 main(List<String> args) { |
94 asyncTest(() async { | 96 asyncTest(() async { |
95 await mainInternal(args); | 97 await mainInternal(args); |
96 }); | 98 }); |
97 } | 99 } |
98 | 100 |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 | 373 |
372 MemoryDillLibraryLoaderTask(KernelToElementMap elementMap, | 374 MemoryDillLibraryLoaderTask(KernelToElementMap elementMap, |
373 DiagnosticReporter reporter, Measurer measurer, this.program) | 375 DiagnosticReporter reporter, Measurer measurer, this.program) |
374 : super(elementMap, null, null, reporter, measurer); | 376 : super(elementMap, null, null, reporter, measurer); |
375 | 377 |
376 Future<LoadedLibraries> loadLibrary(Uri resolvedUri, | 378 Future<LoadedLibraries> loadLibrary(Uri resolvedUri, |
377 {bool skipFileWithPartOfTag: false}) async { | 379 {bool skipFileWithPartOfTag: false}) async { |
378 return createLoadedLibraries(program); | 380 return createLoadedLibraries(program); |
379 } | 381 } |
380 } | 382 } |
OLD | NEW |