V8 Project
v8::internal::RegExpMacroAssembler Class Referenceabstract

#include <regexp-macro-assembler.h>

+ Inheritance diagram for v8::internal::RegExpMacroAssembler:
+ Collaboration diagram for v8::internal::RegExpMacroAssembler:

Public Types

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

 RegExpMacroAssembler (Zone *zone)
 
virtual ~RegExpMacroAssembler ()
 
virtual int stack_limit_slack ()=0
 
virtual bool CanReadUnaligned ()=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< 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 Attributes

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
 

Private Attributes

bool slow_safe_compiler_
 
bool global_mode_
 
Zonezone_
 

Detailed Description

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

Member Enumeration Documentation

◆ GlobalMode

◆ IrregexpImplementation

◆ StackCheckFlag

Enumerator
kNoStackLimitCheck 
kCheckStackLimit 

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

Constructor & Destructor Documentation

◆ RegExpMacroAssembler()

v8::internal::RegExpMacroAssembler::RegExpMacroAssembler ( Zone zone)
explicit

◆ ~RegExpMacroAssembler()

v8::internal::RegExpMacroAssembler::~RegExpMacroAssembler ( )
virtual

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

23  {
24 }

Member Function Documentation

◆ AdvanceCurrentPosition()

◆ AdvanceRegister()

virtual void v8::internal::RegExpMacroAssembler::AdvanceRegister ( int  reg,
int  by 
)
pure virtual

◆ Backtrack()

◆ Bind()

◆ CanReadUnaligned()

virtual bool v8::internal::RegExpMacroAssembler::CanReadUnaligned ( )
pure virtual

◆ CheckAtStart()

virtual void v8::internal::RegExpMacroAssembler::CheckAtStart ( Label *  on_at_start)
pure virtual

◆ CheckBitInTable()

virtual void v8::internal::RegExpMacroAssembler::CheckBitInTable ( Handle< ByteArray table,
Label *  on_bit_set 
)
pure virtual

◆ CheckCharacter()

virtual void v8::internal::RegExpMacroAssembler::CheckCharacter ( unsigned  c,
Label *  on_equal 
)
pure virtual

◆ CheckCharacterAfterAnd()

virtual void v8::internal::RegExpMacroAssembler::CheckCharacterAfterAnd ( unsigned  c,
unsigned  and_with,
Label *  on_equal 
)
pure virtual

◆ CheckCharacterGT()

virtual void v8::internal::RegExpMacroAssembler::CheckCharacterGT ( uc16  limit,
Label *  on_greater 
)
pure virtual

◆ CheckCharacterInRange()

virtual void v8::internal::RegExpMacroAssembler::CheckCharacterInRange ( uc16  from,
uc16  to,
Label *  on_in_range 
)
pure virtual

◆ CheckCharacterLT()

virtual void v8::internal::RegExpMacroAssembler::CheckCharacterLT ( uc16  limit,
Label *  on_less 
)
pure virtual

◆ CheckCharacterNotInRange()

virtual void v8::internal::RegExpMacroAssembler::CheckCharacterNotInRange ( uc16  from,
uc16  to,
Label *  on_not_in_range 
)
pure virtual

◆ CheckGreedyLoop()

virtual void v8::internal::RegExpMacroAssembler::CheckGreedyLoop ( Label *  on_tos_equals_current_position)
pure virtual

◆ CheckNotAtStart()

virtual void v8::internal::RegExpMacroAssembler::CheckNotAtStart ( Label *  on_not_at_start)
pure virtual

◆ CheckNotBackReference()

virtual void v8::internal::RegExpMacroAssembler::CheckNotBackReference ( int  start_reg,
Label *  on_no_match 
)
pure virtual

◆ CheckNotBackReferenceIgnoreCase()

virtual void v8::internal::RegExpMacroAssembler::CheckNotBackReferenceIgnoreCase ( int  start_reg,
Label *  on_no_match 
)
pure virtual

◆ CheckNotCharacter()

