#include "src/regexp/regexp-macro-assembler.h"
#include "src/codegen/assembler.h"
#include "src/codegen/label.h"
#include "src/execution/isolate-inl.h"
#include "src/execution/pointer-authentication.h"
#include "src/execution/simulator.h"
#include "src/regexp/regexp-stack.h"
#include "src/regexp/special-case.h"
#include "src/strings/unicode-inl.h"
#ifdef V8_INTL_SUPPORT
#include "unicode/uchar.h"
#include "unicode/unistr.h"
#endif
namespace v8 {
namespace internal {
RegExpMacroAssembler::RegExpMacroAssembler(Isolate* isolate, Zone* zone)
: … { … }
bool RegExpMacroAssembler::has_backtrack_limit() const { … }
int RegExpMacroAssembler::CaseInsensitiveCompareNonUnicode(Address byte_offset1,
Address byte_offset2,
size_t byte_length,
Isolate* isolate) { … }
int RegExpMacroAssembler::CaseInsensitiveCompareUnicode(Address byte_offset1,
Address byte_offset2,
size_t byte_length,
Isolate* isolate) { … }
namespace {
uint32_t Hash(const ZoneList<CharacterRange>* ranges) { … }
constexpr base::uc32 MaskEndOfRangeMarker(base::uc32 c) { … }
int RangeArrayLengthFor(const ZoneList<CharacterRange>* ranges) { … }
bool Equals(const ZoneList<CharacterRange>* lhs,
const DirectHandle<FixedUInt16Array>& rhs) { … }
Handle<FixedUInt16Array> MakeRangeArray(
Isolate* isolate, const ZoneList<CharacterRange>* ranges) { … }
}
Handle<ByteArray> NativeRegExpMacroAssembler::GetOrAddRangeArray(
const ZoneList<CharacterRange>* ranges) { … }
uint32_t RegExpMacroAssembler::IsCharacterInRangeArray(uint32_t current_char,
Address raw_byte_array) { … }
void RegExpMacroAssembler::CheckNotInSurrogatePair(int cp_offset,
Label* on_failure) { … }
void RegExpMacroAssembler::CheckPosition(int cp_offset,
Label* on_outside_input) { … }
void RegExpMacroAssembler::LoadCurrentCharacter(int cp_offset,
Label* on_end_of_input,
bool check_bounds,
int characters,
int eats_at_least) { … }
void NativeRegExpMacroAssembler::LoadCurrentCharacterImpl(
int cp_offset, Label* on_end_of_input, bool check_bounds, int characters,
int eats_at_least) { … }
bool NativeRegExpMacroAssembler::CanReadUnaligned() const { … }
#ifndef COMPILING_IRREGEXP_FOR_EXTERNAL_EMBEDDER
int NativeRegExpMacroAssembler::CheckStackGuardState(
Isolate* isolate, int start_index, RegExp::CallOrigin call_origin,
Address* return_address, Tagged<InstructionStream> re_code,
Address* subject, const uint8_t** input_start, const uint8_t** input_end,
uintptr_t gap) { … }
int NativeRegExpMacroAssembler::Match(DirectHandle<IrRegExpData> regexp_data,
DirectHandle<String> subject,
int* offsets_vector,
int offsets_vector_length,
int previous_index, Isolate* isolate) { … }
int NativeRegExpMacroAssembler::ExecuteForTesting(
Tagged<String> input, int start_offset, const uint8_t* input_start,
const uint8_t* input_end, int* output, int output_size, Isolate* isolate,
Tagged<JSRegExp> regexp) { … }
int NativeRegExpMacroAssembler::Execute(
Tagged<String>
input,
int start_offset, const uint8_t* input_start, const uint8_t* input_end,
int* output, int output_size, Isolate* isolate,
Tagged<IrRegExpData> regexp_data) { … }
#endif
const uint8_t NativeRegExpMacroAssembler::word_character_map[] = …;
Address NativeRegExpMacroAssembler::GrowStack(Isolate* isolate) { … }
}
}