From b8f56013b5501071a0fa5c74401afe861e5519f7 Mon Sep 17 00:00:00 2001 From: Bob Weinand Date: Sat, 19 Sep 2015 19:48:03 +0200 Subject: Force compiler to prefer ZEND_CALL_NESTED_FUNCTION It is by far the most used branch; compilers tended here to split the branches via an &2, &1 check, now it only does an &3 check and prefers ZEND_CALL_NESTED_FUNCTION branch --- Zend/zend_vm_def.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Zend/zend_vm_def.h') diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 97b01a6312..3d01572f9f 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -2348,7 +2348,7 @@ ZEND_VM_HELPER(zend_leave_helper, ANY, ANY) zend_execute_data *old_execute_data; uint32_t call_info = EX_CALL_INFO(); - if (ZEND_CALL_KIND_EX(call_info) == ZEND_CALL_NESTED_FUNCTION) { + if (EXPECTED(ZEND_CALL_KIND_EX(call_info) == ZEND_CALL_NESTED_FUNCTION)) { zend_object *object; i_free_compiled_variables(execute_data); @@ -2393,7 +2393,8 @@ ZEND_VM_HELPER(zend_leave_helper, ANY, ANY) LOAD_NEXT_OPLINE(); ZEND_VM_LEAVE(); - } else if (ZEND_CALL_KIND_EX(call_info) == ZEND_CALL_NESTED_CODE) { + } + if (EXPECTED((ZEND_CALL_KIND_EX(call_info) & ZEND_CALL_TOP) == 0)) { zend_detach_symbol_table(execute_data); destroy_op_array(&EX(func)->op_array); efree_size(EX(func), sizeof(zend_op_array)); -- cgit v1.2.1