OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "vm/code_descriptors.h" | 5 #include "vm/code_descriptors.h" |
6 | 6 |
7 namespace dart { | 7 namespace dart { |
8 | 8 |
9 void DescriptorList::AddDescriptor(RawPcDescriptors::Kind kind, | 9 void DescriptorList::AddDescriptor(RawPcDescriptors::Kind kind, |
10 intptr_t pc_offset, | 10 intptr_t pc_offset, |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 // Initialize it to some meaningful value. | 117 // Initialize it to some meaningful value. |
118 const bool has_catch_all = false; | 118 const bool has_catch_all = false; |
119 // Check it is uninitialized. | 119 // Check it is uninitialized. |
120 ASSERT((list_[i].outer_try_index == -1) && | 120 ASSERT((list_[i].outer_try_index == -1) && |
121 (list_[i].pc_offset == ExceptionHandlers::kInvalidPcOffset)); | 121 (list_[i].pc_offset == ExceptionHandlers::kInvalidPcOffset)); |
122 handlers.SetHandlerInfo(i, | 122 handlers.SetHandlerInfo(i, |
123 list_[i].outer_try_index, | 123 list_[i].outer_try_index, |
124 list_[i].pc_offset, | 124 list_[i].pc_offset, |
125 list_[i].needs_stacktrace, | 125 list_[i].needs_stacktrace, |
126 has_catch_all); | 126 has_catch_all); |
127 handlers.SetHandledTypes(i, Array::null_array()); | 127 handlers.SetHandledTypes(i, Array::empty_array()); |
128 } else { | 128 } else { |
129 const bool has_catch_all = ContainsDynamic(*list_[i].handler_types); | 129 const bool has_catch_all = ContainsDynamic(*list_[i].handler_types); |
130 handlers.SetHandlerInfo(i, | 130 handlers.SetHandlerInfo(i, |
131 list_[i].outer_try_index, | 131 list_[i].outer_try_index, |
132 list_[i].pc_offset, | 132 list_[i].pc_offset, |
133 list_[i].needs_stacktrace, | 133 list_[i].needs_stacktrace, |
134 has_catch_all); | 134 has_catch_all); |
135 handlers.SetHandledTypes(i, *list_[i].handler_types); | 135 handlers.SetHandledTypes(i, *list_[i].handler_types); |
136 } | 136 } |
137 } | 137 } |
138 return handlers.raw(); | 138 return handlers.raw(); |
139 } | 139 } |
140 | 140 |
141 | 141 |
142 } // namespace dart | 142 } // namespace dart |
OLD | NEW |