![]() |
v8
3.11.10(node0.8.26)
V8 is Google's open source JavaScript engine
|
#include <jsregexp.h>
Public Types | |
enum | IrregexpResult { RE_FAILURE = 0, RE_SUCCESS = 1, RE_EXCEPTION = -1 } |
Static Public Member Functions | |
static bool | UsesNativeRegExp () |
static Handle< Object > | CreateRegExpLiteral (Handle< JSFunction > constructor, Handle< String > pattern, Handle< String > flags, bool *has_pending_exception) |
static Handle< String > | ToString (Handle< Object > value) |
static Handle< Object > | Compile (Handle< JSRegExp > re, Handle< String > pattern, Handle< String > flags) |
static Handle< Object > | Exec (Handle< JSRegExp > regexp, Handle< String > subject, int index, Handle< JSArray > lastMatchInfo, Zone *zone) |
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 Handle< Object > | AtomExec (Handle< JSRegExp > regexp, Handle< String > subject, int index, Handle< JSArray > lastMatchInfo) |
static int | IrregexpPrepare (Handle< JSRegExp > regexp, Handle< String > subject, Zone *zone) |
static int | GlobalOffsetsVectorSize (Handle< JSRegExp > regexp, int registers_per_match, int *max_matches) |
static int | IrregexpExecRaw (Handle< JSRegExp > regexp, Handle< String > subject, int index, Vector< int > registers, Zone *zone) |
static Handle< Object > | IrregexpExec (Handle< JSRegExp > regexp, Handle< String > subject, int index, Handle< JSArray > lastMatchInfo, Zone *zone) |
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 ByteArray * | IrregexpByteCode (FixedArray *re, bool is_ascii) |
static Code * | IrregexpNativeCode (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 |
Definition at line 45 of file jsregexp.h.
enum IrregexpResult |
Enumerator | |
---|---|
RE_FAILURE | |
RE_SUCCESS | |
RE_EXCEPTION |
Definition at line 101 of file jsregexp.h.
|
static |
Definition at line 256 of file jsregexp.cc.
References JSRegExp::ATOM.
Referenced by RegExpImpl::Compile().
|
static |
Definition at line 281 of file jsregexp.cc.
References ASSERT, FixedArray::cast(), String::cast(), Isolate::factory(), v8::internal::FlattenString(), String::GetFlatContent(), String::FlatContent::IsAscii(), String::FlatContent::IsFlat(), String::IsFlat(), JSRegExp::kAtomPatternIndex, String::length(), v8::internal::SearchString(), String::FlatContent::ToAsciiVector(), and String::FlatContent::ToUC16Vector().
Referenced by RegExpImpl::Exec().
|
static |
Definition at line 168 of file jsregexp.cc.
References ASSERT, RegExpImpl::AtomCompile(), RegExpCompileData::capture_count, FixedArray::cast(), Isolate::compilation_cache(), RegExpAtom::data(), v8::internal::DELETE_ON_EXIT, RegExpCompileData::error, Isolate::factory(), v8::internal::FlattenGetString(), RegExpImpl::IrregexpInitialize(), JSRegExp::Flags::is_ignore_case(), JSRegExp::Flags::is_multiline(), Handle< T >::is_null(), LOG, CompilationCache::LookupRegExp(), Factory::NewStringFromTwoByte(), Handle< T >::null(), RegExpParser::ParseRegExp(), CompilationCache::PutRegExp(), RegExpCompileData::simple, and RegExpCompileData::tree.
Referenced by v8::internal::RUNTIME_FUNCTION().
|
static |
Definition at line 66 of file jsregexp.cc.
References ARRAY_SIZE, and Execution::New().
Referenced by Execution::NewJSRegExp(), and v8::internal::RUNTIME_FUNCTION().
|
static |
Definition at line 231 of file jsregexp.cc.
References ASSERT, JSRegExp::ATOM, RegExpImpl::AtomExec(), JSRegExp::IRREGEXP, RegExpImpl::IrregexpExec(), Handle< T >::is_null(), Handle< T >::null(), and UNREACHABLE.
Referenced by v8::internal::RUNTIME_FUNCTION().
|
inlinestatic |
Definition at line 160 of file jsregexp.h.
References Smi::cast(), FixedArray::get(), and RegExpImpl::kFirstCapture.
Referenced by CompiledReplacement::Apply().
|
inlinestatic |
Definition at line 180 of file jsregexp.h.
References Smi::cast(), FixedArray::get(), and RegExpImpl::kLastCaptureCount.
|
static |
Definition at line 524 of file jsregexp.cc.
References OffsetsVector::kStaticOffsetsVectorSize, and v8::internal::Max().
|
static |
Definition at line 481 of file jsregexp.cc.
References ByteArray::cast(), JSRegExp::code_index(), and FixedArray::get().
Referenced by RegExpImpl::IrregexpExecRaw().
|
static |
Definition at line 617 of file jsregexp.cc.
References ASSERT, ASSERT_EQ, FixedArray::cast(), Isolate::factory(), Isolate::has_pending_exception(), JSRegExp::IRREGEXP, RegExpImpl::IrregexpExecRaw(), RegExpImpl::IrregexpNumberOfCaptures(), RegExpImpl::IrregexpPrepare(), RegExpImpl::kLastMatchOverhead, OffsetsVector::length(), Handle< T >::null(), v8::internal::PrintF(), RegExpImpl::RE_EXCEPTION, RegExpImpl::RE_FAILURE, RegExpImpl::RE_SUCCESS, RegExpImpl::SetCapture(), RegExpImpl::SetLastCaptureCount(), RegExpImpl::SetLastInput(), RegExpImpl::SetLastSubject(), String::ToCString(), and OffsetsVector::vector().
Referenced by RegExpImpl::Exec().
|
static |
Definition at line 540 of file jsregexp.cc.
References ASSERT, FixedArray::cast(), NativeRegExpMacroAssembler::EXCEPTION, NativeRegExpMacroAssembler::FAILURE, Isolate::has_pending_exception(), RegExpImpl::IrregexpByteCode(), RegExpImpl::IrregexpNativeCode(), RegExpImpl::IrregexpNumberOfCaptures(), RegExpImpl::IrregexpNumberOfRegisters(), RegExpImpl::IrregexpPrepare(), Vector< T >::length(), IrregexpInterpreter::Match(), NativeRegExpMacroAssembler::Match(), RegExpImpl::RE_EXCEPTION, RegExpImpl::RE_FAILURE, RegExpImpl::RE_SUCCESS, NativeRegExpMacroAssembler::RETRY, Isolate::StackOverflow(), Vector< T >::start(), v8::internal::STATIC_ASSERT(), NativeRegExpMacroAssembler::SUCCESS, and UNREACHABLE.
Referenced by RegExpImpl::IrregexpExec().
|
static |
Definition at line 491 of file jsregexp.cc.
References JSRegExp::IRREGEXP.
Referenced by RegExpImpl::Compile().
|
static |
Definition at line 460 of file jsregexp.cc.
References Smi::cast(), FixedArray::get(), and JSRegExp::kIrregexpMaxRegisterCountIndex.
|
static |
Definition at line 486 of file jsregexp.cc.
References Code::cast(), JSRegExp::code_index(), and FixedArray::get().
Referenced by RegExpImpl::IrregexpExecRaw().
|
static |
Definition at line 471 of file jsregexp.cc.
References Smi::cast(), FixedArray::get(), and JSRegExp::kIrregexpCaptureCountIndex.
Referenced by RegExpImpl::IrregexpExec(), RegExpImpl::IrregexpExecRaw(), and RegExpImpl::IrregexpPrepare().
|
static |
Definition at line 476 of file jsregexp.cc.
References Smi::cast(), FixedArray::get(), and JSRegExp::kIrregexpMaxRegisterCountIndex.
Referenced by RegExpImpl::IrregexpExecRaw(), and RegExpImpl::IrregexpPrepare().
Definition at line 504 of file jsregexp.cc.
References FixedArray::cast(), v8::internal::FlattenString(), RegExpImpl::IrregexpNumberOfCaptures(), and RegExpImpl::IrregexpNumberOfRegisters().
Referenced by RegExpImpl::IrregexpExec(), and RegExpImpl::IrregexpExecRaw().
|
inlinestatic |
Definition at line 176 of file jsregexp.h.
References Smi::FromInt(), RegExpImpl::kFirstCapture, and FixedArray::set().
Referenced by RegExpImpl::IrregexpExec().
|
static |
Definition at line 466 of file jsregexp.cc.
References Smi::FromInt(), JSRegExp::kIrregexpMaxRegisterCountIndex, and FixedArray::set().
|
inlinestatic |
Definition at line 164 of file jsregexp.h.
References Smi::FromInt(), RegExpImpl::kLastCaptureCount, and FixedArray::set().
Referenced by RegExpImpl::IrregexpExec().
|
inlinestatic |
Definition at line 172 of file jsregexp.h.
References RegExpImpl::kLastInput, and FixedArray::set().
Referenced by RegExpImpl::IrregexpExec().
|
inlinestatic |
Definition at line 168 of file jsregexp.h.
References RegExpImpl::kLastSubject, and FixedArray::set().
Referenced by RegExpImpl::IrregexpExec().
|
inlinestatic |
Definition at line 48 of file jsregexp.h.
|
static |
Definition at line 146 of file jsregexp.h.
Referenced by RegExpImpl::GetCapture(), v8::internal::RUNTIME_FUNCTION(), and RegExpImpl::SetCapture().
|
static |
Definition at line 156 of file jsregexp.h.
|
static |
Definition at line 143 of file jsregexp.h.
Referenced by RegExpImpl::GetLastCaptureCount(), and RegExpImpl::SetLastCaptureCount().
|
static |
Definition at line 150 of file jsregexp.h.
|
static |
Definition at line 145 of file jsregexp.h.
Referenced by RegExpImpl::SetLastInput().
|
static |
Definition at line 154 of file jsregexp.h.
|
static |
Definition at line 147 of file jsregexp.h.
Referenced by RegExpImpl::IrregexpExec().
|
static |
Definition at line 144 of file jsregexp.h.
Referenced by RegExpImpl::SetLastSubject().
|
static |
Definition at line 152 of file jsregexp.h.
|
static |
Definition at line 197 of file jsregexp.h.
Referenced by RegExpCompiler::Assemble().
|
static |
Definition at line 198 of file jsregexp.h.
Referenced by RegExpCompiler::Assemble().