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

Unified Diff: src/frames.cc

Issue 2109673003: Use source position table in turbofan code. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: drive-by fix for relocation info size reservation Created 4 years, 6 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/deoptimizer.cc ('k') | src/ia32/deoptimizer-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/frames.cc
diff --git a/src/frames.cc b/src/frames.cc
index a7bd91a79636a2bb601d0bdade272e10a3467609..2bb4ffb36d3f55d1738f4ed61eaf59badb2dad15 100644
--- a/src/frames.cc
+++ b/src/frames.cc
@@ -886,7 +886,7 @@ void JavaScriptFrame::PrintFunctionAndOffset(JSFunction* function, Code* code,
PrintF(file, "+%d", code_offset);
if (print_line_number) {
SharedFunctionInfo* shared = function->shared();
- int source_pos = code->SourcePosition(code_offset);
+ int source_pos = AbstractCode::cast(code)->SourcePosition(code_offset);
Object* maybe_script = shared->script();
if (maybe_script->IsScript()) {
Script* script = Script::cast(maybe_script);
@@ -1408,7 +1408,7 @@ void JavaScriptFrame::Print(StringStream* accumulator,
if (code != NULL && code->kind() == Code::FUNCTION &&
pc >= code->instruction_start() && pc < code->instruction_end()) {
int offset = static_cast<int>(pc - code->instruction_start());
- int source_pos = code->SourcePosition(offset);
+ int source_pos = AbstractCode::cast(code)->SourcePosition(offset);
int line = script->GetLineNumber(source_pos) + 1;
accumulator->Add(":%d] [pc=%p]", line, pc);
} else if (is_interpreted()) {
@@ -1416,7 +1416,7 @@ void JavaScriptFrame::Print(StringStream* accumulator,
reinterpret_cast<const InterpretedFrame*>(this);
BytecodeArray* bytecodes = iframe->GetBytecodeArray();
int offset = iframe->GetBytecodeOffset();
- int source_pos = bytecodes->SourcePosition(offset);
+ int source_pos = AbstractCode::cast(bytecodes)->SourcePosition(offset);
int line = script->GetLineNumber(source_pos) + 1;
accumulator->Add(":%d] [bytecode=%p offset=%d]", line, bytecodes, offset);
} else {
« no previous file with comments | « src/deoptimizer.cc ('k') | src/ia32/deoptimizer-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698