v8  3.14.5(node0.10.28)
V8 is Google's open source JavaScript engine
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
NativeRegExpMacroAssembler Class Reference

#include <regexp-macro-assembler.h>

Inheritance diagram for NativeRegExpMacroAssembler:
Collaboration diagram for NativeRegExpMacroAssembler:

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< HeapObjectGetCode (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 ()
 
Zonezone () 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 byteStringCharacterPosition (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
 

Detailed Description

Definition at line 203 of file regexp-macro-assembler.h.

Member Enumeration Documentation

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.

Constructor & Destructor Documentation

NativeRegExpMacroAssembler ( Zone zone)
explicit

Definition at line 60 of file regexp-macro-assembler.cc.

Definition at line 65 of file regexp-macro-assembler.cc.

Member Function Documentation

bool CanReadUnaligned ( )
virtual

Reimplemented from RegExpMacroAssembler.

Reimplemented in RegExpMacroAssemblerMIPS, and RegExpMacroAssemblerARM.

Definition at line 69 of file regexp-macro-assembler.cc.

References RegExpMacroAssembler::slow_safe().

int CaseInsensitiveCompareUC16 ( Address  byte_offset1,
Address  byte_offset2,
size_t  byte_length,
Isolate isolate 
)
static
NativeRegExpMacroAssembler::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
Address GrowStack ( Address  stack_pointer,
Address stack_top,
Isolate isolate 
)
static
static Address word_character_map_address ( )
inlinestatic

Field Documentation

const byte word_character_map
static
Initial value:
= {
0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u,
0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u,
0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u,
0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u,
0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u,
0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u,
0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu,
0xffu, 0xffu, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u,
0x00u, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu,
0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu,
0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu,
0xffu, 0xffu, 0xffu, 0x00u, 0x00u, 0x00u, 0x00u, 0xffu,
0x00u, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu,
0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu,
0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu,
0xffu, 0xffu, 0xffu, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u,
}

Definition at line 250 of file regexp-macro-assembler.h.

Referenced by NativeRegExpMacroAssembler::word_character_map_address().


The documentation for this class was generated from the following files: