Lines Matching refs:op1
276 #define convert_op1_op2_long(op1, op1_lval, op2, op2_lval, result, op, op_func) \ argument
278 if (UNEXPECTED(Z_TYPE_P(op1) != IS_LONG)) { \
279 if (Z_ISREF_P(op1)) { \
280 op1 = Z_REFVAL_P(op1); \
281 if (Z_TYPE_P(op1) == IS_LONG) { \
282 op1_lval = Z_LVAL_P(op1); \
287 op1_lval = _zval_get_long_func_noisy(op1); \
289 if (result != op1) { \
295 op1_lval = Z_LVAL_P(op1); \
310 if (result != op1) { \
904 static zend_never_inline void ZEND_FASTCALL add_function_array(zval *result, zval *op1, zval *op2) … in add_function_array() argument
906 if (result == op1 && Z_ARR_P(op1) == Z_ARR_P(op2)) { in add_function_array()
910 if (result != op1) { in add_function_array()
911 ZVAL_ARR(result, zend_array_dup(Z_ARR_P(op1))); in add_function_array()
919 static zend_always_inline int add_function_fast(zval *result, zval *op1, zval *op2) /* {{{ */ in add_function_fast() argument
921 zend_uchar type_pair = TYPE_PAIR(Z_TYPE_P(op1), Z_TYPE_P(op2)); in add_function_fast()
924 fast_long_add_function(result, op1, op2); in add_function_fast()
927 ZVAL_DOUBLE(result, Z_DVAL_P(op1) + Z_DVAL_P(op2)); in add_function_fast()
930 ZVAL_DOUBLE(result, ((double)Z_LVAL_P(op1)) + Z_DVAL_P(op2)); in add_function_fast()
933 ZVAL_DOUBLE(result, Z_DVAL_P(op1) + ((double)Z_LVAL_P(op2))); in add_function_fast()
936 add_function_array(result, op1, op2); in add_function_fast()
943 static zend_never_inline int ZEND_FASTCALL add_function_slow(zval *result, zval *op1, zval *op2) /*… in add_function_slow() argument
949 if (Z_ISREF_P(op1)) { in add_function_slow()
950 op1 = Z_REFVAL_P(op1); in add_function_slow()
956 if (EXPECTED(op1 != op2)) { in add_function_slow()
957 op1 = zendi_convert_scalar_to_number(op1, &op1_copy, result, 0); in add_function_slow()
960 op1 = zendi_convert_scalar_to_number(op1, &op1_copy, result, 0); in add_function_slow()
961 op2 = op1; in add_function_slow()
964 if (result != op1) { in add_function_slow()
971 if (result != op1) { in add_function_slow()
977 if (add_function_fast(result, op1, op2) == SUCCESS) { in add_function_slow()
983 ZEND_API int ZEND_FASTCALL add_function(zval *result, zval *op1, zval *op2) /* {{{ */ in add_function() argument
985 if (add_function_fast(result, op1, op2) == SUCCESS) { in add_function()
988 return add_function_slow(result, op1, op2); in add_function()
993 static zend_always_inline int sub_function_fast(zval *result, zval *op1, zval *op2) /* {{{ */ in sub_function_fast() argument
995 zend_uchar type_pair = TYPE_PAIR(Z_TYPE_P(op1), Z_TYPE_P(op2)); in sub_function_fast()
998 fast_long_sub_function(result, op1, op2); in sub_function_fast()
1001 ZVAL_DOUBLE(result, Z_DVAL_P(op1) - Z_DVAL_P(op2)); in sub_function_fast()
1004 ZVAL_DOUBLE(result, ((double)Z_LVAL_P(op1)) - Z_DVAL_P(op2)); in sub_function_fast()
1007 ZVAL_DOUBLE(result, Z_DVAL_P(op1) - ((double)Z_LVAL_P(op2))); in sub_function_fast()
1015 static zend_never_inline int ZEND_FASTCALL sub_function_slow(zval *result, zval *op1, zval *op2) /*… in sub_function_slow() argument
1020 if (Z_ISREF_P(op1)) { in sub_function_slow()
1021 op1 = Z_REFVAL_P(op1); in sub_function_slow()
1027 if (EXPECTED(op1 != op2)) { in sub_function_slow()
1028 op1 = zendi_convert_scalar_to_number(op1, &op1_copy, result, 0); in sub_function_slow()
1031 op1 = zendi_convert_scalar_to_number(op1, &op1_copy, result, 0); in sub_function_slow()
1032 op2 = op1; in sub_function_slow()
1035 if (result != op1) { in sub_function_slow()
1042 if (result != op1) { in sub_function_slow()
1048 if (sub_function_fast(result, op1, op2) == SUCCESS) { in sub_function_slow()
1056 ZEND_API int ZEND_FASTCALL sub_function(zval *result, zval *op1, zval *op2) /* {{{ */ in sub_function() argument
1058 if (sub_function_fast(result, op1, op2) == SUCCESS) { in sub_function()
1061 return sub_function_slow(result, op1, op2); in sub_function()
1066 ZEND_API int ZEND_FASTCALL mul_function(zval *result, zval *op1, zval *op2) /* {{{ */ in mul_function() argument
1072 zend_uchar type_pair = TYPE_PAIR(Z_TYPE_P(op1), Z_TYPE_P(op2)); in mul_function()
1077 …ZEND_SIGNED_MULTIPLY_LONG(Z_LVAL_P(op1),Z_LVAL_P(op2), Z_LVAL_P(result),Z_DVAL_P(result),overflow); in mul_function()
1082 ZVAL_DOUBLE(result, Z_DVAL_P(op1) * Z_DVAL_P(op2)); in mul_function()
1086 ZVAL_DOUBLE(result, ((double)Z_LVAL_P(op1)) * Z_DVAL_P(op2)); in mul_function()
1090 ZVAL_DOUBLE(result, Z_DVAL_P(op1) * ((double)Z_LVAL_P(op2))); in mul_function()
1094 if (Z_ISREF_P(op1)) { in mul_function()
1095 op1 = Z_REFVAL_P(op1); in mul_function()
1101 if (EXPECTED(op1 != op2)) { in mul_function()
1102 op1 = zendi_convert_scalar_to_number(op1, &op1_copy, result, 0); in mul_function()
1105 op1 = zendi_convert_scalar_to_number(op1, &op1_copy, result, 0); in mul_function()
1106 op2 = op1; in mul_function()
1109 if (result != op1) { in mul_function()
1116 if (result != op1) { in mul_function()
1127 ZEND_API int ZEND_FASTCALL pow_function(zval *result, zval *op1, zval *op2) /* {{{ */ in pow_function() argument
1133 zend_uchar type_pair = TYPE_PAIR(Z_TYPE_P(op1), Z_TYPE_P(op2)); in pow_function()
1137 zend_long l1 = 1, l2 = Z_LVAL_P(op1), i = Z_LVAL_P(op2); in pow_function()
1170 ZVAL_DOUBLE(result, pow((double)Z_LVAL_P(op1), (double)Z_LVAL_P(op2))); in pow_function()
1175 ZVAL_DOUBLE(result, pow(Z_DVAL_P(op1), Z_DVAL_P(op2))); in pow_function()
1179 ZVAL_DOUBLE(result, pow((double)Z_LVAL_P(op1), Z_DVAL_P(op2))); in pow_function()
1183 ZVAL_DOUBLE(result, pow(Z_DVAL_P(op1), (double)Z_LVAL_P(op2))); in pow_function()
1187 if (Z_ISREF_P(op1)) { in pow_function()
1188 op1 = Z_REFVAL_P(op1); in pow_function()
1194 if (EXPECTED(op1 != op2)) { in pow_function()
1195 if (Z_TYPE_P(op1) == IS_ARRAY) { in pow_function()
1196 if (op1 == result) { in pow_function()
1202 op1 = zendi_convert_scalar_to_number(op1, &op1_copy, result, 0); in pow_function()
1205 if (op1 == result) { in pow_function()
1214 if (Z_TYPE_P(op1) == IS_ARRAY) { in pow_function()
1215 if (op1 == result) { in pow_function()
1221 op1 = zendi_convert_scalar_to_number(op1, &op1_copy, result, 0); in pow_function()
1223 op2 = op1; in pow_function()
1226 if (result != op1) { in pow_function()
1233 if (result != op1) { in pow_function()
1244 ZEND_API int ZEND_FASTCALL div_function(zval *result, zval *op1, zval *op2) /* {{{ */ in div_function() argument
1250 zend_uchar type_pair = TYPE_PAIR(Z_TYPE_P(op1), Z_TYPE_P(op2)); in div_function()
1255 ZVAL_DOUBLE(result, ((double) Z_LVAL_P(op1) / (double) Z_LVAL_P(op2))); in div_function()
1257 } else if (Z_LVAL_P(op2) == -1 && Z_LVAL_P(op1) == ZEND_LONG_MIN) { in div_function()
1262 if (Z_LVAL_P(op1) % Z_LVAL_P(op2) == 0) { /* integer */ in div_function()
1263 ZVAL_LONG(result, Z_LVAL_P(op1) / Z_LVAL_P(op2)); in div_function()
1265 ZVAL_DOUBLE(result, ((double) Z_LVAL_P(op1)) / Z_LVAL_P(op2)); in div_function()
1273 ZVAL_DOUBLE(result, Z_DVAL_P(op1) / Z_DVAL_P(op2)); in div_function()
1280 ZVAL_DOUBLE(result, Z_DVAL_P(op1) / (double)Z_LVAL_P(op2)); in div_function()
1287 ZVAL_DOUBLE(result, (double)Z_LVAL_P(op1) / Z_DVAL_P(op2)); in div_function()
1291 if (Z_ISREF_P(op1)) { in div_function()
1292 op1 = Z_REFVAL_P(op1); in div_function()
1298 if (EXPECTED(op1 != op2)) { in div_function()
1299 op1 = zendi_convert_scalar_to_number(op1, &op1_copy, result, 0); in div_function()
1302 op1 = zendi_convert_scalar_to_number(op1, &op1_copy, result, 0); in div_function()
1303 op2 = op1; in div_function()
1306 if (result != op1) { in div_function()
1313 if (result != op1) { in div_function()
1324 ZEND_API int ZEND_FASTCALL mod_function(zval *result, zval *op1, zval *op2) /* {{{ */ in mod_function() argument
1328 convert_op1_op2_long(op1, op1_lval, op2, op2_lval, result, ZEND_MOD, mod_function); in mod_function()
1337 if (op1 != result) { in mod_function()
1343 if (op1 == result) { in mod_function()
1358 ZEND_API int ZEND_FASTCALL boolean_xor_function(zval *result, zval *op1, zval *op2) /* {{{ */ in boolean_xor_function() argument
1363 if (Z_TYPE_P(op1) == IS_FALSE) { in boolean_xor_function()
1365 } else if (EXPECTED(Z_TYPE_P(op1) == IS_TRUE)) { in boolean_xor_function()
1368 if (Z_ISREF_P(op1)) { in boolean_xor_function()
1369 op1 = Z_REFVAL_P(op1); in boolean_xor_function()
1370 if (Z_TYPE_P(op1) == IS_FALSE) { in boolean_xor_function()
1373 } else if (EXPECTED(Z_TYPE_P(op1) == IS_TRUE)) { in boolean_xor_function()
1379 op1_val = zval_is_true(op1); in boolean_xor_function()
1408 ZEND_API int ZEND_FASTCALL boolean_not_function(zval *result, zval *op1) /* {{{ */ in boolean_not_function() argument
1410 if (Z_TYPE_P(op1) < IS_TRUE) { in boolean_not_function()
1412 } else if (EXPECTED(Z_TYPE_P(op1) == IS_TRUE)) { in boolean_not_function()
1415 if (Z_ISREF_P(op1)) { in boolean_not_function()
1416 op1 = Z_REFVAL_P(op1); in boolean_not_function()
1417 if (Z_TYPE_P(op1) < IS_TRUE) { in boolean_not_function()
1420 } else if (EXPECTED(Z_TYPE_P(op1) == IS_TRUE)) { in boolean_not_function()
1427 ZVAL_BOOL(result, !zval_is_true(op1)); in boolean_not_function()
1433 ZEND_API int ZEND_FASTCALL bitwise_not_function(zval *result, zval *op1) /* {{{ */ in bitwise_not_function() argument
1436 switch (Z_TYPE_P(op1)) { in bitwise_not_function()
1438 ZVAL_LONG(result, ~Z_LVAL_P(op1)); in bitwise_not_function()
1441 ZVAL_LONG(result, ~zend_dval_to_lval(Z_DVAL_P(op1))); in bitwise_not_function()
1446 if (Z_STRLEN_P(op1) == 1) { in bitwise_not_function()
1447 zend_uchar not = (zend_uchar) ~*Z_STRVAL_P(op1); in bitwise_not_function()
1450 ZVAL_NEW_STR(result, zend_string_alloc(Z_STRLEN_P(op1), 0)); in bitwise_not_function()
1451 for (i = 0; i < Z_STRLEN_P(op1); i++) { in bitwise_not_function()
1452 Z_STRVAL_P(result)[i] = ~Z_STRVAL_P(op1)[i]; in bitwise_not_function()
1459 op1 = Z_REFVAL_P(op1); in bitwise_not_function()
1464 if (result != op1) { in bitwise_not_function()
1473 ZEND_API int ZEND_FASTCALL bitwise_or_function(zval *result, zval *op1, zval *op2) /* {{{ */ in bitwise_or_function() argument
1477 if (EXPECTED(Z_TYPE_P(op1) == IS_LONG) && EXPECTED(Z_TYPE_P(op2) == IS_LONG)) { in bitwise_or_function()
1478 ZVAL_LONG(result, Z_LVAL_P(op1) | Z_LVAL_P(op2)); in bitwise_or_function()
1482 ZVAL_DEREF(op1); in bitwise_or_function()
1485 if (Z_TYPE_P(op1) == IS_STRING && EXPECTED(Z_TYPE_P(op2) == IS_STRING)) { in bitwise_or_function()
1490 if (EXPECTED(Z_STRLEN_P(op1) >= Z_STRLEN_P(op2))) { in bitwise_or_function()
1491 if (EXPECTED(Z_STRLEN_P(op1) == Z_STRLEN_P(op2)) && Z_STRLEN_P(op1) == 1) { in bitwise_or_function()
1492 zend_uchar or = (zend_uchar) (*Z_STRVAL_P(op1) | *Z_STRVAL_P(op2)); in bitwise_or_function()
1493 if (result==op1) { in bitwise_or_function()
1499 longer = op1; in bitwise_or_function()
1503 shorter = op1; in bitwise_or_function()
1511 if (result==op1) { in bitwise_or_function()
1518 if (UNEXPECTED(Z_TYPE_P(op1) != IS_LONG)) { in bitwise_or_function()
1520 op1_lval = _zval_get_long_func_noisy(op1); in bitwise_or_function()
1522 if (result != op1) { in bitwise_or_function()
1528 op1_lval = Z_LVAL_P(op1); in bitwise_or_function()
1534 if (result != op1) { in bitwise_or_function()
1543 if (op1 == result) { in bitwise_or_function()
1551 ZEND_API int ZEND_FASTCALL bitwise_and_function(zval *result, zval *op1, zval *op2) /* {{{ */ in bitwise_and_function() argument
1555 if (EXPECTED(Z_TYPE_P(op1) == IS_LONG) && EXPECTED(Z_TYPE_P(op2) == IS_LONG)) { in bitwise_and_function()
1556 ZVAL_LONG(result, Z_LVAL_P(op1) & Z_LVAL_P(op2)); in bitwise_and_function()
1560 ZVAL_DEREF(op1); in bitwise_and_function()
1563 if (Z_TYPE_P(op1) == IS_STRING && Z_TYPE_P(op2) == IS_STRING) { in bitwise_and_function()
1568 if (EXPECTED(Z_STRLEN_P(op1) >= Z_STRLEN_P(op2))) { in bitwise_and_function()
1569 if (EXPECTED(Z_STRLEN_P(op1) == Z_STRLEN_P(op2)) && Z_STRLEN_P(op1) == 1) { in bitwise_and_function()
1570 zend_uchar and = (zend_uchar) (*Z_STRVAL_P(op1) & *Z_STRVAL_P(op2)); in bitwise_and_function()
1571 if (result==op1) { in bitwise_and_function()
1577 longer = op1; in bitwise_and_function()
1581 shorter = op1; in bitwise_and_function()
1589 if (result==op1) { in bitwise_and_function()
1596 if (UNEXPECTED(Z_TYPE_P(op1) != IS_LONG)) { in bitwise_and_function()
1598 op1_lval = _zval_get_long_func_noisy(op1); in bitwise_and_function()
1600 if (result != op1) { in bitwise_and_function()
1606 op1_lval = Z_LVAL_P(op1); in bitwise_and_function()
1612 if (result != op1) { in bitwise_and_function()
1621 if (op1 == result) { in bitwise_and_function()
1629 ZEND_API int ZEND_FASTCALL bitwise_xor_function(zval *result, zval *op1, zval *op2) /* {{{ */ in bitwise_xor_function() argument
1633 if (EXPECTED(Z_TYPE_P(op1) == IS_LONG) && EXPECTED(Z_TYPE_P(op2) == IS_LONG)) { in bitwise_xor_function()
1634 ZVAL_LONG(result, Z_LVAL_P(op1) ^ Z_LVAL_P(op2)); in bitwise_xor_function()
1638 ZVAL_DEREF(op1); in bitwise_xor_function()
1641 if (Z_TYPE_P(op1) == IS_STRING && Z_TYPE_P(op2) == IS_STRING) { in bitwise_xor_function()
1646 if (EXPECTED(Z_STRLEN_P(op1) >= Z_STRLEN_P(op2))) { in bitwise_xor_function()
1647 if (EXPECTED(Z_STRLEN_P(op1) == Z_STRLEN_P(op2)) && Z_STRLEN_P(op1) == 1) { in bitwise_xor_function()
1648 zend_uchar xor = (zend_uchar) (*Z_STRVAL_P(op1) ^ *Z_STRVAL_P(op2)); in bitwise_xor_function()
1649 if (result==op1) { in bitwise_xor_function()
1655 longer = op1; in bitwise_xor_function()
1659 shorter = op1; in bitwise_xor_function()
1667 if (result==op1) { in bitwise_xor_function()
1674 if (UNEXPECTED(Z_TYPE_P(op1) != IS_LONG)) { in bitwise_xor_function()
1676 op1_lval = _zval_get_long_func_noisy(op1); in bitwise_xor_function()
1678 if (result != op1) { in bitwise_xor_function()
1684 op1_lval = Z_LVAL_P(op1); in bitwise_xor_function()
1690 if (result != op1) { in bitwise_xor_function()
1699 if (op1 == result) { in bitwise_xor_function()
1707 ZEND_API int ZEND_FASTCALL shift_left_function(zval *result, zval *op1, zval *op2) /* {{{ */ in shift_left_function() argument
1711 convert_op1_op2_long(op1, op1_lval, op2, op2_lval, result, ZEND_SL, shift_left_function); in shift_left_function()
1716 if (op1 == result) { in shift_left_function()
1727 if (op1 != result) { in shift_left_function()
1734 if (op1 == result) { in shift_left_function()
1743 ZEND_API int ZEND_FASTCALL shift_right_function(zval *result, zval *op1, zval *op2) /* {{{ */ in shift_right_function() argument
1747 convert_op1_op2_long(op1, op1_lval, op2, op2_lval, result, ZEND_SR, shift_right_function); in shift_right_function()
1752 if (op1 == result) { in shift_right_function()
1763 if (op1 != result) { in shift_right_function()
1770 if (op1 == result) { in shift_right_function()
1779 ZEND_API int ZEND_FASTCALL concat_function(zval *result, zval *op1, zval *op2) /* {{{ */ in concat_function() argument
1781 zval *orig_op1 = op1; in concat_function()
1788 if (UNEXPECTED(Z_TYPE_P(op1) != IS_STRING)) { in concat_function()
1789 if (Z_ISREF_P(op1)) { in concat_function()
1790 op1 = Z_REFVAL_P(op1); in concat_function()
1791 if (Z_TYPE_P(op1) == IS_STRING) break; in concat_function()
1794 ZVAL_STR(&op1_copy, zval_get_string_func(op1)); in concat_function()
1802 if (result == op1) { in concat_function()
1803 if (UNEXPECTED(op1 == op2)) { in concat_function()
1807 op1 = &op1_copy; in concat_function()
1830 if (UNEXPECTED(Z_STRLEN_P(op1) == 0)) { in concat_function()
1838 if (EXPECTED(result != op1)) { in concat_function()
1842 ZVAL_COPY(result, op1); in concat_function()
1845 size_t op1_len = Z_STRLEN_P(op1); in concat_function()
1860 if (result == op1 && Z_REFCOUNTED_P(result)) { in concat_function()
1865 memcpy(ZSTR_VAL(result_str), Z_STRVAL_P(op1), op1_len); in concat_function()
1886 ZEND_API int ZEND_FASTCALL string_compare_function_ex(zval *op1, zval *op2, zend_bool case_insensit… in string_compare_function_ex() argument
1889 zend_string *str1 = zval_get_tmp_string(op1, &tmp_str1); in string_compare_function_ex()
1905 ZEND_API int ZEND_FASTCALL string_compare_function(zval *op1, zval *op2) /* {{{ */ in string_compare_function() argument
1907 if (EXPECTED(Z_TYPE_P(op1) == IS_STRING) && in string_compare_function()
1909 if (Z_STR_P(op1) == Z_STR_P(op2)) { in string_compare_function()
1912 return zend_binary_strcmp(Z_STRVAL_P(op1), Z_STRLEN_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op2)); in string_compare_function()
1916 zend_string *str1 = zval_get_tmp_string(op1, &tmp_str1); in string_compare_function()
1927 ZEND_API int ZEND_FASTCALL string_case_compare_function(zval *op1, zval *op2) /* {{{ */ in string_case_compare_function() argument
1929 if (EXPECTED(Z_TYPE_P(op1) == IS_STRING) && in string_case_compare_function()
1931 if (Z_STR_P(op1) == Z_STR_P(op2)) { in string_case_compare_function()
1934 …return zend_binary_strcasecmp_l(Z_STRVAL_P(op1), Z_STRLEN_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op2)… in string_case_compare_function()
1938 zend_string *str1 = zval_get_tmp_string(op1, &tmp_str1); in string_case_compare_function()
1950 ZEND_API int ZEND_FASTCALL string_locale_compare_function(zval *op1, zval *op2) /* {{{ */ in string_locale_compare_function() argument
1953 zend_string *str1 = zval_get_tmp_string(op1, &tmp_str1); in string_locale_compare_function()
1964 ZEND_API int ZEND_FASTCALL numeric_compare_function(zval *op1, zval *op2) /* {{{ */ in numeric_compare_function() argument
1968 d1 = zval_get_double(op1); in numeric_compare_function()
1992 ZEND_API int ZEND_FASTCALL compare_function(zval *result, zval *op1, zval *op2) /* {{{ */ in compare_function() argument
2000 switch (TYPE_PAIR(Z_TYPE_P(op1), Z_TYPE_P(op2))) { in compare_function()
2002 ZVAL_LONG(result, Z_LVAL_P(op1)>Z_LVAL_P(op2)?1:(Z_LVAL_P(op1)<Z_LVAL_P(op2)?-1:0)); in compare_function()
2006 Z_DVAL_P(result) = Z_DVAL_P(op1) - (double)Z_LVAL_P(op2); in compare_function()
2011 Z_DVAL_P(result) = (double)Z_LVAL_P(op1) - Z_DVAL_P(op2); in compare_function()
2016 if (Z_DVAL_P(op1) == Z_DVAL_P(op2)) { in compare_function()
2019 Z_DVAL_P(result) = Z_DVAL_P(op1) - Z_DVAL_P(op2); in compare_function()
2025 ZVAL_LONG(result, zend_compare_arrays(op1, op2)); in compare_function()
2045 if (Z_STR_P(op1) == Z_STR_P(op2)) { in compare_function()
2049 ZVAL_LONG(result, zendi_smart_strcmp(Z_STR_P(op1), Z_STR_P(op2))); in compare_function()
2057 ZVAL_LONG(result, Z_STRLEN_P(op1) == 0 ? 0 : 1); in compare_function()
2069 if (Z_ISREF_P(op1)) { in compare_function()
2070 op1 = Z_REFVAL_P(op1); in compare_function()
2077 if (Z_TYPE_P(op1) == IS_OBJECT && Z_OBJ_HANDLER_P(op1, compare)) { in compare_function()
2078 ret = Z_OBJ_HANDLER_P(op1, compare)(result, op1, op2); in compare_function()
2084 ret = Z_OBJ_HANDLER_P(op2, compare)(result, op1, op2); in compare_function()
2091 if (Z_TYPE_P(op1) == IS_OBJECT && Z_TYPE_P(op2) == IS_OBJECT) { in compare_function()
2092 if (Z_OBJ_P(op1) == Z_OBJ_P(op2)) { in compare_function()
2097 if (Z_OBJ_HANDLER_P(op1, compare_objects) == Z_OBJ_HANDLER_P(op2, compare_objects)) { in compare_function()
2098 ZVAL_LONG(result, Z_OBJ_HANDLER_P(op1, compare_objects)(op1, op2)); in compare_function()
2102 if (Z_TYPE_P(op1) == IS_OBJECT) { in compare_function()
2103 if (Z_OBJ_HT_P(op1)->get) { in compare_function()
2105 op_free = Z_OBJ_HT_P(op1)->get(op1, &rv); in compare_function()
2109 } else if (Z_TYPE_P(op2) != IS_OBJECT && Z_OBJ_HT_P(op1)->cast_object) { in compare_function()
2111 …if (Z_OBJ_HT_P(op1)->cast_object(op1, &tmp_free, ((Z_TYPE_P(op2) == IS_FALSE || Z_TYPE_P(op2) == I… in compare_function()
2125 ret = compare_function(result, op1, op_free); in compare_function()
2128 } else if (Z_TYPE_P(op1) != IS_OBJECT && Z_OBJ_HT_P(op2)->cast_object) { in compare_function()
2130 …->cast_object(op2, &tmp_free, ((Z_TYPE_P(op1) == IS_FALSE || Z_TYPE_P(op1) == IS_TRUE) ? _IS_BOOL … in compare_function()
2135 ret = compare_function(result, op1, &tmp_free); in compare_function()
2138 } else if (Z_TYPE_P(op1) == IS_OBJECT) { in compare_function()
2144 if (Z_TYPE_P(op1) == IS_NULL || Z_TYPE_P(op1) == IS_FALSE) { in compare_function()
2148 ZVAL_LONG(result, zval_is_true(op1) ? 1 : 0); in compare_function()
2150 } else if (Z_TYPE_P(op1) == IS_TRUE) { in compare_function()
2154 ZVAL_LONG(result, zval_is_true(op1) ? 0 : -1); in compare_function()
2157 op1 = zendi_convert_scalar_to_number(op1, &op1_copy, result, 1); in compare_function()
2160 if (result != op1) { in compare_function()
2167 } else if (Z_TYPE_P(op1)==IS_ARRAY) { in compare_function()
2173 } else if (Z_TYPE_P(op1)==IS_OBJECT) { in compare_function()
2206 ZEND_API int ZEND_FASTCALL zend_is_identical(zval *op1, zval *op2) /* {{{ */ in zend_is_identical() argument
2208 if (Z_TYPE_P(op1) != Z_TYPE_P(op2)) { in zend_is_identical()
2211 switch (Z_TYPE_P(op1)) { in zend_is_identical()
2217 return (Z_LVAL_P(op1) == Z_LVAL_P(op2)); in zend_is_identical()
2219 return (Z_RES_P(op1) == Z_RES_P(op2)); in zend_is_identical()
2221 return (Z_DVAL_P(op1) == Z_DVAL_P(op2)); in zend_is_identical()
2223 return zend_string_equals(Z_STR_P(op1), Z_STR_P(op2)); in zend_is_identical()
2225 return (Z_ARRVAL_P(op1) == Z_ARRVAL_P(op2) || in zend_is_identical()
2226 …zend_hash_compare(Z_ARRVAL_P(op1), Z_ARRVAL_P(op2), (compare_func_t) hash_zval_identical_function,… in zend_is_identical()
2228 return (Z_OBJ_P(op1) == Z_OBJ_P(op2)); in zend_is_identical()
2235 ZEND_API int ZEND_FASTCALL is_identical_function(zval *result, zval *op1, zval *op2) /* {{{ */ in is_identical_function() argument
2237 ZVAL_BOOL(result, zend_is_identical(op1, op2)); in is_identical_function()
2242 ZEND_API int ZEND_FASTCALL is_not_identical_function(zval *result, zval *op1, zval *op2) /* {{{ */ in is_not_identical_function() argument
2244 ZVAL_BOOL(result, !zend_is_identical(op1, op2)); in is_not_identical_function()
2249 ZEND_API int ZEND_FASTCALL is_equal_function(zval *result, zval *op1, zval *op2) /* {{{ */ in is_equal_function() argument
2251 if (compare_function(result, op1, op2) == FAILURE) { in is_equal_function()
2259 ZEND_API int ZEND_FASTCALL is_not_equal_function(zval *result, zval *op1, zval *op2) /* {{{ */ in is_not_equal_function() argument
2261 if (compare_function(result, op1, op2) == FAILURE) { in is_not_equal_function()
2269 ZEND_API int ZEND_FASTCALL is_smaller_function(zval *result, zval *op1, zval *op2) /* {{{ */ in is_smaller_function() argument
2271 if (compare_function(result, op1, op2) == FAILURE) { in is_smaller_function()
2279 ZEND_API int ZEND_FASTCALL is_smaller_or_equal_function(zval *result, zval *op1, zval *op2) /* {{{ … in is_smaller_or_equal_function() argument
2281 if (compare_function(result, op1, op2) == FAILURE) { in is_smaller_or_equal_function()
2444 ZEND_API int ZEND_FASTCALL increment_function(zval *op1) /* {{{ */ in increment_function() argument
2447 switch (Z_TYPE_P(op1)) { in increment_function()
2449 fast_long_increment_function(op1); in increment_function()
2452 Z_DVAL_P(op1) = Z_DVAL_P(op1) + 1; in increment_function()
2455 ZVAL_LONG(op1, 1); in increment_function()
2461 switch (is_numeric_string(Z_STRVAL_P(op1), Z_STRLEN_P(op1), &lval, &dval, 0)) { in increment_function()
2463 zval_ptr_dtor_str(op1); in increment_function()
2467 ZVAL_DOUBLE(op1, d+1); in increment_function()
2469 ZVAL_LONG(op1, lval+1); in increment_function()
2473 zval_ptr_dtor_str(op1); in increment_function()
2474 ZVAL_DOUBLE(op1, dval+1); in increment_function()
2478 increment_string(op1); in increment_function()
2484 if (Z_OBJ_HANDLER_P(op1, get) in increment_function()
2485 && Z_OBJ_HANDLER_P(op1, set)) { in increment_function()
2490 val = Z_OBJ_HANDLER_P(op1, get)(op1, &rv); in increment_function()
2493 Z_OBJ_HANDLER_P(op1, set)(op1, val); in increment_function() local
2495 } else if (Z_OBJ_HANDLER_P(op1, do_operation)) { in increment_function()
2500 res = Z_OBJ_HANDLER_P(op1, do_operation)(ZEND_ADD, op1, op1, &op2); in increment_function()
2506 op1 = Z_REFVAL_P(op1); in increment_function()
2515 ZEND_API int ZEND_FASTCALL decrement_function(zval *op1) /* {{{ */ in decrement_function() argument
2521 switch (Z_TYPE_P(op1)) { in decrement_function()
2523 fast_long_decrement_function(op1); in decrement_function()
2526 Z_DVAL_P(op1) = Z_DVAL_P(op1) - 1; in decrement_function()
2529 if (Z_STRLEN_P(op1) == 0) { /* consider as 0 */ in decrement_function()
2530 zval_ptr_dtor_str(op1); in decrement_function()
2531 ZVAL_LONG(op1, -1); in decrement_function()
2534 switch (is_numeric_string(Z_STRVAL_P(op1), Z_STRLEN_P(op1), &lval, &dval, 0)) { in decrement_function()
2536 zval_ptr_dtor_str(op1); in decrement_function()
2539 ZVAL_DOUBLE(op1, d-1); in decrement_function()
2541 ZVAL_LONG(op1, lval-1); in decrement_function()
2545 zval_ptr_dtor_str(op1); in decrement_function()
2546 ZVAL_DOUBLE(op1, dval - 1); in decrement_function()
2551 if (Z_OBJ_HANDLER_P(op1, get) in decrement_function()
2552 && Z_OBJ_HANDLER_P(op1, set)) { in decrement_function()
2557 val = Z_OBJ_HANDLER_P(op1, get)(op1, &rv); in decrement_function()
2560 Z_OBJ_HANDLER_P(op1, set)(op1, val); in decrement_function() local
2562 } else if (Z_OBJ_HANDLER_P(op1, do_operation)) { in decrement_function()
2567 res = Z_OBJ_HANDLER_P(op1, do_operation)(ZEND_SUB, op1, op1, &op2); in decrement_function()
2573 op1 = Z_REFVAL_P(op1); in decrement_function()