summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Zend/zend_compile.h3
-rw-r--r--Zend/zend_opcode.c16
-rw-r--r--Zend/zend_vm_def.h6
-rw-r--r--Zend/zend_vm_execute.h6
-rw-r--r--sapi/phpdbg/phpdbg_opcode.c5
5 files changed, 4 insertions, 32 deletions
diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h
index 59ae7c92c1..06796aab83 100644
--- a/Zend/zend_compile.h
+++ b/Zend/zend_compile.h
@@ -945,8 +945,7 @@ static zend_always_inline int zend_check_arg_send_type(const zend_function *zf,
#define ZEND_FAST_RET_TO_CATCH 1
#define ZEND_FAST_RET_TO_FINALLY 2
-#define ZEND_FAST_CALL_FROM_CATCH 1
-#define ZEND_FAST_CALL_FROM_FINALLY 2
+#define ZEND_FAST_CALL_FROM_FINALLY 1
#define ZEND_ARRAY_ELEMENT_REF (1<<0)
#define ZEND_ARRAY_NOT_PACKED (1<<1)
diff --git a/Zend/zend_opcode.c b/Zend/zend_opcode.c
index 62b58b4e57..62869373dd 100644
--- a/Zend/zend_opcode.c
+++ b/Zend/zend_opcode.c
@@ -587,21 +587,7 @@ static void zend_resolve_finally_call(zend_op_array *op_array, uint32_t op_num,
zend_adjust_fast_call(op_array, start_op,
op_array->try_catch_array[i].finally_op,
op_array->try_catch_array[i].finally_end);
- if (op_array->try_catch_array[i].catch_op) {
- opline->extended_value = ZEND_FAST_CALL_FROM_CATCH;
- opline->op2.opline_num = op_array->try_catch_array[i].catch_op;
- opline->op1.opline_num = get_next_op_number(op_array);
- /* generate a FAST_CALL to hole CALL_FROM_FINALLY */
- opline = get_next_op(op_array);
- opline->opcode = ZEND_FAST_CALL;
- opline->result_type = IS_TMP_VAR;
- opline->result.var = fast_call_var;
- SET_UNUSED(opline->op1);
- SET_UNUSED(opline->op2);
- zend_resolve_fast_call(op_array, start_op + 1, op_array->try_catch_array[i].finally_op - 2);
- } else {
- zend_resolve_fast_call(op_array, start_op, op_array->try_catch_array[i].finally_op - 2);
- }
+ zend_resolve_fast_call(op_array, start_op, op_array->try_catch_array[i].finally_op - 2);
opline->op1.opline_num = op_array->try_catch_array[i].finally_op;
/* generate a sequence of FAST_CALL to upward finally block */
diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h
index 8a6cd782fe..ac592197ee 100644
--- a/Zend/zend_vm_def.h
+++ b/Zend/zend_vm_def.h
@@ -7492,12 +7492,6 @@ ZEND_VM_HANDLER(162, ZEND_FAST_CALL, ANY, ANY)
USE_OPLINE
zval *fast_call = EX_VAR(opline->result.var);
- if ((opline->extended_value & ZEND_FAST_CALL_FROM_CATCH) &&
- UNEXPECTED(EG(prev_exception) != NULL)) {
- /* in case of unhandled exception jump to catch block instead of finally */
- ZEND_VM_SET_OPCODE(&EX(func)->op_array.opcodes[opline->op2.opline_num]);
- ZEND_VM_CONTINUE();
- }
if (opline->extended_value == ZEND_FAST_CALL_FROM_FINALLY && UNEXPECTED(Z_OBJ_P(fast_call) != NULL)) {
fast_call->u2.lineno = (uint32_t)-1;
} else {
diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h
index 2be1016018..9b4d2107fa 100644
--- a/Zend/zend_vm_execute.h
+++ b/Zend/zend_vm_execute.h
@@ -1609,12 +1609,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CALL_SPEC_HANDLER(ZEND_OP
USE_OPLINE
zval *fast_call = EX_VAR(opline->result.var);
- if ((opline->extended_value & ZEND_FAST_CALL_FROM_CATCH) &&
- UNEXPECTED(EG(prev_exception) != NULL)) {
- /* in case of unhandled exception jump to catch block instead of finally */
- ZEND_VM_SET_OPCODE(&EX(func)->op_array.opcodes[opline->op2.opline_num]);
- ZEND_VM_CONTINUE();
- }
if (opline->extended_value == ZEND_FAST_CALL_FROM_FINALLY && UNEXPECTED(Z_OBJ_P(fast_call) != NULL)) {
fast_call->u2.lineno = (uint32_t)-1;
} else {
diff --git a/sapi/phpdbg/phpdbg_opcode.c b/sapi/phpdbg/phpdbg_opcode.c
index 75c91e0cf5..b8a0dfebba 100644
--- a/sapi/phpdbg/phpdbg_opcode.c
+++ b/sapi/phpdbg/phpdbg_opcode.c
@@ -68,9 +68,8 @@ char *phpdbg_decode_opline(zend_op_array *ops, zend_op *op) /*{{{ */
/* EX */
switch (op->opcode) {
case ZEND_FAST_CALL:
- if (op->extended_value != 0) {
- spprintf(&decode[0], 0, "FAST_CALL<%s>",
- op->extended_value == ZEND_FAST_CALL_FROM_CATCH ? "FROM_CATCH" : "FROM_FINALLY");
+ if (op->extended_value == ZEND_FAST_CALL_FROM_FINALLY) {
+ decode[0] = estrdup("FAST_CALL<FROM_FINALLY>");
}
break;
case ZEND_FAST_RET: