5#ifndef V8_REGEXP_REGEXP_MACRO_ASSEMBLER_H_
6#define V8_REGEXP_REGEXP_MACRO_ASSEMBLER_H_
79 Label* on_no_match) = 0;
81 bool read_backward,
bool unicode,
82 Label* on_no_match) = 0;
90 Label* on_not_equal) = 0;
95 Label* on_not_equal) = 0;
98 Label* on_in_range) = 0;
101 Label* on_not_in_range) = 0;
125 Label* on_no_match) {
145 int cp_offset,
Label* on_end_of_input,
bool check_bounds =
true,
148 bool check_bounds,
int characters,
149 int eats_at_least) = 0;
172#define IMPLEMENTATIONS_LIST(V) \
186#define V(Name) k##Name##Implementation,
192 static const char*
const kNames[] = {
193#define V(Name) #Name,
199#undef IMPLEMENTATIONS_LIST
309 int offsets_vector_length,
int previous_index,
313 Tagged<String> input,
int start_offset,
const uint8_t* input_start,
314 const uint8_t* input_end,
int* output,
int output_size,
Isolate* isolate,
320 bool check_bounds,
int characters,
321 int eats_at_least)
override;
325 int character_count) = 0;
340 Address* subject,
const uint8_t** input_start,
341 const uint8_t** input_end, uintptr_t gap);
358 const uint8_t* input_start,
const uint8_t* input_end,
359 int* output,
int output_size,
Isolate* isolate,
static Address GrowStack(Isolate *isolate)
~NativeRegExpMacroAssembler() override=default
Handle< ByteArray > GetOrAddRangeArray(const ZoneList< CharacterRange > *ranges)
ZoneUnorderedMap< uint32_t, IndirectHandle< FixedUInt16Array > > range_array_cache_
@ FALLBACK_TO_EXPERIMENTAL
static int Match(DirectHandle< IrRegExpData > regexp_data, DirectHandle< String > subject, int *offsets_vector, int offsets_vector_length, int previous_index, Isolate *isolate)
virtual void LoadCurrentCharacterUnchecked(int cp_offset, int character_count)=0
static const uint8_t word_character_map[256]
bool CanReadUnaligned() const override
static int 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)
void LoadCurrentCharacterImpl(int cp_offset, Label *on_end_of_input, bool check_bounds, int characters, int eats_at_least) override
static Address word_character_map_address()
NativeRegExpMacroAssembler(Isolate *isolate, Zone *zone)
static int 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)
static V8_EXPORT_PRIVATE int 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)
virtual void SkipUntilBitInTable(int cp_offset, Handle< ByteArray > table, Handle< ByteArray > nibble_table, int advance_by)=0
virtual bool CheckCharacterInRangeArray(const ZoneList< CharacterRange > *ranges, Label *on_in_range)=0
static constexpr int kTableSize
virtual void CheckNotAtStart(int cp_offset, Label *on_not_at_start)=0
bool has_backtrack_limit() const
virtual void CheckNotBackReferenceIgnoreCase(int start_reg, bool read_backward, bool unicode, Label *on_no_match)=0
void CheckNotInSurrogatePair(int cp_offset, Label *on_failure)
void set_backtrack_limit(uint32_t backtrack_limit)
virtual void CheckCharacterInRange(base::uc16 from, base::uc16 to, Label *on_in_range)=0
virtual void CheckBitInTable(Handle< ByteArray > table, Label *on_bit_set)=0
virtual void LoadCurrentCharacterImpl(int cp_offset, Label *on_end_of_input, bool check_bounds, int characters, int eats_at_least)=0
virtual void PushRegister(int register_index, StackCheckFlag check_stack_limit)=0
static int CaseInsensitiveCompareUnicode(Address byte_offset1, Address byte_offset2, size_t byte_length, Isolate *isolate)
static constexpr int kMaxCPOffset
virtual void Bind(Label *label)=0
virtual void PushBacktrack(Label *label)=0
virtual int stack_limit_slack_slot_count()=0
virtual void CheckNotBackReference(int start_reg, bool read_backward, Label *on_no_match)=0
bool can_fallback() const
virtual void AbortedCodeGeneration()
virtual void IfRegisterEqPos(int reg, Label *if_eq)=0
static uint32_t IsCharacterInRangeArray(uint32_t current_char, Address raw_byte_array)
virtual bool CheckSpecialClassRanges(StandardCharacterSet type, Label *on_no_match)
static constexpr int kUseCharactersValue
void set_global_mode(GlobalMode mode)
virtual void CheckCharacterLT(base::uc16 limit, Label *on_less)=0
virtual void SetRegister(int register_index, int to)=0
static constexpr int kTableSizeBits
static constexpr int kMinCPOffset
static constexpr int kMaxCaptures
void set_slow_safe(bool ssc)
virtual void Backtrack()=0
static constexpr int kTableMask
virtual void CheckCharacterAfterAnd(unsigned c, unsigned and_with, Label *on_equal)=0
virtual bool CanReadUnaligned() const =0
static int CaseInsensitiveCompareNonUnicode(Address byte_offset1, Address byte_offset2, size_t byte_length, Isolate *isolate)
virtual void SetCurrentPositionFromEnd(int by)=0
virtual void CheckCharacter(unsigned c, Label *on_equal)=0
virtual void ReadCurrentPositionFromRegister(int reg)=0
virtual DirectHandle< HeapObject > GetCode(DirectHandle< String > source, RegExpFlags flags)=0
@ GLOBAL_NO_ZERO_LENGTH_CHECK
virtual void IfRegisterLT(int reg, int comparand, Label *if_lt)=0
virtual IrregexpImplementation Implementation()=0
virtual void PushCurrentPosition()=0
void set_can_fallback(bool val)
virtual void ReadStackPointerFromRegister(int reg)=0
uint32_t backtrack_limit_
virtual void CheckNotCharacterAfterMinusAnd(base::uc16 c, base::uc16 minus, base::uc16 and_with, Label *on_not_equal)=0
RegExpMacroAssembler(Isolate *isolate, Zone *zone)
virtual void CheckPosition(int cp_offset, Label *on_outside_input)
virtual void CheckAtStart(int cp_offset, Label *on_at_start)=0
virtual void WriteStackPointerToRegister(int reg)=0
virtual void WriteCurrentPositionToRegister(int reg, int cp_offset)=0
virtual void CheckGreedyLoop(Label *on_tos_equals_current_position)=0
virtual void AdvanceCurrentPosition(int by)=0
V8_EXPORT_PRIVATE void LoadCurrentCharacter(int cp_offset, Label *on_end_of_input, bool check_bounds=true, int characters=1, int eats_at_least=kUseCharactersValue)
virtual void PopRegister(int register_index)=0
virtual void PopCurrentPosition()=0
virtual ~RegExpMacroAssembler()=default
static constexpr int kMaxRegister
virtual void BindJumpTarget(Label *label)
uint32_t backtrack_limit() const
Isolate * isolate() const
static constexpr int kMaxRegisterCount
virtual void CheckCharacterNotInRange(base::uc16 from, base::uc16 to, Label *on_not_in_range)=0
const char * ImplementationToString(IrregexpImplementation impl)
virtual void CheckNotCharacter(unsigned c, Label *on_not_equal)=0
virtual void GoTo(Label *label)=0
virtual bool CheckCharacterNotInRangeArray(const ZoneList< CharacterRange > *ranges, Label *on_not_in_range)=0
bool global_unicode() const
bool global_with_zero_length_check() const
virtual void AdvanceRegister(int reg, int by)=0
virtual void ClearRegisters(int reg_from, int reg_to)=0
virtual void CheckCharacterGT(base::uc16 limit, Label *on_greater)=0
virtual bool SkipUntilBitInTableUseSimd(int advance_by)
virtual void IfRegisterGE(int reg, int comparand, Label *if_ge)=0
virtual void CheckNotCharacterAfterAnd(unsigned c, unsigned and_with, Label *on_not_equal)=0
static constexpr int kInternalRegExpException
static constexpr int kInternalRegExpSmallestResult
static constexpr int kInternalRegExpSuccess
static constexpr int kInternalRegExpRetry
static constexpr int kInternalRegExpFallbackToExperimental
static constexpr int kInternalRegExpFailure
static const base::uc32 kNonBmpEnd
static const base::uc32 kNonBmpStart
static const base::uc32 kTrailSurrogateStart
too high values may cause the compiler to set high thresholds for inlining to as much as possible avoid inlined allocation of objects that cannot escape trace load stores from virtual maglev objects use TurboFan fast string builder analyze liveness of environment slots and zap dead values trace TurboFan load elimination emit data about basic block usage in builtins to this enable builtin reordering when run mksnapshot flag for emit warnings when applying builtin profile data verify register allocation in TurboFan randomly schedule instructions to stress dependency tracking enable store store elimination in TurboFan rewrite far to near simulate GC compiler thread race related to allow float parameters to be passed in simulator mode JS Wasm Run additional turbo_optimize_inlined_js_wasm_wrappers enable experimental feedback collection in generic lowering enable Turboshaft s WasmLoadElimination enable Turboshaft s low level load elimination for JS enable Turboshaft s escape analysis for string concatenation use enable Turbolev features that we want to ship in the not too far future trace individual Turboshaft reduction steps trace intermediate Turboshaft reduction steps invocation count threshold for early optimization Enables optimizations which favor memory size over execution speed Enables sampling allocation profiler with X as a sample interval min size of a semi the new space consists of two semi spaces max size of the Collect garbage after Collect garbage after keeps maps alive for< n > old space garbage collections print one detailed trace line in allocation gc speed threshold for starting incremental marking via a task in percent of available threshold for starting incremental marking immediately in percent of available Use a single schedule for determining a marking schedule between JS and C objects schedules the minor GC task with kUserVisible priority max worker number of concurrent for NumberOfWorkerThreads start background threads that allocate memory concurrent_array_buffer_sweeping use parallel threads to clear weak refs in the atomic pause trace progress of the incremental marking trace object counts and memory usage report a tick only when allocated zone memory changes by this amount TracingFlags::gc_stats TracingFlags::gc_stats track native contexts that are expected to be garbage collected verify heap pointers before and after GC memory reducer runs GC with ReduceMemoryFootprint flag Maximum number of memory reducer GCs scheduled Old gen GC speed is computed directly from gc tracer counters Perform compaction on full GCs based on V8 s default heuristics Perform compaction on every full GC Perform code space compaction when finalizing a full GC with stack Stress GC compaction to flush out bugs with moving objects flush of baseline code when it has not been executed recently Use time base code flushing instead of age Use a progress bar to scan large objects in increments when incremental marking is active force incremental marking for small heaps and run it more often force marking at random points between and force scavenge at random points between and reclaim otherwise unreachable unmodified wrapper objects when possible less compaction in non memory reducing mode use high priority threads for concurrent Marking Test mode only flag It allows an unit test to select evacuation candidates use incremental marking for CppHeap cppheap_concurrent_marking c value for membalancer A special constant to balance between memory and space tradeoff The smaller the more memory it uses enable use of SSE4 instructions if available enable use of AVX VNNI instructions if available enable use of POPCNT instruction if available force all emitted branches to be in long mode(MIPS/PPC only)") DEFINE_BOOL(partial_constant_pool
static const base::uc32 kTrailSurrogateEnd
static const base::uc32 kLeadSurrogateStart
static const base::uc32 kLeadSurrogateEnd
v8_inspector::String16 String
#define IMPLEMENTATIONS_LIST(V)
#define V8_EXPORT_PRIVATE