virtual void v8::internal::RegExpMacroAssembler::CheckNotCharacter ( unsigned  c,
Label *  on_not_equal 
)
pure virtual

◆ CheckNotCharacterAfterAnd()

virtual void v8::internal::RegExpMacroAssembler::CheckNotCharacterAfterAnd ( unsigned  c,
unsigned  and_with,
Label *  on_not_equal 
)
pure virtual

Implemented in v8::internal::RegExpMacroAssemblerARM64, v8::internal::RegExpMacroAssemblerARM, and v8::internal::RegExpMacroAssemblerTracer.

Referenced by v8::internal::RegExpMacroAssemblerTracer::CheckNotCharacterAfterAnd(), v8::internal::RegExpNode::EmitQuickCheck(), and v8::internal::ShortCutEmitCharacterPair().

+ Here is the caller graph for this function:

◆ CheckNotCharacterAfterMinusAnd()

virtual void v8::internal::RegExpMacroAssembler::CheckNotCharacterAfterMinusAnd ( uc16  c,
uc16  minus,
uc16  and_with,
Label *  on_not_equal 
)
pure virtual

◆ CheckPosition()

virtual void v8::internal::RegExpMacroAssembler::CheckPosition ( int  cp_offset,
Label *  on_outside_input 
)
inlinevirtual

Reimplemented in v8::internal::RegExpMacroAssemblerX87, v8::internal::RegExpMacroAssemblerX64, v8::internal::RegExpMacroAssemblerMIPS, v8::internal::RegExpMacroAssemblerMIPS, v8::internal::RegExpMacroAssemblerIA32, v8::internal::RegExpMacroAssemblerARM64, and v8::internal::RegExpMacroAssemblerARM.

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

101  {
102  LoadCurrentCharacter(cp_offset, on_outside_input, true);
103  }
virtual void LoadCurrentCharacter(int cp_offset, Label *on_end_of_input, bool check_bounds=true, int characters=1)=0

References LoadCurrentCharacter().

Referenced by v8::internal::AssertionNode::Emit(), and v8::internal::EmitCharClass().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CheckSpecialCharacterClass()

virtual bool v8::internal::RegExpMacroAssembler::CheckSpecialCharacterClass ( uc16  type,
Label *  on_no_match 
)
inlinevirtual

◆ ClearRegisters()

◆ Fail()

virtual void v8::internal::RegExpMacroAssembler::Fail ( )
pure virtual

◆ GetCode()

virtual Handle<HeapObject> v8::internal::RegExpMacroAssembler::GetCode ( Handle< String source)
pure virtual

◆ global()

bool v8::internal::RegExpMacroAssembler::global ( )
inline

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

155 { return global_mode_ != NOT_GLOBAL; }

References global_mode_, and NOT_GLOBAL.

◆ global_with_zero_length_check()

bool v8::internal::RegExpMacroAssembler::global_with_zero_length_check ( )
inline

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

156  {
157  return global_mode_ == GLOBAL;
158  }

References GLOBAL, and global_mode_.

◆ GoTo()

◆ IfRegisterEqPos()

virtual void v8::internal::RegExpMacroAssembler::IfRegisterEqPos ( int  reg,
Label *  if_eq 
)
pure virtual

◆ IfRegisterGE()

virtual void v8::internal::RegExpMacroAssembler::IfRegisterGE ( int  reg,
int  comparand,
Label *  if_ge 
)
pure virtual

◆ IfRegisterLT()

virtual void v8::internal::RegExpMacroAssembler::IfRegisterLT ( int  reg,
int  comparand,
Label *  if_lt 
)
pure virtual

◆ Implementation()

◆ LoadCurrentCharacter()

◆ PopCurrentPosition()

virtual void v8::internal::RegExpMacroAssembler::PopCurrentPosition ( )
pure virtual

◆ PopRegister()

virtual void v8::internal::RegExpMacroAssembler::PopRegister ( int  register_index)
pure virtual

◆ PushBacktrack()

virtual void v8::internal::RegExpMacroAssembler::PushBacktrack ( Label *  label)
pure virtual

◆ PushCurrentPosition()

