| 5438 |
} |
} |
| 5439 |
else |
else |
| 5440 |
{ |
{ |
| 5441 |
|
if (opcode == OP_PLUS) |
| 5442 |
|
compile_char1_trypath(common, type, cc, &backtrack->topbacktracks); |
| 5443 |
allocate_stack(common, 2); |
allocate_stack(common, 2); |
| 5444 |
OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0); |
OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0); |
| 5445 |
OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), SLJIT_IMM, 1); |
OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), SLJIT_IMM, 1); |
| 5459 |
CMPTO(SLJIT_C_LESS, TMP1, 0, SLJIT_IMM, arg1 + 1, label); |
CMPTO(SLJIT_C_LESS, TMP1, 0, SLJIT_IMM, arg1 + 1, label); |
| 5460 |
} |
} |
| 5461 |
set_jumps(nomatch, LABEL()); |
set_jumps(nomatch, LABEL()); |
| 5462 |
if (opcode == OP_PLUS || opcode == OP_CRRANGE) |
if (opcode == OP_CRRANGE) |
| 5463 |
add_jump(compiler, &backtrack->topbacktracks, |
add_jump(compiler, &backtrack->topbacktracks, CMP(SLJIT_C_LESS, SLJIT_MEM1(STACK_TOP), STACK(1), SLJIT_IMM, arg2 + 1)); |
|
CMP(SLJIT_C_LESS, SLJIT_MEM1(STACK_TOP), STACK(1), SLJIT_IMM, opcode == OP_PLUS ? 2 : arg2 + 1)); |
|
| 5464 |
OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0)); |
OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0)); |
| 5465 |
} |
} |
| 5466 |
BACKTRACK_AS(iterator_backtrack)->trypath = LABEL(); |
BACKTRACK_AS(iterator_backtrack)->trypath = LABEL(); |
| 5468 |
|
|
| 5469 |
case OP_MINSTAR: |
case OP_MINSTAR: |
| 5470 |
case OP_MINPLUS: |
case OP_MINPLUS: |
| 5471 |
|
if (opcode == OP_MINPLUS) |
| 5472 |
|
compile_char1_trypath(common, type, cc, &backtrack->topbacktracks); |
| 5473 |
allocate_stack(common, 1); |
allocate_stack(common, 1); |
| 5474 |
OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0); |
OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0); |
|
if (opcode == OP_MINPLUS) |
|
|
add_jump(compiler, &backtrack->topbacktracks, JUMP(SLJIT_JUMP)); |
|
| 5475 |
BACKTRACK_AS(iterator_backtrack)->trypath = LABEL(); |
BACKTRACK_AS(iterator_backtrack)->trypath = LABEL(); |
| 5476 |
break; |
break; |
| 5477 |
|
|
| 5887 |
int arg1 = -1, arg2 = -1; |
int arg1 = -1, arg2 = -1; |
| 5888 |
struct sljit_label *label = NULL; |
struct sljit_label *label = NULL; |
| 5889 |
struct sljit_jump *jump = NULL; |
struct sljit_jump *jump = NULL; |
| 5890 |
|
jump_list *jumplist = NULL; |
| 5891 |
|
|
| 5892 |
cc = get_iterator_parameters(common, cc, &opcode, &type, &arg1, &arg2, NULL); |
cc = get_iterator_parameters(common, cc, &opcode, &type, &arg1, &arg2, NULL); |
| 5893 |
|
|
| 5906 |
} |
} |
| 5907 |
else |
else |
| 5908 |
{ |
{ |
| 5909 |
if (opcode == OP_STAR || opcode == OP_UPTO) |
if (opcode <= OP_PLUS || opcode == OP_UPTO) |
| 5910 |
arg2 = 0; |
arg2 = 0; |
| 5911 |
else if (opcode == OP_PLUS) |
OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(1)); |
| 5912 |
arg2 = 1; |
jump = CMP(SLJIT_C_LESS_EQUAL, TMP1, 0, SLJIT_IMM, arg2 + 1); |
| 5913 |
jump = CMP(SLJIT_C_LESS_EQUAL, SLJIT_MEM1(STACK_TOP), STACK(1), SLJIT_IMM, arg2 + 1); |
OP2(SLJIT_SUB, SLJIT_MEM1(STACK_TOP), STACK(1), TMP1, 0, SLJIT_IMM, 1); |
|
OP2(SLJIT_SUB, SLJIT_MEM1(STACK_TOP), STACK(1), SLJIT_MEM1(STACK_TOP), STACK(1), SLJIT_IMM, 1); |
|
| 5914 |
OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0)); |
OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0)); |
| 5915 |
skip_char_back(common); |
skip_char_back(common); |
| 5916 |
OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0); |
OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0); |
| 5917 |
JUMPTO(SLJIT_JUMP, CURRENT_AS(iterator_backtrack)->trypath); |
JUMPTO(SLJIT_JUMP, CURRENT_AS(iterator_backtrack)->trypath); |
| 5918 |
if (opcode == OP_PLUS || opcode == OP_CRRANGE) |
if (opcode == OP_CRRANGE) |
| 5919 |
set_jumps(current->topbacktracks, LABEL()); |
set_jumps(current->topbacktracks, LABEL()); |
| 5920 |
JUMPHERE(jump); |
JUMPHERE(jump); |
| 5921 |
free_stack(common, 2); |
free_stack(common, 2); |
| 5922 |
|
if (opcode == OP_PLUS) |
| 5923 |
|
set_jumps(current->topbacktracks, LABEL()); |
| 5924 |
} |
} |
| 5925 |
break; |
break; |
| 5926 |
|
|
| 5927 |
case OP_MINSTAR: |
case OP_MINSTAR: |
| 5928 |
case OP_MINPLUS: |
case OP_MINPLUS: |
| 5929 |
OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0)); |
OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0)); |
| 5930 |
if (opcode == OP_MINPLUS) |
compile_char1_trypath(common, type, cc, &jumplist); |
|
{ |
|
|
set_jumps(current->topbacktracks, LABEL()); |
|
|
current->topbacktracks = NULL; |
|
|
} |
|
|
compile_char1_trypath(common, type, cc, ¤t->topbacktracks); |
|
| 5931 |
OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0); |
OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0); |
| 5932 |
JUMPTO(SLJIT_JUMP, CURRENT_AS(iterator_backtrack)->trypath); |
JUMPTO(SLJIT_JUMP, CURRENT_AS(iterator_backtrack)->trypath); |
| 5933 |
set_jumps(current->topbacktracks, LABEL()); |
set_jumps(jumplist, LABEL()); |
| 5934 |
free_stack(common, 1); |
free_stack(common, 1); |
| 5935 |
|
if (opcode == OP_MINPLUS) |
| 5936 |
|
set_jumps(current->topbacktracks, LABEL()); |
| 5937 |
break; |
break; |
| 5938 |
|
|
| 5939 |
case OP_MINUPTO: |
case OP_MINUPTO: |
| 5940 |
case OP_CRMINRANGE: |
case OP_CRMINRANGE: |
| 5941 |
if (opcode == OP_CRMINRANGE) |
if (opcode == OP_CRMINRANGE) |
| 5942 |
{ |
{ |
|
set_jumps(current->topbacktracks, LABEL()); |
|
|
current->topbacktracks = NULL; |
|
| 5943 |
label = LABEL(); |
label = LABEL(); |
| 5944 |
|
set_jumps(current->topbacktracks, label); |
| 5945 |
} |
} |
| 5946 |
OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0)); |
OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0)); |
| 5947 |
compile_char1_trypath(common, type, cc, ¤t->topbacktracks); |
compile_char1_trypath(common, type, cc, &jumplist); |
| 5948 |
|
|
| 5949 |
OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(1)); |
OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(1)); |
| 5950 |
OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0); |
OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0); |
| 5959 |
else |
else |
| 5960 |
CMPTO(SLJIT_C_LESS, TMP1, 0, SLJIT_IMM, arg1 + 2, CURRENT_AS(iterator_backtrack)->trypath); |
CMPTO(SLJIT_C_LESS, TMP1, 0, SLJIT_IMM, arg1 + 2, CURRENT_AS(iterator_backtrack)->trypath); |
| 5961 |
|
|
| 5962 |
set_jumps(current->topbacktracks, LABEL()); |
set_jumps(jumplist, LABEL()); |
| 5963 |
free_stack(common, 2); |
free_stack(common, 2); |
| 5964 |
break; |
break; |
| 5965 |
|
|
| 5980 |
OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0)); |
OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0)); |
| 5981 |
OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 0); |
OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 0); |
| 5982 |
jump = CMP(SLJIT_C_EQUAL, STR_PTR, 0, SLJIT_IMM, 0); |
jump = CMP(SLJIT_C_EQUAL, STR_PTR, 0, SLJIT_IMM, 0); |
| 5983 |
compile_char1_trypath(common, type, cc, ¤t->topbacktracks); |
compile_char1_trypath(common, type, cc, &jumplist); |
| 5984 |
JUMPTO(SLJIT_JUMP, CURRENT_AS(iterator_backtrack)->trypath); |
JUMPTO(SLJIT_JUMP, CURRENT_AS(iterator_backtrack)->trypath); |
| 5985 |
set_jumps(current->topbacktracks, LABEL()); |
set_jumps(jumplist, LABEL()); |
| 5986 |
JUMPHERE(jump); |
JUMPHERE(jump); |
| 5987 |
free_stack(common, 1); |
free_stack(common, 1); |
| 5988 |
break; |
break; |