| 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 #ifndef VM_CODE_DESCRIPTORS_H_ | 5 #ifndef VM_CODE_DESCRIPTORS_H_ |
| 6 #define VM_CODE_DESCRIPTORS_H_ | 6 #define VM_CODE_DESCRIPTORS_H_ |
| 7 | 7 |
| 8 #include "vm/ast.h" | 8 #include "vm/ast.h" |
| 9 #include "vm/code_generator.h" | 9 #include "vm/code_generator.h" |
| 10 #include "vm/globals.h" | 10 #include "vm/globals.h" |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 return Object::empty_exception_handlers().raw(); | 169 return Object::empty_exception_handlers().raw(); |
| 170 } | 170 } |
| 171 const ExceptionHandlers& handlers = | 171 const ExceptionHandlers& handlers = |
| 172 ExceptionHandlers::Handle(ExceptionHandlers::New(num_handlers)); | 172 ExceptionHandlers::Handle(ExceptionHandlers::New(num_handlers)); |
| 173 for (intptr_t i = 0; i < num_handlers; i++) { | 173 for (intptr_t i = 0; i < num_handlers; i++) { |
| 174 // Assert that every element in the array has been initialized. | 174 // Assert that every element in the array has been initialized. |
| 175 ASSERT(list_[i].handler_types != NULL); | 175 ASSERT(list_[i].handler_types != NULL); |
| 176 bool has_catch_all = ContainsDynamic(*list_[i].handler_types); | 176 bool has_catch_all = ContainsDynamic(*list_[i].handler_types); |
| 177 handlers.SetHandlerInfo(i, | 177 handlers.SetHandlerInfo(i, |
| 178 list_[i].outer_try_index, | 178 list_[i].outer_try_index, |
| 179 (entry_point + list_[i].pc_offset), | 179 list_[i].pc_offset, |
| 180 list_[i].needs_stacktrace, | 180 list_[i].needs_stacktrace, |
| 181 has_catch_all); | 181 has_catch_all); |
| 182 handlers.SetHandledTypes(i, *list_[i].handler_types); | 182 handlers.SetHandledTypes(i, *list_[i].handler_types); |
| 183 } | 183 } |
| 184 return handlers.raw(); | 184 return handlers.raw(); |
| 185 } | 185 } |
| 186 | 186 |
| 187 private: | 187 private: |
| 188 GrowableArray<struct HandlerDesc> list_; | 188 GrowableArray<struct HandlerDesc> list_; |
| 189 DISALLOW_COPY_AND_ASSIGN(ExceptionHandlerList); | 189 DISALLOW_COPY_AND_ASSIGN(ExceptionHandlerList); |
| 190 }; | 190 }; |
| 191 | 191 |
| 192 } // namespace dart | 192 } // namespace dart |
| 193 | 193 |
| 194 #endif // VM_CODE_DESCRIPTORS_H_ | 194 #endif // VM_CODE_DESCRIPTORS_H_ |
| OLD | NEW |