| 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 677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 688 TokenPosition activation_token_pos = TokenPos(); | 688 TokenPosition activation_token_pos = TokenPos(); |
| 689 ASSERT(activation_token_pos.IsReal()); | 689 ASSERT(activation_token_pos.IsReal()); |
| 690 GetVarDescriptors(); | 690 GetVarDescriptors(); |
| 691 intptr_t var_desc_len = var_descriptors_.Length(); | 691 intptr_t var_desc_len = var_descriptors_.Length(); |
| 692 for (intptr_t cur_idx = 0; cur_idx < var_desc_len; cur_idx++) { | 692 for (intptr_t cur_idx = 0; cur_idx < var_desc_len; cur_idx++) { |
| 693 RawLocalVarDescriptors::VarInfo var_info; | 693 RawLocalVarDescriptors::VarInfo var_info; |
| 694 var_descriptors_.GetInfo(cur_idx, &var_info); | 694 var_descriptors_.GetInfo(cur_idx, &var_info); |
| 695 const int8_t kind = var_info.kind(); | 695 const int8_t kind = var_info.kind(); |
| 696 if ((kind == RawLocalVarDescriptors::kContextLevel) && | 696 if ((kind == RawLocalVarDescriptors::kContextLevel) && |
| 697 (var_info.begin_pos <= activation_token_pos) && | 697 (var_info.begin_pos <= activation_token_pos) && |
| 698 (activation_token_pos <= var_info.end_pos)) { | 698 (activation_token_pos < var_info.end_pos)) { |
| 699 // This var_descriptors_ entry is a context scope which is in scope | 699 // This var_descriptors_ entry is a context scope which is in scope |
| 700 // of the current token position. Now check whether it is shadowing | 700 // of the current token position. Now check whether it is shadowing |
| 701 // the previous context scope. | 701 // the previous context scope. |
| 702 if (innermost_begin_pos < var_info.begin_pos) { | 702 if (innermost_begin_pos < var_info.begin_pos) { |
| 703 innermost_begin_pos = var_info.begin_pos; | 703 innermost_begin_pos = var_info.begin_pos; |
| 704 context_level_ = var_info.index(); | 704 context_level_ = var_info.index(); |
| 705 } | 705 } |
| 706 } | 706 } |
| 707 } | 707 } |
| 708 ASSERT(context_level_ >= 0); | 708 ASSERT(context_level_ >= 0); |
| (...skipping 3402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4111 | 4111 |
| 4112 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { | 4112 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { |
| 4113 ASSERT(bpt->next() == NULL); | 4113 ASSERT(bpt->next() == NULL); |
| 4114 bpt->set_next(code_breakpoints_); | 4114 bpt->set_next(code_breakpoints_); |
| 4115 code_breakpoints_ = bpt; | 4115 code_breakpoints_ = bpt; |
| 4116 } | 4116 } |
| 4117 | 4117 |
| 4118 #endif // !PRODUCT | 4118 #endif // !PRODUCT |
| 4119 | 4119 |
| 4120 } // namespace dart | 4120 } // namespace dart |
| OLD | NEW |