| 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 leg_apiimpl; | 5 library leg_apiimpl; |
| 6 | 6 |
| 7 import 'dart:uri'; | 7 import 'dart:uri'; |
| 8 import 'dart:async'; | 8 import 'dart:async'; |
| 9 | 9 |
| 10 import '../compiler.dart' as api; | 10 import '../compiler.dart' as api; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 Compiler(this.provider, | 27 Compiler(this.provider, |
| 28 api.CompilerOutputProvider outputProvider, | 28 api.CompilerOutputProvider outputProvider, |
| 29 this.handler, | 29 this.handler, |
| 30 this.libraryRoot, | 30 this.libraryRoot, |
| 31 this.packageRoot, | 31 this.packageRoot, |
| 32 List<String> options) | 32 List<String> options) |
| 33 : this.options = options, | 33 : this.options = options, |
| 34 this.allowedLibraryCategories = getAllowedLibraryCategories(options), | 34 this.allowedLibraryCategories = getAllowedLibraryCategories(options), |
| 35 super( | 35 super( |
| 36 tracer: new ssa.HTracer(), | 36 tracer: new ssa.HTracer( |
| 37 ssa.GENERATE_SSA_TRACE ? outputProvider('dart', 'cfg') : null), |
| 37 outputProvider: outputProvider, | 38 outputProvider: outputProvider, |
| 38 enableTypeAssertions: hasOption(options, '--enable-checked-mode'), | 39 enableTypeAssertions: hasOption(options, '--enable-checked-mode'), |
| 39 enableUserAssertions: hasOption(options, '--enable-checked-mode'), | 40 enableUserAssertions: hasOption(options, '--enable-checked-mode'), |
| 40 enableMinification: hasOption(options, '--minify'), | 41 enableMinification: hasOption(options, '--minify'), |
| 41 enableNativeLiveTypeAnalysis: | 42 enableNativeLiveTypeAnalysis: |
| 42 !hasOption(options, '--disable-native-live-type-analysis'), | 43 !hasOption(options, '--disable-native-live-type-analysis'), |
| 43 emitJavaScript: !hasOption(options, '--output-type=dart'), | 44 emitJavaScript: !hasOption(options, '--output-type=dart'), |
| 44 disallowUnsafeEval: hasOption(options, '--disallow-unsafe-eval'), | 45 disallowUnsafeEval: hasOption(options, '--disallow-unsafe-eval'), |
| 45 analyzeAll: hasOption(options, '--analyze-all'), | 46 analyzeAll: hasOption(options, '--analyze-all'), |
| 46 analyzeOnly: hasOption(options, '--analyze-only'), | 47 analyzeOnly: hasOption(options, '--analyze-only'), |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 handler(translateUri(span.uri, null), span.begin, span.end, | 261 handler(translateUri(span.uri, null), span.begin, span.end, |
| 261 message, kind); | 262 message, kind); |
| 262 } | 263 } |
| 263 } | 264 } |
| 264 | 265 |
| 265 bool get isMockCompilation { | 266 bool get isMockCompilation { |
| 266 return mockableLibraryUsed | 267 return mockableLibraryUsed |
| 267 && (options.indexOf('--allow-mock-compilation') != -1); | 268 && (options.indexOf('--allow-mock-compilation') != -1); |
| 268 } | 269 } |
| 269 } | 270 } |
| OLD | NEW |