Home | History | Annotate | Download | only in src

Lines Matching defs:string

1277 HValue* HGraphBuilder::BuildCheckString(HValue* string) {
1278 if (!string->type().IsString()) {
1279 ASSERT(!string->IsConstant() ||
1280 !HConstant::cast(string)->HasStringValue());
1281 BuildCheckHeapObject(string);
1282 return Add<HCheckInstanceType>(string, HCheckInstanceType::IS_STRING);
1284 return string;
1559 Handle<String> result = isolate()->factory()->NumberToString(number);
1567 // Load the number string cache.
1571 // Make the hash mask from the length of the number string cache. It
1572 // contains two elements (number and string) for each cache entry.
1627 // Check if key is a heap number (the number string cache contains only
1663 // Count number to string operation in native code.
1689 String::Encoding encoding) {
1692 if (encoding == String::TWO_BYTE_ENCODING) {
1709 String::Encoding src_encoding,
1712 String::Encoding dst_encoding,
1714 ASSERT(dst_encoding != String::ONE_BYTE_ENCODING ||
1715 src_encoding == String::ONE_BYTE_ENCODING);
1732 // Determine the string lengths.
1738 // Compute the combined string length. If the result is larger than the max
1739 // supported string length, we bailout to the runtime. This is done implicitly
1740 // when converting the result back to a smi in case the max string length
1743 STATIC_ASSERT(String::kMaxLength <= Smi::kMaxValue);
1744 if (String::kMaxLength != Smi::kMaxValue) {
1747 length, Add<HConstant>(String::kMaxLength), Token::LTE);
1749 if_nooverflow.ElseDeopt("String length exceeds limit");
1752 // Determine the string instance types.
1764 // Check if we should create a cons string.
1770 // Allocate the cons string object. HAllocate does not care whether we
1772 // CONS_STRING_TYPE here. Below we decide whether the cons string is
1774 HAllocate* string = Add<HAllocate>(Add<HConstant>(ConsString::kSize),
1775 HType::String(), pretenure_flag,
1782 // We create a one-byte cons string if
1790 // string is one-byte.
1815 AddStoreMapConstantNoWriteBarrier(string, map);
1821 AddStoreMapConstantNoWriteBarrier(string, map);
1825 // Initialize the cons string fields.
1826 Add<HStoreNamedField>(string, HObjectAccess::ForStringHashField(),
1827 Add<HConstant>(String::kEmptyHashField));
1828 Add<HStoreNamedField>(string, HObjectAccess::ForStringLength(), length);
1829 Add<HStoreNamedField>(string, HObjectAccess::ForConsStringFirst(), left);
1830 Add<HStoreNamedField>(string, HObjectAccess::ForConsStringSecond(),
1833 // Count the native string addition.
1836 // Cons string is result.
1837 Push(string);
1862 // Check if the result is a one-byte string.
1873 // string while observing object alignment.
1875 length, String::ONE_BYTE_ENCODING);
1877 // Allocate the ASCII string object.
1879 HAllocate* string = Add<HAllocate>(size, HType::String(),
1881 string->set_known_initial_map(map);
1884 AddStoreMapConstantNoWriteBarrier(string, map);
1886 // Length must be stored into the string before we copy characters to
1888 Add<HStoreNamedField>(string, HObjectAccess::ForStringLength(),
1891 // Copy bytes from the left string.
1893 left, graph()->GetConstant0(), String::ONE_BYTE_ENCODING,
1894 string, graph()->GetConstant0(), String::ONE_BYTE_ENCODING,
1897 // Copy bytes from the right string.
1899 right, graph()->GetConstant0(), String::ONE_BYTE_ENCODING,
1900 string, left_length, String::ONE_BYTE_ENCODING,
1903 // Count the native string addition.
1906 // Return the string.
1907 Push(string);
1912 // string while observing object alignment.
1914 length, String::TWO_BYTE_ENCODING);
1916 // Allocate the two-byte string object.
1918 HAllocate* string = Add<HAllocate>(size, HType::String(),
1920 string->set_known_initial_map(map);
1923 AddStoreMapConstantNoWriteBarrier(string, map);
1925 // Length must be stored into the string before we copy characters to
1927 Add<HStoreNamedField>(string, HObjectAccess::ForStringLength(),
1930 // Copy bytes from the left string.
1932 left, graph()->GetConstant0(), String::TWO_BYTE_ENCODING,
1933 string, graph()->GetConstant0(), String::TWO_BYTE_ENCODING,
1936 // Copy bytes from the right string.
1938 right, graph()->GetConstant0(), String::TWO_BYTE_ENCODING,
1939 string, left_length, String::TWO_BYTE_ENCODING,
1942 // Return the string.
1943 Push(string);
1947 // Initialize the (common) string fields.
1948 HValue* string = Pop();
1949 Add<HStoreNamedField>(string, HObjectAccess::ForStringHashField(),
1950 Add<HConstant>(String::kEmptyHashField));
1952 // Count the native string addition.
1955 Push(string);
1977 // Determine the string lengths.
1983 // Check if left string is empty.
1989 // Count the native string addition.
1992 // Just return the right string.
1997 // Check if right string is empty.
2003 // Count the native string addition.
2006 // Just return the left string.
4158 // Test switch's tag value if all clauses are string literals
4725 FlattenGetString(Handle<String>::cast(constant_object));
4798 Handle<String> name,
4816 Handle<String> name,
4851 Handle<String> name,
5007 Handle<String> name = property->key()->AsPropertyName();
5198 Handle<String> name,
5282 Handle<String> name,
5294 Handle<String> name,
5316 Handle<String> name,
5510 Handle<String> name) {
5580 Handle<String> name) {
5638 Handle<String> name) {
5761 Handle<String> name = Handle<String>::cast(key->value());
6158 Handle<String> name,
6536 Handle<String> name = expr->key()->AsLiteral()->AsPropertyName();
6598 HValue* string = Pop();
6599 HInstruction* char_code = BuildStringCharCodeAt(string, index);
6609 Handle<String> name = expr->key()->AsLiteral()->AsPropertyName();
6767 Handle<String> name) {
6804 Handle<String> name) {
7417 HValue* string = Pop();
7423 BuildStringCharCodeAt(string, index);
7655 Handle<String> name = prop->key()->AsLiteral()->AsPropertyName();
8293 Handle<String> name = expr->name();
8585 HValue* string,
8587 if (string->IsConstant() && index->IsConstant()) {
8588 HConstant* c_string = HConstant::cast(string);
8592 Handle<String> s = c_string->StringValue();
8599 BuildCheckHeapObject(string);
8601 Add<HCheckInstanceType>(string, HCheckInstanceType::IS_STRING);
8602 HInstruction* length = BuildLoadStringLength(string, checkstring);
8605 return New<HStringCharCodeAt>(string, checked_index);
8765 (left_type->Maybe(Type::String()) ||
8766 right_type->Maybe(Type::String()));
8788 // Special case for string addition here.
8790 (left_type->Is(Type::String()) || right_type->Is(Type::String()))) {
8792 if (left_type->Is(Type::String())) {
8797 if (right_type->Is(Type::String())) {
8803 ASSERT(right_type->Is(Type::String()));
8805 } else if (!left_type->Is(Type::String())) {
8806 ASSERT(right_type->Is(Type::String()));
8815 ASSERT(left_type->Is(Type::String()));
8817 } else if (!right_type->Is(Type::String())) {
8818 ASSERT(left_type->Is(Type::String()));
9097 Handle<String> check) {
9129 Handle<String> check;
9146 Handle<String> rhs = Handle<String>::cast(literal->value());
9183 Handle<String> name = proxy->name();
9268 } else if (combined_type->Is(Type::String())) {
9918 HValue* string = Pop();
9919 Add<HSeqStringSetChar>(String::ONE_BYTE_ENCODING, string,
9934 HValue* string = Pop();
9935 Add<HSeqStringSetChar>(String::TWO_BYTE_ENCODING, string,
9983 HValue* string = Pop();
9984 HInstruction* result = BuildStringCharCodeAt(string, index);
9989 // Fast support for string.charAt(n) and string[n].
9999 // Fast support for string.charAt(n) and string[n].
10005 HValue* string = Pop();
10006 HInstruction* char_code = BuildStringCharCodeAt(string, index);
10091 // Fast support for number to string.
10517 Handle<String> name = info->function()->debug_name();