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

Unified Diff: src/crankshaft/lithium-codegen.cc

Issue 2101523003: Use source position table for crankshaft code. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@sourcepos
Patch Set: rebase 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/crankshaft/lithium-codegen.h ('k') | src/crankshaft/mips/lithium-codegen-mips.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/lithium-codegen.cc
diff --git a/src/crankshaft/lithium-codegen.cc b/src/crankshaft/lithium-codegen.cc
index 4bf2100f07ee5b4733136712efbd171af82eda25..c2401b2400d50c58753a2126397a3a17c57b8bbd 100644
--- a/src/crankshaft/lithium-codegen.cc
+++ b/src/crankshaft/lithium-codegen.cc
@@ -45,7 +45,6 @@ HGraph* LCodeGenBase::graph() const {
return chunk()->graph();
}
-
LCodeGenBase::LCodeGenBase(LChunk* chunk, MacroAssembler* assembler,
CompilationInfo* info)
: chunk_(static_cast<LPlatformChunk*>(chunk)),
@@ -61,8 +60,8 @@ LCodeGenBase::LCodeGenBase(LChunk* chunk, MacroAssembler* assembler,
translations_(info->zone()),
inlined_function_count_(0),
last_lazy_deopt_pc_(0),
- osr_pc_offset_(-1) {}
-
+ osr_pc_offset_(-1),
+ source_position_table_builder_(info->isolate(), info->zone()) {}
bool LCodeGenBase::GenerateBody() {
DCHECK(is_generating());
@@ -137,6 +136,10 @@ void LCodeGenBase::CheckEnvironmentUsage() {
#endif
}
+void LCodeGenBase::RecordAndWritePosition(int pos) {
+ if (pos == RelocInfo::kNoPosition) return;
+ source_position_table_builder_.AddPosition(masm_->pc_offset(), pos, false);
+}
void LCodeGenBase::Comment(const char* format, ...) {
if (!FLAG_code_comments) return;
@@ -371,5 +374,6 @@ Deoptimizer::DeoptInfo LCodeGenBase::MakeDeoptInfo(
deopt_reason, deopt_id);
return deopt_info;
}
+
} // namespace internal
} // namespace v8
« no previous file with comments | « src/crankshaft/lithium-codegen.h ('k') | src/crankshaft/mips/lithium-codegen-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698