| 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());
|
| }
|
|
|