| 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.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
| 4 | 4 |
| 5 library rasta.custom_compiler; | 5 library rasta.custom_compiler; |
| 6 | 6 |
| 7 import 'package:compiler/src/apiimpl.dart' show | 7 import 'package:compiler/src/apiimpl.dart' show |
| 8 CompilerImpl; | 8 CompilerImpl; |
| 9 | 9 |
| 10 import 'package:compiler/compiler_new.dart' show | 10 import 'package:compiler/compiler_new.dart' show |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 void recoverFromCrash() { | 123 void recoverFromCrash() { |
| 124 if (reporter is CompilerDiagnosticReporter) { | 124 if (reporter is CompilerDiagnosticReporter) { |
| 125 CompilerDiagnosticReporter reporter = this.reporter; | 125 CompilerDiagnosticReporter reporter = this.reporter; |
| 126 reporter.hasCrashed = false; | 126 reporter.hasCrashed = false; |
| 127 } | 127 } |
| 128 if (handler is FormattingDiagnosticHandler) { | 128 if (handler is FormattingDiagnosticHandler) { |
| 129 FormattingDiagnosticHandler handler = this.handler; | 129 FormattingDiagnosticHandler handler = this.handler; |
| 130 handler.isAborting = false; | 130 handler.isAborting = false; |
| 131 } | 131 } |
| 132 enqueuer.resolution.deferredTaskQueue.clear(); | 132 enqueuer.resolution.deferredTaskQueue.clear(); |
| 133 (libraryLoader as dynamic).currentHandler = null; |
| 133 } | 134 } |
| 134 | 135 |
| 135 bool get isInternalStateConsistent { | 136 bool get isInternalStateConsistent { |
| 136 if (reporter is CompilerDiagnosticReporter) { | 137 if (reporter is CompilerDiagnosticReporter) { |
| 137 CompilerDiagnosticReporter reporter = this.reporter; | 138 CompilerDiagnosticReporter reporter = this.reporter; |
| 138 if (reporter.hasCrashed) { | 139 if (reporter.hasCrashed) { |
| 139 print("Reporter hasCrashed"); | 140 print("Reporter hasCrashed"); |
| 140 return false; | 141 return false; |
| 141 } | 142 } |
| 142 } | 143 } |
| 143 if (handler is FormattingDiagnosticHandler) { | 144 if (handler is FormattingDiagnosticHandler) { |
| 144 FormattingDiagnosticHandler handler = this.handler; | 145 FormattingDiagnosticHandler handler = this.handler; |
| 145 if (handler.isAborting) { | 146 if (handler.isAborting) { |
| 146 print("Reporter isAborting"); | 147 print("Reporter isAborting"); |
| 147 return false; | 148 return false; |
| 148 } | 149 } |
| 149 } | 150 } |
| 150 if (enqueuer.resolution.deferredTaskQueue.isNotEmpty) { | 151 if (enqueuer.resolution.deferredTaskQueue.isNotEmpty) { |
| 151 print("Resolution deferredTaskQueue isn't empty"); | 152 print("Resolution deferredTaskQueue isn't empty"); |
| 152 return false; | 153 return false; |
| 153 } | 154 } |
| 155 if ((libraryLoader as dynamic).currentHandler != null) { |
| 156 print("compiler.libraryLoader.currentHandler isn't null"); |
| 157 return false; |
| 158 } |
| 154 return true; | 159 return true; |
| 155 } | 160 } |
| 156 } | 161 } |
| OLD | NEW |