| Index: runtime/vm/unicode.cc
|
| diff --git a/runtime/vm/unicode.cc b/runtime/vm/unicode.cc
|
| index f2715747a0d882bcae39fbcfd56d59e17ff20107..e9cd101026072f0282b8bd79cbb7ac668c8746dd 100644
|
| --- a/runtime/vm/unicode.cc
|
| +++ b/runtime/vm/unicode.cc
|
| @@ -35,13 +35,11 @@ const uint32_t Utf8::kMagicBits[7] = {0, // Padding.
|
| 0x00000000, 0x00003080, 0x000E2080,
|
| 0x03C82080, 0xFA082080, 0x82082080};
|
|
|
| -
|
| // Minimum values of code points used to check shortest form.
|
| const uint32_t Utf8::kOverlongMinimum[7] = {0, // Padding.
|
| 0x0, 0x80, 0x800,
|
| 0x10000, 0xFFFFFFFF, 0xFFFFFFFF};
|
|
|
| -
|
| // Returns the most restricted coding form in which the sequence of utf8
|
| // characters in 'utf8_array' can be represented in, and the number of
|
| // code units needed in that form.
|
| @@ -68,7 +66,6 @@ intptr_t Utf8::CodeUnitCount(const uint8_t* utf8_array,
|
| return len;
|
| }
|
|
|
| -
|
| // Returns true if str is a valid NUL-terminated UTF-8 string.
|
| bool Utf8::IsValid(const uint8_t* utf8_array, intptr_t array_len) {
|
| intptr_t i = 0;
|
| @@ -98,7 +95,6 @@ bool Utf8::IsValid(const uint8_t* utf8_array, intptr_t array_len) {
|
| return true;
|
| }
|
|
|
| -
|
| intptr_t Utf8::Length(int32_t ch) {
|
| if (ch <= kMaxOneByteChar) {
|
| return 1;
|
| @@ -111,7 +107,6 @@ intptr_t Utf8::Length(int32_t ch) {
|
| return 4;
|
| }
|
|
|
| -
|
| intptr_t Utf8::Length(const String& str) {
|
| intptr_t length = 0;
|
| String::CodePointIterator it(str);
|
| @@ -122,7 +117,6 @@ intptr_t Utf8::Length(const String& str) {
|
| return length;
|
| }
|
|
|
| -
|
| intptr_t Utf8::Encode(int32_t ch, char* dst) {
|
| static const int kMask = ~(1 << 6);
|
| if (ch <= kMaxOneByteChar) {
|
| @@ -148,7 +142,6 @@ intptr_t Utf8::Encode(int32_t ch, char* dst) {
|
| return 4;
|
| }
|
|
|
| -
|
| intptr_t Utf8::Encode(const String& src, char* dst, intptr_t len) {
|
| intptr_t pos = 0;
|
| String::CodePointIterator it(src);
|
| @@ -164,7 +157,6 @@ intptr_t Utf8::Encode(const String& src, char* dst, intptr_t len) {
|
| return pos;
|
| }
|
|
|
| -
|
| intptr_t Utf8::Decode(const uint8_t* utf8_array,
|
| intptr_t array_len,
|
| int32_t* dst) {
|
| @@ -194,7 +186,6 @@ intptr_t Utf8::Decode(const uint8_t* utf8_array,
|
| return i;
|
| }
|
|
|
| -
|
| bool Utf8::DecodeToLatin1(const uint8_t* utf8_array,
|
| intptr_t array_len,
|
| uint8_t* dst,
|
| @@ -218,7 +209,6 @@ bool Utf8::DecodeToLatin1(const uint8_t* utf8_array,
|
| return true; // Success.
|
| }
|
|
|
| -
|
| bool Utf8::DecodeToUTF16(const uint8_t* utf8_array,
|
| intptr_t array_len,
|
| uint16_t* dst,
|
| @@ -246,7 +236,6 @@ bool Utf8::DecodeToUTF16(const uint8_t* utf8_array,
|
| return true; // Success.
|
| }
|
|
|
| -
|
| bool Utf8::DecodeToUTF32(const uint8_t* utf8_array,
|
| intptr_t array_len,
|
| int32_t* dst,
|
| @@ -268,7 +257,6 @@ bool Utf8::DecodeToUTF32(const uint8_t* utf8_array,
|
| return true; // Success.
|
| }
|
|
|
| -
|
| bool Utf8::DecodeCStringToUTF32(const char* str, int32_t* dst, intptr_t len) {
|
| ASSERT(str != NULL);
|
| intptr_t array_len = strlen(str);
|
| @@ -276,7 +264,6 @@ bool Utf8::DecodeCStringToUTF32(const char* str, int32_t* dst, intptr_t len) {
|
| return Utf8::DecodeToUTF32(utf8_array, array_len, dst, len);
|
| }
|
|
|
| -
|
| void Utf16::Encode(int32_t codepoint, uint16_t* dst) {
|
| ASSERT(codepoint > Utf16::kMaxCodeUnit);
|
| ASSERT(dst != NULL);
|
|
|