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

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

Issue 900223002: Revert of Externalize deoptimization reasons. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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.h ('k') | src/lithium-codegen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/lithium-codegen-ia32.cc
diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc
index 9b21b0631a61b0e0689ae44eed75f2a7655c7196..e22b8735731d8a2306a557e979bedfec5730d171 100644
--- a/src/ia32/lithium-codegen-ia32.cc
+++ b/src/ia32/lithium-codegen-ia32.cc
@@ -819,7 +819,7 @@
void LCodeGen::DeoptimizeIf(Condition cc, LInstruction* instr,
- Deoptimizer::DeoptReason deopt_reason,
+ const char* detail,
Deoptimizer::BailoutType bailout_type) {
LEnvironment* environment = instr->environment();
RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt);
@@ -862,7 +862,7 @@
}
Deoptimizer::Reason reason(instr->hydrogen_value()->position().raw(),
- instr->Mnemonic(), deopt_reason);
+ instr->Mnemonic(), detail);
DCHECK(info()->IsStub() || frame_is_built_);
if (cc == no_condition && frame_is_built_) {
DeoptComment(reason);
@@ -886,11 +886,11 @@
void LCodeGen::DeoptimizeIf(Condition cc, LInstruction* instr,
- Deoptimizer::DeoptReason deopt_reason) {
+ const char* detail) {
Deoptimizer::BailoutType bailout_type = info()->IsStub()
? Deoptimizer::LAZY
: Deoptimizer::EAGER;
- DeoptimizeIf(cc, instr, deopt_reason, bailout_type);
+ DeoptimizeIf(cc, instr, detail, bailout_type);
}
@@ -1120,7 +1120,7 @@
__ and_(dividend, mask);
__ neg(dividend);
if (hmod->CheckFlag(HValue::kBailoutOnMinusZero)) {
- DeoptimizeIf(zero, instr, Deoptimizer::kMinusZero);
+ DeoptimizeIf(zero, instr, "minus zero");
}
__ jmp(&done, Label::kNear);
}
@@ -1137,7 +1137,7 @@
DCHECK(ToRegister(instr->result()).is(eax));
if (divisor == 0) {
- DeoptimizeIf(no_condition, instr, Deoptimizer::kDivisionByZero);
+ DeoptimizeIf(no_condition, instr, "division by zero");
return;
}
@@ -1152,7 +1152,7 @@
Label remainder_not_zero;
__ j(not_zero, &remainder_not_zero, Label::kNear);
__ cmp(dividend, Immediate(0));
- DeoptimizeIf(less, instr, Deoptimizer::kMinusZero);
+ DeoptimizeIf(less, instr, "minus zero");
__ bind(&remainder_not_zero);
}
}
@@ -1174,7 +1174,7 @@
// deopt in this case because we can't return a NaN.
if (hmod->CheckFlag(HValue::kCanBeDivByZero)) {
__ test(right_reg, Operand(right_reg));
- DeoptimizeIf(zero, instr, Deoptimizer::kDivisionByZero);
+ DeoptimizeIf(zero, instr, "division by zero");
}
// Check for kMinInt % -1, idiv would signal a divide error. We
@@ -1185,7 +1185,7 @@
__ j(not_equal, &no_overflow_possible, Label::kNear);
__ cmp(right_reg, -1);
if (hmod->CheckFlag(HValue::kBailoutOnMinusZero)) {
- DeoptimizeIf(equal, instr, Deoptimizer::kMinusZero);
+ DeoptimizeIf(equal, instr, "minus zero");
} else {
__ j(not_equal, &no_overflow_possible, Label::kNear);
__ Move(result_reg, Immediate(0));
@@ -1204,7 +1204,7 @@
__ j(not_sign, &positive_left, Label::kNear);
__ idiv(right_reg);
__ test(result_reg, Operand(result_reg));
- DeoptimizeIf(zero, instr, Deoptimizer::kMinusZero);
+ DeoptimizeIf(zero, instr, "minus zero");
__ jmp(&done, Label::kNear);
__ bind(&positive_left);
}
@@ -1224,19 +1224,19 @@
HDiv* hdiv = instr->hydrogen();
if (hdiv->CheckFlag(HValue::kBailoutOnMinusZero) && divisor < 0) {
__ test(dividend, dividend);
- DeoptimizeIf(zero, instr, Deoptimizer::kMinusZero);
+ DeoptimizeIf(zero, instr, "minus zero");
}
// Check for (kMinInt / -1).
if (hdiv->CheckFlag(HValue::kCanOverflow) && divisor == -1) {
__ cmp(dividend, kMinInt);
- DeoptimizeIf(zero, instr, Deoptimizer::kOverflow);
+ DeoptimizeIf(zero, instr, "overflow");
}
// Deoptimize if remainder will not be 0.
if (!hdiv->CheckFlag(HInstruction::kAllUsesTruncatingToInt32) &&
divisor != 1 && divisor != -1) {
int32_t mask = divisor < 0 ? -(divisor + 1) : (divisor - 1);
__ test(dividend, Immediate(mask));
- DeoptimizeIf(not_zero, instr, Deoptimizer::kLostPrecision);
+ DeoptimizeIf(not_zero, instr, "lost precision");
}
__ Move(result, dividend);
int32_t shift = WhichPowerOf2Abs(divisor);
@@ -1257,7 +1257,7 @@
DCHECK(ToRegister(instr->result()).is(edx));
if (divisor == 0) {
- DeoptimizeIf(no_condition, instr, Deoptimizer::kDivisionByZero);
+ DeoptimizeIf(no_condition, instr, "division by zero");
return;
}
@@ -1265,7 +1265,7 @@
HDiv* hdiv = instr->hydrogen();
if (hdiv->CheckFlag(HValue::kBailoutOnMinusZero) && divisor < 0) {
__ test(dividend, dividend);
- DeoptimizeIf(zero, instr, Deoptimizer::kMinusZero);
+ DeoptimizeIf(zero, instr, "minus zero");
}
__ TruncatingDiv(dividend, Abs(divisor));
@@ -1275,7 +1275,7 @@
__ mov(eax, edx);
__ imul(eax, eax, divisor);
__ sub(eax, dividend);
- DeoptimizeIf(not_equal, instr, Deoptimizer::kLostPrecision);
+ DeoptimizeIf(not_equal, instr, "lost precision");
}
}
@@ -1295,7 +1295,7 @@
// Check for x / 0.
if (hdiv->CheckFlag(HValue::kCanBeDivByZero)) {
__ test(divisor, divisor);
- DeoptimizeIf(zero, instr, Deoptimizer::kDivisionByZero);
+ DeoptimizeIf(zero, instr, "division by zero");
}
// Check for (0 / -x) that will produce negative zero.
@@ -1304,7 +1304,7 @@
__ test(dividend, dividend);
__ j(not_zero, &dividend_not_zero, Label::kNear);
__ test(divisor, divisor);
- DeoptimizeIf(sign, instr, Deoptimizer::kMinusZero);
+ DeoptimizeIf(sign, instr, "minus zero");
__ bind(&dividend_not_zero);
}
@@ -1314,7 +1314,7 @@
__ cmp(dividend, kMinInt);
__ j(not_zero, &dividend_not_min_int, Label::kNear);
__ cmp(divisor, -1);
- DeoptimizeIf(zero, instr, Deoptimizer::kOverflow);
+ DeoptimizeIf(zero, instr, "overflow");
__ bind(&dividend_not_min_int);
}
@@ -1325,7 +1325,7 @@
if (!hdiv->CheckFlag(HValue::kAllUsesTruncatingToInt32)) {
// Deoptimize if remainder is not 0.
__ test(remainder, remainder);
- DeoptimizeIf(not_zero, instr, Deoptimizer::kLostPrecision);
+ DeoptimizeIf(not_zero, instr, "lost precision");
}
}
@@ -1347,13 +1347,13 @@
// If the divisor is negative, we have to negate and handle edge cases.
__ neg(dividend);
if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) {
- DeoptimizeIf(zero, instr, Deoptimizer::kMinusZero);
+ DeoptimizeIf(zero, instr, "minus zero");
}
// Dividing by -1 is basically negation, unless we overflow.
if (divisor == -1) {
if (instr->hydrogen()->CheckFlag(HValue::kLeftCanBeMinInt)) {
- DeoptimizeIf(overflow, instr, Deoptimizer::kOverflow);
+ DeoptimizeIf(overflow, instr, "overflow");
}
return;
}
@@ -1380,7 +1380,7 @@
DCHECK(ToRegister(instr->result()).is(edx));
if (divisor == 0) {
- DeoptimizeIf(no_condition, instr, Deoptimizer::kDivisionByZero);
+ DeoptimizeIf(no_condition, instr, "division by zero");
return;
}
@@ -1388,7 +1388,7 @@
HMathFloorOfDiv* hdiv = instr->hydrogen();
if (hdiv->CheckFlag(HValue::kBailoutOnMinusZero) && divisor < 0) {
__ test(dividend, dividend);
- DeoptimizeIf(zero, instr, Deoptimizer::kMinusZero);
+ DeoptimizeIf(zero, instr, "minus zero");
}
// Easy case: We need no dynamic check for the dividend and the flooring
@@ -1435,7 +1435,7 @@
// Check for x / 0.
if (hdiv->CheckFlag(HValue::kCanBeDivByZero)) {
__ test(divisor, divisor);
- DeoptimizeIf(zero, instr, Deoptimizer::kDivisionByZero);
+ DeoptimizeIf(zero, instr, "division by zero");
}
// Check for (0 / -x) that will produce negative zero.
@@ -1444,7 +1444,7 @@
__ test(dividend, dividend);
__ j(not_zero, &dividend_not_zero, Label::kNear);
__ test(divisor, divisor);
- DeoptimizeIf(sign, instr, Deoptimizer::kMinusZero);
+ DeoptimizeIf(sign, instr, "minus zero");
__ bind(&dividend_not_zero);
}
@@ -1454,7 +1454,7 @@
__ cmp(dividend, kMinInt);
__ j(not_zero, &dividend_not_min_int, Label::kNear);
__ cmp(divisor, -1);
- DeoptimizeIf(zero, instr, Deoptimizer::kOverflow);
+ DeoptimizeIf(zero, instr, "overflow");
__ bind(&dividend_not_min_int);
}
@@ -1532,7 +1532,7 @@
}
if (instr->hydrogen()->CheckFlag(HValue::kCanOverflow)) {
- DeoptimizeIf(overflow, instr, Deoptimizer::kOverflow);
+ DeoptimizeIf(overflow, instr, "overflow");
}
if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) {
@@ -1542,15 +1542,15 @@
__ j(not_zero, &done, Label::kNear);
if (right->IsConstantOperand()) {
if (ToInteger32(LConstantOperand::cast(right)) < 0) {
- DeoptimizeIf(no_condition, instr, Deoptimizer::kMinusZero);
+ DeoptimizeIf(no_condition, instr, "minus zero");
} else if (ToInteger32(LConstantOperand::cast(right)) == 0) {
__ cmp(ToRegister(instr->temp()), Immediate(0));
- DeoptimizeIf(less, instr, Deoptimizer::kMinusZero);
+ DeoptimizeIf(less, instr, "minus zero");
}
} else {
// Test the non-zero operand for negative sign.
__ or_(ToRegister(instr->temp()), ToOperand(right));
- DeoptimizeIf(sign, instr, Deoptimizer::kMinusZero);
+ DeoptimizeIf(sign, instr, "minus zero");
}
__ bind(&done);
}
@@ -1623,7 +1623,7 @@
__ shr_cl(ToRegister(left));
if (instr->can_deopt()) {
__ test(ToRegister(left), ToRegister(left));
- DeoptimizeIf(sign, instr, Deoptimizer::kNegativeValue);
+ DeoptimizeIf(sign, instr, "negative value");
}
break;
case Token::SHL:
@@ -1640,7 +1640,7 @@
case Token::ROR:
if (shift_count == 0 && instr->can_deopt()) {
__ test(ToRegister(left), ToRegister(left));
- DeoptimizeIf(sign, instr, Deoptimizer::kNegativeValue);
+ DeoptimizeIf(sign, instr, "negative value");
} else {
__ ror(ToRegister(left), shift_count);
}
@@ -1655,7 +1655,7 @@
__ shr(ToRegister(left), shift_count);
} else if (instr->can_deopt()) {
__ test(ToRegister(left), ToRegister(left));
- DeoptimizeIf(sign, instr, Deoptimizer::kNegativeValue);
+ DeoptimizeIf(sign, instr, "negative value");
}
break;
case Token::SHL:
@@ -1666,7 +1666,7 @@
__ shl(ToRegister(left), shift_count - 1);
}
__ SmiTag(ToRegister(left));
- DeoptimizeIf(overflow, instr, Deoptimizer::kOverflow);
+ DeoptimizeIf(overflow, instr, "overflow");
} else {
__ shl(ToRegister(left), shift_count);
}
@@ -1692,7 +1692,7 @@
__ sub(ToRegister(left), ToOperand(right));
}
if (instr->hydrogen()->CheckFlag(HValue::kCanOverflow)) {
- DeoptimizeIf(overflow, instr, Deoptimizer::kOverflow);
+ DeoptimizeIf(overflow, instr, "overflow");
}
}
@@ -1775,9 +1775,9 @@
DCHECK(object.is(eax));
__ test(object, Immediate(kSmiTagMask));
- DeoptimizeIf(zero, instr, Deoptimizer::kSmi);
+ DeoptimizeIf(zero, instr, "Smi");
__ CmpObjectType(object, JS_DATE_TYPE, scratch);
- DeoptimizeIf(not_equal, instr, Deoptimizer::kNotADateObject);
+ DeoptimizeIf(not_equal, instr, "not a date object");
if (index->value() == 0) {
__ mov(result, FieldOperand(object, JSDate::kValueOffset));
@@ -1907,7 +1907,7 @@
__ add(ToRegister(left), ToOperand(right));
}
if (instr->hydrogen()->CheckFlag(HValue::kCanOverflow)) {
- DeoptimizeIf(overflow, instr, Deoptimizer::kOverflow);
+ DeoptimizeIf(overflow, instr, "overflow");
}
}
}
@@ -2155,7 +2155,7 @@
} else if (expected.NeedsMap()) {
// If we need a map later and have a Smi -> deopt.
__ test(reg, Immediate(kSmiTagMask));
- DeoptimizeIf(zero, instr, Deoptimizer::kSmi);
+ DeoptimizeIf(zero, instr, "Smi");
}
Register map = no_reg; // Keep the compiler happy.
@@ -2212,7 +2212,7 @@
if (!expected.IsGeneric()) {
// We've seen something for the first time -> deopt.
// This can only happen if we are not generic already.
- DeoptimizeIf(no_condition, instr, Deoptimizer::kUnexpectedObject);
+ DeoptimizeIf(no_condition, instr, "unexpected object");
}
}
}
@@ -2844,7 +2844,7 @@
__ mov(result, Operand::ForCell(instr->hydrogen()->cell().handle()));
if (instr->hydrogen()->RequiresHoleCheck()) {
__ cmp(result, factory()->the_hole_value());
- DeoptimizeIf(equal, instr, Deoptimizer::kHole);
+ DeoptimizeIf(equal, instr, "hole");
}
}
@@ -2893,7 +2893,7 @@
// it as no longer deleted. We deoptimize in that case.
if (instr->hydrogen()->RequiresHoleCheck()) {
__ cmp(Operand::ForCell(cell_handle), factory()->the_hole_value());
- DeoptimizeIf(equal, instr, Deoptimizer::kHole);
+ DeoptimizeIf(equal, instr, "hole");
}
// Store the value.
@@ -2910,7 +2910,7 @@
if (instr->hydrogen()->RequiresHoleCheck()) {
__ cmp(result, factory()->the_hole_value());
if (instr->hydrogen()->DeoptimizesOnHole()) {
- DeoptimizeIf(equal, instr, Deoptimizer::kHole);
+ DeoptimizeIf(equal, instr, "hole");
} else {
Label is_not_hole;
__ j(not_equal, &is_not_hole, Label::kNear);
@@ -2931,7 +2931,7 @@
if (instr->hydrogen()->RequiresHoleCheck()) {
__ cmp(target, factory()->the_hole_value());
if (instr->hydrogen()->DeoptimizesOnHole()) {
- DeoptimizeIf(equal, instr, Deoptimizer::kHole);
+ DeoptimizeIf(equal, instr, "hole");
} else {
__ j(not_equal, &skip_assignment, Label::kNear);
}
@@ -3031,7 +3031,7 @@
// Check that the function has a prototype or an initial map.
__ cmp(Operand(result), Immediate(factory()->the_hole_value()));
- DeoptimizeIf(equal, instr, Deoptimizer::kHole);
+ DeoptimizeIf(equal, instr, "hole");
// If the function does not have an initial map, we're done.
Label done;
@@ -3124,7 +3124,7 @@
__ mov(result, operand);
if (!instr->hydrogen()->CheckFlag(HInstruction::kUint32)) {
__ test(result, Operand(result));
- DeoptimizeIf(negative, instr, Deoptimizer::kNegativeValue);
+ DeoptimizeIf(negative, instr, "negative value");
}
break;
case EXTERNAL_FLOAT32_ELEMENTS:
@@ -3154,7 +3154,7 @@
FAST_DOUBLE_ELEMENTS,
instr->base_offset() + sizeof(kHoleNanLower32));
__ cmp(hole_check_operand, Immediate(kHoleNanUpper32));
- DeoptimizeIf(equal, instr, Deoptimizer::kHole);
+ DeoptimizeIf(equal, instr, "hole");
}
Operand double_load_operand = BuildFastArrayOperand(
@@ -3181,10 +3181,10 @@
if (instr->hydrogen()->RequiresHoleCheck()) {
if (IsFastSmiElementsKind(instr->hydrogen()->elements_kind())) {
__ test(result, Immediate(kSmiTagMask));
- DeoptimizeIf(not_equal, instr, Deoptimizer::kNotASmi);
+ DeoptimizeIf(not_equal, instr, "not a Smi");
} else {
__ cmp(result, factory()->the_hole_value());
- DeoptimizeIf(equal, instr, Deoptimizer::kHole);
+ DeoptimizeIf(equal, instr, "hole");
}
}
}
@@ -3331,9 +3331,9 @@
// The receiver should be a JS object.
__ test(receiver, Immediate(kSmiTagMask));
- DeoptimizeIf(equal, instr, Deoptimizer::kSmi);
+ DeoptimizeIf(equal, instr, "Smi");
__ CmpObjectType(receiver, FIRST_SPEC_OBJECT_TYPE, scratch);
- DeoptimizeIf(below, instr, Deoptimizer::kNotAJavaScriptObject);
+ DeoptimizeIf(below, instr, "not a JavaScript object");
__ jmp(&receiver_ok, Label::kNear);
__ bind(&global_object);
@@ -3359,7 +3359,7 @@
// adaptor frame below it.
const uint32_t kArgumentsLimit = 1 * KB;
__ cmp(length, kArgumentsLimit);
- DeoptimizeIf(above, instr, Deoptimizer::kTooManyArguments);
+ DeoptimizeIf(above, instr, "too many arguments");
__ push(receiver);
__ mov(receiver, length);
@@ -3584,7 +3584,7 @@
Register input_reg = ToRegister(instr->value());
__ cmp(FieldOperand(input_reg, HeapObject::kMapOffset),
factory()->heap_number_map());
- DeoptimizeIf(not_equal, instr, Deoptimizer::kNotAHeapNumber);
+ DeoptimizeIf(not_equal, instr, "not a heap number");
Label slow, allocated, done;
Register tmp = input_reg.is(eax) ? ecx : eax;
@@ -3631,7 +3631,7 @@
Label is_positive;
__ j(not_sign, &is_positive, Label::kNear);
__ neg(input_reg); // Sets flags.
- DeoptimizeIf(negative, instr, Deoptimizer::kOverflow);
+ DeoptimizeIf(negative, instr, "overflow");
__ bind(&is_positive);
}
@@ -3690,20 +3690,20 @@
__ j(not_equal, &non_zero, Label::kNear);
__ movmskpd(output_reg, input_reg);
__ test(output_reg, Immediate(1));
- DeoptimizeIf(not_zero, instr, Deoptimizer::kMinusZero);
+ DeoptimizeIf(not_zero, instr, "minus zero");
__ bind(&non_zero);
}
__ roundsd(xmm_scratch, input_reg, Assembler::kRoundDown);
__ cvttsd2si(output_reg, Operand(xmm_scratch));
// Overflow is signalled with minint.
__ cmp(output_reg, 0x1);
- DeoptimizeIf(overflow, instr, Deoptimizer::kOverflow);
+ DeoptimizeIf(overflow, instr, "overflow");
} else {
Label negative_sign, done;
// Deoptimize on unordered.
__ xorps(xmm_scratch, xmm_scratch); // Zero the register.
__ ucomisd(input_reg, xmm_scratch);
- DeoptimizeIf(parity_even, instr, Deoptimizer::kNaN);
+ DeoptimizeIf(parity_even, instr, "NaN");
__ j(below, &negative_sign, Label::kNear);
if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) {
@@ -3712,7 +3712,7 @@
__ j(above, &positive_sign, Label::kNear);
__ movmskpd(output_reg, input_reg);
__ test(output_reg, Immediate(1));
- DeoptimizeIf(not_zero, instr, Deoptimizer::kMinusZero);
+ DeoptimizeIf(not_zero, instr, "minus zero");
__ Move(output_reg, Immediate(0));
__ jmp(&done, Label::kNear);
__ bind(&positive_sign);
@@ -3722,7 +3722,7 @@
__ cvttsd2si(output_reg, Operand(input_reg));
// Overflow is signalled with minint.
__ cmp(output_reg, 0x1);
- DeoptimizeIf(overflow, instr, Deoptimizer::kOverflow);
+ DeoptimizeIf(overflow, instr, "overflow");
__ jmp(&done, Label::kNear);
// Non-zero negative reaches here.
@@ -3733,7 +3733,7 @@
__ ucomisd(input_reg, xmm_scratch);
__ j(equal, &done, Label::kNear);
__ sub(output_reg, Immediate(1));
- DeoptimizeIf(overflow, instr, Deoptimizer::kOverflow);
+ DeoptimizeIf(overflow, instr, "overflow");
__ bind(&done);
}
@@ -3761,7 +3761,7 @@
__ cvttsd2si(output_reg, Operand(xmm_scratch));
// Overflow is signalled with minint.
__ cmp(output_reg, 0x1);
- DeoptimizeIf(overflow, instr, Deoptimizer::kOverflow);
+ DeoptimizeIf(overflow, instr, "overflow");
__ jmp(&done, dist);
__ bind(&below_one_half);
@@ -3776,7 +3776,7 @@
__ cvttsd2si(output_reg, Operand(input_temp));
// Catch minint due to overflow, and to prevent overflow when compensating.
__ cmp(output_reg, 0x1);
- DeoptimizeIf(overflow, instr, Deoptimizer::kOverflow);
+ DeoptimizeIf(overflow, instr, "overflow");
__ Cvtsi2sd(xmm_scratch, output_reg);
__ ucomisd(xmm_scratch, input_temp);
@@ -3792,7 +3792,7 @@
// If the sign is positive, we return +0.
__ movmskpd(output_reg, input_reg);
__ test(output_reg, Immediate(1));
- DeoptimizeIf(not_zero, instr, Deoptimizer::kMinusZero);
+ DeoptimizeIf(not_zero, instr, "minus zero");
}
__ Move(output_reg, Immediate(0));
__ bind(&done);
@@ -3868,7 +3868,7 @@
__ JumpIfSmi(tagged_exponent, &no_deopt);
DCHECK(!ecx.is(tagged_exponent));
__ CmpObjectType(tagged_exponent, HEAP_NUMBER_TYPE, ecx);
- DeoptimizeIf(not_equal, instr, Deoptimizer::kNotAHeapNumber);
+ DeoptimizeIf(not_equal, instr, "not a heap number");
__ bind(&no_deopt);
MathPowStub stub(isolate(), MathPowStub::TAGGED);
__ CallStub(&stub);
@@ -4198,7 +4198,7 @@
__ int3();
__ bind(&done);
} else {
- DeoptimizeIf(cc, instr, Deoptimizer::kOutOfBounds);
+ DeoptimizeIf(cc, instr, "out of bounds");
}
}
@@ -4361,7 +4361,7 @@
Register temp = ToRegister(instr->temp());
Label no_memento_found;
__ TestJSArrayForAllocationMemento(object, temp, &no_memento_found);
- DeoptimizeIf(equal, instr, Deoptimizer::kMementoFound);
+ DeoptimizeIf(equal, instr, "memento found");
__ bind(&no_memento_found);
}
@@ -4707,12 +4707,12 @@
if (hchange->CheckFlag(HValue::kCanOverflow) &&
hchange->value()->CheckFlag(HValue::kUint32)) {
__ test(input, Immediate(0xc0000000));
- DeoptimizeIf(not_zero, instr, Deoptimizer::kOverflow);
+ DeoptimizeIf(not_zero, instr, "overflow");
}
__ SmiTag(input);
if (hchange->CheckFlag(HValue::kCanOverflow) &&
!hchange->value()->CheckFlag(HValue::kUint32)) {
- DeoptimizeIf(overflow, instr, Deoptimizer::kOverflow);
+ DeoptimizeIf(overflow, instr, "overflow");
}
}
@@ -4723,7 +4723,7 @@
DCHECK(input->IsRegister() && input->Equals(instr->result()));
if (instr->needs_check()) {
__ test(result, Immediate(kSmiTagMask));
- DeoptimizeIf(not_zero, instr, Deoptimizer::kNotASmi);
+ DeoptimizeIf(not_zero, instr, "not a Smi");
} else {
__ AssertSmi(result);
}
@@ -4750,7 +4750,7 @@
if (can_convert_undefined_to_nan) {
__ j(not_equal, &convert, Label::kNear);
} else {
- DeoptimizeIf(not_equal, instr, Deoptimizer::kNotAHeapNumber);
+ DeoptimizeIf(not_equal, instr, "not a heap number");
}
// Heap number to XMM conversion.
@@ -4763,7 +4763,7 @@
__ j(not_zero, &done, Label::kNear);
__ movmskpd(temp_reg, result_reg);
__ test_b(temp_reg, 1);
- DeoptimizeIf(not_zero, instr, Deoptimizer::kMinusZero);
+ DeoptimizeIf(not_zero, instr, "minus zero");
}
__ jmp(&done, Label::kNear);
@@ -4772,7 +4772,7 @@
// Convert undefined to NaN.
__ cmp(input_reg, factory()->undefined_value());
- DeoptimizeIf(not_equal, instr, Deoptimizer::kNotAHeapNumberUndefined);
+ DeoptimizeIf(not_equal, instr, "not a heap number/undefined");
__ pcmpeqd(result_reg, result_reg);
__ jmp(&done, Label::kNear);
@@ -4824,27 +4824,26 @@
__ bind(&check_false);
__ cmp(input_reg, factory()->false_value());
- DeoptimizeIf(not_equal, instr,
- Deoptimizer::kNotAHeapNumberUndefinedBoolean);
+ DeoptimizeIf(not_equal, instr, "not a heap number/undefined/true/false");
__ Move(input_reg, Immediate(0));
} else {
XMMRegister scratch = ToDoubleRegister(instr->temp());
DCHECK(!scratch.is(xmm0));
__ cmp(FieldOperand(input_reg, HeapObject::kMapOffset),
isolate()->factory()->heap_number_map());
- DeoptimizeIf(not_equal, instr, Deoptimizer::kNotAHeapNumber);
+ DeoptimizeIf(not_equal, instr, "not a heap number");
__ movsd(xmm0, FieldOperand(input_reg, HeapNumber::kValueOffset));
__ cvttsd2si(input_reg, Operand(xmm0));
__ Cvtsi2sd(scratch, Operand(input_reg));
__ ucomisd(xmm0, scratch);
- DeoptimizeIf(not_equal, instr, Deoptimizer::kLostPrecision);
- DeoptimizeIf(parity_even, instr, Deoptimizer::kNaN);
+ DeoptimizeIf(not_equal, instr, "lost precision");
+ DeoptimizeIf(parity_even, instr, "NaN");
if (instr->hydrogen()->GetMinusZeroMode() == FAIL_ON_MINUS_ZERO) {
__ test(input_reg, Operand(input_reg));
__ j(not_zero, done);
__ movmskpd(input_reg, xmm0);
__ and_(input_reg, 1);
- DeoptimizeIf(not_zero, instr, Deoptimizer::kMinusZero);
+ DeoptimizeIf(not_zero, instr, "minus zero");
}
}
}
@@ -4924,11 +4923,11 @@
&is_nan, &minus_zero, dist);
__ jmp(&done, dist);
__ bind(&lost_precision);
- DeoptimizeIf(no_condition, instr, Deoptimizer::kLostPrecision);
+ DeoptimizeIf(no_condition, instr, "lost precision");
__ bind(&is_nan);
- DeoptimizeIf(no_condition, instr, Deoptimizer::kNaN);
+ DeoptimizeIf(no_condition, instr, "NaN");
__ bind(&minus_zero);
- DeoptimizeIf(no_condition, instr, Deoptimizer::kMinusZero);
+ DeoptimizeIf(no_condition, instr, "minus zero");
__ bind(&done);
}
}
@@ -4950,21 +4949,21 @@
&minus_zero, dist);
__ jmp(&done, dist);
__ bind(&lost_precision);
- DeoptimizeIf(no_condition, instr, Deoptimizer::kLostPrecision);
+ DeoptimizeIf(no_condition, instr, "lost precision");
__ bind(&is_nan);
- DeoptimizeIf(no_condition, instr, Deoptimizer::kNaN);
+ DeoptimizeIf(no_condition, instr, "NaN");
__ bind(&minus_zero);
- DeoptimizeIf(no_condition, instr, Deoptimizer::kMinusZero);
+ DeoptimizeIf(no_condition, instr, "minus zero");
__ bind(&done);
__ SmiTag(result_reg);
- DeoptimizeIf(overflow, instr, Deoptimizer::kOverflow);
+ DeoptimizeIf(overflow, instr, "overflow");
}
void LCodeGen::DoCheckSmi(LCheckSmi* instr) {
LOperand* input = instr->value();
__ test(ToOperand(input), Immediate(kSmiTagMask));
- DeoptimizeIf(not_zero, instr, Deoptimizer::kNotASmi);
+ DeoptimizeIf(not_zero, instr, "not a Smi");
}
@@ -4972,7 +4971,7 @@
if (!instr->hydrogen()->value()->type().IsHeapObject()) {
LOperand* input = instr->value();
__ test(ToOperand(input), Immediate(kSmiTagMask));
- DeoptimizeIf(zero, instr, Deoptimizer::kSmi);
+ DeoptimizeIf(zero, instr, "Smi");
}
}
@@ -4993,14 +4992,14 @@
// If there is only one type in the interval check for equality.
if (first == last) {
- DeoptimizeIf(not_equal, instr, Deoptimizer::kWrongInstanceType);
+ DeoptimizeIf(not_equal, instr, "wrong instance type");
} else {
- DeoptimizeIf(below, instr, Deoptimizer::kWrongInstanceType);
+ DeoptimizeIf(below, instr, "wrong instance type");
// Omit check for the last type.
if (last != LAST_TYPE) {
__ cmpb(FieldOperand(temp, Map::kInstanceTypeOffset),
static_cast<int8_t>(last));
- DeoptimizeIf(above, instr, Deoptimizer::kWrongInstanceType);
+ DeoptimizeIf(above, instr, "wrong instance type");
}
}
} else {
@@ -5011,13 +5010,12 @@
if (base::bits::IsPowerOfTwo32(mask)) {
DCHECK(tag == 0 || base::bits::IsPowerOfTwo32(tag));
__ test_b(FieldOperand(temp, Map::kInstanceTypeOffset), mask);
- DeoptimizeIf(tag == 0 ? not_zero : zero, instr,
- Deoptimizer::kWrongInstanceType);
+ DeoptimizeIf(tag == 0 ? not_zero : zero, instr, "wrong instance type");
} else {
__ movzx_b(temp, FieldOperand(temp, Map::kInstanceTypeOffset));
__ and_(temp, mask);
__ cmp(temp, tag);
- DeoptimizeIf(not_equal, instr, Deoptimizer::kWrongInstanceType);
+ DeoptimizeIf(not_equal, instr, "wrong instance type");
}
}
}
@@ -5033,7 +5031,7 @@
Operand operand = ToOperand(instr->value());
__ cmp(operand, object);
}
- DeoptimizeIf(not_equal, instr, Deoptimizer::kValueMismatch);
+ DeoptimizeIf(not_equal, instr, "value mismatch");
}
@@ -5048,7 +5046,7 @@
__ test(eax, Immediate(kSmiTagMask));
}
- DeoptimizeIf(zero, instr, Deoptimizer::kInstanceMigrationFailed);
+ DeoptimizeIf(zero, instr, "instance migration failed");
}
@@ -5102,7 +5100,7 @@
if (instr->hydrogen()->HasMigrationTarget()) {
__ j(not_equal, deferred->entry());
} else {
- DeoptimizeIf(not_equal, instr, Deoptimizer::kWrongMap);
+ DeoptimizeIf(not_equal, instr, "wrong map");
}
__ bind(&success);
@@ -5141,7 +5139,7 @@
// Check for undefined. Undefined is converted to zero for clamping
// conversions.
__ cmp(input_reg, factory()->undefined_value());
- DeoptimizeIf(not_equal, instr, Deoptimizer::kNotAHeapNumberUndefined);
+ DeoptimizeIf(not_equal, instr, "not a heap number/undefined");
__ mov(input_reg, 0);
__ jmp(&done, Label::kNear);
@@ -5629,17 +5627,17 @@
void LCodeGen::DoForInPrepareMap(LForInPrepareMap* instr) {
DCHECK(ToRegister(instr->context()).is(esi));
__ cmp(eax, isolate()->factory()->undefined_value());
- DeoptimizeIf(equal, instr, Deoptimizer::kUndefined);
+ DeoptimizeIf(equal, instr, "undefined");
__ cmp(eax, isolate()->factory()->null_value());
- DeoptimizeIf(equal, instr, Deoptimizer::kNull);
+ DeoptimizeIf(equal, instr, "null");
__ test(eax, Immediate(kSmiTagMask));
- DeoptimizeIf(zero, instr, Deoptimizer::kSmi);
+ DeoptimizeIf(zero, instr, "Smi");
STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_SPEC_OBJECT_TYPE);
__ CmpObjectType(eax, LAST_JS_PROXY_TYPE, ecx);
- DeoptimizeIf(below_equal, instr, Deoptimizer::kWrongInstanceType);
+ DeoptimizeIf(below_equal, instr, "wrong instance type");
Label use_cache, call_runtime;
__ CheckEnumCache(&call_runtime);
@@ -5654,7 +5652,7 @@
__ cmp(FieldOperand(eax, HeapObject::kMapOffset),
isolate()->factory()->meta_map());
- DeoptimizeIf(not_equal, instr, Deoptimizer::kWrongMap);
+ DeoptimizeIf(not_equal, instr, "wrong map");
__ bind(&use_cache);
}
@@ -5677,7 +5675,7 @@
FieldOperand(result, FixedArray::SizeFor(instr->idx())));
__ bind(&done);
__ test(result, result);
- DeoptimizeIf(equal, instr, Deoptimizer::kNoCache);
+ DeoptimizeIf(equal, instr, "no cache");
}
@@ -5685,7 +5683,7 @@
Register object = ToRegister(instr->value());
__ cmp(ToRegister(instr->map()),
FieldOperand(object, HeapObject::kMapOffset));
- DeoptimizeIf(not_equal, instr, Deoptimizer::kWrongMap);
+ DeoptimizeIf(not_equal, instr, "wrong map");
}
« no previous file with comments | « src/ia32/lithium-codegen-ia32.h ('k') | src/lithium-codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698