| 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 dart2js.compiler_base; | 5 library dart2js.compiler_base; |
| 6 | 6 |
| 7 import 'dart:async' show | 7 import 'dart:async' show |
| 8 EventSink, | 8 EventSink, |
| 9 Future; | 9 Future; |
| 10 | 10 |
| (...skipping 1658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1669 break; | 1669 break; |
| 1670 } | 1670 } |
| 1671 } | 1671 } |
| 1672 lastDiagnosticWasFiltered = false; | 1672 lastDiagnosticWasFiltered = false; |
| 1673 reportDiagnostic(message, infos, kind); | 1673 reportDiagnostic(message, infos, kind); |
| 1674 } | 1674 } |
| 1675 | 1675 |
| 1676 void reportDiagnostic(DiagnosticMessage message, | 1676 void reportDiagnostic(DiagnosticMessage message, |
| 1677 List<DiagnosticMessage> infos, | 1677 List<DiagnosticMessage> infos, |
| 1678 api.Diagnostic kind) { | 1678 api.Diagnostic kind) { |
| 1679 if (kind == api.Diagnostic.ERROR || |
| 1680 kind == api.Diagnostic.CRASH || |
| 1681 (options.fatalWarnings && |
| 1682 kind == api.Diagnostic.WARNING)) { |
| 1683 compiler.compilationFailed = true; |
| 1684 } |
| 1679 compiler.reportDiagnostic(message, infos, kind); | 1685 compiler.reportDiagnostic(message, infos, kind); |
| 1680 } | 1686 } |
| 1681 | 1687 |
| 1682 /** | 1688 /** |
| 1683 * Perform an operation, [f], returning the return value from [f]. If an | 1689 * Perform an operation, [f], returning the return value from [f]. If an |
| 1684 * error occurs then report it as having occurred during compilation of | 1690 * error occurs then report it as having occurred during compilation of |
| 1685 * [element]. Can be nested. | 1691 * [element]. Can be nested. |
| 1686 */ | 1692 */ |
| 1687 withCurrentElement(Element element, f()) { | 1693 withCurrentElement(Element element, f()) { |
| 1688 Element old = currentElement; | 1694 Element old = currentElement; |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2053 if (_otherDependencies == null) { | 2059 if (_otherDependencies == null) { |
| 2054 _otherDependencies = new Setlet<Element>(); | 2060 _otherDependencies = new Setlet<Element>(); |
| 2055 } | 2061 } |
| 2056 _otherDependencies.add(element.implementation); | 2062 _otherDependencies.add(element.implementation); |
| 2057 } | 2063 } |
| 2058 | 2064 |
| 2059 Iterable<Element> get otherDependencies { | 2065 Iterable<Element> get otherDependencies { |
| 2060 return _otherDependencies != null ? _otherDependencies : const <Element>[]; | 2066 return _otherDependencies != null ? _otherDependencies : const <Element>[]; |
| 2061 } | 2067 } |
| 2062 } | 2068 } |
| OLD | NEW |