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

Unified Diff: runtime/vm/object.cc

Issue 11696005: Improve line info accuracy in debugging (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years 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 | « runtime/vm/intrinsifier.h ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 16548)
+++ runtime/vm/object.cc (working copy)
@@ -2340,7 +2340,7 @@
for (intptr_t i = 0; i < len; i++) {
func ^= funcs.At(i);
if ((func.token_pos() <= token_pos) &&
- (token_pos < func.end_token_pos())) {
+ (token_pos <= func.end_token_pos())) {
return func.raw();
}
}
@@ -5667,7 +5667,14 @@
// Script does not contain the given line number.
return Function::null();
}
- return LookupFunctionInScript(script, first_token_pos);
+ Function& func = Function::Handle();
+ for (intptr_t pos = first_token_pos; pos <= last_token_pos; pos++) {
+ func = LookupFunctionInScript(script, pos);
+ if (!func.IsNull()) {
+ return func.raw();
+ }
+ }
+ return Function::null();
}
« no previous file with comments | « runtime/vm/intrinsifier.h ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698