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

Unified Diff: src/debug/debug-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/compiler/code-generator.cc ('k') | src/deoptimizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug/debug-frames.cc
diff --git a/src/debug/debug-frames.cc b/src/debug/debug-frames.cc
index b1a8af256934d3e5d8ba93c49a9bce0d7c5e8d62..65c6a2647b289e272b4cd15b4d3df4c818e44393 100644
--- a/src/debug/debug-frames.cc
+++ b/src/debug/debug-frames.cc
@@ -68,17 +68,18 @@ Handle<Object> FrameInspector::GetExpression(int index) {
int FrameInspector::GetSourcePosition() {
- if (is_optimized_) {
- return deoptimized_frame_->GetSourcePosition();
- } else if (is_interpreted_) {
+ if (is_optimized_) return deoptimized_frame_->GetSourcePosition();
+ AbstractCode* code;
+ int code_offset;
+ if (is_interpreted_) {
InterpretedFrame* frame = reinterpret_cast<InterpretedFrame*>(frame_);
- BytecodeArray* bytecode_array = frame->GetBytecodeArray();
- return bytecode_array->SourcePosition(frame->GetBytecodeOffset());
+ code = AbstractCode::cast(frame->GetBytecodeArray());
+ code_offset = frame->GetBytecodeOffset();
} else {
- Code* code = frame_->LookupCode();
- int offset = static_cast<int>(frame_->pc() - code->instruction_start());
- return code->SourcePosition(offset);
+ code = AbstractCode::cast(frame_->LookupCode());
+ code_offset = static_cast<int>(frame_->pc() - code->instruction_start());
}
+ return code->SourcePosition(code_offset);
}
« no previous file with comments | « src/compiler/code-generator.cc ('k') | src/deoptimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698