Lines Matching refs:cc

261   PCRE2_SPTR cc;  member
621 #define PRIVATE_DATA(cc) (common->private_data_ptrs[(cc) - common->start]) argument
863 static PCRE2_SPTR bracketend(PCRE2_SPTR cc) in bracketend() argument
865 SLJIT_ASSERT((*cc >= OP_ASSERT && *cc <= OP_ASSERTBACK_NA) || (*cc >= OP_ONCE && *cc <= OP_SCOND)); in bracketend()
866 do cc += GET(cc, 1); while (*cc == OP_ALT); in bracketend()
867 SLJIT_ASSERT(*cc >= OP_KET && *cc <= OP_KETRPOS); in bracketend()
868 cc += 1 + LINK_SIZE; in bracketend()
869 return cc; in bracketend()
872 static int no_alternatives(PCRE2_SPTR cc) in no_alternatives() argument
875 SLJIT_ASSERT((*cc >= OP_ASSERT && *cc <= OP_ASSERTBACK_NA) || (*cc >= OP_ONCE && *cc <= OP_SCOND)); in no_alternatives()
878 cc += GET(cc, 1); in no_alternatives()
881 while (*cc == OP_ALT); in no_alternatives()
882 SLJIT_ASSERT(*cc >= OP_KET && *cc <= OP_KETRPOS); in no_alternatives()
886 static BOOL find_vreverse(PCRE2_SPTR cc) in find_vreverse() argument
888 SLJIT_ASSERT(*cc == OP_ASSERTBACK || *cc == OP_ASSERTBACK_NOT || *cc == OP_ASSERTBACK_NA); in find_vreverse()
892 if (cc[1 + LINK_SIZE] == OP_VREVERSE) in find_vreverse()
894 cc += GET(cc, 1); in find_vreverse()
896 while (*cc == OP_ALT); in find_vreverse()
913 static PCRE2_SPTR next_opcode(compiler_common *common, PCRE2_SPTR cc) in next_opcode() argument
916 switch(*cc) in next_opcode()
1010 return cc + PRIV(OP_lengths)[*cc]; in next_opcode()
1068 cc += PRIV(OP_lengths)[*cc]; in next_opcode()
1070 if (common->utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]); in next_opcode()
1072 return cc; in next_opcode()
1088 return cc + PRIV(OP_lengths)[*cc] - 1; in next_opcode()
1094 return cc + 1; in next_opcode()
1097 return cc + GET(cc, 1 + 2*LINK_SIZE); in next_opcode()
1101 return cc + GET(cc, 1); in next_opcode()
1109 return cc + 1 + 2 + cc[1]; in next_opcode()
1117 static BOOL check_opcode_types(compiler_common *common, PCRE2_SPTR cc, PCRE2_SPTR ccend) in check_opcode_types() argument
1121 PCRE2_SPTR assert_back_end = cc - 1; in check_opcode_types()
1122 PCRE2_SPTR assert_na_end = cc - 1; in check_opcode_types()
1125 while (cc < ccend) in check_opcode_types()
1127 switch(*cc) in check_opcode_types()
1132 cc += 1; in check_opcode_types()
1145 common->optimized_cbracket[GET2(cc, 1)] = 0; in check_opcode_types()
1146 cc += 1 + IMM2_SIZE; in check_opcode_types()
1151 slot = bracketend(cc); in check_opcode_types()
1154 cc += 1 + LINK_SIZE; in check_opcode_types()
1159 common->optimized_cbracket[GET2(cc, 1 + LINK_SIZE)] = 0; in check_opcode_types()
1160 cc += 1 + LINK_SIZE + IMM2_SIZE; in check_opcode_types()
1167 if (cc[1 + LINK_SIZE] == OP_CALLOUT || cc[1 + LINK_SIZE] == OP_CALLOUT_STR) in check_opcode_types()
1169 cc += 1 + LINK_SIZE; in check_opcode_types()
1173 common->optimized_cbracket[GET2(cc, 1)] = 0; in check_opcode_types()
1174 cc += 1 + IMM2_SIZE; in check_opcode_types()
1180 count = GET2(cc, 1 + IMM2_SIZE); in check_opcode_types()
1181 slot = common->name_table + GET2(cc, 1) * common->name_entry_size; in check_opcode_types()
1187 cc += 1 + 2 * IMM2_SIZE; in check_opcode_types()
1197 cc += 1 + LINK_SIZE; in check_opcode_types()
1207 cc += (*cc == OP_CALLOUT) ? PRIV(OP_lengths)[OP_CALLOUT] : GET(cc, 1 + 2*LINK_SIZE); in check_opcode_types()
1211 slot = bracketend(cc); in check_opcode_types()
1214 cc += 1 + LINK_SIZE; in check_opcode_types()
1224 if (cc < assert_na_end) in check_opcode_types()
1233 cc += 1 + 2 + cc[1]; in check_opcode_types()
1239 cc += 1; in check_opcode_types()
1243 if (cc < assert_back_end) in check_opcode_types()
1245 if (cc < assert_na_end) in check_opcode_types()
1247 cc += 1; in check_opcode_types()
1253 if (cc < assert_back_end) in check_opcode_types()
1255 if (cc < assert_na_end) in check_opcode_types()
1257 cc += 1 + 2 + cc[1]; in check_opcode_types()
1263 if (cc < assert_na_end) in check_opcode_types()
1265 cc++; in check_opcode_types()
1269 cc = next_opcode(common, cc); in check_opcode_types()
1270 if (cc == NULL) in check_opcode_types()
1292 static int detect_early_fail(compiler_common *common, PCRE2_SPTR cc, in detect_early_fail() argument
1295 PCRE2_SPTR begin = cc; in detect_early_fail()
1302 SLJIT_ASSERT(*cc == OP_ONCE || *cc == OP_BRA || *cc == OP_CBRA); in detect_early_fail()
1303 SLJIT_ASSERT(*cc != OP_CBRA || common->optimized_cbracket[GET2(cc, 1 + LINK_SIZE)] != 0); in detect_early_fail()
1306 next_alt = cc + GET(cc, 1); in detect_early_fail()
1313 cc += 1 + LINK_SIZE + ((*cc == OP_CBRA) ? IMM2_SIZE : 0); in detect_early_fail()
1319 switch(*cc) in detect_early_fail()
1335 cc++; in detect_early_fail()
1353 cc++; in detect_early_fail()
1360 cc++; in detect_early_fail()
1367 cc += 1 + 2; in detect_early_fail()
1376 cc += 2; in detect_early_fail()
1378 if (common->utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]); in detect_early_fail()
1393 cc += 1; in detect_early_fail()
1395 if (cc[0] != OP_ANYNL && cc[0] != OP_EXTUNI) in detect_early_fail()
1397 accelerated_start = cc - 1; in detect_early_fail()
1408 cc += 1 + IMM2_SIZE; in detect_early_fail()
1414 cc += IMM2_SIZE; in detect_early_fail()
1423 cc += 1; in detect_early_fail()
1457 accelerated_start = cc; in detect_early_fail()
1458 cc += 2; in detect_early_fail()
1460 if (common->utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]); in detect_early_fail()
1467 cc += 2 + IMM2_SIZE; in detect_early_fail()
1469 if (common->utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]); in detect_early_fail()
1488 cc += IMM2_SIZE; in detect_early_fail()
1505 cc += 2; in detect_early_fail()
1507 if (common->utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]); in detect_early_fail()
1515 accelerated_start = cc; in detect_early_fail()
1516 cc += ((*cc == OP_XCLASS) ? GET(cc, 1) : (unsigned int)(1 + (32 / sizeof(PCRE2_UCHAR)))); in detect_early_fail()
1518 accelerated_start = cc; in detect_early_fail()
1519 cc += (1 + (32 / sizeof(PCRE2_UCHAR))); in detect_early_fail()
1522 switch (*cc) in detect_early_fail()
1534 cc++; in detect_early_fail()
1540 if (GET2(cc, 1) == GET2(cc, 1 + IMM2_SIZE)) in detect_early_fail()
1543 cc += 1 + 2 * IMM2_SIZE; in detect_early_fail()
1549 cc += 2 * IMM2_SIZE; in detect_early_fail()
1554 cc++; in detect_early_fail()
1576 if (count < 3 && cc[GET(cc, 1)] == OP_ALT) in detect_early_fail()
1579 end = bracketend(cc); in detect_early_fail()
1580 …if (end[-1 - LINK_SIZE] != OP_KET || (*cc == OP_CBRA && common->optimized_cbracket[GET2(cc, 1 + LI… in detect_early_fail()
1583 prev_count = detect_early_fail(common, cc, private_data_start, depth + 1, prev_count); in detect_early_fail()
1588 if (PRIVATE_DATA(cc) != 0) in detect_early_fail()
1593 cc = end; in detect_early_fail()
1599 SLJIT_ASSERT(PRIVATE_DATA(cc) == 0); in detect_early_fail()
1600 if (cc >= next_alt) in detect_early_fail()
1602 cc += 1 + LINK_SIZE; in detect_early_fail()
1654 if (*cc != OP_ALT && *cc != OP_KET) in detect_early_fail()
1659 cc = next_alt; in detect_early_fail()
1660 next_alt = cc + GET(cc, 1); in detect_early_fail()
1662 while (*cc == OP_ALT); in detect_early_fail()
1667 static int get_class_iterator_size(PCRE2_SPTR cc) in get_class_iterator_size() argument
1671 switch(*cc) in get_class_iterator_size()
1685 min = GET2(cc, 1); in get_class_iterator_size()
1686 max = GET2(cc, 1 + IMM2_SIZE); in get_class_iterator_size()
1688 return (*cc == OP_CRRANGE) ? 2 : 1; in get_class_iterator_size()
1839 PCRE2_SPTR cc = common->start; in set_private_data_ptrs() local
1846 while (cc < ccend) in set_private_data_ptrs()
1855 if (repeat_check && (*cc == OP_ONCE || *cc == OP_BRA || *cc == OP_CBRA || *cc == OP_COND)) in set_private_data_ptrs()
1857 if (detect_repeat(common, cc)) in set_private_data_ptrs()
1861 if (cc >= end) in set_private_data_ptrs()
1862 end = bracketend(cc); in set_private_data_ptrs()
1867 switch(*cc) in set_private_data_ptrs()
1870 if (common->private_data_ptrs[cc + 1 - common->start] != 0) in set_private_data_ptrs()
1872 common->private_data_ptrs[cc - common->start] = private_data_ptr; in set_private_data_ptrs()
1874 cc += common->private_data_ptrs[cc + 1 - common->start]; in set_private_data_ptrs()
1876 cc += 1 + LINK_SIZE; in set_private_data_ptrs()
1890 common->private_data_ptrs[cc - common->start] = private_data_ptr; in set_private_data_ptrs()
1896 common->private_data_ptrs[cc - common->start] = private_data_ptr; in set_private_data_ptrs()
1899 if (find_vreverse(cc)) in set_private_data_ptrs()
1901 common->private_data_ptrs[cc + 1 - common->start] = 1; in set_private_data_ptrs()
1910 common->private_data_ptrs[cc - common->start] = private_data_ptr; in set_private_data_ptrs()
1917 common->private_data_ptrs[cc - common->start] = 0; in set_private_data_ptrs()
1918 alternative = cc + GET(cc, 1); in set_private_data_ptrs()
1921 common->private_data_ptrs[cc - common->start] = private_data_ptr; in set_private_data_ptrs()
1965 if (cc[1] != OP_ANYNL && cc[1] != OP_EXTUNI) in set_private_data_ptrs()
1971 if (cc[1 + IMM2_SIZE] != OP_ANYNL && cc[1 + IMM2_SIZE] != OP_EXTUNI) in set_private_data_ptrs()
1983 space = get_class_iterator_size(cc + size); in set_private_data_ptrs()
1988 size = GET(cc, 1); in set_private_data_ptrs()
1989 space = get_class_iterator_size(cc + size); in set_private_data_ptrs()
1994 cc = next_opcode(common, cc); in set_private_data_ptrs()
1995 SLJIT_ASSERT(cc != NULL); in set_private_data_ptrs()
2001 if (space > 0 && cc >= end) in set_private_data_ptrs()
2003 common->private_data_ptrs[cc - common->start] = private_data_ptr; in set_private_data_ptrs()
2011 cc += -size; in set_private_data_ptrs()
2013 if (common->utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]); in set_private_data_ptrs()
2017 cc += size; in set_private_data_ptrs()
2022 if (cc >= end) in set_private_data_ptrs()
2024 end = bracketend(cc); in set_private_data_ptrs()
2028 cc += bracketlen; in set_private_data_ptrs()
2035 static int get_framesize(compiler_common *common, PCRE2_SPTR cc, PCRE2_SPTR ccend, BOOL recursive, … in get_framesize() argument
2054 ccend = bracketend(cc) - (1 + LINK_SIZE); in get_framesize()
2055 if (!recursive && (*cc == OP_CBRAPOS || *cc == OP_SCBRAPOS)) in get_framesize()
2061 cc = next_opcode(common, cc); in get_framesize()
2064 SLJIT_ASSERT(cc != NULL); in get_framesize()
2065 while (cc < ccend) in get_framesize()
2066 switch(*cc) in get_framesize()
2076 cc += 1; in get_framesize()
2092 cc += 1 + 2 + cc[1]; in get_framesize()
2112 cc += 1 + LINK_SIZE; in get_framesize()
2126 cc += 1 + LINK_SIZE + IMM2_SIZE; in get_framesize()
2133 cc ++; in get_framesize()
2210 cc = next_opcode(common, cc); in get_framesize()
2211 SLJIT_ASSERT(cc != NULL); in get_framesize()
2224 static void init_frame(compiler_common *common, PCRE2_SPTR cc, PCRE2_SPTR ccend, int stackpos, int … in init_frame() argument
2240 ccend = bracketend(cc) - (1 + LINK_SIZE); in init_frame()
2241 if (*cc != OP_CBRAPOS && *cc != OP_SCBRAPOS) in init_frame()
2242 cc = next_opcode(common, cc); in init_frame()
2245 SLJIT_ASSERT(cc != NULL); in init_frame()
2246 while (cc < ccend) in init_frame()
2247 switch(*cc) in init_frame()
2260 cc += 1; in init_frame()
2277 cc += 1 + 2 + cc[1]; in init_frame()
2308 cc += 1 + LINK_SIZE; in init_frame()
2324 offset = (GET2(cc, 1 + LINK_SIZE)) << 1; in init_frame()
2334 cc += 1 + LINK_SIZE + IMM2_SIZE; in init_frame()
2338 cc = next_opcode(common, cc); in init_frame()
2339 SLJIT_ASSERT(cc != NULL); in init_frame()
2453 static int get_recurse_data_length(compiler_common *common, PCRE2_SPTR cc, PCRE2_SPTR ccend, uint32… in get_recurse_data_length() argument
2468 while (cc < ccend) in get_recurse_data_length()
2471 switch(*cc) in get_recurse_data_length()
2476 cc += 1; in get_recurse_data_length()
2486 cc += 1 + LINK_SIZE; in get_recurse_data_length()
2490 offset = PRIVATE_DATA(cc); in get_recurse_data_length()
2495 SLJIT_ASSERT(PRIVATE_DATA(cc + 1) != 0); in get_recurse_data_length()
2496 cc += PRIVATE_DATA(cc + 1); in get_recurse_data_length()
2498 cc += 1 + LINK_SIZE; in get_recurse_data_length()
2513 SLJIT_ASSERT(PRIVATE_DATA(cc) != 0); in get_recurse_data_length()
2514 if (recurse_check_bit(common, PRIVATE_DATA(cc))) in get_recurse_data_length()
2516 cc += 1 + LINK_SIZE; in get_recurse_data_length()
2521 offset = GET2(cc, 1 + LINK_SIZE); in get_recurse_data_length()
2531 cc += 1 + LINK_SIZE + IMM2_SIZE; in get_recurse_data_length()
2536 offset = GET2(cc, 1 + LINK_SIZE); in get_recurse_data_length()
2544 if (recurse_check_bit(common, PRIVATE_DATA(cc))) in get_recurse_data_length()
2548 cc += 1 + LINK_SIZE + IMM2_SIZE; in get_recurse_data_length()
2553 alternative = cc + GET(cc, 1); in get_recurse_data_length()
2554 …native == OP_KETRMAX || *alternative == OP_KETRMIN) && recurse_check_bit(common, PRIVATE_DATA(cc))) in get_recurse_data_length()
2556 cc += 1 + LINK_SIZE; in get_recurse_data_length()
2560 offset = PRIVATE_DATA(cc); in get_recurse_data_length()
2563 cc += 2; in get_recurse_data_length()
2565 if (common->utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]); in get_recurse_data_length()
2570 offset = PRIVATE_DATA(cc); in get_recurse_data_length()
2576 cc += 2; in get_recurse_data_length()
2578 if (common->utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]); in get_recurse_data_length()
2583 offset = PRIVATE_DATA(cc); in get_recurse_data_length()
2589 cc += 2 + IMM2_SIZE; in get_recurse_data_length()
2591 if (common->utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]); in get_recurse_data_length()
2596 offset = PRIVATE_DATA(cc); in get_recurse_data_length()
2599 cc += 1; in get_recurse_data_length()
2603 offset = PRIVATE_DATA(cc); in get_recurse_data_length()
2609 cc += 1; in get_recurse_data_length()
2613 offset = PRIVATE_DATA(cc); in get_recurse_data_length()
2619 cc += 1 + IMM2_SIZE; in get_recurse_data_length()
2626 size = (*cc == OP_XCLASS) ? GET(cc, 1) : 1 + 32 / (int)sizeof(PCRE2_UCHAR); in get_recurse_data_length()
2631 offset = PRIVATE_DATA(cc); in get_recurse_data_length()
2633 length += get_class_iterator_size(cc + size); in get_recurse_data_length()
2634 cc += size; in get_recurse_data_length()
2645 if (*cc != OP_MARK) in get_recurse_data_length()
2648 cc += 1 + 2 + cc[1]; in get_recurse_data_length()
2655 cc++; in get_recurse_data_length()
2660 cc += 1 + 2 + cc[1]; in get_recurse_data_length()
2666 cc++; in get_recurse_data_length()
2672 cc++; in get_recurse_data_length()
2676 cc = next_opcode(common, cc); in get_recurse_data_length()
2677 SLJIT_ASSERT(cc != NULL); in get_recurse_data_length()
2681 SLJIT_ASSERT(cc == ccend); in get_recurse_data_length()
2705 static void copy_recurse_data(compiler_common *common, PCRE2_SPTR cc, PCRE2_SPTR ccend, in copy_recurse_data() argument
2798 while (cc < ccend) in copy_recurse_data()
2804 switch(*cc) in copy_recurse_data()
2813 cc += 1; in copy_recurse_data()
2835 cc += 1 + LINK_SIZE; in copy_recurse_data()
2839 private_srcw[0] = PRIVATE_DATA(cc); in copy_recurse_data()
2844 SLJIT_ASSERT(PRIVATE_DATA(cc + 1) != 0); in copy_recurse_data()
2845 cc += PRIVATE_DATA(cc + 1); in copy_recurse_data()
2847 cc += 1 + LINK_SIZE; in copy_recurse_data()
2862 private_srcw[0] = PRIVATE_DATA(cc); in copy_recurse_data()
2865 cc += 1 + LINK_SIZE; in copy_recurse_data()
2870 offset = GET2(cc, 1 + LINK_SIZE); in copy_recurse_data()
2892 cc += 1 + LINK_SIZE + IMM2_SIZE; in copy_recurse_data()
2897 offset = GET2(cc, 1 + LINK_SIZE); in copy_recurse_data()
2912 private_srcw[0] = PRIVATE_DATA(cc); in copy_recurse_data()
2922 cc += 1 + LINK_SIZE + IMM2_SIZE; in copy_recurse_data()
2927 alternative = cc + GET(cc, 1); in copy_recurse_data()
2930 private_srcw[0] = PRIVATE_DATA(cc); in copy_recurse_data()
2934 cc += 1 + LINK_SIZE; in copy_recurse_data()
2938 private_srcw[0] = PRIVATE_DATA(cc); in copy_recurse_data()
2941 cc += 2; in copy_recurse_data()
2943 if (common->utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]); in copy_recurse_data()
2948 private_srcw[0] = PRIVATE_DATA(cc); in copy_recurse_data()
2955 cc += 2; in copy_recurse_data()
2957 if (common->utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]); in copy_recurse_data()
2962 private_srcw[0] = PRIVATE_DATA(cc); in copy_recurse_data()
2969 cc += 2 + IMM2_SIZE; in copy_recurse_data()
2971 if (common->utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]); in copy_recurse_data()
2976 private_srcw[0] = PRIVATE_DATA(cc); in copy_recurse_data()
2979 cc += 1; in copy_recurse_data()
2983 private_srcw[0] = PRIVATE_DATA(cc); in copy_recurse_data()
2990 cc += 1; in copy_recurse_data()
2994 private_srcw[0] = PRIVATE_DATA(cc); in copy_recurse_data()
3001 cc += 1 + IMM2_SIZE; in copy_recurse_data()
3008 i = (*cc == OP_XCLASS) ? GET(cc, 1) : 1 + 32 / (int)sizeof(PCRE2_UCHAR); in copy_recurse_data()
3012 if (PRIVATE_DATA(cc) != 0) in copy_recurse_data()
3015 private_srcw[0] = PRIVATE_DATA(cc); in copy_recurse_data()
3016 switch(get_class_iterator_size(cc + i)) in copy_recurse_data()
3035 cc += i; in copy_recurse_data()
3053 cc += 1 + 2 + cc[1]; in copy_recurse_data()
3063 cc++; in copy_recurse_data()
3067 cc = next_opcode(common, cc); in copy_recurse_data()
3068 SLJIT_ASSERT(cc != NULL); in copy_recurse_data()
3133 SLJIT_ASSERT(cc == ccend && stackptr == stacktop); in copy_recurse_data()
3138 static SLJIT_INLINE PCRE2_SPTR set_then_offsets(compiler_common *common, PCRE2_SPTR cc, sljit_u8 *c… in set_then_offsets() argument
3140 PCRE2_SPTR end = bracketend(cc); in set_then_offsets()
3141 BOOL has_alternatives = cc[GET(cc, 1)] == OP_ALT; in set_then_offsets()
3144 if (*cc >= OP_ASSERT && *cc <= OP_ASSERTBACK_NA) in set_then_offsets()
3147 if (*cc == OP_COND || *cc == OP_SCOND) in set_then_offsets()
3150 cc = next_opcode(common, cc); in set_then_offsets()
3154 if (*cc == OP_REVERSE) in set_then_offsets()
3155 cc += 1 + IMM2_SIZE; in set_then_offsets()
3156 else if (*cc == OP_VREVERSE) in set_then_offsets()
3157 cc += 1 + 2 * IMM2_SIZE; in set_then_offsets()
3159 current_offset = common->then_offsets + (cc - common->start); in set_then_offsets()
3162 while (cc < end) in set_then_offsets()
3164 if ((*cc >= OP_ASSERT && *cc <= OP_ASSERTBACK_NA) || (*cc >= OP_ONCE && *cc <= OP_SCOND)) in set_then_offsets()
3165 cc = set_then_offsets(common, cc, current_offset); in set_then_offsets()
3168 if (*cc == OP_ALT && has_alternatives) in set_then_offsets()
3170 cc += 1 + LINK_SIZE; in set_then_offsets()
3172 if (*cc == OP_REVERSE) in set_then_offsets()
3173 cc += 1 + IMM2_SIZE; in set_then_offsets()
3174 else if (*cc == OP_VREVERSE) in set_then_offsets()
3175 cc += 1 + 2 * IMM2_SIZE; in set_then_offsets()
3177 current_offset = common->then_offsets + (cc - common->start); in set_then_offsets()
3181 if (*cc >= OP_THEN && *cc <= OP_THEN_ARG && current_offset != NULL) in set_then_offsets()
3183 cc = next_opcode(common, cc); in set_then_offsets()
3632 static SLJIT_INLINE BOOL char_has_othercase(compiler_common *common, PCRE2_SPTR cc) in char_has_othercase() argument
3642 GETCHAR(c, cc); in char_has_othercase()
3645 c = *cc; in char_has_othercase()
3654 c = *cc; in char_has_othercase()
3668 static unsigned int char_get_othercase_bit(compiler_common *common, PCRE2_SPTR cc) in char_get_othercase_bit() argument
3681 GETCHAR(c, cc); in char_get_othercase_bit()
3684 c = *cc; in char_get_othercase_bit()
3693 c = *cc; in char_get_othercase_bit()
3697 c = *cc; in char_get_othercase_bit()
3717 n = GET_EXTRALEN(*cc); in char_get_othercase_bit()
5592 static int scan_prefix(compiler_common *common, PCRE2_SPTR cc, fast_forward_char_data *chars, int m… in scan_prefix() argument
5620 switch (*cc) in scan_prefix()
5627 cc++; in scan_prefix()
5644 cc++; in scan_prefix()
5653 cc = bracketend(cc); in scan_prefix()
5664 cc++; in scan_prefix()
5671 repeat = GET2(cc, 1); in scan_prefix()
5673 cc += 1 + IMM2_SIZE; in scan_prefix()
5685 cc++; in scan_prefix()
5687 if (common->utf && HAS_EXTRALEN(*cc)) len += GET_EXTRALEN(*cc); in scan_prefix()
5689 max_chars = scan_prefix(common, cc + len, chars, max_chars, rec_count); in scan_prefix()
5696 cc += 1 + LINK_SIZE; in scan_prefix()
5700 cc += GET(cc, 1); in scan_prefix()
5708 alternative = cc + GET(cc, 1); in scan_prefix()
5717 if (*cc == OP_CBRA || *cc == OP_CBRAPOS) in scan_prefix()
5718 cc += IMM2_SIZE; in scan_prefix()
5719 cc += 1 + LINK_SIZE; in scan_prefix()
5724 if (common->utf && !is_char7_bitset((const sljit_u8 *)(cc + 1), FALSE)) in scan_prefix()
5743 cc += GET(cc, 1); in scan_prefix()
5753 cc++; in scan_prefix()
5762 cc++; in scan_prefix()
5771 cc++; in scan_prefix()
5776 cc++; in scan_prefix()
5787 cc++; in scan_prefix()
5797 cc += 1 + 2; in scan_prefix()
5802 repeat = GET2(cc, 1); in scan_prefix()
5803 cc += 1 + IMM2_SIZE; in scan_prefix()
5812 repeat = GET2(cc, 1); in scan_prefix()
5813 cc += 1 + IMM2_SIZE + 1; in scan_prefix()
5839 bytes = (sljit_u8*) (cc + 1); in scan_prefix()
5840 cc += 1 + 32 / sizeof(PCRE2_UCHAR); in scan_prefix()
5842 switch (*cc) in scan_prefix()
5850 max_chars = scan_prefix(common, cc + 1, chars, max_chars, rec_count); in scan_prefix()
5864 repeat = GET2(cc, 1); in scan_prefix()
5908 switch (*cc) in scan_prefix()
5918 cc++; in scan_prefix()
5924 if (GET2(cc, 1) != GET2(cc, 1 + IMM2_SIZE)) in scan_prefix()
5926 cc += 1 + 2 * IMM2_SIZE; in scan_prefix()
5936 if (common->utf && HAS_EXTRALEN(*cc)) len += GET_EXTRALEN(*cc); in scan_prefix()
5939 if (caseless && char_has_othercase(common, cc)) in scan_prefix()
5944 GETCHAR(chr, cc); in scan_prefix()
5951 chr = *cc; in scan_prefix()
5956 othercase[0] = (chr == (PCRE2_UCHAR)chr) ? chr : *cc; in scan_prefix()
5970 cc_save = cc; in scan_prefix()
5979 chr = *cc; in scan_prefix()
5980 add_prefix_char(*cc, chars, len == 0); in scan_prefix()
5988 cc++; in scan_prefix()
5997 cc = cc_save; in scan_prefix()
7479 static PCRE2_SPTR byte_sequence_compare(compiler_common *common, BOOL caseless, PCRE2_SPTR cc, in byte_sequence_compare() argument
7489 if (caseless && char_has_othercase(common, cc)) in byte_sequence_compare()
7491 othercasebit = char_get_othercase_bit(common, cc); in byte_sequence_compare()
7495 othercasechar = cc + (othercasebit >> 8); in byte_sequence_compare()
7502 othercasechar = cc + (othercasebit >> 9); in byte_sequence_compare()
7536 if (common->utf && HAS_EXTRALEN(*cc)) in byte_sequence_compare()
7537 utflength += GET_EXTRALEN(*cc); in byte_sequence_compare()
7547 if (othercasebit != 0 && othercasechar == cc) in byte_sequence_compare()
7549 context->c.asuchars[context->ucharptr] = *cc | othercasebit; in byte_sequence_compare()
7554 context->c.asuchars[context->ucharptr] = *cc; in byte_sequence_compare()
7612 if (othercasebit != 0 && othercasechar == cc) in byte_sequence_compare()
7615 …add_jump(compiler, backtracks, CMP(SLJIT_NOT_EQUAL, context->sourcereg, 0, SLJIT_IMM, *cc | otherc… in byte_sequence_compare()
7618 add_jump(compiler, backtracks, CMP(SLJIT_NOT_EQUAL, context->sourcereg, 0, SLJIT_IMM, *cc)); in byte_sequence_compare()
7622 cc++; in byte_sequence_compare()
7629 return cc; in byte_sequence_compare()
7644 …e_char1_matchingpath(compiler_common *common, PCRE2_UCHAR type, PCRE2_SPTR cc, jump_list **backtra…
7660 static void compile_xclass_matchingpath(compiler_common *common, PCRE2_SPTR cc, jump_list **backtra… in compile_xclass_matchingpath() argument
7664 jump_list **list = (cc[0] & XCL_NOT) == 0 ? &found : backtracks; in compile_xclass_matchingpath()
7682 cc++; in compile_xclass_matchingpath()
7683 ccbegin = cc; in compile_xclass_matchingpath()
7686 if (cc[-1] & XCL_MAP) in compile_xclass_matchingpath()
7689 cc += 32 / sizeof(PCRE2_UCHAR); in compile_xclass_matchingpath()
7692 while (*cc != XCL_END) in compile_xclass_matchingpath()
7696 if (*cc == XCL_SINGLE) in compile_xclass_matchingpath()
7698 cc ++; in compile_xclass_matchingpath()
7699 GETCHARINCTEST(c, cc); in compile_xclass_matchingpath()
7706 else if (*cc == XCL_RANGE) in compile_xclass_matchingpath()
7708 cc ++; in compile_xclass_matchingpath()
7709 GETCHARINCTEST(c, cc); in compile_xclass_matchingpath()
7711 GETCHARINCTEST(c, cc); in compile_xclass_matchingpath()
7720 SLJIT_ASSERT(*cc == XCL_PROP || *cc == XCL_NOTPROP); in compile_xclass_matchingpath()
7721 cc++; in compile_xclass_matchingpath()
7723 if (*cc == PT_CLIST && cc[-1] == XCL_PROP) in compile_xclass_matchingpath()
7725 other_cases = PRIV(ucd_caseless_sets) + cc[1]; in compile_xclass_matchingpath()
7741 switch(*cc) in compile_xclass_matchingpath()
7745 if (cc[-1] == XCL_PROP) in compile_xclass_matchingpath()
7756 …items = UCPCAT_RANGE(PRIV(ucp_typerange)[(int)cc[1] * 2], PRIV(ucp_typerange)[(int)cc[1] * 2 + 1]); in compile_xclass_matchingpath()
7760 items = UCPCAT(cc[1]); in compile_xclass_matchingpath()
7773 if (cc[-1] == XCL_NOTPROP) in compile_xclass_matchingpath()
7814 if (cc[-1] == XCL_NOTPROP) in compile_xclass_matchingpath()
7821 cc += 2; in compile_xclass_matchingpath()
7830 compile_char1_matchingpath(common, OP_ALLANY, cc, backtracks, FALSE); in compile_xclass_matchingpath()
7839 compile_char1_matchingpath(common, OP_ALLANY, cc, backtracks, FALSE); in compile_xclass_matchingpath()
7849 cc = ccbegin; in compile_xclass_matchingpath()
7850 if ((cc[-1] & XCL_NOT) != 0) in compile_xclass_matchingpath()
7861 if ((cc[-1] & XCL_HASPROP) == 0) in compile_xclass_matchingpath()
7863 if ((cc[-1] & XCL_MAP) != 0) in compile_xclass_matchingpath()
7866 …if (!optimize_class(common, (const sljit_u8 *)cc, (((const sljit_u8 *)cc)[31] & 0x80) != 0, TRUE, … in compile_xclass_matchingpath()
7870 OP1(SLJIT_MOV_U8, TMP1, 0, SLJIT_MEM1(TMP1), (sljit_sw)cc); in compile_xclass_matchingpath()
7879 cc += 32 / sizeof(PCRE2_UCHAR); in compile_xclass_matchingpath()
7884 …add_jump(compiler, (cc[-1] & XCL_NOT) == 0 ? backtracks : &found, CMP(SLJIT_GREATER, TMP2, 0, SLJI… in compile_xclass_matchingpath()
7887 else if ((cc[-1] & XCL_MAP) != 0) in compile_xclass_matchingpath()
7893 if (!optimize_class(common, (const sljit_u8 *)cc, FALSE, TRUE, list)) in compile_xclass_matchingpath()
7903 OP1(SLJIT_MOV_U8, TMP1, 0, SLJIT_MEM1(TMP1), (sljit_sw)cc); in compile_xclass_matchingpath()
7915 cc += 32 / sizeof(PCRE2_UCHAR); in compile_xclass_matchingpath()
7945 ccbegin = cc; in compile_xclass_matchingpath()
7955 while (*cc != XCL_END) in compile_xclass_matchingpath()
7957 if (*cc == XCL_SINGLE) in compile_xclass_matchingpath()
7959 cc ++; in compile_xclass_matchingpath()
7960 GETCHARINCTEST(c, cc); in compile_xclass_matchingpath()
7962 else if (*cc == XCL_RANGE) in compile_xclass_matchingpath()
7964 cc ++; in compile_xclass_matchingpath()
7965 GETCHARINCTEST(c, cc); in compile_xclass_matchingpath()
7966 GETCHARINCTEST(c, cc); in compile_xclass_matchingpath()
7970 SLJIT_ASSERT(*cc == XCL_PROP || *cc == XCL_NOTPROP); in compile_xclass_matchingpath()
7971 cc++; in compile_xclass_matchingpath()
7972 if (*cc == PT_BIDICL) in compile_xclass_matchingpath()
7976 if (cc[-1] == XCL_NOTPROP) in compile_xclass_matchingpath()
7978 jump = CMP(SLJIT_EQUAL ^ invertcmp, TMP1, 0, SLJIT_IMM, (int)cc[1]); in compile_xclass_matchingpath()
7981 cc += 2; in compile_xclass_matchingpath()
7985 cc = ccbegin; in compile_xclass_matchingpath()
7994 while (*cc != XCL_END) in compile_xclass_matchingpath()
7996 if (*cc == XCL_SINGLE) in compile_xclass_matchingpath()
7998 cc ++; in compile_xclass_matchingpath()
7999 GETCHARINCTEST(c, cc); in compile_xclass_matchingpath()
8001 else if (*cc == XCL_RANGE) in compile_xclass_matchingpath()
8003 cc ++; in compile_xclass_matchingpath()
8004 GETCHARINCTEST(c, cc); in compile_xclass_matchingpath()
8005 GETCHARINCTEST(c, cc); in compile_xclass_matchingpath()
8009 SLJIT_ASSERT(*cc == XCL_PROP || *cc == XCL_NOTPROP); in compile_xclass_matchingpath()
8010 cc++; in compile_xclass_matchingpath()
8011 if (*cc == PT_BOOL) in compile_xclass_matchingpath()
8015 if (cc[-1] == XCL_NOTPROP) in compile_xclass_matchingpath()
8018 …JIT_MEM1(TMP1), (sljit_sw)(PRIV(ucd_boolprop_sets) + (cc[1] >> 5)), SLJIT_IMM, (sljit_sw)(1u << (c… in compile_xclass_matchingpath()
8021 cc += 2; in compile_xclass_matchingpath()
8025 cc = ccbegin; in compile_xclass_matchingpath()
8032 while (*cc != XCL_END) in compile_xclass_matchingpath()
8034 if (*cc == XCL_SINGLE) in compile_xclass_matchingpath()
8036 cc ++; in compile_xclass_matchingpath()
8037 GETCHARINCTEST(c, cc); in compile_xclass_matchingpath()
8039 else if (*cc == XCL_RANGE) in compile_xclass_matchingpath()
8041 cc ++; in compile_xclass_matchingpath()
8042 GETCHARINCTEST(c, cc); in compile_xclass_matchingpath()
8043 GETCHARINCTEST(c, cc); in compile_xclass_matchingpath()
8047 SLJIT_ASSERT(*cc == XCL_PROP || *cc == XCL_NOTPROP); in compile_xclass_matchingpath()
8048 cc++; in compile_xclass_matchingpath()
8049 switch (*cc) in compile_xclass_matchingpath()
8052 if (cc[-1] == XCL_NOTPROP) in compile_xclass_matchingpath()
8059 if (cc[-1] == XCL_NOTPROP) in compile_xclass_matchingpath()
8062 …r, compares > 0 ? list : backtracks, CMP(SLJIT_EQUAL ^ invertcmp, TMP1, 0, SLJIT_IMM, (int)cc[1])); in compile_xclass_matchingpath()
8064 cc += 2; in compile_xclass_matchingpath()
8068 cc = ccbegin; in compile_xclass_matchingpath()
8095 while (*cc != XCL_END) in compile_xclass_matchingpath()
8097 if (*cc == XCL_SINGLE) in compile_xclass_matchingpath()
8099 cc ++; in compile_xclass_matchingpath()
8100 GETCHARINCTEST(c, cc); in compile_xclass_matchingpath()
8102 else if (*cc == XCL_RANGE) in compile_xclass_matchingpath()
8104 cc ++; in compile_xclass_matchingpath()
8105 GETCHARINCTEST(c, cc); in compile_xclass_matchingpath()
8106 GETCHARINCTEST(c, cc); in compile_xclass_matchingpath()
8110 SLJIT_ASSERT(*cc == XCL_PROP || *cc == XCL_NOTPROP); in compile_xclass_matchingpath()
8111 cc++; in compile_xclass_matchingpath()
8112 if (*cc == PT_SCX) in compile_xclass_matchingpath()
8118 if (cc[-1] == XCL_NOTPROP) in compile_xclass_matchingpath()
8120 jump = CMP(SLJIT_EQUAL, TMP2, 0, SLJIT_IMM, (int)cc[1]); in compile_xclass_matchingpath()
8129 …SLJIT_MEM1(TMP1), (sljit_sw)(PRIV(ucd_script_sets) + (cc[1] >> 5)), SLJIT_IMM, (sljit_sw)(1u << (c… in compile_xclass_matchingpath()
8135 cc += 2; in compile_xclass_matchingpath()
8143 cc = ccbegin; in compile_xclass_matchingpath()
8172 while (*cc != XCL_END) in compile_xclass_matchingpath()
8178 if (*cc == XCL_SINGLE) in compile_xclass_matchingpath()
8180 cc ++; in compile_xclass_matchingpath()
8181 GETCHARINCTEST(c, cc); in compile_xclass_matchingpath()
8183 if (numberofcmps < 3 && (*cc == XCL_SINGLE || *cc == XCL_RANGE)) in compile_xclass_matchingpath()
8202 else if (*cc == XCL_RANGE) in compile_xclass_matchingpath()
8204 cc ++; in compile_xclass_matchingpath()
8205 GETCHARINCTEST(c, cc); in compile_xclass_matchingpath()
8207 GETCHARINCTEST(c, cc); in compile_xclass_matchingpath()
8209 if (numberofcmps < 3 && (*cc == XCL_SINGLE || *cc == XCL_RANGE)) in compile_xclass_matchingpath()
8231 SLJIT_ASSERT(*cc == XCL_PROP || *cc == XCL_NOTPROP); in compile_xclass_matchingpath()
8232 if (*cc == XCL_NOTPROP) in compile_xclass_matchingpath()
8234 cc++; in compile_xclass_matchingpath()
8235 switch(*cc) in compile_xclass_matchingpath()
8269 other_cases = PRIV(ucd_caseless_sets) + cc[1]; in compile_xclass_matchingpath()
8435 cc += 2; in compile_xclass_matchingpath()
8453 …sertion_matchingpath(compiler_common *common, PCRE2_UCHAR type, PCRE2_SPTR cc, jump_list **backtra… in compile_simple_assertion_matchingpath() argument
8469 return cc; in compile_simple_assertion_matchingpath()
8480 return cc; in compile_simple_assertion_matchingpath()
8491 return cc; in compile_simple_assertion_matchingpath()
8496 return cc; in compile_simple_assertion_matchingpath()
8566 return cc; in compile_simple_assertion_matchingpath()
8572 return cc; in compile_simple_assertion_matchingpath()
8585 compile_simple_assertion_matchingpath(common, OP_EODN, cc, backtracks); in compile_simple_assertion_matchingpath()
8591 return cc; in compile_simple_assertion_matchingpath()
8633 return cc; in compile_simple_assertion_matchingpath()
8651 return cc; in compile_simple_assertion_matchingpath()
8690 return cc; in compile_simple_assertion_matchingpath()
8693 return cc; in compile_simple_assertion_matchingpath()
8704 static PCRE2_SPTR SLJIT_FUNC do_extuni_utf(jit_arguments *args, PCRE2_SPTR cc) in do_extuni_utf() argument
8714 prevcc = cc; in do_extuni_utf()
8718 GETCHARINC(c, cc); in do_extuni_utf()
8724 endcc = cc; in do_extuni_utf()
8774 endcc = cc; in do_extuni_utf()
8776 while (cc < end_subject); in do_extuni_utf()
8787 static PCRE2_SPTR SLJIT_FUNC do_extuni_utf_invalid(jit_arguments *args, PCRE2_SPTR cc) in do_extuni_utf_invalid() argument
8797 prevcc = cc; in do_extuni_utf_invalid()
8801 GETCHARINC_INVALID(c, cc, end_subject, break); in do_extuni_utf_invalid()
8807 endcc = cc; in do_extuni_utf_invalid()
8856 endcc = cc; in do_extuni_utf_invalid()
8858 while (cc < end_subject); in do_extuni_utf_invalid()
8867 static PCRE2_SPTR SLJIT_FUNC do_extuni_no_utf(jit_arguments *args, PCRE2_SPTR cc) in do_extuni_no_utf() argument
8878 c = *cc++; in do_extuni_no_utf()
8882 return cc; in do_extuni_no_utf()
8886 while (cc < end_subject) in do_extuni_no_utf()
8888 c = *cc; in do_extuni_no_utf()
8910 bptr = cc - 1; in do_extuni_no_utf()
8942 cc++; in do_extuni_no_utf()
8945 return cc; in do_extuni_no_utf()
8950 …e_char1_matchingpath(compiler_common *common, PCRE2_UCHAR type, PCRE2_SPTR cc, jump_list **backtra… in compile_char1_matchingpath() argument
8978 return cc; in compile_char1_matchingpath()
8992 return cc; in compile_char1_matchingpath()
9006 return cc; in compile_char1_matchingpath()
9028 return cc; in compile_char1_matchingpath()
9037 return cc; in compile_char1_matchingpath()
9042 return cc; in compile_char1_matchingpath()
9048 return cc; in compile_char1_matchingpath()
9055 propdata[2] = cc[0]; in compile_char1_matchingpath()
9056 propdata[3] = cc[1]; in compile_char1_matchingpath()
9061 return cc + 2; in compile_char1_matchingpath()
9084 return cc; in compile_char1_matchingpath()
9099 return cc; in compile_char1_matchingpath()
9114 return cc; in compile_char1_matchingpath()
9145 return cc; in compile_char1_matchingpath()
9152 if (common->utf && HAS_EXTRALEN(*cc)) length += GET_EXTRALEN(*cc); in compile_char1_matchingpath()
9158 if (type == OP_CHAR || !char_has_othercase(common, cc) || char_get_othercase_bit(common, cc) != 0) in compile_char1_matchingpath()
9169 return byte_sequence_compare(common, type == OP_CHARI, cc, &context, backtracks); in compile_char1_matchingpath()
9175 GETCHAR(c, cc); in compile_char1_matchingpath()
9179 c = *cc; in compile_char1_matchingpath()
9181 SLJIT_ASSERT(type == OP_CHARI && char_has_othercase(common, cc)); in compile_char1_matchingpath()
9203 return cc + length; in compile_char1_matchingpath()
9215 c = *cc; in compile_char1_matchingpath()
9219 if (type == OP_NOT || !char_has_othercase(common, cc)) in compile_char1_matchingpath()
9233 return cc + 1; in compile_char1_matchingpath()
9238 GETCHARLEN(c, cc, length); in compile_char1_matchingpath()
9243 c = *cc; in compile_char1_matchingpath()
9245 if (type == OP_NOT || !char_has_othercase(common, cc)) in compile_char1_matchingpath()
9266 return cc + length; in compile_char1_matchingpath()
9274 bit = (common->utf && is_char7_bitset((const sljit_u8 *)cc, type == OP_NCLASS)) ? 127 : 255; in compile_char1_matchingpath()
9286 if (optimize_class(common, (const sljit_u8 *)cc, type == OP_NCLASS, FALSE, backtracks)) in compile_char1_matchingpath()
9287 return cc + 32 / sizeof(PCRE2_UCHAR); in compile_char1_matchingpath()
9311 OP1(SLJIT_MOV_U8, TMP1, 0, SLJIT_MEM1(TMP1), (sljit_sw)cc); in compile_char1_matchingpath()
9320 return cc + 32 / sizeof(PCRE2_UCHAR); in compile_char1_matchingpath()
9326 compile_xclass_matchingpath(common, cc + LINK_SIZE, backtracks); in compile_char1_matchingpath()
9327 return cc + GET(cc, 0) - 1; in compile_char1_matchingpath()
9331 return cc; in compile_char1_matchingpath()
9334 static SLJIT_INLINE PCRE2_SPTR compile_charn_matchingpath(compiler_common *common, PCRE2_SPTR cc, P… in compile_charn_matchingpath() argument
9339 PCRE2_SPTR ccbegin = cc; in compile_charn_matchingpath()
9346 if (cc >= ccend) in compile_charn_matchingpath()
9349 if (*cc == OP_CHAR) in compile_charn_matchingpath()
9353 if (common->utf && HAS_EXTRALEN(cc[1])) in compile_charn_matchingpath()
9354 size += GET_EXTRALEN(cc[1]); in compile_charn_matchingpath()
9357 else if (*cc == OP_CHARI) in compile_charn_matchingpath()
9363 if (char_has_othercase(common, cc + 1) && char_get_othercase_bit(common, cc + 1) == 0) in compile_charn_matchingpath()
9365 else if (HAS_EXTRALEN(cc[1])) in compile_charn_matchingpath()
9366 size += GET_EXTRALEN(cc[1]); in compile_charn_matchingpath()
9370 if (char_has_othercase(common, cc + 1) && char_get_othercase_bit(common, cc + 1) == 0) in compile_charn_matchingpath()
9376 cc += 1 + size; in compile_charn_matchingpath()
9381 cc = ccbegin; in compile_charn_matchingpath()
9392 …do cc = byte_sequence_compare(common, *cc == OP_CHARI, cc + 1, &context, backtracks); while (conte… in compile_charn_matchingpath()
9393 return cc; in compile_charn_matchingpath()
9397 return compile_char1_matchingpath(common, *cc, cc + 1, backtracks, TRUE); in compile_charn_matchingpath()
9412 backtrack->cc = (ccstart); \
9425 backtrack->cc = (ccstart); \
9432 static void compile_dnref_search(compiler_common *common, PCRE2_SPTR cc, jump_list **backtracks) in compile_dnref_search() argument
9436 int count = GET2(cc, 1 + IMM2_SIZE); in compile_dnref_search()
9437 PCRE2_SPTR slot = common->name_table + GET2(cc, 1) * common->name_entry_size; in compile_dnref_search()
9441 SLJIT_ASSERT(*cc == OP_DNREF || *cc == OP_DNREFI); in compile_dnref_search()
9462 static void compile_ref_matchingpath(compiler_common *common, PCRE2_SPTR cc, jump_list **backtracks… in compile_ref_matchingpath() argument
9465 BOOL ref = (*cc == OP_REF || *cc == OP_REFI); in compile_ref_matchingpath()
9481 offset = GET2(cc, 1) << 1; in compile_ref_matchingpath()
9491 if (common->utf && *cc == OP_REFI) in compile_ref_matchingpath()
9597 …add_jump(compiler, *cc == OP_REF ? &common->casefulcmp : &common->caselesscmp, JUMP(SLJIT_FAST_CAL… in compile_ref_matchingpath()
9609 …add_jump(compiler, *cc == OP_REF ? &common->casefulcmp : &common->caselesscmp, JUMP(SLJIT_FAST_CAL… in compile_ref_matchingpath()
9627 …SPTR compile_ref_iterator_matchingpath(compiler_common *common, PCRE2_SPTR cc, backtrack_common *p… in compile_ref_iterator_matchingpath() argument
9630 BOOL ref = (*cc == OP_REF || *cc == OP_REFI); in compile_ref_iterator_matchingpath()
9637 PCRE2_SPTR ccbegin = cc; in compile_ref_iterator_matchingpath()
9641 PUSH_BACKTRACK(sizeof(ref_iterator_backtrack), cc, NULL); in compile_ref_iterator_matchingpath()
9644 offset = GET2(cc, 1) << 1; in compile_ref_iterator_matchingpath()
9646 cc += IMM2_SIZE; in compile_ref_iterator_matchingpath()
9647 type = cc[1 + IMM2_SIZE]; in compile_ref_iterator_matchingpath()
9657 cc += 1 + IMM2_SIZE + 1; in compile_ref_iterator_matchingpath()
9663 cc += 1 + IMM2_SIZE + 1; in compile_ref_iterator_matchingpath()
9669 cc += 1 + IMM2_SIZE + 1; in compile_ref_iterator_matchingpath()
9673 min = GET2(cc, 1 + IMM2_SIZE + 1); in compile_ref_iterator_matchingpath()
9674 max = GET2(cc, 1 + IMM2_SIZE + 1 + IMM2_SIZE); in compile_ref_iterator_matchingpath()
9675 cc += 1 + IMM2_SIZE + 1 + 2 * IMM2_SIZE; in compile_ref_iterator_matchingpath()
9766 return cc; in compile_ref_iterator_matchingpath()
9834 return cc; in compile_ref_iterator_matchingpath()
9837 static SLJIT_INLINE PCRE2_SPTR compile_recurse_matchingpath(compiler_common *common, PCRE2_SPTR cc,… in compile_recurse_matchingpath() argument
9843 sljit_sw start = GET(cc, 1); in compile_recurse_matchingpath()
9847 PUSH_BACKTRACK(sizeof(recurse_backtrack), cc, NULL); in compile_recurse_matchingpath()
9855 return cc + 1 + LINK_SIZE; in compile_recurse_matchingpath()
9893 return cc + 1 + LINK_SIZE; in compile_recurse_matchingpath()
9953 static SLJIT_INLINE PCRE2_SPTR compile_callout_matchingpath(compiler_common *common, PCRE2_SPTR cc,… in compile_callout_matchingpath() argument
9958 unsigned int callout_length = (*cc == OP_CALLOUT) in compile_callout_matchingpath()
9959 ? PRIV(OP_lengths)[OP_CALLOUT] : GET(cc, 1 + 2 * LINK_SIZE); in compile_callout_matchingpath()
9965 PUSH_BACKTRACK(sizeof(backtrack_common), cc, NULL); in compile_callout_matchingpath()
9974 value1 = (*cc == OP_CALLOUT) ? cc[1 + 2 * LINK_SIZE] : 0; in compile_callout_matchingpath()
9985 OP1(mov_opcode, SLJIT_MEM1(STACK_TOP), CALLOUT_ARG_OFFSET(pattern_position), SLJIT_IMM, GET(cc, 1)); in compile_callout_matchingpath()
9986 OP1(mov_opcode, SLJIT_MEM1(STACK_TOP), CALLOUT_ARG_OFFSET(next_item_length), SLJIT_IMM, GET(cc, 1 +… in compile_callout_matchingpath()
9988 if (*cc == OP_CALLOUT) in compile_callout_matchingpath()
9996 value1 = (sljit_sw) (cc + (1 + 4*LINK_SIZE) + 1); in compile_callout_matchingpath()
9998 value3 = (sljit_sw) (GET(cc, 1 + 3*LINK_SIZE)); in compile_callout_matchingpath()
10024 return cc + callout_length; in compile_callout_matchingpath()
10030 static PCRE2_SPTR compile_reverse_matchingpath(compiler_common *common, PCRE2_SPTR cc, backtrack_co… in compile_reverse_matchingpath() argument
10043 if (*cc == OP_REVERSE) in compile_reverse_matchingpath()
10046 lmin = GET2(cc, 1); in compile_reverse_matchingpath()
10048 cc += 1 + IMM2_SIZE; in compile_reverse_matchingpath()
10054 SLJIT_ASSERT(*cc == OP_VREVERSE); in compile_reverse_matchingpath()
10055 PUSH_BACKTRACK(sizeof(vreverse_backtrack), cc, NULL); in compile_reverse_matchingpath()
10058 lmin = GET2(cc, 1); in compile_reverse_matchingpath()
10059 lmax = GET2(cc, 1 + IMM2_SIZE); in compile_reverse_matchingpath()
10060 cc += 1 + 2 * IMM2_SIZE; in compile_reverse_matchingpath()
10127 return cc; in compile_reverse_matchingpath()
10130 static SLJIT_INLINE BOOL assert_needs_str_ptr_saving(PCRE2_SPTR cc) in assert_needs_str_ptr_saving() argument
10134 switch (*cc) in assert_needs_str_ptr_saving()
10137 cc += GET(cc, 1 + 2*LINK_SIZE); in assert_needs_str_ptr_saving()
10150 cc += PRIV(OP_lengths)[*cc]; in assert_needs_str_ptr_saving()
10162 static PCRE2_SPTR compile_assert_matchingpath(compiler_common *common, PCRE2_SPTR cc, assert_backtr… in compile_assert_matchingpath() argument
10194 if (*cc == OP_BRAZERO || *cc == OP_BRAMINZERO) in compile_assert_matchingpath()
10197 bra = *cc; in compile_assert_matchingpath()
10198 cc++; in compile_assert_matchingpath()
10201 private_data_ptr = PRIVATE_DATA(cc); in compile_assert_matchingpath()
10203 framesize = get_framesize(common, cc, NULL, FALSE, &needs_control_head); in compile_assert_matchingpath()
10206 opcode = *cc; in compile_assert_matchingpath()
10209 ccbegin = cc; in compile_assert_matchingpath()
10210 cc += GET(cc, 1); in compile_assert_matchingpath()
10307 altbacktrack.cc = ccbegin; in compile_assert_matchingpath()
10314 compile_matchingpath(common, ccbegin, cc, &altbacktrack); in compile_assert_matchingpath()
10429 if (*cc != OP_ALT) in compile_assert_matchingpath()
10432 ccbegin = cc; in compile_assert_matchingpath()
10433 cc += GET(cc, 1); in compile_assert_matchingpath()
10630 return cc + 1 + LINK_SIZE; in compile_assert_matchingpath()
10795 static PCRE2_SPTR compile_bracket_matchingpath(compiler_common *common, PCRE2_SPTR cc, backtrack_co… in compile_bracket_matchingpath() argument
10819 PUSH_BACKTRACK(sizeof(bracket_backtrack), cc, NULL); in compile_bracket_matchingpath()
10821 if (*cc == OP_BRAZERO || *cc == OP_BRAMINZERO) in compile_bracket_matchingpath()
10823 bra = *cc; in compile_bracket_matchingpath()
10824 cc++; in compile_bracket_matchingpath()
10825 opcode = *cc; in compile_bracket_matchingpath()
10828 opcode = *cc; in compile_bracket_matchingpath()
10829 ccbegin = cc; in compile_bracket_matchingpath()
10830 matchingpath = bracketend(cc) - 1 - LINK_SIZE; in compile_bracket_matchingpath()
10848 cc += GET(cc, 1); in compile_bracket_matchingpath()
10850 has_alternatives = *cc == OP_ALT; in compile_bracket_matchingpath()
10858 if (SLJIT_UNLIKELY(opcode == OP_COND) && (*cc == OP_KETRMAX || *cc == OP_KETRMIN)) in compile_bracket_matchingpath()
11180 if (*cc == OP_ALT) in compile_bracket_matchingpath()
11182 matchingpath = cc + 1 + LINK_SIZE; in compile_bracket_matchingpath()
11183 cc += GET(cc, 1); in compile_bracket_matchingpath()
11186 matchingpath = cc; in compile_bracket_matchingpath()
11197 assert->common.cc = matchingpath; in compile_bracket_matchingpath()
11203 compile_matchingpath(common, matchingpath, cc, backtrack); in compile_bracket_matchingpath()
11274 while (*cc == OP_ALT) in compile_bracket_matchingpath()
11276 cc += GET(cc, 1); in compile_bracket_matchingpath()
11377 cc += 1 + LINK_SIZE; in compile_bracket_matchingpath()
11391 return cc + repeat_length; in compile_bracket_matchingpath()
11394 static PCRE2_SPTR compile_bracketpos_matchingpath(compiler_common *common, PCRE2_SPTR cc, backtrack… in compile_bracketpos_matchingpath() argument
11411 PUSH_BACKTRACK(sizeof(bracketpos_backtrack), cc, NULL); in compile_bracketpos_matchingpath()
11412 if (*cc == OP_BRAPOSZERO) in compile_bracketpos_matchingpath()
11415 cc++; in compile_bracketpos_matchingpath()
11418 opcode = *cc; in compile_bracketpos_matchingpath()
11419 private_data_ptr = PRIVATE_DATA(cc); in compile_bracketpos_matchingpath()
11426 ccbegin = cc + 1 + LINK_SIZE; in compile_bracketpos_matchingpath()
11431 offset = GET2(cc, 1 + LINK_SIZE); in compile_bracketpos_matchingpath()
11437 ccbegin = cc + 1 + LINK_SIZE + IMM2_SIZE; in compile_bracketpos_matchingpath()
11445 framesize = get_framesize(common, cc, NULL, FALSE, &needs_control_head); in compile_bracketpos_matchingpath()
11538 init_frame(common, cc, NULL, stacksize - 1, stacksize - framesize); in compile_bracketpos_matchingpath()
11546 while (*cc != OP_KETRPOS) in compile_bracketpos_matchingpath()
11550 cc += GET(cc, 1); in compile_bracketpos_matchingpath()
11552 compile_matchingpath(common, ccbegin, cc, backtrack); in compile_bracketpos_matchingpath()
11644 if (*cc == OP_KETRPOS) in compile_bracketpos_matchingpath()
11655 if (*cc == OP_KETRPOS) in compile_bracketpos_matchingpath()
11657 ccbegin = cc + 1 + LINK_SIZE; in compile_bracketpos_matchingpath()
11674 return cc + 1 + LINK_SIZE; in compile_bracketpos_matchingpath()
11677 static SLJIT_INLINE PCRE2_SPTR get_iterator_parameters(compiler_common *common, PCRE2_SPTR cc, PCRE… in get_iterator_parameters() argument
11681 *opcode = *cc; in get_iterator_parameters()
11686 cc++; in get_iterator_parameters()
11691 cc++; in get_iterator_parameters()
11697 cc++; in get_iterator_parameters()
11703 cc++; in get_iterator_parameters()
11709 cc++; in get_iterator_parameters()
11717 cc++; in get_iterator_parameters()
11718 class_len = (*type < OP_XCLASS) ? (int)(1 + (32 / sizeof(PCRE2_UCHAR))) : GET(cc, 0); in get_iterator_parameters()
11719 *opcode = cc[class_len - 1]; in get_iterator_parameters()
11724 *end = cc + class_len; in get_iterator_parameters()
11735 *end = cc + class_len; in get_iterator_parameters()
11746 *max = GET2(cc, (class_len + IMM2_SIZE)); in get_iterator_parameters()
11747 *exact = GET2(cc, class_len); in get_iterator_parameters()
11776 *end = cc + class_len + 2 * IMM2_SIZE; in get_iterator_parameters()
11778 return cc; in get_iterator_parameters()
11784 *exact = GET2(cc, 0); in get_iterator_parameters()
11785 cc += IMM2_SIZE; in get_iterator_parameters()
11802 *max = GET2(cc, 0); in get_iterator_parameters()
11803 cc += IMM2_SIZE; in get_iterator_parameters()
11809 *type = *cc; in get_iterator_parameters()
11810 *end = next_opcode(common, cc); in get_iterator_parameters()
11811 cc++; in get_iterator_parameters()
11812 return cc; in get_iterator_parameters()
11815 *end = cc + 1; in get_iterator_parameters()
11817 if (common->utf && HAS_EXTRALEN(*cc)) *end += GET_EXTRALEN(*cc); in get_iterator_parameters()
11819 return cc; in get_iterator_parameters()
11822 static PCRE2_SPTR compile_iterator_matchingpath(compiler_common *common, PCRE2_SPTR cc, backtrack_c… in compile_iterator_matchingpath() argument
11829 sljit_s32 early_fail_ptr = PRIVATE_DATA(cc + 1); in compile_iterator_matchingpath()
11839 int private_data_ptr = PRIVATE_DATA(cc); in compile_iterator_matchingpath()
11848 PUSH_BACKTRACK(sizeof(char_iterator_backtrack), cc, NULL); in compile_iterator_matchingpath()
11866 cc = get_iterator_parameters(common, cc, &opcode, &type, &max, &exact, &end); in compile_iterator_matchingpath()
11894 compile_char1_matchingpath(common, type, cc, &backtrack->own_backtracks, FALSE); in compile_iterator_matchingpath()
11902 compile_char1_matchingpath(common, type, cc, &backtrack->own_backtracks, TRUE); in compile_iterator_matchingpath()
11908 compile_char1_matchingpath(common, type, cc, &backtrack->own_backtracks, TRUE); in compile_iterator_matchingpath()
11942 …compile_char1_matchingpath(common, type, cc, &BACKTRACK_AS(char_iterator_backtrack)->u.backtracks,… in compile_iterator_matchingpath()
12067 compile_char1_matchingpath(common, type, cc, &backtrack->own_backtracks, FALSE); in compile_iterator_matchingpath()
12091 compile_char1_matchingpath(common, type, cc, &no_match, FALSE); in compile_iterator_matchingpath()
12136 compile_char1_matchingpath(common, type, cc, &no_char1_match, FALSE); in compile_iterator_matchingpath()
12204 …compile_char1_matchingpath(common, type, cc, &BACKTRACK_AS(char_iterator_backtrack)->u.backtracks,… in compile_iterator_matchingpath()
12231 compile_char1_matchingpath(common, type, cc, &no_match, FALSE); in compile_iterator_matchingpath()
12250 compile_char1_matchingpath(common, type, cc, &no_char1_match, FALSE); in compile_iterator_matchingpath()
12271 compile_char1_matchingpath(common, type, cc, &no_match, FALSE); in compile_iterator_matchingpath()
12305 compile_char1_matchingpath(common, type, cc, &no_char1_match, FALSE); in compile_iterator_matchingpath()
12319 compile_char1_matchingpath(common, type, cc, &no_match, TRUE); in compile_iterator_matchingpath()
12334 …_SPTR compile_fail_accept_matchingpath(compiler_common *common, PCRE2_SPTR cc, backtrack_common *p… in compile_fail_accept_matchingpath() argument
12339 PUSH_BACKTRACK(sizeof(backtrack_common), cc, NULL); in compile_fail_accept_matchingpath()
12341 if (*cc == OP_FAIL) in compile_fail_accept_matchingpath()
12344 return cc + 1; in compile_fail_accept_matchingpath()
12347 if (*cc == OP_ACCEPT && common->currententry == NULL && (common->re->overall_options & PCRE2_ENDANC… in compile_fail_accept_matchingpath()
12350 if (*cc == OP_ASSERT_ACCEPT || common->currententry != NULL || !common->might_be_empty) in compile_fail_accept_matchingpath()
12357 return cc + 1; in compile_fail_accept_matchingpath()
12387 return cc + 1; in compile_fail_accept_matchingpath()
12390 static SLJIT_INLINE PCRE2_SPTR compile_close_matchingpath(compiler_common *common, PCRE2_SPTR cc) in compile_close_matchingpath() argument
12393 int offset = GET2(cc, 1); in compile_close_matchingpath()
12398 return cc + 1 + IMM2_SIZE; in compile_close_matchingpath()
12406 return cc + 1 + IMM2_SIZE; in compile_close_matchingpath()
12409 …SPTR compile_control_verb_matchingpath(compiler_common *common, PCRE2_SPTR cc, backtrack_common *p… in compile_control_verb_matchingpath() argument
12413 PCRE2_UCHAR opcode = *cc; in compile_control_verb_matchingpath()
12414 PCRE2_SPTR ccend = cc + 1; in compile_control_verb_matchingpath()
12418 ccend += 2 + cc[1]; in compile_control_verb_matchingpath()
12420 PUSH_BACKTRACK(sizeof(backtrack_common), cc, NULL); in compile_control_verb_matchingpath()
12433 OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, (sljit_sw)(cc + 2)); in compile_control_verb_matchingpath()
12443 static SLJIT_INLINE void compile_then_trap_matchingpath(compiler_common *common, PCRE2_SPTR cc, PCR… in compile_then_trap_matchingpath() argument
12450 PUSH_BACKTRACK_NOVALUE(sizeof(then_trap_backtrack), cc); in compile_then_trap_matchingpath()
12452 BACKTRACK_AS(then_trap_backtrack)->common.cc = then_trap_opcode; in compile_then_trap_matchingpath()
12453 BACKTRACK_AS(then_trap_backtrack)->start = (sljit_sw)(cc - common->start); in compile_then_trap_matchingpath()
12454 BACKTRACK_AS(then_trap_backtrack)->framesize = get_framesize(common, cc, ccend, FALSE, &needs_contr… in compile_then_trap_matchingpath()
12471 init_frame(common, cc, ccend, size - 1, 0); in compile_then_trap_matchingpath()
12474 static void compile_matchingpath(compiler_common *common, PCRE2_SPTR cc, PCRE2_SPTR ccend, backtrac… in compile_matchingpath() argument
12483 if (common->has_then && common->then_offsets[cc - common->start] != 0) in compile_matchingpath()
12489 compile_then_trap_matchingpath(common, cc, ccend, parent); in compile_matchingpath()
12492 while (cc < ccend) in compile_matchingpath()
12494 switch(*cc) in compile_matchingpath()
12508cc = compile_simple_assertion_matchingpath(common, *cc, cc + 1, parent->top != NULL ? &parent->top… in compile_matchingpath()
12530cc = compile_char1_matchingpath(common, *cc, cc + 1, parent->top != NULL ? &parent->top->simple_ba… in compile_matchingpath()
12534 PUSH_BACKTRACK_NOVALUE(sizeof(backtrack_common), cc); in compile_matchingpath()
12539 cc++; in compile_matchingpath()
12545cc = compile_charn_matchingpath(common, cc, ccend, parent->top != NULL ? &parent->top->simple_back… in compile_matchingpath()
12547cc = compile_char1_matchingpath(common, *cc, cc + 1, parent->top != NULL ? &parent->top->simple_ba… in compile_matchingpath()
12615 cc = compile_iterator_matchingpath(common, cc, parent); in compile_matchingpath()
12620 …if (cc[1 + (32 / sizeof(PCRE2_UCHAR))] >= OP_CRSTAR && cc[1 + (32 / sizeof(PCRE2_UCHAR))] <= OP_CR… in compile_matchingpath()
12621 cc = compile_iterator_matchingpath(common, cc, parent); in compile_matchingpath()
12623cc = compile_char1_matchingpath(common, *cc, cc + 1, parent->top != NULL ? &parent->top->simple_ba… in compile_matchingpath()
12628 if (*(cc + GET(cc, 1)) >= OP_CRSTAR && *(cc + GET(cc, 1)) <= OP_CRPOSRANGE) in compile_matchingpath()
12629 cc = compile_iterator_matchingpath(common, cc, parent); in compile_matchingpath()
12631cc = compile_char1_matchingpath(common, *cc, cc + 1, parent->top != NULL ? &parent->top->simple_ba… in compile_matchingpath()
12637 if (cc[1 + IMM2_SIZE] >= OP_CRSTAR && cc[1 + IMM2_SIZE] <= OP_CRPOSRANGE) in compile_matchingpath()
12638 cc = compile_ref_iterator_matchingpath(common, cc, parent); in compile_matchingpath()
12641 …compile_ref_matchingpath(common, cc, parent->top != NULL ? &parent->top->simple_backtracks : &pare… in compile_matchingpath()
12642 cc += 1 + IMM2_SIZE; in compile_matchingpath()
12648 if (cc[1 + 2 * IMM2_SIZE] >= OP_CRSTAR && cc[1 + 2 * IMM2_SIZE] <= OP_CRPOSRANGE) in compile_matchingpath()
12649 cc = compile_ref_iterator_matchingpath(common, cc, parent); in compile_matchingpath()
12652 …compile_dnref_search(common, cc, parent->top != NULL ? &parent->top->simple_backtracks : &parent->… in compile_matchingpath()
12653 …compile_ref_matchingpath(common, cc, parent->top != NULL ? &parent->top->simple_backtracks : &pare… in compile_matchingpath()
12654 cc += 1 + 2 * IMM2_SIZE; in compile_matchingpath()
12659 cc = compile_recurse_matchingpath(common, cc, parent); in compile_matchingpath()
12664 cc = compile_callout_matchingpath(common, cc, parent); in compile_matchingpath()
12671 PUSH_BACKTRACK_NOVALUE(sizeof(assert_backtrack), cc); in compile_matchingpath()
12672 cc = compile_assert_matchingpath(common, cc, BACKTRACK_AS(assert_backtrack), FALSE); in compile_matchingpath()
12676 PUSH_BACKTRACK_NOVALUE(sizeof(braminzero_backtrack), cc); in compile_matchingpath()
12677 cc = bracketend(cc + 1); in compile_matchingpath()
12678 if (*(cc - 1 - LINK_SIZE) != OP_KETRMIN) in compile_matchingpath()
12703 cc = compile_bracket_matchingpath(common, cc, parent); in compile_matchingpath()
12707 if (cc[1] > OP_ASSERTBACK_NOT) in compile_matchingpath()
12708 cc = compile_bracket_matchingpath(common, cc, parent); in compile_matchingpath()
12711 PUSH_BACKTRACK_NOVALUE(sizeof(assert_backtrack), cc); in compile_matchingpath()
12712 cc = compile_assert_matchingpath(common, cc, BACKTRACK_AS(assert_backtrack), FALSE); in compile_matchingpath()
12721 cc = compile_bracketpos_matchingpath(common, cc, parent); in compile_matchingpath()
12725 PUSH_BACKTRACK_NOVALUE(sizeof(backtrack_common), cc); in compile_matchingpath()
12732 OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, (sljit_sw)(cc + 2)); in compile_matchingpath()
12740 OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(2), SLJIT_IMM, (sljit_sw)(cc + 2)); in compile_matchingpath()
12744 cc += 1 + 2 + cc[1]; in compile_matchingpath()
12755 cc = compile_control_verb_matchingpath(common, cc, parent); in compile_matchingpath()
12761 cc = compile_fail_accept_matchingpath(common, cc, parent); in compile_matchingpath()
12765 cc = compile_close_matchingpath(common, cc); in compile_matchingpath()
12769 cc = bracketend(cc + 1); in compile_matchingpath()
12776 if (cc == NULL) in compile_matchingpath()
12783 PUSH_BACKTRACK_NOVALUE(sizeof(then_trap_backtrack), cc); in compile_matchingpath()
12784 BACKTRACK_AS(then_trap_backtrack)->common.cc = then_trap_opcode; in compile_matchingpath()
12788 SLJIT_ASSERT(cc == ccend); in compile_matchingpath()
12809 PCRE2_SPTR cc = current->cc; in compile_iterator_backtrackingpath() local
12817 int private_data_ptr = PRIVATE_DATA(cc); in compile_iterator_backtrackingpath()
12822 cc = get_iterator_parameters(common, cc, &opcode, &type, &max, &exact, &end); in compile_iterator_backtrackingpath()
12870 compile_char1_matchingpath(common, type, cc, &jumplist, TRUE); in compile_iterator_backtrackingpath()
12885 compile_char1_matchingpath(common, type, cc, &jumplist, TRUE); in compile_iterator_backtrackingpath()
12912 compile_char1_matchingpath(common, type, cc, &jumplist, TRUE); in compile_iterator_backtrackingpath()
12937 PCRE2_SPTR cc = current->cc; in compile_ref_iterator_backtrackingpath() local
12938 BOOL ref = (*cc == OP_REF || *cc == OP_REFI); in compile_ref_iterator_backtrackingpath()
12941 type = cc[ref ? 1 + IMM2_SIZE : 1 + 2 * IMM2_SIZE]; in compile_ref_iterator_backtrackingpath()
12982 PCRE2_SPTR cc = current->cc; in compile_assert_backtrackingpath() local
12986 SLJIT_ASSERT(*cc != OP_BRAMINZERO); in compile_assert_backtrackingpath()
12987 if (*cc == OP_BRAZERO) in compile_assert_backtrackingpath()
12989 bra = *cc; in compile_assert_backtrackingpath()
12990 cc++; in compile_assert_backtrackingpath()
13014 if (*cc == OP_ASSERT_NOT || *cc == OP_ASSERTBACK_NOT) in compile_assert_backtrackingpath()
13025 if (*cc == OP_ASSERT || *cc == OP_ASSERTBACK) in compile_assert_backtrackingpath()
13055 PCRE2_SPTR cc = current->cc; in compile_bracket_backtrackingpath() local
13072 if (*cc == OP_BRAZERO || *cc == OP_BRAMINZERO) in compile_bracket_backtrackingpath()
13074 bra = *cc; in compile_bracket_backtrackingpath()
13075 cc++; in compile_bracket_backtrackingpath()
13078 opcode = *cc; in compile_bracket_backtrackingpath()
13079 ccbegin = bracketend(cc) - 1 - LINK_SIZE; in compile_bracket_backtrackingpath()
13092 ccbegin = cc; in compile_bracket_backtrackingpath()
13093 cc += GET(cc, 1); in compile_bracket_backtrackingpath()
13094 has_alternatives = *cc == OP_ALT; in compile_bracket_backtrackingpath()
13099 if (SLJIT_UNLIKELY(opcode == OP_COND) && (*cc == OP_KETRMAX || *cc == OP_KETRMIN)) in compile_bracket_backtrackingpath()
13280 if (*cc == OP_ALT) in compile_bracket_backtrackingpath()
13282 ccprev = cc + 1 + LINK_SIZE; in compile_bracket_backtrackingpath()
13283 cc += GET(cc, 1); in compile_bracket_backtrackingpath()
13308 compile_matchingpath(common, ccprev, cc, current); in compile_bracket_backtrackingpath()
13421 while (*cc == OP_ALT); in compile_bracket_backtrackingpath()
13477 cc = ccbegin + GET(ccbegin, 1); in compile_bracket_backtrackingpath()
13483 …stacksize += CURRENT_AS(bracket_backtrack)->u.framesize + ((ket != OP_KET || *cc == OP_ALT) ? 2 : … in compile_bracket_backtrackingpath()
13485 else if (ket == OP_KETRMAX || (*cc == OP_ALT && ket != OP_KETRMIN)) in compile_bracket_backtrackingpath()
13556 PCRE2_SPTR cc; in compile_bracketpos_backtrackingpath() local
13561 cc = current->cc; in compile_bracketpos_backtrackingpath()
13563 if (*cc == OP_BRAPOSZERO) in compile_bracketpos_backtrackingpath()
13564 cc++; in compile_bracketpos_backtrackingpath()
13566 if (*cc == OP_CBRAPOS || *cc == OP_SCBRAPOS) in compile_bracketpos_backtrackingpath()
13568 offset = (GET2(cc, 1 + LINK_SIZE)) << 1; in compile_bracketpos_backtrackingpath()
13605 if (current->cc[1] > OP_ASSERTBACK_NOT) in compile_braminzero_backtrackingpath()
13608 compile_bracket_matchingpath(common, current->cc, current); in compile_braminzero_backtrackingpath()
13614 backtrack.common.cc = current->cc; in compile_braminzero_backtrackingpath()
13617 compile_assert_matchingpath(common, current->cc, &backtrack, FALSE); in compile_braminzero_backtrackingpath()
13625 PCRE2_UCHAR opcode = *current->cc; in compile_control_verb_backtrackingpath()
13669 OP1(SLJIT_MOV, SLJIT_R1, 0, SLJIT_IMM, (sljit_sw)(current->cc + 2)); in compile_control_verb_backtrackingpath()
13743 switch(*current->cc) in compile_backtrackingpath()
13856 if (current->cc[1] > OP_ASSERTBACK_NOT) in compile_backtrackingpath()
13932 PCRE2_SPTR cc = common->start + common->currententry->start; in compile_recurse() local
13933 PCRE2_SPTR ccbegin = cc + 1 + LINK_SIZE + (*cc == OP_BRA ? 0 : IMM2_SIZE); in compile_recurse()
13934 PCRE2_SPTR ccend = bracketend(cc) - (1 + LINK_SIZE); in compile_recurse()
13948 SLJIT_ASSERT(*cc == OP_BRA || *cc == OP_CBRA || *cc == OP_CBRAPOS || *cc == OP_SCBRA || *cc == OP_S… in compile_recurse()
13950 alt_max = no_alternatives(cc); in compile_recurse()
13986 altbacktrack.cc = ccbegin; in compile_recurse()
13987 cc += GET(cc, 1); in compile_recurse()
13993 if (altbacktrack.cc != ccbegin) in compile_recurse()
13996 compile_matchingpath(common, altbacktrack.cc, cc, &altbacktrack); in compile_recurse()
14070 if (*cc != OP_ALT) in compile_recurse()
14073 altbacktrack.cc = cc + 1 + LINK_SIZE; in compile_recurse()
14074 cc += GET(cc, 1); in compile_recurse()
14185 rootbacktrack.cc = common->name_table + re->name_count * re->name_entry_size; in jit_compile()
14192 common->start = rootbacktrack.cc; in jit_compile()