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

Unified Diff: src/deoptimizer.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/debug/debug-frames.cc ('k') | src/frames.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/deoptimizer.cc
diff --git a/src/deoptimizer.cc b/src/deoptimizer.cc
index 4cf41a9f277cadcfd3d4a99f12ea9754d8411591..3ca77b8374dea5cbb6b9930aae8b0e902e53cf9a 100644
--- a/src/deoptimizer.cc
+++ b/src/deoptimizer.cc
@@ -2783,19 +2783,20 @@ Deoptimizer::DeoptInfo Deoptimizer::GetDeoptInfo(Code* code, Address pc) {
// static
int Deoptimizer::ComputeSourcePosition(SharedFunctionInfo* shared,
BailoutId node_id) {
- if (shared->HasBytecodeArray()) {
- BytecodeArray* bytecodes = shared->bytecode_array();
+ AbstractCode* abstract_code = shared->abstract_code();
+ int code_offset;
+ if (abstract_code->IsBytecodeArray()) {
// BailoutId points to the next bytecode in the bytecode aray. Subtract
// 1 to get the end of current bytecode.
- return bytecodes->SourcePosition(node_id.ToInt() - 1);
+ code_offset = node_id.ToInt() - 1;
} else {
- Code* non_optimized_code = shared->code();
- FixedArray* raw_data = non_optimized_code->deoptimization_data();
+ FixedArray* raw_data = abstract_code->GetCode()->deoptimization_data();
DeoptimizationOutputData* data = DeoptimizationOutputData::cast(raw_data);
unsigned pc_and_state = Deoptimizer::GetOutputInfo(data, node_id, shared);
- unsigned pc_offset = FullCodeGenerator::PcField::decode(pc_and_state);
- return non_optimized_code->SourcePosition(pc_offset);
+ code_offset =
+ static_cast<int>(FullCodeGenerator::PcField::decode(pc_and_state));
}
+ return abstract_code->SourcePosition(code_offset);
}
// static
« no previous file with comments | « src/debug/debug-frames.cc ('k') | src/frames.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698