| 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 | 5 |
| 6 /** | 6 /** |
| 7 * If true, print a warning for each method that was resolved, but not | 7 * If true, print a warning for each method that was resolved, but not |
| 8 * compiled. | 8 * compiled. |
| 9 */ | 9 */ |
| 10 const bool REPORT_EXCESS_RESOLUTION = false; | 10 const bool REPORT_EXCESS_RESOLUTION = false; |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 Element functionApplyMethod; | 136 Element functionApplyMethod; |
| 137 | 137 |
| 138 Element get currentElement => _currentElement; | 138 Element get currentElement => _currentElement; |
| 139 withCurrentElement(Element element, f()) { | 139 withCurrentElement(Element element, f()) { |
| 140 Element old = currentElement; | 140 Element old = currentElement; |
| 141 _currentElement = element; | 141 _currentElement = element; |
| 142 try { | 142 try { |
| 143 return f(); | 143 return f(); |
| 144 } on CompilerCancelledException catch (ex) { | 144 } on CompilerCancelledException catch (ex) { |
| 145 throw; | 145 throw; |
| 146 } on StackOverflowException catch (ex) { | 146 } on StackOverflowError catch (ex) { |
| 147 // We cannot report anything useful in this case, because we | 147 // We cannot report anything useful in this case, because we |
| 148 // do not have enough stack space. | 148 // do not have enough stack space. |
| 149 throw; | 149 throw; |
| 150 } catch (ex) { | 150 } catch (ex) { |
| 151 try { | 151 try { |
| 152 unhandledExceptionOnElement(element); | 152 unhandledExceptionOnElement(element); |
| 153 } catch (doubleFault) { | 153 } catch (doubleFault) { |
| 154 // Ignoring exceptions in exception handling. | 154 // Ignoring exceptions in exception handling. |
| 155 } | 155 } |
| 156 throw; | 156 throw; |
| (...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 861 // TODO(johnniwinther): Use [spannable] and [message] to provide better | 861 // TODO(johnniwinther): Use [spannable] and [message] to provide better |
| 862 // information on assertion errors. | 862 // information on assertion errors. |
| 863 if (condition is Function){ | 863 if (condition is Function){ |
| 864 condition = condition(); | 864 condition = condition(); |
| 865 } | 865 } |
| 866 if (!condition && message != null) { | 866 if (!condition && message != null) { |
| 867 print('assertion failed: $message'); | 867 print('assertion failed: $message'); |
| 868 } | 868 } |
| 869 return spannable != null && condition; | 869 return spannable != null && condition; |
| 870 } | 870 } |
| OLD | NEW |