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

#include <jsregexp.h>

Data Structures

class  GlobalCache
 

Public Types

enum  IrregexpResult { RE_FAILURE = 0, RE_SUCCESS = 1, RE_EXCEPTION = -1 }
 

Static Public Member Functions

static bool UsesNativeRegExp ()
 
static Handle< ObjectCreateRegExpLiteral (Handle< JSFunction > constructor, Handle< String > pattern, Handle< String > flags, bool *has_pending_exception)
 
static Handle< StringToString (Handle< Object > value)
 
static Handle< ObjectCompile (Handle< JSRegExp > re, Handle< String > pattern, Handle< String > flags)
 
static Handle< ObjectExec (Handle< JSRegExp > regexp, Handle< String > subject, int index, Handle< JSArray > lastMatchInfo)
 
static void IrregexpInitialize (Handle< JSRegExp > re, Handle< String > pattern, JSRegExp::Flags flags, int capture_register_count)
 
static void AtomCompile (Handle< JSRegExp > re, Handle< String > pattern, JSRegExp::Flags flags, Handle< String > match_pattern)
 
static int AtomExecRaw (Handle< JSRegExp > regexp, Handle< String > subject, int index, int32_t *output, int output_size)
 
static Handle< ObjectAtomExec (Handle< JSRegExp > regexp, Handle< String > subject, int index, Handle< JSArray > lastMatchInfo)
 
static int IrregexpPrepare (Handle< JSRegExp > regexp, Handle< String > subject)
 
static int IrregexpExecRaw (Handle< JSRegExp > regexp, Handle< String > subject, int index, int32_t *output, int output_size)
 
static Handle< ObjectIrregexpExec (Handle< JSRegExp > regexp, Handle< String > subject, int index, Handle< JSArray > lastMatchInfo)
 
static Handle< JSArraySetLastMatchInfo (Handle< JSArray > last_match_info, Handle< String > subject, int capture_count, int32_t *match)
 
static int GetCapture (FixedArray *array, int index)
 
static void SetLastCaptureCount (FixedArray *array, int to)
 
static void SetLastSubject (FixedArray *array, String *to)
 
static void SetLastInput (FixedArray *array, String *to)
 
static void SetCapture (FixedArray *array, int index, int to)
 
static int GetLastCaptureCount (FixedArray *array)
 
static int IrregexpMaxRegisterCount (FixedArray *re)
 
static void SetIrregexpMaxRegisterCount (FixedArray *re, int value)
 
static int IrregexpNumberOfCaptures (FixedArray *re)
 
static int IrregexpNumberOfRegisters (FixedArray *re)
 
static ByteArrayIrregexpByteCode (FixedArray *re, bool is_ascii)
 
static CodeIrregexpNativeCode (FixedArray *re, bool is_ascii)
 

Static Public Attributes

static const int kLastCaptureCount = 0
 
static const int kLastSubject = 1
 
static const int kLastInput = 2
 
static const int kFirstCapture = 3
 
static const int kLastMatchOverhead = 3
 
static const int kLastCaptureCountOffset
 
static const int kLastSubjectOffset
 
static const int kLastInputOffset
 
static const int kFirstCaptureOffset
 
static const int kRegExpExecutableMemoryLimit = 16 * MB
 
static const int kRegWxpCompiledLimit = 1 * MB
 

Detailed Description

Definition at line 45 of file jsregexp.h.

Member Enumeration Documentation

Enumerator
RE_FAILURE 
RE_SUCCESS 
RE_EXCEPTION 

Definition at line 108 of file jsregexp.h.

Member Function Documentation

void AtomCompile ( Handle< JSRegExp re,
Handle< String pattern,
JSRegExp::Flags  flags,
Handle< String match_pattern 
)
static

Definition at line 258 of file jsregexp.cc.

References JSRegExp::ATOM.

Referenced by RegExpImpl::Compile().

Handle< Object > CreateRegExpLiteral ( Handle< JSFunction constructor,
Handle< String pattern,
Handle< String flags,
bool *  has_pending_exception 
)
static

Definition at line 69 of file jsregexp.cc.

References ARRAY_SIZE, and Execution::New().

Referenced by Execution::NewJSRegExp(), and v8::internal::RUNTIME_FUNCTION().

