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) { \
1065 …ver_inline void ZEND_FASTCALL zend_binop_error(const char *operator, zval *op1, zval *op2) /* {{{ … in zend_binop_error() argument
1071 zend_zval_type_name(op1), operator, zend_zval_type_name(op2)); in zend_binop_error()
1075 static zend_never_inline void ZEND_FASTCALL add_function_array(zval *result, zval *op1, zval *op2) … in add_function_array() argument
1077 if (result == op1 && Z_ARR_P(op1) == Z_ARR_P(op2)) { in add_function_array()
1081 if (result != op1) { in add_function_array()
1082 ZVAL_ARR(result, zend_array_dup(Z_ARR_P(op1))); in add_function_array()
1090 static zend_always_inline zend_result add_function_fast(zval *result, zval *op1, zval *op2) /* {{{ … in add_function_fast() argument
1092 uint8_t type_pair = TYPE_PAIR(Z_TYPE_P(op1), Z_TYPE_P(op2)); in add_function_fast()
1095 fast_long_add_function(result, op1, op2); in add_function_fast()
1098 ZVAL_DOUBLE(result, Z_DVAL_P(op1) + Z_DVAL_P(op2)); in add_function_fast()
1101 ZVAL_DOUBLE(result, ((double)Z_LVAL_P(op1)) + Z_DVAL_P(op2)); in add_function_fast()
1104 ZVAL_DOUBLE(result, Z_DVAL_P(op1) + ((double)Z_LVAL_P(op2))); in add_function_fast()
1107 add_function_array(result, op1, op2); in add_function_fast()
1114 static zend_never_inline zend_result ZEND_FASTCALL add_function_slow(zval *result, zval *op1, zval … in add_function_slow() argument
1116 ZVAL_DEREF(op1); in add_function_slow()
1118 if (add_function_fast(result, op1, op2) == SUCCESS) { in add_function_slow()
1125 if (UNEXPECTED(zendi_try_convert_scalar_to_number(op1, &op1_copy) == FAILURE) in add_function_slow()
1127 zend_binop_error("+", op1, op2); in add_function_slow()
1128 if (result != op1) { in add_function_slow()
1134 if (result == op1) { in add_function_slow()
1146 ZEND_API zend_result ZEND_FASTCALL add_function(zval *result, zval *op1, zval *op2) /* {{{ */ in add_function() argument
1148 if (add_function_fast(result, op1, op2) == SUCCESS) { in add_function()
1151 return add_function_slow(result, op1, op2); in add_function()
1156 static zend_always_inline zend_result sub_function_fast(zval *result, zval *op1, zval *op2) /* {{{ … in sub_function_fast() argument
1158 uint8_t type_pair = TYPE_PAIR(Z_TYPE_P(op1), Z_TYPE_P(op2)); in sub_function_fast()
1161 fast_long_sub_function(result, op1, op2); in sub_function_fast()
1164 ZVAL_DOUBLE(result, Z_DVAL_P(op1) - Z_DVAL_P(op2)); in sub_function_fast()
1167 ZVAL_DOUBLE(result, ((double)Z_LVAL_P(op1)) - Z_DVAL_P(op2)); in sub_function_fast()
1170 ZVAL_DOUBLE(result, Z_DVAL_P(op1) - ((double)Z_LVAL_P(op2))); in sub_function_fast()
1178 static zend_never_inline zend_result ZEND_FASTCALL sub_function_slow(zval *result, zval *op1, zval … in sub_function_slow() argument
1180 ZVAL_DEREF(op1); in sub_function_slow()
1182 if (sub_function_fast(result, op1, op2) == SUCCESS) { in sub_function_slow()
1189 if (UNEXPECTED(zendi_try_convert_scalar_to_number(op1, &op1_copy) == FAILURE) in sub_function_slow()
1191 zend_binop_error("-", op1, op2); in sub_function_slow()
1192 if (result != op1) { in sub_function_slow()
1198 if (result == op1) { in sub_function_slow()
1211 ZEND_API zend_result ZEND_FASTCALL sub_function(zval *result, zval *op1, zval *op2) /* {{{ */ in sub_function() argument
1213 if (sub_function_fast(result, op1, op2) == SUCCESS) { in sub_function()
1216 return sub_function_slow(result, op1, op2); in sub_function()
1221 static zend_always_inline zend_result mul_function_fast(zval *result, zval *op1, zval *op2) /* {{{ … in mul_function_fast() argument
1223 uint8_t type_pair = TYPE_PAIR(Z_TYPE_P(op1), Z_TYPE_P(op2)); in mul_function_fast()
1228 Z_LVAL_P(op1), Z_LVAL_P(op2), in mul_function_fast()
1233 ZVAL_DOUBLE(result, Z_DVAL_P(op1) * Z_DVAL_P(op2)); in mul_function_fast()
1236 ZVAL_DOUBLE(result, ((double)Z_LVAL_P(op1)) * Z_DVAL_P(op2)); in mul_function_fast()
1239 ZVAL_DOUBLE(result, Z_DVAL_P(op1) * ((double)Z_LVAL_P(op2))); in mul_function_fast()
1247 static zend_never_inline zend_result ZEND_FASTCALL mul_function_slow(zval *result, zval *op1, zval … in mul_function_slow() argument
1249 ZVAL_DEREF(op1); in mul_function_slow()
1251 if (mul_function_fast(result, op1, op2) == SUCCESS) { in mul_function_slow()
1258 if (UNEXPECTED(zendi_try_convert_scalar_to_number(op1, &op1_copy) == FAILURE) in mul_function_slow()
1260 zend_binop_error("*", op1, op2); in mul_function_slow()
1261 if (result != op1) { in mul_function_slow()
1267 if (result == op1) { in mul_function_slow()
1280 ZEND_API zend_result ZEND_FASTCALL mul_function(zval *result, zval *op1, zval *op2) /* {{{ */ in mul_function() argument
1282 if (mul_function_fast(result, op1, op2) == SUCCESS) { in mul_function()
1285 return mul_function_slow(result, op1, op2); in mul_function()
1290 static zend_result ZEND_FASTCALL pow_function_base(zval *result, zval *op1, zval *op2) /* {{{ */ in pow_function_base() argument
1292 uint8_t type_pair = TYPE_PAIR(Z_TYPE_P(op1), Z_TYPE_P(op2)); in pow_function_base()
1296 zend_long l1 = 1, l2 = Z_LVAL_P(op1), i = Z_LVAL_P(op2); in pow_function_base()
1329 ZVAL_DOUBLE(result, pow((double)Z_LVAL_P(op1), (double)Z_LVAL_P(op2))); in pow_function_base()
1333 ZVAL_DOUBLE(result, pow(Z_DVAL_P(op1), Z_DVAL_P(op2))); in pow_function_base()
1336 ZVAL_DOUBLE(result, pow((double)Z_LVAL_P(op1), Z_DVAL_P(op2))); in pow_function_base()
1339 ZVAL_DOUBLE(result, pow(Z_DVAL_P(op1), (double)Z_LVAL_P(op2))); in pow_function_base()
1347 ZEND_API zend_result ZEND_FASTCALL pow_function(zval *result, zval *op1, zval *op2) /* {{{ */ in pow_function() argument
1349 ZVAL_DEREF(op1); in pow_function()
1351 if (pow_function_base(result, op1, op2) == SUCCESS) { in pow_function()
1358 if (UNEXPECTED(zendi_try_convert_scalar_to_number(op1, &op1_copy) == FAILURE) in pow_function()
1360 zend_binop_error("**", op1, op2); in pow_function()
1361 if (result != op1) { in pow_function()
1367 if (result == op1) { in pow_function()
1383 static int ZEND_FASTCALL div_function_base(zval *result, zval *op1, zval *op2) /* {{{ */ in div_function_base() argument
1385 uint8_t type_pair = TYPE_PAIR(Z_TYPE_P(op1), Z_TYPE_P(op2)); in div_function_base()
1390 } else if (Z_LVAL_P(op2) == -1 && Z_LVAL_P(op1) == ZEND_LONG_MIN) { in div_function_base()
1395 if (Z_LVAL_P(op1) % Z_LVAL_P(op2) == 0) { /* integer */ in div_function_base()
1396 ZVAL_LONG(result, Z_LVAL_P(op1) / Z_LVAL_P(op2)); in div_function_base()
1398 ZVAL_DOUBLE(result, ((double) Z_LVAL_P(op1)) / Z_LVAL_P(op2)); in div_function_base()
1405 ZVAL_DOUBLE(result, Z_DVAL_P(op1) / Z_DVAL_P(op2)); in div_function_base()
1411 ZVAL_DOUBLE(result, Z_DVAL_P(op1) / (double)Z_LVAL_P(op2)); in div_function_base()
1417 ZVAL_DOUBLE(result, (double)Z_LVAL_P(op1) / Z_DVAL_P(op2)); in div_function_base()
1425 ZEND_API zend_result ZEND_FASTCALL div_function(zval *result, zval *op1, zval *op2) /* {{{ */ in div_function() argument
1427 ZVAL_DEREF(op1); in div_function()
1430 int retval = div_function_base(result, op1, op2); in div_function()
1442 if (UNEXPECTED(zendi_try_convert_scalar_to_number(op1, &op1_copy) == FAILURE) in div_function()
1444 zend_binop_error("/", op1, op2); in div_function()
1445 if (result != op1) { in div_function()
1453 if (result == op1) { in div_function()
1462 if (result != op1) { in div_function()
1470 ZEND_API zend_result ZEND_FASTCALL mod_function(zval *result, zval *op1, zval *op2) /* {{{ */ in mod_function() argument
1474 convert_op1_op2_long(op1, op1_lval, op2, op2_lval, result, ZEND_MOD, "%"); in mod_function()
1483 if (op1 != result) { in mod_function()
1489 if (op1 == result) { in mod_function()
1504 ZEND_API zend_result ZEND_FASTCALL boolean_xor_function(zval *result, zval *op1, zval *op2) /* {{{ … in boolean_xor_function() argument
1509 if (Z_TYPE_P(op1) == IS_FALSE) { in boolean_xor_function()
1511 } else if (EXPECTED(Z_TYPE_P(op1) == IS_TRUE)) { in boolean_xor_function()
1514 if (Z_ISREF_P(op1)) { in boolean_xor_function()
1515 op1 = Z_REFVAL_P(op1); in boolean_xor_function()
1516 if (Z_TYPE_P(op1) == IS_FALSE) { in boolean_xor_function()
1519 } else if (EXPECTED(Z_TYPE_P(op1) == IS_TRUE)) { in boolean_xor_function()
1525 op1_val = zval_is_true(op1); in boolean_xor_function()
1554 ZEND_API zend_result ZEND_FASTCALL boolean_not_function(zval *result, zval *op1) /* {{{ */ in boolean_not_function() argument
1556 if (Z_TYPE_P(op1) < IS_TRUE) { in boolean_not_function()
1558 } else if (EXPECTED(Z_TYPE_P(op1) == IS_TRUE)) { in boolean_not_function()
1561 if (Z_ISREF_P(op1)) { in boolean_not_function()
1562 op1 = Z_REFVAL_P(op1); in boolean_not_function()
1563 if (Z_TYPE_P(op1) < IS_TRUE) { in boolean_not_function()
1566 } else if (EXPECTED(Z_TYPE_P(op1) == IS_TRUE)) { in boolean_not_function()
1573 ZVAL_BOOL(result, !zval_is_true(op1)); in boolean_not_function()
1579 ZEND_API zend_result ZEND_FASTCALL bitwise_not_function(zval *result, zval *op1) /* {{{ */ in bitwise_not_function() argument
1582 switch (Z_TYPE_P(op1)) { in bitwise_not_function()
1584 ZVAL_LONG(result, ~Z_LVAL_P(op1)); in bitwise_not_function()
1587 zend_long lval = zend_dval_to_lval(Z_DVAL_P(op1)); in bitwise_not_function()
1588 if (!zend_is_long_compatible(Z_DVAL_P(op1), lval)) { in bitwise_not_function()
1589 zend_incompatible_double_to_long_error(Z_DVAL_P(op1)); in bitwise_not_function()
1591 if (result != op1) { in bitwise_not_function()
1603 if (Z_STRLEN_P(op1) == 1) { in bitwise_not_function()
1604 zend_uchar not = (zend_uchar) ~*Z_STRVAL_P(op1); in bitwise_not_function()
1607 ZVAL_NEW_STR(result, zend_string_alloc(Z_STRLEN_P(op1), 0)); in bitwise_not_function()
1608 for (i = 0; i < Z_STRLEN_P(op1); i++) { in bitwise_not_function()
1609 Z_STRVAL_P(result)[i] = ~Z_STRVAL_P(op1)[i]; in bitwise_not_function()
1616 op1 = Z_REFVAL_P(op1); in bitwise_not_function()
1621 if (result != op1) { in bitwise_not_function()
1624 zend_type_error("Cannot perform bitwise not on %s", zend_zval_value_name(op1)); in bitwise_not_function()
1630 ZEND_API zend_result ZEND_FASTCALL bitwise_or_function(zval *result, zval *op1, zval *op2) /* {{{ */ in bitwise_or_function() argument
1634 if (EXPECTED(Z_TYPE_P(op1) == IS_LONG) && EXPECTED(Z_TYPE_P(op2) == IS_LONG)) { in bitwise_or_function()
1635 ZVAL_LONG(result, Z_LVAL_P(op1) | Z_LVAL_P(op2)); in bitwise_or_function()
1639 ZVAL_DEREF(op1); in bitwise_or_function()
1642 if (Z_TYPE_P(op1) == IS_STRING && EXPECTED(Z_TYPE_P(op2) == IS_STRING)) { in bitwise_or_function()
1647 if (EXPECTED(Z_STRLEN_P(op1) >= Z_STRLEN_P(op2))) { in bitwise_or_function()
1648 if (EXPECTED(Z_STRLEN_P(op1) == Z_STRLEN_P(op2)) && Z_STRLEN_P(op1) == 1) { in bitwise_or_function()
1649 zend_uchar or = (zend_uchar) (*Z_STRVAL_P(op1) | *Z_STRVAL_P(op2)); in bitwise_or_function()
1650 if (result==op1) { in bitwise_or_function()
1656 longer = op1; in bitwise_or_function()
1660 shorter = op1; in bitwise_or_function()
1668 if (result==op1) { in bitwise_or_function()
1675 if (UNEXPECTED(Z_TYPE_P(op1) != IS_LONG)) { in bitwise_or_function()
1678 op1_lval = zendi_try_get_long(op1, &failed); in bitwise_or_function()
1680 zend_binop_error("|", op1, op2); in bitwise_or_function()
1681 if (result != op1) { in bitwise_or_function()
1687 op1_lval = Z_LVAL_P(op1); in bitwise_or_function()
1694 zend_binop_error("|", op1, op2); in bitwise_or_function()
1695 if (result != op1) { in bitwise_or_function()
1704 if (op1 == result) { in bitwise_or_function()
1712 ZEND_API zend_result ZEND_FASTCALL bitwise_and_function(zval *result, zval *op1, zval *op2) /* {{{ … in bitwise_and_function() argument
1716 if (EXPECTED(Z_TYPE_P(op1) == IS_LONG) && EXPECTED(Z_TYPE_P(op2) == IS_LONG)) { in bitwise_and_function()
1717 ZVAL_LONG(result, Z_LVAL_P(op1) & Z_LVAL_P(op2)); in bitwise_and_function()
1721 ZVAL_DEREF(op1); in bitwise_and_function()
1724 if (Z_TYPE_P(op1) == IS_STRING && Z_TYPE_P(op2) == IS_STRING) { in bitwise_and_function()
1729 if (EXPECTED(Z_STRLEN_P(op1) >= Z_STRLEN_P(op2))) { in bitwise_and_function()
1730 if (EXPECTED(Z_STRLEN_P(op1) == Z_STRLEN_P(op2)) && Z_STRLEN_P(op1) == 1) { in bitwise_and_function()
1731 zend_uchar and = (zend_uchar) (*Z_STRVAL_P(op1) & *Z_STRVAL_P(op2)); in bitwise_and_function()
1732 if (result==op1) { in bitwise_and_function()
1738 longer = op1; in bitwise_and_function()
1742 shorter = op1; in bitwise_and_function()
1750 if (result==op1) { in bitwise_and_function()
1757 if (UNEXPECTED(Z_TYPE_P(op1) != IS_LONG)) { in bitwise_and_function()
1760 op1_lval = zendi_try_get_long(op1, &failed); in bitwise_and_function()
1762 zend_binop_error("&", op1, op2); in bitwise_and_function()
1763 if (result != op1) { in bitwise_and_function()
1769 op1_lval = Z_LVAL_P(op1); in bitwise_and_function()
1776 zend_binop_error("&", op1, op2); in bitwise_and_function()
1777 if (result != op1) { in bitwise_and_function()
1786 if (op1 == result) { in bitwise_and_function()
1794 ZEND_API zend_result ZEND_FASTCALL bitwise_xor_function(zval *result, zval *op1, zval *op2) /* {{{ … in bitwise_xor_function() argument
1798 if (EXPECTED(Z_TYPE_P(op1) == IS_LONG) && EXPECTED(Z_TYPE_P(op2) == IS_LONG)) { in bitwise_xor_function()
1799 ZVAL_LONG(result, Z_LVAL_P(op1) ^ Z_LVAL_P(op2)); in bitwise_xor_function()
1803 ZVAL_DEREF(op1); in bitwise_xor_function()
1806 if (Z_TYPE_P(op1) == IS_STRING && Z_TYPE_P(op2) == IS_STRING) { in bitwise_xor_function()
1811 if (EXPECTED(Z_STRLEN_P(op1) >= Z_STRLEN_P(op2))) { in bitwise_xor_function()
1812 if (EXPECTED(Z_STRLEN_P(op1) == Z_STRLEN_P(op2)) && Z_STRLEN_P(op1) == 1) { in bitwise_xor_function()
1813 zend_uchar xor = (zend_uchar) (*Z_STRVAL_P(op1) ^ *Z_STRVAL_P(op2)); in bitwise_xor_function()
1814 if (result==op1) { in bitwise_xor_function()
1820 longer = op1; in bitwise_xor_function()
1824 shorter = op1; in bitwise_xor_function()
1832 if (result==op1) { in bitwise_xor_function()
1839 if (UNEXPECTED(Z_TYPE_P(op1) != IS_LONG)) { in bitwise_xor_function()
1842 op1_lval = zendi_try_get_long(op1, &failed); in bitwise_xor_function()
1844 zend_binop_error("^", op1, op2); in bitwise_xor_function()
1845 if (result != op1) { in bitwise_xor_function()
1851 op1_lval = Z_LVAL_P(op1); in bitwise_xor_function()
1858 zend_binop_error("^", op1, op2); in bitwise_xor_function()
1859 if (result != op1) { in bitwise_xor_function()
1868 if (op1 == result) { in bitwise_xor_function()
1876 ZEND_API zend_result ZEND_FASTCALL shift_left_function(zval *result, zval *op1, zval *op2) /* {{{ */ in shift_left_function() argument
1880 convert_op1_op2_long(op1, op1_lval, op2, op2_lval, result, ZEND_SL, "<<"); in shift_left_function()
1885 if (op1 == result) { in shift_left_function()
1896 if (op1 != result) { in shift_left_function()
1903 if (op1 == result) { in shift_left_function()
1913 ZEND_API zend_result ZEND_FASTCALL shift_right_function(zval *result, zval *op1, zval *op2) /* {{{ … in shift_right_function() argument
1917 convert_op1_op2_long(op1, op1_lval, op2, op2_lval, result, ZEND_SR, ">>"); in shift_right_function()
1922 if (op1 == result) { in shift_right_function()
1933 if (op1 != result) { in shift_right_function()
1940 if (op1 == result) { in shift_right_function()
1949 ZEND_API zend_result ZEND_FASTCALL concat_function(zval *result, zval *op1, zval *op2) /* {{{ */ in concat_function() argument
1951 zval *orig_op1 = op1; in concat_function()
1957 if (EXPECTED(Z_TYPE_P(op1) == IS_STRING)) { in concat_function()
1958 op1_string = Z_STR_P(op1); in concat_function()
1960 if (Z_ISREF_P(op1)) { in concat_function()
1961 op1 = Z_REFVAL_P(op1); in concat_function()
1962 if (Z_TYPE_P(op1) == IS_STRING) { in concat_function()
1963 op1_string = Z_STR_P(op1); in concat_function()
1968 op1_string = zval_get_string_func(op1); in concat_function()
1977 if (result == op1) { in concat_function()
1978 if (UNEXPECTED(op1 == op2)) { in concat_function()
2030 if (EXPECTED(result != op1 || Z_TYPE_P(result) != IS_STRING)) { in concat_function()
2059 if (result == op1) { in concat_function()
2100 ZEND_API int ZEND_FASTCALL string_compare_function_ex(zval *op1, zval *op2, bool case_insensitive) … in string_compare_function_ex() argument
2103 zend_string *str1 = zval_get_tmp_string(op1, &tmp_str1); in string_compare_function_ex()
2119 ZEND_API int ZEND_FASTCALL string_compare_function(zval *op1, zval *op2) /* {{{ */ in string_compare_function() argument
2121 if (EXPECTED(Z_TYPE_P(op1) == IS_STRING) && in string_compare_function()
2123 if (Z_STR_P(op1) == Z_STR_P(op2)) { in string_compare_function()
2126 return zend_binary_strcmp(Z_STRVAL_P(op1), Z_STRLEN_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op2)); in string_compare_function()
2130 zend_string *str1 = zval_get_tmp_string(op1, &tmp_str1); in string_compare_function()
2141 ZEND_API int ZEND_FASTCALL string_case_compare_function(zval *op1, zval *op2) /* {{{ */ in string_case_compare_function() argument
2143 if (EXPECTED(Z_TYPE_P(op1) == IS_STRING) && in string_case_compare_function()
2145 if (Z_STR_P(op1) == Z_STR_P(op2)) { in string_case_compare_function()
2148 … 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()
2152 zend_string *str1 = zval_get_tmp_string(op1, &tmp_str1); in string_case_compare_function()
2163 ZEND_API int ZEND_FASTCALL string_locale_compare_function(zval *op1, zval *op2) /* {{{ */ in string_locale_compare_function() argument
2166 zend_string *str1 = zval_get_tmp_string(op1, &tmp_str1); in string_locale_compare_function()
2176 ZEND_API int ZEND_FASTCALL numeric_compare_function(zval *op1, zval *op2) /* {{{ */ in numeric_compare_function() argument
2180 d1 = zval_get_double(op1); in numeric_compare_function()
2187 ZEND_API zend_result ZEND_FASTCALL compare_function(zval *result, zval *op1, zval *op2) /* {{{ */ in compare_function() argument
2189 ZVAL_LONG(result, zend_compare(op1, op2)); in compare_function()
2238 ZEND_API int ZEND_FASTCALL zend_compare(zval *op1, zval *op2) /* {{{ */ in zend_compare() argument
2244 switch (TYPE_PAIR(Z_TYPE_P(op1), Z_TYPE_P(op2))) { in zend_compare()
2246 return Z_LVAL_P(op1)>Z_LVAL_P(op2)?1:(Z_LVAL_P(op1)<Z_LVAL_P(op2)?-1:0); in zend_compare()
2249 return ZEND_THREEWAY_COMPARE(Z_DVAL_P(op1), (double)Z_LVAL_P(op2)); in zend_compare()
2252 return ZEND_THREEWAY_COMPARE((double)Z_LVAL_P(op1), Z_DVAL_P(op2)); in zend_compare()
2255 return ZEND_THREEWAY_COMPARE(Z_DVAL_P(op1), Z_DVAL_P(op2)); in zend_compare()
2258 return zend_compare_arrays(op1, op2); in zend_compare()
2274 if (Z_STR_P(op1) == Z_STR_P(op2)) { in zend_compare()
2277 return zendi_smart_strcmp(Z_STR_P(op1), Z_STR_P(op2)); in zend_compare()
2283 return Z_STRLEN_P(op1) == 0 ? 0 : 1; in zend_compare()
2286 return compare_long_to_string(Z_LVAL_P(op1), Z_STR_P(op2)); in zend_compare()
2289 return -compare_long_to_string(Z_LVAL_P(op2), Z_STR_P(op1)); in zend_compare()
2292 if (zend_isnan(Z_DVAL_P(op1))) { in zend_compare()
2296 return compare_double_to_string(Z_DVAL_P(op1), Z_STR_P(op2)); in zend_compare()
2303 return -compare_double_to_string(Z_DVAL_P(op2), Z_STR_P(op1)); in zend_compare()
2312 if (Z_ISREF_P(op1)) { in zend_compare()
2313 op1 = Z_REFVAL_P(op1); in zend_compare()
2320 if (Z_TYPE_P(op1) == IS_OBJECT in zend_compare()
2322 && Z_OBJ_P(op1) == Z_OBJ_P(op2)) { in zend_compare()
2324 } else if (Z_TYPE_P(op1) == IS_OBJECT) { in zend_compare()
2325 return Z_OBJ_HANDLER_P(op1, compare)(op1, op2); in zend_compare()
2327 return Z_OBJ_HANDLER_P(op2, compare)(op1, op2); in zend_compare()
2331 if (Z_TYPE_P(op1) < IS_TRUE) { in zend_compare()
2333 } else if (Z_TYPE_P(op1) == IS_TRUE) { in zend_compare()
2336 return zval_is_true(op1) ? 1 : 0; in zend_compare()
2338 return zval_is_true(op1) ? 0 : -1; in zend_compare()
2340 op1 = _zendi_convert_scalar_to_number_silent(op1, &op1_copy); in zend_compare()
2347 } else if (Z_TYPE_P(op1)==IS_ARRAY) { in zend_compare()
2375 ZEND_API bool ZEND_FASTCALL zend_is_identical(const zval *op1, const zval *op2) /* {{{ */ in zend_is_identical() argument
2377 if (Z_TYPE_P(op1) != Z_TYPE_P(op2)) { in zend_is_identical()
2380 switch (Z_TYPE_P(op1)) { in zend_is_identical()
2386 return (Z_LVAL_P(op1) == Z_LVAL_P(op2)); in zend_is_identical()
2388 return (Z_RES_P(op1) == Z_RES_P(op2)); in zend_is_identical()
2390 return (Z_DVAL_P(op1) == Z_DVAL_P(op2)); in zend_is_identical()
2392 return zend_string_equals(Z_STR_P(op1), Z_STR_P(op2)); in zend_is_identical()
2394 return (Z_ARRVAL_P(op1) == Z_ARRVAL_P(op2) || in zend_is_identical()
2395 …zend_hash_compare(Z_ARRVAL_P(op1), Z_ARRVAL_P(op2), (compare_func_t) hash_zval_identical_function,… in zend_is_identical()
2397 return (Z_OBJ_P(op1) == Z_OBJ_P(op2)); in zend_is_identical()
2404 ZEND_API zend_result ZEND_FASTCALL is_identical_function(zval *result, zval *op1, zval *op2) /* {{{… in is_identical_function() argument
2406 ZVAL_BOOL(result, zend_is_identical(op1, op2)); in is_identical_function()
2411 ZEND_API zend_result ZEND_FASTCALL is_not_identical_function(zval *result, zval *op1, zval *op2) /*… in is_not_identical_function() argument
2413 ZVAL_BOOL(result, !zend_is_identical(op1, op2)); in is_not_identical_function()
2418 ZEND_API zend_result ZEND_FASTCALL is_equal_function(zval *result, zval *op1, zval *op2) /* {{{ */ in is_equal_function() argument
2420 ZVAL_BOOL(result, zend_compare(op1, op2) == 0); in is_equal_function()
2425 ZEND_API zend_result ZEND_FASTCALL is_not_equal_function(zval *result, zval *op1, zval *op2) /* {{{… in is_not_equal_function() argument
2427 ZVAL_BOOL(result, (zend_compare(op1, op2) != 0)); in is_not_equal_function()
2432 ZEND_API zend_result ZEND_FASTCALL is_smaller_function(zval *result, zval *op1, zval *op2) /* {{{ */ in is_smaller_function() argument
2434 ZVAL_BOOL(result, (zend_compare(op1, op2) < 0)); in is_smaller_function()
2439 ZEND_API zend_result ZEND_FASTCALL is_smaller_or_equal_function(zval *result, zval *op1, zval *op2)… in is_smaller_or_equal_function() argument
2441 ZVAL_BOOL(result, (zend_compare(op1, op2) <= 0)); in is_smaller_or_equal_function()
2614 ZEND_API zend_result ZEND_FASTCALL increment_function(zval *op1) /* {{{ */ in increment_function() argument
2617 switch (Z_TYPE_P(op1)) { in increment_function()
2619 fast_long_increment_function(op1); in increment_function()
2622 Z_DVAL_P(op1) = Z_DVAL_P(op1) + 1; in increment_function()
2625 ZVAL_LONG(op1, 1); in increment_function()
2631 switch (is_numeric_str_function(Z_STR_P(op1), &lval, &dval)) { in increment_function()
2633 zval_ptr_dtor_str(op1); in increment_function()
2637 ZVAL_DOUBLE(op1, d+1); in increment_function()
2639 ZVAL_LONG(op1, lval+1); in increment_function()
2643 zval_ptr_dtor_str(op1); in increment_function()
2644 ZVAL_DOUBLE(op1, dval+1); in increment_function()
2648 increment_string(op1); in increment_function()
2660 ZVAL_COPY_VALUE(&copy, op1); in increment_function()
2662 zval_ptr_dtor(op1); in increment_function()
2663 ZVAL_COPY_VALUE(op1, &copy); in increment_function()
2670 op1 = Z_REFVAL_P(op1); in increment_function()
2673 if (Z_OBJ_HANDLER_P(op1, do_operation)) { in increment_function()
2676 if (Z_OBJ_HANDLER_P(op1, do_operation)(ZEND_ADD, op1, op1, &op2) == SUCCESS) { in increment_function()
2681 if (Z_OBJ_HT_P(op1)->cast_object(Z_OBJ_P(op1), &tmp, _IS_NUMBER) == SUCCESS) { in increment_function()
2683 zval_ptr_dtor(op1); in increment_function()
2684 ZVAL_COPY_VALUE(op1, &tmp); in increment_function()
2691 zend_type_error("Cannot increment %s", zend_zval_value_name(op1)); in increment_function()
2699 ZEND_API zend_result ZEND_FASTCALL decrement_function(zval *op1) /* {{{ */ in decrement_function() argument
2705 switch (Z_TYPE_P(op1)) { in decrement_function()
2707 fast_long_decrement_function(op1); in decrement_function()
2710 Z_DVAL_P(op1) = Z_DVAL_P(op1) - 1; in decrement_function()
2713 if (Z_STRLEN_P(op1) == 0) { /* consider as 0 */ in decrement_function()
2719 zval_ptr_dtor(op1); in decrement_function()
2720 ZVAL_LONG(op1, -1); in decrement_function()
2723 switch (is_numeric_str_function(Z_STR_P(op1), &lval, &dval)) { in decrement_function()
2725 zval_ptr_dtor_str(op1); in decrement_function()
2728 ZVAL_DOUBLE(op1, d-1); in decrement_function()
2730 ZVAL_LONG(op1, lval-1); in decrement_function()
2734 zval_ptr_dtor_str(op1); in decrement_function()
2735 ZVAL_DOUBLE(op1, dval - 1); in decrement_function()
2739 zend_string *zstr = Z_STR_P(op1); in decrement_function()
2746 zval_ptr_dtor(op1); in decrement_function()
2747 ZVAL_STR(op1, zstr); in decrement_function()
2754 ZVAL_COPY_VALUE(&copy, op1); in decrement_function()
2756 zval_ptr_dtor(op1); in decrement_function()
2757 ZVAL_COPY_VALUE(op1, &copy); in decrement_function()
2767 ZVAL_COPY_VALUE(&copy, op1); in decrement_function()
2769 zval_ptr_dtor(op1); in decrement_function()
2770 ZVAL_COPY_VALUE(op1, &copy); in decrement_function()
2777 op1 = Z_REFVAL_P(op1); in decrement_function()
2780 if (Z_OBJ_HANDLER_P(op1, do_operation)) { in decrement_function()
2783 if (Z_OBJ_HANDLER_P(op1, do_operation)(ZEND_SUB, op1, op1, &op2) == SUCCESS) { in decrement_function()
2788 if (Z_OBJ_HT_P(op1)->cast_object(Z_OBJ_P(op1), &tmp, _IS_NUMBER) == SUCCESS) { in decrement_function()
2790 zval_ptr_dtor(op1); in decrement_function()
2791 ZVAL_COPY_VALUE(op1, &tmp); in decrement_function()
2798 zend_type_error("Cannot decrement %s", zend_zval_value_name(op1)); in decrement_function()