Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(363)

Unified Diff: src/unicode-inl.h

Issue 638643002: Update unicode to 7.0.0. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comment Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/unicode-decoder.cc ('k') | test/cctest/test-strings.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/unicode-inl.h
diff --git a/src/unicode-inl.h b/src/unicode-inl.h
index 81327d7ad2f18b35fde3b9ad8b272db4864fe44d..d47ee3e0cf775e19b0dd664585eace7ff883af26 100644
--- a/src/unicode-inl.h
+++ b/src/unicode-inl.h
@@ -57,22 +57,6 @@ template <class T, int s> int Mapping<T, s>::CalculateValue(uchar c, uchar n,
}
-uint16_t Latin1::ConvertNonLatin1ToLatin1(uint16_t c) {
- DCHECK(c > Latin1::kMaxChar);
- switch (c) {
- // This are equivalent characters in unicode.
- case 0x39c:
- case 0x3bc:
- return 0xb5;
- // This is an uppercase of a Latin-1 character
- // outside of Latin-1.
- case 0x178:
- return 0xff;
- }
- return 0;
-}
-
-
unsigned Utf8::EncodeOneByte(char* str, uint8_t c) {
static const int kMask = ~(1 << 6);
if (c <= kMaxOneByteChar) {
@@ -153,53 +137,6 @@ unsigned Utf8::Length(uchar c, int previous) {
}
}
-Utf8DecoderBase::Utf8DecoderBase()
- : unbuffered_start_(NULL),
- utf16_length_(0),
- last_byte_of_buffer_unused_(false) {}
-
-Utf8DecoderBase::Utf8DecoderBase(uint16_t* buffer,
- unsigned buffer_length,
- const uint8_t* stream,
- unsigned stream_length) {
- Reset(buffer, buffer_length, stream, stream_length);
-}
-
-template<unsigned kBufferSize>
-Utf8Decoder<kBufferSize>::Utf8Decoder(const char* stream, unsigned length)
- : Utf8DecoderBase(buffer_,
- kBufferSize,
- reinterpret_cast<const uint8_t*>(stream),
- length) {
-}
-
-template<unsigned kBufferSize>
-void Utf8Decoder<kBufferSize>::Reset(const char* stream, unsigned length) {
- Utf8DecoderBase::Reset(buffer_,
- kBufferSize,
- reinterpret_cast<const uint8_t*>(stream),
- length);
-}
-
-template <unsigned kBufferSize>
-unsigned Utf8Decoder<kBufferSize>::WriteUtf16(uint16_t* data,
- unsigned length) const {
- DCHECK(length > 0);
- if (length > utf16_length_) length = utf16_length_;
- // memcpy everything in buffer.
- unsigned buffer_length =
- last_byte_of_buffer_unused_ ? kBufferSize - 1 : kBufferSize;
- unsigned memcpy_length = length <= buffer_length ? length : buffer_length;
- v8::internal::MemCopy(data, buffer_, memcpy_length * sizeof(uint16_t));
- if (length <= buffer_length) return length;
- DCHECK(unbuffered_start_ != NULL);
- // Copy the rest the slow way.
- WriteUtf16Slow(unbuffered_start_,
- data + buffer_length,
- length - buffer_length);
- return length;
-}
-
} // namespace unibrow
#endif // V8_UNICODE_INL_H_
« no previous file with comments | « src/unicode-decoder.cc ('k') | test/cctest/test-strings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698