29 Label if_sequential(
this), if_external(
this), if_join(
this);
33 &if_sequential, &if_external);
52 return var_data.value();
55template <
typename SubjectChar,
typename PatternChar>
69 function_addr, type_intptr, std::make_pair(type_ptr, isolate_ptr),
70 std::make_pair(type_ptr, subject_ptr),
71 std::make_pair(type_intptr, subject_length),
72 std::make_pair(type_ptr, search_ptr),
74 std::make_pair(type_intptr, start_position)));
83 subject_ptr, subject_length, search_ptr,
search_length, start_position);
90 subject_ptr, subject_length, search_ptr,
search_length, start_position);
97 subject_ptr, subject_length, search_ptr,
search_length, start_position);
104 subject_ptr, subject_length, search_ptr,
search_length, start_position);
137 start(
this, {&var_left, &var_right});
155 &if_equal, &if_notequal, &if_indirect);
159 Label restart(
this, {&var_left, &var_right});
162 rhs_instance_type, &restart);
196 int const kBothInternalizedMask =
208 int const kBothDirectStringMask =
216 Label if_skip_fast_case(
this), if_fast_case(
this), if_oneonebytestring(
this),
217 if_twotwobytestring(
this), if_onetwobytestring(
this),
218 if_twoonebytestring(
this);
221 int const kBothStringEncodingMask =
223 int const kBothExternalStringTag =
242 GotoIf(both_are_one_byte, &if_fast_case);
244 Branch(both_are_two_byte, &if_fast_case, &if_skip_fast_case);
247 byte_length.value(), if_equal, if_not_equal);
249 BIND(&if_skip_fast_case);
250 GotoIf(both_are_one_byte, &if_oneonebytestring);
251 GotoIf(both_are_two_byte, &if_twotwobytestring);
254 &if_onetwobytestring, &if_twoonebytestring);
256 BIND(&if_oneonebytestring);
261 BIND(&if_twotwobytestring);
266 BIND(&if_onetwobytestring);
271 BIND(&if_twoonebytestring);
292#ifdef ENABLE_SLOW_DCHECKS
299 Label loop(
this, &var_padding_offset), loop_end(
this);
303 GotoIf(
WordEqual(var_padding_offset.value(), rounded_up_len), &loop_end);
308 WordShl(var_padding_offset.value(),
312 WordShl(var_padding_offset.value(),
337 vars, lhs_data, lhs_end,
350 vars, lhs_data, lhs_end,
384 vars, lhs_data, lhs_end,
410 Label if_isword16(
this), if_isword32(
this), return_result(
this);
418 Goto(&return_result);
429 Goto(&return_result);
432 BIND(&return_result);
433 return var_result.value();
440 Comment(
"Allocating ConsString");
443 Label handle_right(
this);
454 Label allocate(
this);
467 Word32And(left_instance_type, right_instance_type);
470 [=,
this] {
return ConsOneByteStringMapConstant(); },
471 [=,
this] {
return ConsTwoByteStringMapConstant(); }));
516 Label non_cons(
this, {&var_left, &var_right});
527 Comment(
"Full string concatenate");
533 Word32Or(left_instance_type, right_instance_type);
535 Word32Xor(left_instance_type, right_instance_type);
544 Label two_byte(
this);
555 word_left_length, word_right_length,
568 word_left_length, word_right_length,
578 right_instance_type, &non_cons);
594 Label* cannot_deref) {
603 GotoIf(IsEmptyString(rhs), can_deref);
610 Label can_deref(
this), cannot_deref(
this);
619 static_assert(
static_cast<int>(offsetof(
ThinString, actual_)) ==
620 static_cast<int>(offsetof(
ConsString, first_)));
642 Label* did_something) {
643 Label did_nothing_left(
this), did_something_left(
this),
644 didnt_do_anything(
this);
648 BIND(&did_something_left);
654 BIND(&did_nothing_left);
660 BIND(&didnt_do_anything);
669 static_assert(
static_cast<int>(offsetof(
ThinString, actual_)) ==
670 static_cast<int>(offsetof(
ConsString, first_)));
675 auto left = Parameter<String>(Descriptor::kLeft);
676 auto right = Parameter<String>(Descriptor::kRight);
678 UncheckedParameter<ContextOrEmptyContext>(Descriptor::kContext);
680 Return(StringAdd(context, left, right));
684 auto string = Parameter<String>(Descriptor::kString);
685 auto from = Parameter<Smi>(Descriptor::kFrom);
686 auto to = Parameter<Smi>(Descriptor::kTo);
687 Return(SubString(
string, SmiUntag(from), SmiUntag(to)));
695 Label if_less(
this), if_equal(
this), if_greater(
this);
696 Label restart(
this, {&var_left, &var_right});
715 int const kBothSeqOneByteStringMask =
718 int const kBothSeqOneByteStringTag =
721 Label if_bothonebyteseqstrings(
this), if_notbothonebyteseqstrings(
this);
725 &if_bothonebyteseqstrings, &if_notbothonebyteseqstrings);
727 BIND(&if_bothonebyteseqstrings);
735 constexpr int kBeginOffset =
740 Label chunk_loop(
this, &var_offset), char_loop(
this, &var_offset);
797 Label if_charsdiffer(
this);
803 BIND(&if_charsdiffer);
804 Branch(Uint32LessThan(lhs_char, rhs_char), &if_less, &if_greater);
812 Branch(IntPtrLessThan(lhs_length, rhs_length), &if_less, &if_greater);
816 BIND(&if_notbothonebyteseqstrings);
820 rhs_instance_type, &restart);
898 auto left = Parameter<String>(Descriptor::kLeft);
899 auto right = Parameter<String>(Descriptor::kRight);
900 auto length = UncheckedParameter<IntPtrT>(Descriptor::kLength);
903 CSA_DCHECK(
this, TaggedNotEqual(left, right));
904 GenerateStringEqual(left, right, length);
908 auto left = Parameter<String>(Descriptor::kLeft);
909 auto right = Parameter<String>(Descriptor::kRight);
910 GenerateStringRelationalComparison(left, right, StringComparison::kLessThan);
914 auto left = Parameter<String>(Descriptor::kLeft);
915 auto right = Parameter<String>(Descriptor::kRight);
916 GenerateStringRelationalComparison(left, right,
917 StringComparison::kLessThanOrEqual);
921 auto left = Parameter<String>(Descriptor::kLeft);
922 auto right = Parameter<String>(Descriptor::kRight);
923 GenerateStringRelationalComparison(left, right,
924 StringComparison::kGreaterThan);
928 auto left = Parameter<String>(Descriptor::kLeft);
929 auto right = Parameter<String>(Descriptor::kRight);
930 GenerateStringRelationalComparison(left, right, StringComparison::kCompare);
934 auto left = Parameter<String>(Descriptor::kLeft);
935 auto right = Parameter<String>(Descriptor::kRight);
936 GenerateStringRelationalComparison(left, right,
937 StringComparison::kGreaterThanOrEqual);
940#ifndef V8_ENABLE_EXPERIMENTAL_TSA_BUILTINS
945 auto receiver = Parameter<String>(Descriptor::kReceiver);
946 auto position = UncheckedParameter<IntPtrT>(Descriptor::kPosition);
967 auto argc = UncheckedParameter<Int32T>(Descriptor::kJSActualArgumentsCount);
968 auto context = Parameter<Context>(Descriptor::kContext);
972 Unsigned(TruncateIntPtrToInt32(arguments.GetLengthWithoutReceiver()));
975 Label if_oneargument(
this), if_notoneargument(
this);
976 Branch(IntPtrEqual(arguments.GetLengthWithoutReceiver(), IntPtrConstant(1)),
977 &if_oneargument, &if_notoneargument);
979 BIND(&if_oneargument);
989 arguments.PopAndReturn(
result);
993 BIND(&if_notoneargument);
995 Label two_byte(
this);
997 TNode<String> one_byte_result = AllocateSeqOneByteString(unsigned_argc);
1015 var_max_index.value(), UINT8_ELEMENTS,
1019 var_max_index = IntPtrAdd(var_max_index.value(), IntPtrConstant(1));
1021 arguments.PopAndReturn(one_byte_result);
1028 TNode<String> two_byte_result = AllocateSeqTwoByteString(unsigned_argc);
1033 CopyStringCharacters(one_byte_result, two_byte_result, zero, zero,
1039 var_max_index.value(), UINT16_ELEMENTS,
1042 max_index_offset, code16);
1043 var_max_index = IntPtrAdd(var_max_index.value(), IntPtrConstant(1));
1056 var_max_index.value(), UINT16_ELEMENTS,
1060 var_max_index = IntPtrAdd(var_max_index.value(), IntPtrConstant(1));
1062 var_max_index.value());
1064 arguments.PopAndReturn(two_byte_result);
1075 Label out(
this), no_protector(
this), object_is_heapobject(
this);
1076 Label get_property_lookup(
this);
1087 Branch(IsHeapNumber(
CAST(
object)), &out, &object_is_heapobject);
1089 BIND(&no_protector);
1099 Label stub_call(
this), slow_lookup(
this);
1101 BIND(&object_is_heapobject);
1115 context, heap_object,
LoadMap(heap_object),
1117 additional_property_to_check, &stub_call, &slow_lookup);
1136 BIND(&get_property_lookup);
1138 GotoIf(IsUndefined(maybe_func), &out);
1142 generic_call(maybe_func);
1152 Builtin::kStringIndexOf, context,
string, dollar_string,
SmiConstant(0)));
1164 Label runtime(
this), out(
this);
1182 CallBuiltin(Builtin::kStringSubstring, context, subject_string,
1185 CallRuntime(Runtime::kGetSubstitution, context, matched, subject_string,
1186 match_start_index, replace_string, dollar_index));
1187 var_result = replacement_string;
1193 return var_result.value();
1200 auto receiver = Parameter<JSAny>(Descriptor::kReceiver);
1201 const auto search = Parameter<JSAny>(Descriptor::kSearch);
1202 const auto replace = Parameter<JSAny>(Descriptor::kReplace);
1203 auto context = Parameter<Context>(Descriptor::kContext);
1207 RequireObjectCoercible(context,
receiver,
"String.prototype.replace");
1213 MaybeCallFunctionAtSymbol(
1215 DescriptorIndexNameValue{
1217 RootIndex::kreplace_symbol, Context::REGEXP_REPLACE_FUNCTION_INDEX},
1219 Return(CallBuiltin(Builtin::kRegExpReplace, context, search,
receiver,
1233 const TNode<String> search_string = ToString_Inline(context, search);
1235 const TNode<IntPtrT> subject_length = LoadStringLengthAsWord(subject_string);
1243 GotoIfNot(WordEqual(
search_length, IntPtrConstant(1)), &next);
1244 GotoIfNot(IntPtrGreaterThan(subject_length, IntPtrConstant(0xFF)), &next);
1245 GotoIf(TaggedIsSmi(replace), &next);
1246 GotoIfNot(IsString(
CAST(replace)), &next);
1250 LoadInstanceType(subject_string);
1251 GotoIfNot(IsConsStringInstanceType(subject_instance_type), &next);
1253 GotoIf(TaggedIsPositiveSmi(IndexOfDollarChar(context, replace_string)),
1261 Return(
CallRuntime(Runtime::kStringReplaceOneCharWithString, context,
1262 subject_string, search_string, replace_string));
1272 CAST(CallBuiltin(Builtin::kStringIndexOf, context, subject_string,
1273 search_string, smi_zero));
1277 Label next(
this), return_subject(
this);
1279 GotoIfNot(SmiIsNegative(match_start_index), &next);
1285 GotoIf(TaggedIsSmi(replace), &return_subject);
1286 GotoIf(IsCallableMap(LoadMap(
CAST(replace))), &return_subject);
1290 ToString_Inline(context, replace);
1291 Goto(&return_subject);
1293 BIND(&return_subject);
1294 Return(subject_string);
1308 GotoIf(SmiEqual(match_start_index, smi_zero), &next);
1310 CAST(CallBuiltin(Builtin::kStringSubstring, context, subject_string,
1311 IntPtrConstant(0), SmiUntag(match_start_index)));
1312 var_result = prefix;
1320 Label if_iscallablereplace(
this), if_notcallablereplace(
this);
1321 GotoIf(TaggedIsSmi(replace), &if_notcallablereplace);
1322 Branch(IsCallableMap(LoadMap(
CAST(replace))), &if_iscallablereplace,
1323 &if_notcallablereplace);
1325 BIND(&if_iscallablereplace);
1328 Call(context, replace, UndefinedConstant(), search_string,
1329 match_start_index, subject_string);
1331 ToString_Inline(context, replacement);
1332 var_result =
CAST(CallBuiltin(Builtin::kStringAdd_CheckNone, context,
1333 var_result.value(), replacement_string));
1337 BIND(&if_notcallablereplace);
1339 const TNode<String> replace_string = ToString_Inline(context, replace);
1341 GetSubstitution(context, subject_string, match_start_index,
1342 match_end_index, replace_string);
1343 var_result =
CAST(CallBuiltin(Builtin::kStringAdd_CheckNone, context,
1344 var_result.value(), replacement));
1351 CallBuiltin(Builtin::kStringSubstring, context, subject_string,
1352 SmiUntag(match_end_index), subject_length);
1354 Builtin::kStringAdd_CheckNone, context, var_result.value(), suffix);
1361 char const* method_name =
"String.prototype.matchAll";
1363 auto context = Parameter<Context>(Descriptor::kContext);
1364 auto maybe_regexp = Parameter<JSAny>(Descriptor::kRegexp);
1365 auto receiver = Parameter<JSAny>(Descriptor::kReceiver);
1369 RequireObjectCoercible(context,
receiver, method_name);
1373 Label fast(
this), slow(
this, Label::kDeferred),
1374 throw_exception(
this, Label::kDeferred),
1375 throw_flags_exception(
this, Label::kDeferred), next(
this);
1384 GotoIf(TaggedIsSmi(maybe_regexp), &next);
1393 Branch(is_global, &next, &throw_exception);
1398 GotoIfNot(regexp_asm.IsRegExp(
native_context, heap_maybe_regexp), &next);
1400 TNode<Object> flags = GetProperty(context, heap_maybe_regexp,
1401 isolate()->factory()->flags_string());
1406 TNode<String> flags_string = ToString_Inline(context, flags);
1409 CAST(CallBuiltin(Builtin::kStringIndexOf, context, flags_string,
1410 global_char_string, SmiConstant(0)));
1411 Branch(SmiEqual(global_ix, SmiConstant(-1)), &throw_exception, &next);
1414 BIND(&throw_exception);
1415 ThrowTypeError(context, MessageTemplate::kRegExpGlobalInvokedOnNonGlobal,
1418 BIND(&throw_flags_exception);
1419 ThrowTypeError(context,
1420 MessageTemplate::kStringMatchAllNullOrUndefinedFlags);
1427 auto if_regexp_call = [&] {
1433 RegExpPrototypeMatchAllImpl(context,
native_context, maybe_regexp, s));
1438 MaybeCallFunctionAtSymbol(
1439 context, maybe_regexp,
receiver,
isolate()->factory()->match_all_symbol(),
1441 RootIndex::kmatch_all_symbol,
1442 Context::REGEXP_MATCH_ALL_FUNCTION_INDEX},
1443 if_regexp_call, if_generic_call);
1450 maybe_regexp, StringConstant(
"g"));
1454 GetProperty(context, rx,
isolate()->factory()->match_all_symbol());
1455 Return(
Call(context, match_all_func, rx, s));
1474 [=,
this] {
return SmiMin(
CAST(limit_number), subject_length); },
1475 [=] {
return subject_length; });
1507 CSA_DCHECK(
this, Word32BinaryNot(IsUndefined(entry)));
1517 BIND(&fill_thehole_and_call_runtime);
1520 length, RootIndex::kTheHoleValue);
1521 Goto(&call_runtime);
1525 BIND(&call_runtime);
1528 subject_string, limit_number));
1533 return result_array.value();
1538 const int kSeparatorArg = 0;
1539 const int kLimitArg = 1;
1542 UncheckedParameter<Int32T>(Descriptor::kJSActualArgumentsCount));
1548 auto context = Parameter<NativeContext>(Descriptor::kContext);
1552 RequireObjectCoercible(context,
receiver,
"String.prototype.split");
1556 MaybeCallFunctionAtSymbol(
1559 RootIndex::ksplit_symbol,
1560 Context::REGEXP_SPLIT_FUNCTION_INDEX},
1562 args.PopAndReturn(CallBuiltin<JSAny>(Builtin::kRegExpSplit, context,
1573 IsUndefined(limit), [=,
this] {
return NumberConstant(
kMaxUInt32); },
1574 [=,
this] {
return ToUint32(context, limit); });
1577 Label return_empty_array(
this);
1580 GotoIf(TaggedEqual(limit_number, smi_zero), &return_empty_array);
1586 GotoIfNot(IsUndefined(
separator), &next);
1597 StoreFixedArrayElement(fixed_array, 0, subject_string);
1607 GotoIfNot(SmiEqual(LoadStringLengthAsSmi(separator_string), smi_zero),
1610 TNode<Smi> subject_length = LoadStringLengthAsSmi(subject_string);
1611 GotoIf(SmiEqual(subject_length, smi_zero), &return_empty_array);
1614 StringToArray(context, subject_string, subject_length, limit_number));
1621 separator_string, limit_number);
1624 BIND(&return_empty_array);
1633 AllocateJSArray(
kind, array_map, capacity, length);
1635 args.PopAndReturn(result_array);
1640 auto string = Parameter<String>(Descriptor::kString);
1641 auto from = UncheckedParameter<IntPtrT>(Descriptor::kFrom);
1642 auto to = UncheckedParameter<IntPtrT>(Descriptor::kTo);
1644 Return(SubString(
string, from, to));
1654 Label handle_surrogate_pair(
this), return_result(
this);
1665 GotoIfNot(IntPtrLessThan(next_index, length), &return_result);
1669 &handle_surrogate_pair, &return_result);
1671 BIND(&handle_surrogate_pair);
1688#
if V8_TARGET_BIG_ENDIAN
1703 Int32Add(trail, surrogate_offset));
1707 Goto(&return_result);
1710 BIND(&return_result);
1711 return var_result.value();
1715 Label* if_indirect) {
1739 Label* if_indirect) {
1798template <
typename T>
1807 Comment(
"CopyStringCharacters ",
1808 from_one_byte ?
"ONE_BYTE_ENCODING" :
"TWO_BYTE_ENCODING",
" -> ",
1809 to_one_byte ?
"ONE_BYTE_ENCODING" :
"TWO_BYTE_ENCODING");
1811 ElementsKind from_kind = from_one_byte ? UINT8_ELEMENTS : UINT16_ELEMENTS;
1812 ElementsKind to_kind = to_one_byte ? UINT8_ELEMENTS : UINT16_ELEMENTS;
1834 int to_index_constant = 0, from_index_constant = 0;
1835 bool index_same = (from_encoding == to_encoding) &&
1836 (from_index == to_index ||
1839 from_index_constant == to_index_constant));
1841 vars, from_offset, limit_offset,
1847 if (
v8_flags.debug_code && !from_one_byte && to_one_byte) {
1853 index_same ?
offset : current_to_offset.value(),
1856 Increment(¤t_to_offset, to_increment);
1868template <
typename T>
1874 Label end(
this), one_byte_sequential(
this), two_byte_sequential(
this);
1877 Branch(from_is_one_byte, &one_byte_sequential, &two_byte_sequential);
1880 BIND(&one_byte_sequential);
1892 BIND(&two_byte_sequential);
1901 from_index, UINT16_ELEMENTS,
1910 if constexpr (std::is_same_v<T, RawPtrT>) {
1915 Label first_loop(
this, &var_cursor), second_loop(
this, &var_cursor);
1916 Label twobyte(
this);
1917 Branch(IntPtrLessThanOrEqual(start_offset, eight_char_loop_end),
1918 &first_loop, &second_loop);
1938 Increment(&var_cursor, 8 *
sizeof(uint16_t));
1939 Branch(IntPtrLessThanOrEqual(var_cursor.value(), eight_char_loop_end),
1940 &first_loop, &second_loop);
1948 var_bits =
Word32Or(var_bits.value(), c);
1951 one_char_loop,
sizeof(uint16_t),
1978 return var_result.value();
1994 Label original_string_or_invalid_length(
this);
1995 GotoIf(UintPtrGreaterThanOrEqual(substr_length, string_length),
1996 &original_string_or_invalid_length);
2002 Label single_char(
this);
2014 Label external_string(
this);
2020 GotoIf(IntPtrLessThan(substr_length,
2025 Label one_byte_slice(
this), two_byte_slice(
this);
2026 Branch(is_one_byte, &one_byte_slice, &two_byte_slice);
2028 BIND(&one_byte_slice);
2036 BIND(&two_byte_slice);
2057 BIND(&external_string);
2063 fake_sequential_string, is_one_byte,
offset, substr_length);
2070 var_result = EmptyStringConstant();
2082 BIND(&original_string_or_invalid_length);
2104 return var_result.value();
#define CSA_SLOW_DCHECK(csa,...)
#define CSA_DCHECK(csa,...)
#define CSA_CHECK(csa, x)
#define TF_BUILTIN(Name, AssemblerBase)
TNode< String > AllocateSlicedOneByteString(TNode< Uint32T > length, TNode< String > parent, TNode< Smi > offset)
TNode< JSArray > AllocateJSArray(ElementsKind kind, TNode< Map > array_map, TNode< IntPtrT > capacity, TNode< Smi > length, std::optional< TNode< AllocationSite > > allocation_site, AllocationFlags allocation_flags=AllocationFlag::kNone)
TNode< BoolT > IsNullOrUndefined(TNode< Object > object)
TNode< FixedArrayBase > AllocateFixedArray(ElementsKind kind, TNode< TIndex > capacity, AllocationFlags flags=AllocationFlag::kNone, std::optional< TNode< Map > > fixed_array_map=std::nullopt)
TNode< BoolT > IsNumberStringNotRegexpLikeProtectorCellInvalid()
TNode< Int32T > TruncateIntPtrToInt32(TNode< IntPtrT > value)
std::function< void(TNode< TIndex > index)> FastLoopBody
void StoreFixedArrayElement(TNode< FixedArray > object, int index, TNode< Object > value, WriteBarrierMode barrier_mode=UPDATE_WRITE_BARRIER, CheckBounds check_bounds=CheckBounds::kAlways)
TNode< HeapObject > AllocateInNewSpace(TNode< IntPtrT > size, AllocationFlags flags=AllocationFlag::kNone)
TNode< JSAny > GetProperty(TNode< Context > context, TNode< JSAny > receiver, Handle< Name > name)
TNode< String > StringFromSingleCharCode(TNode< Int32T > code)
TNode< Smi > SmiTag(TNode< IntPtrT > value)
void Increment(TVariable< TIndex > *variable, int value=1)
TNode< BoolT > TaggedEqual(TNode< AnyTaggedT > a, TNode< AnyTaggedT > b)
TNode< T > LoadObjectField(TNode< HeapObject > object, int offset)
TNode< BoolT > TaggedNotEqual(TNode< AnyTaggedT > a, TNode< AnyTaggedT > b)
TNode< IntPtrT > IntPtrMin(TNode< IntPtrT > left, TNode< IntPtrT > right)
TNode< BoolT > TaggedIsPositiveSmi(TNode< Object > a)
TNode< BoolT > IsZeroOrContext(TNode< Object > object)
TNode< Uint16T > StringCharCodeAt(TNode< String > string, TNode< UintPtrT > index)
TNode< BoolT > IsSetWord32(TNode< Word32T > word32)
TNode< IntPtrT > SmiUntag(TNode< Smi > value)
TNode< Map > LoadJSArrayElementsMap(ElementsKind kind, TNode< NativeContext > native_context)
void BuildFastLoop(const VariableList &vars, TVariable< TIndex > &var_index, TNode< TIndex > start_index, TNode< TIndex > end_index, const FastLoopBody< TIndex > &body, TNode< TIndex > increment, LoopUnrollingMode unrolling_mode, IndexAdvanceMode advance_mode, IndexAdvanceDirection advance_direction)
TNode< IntPtrT > SmiToIntPtr(TNode< Smi > value)
void StoreObjectFieldNoWriteBarrier(TNode< HeapObject > object, TNode< IntPtrT > offset, TNode< T > value)
TNode< Object > LoadFixedArrayElement(TNode< FixedArray > object, TNode< TIndex > index, int additional_offset=0, CheckBounds check_bounds=CheckBounds::kAlways)
TNode< IntPtrT > ElementOffsetFromIndex(TNode< TIndex > index, ElementsKind kind, int base_size=0)
TNode< IntPtrT > LoadStringLengthAsWord(TNode< String > string)
TNode< String > AllocateSeqTwoByteString(uint32_t length, AllocationFlags flags=AllocationFlag::kNone)
TNode< Uint16T > LoadInstanceType(TNode< HeapObject > object)
TNode< Smi > NoContextConstant()
TNode< String > AllocateSlicedTwoByteString(TNode< Uint32T > length, TNode< String > parent, TNode< Smi > offset)
TNode< T > Select(TNode< BoolT > condition, const NodeGenerator< T > &true_body, const NodeGenerator< T > &false_body, BranchHint branch_hint=BranchHint::kNone)
TNode< BoolT > TaggedIsSmi(TNode< MaybeObject > a)
TNode< BoolT > IsOneByteStringInstanceType(TNode< Int32T > instance_type)
TNode< Map > LoadMap(TNode< HeapObject > object)
TNode< BoolT > IsString(TNode< HeapObject > object)
TNode< Uint32T > LoadStringLengthAsWord32(TNode< String > string)
TNode< Smi > SmiMin(TNode< Smi > a, TNode< Smi > b)
Uint32LessThanOrEqual IntPtrGreaterThanOrEqual
TNode< RawPtrT > LoadExternalStringResourceDataPtr(TNode< ExternalString > object)
void FillFixedArrayWithValue(ElementsKind kind, TNode< FixedArrayBase > array, TNode< TIndex > from_index, TNode< TIndex > to_index, RootIndex value_root_index)
void StoreMapNoWriteBarrier(TNode< HeapObject > object, RootIndex map_root_index)
static const uint32_t kMinLength
static V8_EXPORT_PRIVATE ExternalReference isolate_address()
static ExternalReference search_string_raw()
static constexpr int kSymbolMatchAllFunctionDescriptorIndex
static constexpr int kSymbolReplaceFunctionDescriptorIndex
static constexpr int kSymbolSplitFunctionDescriptorIndex
static constexpr MachineType Pointer()
static constexpr MachineType Uint8()
constexpr MachineRepresentation representation() const
static constexpr MachineType Uint32()
static constexpr MachineType Uint16()
static constexpr MachineType UintPtr()
static constexpr MachineType IntPtr()
static constexpr int kEmptyHashField
static const int kProtectorValid
@ kCheckPrototypePropertyConstness
void BranchIfFastRegExpForMatch(TNode< Context > context, TNode< HeapObject > object, Label *if_isunmodified, Label *if_ismodified)
void BranchIfFastRegExp(TNode< Context > context, TNode< HeapObject > object, TNode< Map > map, PrototypeCheckAssembler::Flags prototype_check_flags, std::optional< DescriptorIndexNameValue > additional_property_to_check, Label *if_isunmodified, Label *if_ismodified)
TNode< BoolT > FastFlagGetter(TNode< JSRegExp > regexp, JSRegExp::Flag flag)
static const uint32_t kMinLength
void ReplaceUnpairedSurrogates(TNode< String > source, TNode< String > dest, Label *if_indirect)
void StringEqual_Core(TNode< String > lhs, TNode< Word32T > lhs_instance_type, TNode< String > rhs, TNode< Word32T > rhs_instance_type, TNode< IntPtrT > length, Label *if_equal, Label *if_not_equal, Label *if_indirect)
TNode< Smi > IndexOfDollarChar(const TNode< Context > context, const TNode< String > string)
void BranchIfCanDerefIndirectString(TNode< String > string, TNode< Int32T > instance_type, Label *can_deref, Label *cannot_deref)
void MaybeDerefIndirectString(TVariable< String > *var_string, TNode< Int32T > instance_type, Label *did_deref, Label *cannot_deref)
TNode< IntPtrT > SearchOneByteStringInOneByteString(const TNode< RawPtrT > subject_ptr, const TNode< IntPtrT > subject_length, const TNode< RawPtrT > search_ptr, const TNode< IntPtrT > search_length, const TNode< IntPtrT > start_position)
TNode< IntPtrT > SearchOneByteStringInTwoByteString(const TNode< RawPtrT > subject_ptr, const TNode< IntPtrT > subject_length, const TNode< RawPtrT > search_ptr, const TNode< IntPtrT > search_length, const TNode< IntPtrT > start_position)
TNode< String > AllocateConsString(TNode< Uint32T > length, TNode< String > left, TNode< String > right)
TNode< JSArray > StringToArray(TNode< NativeContext > context, TNode< String > subject_string, TNode< Smi > subject_length, TNode< Number > limit_number)
TNode< String > AllocAndCopyStringCharacters(TNode< T > from, TNode< BoolT > from_is_one_byte, TNode< IntPtrT > from_index, TNode< IntPtrT > character_count)
TNode< String > SubString(TNode< String > string, TNode< IntPtrT > from, TNode< IntPtrT > to)
void CopyStringCharacters(TNode< T > from_string, TNode< String > to_string, TNode< IntPtrT > from_index, TNode< IntPtrT > to_index, TNode< IntPtrT > character_count, String::Encoding from_encoding, String::Encoding to_encoding)
void BranchIfStringPrimitiveWithNoCustomIteration(TNode< Object > object, TNode< Context > context, Label *if_true, Label *if_false)
TNode< IntPtrT > SearchTwoByteStringInOneByteString(const TNode< RawPtrT > subject_ptr, const TNode< IntPtrT > subject_length, const TNode< RawPtrT > search_ptr, const TNode< IntPtrT > search_length, const TNode< IntPtrT > start_position)
TNode< String > StringAdd(TNode< ContextOrEmptyContext > context, TNode< String > left, TNode< String > right)
void GenerateStringRelationalComparison(TNode< String > left, TNode< String > right, StringComparison op)
TNode< RawPtrT > DirectStringData(TNode< String > string, TNode< Word32T > string_instance_type)
TNode< BoolT > HasUnpairedSurrogate(TNode< String > string, Label *if_indirect)
void DerefIndirectString(TVariable< String > *var_string, TNode< Int32T > instance_type)
TNode< IntPtrT > CallSearchStringRaw(const TNode< RawPtrT > subject_ptr, const TNode< IntPtrT > subject_length, const TNode< RawPtrT > search_ptr, const TNode< IntPtrT > search_length, const TNode< IntPtrT > start_position)
TNode< IntPtrT > SearchTwoByteStringInTwoByteString(const TNode< RawPtrT > subject_ptr, const TNode< IntPtrT > subject_length, const TNode< RawPtrT > search_ptr, const TNode< IntPtrT > search_length, const TNode< IntPtrT > start_position)
std::function< void()> NodeFunction0
TNode< Int32T > LoadSurrogatePairAt(TNode< String > string, TNode< IntPtrT > length, TNode< IntPtrT > index, UnicodeEncoding encoding)
TNode< String > GetSubstitution(TNode< Context > context, TNode< String > subject_string, TNode< Smi > match_start_index, TNode< Smi > match_end_index, TNode< String > replace_string)
TNode< IntPtrT > SearchOneByteInOneByteString(const TNode< RawPtrT > subject_ptr, const TNode< IntPtrT > subject_length, const TNode< RawPtrT > search_ptr, const TNode< IntPtrT > start_position)
TNode< String > StringFromSingleUTF16EncodedCodePoint(TNode< Int32T > codepoint)
void MaybeCallFunctionAtSymbol(const TNode< Context > context, const TNode< JSAny > object, const TNode< Object > maybe_string, Handle< Symbol > symbol, DescriptorIndexNameValue additional_property_to_check, const NodeFunction0 ®exp_call, const NodeFunction1 &generic_call)
void StringEqual_Loop(TNode< String > lhs, TNode< Word32T > lhs_instance_type, MachineType lhs_type, TNode< String > rhs, TNode< Word32T > rhs_instance_type, MachineType rhs_type, TNode< IntPtrT > length, Label *if_equal, Label *if_not_equal)
void StringEqual_FastLoop(TNode< String > lhs, TNode< Word32T > lhs_instance_type, TNode< String > rhs, TNode< Word32T > rhs_instance_type, TNode< IntPtrT > byte_length, Label *if_equal, Label *if_not_equal)
TNode< BoolT > SmiIsNegative(TNode< Smi > value)
void MaybeDerefIndirectStrings(TVariable< String > *var_left, TNode< Int32T > left_instance_type, TVariable< String > *var_right, TNode< Int32T > right_instance_type, Label *did_something)
void GenerateStringEqual(TNode< String > left, TNode< String > right, TNode< IntPtrT > length)
std::function< void(TNode< Object > fn)> NodeFunction1
static const uint32_t kMaxLength
static const int32_t kMaxOneByteCharCode
static const int kMaxUtf16CodeUnit
TNode< String > TryToDirect(Label *if_bailout)
TNode< IntPtrT > offset()
TNode< RawPtrT > PointerToData(Label *if_bailout)
TNode< Word32T > is_external()
TNode< BoolT > IsOneByte()
TNode< RawPtrT > PointerToString(Label *if_bailout)
CodeAssemblerState * state()
TNode< BoolT > Word32NotEqual(TNode< Word32T > left, TNode< Word32T > right)
TNode< IntPtrT > IntPtrAdd(TNode< IntPtrT > left, TNode< IntPtrT > right)
TNode< Int32T > Signed(TNode< Word32T > x)
void Comment(MessageWithSourceLocation message, Args &&... args)
TNode< RawPtrT > RawPtrSub(TNode< RawPtrT > left, TNode< IntPtrT > right)
TNode< IntPtrT > IntPtrConstant(intptr_t value)
TNode< UintPtrT > ChangeUint32ToWord(TNode< Word32T > value)
TNode< T > UncheckedCast(Node *value)
TNode< IntPtrT > WordShl(TNode< IntPtrT > left, TNode< IntegralT > right)
TNode< BoolT > WordEqual(TNode< WordT > left, TNode< WordT > right)
void GotoIfNot(TNode< IntegralT > condition, Label *false_label, GotoHint goto_hint=GotoHint::kNone)
void Return(TNode< Object > value)
Isolate * isolate() const
TNode< Uint32T > Unsigned(TNode< Word32T > x)
TNode< Int32T > Word32And(TNode< Int32T > left, TNode< Int32T > right)
TNode< T > ReinterpretCast(Node *value)
TNode< Int32T > Int32Add(TNode< Int32T > left, TNode< Int32T > right)
TNode< IntPtrT > BitcastTaggedToWord(TNode< Smi > node)
void TailCallRuntime(Runtime::FunctionId function, TNode< Object > context, TArgs... args)
TNode< BoolT > Word64NotEqual(TNode< Word64T > left, TNode< Word64T > right)
Factory * factory() const
TNode< Smi > SmiConstant(Tagged< Smi > value)
void GotoIf(TNode< IntegralT > condition, Label *true_label, GotoHint goto_hint=GotoHint::kNone)
Node * Load(MachineType type, Node *base)
TNode< IntPtrT > ChangeInt32ToIntPtr(TNode< Word32T > value)
TNode< Int32T > Word32Or(TNode< Int32T > left, TNode< Int32T > right)
TNode< Int32T > Word32Shl(TNode< Int32T > left, TNode< Int32T > right)
TNode< BoolT > IntPtrEqual(TNode< WordT > left, TNode< WordT > right)
TNode< IntPtrT > WordAnd(TNode< IntPtrT > left, TNode< IntPtrT > right)
bool TryToInt32Constant(TNode< IntegralT > node, int32_t *out_value)
TNode< IntPtrT > IntPtrSub(TNode< IntPtrT > left, TNode< IntPtrT > right)
TNode< ExternalReference > ExternalConstant(ExternalReference address)
TNode< Int32T > Int32Constant(int32_t value)
Node * CallCFunction(Node *function, std::optional< MachineType > return_type, CArgs... cargs)
TNode< Uint32T > Uint32Add(TNode< Uint32T > left, TNode< Uint32T > right)
TNode< Uint32T > Uint32Constant(uint32_t value)
TNode< Type > HeapConstantNoHole(Handle< Type > object)
TNode< BoolT > Word32Equal(TNode< Word32T > left, TNode< Word32T > right)
TNode< T > CallRuntime(Runtime::FunctionId function, TNode< Object > context, TArgs... args)
TNode< RawPtrT > RawPtrAdd(TNode< RawPtrT > left, TNode< IntPtrT > right)
TNode< T > CallBuiltin(Builtin id, TNode< Object > context, TArgs... args)
void Branch(TNode< IntegralT > condition, Label *true_label, Label *false_label, BranchHint branch_hint=BranchHint::kNone)
void StoreNoWriteBarrier(MachineRepresentation rep, Node *base, Node *value)
base::Vector< const DirectHandle< Object > > args
ZoneVector< RpoNumber > & result
LiftoffAssembler::CacheState state
constexpr unsigned CountPopulation(T value)
const uint32_t kStringEncodingMask
constexpr int kTaggedSize
constexpr intptr_t kObjectAlignment
const uint32_t kTwoByteStringTag
const uint32_t kUncachedExternalStringTag
const uint32_t kThinStringTagBit
const uint32_t kUncachedExternalStringMask
const uint32_t kOneByteStringTag
bool IsNullOrUndefined(Tagged< Object > obj, Isolate *isolate)
constexpr int ElementsKindToShiftSize(ElementsKind elements_kind)
const uint32_t kStringRepresentationMask
const uint32_t kIsIndirectStringTag
V8_EXPORT_PRIVATE FlagValues v8_flags
V8_EXPORT_PRIVATE constexpr int ElementSizeLog2Of(MachineRepresentation)
const uint32_t kInternalizedTag
const uint32_t kIsNotInternalizedMask
V8_EXPORT_PRIVATE constexpr int ElementSizeInBytes(MachineRepresentation)
constexpr uint32_t kMaxUInt32
kInstanceDescriptorsOffset kTransitionsOrPrototypeInfoOffset IsNull(value)||IsJSProxy(value)||IsWasmObject(value)||(IsJSObject(value) &&(HeapLayout
const uint32_t kIsIndirectStringMask
template const char * string
BUILTIN_FP_CALL BUILTIN_FP_CALL BUILTIN_FP_CALL BUILTIN_FP_CALL BUILTIN_FP_CALL BUILTIN_FP_CALL BUILTIN_FP_CALL BUILTIN_FP_CALL BUILTIN_FP_CALL BUILTIN_FP_CALL int size_t search_length
!IsContextMap !IsContextMap native_context
#define DCHECK(condition)
#define V8_EXPORT_PRIVATE
#define OFFSET_OF_DATA_START(Type)