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

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

Issue 582743002: Emit comment with instruction+reason before deopt calls. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased Created 6 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/x87/lithium-codegen-x87.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x87/lithium-codegen-x87.cc
diff --git a/src/x87/lithium-codegen-x87.cc b/src/x87/lithium-codegen-x87.cc
index 67f8a7857b809dc9b56b0e13a9d5d741384e126b..ac67bb2f748e4918dc2d3e6cb96b79df8c76a759 100644
--- a/src/x87/lithium-codegen-x87.cc
+++ b/src/x87/lithium-codegen-x87.cc
@@ -364,16 +364,18 @@ bool LCodeGen::GenerateJumpTable() {
Comment(";;; -------------------- Jump table --------------------");
}
for (int i = 0; i < jump_table_.length(); i++) {
- __ bind(&jump_table_[i].label);
- Address entry = jump_table_[i].address;
- Deoptimizer::BailoutType type = jump_table_[i].bailout_type;
+ Deoptimizer::JumpTableEntry* table_entry = &jump_table_[i];
+ __ bind(&table_entry->label);
+ Address entry = table_entry->address;
+ Deoptimizer::BailoutType type = table_entry->bailout_type;
int id = Deoptimizer::GetDeoptimizationId(isolate(), entry, type);
if (id == Deoptimizer::kNotDeoptimizationEntry) {
Comment(";;; jump table entry %d.", i);
} else {
Comment(";;; jump table entry %d: deoptimization bailout %d.", i, id);
}
- if (jump_table_[i].needs_frame) {
+ DeoptComment(table_entry->mnemonic, table_entry->reason);
+ if (table_entry->needs_frame) {
DCHECK(!info()->saves_caller_doubles());
__ push(Immediate(ExternalReference::ForDeoptEntry(entry)));
if (needs_frame.is_bound()) {
@@ -1008,6 +1010,7 @@ void LCodeGen::RegisterEnvironmentForDeoptimization(
void LCodeGen::DeoptimizeIf(Condition cc, LInstruction* instr,
+ const char* reason,
Deoptimizer::BailoutType bailout_type) {
LEnvironment* environment = instr->environment();
RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt);
@@ -1062,6 +1065,7 @@ void LCodeGen::DeoptimizeIf(Condition cc, LInstruction* instr,
DCHECK(info()->IsStub() || frame_is_built_);
if (cc == no_condition && frame_is_built_) {
+ DeoptComment(instr->Mnemonic(), reason);
__ call(entry, RelocInfo::RUNTIME_ENTRY);
} else {
// We often have several deopts to the same entry, reuse the last
@@ -1070,9 +1074,8 @@ void LCodeGen::DeoptimizeIf(Condition cc, LInstruction* instr,
jump_table_.last().address != entry ||
jump_table_.last().needs_frame != !frame_is_built_ ||
jump_table_.last().bailout_type != bailout_type) {
- Deoptimizer::JumpTableEntry table_entry(entry,
- bailout_type,
- !frame_is_built_);
+ Deoptimizer::JumpTableEntry table_entry(entry, instr->Mnemonic(), reason,
+ bailout_type, !frame_is_built_);
jump_table_.Add(table_entry, zone());
}
if (cc == no_condition) {
@@ -1084,11 +1087,12 @@ void LCodeGen::DeoptimizeIf(Condition cc, LInstruction* instr,
}
-void LCodeGen::DeoptimizeIf(Condition cc, LInstruction* instr) {
+void LCodeGen::DeoptimizeIf(Condition cc, LInstruction* instr,
+ const char* reason) {
Deoptimizer::BailoutType bailout_type = info()->IsStub()
? Deoptimizer::LAZY
: Deoptimizer::EAGER;
- DeoptimizeIf(cc, instr, bailout_type);
+ DeoptimizeIf(cc, instr, reason, bailout_type);
}
@@ -5528,8 +5532,7 @@ void LCodeGen::DoDeoptimize(LDeoptimize* instr) {
if (info()->IsStub() && type == Deoptimizer::EAGER) {
type = Deoptimizer::LAZY;
}
- Comment(";;; deoptimize: %s", instr->hydrogen()->reason());
- DeoptimizeIf(no_condition, instr, type);
+ DeoptimizeIf(no_condition, instr, instr->hydrogen()->reason(), type);
}
« no previous file with comments | « src/x87/lithium-codegen-x87.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698