OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 8321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8332 } | 8332 } |
8333 | 8333 |
8334 | 8334 |
8335 SmartArrayPointer<char> String::ToCString(AllowNullsFlag allow_nulls, | 8335 SmartArrayPointer<char> String::ToCString(AllowNullsFlag allow_nulls, |
8336 RobustnessFlag robust_flag, | 8336 RobustnessFlag robust_flag, |
8337 int* length_return) { | 8337 int* length_return) { |
8338 return ToCString(allow_nulls, robust_flag, 0, -1, length_return); | 8338 return ToCString(allow_nulls, robust_flag, 0, -1, length_return); |
8339 } | 8339 } |
8340 | 8340 |
8341 | 8341 |
8342 const uc16* String::GetTwoByteData() { | |
8343 return GetTwoByteData(0); | |
8344 } | |
8345 | |
8346 | |
8347 const uc16* String::GetTwoByteData(unsigned start) { | 8342 const uc16* String::GetTwoByteData(unsigned start) { |
8348 ASSERT(!IsOneByteRepresentationUnderneath()); | 8343 ASSERT(!IsOneByteRepresentationUnderneath()); |
8349 switch (StringShape(this).representation_tag()) { | 8344 switch (StringShape(this).representation_tag()) { |
8350 case kSeqStringTag: | 8345 case kSeqStringTag: |
8351 return SeqTwoByteString::cast(this)->SeqTwoByteStringGetData(start); | 8346 return SeqTwoByteString::cast(this)->SeqTwoByteStringGetData(start); |
8352 case kExternalStringTag: | 8347 case kExternalStringTag: |
8353 return ExternalTwoByteString::cast(this)-> | 8348 return ExternalTwoByteString::cast(this)-> |
8354 ExternalTwoByteStringGetData(start); | 8349 ExternalTwoByteStringGetData(start); |
8355 case kSlicedStringTag: { | 8350 case kSlicedStringTag: { |
8356 SlicedString* slice = SlicedString::cast(this); | 8351 SlicedString* slice = SlicedString::cast(this); |
(...skipping 8178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16535 #define ERROR_MESSAGES_TEXTS(C, T) T, | 16530 #define ERROR_MESSAGES_TEXTS(C, T) T, |
16536 static const char* error_messages_[] = { | 16531 static const char* error_messages_[] = { |
16537 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 16532 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
16538 }; | 16533 }; |
16539 #undef ERROR_MESSAGES_TEXTS | 16534 #undef ERROR_MESSAGES_TEXTS |
16540 return error_messages_[reason]; | 16535 return error_messages_[reason]; |
16541 } | 16536 } |
16542 | 16537 |
16543 | 16538 |
16544 } } // namespace v8::internal | 16539 } } // namespace v8::internal |
OLD | NEW |