125 {
126 intptr_t num_handlers =
Length();
127 if (num_handlers == 0) {
128 return has_async_handler_ ? Object::empty_async_exception_handlers().ptr()
129 : Object::empty_exception_handlers().ptr();
130 }
131 const ExceptionHandlers& handlers =
133 handlers.set_has_async_handler(has_async_handler_);
134 for (intptr_t i = 0; i < num_handlers; i++) {
135
136 if (list_[i].handler_types == nullptr) {
137
138
139 const bool has_catch_all = false;
140
141 ASSERT((list_[i].outer_try_index == -1) &&
143 handlers.SetHandlerInfo(i, list_[i].outer_try_index, list_[i].pc_offset,
144 list_[i].needs_stacktrace, has_catch_all,
145 list_[i].is_generated);
146 handlers.SetHandledTypes(i, Array::empty_array());
147 } else {
149 handlers.SetHandlerInfo(i, list_[i].outer_try_index, list_[i].pc_offset,
150 list_[i].needs_stacktrace, has_catch_all,
151 list_[i].is_generated);
152 handlers.SetHandledTypes(i, *list_[i].handler_types);
153 }
154 }
155 return handlers.ptr();
156}
static bool ContainsCatchAllType(const Array &array)
static ExceptionHandlersPtr New(intptr_t num_handlers)