Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Side by Side Diff: lib/compiler/implementation/compiler.dart

Issue 11227021: Change StackOverflowException to be an Error. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | lib/compiler/implementation/lib/js_helper.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | lib/compiler/implementation/lib/js_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698