Lines Matching refs:kind

330 static void zend_register_seen_symbol(zend_string *name, uint32_t kind) {  in zend_register_seen_symbol()  argument
333 Z_LVAL_P(zv) |= kind; in zend_register_seen_symbol()
336 ZVAL_LONG(&tmp, kind); in zend_register_seen_symbol()
341 static zend_bool zend_have_seen_symbol(zend_string *name, uint32_t kind) { in zend_have_seen_symbol() argument
343 return zv && (Z_LVAL_P(zv) & kind) != 0; in zend_have_seen_symbol()
686 …ve_range(zend_op_array *op_array, uint32_t offset, uint32_t end, uint32_t kind, uint32_t var) /* {… in zend_end_live_range() argument
694 range->var = (var * sizeof(zval)) | kind; in zend_end_live_range()
1499 if (name_ast->kind != ZEND_AST_ZVAL) { in zend_try_compile_const_expr_resolve_class_name()
1507 if (class_ast->kind != ZEND_AST_ZVAL) { in zend_try_compile_const_expr_resolve_class_name()
2419 return ast->kind == ZEND_AST_VAR || ast->kind == ZEND_AST_DIM in zend_is_variable()
2420 || ast->kind == ZEND_AST_PROP || ast->kind == ZEND_AST_STATIC_PROP in zend_is_variable()
2421 || ast->kind == ZEND_AST_CALL || ast->kind == ZEND_AST_METHOD_CALL in zend_is_variable()
2422 || ast->kind == ZEND_AST_STATIC_CALL; in zend_is_variable()
2428 return ast->kind == ZEND_AST_CALL in zend_is_call()
2429 || ast->kind == ZEND_AST_METHOD_CALL in zend_is_call()
2430 || ast->kind == ZEND_AST_STATIC_CALL; in zend_is_call()
2436 return ast->kind == ZEND_AST_STMT_LIST || ast->kind == ZEND_AST_LABEL in zend_is_unticked_stmt()
2437 || ast->kind == ZEND_AST_PROP_DECL || ast->kind == ZEND_AST_CLASS_CONST_DECL in zend_is_unticked_stmt()
2438 || ast->kind == ZEND_AST_USE_TRAIT || ast->kind == ZEND_AST_METHOD; in zend_is_unticked_stmt()
2444 while (ast->kind == ZEND_AST_DIM || ast->kind == ZEND_AST_PROP) { in zend_can_write_to_variable()
2454 if (name_ast->kind != ZEND_AST_ZVAL) { in zend_is_const_default_class_ref()
2508 uint32_t type = name_ast->kind == ZEND_AST_ZVAL ? name_ast->attr : ZEND_NAME_FQ; in zend_compile_class_ref()
2530 if (name_ast->kind != ZEND_AST_ZVAL) { in zend_compile_class_ref_ex()
2584 if (name_ast->kind == ZEND_AST_ZVAL) { in zend_try_compile_cv()
2636 if (ast->kind == ZEND_AST_VAR && ast->child[0]->kind == ZEND_AST_ZVAL) { in is_this_fetch()
2680 if (var_ast->kind == ZEND_AST_ARRAY) { in zend_emit_assign_znode()
2815 if (var_ast->kind == ZEND_AST_ARRAY) { in zend_verify_list_assign_target()
2896 if (ast->kind == ZEND_AST_CALL) { in zend_ensure_writable_variable()
2899 if (ast->kind == ZEND_AST_METHOD_CALL || ast->kind == ZEND_AST_STATIC_CALL) { in zend_ensure_writable_variable()
2908 if (expr_ast->kind != ZEND_AST_VAR || expr_ast->child[0]->kind != ZEND_AST_ZVAL) { in zend_is_assign_to_self()
2912 while (zend_is_variable(var_ast) && var_ast->kind != ZEND_AST_VAR) { in zend_is_assign_to_self()
2916 if (var_ast->kind != ZEND_AST_VAR || var_ast->child[0]->kind != ZEND_AST_ZVAL) { in zend_is_assign_to_self()
2946 if (var_ast->kind == ZEND_AST_ARRAY && zend_list_has_assign_to(var_ast, name)) { in zend_list_has_assign_to()
2950 if (var_ast->kind == ZEND_AST_VAR && var_ast->child[0]->kind == ZEND_AST_ZVAL) { in zend_list_has_assign_to()
2968 if (expr_ast->kind == ZEND_AST_VAR && expr_ast->child[0]->kind == ZEND_AST_ZVAL) { in zend_list_has_assign_to_self()
2993 switch (var_ast->kind) { in zend_compile_assign()
3062 if ((target_ast->kind != ZEND_AST_VAR in zend_compile_assign_ref()
3063 || target_ast->child[0]->kind != ZEND_AST_ZVAL) in zend_compile_assign_ref()
3108 switch (var_ast->kind) { in zend_compile_compound_assign()
3159 if (arg->kind == ZEND_AST_UNPACK) { in zend_compile_args()
3371 if (args->child[i]->kind == ZEND_AST_UNPACK) { in zend_args_contain_unpack()
3384 || args->children != 1 || args->child[0]->kind == ZEND_AST_UNPACK in zend_compile_func_strlen()
3406 if (args->children != 1 || args->child[0]->kind == ZEND_AST_UNPACK) { in zend_compile_func_typecheck()
3422 if (args->children != 1 || args->child[0]->kind == ZEND_AST_UNPACK) { in zend_compile_func_cast()
3438 if (args->children != 1 || args->child[0]->kind != ZEND_AST_ZVAL) { in zend_compile_func_defined()
3476 args->child[0]->kind == ZEND_AST_ZVAL && in zend_compile_func_chr()
3493 args->child[0]->kind == ZEND_AST_ZVAL && in zend_compile_func_ord()
3512 if (name_ast->kind != ZEND_AST_ZVAL || Z_TYPE_P(zend_ast_get_zval(name_ast)) != IS_STRING) { in zend_try_compile_ct_bound_init_user_func()
3567 if (args->child[1]->kind == ZEND_AST_CALL in zend_compile_func_cufa()
3568 && args->child[1]->child[0]->kind == ZEND_AST_ZVAL in zend_compile_func_cufa()
3570 && args->child[1]->child[1]->kind == ZEND_AST_ARG_LIST) { in zend_compile_func_cufa()
3578 && list->child[1]->kind == ZEND_AST_ZVAL) { in zend_compile_func_cufa()
3656 (args->child[0]->kind != ZEND_AST_ZVAL || in zend_compile_assert()
3686 if (args->child[2]->kind == ZEND_AST_ZVAL) { in zend_compile_func_in_array()
3688 } else if (args->child[2]->kind == ZEND_AST_CONST) { in zend_compile_func_in_array()
3710 if (args->child[1]->kind != ZEND_AST_ARRAY in zend_compile_func_in_array()
3769 if (args->children != 1 || args->child[0]->kind == ZEND_AST_UNPACK) { in zend_compile_func_count()
3786 if (args->children != 1 || args->child[0]->kind == ZEND_AST_UNPACK) { in zend_compile_func_get_class()
3812 if (args->children != 1 || args->child[0]->kind == ZEND_AST_UNPACK) { in zend_compile_func_gettype()
3848 && args->child[0]->kind == ZEND_AST_CALL in zend_compile_func_array_slice()
3849 && args->child[0]->child[0]->kind == ZEND_AST_ZVAL in zend_compile_func_array_slice()
3851 && args->child[0]->child[1]->kind == ZEND_AST_ARG_LIST in zend_compile_func_array_slice()
3852 && args->child[1]->kind == ZEND_AST_ZVAL) { in zend_compile_func_array_slice()
3960 if (name_ast->kind != ZEND_AST_ZVAL || Z_TYPE_P(zend_ast_get_zval(name_ast)) != IS_STRING) { in zend_compile_call()
4165 if (class_ast->kind == ZEND_AST_CLASS) { in zend_compile_new()
4306 switch (var_ast->kind) { in zend_compile_unset()
4513 ZEND_ASSERT(ast->kind == ZEND_AST_BREAK || ast->kind == ZEND_AST_CONTINUE); in zend_compile_break_continue()
4517 if (depth_ast->kind != ZEND_AST_ZVAL) { in zend_compile_break_continue()
4519 "is no longer supported", ast->kind == ZEND_AST_BREAK ? "break" : "continue"); in zend_compile_break_continue()
4525 ast->kind == ZEND_AST_BREAK ? "break" : "continue"); in zend_compile_break_continue()
4535 ast->kind == ZEND_AST_BREAK ? "break" : "continue"); in zend_compile_break_continue()
4539 ast->kind == ZEND_AST_BREAK ? "break" : "continue", in zend_compile_break_continue()
4543 opline = zend_emit_op(NULL, ast->kind == ZEND_AST_BREAK ? ZEND_BRK : ZEND_CONT, NULL, NULL); in zend_compile_break_continue()
4754 zend_bool by_ref = value_ast->kind == ZEND_AST_REF; in zend_compile_foreach()
4763 if (key_ast->kind == ZEND_AST_REF) { in zend_compile_foreach()
4766 if (key_ast->kind == ZEND_AST_ARRAY) { in zend_compile_foreach()
4795 } else if (value_ast->kind == ZEND_AST_VAR && in zend_compile_foreach()
4890 if ((*cond_ast)->kind != ZEND_AST_ZVAL) { in determine_switch_jumptable_type()
5250 if (value_ast->kind != ZEND_AST_ZVAL) { in zend_handle_encoding_declaration()
5299 } else if (file_ast->child[i]->kind != ZEND_AST_DECLARE) { in zend_declare_is_first_statement()
5322 if (value_ast->kind != ZEND_AST_ZVAL) { in zend_compile_declare()
5410 if (ast->kind == ZEND_AST_TYPE) { in zend_compile_typename()
5561 if (type_ast->kind == ZEND_AST_TYPE) { in zend_compile_params()
5936 zend_bool is_method = decl->kind == ZEND_AST_METHOD; in zend_compile_func_decl()
5951 if (decl->kind == ZEND_AST_CLOSURE) { in zend_compile_func_decl()
6225 switch (adaptation_ast->kind) { in zend_compile_use_trait()
6940 static inline zend_bool zend_try_ct_eval_unary_pm(zval *result, zend_ast_kind kind, zval *op) /* {{… in zend_try_ct_eval_unary_pm() argument
6943 ZVAL_LONG(&left, (kind == ZEND_AST_UNARY_PLUS) ? 1 : -1); in zend_try_ct_eval_unary_pm()
6948 static inline void zend_ct_eval_greater(zval *result, zend_ast_kind kind, zval *op1, zval *op2) /* … in zend_ct_eval_greater() argument
6950 binary_op_type fn = kind == ZEND_AST_GREATER in zend_ct_eval_greater()
6982 if (elem_ast->attr /* by_ref */ || elem_ast->child[0]->kind != ZEND_AST_ZVAL in zend_try_ct_eval_array()
6983 || (elem_ast->child[1] && elem_ast->child[1]->kind != ZEND_AST_ZVAL) in zend_try_ct_eval_array()
7110 ZEND_ASSERT(ast->kind == ZEND_AST_GREATER || ast->kind == ZEND_AST_GREATER_EQUAL); in zend_compile_greater()
7117 zend_ct_eval_greater(&result->u.constant, ast->kind, in zend_compile_greater()
7125 ast->kind == ZEND_AST_GREATER ? ZEND_IS_SMALLER : ZEND_IS_SMALLER_OR_EQUAL, in zend_compile_greater()
7156 ZEND_ASSERT(ast->kind == ZEND_AST_UNARY_PLUS || ast->kind == ZEND_AST_UNARY_MINUS); in zend_compile_unary_pm()
7161 if (zend_try_ct_eval_unary_pm(&result->u.constant, ast->kind, &expr_node.u.constant)) { in zend_compile_unary_pm()
7169 ZVAL_LONG(&lefthand_node.u.constant, (ast->kind == ZEND_AST_UNARY_PLUS) ? 1 : -1); in zend_compile_unary_pm()
7183 ZEND_ASSERT(ast->kind == ZEND_AST_AND || ast->kind == ZEND_AST_OR); in zend_compile_short_circuiting()
7188 if ((ast->kind == ZEND_AST_AND && !zend_is_true(&left_node.u.constant)) in zend_compile_short_circuiting()
7189 || (ast->kind == ZEND_AST_OR && zend_is_true(&left_node.u.constant))) { in zend_compile_short_circuiting()
7210 opline_jmpz = zend_emit_op(NULL, ast->kind == ZEND_AST_AND ? ZEND_JMPZ_EX : ZEND_JMPNZ_EX, in zend_compile_short_circuiting()
7233 ZEND_ASSERT(ast->kind == ZEND_AST_POST_INC || ast->kind == ZEND_AST_POST_DEC); in zend_compile_post_incdec()
7237 if (var_ast->kind == ZEND_AST_PROP) { in zend_compile_post_incdec()
7239 opline->opcode = ast->kind == ZEND_AST_POST_INC ? ZEND_POST_INC_OBJ : ZEND_POST_DEC_OBJ; in zend_compile_post_incdec()
7244 zend_emit_op_tmp(result, ast->kind == ZEND_AST_POST_INC ? ZEND_POST_INC : ZEND_POST_DEC, in zend_compile_post_incdec()
7253 ZEND_ASSERT(ast->kind == ZEND_AST_PRE_INC || ast->kind == ZEND_AST_PRE_DEC); in zend_compile_pre_incdec()
7257 if (var_ast->kind == ZEND_AST_PROP) { in zend_compile_pre_incdec()
7259 opline->opcode = ast->kind == ZEND_AST_PRE_INC ? ZEND_PRE_INC_OBJ : ZEND_PRE_DEC_OBJ; in zend_compile_pre_incdec()
7263 zend_emit_op(result, ast->kind == ZEND_AST_PRE_INC ? ZEND_PRE_INC : ZEND_PRE_DEC, in zend_compile_pre_incdec()
7507 ZEND_ASSERT(ast->kind == ZEND_AST_ISSET || ast->kind == ZEND_AST_EMPTY); in zend_compile_isset_or_empty()
7510 if (ast->kind == ZEND_AST_EMPTY) { in zend_compile_isset_or_empty()
7522 switch (var_ast->kind) { in zend_compile_isset_or_empty()
7549 opline->extended_value |= ast->kind == ZEND_AST_ISSET ? ZEND_ISSET : ZEND_ISEMPTY; in zend_compile_isset_or_empty()
7562 if (expr_ast->kind == ZEND_AST_VAR) { in zend_compile_silence()
7677 while (last && last->kind == ZEND_AST_STMT_LIST) { in zend_compile_const()
7684 if (last && last->kind == ZEND_AST_HALT_COMPILER) { in zend_compile_const()
7743 if (class_ast->kind == ZEND_AST_ZVAL) { in zend_compile_class_const()
7747 …if (const_ast->kind == ZEND_AST_ZVAL && zend_try_ct_eval_class_const(&result->u.constant, resolved… in zend_compile_class_const()
7754 …if (const_ast->kind == ZEND_AST_ZVAL && zend_string_equals_literal_ci(zend_ast_get_str(const_ast),… in zend_compile_class_const()
7957 zend_bool zend_is_allowed_in_const_expr(zend_ast_kind kind) /* {{{ */ in zend_is_allowed_in_const_expr() argument
7959 return kind == ZEND_AST_ZVAL || kind == ZEND_AST_BINARY_OP in zend_is_allowed_in_const_expr()
7960 || kind == ZEND_AST_GREATER || kind == ZEND_AST_GREATER_EQUAL in zend_is_allowed_in_const_expr()
7961 || kind == ZEND_AST_AND || kind == ZEND_AST_OR in zend_is_allowed_in_const_expr()
7962 || kind == ZEND_AST_UNARY_OP in zend_is_allowed_in_const_expr()
7963 || kind == ZEND_AST_UNARY_PLUS || kind == ZEND_AST_UNARY_MINUS in zend_is_allowed_in_const_expr()
7964 || kind == ZEND_AST_CONDITIONAL || kind == ZEND_AST_DIM in zend_is_allowed_in_const_expr()
7965 || kind == ZEND_AST_ARRAY || kind == ZEND_AST_ARRAY_ELEM in zend_is_allowed_in_const_expr()
7966 || kind == ZEND_AST_CONST || kind == ZEND_AST_CLASS_CONST in zend_is_allowed_in_const_expr()
7967 || kind == ZEND_AST_MAGIC_CONST || kind == ZEND_AST_COALESCE; in zend_is_allowed_in_const_expr()
7981 if (class_ast->kind != ZEND_AST_ZVAL) { in zend_compile_const_expr_class_const()
8067 if (ast == NULL || ast->kind == ZEND_AST_ZVAL) { in zend_compile_const_expr()
8071 if (!zend_is_allowed_in_const_expr(ast->kind)) { in zend_compile_const_expr()
8075 switch (ast->kind) { in zend_compile_const_expr()
8097 if (ast->kind == ZEND_AST_ZVAL) { in zend_const_expr_to_zval()
8108 orig_ast->kind = 0; in zend_const_expr_to_zval()
8119 if (ast->kind == ZEND_AST_STMT_LIST) { in zend_compile_top_stmt()
8130 if (ast->kind != ZEND_AST_NAMESPACE && ast->kind != ZEND_AST_HALT_COMPILER) { in zend_compile_top_stmt()
8133 if (ast->kind == ZEND_AST_FUNC_DECL || ast->kind == ZEND_AST_CLASS) { in zend_compile_top_stmt()
8152 switch (ast->kind) { in zend_compile_stmt()
8258 switch (ast->kind) { in zend_compile_expr()
8381 switch (ast->kind) { in zend_compile_var()
8421 switch (ast->kind) { in zend_delayed_compile_var()
8452 switch (ast->kind) { in zend_eval_const_expr()
8456 if (ast->child[0]->kind != ZEND_AST_ZVAL || ast->child[1]->kind != ZEND_AST_ZVAL) { in zend_eval_const_expr()
8470 if (ast->child[0]->kind != ZEND_AST_ZVAL || ast->child[1]->kind != ZEND_AST_ZVAL) { in zend_eval_const_expr()
8474 zend_ct_eval_greater(&result, ast->kind, in zend_eval_const_expr()
8483 if (ast->child[i]->kind == ZEND_AST_ZVAL) { in zend_eval_const_expr()
8484 if (zend_is_true(zend_ast_get_zval(ast->child[i])) == (ast->kind == ZEND_AST_OR)) { in zend_eval_const_expr()
8485 ZVAL_BOOL(&result, ast->kind == ZEND_AST_OR); in zend_eval_const_expr()
8491 if (ast->child[0]->kind != ZEND_AST_ZVAL || ast->child[1]->kind != ZEND_AST_ZVAL) { in zend_eval_const_expr()
8495 if (ast->kind == ZEND_AST_OR) { in zend_eval_const_expr()
8504 if (ast->child[0]->kind != ZEND_AST_ZVAL) { in zend_eval_const_expr()
8513 if (ast->child[0]->kind != ZEND_AST_ZVAL) { in zend_eval_const_expr()
8517 if (!zend_try_ct_eval_unary_pm(&result, ast->kind, zend_ast_get_zval(ast->child[0]))) { in zend_eval_const_expr()
8523 if (ast->child[0]->kind == ZEND_AST_DIM) { in zend_eval_const_expr()
8528 if (ast->child[0]->kind != ZEND_AST_ZVAL) { in zend_eval_const_expr()
8549 if (ast->child[0]->kind != ZEND_AST_ZVAL) { in zend_eval_const_expr()
8579 if (ast->attr == ZEND_DIM_IS && ast->child[0]->kind == ZEND_AST_DIM) { in zend_eval_const_expr()
8585 if (ast->child[0]->kind != ZEND_AST_ZVAL || ast->child[1]->kind != ZEND_AST_ZVAL) { in zend_eval_const_expr()
8679 …if (name_ast->kind == ZEND_AST_ZVAL && zend_string_equals_literal_ci(zend_ast_get_str(name_ast), "… in zend_eval_const_expr()
8684 if (class_ast->kind != ZEND_AST_ZVAL || name_ast->kind != ZEND_AST_ZVAL) { in zend_eval_const_expr()