Index: src/arm64/lithium-arm64.cc |
diff --git a/src/arm64/lithium-arm64.cc b/src/arm64/lithium-arm64.cc |
index 8aab36ba500ff32fa2f218516ee3b047195fb85b..7bb66dbd7018afcd7bf6a3579565cc60a7597b34 100644 |
--- a/src/arm64/lithium-arm64.cc |
+++ b/src/arm64/lithium-arm64.cc |
@@ -24,17 +24,17 @@ void LInstruction::VerifyCall() { |
// outputs because all registers are blocked by the calling convention. |
// Inputs operands must use a fixed register or use-at-start policy or |
// a non-register policy. |
- ASSERT(Output() == NULL || |
+ DCHECK(Output() == NULL || |
LUnallocated::cast(Output())->HasFixedPolicy() || |
!LUnallocated::cast(Output())->HasRegisterPolicy()); |
for (UseIterator it(this); !it.Done(); it.Advance()) { |
LUnallocated* operand = LUnallocated::cast(it.Current()); |
- ASSERT(operand->HasFixedPolicy() || |
+ DCHECK(operand->HasFixedPolicy() || |
operand->IsUsedAtStart()); |
} |
for (TempIterator it(this); !it.Done(); it.Advance()) { |
LUnallocated* operand = LUnallocated::cast(it.Current()); |
- ASSERT(operand->HasFixedPolicy() ||!operand->HasRegisterPolicy()); |
+ DCHECK(operand->HasFixedPolicy() ||!operand->HasRegisterPolicy()); |
} |
} |
#endif |
@@ -501,7 +501,7 @@ LInstruction* LChunkBuilder::MarkAsCall(LInstruction* instr, |
LInstruction* LChunkBuilder::AssignPointerMap(LInstruction* instr) { |
- ASSERT(!instr->HasPointerMap()); |
+ DCHECK(!instr->HasPointerMap()); |
instr->set_pointer_map(new(zone()) LPointerMap(zone())); |
return instr; |
} |
@@ -543,7 +543,7 @@ LOperand* LPlatformChunk::GetNextSpillSlot(RegisterKind kind) { |
if (kind == DOUBLE_REGISTERS) { |
return LDoubleStackSlot::Create(index, zone()); |
} else { |
- ASSERT(kind == GENERAL_REGISTERS); |
+ DCHECK(kind == GENERAL_REGISTERS); |
return LStackSlot::Create(index, zone()); |
} |
} |
@@ -551,20 +551,20 @@ LOperand* LPlatformChunk::GetNextSpillSlot(RegisterKind kind) { |
LOperand* LChunkBuilder::FixedTemp(Register reg) { |
LUnallocated* operand = ToUnallocated(reg); |
- ASSERT(operand->HasFixedPolicy()); |
+ DCHECK(operand->HasFixedPolicy()); |
return operand; |
} |
LOperand* LChunkBuilder::FixedTemp(DoubleRegister reg) { |
LUnallocated* operand = ToUnallocated(reg); |
- ASSERT(operand->HasFixedPolicy()); |
+ DCHECK(operand->HasFixedPolicy()); |
return operand; |
} |
LPlatformChunk* LChunkBuilder::Build() { |
- ASSERT(is_unused()); |
+ DCHECK(is_unused()); |
chunk_ = new(zone()) LPlatformChunk(info_, graph_); |
LPhase phase("L_Building chunk", chunk_); |
status_ = BUILDING; |
@@ -590,7 +590,7 @@ LPlatformChunk* LChunkBuilder::Build() { |
void LChunkBuilder::DoBasicBlock(HBasicBlock* block) { |
- ASSERT(is_building()); |
+ DCHECK(is_building()); |
current_block_ = block; |
if (block->IsStartBlock()) { |
@@ -599,14 +599,14 @@ void LChunkBuilder::DoBasicBlock(HBasicBlock* block) { |
} else if (block->predecessors()->length() == 1) { |
// We have a single predecessor => copy environment and outgoing |
// argument count from the predecessor. |
- ASSERT(block->phis()->length() == 0); |
+ DCHECK(block->phis()->length() == 0); |
HBasicBlock* pred = block->predecessors()->at(0); |
HEnvironment* last_environment = pred->last_environment(); |
- ASSERT(last_environment != NULL); |
+ DCHECK(last_environment != NULL); |
// Only copy the environment, if it is later used again. |
if (pred->end()->SecondSuccessor() == NULL) { |
- ASSERT(pred->end()->FirstSuccessor() == block); |
+ DCHECK(pred->end()->FirstSuccessor() == block); |
} else { |
if ((pred->end()->FirstSuccessor()->block_id() > block->block_id()) || |
(pred->end()->SecondSuccessor()->block_id() > block->block_id())) { |
@@ -614,7 +614,7 @@ void LChunkBuilder::DoBasicBlock(HBasicBlock* block) { |
} |
} |
block->UpdateEnvironment(last_environment); |
- ASSERT(pred->argument_count() >= 0); |
+ DCHECK(pred->argument_count() >= 0); |
argument_count_ = pred->argument_count(); |
} else { |
// We are at a state join => process phis. |
@@ -667,7 +667,7 @@ void LChunkBuilder::VisitInstruction(HInstruction* current) { |
if (current->OperandCount() == 0) { |
instr = DefineAsRegister(new(zone()) LDummy()); |
} else { |
- ASSERT(!current->OperandAt(0)->IsControlInstruction()); |
+ DCHECK(!current->OperandAt(0)->IsControlInstruction()); |
instr = DefineAsRegister(new(zone()) |
LDummyUse(UseAny(current->OperandAt(0)))); |
} |
@@ -690,7 +690,7 @@ void LChunkBuilder::VisitInstruction(HInstruction* current) { |
} |
argument_count_ += current->argument_delta(); |
- ASSERT(argument_count_ >= 0); |
+ DCHECK(argument_count_ >= 0); |
if (instr != NULL) { |
AddInstruction(instr, current); |
@@ -732,7 +732,7 @@ void LChunkBuilder::AddInstruction(LInstruction* instr, |
LUnallocated* operand = LUnallocated::cast(it.Current()); |
if (operand->HasFixedPolicy()) ++fixed; |
} |
- ASSERT(fixed == 0 || used_at_start == 0); |
+ DCHECK(fixed == 0 || used_at_start == 0); |
} |
#endif |
@@ -786,9 +786,9 @@ LInstruction* LChunkBuilder::DoAbnormalExit(HAbnormalExit* instr) { |
LInstruction* LChunkBuilder::DoArithmeticD(Token::Value op, |
HArithmeticBinaryOperation* instr) { |
- ASSERT(instr->representation().IsDouble()); |
- ASSERT(instr->left()->representation().IsDouble()); |
- ASSERT(instr->right()->representation().IsDouble()); |
+ DCHECK(instr->representation().IsDouble()); |
+ DCHECK(instr->left()->representation().IsDouble()); |
+ DCHECK(instr->right()->representation().IsDouble()); |
if (op == Token::MOD) { |
LOperand* left = UseFixedDouble(instr->left(), d0); |
@@ -806,7 +806,7 @@ LInstruction* LChunkBuilder::DoArithmeticD(Token::Value op, |
LInstruction* LChunkBuilder::DoArithmeticT(Token::Value op, |
HBinaryOperation* instr) { |
- ASSERT((op == Token::ADD) || (op == Token::SUB) || (op == Token::MUL) || |
+ DCHECK((op == Token::ADD) || (op == Token::SUB) || (op == Token::MUL) || |
(op == Token::DIV) || (op == Token::MOD) || (op == Token::SHR) || |
(op == Token::SHL) || (op == Token::SAR) || (op == Token::ROR) || |
(op == Token::BIT_OR) || (op == Token::BIT_AND) || |
@@ -816,9 +816,9 @@ LInstruction* LChunkBuilder::DoArithmeticT(Token::Value op, |
// TODO(jbramley): Once we've implemented smi support for all arithmetic |
// operations, these assertions should check IsTagged(). |
- ASSERT(instr->representation().IsSmiOrTagged()); |
- ASSERT(left->representation().IsSmiOrTagged()); |
- ASSERT(right->representation().IsSmiOrTagged()); |
+ DCHECK(instr->representation().IsSmiOrTagged()); |
+ DCHECK(left->representation().IsSmiOrTagged()); |
+ DCHECK(right->representation().IsSmiOrTagged()); |
LOperand* context = UseFixed(instr->context(), cp); |
LOperand* left_operand = UseFixed(left, x1); |
@@ -858,8 +858,8 @@ LInstruction* LChunkBuilder::DoAccessArgumentsAt(HAccessArgumentsAt* instr) { |
LInstruction* LChunkBuilder::DoAdd(HAdd* instr) { |
if (instr->representation().IsSmiOrInteger32()) { |
- ASSERT(instr->left()->representation().Equals(instr->representation())); |
- ASSERT(instr->right()->representation().Equals(instr->representation())); |
+ DCHECK(instr->left()->representation().Equals(instr->representation())); |
+ DCHECK(instr->right()->representation().Equals(instr->representation())); |
LInstruction* shifted_operation = TryDoOpWithShiftedRightOperand(instr); |
if (shifted_operation != NULL) { |
@@ -877,16 +877,16 @@ LInstruction* LChunkBuilder::DoAdd(HAdd* instr) { |
} |
return result; |
} else if (instr->representation().IsExternal()) { |
- ASSERT(instr->left()->representation().IsExternal()); |
- ASSERT(instr->right()->representation().IsInteger32()); |
- ASSERT(!instr->CheckFlag(HValue::kCanOverflow)); |
+ DCHECK(instr->left()->representation().IsExternal()); |
+ DCHECK(instr->right()->representation().IsInteger32()); |
+ DCHECK(!instr->CheckFlag(HValue::kCanOverflow)); |
LOperand* left = UseRegisterAtStart(instr->left()); |
LOperand* right = UseRegisterOrConstantAtStart(instr->right()); |
return DefineAsRegister(new(zone()) LAddE(left, right)); |
} else if (instr->representation().IsDouble()) { |
return DoArithmeticD(Token::ADD, instr); |
} else { |
- ASSERT(instr->representation().IsTagged()); |
+ DCHECK(instr->representation().IsTagged()); |
return DoArithmeticT(Token::ADD, instr); |
} |
} |
@@ -942,9 +942,9 @@ LInstruction* LChunkBuilder::DoArgumentsObject(HArgumentsObject* instr) { |
LInstruction* LChunkBuilder::DoBitwise(HBitwise* instr) { |
if (instr->representation().IsSmiOrInteger32()) { |
- ASSERT(instr->left()->representation().Equals(instr->representation())); |
- ASSERT(instr->right()->representation().Equals(instr->representation())); |
- ASSERT(instr->CheckFlag(HValue::kTruncatingToInt32)); |
+ DCHECK(instr->left()->representation().Equals(instr->representation())); |
+ DCHECK(instr->right()->representation().Equals(instr->representation())); |
+ DCHECK(instr->CheckFlag(HValue::kTruncatingToInt32)); |
LInstruction* shifted_operation = TryDoOpWithShiftedRightOperand(instr); |
if (shifted_operation != NULL) { |
@@ -994,7 +994,7 @@ LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { |
// These representations have simple checks that cannot deoptimize. |
return new(zone()) LBranch(UseRegister(value), NULL, NULL); |
} else { |
- ASSERT(r.IsTagged()); |
+ DCHECK(r.IsTagged()); |
if (type.IsBoolean() || type.IsSmi() || type.IsJSArray() || |
type.IsHeapNumber()) { |
// These types have simple checks that cannot deoptimize. |
@@ -1014,7 +1014,7 @@ LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { |
if (expected.IsGeneric() || expected.IsEmpty()) { |
// The generic case cannot deoptimize because it already supports every |
// possible input type. |
- ASSERT(needs_temps); |
+ DCHECK(needs_temps); |
return new(zone()) LBranch(UseRegister(value), temp1, temp2); |
} else { |
return AssignEnvironment( |
@@ -1126,7 +1126,7 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) { |
} |
return AssignEnvironment(DefineSameAsFirst(new(zone()) LCheckSmi(value))); |
} else { |
- ASSERT(to.IsInteger32()); |
+ DCHECK(to.IsInteger32()); |
if (val->type().IsSmi() || val->representation().IsSmi()) { |
LOperand* value = UseRegisterAtStart(val); |
return DefineAsRegister(new(zone()) LSmiUntag(value, false)); |
@@ -1150,7 +1150,7 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) { |
LNumberTagD* result = new(zone()) LNumberTagD(value, temp1, temp2); |
return AssignPointerMap(DefineAsRegister(result)); |
} else { |
- ASSERT(to.IsSmi() || to.IsInteger32()); |
+ DCHECK(to.IsSmi() || to.IsInteger32()); |
if (instr->CanTruncateToInt32()) { |
LOperand* value = UseRegister(val); |
return DefineAsRegister(new(zone()) LTruncateDoubleToIntOrSmi(value)); |
@@ -1182,7 +1182,7 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) { |
} |
return result; |
} else { |
- ASSERT(to.IsDouble()); |
+ DCHECK(to.IsDouble()); |
if (val->CheckFlag(HInstruction::kUint32)) { |
return DefineAsRegister( |
new(zone()) LUint32ToDouble(UseRegisterAtStart(val))); |
@@ -1249,7 +1249,7 @@ LInstruction* LChunkBuilder::DoClampToUint8(HClampToUint8* instr) { |
} else if (input_rep.IsInteger32()) { |
return DefineAsRegister(new(zone()) LClampIToUint8(reg)); |
} else { |
- ASSERT(input_rep.IsSmiOrTagged()); |
+ DCHECK(input_rep.IsSmiOrTagged()); |
return AssignEnvironment( |
DefineAsRegister(new(zone()) LClampTToUint8(reg, |
TempRegister(), |
@@ -1260,7 +1260,7 @@ LInstruction* LChunkBuilder::DoClampToUint8(HClampToUint8* instr) { |
LInstruction* LChunkBuilder::DoClassOfTestAndBranch( |
HClassOfTestAndBranch* instr) { |
- ASSERT(instr->value()->representation().IsTagged()); |
+ DCHECK(instr->value()->representation().IsTagged()); |
LOperand* value = UseRegisterAtStart(instr->value()); |
return new(zone()) LClassOfTestAndBranch(value, |
TempRegister(), |
@@ -1272,15 +1272,15 @@ LInstruction* LChunkBuilder::DoCompareNumericAndBranch( |
HCompareNumericAndBranch* instr) { |
Representation r = instr->representation(); |
if (r.IsSmiOrInteger32()) { |
- ASSERT(instr->left()->representation().Equals(r)); |
- ASSERT(instr->right()->representation().Equals(r)); |
+ DCHECK(instr->left()->representation().Equals(r)); |
+ DCHECK(instr->right()->representation().Equals(r)); |
LOperand* left = UseRegisterOrConstantAtStart(instr->left()); |
LOperand* right = UseRegisterOrConstantAtStart(instr->right()); |
return new(zone()) LCompareNumericAndBranch(left, right); |
} else { |
- ASSERT(r.IsDouble()); |
- ASSERT(instr->left()->representation().IsDouble()); |
- ASSERT(instr->right()->representation().IsDouble()); |
+ DCHECK(r.IsDouble()); |
+ DCHECK(instr->left()->representation().IsDouble()); |
+ DCHECK(instr->right()->representation().IsDouble()); |
if (instr->left()->IsConstant() && instr->right()->IsConstant()) { |
LOperand* left = UseConstant(instr->left()); |
LOperand* right = UseConstant(instr->right()); |
@@ -1294,8 +1294,8 @@ LInstruction* LChunkBuilder::DoCompareNumericAndBranch( |
LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) { |
- ASSERT(instr->left()->representation().IsTagged()); |
- ASSERT(instr->right()->representation().IsTagged()); |
+ DCHECK(instr->left()->representation().IsTagged()); |
+ DCHECK(instr->right()->representation().IsTagged()); |
LOperand* context = UseFixed(instr->context(), cp); |
LOperand* left = UseFixed(instr->left(), x1); |
LOperand* right = UseFixed(instr->right(), x0); |
@@ -1325,7 +1325,7 @@ LInstruction* LChunkBuilder::DoCompareObjectEqAndBranch( |
LInstruction* LChunkBuilder::DoCompareMap(HCompareMap* instr) { |
- ASSERT(instr->value()->representation().IsTagged()); |
+ DCHECK(instr->value()->representation().IsTagged()); |
LOperand* value = UseRegisterAtStart(instr->value()); |
LOperand* temp = TempRegister(); |
return new(zone()) LCmpMapAndBranch(value, temp); |
@@ -1386,9 +1386,9 @@ LInstruction* LChunkBuilder::DoDeoptimize(HDeoptimize* instr) { |
LInstruction* LChunkBuilder::DoDivByPowerOf2I(HDiv* instr) { |
- ASSERT(instr->representation().IsInteger32()); |
- ASSERT(instr->left()->representation().Equals(instr->representation())); |
- ASSERT(instr->right()->representation().Equals(instr->representation())); |
+ DCHECK(instr->representation().IsInteger32()); |
+ DCHECK(instr->left()->representation().Equals(instr->representation())); |
+ DCHECK(instr->right()->representation().Equals(instr->representation())); |
LOperand* dividend = UseRegister(instr->left()); |
int32_t divisor = instr->right()->GetInteger32Constant(); |
LInstruction* result = DefineAsRegister(new(zone()) LDivByPowerOf2I( |
@@ -1404,9 +1404,9 @@ LInstruction* LChunkBuilder::DoDivByPowerOf2I(HDiv* instr) { |
LInstruction* LChunkBuilder::DoDivByConstI(HDiv* instr) { |
- ASSERT(instr->representation().IsInteger32()); |
- ASSERT(instr->left()->representation().Equals(instr->representation())); |
- ASSERT(instr->right()->representation().Equals(instr->representation())); |
+ DCHECK(instr->representation().IsInteger32()); |
+ DCHECK(instr->left()->representation().Equals(instr->representation())); |
+ DCHECK(instr->right()->representation().Equals(instr->representation())); |
LOperand* dividend = UseRegister(instr->left()); |
int32_t divisor = instr->right()->GetInteger32Constant(); |
LOperand* temp = instr->CheckFlag(HInstruction::kAllUsesTruncatingToInt32) |
@@ -1423,9 +1423,9 @@ LInstruction* LChunkBuilder::DoDivByConstI(HDiv* instr) { |
LInstruction* LChunkBuilder::DoDivI(HBinaryOperation* instr) { |
- ASSERT(instr->representation().IsSmiOrInteger32()); |
- ASSERT(instr->left()->representation().Equals(instr->representation())); |
- ASSERT(instr->right()->representation().Equals(instr->representation())); |
+ DCHECK(instr->representation().IsSmiOrInteger32()); |
+ DCHECK(instr->left()->representation().Equals(instr->representation())); |
+ DCHECK(instr->right()->representation().Equals(instr->representation())); |
LOperand* dividend = UseRegister(instr->left()); |
LOperand* divisor = UseRegister(instr->right()); |
LOperand* temp = instr->CheckFlag(HInstruction::kAllUsesTruncatingToInt32) |
@@ -1506,7 +1506,7 @@ LInstruction* LChunkBuilder::DoFunctionLiteral(HFunctionLiteral* instr) { |
LInstruction* LChunkBuilder::DoGetCachedArrayIndex( |
HGetCachedArrayIndex* instr) { |
- ASSERT(instr->value()->representation().IsTagged()); |
+ DCHECK(instr->value()->representation().IsTagged()); |
LOperand* value = UseRegisterAtStart(instr->value()); |
return DefineAsRegister(new(zone()) LGetCachedArrayIndex(value)); |
} |
@@ -1519,7 +1519,7 @@ LInstruction* LChunkBuilder::DoGoto(HGoto* instr) { |
LInstruction* LChunkBuilder::DoHasCachedArrayIndexAndBranch( |
HHasCachedArrayIndexAndBranch* instr) { |
- ASSERT(instr->value()->representation().IsTagged()); |
+ DCHECK(instr->value()->representation().IsTagged()); |
return new(zone()) LHasCachedArrayIndexAndBranch( |
UseRegisterAtStart(instr->value()), TempRegister()); |
} |
@@ -1527,7 +1527,7 @@ LInstruction* LChunkBuilder::DoHasCachedArrayIndexAndBranch( |
LInstruction* LChunkBuilder::DoHasInstanceTypeAndBranch( |
HHasInstanceTypeAndBranch* instr) { |
- ASSERT(instr->value()->representation().IsTagged()); |
+ DCHECK(instr->value()->representation().IsTagged()); |
LOperand* value = UseRegisterAtStart(instr->value()); |
return new(zone()) LHasInstanceTypeAndBranch(value, TempRegister()); |
} |
@@ -1585,7 +1585,7 @@ LInstruction* LChunkBuilder::DoCompareMinusZeroAndBranch( |
LInstruction* LChunkBuilder::DoIsObjectAndBranch(HIsObjectAndBranch* instr) { |
- ASSERT(instr->value()->representation().IsTagged()); |
+ DCHECK(instr->value()->representation().IsTagged()); |
LOperand* value = UseRegisterAtStart(instr->value()); |
LOperand* temp1 = TempRegister(); |
LOperand* temp2 = TempRegister(); |
@@ -1594,7 +1594,7 @@ LInstruction* LChunkBuilder::DoIsObjectAndBranch(HIsObjectAndBranch* instr) { |
LInstruction* LChunkBuilder::DoIsStringAndBranch(HIsStringAndBranch* instr) { |
- ASSERT(instr->value()->representation().IsTagged()); |
+ DCHECK(instr->value()->representation().IsTagged()); |
LOperand* value = UseRegisterAtStart(instr->value()); |
LOperand* temp = TempRegister(); |
return new(zone()) LIsStringAndBranch(value, temp); |
@@ -1602,14 +1602,14 @@ LInstruction* LChunkBuilder::DoIsStringAndBranch(HIsStringAndBranch* instr) { |
LInstruction* LChunkBuilder::DoIsSmiAndBranch(HIsSmiAndBranch* instr) { |
- ASSERT(instr->value()->representation().IsTagged()); |
+ DCHECK(instr->value()->representation().IsTagged()); |
return new(zone()) LIsSmiAndBranch(UseRegisterAtStart(instr->value())); |
} |
LInstruction* LChunkBuilder::DoIsUndetectableAndBranch( |
HIsUndetectableAndBranch* instr) { |
- ASSERT(instr->value()->representation().IsTagged()); |
+ DCHECK(instr->value()->representation().IsTagged()); |
LOperand* value = UseRegisterAtStart(instr->value()); |
return new(zone()) LIsUndetectableAndBranch(value, TempRegister()); |
} |
@@ -1622,7 +1622,7 @@ LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { |
if (env->entry()->arguments_pushed()) { |
int argument_count = env->arguments_environment()->parameter_count(); |
pop = new(zone()) LDrop(argument_count); |
- ASSERT(instr->argument_delta() == -argument_count); |
+ DCHECK(instr->argument_delta() == -argument_count); |
} |
HEnvironment* outer = |
@@ -1677,7 +1677,7 @@ LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { |
LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) { |
- ASSERT(instr->key()->representation().IsSmiOrInteger32()); |
+ DCHECK(instr->key()->representation().IsSmiOrInteger32()); |
ElementsKind elements_kind = instr->elements_kind(); |
LOperand* elements = UseRegister(instr->elements()); |
LOperand* key = UseRegisterOrConstant(instr->key()); |
@@ -1695,7 +1695,7 @@ LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) { |
? AssignEnvironment(DefineAsRegister(result)) |
: DefineAsRegister(result); |
} else { |
- ASSERT(instr->representation().IsSmiOrTagged() || |
+ DCHECK(instr->representation().IsSmiOrTagged() || |
instr->representation().IsInteger32()); |
LOperand* temp = instr->key()->IsConstant() ? NULL : TempRegister(); |
LLoadKeyedFixed* result = |
@@ -1705,7 +1705,7 @@ LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) { |
: DefineAsRegister(result); |
} |
} else { |
- ASSERT((instr->representation().IsInteger32() && |
+ DCHECK((instr->representation().IsInteger32() && |
!IsDoubleOrFloatElementsKind(instr->elements_kind())) || |
(instr->representation().IsDouble() && |
IsDoubleOrFloatElementsKind(instr->elements_kind()))); |
@@ -1771,9 +1771,9 @@ LInstruction* LChunkBuilder::DoMapEnumLength(HMapEnumLength* instr) { |
LInstruction* LChunkBuilder::DoFlooringDivByPowerOf2I(HMathFloorOfDiv* instr) { |
- ASSERT(instr->representation().IsInteger32()); |
- ASSERT(instr->left()->representation().Equals(instr->representation())); |
- ASSERT(instr->right()->representation().Equals(instr->representation())); |
+ DCHECK(instr->representation().IsInteger32()); |
+ DCHECK(instr->left()->representation().Equals(instr->representation())); |
+ DCHECK(instr->right()->representation().Equals(instr->representation())); |
LOperand* dividend = UseRegisterAtStart(instr->left()); |
int32_t divisor = instr->right()->GetInteger32Constant(); |
LInstruction* result = DefineAsRegister(new(zone()) LFlooringDivByPowerOf2I( |
@@ -1787,9 +1787,9 @@ LInstruction* LChunkBuilder::DoFlooringDivByPowerOf2I(HMathFloorOfDiv* instr) { |
LInstruction* LChunkBuilder::DoFlooringDivByConstI(HMathFloorOfDiv* instr) { |
- ASSERT(instr->representation().IsInteger32()); |
- ASSERT(instr->left()->representation().Equals(instr->representation())); |
- ASSERT(instr->right()->representation().Equals(instr->representation())); |
+ DCHECK(instr->representation().IsInteger32()); |
+ DCHECK(instr->left()->representation().Equals(instr->representation())); |
+ DCHECK(instr->right()->representation().Equals(instr->representation())); |
LOperand* dividend = UseRegister(instr->left()); |
int32_t divisor = instr->right()->GetInteger32Constant(); |
LOperand* temp = |
@@ -1831,14 +1831,14 @@ LInstruction* LChunkBuilder::DoMathMinMax(HMathMinMax* instr) { |
LOperand* left = NULL; |
LOperand* right = NULL; |
if (instr->representation().IsSmiOrInteger32()) { |
- ASSERT(instr->left()->representation().Equals(instr->representation())); |
- ASSERT(instr->right()->representation().Equals(instr->representation())); |
+ DCHECK(instr->left()->representation().Equals(instr->representation())); |
+ DCHECK(instr->right()->representation().Equals(instr->representation())); |
left = UseRegisterAtStart(instr->BetterLeftOperand()); |
right = UseRegisterOrConstantAtStart(instr->BetterRightOperand()); |
} else { |
- ASSERT(instr->representation().IsDouble()); |
- ASSERT(instr->left()->representation().IsDouble()); |
- ASSERT(instr->right()->representation().IsDouble()); |
+ DCHECK(instr->representation().IsDouble()); |
+ DCHECK(instr->left()->representation().IsDouble()); |
+ DCHECK(instr->right()->representation().IsDouble()); |
left = UseRegisterAtStart(instr->left()); |
right = UseRegisterAtStart(instr->right()); |
} |
@@ -1847,9 +1847,9 @@ LInstruction* LChunkBuilder::DoMathMinMax(HMathMinMax* instr) { |
LInstruction* LChunkBuilder::DoModByPowerOf2I(HMod* instr) { |
- ASSERT(instr->representation().IsInteger32()); |
- ASSERT(instr->left()->representation().Equals(instr->representation())); |
- ASSERT(instr->right()->representation().Equals(instr->representation())); |
+ DCHECK(instr->representation().IsInteger32()); |
+ DCHECK(instr->left()->representation().Equals(instr->representation())); |
+ DCHECK(instr->right()->representation().Equals(instr->representation())); |
LOperand* dividend = UseRegisterAtStart(instr->left()); |
int32_t divisor = instr->right()->GetInteger32Constant(); |
LInstruction* result = DefineSameAsFirst(new(zone()) LModByPowerOf2I( |
@@ -1863,9 +1863,9 @@ LInstruction* LChunkBuilder::DoModByPowerOf2I(HMod* instr) { |
LInstruction* LChunkBuilder::DoModByConstI(HMod* instr) { |
- ASSERT(instr->representation().IsInteger32()); |
- ASSERT(instr->left()->representation().Equals(instr->representation())); |
- ASSERT(instr->right()->representation().Equals(instr->representation())); |
+ DCHECK(instr->representation().IsInteger32()); |
+ DCHECK(instr->left()->representation().Equals(instr->representation())); |
+ DCHECK(instr->right()->representation().Equals(instr->representation())); |
LOperand* dividend = UseRegister(instr->left()); |
int32_t divisor = instr->right()->GetInteger32Constant(); |
LOperand* temp = TempRegister(); |
@@ -1879,9 +1879,9 @@ LInstruction* LChunkBuilder::DoModByConstI(HMod* instr) { |
LInstruction* LChunkBuilder::DoModI(HMod* instr) { |
- ASSERT(instr->representation().IsSmiOrInteger32()); |
- ASSERT(instr->left()->representation().Equals(instr->representation())); |
- ASSERT(instr->right()->representation().Equals(instr->representation())); |
+ DCHECK(instr->representation().IsSmiOrInteger32()); |
+ DCHECK(instr->left()->representation().Equals(instr->representation())); |
+ DCHECK(instr->right()->representation().Equals(instr->representation())); |
LOperand* dividend = UseRegister(instr->left()); |
LOperand* divisor = UseRegister(instr->right()); |
LInstruction* result = DefineAsRegister(new(zone()) LModI(dividend, divisor)); |
@@ -1912,8 +1912,8 @@ LInstruction* LChunkBuilder::DoMod(HMod* instr) { |
LInstruction* LChunkBuilder::DoMul(HMul* instr) { |
if (instr->representation().IsSmiOrInteger32()) { |
- ASSERT(instr->left()->representation().Equals(instr->representation())); |
- ASSERT(instr->right()->representation().Equals(instr->representation())); |
+ DCHECK(instr->left()->representation().Equals(instr->representation())); |
+ DCHECK(instr->right()->representation().Equals(instr->representation())); |
bool can_overflow = instr->CheckFlag(HValue::kCanOverflow); |
bool bailout_on_minus_zero = instr->CheckFlag(HValue::kBailoutOnMinusZero); |
@@ -1971,7 +1971,7 @@ LInstruction* LChunkBuilder::DoMul(HMul* instr) { |
LInstruction* LChunkBuilder::DoOsrEntry(HOsrEntry* instr) { |
- ASSERT(argument_count_ == 0); |
+ DCHECK(argument_count_ == 0); |
allocator_->MarkAsOsrEntry(); |
current_block_->last_environment()->set_ast_id(instr->ast_id()); |
return AssignEnvironment(new(zone()) LOsrEntry); |
@@ -1984,7 +1984,7 @@ LInstruction* LChunkBuilder::DoParameter(HParameter* instr) { |
int spill_index = chunk_->GetParameterStackSlot(instr->index()); |
return DefineAsSpilled(result, spill_index); |
} else { |
- ASSERT(info()->IsStub()); |
+ DCHECK(info()->IsStub()); |
CodeStubInterfaceDescriptor* descriptor = |
info()->code_stub()->GetInterfaceDescriptor(); |
int index = static_cast<int>(instr->index()); |
@@ -1995,11 +1995,11 @@ LInstruction* LChunkBuilder::DoParameter(HParameter* instr) { |
LInstruction* LChunkBuilder::DoPower(HPower* instr) { |
- ASSERT(instr->representation().IsDouble()); |
+ DCHECK(instr->representation().IsDouble()); |
// We call a C function for double power. It can't trigger a GC. |
// We need to use fixed result register for the call. |
Representation exponent_type = instr->right()->representation(); |
- ASSERT(instr->left()->representation().IsDouble()); |
+ DCHECK(instr->left()->representation().IsDouble()); |
LOperand* left = UseFixedDouble(instr->left(), d0); |
LOperand* right = exponent_type.IsInteger32() |
? UseFixed(instr->right(), x12) |
@@ -2040,7 +2040,7 @@ LInstruction* LChunkBuilder::DoRegExpLiteral(HRegExpLiteral* instr) { |
LInstruction* LChunkBuilder::DoDoubleBits(HDoubleBits* instr) { |
HValue* value = instr->value(); |
- ASSERT(value->representation().IsDouble()); |
+ DCHECK(value->representation().IsDouble()); |
return DefineAsRegister(new(zone()) LDoubleBits(UseRegister(value))); |
} |
@@ -2094,8 +2094,8 @@ HBitwiseBinaryOperation* LChunkBuilder::CanTransformToShiftedOp(HValue* val, |
HBinaryOperation* hinstr = HBinaryOperation::cast(val); |
HValue* hleft = hinstr->left(); |
HValue* hright = hinstr->right(); |
- ASSERT(hleft->representation().Equals(hinstr->representation())); |
- ASSERT(hright->representation().Equals(hinstr->representation())); |
+ DCHECK(hleft->representation().Equals(hinstr->representation())); |
+ DCHECK(hright->representation().Equals(hinstr->representation())); |
if ((hright->IsConstant() && |
LikelyFitsImmField(hinstr, HConstant::cast(hright)->Integer32Value())) || |
@@ -2167,8 +2167,8 @@ LInstruction* LChunkBuilder::TryDoOpWithShiftedRightOperand( |
LInstruction* LChunkBuilder::DoShiftedBinaryOp( |
HBinaryOperation* hinstr, HValue* hleft, HBitwiseBinaryOperation* hshift) { |
- ASSERT(hshift->IsBitwiseBinaryShift()); |
- ASSERT(!hshift->IsShr() || (JSShiftAmountFromHConstant(hshift->right()) > 0)); |
+ DCHECK(hshift->IsBitwiseBinaryShift()); |
+ DCHECK(!hshift->IsShr() || (JSShiftAmountFromHConstant(hshift->right()) > 0)); |
LTemplateResultInstruction<1>* res; |
LOperand* left = UseRegisterAtStart(hleft); |
@@ -2187,7 +2187,7 @@ LInstruction* LChunkBuilder::DoShiftedBinaryOp( |
} else if (hinstr->IsAdd()) { |
res = new(zone()) LAddI(left, right, shift_op, shift_amount); |
} else { |
- ASSERT(hinstr->IsSub()); |
+ DCHECK(hinstr->IsSub()); |
res = new(zone()) LSubI(left, right, shift_op, shift_amount); |
} |
if (hinstr->CheckFlag(HValue::kCanOverflow)) { |
@@ -2203,10 +2203,10 @@ LInstruction* LChunkBuilder::DoShift(Token::Value op, |
return DoArithmeticT(op, instr); |
} |
- ASSERT(instr->representation().IsInteger32() || |
+ DCHECK(instr->representation().IsInteger32() || |
instr->representation().IsSmi()); |
- ASSERT(instr->left()->representation().Equals(instr->representation())); |
- ASSERT(instr->right()->representation().Equals(instr->representation())); |
+ DCHECK(instr->left()->representation().Equals(instr->representation())); |
+ DCHECK(instr->right()->representation().Equals(instr->representation())); |
if (ShiftCanBeOptimizedAway(instr)) { |
return NULL; |
@@ -2245,7 +2245,7 @@ LInstruction* LChunkBuilder::DoShift(Token::Value op, |
if (instr->representation().IsInteger32()) { |
result = DefineAsRegister(new(zone()) LShiftI(op, left, right, does_deopt)); |
} else { |
- ASSERT(instr->representation().IsSmi()); |
+ DCHECK(instr->representation().IsSmi()); |
result = DefineAsRegister( |
new(zone()) LShiftS(op, left, right, temp, does_deopt)); |
} |
@@ -2285,7 +2285,7 @@ LInstruction* LChunkBuilder::DoStackCheck(HStackCheck* instr) { |
LOperand* context = UseFixed(instr->context(), cp); |
return MarkAsCall(new(zone()) LStackCheck(context), instr); |
} else { |
- ASSERT(instr->is_backwards_branch()); |
+ DCHECK(instr->is_backwards_branch()); |
LOperand* context = UseAny(instr->context()); |
return AssignEnvironment( |
AssignPointerMap(new(zone()) LStackCheck(context))); |
@@ -2354,23 +2354,23 @@ LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { |
} |
if (instr->is_typed_elements()) { |
- ASSERT((instr->value()->representation().IsInteger32() && |
+ DCHECK((instr->value()->representation().IsInteger32() && |
!IsDoubleOrFloatElementsKind(instr->elements_kind())) || |
(instr->value()->representation().IsDouble() && |
IsDoubleOrFloatElementsKind(instr->elements_kind()))); |
- ASSERT((instr->is_fixed_typed_array() && |
+ DCHECK((instr->is_fixed_typed_array() && |
instr->elements()->representation().IsTagged()) || |
(instr->is_external() && |
instr->elements()->representation().IsExternal())); |
return new(zone()) LStoreKeyedExternal(elements, key, val, temp); |
} else if (instr->value()->representation().IsDouble()) { |
- ASSERT(instr->elements()->representation().IsTagged()); |
+ DCHECK(instr->elements()->representation().IsTagged()); |
return new(zone()) LStoreKeyedFixedDouble(elements, key, val, temp); |
} else { |
- ASSERT(instr->elements()->representation().IsTagged()); |
- ASSERT(instr->value()->representation().IsSmiOrTagged() || |
+ DCHECK(instr->elements()->representation().IsTagged()); |
+ DCHECK(instr->value()->representation().IsSmiOrTagged() || |
instr->value()->representation().IsInteger32()); |
return new(zone()) LStoreKeyedFixed(elements, key, val, temp); |
} |
@@ -2384,9 +2384,9 @@ LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { |
LOperand* key = UseFixed(instr->key(), KeyedStoreIC::NameRegister()); |
LOperand* value = UseFixed(instr->value(), KeyedStoreIC::ValueRegister()); |
- ASSERT(instr->object()->representation().IsTagged()); |
- ASSERT(instr->key()->representation().IsTagged()); |
- ASSERT(instr->value()->representation().IsTagged()); |
+ DCHECK(instr->object()->representation().IsTagged()); |
+ DCHECK(instr->key()->representation().IsTagged()); |
+ DCHECK(instr->value()->representation().IsTagged()); |
return MarkAsCall( |
new(zone()) LStoreKeyedGeneric(context, object, key, value), instr); |
@@ -2463,8 +2463,8 @@ LInstruction* LChunkBuilder::DoStringCharFromCode(HStringCharFromCode* instr) { |
LInstruction* LChunkBuilder::DoStringCompareAndBranch( |
HStringCompareAndBranch* instr) { |
- ASSERT(instr->left()->representation().IsTagged()); |
- ASSERT(instr->right()->representation().IsTagged()); |
+ DCHECK(instr->left()->representation().IsTagged()); |
+ DCHECK(instr->right()->representation().IsTagged()); |
LOperand* context = UseFixed(instr->context(), cp); |
LOperand* left = UseFixed(instr->left(), x1); |
LOperand* right = UseFixed(instr->right(), x0); |
@@ -2476,8 +2476,8 @@ LInstruction* LChunkBuilder::DoStringCompareAndBranch( |
LInstruction* LChunkBuilder::DoSub(HSub* instr) { |
if (instr->representation().IsSmiOrInteger32()) { |
- ASSERT(instr->left()->representation().Equals(instr->representation())); |
- ASSERT(instr->right()->representation().Equals(instr->representation())); |
+ DCHECK(instr->left()->representation().Equals(instr->representation())); |
+ DCHECK(instr->right()->representation().Equals(instr->representation())); |
LInstruction* shifted_operation = TryDoOpWithShiftedRightOperand(instr); |
if (shifted_operation != NULL) { |
@@ -2598,8 +2598,8 @@ LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) { |
} |
} |
case kMathExp: { |
- ASSERT(instr->representation().IsDouble()); |
- ASSERT(instr->value()->representation().IsDouble()); |
+ DCHECK(instr->representation().IsDouble()); |
+ DCHECK(instr->value()->representation().IsDouble()); |
LOperand* input = UseRegister(instr->value()); |
LOperand* double_temp1 = TempDoubleRegister(); |
LOperand* temp1 = TempRegister(); |
@@ -2610,58 +2610,58 @@ LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) { |
return DefineAsRegister(result); |
} |
case kMathFloor: { |
- ASSERT(instr->value()->representation().IsDouble()); |
+ DCHECK(instr->value()->representation().IsDouble()); |
LOperand* input = UseRegisterAtStart(instr->value()); |
if (instr->representation().IsInteger32()) { |
LMathFloorI* result = new(zone()) LMathFloorI(input); |
return AssignEnvironment(AssignPointerMap(DefineAsRegister(result))); |
} else { |
- ASSERT(instr->representation().IsDouble()); |
+ DCHECK(instr->representation().IsDouble()); |
LMathFloorD* result = new(zone()) LMathFloorD(input); |
return DefineAsRegister(result); |
} |
} |
case kMathLog: { |
- ASSERT(instr->representation().IsDouble()); |
- ASSERT(instr->value()->representation().IsDouble()); |
+ DCHECK(instr->representation().IsDouble()); |
+ DCHECK(instr->value()->representation().IsDouble()); |
LOperand* input = UseFixedDouble(instr->value(), d0); |
LMathLog* result = new(zone()) LMathLog(input); |
return MarkAsCall(DefineFixedDouble(result, d0), instr); |
} |
case kMathPowHalf: { |
- ASSERT(instr->representation().IsDouble()); |
- ASSERT(instr->value()->representation().IsDouble()); |
+ DCHECK(instr->representation().IsDouble()); |
+ DCHECK(instr->value()->representation().IsDouble()); |
LOperand* input = UseRegister(instr->value()); |
return DefineAsRegister(new(zone()) LMathPowHalf(input)); |
} |
case kMathRound: { |
- ASSERT(instr->value()->representation().IsDouble()); |
+ DCHECK(instr->value()->representation().IsDouble()); |
LOperand* input = UseRegister(instr->value()); |
if (instr->representation().IsInteger32()) { |
LOperand* temp = TempDoubleRegister(); |
LMathRoundI* result = new(zone()) LMathRoundI(input, temp); |
return AssignEnvironment(DefineAsRegister(result)); |
} else { |
- ASSERT(instr->representation().IsDouble()); |
+ DCHECK(instr->representation().IsDouble()); |
LMathRoundD* result = new(zone()) LMathRoundD(input); |
return DefineAsRegister(result); |
} |
} |
case kMathFround: { |
- ASSERT(instr->value()->representation().IsDouble()); |
+ DCHECK(instr->value()->representation().IsDouble()); |
LOperand* input = UseRegister(instr->value()); |
LMathFround* result = new (zone()) LMathFround(input); |
return DefineAsRegister(result); |
} |
case kMathSqrt: { |
- ASSERT(instr->representation().IsDouble()); |
- ASSERT(instr->value()->representation().IsDouble()); |
+ DCHECK(instr->representation().IsDouble()); |
+ DCHECK(instr->value()->representation().IsDouble()); |
LOperand* input = UseRegisterAtStart(instr->value()); |
return DefineAsRegister(new(zone()) LMathSqrt(input)); |
} |
case kMathClz32: { |
- ASSERT(instr->representation().IsInteger32()); |
- ASSERT(instr->value()->representation().IsInteger32()); |
+ DCHECK(instr->representation().IsInteger32()); |
+ DCHECK(instr->value()->representation().IsInteger32()); |
LOperand* input = UseRegisterAtStart(instr->value()); |
return DefineAsRegister(new(zone()) LMathClz32(input)); |
} |