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

Unified Diff: src/x87/lithium-codegen-x87.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/x64/lithium-codegen-x64.cc ('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 ed4755b995cc319fb57958c6c9f1e30ffb6010bc..aca3992bc67f1f8f4ad8880034c44091dbebd8ff 100644
--- a/src/x87/lithium-codegen-x87.cc
+++ b/src/x87/lithium-codegen-x87.cc
@@ -3975,9 +3975,8 @@ void LCodeGen::DoMathRound(LMathRound* instr) {
__ fistp_s(MemOperand(esp, 0));
// Check overflow.
__ X87CheckIA();
- __ RecordComment("D2I conversion overflow");
__ pop(result);
- DeoptimizeIf(equal, instr);
+ DeoptimizeIf(equal, instr, "conversion overflow");
__ fnclex();
// Restore round mode.
__ X87SetRC(0x0000);
@@ -3994,8 +3993,7 @@ void LCodeGen::DoMathRound(LMathRound* instr) {
// If the sign is positive, we return +0.
__ fld(0);
__ FXamSign();
- __ RecordComment("Minus zero");
- DeoptimizeIf(not_zero, instr);
+ DeoptimizeIf(not_zero, instr, "minus zero");
}
__ Move(result, Immediate(0));
__ jmp(&done);
@@ -4011,9 +4009,8 @@ void LCodeGen::DoMathRound(LMathRound* instr) {
__ fistp_s(MemOperand(esp, 0));
// Check overflow.
__ X87CheckIA();
- __ RecordComment("D2I conversion overflow");
__ pop(result);
- DeoptimizeIf(equal, instr);
+ DeoptimizeIf(equal, instr, "conversion overflow");
__ fnclex();
// Restore round mode.
__ X87SetRC(0x0000);
@@ -5186,16 +5183,14 @@ void LCodeGen::DoDeferredTaggedToI(LTaggedToI* instr, Label* done) {
__ bind(&check_false);
__ cmp(input_reg, factory()->false_value());
- __ RecordComment("Deferred TaggedToI: cannot truncate");
- DeoptimizeIf(not_equal, instr);
+ DeoptimizeIf(not_equal, instr, "cannot truncate");
__ Move(input_reg, Immediate(0));
} else {
// TODO(olivf) Converting a number on the fpu is actually quite slow. We
// should first try a fast conversion and then bailout to this slow case.
__ cmp(FieldOperand(input_reg, HeapObject::kMapOffset),
isolate()->factory()->heap_number_map());
- __ RecordComment("Deferred TaggedToI: not a heap number");
- DeoptimizeIf(not_equal, instr);
+ DeoptimizeIf(not_equal, instr, "not a heap number");
__ sub(esp, Immediate(kPointerSize));
__ fld_d(FieldOperand(input_reg, HeapNumber::kValueOffset));
@@ -5211,14 +5206,12 @@ void LCodeGen::DoDeferredTaggedToI(LTaggedToI* instr, Label* done) {
__ j(equal, &no_precision_lost, Label::kNear);
__ fstp(0);
- __ RecordComment("Deferred TaggedToI: lost precision");
- DeoptimizeIf(no_condition, instr);
+ DeoptimizeIf(no_condition, instr, "lost precision");
__ bind(&no_precision_lost);
__ j(parity_odd, &not_nan);
__ fstp(0);
- __ RecordComment("Deferred TaggedToI: NaN");
- DeoptimizeIf(no_condition, instr);
+ DeoptimizeIf(no_condition, instr, "NaN");
__ bind(&not_nan);
__ test(input_reg, Operand(input_reg));
@@ -5233,17 +5226,14 @@ void LCodeGen::DoDeferredTaggedToI(LTaggedToI* instr, Label* done) {
__ fstp_s(Operand(esp, 0));
__ pop(input_reg);
__ test(input_reg, Operand(input_reg));
- __ RecordComment("Deferred TaggedToI: minus zero");
- DeoptimizeIf(not_zero, instr);
+ DeoptimizeIf(not_zero, instr, "minus zero");
} else {
__ fist_s(MemOperand(esp, 0));
__ fild_s(MemOperand(esp, 0));
__ FCmp();
__ pop(input_reg);
- __ RecordComment("Deferred TaggedToI: lost precision");
- DeoptimizeIf(not_equal, instr);
- __ RecordComment("Deferred TaggedToI: NaN");
- DeoptimizeIf(parity_even, instr);
+ DeoptimizeIf(not_equal, instr, "lost precision");
+ DeoptimizeIf(parity_even, instr, "NaN");
}
}
}
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698