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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 enableMinification: enableMinification, | 94 enableMinification: enableMinification, |
95 maxConcreteTypeSize: maxConcreteTypeSize, | 95 maxConcreteTypeSize: maxConcreteTypeSize, |
96 disableTypeInferenceFlag: disableTypeInference, | 96 disableTypeInferenceFlag: disableTypeInference, |
97 analyzeAllFlag: analyzeAll, | 97 analyzeAllFlag: analyzeAll, |
98 analyzeOnly: analyzeOnly, | 98 analyzeOnly: analyzeOnly, |
99 emitJavaScript: emitJavaScript, | 99 emitJavaScript: emitJavaScript, |
100 preserveComments: preserveComments, | 100 preserveComments: preserveComments, |
101 trustTypeAnnotations: trustTypeAnnotations, | 101 trustTypeAnnotations: trustTypeAnnotations, |
102 trustJSInteropTypeAnnotations: trustJSInteropTypeAnnotations, | 102 trustJSInteropTypeAnnotations: trustJSInteropTypeAnnotations, |
103 diagnosticOptions: | 103 diagnosticOptions: |
104 new DiagnosticOptions(showPackageWarnings: true), | 104 new DiagnosticOptions(shownPackageWarnings: const []), |
105 outputProvider: new LegacyCompilerOutput(outputProvider)) { | 105 outputProvider: new LegacyCompilerOutput(outputProvider)) { |
106 this.disableInlining = disableInlining; | 106 this.disableInlining = disableInlining; |
107 | 107 |
108 deferredLoadTask = new MockDeferredLoadTask(this); | 108 deferredLoadTask = new MockDeferredLoadTask(this); |
109 | 109 |
110 registerSource(Uris.dart_core, | 110 registerSource(Uris.dart_core, |
111 buildLibrarySource(DEFAULT_CORE_LIBRARY, coreSource)); | 111 buildLibrarySource(DEFAULT_CORE_LIBRARY, coreSource)); |
112 registerSource(PATCH_CORE, DEFAULT_PATCH_CORE_SOURCE); | 112 registerSource(PATCH_CORE, DEFAULT_PATCH_CORE_SOURCE); |
113 | 113 |
114 registerSource(BackendHelpers.DART_JS_HELPER, | 114 registerSource(BackendHelpers.DART_JS_HELPER, |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 trustTypeAnnotations: trustTypeAnnotations, | 369 trustTypeAnnotations: trustTypeAnnotations, |
370 enableTypeAssertions: enableTypeAssertions, | 370 enableTypeAssertions: enableTypeAssertions, |
371 enableUserAssertions: enableUserAssertions, | 371 enableUserAssertions: enableUserAssertions, |
372 expectedErrors: expectedErrors, | 372 expectedErrors: expectedErrors, |
373 expectedWarnings: expectedWarnings, | 373 expectedWarnings: expectedWarnings, |
374 outputProvider: outputProvider); | 374 outputProvider: outputProvider); |
375 compiler.registerSource(uri, code); | 375 compiler.registerSource(uri, code); |
376 compiler.diagnosticHandler = createHandler(compiler, code); | 376 compiler.diagnosticHandler = createHandler(compiler, code); |
377 return compiler; | 377 return compiler; |
378 } | 378 } |
OLD | NEW |