Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Side by Side Diff: runtime/vm/debugger.cc

Issue 2646093006: Fix debugger's calculation of the context level in async code. (Closed)
Patch Set: remove dead code Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/observatory/tests/service/regress_28443_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « runtime/observatory/tests/service/regress_28443_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698