Lines Matching defs:buffer
36 // Helper class for building result strings in a character buffer. The
38 // buffer bounds on all operations in debug mode.
42 // Create a string builder with a buffer of the given size. The
43 // buffer is allocated through NewArray<char> and must be
50 SimpleStringBuilder(char* buffer, int size)
51 : buffer_(buffer, size), position_(0) {}
115 // Finalize the string by 0-terminating it and returning the buffer.
126 // buffer while building the string.
308 // buffer of one-byte digits, along with an optional radix prefix.
545 // The buffer may contain up to kMaxSignificantDigits + 1 digits and a zero
548 char buffer[kBufferSize];
555 buffer[buffer_pos++] = static_cast<char>(*current);
562 buffer[buffer_pos] = '\0';
563 base::Vector<const char> buffer_vector(buffer, buffer_pos);
664 char buffer[kBufferSize];
750 // Copy significant digits of the integer part (if any) to the buffer.
754 buffer[buffer_pos++] = static_cast<char>(*current);
756 // Will later check if it's an octal in the buffer.
799 buffer[buffer_pos++] = static_cast<char>(*current);
877 return InternalStringToIntDouble<3>(buffer, buffer + buffer_pos,
883 buffer[buffer_pos++] = '1';
888 buffer[buffer_pos] = '\0';
891 Strtod(base::Vector<const char>(buffer, buffer_pos), exponent);
932 // Used for parsing BigInt literals, where the input is a buffer of
1046 const char* DoubleToCString(double v, base::Vector<char> buffer) {
1058 return IntToCString(FastD2I(v), buffer);
1060 SimpleStringBuilder builder(buffer.begin(), buffer.length());
1109 const char* IntToCString(int n, base::Vector<char> buffer) {
1116 int i = buffer.length();
1117 buffer[--i] = '\0';
1120 buffer[--i] = '0' - (n % 10);
1123 if (negative) buffer[--i] = '-';
1124 return buffer.begin() + i;
1144 base::Vector<char> buffer(arr, arraysize(arr));
1145 return StrDup(DoubleToCString(value, buffer));
1244 // Make sure that the buffer is big enough, even if we fall back to the
1346 // Temporary buffer for the result. We start with the decimal point in the
1352 char buffer[kBufferSize];
1368 buffer[fraction_cursor++] = '.';
1375 buffer[fraction_cursor++] = chars[digit];
1385 CHECK_EQ('.', buffer[fraction_cursor]);
1390 char c = buffer[fraction_cursor];
1394 buffer[fraction_cursor++] = chars[digit + 1];
1407 buffer[--integer_cursor] = '0';
1411 buffer[--integer_cursor] = chars[static_cast<int>(remainder)];
1416 if (negative) buffer[--integer_cursor] = '-';
1417 buffer[fraction_cursor++] = '\0';
1422 memcpy(result, buffer + integer_cursor, fraction_cursor - integer_cursor);
1452 auto buffer = std::make_unique<base::uc16[]>(max_length_for_conversion);
1454 String::WriteToFlat(*object, buffer.get(), 0, length, isolate, access_guard);
1455 base::Vector<const base::uc16> v(buffer.get(), length);
1464 uint16_t buffer[kBufferSize];
1465 String::WriteToFlat(string, buffer, 0, length);
1469 if (!IsDecimalDigit(buffer[0])) {
1470 if (buffer[0] == '-') {
1472 if (!IsDecimalDigit(buffer[1])) {
1473 if (buffer[1] == 'I' && length == 9) {
1480 } else if (buffer[0] == 'I' && length == 8) {
1482 } else if (buffer[0] == 'N' && length == 3) {
1484 return buffer[1] == 'a' && buffer[2] == 'N';
1495 matches &= IsDecimalDigit(buffer[offset]);
1499 if (buffer[initial_offset] == '0') return initial_offset == length - 1;
1504 base::Vector<const uint16_t> vector(buffer, length);
1512 if (static_cast<uint16_t>(reverse_string[i]) != buffer[i]) return false;