Handle< Object > Exec ( Handle< JSRegExp regexp,
Handle< String subject,
int  index,
Handle< JSArray lastMatchInfo 
)
static
static int GetCapture ( FixedArray array,
int  index 
)
inlinestatic

Definition at line 198 of file jsregexp.h.

References Smi::cast(), FixedArray::get(), and RegExpImpl::kFirstCapture.

static int GetLastCaptureCount ( FixedArray array)
inlinestatic

Definition at line 218 of file jsregexp.h.

References Smi::cast(), FixedArray::get(), and RegExpImpl::kLastCaptureCount.

ByteArray * IrregexpByteCode ( FixedArray re,
bool  is_ascii 
)
static

Definition at line 506 of file jsregexp.cc.

References ByteArray::cast(), JSRegExp::code_index(), and FixedArray::get().

Referenced by RegExpImpl::IrregexpExecRaw().

void IrregexpInitialize ( Handle< JSRegExp re,
Handle< String pattern,
JSRegExp::Flags  flags,
int  capture_register_count 
)
static

Definition at line 516 of file jsregexp.cc.

References JSRegExp::IRREGEXP.

Referenced by RegExpImpl::Compile().

int IrregexpMaxRegisterCount ( FixedArray re)
static
Code * IrregexpNativeCode ( FixedArray re,
bool  is_ascii 
)
static

Definition at line 511 of file jsregexp.cc.

References Code::cast(), JSRegExp::code_index(), and FixedArray::get().

Referenced by RegExpImpl::IrregexpExecRaw().

int IrregexpNumberOfCaptures ( FixedArray re)
static
int IrregexpNumberOfRegisters ( FixedArray re)
static
static void SetCapture ( FixedArray array,
int  index,
int  to 
)
inlinestatic

Definition at line 214 of file jsregexp.h.

References Smi::FromInt(), RegExpImpl::kFirstCapture, and FixedArray::set().

Referenced by RegExpImpl::SetLastMatchInfo().

void SetIrregexpMaxRegisterCount ( FixedArray re,
int  value 
)
static
static void SetLastCaptureCount ( FixedArray array,
int  to 
)
inlinestatic
static void SetLastInput ( FixedArray array,
String to 
)
inlinestatic

Definition at line 210 of file jsregexp.h.

References RegExpImpl::kLastInput, and FixedArray::set().

Referenced by RegExpImpl::SetLastMatchInfo().

static void SetLastSubject ( FixedArray array,
String to 
)
inlinestatic

Definition at line 206 of file jsregexp.h.

References RegExpImpl::kLastSubject, and FixedArray::set().

Referenced by RegExpImpl::SetLastMatchInfo().

static Handle<String> ToString ( Handle< Object value)
static
static bool UsesNativeRegExp ( )
inlinestatic

Definition at line 48 of file jsregexp.h.

Field Documentation

const int kFirstCapture = 3
static

Definition at line 184 of file jsregexp.h.

Referenced by RegExpImpl::GetCapture(), and RegExpImpl::SetCapture().

const int kFirstCaptureOffset
static
Initial value:

Definition at line 194 of file jsregexp.h.

const int kLastCaptureCount = 0
static

Definition at line 181 of file jsregexp.h.

Referenced by RegExpImpl::GetLastCaptureCount(), and RegExpImpl::SetLastCaptureCount().

const int kLastCaptureCountOffset
static
Initial value:

Definition at line 188 of file jsregexp.h.

const int kLastInput = 2
static

Definition at line 183 of file jsregexp.h.

Referenced by RegExpImpl::SetLastInput().

const int kLastInputOffset
static
Initial value:

Definition at line 192 of file jsregexp.h.

const int kLastMatchOverhead = 3
static

Definition at line 185 of file jsregexp.h.

Referenced by RegExpImpl::SetLastMatchInfo().

const int kLastSubject = 1
static

Definition at line 182 of file jsregexp.h.

Referenced by RegExpImpl::SetLastSubject().

const int kLastSubjectOffset
static
Initial value:

Definition at line 190 of file jsregexp.h.

const int kRegExpExecutableMemoryLimit = 16 * MB
static

Definition at line 235 of file jsregexp.h.

Referenced by RegExpCompiler::Assemble().

const int kRegWxpCompiledLimit = 1 * MB
static

Definition at line 236 of file jsregexp.h.

Referenced by RegExpCompiler::Assemble().


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