com php-src: Force compiler to prefer ZEND_CALL_NESTED_FU NCTION It is by far the most used branch; c ompilers tended here to split the branches via
an &2, &1 check, now it only does a n &3 check and prefers ZEND_CALL_NESTED_FUN CTION branch: Zend/zend_vm_def.h Zend/zend_vm _execute.h

From: Date: Sat, 19 Sep 2015 17:49:44 +0000
Subject: com php-src: Force compiler to prefer ZEND_CALL_NESTED_FU NCTION It is by far the most used branch; c ompilers tended here to split the branches via
an &2, &1 check, now it only does a n &3 check and prefers ZEND_CALL_NESTED_FUN CTION branch: Zend/zend_vm_def.h Zend/zend_vm _execute.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-89078@lists.php.net to get a copy of this message
Commit: b8f56013b5501071a0fa5c74401afe861e5519f7 Author: Bob Weinand <bobwei9@hotmail.com> Sat, 19 Sep 2015 19:48:03 +0200 Parents: 8f85dc141a74ea12f794cf5d719728f4d6f02843 Branches: PHP-7.0 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=b8f56013b5501071a0fa5c74401afe861e5519f7 Log: 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 Changed paths: M Zend/zend_vm_def.h M Zend/zend_vm_execute.h Diff: diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 97b01a6..3d01572 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)); diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 83e82c8..7d1d726 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -460,7 +460,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_leave_helper_SPEC(ZEND_OPCODE_ 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); @@ -505,7 +505,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_leave_helper_SPEC(ZEND_OPCODE_ 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));

« previous php.cvs (#89078) next »