From 4ecdff2da829a60ddb01ecb260d688acca7339d4 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Thu, 5 Sep 2019 15:35:19 +0300 Subject: [PATCH] Revert "Microoptimization (avoid code duplication)" This reverts commit 25d97f5eeeaf2eca760139f04fe2711e71791d0f. --- Zend/zend_vm_def.h | 14 ++++++++------ Zend/zend_vm_execute.h | 28 ++++++++++++++++------------ 2 files changed, 24 insertions(+), 18 deletions(-) diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 8dbcfe850a5..f8e7cad9858 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -4016,9 +4016,10 @@ ZEND_VM_HOT_HANDLER(129, ZEND_DO_ICALL, ANY, ANY, SPEC(RETVAL)) if (UNEXPECTED(EG(exception) != NULL)) { zend_rethrow_exception(execute_data); - } else { - ZEND_VM_SET_OPCODE(opline + 1); + HANDLE_EXCEPTION(); } + + ZEND_VM_SET_OPCODE(opline + 1); ZEND_VM_CONTINUE(); } @@ -4123,9 +4124,9 @@ ZEND_VM_C_LABEL(fcall_end): if (UNEXPECTED(EG(exception) != NULL)) { zend_rethrow_exception(execute_data); - } else { - ZEND_VM_SET_OPCODE(opline + 1); + HANDLE_EXCEPTION(); } + ZEND_VM_SET_OPCODE(opline + 1); ZEND_VM_CONTINUE(); } @@ -4234,9 +4235,10 @@ ZEND_VM_C_LABEL(fcall_end): zend_vm_stack_free_call_frame(call); if (UNEXPECTED(EG(exception) != NULL)) { zend_rethrow_exception(execute_data); - } else { - ZEND_VM_SET_OPCODE(opline + 1); + HANDLE_EXCEPTION(); } + + ZEND_VM_SET_OPCODE(opline + 1); ZEND_VM_CONTINUE(); } diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 34e290093d4..8882f18d140 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -1286,9 +1286,10 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_ICALL_SPEC_RETV if (UNEXPECTED(EG(exception) != NULL)) { zend_rethrow_exception(execute_data); - } else { - ZEND_VM_SET_OPCODE(opline + 1); + HANDLE_EXCEPTION(); } + + ZEND_VM_SET_OPCODE(opline + 1); ZEND_VM_CONTINUE(); } @@ -1330,9 +1331,10 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_ICALL_SPEC_RETV if (UNEXPECTED(EG(exception) != NULL)) { zend_rethrow_exception(execute_data); - } else { - ZEND_VM_SET_OPCODE(opline + 1); + HANDLE_EXCEPTION(); } + + ZEND_VM_SET_OPCODE(opline + 1); ZEND_VM_CONTINUE(); } @@ -1460,9 +1462,9 @@ fcall_end: if (UNEXPECTED(EG(exception) != NULL)) { zend_rethrow_exception(execute_data); - } else { - ZEND_VM_SET_OPCODE(opline + 1); + HANDLE_EXCEPTION(); } + ZEND_VM_SET_OPCODE(opline + 1); ZEND_VM_CONTINUE(); } @@ -1544,9 +1546,9 @@ fcall_end: if (UNEXPECTED(EG(exception) != NULL)) { zend_rethrow_exception(execute_data); - } else { - ZEND_VM_SET_OPCODE(opline + 1); + HANDLE_EXCEPTION(); } + ZEND_VM_SET_OPCODE(opline + 1); ZEND_VM_CONTINUE(); } @@ -1655,9 +1657,10 @@ fcall_end: zend_vm_stack_free_call_frame(call); if (UNEXPECTED(EG(exception) != NULL)) { zend_rethrow_exception(execute_data); - } else { - ZEND_VM_SET_OPCODE(opline + 1); + HANDLE_EXCEPTION(); } + + ZEND_VM_SET_OPCODE(opline + 1); ZEND_VM_CONTINUE(); } @@ -1766,9 +1769,10 @@ fcall_end: zend_vm_stack_free_call_frame(call); if (UNEXPECTED(EG(exception) != NULL)) { zend_rethrow_exception(execute_data); - } else { - ZEND_VM_SET_OPCODE(opline + 1); + HANDLE_EXCEPTION(); } + + ZEND_VM_SET_OPCODE(opline + 1); ZEND_VM_CONTINUE(); }