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) { \
935 static zend_never_inline void ZEND_FASTCALL add_function_array(zval *result, zval *op1, zval *op2) … in add_function_array() argument
937 if (result == op1 && Z_ARR_P(op1) == Z_ARR_P(op2)) { in add_function_array()
941 if (result != op1) { in add_function_array()
942 ZVAL_ARR(result, zend_array_dup(Z_ARR_P(op1))); in add_function_array()
950 static zend_always_inline int add_function_fast(zval *result, zval *op1, zval *op2) /* {{{ */ in add_function_fast() argument
952 zend_uchar type_pair = TYPE_PAIR(Z_TYPE_P(op1), Z_TYPE_P(op2)); in add_function_fast()
955 fast_long_add_function(result, op1, op2); in add_function_fast()
958 ZVAL_DOUBLE(result, Z_DVAL_P(op1) + Z_DVAL_P(op2)); in add_function_fast()
961 ZVAL_DOUBLE(result, ((double)Z_LVAL_P(op1)) + Z_DVAL_P(op2)); in add_function_fast()
964 ZVAL_DOUBLE(result, Z_DVAL_P(op1) + ((double)Z_LVAL_P(op2))); in add_function_fast()
967 add_function_array(result, op1, op2); in add_function_fast()
974 static zend_never_inline int ZEND_FASTCALL add_function_slow(zval *result, zval *op1, zval *op2) /*… in add_function_slow() argument
980 if (Z_ISREF_P(op1)) { in add_function_slow()
981 op1 = Z_REFVAL_P(op1); in add_function_slow()
987 if (EXPECTED(op1 != op2)) { in add_function_slow()
988 op1 = zendi_convert_scalar_to_number(op1, &op1_copy, result, 0); in add_function_slow()
991 op1 = zendi_convert_scalar_to_number(op1, &op1_copy, result, 0); in add_function_slow()
992 op2 = op1; in add_function_slow()
995 if (result != op1) { in add_function_slow()
1002 if (result != op1) { in add_function_slow()
1008 if (add_function_fast(result, op1, op2) == SUCCESS) { in add_function_slow()
1014 ZEND_API int ZEND_FASTCALL add_function(zval *result, zval *op1, zval *op2) /* {{{ */ in add_function() argument
1016 if (add_function_fast(result, op1, op2) == SUCCESS) { in add_function()
1019 return add_function_slow(result, op1, op2); in add_function()
1024 static zend_always_inline int sub_function_fast(zval *result, zval *op1, zval *op2) /* {{{ */ in sub_function_fast() argument
1026 zend_uchar type_pair = TYPE_PAIR(Z_TYPE_P(op1), Z_TYPE_P(op2)); in sub_function_fast()
1029 fast_long_sub_function(result, op1, op2); in sub_function_fast()
1032 ZVAL_DOUBLE(result, Z_DVAL_P(op1) - Z_DVAL_P(op2)); in sub_function_fast()
1035 ZVAL_DOUBLE(result, ((double)Z_LVAL_P(op1)) - Z_DVAL_P(op2)); in sub_function_fast()
1038 ZVAL_DOUBLE(result, Z_DVAL_P(op1) - ((double)Z_LVAL_P(op2))); in sub_function_fast()
1046 static zend_never_inline int ZEND_FASTCALL sub_function_slow(zval *result, zval *op1, zval *op2) /*… in sub_function_slow() argument
1051 if (Z_ISREF_P(op1)) { in sub_function_slow()
1052 op1 = Z_REFVAL_P(op1); in sub_function_slow()
1058 if (EXPECTED(op1 != op2)) { in sub_function_slow()
1059 op1 = zendi_convert_scalar_to_number(op1, &op1_copy, result, 0); in sub_function_slow()
1062 op1 = zendi_convert_scalar_to_number(op1, &op1_copy, result, 0); in sub_function_slow()
1063 op2 = op1; in sub_function_slow()
1066 if (result != op1) { in sub_function_slow()
1073 if (result != op1) { in sub_function_slow()
1079 if (sub_function_fast(result, op1, op2) == SUCCESS) { in sub_function_slow()
1087 ZEND_API int ZEND_FASTCALL sub_function(zval *result, zval *op1, zval *op2) /* {{{ */ in sub_function() argument
1089 if (sub_function_fast(result, op1, op2) == SUCCESS) { in sub_function()
1092 return sub_function_slow(result, op1, op2); in sub_function()
1097 ZEND_API int ZEND_FASTCALL mul_function(zval *result, zval *op1, zval *op2) /* {{{ */ in mul_function() argument
1103 zend_uchar type_pair = TYPE_PAIR(Z_TYPE_P(op1), Z_TYPE_P(op2)); in mul_function()
1108 …ZEND_SIGNED_MULTIPLY_LONG(Z_LVAL_P(op1),Z_LVAL_P(op2), Z_LVAL_P(result),Z_DVAL_P(result),overflow); in mul_function()
1113 ZVAL_DOUBLE(result, Z_DVAL_P(op1) * Z_DVAL_P(op2)); in mul_function()
1117 ZVAL_DOUBLE(result, ((double)Z_LVAL_P(op1)) * Z_DVAL_P(op2)); in mul_function()
1121 ZVAL_DOUBLE(result, Z_DVAL_P(op1) * ((double)Z_LVAL_P(op2))); in mul_function()
1125 if (Z_ISREF_P(op1)) { in mul_function()
1126 op1 = Z_REFVAL_P(op1); in mul_function()
1132 if (EXPECTED(op1 != op2)) { in mul_function()
1133 op1 = zendi_convert_scalar_to_number(op1, &op1_copy, result, 0); in mul_function()
1136 op1 = zendi_convert_scalar_to_number(op1, &op1_copy, result, 0); in mul_function()
1137 op2 = op1; in mul_function()
1140 if (result != op1) { in mul_function()
1147 if (result != op1) { in mul_function()
1158 ZEND_API int ZEND_FASTCALL pow_function(zval *result, zval *op1, zval *op2) /* {{{ */ in pow_function() argument
1164 zend_uchar type_pair = TYPE_PAIR(Z_TYPE_P(op1), Z_TYPE_P(op2)); in pow_function()
1168 zend_long l1 = 1, l2 = Z_LVAL_P(op1), i = Z_LVAL_P(op2); in pow_function()
1201 ZVAL_DOUBLE(result, pow((double)Z_LVAL_P(op1), (double)Z_LVAL_P(op2))); in pow_function()
1206 ZVAL_DOUBLE(result, pow(Z_DVAL_P(op1), Z_DVAL_P(op2))); in pow_function()
1210 ZVAL_DOUBLE(result, pow((double)Z_LVAL_P(op1), Z_DVAL_P(op2))); in pow_function()
1214 ZVAL_DOUBLE(result, pow(Z_DVAL_P(op1), (double)Z_LVAL_P(op2))); in pow_function()
1218 if (Z_ISREF_P(op1)) { in pow_function()
1219 op1 = Z_REFVAL_P(op1); in pow_function()
1225 if (EXPECTED(op1 != op2)) { in pow_function()
1226 if (Z_TYPE_P(op1) == IS_ARRAY) { in pow_function()
1227 if (op1 == result) { in pow_function()
1233 op1 = zendi_convert_scalar_to_number(op1, &op1_copy, result, 0); in pow_function()
1236 if (op1 == result) { in pow_function()
1245 if (Z_TYPE_P(op1) == IS_ARRAY) { in pow_function()
1246 if (op1 == result) { in pow_function()
1252 op1 = zendi_convert_scalar_to_number(op1, &op1_copy, result, 0); in pow_function()
1254 op2 = op1; in pow_function()
1257 if (result != op1) { in pow_function()
1264 if (result != op1) { in pow_function()
1278 ZEND_API int ZEND_FASTCALL div_function(zval *result, zval *op1, zval *op2) /* {{{ */ in div_function() argument
1284 zend_uchar type_pair = TYPE_PAIR(Z_TYPE_P(op1), Z_TYPE_P(op2)); in div_function()
1289 ZVAL_DOUBLE(result, ((double) Z_LVAL_P(op1) / (double) Z_LVAL_P(op2))); in div_function()
1291 } else if (Z_LVAL_P(op2) == -1 && Z_LVAL_P(op1) == ZEND_LONG_MIN) { in div_function()
1296 if (Z_LVAL_P(op1) % Z_LVAL_P(op2) == 0) { /* integer */ in div_function()
1297 ZVAL_LONG(result, Z_LVAL_P(op1) / Z_LVAL_P(op2)); in div_function()
1299 ZVAL_DOUBLE(result, ((double) Z_LVAL_P(op1)) / Z_LVAL_P(op2)); in div_function()
1307 ZVAL_DOUBLE(result, Z_DVAL_P(op1) / Z_DVAL_P(op2)); in div_function()
1314 ZVAL_DOUBLE(result, Z_DVAL_P(op1) / (double)Z_LVAL_P(op2)); in div_function()
1321 ZVAL_DOUBLE(result, (double)Z_LVAL_P(op1) / Z_DVAL_P(op2)); in div_function()
1325 if (Z_ISREF_P(op1)) { in div_function()
1326 op1 = Z_REFVAL_P(op1); in div_function()
1332 if (EXPECTED(op1 != op2)) { in div_function()
1333 op1 = zendi_convert_scalar_to_number(op1, &op1_copy, result, 0); in div_function()
1336 op1 = zendi_convert_scalar_to_number(op1, &op1_copy, result, 0); in div_function()
1337 op2 = op1; in div_function()
1340 if (result != op1) { in div_function()
1347 if (result != op1) { in div_function()
1358 ZEND_API int ZEND_FASTCALL mod_function(zval *result, zval *op1, zval *op2) /* {{{ */ in mod_function() argument
1362 convert_op1_op2_long(op1, op1_lval, op2, op2_lval, result, ZEND_MOD, mod_function); in mod_function()
1371 if (op1 != result) { in mod_function()
1377 if (op1 == result) { in mod_function()
1392 ZEND_API int ZEND_FASTCALL boolean_xor_function(zval *result, zval *op1, zval *op2) /* {{{ */ in boolean_xor_function() argument
1397 if (Z_TYPE_P(op1) == IS_FALSE) { in boolean_xor_function()
1399 } else if (EXPECTED(Z_TYPE_P(op1) == IS_TRUE)) { in boolean_xor_function()
1402 if (Z_ISREF_P(op1)) { in boolean_xor_function()
1403 op1 = Z_REFVAL_P(op1); in boolean_xor_function()
1404 if (Z_TYPE_P(op1) == IS_FALSE) { in boolean_xor_function()
1407 } else if (EXPECTED(Z_TYPE_P(op1) == IS_TRUE)) { in boolean_xor_function()
1413 op1_val = zval_is_true(op1); in boolean_xor_function()
1442 ZEND_API int ZEND_FASTCALL boolean_not_function(zval *result, zval *op1) /* {{{ */ in boolean_not_function() argument
1444 if (Z_TYPE_P(op1) < IS_TRUE) { in boolean_not_function()
1446 } else if (EXPECTED(Z_TYPE_P(op1) == IS_TRUE)) { in boolean_not_function()
1449 if (Z_ISREF_P(op1)) { in boolean_not_function()
1450 op1 = Z_REFVAL_P(op1); in boolean_not_function()
1451 if (Z_TYPE_P(op1) < IS_TRUE) { in boolean_not_function()
1454 } else if (EXPECTED(Z_TYPE_P(op1) == IS_TRUE)) { in boolean_not_function()
1461 ZVAL_BOOL(result, !zval_is_true(op1)); in boolean_not_function()
1467 ZEND_API int ZEND_FASTCALL bitwise_not_function(zval *result, zval *op1) /* {{{ */ in bitwise_not_function() argument
1470 switch (Z_TYPE_P(op1)) { in bitwise_not_function()
1472 ZVAL_LONG(result, ~Z_LVAL_P(op1)); in bitwise_not_function()
1475 ZVAL_LONG(result, ~zend_dval_to_lval(Z_DVAL_P(op1))); in bitwise_not_function()
1480 if (Z_STRLEN_P(op1) == 1) { in bitwise_not_function()
1481 zend_uchar not = (zend_uchar) ~*Z_STRVAL_P(op1); in bitwise_not_function()
1484 ZVAL_NEW_STR(result, zend_string_alloc(Z_STRLEN_P(op1), 0)); in bitwise_not_function()
1485 for (i = 0; i < Z_STRLEN_P(op1); i++) { in bitwise_not_function()
1486 Z_STRVAL_P(result)[i] = ~Z_STRVAL_P(op1)[i]; in bitwise_not_function()
1493 op1 = Z_REFVAL_P(op1); in bitwise_not_function()
1498 if (result != op1) { in bitwise_not_function()
1507 ZEND_API int ZEND_FASTCALL bitwise_or_function(zval *result, zval *op1, zval *op2) /* {{{ */ in bitwise_or_function() argument
1511 if (EXPECTED(Z_TYPE_P(op1) == IS_LONG) && EXPECTED(Z_TYPE_P(op2) == IS_LONG)) { in bitwise_or_function()
1512 ZVAL_LONG(result, Z_LVAL_P(op1) | Z_LVAL_P(op2)); in bitwise_or_function()
1516 ZVAL_DEREF(op1); in bitwise_or_function()
1519 if (Z_TYPE_P(op1) == IS_STRING && EXPECTED(Z_TYPE_P(op2) == IS_STRING)) { in bitwise_or_function()
1524 if (EXPECTED(Z_STRLEN_P(op1) >= Z_STRLEN_P(op2))) { in bitwise_or_function()
1525 if (EXPECTED(Z_STRLEN_P(op1) == Z_STRLEN_P(op2)) && Z_STRLEN_P(op1) == 1) { in bitwise_or_function()
1526 zend_uchar or = (zend_uchar) (*Z_STRVAL_P(op1) | *Z_STRVAL_P(op2)); in bitwise_or_function()
1527 if (result==op1) { in bitwise_or_function()
1533 longer = op1; in bitwise_or_function()
1537 shorter = op1; in bitwise_or_function()
1545 if (result==op1) { in bitwise_or_function()
1552 if (UNEXPECTED(Z_TYPE_P(op1) != IS_LONG)) { in bitwise_or_function()
1554 op1_lval = _zval_get_long_func_noisy(op1); in bitwise_or_function()
1556 if (result != op1) { in bitwise_or_function()
1562 op1_lval = Z_LVAL_P(op1); in bitwise_or_function()
1568 if (result != op1) { in bitwise_or_function()
1577 if (op1 == result) { in bitwise_or_function()
1585 ZEND_API int ZEND_FASTCALL bitwise_and_function(zval *result, zval *op1, zval *op2) /* {{{ */ in bitwise_and_function() argument
1589 if (EXPECTED(Z_TYPE_P(op1) == IS_LONG) && EXPECTED(Z_TYPE_P(op2) == IS_LONG)) { in bitwise_and_function()
1590 ZVAL_LONG(result, Z_LVAL_P(op1) & Z_LVAL_P(op2)); in bitwise_and_function()
1594 ZVAL_DEREF(op1); in bitwise_and_function()
1597 if (Z_TYPE_P(op1) == IS_STRING && Z_TYPE_P(op2) == IS_STRING) { in bitwise_and_function()
1602 if (EXPECTED(Z_STRLEN_P(op1) >= Z_STRLEN_P(op2))) { in bitwise_and_function()
1603 if (EXPECTED(Z_STRLEN_P(op1) == Z_STRLEN_P(op2)) && Z_STRLEN_P(op1) == 1) { in bitwise_and_function()
1604 zend_uchar and = (zend_uchar) (*Z_STRVAL_P(op1) & *Z_STRVAL_P(op2)); in bitwise_and_function()
1605 if (result==op1) { in bitwise_and_function()
1611 longer = op1; in bitwise_and_function()
1615 shorter = op1; in bitwise_and_function()
1623 if (result==op1) { in bitwise_and_function()
1630 if (UNEXPECTED(Z_TYPE_P(op1) != IS_LONG)) { in bitwise_and_function()
1632 op1_lval = _zval_get_long_func_noisy(op1); in bitwise_and_function()
1634 if (result != op1) { in bitwise_and_function()
1640 op1_lval = Z_LVAL_P(op1); in bitwise_and_function()
1646 if (result != op1) { in bitwise_and_function()
1655 if (op1 == result) { in bitwise_and_function()
1663 ZEND_API int ZEND_FASTCALL bitwise_xor_function(zval *result, zval *op1, zval *op2) /* {{{ */ in bitwise_xor_function() argument
1667 if (EXPECTED(Z_TYPE_P(op1) == IS_LONG) && EXPECTED(Z_TYPE_P(op2) == IS_LONG)) { in bitwise_xor_function()
1668 ZVAL_LONG(result, Z_LVAL_P(op1) ^ Z_LVAL_P(op2)); in bitwise_xor_function()
1672 ZVAL_DEREF(op1); in bitwise_xor_function()
1675 if (Z_TYPE_P(op1) == IS_STRING && Z_TYPE_P(op2) == IS_STRING) { in bitwise_xor_function()
1680 if (EXPECTED(Z_STRLEN_P(op1) >= Z_STRLEN_P(op2))) { in bitwise_xor_function()
1681 if (EXPECTED(Z_STRLEN_P(op1) == Z_STRLEN_P(op2)) && Z_STRLEN_P(op1) == 1) { in bitwise_xor_function()
1682 zend_uchar xor = (zend_uchar) (*Z_STRVAL_P(op1) ^ *Z_STRVAL_P(op2)); in bitwise_xor_function()
1683 if (result==op1) { in bitwise_xor_function()
1689 longer = op1; in bitwise_xor_function()
1693 shorter = op1; in bitwise_xor_function()
1701 if (result==op1) { in bitwise_xor_function()
1708 if (UNEXPECTED(Z_TYPE_P(op1) != IS_LONG)) { in bitwise_xor_function()
1710 op1_lval = _zval_get_long_func_noisy(op1); in bitwise_xor_function()
1712 if (result != op1) { in bitwise_xor_function()
1718 op1_lval = Z_LVAL_P(op1); in bitwise_xor_function()
1724 if (result != op1) { in bitwise_xor_function()
1733 if (op1 == result) { in bitwise_xor_function()
1741 ZEND_API int ZEND_FASTCALL shift_left_function(zval *result, zval *op1, zval *op2) /* {{{ */ in shift_left_function() argument
1745 convert_op1_op2_long(op1, op1_lval, op2, op2_lval, result, ZEND_SL, shift_left_function); in shift_left_function()
1750 if (op1 == result) { in shift_left_function()
1761 if (op1 != result) { in shift_left_function()
1768 if (op1 == result) { in shift_left_function()
1778 ZEND_API int ZEND_FASTCALL shift_right_function(zval *result, zval *op1, zval *op2) /* {{{ */ in shift_right_function() argument
1782 convert_op1_op2_long(op1, op1_lval, op2, op2_lval, result, ZEND_SR, shift_right_function); in shift_right_function()
1787 if (op1 == result) { in shift_right_function()
1798 if (op1 != result) { in shift_right_function()
1805 if (op1 == result) { in shift_right_function()
1814 ZEND_API int ZEND_FASTCALL concat_function(zval *result, zval *op1, zval *op2) /* {{{ */ in concat_function() argument
1816 zval *orig_op1 = op1; in concat_function()
1823 if (UNEXPECTED(Z_TYPE_P(op1) != IS_STRING)) { in concat_function()
1824 if (Z_ISREF_P(op1)) { in concat_function()
1825 op1 = Z_REFVAL_P(op1); in concat_function()
1826 if (Z_TYPE_P(op1) == IS_STRING) break; in concat_function()
1829 ZVAL_STR(&op1_copy, zval_get_string_func(op1)); in concat_function()
1837 if (result == op1) { in concat_function()
1838 if (UNEXPECTED(op1 == op2)) { in concat_function()
1842 op1 = &op1_copy; in concat_function()
1865 if (UNEXPECTED(Z_STRLEN_P(op1) == 0)) { in concat_function()
1873 if (EXPECTED(result != op1)) { in concat_function()
1877 ZVAL_COPY(result, op1); in concat_function()
1880 size_t op1_len = Z_STRLEN_P(op1); in concat_function()
1895 if (result == op1 && Z_REFCOUNTED_P(result)) { in concat_function()
1900 memcpy(ZSTR_VAL(result_str), Z_STRVAL_P(op1), op1_len); in concat_function()
1921 ZEND_API int ZEND_FASTCALL string_compare_function_ex(zval *op1, zval *op2, zend_bool case_insensit… in string_compare_function_ex() argument
1924 zend_string *str1 = zval_get_tmp_string(op1, &tmp_str1); in string_compare_function_ex()
1940 ZEND_API int ZEND_FASTCALL string_compare_function(zval *op1, zval *op2) /* {{{ */ in string_compare_function() argument
1942 if (EXPECTED(Z_TYPE_P(op1) == IS_STRING) && in string_compare_function()
1944 if (Z_STR_P(op1) == Z_STR_P(op2)) { in string_compare_function()
1947 return zend_binary_strcmp(Z_STRVAL_P(op1), Z_STRLEN_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op2)); in string_compare_function()
1951 zend_string *str1 = zval_get_tmp_string(op1, &tmp_str1); in string_compare_function()
1962 ZEND_API int ZEND_FASTCALL string_case_compare_function(zval *op1, zval *op2) /* {{{ */ in string_case_compare_function() argument
1964 if (EXPECTED(Z_TYPE_P(op1) == IS_STRING) && in string_case_compare_function()
1966 if (Z_STR_P(op1) == Z_STR_P(op2)) { in string_case_compare_function()
1969 …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()
1973 zend_string *str1 = zval_get_tmp_string(op1, &tmp_str1); in string_case_compare_function()
1984 ZEND_API int ZEND_FASTCALL string_locale_compare_function(zval *op1, zval *op2) /* {{{ */ in string_locale_compare_function() argument
1987 zend_string *str1 = zval_get_tmp_string(op1, &tmp_str1); in string_locale_compare_function()
1997 ZEND_API int ZEND_FASTCALL numeric_compare_function(zval *op1, zval *op2) /* {{{ */ in numeric_compare_function() argument
2001 d1 = zval_get_double(op1); in numeric_compare_function()
2025 ZEND_API int ZEND_FASTCALL compare_function(zval *result, zval *op1, zval *op2) /* {{{ */ in compare_function() argument
2033 switch (TYPE_PAIR(Z_TYPE_P(op1), Z_TYPE_P(op2))) { in compare_function()
2035 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()
2039 Z_DVAL_P(result) = Z_DVAL_P(op1) - (double)Z_LVAL_P(op2); in compare_function()
2044 Z_DVAL_P(result) = (double)Z_LVAL_P(op1) - Z_DVAL_P(op2); in compare_function()
2049 if (Z_DVAL_P(op1) == Z_DVAL_P(op2)) { in compare_function()
2052 Z_DVAL_P(result) = Z_DVAL_P(op1) - Z_DVAL_P(op2); in compare_function()
2058 ZVAL_LONG(result, zend_compare_arrays(op1, op2)); in compare_function()
2078 if (Z_STR_P(op1) == Z_STR_P(op2)) { in compare_function()
2082 ZVAL_LONG(result, zendi_smart_strcmp(Z_STR_P(op1), Z_STR_P(op2))); in compare_function()
2090 ZVAL_LONG(result, Z_STRLEN_P(op1) == 0 ? 0 : 1); in compare_function()
2102 if (Z_ISREF_P(op1)) { in compare_function()
2103 op1 = Z_REFVAL_P(op1); in compare_function()
2110 if (Z_TYPE_P(op1) == IS_OBJECT && Z_OBJ_HANDLER_P(op1, compare)) { in compare_function()
2111 ret = Z_OBJ_HANDLER_P(op1, compare)(result, op1, op2); in compare_function()
2117 ret = Z_OBJ_HANDLER_P(op2, compare)(result, op1, op2); in compare_function()
2124 if (Z_TYPE_P(op1) == IS_OBJECT && Z_TYPE_P(op2) == IS_OBJECT) { in compare_function()
2125 if (Z_OBJ_P(op1) == Z_OBJ_P(op2)) { in compare_function()
2130 if (Z_OBJ_HANDLER_P(op1, compare_objects) == Z_OBJ_HANDLER_P(op2, compare_objects)) { in compare_function()
2131 ZVAL_LONG(result, Z_OBJ_HANDLER_P(op1, compare_objects)(op1, op2)); in compare_function()
2135 if (Z_TYPE_P(op1) == IS_OBJECT) { in compare_function()
2136 if (Z_OBJ_HT_P(op1)->get) { in compare_function()
2138 op_free = Z_OBJ_HT_P(op1)->get(op1, &rv); in compare_function()
2142 } else if (Z_TYPE_P(op2) != IS_OBJECT && Z_OBJ_HT_P(op1)->cast_object) { in compare_function()
2144 …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()
2158 ret = compare_function(result, op1, op_free); in compare_function()
2161 } else if (Z_TYPE_P(op1) != IS_OBJECT && Z_OBJ_HT_P(op2)->cast_object) { in compare_function()
2163 …->cast_object(op2, &tmp_free, ((Z_TYPE_P(op1) == IS_FALSE || Z_TYPE_P(op1) == IS_TRUE) ? _IS_BOOL … in compare_function()
2168 ret = compare_function(result, op1, &tmp_free); in compare_function()
2171 } else if (Z_TYPE_P(op1) == IS_OBJECT) { in compare_function()
2177 if (Z_TYPE_P(op1) < IS_TRUE) { in compare_function()
2180 } else if (Z_TYPE_P(op1) == IS_TRUE) { in compare_function()
2184 ZVAL_LONG(result, zval_is_true(op1) ? 1 : 0); in compare_function()
2187 ZVAL_LONG(result, zval_is_true(op1) ? 0 : -1); in compare_function()
2190 op1 = zendi_convert_scalar_to_number(op1, &op1_copy, result, 1); in compare_function()
2193 if (result != op1) { in compare_function()
2200 } else if (Z_TYPE_P(op1)==IS_ARRAY) { in compare_function()
2209 if (result != op1) { in compare_function()
2232 ZEND_API zend_bool ZEND_FASTCALL zend_is_identical(zval *op1, zval *op2) /* {{{ */ in zend_is_identical() argument
2234 if (Z_TYPE_P(op1) != Z_TYPE_P(op2)) { in zend_is_identical()
2237 switch (Z_TYPE_P(op1)) { in zend_is_identical()
2243 return (Z_LVAL_P(op1) == Z_LVAL_P(op2)); in zend_is_identical()
2245 return (Z_RES_P(op1) == Z_RES_P(op2)); in zend_is_identical()
2247 return (Z_DVAL_P(op1) == Z_DVAL_P(op2)); in zend_is_identical()
2249 return zend_string_equals(Z_STR_P(op1), Z_STR_P(op2)); in zend_is_identical()
2251 return (Z_ARRVAL_P(op1) == Z_ARRVAL_P(op2) || in zend_is_identical()
2252 …zend_hash_compare(Z_ARRVAL_P(op1), Z_ARRVAL_P(op2), (compare_func_t) hash_zval_identical_function,… in zend_is_identical()
2254 return (Z_OBJ_P(op1) == Z_OBJ_P(op2)); in zend_is_identical()
2261 ZEND_API int ZEND_FASTCALL is_identical_function(zval *result, zval *op1, zval *op2) /* {{{ */ in is_identical_function() argument
2263 ZVAL_BOOL(result, zend_is_identical(op1, op2)); in is_identical_function()
2268 ZEND_API int ZEND_FASTCALL is_not_identical_function(zval *result, zval *op1, zval *op2) /* {{{ */ in is_not_identical_function() argument
2270 ZVAL_BOOL(result, !zend_is_identical(op1, op2)); in is_not_identical_function()
2275 ZEND_API int ZEND_FASTCALL is_equal_function(zval *result, zval *op1, zval *op2) /* {{{ */ in is_equal_function() argument
2277 if (compare_function(result, op1, op2) == FAILURE) { in is_equal_function()
2285 ZEND_API int ZEND_FASTCALL is_not_equal_function(zval *result, zval *op1, zval *op2) /* {{{ */ in is_not_equal_function() argument
2287 if (compare_function(result, op1, op2) == FAILURE) { in is_not_equal_function()
2295 ZEND_API int ZEND_FASTCALL is_smaller_function(zval *result, zval *op1, zval *op2) /* {{{ */ in is_smaller_function() argument
2297 if (compare_function(result, op1, op2) == FAILURE) { in is_smaller_function()
2305 ZEND_API int ZEND_FASTCALL is_smaller_or_equal_function(zval *result, zval *op1, zval *op2) /* {{{ … in is_smaller_or_equal_function() argument
2307 if (compare_function(result, op1, op2) == FAILURE) { in is_smaller_or_equal_function()
2455 ZEND_API int ZEND_FASTCALL increment_function(zval *op1) /* {{{ */ in increment_function() argument
2458 switch (Z_TYPE_P(op1)) { in increment_function()
2460 fast_long_increment_function(op1); in increment_function()
2463 Z_DVAL_P(op1) = Z_DVAL_P(op1) + 1; in increment_function()
2466 ZVAL_LONG(op1, 1); in increment_function()
2472 switch (is_numeric_string(Z_STRVAL_P(op1), Z_STRLEN_P(op1), &lval, &dval, 0)) { in increment_function()
2474 zval_ptr_dtor_str(op1); in increment_function()
2478 ZVAL_DOUBLE(op1, d+1); in increment_function()
2480 ZVAL_LONG(op1, lval+1); in increment_function()
2484 zval_ptr_dtor_str(op1); in increment_function()
2485 ZVAL_DOUBLE(op1, dval+1); in increment_function()
2489 increment_string(op1); in increment_function()
2495 if (Z_OBJ_HANDLER_P(op1, get) in increment_function()
2496 && Z_OBJ_HANDLER_P(op1, set)) { in increment_function()
2501 val = Z_OBJ_HANDLER_P(op1, get)(op1, &rv); in increment_function()
2504 Z_OBJ_HANDLER_P(op1, set)(op1, val); in increment_function() local
2506 } else if (Z_OBJ_HANDLER_P(op1, do_operation)) { in increment_function()
2511 res = Z_OBJ_HANDLER_P(op1, do_operation)(ZEND_ADD, op1, op1, &op2); in increment_function()
2517 op1 = Z_REFVAL_P(op1); in increment_function()
2526 ZEND_API int ZEND_FASTCALL decrement_function(zval *op1) /* {{{ */ in decrement_function() argument
2532 switch (Z_TYPE_P(op1)) { in decrement_function()
2534 fast_long_decrement_function(op1); in decrement_function()
2537 Z_DVAL_P(op1) = Z_DVAL_P(op1) - 1; in decrement_function()
2540 if (Z_STRLEN_P(op1) == 0) { /* consider as 0 */ in decrement_function()
2541 zval_ptr_dtor_str(op1); in decrement_function()
2542 ZVAL_LONG(op1, -1); in decrement_function()
2545 switch (is_numeric_string(Z_STRVAL_P(op1), Z_STRLEN_P(op1), &lval, &dval, 0)) { in decrement_function()
2547 zval_ptr_dtor_str(op1); in decrement_function()
2550 ZVAL_DOUBLE(op1, d-1); in decrement_function()
2552 ZVAL_LONG(op1, lval-1); in decrement_function()
2556 zval_ptr_dtor_str(op1); in decrement_function()
2557 ZVAL_DOUBLE(op1, dval - 1); in decrement_function()
2562 if (Z_OBJ_HANDLER_P(op1, get) in decrement_function()
2563 && Z_OBJ_HANDLER_P(op1, set)) { in decrement_function()
2568 val = Z_OBJ_HANDLER_P(op1, get)(op1, &rv); in decrement_function()
2571 Z_OBJ_HANDLER_P(op1, set)(op1, val); in decrement_function() local
2573 } else if (Z_OBJ_HANDLER_P(op1, do_operation)) { in decrement_function()
2578 res = Z_OBJ_HANDLER_P(op1, do_operation)(ZEND_SUB, op1, op1, &op2); in decrement_function()
2584 op1 = Z_REFVAL_P(op1); in decrement_function()