| 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 "platform/address_sanitizer.h" | 9 #include "platform/address_sanitizer.h" |
| 10 | 10 |
| (...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 631 TokenPosition activation_token_pos = TokenPos(); | 631 TokenPosition activation_token_pos = TokenPos(); |
| 632 ASSERT(activation_token_pos.IsReal()); | 632 ASSERT(activation_token_pos.IsReal()); |
| 633 GetVarDescriptors(); | 633 GetVarDescriptors(); |
| 634 intptr_t var_desc_len = var_descriptors_.Length(); | 634 intptr_t var_desc_len = var_descriptors_.Length(); |
| 635 for (intptr_t cur_idx = 0; cur_idx < var_desc_len; cur_idx++) { | 635 for (intptr_t cur_idx = 0; cur_idx < var_desc_len; cur_idx++) { |
| 636 RawLocalVarDescriptors::VarInfo var_info; | 636 RawLocalVarDescriptors::VarInfo var_info; |
| 637 var_descriptors_.GetInfo(cur_idx, &var_info); | 637 var_descriptors_.GetInfo(cur_idx, &var_info); |
| 638 const int8_t kind = var_info.kind(); | 638 const int8_t kind = var_info.kind(); |
| 639 if ((kind == RawLocalVarDescriptors::kContextLevel) && | 639 if ((kind == RawLocalVarDescriptors::kContextLevel) && |
| 640 (var_info.begin_pos <= activation_token_pos) && | 640 (var_info.begin_pos <= activation_token_pos) && |
| 641 (activation_token_pos < var_info.end_pos)) { | 641 (activation_token_pos <= var_info.end_pos)) { |
| 642 // This var_descriptors_ entry is a context scope which is in scope | 642 // This var_descriptors_ entry is a context scope which is in scope |
| 643 // of the current token position. Now check whether it is shadowing | 643 // of the current token position. Now check whether it is shadowing |
| 644 // the previous context scope. | 644 // the previous context scope. |
| 645 if (innermost_begin_pos < var_info.begin_pos) { | 645 if (innermost_begin_pos < var_info.begin_pos) { |
| 646 innermost_begin_pos = var_info.begin_pos; | 646 innermost_begin_pos = var_info.begin_pos; |
| 647 context_level_ = var_info.index(); | 647 context_level_ = var_info.index(); |
| 648 } | 648 } |
| 649 } | 649 } |
| 650 } | 650 } |
| 651 ASSERT(context_level_ >= 0); | 651 ASSERT(context_level_ >= 0); |
| (...skipping 2947 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3599 | 3599 |
| 3600 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { | 3600 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { |
| 3601 ASSERT(bpt->next() == NULL); | 3601 ASSERT(bpt->next() == NULL); |
| 3602 bpt->set_next(code_breakpoints_); | 3602 bpt->set_next(code_breakpoints_); |
| 3603 code_breakpoints_ = bpt; | 3603 code_breakpoints_ = bpt; |
| 3604 } | 3604 } |
| 3605 | 3605 |
| 3606 #endif // !PRODUCT | 3606 #endif // !PRODUCT |
| 3607 | 3607 |
| 3608 } // namespace dart | 3608 } // namespace dart |
| OLD | NEW |