◆ PushRegister()

virtual void v8::internal::RegExpMacroAssembler::PushRegister ( int  register_index,
StackCheckFlag  check_stack_limit 
)
pure virtual

◆ ReadCurrentPositionFromRegister()

virtual void v8::internal::RegExpMacroAssembler::ReadCurrentPositionFromRegister ( int  reg)
pure virtual

◆ ReadStackPointerFromRegister()

virtual void v8::internal::RegExpMacroAssembler::ReadStackPointerFromRegister ( int  reg)
pure virtual

◆ set_global_mode()

void v8::internal::RegExpMacroAssembler::set_global_mode ( GlobalMode  mode)
inline

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

154 { global_mode_ = mode; }
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long mode(MIPS only)") DEFINE_BOOL(enable_always_align_csp

References global_mode_, and mode().

Referenced by v8::internal::RegExpEngine::Compile().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ set_slow_safe()

void v8::internal::RegExpMacroAssembler::set_slow_safe ( bool  ssc)
inline

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

148 { slow_safe_compiler_ = ssc; }

References slow_safe_compiler_.

Referenced by v8::internal::RegExpCompiler::Assemble().

+ Here is the caller graph for this function:

◆ SetCurrentPositionFromEnd()

virtual void v8::internal::RegExpMacroAssembler::SetCurrentPositionFromEnd ( int  by)
pure virtual

◆ SetRegister()

virtual void v8::internal::RegExpMacroAssembler::SetRegister ( int  register_index,
int  to 
)
pure virtual

◆ slow_safe()

bool v8::internal::RegExpMacroAssembler::slow_safe ( )
inline

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

149 { return slow_safe_compiler_; }

References slow_safe_compiler_.

Referenced by v8::internal::NativeRegExpMacroAssembler::CanReadUnaligned().

+ Here is the caller graph for this function:

◆ stack_limit_slack()

virtual int v8::internal::RegExpMacroAssembler::stack_limit_slack ( )
pure virtual

◆ Succeed()

virtual bool v8::internal::RegExpMacroAssembler::Succeed ( )
pure virtual

◆ WriteCurrentPositionToRegister()

virtual void v8::internal::RegExpMacroAssembler::WriteCurrentPositionToRegister ( int  reg,
int  cp_offset 
)
pure virtual

◆ WriteStackPointerToRegister()

virtual void v8::internal::RegExpMacroAssembler::WriteStackPointerToRegister ( int  reg)
pure virtual

◆ zone()

Zone* v8::internal::RegExpMacroAssembler::zone ( ) const
inline

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

160 { return zone_; }

References zone_.

Referenced by v8::internal::BoyerMooreLookahead::EmitSkipInstructions(), v8::internal::EmitUseLookupTable(), v8::internal::TextNode::GetQuickCheckDetails(), v8::internal::RegExpMacroAssemblerX64::MarkPositionForCodeRelativeFixup(), and v8::internal::TextNode::TextEmitPass().

+ Here is the caller graph for this function:

Member Data Documentation

◆ global_mode_

bool v8::internal::RegExpMacroAssembler::global_mode_
private

◆ kMaxCPOffset

const int v8::internal::RegExpMacroAssembler::kMaxCPOffset = (1 << 15) - 1
static

◆ kMaxRegister

const int v8::internal::RegExpMacroAssembler::kMaxRegister = (1 << 16) - 1
static

◆ kMinCPOffset

const int v8::internal::RegExpMacroAssembler::kMinCPOffset = -(1 << 15)
static

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

◆ kTableMask

◆ kTableSize

◆ kTableSizeBits

const int v8::internal::RegExpMacroAssembler::kTableSizeBits = 7
static

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

Referenced by v8::internal::GenerateBranches().

◆ slow_safe_compiler_

bool v8::internal::RegExpMacroAssembler::slow_safe_compiler_
private

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

Referenced by set_slow_safe(), and slow_safe().

◆ zone_

Zone* v8::internal::RegExpMacroAssembler::zone_
private

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

Referenced by zone().


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