OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:collection'; | 8 import 'dart:collection'; |
9 | 9 |
10 import 'package:compiler/compiler_new.dart' as api; | 10 import 'package:compiler/compiler_new.dart' as api; |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 preserveComments: preserveComments, | 103 preserveComments: preserveComments, |
104 trustTypeAnnotations: trustTypeAnnotations, | 104 trustTypeAnnotations: trustTypeAnnotations, |
105 trustJSInteropTypeAnnotations: trustJSInteropTypeAnnotations, | 105 trustJSInteropTypeAnnotations: trustJSInteropTypeAnnotations, |
106 shownPackageWarnings: const []), | 106 shownPackageWarnings: const []), |
107 outputProvider: outputProvider) { | 107 outputProvider: outputProvider) { |
108 deferredLoadTask = new MockDeferredLoadTask(this); | 108 deferredLoadTask = new MockDeferredLoadTask(this); |
109 | 109 |
110 registerSource( | 110 registerSource( |
111 Uris.dart_core, buildLibrarySource(DEFAULT_CORE_LIBRARY, coreSource)); | 111 Uris.dart_core, buildLibrarySource(DEFAULT_CORE_LIBRARY, coreSource)); |
112 registerSource(PATCH_CORE, DEFAULT_PATCH_CORE_SOURCE); | 112 registerSource(PATCH_CORE, DEFAULT_PATCH_CORE_SOURCE); |
| 113 registerSource( |
| 114 Uris.dart__internal, buildLibrarySource(DEFAULT_INTERNAL_LIBRARY)); |
113 | 115 |
114 registerSource( | 116 registerSource( |
115 Uris.dart__js_helper, buildLibrarySource(DEFAULT_JS_HELPER_LIBRARY)); | 117 Uris.dart__js_helper, buildLibrarySource(DEFAULT_JS_HELPER_LIBRARY)); |
116 registerSource(Uris.dart__foreign_helper, | 118 registerSource(Uris.dart__foreign_helper, |
117 buildLibrarySource(DEFAULT_FOREIGN_HELPER_LIBRARY)); | 119 buildLibrarySource(DEFAULT_FOREIGN_HELPER_LIBRARY)); |
118 registerSource(Uris.dart__interceptors, | 120 registerSource(Uris.dart__interceptors, |
119 buildLibrarySource(DEFAULT_INTERCEPTORS_LIBRARY)); | 121 buildLibrarySource(DEFAULT_INTERCEPTORS_LIBRARY)); |
120 registerSource(Uris.dart__isolate_helper, | 122 registerSource(Uris.dart__isolate_helper, |
121 buildLibrarySource(DEFAULT_ISOLATE_HELPER_LIBRARY)); | 123 buildLibrarySource(DEFAULT_ISOLATE_HELPER_LIBRARY)); |
122 registerSource(Uris.dart_mirrors, DEFAULT_MIRRORS_SOURCE); | 124 registerSource(Uris.dart_mirrors, DEFAULT_MIRRORS_SOURCE); |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 trustTypeAnnotations: trustTypeAnnotations, | 394 trustTypeAnnotations: trustTypeAnnotations, |
393 enableTypeAssertions: enableTypeAssertions, | 395 enableTypeAssertions: enableTypeAssertions, |
394 enableUserAssertions: enableUserAssertions, | 396 enableUserAssertions: enableUserAssertions, |
395 expectedErrors: expectedErrors, | 397 expectedErrors: expectedErrors, |
396 expectedWarnings: expectedWarnings, | 398 expectedWarnings: expectedWarnings, |
397 outputProvider: outputProvider); | 399 outputProvider: outputProvider); |
398 compiler.registerSource(uri, code); | 400 compiler.registerSource(uri, code); |
399 compiler.diagnosticHandler = createHandler(compiler, code); | 401 compiler.diagnosticHandler = createHandler(compiler, code); |
400 return compiler; | 402 return compiler; |
401 } | 403 } |
OLD | NEW |