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 library mock_compiler; | 5 library mock_compiler; |
6 | 6 |
7 import "package:expect/expect.dart"; | 7 import "package:expect/expect.dart"; |
8 import 'dart:async'; | 8 import 'dart:async'; |
9 import 'dart:collection'; | 9 import 'dart:collection'; |
10 | 10 |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 int this.expectedErrors}) | 266 int this.expectedErrors}) |
267 : sourceFiles = new Map<String, SourceFile>(), | 267 : sourceFiles = new Map<String, SourceFile>(), |
268 super(enableTypeAssertions: enableTypeAssertions, | 268 super(enableTypeAssertions: enableTypeAssertions, |
269 enableMinification: enableMinification, | 269 enableMinification: enableMinification, |
270 enableConcreteTypeInference: enableConcreteTypeInference, | 270 enableConcreteTypeInference: enableConcreteTypeInference, |
271 maxConcreteTypeSize: maxConcreteTypeSize, | 271 maxConcreteTypeSize: maxConcreteTypeSize, |
272 disableTypeInferenceFlag: disableTypeInference, | 272 disableTypeInferenceFlag: disableTypeInference, |
273 analyzeAllFlag: analyzeAll, | 273 analyzeAllFlag: analyzeAll, |
274 analyzeOnly: analyzeOnly, | 274 analyzeOnly: analyzeOnly, |
275 emitJavaScript: emitJavaScript, | 275 emitJavaScript: emitJavaScript, |
276 preserveComments: preserveComments) { | 276 preserveComments: preserveComments, |
| 277 showPackageWarnings: true) { |
277 clearMessages(); | 278 clearMessages(); |
278 coreLibrary = createLibrary("core", coreSource); | 279 coreLibrary = createLibrary("core", coreSource); |
279 | 280 |
280 // We need to set the assert method to avoid calls with a 'null' | 281 // We need to set the assert method to avoid calls with a 'null' |
281 // target being interpreted as a call to assert. | 282 // target being interpreted as a call to assert. |
282 jsHelperLibrary = createLibrary("helper", helperSource); | 283 jsHelperLibrary = createLibrary("helper", helperSource); |
283 foreignLibrary = createLibrary("foreign", FOREIGN_LIBRARY); | 284 foreignLibrary = createLibrary("foreign", FOREIGN_LIBRARY); |
284 interceptorsLibrary = createLibrary("interceptors", interceptorsSource); | 285 interceptorsLibrary = createLibrary("interceptors", interceptorsSource); |
285 isolateHelperLibrary = createLibrary("isolate_helper", isolateHelperSource); | 286 isolateHelperLibrary = createLibrary("isolate_helper", isolateHelperSource); |
286 | 287 |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
574 } else { | 575 } else { |
575 sourceFile = compiler.sourceFiles[uri.toString()]; | 576 sourceFile = compiler.sourceFiles[uri.toString()]; |
576 } | 577 } |
577 if (sourceFile != null && begin != null && end != null) { | 578 if (sourceFile != null && begin != null && end != null) { |
578 print(sourceFile.getLocationMessage(message, begin, end, true, (x) => x)); | 579 print(sourceFile.getLocationMessage(message, begin, end, true, (x) => x)); |
579 } else { | 580 } else { |
580 print(message); | 581 print(message); |
581 } | 582 } |
582 }; | 583 }; |
583 } | 584 } |
OLD | NEW |