| Index: src/conversions-inl.h
|
| diff --git a/src/conversions-inl.h b/src/conversions-inl.h
|
| index 6b69af04b13c48ae3ffaa737529f9a58cad6b393..ce3054ba3126e19c6ce3e676285b14289bd58463 100644
|
| --- a/src/conversions-inl.h
|
| +++ b/src/conversions-inl.h
|
| @@ -92,7 +92,7 @@ template <class Iterator, class EndMark>
|
| bool SubStringEquals(Iterator* current,
|
| EndMark end,
|
| const char* substring) {
|
| - ASSERT(**current == *substring);
|
| + DCHECK(**current == *substring);
|
| for (substring++; *substring != '\0'; substring++) {
|
| ++*current;
|
| if (*current == end || **current != *substring) return false;
|
| @@ -123,7 +123,7 @@ double InternalStringToIntDouble(UnicodeCache* unicode_cache,
|
| EndMark end,
|
| bool negative,
|
| bool allow_trailing_junk) {
|
| - ASSERT(current != end);
|
| + DCHECK(current != end);
|
|
|
| // Skip leading 0s.
|
| while (*current == '0') {
|
| @@ -202,8 +202,8 @@ double InternalStringToIntDouble(UnicodeCache* unicode_cache,
|
| ++current;
|
| } while (current != end);
|
|
|
| - ASSERT(number < ((int64_t)1 << 53));
|
| - ASSERT(static_cast<int64_t>(static_cast<double>(number)) == number);
|
| + DCHECK(number < ((int64_t)1 << 53));
|
| + DCHECK(static_cast<int64_t>(static_cast<double>(number)) == number);
|
|
|
| if (exponent == 0) {
|
| if (negative) {
|
| @@ -213,7 +213,7 @@ double InternalStringToIntDouble(UnicodeCache* unicode_cache,
|
| return static_cast<double>(number);
|
| }
|
|
|
| - ASSERT(number != 0);
|
| + DCHECK(number != 0);
|
| return std::ldexp(static_cast<double>(negative ? -number : number), exponent);
|
| }
|
|
|
| @@ -324,7 +324,7 @@ double InternalStringToInt(UnicodeCache* unicode_cache,
|
| if (buffer_pos <= kMaxSignificantDigits) {
|
| // If the number has more than kMaxSignificantDigits it will be parsed
|
| // as infinity.
|
| - ASSERT(buffer_pos < kBufferSize);
|
| + DCHECK(buffer_pos < kBufferSize);
|
| buffer[buffer_pos++] = static_cast<char>(*current);
|
| }
|
| ++current;
|
| @@ -336,7 +336,7 @@ double InternalStringToInt(UnicodeCache* unicode_cache,
|
| return JunkStringValue();
|
| }
|
|
|
| - SLOW_ASSERT(buffer_pos < kBufferSize);
|
| + SLOW_DCHECK(buffer_pos < kBufferSize);
|
| buffer[buffer_pos] = '\0';
|
| Vector<const char> buffer_vector(buffer, buffer_pos);
|
| return negative ? -Strtod(buffer_vector, 0) : Strtod(buffer_vector, 0);
|
| @@ -384,7 +384,7 @@ double InternalStringToInt(UnicodeCache* unicode_cache,
|
| if (m > kMaximumMultiplier) break;
|
| part = part * radix + d;
|
| multiplier = m;
|
| - ASSERT(multiplier > part);
|
| + DCHECK(multiplier > part);
|
|
|
| ++current;
|
| if (current == end) {
|
| @@ -473,7 +473,7 @@ double InternalStringToDouble(UnicodeCache* unicode_cache,
|
| return JunkStringValue();
|
| }
|
|
|
| - ASSERT(buffer_pos == 0);
|
| + DCHECK(buffer_pos == 0);
|
| return (sign == NEGATIVE) ? -V8_INFINITY : V8_INFINITY;
|
| }
|
|
|
| @@ -536,7 +536,7 @@ double InternalStringToDouble(UnicodeCache* unicode_cache,
|
| // Copy significant digits of the integer part (if any) to the buffer.
|
| while (*current >= '0' && *current <= '9') {
|
| if (significant_digits < kMaxSignificantDigits) {
|
| - ASSERT(buffer_pos < kBufferSize);
|
| + DCHECK(buffer_pos < kBufferSize);
|
| buffer[buffer_pos++] = static_cast<char>(*current);
|
| significant_digits++;
|
| // Will later check if it's an octal in the buffer.
|
| @@ -581,7 +581,7 @@ double InternalStringToDouble(UnicodeCache* unicode_cache,
|
| // instead.
|
| while (*current >= '0' && *current <= '9') {
|
| if (significant_digits < kMaxSignificantDigits) {
|
| - ASSERT(buffer_pos < kBufferSize);
|
| + DCHECK(buffer_pos < kBufferSize);
|
| buffer[buffer_pos++] = static_cast<char>(*current);
|
| significant_digits++;
|
| exponent--;
|
| @@ -635,7 +635,7 @@ double InternalStringToDouble(UnicodeCache* unicode_cache,
|
| }
|
|
|
| const int max_exponent = INT_MAX / 2;
|
| - ASSERT(-max_exponent / 2 <= exponent && exponent <= max_exponent / 2);
|
| + DCHECK(-max_exponent / 2 <= exponent && exponent <= max_exponent / 2);
|
| int num = 0;
|
| do {
|
| // Check overflow.
|
| @@ -673,7 +673,7 @@ double InternalStringToDouble(UnicodeCache* unicode_cache,
|
| exponent--;
|
| }
|
|
|
| - SLOW_ASSERT(buffer_pos < kBufferSize);
|
| + SLOW_DCHECK(buffer_pos < kBufferSize);
|
| buffer[buffer_pos] = '\0';
|
|
|
| double converted = Strtod(Vector<const char>(buffer, buffer_pos), exponent);
|
|
|