Home | History | Annotate | Download | only in crankshaft

Lines Matching defs:string

1390         os << String::cast(source_name)->ToCString().get() << ":";
1398 String::SubStringRange source(String::cast(script->source()), start,
1523 HValue* HGraphBuilder::BuildCheckString(HValue* string) {
1524 if (!string->type().IsString()) {
1525 DCHECK(!string->IsConstant() ||
1526 !HConstant::cast(string)->HasStringValue());
1527 BuildCheckHeapObject(string);
1528 return Add<HCheckInstanceType>(string, HCheckInstanceType::IS_STRING);
1530 return string;
1722 // the continuation returns either a symbol or a unique string key. All other
1737 // Non-unique string, check for a string with a hash code that is actually
1748 // Non-smi, non-Name, non-String: Try to convert to smi in case of
1755 // String or Name: check explicitly for Name, they can short-circuit
1765 // String: check whether the String is a String of an index. If it is,
1770 String::kContainsCachedArrayIndexMask));
1781 // String with index in hash: extract string and merge to index path.
1782 Push(BuildDecodeField<String::ArrayIndexValueBits>(hash));
1786 // Key is a non-index String, check for uniqueness/internalization.
1807 // Key guaranteed to be a unique string
1857 // based on 32 bits of the map pointer and the string hash.
1865 string_hash, Add<HConstant>(String::kHashShift));
1962 // Update non-internalized string in the dictionary with internalized key?
1981 // Replace a key that is a non-internalized string by the equivalent
1982 // internalized string for faster further lookups.
2140 Handle<String> result = isolate()->factory()->NumberToString(number);
2148 // Load the number string cache.
2152 // Make the hash mask from the length of the number string cache. It
2153 // contains two elements (number and string) for each cache entry.
2253 // Count number to string operation in native code.
2411 // Compute the combined string length and check against max string length.
2414 HValue* max_length = Add<HConstant>(String::kMaxLength + 1);
2425 // Determine the string instance types.
2429 // Allocate the cons string object. HAllocate does not care whether we
2431 // CONS_STRING_TYPE here. Below we decide whether the cons string is
2436 HType::String(), CONS_STRING_TYPE,
2445 // We create a one-byte cons string if
2453 // string is one-byte.
2490 // Initialize the cons string fields.
2492 Add<HConstant>(String::kEmptyHashField));
2497 // Count the native string addition.
2506 String::Encoding src_encoding,
2509 String::Encoding dst_encoding,
2511 DCHECK(dst_encoding != String::ONE_BYTE_ENCODING ||
2512 src_encoding == String::ONE_BYTE_ENCODING);
2543 // Determine the string lengths.
2547 // Compute the combined string length.
2555 // The right string contains at least one character.
2562 // The left string contains at least one character.
2567 // Check if we should create a cons string.
2573 // Create a cons string.
2578 // Determine the string instance types.
2610 // Determine map and size depending on whether result is one-byte string.
2620 // Allocate sequential one-byte string object.
2626 // Allocate sequential two-byte string object.
2637 // string while observing object alignment.
2646 // Allocate the string object. HAllocate does not care whether we pass
2649 BuildAllocate(size, HType::String(), STRING_TYPE, allocation_mode);
2652 // Initialize the string fields.
2654 Add<HConstant>(String::kEmptyHashField));
2657 // Copy characters to the result string.
2662 // Copy characters from the left string.
2664 left, graph()->GetConstant0(), String::TWO_BYTE_ENCODING, result,
2665 graph()->GetConstant0(), String::TWO_BYTE_ENCODING, left_length);
2667 // Copy characters from the right string.
2669 right, graph()->GetConstant0(), String::TWO_BYTE_ENCODING, result,
2670 left_length, String::TWO_BYTE_ENCODING, right_length);
2674 // Copy characters from the left string.
2676 left, graph()->GetConstant0(), String::ONE_BYTE_ENCODING, result,
2677 graph()->GetConstant0(), String::ONE_BYTE_ENCODING, left_length);
2679 // Copy characters from the right string.
2681 right, graph()->GetConstant0(), String::ONE_BYTE_ENCODING, result,
2682 left_length, String::ONE_BYTE_ENCODING, right_length);
2686 // Count the native string addition.
2689 // Return the sequential string.
2694 // Fallback to the runtime to add the two strings. The string has to be
2721 // Determine string lengths.
2725 // Check if left string is empty.
2731 // Count the native string addition.
2734 string.
2739 // Check if right string is empty.
2745 // Count the native string addition.
2748 // Just return the left string.
5860 String::Flatten(Handle<String>::cast(constant_object));
6109 Handle<String> name = key->AsPropertyName();
6558 IsSpecialIndex(isolate()->unicode_cache(), String::cast(*name_));
6963 Handle<String> name = Handle<String>::cast(key->value());
7370 HInstruction* HGraphBuilder::AddLoadStringInstanceType(HValue* string) {
7371 if (string->IsConstant()) {
7372 HConstant* c_string = HConstant::cast(string);
7378 Add<HLoadNamedField>(string, nullptr, HObjectAccess::ForMap()), nullptr,
7383 HInstruction* HGraphBuilder::AddLoadStringLength(HValue* string) {
7384 return AddInstruction(BuildLoadStringLength(string));
7388 HInstruction* HGraphBuilder::BuildLoadStringLength(HValue* string) {
7389 if (string->IsConstant()) {
7390 HConstant* c_string = HConstant::cast(string);
7395 return New<HLoadNamedField>(string, nullptr,
7413 // It's possible that a keyed load of a constant string was converted
7432 // It's possible that a keyed store of a constant string was converted
7655 // Loads from strings or loads with a mix of string and non-string maps
7800 !Handle<String>::cast(constant)->AsArrayIndex(&array_index)) ||
7804 Handle<String>::cast(constant));
7936 Handle<String> name = expr->key()->AsLiteral()->AsPropertyName();
7937 if (!String::Equals(name, isolate()->factory()->length_string())) {
8032 HValue* string = Pop();
8033 HInstruction* char_code = BuildStringCharCodeAt(string, index);
8038 Handle<String> name = expr->key()->AsLiteral()->AsPropertyName();
8224 Handle<String> name) {
9014 HValue* string = Pop();
9017 BuildStringCharCodeAt(string, index);
9937 Handle<String> name = prop->key()->AsLiteral()->AsPropertyName();
11032 HValue* string,
11034 if (string->IsConstant() && index->IsConstant()) {
11035 HConstant* c_string = HConstant::cast(string);
11039 Handle<String> s = c_string->StringValue();
11046 string = BuildCheckString(string);
11047 index = Add<HBoundsCheck>(index, AddLoadStringLength(string));
11048 return New<HStringCharCodeAt>(string, index);
11206 // If we are adding constant string with something for which we don't have
11207 // a feedback yet, assume that it's also going to be a string and don't
11211 left_type = Type::String();
11216 right_type = Type::String();
11219 maybe_string_add = (left_type->Maybe(Type::String()) ||
11221 right_type->Maybe(Type::String()) ||
11251 // Special case for string addition here.
11253 (left_type->Is(Type::String()) || right_type->Is(Type::String()))) {
11255 if (left_type->Is(Type::String())) {
11260 if (right_type->Is(Type::String())) {
11266 DCHECK(right_type->Is(Type::String()));
11268 } else if (!left_type->Is(Type::String())) {
11269 DCHECK(right_type->Is(Type::String()));
11277 DCHECK(left_type->Is(Type::String()));
11279 } else if (!right_type->Is(Type::String())) {
11280 DCHECK(left_type->Is(Type::String()));
11287 Handle<String> left_string =
11290 : Handle<String>();
11291 Handle<String> right_string =
11294 : Handle<String>();
11310 // Inline the string addition into the stub when creating allocation
11312 // infer that we're going to create a cons string.
11326 // Fallback to using the string add stub.
11653 Handle<String> check) {
11689 Handle<String> check;
11706 Handle<String> rhs = Handle<String>::cast(literal->value());
11907 } else if (combined_type->Is(Type::String())) {
12679 HValue* string = Pop();
12680 HInstruction* result = BuildStringCharCodeAt(string, index);
12685 // Fast support for string.charAt(n) and string[n].
12706 result->set_type(HType::String());
12790 // Fast support for number to string.
13356 std::string name;
13360 String* str = String::cast(source_name);