Lines Matching defs:string

9 #include <string>
64 #include "src/objects/string-set-inl.h"
647 const base::Vector<const char>& string) {
649 base::Vector<const uint8_t>::cast(string);
665 Handle<String> Factory::InternalizeString(Handle<SeqString> string, int from,
667 SeqSubStringKey<SeqString> key(isolate(), string, from, length,
673 Handle<SeqOneByteString> string, int from, int length,
676 Handle<SeqTwoByteString> string, int from, int length,
680 const base::Vector<const uint8_t>& string, AllocationType allocation) {
682 int length = string.length();
684 if (length == 1) return LookupSingleCharacterStringFromCode(string[0]);
687 NewRawOneByteString(string.length(), allocation),
692 CopyChars(SeqOneByteString::cast(*result).GetChars(no_gc), string.begin(),
698 const base::Vector<const char>& string, AllocationType allocation) {
700 base::Vector<const uint8_t>::cast(string);
706 // Allocate string.
717 // Allocate string.
747 // If the string is ASCII, we can just make a substring.
755 // Allocate string.
761 // Update pointer references, since the original string may have moved after
769 // Allocate string.
776 // Update pointer references, since the original string may have moved after
783 MaybeHandle<String> Factory::NewStringFromTwoByte(const base::uc16* string,
788 if (String::IsOneByte(string, length)) {
789 if (length == 1) return LookupSingleCharacterStringFromCode(string[0]);
794 CopyChars(result->GetChars(no_gc), string, length);
801 CopyChars(result->GetChars(no_gc), string, length);
807 const base::Vector<const base::uc16>& string, AllocationType allocation) {
808 return NewStringFromTwoByte(string.begin(), string.length(), allocation);
812 const ZoneVector<base::uc16>* string, AllocationType allocation) {
813 return NewStringFromTwoByte(string->data(), static_cast<int>(string->size()),
868 Handle<String> Factory::NewInternalizedStringImpl(Handle<String> string,
871 if (string->IsOneByteRepresentation()) {
872 return AllocateInternalizedStringImpl<true>(string, chars, hash_field);
874 return AllocateInternalizedStringImpl<false>(string, chars, hash_field);
878 Handle<String> string, MaybeHandle<Map>* internalized_map) {
880 // string table and stub cache on scavenges.
881 if (Heap::InYoungGeneration(*string)) {
887 // string instead of the calling IsType methods on HeapObject, which would
889 Map map = string->map();
901 Handle<StringClass> Factory::InternalizeExternalString(Handle<String> string) {
903 GetInPlaceInternalizedStringMap(string->map()).ToHandleChecked();
908 StringClass cast_string = StringClass::cast(*string);
922 Handle<String> string, MaybeHandle<Map>* shared_map) {
925 if (Heap::InYoungGeneration(*string)) {
930 InstanceType instance_type = string->map().instance_type();
996 // dictionary. Check whether we already have the string in the string
1080 ExternalTwoByteString string =
1083 string.AllocateExternalPointerEntries(isolate());
1084 string.set_length(static_cast<int>(length));
1085 string.set_raw_hash_field(String::kEmptyHashField);
1086 string.SetResource(isolate(), resource);
1088 isolate()->heap()->RegisterExternalString(string);
1090 return Handle<ExternalTwoByteString>(string, isolate());
1093 Handle<JSStringIterator> Factory::NewJSStringIterator(Handle<String> string) {
1096 Handle<String> flat_string = String::Flatten(isolate(), string);
2212 FATAL("Aborting on invalid string length");
2214 // Invalidate the "string length" protector.
3225 V8_INLINE Handle<String> CharToString(Factory* factory, const char* string,
3227 // We tenure the allocated string since it is referenced from the
3228 // number-string cache which lives in the old space.
3232 return factory->NewStringFromAsciiChecked(string, type);
3303 const char* string = DoubleToCString(value, buffer);
3304 result = CharToString(this, string, mode);
3325 const char* string = IntToCString(number.value(), buffer);
3326 result = CharToString(this, string, mode);
3363 // Build the string backwards from the least significant digit.
3371 char* string = buffer.begin() + i;
3373 result = NewStringFromAsciiChecked(string);