| 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 #include "vm/log.h" | 7 #include "vm/log.h" |
| 8 | 8 |
| 9 namespace dart { | 9 namespace dart { |
| 10 | 10 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 for (intptr_t i = 0; i < num_handlers; i++) { | 95 for (intptr_t i = 0; i < num_handlers; i++) { |
| 96 // Assert that every element in the array has been initialized. | 96 // Assert that every element in the array has been initialized. |
| 97 if (list_[i].handler_types == NULL) { | 97 if (list_[i].handler_types == NULL) { |
| 98 // Unreachable handler, entry not computed. | 98 // Unreachable handler, entry not computed. |
| 99 // Initialize it to some meaningful value. | 99 // Initialize it to some meaningful value. |
| 100 const bool has_catch_all = false; | 100 const bool has_catch_all = false; |
| 101 // Check it is uninitialized. | 101 // Check it is uninitialized. |
| 102 ASSERT((list_[i].outer_try_index == -1) && | 102 ASSERT((list_[i].outer_try_index == -1) && |
| 103 (list_[i].pc_offset == ExceptionHandlers::kInvalidPcOffset)); | 103 (list_[i].pc_offset == ExceptionHandlers::kInvalidPcOffset)); |
| 104 handlers.SetHandlerInfo(i, list_[i].outer_try_index, list_[i].pc_offset, | 104 handlers.SetHandlerInfo(i, list_[i].outer_try_index, list_[i].pc_offset, |
| 105 list_[i].needs_stacktrace, has_catch_all, | 105 list_[i].needs_stacktrace, has_catch_all); |
| 106 list_[i].token_pos, list_[i].is_generated); | |
| 107 handlers.SetHandledTypes(i, Array::empty_array()); | 106 handlers.SetHandledTypes(i, Array::empty_array()); |
| 108 } else { | 107 } else { |
| 109 const bool has_catch_all = ContainsDynamic(*list_[i].handler_types); | 108 const bool has_catch_all = ContainsDynamic(*list_[i].handler_types); |
| 110 handlers.SetHandlerInfo(i, list_[i].outer_try_index, list_[i].pc_offset, | 109 handlers.SetHandlerInfo(i, list_[i].outer_try_index, list_[i].pc_offset, |
| 111 list_[i].needs_stacktrace, has_catch_all, | 110 list_[i].needs_stacktrace, has_catch_all); |
| 112 list_[i].token_pos, list_[i].is_generated); | |
| 113 handlers.SetHandledTypes(i, *list_[i].handler_types); | 111 handlers.SetHandledTypes(i, *list_[i].handler_types); |
| 114 } | 112 } |
| 115 } | 113 } |
| 116 return handlers.raw(); | 114 return handlers.raw(); |
| 117 } | 115 } |
| 118 | 116 |
| 119 | 117 |
| 120 static uint8_t* zone_allocator(uint8_t* ptr, | 118 static uint8_t* zone_allocator(uint8_t* ptr, |
| 121 intptr_t old_size, | 119 intptr_t old_size, |
| 122 intptr_t new_size) { | 120 intptr_t new_size) { |
| (...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 543 break; | 541 break; |
| 544 } | 542 } |
| 545 default: | 543 default: |
| 546 UNREACHABLE(); | 544 UNREACHABLE(); |
| 547 } | 545 } |
| 548 } | 546 } |
| 549 THR_Print("}\n"); | 547 THR_Print("}\n"); |
| 550 } | 548 } |
| 551 | 549 |
| 552 } // namespace dart | 550 } // namespace dart |
| OLD | NEW |