| 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/debugger.h" | 5 #include "vm/debugger.h" |
| 6 | 6 |
| 7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
| 8 | 8 |
| 9 #include "vm/code_generator.h" | 9 #include "vm/code_generator.h" |
| 10 #include "vm/code_patcher.h" | 10 #include "vm/code_patcher.h" |
| (...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 550 frame_index++) { | 550 frame_index++) { |
| 551 ActivationFrame* frame = FrameAt(frame_index); | 551 ActivationFrame* frame = FrameAt(frame_index); |
| 552 intptr_t try_index = frame->TryIndex(); | 552 intptr_t try_index = frame->TryIndex(); |
| 553 if (try_index < 0) continue; | 553 if (try_index < 0) continue; |
| 554 handlers = frame->code().exception_handlers(); | 554 handlers = frame->code().exception_handlers(); |
| 555 ASSERT(!handlers.IsNull()); | 555 ASSERT(!handlers.IsNull()); |
| 556 intptr_t num_handlers_checked = 0; | 556 intptr_t num_handlers_checked = 0; |
| 557 while (try_index >= 0) { | 557 while (try_index >= 0) { |
| 558 // Detect circles in the exception handler data. | 558 // Detect circles in the exception handler data. |
| 559 num_handlers_checked++; | 559 num_handlers_checked++; |
| 560 ASSERT(num_handlers_checked <= handlers.Length()); | 560 ASSERT(num_handlers_checked <= handlers.num_entries()); |
| 561 handled_types = handlers.GetHandledTypes(try_index); | 561 handled_types = handlers.GetHandledTypes(try_index); |
| 562 const intptr_t num_types = handled_types.Length(); | 562 const intptr_t num_types = handled_types.Length(); |
| 563 for (intptr_t k = 0; k < num_types; k++) { | 563 for (intptr_t k = 0; k < num_types; k++) { |
| 564 type ^= handled_types.At(k); | 564 type ^= handled_types.At(k); |
| 565 ASSERT(!type.IsNull()); | 565 ASSERT(!type.IsNull()); |
| 566 // Uninstantiated types are not added to ExceptionHandlers data. | 566 // Uninstantiated types are not added to ExceptionHandlers data. |
| 567 ASSERT(type.IsInstantiated()); | 567 ASSERT(type.IsInstantiated()); |
| 568 if (type.IsDynamicType()) return frame; | 568 if (type.IsDynamicType()) return frame; |
| 569 if (type.IsMalformed()) continue; | 569 if (type.IsMalformed()) continue; |
| 570 if (exc_obj.IsInstanceOf(type, no_instantiator, NULL)) { | 570 if (exc_obj.IsInstanceOf(type, no_instantiator, NULL)) { |
| (...skipping 2012 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2583 } | 2583 } |
| 2584 | 2584 |
| 2585 | 2585 |
| 2586 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { | 2586 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { |
| 2587 ASSERT(bpt->next() == NULL); | 2587 ASSERT(bpt->next() == NULL); |
| 2588 bpt->set_next(code_breakpoints_); | 2588 bpt->set_next(code_breakpoints_); |
| 2589 code_breakpoints_ = bpt; | 2589 code_breakpoints_ = bpt; |
| 2590 } | 2590 } |
| 2591 | 2591 |
| 2592 } // namespace dart | 2592 } // namespace dart |
| OLD | NEW |