28 #ifndef V8_REGEXP_MACRO_ASSEMBLER_H_
29 #define V8_REGEXP_MACRO_ASSEMBLER_H_
78 virtual void Bind(Label* label) = 0;
101 virtual void CheckGreedyLoop(Label* on_tos_equals_current_position) = 0;
105 Label* on_no_match) = 0;
113 Label* on_not_equal) = 0;
119 Label* on_not_equal) = 0;
122 Label* on_in_range) = 0;
125 Label* on_not_in_range) = 0;
141 Label* on_no_match) {
144 virtual void Fail() = 0;
146 virtual void GoTo(Label* label) = 0;
149 virtual void IfRegisterGE(
int reg,
int comparand, Label* if_ge) = 0;
152 virtual void IfRegisterLT(
int reg,
int comparand, Label* if_lt) = 0;
158 Label* on_end_of_input,
159 bool check_bounds =
true,
160 int characters = 1) = 0;
172 virtual void SetRegister(
int register_index,
int to) = 0;
189 return global_mode_ ==
GLOBAL;
195 bool slow_safe_compiler_;
201 #ifndef V8_INTERPRETED_REGEXP // Avoid compiling unused code.
226 int offsets_vector_length,
259 const byte* input_start,
260 const byte* input_end,
266 #endif // V8_INTERPRETED_REGEXP
270 #endif // V8_REGEXP_MACRO_ASSEMBLER_H_
virtual void WriteStackPointerToRegister(int reg)=0
virtual IrregexpImplementation Implementation()=0
virtual bool CanReadUnaligned()
virtual void GoTo(Label *label)=0
virtual ~NativeRegExpMacroAssembler()
virtual int stack_limit_slack()=0
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)
virtual void CheckNotBackReference(int start_reg, Label *on_no_match)=0
virtual void SetRegister(int register_index, int to)=0
virtual void ClearRegisters(int reg_from, int reg_to)=0
virtual ~RegExpMacroAssembler()
virtual void LoadCurrentCharacter(int cp_offset, Label *on_end_of_input, bool check_bounds=true, int characters=1)=0
RegExpMacroAssembler(Zone *zone)
virtual void ReadCurrentPositionFromRegister(int reg)=0
virtual void PopCurrentPosition()=0
virtual void AdvanceCurrentPosition(int by)=0
virtual bool CanReadUnaligned()
virtual void CheckCharacterGT(uc16 limit, Label *on_greater)=0
static const int kTableSizeBits
static const int kTableSize
void set_slow_safe(bool ssc)
static int CaseInsensitiveCompareUC16(Address byte_offset1, Address byte_offset2, size_t byte_length, Isolate *isolate)
virtual void PushRegister(int register_index, StackCheckFlag check_stack_limit)=0
virtual void ReadStackPointerFromRegister(int reg)=0
static const byte word_character_map[128]
virtual void CheckAtStart(Label *on_at_start)=0
virtual void CheckCharacterNotInRange(uc16 from, uc16 to, Label *on_not_in_range)=0
virtual void IfRegisterLT(int reg, int comparand, Label *if_lt)=0
virtual void CheckNotBackReferenceIgnoreCase(int start_reg, Label *on_no_match)=0
virtual void CheckNotCharacterAfterMinusAnd(uc16 c, uc16 minus, uc16 and_with, Label *on_not_equal)=0
virtual void CheckNotAtStart(Label *on_not_at_start)=0
virtual void CheckCharacter(unsigned c, Label *on_equal)=0
virtual void AdvanceRegister(int reg, int by)=0
static const int kMaxRegister
virtual void PopRegister(int register_index)=0
virtual void PushCurrentPosition()=0
static const int kTableMask
static const int kMinCPOffset
static const byte * StringCharacterPosition(String *subject, int start_index)
static Address word_character_map_address()
virtual bool CheckSpecialCharacterClass(uc16 type, Label *on_no_match)
virtual void WriteCurrentPositionToRegister(int reg, int cp_offset)=0
virtual void Bind(Label *label)=0
virtual void CheckCharacterLT(uc16 limit, Label *on_less)=0
static Result Match(Handle< Code > regexp, Handle< String > subject, int *offsets_vector, int offsets_vector_length, int previous_index, Isolate *isolate)
virtual void SetCurrentPositionFromEnd(int by)=0
virtual void Backtrack()=0
static Address GrowStack(Address stack_pointer, Address *stack_top, Isolate *isolate)
virtual void CheckCharacterAfterAnd(unsigned c, unsigned and_with, Label *on_equal)=0
virtual void IfRegisterEqPos(int reg, Label *if_eq)=0
virtual void CheckBitInTable(Handle< ByteArray > table, Label *on_bit_set)=0
void set_global_mode(GlobalMode mode)
bool global_with_zero_length_check()
virtual void CheckGreedyLoop(Label *on_tos_equals_current_position)=0
NativeRegExpMacroAssembler(Zone *zone)
virtual void CheckCharacters(Vector< const uc16 > str, int cp_offset, Label *on_failure, bool check_eos)=0
virtual void CheckNotCharacter(unsigned c, Label *on_not_equal)=0
virtual void CheckPosition(int cp_offset, Label *on_outside_input)
virtual void CheckNotCharacterAfterAnd(unsigned c, unsigned and_with, Label *on_not_equal)=0
virtual void CheckCharacterInRange(uc16 from, uc16 to, Label *on_in_range)=0
virtual Handle< HeapObject > GetCode(Handle< String > source)=0
virtual void IfRegisterGE(int reg, int comparand, Label *if_ge)=0
virtual void PushBacktrack(Label *label)=0
static const int kMaxCPOffset