Lines Matching refs:kind
385 static void zend_register_seen_symbol(zend_string *name, uint32_t kind) { in zend_register_seen_symbol() argument
388 Z_LVAL_P(zv) |= kind; in zend_register_seen_symbol()
391 ZVAL_LONG(&tmp, kind); in zend_register_seen_symbol()
396 static zend_bool zend_have_seen_symbol(zend_string *name, uint32_t kind) { in zend_have_seen_symbol() argument
398 return zv && (Z_LVAL_P(zv) & kind) != 0; in zend_have_seen_symbol()
1569 if (class_ast->kind != ZEND_AST_ZVAL) { in zend_try_compile_const_expr_resolve_class_name()
2265 switch (ast->kind) { in zend_ast_is_short_circuited()
2287 if (zend_ast_kind_is_short_circuited(ast->kind)) { in zend_short_circuiting_mark_inner()
2299 zend_bool is_short_circuited = zend_ast_kind_is_short_circuited(ast->kind) in zend_short_circuiting_commit()
2300 || ast->kind == ZEND_AST_ISSET || ast->kind == ZEND_AST_EMPTY; in zend_short_circuiting_commit()
2318 ast->kind == ZEND_AST_ISSET ? ZEND_SHORT_CIRCUITING_CHAIN_ISSET : in zend_short_circuiting_commit()
2319 ast->kind == ZEND_AST_EMPTY ? ZEND_SHORT_CIRCUITING_CHAIN_EMPTY : in zend_short_circuiting_commit()
2464 return ast->kind == ZEND_AST_VAR in zend_is_variable()
2465 || ast->kind == ZEND_AST_DIM in zend_is_variable()
2466 || ast->kind == ZEND_AST_PROP in zend_is_variable()
2467 || ast->kind == ZEND_AST_NULLSAFE_PROP in zend_is_variable()
2468 || ast->kind == ZEND_AST_STATIC_PROP; in zend_is_variable()
2474 return ast->kind == ZEND_AST_CALL in zend_is_call()
2475 || ast->kind == ZEND_AST_METHOD_CALL in zend_is_call()
2476 || ast->kind == ZEND_AST_NULLSAFE_METHOD_CALL in zend_is_call()
2477 || ast->kind == ZEND_AST_STATIC_CALL; in zend_is_call()
2489 return ast->kind == ZEND_AST_STMT_LIST || ast->kind == ZEND_AST_LABEL in zend_is_unticked_stmt()
2490 || ast->kind == ZEND_AST_PROP_DECL || ast->kind == ZEND_AST_CLASS_CONST_GROUP in zend_is_unticked_stmt()
2491 || ast->kind == ZEND_AST_USE_TRAIT || ast->kind == ZEND_AST_METHOD; in zend_is_unticked_stmt()
2498 ast->kind == ZEND_AST_DIM in zend_can_write_to_variable()
2499 || ast->kind == ZEND_AST_PROP in zend_can_write_to_variable()
2510 if (name_ast->kind != ZEND_AST_ZVAL) { in zend_is_const_default_class_ref()
2566 if (name_ast->kind != ZEND_AST_ZVAL) { in zend_compile_class_ref()
2620 if (name_ast->kind == ZEND_AST_ZVAL) { in zend_try_compile_cv()
2680 if (ast->kind == ZEND_AST_VAR && ast->child[0]->kind == ZEND_AST_ZVAL) { in is_this_fetch()
2799 zend_bool nullsafe = ast->kind == ZEND_AST_NULLSAFE_PROP; in zend_delayed_compile_prop()
2892 if (var_ast->kind == ZEND_AST_ARRAY) { in zend_verify_list_assign_target()
2918 if (var_ast->kind == ZEND_AST_ARRAY) { in zend_propagate_list_refs()
2957 if (elem_ast->kind == ZEND_AST_UNPACK) { in zend_compile_list_assign()
2999 if (var_ast->kind == ZEND_AST_ARRAY) { in zend_compile_list_assign()
3022 if (ast->kind == ZEND_AST_CALL) { in zend_ensure_writable_variable()
3026 ast->kind == ZEND_AST_METHOD_CALL in zend_ensure_writable_variable()
3027 || ast->kind == ZEND_AST_NULLSAFE_METHOD_CALL in zend_ensure_writable_variable()
3028 || ast->kind == ZEND_AST_STATIC_CALL in zend_ensure_writable_variable()
3041 if (expr_ast->kind != ZEND_AST_VAR || expr_ast->child[0]->kind != ZEND_AST_ZVAL) { in zend_is_assign_to_self()
3045 while (zend_is_variable(var_ast) && var_ast->kind != ZEND_AST_VAR) { in zend_is_assign_to_self()
3049 if (var_ast->kind != ZEND_AST_VAR || var_ast->child[0]->kind != ZEND_AST_ZVAL) { in zend_is_assign_to_self()
3078 switch (var_ast->kind) { in zend_compile_assign()
3149 if (expr_ast->kind == ZEND_AST_VAR) { in zend_compile_assign()
3191 if ((target_ast->kind != ZEND_AST_VAR in zend_compile_assign_ref()
3192 || target_ast->child[0]->kind != ZEND_AST_ZVAL) in zend_compile_assign_ref()
3193 && source_ast->kind != ZEND_AST_ZNODE in zend_compile_assign_ref()
3253 switch (var_ast->kind) { in zend_compile_compound_assign()
3359 if (arg->kind == ZEND_AST_UNPACK) { in zend_compile_args()
3381 if (arg->kind == ZEND_AST_NAMED_ARG) { in zend_compile_args()
3456 if (arg->kind == ZEND_AST_VAR) { in zend_compile_args()
3653 if (arg->kind == ZEND_AST_UNPACK || arg->kind == ZEND_AST_NAMED_ARG) { in zend_args_contain_unpack_or_named()
3741 if (args->children != 1 || args->child[0]->kind != ZEND_AST_ZVAL) { in zend_compile_func_defined()
3772 args->child[0]->kind == ZEND_AST_ZVAL && in zend_compile_func_chr()
3789 args->child[0]->kind == ZEND_AST_ZVAL && in zend_compile_func_ord()
3814 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()
3871 if (args->child[1]->kind == ZEND_AST_CALL in zend_compile_func_cufa()
3872 && args->child[1]->child[0]->kind == ZEND_AST_ZVAL in zend_compile_func_cufa()
3874 && args->child[1]->child[1]->kind == ZEND_AST_ARG_LIST) { in zend_compile_func_cufa()
3883 && list->child[1]->kind == ZEND_AST_ZVAL) { in zend_compile_func_cufa()
3965 if (args->child[0]->kind == ZEND_AST_NAMED_ARG) { in zend_compile_assert()
3997 if (args->child[2]->kind == ZEND_AST_ZVAL) { in zend_compile_func_in_array()
3999 } else if (args->child[2]->kind == ZEND_AST_CONST) { in zend_compile_func_in_array()
4021 if (args->child[1]->kind != ZEND_AST_ARRAY in zend_compile_func_in_array()
4177 && args->child[0]->kind == ZEND_AST_CALL in zend_compile_func_array_slice()
4178 && args->child[0]->child[0]->kind == ZEND_AST_ZVAL in zend_compile_func_array_slice()
4180 && args->child[0]->child[1]->kind == ZEND_AST_ARG_LIST in zend_compile_func_array_slice()
4181 && args->child[1]->kind == ZEND_AST_ZVAL) { in zend_compile_func_array_slice()
4299 if (name_ast->kind != ZEND_AST_ZVAL || Z_TYPE_P(zend_ast_get_zval(name_ast)) != IS_STRING) { in zend_compile_call()
4372 zend_bool nullsafe = ast->kind == ZEND_AST_NULLSAFE_METHOD_CALL; in zend_compile_method_call()
4527 if (class_ast->kind == ZEND_AST_CLASS) { in zend_compile_new()
4644 switch (var_ast->kind) { in zend_compile_unset()
4856 ZEND_ASSERT(ast->kind == ZEND_AST_BREAK || ast->kind == ZEND_AST_CONTINUE); in zend_compile_break_continue()
4860 if (depth_ast->kind != ZEND_AST_ZVAL) { in zend_compile_break_continue()
4862 "is no longer supported", ast->kind == ZEND_AST_BREAK ? "break" : "continue"); in zend_compile_break_continue()
4868 ast->kind == ZEND_AST_BREAK ? "break" : "continue"); in zend_compile_break_continue()
4878 ast->kind == ZEND_AST_BREAK ? "break" : "continue"); in zend_compile_break_continue()
4882 ast->kind == ZEND_AST_BREAK ? "break" : "continue", in zend_compile_break_continue()
4887 if (ast->kind == ZEND_AST_CONTINUE) { in zend_compile_break_continue()
4920 opline = zend_emit_op(NULL, ast->kind == ZEND_AST_BREAK ? ZEND_BRK : ZEND_CONT, NULL, NULL); in zend_compile_break_continue()
5131 zend_bool by_ref = value_ast->kind == ZEND_AST_REF; in zend_compile_foreach()
5139 if (key_ast->kind == ZEND_AST_REF) { in zend_compile_foreach()
5142 if (key_ast->kind == ZEND_AST_ARRAY) { in zend_compile_foreach()
5151 if (value_ast->kind == ZEND_AST_ARRAY && zend_propagate_list_refs(value_ast)) { in zend_compile_foreach()
5175 } else if (value_ast->kind == ZEND_AST_VAR && in zend_compile_foreach()
5182 if (value_ast->kind == ZEND_AST_ARRAY) { in zend_compile_foreach()
5279 if ((*cond_ast)->kind != ZEND_AST_ZVAL) { in determine_switch_jumptable_type()
5486 if ((*cond_ast)->kind != ZEND_AST_ZVAL) { in can_match_use_jumptable()
5868 if (value_ast->kind != ZEND_AST_ZVAL) { in zend_handle_encoding_declaration()
5921 } else if (file_ast->child[i]->kind != ZEND_AST_DECLARE) { in zend_is_first_statement()
5943 if ((*value_ast_ptr)->kind != ZEND_AST_ZVAL) { in zend_compile_declare()
6032 if (ast->kind == ZEND_AST_TYPE) { in zend_compile_single_typename()
6109 if (ast->kind == ZEND_AST_TYPE_UNION) { in zend_compile_typename()
6252 ZEND_ASSERT(ast->kind == ZEND_AST_ATTRIBUTE_LIST); in zend_compile_attributes()
6257 ZEND_ASSERT(group->kind == ZEND_AST_ATTRIBUTE_GROUP); in zend_compile_attributes()
6260 ZEND_ASSERT(group->child[i]->kind == ZEND_AST_ATTRIBUTE); in zend_compile_attributes()
6274 ZEND_ASSERT(args->kind == ZEND_AST_ARG_LIST); in zend_compile_attributes()
6281 if (arg_ast->kind == ZEND_AST_UNPACK) { in zend_compile_attributes()
6286 if (arg_ast->kind == ZEND_AST_NAMED_ARG) { in zend_compile_attributes()
6632 if (ast->kind == ZEND_AST_VAR) { in find_implicit_binds_recursively()
6634 if (name_ast->kind == ZEND_AST_ZVAL && Z_TYPE_P(zend_ast_get_zval(name_ast)) == IS_STRING) { in find_implicit_binds_recursively()
6657 } else if (ast->kind == ZEND_AST_CLOSURE) { in find_implicit_binds_recursively()
6668 } else if (ast->kind == ZEND_AST_ARROW_FUNC) { in find_implicit_binds_recursively()
6907 zend_bool is_method = decl->kind == ZEND_AST_METHOD; in zend_compile_func_decl()
6936 if (decl->kind == ZEND_AST_CLOSURE || decl->kind == ZEND_AST_ARROW_FUNC) { in zend_compile_func_decl()
6945 if (decl->kind == ZEND_AST_ARROW_FUNC) { in zend_compile_func_decl()
6968 if (decl->kind == ZEND_AST_FUNC_DECL) { in zend_compile_func_decl()
6992 if (decl->kind == ZEND_AST_ARROW_FUNC) { in zend_compile_func_decl()
7268 switch (adaptation_ast->kind) { in zend_compile_use_trait()
7954 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
7957 ZVAL_LONG(&right, (kind == ZEND_AST_UNARY_PLUS) ? 1 : -1); in zend_try_ct_eval_unary_pm()
7962 static inline void zend_ct_eval_greater(zval *result, zend_ast_kind kind, zval *op1, zval *op2) /* … in zend_ct_eval_greater() argument
7964 binary_op_type fn = kind == ZEND_AST_GREATER in zend_ct_eval_greater()
7993 if (elem_ast->kind != ZEND_AST_UNPACK) { in zend_try_ct_eval_array()
7997 if (elem_ast->attr /* by_ref */ || elem_ast->child[0]->kind != ZEND_AST_ZVAL in zend_try_ct_eval_array()
7998 || (elem_ast->child[1] && elem_ast->child[1]->kind != ZEND_AST_ZVAL) in zend_try_ct_eval_array()
8005 if (elem_ast->child[0]->kind != ZEND_AST_ZVAL) { in zend_try_ct_eval_array()
8029 if (elem_ast->kind == ZEND_AST_UNPACK) { in zend_try_ct_eval_array()
8191 ZEND_ASSERT(ast->kind == ZEND_AST_GREATER || ast->kind == ZEND_AST_GREATER_EQUAL); in zend_compile_greater()
8198 zend_ct_eval_greater(&result->u.constant, ast->kind, in zend_compile_greater()
8206 ast->kind == ZEND_AST_GREATER ? ZEND_IS_SMALLER : ZEND_IS_SMALLER_OR_EQUAL, in zend_compile_greater()
8235 ZEND_ASSERT(ast->kind == ZEND_AST_UNARY_PLUS || ast->kind == ZEND_AST_UNARY_MINUS); in zend_compile_unary_pm()
8240 && zend_try_ct_eval_unary_pm(&result->u.constant, ast->kind, &expr_node.u.constant)) { in zend_compile_unary_pm()
8247 ZVAL_LONG(&right_node.u.constant, (ast->kind == ZEND_AST_UNARY_PLUS) ? 1 : -1); in zend_compile_unary_pm()
8261 ZEND_ASSERT(ast->kind == ZEND_AST_AND || ast->kind == ZEND_AST_OR); in zend_compile_short_circuiting()
8266 if ((ast->kind == ZEND_AST_AND && !zend_is_true(&left_node.u.constant)) in zend_compile_short_circuiting()
8267 || (ast->kind == ZEND_AST_OR && zend_is_true(&left_node.u.constant))) { in zend_compile_short_circuiting()
8288 opline_jmpz = zend_emit_op(NULL, ast->kind == ZEND_AST_AND ? ZEND_JMPZ_EX : ZEND_JMPNZ_EX, in zend_compile_short_circuiting()
8310 ZEND_ASSERT(ast->kind == ZEND_AST_POST_INC || ast->kind == ZEND_AST_POST_DEC); in zend_compile_post_incdec()
8314 if (var_ast->kind == ZEND_AST_PROP || var_ast->kind == ZEND_AST_NULLSAFE_PROP) { in zend_compile_post_incdec()
8316 opline->opcode = ast->kind == ZEND_AST_POST_INC ? ZEND_POST_INC_OBJ : ZEND_POST_DEC_OBJ; in zend_compile_post_incdec()
8318 } else if (var_ast->kind == ZEND_AST_STATIC_PROP) { in zend_compile_post_incdec()
8320 …opline->opcode = ast->kind == ZEND_AST_POST_INC ? ZEND_POST_INC_STATIC_PROP : ZEND_POST_DEC_STATIC… in zend_compile_post_incdec()
8325 zend_emit_op_tmp(result, ast->kind == ZEND_AST_POST_INC ? ZEND_POST_INC : ZEND_POST_DEC, in zend_compile_post_incdec()
8334 ZEND_ASSERT(ast->kind == ZEND_AST_PRE_INC || ast->kind == ZEND_AST_PRE_DEC); in zend_compile_pre_incdec()
8338 if (var_ast->kind == ZEND_AST_PROP || var_ast->kind == ZEND_AST_NULLSAFE_PROP) { in zend_compile_pre_incdec()
8340 opline->opcode = ast->kind == ZEND_AST_PRE_INC ? ZEND_PRE_INC_OBJ : ZEND_PRE_DEC_OBJ; in zend_compile_pre_incdec()
8343 } else if (var_ast->kind == ZEND_AST_STATIC_PROP) { in zend_compile_pre_incdec()
8345 …opline->opcode = ast->kind == ZEND_AST_PRE_INC ? ZEND_PRE_INC_STATIC_PROP : ZEND_PRE_DEC_STATIC_PR… in zend_compile_pre_incdec()
8351 zend_emit_op_tmp(result, ast->kind == ZEND_AST_PRE_INC ? ZEND_PRE_INC : ZEND_PRE_DEC, in zend_compile_pre_incdec()
8411 if (cond_ast->kind == ZEND_AST_CONDITIONAL in zend_compile_conditional()
8523 if (var_ast->kind == ZEND_AST_DIM in zend_compile_assign_coalesce()
8543 switch (var_ast->kind) { in zend_compile_assign_coalesce()
8742 ZEND_ASSERT(ast->kind == ZEND_AST_ISSET || ast->kind == ZEND_AST_EMPTY); in zend_compile_isset_or_empty()
8745 if (ast->kind == ZEND_AST_EMPTY) { in zend_compile_isset_or_empty()
8758 switch (var_ast->kind) { in zend_compile_isset_or_empty()
8787 if (!(ast->kind == ZEND_AST_ISSET)) { in zend_compile_isset_or_empty()
8800 if (expr_ast->kind == ZEND_AST_VAR) { in zend_compile_silence()
8857 if (elem_ast->kind == ZEND_AST_UNPACK) { in zend_compile_array()
8922 while (last && last->kind == ZEND_AST_STMT_LIST) { in zend_compile_const()
8929 if (last && last->kind == ZEND_AST_HALT_COMPILER) { in zend_compile_const()
8972 if (class_ast->kind == ZEND_AST_ZVAL) { in zend_compile_class_const()
8976 …if (const_ast->kind == ZEND_AST_ZVAL && zend_try_ct_eval_class_const(&result->u.constant, resolved… in zend_compile_class_const()
9005 if (class_ast->kind == ZEND_AST_ZVAL) { in zend_compile_class_name()
9192 zend_bool zend_is_allowed_in_const_expr(zend_ast_kind kind) /* {{{ */ in zend_is_allowed_in_const_expr() argument
9194 return kind == ZEND_AST_ZVAL || kind == ZEND_AST_BINARY_OP in zend_is_allowed_in_const_expr()
9195 || kind == ZEND_AST_GREATER || kind == ZEND_AST_GREATER_EQUAL in zend_is_allowed_in_const_expr()
9196 || kind == ZEND_AST_AND || kind == ZEND_AST_OR in zend_is_allowed_in_const_expr()
9197 || kind == ZEND_AST_UNARY_OP in zend_is_allowed_in_const_expr()
9198 || kind == ZEND_AST_UNARY_PLUS || kind == ZEND_AST_UNARY_MINUS in zend_is_allowed_in_const_expr()
9199 || kind == ZEND_AST_CONDITIONAL || kind == ZEND_AST_DIM in zend_is_allowed_in_const_expr()
9200 || kind == ZEND_AST_ARRAY || kind == ZEND_AST_ARRAY_ELEM in zend_is_allowed_in_const_expr()
9201 || kind == ZEND_AST_UNPACK in zend_is_allowed_in_const_expr()
9202 || kind == ZEND_AST_CONST || kind == ZEND_AST_CLASS_CONST in zend_is_allowed_in_const_expr()
9203 || kind == ZEND_AST_CLASS_NAME in zend_is_allowed_in_const_expr()
9204 || kind == ZEND_AST_MAGIC_CONST || kind == ZEND_AST_COALESCE; in zend_is_allowed_in_const_expr()
9218 if (class_ast->kind != ZEND_AST_ZVAL) { in zend_compile_const_expr_class_const()
9250 if (class_ast->kind != ZEND_AST_ZVAL) { in zend_compile_const_expr_class_name()
9314 if (ast == NULL || ast->kind == ZEND_AST_ZVAL) { in zend_compile_const_expr()
9318 if (!zend_is_allowed_in_const_expr(ast->kind)) { in zend_compile_const_expr()
9322 switch (ast->kind) { in zend_compile_const_expr()
9346 if ((*ast_ptr)->kind != ZEND_AST_ZVAL) { in zend_const_expr_to_zval()
9364 if (ast->kind == ZEND_AST_STMT_LIST) { in zend_compile_top_stmt()
9373 if (ast->kind == ZEND_AST_FUNC_DECL) { in zend_compile_top_stmt()
9377 } else if (ast->kind == ZEND_AST_CLASS) { in zend_compile_top_stmt()
9384 if (ast->kind != ZEND_AST_NAMESPACE && ast->kind != ZEND_AST_HALT_COMPILER) { in zend_compile_top_stmt()
9402 switch (ast->kind) { in zend_compile_stmt()
9513 switch (ast->kind) { in zend_compile_expr_inner()
9658 switch (ast->kind) { in zend_compile_var_inner()
9702 switch (ast->kind) { in zend_delayed_compile_var()
9733 switch (ast->kind) { in zend_eval_const_expr()
9737 if (ast->child[0]->kind != ZEND_AST_ZVAL || ast->child[1]->kind != ZEND_AST_ZVAL) { in zend_eval_const_expr()
9751 if (ast->child[0]->kind != ZEND_AST_ZVAL || ast->child[1]->kind != ZEND_AST_ZVAL) { in zend_eval_const_expr()
9755 zend_ct_eval_greater(&result, ast->kind, in zend_eval_const_expr()
9764 if (ast->child[0]->kind != ZEND_AST_ZVAL) { in zend_eval_const_expr()
9769 if (child0_is_true == (ast->kind == ZEND_AST_OR)) { in zend_eval_const_expr()
9770 ZVAL_BOOL(&result, ast->kind == ZEND_AST_OR); in zend_eval_const_expr()
9774 if (ast->child[1]->kind != ZEND_AST_ZVAL) { in zend_eval_const_expr()
9779 if (ast->kind == ZEND_AST_OR) { in zend_eval_const_expr()
9788 if (ast->child[0]->kind != ZEND_AST_ZVAL) { in zend_eval_const_expr()
9799 if (ast->child[0]->kind != ZEND_AST_ZVAL) { in zend_eval_const_expr()
9803 if (!zend_try_ct_eval_unary_pm(&result, ast->kind, zend_ast_get_zval(ast->child[0]))) { in zend_eval_const_expr()
9809 if (ast->child[0]->kind == ZEND_AST_DIM) { in zend_eval_const_expr()
9814 if (ast->child[0]->kind != ZEND_AST_ZVAL) { in zend_eval_const_expr()
9835 if (ast->child[0]->kind != ZEND_AST_ZVAL) { in zend_eval_const_expr()
9870 if ((ast->attr & ZEND_DIM_IS) && ast->child[0]->kind == ZEND_AST_DIM) { in zend_eval_const_expr()
9876 if (ast->child[0]->kind != ZEND_AST_ZVAL || ast->child[1]->kind != ZEND_AST_ZVAL) { in zend_eval_const_expr()
9959 if (class_ast->kind != ZEND_AST_ZVAL || name_ast->kind != ZEND_AST_ZVAL) { in zend_eval_const_expr()