| Index: runtime/vm/object.h
|
| diff --git a/runtime/vm/object.h b/runtime/vm/object.h
|
| index d7c24b4926e9b7bcff457311b1ba2a1d68bf71b1..f5bcabe12e472652f610120fad0438482f55b246 100644
|
| --- a/runtime/vm/object.h
|
| +++ b/runtime/vm/object.h
|
| @@ -5524,7 +5524,7 @@ class String : public Instance {
|
|
|
| virtual RawObject* HashCode() const { return Integer::New(Hash()); }
|
|
|
| - int32_t CharAt(intptr_t index) const;
|
| + uint16_t CharAt(intptr_t index) const;
|
|
|
| Scanner::CharAtFunc CharAtFunc() const;
|
|
|
| @@ -5754,12 +5754,12 @@ class String : public Instance {
|
|
|
| class OneByteString : public AllStatic {
|
| public:
|
| - static int32_t CharAt(const String& str, intptr_t index) {
|
| + static uint16_t CharAt(const String& str, intptr_t index) {
|
| return *CharAddr(str, index);
|
| }
|
|
|
| - static void SetCharAt(const String& str, intptr_t index, uint8_t code_point) {
|
| - *CharAddr(str, index) = code_point;
|
| + static void SetCharAt(const String& str, intptr_t index, uint8_t code_unit) {
|
| + *CharAddr(str, index) = code_unit;
|
| }
|
| static RawOneByteString* EscapeSpecialCharacters(const String& str);
|
| // We use the same maximum elements for all strings.
|
| @@ -5883,7 +5883,7 @@ class OneByteString : public AllStatic {
|
|
|
| class TwoByteString : public AllStatic {
|
| public:
|
| - static int32_t CharAt(const String& str, intptr_t index) {
|
| + static uint16_t CharAt(const String& str, intptr_t index) {
|
| return *CharAddr(str, index);
|
| }
|
|
|
| @@ -5983,7 +5983,7 @@ class TwoByteString : public AllStatic {
|
|
|
| class ExternalOneByteString : public AllStatic {
|
| public:
|
| - static int32_t CharAt(const String& str, intptr_t index) {
|
| + static uint16_t CharAt(const String& str, intptr_t index) {
|
| return *CharAddr(str, index);
|
| }
|
|
|
| @@ -6060,7 +6060,7 @@ class ExternalOneByteString : public AllStatic {
|
|
|
| class ExternalTwoByteString : public AllStatic {
|
| public:
|
| - static int32_t CharAt(const String& str, intptr_t index) {
|
| + static uint16_t CharAt(const String& str, intptr_t index) {
|
| return *CharAddr(str, index);
|
| }
|
|
|
|
|