Index: src/objects-inl.h |
=================================================================== |
--- src/objects-inl.h (revision 3257) |
+++ src/objects-inl.h (working copy) |
@@ -203,12 +203,6 @@ |
} |
-bool Object::IsSlicedString() { |
- if (!IsString()) return false; |
- return StringShape(String::cast(this)).IsSliced(); |
-} |
- |
- |
StringShape::StringShape(String* str) |
: type_(str->map()->instance_type()) { |
set_valid(); |
@@ -238,9 +232,6 @@ |
bool String::IsAsciiRepresentation() { |
uint32_t type = map()->instance_type(); |
- if ((type & kStringRepresentationMask) == kSlicedStringTag) { |
- return SlicedString::cast(this)->buffer()->IsAsciiRepresentation(); |
- } |
if ((type & kStringRepresentationMask) == kConsStringTag && |
ConsString::cast(this)->second()->length() == 0) { |
return ConsString::cast(this)->first()->IsAsciiRepresentation(); |
@@ -251,9 +242,7 @@ |
bool String::IsTwoByteRepresentation() { |
uint32_t type = map()->instance_type(); |
- if ((type & kStringRepresentationMask) == kSlicedStringTag) { |
- return SlicedString::cast(this)->buffer()->IsTwoByteRepresentation(); |
- } else if ((type & kStringRepresentationMask) == kConsStringTag && |
+ if ((type & kStringRepresentationMask) == kConsStringTag && |
ConsString::cast(this)->second()->length() == 0) { |
return ConsString::cast(this)->first()->IsTwoByteRepresentation(); |
} |
@@ -266,11 +255,6 @@ |
} |
-bool StringShape::IsSliced() { |
- return (type_ & kStringRepresentationMask) == kSlicedStringTag; |
-} |
- |
- |
bool StringShape::IsExternal() { |
return (type_ & kStringRepresentationMask) == kExternalStringTag; |
} |
@@ -1602,7 +1586,6 @@ |
CAST_ACCESSOR(SeqAsciiString) |
CAST_ACCESSOR(SeqTwoByteString) |
CAST_ACCESSOR(ConsString) |
-CAST_ACCESSOR(SlicedString) |
CAST_ACCESSOR(ExternalString) |
CAST_ACCESSOR(ExternalAsciiString) |
CAST_ACCESSOR(ExternalTwoByteString) |
@@ -1713,9 +1696,6 @@ |
case kConsStringTag | kAsciiStringTag: |
case kConsStringTag | kTwoByteStringTag: |
return ConsString::cast(this)->ConsStringGet(index); |
- case kSlicedStringTag | kAsciiStringTag: |
- case kSlicedStringTag | kTwoByteStringTag: |
- return SlicedString::cast(this)->SlicedStringGet(index); |
case kExternalStringTag | kAsciiStringTag: |
return ExternalAsciiString::cast(this)->ExternalAsciiStringGet(index); |
case kExternalStringTag | kTwoByteStringTag: |
@@ -1746,11 +1726,6 @@ |
// Only flattened strings have second part empty. |
return second->length() == 0; |
} |
- case kSlicedStringTag: { |
- StringRepresentationTag tag = |
- StringShape(SlicedString::cast(this)->buffer()).representation_tag(); |
- return tag == kSeqStringTag || tag == kExternalStringTag; |
- } |
default: |
return true; |
} |
@@ -1864,27 +1839,6 @@ |
} |
-String* SlicedString::buffer() { |
- return String::cast(READ_FIELD(this, kBufferOffset)); |
-} |
- |
- |
-void SlicedString::set_buffer(String* buffer) { |
- WRITE_FIELD(this, kBufferOffset, buffer); |
- WRITE_BARRIER(this, kBufferOffset); |
-} |
- |
- |
-int SlicedString::start() { |
- return READ_INT_FIELD(this, kStartOffset); |
-} |
- |
- |
-void SlicedString::set_start(int start) { |
- WRITE_INT_FIELD(this, kStartOffset, start); |
-} |
- |
- |
ExternalAsciiString::Resource* ExternalAsciiString::resource() { |
return *reinterpret_cast<Resource**>(FIELD_ADDR(this, kResourceOffset)); |
} |