V8 Project
|
#include <jsregexp.h>
Classes | |
class | GlobalCache |
Public Types | |
enum | IrregexpResult { RE_FAILURE = 0 , RE_SUCCESS = 1 , RE_EXCEPTION = -1 } |
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 |
Static Private Member Functions | |
static bool | CompileIrregexp (Handle< JSRegExp > re, Handle< String > sample_subject, bool is_one_byte) |
static bool | EnsureCompiledIrregexp (Handle< JSRegExp > re, Handle< String > sample_subject, bool is_one_byte) |
Definition at line 22 of file jsregexp.h.
|
static |
Definition at line 245 of file jsregexp.cc.
References v8::internal::JSRegExp::ATOM, and v8::internal::anonymous_namespace{flags.cc}::flags.
Referenced by Compile().
|
static |
Definition at line 322 of file jsregexp.cc.
References AtomExecRaw(), DCHECK_EQ, v8::internal::Isolate::factory(), v8::internal::Isolate::kJSRegexpStaticOffsetsVectorSize, v8::internal::kNumRegisters, RE_FAILURE, RE_SUCCESS, v8::internal::SetAtomLastCapture(), and v8::internal::STATIC_ASSERT().
Referenced by Exec().
|
static |
Definition at line 270 of file jsregexp.cc.
References DCHECK, DCHECK_LT, v8::internal::String::Flatten(), v8::internal::String::GetFlatContent(), v8::internal::String::FlatContent::IsFlat(), v8::internal::String::IsFlat(), v8::internal::String::FlatContent::IsOneByte(), v8::internal::JSRegExp::kAtomPatternIndex, v8::internal::String::length(), RE_FAILURE, v8::internal::SearchString(), v8::internal::String::FlatContent::ToOneByteVector(), and v8::internal::String::FlatContent::ToUC16Vector().
Referenced by AtomExec().
|
static |
Definition at line 156 of file jsregexp.cc.
References ASSIGN_RETURN_ON_EXCEPTION, AtomCompile(), v8::internal::RegExpCompileData::capture_count, v8::internal::Isolate::compilation_cache(), DCHECK, v8::internal::RegExpCompileData::error, v8::internal::Isolate::factory(), v8::internal::anonymous_namespace{flags.cc}::flags, v8::internal::String::Flatten(), v8::internal::HasFewDifferentCharacters(), IrregexpInitialize(), LOG, v8::internal::CompilationCache::LookupRegExp(), v8::internal::CompilationCache::PutRegExp(), v8::internal::RegExpFlagsFromString(), v8::internal::RegExpCompileData::simple, v8::internal::ThrowRegExpException(), and v8::internal::RegExpCompileData::tree.
Referenced by v8::internal::RUNTIME_FUNCTION().
|
staticprivate |
Definition at line 389 of file jsregexp.cc.
References v8::internal::RegExpEngine::CompilationResult::code, v8::internal::JSRegExp::code_index(), v8::internal::RegExpEngine::Compile(), v8::internal::CreateRegExpErrorObjectAndThrow(), v8::internal::CStrVector(), DCHECK, v8::internal::RegExpCompileData::error, v8::internal::RegExpEngine::CompilationResult::error_message, v8::internal::Isolate::factory(), v8::internal::anonymous_namespace{flags.cc}::flags, v8::internal::String::Flatten(), IrregexpMaxRegisterCount(), v8::internal::JSRegExp::kCompilationErrorValue, v8::internal::JSRegExp::kUninitializedValue, NULL, v8::internal::RegExpEngine::CompilationResult::num_registers, v8::internal::JSRegExp::saved_code_index(), SetIrregexpMaxRegisterCount(), v8::internal::ThrowRegExpException(), and USE().
Referenced by EnsureCompiledIrregexp().
|
static |
Definition at line 50 of file jsregexp.cc.
References arraysize, and v8::internal::anonymous_namespace{flags.cc}::flags.
Referenced by v8::internal::RUNTIME_FUNCTION().
|
inlinestaticprivate |
Definition at line 352 of file jsregexp.cc.
References v8::internal::JSRegExp::code_index(), CompileIrregexp(), DCHECK, and v8::internal::JSRegExp::saved_code_index().
Referenced by IrregexpExecRaw(), and IrregexpPrepare().
|
static |
Definition at line 225 of file jsregexp.cc.
References v8::internal::JSRegExp::ATOM, AtomExec(), v8::internal::JSRegExp::IRREGEXP, IrregexpExec(), and UNREACHABLE.
Referenced by v8::internal::RUNTIME_FUNCTION().
|
inlinestatic |
Definition at line 178 of file jsregexp.h.
References v8::internal::FixedArray::get(), and kFirstCapture.
|
inlinestatic |
Definition at line 198 of file jsregexp.h.
References v8::internal::FixedArray::get(), and kLastCaptureCount.
|
static |
Definition at line 480 of file jsregexp.cc.
References v8::internal::JSRegExp::code_index(), and v8::internal::FixedArray::get().
Referenced by IrregexpExecRaw().
|
static |
Definition at line 614 of file jsregexp.cc.
References DCHECK, DCHECK_EQ, v8::internal::Isolate::factory(), v8::internal::Isolate::has_pending_exception(), v8::internal::JSRegExp::IRREGEXP, IrregexpExecRaw(), IrregexpNumberOfCaptures(), IrregexpPrepare(), v8::internal::Isolate::kJSRegexpStaticOffsetsVectorSize, NULL, v8::internal::PrintF(), RE_EXCEPTION, RE_FAILURE, RE_SUCCESS, SetLastMatchInfo(), and v8::internal::String::ToCString().
Referenced by Exec().
|
static |
Definition at line 526 of file jsregexp.cc.
References DCHECK, EnsureCompiledIrregexp(), v8::internal::NativeRegExpMacroAssembler::EXCEPTION, v8::internal::NativeRegExpMacroAssembler::FAILURE, v8::internal::Isolate::has_pending_exception(), IrregexpByteCode(), IrregexpNativeCode(), IrregexpNumberOfCaptures(), IrregexpNumberOfRegisters(), IrregexpPrepare(), v8::internal::NativeRegExpMacroAssembler::Match(), v8::internal::IrregexpInterpreter::Match(), v8::internal::MemCopy(), RE_EXCEPTION, RE_FAILURE, RE_SUCCESS, v8::internal::NativeRegExpMacroAssembler::RETRY, v8::internal::Isolate::StackOverflow(), v8::internal::STATIC_ASSERT(), v8::internal::NativeRegExpMacroAssembler::SUCCESS, and UNREACHABLE.
Referenced by IrregexpExec().
|
static |
Definition at line 490 of file jsregexp.cc.
References v8::internal::anonymous_namespace{flags.cc}::flags, and v8::internal::JSRegExp::IRREGEXP.
Referenced by Compile().
|
static |
Definition at line 459 of file jsregexp.cc.
References v8::internal::FixedArray::get(), and v8::internal::JSRegExp::kIrregexpMaxRegisterCountIndex.
Referenced by CompileIrregexp().
|
static |
Definition at line 485 of file jsregexp.cc.
References v8::internal::JSRegExp::code_index(), and v8::internal::FixedArray::get().
Referenced by IrregexpExecRaw().
|
static |
Definition at line 470 of file jsregexp.cc.
References v8::internal::FixedArray::get(), and v8::internal::JSRegExp::kIrregexpCaptureCountIndex.
Referenced by IrregexpExec(), IrregexpExecRaw(), and IrregexpPrepare().
|
static |
Definition at line 475 of file jsregexp.cc.
References v8::internal::FixedArray::get(), and v8::internal::JSRegExp::kIrregexpMaxRegisterCountIndex.
Referenced by IrregexpExecRaw(), and IrregexpPrepare().
|
static |
Definition at line 503 of file jsregexp.cc.
References EnsureCompiledIrregexp(), v8::internal::String::Flatten(), IrregexpNumberOfCaptures(), and IrregexpNumberOfRegisters().
Referenced by v8::internal::RegExpImpl::GlobalCache::GlobalCache(), IrregexpExec(), and IrregexpExecRaw().
|
inlinestatic |
Definition at line 194 of file jsregexp.h.
References v8::internal::Smi::FromInt(), kFirstCapture, v8::internal::FixedArray::set(), and to().
Referenced by v8::internal::SetAtomLastCapture(), and SetLastMatchInfo().
|
static |
Definition at line 465 of file jsregexp.cc.
References v8::internal::Smi::FromInt(), v8::internal::JSRegExp::kIrregexpMaxRegisterCountIndex, and v8::internal::FixedArray::set().
Referenced by CompileIrregexp().
|
inlinestatic |
Definition at line 182 of file jsregexp.h.
References v8::internal::Smi::FromInt(), kLastCaptureCount, v8::internal::FixedArray::set(), and to().
Referenced by v8::internal::SetAtomLastCapture(), and SetLastMatchInfo().
|
inlinestatic |
Definition at line 190 of file jsregexp.h.
References kLastInput, v8::internal::FixedArray::set(), and to().
Referenced by v8::internal::SetAtomLastCapture(), and SetLastMatchInfo().
|
static |
Definition at line 662 of file jsregexp.cc.
References DCHECK, v8::internal::JSArray::EnsureSize(), kLastMatchOverhead, NULL, SetCapture(), SetLastCaptureCount(), SetLastInput(), and SetLastSubject().
Referenced by IrregexpExec(), v8::internal::RUNTIME_FUNCTION(), v8::internal::SearchRegExpMultiple(), v8::internal::StringReplaceGlobalAtomRegExpWithString(), v8::internal::StringReplaceGlobalRegExpWithEmptyString(), and v8::internal::StringReplaceGlobalRegExpWithString().
|
inlinestatic |
Definition at line 186 of file jsregexp.h.
References kLastSubject, v8::internal::FixedArray::set(), and to().
Referenced by v8::internal::SetAtomLastCapture(), and SetLastMatchInfo().
|
inlinestatic |
Definition at line 25 of file jsregexp.h.
|
static |
Definition at line 164 of file jsregexp.h.
Referenced by GetCapture(), and SetCapture().
|
static |
Definition at line 174 of file jsregexp.h.
|
static |
Definition at line 161 of file jsregexp.h.
Referenced by GetLastCaptureCount(), and SetLastCaptureCount().
|
static |
Definition at line 168 of file jsregexp.h.
|
static |
Definition at line 163 of file jsregexp.h.
Referenced by SetLastInput().
|
static |
Definition at line 172 of file jsregexp.h.
|
static |
Definition at line 165 of file jsregexp.h.
Referenced by SetLastMatchInfo().
|
static |
Definition at line 162 of file jsregexp.h.
Referenced by SetLastSubject().
|
static |
Definition at line 170 of file jsregexp.h.
Definition at line 215 of file jsregexp.h.
Referenced by v8::internal::RegExpCompiler::Assemble().
Definition at line 216 of file jsregexp.h.
Referenced by v8::internal::RegExpCompiler::Assemble().