diff options
-rw-r--r-- | Zend/zend_operators.c | 9 | ||||
-rw-r--r-- | Zend/zend_operators.h | 6 | ||||
-rw-r--r-- | Zend/zend_vm_def.h | 4 | ||||
-rw-r--r-- | Zend/zend_vm_execute.h | 40 |
4 files changed, 27 insertions, 32 deletions
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 832e715da1..361223a7c0 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -2161,8 +2161,6 @@ ZEND_API int ZEND_FASTCALL compare_function(zval *result, zval *op1, zval *op2) static int hash_zval_identical_function(zval *z1, zval *z2) /* {{{ */ { - zval result; - /* is_identical_function() returns 1 in case of identity and 0 in case * of a difference; * whereas this comparison function is expected to return 0 on identity, @@ -2170,14 +2168,11 @@ static int hash_zval_identical_function(zval *z1, zval *z2) /* {{{ */ */ ZVAL_DEREF(z1); ZVAL_DEREF(z2); - if (is_identical_function(&result, z1, z2)==FAILURE) { - return 1; - } - return Z_TYPE(result) != IS_TRUE; + return fast_is_not_identical_function(z1, z2); } /* }}} */ -ZEND_API int ZEND_FASTCALL zend_is_identical(zval *op1, zval *op2) /* {{{ */ +ZEND_API zend_bool ZEND_FASTCALL zend_is_identical(zval *op1, zval *op2) /* {{{ */ { if (Z_TYPE_P(op1) != Z_TYPE_P(op2)) { return 0; diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h index 1a2d1cf81c..f86b2c8c08 100644 --- a/Zend/zend_operators.h +++ b/Zend/zend_operators.h @@ -54,7 +54,7 @@ ZEND_API int ZEND_FASTCALL shift_left_function(zval *result, zval *op1, zval *op ZEND_API int ZEND_FASTCALL shift_right_function(zval *result, zval *op1, zval *op2); ZEND_API int ZEND_FASTCALL concat_function(zval *result, zval *op1, zval *op2); -ZEND_API int ZEND_FASTCALL zend_is_identical(zval *op1, zval *op2); +ZEND_API zend_bool ZEND_FASTCALL zend_is_identical(zval *op1, zval *op2); ZEND_API int ZEND_FASTCALL is_equal_function(zval *result, zval *op1, zval *op2); ZEND_API int ZEND_FASTCALL is_identical_function(zval *result, zval *op1, zval *op2); @@ -778,7 +778,7 @@ static zend_always_inline int fast_equal_check_string(zval *op1, zval *op2) return Z_LVAL(result) == 0; } -static zend_always_inline int fast_is_identical_function(zval *op1, zval *op2) +static zend_always_inline zend_bool fast_is_identical_function(zval *op1, zval *op2) { if (Z_TYPE_P(op1) != Z_TYPE_P(op2)) { return 0; @@ -788,7 +788,7 @@ static zend_always_inline int fast_is_identical_function(zval *op1, zval *op2) return zend_is_identical(op1, op2); } -static zend_always_inline int fast_is_not_identical_function(zval *op1, zval *op2) +static zend_always_inline zend_bool fast_is_not_identical_function(zval *op1, zval *op2) { if (Z_TYPE_P(op1) != Z_TYPE_P(op2)) { return 1; diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 5ffd6753d2..1348e37fe2 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -354,7 +354,7 @@ ZEND_VM_COLD_CONSTCONST_HANDLER(15, ZEND_IS_IDENTICAL, CONST|TMP|VAR|CV, CONST|T USE_OPLINE zend_free_op free_op1, free_op2; zval *op1, *op2; - int result; + zend_bool result; SAVE_OPLINE(); op1 = GET_OP1_ZVAL_PTR_DEREF(BP_VAR_R); @@ -372,7 +372,7 @@ ZEND_VM_COLD_CONSTCONST_HANDLER(16, ZEND_IS_NOT_IDENTICAL, CONST|TMP|VAR|CV, CON USE_OPLINE zend_free_op free_op1, free_op2; zval *op1, *op2; - int result; + zend_bool result; SAVE_OPLINE(); op1 = GET_OP1_ZVAL_PTR_DEREF(BP_VAR_R); diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 51e5c112a9..a84cfe720e 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -4356,7 +4356,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC USE_OPLINE zval *op1, *op2; - int result; + zend_bool result; SAVE_OPLINE(); op1 = RT_CONSTANT(opline, opline->op1); @@ -4374,7 +4374,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_ USE_OPLINE zval *op1, *op2; - int result; + zend_bool result; SAVE_OPLINE(); op1 = RT_CONSTANT(opline, opline->op1); @@ -18405,7 +18405,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_TMP_CONST_HA USE_OPLINE zend_free_op free_op1; zval *op1, *op2; - int result; + zend_bool result; SAVE_OPLINE(); op1 = _get_zval_ptr_tmp(opline->op1.var, &free_op1 EXECUTE_DATA_CC); @@ -18423,7 +18423,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_TMP_CONS USE_OPLINE zend_free_op free_op1; zval *op1, *op2; - int result; + zend_bool result; SAVE_OPLINE(); op1 = _get_zval_ptr_tmp(opline->op1.var, &free_op1 EXECUTE_DATA_CC); @@ -19278,7 +19278,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_TMP_TMP_HAND USE_OPLINE zend_free_op free_op1, free_op2; zval *op1, *op2; - int result; + zend_bool result; SAVE_OPLINE(); op1 = _get_zval_ptr_tmp(opline->op1.var, &free_op1 EXECUTE_DATA_CC); @@ -19296,7 +19296,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_TMP_TMP_ USE_OPLINE zend_free_op free_op1, free_op2; zval *op1, *op2; - int result; + zend_bool result; SAVE_OPLINE(); op1 = _get_zval_ptr_tmp(opline->op1.var, &free_op1 EXECUTE_DATA_CC); @@ -22135,7 +22135,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_VAR_CONST_HA USE_OPLINE zend_free_op free_op1; zval *op1, *op2; - int result; + zend_bool result; SAVE_OPLINE(); op1 = _get_zval_ptr_var_deref(opline->op1.var, &free_op1 EXECUTE_DATA_CC); @@ -22153,7 +22153,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_VAR_CONS USE_OPLINE zend_free_op free_op1; zval *op1, *op2; - int result; + zend_bool result; SAVE_OPLINE(); op1 = _get_zval_ptr_var_deref(opline->op1.var, &free_op1 EXECUTE_DATA_CC); @@ -27555,7 +27555,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_VAR_TMP_HAND USE_OPLINE zend_free_op free_op1, free_op2; zval *op1, *op2; - int result; + zend_bool result; SAVE_OPLINE(); op1 = _get_zval_ptr_var_deref(opline->op1.var, &free_op1 EXECUTE_DATA_CC); @@ -27573,7 +27573,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_VAR_TMP_ USE_OPLINE zend_free_op free_op1, free_op2; zval *op1, *op2; - int result; + zend_bool result; SAVE_OPLINE(); op1 = _get_zval_ptr_var_deref(opline->op1.var, &free_op1 EXECUTE_DATA_CC); @@ -27785,7 +27785,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_VAR_VAR_HAND USE_OPLINE zend_free_op free_op1, free_op2; zval *op1, *op2; - int result; + zend_bool result; SAVE_OPLINE(); op1 = _get_zval_ptr_var_deref(opline->op1.var, &free_op1 EXECUTE_DATA_CC); @@ -27803,7 +27803,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_VAR_VAR_ USE_OPLINE zend_free_op free_op1, free_op2; zval *op1, *op2; - int result; + zend_bool result; SAVE_OPLINE(); op1 = _get_zval_ptr_var_deref(opline->op1.var, &free_op1 EXECUTE_DATA_CC); @@ -41250,7 +41250,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CV_CONST_HAN USE_OPLINE zval *op1, *op2; - int result; + zend_bool result; SAVE_OPLINE(); op1 = _get_zval_ptr_cv_deref_BP_VAR_R(opline->op1.var EXECUTE_DATA_CC); @@ -41268,7 +41268,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CV_CONST USE_OPLINE zval *op1, *op2; - int result; + zend_bool result; SAVE_OPLINE(); op1 = _get_zval_ptr_cv_deref_BP_VAR_R(opline->op1.var EXECUTE_DATA_CC); @@ -48926,7 +48926,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CV_TMP_HANDL USE_OPLINE zend_free_op free_op2; zval *op1, *op2; - int result; + zend_bool result; SAVE_OPLINE(); op1 = _get_zval_ptr_cv_deref_BP_VAR_R(opline->op1.var EXECUTE_DATA_CC); @@ -48944,7 +48944,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CV_TMP_H USE_OPLINE zend_free_op free_op2; zval *op1, *op2; - int result; + zend_bool result; SAVE_OPLINE(); op1 = _get_zval_ptr_cv_deref_BP_VAR_R(opline->op1.var EXECUTE_DATA_CC); @@ -49155,7 +49155,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CV_VAR_HANDL USE_OPLINE zend_free_op free_op2; zval *op1, *op2; - int result; + zend_bool result; SAVE_OPLINE(); op1 = _get_zval_ptr_cv_deref_BP_VAR_R(opline->op1.var EXECUTE_DATA_CC); @@ -49173,7 +49173,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CV_VAR_H USE_OPLINE zend_free_op free_op2; zval *op1, *op2; - int result; + zend_bool result; SAVE_OPLINE(); op1 = _get_zval_ptr_cv_deref_BP_VAR_R(opline->op1.var EXECUTE_DATA_CC); @@ -51627,7 +51627,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CV_CV_HANDLE USE_OPLINE zval *op1, *op2; - int result; + zend_bool result; SAVE_OPLINE(); op1 = _get_zval_ptr_cv_deref_BP_VAR_R(opline->op1.var EXECUTE_DATA_CC); @@ -51645,7 +51645,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CV_CV_HA USE_OPLINE zval *op1, *op2; - int result; + zend_bool result; SAVE_OPLINE(); op1 = _get_zval_ptr_cv_deref_BP_VAR_R(opline->op1.var EXECUTE_DATA_CC); |