Lines Matching refs:JSRegExp
78 static JSRegExp::Flags RegExpFlagsFromString(Handle<String> str) { in RegExpFlagsFromString()
79 int flags = JSRegExp::NONE; in RegExpFlagsFromString()
83 flags |= JSRegExp::IGNORE_CASE; in RegExpFlagsFromString()
86 flags |= JSRegExp::GLOBAL; in RegExpFlagsFromString()
89 flags |= JSRegExp::MULTILINE; in RegExpFlagsFromString()
93 return JSRegExp::Flags(flags); in RegExpFlagsFromString()
97 static inline void ThrowRegExpException(Handle<JSRegExp> re, in ThrowRegExpException()
169 Handle<Object> RegExpImpl::Compile(Handle<JSRegExp> re, in Compile()
174 JSRegExp::Flags flags = RegExpFlagsFromString(flag_str); in Compile()
232 Handle<Object> RegExpImpl::Exec(Handle<JSRegExp> regexp, in Exec()
237 case JSRegExp::ATOM: in Exec()
239 case JSRegExp::IRREGEXP: { in Exec()
256 void RegExpImpl::AtomCompile(Handle<JSRegExp> re, in AtomCompile()
258 JSRegExp::Flags flags, in AtomCompile()
261 JSRegExp::ATOM, in AtomCompile()
281 int RegExpImpl::AtomExecRaw(Handle<JSRegExp> regexp, in AtomExecRaw()
294 String* needle = String::cast(regexp->DataAt(JSRegExp::kAtomPatternIndex)); in AtomExecRaw()
340 Handle<Object> RegExpImpl::AtomExec(Handle<JSRegExp> re, in AtomExec()
371 Handle<JSRegExp> re, Handle<String> sample_subject, bool is_ascii) { in EnsureCompiledIrregexp()
372 Object* compiled_code = re->DataAt(JSRegExp::code_index(is_ascii)); in EnsureCompiledIrregexp()
380 Object* saved_code = re->DataAt(JSRegExp::saved_code_index(is_ascii)); in EnsureCompiledIrregexp()
383 re->SetDataAt(JSRegExp::code_index(is_ascii), saved_code); in EnsureCompiledIrregexp()
391 static bool CreateRegExpErrorObjectAndThrow(Handle<JSRegExp> re, in CreateRegExpErrorObjectAndThrow()
407 bool RegExpImpl::CompileIrregexp(Handle<JSRegExp> re, in CompileIrregexp()
416 Object* entry = re->DataAt(JSRegExp::code_index(is_ascii)); in CompileIrregexp()
422 ASSERT(entry_value == JSRegExp::kUninitializedValue || in CompileIrregexp()
423 entry_value == JSRegExp::kCompilationErrorValue || in CompileIrregexp()
424 (entry_value < JSRegExp::kCodeAgeMask && entry_value >= 0)); in CompileIrregexp()
426 if (entry_value == JSRegExp::kCompilationErrorValue) { in CompileIrregexp()
430 Object* error_string = re->DataAt(JSRegExp::saved_code_index(is_ascii)); in CompileIrregexp()
437 JSRegExp::Flags flags = re->GetFlags(); in CompileIrregexp()
472 data->set(JSRegExp::code_index(is_ascii), result.code); in CompileIrregexp()
484 re->get(JSRegExp::kIrregexpMaxRegisterCountIndex))->value(); in IrregexpMaxRegisterCount()
489 re->set(JSRegExp::kIrregexpMaxRegisterCountIndex, Smi::FromInt(value)); in SetIrregexpMaxRegisterCount()
494 return Smi::cast(re->get(JSRegExp::kIrregexpCaptureCountIndex))->value(); in IrregexpNumberOfCaptures()
499 return Smi::cast(re->get(JSRegExp::kIrregexpMaxRegisterCountIndex))->value(); in IrregexpNumberOfRegisters()
504 return ByteArray::cast(re->get(JSRegExp::code_index(is_ascii))); in IrregexpByteCode()
509 return Code::cast(re->get(JSRegExp::code_index(is_ascii))); in IrregexpNativeCode()
513 void RegExpImpl::IrregexpInitialize(Handle<JSRegExp> re, in IrregexpInitialize()
515 JSRegExp::Flags flags, in IrregexpInitialize()
519 JSRegExp::IRREGEXP, in IrregexpInitialize()
526 int RegExpImpl::IrregexpPrepare(Handle<JSRegExp> regexp, in IrregexpPrepare()
549 int RegExpImpl::IrregexpExecRaw(Handle<JSRegExp> regexp, in IrregexpExecRaw()
637 Handle<Object> RegExpImpl::IrregexpExec(Handle<JSRegExp> regexp, in IrregexpExec()
642 ASSERT_EQ(regexp->TypeTag(), JSRegExp::IRREGEXP); in IrregexpExec()
707 RegExpImpl::GlobalCache::GlobalCache(Handle<JSRegExp> regexp, in GlobalCache()
721 if (regexp_->TypeTag() == JSRegExp::ATOM) { in GlobalCache()