summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndi Gutmans <andi@php.net>2000-04-05 20:55:51 +0000
committerAndi Gutmans <andi@php.net>2000-04-05 20:55:51 +0000
commitda3db3d86420d1f8400bca50ddd4c0e066544e4c (patch)
treebd008fff7177eb089d22abcfd55bc5c095432919
parent49a34c68117bc121f36fb056eebb09933f27ee11 (diff)
downloadphp-git-da3db3d86420d1f8400bca50ddd4c0e066544e4c.tar.gz
- FIx JMPZNZ
-rw-r--r--Zend/zend_compile.c7
-rw-r--r--Zend/zend_execute.c10
2 files changed, 8 insertions, 9 deletions
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index d57cb6275d..5292814a17 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -412,9 +412,8 @@ void do_for_cond(znode *expr, znode *second_semicolon_token CLS_DC)
zend_op *opline = get_next_op(CG(active_op_array) CLS_CC);
opline->opcode = ZEND_JMPZNZ;
- opline->result = *expr; /* the conditional expression */
+ opline->op1 = *expr; /* the conditional expression */
second_semicolon_token->u.opline_num = for_cond_op_number;
- SET_UNUSED(opline->op1);
SET_UNUSED(opline->op2);
}
@@ -425,7 +424,7 @@ void do_for_before_statement(znode *cond_start, znode *second_semicolon_token CL
opline->opcode = ZEND_JMP;
opline->op1.u.opline_num = cond_start->u.opline_num;
- CG(active_op_array)->opcodes[second_semicolon_token->u.opline_num].op1.u.opline_num = get_next_op_number(CG(active_op_array));
+ CG(active_op_array)->opcodes[second_semicolon_token->u.opline_num].op2.u.opline_num = get_next_op_number(CG(active_op_array));
SET_UNUSED(opline->op1);
SET_UNUSED(opline->op2);
@@ -441,7 +440,7 @@ void do_for_end(znode *second_semicolon_token CLS_DC)
opline->opcode = ZEND_JMP;
opline->op1.u.opline_num = second_semicolon_token->u.opline_num+1;
- CG(active_op_array)->opcodes[second_semicolon_token->u.opline_num].op2.u.opline_num = get_next_op_number(CG(active_op_array));
+ CG(active_op_array)->opcodes[second_semicolon_token->u.opline_num].extended_value = get_next_op_number(CG(active_op_array));
SET_UNUSED(opline->op1);
SET_UNUSED(opline->op2);
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c
index 54a97671ad..8bff76e7f3 100644
--- a/Zend/zend_execute.c
+++ b/Zend/zend_execute.c
@@ -1370,18 +1370,18 @@ binary_assign_op_addr: {
}
NEXT_OPCODE();
case ZEND_JMPZNZ: {
- znode *res = &opline->result;
+ znode *res = &opline->op1;
if (!zend_is_true(get_zval_ptr(res, Ts, &EG(free_op1), BP_VAR_R))) {
#if DEBUG_ZEND>=2
- printf("Conditional jmp on false to %d\n", opline->op2.u.opline_num);
+ printf("Conditional jmp on false to %d\n", opline->extended_value);
#endif
- opline = &op_array->opcodes[opline->op2.u.opline_num];
+ opline = &op_array->opcodes[opline->extended_value];
} else {
#if DEBUG_ZEND>=2
- printf("Conditional jmp on true to %d\n", opline->op1.u.opline_num);
+ printf("Conditional jmp on true to %d\n", opline->op2.u.opline_num);
#endif
- opline = &op_array->opcodes[opline->op1.u.opline_num];
+ opline = &op_array->opcodes[opline->op2.u.opline_num];
}
FREE_OP(res, EG(free_op1));
}