Lines Matching refs:regexp

16 #include "src/objects/js-regexp-inl.h"
17 #include "src/regexp/regexp-utils.h"
18 #include "src/regexp/regexp.h"
81 bool Compile(Isolate* isolate, Handle<JSRegExp> regexp,
326 bool CompiledReplacement::Compile(Isolate* isolate, Handle<JSRegExp> regexp,
336 DCHECK(JSRegExp::TypeSupportsCaptures(regexp->type_tag()));
337 Object maybe_capture_name_map = regexp->capture_name_map();
625 Isolate* isolate, Handle<String> subject, Handle<JSRegExp> regexp,
630 int capture_count = regexp->capture_count();
634 if (!RegExp::EnsureFullyCompiled(isolate, regexp, subject)) {
640 isolate, regexp, replacement, capture_count, subject_length);
642 // Shortcut for simple non-regexp global replacements
643 if (regexp->type_tag() == JSRegExp::ATOM && simple_replace) {
647 isolate, subject, regexp, replacement, last_match_info);
650 isolate, subject, regexp, replacement, last_match_info);
654 RegExpGlobalCache global_cache(regexp, subject, isolate);
703 Isolate* isolate, Handle<String> subject, Handle<JSRegExp> regexp,
707 // Shortcut for simple non-regexp global replacements
708 if (regexp->type_tag() == JSRegExp::ATOM) {
712 isolate, subject, regexp, empty_string, last_match_info);
715 isolate, subject, regexp, empty_string, last_match_info);
719 RegExpGlobalCache global_cache(regexp, subject, isolate);
730 int capture_count = regexp->capture_count();
883 MaybeHandle<Object> RegExpExec(Isolate* isolate, Handle<JSRegExp> regexp,
892 return RegExp::Exec(isolate, regexp, subject, index, last_match_info,
897 Isolate* isolate, Handle<JSRegExp> regexp, Handle<String> subject,
905 return RegExp::ExperimentalOneshotExec(isolate, regexp, subject, index,
914 Handle<JSRegExp> regexp = args.at<JSRegExp>(0);
920 isolate, RegExpExec(isolate, regexp, subject, index, last_match_info,
927 Handle<JSRegExp> regexp = args.at<JSRegExp>(0);
933 isolate, RegExpExec(isolate, regexp, subject, index, last_match_info,
940 Handle<JSRegExp> regexp = args.at<JSRegExp>(0);
947 ExperimentalOneshotExec(isolate, regexp, subject, index, last_match_info,
955 Handle<JSRegExp> regexp = args.at<JSRegExp>(0);
962 ExperimentalOneshotExec(isolate, regexp, subject, index, last_match_info,
972 Handle<JSRegExp> regexp = args.at<JSRegExp>(0);
973 DCHECK(regexp->flags() & JSRegExp::kHasIndices);
983 MatchInfoBackedMatch(Isolate* isolate, Handle<JSRegExp> regexp,
989 if (JSRegExp::TypeSupportsCaptures(regexp->type_tag())) {
990 Object o = regexp->capture_name_map();
1167 Handle<JSRegExp> regexp,
1170 DCHECK(RegExpUtils::IsUnmodifiedRegExp(isolate, regexp));
1171 DCHECK_NE(has_capture, regexp->capture_count() == 0);
1179 if (FLAG_regexp_tier_up && regexp->type_tag() == JSRegExp::IRREGEXP) {
1180 regexp->MarkTierUpForNextExec();
1183 reinterpret_cast<void*>(regexp->ptr()));
1187 int capture_count = regexp->capture_count();
1195 isolate->heap(), *subject, regexp->data(), &last_match_cache,
1217 RegExpGlobalCache global_cache(regexp, subject, isolate);
1266 Handle<Object> maybe_capture_map(regexp->capture_name_map(), isolate);
1337 isolate, subject, handle(regexp->data(), isolate), copied_fixed_array,
1349 Isolate* isolate, Handle<JSRegExp> regexp, Handle<String> string,
1352 DCHECK(RegExpUtils::IsUnmodifiedRegExp(isolate, regexp));
1356 const int flags = regexp->flags();
1365 // Non-global regexp search, string replace.
1369 Handle<Object> last_index_obj(regexp->last_index(), isolate);
1384 RegExp::Exec(isolate, regexp, string, last_index, last_match_info),
1389 if (sticky) regexp->set_last_index(Smi::zero(), SKIP_WRITE_BARRIER);
1399 regexp->set_last_index(Smi::FromInt(end_index), SKIP_WRITE_BARRIER);
1406 MatchInfoBackedMatch m(isolate, regexp, string, match_indices);
1418 // Global regexp search, string replace.
1420 RETURN_ON_EXCEPTION(isolate, RegExpUtils::SetLastIndex(isolate, regexp, 0),
1428 if (FLAG_regexp_tier_up && regexp->type_tag() == JSRegExp::IRREGEXP) {
1429 regexp->MarkTierUpForNextExec();
1432 reinterpret_cast<void*>(regexp->ptr()));
1440 isolate, string, regexp, last_match_info);
1445 isolate, string, regexp, last_match_info);
1451 isolate, string, regexp, replace, last_match_info);
1469 Handle<JSRegExp> regexp = args.at<JSRegExp>(0);
1474 DCHECK(RegExpUtils::IsUnmodifiedRegExp(isolate, regexp));
1478 CHECK(regexp->flags() & JSRegExp::kGlobal);
1481 if (regexp->capture_count() == 0) {
1482 result = SearchRegExpMultiple<false>(isolate, subject, regexp,
1485 result = SearchRegExpMultiple<true>(isolate, subject, regexp,
1488 DCHECK(RegExpUtils::IsUnmodifiedRegExp(isolate, regexp));
1496 Handle<JSRegExp> regexp = args.at<JSRegExp>(1);
1499 DCHECK(RegExpUtils::IsUnmodifiedRegExp(isolate, regexp));
1505 const int flags = regexp->flags();
1513 Handle<Object> last_index_obj(regexp->last_index(), isolate);
1527 RegExp::Exec(isolate, regexp, subject, last_index, last_match_info));
1531 if (sticky) regexp->set_last_index(Smi::zero(), SKIP_WRITE_BARRIER);
1542 regexp->set_last_index(Smi::FromInt(end_of_match), SKIP_WRITE_BARRIER);
1558 DCHECK(JSRegExp::TypeSupportsCaptures(regexp->type_tag()));
1560 Object maybe_capture_map = regexp->capture_name_map();
1640 // ES#sec-regexp.prototype-@@replace
1794 // ES#sec-regexp.prototype-@@replace
1819 // regexp and functional replace should be fully handled in CSA code.
2000 Handle<JSRegExp> regexp = args.at<JSRegExp>(0);
2005 JSRegExp::Initialize(regexp, source, flags));
2007 return *regexp;
2020 auto regexp = JSRegExp::cast(args[0]);
2021 Handle<String> flags = JSRegExp::StringFromFlags(isolate, regexp.flags());