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

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

Issue 585423002: Merge RecordComment invocations into DeoptimizeIf calls. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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/ia32/lithium-codegen-ia32.cc ('k') | src/mips64/lithium-codegen-mips64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips/lithium-codegen-mips.cc
diff --git a/src/mips/lithium-codegen-mips.cc b/src/mips/lithium-codegen-mips.cc
index 5ea68b2e46b14d46eb35fc996c1a3580dd69d173..7f831be85e90da6a52b0012a2d2cbb607bd7b3fe 100644
--- a/src/mips/lithium-codegen-mips.cc
+++ b/src/mips/lithium-codegen-mips.cc
@@ -334,21 +334,23 @@ bool LCodeGen::GenerateJumpTable() {
int length = deopt_jump_table_.length();
for (int i = 0; i < length; i++) {
- __ bind(&deopt_jump_table_[i].label);
+ Deoptimizer::JumpTableEntry* table_entry = &deopt_jump_table_[i];
+ __ bind(&table_entry->label);
- Deoptimizer::BailoutType type = deopt_jump_table_[i].bailout_type;
+ Deoptimizer::BailoutType type = table_entry->bailout_type;
DCHECK(type == deopt_jump_table_[0].bailout_type);
- Address entry = deopt_jump_table_[i].address;
+ Address entry = table_entry->address;
int id = Deoptimizer::GetDeoptimizationId(isolate(), entry, type);
DCHECK_NE(Deoptimizer::kNotDeoptimizationEntry, id);
Comment(";;; jump table entry %d: deoptimization bailout %d.", i, id);
+ DeoptComment(table_entry->reason);
// Second-level deopt table entries are contiguous and small, so instead
// of loading the full, absolute address of each one, load an immediate
// offset which will be added to the base address later.
__ li(entry_offset, Operand(entry - base));
- if (deopt_jump_table_[i].needs_frame) {
+ if (table_entry->needs_frame) {
DCHECK(!info()->saves_caller_doubles());
if (needs_frame.is_bound()) {
__ Branch(&needs_frame);
@@ -4926,13 +4928,11 @@ void LCodeGen::DoDeferredTaggedToI(LTaggedToI* instr) {
__ bind(&check_false);
__ LoadRoot(at, Heap::kFalseValueRootIndex);
- __ RecordComment("Deferred TaggedToI: cannot truncate");
- DeoptimizeIf(ne, instr, scratch2, Operand(at));
+ DeoptimizeIf(ne, instr, scratch2, Operand(at), "cannot truncate");
__ Branch(USE_DELAY_SLOT, &done);
__ mov(input_reg, zero_reg); // In delay slot.
} else {
- __ RecordComment("Deferred TaggedToI: not a heap number");
- DeoptimizeIf(ne, instr, scratch1, Operand(at));
+ DeoptimizeIf(ne, instr, scratch1, Operand(at), "not a heap number");
// Load the double value.
__ ldc1(double_scratch,
@@ -4947,16 +4947,15 @@ void LCodeGen::DoDeferredTaggedToI(LTaggedToI* instr) {
except_flag,
kCheckForInexactConversion);
- __ RecordComment("Deferred TaggedToI: lost precision or NaN");
- DeoptimizeIf(ne, instr, except_flag, Operand(zero_reg));
+ DeoptimizeIf(ne, instr, except_flag, Operand(zero_reg),
+ "lost precision or NaN");
if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) {
__ Branch(&done, ne, input_reg, Operand(zero_reg));
__ Mfhc1(scratch1, double_scratch);
__ And(scratch1, scratch1, Operand(HeapNumber::kSignMask));
- __ RecordComment("Deferred TaggedToI: minus zero");
- DeoptimizeIf(ne, instr, scratch1, Operand(zero_reg));
+ DeoptimizeIf(ne, instr, scratch1, Operand(zero_reg), "minus zero");
}
}
__ bind(&done);
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/mips64/lithium-codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698