Lines Matching refs:alternatives
239 // The generated alternatives are grouped by the leading surrogate to avoid
605 ZoneList<RegExpTree*>* alternatives = this->alternatives();
606 int length = alternatives->length();
610 RegExpTree* alternative = alternatives->at(i);
619 RegExpTree* alternative = alternatives->at(i);
629 DCHECK_LT(first_atom, alternatives->length());
630 DCHECK_LE(i, alternatives->length());
634 alternatives->StableSort(CompareFirstCharCaseInsensitive, first_atom,
643 alternatives->StableSort(compare_closure, first_atom, i - first_atom);
646 alternatives->StableSort(CompareFirstChar, first_atom, i - first_atom);
656 ZoneList<RegExpTree*>* alternatives = this->alternatives();
657 int length = alternatives->length();
663 RegExpTree* alternative = alternatives->at(i);
665 alternatives->at(write_posn++) = alternatives->at(i);
684 alternative = alternatives->at(i);
698 // Found worthwhile run of alternatives with common prefix of at least one
705 alternatives->at(first_with_prefix)->AsAtom();
708 alternatives->at(j + first_with_prefix)->AsAtom();
728 alternatives->at(j + first_with_prefix)->AsAtom();
739 alternatives->at(write_posn++) = zone->New<RegExpAlternative>(pair);
741 // Just copy any non-worthwhile alternatives.
743 alternatives->at(write_posn++) = alternatives->at(j);
747 alternatives->Rewind(write_posn); // Trim end of array.
754 ZoneList<RegExpTree*>* alternatives = this->alternatives();
755 int length = alternatives->length();
760 RegExpTree* alternative = alternatives->at(i);
762 alternatives->at(write_posn++) = alternatives->at(i);
768 alternatives->at(write_posn++) = alternatives->at(i);
779 // Find a run of single-character atom alternatives that have identical
782 alternative = alternatives->at(i);
793 // Found non-trivial run of single-character alternatives.
798 RegExpAtom* old_atom = alternatives->at(j + first_in_run)->AsAtom();
806 alternatives->at(write_posn++) =
809 // Just copy any trivial alternatives.
811 alternatives->at(write_posn++) = alternatives->at(j);
815 alternatives->Rewind(write_posn); // Trim end of array.
822 ZoneList<RegExpTree*>* alternatives = this->alternatives();
824 if (alternatives->length() > 2) {
828 if (alternatives->length() == 1) {
829 return alternatives->at(0)->ToNode(compiler, on_success);
833 int length = alternatives->length();
839 alternatives->at(i)->ToNode(compiler, on_success));
937 // Add the two alternatives to the ChoiceNode.