V8 Project
|
#include <regexp-macro-assembler.h>
Public Types | |
enum | Mode { LATIN1 = 1 , UC16 = 2 } |
enum | Result { RETRY = -2 , EXCEPTION = -1 , FAILURE = 0 , SUCCESS = 1 } |
![]() | |
enum | IrregexpImplementation { kIA32Implementation , kARMImplementation , kARM64Implementation , kMIPSImplementation , kX64Implementation , kX87Implementation , kBytecodeImplementation } |
enum | StackCheckFlag { kNoStackLimitCheck = false , kCheckStackLimit = true } |
enum | GlobalMode { NOT_GLOBAL , GLOBAL , GLOBAL_NO_ZERO_LENGTH_CHECK } |
Public Member Functions | |
NativeRegExpMacroAssembler (Zone *zone) | |
virtual | ~NativeRegExpMacroAssembler () |
virtual bool | CanReadUnaligned () |
![]() | |
RegExpMacroAssembler (Zone *zone) | |
virtual | ~RegExpMacroAssembler () |
virtual int | stack_limit_slack ()=0 |
virtual void | AdvanceCurrentPosition (int by)=0 |
virtual void | AdvanceRegister (int reg, int by)=0 |
virtual void | Backtrack ()=0 |
virtual void | Bind (Label *label)=0 |
virtual void | CheckAtStart (Label *on_at_start)=0 |
virtual void | CheckCharacter (unsigned c, Label *on_equal)=0 |
virtual void | CheckCharacterAfterAnd (unsigned c, unsigned and_with, Label *on_equal)=0 |
virtual void | CheckCharacterGT (uc16 limit, Label *on_greater)=0 |
virtual void | CheckCharacterLT (uc16 limit, Label *on_less)=0 |
virtual void | CheckGreedyLoop (Label *on_tos_equals_current_position)=0 |
virtual void | CheckNotAtStart (Label *on_not_at_start)=0 |
virtual void | CheckNotBackReference (int start_reg, Label *on_no_match)=0 |
virtual void | CheckNotBackReferenceIgnoreCase (int start_reg, Label *on_no_match)=0 |
virtual void | CheckNotCharacter (unsigned c, Label *on_not_equal)=0 |
virtual void | CheckNotCharacterAfterAnd (unsigned c, unsigned and_with, Label *on_not_equal)=0 |
virtual void | CheckNotCharacterAfterMinusAnd (uc16 c, uc16 minus, uc16 and_with, Label *on_not_equal)=0 |
virtual void | CheckCharacterInRange (uc16 from, uc16 to, Label *on_in_range)=0 |
virtual void | CheckCharacterNotInRange (uc16 from, uc16 to, Label *on_not_in_range)=0 |
virtual void | CheckBitInTable (Handle< ByteArray > table, Label *on_bit_set)=0 |
virtual void | CheckPosition (int cp_offset, Label *on_outside_input) |
virtual bool | CheckSpecialCharacterClass (uc16 type, Label *on_no_match) |
virtual void | Fail ()=0 |
virtual Handle< HeapObject > | GetCode (Handle< String > source)=0 |
virtual void | GoTo (Label *label)=0 |
virtual void | IfRegisterGE (int reg, int comparand, Label *if_ge)=0 |
virtual void | IfRegisterLT (int reg, int comparand, Label *if_lt)=0 |
virtual void | IfRegisterEqPos (int reg, Label *if_eq)=0 |
virtual IrregexpImplementation | Implementation ()=0 |
virtual void | LoadCurrentCharacter (int cp_offset, Label *on_end_of_input, bool check_bounds=true, int characters=1)=0 |
virtual void | PopCurrentPosition ()=0 |
virtual void | PopRegister (int register_index)=0 |
virtual void | PushBacktrack (Label *label)=0 |
virtual void | PushCurrentPosition ()=0 |
virtual void | PushRegister (int register_index, StackCheckFlag check_stack_limit)=0 |
virtual void | ReadCurrentPositionFromRegister (int reg)=0 |
virtual void | ReadStackPointerFromRegister (int reg)=0 |
virtual void | SetCurrentPositionFromEnd (int by)=0 |
virtual void | SetRegister (int register_index, int to)=0 |
virtual bool | Succeed ()=0 |
virtual void | WriteCurrentPositionToRegister (int reg, int cp_offset)=0 |
virtual void | ClearRegisters (int reg_from, int reg_to)=0 |
virtual void | WriteStackPointerToRegister (int reg)=0 |
void | set_slow_safe (bool ssc) |
bool | slow_safe () |
void | set_global_mode (GlobalMode mode) |
bool | global () |
bool | global_with_zero_length_check () |
Zone * | zone () const |
Static Public Member Functions | |
static Result | Match (Handle< Code > regexp, Handle< String > subject, int *offsets_vector, int offsets_vector_length, int previous_index, Isolate *isolate) |
static int | CaseInsensitiveCompareUC16 (Address byte_offset1, Address byte_offset2, size_t byte_length, Isolate *isolate) |
static Address | GrowStack (Address stack_pointer, Address *stack_top, Isolate *isolate) |
static const byte * | StringCharacterPosition (String *subject, int start_index) |
static Address | word_character_map_address () |
static Result | Execute (Code *code, String *input, int start_offset, const byte *input_start, const byte *input_end, int *output, int output_size, Isolate *isolate) |
Static Public Attributes | |
static const byte | word_character_map [256] |
![]() | |
static const int | kMaxRegister = (1 << 16) - 1 |
static const int | kMaxCPOffset = (1 << 15) - 1 |
static const int | kMinCPOffset = -(1 << 15) |
static const int | kTableSizeBits = 7 |
static const int | kTableSize = 1 << kTableSizeBits |
static const int | kTableMask = kTableSize - 1 |
Definition at line 171 of file regexp-macro-assembler.h.
Enumerator | |
---|---|
RETRY | |
EXCEPTION | |
FAILURE | |
SUCCESS |
Definition at line 185 of file regexp-macro-assembler.h.
|
explicit |
Definition at line 29 of file regexp-macro-assembler.cc.
|
virtual |
Definition at line 34 of file regexp-macro-assembler.cc.
|
virtual |
Implements v8::internal::RegExpMacroAssembler.
Reimplemented in v8::internal::RegExpMacroAssemblerMIPS, v8::internal::RegExpMacroAssemblerMIPS, v8::internal::RegExpMacroAssemblerARM64, and v8::internal::RegExpMacroAssemblerARM.
Definition at line 38 of file regexp-macro-assembler.cc.
References v8::internal::RegExpMacroAssembler::slow_safe().
|
static |
Definition at line 204 of file regexp-macro-assembler.cc.
References DCHECK, unibrow::Mapping< T, size >::get(), v8::internal::Isolate::regexp_macro_assembler_canonicalize(), v8::internal::s1, and v8::internal::s2.
|
static |
Definition at line 126 of file regexp-macro-assembler.cc.
References CALL_GENERATED_REGEXP_CODE, DCHECK, v8::internal::Code::entry(), EXCEPTION, v8::internal::Isolate::has_pending_exception(), RETRY, v8::internal::RegExpStackScope::stack(), v8::internal::RegExpStack::stack_base(), and v8::internal::Isolate::StackOverflow().
Referenced by Match().
|
static |
Definition at line 238 of file regexp-macro-assembler.cc.
References DCHECK, v8::internal::RegExpStack::EnsureCapacity(), NULL, v8::internal::Isolate::regexp_stack(), size, v8::internal::RegExpStack::stack_base(), and v8::internal::RegExpStack::stack_capacity().
|
static |
Definition at line 72 of file regexp-macro-assembler.cc.
References DCHECK, DCHECK_EQ, Execute(), v8::internal::String::IsOneByteRepresentation(), v8::internal::String::length(), v8::internal::SlicedString::offset(), v8::internal::SlicedString::parent(), and StringCharacterPosition().
Referenced by v8::internal::RegExpImpl::IrregexpExecRaw().
|
static |
Definition at line 42 of file regexp-macro-assembler.cc.
References DCHECK, and v8::internal::String::IsOneByteRepresentation().
Referenced by Match().
|
inlinestatic |
Definition at line 220 of file regexp-macro-assembler.h.
References word_character_map.
|
static |
Definition at line 218 of file regexp-macro-assembler.h.
Referenced by word_character_map_address().