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

Unified Diff: runtime/vm/code_descriptors.h

Issue 23531008: Last round of cleanups in exception handler, before going to the next stage. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_descriptors.h
===================================================================
--- runtime/vm/code_descriptors.h (revision 26938)
+++ runtime/vm/code_descriptors.h (working copy)
@@ -135,6 +135,17 @@
list_[try_index].needs_stacktrace = needs_stacktrace;
}
+
+ static bool ContainsDynamic(const Array& array) {
+ for (intptr_t i = 0; i < array.Length(); i++) {
+ if (array.At(i) == Type::DynamicType()) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+
RawExceptionHandlers* FinalizeExceptionHandlers(uword entry_point) {
intptr_t num_handlers = Length();
const ExceptionHandlers& handlers =
@@ -142,10 +153,12 @@
for (intptr_t i = 0; i < num_handlers; i++) {
// Assert that every element in the array has been initialized.
ASSERT(list_[i].handler_types != NULL);
+ bool has_catch_all = ContainsDynamic(*list_[i].handler_types);
handlers.SetHandlerInfo(i,
list_[i].outer_try_index,
(entry_point + list_[i].pc_offset),
- list_[i].needs_stacktrace);
+ list_[i].needs_stacktrace,
+ has_catch_all);
handlers.SetHandledTypes(i, *list_[i].handler_types);
}
return handlers.raw();
« no previous file with comments | « no previous file | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698