Lines Matching refs:subject
20 // independently of subject and pattern char size.
80 int Search(base::Vector<const SubjectChar> subject, int index) {
81 return strategy_(this, subject, index);
105 base::Vector<const SubjectChar> subject,
109 base::Vector<const SubjectChar> subject,
113 base::Vector<const SubjectChar> subject,
118 base::Vector<const SubjectChar> subject, int start_index);
121 base::Vector<const SubjectChar> subject,
145 // Both pattern and subject are UC16. Reduce character to equivalence
199 base::Vector<const SubjectChar> subject,
202 const int max_n = (subject.length() - pattern.length() + 1);
209 if (subject[i] == 0) return i;
219 memchr(subject.begin() + pos, search_byte,
223 pos = static_cast<int>(char_pos - subject.begin());
224 if (subject[pos] == search_char) return pos;
237 base::Vector<const SubjectChar> subject, int index) {
245 return FindFirstCharacter(search->pattern_, subject, index);
253 inline bool CharCompare(const PatternChar* pattern, const SubjectChar* subject,
258 if (pattern[pos] != subject[pos]) {
270 base::Vector<const SubjectChar> subject, int index) {
275 int n = subject.length() - pattern_length;
277 i = FindFirstCharacter(pattern, subject, i);
283 if (CharCompare(pattern.begin() + 1, subject.begin() + i,
298 base::Vector<const SubjectChar> subject, int start_index) {
300 int subject_length = subject.length();
314 while (last_char != (c = subject[index + j])) {
321 while (j >= 0 && pattern[j] == (c = subject[index + j])) j--;
417 base::Vector<const SubjectChar> subject, int start_index) {
419 int subject_length = subject.length();
434 while (last_char != (subject_char = subject[index + j])) {
444 while (j >= 0 && pattern[j] == (subject[index + j])) j--;
457 return BoyerMooreSearch(search, subject, index);
495 // isn't found very early in the subject. Upgrades to BoyerMooreHorspool.
499 base::Vector<const SubjectChar> subject, int index) {
509 for (int i = index, n = subject.length() - pattern_length; i <= n; i++) {
512 i = FindFirstCharacter(pattern, subject, i);
517 if (pattern[j] != subject[i + j]) {
529 return BoyerMooreHorspoolSearch(search, subject, i);
540 int SearchString(Isolate* isolate, base::Vector<const SubjectChar> subject,
543 return search.Search(subject, start_index);
546 // A wrapper function around SearchString that wraps raw pointers to the subject
554 base::Vector<const SubjectChar> subject(subject_ptr, subject_length);
556 return SearchString(isolate, subject, pattern, start_index);