| Index: runtime/vm/code_descriptors.h
|
| ===================================================================
|
| --- runtime/vm/code_descriptors.h (revision 17099)
|
| +++ runtime/vm/code_descriptors.h (working copy)
|
| @@ -98,8 +98,10 @@
|
| class ExceptionHandlerList : public ZoneAllocated {
|
| public:
|
| struct HandlerDesc {
|
| - intptr_t try_index; // Try block index handled by the handler.
|
| - intptr_t pc_offset; // Handler PC offset value.
|
| + intptr_t try_index; // Try block index handled by the handler.
|
| + intptr_t outer_try_index; // Try block in which this try block is nested.
|
| + intptr_t pc_offset; // Handler PC offset value.
|
| + const Array* handler_types; // Catch clause guards.
|
| };
|
|
|
| ExceptionHandlerList() : list_() {}
|
| @@ -111,17 +113,29 @@
|
| intptr_t TryIndex(int index) const {
|
| return list_[index].try_index;
|
| }
|
| + intptr_t OuterTryIndex(int index) const {
|
| + return list_[index].outer_try_index;
|
| + }
|
| intptr_t PcOffset(int index) const {
|
| return list_[index].pc_offset;
|
| }
|
| + const Array& HandlerTypes(int index) const {
|
| + return *list_[index].handler_types;
|
| + }
|
| void SetPcOffset(int index, intptr_t handler_pc) {
|
| list_[index].pc_offset = handler_pc;
|
| }
|
|
|
| - void AddHandler(intptr_t try_index, intptr_t pc_offset) {
|
| + void AddHandler(intptr_t try_index,
|
| + intptr_t outer_try_index,
|
| + intptr_t pc_offset,
|
| + const Array& handler_types) {
|
| struct HandlerDesc data;
|
| data.try_index = try_index;
|
| + data.outer_try_index = outer_try_index;
|
| data.pc_offset = pc_offset;
|
| + ASSERT(handler_types.IsZoneHandle());
|
| + data.handler_types = &handler_types;
|
| list_.Add(data);
|
| }
|
|
|
| @@ -130,7 +144,9 @@
|
| const ExceptionHandlers& handlers =
|
| ExceptionHandlers::Handle(ExceptionHandlers::New(num_handlers));
|
| for (intptr_t i = 0; i < num_handlers; i++) {
|
| - handlers.SetHandlerEntry(i, TryIndex(i), (entry_point + PcOffset(i)));
|
| + handlers.SetHandlerInfo(i, TryIndex(i), OuterTryIndex(i),
|
| + (entry_point + PcOffset(i)));
|
| + handlers.SetHandledTypes(i, HandlerTypes(i));
|
| }
|
| return handlers.raw();
|
| }
|
|
|