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

Unified Diff: src/objects-inl.h

Issue 11818025: Continues Latin-1 support. All tests pass with ENABLE_LATIN_1 flag. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: ARM fix Created 7 years, 11 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
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index d78e03edfe3a9db40c0f001805bf123f511ec27b..7fcf51a1be523e8268ff460cf373cd90a0dc7ce0 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -2551,31 +2551,26 @@ void String::Visit(
switch (type & (kStringRepresentationMask | kStringEncodingMask)) {
case kSeqStringTag | kOneByteStringTag:
visitor.VisitOneByteString(
- reinterpret_cast<const uint8_t*>(
- SeqOneByteString::cast(string)->GetChars()) + slice_offset,
- length - offset);
+ SeqOneByteString::cast(string)->GetChars() + slice_offset,
+ length - offset);
return;
case kSeqStringTag | kTwoByteStringTag:
visitor.VisitTwoByteString(
- reinterpret_cast<const uint16_t*>(
- SeqTwoByteString::cast(string)->GetChars()) + slice_offset,
- length - offset);
+ SeqTwoByteString::cast(string)->GetChars() + slice_offset,
+ length - offset);
return;
case kExternalStringTag | kOneByteStringTag:
visitor.VisitOneByteString(
- reinterpret_cast<const uint8_t*>(
- ExternalAsciiString::cast(string)->GetChars()) + slice_offset,
- length - offset);
+ ExternalAsciiString::cast(string)->GetChars() + slice_offset,
+ length - offset);
return;
case kExternalStringTag | kTwoByteStringTag:
visitor.VisitTwoByteString(
- reinterpret_cast<const uint16_t*>(
- ExternalTwoByteString::cast(string)->GetChars())
- + slice_offset,
- length - offset);
+ ExternalTwoByteString::cast(string)->GetChars() + slice_offset,
+ length - offset);
return;
case kSlicedStringTag | kOneByteStringTag:
@@ -2621,12 +2616,7 @@ Address SeqOneByteString::GetCharsAddress() {
}
-char* SeqOneByteString::GetChars() {
- return reinterpret_cast<char*>(GetCharsAddress());
-}
-
-
-uint8_t* SeqOneByteString::GetCharsU() {
+uint8_t* SeqOneByteString::GetChars() {
return reinterpret_cast<uint8_t*>(GetCharsAddress());
}
@@ -2737,8 +2727,8 @@ void ExternalAsciiString::set_resource(
}
-const char* ExternalAsciiString::GetChars() {
- return resource()->data();
+const uint8_t* ExternalAsciiString::GetChars() {
+ return reinterpret_cast<const uint8_t*>(resource()->data());
Yang 2013/01/09 15:39:30 I guess this cast would be unnecessary once we cha
}

Powered by Google App Engine
This is Rietveld 408576698