Lines Matching defs:String
94 // - String
221 // The names of the string instance types are intended to systematically
227 // mentioned. Finally, the string is either a SYMBOL_TYPE (if it is a
230 // NOTE: The following things are some that depend on the string types having
333 // Since string types are not consecutive, this macro is used to
378 string, \
379 String) \
464 // string, and cleared if it is a string.
470 // There are not enough types that the non-string types (with bit 7 set) can
476 // If bit 7 is clear then bit 2 indicates whether the string consists of
483 // of the string.
501 // sure that the string is one of the two (an indirect string).
506 // string actually contains ASCII data.
510 // If bit 7 is clear and string representation indicates an external string,
516 // A ConsString with an empty string as the right side is a candidate
529 // String types.
780 V(String) \
904 inline bool HasSpecificClassOf(String* name);
917 void Lookup(String* name, LookupResult* result);
920 MUST_USE_RESULT inline MaybeObject* GetProperty(String* key);
922 String* key,
926 String* key,
932 Handle<String> key,
937 String* key,
967 // Returns true if this is a JSValue containing a string and the index is
968 // < the length of the string. Used to implement [] on strings.
1393 Handle<String> key,
1398 MUST_USE_RESULT MaybeObject* SetProperty(String* key,
1403 String* key,
1410 MUST_USE_RESULT MaybeObject* DeleteProperty(String* name, DeleteMode mode);
1425 String* class_name();
1429 String* constructor_name();
1431 inline PropertyAttributes GetPropertyAttribute(String* name);
1433 String* name);
1434 PropertyAttributes GetLocalPropertyAttribute(String* name);
1437 inline bool HasProperty(String* name);
1438 inline bool HasLocalProperty(String* name);
1454 void LocalLookup(String* name, LookupResult* result);
1455 void Lookup(String* name, LookupResult* result);
1463 String* name,
1547 String* name);
1551 String* key,
1557 String* name,
1563 String* name,
1568 String* name,
1573 String* name,
1580 Handle<String> key,
1586 String* key,
1601 Handle<String> key,
1605 MUST_USE_RESULT MaybeObject* SetNormalizedProperty(String* name,
1610 MUST_USE_RESULT MaybeObject* DeleteNormalizedProperty(String* name,
1619 String* name,
1622 String* name,
1627 String* name,
1631 Handle<String> name,
1635 MUST_USE_RESULT MaybeObject* DefineAccessor(String* name,
1639 Object* LookupAccessor(String* name, AccessorComponent component);
1647 String* name,
1651 String* name,
1655 String* name,
1659 String* name,
1682 Handle<String> key,
1685 MUST_USE_RESULT MaybeObject* SetHiddenProperty(String* key, Object* value);
1689 Object* GetHiddenProperty(String* key);
1692 void DeleteHiddenProperty(String* key);
1701 Handle<String> name);
1702 MUST_USE_RESULT MaybeObject* DeleteProperty(String* name, DeleteMode mode);
1756 // Element with given index is character in string.
1840 bool HasRealNamedProperty(String* key);
1842 bool HasRealNamedCallbackProperty(String* key);
1855 void LocalLookupRealNamedProperty(String* name, LookupResult* result);
1856 void LookupRealNamedProperty(String* name, LookupResult* result);
1857 void LookupRealNamedPropertyInPrototypes(String* name, LookupResult* result);
1858 void LookupCallbackSetterInPrototypes(String* name, LookupResult* result);
1861 void LookupCallback(String* name, LookupResult* result);
1888 String* name,
1898 String* name,
1903 String* name,
1928 String* name,
1936 String* name,
1941 MUST_USE_RESULT MaybeObject* AddFastProperty(String* name,
1946 MUST_USE_RESULT MaybeObject* AddSlowProperty(String* name,
1951 MUST_USE_RESULT MaybeObject* AddProperty(String* name,
1976 Handle<String> name,
1979 MUST_USE_RESULT MaybeObject* UpdateMapCodeCache(String* name, Code* code);
2149 String* name,
2155 MUST_USE_RESULT MaybeObject* DeletePropertyPostInterceptor(String* name,
2157 MUST_USE_RESULT MaybeObject* DeletePropertyWithInterceptor(String* name);
2175 bool CanSetCallback(String* name);
2181 String* name,
2190 String* name,
2194 void LookupInDescriptor(String* name, LookupResult* result);
2468 inline String* GetKey(int descriptor_number);
2533 inline int Search(String* name);
2537 inline int SearchWithCache(String* name);
2540 bool Contains(String* name) { return kNotFound != Search(name); }
2546 int BinarySearch(String* name, int low, int high);
2551 int LinearSearch(String* name, int len);
2922 MUST_USE_RESULT MaybeObject* LookupString(String* key, Object** s);
2924 // Looks up a symbol that is equal to the given string and returns
2927 bool LookupSymbolIfExists(String* str, String** symbol);
2928 bool LookupTwoCharsSymbolIfExists(uint32_t c1, uint32_t c2, String** symbol);
2968 // Find cached value for a string key, otherwise return null.
3086 class StringDictionaryShape : public BaseShape<String*> {
3088 static inline bool IsMatch(String* key, Object* other);
3089 static inline uint32_t Hash(String* key);
3090 static inline uint32_t HashForObject(String* key, Object* object);
3091 MUST_USE_RESULT static inline MaybeObject* AsObject(String* key);
3098 class StringDictionary: public Dictionary<StringDictionaryShape, String*> {
3115 int FindEntry(String* key);
3376 String* FunctionName();
3379 String* ParameterName(int var);
3382 String* LocalName(int var);
3385 String* StackLocalName(int var);
3388 String* ContextLocalName(int var);
3400 int StackSlotIndex(String* name);
3407 int ContextSlotIndex(String* name,
3414 int ParameterIndex(String* name);
3420 int FunctionContextSlotIndex(String* name, VariableMode* mode);
4744 String* name,
4757 int PropertyIndexFor(String* name);
4770 AccessorDescriptor* FindAccessor(String* name);
4779 Handle<String> name,
4781 MUST_USE_RESULT MaybeObject* UpdateCodeCache(String* name, Code* code);
4784 Object* FindInCodeCache(String* name, Code::Flags flags);
4791 void RemoveFromCodeCache(String* name, Code* code, int index);
4822 // Returns the contents of this map's descriptor array for the given string.
4825 Object* GetDescriptorContents(String* sentinel_name,
4965 String* elements_transition_sentinel_name();
5049 // If script source is an external string, check that the underlying
5102 V(String.prototype, charCodeAt, StringCharCodeAt) \
5103 V(String.prototype, charAt, StringCharAt) \
5104 V(String, fromCharCode, StringFromCharCode) \
5305 DECL_ACCESSORS(inferred_name, String)
5308 String* DebugName();
5456 String* GetThisPropertyAssignmentName(int index);
5811 Object* SetInstanceClassName(String* name);
5937 Object* GetPropertyNoExceptionThrown(String* key) {
5945 Handle<String> name);
5948 MUST_USE_RESULT MaybeObject* EnsurePropertyCell(String* name);
6038 // Representation for JS Wrapper objects, String, Number, Boolean, etc.
6176 DECL_ACCESSORS(type, String)
6233 // - reference to the original source string
6234 // - reference to the original flag string
6236 // - a reference to a literal string to search for
6248 // ATOM: A simple string to match against using an indexOf operation.
6270 inline String* Pattern();
6400 // Find cached value for a string key, otherwise return null.
6401 Object* Lookup(String* src);
6402 Object* LookupEval(String* src,
6406 Object* LookupRegExp(String* source, JSRegExp::Flags flags);
6407 MUST_USE_RESULT MaybeObject* Put(String* src, Object* value);
6408 MUST_USE_RESULT MaybeObject* PutEval(String* src,
6412 MUST_USE_RESULT MaybeObject* PutRegExp(String* src,
6432 MUST_USE_RESULT MaybeObject* Update(String* name, Code* code);
6436 Object* Lookup(String* name, Code::Flags flags);
6465 MUST_USE_RESULT MaybeObject* UpdateDefaultCache(String* name, Code* code);
6466 MUST_USE_RESULT MaybeObject* UpdateNormalTypeCache(String* name, Code* code);
6467 Object* LookupDefaultCache(String* name, Code::Flags flags);
6468 Object* LookupNormalTypeCache(String* name, Code::Flags flags);
6506 Object* Lookup(String* name, Code::Flags flags);
6507 MUST_USE_RESULT MaybeObject* Put(String* name, Code* code);
6509 int GetIndex(String* name, Code::Flags flags);
6650 // Returns true if the hash of this string can be computed without
6663 // the hasher through the routines that take a UTF-8 string and make a symbol.
6667 // Returns the value to store in the hash field of a string with
6679 // Calculated hash value for a string consisting of 1 to
6680 // String::kMaxArrayIndexSize digits with no leading zeros (except "0").
6684 // No string is allowed to have a hash of zero. That value is reserved
6707 // Calculates string hash.
6714 // The characteristics of a string are stored in its map. Retrieving these
6717 // the shape of the string is given its own class so that it can be retrieved
6718 // once and used for several string operations. A StringShape is small enough
6720 // string can potentially alter its shape. Also be aware that a GC caused by
6721 // something else can alter the shape of a string due to ConsString
6727 inline explicit StringShape(String* s);
6763 // The String abstract class captures JavaScript string values:
6766 // 4.3.16 String Value
6767 // A string value is a member of the type String and is a finite
6770 // All string values have a length field.
6771 class String: public HeapObject {
6773 // Representation of the flat content of a String.
6774 // A non-flat string doesn't have flat content.
6775 // A flat string has content that's encoded as a sequence of either
6777 // Returned by String::GetFlatContent().
6780 // Returns true if the string is flat and this structure contains content.
6787 // Return the ASCII content of the string. Only use if IsAscii() returns
6793 // Return the two-byte content of the string. Only use if IsTwoByte()
6803 // Constructors only used by String::GetFlatContent().
6815 friend class String;
6818 // Get and set the length of the string.
6822 // Get and set the hash field of the string.
6826 // Returns whether this string has only ASCII chars, i.e. all of them can
6827 // be ASCII encoded. This might be the case even if the string is
6834 // encoding of the underlying string. This is taken into account here.
6843 // Get and set individual two byte chars in the string.
6845 // Get individual two byte char in the string. Repeated calls
6846 // to this method are not efficient unless the string is flat.
6849 // Try to flatten the string. Checks first inline to see if it is
6850 // necessary. Does nothing if the string is not a cons string.
6851 // Flattening allocates a sequential string with the same data as
6852 // the given string and mutates the cons string to a degenerate
6853 // form, where the first component is the new sequential string and
6854 // the second component is the empty string. If allocation fails,
6856 // function returns the sequential string that is now the first
6857 // component of the cons string.
6868 // string.
6869 inline String* TryFlattenGetString(PretenureFlag pretenure = NOT_TENURED);
6871 // Tries to return the content of a flat string as a structure holding either
6873 // If the string isn't flat, and therefore doesn't have flat content, the
6878 // Returns the parent of a sliced string or first part of a flat cons string.
6880 inline String* GetUnderlying();
6882 // Mark the string as an undetectable object. It only applies to
6883 // ASCII and two byte string types.
6891 // String equality operations.
6892 inline bool Equals(String* other);
6897 // Return a UTF8 representation of the string. The string is null
6899 // in length_output if length_output is not a null pointer The string
6915 // Return a 16 bit Unicode representation of the string.
6916 // The string should be nearly flat, otherwise the performance of
6939 bool MakeExternal(v8::String::ExternalStringResource* resource);
6940 bool MakeExternal(v8::String::ExternalAsciiStringResource* resource);
6946 static inline String* cast(Object* obj);
6973 // Maximum number of characters to consider when trying to convert a string
6982 // Mask constant for checking if a string has a computed hash code
6985 // computed the 2nd bit tells whether the string can be used as an
7002 // For strings which are array indexes the hash value has the string length
7004 // the case for the string '0'. 24 bits are used for the array index value.
7021 // could use a mask to test if the length of string is less than or equal to
7036 // Maximal string length.
7040 // string length is used as the hash value.
7051 static const unibrow::byte* ReadBlock(String* input,
7056 static const unibrow::byte* ReadBlock(String** input,
7064 static void WriteToFlat(String* source,
7115 static inline const unibrow::byte* ReadBlock(String* input,
7119 static void ReadBlockIntoBuffer(String* input,
7126 // string. This is a no-op unless the string is a ConsString. Flatten
7132 // Slow case of String::Equals. This implementation works on any strings
7134 bool SlowEquals(String* other);
7142 DISALLOW_IMPLICIT_CONSTRUCTORS(String);
7146 // The SeqString abstract class captures sequential string values.
7147 class SeqString: public String {
7153 static const int kHeaderSize = String::kSize;
7160 // The AsciiString class captures sequential ASCII string objects.
7170 // Get the address of the characters in this string.
7188 // Maximal memory usage for a single sequential ASCII string.
7190 // Maximal length of a single sequential ASCII string.
7191 // Q.v. String::kMaxLength which is the maximal size of concatenated strings.
7207 // The TwoByteString class captures sequential unicode string objects.
7217 // Get the address of the characters in this string.
7238 // Maximal memory usage for a single sequential two-byte string.
7240 // Maximal length of a single sequential two-byte string.
7241 // Q.v. String::kMaxLength which is the maximal size of concatenated strings.
7254 // The ConsString class describes string values built by using the
7256 // first and second components are pointers to other string values.
7259 // are non-ConsString string values. The string value represented by
7260 // a ConsString can be obtained by concatenating the leaf string
7262 class ConsString: public String {
7264 // First string of the cons cell.
7265 inline String* first();
7266 // Doesn't check that the result is a string, even in debug mode. This is
7269 inline void set_first(String* first,
7272 // Second string of the cons cell.
7273 inline String* second();
7274 // Doesn't check that the result is a string, even in debug mode. This is
7277 inline void set_second(String* second,
7287 static const int kFirstOffset = POINTER_SIZE_ALIGN(String::kSize);
7299 // Minimum length for a cons string.
7314 // The Sliced String class describes strings that are substrings of another
7315 // sequential string. The motivation is to save time and memory when creating
7316 // a substring. A Sliced String is described as a pointer to the parent,
7317 // the offset from the start of the parent string and the length. Using
7318 // a Sliced String therefore requires unpacking of the parent string and
7319 // adding the offset to the start address. A substring of a Sliced String
7325 // - truncating sliced string to enable otherwise unneeded parent to be GC'ed.
7326 class SlicedString: public String {
7328 inline String* parent();
7329 inline void set_parent(String* parent);
7340 static const int kParentOffset = POINTER_SIZE_ALIGN(String::kSize);
7351 // Minimum length for a sliced string.
7367 // The ExternalString class describes string values that are backed by
7368 // a string resource that lies outside the V8 heap. ExternalStrings
7376 class ExternalString: public String {
7382 static const int kResourceOffset = POINTER_SIZE_ALIGN(String::kSize);
7387 // Return whether external string is short (data pointer is not cached).
7397 // The ExternalAsciiString class is an external string backed by an
7398 // ASCII string.
7403 typedef v8::String::ExternalAsciiStringResource Resource;
7442 // The ExternalTwoByteString class is an external string backed by a UTF-16
7443 // encoded string.
7448 typedef v8::String::ExternalStringResource Resource;
7450 // The underlying string resource.
7511 // A flat string reader provides random access to the contents of a
7512 // string independent of the character width of the string. The handle
7516 FlatStringReader(Isolate* isolate, Handle<String> str);
7522 String** str_;
7530 // it would have to store a String Handle instead of a String* and
7533 // StringInputBuffer is able to traverse any string regardless of how
7538 class StringInputBuffer: public unibrow::InputBuffer<String, String*, 1024> {
7541 inline StringInputBuffer(): unibrow::InputBuffer<String, String*, 1024>() {}
7542 explicit inline StringInputBuffer(String* backing):
7543 unibrow::InputBuffer<String, String*, 1024>(backing) {}
7548 : public unibrow::InputBuffer<String, String**, 256> {
7552 : unibrow::InputBuffer<String, String**, 256>() {}
7553 explicit inline SafeStringInputBuffer(String** backing)
7554 : unibrow::InputBuffer<String, String**, 256>(backing) {}
7575 DECL_ACCESSORS(to_string, String)
7663 bool HasPropertyWithHandler(String* name);
7668 String* name);
7674 String* name,
7686 String* name,
7693 String* name,
7701 String* name);
8534 // Visits the resource of an ASCII or two-byte string.
8536 v8::String::ExternalAsciiStringResource** resource) {}
8538 v8::String::ExternalStringResource** resource) {}