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

Unified Diff: runtime/vm/debugger.cc

Issue 1568353002: Don't test directly against Scanner::kNoSourcePos instead use >= 0. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/debugger.cc
diff --git a/runtime/vm/debugger.cc b/runtime/vm/debugger.cc
index 39dc8a8e863e2a2a3f0f892e2226eefc068a6e47..c533e3b44bd4836096979077e0b1e53fbe7b54a9 100644
--- a/runtime/vm/debugger.cc
+++ b/runtime/vm/debugger.cc
@@ -1740,7 +1740,7 @@ intptr_t Debugger::ResolveBreakpointPos(const Function& func,
PcDescriptors::Iterator iter(desc, kSafepointKind);
while (iter.MoveNext()) {
const intptr_t pos = iter.TokenPos();
- if ((pos == Scanner::kNoSourcePos) ||
+ if ((pos < 0) ||
(pos < requested_token_pos) ||
(pos > last_token_pos)) {
// Token is not in the target range.
@@ -1786,7 +1786,7 @@ intptr_t Debugger::ResolveBreakpointPos(const Function& func,
PcDescriptors::Iterator iter(desc, kSafepointKind);
while (iter.MoveNext()) {
const intptr_t pos = iter.TokenPos();
- if ((pos == Scanner::kNoSourcePos) ||
+ if ((pos < 0) ||
(pos < begin_pos) ||
(pos > end_of_line_pos)) {
// Token is not on same line as best fit.
@@ -1827,7 +1827,7 @@ intptr_t Debugger::ResolveBreakpointPos(const Function& func,
void Debugger::MakeCodeBreakpointAt(const Function& func,
BreakpointLocation* loc) {
- ASSERT(loc->token_pos_ != Scanner::kNoSourcePos);
+ ASSERT(loc->token_pos_ >= 0);
ASSERT((loc != NULL) && loc->IsResolved());
ASSERT(!func.HasOptimizedCode());
Code& code = Code::Handle(func.unoptimized_code());
@@ -2641,7 +2641,7 @@ RawError* Debugger::DebuggerStepCallback() {
if (!frame->IsDebuggable()) {
return Error::null();
}
- if (frame->TokenPos() == Scanner::kNoSourcePos) {
+ if (frame->TokenPos() < 0) {
return Error::null();
}
« no previous file with comments | « no previous file | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698