#include "src/builtins/builtins-string-gen.h"
#include "src/base/strings.h"
#include "src/builtins/builtins-regexp-gen.h"
#include "src/builtins/builtins-utils-gen.h"
#include "src/builtins/builtins.h"
#include "src/codegen/code-stub-assembler-inl.h"
#include "src/execution/protectors.h"
#include "src/heap/factory-inl.h"
#include "src/heap/heap-inl.h"
#include "src/logging/counters.h"
#include "src/objects/instance-type.h"
#include "src/objects/objects.h"
#include "src/objects/property-cell.h"
namespace v8 {
namespace internal {
#include "src/codegen/define-code-stub-assembler-macros.inc"
TNode<RawPtrT> StringBuiltinsAssembler::DirectStringData(
TNode<String> string, TNode<Word32T> string_instance_type) { … }
template <typename SubjectChar, typename PatternChar>
TNode<IntPtrT> StringBuiltinsAssembler::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> StringBuiltinsAssembler::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<IntPtrT> StringBuiltinsAssembler::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> StringBuiltinsAssembler::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) { … }
TNode<IntPtrT> StringBuiltinsAssembler::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<IntPtrT> StringBuiltinsAssembler::SearchOneByteInOneByteString(
const TNode<RawPtrT> subject_ptr, const TNode<IntPtrT> subject_length,
const TNode<RawPtrT> search_ptr, const TNode<IntPtrT> start_position) { … }
void StringBuiltinsAssembler::GenerateStringEqual(TNode<String> left,
TNode<String> right,
TNode<IntPtrT> length) { … }
void StringBuiltinsAssembler::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) { … }
void StringBuiltinsAssembler::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) { … }
void StringBuiltinsAssembler::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) { … }
TNode<String> StringBuiltinsAssembler::StringFromSingleUTF16EncodedCodePoint(
TNode<Int32T> codepoint) { … }
TNode<String> StringBuiltinsAssembler::AllocateConsString(TNode<Uint32T> length,
TNode<String> left,
TNode<String> right) { … }
TNode<String> StringBuiltinsAssembler::StringAdd(
TNode<ContextOrEmptyContext> context, TNode<String> left,
TNode<String> right) { … }
void StringBuiltinsAssembler::BranchIfCanDerefIndirectString(
TNode<String> string, TNode<Int32T> instance_type, Label* can_deref,
Label* cannot_deref) { … }
void StringBuiltinsAssembler::DerefIndirectString(TVariable<String>* var_string,
TNode<Int32T> instance_type) { … }
void StringBuiltinsAssembler::MaybeDerefIndirectString(
TVariable<String>* var_string, TNode<Int32T> instance_type,
Label* did_deref, Label* cannot_deref) { … }
void StringBuiltinsAssembler::MaybeDerefIndirectStrings(
TVariable<String>* var_left, TNode<Int32T> left_instance_type,
TVariable<String>* var_right, TNode<Int32T> right_instance_type,
Label* did_something) { … }
TNode<String> StringBuiltinsAssembler::DerefIndirectString(
TNode<String> string, TNode<Int32T> instance_type, Label* cannot_deref) { … }
TF_BUILTIN(StringAdd_CheckNone, StringBuiltinsAssembler) { … }
TF_BUILTIN(SubString, StringBuiltinsAssembler) { … }
void StringBuiltinsAssembler::GenerateStringRelationalComparison(
TNode<String> left, TNode<String> right, StringComparison op) { … }
TF_BUILTIN(StringEqual, StringBuiltinsAssembler) { … }
TF_BUILTIN(StringLessThan, StringBuiltinsAssembler) { … }
TF_BUILTIN(StringLessThanOrEqual, StringBuiltinsAssembler) { … }
TF_BUILTIN(StringGreaterThan, StringBuiltinsAssembler) { … }
TF_BUILTIN(StringCompare, StringBuiltinsAssembler) { … }
TF_BUILTIN(StringGreaterThanOrEqual, StringBuiltinsAssembler) { … }
#ifndef V8_ENABLE_EXPERIMENTAL_TSA_BUILTINS
TF_BUILTIN(StringFromCodePointAt, StringBuiltinsAssembler) { … }
TF_BUILTIN(StringFromCharCode, StringBuiltinsAssembler) { … }
#endif
void StringBuiltinsAssembler::MaybeCallFunctionAtSymbol(
const TNode<Context> context, const TNode<Object> object,
const TNode<Object> maybe_string, Handle<Symbol> symbol,
DescriptorIndexNameValue additional_property_to_check,
const NodeFunction0& regexp_call, const NodeFunction1& generic_call) { … }
const TNode<Smi> StringBuiltinsAssembler::IndexOfDollarChar(
const TNode<Context> context, const TNode<String> string) { … }
TNode<String> StringBuiltinsAssembler::GetSubstitution(
TNode<Context> context, TNode<String> subject_string,
TNode<Smi> match_start_index, TNode<Smi> match_end_index,
TNode<String> replace_string) { … }
TF_BUILTIN(StringPrototypeReplace, StringBuiltinsAssembler) { … }
TF_BUILTIN(StringPrototypeMatchAll, StringBuiltinsAssembler) { … }
TNode<JSArray> StringBuiltinsAssembler::StringToArray(
TNode<NativeContext> context, TNode<String> subject_string,
TNode<Smi> subject_length, TNode<Number> limit_number) { … }
TF_BUILTIN(StringPrototypeSplit, StringBuiltinsAssembler) { … }
TF_BUILTIN(StringSubstring, StringBuiltinsAssembler) { … }
TNode<Int32T> StringBuiltinsAssembler::LoadSurrogatePairAt(
TNode<String> string, TNode<IntPtrT> length, TNode<IntPtrT> index,
UnicodeEncoding encoding) { … }
TNode<BoolT> StringBuiltinsAssembler::HasUnpairedSurrogate(TNode<String> string,
Label* if_indirect) { … }
void StringBuiltinsAssembler::ReplaceUnpairedSurrogates(TNode<String> source,
TNode<String> dest,
Label* if_indirect) { … }
void StringBuiltinsAssembler::BranchIfStringPrimitiveWithNoCustomIteration(
TNode<Object> object, TNode<Context> context, Label* if_true,
Label* if_false) { … }
template V8_EXPORT_PRIVATE void StringBuiltinsAssembler::CopyStringCharacters(
TNode<String> 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);
template V8_EXPORT_PRIVATE void StringBuiltinsAssembler::CopyStringCharacters(
TNode<RawPtrT> 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);
template <typename T>
void StringBuiltinsAssembler::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) { … }
template <typename T>
TNode<String> StringBuiltinsAssembler::AllocAndCopyStringCharacters(
TNode<T> from, TNode<BoolT> from_is_one_byte, TNode<IntPtrT> from_index,
TNode<IntPtrT> character_count) { … }
TNode<String> StringBuiltinsAssembler::SubString(TNode<String> string,
TNode<IntPtrT> from,
TNode<IntPtrT> to) { … }
#include "src/codegen/undef-code-stub-assembler-macros.inc"
}
}