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

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

Issue 144343002: Rename kDummyTokenIndex to kNoSourcePos (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/debugger_api_impl.cc » ('j') | 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 "vm/code_generator.h" 9 #include "vm/code_generator.h"
10 #include "vm/code_patcher.h" 10 #include "vm/code_patcher.h"
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 (kind == PcDescriptors::kOptStaticCall) || 695 (kind == PcDescriptors::kOptStaticCall) ||
696 (kind == PcDescriptors::kUnoptStaticCall) || 696 (kind == PcDescriptors::kUnoptStaticCall) ||
697 (kind == PcDescriptors::kClosureCall) || 697 (kind == PcDescriptors::kClosureCall) ||
698 (kind == PcDescriptors::kReturn) || 698 (kind == PcDescriptors::kReturn) ||
699 (kind == PcDescriptors::kRuntimeCall)); 699 (kind == PcDescriptors::kRuntimeCall));
700 } 700 }
701 701
702 702
703 static bool IsSafePoint(const PcDescriptors& desc, intptr_t i) { 703 static bool IsSafePoint(const PcDescriptors& desc, intptr_t i) {
704 return IsSafeDescKind(desc.DescriptorKind(i)) && 704 return IsSafeDescKind(desc.DescriptorKind(i)) &&
705 (desc.TokenPos(i) != Scanner::kDummyTokenIndex); 705 (desc.TokenPos(i) != Scanner::kNoSourcePos);
706 } 706 }
707 707
708 708
709 CodeBreakpoint::CodeBreakpoint(const Function& func, intptr_t pc_desc_index) 709 CodeBreakpoint::CodeBreakpoint(const Function& func, intptr_t pc_desc_index)
710 : function_(func.raw()), 710 : function_(func.raw()),
711 pc_desc_index_(pc_desc_index), 711 pc_desc_index_(pc_desc_index),
712 pc_(0), 712 pc_(0),
713 line_number_(-1), 713 line_number_(-1),
714 is_enabled_(false), 714 is_enabled_(false),
715 src_bpt_(NULL), 715 src_bpt_(NULL),
(...skipping 1171 matching lines...) Expand 10 before | Expand all | Expand 10 after
1887 if (IsPaused()) return; 1887 if (IsPaused()) return;
1888 1888
1889 // Check whether we are in a Dart function that the user is 1889 // Check whether we are in a Dart function that the user is
1890 // interested in. 1890 // interested in.
1891 ActivationFrame* frame = TopDartFrame(); 1891 ActivationFrame* frame = TopDartFrame();
1892 ASSERT(frame != NULL); 1892 ASSERT(frame != NULL);
1893 const Function& func = frame->function(); 1893 const Function& func = frame->function();
1894 if (!IsDebuggable(func)) { 1894 if (!IsDebuggable(func)) {
1895 return; 1895 return;
1896 } 1896 }
1897 if (frame->TokenPos() == Scanner::kDummyTokenIndex) { 1897 if (frame->TokenPos() == Scanner::kNoSourcePos) {
1898 return; 1898 return;
1899 } 1899 }
1900 // Don't pause for a single step if there is a breakpoint set 1900 // Don't pause for a single step if there is a breakpoint set
1901 // at this location. 1901 // at this location.
1902 if (HasActiveBreakpoint(frame->pc())) { 1902 if (HasActiveBreakpoint(frame->pc())) {
1903 return; 1903 return;
1904 } 1904 }
1905 1905
1906 if (FLAG_verbose_debug) { 1906 if (FLAG_verbose_debug) {
1907 OS::Print(">>> single step break at %s:%" Pd " (func %s token %" Pd ")\n", 1907 OS::Print(">>> single step break at %s:%" Pd " (func %s token %" Pd ")\n",
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
2240 } 2240 }
2241 2241
2242 2242
2243 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { 2243 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) {
2244 ASSERT(bpt->next() == NULL); 2244 ASSERT(bpt->next() == NULL);
2245 bpt->set_next(code_breakpoints_); 2245 bpt->set_next(code_breakpoints_);
2246 code_breakpoints_ = bpt; 2246 code_breakpoints_ = bpt;
2247 } 2247 }
2248 2248
2249 } // namespace dart 2249 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/debugger_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698