1627 {
1628 if (details->characters() == 0) return false;
1631 if (details->cannot_match()) return false;
1632 if (!details->Rationalize(
compiler->one_byte()))
return false;
1633 ASSERT(details->characters() == 1 ||
1634 compiler->macro_assembler()->CanReadUnaligned());
1635 uint32_t mask = details->mask();
1636 uint32_t
value = details->value();
1637
1638 RegExpMacroAssembler* assembler =
compiler->macro_assembler();
1639
1640 if (trace->characters_preloaded() != details->characters()) {
1641 ASSERT(trace->cp_offset() == bounds_check_trace->cp_offset());
1642
1643
1644
1645
1646 assembler->LoadCurrentCharacter(
1647 trace->cp_offset(), bounds_check_trace->backtrack(),
1648 !preload_has_checked_bounds, details->characters());
1649 }
1650
1651 bool need_mask = true;
1652
1653 if (details->characters() == 1) {
1654
1655
1656 uint32_t char_mask;
1659 } else {
1661 }
1662 if ((mask & char_mask) == char_mask) need_mask = false;
1663 mask &= char_mask;
1664 } else {
1665
1666
1667 if (details->characters() == 2 &&
compiler->one_byte()) {
1668 if ((mask & 0xffff) == 0xffff) need_mask = false;
1669 }
else if (details->characters() == 1 && !
compiler->one_byte()) {
1670 if ((mask & 0xffff) == 0xffff) need_mask = false;
1671 } else {
1672 if (mask == 0xffffffff) need_mask = false;
1673 }
1674 }
1675
1676 if (fall_through_on_failure) {
1677 if (need_mask) {
1678 assembler->CheckCharacterAfterAnd(
value, mask, on_possible_success);
1679 } else {
1680 assembler->CheckCharacter(
value, on_possible_success);
1681 }
1682 } else {
1683 if (need_mask) {
1684 assembler->CheckNotCharacterAfterAnd(
value, mask, trace->backtrack());
1685 } else {
1686 assembler->CheckNotCharacter(
value, trace->backtrack());
1687 }
1688 }
1689 return true;
1690}
virtual void GetQuickCheckDetails(QuickCheckDetails *details, RegExpCompiler *compiler, intptr_t characters_filled_in, bool not_at_start)=0
static constexpr int32_t kMaxCodeUnit