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); |
106 handlers.SetHandledTypes(i, Array::empty_array()); | 107 handlers.SetHandledTypes(i, Array::empty_array()); |
107 } else { | 108 } else { |
108 const bool has_catch_all = ContainsDynamic(*list_[i].handler_types); | 109 const bool has_catch_all = ContainsDynamic(*list_[i].handler_types); |
109 handlers.SetHandlerInfo(i, list_[i].outer_try_index, list_[i].pc_offset, | 110 handlers.SetHandlerInfo(i, list_[i].outer_try_index, list_[i].pc_offset, |
110 list_[i].needs_stacktrace, has_catch_all); | 111 list_[i].needs_stacktrace, has_catch_all, |
| 112 list_[i].token_pos, list_[i].is_generated); |
111 handlers.SetHandledTypes(i, *list_[i].handler_types); | 113 handlers.SetHandledTypes(i, *list_[i].handler_types); |
112 } | 114 } |
113 } | 115 } |
114 return handlers.raw(); | 116 return handlers.raw(); |
115 } | 117 } |
116 | 118 |
117 | 119 |
118 static uint8_t* zone_allocator(uint8_t* ptr, | 120 static uint8_t* zone_allocator(uint8_t* ptr, |
119 intptr_t old_size, | 121 intptr_t old_size, |
120 intptr_t new_size) { | 122 intptr_t new_size) { |
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 break; | 543 break; |
542 } | 544 } |
543 default: | 545 default: |
544 UNREACHABLE(); | 546 UNREACHABLE(); |
545 } | 547 } |
546 } | 548 } |
547 THR_Print("}\n"); | 549 THR_Print("}\n"); |
548 } | 550 } |
549 | 551 |
550 } // namespace dart | 552 } // namespace dart |
OLD | NEW |