cvs: ZendEngine2 / zend_execute.c zend_opcode.c
| From: | Andi Gutmans | Date: | Thu, 24 Oct 2002 18:24:55 +0000 |
| Subject: | cvs: ZendEngine2 / zend_execute.c zend_opcode.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-534@lists.php.net to get a copy of this message | ||
andi Thu Oct 24 14:24:55 2002 EDT
Modified files:
/ZendEngine2 zend_execute.c zend_opcode.c
Log:
- Also tune jmpz_ex
Index: ZendEngine2/zend_execute.c
diff -u ZendEngine2/zend_execute.c:1.385 ZendEngine2/zend_execute.c:1.386
--- ZendEngine2/zend_execute.c:1.385 Thu Oct 24 14:04:12 2002
+++ ZendEngine2/zend_execute.c Thu Oct 24 14:24:55 2002
@@ -1939,7 +1939,7 @@
#if DEBUG_ZEND>=2
printf("Conditional jmp to %d\n", EX(opline)->op2.u.opline_num);
#endif
- EX(opline) = &op_array->opcodes[EX(opline)->op2.u.opline_num];
+ EX(opline) = EX(opline)->op2.u.jmp_addr;
return 0; /* CHECK_ME */
}
NEXT_OPCODE();
@@ -1957,7 +1957,7 @@
#if DEBUG_ZEND>=2
printf("Conditional jmp to %d\n", EX(opline)->op2.u.opline_num);
#endif
- EX(opline) = &op_array->opcodes[EX(opline)->op2.u.opline_num];
+ EX(opline) = EX(opline)->op2.u.jmp_addr;
return 0; /* CHECK_ME */
}
NEXT_OPCODE();
Index: ZendEngine2/zend_opcode.c
diff -u ZendEngine2/zend_opcode.c:1.74 ZendEngine2/zend_opcode.c:1.75
--- ZendEngine2/zend_opcode.c:1.74 Thu Oct 24 14:04:12 2002
+++ ZendEngine2/zend_opcode.c Thu Oct 24 14:24:55 2002
@@ -309,11 +309,16 @@
opline->op2.u.constant.is_ref = 1;
opline->op2.u.constant.refcount = 2;
}
- if (opline->opcode == ZEND_JMP) {
- opline->op1.u.jmp_addr = &op_array->opcodes[opline->op1.u.opline_num];
- }
- if (opline->opcode == ZEND_JMPZ || opline->opcode == ZEND_JMPNZ) {
- opline->op2.u.jmp_addr = &op_array->opcodes[opline->op2.u.opline_num];
+ switch (opline->opcode) {
+ case ZEND_JMP:
+ opline->op1.u.jmp_addr = &op_array->opcodes[opline->op1.u.opline_num];
+ break;
+ case ZEND_JMPZ:
+ case ZEND_JMPNZ:
+ case ZEND_JMPZ_EX:
+ case ZEND_JMPNZ_EX:
+ opline->op2.u.jmp_addr = &op_array->opcodes[opline->op2.u.opline_num];
+ break;
}
opline->handler = zend_opcode_handlers[opline->opcode];
opline++;