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

Unified Diff: src/isolate.cc

Issue 1331603002: Use baseline code to compute message locations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix RobustSubStringStub. Created 5 years, 3 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 | « src/full-codegen/x87/full-codegen-x87.cc ('k') | src/scopes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index d60a481c201bd6428d7f1c6efbd713587a2970b5..445480a3eb46d860ded047f0ae9d8276172814e9 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -1266,9 +1266,14 @@ bool Isolate::ComputeLocation(MessageLocation* target) {
Object* script = fun->shared()->script();
if (script->IsScript() &&
!(Script::cast(script)->source()->IsUndefined())) {
- int pos = frame->LookupCode()->SourcePosition(frame->pc());
- // Compute the location from the function and the reloc info.
Handle<Script> casted_script(Script::cast(script));
+ // Compute the location from the function and the relocation info of the
+ // baseline code. For optimized code this will use the deoptimization
+ // information to get canonical location information.
+ List<FrameSummary> frames(FLAG_max_inlining_levels + 1);
+ it.frame()->Summarize(&frames);
+ FrameSummary& summary = frames.last();
+ int pos = summary.code()->SourcePosition(summary.pc());
*target = MessageLocation(casted_script, pos, pos + 1, handle(fun));
return true;
}
« no previous file with comments | « src/full-codegen/x87/full-codegen-x87.cc ('k') | src/scopes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698