Lines Matching defs:ind
1638 int ind;
1643 ind = stack_pop(stack)->value;
1644 search_states[ind].value = -1;
1645 if (search_states[ind].type >= 0) {
1646 if (dfa_transitions[ind].type == type_char) {
1647 EMIT_CMP(jump, SLJIT_EQUAL, R_CURR_CHAR, 0, SLJIT_IMM, dfa_transitions[ind].value);
1650 else if (dfa_transitions[ind].type == type_rng_start) {
1651 SLJIT_ASSERT(!dfa_transitions[ind].value);
1652 ind++;
1653 while (dfa_transitions[ind].type != type_rng_end) {
1654 if (dfa_transitions[ind].type == type_rng_char) {
1655 EMIT_CMP(jump, SLJIT_EQUAL, R_CURR_CHAR, 0, SLJIT_IMM, dfa_transitions[ind].value);
1659 SLJIT_ASSERT(dfa_transitions[ind].type == type_rng_left);
1664 if (dfa_transitions[ind].value != prev_value) {
1666 prev_value -= dfa_transitions[ind].value;
1673 prev_value = dfa_transitions[ind].value;
1675 EMIT_CMP(jump, SLJIT_LESS_EQUAL, R_TEMP, 0, SLJIT_IMM, dfa_transitions[ind + 1].value - dfa_transitions[ind].value);
1677 ind++;
1679 ind++;
1683 SLJIT_ASSERT(dfa_transitions[ind].type == type_newline);
1694 static int compile_newline_check(struct compiler_common *compiler_common, sljit_sw ind)
1708 offset = TERM_OFFSET_OF(compiler_common->search_states[ind].type, 1);
1733 static sljit_sw compile_range_check(struct compiler_common *compiler_common, sljit_sw ind)
1738 int invert = dfa_transitions[ind].value;
1744 ind++;
1746 while (dfa_transitions[ind].type != type_rng_end) {
1747 if (dfa_transitions[ind].type == type_rng_char) {
1748 EMIT_CMP(*range_jump_list, SLJIT_EQUAL, R_CURR_CHAR, 0, SLJIT_IMM, dfa_transitions[ind].value);
1752 SLJIT_ASSERT(dfa_transitions[ind].type == type_rng_left);
1757 if (dfa_transitions[ind].value != prev_value) {
1759 prev_value -= dfa_transitions[ind].value;
1766 prev_value = dfa_transitions[ind].value;
1768 EMIT_CMP(*range_jump_list, SLJIT_LESS_EQUAL, R_TEMP, 0, SLJIT_IMM, dfa_transitions[ind + 1].value - dfa_transitions[ind].value);
1770 ind++;
1772 ind++;
1779 offset = TERM_OFFSET_OF(compiler_common->search_states[ind].type, 1);
1789 return ind;
1804 #define TERM_OFFSET_OF(ind, offs) (((ind) * compiler_common.no_states + (offs)) * sizeof(sljit_sw))
1838 sljit_sw ind;
1938 ind = stack_pop(&compiler_common.stack)->value;
1939 if (compiler_common.search_states[ind].type == 0) {
1940 SLJIT_ASSERT(compiler_common.dfa_transitions[ind].type == type_end);
1942 empty_match_id = compiler_common.search_states[ind].value;
1944 else if (compiler_common.search_states[ind].type > 0) {
1945 SLJIT_ASSERT(compiler_common.dfa_transitions[ind].type != type_end);
1946 if (compiler_common.dfa_transitions[ind].type == type_rng_start && compiler_common.dfa_transitions[ind].value)
1949 compiler_common.search_states[ind].value = -1;
1956 ind = stack_pop(&compiler_common.stack)->value;
1957 if (compiler_common.search_states[ind].type == 0) {
1958 SLJIT_ASSERT(compiler_common.dfa_transitions[ind].type == type_end);
1960 empty_match_id = compiler_common.search_states[ind].value;
1962 compiler_common.search_states[ind].value = -1;
2045 ind = stack_pop(&compiler_common.stack)->value;
2046 if (compiler_common.search_states[ind].type >= 0)
2047 printf("-> (%3d:%3d) ", compiler_common.search_states[ind].type, compiler_common.search_states[ind].value);
2048 compiler_common.search_states[ind].value = -1;
2091 ind = stack_pop(&compiler_common.stack)->value;
2092 if (compiler_common.search_states[ind].type >= 0) {
2093 EMIT_OP1(SLJIT_MOV, SLJIT_MEM1(R_CURR_STATE), TERM_OFFSET_OF(compiler_common.search_states[ind].type, 2), R_TEMP, 0);
2095 compiler_common.search_states[ind].value = -1;
2190 for (ind = 1; ind < compiler_common.dfa_size - 1; ind++) {
2191 if (compiler_common.search_states[ind].type >= 0) {
2192 SLJIT_ASSERT(compiler_common.search_states[ind].type < compiler_common.terms_size);
2194 compiler_common.machine->entry_addrs[compiler_common.search_states[ind].type] = (sljit_uw)label;
2196 if (compiler_common.dfa_transitions[ind].type == type_char) {
2197 EMIT_CMP(jump, SLJIT_NOT_EQUAL, R_CURR_CHAR, 0, SLJIT_IMM, compiler_common.dfa_transitions[ind].value);
2199 else if (compiler_common.dfa_transitions[ind].type == type_rng_start) {
2200 ind = compile_range_check(&compiler_common, ind);
2201 CHECK(!ind);
2204 SLJIT_ASSERT(compiler_common.dfa_transitions[ind].type == type_newline);
2205 CHECK(compile_newline_check(&compiler_common, ind));
2208 CHECK(trace_transitions(ind, &compiler_common));
2211 printf("(%3d): ", compiler_common.search_states[ind].type);
2213 CHECK(compile_cond_tran(&compiler_common, compiler_common.search_states[ind].type));
2215 if (compiler_common.dfa_transitions[ind].type == type_char) {
2219 else if (compiler_common.dfa_transitions[ind].type == type_rng_end) {
2224 SLJIT_ASSERT(compiler_common.dfa_transitions[ind].type == type_newline);
2228 EMIT_OP1(SLJIT_MOV, R_TEMP, 0, SLJIT_MEM1(R_CURR_STATE), TERM_OFFSET_OF(compiler_common.search_states[ind].type, 1));
2229 EMIT_OP1(SLJIT_MOV, SLJIT_MEM1(R_CURR_STATE), TERM_OFFSET_OF(compiler_common.search_states[ind].type, 1), SLJIT_IMM, -1);
2234 if (ind == compiler_common.dfa_size - 1) {
2275 for (ind = 0; ind < compiler_common.terms_size; ++ind)
2276 compiler_common.machine->entry_addrs[ind] = sljit_get_label_addr((struct sljit_label*)compiler_common.machine->entry_addrs[ind]);
2398 sljit_sw current, ind;
2410 ind = (current / sizeof(sljit_sw)) + 1;
2411 current = current_ptr[ind];
2412 current_ptr[ind] = -1;