5#ifndef V8_BUILTINS_BUILTINS_STRING_GEN_H_
6#define V8_BUILTINS_BUILTINS_STRING_GEN_H_
107 Label* if_not_equal);
112 Label* if_not_equal);
116 template <
typename SubjectChar,
typename PatternChar>
158 Label* cannot_deref);
165 Label* did_something);
168 Label* cannot_deref);
193 template <
typename T>
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)
TNode< String > SubString(TNode< String > string, TNode< UintPtrT > from, TNode< UintPtrT > to)
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)
StringBuiltinsAssembler(compiler::CodeAssemblerState *state)
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
TNode< Int32T > Signed(TNode< Word32T > x)
TNode< Smi > SmiConstant(Tagged< Smi > value)
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