| 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:collection'; | 8 import 'dart:collection'; |
| 9 | 9 |
| 10 import '../../../sdk/lib/_internal/compiler/compiler.dart' as api; | 10 import '../../../sdk/lib/_internal/compiler/compiler.dart' as api; |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 String helperSource: DEFAULT_HELPERLIB, | 216 String helperSource: DEFAULT_HELPERLIB, |
| 217 String interceptorsSource: DEFAULT_INTERCEPTORSLIB, | 217 String interceptorsSource: DEFAULT_INTERCEPTORSLIB, |
| 218 String isolateHelperSource: DEFAULT_ISOLATE_HELPERLIB, | 218 String isolateHelperSource: DEFAULT_ISOLATE_HELPERLIB, |
| 219 bool enableTypeAssertions: false, | 219 bool enableTypeAssertions: false, |
| 220 bool enableMinification: false, | 220 bool enableMinification: false, |
| 221 bool enableConcreteTypeInference: false, | 221 bool enableConcreteTypeInference: false, |
| 222 int maxConcreteTypeSize: 5, | 222 int maxConcreteTypeSize: 5, |
| 223 bool disableTypeInference: false, | 223 bool disableTypeInference: false, |
| 224 bool analyzeAll: false, | 224 bool analyzeAll: false, |
| 225 bool analyzeOnly: false, | 225 bool analyzeOnly: false, |
| 226 bool emitJavaScript: true, |
| 226 bool preserveComments: false}) | 227 bool preserveComments: false}) |
| 227 : warnings = [], errors = [], | 228 : warnings = [], errors = [], |
| 228 sourceFiles = new Map<String, SourceFile>(), | 229 sourceFiles = new Map<String, SourceFile>(), |
| 229 super(enableTypeAssertions: enableTypeAssertions, | 230 super(enableTypeAssertions: enableTypeAssertions, |
| 230 enableMinification: enableMinification, | 231 enableMinification: enableMinification, |
| 231 enableConcreteTypeInference: enableConcreteTypeInference, | 232 enableConcreteTypeInference: enableConcreteTypeInference, |
| 232 maxConcreteTypeSize: maxConcreteTypeSize, | 233 maxConcreteTypeSize: maxConcreteTypeSize, |
| 233 disableTypeInferenceFlag: disableTypeInference, | 234 disableTypeInferenceFlag: disableTypeInference, |
| 234 analyzeAllFlag: analyzeAll, | 235 analyzeAllFlag: analyzeAll, |
| 235 analyzeOnly: analyzeOnly, | 236 analyzeOnly: analyzeOnly, |
| 237 emitJavaScript: emitJavaScript, |
| 236 preserveComments: preserveComments) { | 238 preserveComments: preserveComments) { |
| 237 coreLibrary = createLibrary("core", coreSource); | 239 coreLibrary = createLibrary("core", coreSource); |
| 238 // We need to set the assert method to avoid calls with a 'null' | 240 // We need to set the assert method to avoid calls with a 'null' |
| 239 // target being interpreted as a call to assert. | 241 // target being interpreted as a call to assert. |
| 240 jsHelperLibrary = createLibrary("helper", helperSource); | 242 jsHelperLibrary = createLibrary("helper", helperSource); |
| 241 foreignLibrary = createLibrary("foreign", FOREIGN_LIBRARY); | 243 foreignLibrary = createLibrary("foreign", FOREIGN_LIBRARY); |
| 242 interceptorsLibrary = createLibrary("interceptors", interceptorsSource); | 244 interceptorsLibrary = createLibrary("interceptors", interceptorsSource); |
| 243 isolateHelperLibrary = createLibrary("isolate_helper", isolateHelperSource); | 245 isolateHelperLibrary = createLibrary("isolate_helper", isolateHelperSource); |
| 244 | 246 |
| 245 // Set up the library imports. | 247 // Set up the library imports. |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 } | 458 } |
| 457 } | 459 } |
| 458 | 460 |
| 459 class MockDeferredLoadTask extends DeferredLoadTask { | 461 class MockDeferredLoadTask extends DeferredLoadTask { |
| 460 MockDeferredLoadTask(Compiler compiler) : super(compiler); | 462 MockDeferredLoadTask(Compiler compiler) : super(compiler); |
| 461 | 463 |
| 462 void registerMainApp(LibraryElement mainApp) { | 464 void registerMainApp(LibraryElement mainApp) { |
| 463 // Do nothing. | 465 // Do nothing. |
| 464 } | 466 } |
| 465 } | 467 } |
| OLD | NEW |