v8
3.11.10(node0.8.26)
V8 is Google's open source JavaScript engine
|
#include <regexp-macro-assembler.h>
Public Types | |
enum | Mode { ASCII = 1, UC16 = 2 } |
enum | Result { RETRY = -2, EXCEPTION = -1, FAILURE = 0, SUCCESS = 1 } |
Public Types inherited from RegExpMacroAssembler | |
enum | IrregexpImplementation { kIA32Implementation, kARMImplementation, kMIPSImplementation, kX64Implementation, 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 () |
Public Member Functions inherited from RegExpMacroAssembler | |
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 | CheckCharacters (Vector< const uc16 > str, int cp_offset, Label *on_failure, bool check_eos)=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 [128] |
Static Public Attributes inherited from RegExpMacroAssembler | |
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 203 of file regexp-macro-assembler.h.
enum Mode |
Enumerator | |
---|---|
ASCII | |
UC16 |
Definition at line 206 of file regexp-macro-assembler.h.
enum Result |
Enumerator | |
---|---|
RETRY | |
EXCEPTION | |
FAILURE | |
SUCCESS |
Definition at line 217 of file regexp-macro-assembler.h.
|
explicit |
Definition at line 60 of file regexp-macro-assembler.cc.
|
virtual |
Definition at line 65 of file regexp-macro-assembler.cc.
|
virtual |
Reimplemented from RegExpMacroAssembler.
Definition at line 69 of file regexp-macro-assembler.cc.
References RegExpMacroAssembler::slow_safe().
|
static |
Definition at line 220 of file regexp-macro-assembler.cc.
References ASSERT, Mapping< T, size >::get(), Isolate::regexp_macro_assembler_canonicalize(), v8::internal::s1, and v8::internal::s2.
|
static |
Definition at line 161 of file regexp-macro-assembler.cc.
References ASSERT, CALL_GENERATED_REGEXP_CODE, Code::entry(), NativeRegExpMacroAssembler::EXCEPTION, Isolate::has_pending_exception(), NativeRegExpMacroAssembler::RETRY, RegExpStackScope::stack(), RegExpStack::stack_base(), and Isolate::StackOverflow().
Referenced by NativeRegExpMacroAssembler::Match().
Definition at line 255 of file regexp-macro-assembler.cc.
References ASSERT, RegExpStack::EnsureCapacity(), v8::internal::NULL, Isolate::regexp_stack(), RegExpStack::stack_base(), and RegExpStack::stack_capacity().
|
static |
Definition at line 107 of file regexp-macro-assembler.cc.
References ASSERT, ASSERT_EQ, ConsString::cast(), SlicedString::cast(), NativeRegExpMacroAssembler::Execute(), ConsString::first(), String::IsAsciiRepresentation(), String::length(), SlicedString::offset(), SlicedString::parent(), and NativeRegExpMacroAssembler::StringCharacterPosition().
Referenced by RegExpImpl::IrregexpExecRaw().
Definition at line 77 of file regexp-macro-assembler.cc.
References ASSERT, SeqAsciiString::cast(), SeqTwoByteString::cast(), ExternalAsciiString::cast(), ExternalTwoByteString::cast(), SeqAsciiString::GetChars(), SeqTwoByteString::GetChars(), ExternalAsciiString::GetChars(), ExternalTwoByteString::GetChars(), and String::IsAsciiRepresentation().
Referenced by NativeRegExpMacroAssembler::Match().
|
inlinestatic |
Definition at line 252 of file regexp-macro-assembler.h.
References NativeRegExpMacroAssembler::word_character_map.
|
static |
Definition at line 250 of file regexp-macro-assembler.h.
Referenced by NativeRegExpMacroAssembler::word_character_map_address().