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

Unified Diff: src/arm/lithium-codegen-arm.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/arm/lithium-codegen-arm.h ('k') | src/arm64/assembler-arm64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/lithium-codegen-arm.cc
diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc
index e7f89822412edd30d62f41b2deb7e4b370b1edc6..6da4072db05c11ff7319e10c92fa22bcdae2a89a 100644
--- a/src/arm/lithium-codegen-arm.cc
+++ b/src/arm/lithium-codegen-arm.cc
@@ -840,7 +840,7 @@
void LCodeGen::DeoptimizeIf(Condition condition, LInstruction* instr,
- Deoptimizer::DeoptReason deopt_reason,
+ const char* detail,
Deoptimizer::BailoutType bailout_type) {
LEnvironment* environment = instr->environment();
RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt);
@@ -894,7 +894,7 @@
}
Deoptimizer::Reason reason(instr->hydrogen_value()->position().raw(),
- instr->Mnemonic(), deopt_reason);
+ instr->Mnemonic(), detail);
DCHECK(info()->IsStub() || frame_is_built_);
// Go through jump table if we need to handle condition, build frame, or
// restore caller doubles.
@@ -917,11 +917,11 @@
void LCodeGen::DeoptimizeIf(Condition condition, LInstruction* instr,
- Deoptimizer::DeoptReason deopt_reason) {
+ const char* detail) {
Deoptimizer::BailoutType bailout_type = info()->IsStub()
? Deoptimizer::LAZY
: Deoptimizer::EAGER;
- DeoptimizeIf(condition, instr, deopt_reason, bailout_type);
+ DeoptimizeIf(condition, instr, detail, bailout_type);
}
@@ -1157,7 +1157,7 @@
__ and_(dividend, dividend, Operand(mask));
__ rsb(dividend, dividend, Operand::Zero(), SetCC);
if (hmod->CheckFlag(HValue::kBailoutOnMinusZero)) {
- DeoptimizeIf(eq, instr, Deoptimizer::kMinusZero);
+ DeoptimizeIf(eq, instr, "minus zero");
}
__ b(&done);
}
@@ -1175,7 +1175,7 @@
DCHECK(!dividend.is(result));
if (divisor == 0) {
- DeoptimizeIf(al, instr, Deoptimizer::kDivisionByZero);
+ DeoptimizeIf(al, instr, "division by zero");
return;
}
@@ -1190,7 +1190,7 @@
Label remainder_not_zero;
__ b(ne, &remainder_not_zero);
__ cmp(dividend, Operand::Zero());
- DeoptimizeIf(lt, instr, Deoptimizer::kMinusZero);
+ DeoptimizeIf(lt, instr, "minus zero");
__ bind(&remainder_not_zero);
}
}
@@ -1210,7 +1210,7 @@
// case because we can't return a NaN.
if (hmod->CheckFlag(HValue::kCanBeDivByZero)) {
__ cmp(right_reg, Operand::Zero());
- DeoptimizeIf(eq, instr, Deoptimizer::kDivisionByZero);
+ DeoptimizeIf(eq, instr, "division by zero");
}
// Check for kMinInt % -1, sdiv will return kMinInt, which is not what we
@@ -1221,7 +1221,7 @@
__ b(ne, &no_overflow_possible);
__ cmp(right_reg, Operand(-1));
if (hmod->CheckFlag(HValue::kBailoutOnMinusZero)) {
- DeoptimizeIf(eq, instr, Deoptimizer::kMinusZero);
+ DeoptimizeIf(eq, instr, "minus zero");
} else {
__ b(ne, &no_overflow_possible);
__ mov(result_reg, Operand::Zero());
@@ -1242,7 +1242,7 @@
__ cmp(result_reg, Operand::Zero());
__ b(ne, &done);
__ cmp(left_reg, Operand::Zero());
- DeoptimizeIf(lt, instr, Deoptimizer::kMinusZero);
+ DeoptimizeIf(lt, instr, "minus zero");
}
__ bind(&done);
@@ -1267,7 +1267,7 @@
// NaN.
if (hmod->CheckFlag(HValue::kCanBeDivByZero)) {
__ cmp(right_reg, Operand::Zero());
- DeoptimizeIf(eq, instr, Deoptimizer::kDivisionByZero);
+ DeoptimizeIf(eq, instr, "division by zero");
}
__ Move(result_reg, left_reg);
@@ -1297,7 +1297,7 @@
if (hmod->CheckFlag(HValue::kBailoutOnMinusZero)) {
__ b(ne, &done);
__ cmp(left_reg, Operand::Zero());
- DeoptimizeIf(mi, instr, Deoptimizer::kMinusZero);
+ DeoptimizeIf(mi, instr, "minus zero");
}
__ bind(&done);
}
@@ -1315,19 +1315,19 @@
HDiv* hdiv = instr->hydrogen();
if (hdiv->CheckFlag(HValue::kBailoutOnMinusZero) && divisor < 0) {
__ cmp(dividend, Operand::Zero());
- DeoptimizeIf(eq, instr, Deoptimizer::kMinusZero);
+ DeoptimizeIf(eq, instr, "minus zero");
}
// Check for (kMinInt / -1).
if (hdiv->CheckFlag(HValue::kCanOverflow) && divisor == -1) {
__ cmp(dividend, Operand(kMinInt));
- DeoptimizeIf(eq, instr, Deoptimizer::kOverflow);
+ DeoptimizeIf(eq, 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);
__ tst(dividend, Operand(mask));
- DeoptimizeIf(ne, instr, Deoptimizer::kLostPrecision);
+ DeoptimizeIf(ne, instr, "lost precision");
}
if (divisor == -1) { // Nice shortcut, not needed for correctness.
@@ -1355,7 +1355,7 @@
DCHECK(!dividend.is(result));
if (divisor == 0) {
- DeoptimizeIf(al, instr, Deoptimizer::kDivisionByZero);
+ DeoptimizeIf(al, instr, "division by zero");
return;
}
@@ -1363,7 +1363,7 @@
HDiv* hdiv = instr->hydrogen();
if (hdiv->CheckFlag(HValue::kBailoutOnMinusZero) && divisor < 0) {
__ cmp(dividend, Operand::Zero());
- DeoptimizeIf(eq, instr, Deoptimizer::kMinusZero);
+ DeoptimizeIf(eq, instr, "minus zero");
}
__ TruncatingDiv(result, dividend, Abs(divisor));
@@ -1373,7 +1373,7 @@
__ mov(ip, Operand(divisor));
__ smull(scratch0(), ip, result, ip);
__ sub(scratch0(), scratch0(), dividend, SetCC);
- DeoptimizeIf(ne, instr, Deoptimizer::kLostPrecision);
+ DeoptimizeIf(ne, instr, "lost precision");
}
}
@@ -1388,7 +1388,7 @@
// Check for x / 0.
if (hdiv->CheckFlag(HValue::kCanBeDivByZero)) {
__ cmp(divisor, Operand::Zero());
- DeoptimizeIf(eq, instr, Deoptimizer::kDivisionByZero);
+ DeoptimizeIf(eq, instr, "division by zero");
}
// Check for (0 / -x) that will produce negative zero.
@@ -1400,7 +1400,7 @@
}
__ b(pl, &positive);
__ cmp(dividend, Operand::Zero());
- DeoptimizeIf(eq, instr, Deoptimizer::kMinusZero);
+ DeoptimizeIf(eq, instr, "minus zero");
__ bind(&positive);
}
@@ -1412,7 +1412,7 @@
// support because, on ARM, sdiv kMinInt, -1 -> kMinInt.
__ cmp(dividend, Operand(kMinInt));
__ cmp(divisor, Operand(-1), eq);
- DeoptimizeIf(eq, instr, Deoptimizer::kOverflow);
+ DeoptimizeIf(eq, instr, "overflow");
}
if (CpuFeatures::IsSupported(SUDIV)) {
@@ -1435,7 +1435,7 @@
Register remainder = scratch0();
__ Mls(remainder, result, divisor, dividend);
__ cmp(remainder, Operand::Zero());
- DeoptimizeIf(ne, instr, Deoptimizer::kLostPrecision);
+ DeoptimizeIf(ne, instr, "lost precision");
}
}
@@ -1486,13 +1486,13 @@
// If the divisor is negative, we have to negate and handle edge cases.
__ rsb(result, dividend, Operand::Zero(), SetCC);
if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) {
- DeoptimizeIf(eq, instr, Deoptimizer::kMinusZero);
+ DeoptimizeIf(eq, instr, "minus zero");
}
// Dividing by -1 is basically negation, unless we overflow.
if (divisor == -1) {
if (instr->hydrogen()->CheckFlag(HValue::kLeftCanBeMinInt)) {
- DeoptimizeIf(vs, instr, Deoptimizer::kOverflow);
+ DeoptimizeIf(vs, instr, "overflow");
}
return;
}
@@ -1515,7 +1515,7 @@
DCHECK(!dividend.is(result));
if (divisor == 0) {
- DeoptimizeIf(al, instr, Deoptimizer::kDivisionByZero);
+ DeoptimizeIf(al, instr, "division by zero");
return;
}
@@ -1523,7 +1523,7 @@
HMathFloorOfDiv* hdiv = instr->hydrogen();
if (hdiv->CheckFlag(HValue::kBailoutOnMinusZero) && divisor < 0) {
__ cmp(dividend, Operand::Zero());
- DeoptimizeIf(eq, instr, Deoptimizer::kMinusZero);
+ DeoptimizeIf(eq, instr, "minus zero");
}
// Easy case: We need no dynamic check for the dividend and the flooring
@@ -1564,7 +1564,7 @@
// Check for x / 0.
if (hdiv->CheckFlag(HValue::kCanBeDivByZero)) {
__ cmp(right, Operand::Zero());
- DeoptimizeIf(eq, instr, Deoptimizer::kDivisionByZero);
+ DeoptimizeIf(eq, instr, "division by zero");
}
// Check for (0 / -x) that will produce negative zero.
@@ -1576,7 +1576,7 @@
}
__ b(pl, &positive);
__ cmp(left, Operand::Zero());
- DeoptimizeIf(eq, instr, Deoptimizer::kMinusZero);
+ DeoptimizeIf(eq, instr, "minus zero");
__ bind(&positive);
}
@@ -1588,7 +1588,7 @@
// support because, on ARM, sdiv kMinInt, -1 -> kMinInt.
__ cmp(left, Operand(kMinInt));
__ cmp(right, Operand(-1), eq);
- DeoptimizeIf(eq, instr, Deoptimizer::kOverflow);
+ DeoptimizeIf(eq, instr, "overflow");
}
if (CpuFeatures::IsSupported(SUDIV)) {
@@ -1634,14 +1634,14 @@
// The case of a null constant will be handled separately.
// If constant is negative and left is null, the result should be -0.
__ cmp(left, Operand::Zero());
- DeoptimizeIf(eq, instr, Deoptimizer::kMinusZero);
+ DeoptimizeIf(eq, instr, "minus zero");
}
switch (constant) {
case -1:
if (overflow) {
__ rsb(result, left, Operand::Zero(), SetCC);
- DeoptimizeIf(vs, instr, Deoptimizer::kOverflow);
+ DeoptimizeIf(vs, instr, "overflow");
} else {
__ rsb(result, left, Operand::Zero());
}
@@ -1651,7 +1651,7 @@
// If left is strictly negative and the constant is null, the
// result is -0. Deoptimize if required, otherwise return 0.
__ cmp(left, Operand::Zero());
- DeoptimizeIf(mi, instr, Deoptimizer::kMinusZero);
+ DeoptimizeIf(mi, instr, "minus zero");
}
__ mov(result, Operand::Zero());
break;
@@ -1701,7 +1701,7 @@
__ smull(result, scratch, left, right);
}
__ cmp(scratch, Operand(result, ASR, 31));
- DeoptimizeIf(ne, instr, Deoptimizer::kOverflow);
+ DeoptimizeIf(ne, instr, "overflow");
} else {
if (instr->hydrogen()->representation().IsSmi()) {
__ SmiUntag(result, left);
@@ -1717,7 +1717,7 @@
__ b(pl, &done);
// Bail out if the result is minus zero.
__ cmp(result, Operand::Zero());
- DeoptimizeIf(eq, instr, Deoptimizer::kMinusZero);
+ DeoptimizeIf(eq, instr, "minus zero");
__ bind(&done);
}
}
@@ -1780,7 +1780,7 @@
case Token::SHR:
if (instr->can_deopt()) {
__ mov(result, Operand(left, LSR, scratch), SetCC);
- DeoptimizeIf(mi, instr, Deoptimizer::kNegativeValue);
+ DeoptimizeIf(mi, instr, "negative value");
} else {
__ mov(result, Operand(left, LSR, scratch));
}
@@ -1817,7 +1817,7 @@
} else {
if (instr->can_deopt()) {
__ tst(left, Operand(0x80000000));
- DeoptimizeIf(ne, instr, Deoptimizer::kNegativeValue);
+ DeoptimizeIf(ne, instr, "negative value");
}
__ Move(result, left);
}
@@ -1832,7 +1832,7 @@
} else {
__ SmiTag(result, left, SetCC);
}
- DeoptimizeIf(vs, instr, Deoptimizer::kOverflow);
+ DeoptimizeIf(vs, instr, "overflow");
} else {
__ mov(result, Operand(left, LSL, shift_count));
}
@@ -1864,7 +1864,7 @@
}
if (can_overflow) {
- DeoptimizeIf(vs, instr, Deoptimizer::kOverflow);
+ DeoptimizeIf(vs, instr, "overflow");
}
}
@@ -1885,7 +1885,7 @@
}
if (can_overflow) {
- DeoptimizeIf(vs, instr, Deoptimizer::kOverflow);
+ DeoptimizeIf(vs, instr, "overflow");
}
}
@@ -1953,9 +1953,9 @@
DCHECK(!scratch.is(object));
__ SmiTst(object);
- DeoptimizeIf(eq, instr, Deoptimizer::kSmi);
+ DeoptimizeIf(eq, instr, "Smi");
__ CompareObjectType(object, scratch, scratch, JS_DATE_TYPE);
- DeoptimizeIf(ne, instr, Deoptimizer::kNotADateObject);
+ DeoptimizeIf(ne, instr, "not a date object");
if (index->value() == 0) {
__ ldr(result, FieldMemOperand(object, JSDate::kValueOffset));
@@ -2072,7 +2072,7 @@
}
if (can_overflow) {
- DeoptimizeIf(vs, instr, Deoptimizer::kOverflow);
+ DeoptimizeIf(vs, instr, "overflow");
}
}
@@ -2298,7 +2298,7 @@
} else if (expected.NeedsMap()) {
// If we need a map later and have a Smi -> deopt.
__ SmiTst(reg);
- DeoptimizeIf(eq, instr, Deoptimizer::kSmi);
+ DeoptimizeIf(eq, instr, "Smi");
}
const Register map = scratch0();
@@ -2354,7 +2354,7 @@
if (!expected.IsGeneric()) {
// We've seen something for the first time -> deopt.
// This can only happen if we are not generic already.
- DeoptimizeIf(al, instr, Deoptimizer::kUnexpectedObject);
+ DeoptimizeIf(al, instr, "unexpected object");
}
}
}
@@ -3000,7 +3000,7 @@
if (instr->hydrogen()->RequiresHoleCheck()) {
__ LoadRoot(ip, Heap::kTheHoleValueRootIndex);
__ cmp(result, ip);
- DeoptimizeIf(eq, instr, Deoptimizer::kHole);
+ DeoptimizeIf(eq, instr, "hole");
}
}
@@ -3055,7 +3055,7 @@
Register payload = ToRegister(instr->temp());
__ ldr(payload, FieldMemOperand(cell, Cell::kValueOffset));
__ CompareRoot(payload, Heap::kTheHoleValueRootIndex);
- DeoptimizeIf(eq, instr, Deoptimizer::kHole);
+ DeoptimizeIf(eq, instr, "hole");
}
// Store the value.
@@ -3072,7 +3072,7 @@
__ LoadRoot(ip, Heap::kTheHoleValueRootIndex);
__ cmp(result, ip);
if (instr->hydrogen()->DeoptimizesOnHole()) {
- DeoptimizeIf(eq, instr, Deoptimizer::kHole);
+ DeoptimizeIf(eq, instr, "hole");
} else {
__ mov(result, Operand(factory()->undefined_value()), LeaveCC, eq);
}
@@ -3093,7 +3093,7 @@
__ LoadRoot(ip, Heap::kTheHoleValueRootIndex);
__ cmp(scratch, ip);
if (instr->hydrogen()->DeoptimizesOnHole()) {
- DeoptimizeIf(eq, instr, Deoptimizer::kHole);
+ DeoptimizeIf(eq, instr, "hole");
} else {
__ b(ne, &skip_assignment);
}
@@ -3174,7 +3174,7 @@
// Check that the function has a prototype or an initial map.
__ LoadRoot(ip, Heap::kTheHoleValueRootIndex);
__ cmp(result, ip);
- DeoptimizeIf(eq, instr, Deoptimizer::kHole);
+ DeoptimizeIf(eq, instr, "hole");
// If the function does not have an initial map, we're done.
Label done;
@@ -3300,7 +3300,7 @@
__ ldr(result, mem_operand);
if (!instr->hydrogen()->CheckFlag(HInstruction::kUint32)) {
__ cmp(result, Operand(0x80000000));
- DeoptimizeIf(cs, instr, Deoptimizer::kNegativeValue);
+ DeoptimizeIf(cs, instr, "negative value");
}
break;
case FLOAT32_ELEMENTS:
@@ -3353,7 +3353,7 @@
if (instr->hydrogen()->RequiresHoleCheck()) {
__ ldr(scratch, MemOperand(scratch, sizeof(kHoleNanLower32)));
__ cmp(scratch, Operand(kHoleNanUpper32));
- DeoptimizeIf(eq, instr, Deoptimizer::kHole);
+ DeoptimizeIf(eq, instr, "hole");
}
}
@@ -3387,11 +3387,11 @@
if (instr->hydrogen()->RequiresHoleCheck()) {
if (IsFastSmiElementsKind(instr->hydrogen()->elements_kind())) {
__ SmiTst(result);
- DeoptimizeIf(ne, instr, Deoptimizer::kNotASmi);
+ DeoptimizeIf(ne, instr, "not a Smi");
} else {
__ LoadRoot(scratch, Heap::kTheHoleValueRootIndex);
__ cmp(result, scratch);
- DeoptimizeIf(eq, instr, Deoptimizer::kHole);
+ DeoptimizeIf(eq, instr, "hole");
}
}
}
@@ -3533,9 +3533,9 @@
// Deoptimize if the receiver is not a JS object.
__ SmiTst(receiver);
- DeoptimizeIf(eq, instr, Deoptimizer::kSmi);
+ DeoptimizeIf(eq, instr, "Smi");
__ CompareObjectType(receiver, scratch, scratch, FIRST_SPEC_OBJECT_TYPE);
- DeoptimizeIf(lt, instr, Deoptimizer::kNotAJavaScriptObject);
+ DeoptimizeIf(lt, instr, "not a JavaScript object");
__ b(&result_in_receiver);
__ bind(&global_object);
@@ -3570,7 +3570,7 @@
// adaptor frame below it.
const uint32_t kArgumentsLimit = 1 * KB;
__ cmp(length, Operand(kArgumentsLimit));
- DeoptimizeIf(hi, instr, Deoptimizer::kTooManyArguments);
+ DeoptimizeIf(hi, instr, "too many arguments");
// Push the receiver and use the register to keep the original
// number of arguments.
@@ -3696,7 +3696,7 @@
__ ldr(scratch, FieldMemOperand(input, HeapObject::kMapOffset));
__ LoadRoot(ip, Heap::kHeapNumberMapRootIndex);
__ cmp(scratch, Operand(ip));
- DeoptimizeIf(ne, instr, Deoptimizer::kNotAHeapNumber);
+ DeoptimizeIf(ne, instr, "not a heap number");
Label done;
Register exponent = scratch0();
@@ -3764,7 +3764,7 @@
// if input is positive.
__ rsb(result, input, Operand::Zero(), SetCC, mi);
// Deoptimize on overflow.
- DeoptimizeIf(vs, instr, Deoptimizer::kOverflow);
+ DeoptimizeIf(vs, instr, "overflow");
}
@@ -3811,7 +3811,7 @@
Label done, exact;
__ TryInt32Floor(result, input, input_high, double_scratch0(), &done, &exact);
- DeoptimizeIf(al, instr, Deoptimizer::kLostPrecisionOrNaN);
+ DeoptimizeIf(al, instr, "lost precision or NaN");
__ bind(&exact);
if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) {
@@ -3819,7 +3819,7 @@
__ cmp(result, Operand::Zero());
__ b(ne, &done);
__ cmp(input_high, Operand::Zero());
- DeoptimizeIf(mi, instr, Deoptimizer::kMinusZero);
+ DeoptimizeIf(mi, instr, "minus zero");
}
__ bind(&done);
}
@@ -3845,7 +3845,7 @@
__ VmovHigh(input_high, input);
__ cmp(input_high, Operand::Zero());
// [-0.5, -0].
- DeoptimizeIf(mi, instr, Deoptimizer::kMinusZero);
+ DeoptimizeIf(mi, instr, "minus zero");
}
__ VFPCompareAndSetFlags(input, dot_five);
__ mov(result, Operand(1), LeaveCC, eq); // +0.5.
@@ -3859,7 +3859,7 @@
// Reuse dot_five (double_scratch0) as we no longer need this value.
__ TryInt32Floor(result, input_plus_dot_five, input_high, double_scratch0(),
&done, &done);
- DeoptimizeIf(al, instr, Deoptimizer::kLostPrecisionOrNaN);
+ DeoptimizeIf(al, instr, "lost precision or NaN");
__ bind(&done);
}
@@ -3923,7 +3923,7 @@
__ ldr(r6, FieldMemOperand(tagged_exponent, HeapObject::kMapOffset));
__ LoadRoot(ip, Heap::kHeapNumberMapRootIndex);
__ cmp(r6, Operand(ip));
- DeoptimizeIf(ne, instr, Deoptimizer::kNotAHeapNumber);
+ DeoptimizeIf(ne, instr, "not a heap number");
__ bind(&no_deopt);
MathPowStub stub(isolate(), MathPowStub::TAGGED);
__ CallStub(&stub);
@@ -4332,7 +4332,7 @@
__ stop("eliminated bounds check failed");
__ bind(&done);
} else {
- DeoptimizeIf(cc, instr, Deoptimizer::kOutOfBounds);
+ DeoptimizeIf(cc, instr, "out of bounds");
}
}
@@ -4580,7 +4580,7 @@
Register temp = ToRegister(instr->temp());
Label no_memento_found;
__ TestJSArrayForAllocationMemento(object, temp, &no_memento_found);
- DeoptimizeIf(eq, instr, Deoptimizer::kMementoFound);
+ DeoptimizeIf(eq, instr, "memento found");
__ bind(&no_memento_found);
}
@@ -4915,12 +4915,12 @@
if (hchange->CheckFlag(HValue::kCanOverflow) &&
hchange->value()->CheckFlag(HValue::kUint32)) {
__ tst(input, Operand(0xc0000000));
- DeoptimizeIf(ne, instr, Deoptimizer::kOverflow);
+ DeoptimizeIf(ne, instr, "overflow");
}
if (hchange->CheckFlag(HValue::kCanOverflow) &&
!hchange->value()->CheckFlag(HValue::kUint32)) {
__ SmiTag(output, input, SetCC);
- DeoptimizeIf(vs, instr, Deoptimizer::kOverflow);
+ DeoptimizeIf(vs, instr, "overflow");
} else {
__ SmiTag(output, input);
}
@@ -4934,7 +4934,7 @@
STATIC_ASSERT(kHeapObjectTag == 1);
// If the input is a HeapObject, SmiUntag will set the carry flag.
__ SmiUntag(result, input, SetCC);
- DeoptimizeIf(cs, instr, Deoptimizer::kNotASmi);
+ DeoptimizeIf(cs, instr, "not a Smi");
} else {
__ SmiUntag(result, input);
}
@@ -4962,7 +4962,7 @@
if (can_convert_undefined_to_nan) {
__ b(ne, &convert);
} else {
- DeoptimizeIf(ne, instr, Deoptimizer::kNotAHeapNumber);
+ DeoptimizeIf(ne, instr, "not a heap number");
}
// load heap number
__ vldr(result_reg, input_reg, HeapNumber::kValueOffset - kHeapObjectTag);
@@ -4972,7 +4972,7 @@
__ b(ne, &done);
__ VmovHigh(scratch, result_reg);
__ cmp(scratch, Operand(HeapNumber::kSignMask));
- DeoptimizeIf(eq, instr, Deoptimizer::kMinusZero);
+ DeoptimizeIf(eq, instr, "minus zero");
}
__ jmp(&done);
if (can_convert_undefined_to_nan) {
@@ -4980,7 +4980,7 @@
// Convert undefined (and hole) to NaN.
__ LoadRoot(ip, Heap::kUndefinedValueRootIndex);
__ cmp(input_reg, Operand(ip));
- DeoptimizeIf(ne, instr, Deoptimizer::kNotAHeapNumberUndefined);
+ DeoptimizeIf(ne, instr, "not a heap number/undefined");
__ LoadRoot(scratch, Heap::kNanValueRootIndex);
__ vldr(result_reg, scratch, HeapNumber::kValueOffset - kHeapObjectTag);
__ jmp(&done);
@@ -5048,22 +5048,22 @@
__ bind(&check_false);
__ LoadRoot(ip, Heap::kFalseValueRootIndex);
__ cmp(scratch2, Operand(ip));
- DeoptimizeIf(ne, instr, Deoptimizer::kNotAHeapNumberUndefinedBoolean);
+ DeoptimizeIf(ne, instr, "not a heap number/undefined/true/false");
__ mov(input_reg, Operand::Zero());
} else {
- DeoptimizeIf(ne, instr, Deoptimizer::kNotAHeapNumber);
+ DeoptimizeIf(ne, instr, "not a heap number");
__ sub(ip, scratch2, Operand(kHeapObjectTag));
__ vldr(double_scratch2, ip, HeapNumber::kValueOffset);
__ TryDoubleToInt32Exact(input_reg, double_scratch2, double_scratch);
- DeoptimizeIf(ne, instr, Deoptimizer::kLostPrecisionOrNaN);
+ DeoptimizeIf(ne, instr, "lost precision or NaN");
if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) {
__ cmp(input_reg, Operand::Zero());
__ b(ne, &done);
__ VmovHigh(scratch1, double_scratch2);
__ tst(scratch1, Operand(HeapNumber::kSignMask));
- DeoptimizeIf(ne, instr, Deoptimizer::kMinusZero);
+ DeoptimizeIf(ne, instr, "minus zero");
}
}
__ bind(&done);
@@ -5132,14 +5132,14 @@
} else {
__ TryDoubleToInt32Exact(result_reg, double_input, double_scratch);
// Deoptimize if the input wasn't a int32 (inside a double).
- DeoptimizeIf(ne, instr, Deoptimizer::kLostPrecisionOrNaN);
+ DeoptimizeIf(ne, instr, "lost precision or NaN");
if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) {
Label done;
__ cmp(result_reg, Operand::Zero());
__ b(ne, &done);
__ VmovHigh(scratch1, double_input);
__ tst(scratch1, Operand(HeapNumber::kSignMask));
- DeoptimizeIf(ne, instr, Deoptimizer::kMinusZero);
+ DeoptimizeIf(ne, instr, "minus zero");
__ bind(&done);
}
}
@@ -5157,26 +5157,26 @@
} else {
__ TryDoubleToInt32Exact(result_reg, double_input, double_scratch);
// Deoptimize if the input wasn't a int32 (inside a double).
- DeoptimizeIf(ne, instr, Deoptimizer::kLostPrecisionOrNaN);
+ DeoptimizeIf(ne, instr, "lost precision or NaN");
if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) {
Label done;
__ cmp(result_reg, Operand::Zero());
__ b(ne, &done);
__ VmovHigh(scratch1, double_input);
__ tst(scratch1, Operand(HeapNumber::kSignMask));
- DeoptimizeIf(ne, instr, Deoptimizer::kMinusZero);
+ DeoptimizeIf(ne, instr, "minus zero");
__ bind(&done);
}
}
__ SmiTag(result_reg, SetCC);
- DeoptimizeIf(vs, instr, Deoptimizer::kOverflow);
+ DeoptimizeIf(vs, instr, "overflow");
}
void LCodeGen::DoCheckSmi(LCheckSmi* instr) {
LOperand* input = instr->value();
__ SmiTst(ToRegister(input));
- DeoptimizeIf(ne, instr, Deoptimizer::kNotASmi);
+ DeoptimizeIf(ne, instr, "not a Smi");
}
@@ -5184,7 +5184,7 @@
if (!instr->hydrogen()->value()->type().IsHeapObject()) {
LOperand* input = instr->value();
__ SmiTst(ToRegister(input));
- DeoptimizeIf(eq, instr, Deoptimizer::kSmi);
+ DeoptimizeIf(eq, instr, "Smi");
}
}
@@ -5205,13 +5205,13 @@
// If there is only one type in the interval check for equality.
if (first == last) {
- DeoptimizeIf(ne, instr, Deoptimizer::kWrongInstanceType);
+ DeoptimizeIf(ne, instr, "wrong instance type");
} else {
- DeoptimizeIf(lo, instr, Deoptimizer::kWrongInstanceType);
+ DeoptimizeIf(lo, instr, "wrong instance type");
// Omit check for the last type.
if (last != LAST_TYPE) {
__ cmp(scratch, Operand(last));
- DeoptimizeIf(hi, instr, Deoptimizer::kWrongInstanceType);
+ DeoptimizeIf(hi, instr, "wrong instance type");
}
}
} else {
@@ -5222,11 +5222,11 @@
if (base::bits::IsPowerOfTwo32(mask)) {
DCHECK(tag == 0 || base::bits::IsPowerOfTwo32(tag));
__ tst(scratch, Operand(mask));
- DeoptimizeIf(tag == 0 ? ne : eq, instr, Deoptimizer::kWrongInstanceType);
+ DeoptimizeIf(tag == 0 ? ne : eq, instr, "wrong instance type");
} else {
__ and_(scratch, scratch, Operand(mask));
__ cmp(scratch, Operand(tag));
- DeoptimizeIf(ne, instr, Deoptimizer::kWrongInstanceType);
+ DeoptimizeIf(ne, instr, "wrong instance type");
}
}
}
@@ -5245,7 +5245,7 @@
} else {
__ cmp(reg, Operand(object));
}
- DeoptimizeIf(ne, instr, Deoptimizer::kValueMismatch);
+ DeoptimizeIf(ne, instr, "value mismatch");
}
@@ -5260,7 +5260,7 @@
__ StoreToSafepointRegisterSlot(r0, scratch0());
}
__ tst(scratch0(), Operand(kSmiTagMask));
- DeoptimizeIf(eq, instr, Deoptimizer::kInstanceMigrationFailed);
+ DeoptimizeIf(eq, instr, "instance migration failed");
}
@@ -5318,7 +5318,7 @@
if (instr->hydrogen()->HasMigrationTarget()) {
__ b(ne, deferred->entry());
} else {
- DeoptimizeIf(ne, instr, Deoptimizer::kWrongMap);
+ DeoptimizeIf(ne, instr, "wrong map");
}
__ bind(&success);
@@ -5357,7 +5357,7 @@
// Check for undefined. Undefined is converted to zero for clamping
// conversions.
__ cmp(input_reg, Operand(factory()->undefined_value()));
- DeoptimizeIf(ne, instr, Deoptimizer::kNotAHeapNumberUndefined);
+ DeoptimizeIf(ne, instr, "not a heap number/undefined");
__ mov(result_reg, Operand::Zero());
__ jmp(&done);
@@ -5825,19 +5825,19 @@
void LCodeGen::DoForInPrepareMap(LForInPrepareMap* instr) {
__ LoadRoot(ip, Heap::kUndefinedValueRootIndex);
__ cmp(r0, ip);
- DeoptimizeIf(eq, instr, Deoptimizer::kUndefined);
+ DeoptimizeIf(eq, instr, "undefined");
Register null_value = r5;
__ LoadRoot(null_value, Heap::kNullValueRootIndex);
__ cmp(r0, null_value);
- DeoptimizeIf(eq, instr, Deoptimizer::kNull);
+ DeoptimizeIf(eq, instr, "null");
__ SmiTst(r0);
- DeoptimizeIf(eq, instr, Deoptimizer::kSmi);
+ DeoptimizeIf(eq, instr, "Smi");
STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_SPEC_OBJECT_TYPE);
__ CompareObjectType(r0, r1, r1, LAST_JS_PROXY_TYPE);
- DeoptimizeIf(le, instr, Deoptimizer::kWrongInstanceType);
+ DeoptimizeIf(le, instr, "wrong instance type");
Label use_cache, call_runtime;
__ CheckEnumCache(null_value, &call_runtime);
@@ -5853,7 +5853,7 @@
__ ldr(r1, FieldMemOperand(r0, HeapObject::kMapOffset));
__ LoadRoot(ip, Heap::kMetaMapRootIndex);
__ cmp(r1, ip);
- DeoptimizeIf(ne, instr, Deoptimizer::kWrongMap);
+ DeoptimizeIf(ne, instr, "wrong map");
__ bind(&use_cache);
}
@@ -5875,7 +5875,7 @@
__ ldr(result,
FieldMemOperand(result, FixedArray::SizeFor(instr->idx())));
__ cmp(result, Operand::Zero());
- DeoptimizeIf(eq, instr, Deoptimizer::kNoCache);
+ DeoptimizeIf(eq, instr, "no cache");
__ bind(&done);
}
@@ -5886,7 +5886,7 @@
Register map = ToRegister(instr->map());
__ ldr(scratch0(), FieldMemOperand(object, HeapObject::kMapOffset));
__ cmp(map, scratch0());
- DeoptimizeIf(ne, instr, Deoptimizer::kWrongMap);
+ DeoptimizeIf(ne, instr, "wrong map");
}
« no previous file with comments | « src/arm/lithium-codegen-arm.h ('k') | src/arm64/assembler-arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698