OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 import 'dart:async'; | 5 import 'dart:async'; |
6 import "package:expect/expect.dart"; | 6 import "package:expect/expect.dart"; |
7 import "package:async_helper/async_helper.dart"; | 7 import "package:async_helper/async_helper.dart"; |
8 import '../../../sdk/lib/_internal/compiler/implementation/source_file.dart'; | 8 import '../../../sdk/lib/_internal/compiler/implementation/source_file.dart'; |
9 import '../../../sdk/lib/_internal/compiler/implementation/types/types.dart'; | 9 import '../../../sdk/lib/_internal/compiler/implementation/types/types.dart'; |
10 import '../../../sdk/lib/_internal/compiler/implementation/types/concrete_types_
inferrer.dart'; | 10 import '../../../sdk/lib/_internal/compiler/implementation/types/concrete_types_
inferrer.dart'; |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 } | 167 } |
168 class Function {} | 168 class Function {} |
169 abstract class List<E> { | 169 abstract class List<E> { |
170 factory List([int length]) {} | 170 factory List([int length]) {} |
171 } | 171 } |
172 abstract class Map<K, V> {} | 172 abstract class Map<K, V> {} |
173 class Closure {} | 173 class Closure {} |
174 class Type {} | 174 class Type {} |
175 class StackTrace {} | 175 class StackTrace {} |
176 class Dynamic_ {} | 176 class Dynamic_ {} |
177 bool identical(Object a, Object b) {}'''; | 177 bool identical(Object a, Object b) {} |
| 178 const proxy = 0;'''; |
178 | 179 |
179 Future<AnalysisResult> analyze(String code, {int maxConcreteTypeSize: 1000}) { | 180 Future<AnalysisResult> analyze(String code, {int maxConcreteTypeSize: 1000}) { |
180 Uri uri = new Uri(scheme: 'source'); | 181 Uri uri = new Uri(scheme: 'source'); |
181 MockCompiler compiler = new MockCompiler( | 182 MockCompiler compiler = new MockCompiler( |
182 coreSource: CORELIB, | 183 coreSource: CORELIB, |
183 enableConcreteTypeInference: true, | 184 enableConcreteTypeInference: true, |
184 maxConcreteTypeSize: maxConcreteTypeSize); | 185 maxConcreteTypeSize: maxConcreteTypeSize); |
185 compiler.sourceFiles[uri.toString()] = | 186 compiler.sourceFiles[uri.toString()] = |
186 new StringSourceFile(uri.toString(), code); | 187 new StringSourceFile(uri.toString(), code); |
187 compiler.typesTask.concreteTypesInferrer.testMode = true; | 188 compiler.typesTask.concreteTypesInferrer.testMode = true; |
(...skipping 1513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1701 testIsCheck, | 1702 testIsCheck, |
1702 testSeenClasses, | 1703 testSeenClasses, |
1703 testIntDoubleNum, | 1704 testIntDoubleNum, |
1704 testConcreteTypeToTypeMask, | 1705 testConcreteTypeToTypeMask, |
1705 testSelectors, | 1706 testSelectors, |
1706 testMixins, | 1707 testMixins, |
1707 testClosures, | 1708 testClosures, |
1708 testNestedFunctions, | 1709 testNestedFunctions, |
1709 ], (f) => f())); | 1710 ], (f) => f())); |
1710 } | 1711 } |
OLD | NEW |