| Index: src/x87/code-stubs-x87.cc
|
| diff --git a/src/x87/code-stubs-x87.cc b/src/x87/code-stubs-x87.cc
|
| index c007115a51152476b5e157063505033edd8b2a25..6191aaf4e678cfcb229924db129062a54fbf9d0e 100644
|
| --- a/src/x87/code-stubs-x87.cc
|
| +++ b/src/x87/code-stubs-x87.cc
|
| @@ -354,7 +354,7 @@ void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm) {
|
| {
|
| // Call the runtime system in a fresh internal frame.
|
| FrameScope scope(masm, StackFrame::INTERNAL);
|
| - ASSERT(param_count == 0 ||
|
| + DCHECK(param_count == 0 ||
|
| eax.is(descriptor->GetEnvironmentParameterRegister(
|
| param_count - 1)));
|
| // Push arguments
|
| @@ -413,7 +413,7 @@ class FloatingPointHelper : public AllStatic {
|
| void DoubleToIStub::Generate(MacroAssembler* masm) {
|
| Register input_reg = this->source();
|
| Register final_result_reg = this->destination();
|
| - ASSERT(is_truncating());
|
| + DCHECK(is_truncating());
|
|
|
| Label check_negative, process_64_bits, done, done_no_stash;
|
|
|
| @@ -510,7 +510,7 @@ void DoubleToIStub::Generate(MacroAssembler* masm) {
|
| }
|
| __ bind(&done_no_stash);
|
| if (!final_result_reg.is(result_reg)) {
|
| - ASSERT(final_result_reg.is(ecx));
|
| + DCHECK(final_result_reg.is(ecx));
|
| __ mov(final_result_reg, result_reg);
|
| }
|
| __ pop(save_reg);
|
| @@ -1434,8 +1434,8 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
|
|
|
|
|
| static int NegativeComparisonResult(Condition cc) {
|
| - ASSERT(cc != equal);
|
| - ASSERT((cc == less) || (cc == less_equal)
|
| + DCHECK(cc != equal);
|
| + DCHECK((cc == less) || (cc == less_equal)
|
| || (cc == greater) || (cc == greater_equal));
|
| return (cc == greater || cc == greater_equal) ? LESS : GREATER;
|
| }
|
| @@ -1545,7 +1545,7 @@ void ICCompareStub::GenerateGeneric(MacroAssembler* masm) {
|
| // If either is a Smi (we know that not both are), then they can only
|
| // be equal if the other is a HeapNumber. If so, use the slow case.
|
| STATIC_ASSERT(kSmiTag == 0);
|
| - ASSERT_EQ(0, Smi::FromInt(0));
|
| + DCHECK_EQ(0, Smi::FromInt(0));
|
| __ mov(ecx, Immediate(kSmiTagMask));
|
| __ and_(ecx, eax);
|
| __ test(ecx, edx);
|
| @@ -1637,7 +1637,7 @@ void ICCompareStub::GenerateGeneric(MacroAssembler* masm) {
|
| // If one of the numbers was NaN, then the result is always false.
|
| // The cc is never not-equal.
|
| __ bind(&unordered);
|
| - ASSERT(cc != not_equal);
|
| + DCHECK(cc != not_equal);
|
| if (cc == less || cc == less_equal) {
|
| __ mov(eax, Immediate(Smi::FromInt(1)));
|
| } else {
|
| @@ -2434,7 +2434,7 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) {
|
| //
|
| void InstanceofStub::Generate(MacroAssembler* masm) {
|
| // Call site inlining and patching implies arguments in registers.
|
| - ASSERT(HasArgsInRegisters() || !HasCallSiteInlineCheck());
|
| + DCHECK(HasArgsInRegisters() || !HasCallSiteInlineCheck());
|
|
|
| // Fixed register usage throughout the stub.
|
| Register object = eax; // Object (lhs).
|
| @@ -2451,8 +2451,8 @@ void InstanceofStub::Generate(MacroAssembler* masm) {
|
| static const int8_t kCmpEdiOperandByte2 = BitCast<int8_t, uint8_t>(0x3d);
|
| static const int8_t kMovEaxImmediateByte = BitCast<int8_t, uint8_t>(0xb8);
|
|
|
| - ASSERT_EQ(object.code(), InstanceofStub::left().code());
|
| - ASSERT_EQ(function.code(), InstanceofStub::right().code());
|
| + DCHECK_EQ(object.code(), InstanceofStub::left().code());
|
| + DCHECK_EQ(function.code(), InstanceofStub::right().code());
|
|
|
| // Get the object and function - they are always both needed.
|
| Label slow, not_js_object;
|
| @@ -2494,7 +2494,7 @@ void InstanceofStub::Generate(MacroAssembler* masm) {
|
| } else {
|
| // The constants for the code patching are based on no push instructions
|
| // at the call site.
|
| - ASSERT(HasArgsInRegisters());
|
| + DCHECK(HasArgsInRegisters());
|
| // Get return address and delta to inlined map check.
|
| __ mov(scratch, Operand(esp, 0 * kPointerSize));
|
| __ sub(scratch, Operand(esp, 1 * kPointerSize));
|
| @@ -2699,7 +2699,7 @@ void StringCharCodeAtGenerator::GenerateSlow(
|
| if (index_flags_ == STRING_INDEX_IS_NUMBER) {
|
| __ CallRuntime(Runtime::kNumberToIntegerMapMinusZero, 1);
|
| } else {
|
| - ASSERT(index_flags_ == STRING_INDEX_IS_ARRAY_INDEX);
|
| + DCHECK(index_flags_ == STRING_INDEX_IS_ARRAY_INDEX);
|
| // NumberToSmi discards numbers that are not exact integers.
|
| __ CallRuntime(Runtime::kNumberToSmi, 1);
|
| }
|
| @@ -2745,7 +2745,7 @@ void StringCharFromCodeGenerator::GenerateFast(MacroAssembler* masm) {
|
| // Fast case of Heap::LookupSingleCharacterStringFromCode.
|
| STATIC_ASSERT(kSmiTag == 0);
|
| STATIC_ASSERT(kSmiShiftSize == 0);
|
| - ASSERT(IsPowerOf2(String::kMaxOneByteCharCode + 1));
|
| + DCHECK(IsPowerOf2(String::kMaxOneByteCharCode + 1));
|
| __ test(code_,
|
| Immediate(kSmiTagMask |
|
| ((~String::kMaxOneByteCharCode) << kSmiTagSize)));
|
| @@ -2791,9 +2791,9 @@ void StringHelper::GenerateCopyCharacters(MacroAssembler* masm,
|
| Register count,
|
| Register scratch,
|
| String::Encoding encoding) {
|
| - ASSERT(!scratch.is(dest));
|
| - ASSERT(!scratch.is(src));
|
| - ASSERT(!scratch.is(count));
|
| + DCHECK(!scratch.is(dest));
|
| + DCHECK(!scratch.is(src));
|
| + DCHECK(!scratch.is(count));
|
|
|
| // Nothing to do for zero characters.
|
| Label done;
|
| @@ -3307,7 +3307,7 @@ void BinaryOpICWithAllocationSiteStub::Generate(MacroAssembler* masm) {
|
|
|
|
|
| void ICCompareStub::GenerateSmis(MacroAssembler* masm) {
|
| - ASSERT(state_ == CompareIC::SMI);
|
| + DCHECK(state_ == CompareIC::SMI);
|
| Label miss;
|
| __ mov(ecx, edx);
|
| __ or_(ecx, eax);
|
| @@ -3333,7 +3333,7 @@ void ICCompareStub::GenerateSmis(MacroAssembler* masm) {
|
|
|
|
|
| void ICCompareStub::GenerateNumbers(MacroAssembler* masm) {
|
| - ASSERT(state_ == CompareIC::NUMBER);
|
| + DCHECK(state_ == CompareIC::NUMBER);
|
|
|
| Label generic_stub;
|
| Label unordered, maybe_undefined1, maybe_undefined2;
|
| @@ -3387,8 +3387,8 @@ void ICCompareStub::GenerateNumbers(MacroAssembler* masm) {
|
|
|
|
|
| void ICCompareStub::GenerateInternalizedStrings(MacroAssembler* masm) {
|
| - ASSERT(state_ == CompareIC::INTERNALIZED_STRING);
|
| - ASSERT(GetCondition() == equal);
|
| + DCHECK(state_ == CompareIC::INTERNALIZED_STRING);
|
| + DCHECK(GetCondition() == equal);
|
|
|
| // Registers containing left and right operands respectively.
|
| Register left = edx;
|
| @@ -3418,7 +3418,7 @@ void ICCompareStub::GenerateInternalizedStrings(MacroAssembler* masm) {
|
| __ cmp(left, right);
|
| // Make sure eax is non-zero. At this point input operands are
|
| // guaranteed to be non-zero.
|
| - ASSERT(right.is(eax));
|
| + DCHECK(right.is(eax));
|
| __ j(not_equal, &done, Label::kNear);
|
| STATIC_ASSERT(EQUAL == 0);
|
| STATIC_ASSERT(kSmiTag == 0);
|
| @@ -3432,8 +3432,8 @@ void ICCompareStub::GenerateInternalizedStrings(MacroAssembler* masm) {
|
|
|
|
|
| void ICCompareStub::GenerateUniqueNames(MacroAssembler* masm) {
|
| - ASSERT(state_ == CompareIC::UNIQUE_NAME);
|
| - ASSERT(GetCondition() == equal);
|
| + DCHECK(state_ == CompareIC::UNIQUE_NAME);
|
| + DCHECK(GetCondition() == equal);
|
|
|
| // Registers containing left and right operands respectively.
|
| Register left = edx;
|
| @@ -3463,7 +3463,7 @@ void ICCompareStub::GenerateUniqueNames(MacroAssembler* masm) {
|
| __ cmp(left, right);
|
| // Make sure eax is non-zero. At this point input operands are
|
| // guaranteed to be non-zero.
|
| - ASSERT(right.is(eax));
|
| + DCHECK(right.is(eax));
|
| __ j(not_equal, &done, Label::kNear);
|
| STATIC_ASSERT(EQUAL == 0);
|
| STATIC_ASSERT(kSmiTag == 0);
|
| @@ -3477,7 +3477,7 @@ void ICCompareStub::GenerateUniqueNames(MacroAssembler* masm) {
|
|
|
|
|
| void ICCompareStub::GenerateStrings(MacroAssembler* masm) {
|
| - ASSERT(state_ == CompareIC::STRING);
|
| + DCHECK(state_ == CompareIC::STRING);
|
| Label miss;
|
|
|
| bool equality = Token::IsEqualityOp(op_);
|
| @@ -3531,7 +3531,7 @@ void ICCompareStub::GenerateStrings(MacroAssembler* masm) {
|
| __ j(not_zero, &do_compare, Label::kNear);
|
| // Make sure eax is non-zero. At this point input operands are
|
| // guaranteed to be non-zero.
|
| - ASSERT(right.is(eax));
|
| + DCHECK(right.is(eax));
|
| __ ret(0);
|
| __ bind(&do_compare);
|
| }
|
| @@ -3567,7 +3567,7 @@ void ICCompareStub::GenerateStrings(MacroAssembler* masm) {
|
|
|
|
|
| void ICCompareStub::GenerateObjects(MacroAssembler* masm) {
|
| - ASSERT(state_ == CompareIC::OBJECT);
|
| + DCHECK(state_ == CompareIC::OBJECT);
|
| Label miss;
|
| __ mov(ecx, edx);
|
| __ and_(ecx, eax);
|
| @@ -3578,7 +3578,7 @@ void ICCompareStub::GenerateObjects(MacroAssembler* masm) {
|
| __ CmpObjectType(edx, JS_OBJECT_TYPE, ecx);
|
| __ j(not_equal, &miss, Label::kNear);
|
|
|
| - ASSERT(GetCondition() == equal);
|
| + DCHECK(GetCondition() == equal);
|
| __ sub(eax, edx);
|
| __ ret(0);
|
|
|
| @@ -3642,7 +3642,7 @@ void NameDictionaryLookupStub::GenerateNegativeLookup(MacroAssembler* masm,
|
| Register properties,
|
| Handle<Name> name,
|
| Register r0) {
|
| - ASSERT(name->IsUniqueName());
|
| + DCHECK(name->IsUniqueName());
|
|
|
| // If names of slots in range from 1 to kProbes - 1 for the hash value are
|
| // not equal to the name and kProbes-th slot is not used (its name is the
|
| @@ -3660,11 +3660,11 @@ void NameDictionaryLookupStub::GenerateNegativeLookup(MacroAssembler* masm,
|
| NameDictionary::GetProbeOffset(i))));
|
|
|
| // Scale the index by multiplying by the entry size.
|
| - ASSERT(NameDictionary::kEntrySize == 3);
|
| + DCHECK(NameDictionary::kEntrySize == 3);
|
| __ lea(index, Operand(index, index, times_2, 0)); // index *= 3.
|
| Register entity_name = r0;
|
| // Having undefined at this place means the name is not contained.
|
| - ASSERT_EQ(kSmiTagSize, 1);
|
| + DCHECK_EQ(kSmiTagSize, 1);
|
| __ mov(entity_name, Operand(properties, index, times_half_pointer_size,
|
| kElementsStartOffset - kHeapObjectTag));
|
| __ cmp(entity_name, masm->isolate()->factory()->undefined_value());
|
| @@ -3708,10 +3708,10 @@ void NameDictionaryLookupStub::GeneratePositiveLookup(MacroAssembler* masm,
|
| Register name,
|
| Register r0,
|
| Register r1) {
|
| - ASSERT(!elements.is(r0));
|
| - ASSERT(!elements.is(r1));
|
| - ASSERT(!name.is(r0));
|
| - ASSERT(!name.is(r1));
|
| + DCHECK(!elements.is(r0));
|
| + DCHECK(!elements.is(r1));
|
| + DCHECK(!name.is(r0));
|
| + DCHECK(!name.is(r1));
|
|
|
| __ AssertName(name);
|
|
|
| @@ -3732,7 +3732,7 @@ void NameDictionaryLookupStub::GeneratePositiveLookup(MacroAssembler* masm,
|
| __ and_(r0, r1);
|
|
|
| // Scale the index by multiplying by the entry size.
|
| - ASSERT(NameDictionary::kEntrySize == 3);
|
| + DCHECK(NameDictionary::kEntrySize == 3);
|
| __ lea(r0, Operand(r0, r0, times_2, 0)); // r0 = r0 * 3
|
|
|
| // Check if the key is identical to the name.
|
| @@ -3795,11 +3795,11 @@ void NameDictionaryLookupStub::Generate(MacroAssembler* masm) {
|
| __ and_(scratch, Operand(esp, 0));
|
|
|
| // Scale the index by multiplying by the entry size.
|
| - ASSERT(NameDictionary::kEntrySize == 3);
|
| + DCHECK(NameDictionary::kEntrySize == 3);
|
| __ lea(index_, Operand(scratch, scratch, times_2, 0)); // index *= 3.
|
|
|
| // Having undefined at this place means the name is not contained.
|
| - ASSERT_EQ(kSmiTagSize, 1);
|
| + DCHECK_EQ(kSmiTagSize, 1);
|
| __ mov(scratch, Operand(dictionary_,
|
| index_,
|
| times_pointer_size,
|
| @@ -4167,7 +4167,7 @@ void ProfileEntryHookStub::Generate(MacroAssembler* masm) {
|
| __ push(eax);
|
|
|
| // Call the entry hook.
|
| - ASSERT(isolate()->function_entry_hook() != NULL);
|
| + DCHECK(isolate()->function_entry_hook() != NULL);
|
| __ call(FUNCTION_ADDR(isolate()->function_entry_hook()),
|
| RelocInfo::RUNTIME_ENTRY);
|
| __ add(esp, Immediate(2 * kPointerSize));
|
| @@ -4220,12 +4220,12 @@ static void CreateArrayDispatchOneArgument(MacroAssembler* masm,
|
| // esp[4] - last argument
|
| Label normal_sequence;
|
| if (mode == DONT_OVERRIDE) {
|
| - ASSERT(FAST_SMI_ELEMENTS == 0);
|
| - ASSERT(FAST_HOLEY_SMI_ELEMENTS == 1);
|
| - ASSERT(FAST_ELEMENTS == 2);
|
| - ASSERT(FAST_HOLEY_ELEMENTS == 3);
|
| - ASSERT(FAST_DOUBLE_ELEMENTS == 4);
|
| - ASSERT(FAST_HOLEY_DOUBLE_ELEMENTS == 5);
|
| + DCHECK(FAST_SMI_ELEMENTS == 0);
|
| + DCHECK(FAST_HOLEY_SMI_ELEMENTS == 1);
|
| + DCHECK(FAST_ELEMENTS == 2);
|
| + DCHECK(FAST_HOLEY_ELEMENTS == 3);
|
| + DCHECK(FAST_DOUBLE_ELEMENTS == 4);
|
| + DCHECK(FAST_HOLEY_DOUBLE_ELEMENTS == 5);
|
|
|
| // is the low bit set? If so, we are holey and that is good.
|
| __ test_b(edx, 1);
|
|
|