Lines Matching refs:result
375 static inline int ct_eval_binary_op(zval *result, zend_uchar binop, zval *op1, zval *op2) { in ct_eval_binary_op() argument
381 return zend_optimizer_eval_binary_op(result, binop, op1, op2); in ct_eval_binary_op()
384 static inline int ct_eval_bool_cast(zval *result, zval *op) { in ct_eval_bool_cast() argument
392 ZVAL_TRUE(result); in ct_eval_bool_cast()
396 ZVAL_BOOL(result, zend_is_true(op)); in ct_eval_bool_cast()
400 static inline int zval_to_string_offset(zend_long *result, zval *op) { in zval_to_string_offset() argument
403 *result = Z_LVAL_P(op); in zval_to_string_offset()
407 Z_STRVAL_P(op), Z_STRLEN_P(op), result, NULL, 0)) { in zval_to_string_offset()
416 static inline int fetch_array_elem(zval **result, zval *op1, zval *op2) { in fetch_array_elem() argument
419 *result = zend_hash_find(Z_ARR_P(op1), ZSTR_EMPTY_ALLOC()); in fetch_array_elem()
422 *result = zend_hash_index_find(Z_ARR_P(op1), 0); in fetch_array_elem()
425 *result = zend_hash_index_find(Z_ARR_P(op1), 1); in fetch_array_elem()
428 *result = zend_hash_index_find(Z_ARR_P(op1), Z_LVAL_P(op2)); in fetch_array_elem()
435 *result = zend_hash_index_find(Z_ARR_P(op1), lval); in fetch_array_elem()
439 *result = zend_symtable_find(Z_ARR_P(op1), Z_STR_P(op2)); in fetch_array_elem()
446 static inline int ct_eval_fetch_dim(zval *result, zval *op1, zval *op2, int support_strings) { in ct_eval_fetch_dim() argument
450 ZVAL_COPY(result, value); in ct_eval_fetch_dim()
459 ZVAL_STR(result, zend_string_init(&Z_STRVAL_P(op1)[index], 1, 0)); in ct_eval_fetch_dim()
467 static inline int ct_eval_isset_isempty(zval *result, uint32_t extended_value, zval *op1) { in ct_eval_isset_isempty() argument
470 ZVAL_BOOL(result, op1 && Z_TYPE_P(op1) != IS_NULL); in ct_eval_isset_isempty()
473 ZVAL_TRUE(result); in ct_eval_isset_isempty()
476 ZVAL_BOOL(result, Z_TYPE(zv) == IS_FALSE); in ct_eval_isset_isempty()
483 static inline int ct_eval_isset_dim(zval *result, uint32_t extended_value, zval *op1, zval *op2) { in ct_eval_isset_dim() argument
492 return ct_eval_isset_isempty(result, extended_value, value); in ct_eval_isset_dim()
497 ZVAL_BOOL(result, (extended_value & ZEND_ISEMPTY)); in ct_eval_isset_dim()
502 static inline int ct_eval_del_array_elem(zval *result, zval *key) { in ct_eval_del_array_elem() argument
503 ZEND_ASSERT(IS_PARTIAL_ARRAY(result)); in ct_eval_del_array_elem()
507 zend_hash_del(Z_ARR_P(result), ZSTR_EMPTY_ALLOC()); in ct_eval_del_array_elem()
510 zend_hash_index_del(Z_ARR_P(result), 0); in ct_eval_del_array_elem()
513 zend_hash_index_del(Z_ARR_P(result), 1); in ct_eval_del_array_elem()
516 zend_hash_index_del(Z_ARR_P(result), Z_LVAL_P(key)); in ct_eval_del_array_elem()
523 zend_hash_index_del(Z_ARR_P(result), lval); in ct_eval_del_array_elem()
527 zend_symtable_del(Z_ARR_P(result), Z_STR_P(key)); in ct_eval_del_array_elem()
536 static inline int ct_eval_add_array_elem(zval *result, zval *value, zval *key) { in ct_eval_add_array_elem() argument
538 SEPARATE_ARRAY(result); in ct_eval_add_array_elem()
539 if ((value = zend_hash_next_index_insert(Z_ARR_P(result), value))) { in ct_eval_add_array_elem()
548 SEPARATE_ARRAY(result); in ct_eval_add_array_elem()
549 value = zend_hash_update(Z_ARR_P(result), ZSTR_EMPTY_ALLOC(), value); in ct_eval_add_array_elem()
552 SEPARATE_ARRAY(result); in ct_eval_add_array_elem()
553 value = zend_hash_index_update(Z_ARR_P(result), 0, value); in ct_eval_add_array_elem()
556 SEPARATE_ARRAY(result); in ct_eval_add_array_elem()
557 value = zend_hash_index_update(Z_ARR_P(result), 1, value); in ct_eval_add_array_elem()
560 SEPARATE_ARRAY(result); in ct_eval_add_array_elem()
561 value = zend_hash_index_update(Z_ARR_P(result), Z_LVAL_P(key), value); in ct_eval_add_array_elem()
568 SEPARATE_ARRAY(result); in ct_eval_add_array_elem()
570 Z_ARR_P(result), lval, value); in ct_eval_add_array_elem()
574 SEPARATE_ARRAY(result); in ct_eval_add_array_elem()
575 value = zend_symtable_update(Z_ARR_P(result), Z_STR_P(key), value); in ct_eval_add_array_elem()
585 static inline int ct_eval_add_array_unpack(zval *result, zval *array) { in ct_eval_add_array_unpack() argument
592 SEPARATE_ARRAY(result); in ct_eval_add_array_unpack()
595 value = zend_hash_update(Z_ARR_P(result), key, value); in ct_eval_add_array_unpack()
597 value = zend_hash_next_index_insert(Z_ARR_P(result), value); in ct_eval_add_array_unpack()
607 static inline int ct_eval_assign_dim(zval *result, zval *value, zval *key) { in ct_eval_assign_dim() argument
608 switch (Z_TYPE_P(result)) { in ct_eval_assign_dim()
611 array_init(result); in ct_eval_assign_dim()
615 return ct_eval_add_array_elem(result, value, key); in ct_eval_assign_dim()
626 if (index >= Z_STRLEN_P(result)) { in ct_eval_assign_dim()
628 memcpy(ZSTR_VAL(new_str), Z_STRVAL_P(result), Z_STRLEN_P(result)); in ct_eval_assign_dim()
629 memset(ZSTR_VAL(new_str) + Z_STRLEN_P(result), ' ', index - Z_STRLEN_P(result)); in ct_eval_assign_dim()
632 new_str = zend_string_init(Z_STRVAL_P(result), Z_STRLEN_P(result), 0); in ct_eval_assign_dim()
636 ZVAL_STR(result, new_str); in ct_eval_assign_dim()
637 Z_STRVAL_P(result)[index] = ZSTR_VAL(value_str)[0]; in ct_eval_assign_dim()
646 static inline int fetch_obj_prop(zval **result, zval *op1, zval *op2) { in fetch_obj_prop() argument
649 *result = zend_symtable_find(Z_ARR_P(op1), Z_STR_P(op2)); in fetch_obj_prop()
656 static inline int ct_eval_fetch_obj(zval *result, zval *op1, zval *op2) { in ct_eval_fetch_obj() argument
660 ZVAL_COPY(result, value); in ct_eval_fetch_obj()
667 static inline int ct_eval_isset_obj(zval *result, uint32_t extended_value, zval *op1, zval *op2) { in ct_eval_isset_obj() argument
676 return ct_eval_isset_isempty(result, extended_value, value); in ct_eval_isset_obj()
678 ZVAL_BOOL(result, (extended_value & ZEND_ISEMPTY)); in ct_eval_isset_obj()
683 static inline int ct_eval_del_obj_prop(zval *result, zval *key) { in ct_eval_del_obj_prop() argument
684 ZEND_ASSERT(IS_PARTIAL_OBJECT(result)); in ct_eval_del_obj_prop()
688 zend_symtable_del(Z_ARR_P(result), Z_STR_P(key)); in ct_eval_del_obj_prop()
697 static inline int ct_eval_add_obj_prop(zval *result, zval *value, zval *key) { in ct_eval_add_obj_prop() argument
700 value = zend_symtable_update(Z_ARR_P(result), Z_STR_P(key), value); in ct_eval_add_obj_prop()
710 static inline int ct_eval_assign_obj(zval *result, zval *value, zval *key) { in ct_eval_assign_obj() argument
711 switch (Z_TYPE_P(result)) { in ct_eval_assign_obj()
714 empty_partial_object(result); in ct_eval_assign_obj()
717 return ct_eval_add_obj_prop(result, value, key); in ct_eval_assign_obj()
723 static inline int ct_eval_incdec(zval *result, zend_uchar opcode, zval *op1) { in ct_eval_incdec() argument
728 ZVAL_COPY(result, op1); in ct_eval_incdec()
733 increment_function(result); in ct_eval_incdec()
735 decrement_function(result); in ct_eval_incdec()
740 static inline void ct_eval_type_check(zval *result, uint32_t type_mask, zval *op1) { in ct_eval_type_check() argument
747 ZVAL_BOOL(result, (type_mask >> type) & 1); in ct_eval_type_check()
750 static inline int ct_eval_in_array(zval *result, uint32_t extended_value, zval *op1, zval *op2) { in ct_eval_in_array() argument
781 ZVAL_BOOL(result, res); in ct_eval_in_array()
785 static inline int ct_eval_array_key_exists(zval *result, zval *op1, zval *op2) { in ct_eval_array_key_exists() argument
801 ZVAL_BOOL(result, value != NULL); in ct_eval_array_key_exists()
878 zend_op_array *op_array, zval *result, zend_string *name, uint32_t num_args, zval **args) { in ct_eval_func_call() argument
894 ZVAL_CHAR(result, c); in ct_eval_func_call()
901 ZVAL_LONG(result, zend_hash_num_elements(Z_ARRVAL_P(args[0]))); in ct_eval_func_call()
915 ZVAL_FALSE(result); in ct_eval_func_call()
919 ZVAL_STR_COPY(result, ini_entry->value); in ct_eval_func_call()
921 ZVAL_EMPTY_STRING(result); in ct_eval_func_call()
956 ZVAL_NULL(result); in ct_eval_func_call()
957 func->internal_function.handler(execute_data, result); in ct_eval_func_call()
964 zval_ptr_dtor(result); in ct_eval_func_call()
970 zval_ptr_dtor(result); in ct_eval_func_call()
1004 SET_RESULT_BOT(result); in sccp_visit_instr()
1007 SET_RESULT(result, op2); in sccp_visit_instr()
1018 SET_RESULT(result, &zv); in sccp_visit_instr()
1023 SET_RESULT(result, &zv); in sccp_visit_instr()
1038 SET_RESULT_BOT(result); in sccp_visit_instr()
1051 SET_RESULT_BOT(result); in sccp_visit_instr()
1064 SET_RESULT_BOT(result); in sccp_visit_instr()
1101 SET_RESULT(result, data); in sccp_visit_instr()
1108 SET_RESULT(result, data); in sccp_visit_instr()
1111 SET_RESULT_BOT(result); in sccp_visit_instr()
1129 SET_RESULT_BOT(result); in sccp_visit_instr()
1135 SET_RESULT_BOT(result); in sccp_visit_instr()
1146 SET_RESULT_BOT(result); in sccp_visit_instr()
1154 SET_RESULT_BOT(result); in sccp_visit_instr()
1184 SET_RESULT(result, data); in sccp_visit_instr()
1187 SET_RESULT_BOT(result); in sccp_visit_instr()
1194 SET_RESULT_BOT(result); in sccp_visit_instr()
1222 zval *result = NULL; in sccp_visit_instr() local
1225 result = &ctx->values[ssa_op->result_use]; in sccp_visit_instr()
1226 if (IS_BOT(result)) { in sccp_visit_instr()
1227 SET_RESULT_BOT(result); in sccp_visit_instr()
1231 SKIP_IF_TOP(result); in sccp_visit_instr()
1245 if (result && Z_TYPE_P(result) == IS_NULL) { in sccp_visit_instr()
1246 SET_RESULT_BOT(result); in sccp_visit_instr()
1255 SET_RESULT(result, &zv); in sccp_visit_instr()
1258 SET_RESULT_BOT(result); in sccp_visit_instr()
1268 if (!result) { in sccp_visit_instr()
1271 MAKE_PARTIAL_ARRAY(result); in sccp_visit_instr()
1272 ZVAL_COPY_VALUE(&zv, result); in sccp_visit_instr()
1273 ZVAL_NULL(result); in sccp_visit_instr()
1277 SET_RESULT(result, &zv); in sccp_visit_instr()
1279 SET_RESULT(result, &zv); in sccp_visit_instr()
1281 SET_RESULT_BOT(result); in sccp_visit_instr()
1287 SET_RESULT_BOT(result); in sccp_visit_instr()
1291 if (result) { in sccp_visit_instr()
1292 ZVAL_COPY_VALUE(&zv, result); in sccp_visit_instr()
1293 ZVAL_NULL(result); in sccp_visit_instr()
1301 SET_RESULT(result, &zv); in sccp_visit_instr()
1306 SET_RESULT(result, &zv); in sccp_visit_instr()
1308 SET_RESULT_BOT(result); in sccp_visit_instr()
1311 SET_RESULT(result, &zv); in sccp_visit_instr()
1319 zval *result = &ctx->values[ssa_op->result_use]; in sccp_visit_instr() local
1320 if (IS_BOT(result) || IS_BOT(op1)) { in sccp_visit_instr()
1321 SET_RESULT_BOT(result); in sccp_visit_instr()
1324 SKIP_IF_TOP(result); in sccp_visit_instr()
1328 if (Z_TYPE_P(result) == IS_NULL) { in sccp_visit_instr()
1329 SET_RESULT_BOT(result); in sccp_visit_instr()
1332 ZVAL_COPY_VALUE(&zv, result); in sccp_visit_instr()
1333 ZVAL_NULL(result); in sccp_visit_instr()
1336 SET_RESULT(result, &zv); in sccp_visit_instr()
1338 SET_RESULT_BOT(result); in sccp_visit_instr()
1347 SET_RESULT(result, &zv); in sccp_visit_instr()
1350 SET_RESULT_BOT(result); in sccp_visit_instr()
1357 SET_RESULT_BOT(result); in sccp_visit_instr()
1369 SET_RESULT_BOT(result); in sccp_visit_instr()
1402 SET_RESULT(result, &zv); in sccp_visit_instr()
1406 SET_RESULT_BOT(result); in sccp_visit_instr()
1421 SET_RESULT(result, &zv); in sccp_visit_instr()
1437 SET_RESULT_BOT(result); in sccp_visit_instr()
1445 SET_RESULT_BOT(result); in sccp_visit_instr()
1458 SET_RESULT(result, &tmp); in sccp_visit_instr()
1482 SET_RESULT_BOT(result); in sccp_visit_instr()
1490 SET_RESULT_BOT(result); in sccp_visit_instr()
1499 SET_RESULT(result, &tmp); in sccp_visit_instr()
1511 SET_RESULT_BOT(result); in sccp_visit_instr()
1532 SET_RESULT(result, &tmp2); in sccp_visit_instr()
1534 SET_RESULT(result, &tmp1); in sccp_visit_instr()
1545 SET_RESULT_BOT(result); in sccp_visit_instr()
1552 SET_RESULT(result, &zv); in sccp_visit_instr()
1557 SET_RESULT_BOT(result); in sccp_visit_instr()
1562 SET_RESULT(result, op1); in sccp_visit_instr()
1574 SET_RESULT_BOT(result); in sccp_visit_instr()
1578 SET_RESULT(result, &zv); in sccp_visit_instr()
1582 SET_RESULT_BOT(result); in sccp_visit_instr()
1587 SET_RESULT_BOT(result); in sccp_visit_instr()
1591 SET_RESULT(result, &zv); in sccp_visit_instr()
1595 SET_RESULT_BOT(result); in sccp_visit_instr()
1602 SET_RESULT(result, &zv); in sccp_visit_instr()
1606 SET_RESULT_BOT(result); in sccp_visit_instr()
1611 SET_RESULT(result, &zv); in sccp_visit_instr()
1615 SET_RESULT_BOT(result); in sccp_visit_instr()
1622 SET_RESULT(result, &zv); in sccp_visit_instr()
1625 SET_RESULT_BOT(result); in sccp_visit_instr()
1631 SET_RESULT(result, &zv); in sccp_visit_instr()
1635 SET_RESULT_BOT(result); in sccp_visit_instr()
1641 SET_RESULT(result, &zv); in sccp_visit_instr()
1645 SET_RESULT_BOT(result); in sccp_visit_instr()
1651 SET_RESULT(result, &zv); in sccp_visit_instr()
1655 SET_RESULT_BOT(result); in sccp_visit_instr()
1664 SET_RESULT(result, &zv); in sccp_visit_instr()
1668 SET_RESULT_BOT(result); in sccp_visit_instr()
1675 SET_RESULT(result, &zv); in sccp_visit_instr()
1679 SET_RESULT_BOT(result); in sccp_visit_instr()
1688 SET_RESULT(result, &zv); in sccp_visit_instr()
1693 SET_RESULT_BOT(result); in sccp_visit_instr()
1701 SET_RESULT(result, &zv); in sccp_visit_instr()
1706 SET_RESULT_BOT(result); in sccp_visit_instr()
1712 SET_RESULT(result, op1); in sccp_visit_instr()
1727 SET_RESULT(result, &zv); in sccp_visit_instr()
1732 SET_RESULT_BOT(result); in sccp_visit_instr()
1735 SET_RESULT(result, op1); in sccp_visit_instr()
1741 SET_RESULT(result, &zv); in sccp_visit_instr()
1745 SET_RESULT_BOT(result); in sccp_visit_instr()
1750 SET_RESULT(result, &zv); in sccp_visit_instr()
1756 SET_RESULT(result, &zv); in sccp_visit_instr()
1761 SET_RESULT_BOT(result); in sccp_visit_instr()
1765 SET_RESULT(result, &zv); in sccp_visit_instr()
1769 SET_RESULT_BOT(result); in sccp_visit_instr()
1779 SET_RESULT(result, &zv); in sccp_visit_instr()
1783 SET_RESULT_BOT(result); in sccp_visit_instr()
1792 SET_RESULT_BOT(result); in sccp_visit_instr()
1807 SET_RESULT_BOT(result); in sccp_visit_instr()
1814 SET_RESULT_BOT(result); in sccp_visit_instr()
1822 SET_RESULT_BOT(result); in sccp_visit_instr()
1836 SET_RESULT(result, &zv); in sccp_visit_instr()
1851 SET_RESULT_BOT(result); in sccp_visit_instr()
1857 SET_RESULT_BOT(result); in sccp_visit_instr()
2086 zval result; in sccp_visit_phi() local
2087 MAKE_TOP(&result); in sccp_visit_phi()
2094 …join_phi_values(&result, &ctx->values[phi->sources[0]], ssa->vars[phi->ssa_var].escape_state != ES… in sccp_visit_phi()
2104 …join_phi_values(&result, &ctx->values[phi->sources[i]], ssa->vars[phi->ssa_var].escape_state != ES… in sccp_visit_phi()
2116 set_value(scdf, ctx, phi->ssa_var, &result); in sccp_visit_phi()
2117 zval_ptr_dtor_nogc(&result); in sccp_visit_phi()
2277 uint32_t old_var = opline->result.var; in try_remove_definition()
2288 opline->result.var = old_var; in try_remove_definition()