Lines Matching refs:result

188 #define zendi_convert_scalar_to_number(op, holder, result, silent)	\  argument
190 if (op==result && Z_TYPE_P(op) != IS_OBJECT) { \
220 if (result != op1) { \
221 ZVAL_UNDEF(result); \
226 if (op == result) { \
260 #define convert_op1_op2_long(op1, op1_lval, op2, op2_lval, result, op, op_func) \ argument
273 if (result != op1) { \
274 ZVAL_UNDEF(result); \
294 if (result != op1) { \
295 ZVAL_UNDEF(result); \
897 ZEND_API int ZEND_FASTCALL add_function(zval *result, zval *op1, zval *op2) /* {{{ */ in add_function() argument
905 fast_long_add_function(result, op1, op2); in add_function()
908 ZVAL_DOUBLE(result, ((double)Z_LVAL_P(op1)) + Z_DVAL_P(op2)); in add_function()
912 ZVAL_DOUBLE(result, Z_DVAL_P(op1) + ((double)Z_LVAL_P(op2))); in add_function()
916 ZVAL_DOUBLE(result, Z_DVAL_P(op1) + Z_DVAL_P(op2)); in add_function()
920 if ((result == op1) && (result == op2)) { in add_function()
924 if (result != op1) { in add_function()
925 ZVAL_DUP(result, op1); in add_function()
927 zend_hash_merge(Z_ARRVAL_P(result), Z_ARRVAL_P(op2), zval_add_ref, 0); in add_function()
939 zendi_convert_scalar_to_number(op1, op1_copy, result, 0); in add_function()
940 zendi_convert_scalar_to_number(op2, op2_copy, result, 0); in add_function()
942 zendi_convert_scalar_to_number(op1, op1_copy, result, 0); in add_function()
947 if (result != op1) { in add_function()
948 ZVAL_UNDEF(result); in add_function()
958 ZEND_API int ZEND_FASTCALL sub_function(zval *result, zval *op1, zval *op2) /* {{{ */ in sub_function() argument
966 fast_long_sub_function(result, op1, op2); in sub_function()
969 ZVAL_DOUBLE(result, ((double)Z_LVAL_P(op1)) - Z_DVAL_P(op2)); in sub_function()
973 ZVAL_DOUBLE(result, Z_DVAL_P(op1) - ((double)Z_LVAL_P(op2))); in sub_function()
977 ZVAL_DOUBLE(result, Z_DVAL_P(op1) - Z_DVAL_P(op2)); in sub_function()
989 zendi_convert_scalar_to_number(op1, op1_copy, result, 0); in sub_function()
990 zendi_convert_scalar_to_number(op2, op2_copy, result, 0); in sub_function()
992 zendi_convert_scalar_to_number(op1, op1_copy, result, 0); in sub_function()
997 if (result != op1) { in sub_function()
998 ZVAL_UNDEF(result); in sub_function()
1008 ZEND_API int ZEND_FASTCALL mul_function(zval *result, zval *op1, zval *op2) /* {{{ */ in mul_function() argument
1018 …ZEND_SIGNED_MULTIPLY_LONG(Z_LVAL_P(op1),Z_LVAL_P(op2), Z_LVAL_P(result),Z_DVAL_P(result),overflow); in mul_function()
1019 Z_TYPE_INFO_P(result) = overflow ? IS_DOUBLE : IS_LONG; in mul_function()
1024 ZVAL_DOUBLE(result, ((double)Z_LVAL_P(op1)) * Z_DVAL_P(op2)); in mul_function()
1028 ZVAL_DOUBLE(result, Z_DVAL_P(op1) * ((double)Z_LVAL_P(op2))); in mul_function()
1032 ZVAL_DOUBLE(result, Z_DVAL_P(op1) * Z_DVAL_P(op2)); in mul_function()
1044 zendi_convert_scalar_to_number(op1, op1_copy, result, 0); in mul_function()
1045 zendi_convert_scalar_to_number(op2, op2_copy, result, 0); in mul_function()
1047 zendi_convert_scalar_to_number(op1, op1_copy, result, 0); in mul_function()
1052 if (result != op1) { in mul_function()
1053 ZVAL_UNDEF(result); in mul_function()
1063 ZEND_API int ZEND_FASTCALL pow_function(zval *result, zval *op1, zval *op2) /* {{{ */ in pow_function() argument
1075 ZVAL_LONG(result, 1L); in pow_function()
1078 ZVAL_LONG(result, 0); in pow_function()
1090 ZVAL_DOUBLE(result, dval * pow(l2, i)); in pow_function()
1097 ZVAL_DOUBLE(result, (double)l1 * pow(dval, i)); in pow_function()
1103 ZVAL_LONG(result, l1); in pow_function()
1105 ZVAL_DOUBLE(result, pow((double)Z_LVAL_P(op1), (double)Z_LVAL_P(op2))); in pow_function()
1110 ZVAL_DOUBLE(result, pow((double)Z_LVAL_P(op1), Z_DVAL_P(op2))); in pow_function()
1114 ZVAL_DOUBLE(result, pow(Z_DVAL_P(op1), (double)Z_LVAL_P(op2))); in pow_function()
1118 ZVAL_DOUBLE(result, pow(Z_DVAL_P(op1), Z_DVAL_P(op2))); in pow_function()
1131 if (op1 == result) { in pow_function()
1132 zval_ptr_dtor(result); in pow_function()
1134 ZVAL_LONG(result, 0); in pow_function()
1137 zendi_convert_scalar_to_number(op1, op1_copy, result, 0); in pow_function()
1140 if (op1 == result) { in pow_function()
1141 zval_ptr_dtor(result); in pow_function()
1143 ZVAL_LONG(result, 1L); in pow_function()
1146 zendi_convert_scalar_to_number(op2, op2_copy, result, 0); in pow_function()
1150 if (op1 == result) { in pow_function()
1151 zval_ptr_dtor(result); in pow_function()
1153 ZVAL_LONG(result, 0); in pow_function()
1156 zendi_convert_scalar_to_number(op1, op1_copy, result, 0); in pow_function()
1162 if (result != op1) { in pow_function()
1163 ZVAL_UNDEF(result); in pow_function()
1173 ZEND_API int ZEND_FASTCALL div_function(zval *result, zval *op1, zval *op2) /* {{{ */ in div_function() argument
1183 ZVAL_DOUBLE(result, ((double) Z_LVAL_P(op1) / (double) Z_LVAL_P(op2))); in div_function()
1187 ZVAL_DOUBLE(result, (double) ZEND_LONG_MIN / -1); in div_function()
1191 ZVAL_LONG(result, Z_LVAL_P(op1) / Z_LVAL_P(op2)); in div_function()
1193 ZVAL_DOUBLE(result, ((double) Z_LVAL_P(op1)) / Z_LVAL_P(op2)); in div_function()
1201 ZVAL_DOUBLE(result, Z_DVAL_P(op1) / (double)Z_LVAL_P(op2)); in div_function()
1208 ZVAL_DOUBLE(result, (double)Z_LVAL_P(op1) / Z_DVAL_P(op2)); in div_function()
1215 ZVAL_DOUBLE(result, Z_DVAL_P(op1) / Z_DVAL_P(op2)); in div_function()
1227 zendi_convert_scalar_to_number(op1, op1_copy, result, 0); in div_function()
1228 zendi_convert_scalar_to_number(op2, op2_copy, result, 0); in div_function()
1230 zendi_convert_scalar_to_number(op1, op1_copy, result, 0); in div_function()
1235 if (result != op1) { in div_function()
1236 ZVAL_UNDEF(result); in div_function()
1246 ZEND_API int ZEND_FASTCALL mod_function(zval *result, zval *op1, zval *op2) /* {{{ */ in mod_function() argument
1250 convert_op1_op2_long(op1, op1_lval, op2, op2_lval, result, ZEND_MOD, mod_function); in mod_function()
1259 if (op1 != result) { in mod_function()
1260 ZVAL_UNDEF(result); in mod_function()
1265 if (op1 == result) { in mod_function()
1266 zval_dtor(result); in mod_function()
1271 ZVAL_LONG(result, 0); in mod_function()
1275 ZVAL_LONG(result, op1_lval % op2_lval); in mod_function()
1280 ZEND_API int ZEND_FASTCALL boolean_xor_function(zval *result, zval *op1, zval *op2) /* {{{ */ in boolean_xor_function() argument
1325 ZVAL_BOOL(result, op1_val ^ op2_val); in boolean_xor_function()
1330 ZEND_API int ZEND_FASTCALL boolean_not_function(zval *result, zval *op1) /* {{{ */ in boolean_not_function() argument
1333 ZVAL_TRUE(result); in boolean_not_function()
1335 ZVAL_FALSE(result); in boolean_not_function()
1340 ZVAL_TRUE(result); in boolean_not_function()
1343 ZVAL_FALSE(result); in boolean_not_function()
1349 ZVAL_BOOL(result, !zval_is_true(op1)); in boolean_not_function()
1355 ZEND_API int ZEND_FASTCALL bitwise_not_function(zval *result, zval *op1) /* {{{ */ in bitwise_not_function() argument
1360 ZVAL_LONG(result, ~Z_LVAL_P(op1)); in bitwise_not_function()
1363 ZVAL_LONG(result, ~zend_dval_to_lval(Z_DVAL_P(op1))); in bitwise_not_function()
1370 ZVAL_INTERNED_STR(result, ZSTR_CHAR(not)); in bitwise_not_function()
1372 ZVAL_NEW_STR(result, zend_string_alloc(Z_STRLEN_P(op1), 0)); in bitwise_not_function()
1374 Z_STRVAL_P(result)[i] = ~Z_STRVAL_P(op1)[i]; in bitwise_not_function() local
1376 Z_STRVAL_P(result)[i] = 0; in bitwise_not_function() local
1386 if (result != op1) { in bitwise_not_function()
1387 ZVAL_UNDEF(result); in bitwise_not_function()
1395 ZEND_API int ZEND_FASTCALL bitwise_or_function(zval *result, zval *op1, zval *op2) /* {{{ */ in bitwise_or_function() argument
1400 ZVAL_LONG(result, Z_LVAL_P(op1) | Z_LVAL_P(op2)); in bitwise_or_function()
1415 if (result==op1) { in bitwise_or_function()
1416 zend_string_release(Z_STR_P(result)); in bitwise_or_function()
1418 ZVAL_INTERNED_STR(result, ZSTR_CHAR(or)); in bitwise_or_function()
1433 if (result==op1) { in bitwise_or_function()
1434 zend_string_release(Z_STR_P(result)); in bitwise_or_function()
1436 ZVAL_NEW_STR(result, str); in bitwise_or_function()
1444 if (result != op1) { in bitwise_or_function()
1445 ZVAL_UNDEF(result); in bitwise_or_function()
1456 if (result != op1) { in bitwise_or_function()
1457 ZVAL_UNDEF(result); in bitwise_or_function()
1465 if (op1 == result) { in bitwise_or_function()
1466 zval_dtor(result); in bitwise_or_function()
1468 ZVAL_LONG(result, op1_lval | op2_lval); in bitwise_or_function()
1473 ZEND_API int ZEND_FASTCALL bitwise_and_function(zval *result, zval *op1, zval *op2) /* {{{ */ in bitwise_and_function() argument
1478 ZVAL_LONG(result, Z_LVAL_P(op1) & Z_LVAL_P(op2)); in bitwise_and_function()
1493 if (result==op1) { in bitwise_and_function()
1494 zend_string_release(Z_STR_P(result)); in bitwise_and_function()
1496 ZVAL_INTERNED_STR(result, ZSTR_CHAR(and)); in bitwise_and_function()
1511 if (result==op1) { in bitwise_and_function()
1512 zend_string_release(Z_STR_P(result)); in bitwise_and_function()
1514 ZVAL_NEW_STR(result, str); in bitwise_and_function()
1522 if (result != op1) { in bitwise_and_function()
1523 ZVAL_UNDEF(result); in bitwise_and_function()
1534 if (result != op1) { in bitwise_and_function()
1535 ZVAL_UNDEF(result); in bitwise_and_function()
1543 if (op1 == result) { in bitwise_and_function()
1544 zval_dtor(result); in bitwise_and_function()
1546 ZVAL_LONG(result, op1_lval & op2_lval); in bitwise_and_function()
1551 ZEND_API int ZEND_FASTCALL bitwise_xor_function(zval *result, zval *op1, zval *op2) /* {{{ */ in bitwise_xor_function() argument
1556 ZVAL_LONG(result, Z_LVAL_P(op1) ^ Z_LVAL_P(op2)); in bitwise_xor_function()
1571 if (result==op1) { in bitwise_xor_function()
1572 zend_string_release(Z_STR_P(result)); in bitwise_xor_function()
1574 ZVAL_INTERNED_STR(result, ZSTR_CHAR(xor)); in bitwise_xor_function()
1589 if (result==op1) { in bitwise_xor_function()
1590 zend_string_release(Z_STR_P(result)); in bitwise_xor_function()
1592 ZVAL_NEW_STR(result, str); in bitwise_xor_function()
1600 if (result != op1) { in bitwise_xor_function()
1601 ZVAL_UNDEF(result); in bitwise_xor_function()
1612 if (result != op1) { in bitwise_xor_function()
1613 ZVAL_UNDEF(result); in bitwise_xor_function()
1621 if (op1 == result) { in bitwise_xor_function()
1622 zval_dtor(result); in bitwise_xor_function()
1624 ZVAL_LONG(result, op1_lval ^ op2_lval); in bitwise_xor_function()
1629 ZEND_API int ZEND_FASTCALL shift_left_function(zval *result, zval *op1, zval *op2) /* {{{ */ in shift_left_function() argument
1633 convert_op1_op2_long(op1, op1_lval, op2, op2_lval, result, ZEND_SL, shift_left_function); in shift_left_function()
1638 if (op1 == result) { in shift_left_function()
1639 zval_dtor(result); in shift_left_function()
1641 ZVAL_LONG(result, 0); in shift_left_function()
1649 if (op1 != result) { in shift_left_function()
1650 ZVAL_UNDEF(result); in shift_left_function()
1656 if (op1 == result) { in shift_left_function()
1657 zval_dtor(result); in shift_left_function()
1660 ZVAL_LONG(result, op1_lval << op2_lval); in shift_left_function()
1665 ZEND_API int ZEND_FASTCALL shift_right_function(zval *result, zval *op1, zval *op2) /* {{{ */ in shift_right_function() argument
1669 convert_op1_op2_long(op1, op1_lval, op2, op2_lval, result, ZEND_SR, shift_right_function); in shift_right_function()
1674 if (op1 == result) { in shift_right_function()
1675 zval_dtor(result); in shift_right_function()
1677 ZVAL_LONG(result, (op1_lval < 0) ? -1 : 0); in shift_right_function()
1685 if (op1 != result) { in shift_right_function()
1686 ZVAL_UNDEF(result); in shift_right_function()
1692 if (op1 == result) { in shift_right_function()
1693 zval_dtor(result); in shift_right_function()
1696 ZVAL_LONG(result, op1_lval >> op2_lval); in shift_right_function()
1701 ZEND_API int ZEND_FASTCALL concat_function(zval *result, zval *op1, zval *op2) /* {{{ */ in concat_function() argument
1718 if (orig_op1 != result) { in concat_function()
1719 ZVAL_UNDEF(result); in concat_function()
1723 if (result == op1) { in concat_function()
1746 if (orig_op1 != result) { in concat_function()
1747 ZVAL_UNDEF(result); in concat_function()
1770 if (orig_op1 != result) { in concat_function()
1771 ZVAL_UNDEF(result); in concat_function()
1776 if (result == op1 && Z_REFCOUNTED_P(result)) { in concat_function()
1778 result_str = zend_string_extend(Z_STR_P(result), result_len, 0); in concat_function()
1782 if (result == orig_op1) { in concat_function()
1790 ZVAL_NEW_STR(result, result_str); in concat_function()
1903 static void ZEND_FASTCALL convert_compare_result_to_long(zval *result) /* {{{ */ in convert_compare_result_to_long() argument
1905 if (Z_TYPE_P(result) == IS_DOUBLE) { in convert_compare_result_to_long()
1906 ZVAL_LONG(result, ZEND_NORMALIZE_BOOL(Z_DVAL_P(result))); in convert_compare_result_to_long()
1908 convert_to_long(result); in convert_compare_result_to_long()
1913 ZEND_API int ZEND_FASTCALL compare_function(zval *result, zval *op1, zval *op2) /* {{{ */ in compare_function() argument
1923 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()
1927 Z_DVAL_P(result) = Z_DVAL_P(op1) - (double)Z_LVAL_P(op2); in compare_function()
1928 ZVAL_LONG(result, ZEND_NORMALIZE_BOOL(Z_DVAL_P(result))); in compare_function()
1932 Z_DVAL_P(result) = (double)Z_LVAL_P(op1) - Z_DVAL_P(op2); in compare_function()
1933 ZVAL_LONG(result, ZEND_NORMALIZE_BOOL(Z_DVAL_P(result))); in compare_function()
1938 ZVAL_LONG(result, 0); in compare_function()
1940 Z_DVAL_P(result) = Z_DVAL_P(op1) - Z_DVAL_P(op2); in compare_function()
1941 ZVAL_LONG(result, ZEND_NORMALIZE_BOOL(Z_DVAL_P(result))); in compare_function()
1946 ZVAL_LONG(result, zend_compare_arrays(op1, op2)); in compare_function()
1954 ZVAL_LONG(result, 0); in compare_function()
1958 ZVAL_LONG(result, -1); in compare_function()
1962 ZVAL_LONG(result, 1); in compare_function()
1967 ZVAL_LONG(result, 0); in compare_function()
1970 ZVAL_LONG(result, zendi_smart_strcmp(Z_STR_P(op1), Z_STR_P(op2))); in compare_function()
1974 ZVAL_LONG(result, Z_STRLEN_P(op2) == 0 ? 0 : -1); in compare_function()
1978 ZVAL_LONG(result, Z_STRLEN_P(op1) == 0 ? 0 : 1); in compare_function()
1982 ZVAL_LONG(result, 1); in compare_function()
1986 ZVAL_LONG(result, -1); in compare_function()
1999 ret = Z_OBJ_HANDLER_P(op1, compare)(result, op1, op2); in compare_function()
2000 if (UNEXPECTED(Z_TYPE_P(result) != IS_LONG)) { in compare_function()
2001 convert_compare_result_to_long(result); in compare_function()
2005 ret = Z_OBJ_HANDLER_P(op2, compare)(result, op1, op2); in compare_function()
2006 if (UNEXPECTED(Z_TYPE_P(result) != IS_LONG)) { in compare_function()
2007 convert_compare_result_to_long(result); in compare_function()
2015 ZVAL_LONG(result, 0); in compare_function()
2019 ZVAL_LONG(result, Z_OBJ_HANDLER_P(op1, compare_objects)(op1, op2)); in compare_function()
2027 ret = compare_function(result, op_free, op2); in compare_function()
2033 ZVAL_LONG(result, 1); in compare_function()
2037 ret = compare_function(result, &tmp_free, op2); in compare_function()
2046 ret = compare_function(result, op1, op_free); in compare_function()
2052 ZVAL_LONG(result, -1); in compare_function()
2056 ret = compare_function(result, op1, &tmp_free); in compare_function()
2060 ZVAL_LONG(result, 1); in compare_function()
2066 ZVAL_LONG(result, zval_is_true(op2) ? -1 : 0); in compare_function()
2069 ZVAL_LONG(result, zval_is_true(op1) ? 1 : 0); in compare_function()
2072 ZVAL_LONG(result, zval_is_true(op2) ? 0 : 1); in compare_function()
2075 ZVAL_LONG(result, zval_is_true(op1) ? 0 : -1); in compare_function()
2078 zendi_convert_scalar_to_number(op1, op1_copy, result, 1); in compare_function()
2079 zendi_convert_scalar_to_number(op2, op2_copy, result, 1); in compare_function()
2083 ZVAL_LONG(result, 1); in compare_function()
2086 ZVAL_LONG(result, -1); in compare_function()
2089 ZVAL_LONG(result, 1); in compare_function()
2092 ZVAL_LONG(result, -1); in compare_function()
2095 ZVAL_LONG(result, 0); in compare_function()
2105 zval result; in hash_zval_identical_function() local
2114 if (is_identical_function(&result, z1, z2)==FAILURE) { in hash_zval_identical_function()
2117 return Z_TYPE(result) != IS_TRUE; in hash_zval_identical_function()
2152 ZEND_API int ZEND_FASTCALL is_identical_function(zval *result, zval *op1, zval *op2) /* {{{ */ in is_identical_function() argument
2154 ZVAL_BOOL(result, zend_is_identical(op1, op2)); in is_identical_function()
2159 ZEND_API int ZEND_FASTCALL is_not_identical_function(zval *result, zval *op1, zval *op2) /* {{{ */ in is_not_identical_function() argument
2161 ZVAL_BOOL(result, !zend_is_identical(op1, op2)); in is_not_identical_function()
2166 ZEND_API int ZEND_FASTCALL is_equal_function(zval *result, zval *op1, zval *op2) /* {{{ */ in is_equal_function() argument
2168 if (compare_function(result, op1, op2) == FAILURE) { in is_equal_function()
2171 ZVAL_BOOL(result, (Z_LVAL_P(result) == 0)); in is_equal_function()
2176 ZEND_API int ZEND_FASTCALL is_not_equal_function(zval *result, zval *op1, zval *op2) /* {{{ */ in is_not_equal_function() argument
2178 if (compare_function(result, op1, op2) == FAILURE) { in is_not_equal_function()
2181 ZVAL_BOOL(result, (Z_LVAL_P(result) != 0)); in is_not_equal_function()
2186 ZEND_API int ZEND_FASTCALL is_smaller_function(zval *result, zval *op1, zval *op2) /* {{{ */ in is_smaller_function() argument
2188 if (compare_function(result, op1, op2) == FAILURE) { in is_smaller_function()
2191 ZVAL_BOOL(result, (Z_LVAL_P(result) < 0)); in is_smaller_function()
2196 ZEND_API int ZEND_FASTCALL is_smaller_or_equal_function(zval *result, zval *op1, zval *op2) /* {{{ … in is_smaller_or_equal_function() argument
2198 if (compare_function(result, op1, op2) == FAILURE) { in is_smaller_or_equal_function()
2201 ZVAL_BOOL(result, (Z_LVAL_P(result) <= 0)); in is_smaller_or_equal_function()
2517 int result; in zend_object_is_true() local
2523 result = i_zend_is_true(tmp); in zend_object_is_true()
2525 return result; in zend_object_is_true()
2543 register unsigned char *result = (unsigned char*)dest; in zend_str_tolower_copy() local
2547 *result++ = zend_tolower_ascii(*str++); in zend_str_tolower_copy()
2549 *result = '\0'; in zend_str_tolower_copy()
2824 zval result; local
2826 if (compare_function(&result, z1, z2)==FAILURE) {
2829 return Z_LVAL(result);