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

Unified Diff: src/mips64/lithium-codegen-mips64.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/mips64/lithium-codegen-mips64.h ('k') | src/x64/lithium-codegen-x64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips64/lithium-codegen-mips64.cc
diff --git a/src/mips64/lithium-codegen-mips64.cc b/src/mips64/lithium-codegen-mips64.cc
index d060d16ee6cfe9213671f5473260973c5901c58e..965486cb244790402b7c80bdcb61bba6be951971 100644
--- a/src/mips64/lithium-codegen-mips64.cc
+++ b/src/mips64/lithium-codegen-mips64.cc
@@ -774,7 +774,8 @@ void LCodeGen::RegisterEnvironmentForDeoptimization(LEnvironment* environment,
void LCodeGen::DeoptimizeIf(Condition condition, LInstruction* instr,
Deoptimizer::BailoutType bailout_type,
- Register src1, const Operand& src2) {
+ Register src1, const Operand& src2,
+ const char* reason) {
LEnvironment* environment = instr->environment();
RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt);
DCHECK(environment->HasBeenRegistered());
@@ -820,6 +821,7 @@ void LCodeGen::DeoptimizeIf(Condition condition, LInstruction* instr,
// restore caller doubles.
if (condition == al && frame_is_built_ &&
!info()->saves_caller_doubles()) {
+ DeoptComment(instr->Mnemonic(), reason);
__ Call(entry, RelocInfo::RUNTIME_ENTRY, condition, src1, src2);
} else {
// We often have several deopts to the same entry, reuse the last
@@ -828,9 +830,8 @@ void LCodeGen::DeoptimizeIf(Condition condition, LInstruction* instr,
(deopt_jump_table_.last().address != entry) ||
(deopt_jump_table_.last().bailout_type != bailout_type) ||
(deopt_jump_table_.last().needs_frame != !frame_is_built_)) {
- Deoptimizer::JumpTableEntry table_entry(entry,
- bailout_type,
- !frame_is_built_);
+ Deoptimizer::JumpTableEntry table_entry(entry, instr->Mnemonic(), reason,
+ bailout_type, !frame_is_built_);
deopt_jump_table_.Add(table_entry, zone());
}
__ Branch(&deopt_jump_table_.last().label, condition, src1, src2);
@@ -839,11 +840,12 @@ void LCodeGen::DeoptimizeIf(Condition condition, LInstruction* instr,
void LCodeGen::DeoptimizeIf(Condition condition, LInstruction* instr,
- Register src1, const Operand& src2) {
+ Register src1, const Operand& src2,
+ const char* reason) {
Deoptimizer::BailoutType bailout_type = info()->IsStub()
? Deoptimizer::LAZY
: Deoptimizer::EAGER;
- DeoptimizeIf(condition, instr, bailout_type, src1, src2);
+ DeoptimizeIf(condition, instr, bailout_type, src1, src2, reason);
}
@@ -5712,8 +5714,8 @@ void LCodeGen::DoDeoptimize(LDeoptimize* instr) {
type = Deoptimizer::LAZY;
}
- Comment(";;; deoptimize: %s", instr->hydrogen()->reason());
- DeoptimizeIf(al, instr, type, zero_reg, Operand(zero_reg));
+ DeoptimizeIf(al, instr, type, zero_reg, Operand(zero_reg),
+ instr->hydrogen()->reason());
}
« no previous file with comments | « src/mips64/lithium-codegen-mips64.h ('k') | src/x64/lithium-codegen-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698