| Index: src/objects-inl.h
|
| diff --git a/src/objects-inl.h b/src/objects-inl.h
|
| index 89623bd02c131e0a8f0e14baf1df739e8c9c9fdc..ec96c7cd384c53ec692a4b4b545c5b6ae6b79c3e 100644
|
| --- a/src/objects-inl.h
|
| +++ b/src/objects-inl.h
|
| @@ -345,6 +345,11 @@ bool String::HasOnlyAsciiChars() {
|
| }
|
|
|
|
|
| +bool String::IsOneByteConvertible() {
|
| + return HasOnlyAsciiChars() || IsOneByteRepresentation();
|
| +}
|
| +
|
| +
|
| bool StringShape::IsCons() {
|
| return (type_ & kStringRepresentationMask) == kConsStringTag;
|
| }
|
| @@ -2605,7 +2610,7 @@ uint16_t SeqOneByteString::SeqOneByteStringGet(int index) {
|
|
|
|
|
| void SeqOneByteString::SeqOneByteStringSet(int index, uint16_t value) {
|
| - ASSERT(index >= 0 && index < length() && value <= kMaxAsciiCharCode);
|
| + ASSERT(index >= 0 && index < length() && value <= kMaxOneByteCharCode);
|
| WRITE_BYTE_FIELD(this, kHeaderSize + index * kCharSize,
|
| static_cast<byte>(value));
|
| }
|
| @@ -2621,6 +2626,11 @@ char* SeqOneByteString::GetChars() {
|
| }
|
|
|
|
|
| +uint8_t* SeqOneByteString::GetCharsU() {
|
| + return reinterpret_cast<uint8_t*>(GetCharsAddress());
|
| +}
|
| +
|
| +
|
| Address SeqTwoByteString::GetCharsAddress() {
|
| return FIELD_ADDR(this, kHeaderSize);
|
| }
|
|
|