2948 {
2950
2951 intptr_t min_lookahead = 0;
2952 intptr_t max_lookahead = 0;
2953
2954 if (!FindWorthwhileInterval(&min_lookahead, &max_lookahead)) return;
2955
2956 bool found_single_character = false;
2957 intptr_t single_character = 0;
2958 for (intptr_t
i = max_lookahead;
i >= min_lookahead;
i--) {
2959 BoyerMoorePositionInfo*
map = bitmaps_->At(
i);
2960 if (
map->map_count() > 1 ||
2961 (found_single_character &&
map->map_count() != 0)) {
2962 found_single_character = false;
2963 break;
2964 }
2965 for (intptr_t j = 0; j <
kSize; j++) {
2967 found_single_character = true;
2968 single_character = j;
2969 break;
2970 }
2971 }
2972 }
2973
2974 intptr_t lookahead_width = max_lookahead + 1 - min_lookahead;
2975
2976 if (found_single_character && lookahead_width == 1 && max_lookahead < 3) {
2977
2978 return;
2979 }
2980
2981 if (found_single_character) {
2982 BlockLabel cont, again;
2983 masm->BindBlock(&again);
2984 masm->LoadCurrentCharacter(max_lookahead, &cont, true);
2985 if (max_char_ > kSize) {
2986 masm->CheckCharacterAfterAnd(single_character,
2988 } else {
2989 masm->CheckCharacter(single_character, &cont);
2990 }
2991 masm->AdvanceCurrentPosition(lookahead_width);
2992 masm->GoTo(&again);
2993 masm->BindBlock(&cont);
2994 return;
2995 }
2996
3000 intptr_t skip_distance =
3001 GetSkipTable(min_lookahead, max_lookahead, boolean_skip_table);
3002 ASSERT(skip_distance != 0);
3003
3004 BlockLabel cont, again;
3005
3006 masm->BindBlock(&again);
3007 masm->CheckPreemption(false);
3008 masm->LoadCurrentCharacter(max_lookahead, &cont, true);
3009 masm->CheckBitInTable(boolean_skip_table, &cont);
3010 masm->AdvanceCurrentPosition(skip_distance);
3011 masm->GoTo(&again);
3012 masm->BindBlock(&cont);
3013
3014 return;
3015}
static Object & ZoneHandle()
static constexpr intptr_t kTableMask
static constexpr intptr_t kTableSize
static TypedDataPtr New(intptr_t class_id, intptr_t len, Heap::Space space=Heap::kNew)
SI auto map(std::index_sequence< I... >, Fn &&fn, const Args &... args) -> skvx::Vec< sizeof...(I), decltype(fn(args[0]...))>