Lines Matching refs:op1
466 if (UNEXPECTED(Z_TYPE_P(op1) == IS_OBJECT) \
467 && UNEXPECTED(Z_OBJ_HANDLER_P(op1, do_operation))) { \
468 if (EXPECTED(SUCCESS == Z_OBJ_HANDLER_P(op1, do_operation)(opcode, result, op1, op2))) { \
476 && EXPECTED(SUCCESS == Z_OBJ_HANDLER_P(op2, do_operation)(opcode, result, op1, op2))) { \
486 if (UNEXPECTED(Z_TYPE_P(op1) == IS_OBJECT) \
487 && UNEXPECTED(Z_OBJ_HANDLER_P(op1, do_operation)) \
488 && EXPECTED(SUCCESS == Z_OBJ_HANDLER_P(op1, do_operation)(opcode, result, op1, NULL))) { \
492 #define convert_op1_op2_long(op1, op1_lval, op2, op2_lval, result, opcode, sigil) \ argument
494 if (UNEXPECTED(Z_TYPE_P(op1) != IS_LONG)) { \
496 if (Z_ISREF_P(op1)) { \
497 op1 = Z_REFVAL_P(op1); \
498 if (Z_TYPE_P(op1) == IS_LONG) { \
499 op1_lval = Z_LVAL_P(op1); \
504 op1_lval = zendi_try_get_long(op1, &failed); \
506 zend_binop_error(sigil, op1, op2); \
507 if (result != op1) { \
513 op1_lval = Z_LVAL_P(op1); \
529 zend_binop_error(sigil, op1, op2); \
530 if (result != op1) { \
1063 …ver_inline void ZEND_FASTCALL zend_binop_error(const char *operator, zval *op1, zval *op2) /* {{{ … in zend_binop_error() argument
1069 zend_zval_type_name(op1), operator, zend_zval_type_name(op2)); in zend_binop_error()
1073 static zend_never_inline void ZEND_FASTCALL add_function_array(zval *result, zval *op1, zval *op2) … in add_function_array() argument
1075 if (result == op1 && Z_ARR_P(op1) == Z_ARR_P(op2)) { in add_function_array()
1079 if (result != op1) { in add_function_array()
1080 ZVAL_ARR(result, zend_array_dup(Z_ARR_P(op1))); in add_function_array()
1088 static zend_always_inline zend_result add_function_fast(zval *result, zval *op1, zval *op2) /* {{{ … in add_function_fast() argument
1090 uint8_t type_pair = TYPE_PAIR(Z_TYPE_P(op1), Z_TYPE_P(op2)); in add_function_fast()
1093 fast_long_add_function(result, op1, op2); in add_function_fast()
1096 ZVAL_DOUBLE(result, Z_DVAL_P(op1) + Z_DVAL_P(op2)); in add_function_fast()
1099 ZVAL_DOUBLE(result, ((double)Z_LVAL_P(op1)) + Z_DVAL_P(op2)); in add_function_fast()
1102 ZVAL_DOUBLE(result, Z_DVAL_P(op1) + ((double)Z_LVAL_P(op2))); in add_function_fast()
1105 add_function_array(result, op1, op2); in add_function_fast()
1112 static zend_never_inline zend_result ZEND_FASTCALL add_function_slow(zval *result, zval *op1, zval … in add_function_slow() argument
1114 ZVAL_DEREF(op1); in add_function_slow()
1116 if (add_function_fast(result, op1, op2) == SUCCESS) { in add_function_slow()
1123 if (UNEXPECTED(zendi_try_convert_scalar_to_number(op1, &op1_copy) == FAILURE) in add_function_slow()
1125 zend_binop_error("+", op1, op2); in add_function_slow()
1126 if (result != op1) { in add_function_slow()
1132 if (result == op1) { in add_function_slow()
1144 ZEND_API zend_result ZEND_FASTCALL add_function(zval *result, zval *op1, zval *op2) /* {{{ */ in add_function() argument
1146 if (add_function_fast(result, op1, op2) == SUCCESS) { in add_function()
1149 return add_function_slow(result, op1, op2); in add_function()
1154 static zend_always_inline zend_result sub_function_fast(zval *result, zval *op1, zval *op2) /* {{{ … in sub_function_fast() argument
1156 uint8_t type_pair = TYPE_PAIR(Z_TYPE_P(op1), Z_TYPE_P(op2)); in sub_function_fast()
1159 fast_long_sub_function(result, op1, op2); in sub_function_fast()
1162 ZVAL_DOUBLE(result, Z_DVAL_P(op1) - Z_DVAL_P(op2)); in sub_function_fast()
1165 ZVAL_DOUBLE(result, ((double)Z_LVAL_P(op1)) - Z_DVAL_P(op2)); in sub_function_fast()
1168 ZVAL_DOUBLE(result, Z_DVAL_P(op1) - ((double)Z_LVAL_P(op2))); in sub_function_fast()
1176 static zend_never_inline zend_result ZEND_FASTCALL sub_function_slow(zval *result, zval *op1, zval … in sub_function_slow() argument
1178 ZVAL_DEREF(op1); in sub_function_slow()
1180 if (sub_function_fast(result, op1, op2) == SUCCESS) { in sub_function_slow()
1187 if (UNEXPECTED(zendi_try_convert_scalar_to_number(op1, &op1_copy) == FAILURE) in sub_function_slow()
1189 zend_binop_error("-", op1, op2); in sub_function_slow()
1190 if (result != op1) { in sub_function_slow()
1196 if (result == op1) { in sub_function_slow()
1209 ZEND_API zend_result ZEND_FASTCALL sub_function(zval *result, zval *op1, zval *op2) /* {{{ */ in sub_function() argument
1211 if (sub_function_fast(result, op1, op2) == SUCCESS) { in sub_function()
1214 return sub_function_slow(result, op1, op2); in sub_function()
1219 static zend_always_inline zend_result mul_function_fast(zval *result, zval *op1, zval *op2) /* {{{ … in mul_function_fast() argument
1221 uint8_t type_pair = TYPE_PAIR(Z_TYPE_P(op1), Z_TYPE_P(op2)); in mul_function_fast()
1226 Z_LVAL_P(op1), Z_LVAL_P(op2), in mul_function_fast()
1231 ZVAL_DOUBLE(result, Z_DVAL_P(op1) * Z_DVAL_P(op2)); in mul_function_fast()
1234 ZVAL_DOUBLE(result, ((double)Z_LVAL_P(op1)) * Z_DVAL_P(op2)); in mul_function_fast()
1237 ZVAL_DOUBLE(result, Z_DVAL_P(op1) * ((double)Z_LVAL_P(op2))); in mul_function_fast()
1245 static zend_never_inline zend_result ZEND_FASTCALL mul_function_slow(zval *result, zval *op1, zval … in mul_function_slow() argument
1247 ZVAL_DEREF(op1); in mul_function_slow()
1249 if (mul_function_fast(result, op1, op2) == SUCCESS) { in mul_function_slow()
1256 if (UNEXPECTED(zendi_try_convert_scalar_to_number(op1, &op1_copy) == FAILURE) in mul_function_slow()
1258 zend_binop_error("*", op1, op2); in mul_function_slow()
1259 if (result != op1) { in mul_function_slow()
1265 if (result == op1) { in mul_function_slow()
1278 ZEND_API zend_result ZEND_FASTCALL mul_function(zval *result, zval *op1, zval *op2) /* {{{ */ in mul_function() argument
1280 if (mul_function_fast(result, op1, op2) == SUCCESS) { in mul_function()
1283 return mul_function_slow(result, op1, op2); in mul_function()
1302 static zend_result ZEND_FASTCALL pow_function_base(zval *result, zval *op1, zval *op2) /* {{{ */ in pow_function_base() argument
1304 uint8_t type_pair = TYPE_PAIR(Z_TYPE_P(op1), Z_TYPE_P(op2)); in pow_function_base()
1308 zend_long l1 = 1, l2 = Z_LVAL_P(op1), i = Z_LVAL_P(op2); in pow_function_base()
1341 ZVAL_DOUBLE(result, safe_pow((double)Z_LVAL_P(op1), (double)Z_LVAL_P(op2))); in pow_function_base()
1345 ZVAL_DOUBLE(result, safe_pow(Z_DVAL_P(op1), Z_DVAL_P(op2))); in pow_function_base()
1348 ZVAL_DOUBLE(result, safe_pow((double)Z_LVAL_P(op1), Z_DVAL_P(op2))); in pow_function_base()
1351 ZVAL_DOUBLE(result, safe_pow(Z_DVAL_P(op1), (double)Z_LVAL_P(op2))); in pow_function_base()
1359 ZEND_API zend_result ZEND_FASTCALL pow_function(zval *result, zval *op1, zval *op2) /* {{{ */ in pow_function() argument
1361 ZVAL_DEREF(op1); in pow_function()
1363 if (pow_function_base(result, op1, op2) == SUCCESS) { in pow_function()
1370 if (UNEXPECTED(zendi_try_convert_scalar_to_number(op1, &op1_copy) == FAILURE) in pow_function()
1372 zend_binop_error("**", op1, op2); in pow_function()
1373 if (result != op1) { in pow_function()
1379 if (result == op1) { in pow_function()
1398 static zend_div_status ZEND_FASTCALL div_function_base(zval *result, const zval *op1, const zval *o… in div_function_base() argument
1400 uint8_t type_pair = TYPE_PAIR(Z_TYPE_P(op1), Z_TYPE_P(op2)); in div_function_base()
1405 } else if (Z_LVAL_P(op2) == -1 && Z_LVAL_P(op1) == ZEND_LONG_MIN) { in div_function_base()
1410 if (Z_LVAL_P(op1) % Z_LVAL_P(op2) == 0) { /* integer */ in div_function_base()
1411 ZVAL_LONG(result, Z_LVAL_P(op1) / Z_LVAL_P(op2)); in div_function_base()
1413 ZVAL_DOUBLE(result, ((double) Z_LVAL_P(op1)) / Z_LVAL_P(op2)); in div_function_base()
1420 ZVAL_DOUBLE(result, Z_DVAL_P(op1) / Z_DVAL_P(op2)); in div_function_base()
1426 ZVAL_DOUBLE(result, Z_DVAL_P(op1) / (double)Z_LVAL_P(op2)); in div_function_base()
1432 ZVAL_DOUBLE(result, (double)Z_LVAL_P(op1) / Z_DVAL_P(op2)); in div_function_base()
1440 ZEND_API zend_result ZEND_FASTCALL div_function(zval *result, zval *op1, zval *op2) /* {{{ */ in div_function() argument
1442 ZVAL_DEREF(op1); in div_function()
1445 zend_div_status retval = div_function_base(result, op1, op2); in div_function()
1457 if (UNEXPECTED(zendi_try_convert_scalar_to_number(op1, &op1_copy) == FAILURE) in div_function()
1459 zend_binop_error("/", op1, op2); in div_function()
1460 if (result != op1) { in div_function()
1468 if (result == op1) { in div_function()
1477 if (result != op1) { in div_function()
1485 ZEND_API zend_result ZEND_FASTCALL mod_function(zval *result, zval *op1, zval *op2) /* {{{ */ in mod_function() argument
1489 convert_op1_op2_long(op1, op1_lval, op2, op2_lval, result, ZEND_MOD, "%"); in mod_function()
1498 if (op1 != result) { in mod_function()
1504 if (op1 == result) { in mod_function()
1519 ZEND_API zend_result ZEND_FASTCALL boolean_xor_function(zval *result, zval *op1, zval *op2) /* {{{ … in boolean_xor_function() argument
1524 if (Z_TYPE_P(op1) == IS_FALSE) { in boolean_xor_function()
1526 } else if (EXPECTED(Z_TYPE_P(op1) == IS_TRUE)) { in boolean_xor_function()
1529 if (Z_ISREF_P(op1)) { in boolean_xor_function()
1530 op1 = Z_REFVAL_P(op1); in boolean_xor_function()
1531 if (Z_TYPE_P(op1) == IS_FALSE) { in boolean_xor_function()
1534 } else if (EXPECTED(Z_TYPE_P(op1) == IS_TRUE)) { in boolean_xor_function()
1540 op1_val = zval_is_true(op1); in boolean_xor_function()
1569 ZEND_API zend_result ZEND_FASTCALL boolean_not_function(zval *result, zval *op1) /* {{{ */ in boolean_not_function() argument
1571 if (Z_TYPE_P(op1) < IS_TRUE) { in boolean_not_function()
1573 } else if (EXPECTED(Z_TYPE_P(op1) == IS_TRUE)) { in boolean_not_function()
1576 if (Z_ISREF_P(op1)) { in boolean_not_function()
1577 op1 = Z_REFVAL_P(op1); in boolean_not_function()
1578 if (Z_TYPE_P(op1) < IS_TRUE) { in boolean_not_function()
1581 } else if (EXPECTED(Z_TYPE_P(op1) == IS_TRUE)) { in boolean_not_function()
1588 ZVAL_BOOL(result, !zval_is_true(op1)); in boolean_not_function()
1594 ZEND_API zend_result ZEND_FASTCALL bitwise_not_function(zval *result, zval *op1) /* {{{ */ in bitwise_not_function() argument
1597 switch (Z_TYPE_P(op1)) { in bitwise_not_function()
1599 ZVAL_LONG(result, ~Z_LVAL_P(op1)); in bitwise_not_function()
1602 zend_long lval = zend_dval_to_lval(Z_DVAL_P(op1)); in bitwise_not_function()
1603 if (!zend_is_long_compatible(Z_DVAL_P(op1), lval)) { in bitwise_not_function()
1604 zend_incompatible_double_to_long_error(Z_DVAL_P(op1)); in bitwise_not_function()
1606 if (result != op1) { in bitwise_not_function()
1618 if (Z_STRLEN_P(op1) == 1) { in bitwise_not_function()
1619 zend_uchar not = (zend_uchar) ~*Z_STRVAL_P(op1); in bitwise_not_function()
1622 ZVAL_NEW_STR(result, zend_string_alloc(Z_STRLEN_P(op1), 0)); in bitwise_not_function()
1623 for (i = 0; i < Z_STRLEN_P(op1); i++) { in bitwise_not_function()
1624 Z_STRVAL_P(result)[i] = ~Z_STRVAL_P(op1)[i]; in bitwise_not_function()
1631 op1 = Z_REFVAL_P(op1); in bitwise_not_function()
1636 if (result != op1) { in bitwise_not_function()
1639 zend_type_error("Cannot perform bitwise not on %s", zend_zval_value_name(op1)); in bitwise_not_function()
1645 ZEND_API zend_result ZEND_FASTCALL bitwise_or_function(zval *result, zval *op1, zval *op2) /* {{{ */ in bitwise_or_function() argument
1649 if (EXPECTED(Z_TYPE_P(op1) == IS_LONG) && EXPECTED(Z_TYPE_P(op2) == IS_LONG)) { in bitwise_or_function()
1650 ZVAL_LONG(result, Z_LVAL_P(op1) | Z_LVAL_P(op2)); in bitwise_or_function()
1654 ZVAL_DEREF(op1); in bitwise_or_function()
1657 if (Z_TYPE_P(op1) == IS_STRING && EXPECTED(Z_TYPE_P(op2) == IS_STRING)) { in bitwise_or_function()
1662 if (EXPECTED(Z_STRLEN_P(op1) >= Z_STRLEN_P(op2))) { in bitwise_or_function()
1663 if (EXPECTED(Z_STRLEN_P(op1) == Z_STRLEN_P(op2)) && Z_STRLEN_P(op1) == 1) { in bitwise_or_function()
1664 zend_uchar or = (zend_uchar) (*Z_STRVAL_P(op1) | *Z_STRVAL_P(op2)); in bitwise_or_function()
1665 if (result==op1) { in bitwise_or_function()
1671 longer = op1; in bitwise_or_function()
1675 shorter = op1; in bitwise_or_function()
1683 if (result==op1) { in bitwise_or_function()
1690 if (UNEXPECTED(Z_TYPE_P(op1) != IS_LONG)) { in bitwise_or_function()
1693 op1_lval = zendi_try_get_long(op1, &failed); in bitwise_or_function()
1695 zend_binop_error("|", op1, op2); in bitwise_or_function()
1696 if (result != op1) { in bitwise_or_function()
1702 op1_lval = Z_LVAL_P(op1); in bitwise_or_function()
1709 zend_binop_error("|", op1, op2); in bitwise_or_function()
1710 if (result != op1) { in bitwise_or_function()
1719 if (op1 == result) { in bitwise_or_function()
1727 ZEND_API zend_result ZEND_FASTCALL bitwise_and_function(zval *result, zval *op1, zval *op2) /* {{{ … in bitwise_and_function() argument
1731 if (EXPECTED(Z_TYPE_P(op1) == IS_LONG) && EXPECTED(Z_TYPE_P(op2) == IS_LONG)) { in bitwise_and_function()
1732 ZVAL_LONG(result, Z_LVAL_P(op1) & Z_LVAL_P(op2)); in bitwise_and_function()
1736 ZVAL_DEREF(op1); in bitwise_and_function()
1739 if (Z_TYPE_P(op1) == IS_STRING && Z_TYPE_P(op2) == IS_STRING) { in bitwise_and_function()
1744 if (EXPECTED(Z_STRLEN_P(op1) >= Z_STRLEN_P(op2))) { in bitwise_and_function()
1745 if (EXPECTED(Z_STRLEN_P(op1) == Z_STRLEN_P(op2)) && Z_STRLEN_P(op1) == 1) { in bitwise_and_function()
1746 zend_uchar and = (zend_uchar) (*Z_STRVAL_P(op1) & *Z_STRVAL_P(op2)); in bitwise_and_function()
1747 if (result==op1) { in bitwise_and_function()
1753 longer = op1; in bitwise_and_function()
1757 shorter = op1; in bitwise_and_function()
1765 if (result==op1) { in bitwise_and_function()
1772 if (UNEXPECTED(Z_TYPE_P(op1) != IS_LONG)) { in bitwise_and_function()
1775 op1_lval = zendi_try_get_long(op1, &failed); in bitwise_and_function()
1777 zend_binop_error("&", op1, op2); in bitwise_and_function()
1778 if (result != op1) { in bitwise_and_function()
1784 op1_lval = Z_LVAL_P(op1); in bitwise_and_function()
1791 zend_binop_error("&", op1, op2); in bitwise_and_function()
1792 if (result != op1) { in bitwise_and_function()
1801 if (op1 == result) { in bitwise_and_function()
1809 ZEND_API zend_result ZEND_FASTCALL bitwise_xor_function(zval *result, zval *op1, zval *op2) /* {{{ … in bitwise_xor_function() argument
1813 if (EXPECTED(Z_TYPE_P(op1) == IS_LONG) && EXPECTED(Z_TYPE_P(op2) == IS_LONG)) { in bitwise_xor_function()
1814 ZVAL_LONG(result, Z_LVAL_P(op1) ^ Z_LVAL_P(op2)); in bitwise_xor_function()
1818 ZVAL_DEREF(op1); in bitwise_xor_function()
1821 if (Z_TYPE_P(op1) == IS_STRING && Z_TYPE_P(op2) == IS_STRING) { in bitwise_xor_function()
1826 if (EXPECTED(Z_STRLEN_P(op1) >= Z_STRLEN_P(op2))) { in bitwise_xor_function()
1827 if (EXPECTED(Z_STRLEN_P(op1) == Z_STRLEN_P(op2)) && Z_STRLEN_P(op1) == 1) { in bitwise_xor_function()
1828 zend_uchar xor = (zend_uchar) (*Z_STRVAL_P(op1) ^ *Z_STRVAL_P(op2)); in bitwise_xor_function()
1829 if (result==op1) { in bitwise_xor_function()
1835 longer = op1; in bitwise_xor_function()
1839 shorter = op1; in bitwise_xor_function()
1847 if (result==op1) { in bitwise_xor_function()
1854 if (UNEXPECTED(Z_TYPE_P(op1) != IS_LONG)) { in bitwise_xor_function()
1857 op1_lval = zendi_try_get_long(op1, &failed); in bitwise_xor_function()
1859 zend_binop_error("^", op1, op2); in bitwise_xor_function()
1860 if (result != op1) { in bitwise_xor_function()
1866 op1_lval = Z_LVAL_P(op1); in bitwise_xor_function()
1873 zend_binop_error("^", op1, op2); in bitwise_xor_function()
1874 if (result != op1) { in bitwise_xor_function()
1883 if (op1 == result) { in bitwise_xor_function()
1891 ZEND_API zend_result ZEND_FASTCALL shift_left_function(zval *result, zval *op1, zval *op2) /* {{{ */ in shift_left_function() argument
1895 convert_op1_op2_long(op1, op1_lval, op2, op2_lval, result, ZEND_SL, "<<"); in shift_left_function()
1900 if (op1 == result) { in shift_left_function()
1911 if (op1 != result) { in shift_left_function()
1918 if (op1 == result) { in shift_left_function()
1928 ZEND_API zend_result ZEND_FASTCALL shift_right_function(zval *result, zval *op1, zval *op2) /* {{{ … in shift_right_function() argument
1932 convert_op1_op2_long(op1, op1_lval, op2, op2_lval, result, ZEND_SR, ">>"); in shift_right_function()
1937 if (op1 == result) { in shift_right_function()
1948 if (op1 != result) { in shift_right_function()
1955 if (op1 == result) { in shift_right_function()
1964 ZEND_API zend_result ZEND_FASTCALL concat_function(zval *result, zval *op1, zval *op2) /* {{{ */ in concat_function() argument
1966 zval *orig_op1 = op1; in concat_function()
1972 if (EXPECTED(Z_TYPE_P(op1) == IS_STRING)) { in concat_function()
1973 op1_string = Z_STR_P(op1); in concat_function()
1975 if (Z_ISREF_P(op1)) { in concat_function()
1976 op1 = Z_REFVAL_P(op1); in concat_function()
1977 if (Z_TYPE_P(op1) == IS_STRING) { in concat_function()
1978 op1_string = Z_STR_P(op1); in concat_function()
1983 op1_string = zval_get_string_func(op1); in concat_function()
1992 if (result == op1) { in concat_function()
1993 if (UNEXPECTED(op1 == op2)) { in concat_function()
2045 if (EXPECTED(result != op1 || Z_TYPE_P(result) != IS_STRING)) { in concat_function()
2074 if (result == op1) { in concat_function()
2115 ZEND_API int ZEND_FASTCALL string_compare_function_ex(zval *op1, zval *op2, bool case_insensitive) … in string_compare_function_ex() argument
2118 zend_string *str1 = zval_get_tmp_string(op1, &tmp_str1); in string_compare_function_ex()
2134 ZEND_API int ZEND_FASTCALL string_compare_function(zval *op1, zval *op2) /* {{{ */ in string_compare_function() argument
2136 if (EXPECTED(Z_TYPE_P(op1) == IS_STRING) && in string_compare_function()
2138 if (Z_STR_P(op1) == Z_STR_P(op2)) { in string_compare_function()
2141 return zend_binary_strcmp(Z_STRVAL_P(op1), Z_STRLEN_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op2)); in string_compare_function()
2145 zend_string *str1 = zval_get_tmp_string(op1, &tmp_str1); in string_compare_function()
2156 ZEND_API int ZEND_FASTCALL string_case_compare_function(zval *op1, zval *op2) /* {{{ */ in string_case_compare_function() argument
2158 if (EXPECTED(Z_TYPE_P(op1) == IS_STRING) && in string_case_compare_function()
2160 if (Z_STR_P(op1) == Z_STR_P(op2)) { in string_case_compare_function()
2163 … return zend_binary_strcasecmp(Z_STRVAL_P(op1), Z_STRLEN_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op2)); in string_case_compare_function()
2167 zend_string *str1 = zval_get_tmp_string(op1, &tmp_str1); in string_case_compare_function()
2178 ZEND_API int ZEND_FASTCALL string_locale_compare_function(zval *op1, zval *op2) /* {{{ */ in string_locale_compare_function() argument
2181 zend_string *str1 = zval_get_tmp_string(op1, &tmp_str1); in string_locale_compare_function()
2191 ZEND_API int ZEND_FASTCALL numeric_compare_function(zval *op1, zval *op2) /* {{{ */ in numeric_compare_function() argument
2195 d1 = zval_get_double(op1); in numeric_compare_function()
2202 ZEND_API zend_result ZEND_FASTCALL compare_function(zval *result, zval *op1, zval *op2) /* {{{ */ in compare_function() argument
2204 ZVAL_LONG(result, zend_compare(op1, op2)); in compare_function()
2253 ZEND_API int ZEND_FASTCALL zend_compare(zval *op1, zval *op2) /* {{{ */ in zend_compare() argument
2259 switch (TYPE_PAIR(Z_TYPE_P(op1), Z_TYPE_P(op2))) { in zend_compare()
2261 return Z_LVAL_P(op1)>Z_LVAL_P(op2)?1:(Z_LVAL_P(op1)<Z_LVAL_P(op2)?-1:0); in zend_compare()
2264 return ZEND_THREEWAY_COMPARE(Z_DVAL_P(op1), (double)Z_LVAL_P(op2)); in zend_compare()
2267 return ZEND_THREEWAY_COMPARE((double)Z_LVAL_P(op1), Z_DVAL_P(op2)); in zend_compare()
2270 return ZEND_THREEWAY_COMPARE(Z_DVAL_P(op1), Z_DVAL_P(op2)); in zend_compare()
2273 return zend_compare_arrays(op1, op2); in zend_compare()
2289 if (Z_STR_P(op1) == Z_STR_P(op2)) { in zend_compare()
2292 return zendi_smart_strcmp(Z_STR_P(op1), Z_STR_P(op2)); in zend_compare()
2298 return Z_STRLEN_P(op1) == 0 ? 0 : 1; in zend_compare()
2301 return compare_long_to_string(Z_LVAL_P(op1), Z_STR_P(op2)); in zend_compare()
2304 return -compare_long_to_string(Z_LVAL_P(op2), Z_STR_P(op1)); in zend_compare()
2307 if (zend_isnan(Z_DVAL_P(op1))) { in zend_compare()
2311 return compare_double_to_string(Z_DVAL_P(op1), Z_STR_P(op2)); in zend_compare()
2318 return -compare_double_to_string(Z_DVAL_P(op2), Z_STR_P(op1)); in zend_compare()
2327 if (Z_ISREF_P(op1)) { in zend_compare()
2328 op1 = Z_REFVAL_P(op1); in zend_compare()
2335 if (Z_TYPE_P(op1) == IS_OBJECT in zend_compare()
2337 && Z_OBJ_P(op1) == Z_OBJ_P(op2)) { in zend_compare()
2339 } else if (Z_TYPE_P(op1) == IS_OBJECT) { in zend_compare()
2340 return Z_OBJ_HANDLER_P(op1, compare)(op1, op2); in zend_compare()
2342 return Z_OBJ_HANDLER_P(op2, compare)(op1, op2); in zend_compare()
2346 if (Z_TYPE_P(op1) < IS_TRUE) { in zend_compare()
2348 } else if (Z_TYPE_P(op1) == IS_TRUE) { in zend_compare()
2351 return zval_is_true(op1) ? 1 : 0; in zend_compare()
2353 return zval_is_true(op1) ? 0 : -1; in zend_compare()
2355 op1 = _zendi_convert_scalar_to_number_silent(op1, &op1_copy); in zend_compare()
2362 } else if (Z_TYPE_P(op1)==IS_ARRAY) { in zend_compare()
2390 ZEND_API bool ZEND_FASTCALL zend_is_identical(const zval *op1, const zval *op2) /* {{{ */ in zend_is_identical() argument
2392 if (Z_TYPE_P(op1) != Z_TYPE_P(op2)) { in zend_is_identical()
2395 switch (Z_TYPE_P(op1)) { in zend_is_identical()
2401 return (Z_LVAL_P(op1) == Z_LVAL_P(op2)); in zend_is_identical()
2403 return (Z_RES_P(op1) == Z_RES_P(op2)); in zend_is_identical()
2405 return (Z_DVAL_P(op1) == Z_DVAL_P(op2)); in zend_is_identical()
2407 return zend_string_equals(Z_STR_P(op1), Z_STR_P(op2)); in zend_is_identical()
2409 return (Z_ARRVAL_P(op1) == Z_ARRVAL_P(op2) || in zend_is_identical()
2410 …zend_hash_compare(Z_ARRVAL_P(op1), Z_ARRVAL_P(op2), (compare_func_t) hash_zval_identical_function,… in zend_is_identical()
2412 return (Z_OBJ_P(op1) == Z_OBJ_P(op2)); in zend_is_identical()
2419 ZEND_API zend_result ZEND_FASTCALL is_identical_function(zval *result, zval *op1, zval *op2) /* {{{… in is_identical_function() argument
2421 ZVAL_BOOL(result, zend_is_identical(op1, op2)); in is_identical_function()
2426 ZEND_API zend_result ZEND_FASTCALL is_not_identical_function(zval *result, zval *op1, zval *op2) /*… in is_not_identical_function() argument
2428 ZVAL_BOOL(result, !zend_is_identical(op1, op2)); in is_not_identical_function()
2433 ZEND_API zend_result ZEND_FASTCALL is_equal_function(zval *result, zval *op1, zval *op2) /* {{{ */ in is_equal_function() argument
2435 ZVAL_BOOL(result, zend_compare(op1, op2) == 0); in is_equal_function()
2440 ZEND_API zend_result ZEND_FASTCALL is_not_equal_function(zval *result, zval *op1, zval *op2) /* {{{… in is_not_equal_function() argument
2442 ZVAL_BOOL(result, (zend_compare(op1, op2) != 0)); in is_not_equal_function()
2447 ZEND_API zend_result ZEND_FASTCALL is_smaller_function(zval *result, zval *op1, zval *op2) /* {{{ */ in is_smaller_function() argument
2449 ZVAL_BOOL(result, (zend_compare(op1, op2) < 0)); in is_smaller_function()
2454 ZEND_API zend_result ZEND_FASTCALL is_smaller_or_equal_function(zval *result, zval *op1, zval *op2)… in is_smaller_or_equal_function() argument
2456 ZVAL_BOOL(result, (zend_compare(op1, op2) <= 0)); in is_smaller_or_equal_function()
2629 ZEND_API zend_result ZEND_FASTCALL increment_function(zval *op1) /* {{{ */ in increment_function() argument
2632 switch (Z_TYPE_P(op1)) { in increment_function()
2634 fast_long_increment_function(op1); in increment_function()
2637 Z_DVAL_P(op1) = Z_DVAL_P(op1) + 1; in increment_function()
2640 ZVAL_LONG(op1, 1); in increment_function()
2646 switch (is_numeric_str_function(Z_STR_P(op1), &lval, &dval)) { in increment_function()
2648 zval_ptr_dtor_str(op1); in increment_function()
2652 ZVAL_DOUBLE(op1, d+1); in increment_function()
2654 ZVAL_LONG(op1, lval+1); in increment_function()
2658 zval_ptr_dtor_str(op1); in increment_function()
2659 ZVAL_DOUBLE(op1, dval+1); in increment_function()
2663 increment_string(op1); in increment_function()
2675 ZVAL_COPY_VALUE(©, op1); in increment_function()
2677 zval_ptr_dtor(op1); in increment_function()
2678 ZVAL_COPY_VALUE(op1, ©); in increment_function()
2685 op1 = Z_REFVAL_P(op1); in increment_function()
2688 if (Z_OBJ_HANDLER_P(op1, do_operation)) { in increment_function()
2691 if (Z_OBJ_HANDLER_P(op1, do_operation)(ZEND_ADD, op1, op1, &op2) == SUCCESS) { in increment_function()
2696 if (Z_OBJ_HT_P(op1)->cast_object(Z_OBJ_P(op1), &tmp, _IS_NUMBER) == SUCCESS) { in increment_function()
2698 zval_ptr_dtor(op1); in increment_function()
2699 ZVAL_COPY_VALUE(op1, &tmp); in increment_function()
2706 zend_type_error("Cannot increment %s", zend_zval_value_name(op1)); in increment_function()
2714 ZEND_API zend_result ZEND_FASTCALL decrement_function(zval *op1) /* {{{ */ in decrement_function() argument
2720 switch (Z_TYPE_P(op1)) { in decrement_function()
2722 fast_long_decrement_function(op1); in decrement_function()
2725 Z_DVAL_P(op1) = Z_DVAL_P(op1) - 1; in decrement_function()
2728 if (Z_STRLEN_P(op1) == 0) { /* consider as 0 */ in decrement_function()
2734 zval_ptr_dtor(op1); in decrement_function()
2735 ZVAL_LONG(op1, -1); in decrement_function()
2738 switch (is_numeric_str_function(Z_STR_P(op1), &lval, &dval)) { in decrement_function()
2740 zval_ptr_dtor_str(op1); in decrement_function()
2743 ZVAL_DOUBLE(op1, d-1); in decrement_function()
2745 ZVAL_LONG(op1, lval-1); in decrement_function()
2749 zval_ptr_dtor_str(op1); in decrement_function()
2750 ZVAL_DOUBLE(op1, dval - 1); in decrement_function()
2754 zend_string *zstr = Z_STR_P(op1); in decrement_function()
2761 zval_ptr_dtor(op1); in decrement_function()
2762 ZVAL_STR(op1, zstr); in decrement_function()
2769 ZVAL_COPY_VALUE(©, op1); in decrement_function()
2771 zval_ptr_dtor(op1); in decrement_function()
2772 ZVAL_COPY_VALUE(op1, ©); in decrement_function()
2782 ZVAL_COPY_VALUE(©, op1); in decrement_function()
2784 zval_ptr_dtor(op1); in decrement_function()
2785 ZVAL_COPY_VALUE(op1, ©); in decrement_function()
2792 op1 = Z_REFVAL_P(op1); in decrement_function()
2795 if (Z_OBJ_HANDLER_P(op1, do_operation)) { in decrement_function()
2798 if (Z_OBJ_HANDLER_P(op1, do_operation)(ZEND_SUB, op1, op1, &op2) == SUCCESS) { in decrement_function()
2803 if (Z_OBJ_HT_P(op1)->cast_object(Z_OBJ_P(op1), &tmp, _IS_NUMBER) == SUCCESS) { in decrement_function()
2805 zval_ptr_dtor(op1); in decrement_function()
2806 ZVAL_COPY_VALUE(op1, &tmp); in decrement_function()
2813 zend_type_error("Cannot decrement %s", zend_zval_value_name(op1)); in decrement_function()