| 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 /// This is an interface to the Dart Kernel parser and Kernel binary generator. | 5 /// This is an interface to the Dart Kernel parser and Kernel binary generator. |
| 6 /// | 6 /// |
| 7 /// It is used by the kernel-isolate to load Dart source code and generate | 7 /// It is used by the kernel-isolate to load Dart source code and generate |
| 8 /// Kernel binary format. | 8 /// Kernel binary format. |
| 9 /// | 9 /// |
| 10 /// This is either invoked as the root script of the Kernel isolate when used | 10 /// This is either invoked as the root script of the Kernel isolate when used |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 print("DFE: platformKernel: ${platformKernel}"); | 57 print("DFE: platformKernel: ${platformKernel}"); |
| 58 } | 58 } |
| 59 | 59 |
| 60 options = new CompilerOptions() | 60 options = new CompilerOptions() |
| 61 ..strongMode = strongMode | 61 ..strongMode = strongMode |
| 62 ..fileSystem = fileSystem | 62 ..fileSystem = fileSystem |
| 63 ..target = new VmFastaTarget(new TargetFlags(strongMode: strongMode)) | 63 ..target = new VmFastaTarget(new TargetFlags(strongMode: strongMode)) |
| 64 ..packagesFileUri = packagesUri | 64 ..packagesFileUri = packagesUri |
| 65 ..sdkSummary = platformKernel | 65 ..sdkSummary = platformKernel |
| 66 ..verbose = verbose | 66 ..verbose = verbose |
| 67 ..throwOnErrors = false | |
| 68 ..reportMessages = true | 67 ..reportMessages = true |
| 69 ..onError = (CompilationMessage e) { | 68 ..onError = (CompilationMessage e) { |
| 70 if (e.severity == Severity.error) { | 69 if (e.severity == Severity.error) { |
| 71 // TODO(sigmund): support emitting code with errors as long as they | 70 // TODO(sigmund): support emitting code with errors as long as they |
| 72 // are handled in the generated code (issue #30194). | 71 // are handled in the generated code (issue #30194). |
| 73 errors.add(e.message); | 72 errors.add(e.message); |
| 74 } | 73 } |
| 75 }; | 74 }; |
| 76 } | 75 } |
| 77 | 76 |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 _CompilationCrash(this.exception, this.stack); | 360 _CompilationCrash(this.exception, this.stack); |
| 362 | 361 |
| 363 @override | 362 @override |
| 364 Status get status => Status.crash; | 363 Status get status => Status.crash; |
| 365 | 364 |
| 366 @override | 365 @override |
| 367 String get errorString => "${exception}\n${stack}"; | 366 String get errorString => "${exception}\n${stack}"; |
| 368 | 367 |
| 369 String toString() => "_CompilationCrash(${errorString})"; | 368 String toString() => "_CompilationCrash(${errorString})"; |
| 370 } | 369 } |
| OLD | NEW |