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

Unified Diff: runtime/vm/object.cc

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 | « runtime/vm/object.h ('k') | runtime/vm/object_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 26938)
+++ runtime/vm/object.cc (working copy)
@@ -8303,22 +8303,22 @@
void ExceptionHandlers::SetHandlerInfo(intptr_t try_index,
intptr_t outer_try_index,
intptr_t handler_pc,
- bool needs_stacktrace) const {
+ bool needs_stacktrace,
+ bool has_catch_all) const {
ASSERT((try_index >= 0) && (try_index < Length()));
RawExceptionHandlers::HandlerInfo* info = &raw_ptr()->data_[try_index];
info->outer_try_index = outer_try_index;
info->handler_pc = handler_pc;
info->needs_stacktrace = needs_stacktrace;
+ info->has_catch_all = has_catch_all;
}
void ExceptionHandlers::GetHandlerInfo(
- intptr_t try_index,
- RawExceptionHandlers::HandlerInfo* info) const {
+ intptr_t try_index,
+ RawExceptionHandlers::HandlerInfo* info) const {
ASSERT((try_index >= 0) && (try_index < Length()));
ASSERT(info != NULL);
- RawExceptionHandlers::HandlerInfo* data = &raw_ptr()->data_[try_index];
- info->outer_try_index = data->outer_try_index;
- info->handler_pc = data->handler_pc;
+ *info = raw_ptr()->data_[try_index];
}
@@ -8340,6 +8340,12 @@
}
+bool ExceptionHandlers::HasCatchAll(intptr_t try_index) const {
+ ASSERT((try_index >= 0) && (try_index < Length()));
+ return raw_ptr()->data_[try_index].has_catch_all;
+}
+
+
void ExceptionHandlers::SetHandledTypes(intptr_t try_index,
const Array& handled_types) const {
ASSERT((try_index >= 0) && (try_index < Length()));
@@ -8357,19 +8363,6 @@
}
-bool ExceptionHandlers::HasCatchAll(intptr_t try_index) const {
- ASSERT((try_index >= 0) && (try_index < Length()));
- Array& array = Array::Handle(raw_ptr()->handled_types_data_);
- array ^= array.At(try_index);
- for (intptr_t i = 0; i < array.Length(); i++) {
- if (array.At(i) == Type::DynamicType()) {
- return true;
- }
- }
- return false;
-}
-
-
void ExceptionHandlers::set_handled_types_data(const Array& value) const {
StorePointer(&raw_ptr()->handled_types_data_, value.raw());
}
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/object_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698