Lines Matching refs:kind
341 static void zend_register_seen_symbol(zend_string *name, uint32_t kind) { in zend_register_seen_symbol() argument
344 Z_LVAL_P(zv) |= kind; in zend_register_seen_symbol()
347 ZVAL_LONG(&tmp, kind); in zend_register_seen_symbol()
352 static zend_bool zend_have_seen_symbol(zend_string *name, uint32_t kind) { in zend_have_seen_symbol() argument
354 return zv && (Z_LVAL_P(zv) & kind) != 0; in zend_have_seen_symbol()
639 …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
647 range->var = (var * sizeof(zval)) | kind; in zend_end_live_range()
1485 if (name_ast->kind != ZEND_AST_ZVAL) { in zend_try_compile_const_expr_resolve_class_name()
1493 if (class_ast->kind != ZEND_AST_ZVAL) { in zend_try_compile_const_expr_resolve_class_name()
2388 return ast->kind == ZEND_AST_VAR || ast->kind == ZEND_AST_DIM in zend_is_variable()
2389 || ast->kind == ZEND_AST_PROP || ast->kind == ZEND_AST_STATIC_PROP in zend_is_variable()
2390 || ast->kind == ZEND_AST_CALL || ast->kind == ZEND_AST_METHOD_CALL in zend_is_variable()
2391 || ast->kind == ZEND_AST_STATIC_CALL; in zend_is_variable()
2397 return ast->kind == ZEND_AST_CALL in zend_is_call()
2398 || ast->kind == ZEND_AST_METHOD_CALL in zend_is_call()
2399 || ast->kind == ZEND_AST_STATIC_CALL; in zend_is_call()
2405 return ast->kind == ZEND_AST_STMT_LIST || ast->kind == ZEND_AST_LABEL in zend_is_unticked_stmt()
2406 || ast->kind == ZEND_AST_PROP_DECL || ast->kind == ZEND_AST_CLASS_CONST_DECL in zend_is_unticked_stmt()
2407 || ast->kind == ZEND_AST_USE_TRAIT || ast->kind == ZEND_AST_METHOD; in zend_is_unticked_stmt()
2413 while (ast->kind == ZEND_AST_DIM || ast->kind == ZEND_AST_PROP) { in zend_can_write_to_variable()
2423 if (name_ast->kind != ZEND_AST_ZVAL) { in zend_is_const_default_class_ref()
2479 if (name_ast->kind != ZEND_AST_ZVAL) { in zend_compile_class_ref_ex()
2533 if (name_ast->kind == ZEND_AST_ZVAL) { in zend_try_compile_cv()
2593 if (ast->kind == ZEND_AST_VAR && ast->child[0]->kind == ZEND_AST_ZVAL) { in is_this_fetch()
2757 if (var_ast->kind == ZEND_AST_ARRAY) { in zend_verify_list_assign_target()
2783 if (var_ast->kind == ZEND_AST_ARRAY) { in zend_propagate_list_refs()
2856 if (var_ast->kind == ZEND_AST_ARRAY) { in zend_compile_list_assign()
2882 if (ast->kind == ZEND_AST_CALL) { in zend_ensure_writable_variable()
2885 if (ast->kind == ZEND_AST_METHOD_CALL || ast->kind == ZEND_AST_STATIC_CALL) { in zend_ensure_writable_variable()
2894 if (expr_ast->kind != ZEND_AST_VAR || expr_ast->child[0]->kind != ZEND_AST_ZVAL) { in zend_is_assign_to_self()
2898 while (zend_is_variable(var_ast) && var_ast->kind != ZEND_AST_VAR) { in zend_is_assign_to_self()
2902 if (var_ast->kind != ZEND_AST_VAR || var_ast->child[0]->kind != ZEND_AST_ZVAL) { in zend_is_assign_to_self()
2932 if (var_ast->kind == ZEND_AST_ARRAY && zend_list_has_assign_to(var_ast, name)) { in zend_list_has_assign_to()
2936 if (var_ast->kind == ZEND_AST_VAR && var_ast->child[0]->kind == ZEND_AST_ZVAL) { in zend_list_has_assign_to()
2954 if (expr_ast->kind == ZEND_AST_VAR && expr_ast->child[0]->kind == ZEND_AST_ZVAL) { in zend_list_has_assign_to_self()
2979 switch (var_ast->kind) { in zend_compile_assign()
3075 if ((target_ast->kind != ZEND_AST_VAR in zend_compile_assign_ref()
3076 || target_ast->child[0]->kind != ZEND_AST_ZVAL) in zend_compile_assign_ref()
3121 switch (var_ast->kind) { in zend_compile_compound_assign()
3174 if (arg->kind == ZEND_AST_UNPACK) { in zend_compile_args()
3220 if (arg->kind == ZEND_AST_VAR) { in zend_compile_args()
3399 if (args->child[i]->kind == ZEND_AST_UNPACK) { in zend_args_contain_unpack()
3412 || args->children != 1 || args->child[0]->kind == ZEND_AST_UNPACK in zend_compile_func_strlen()
3434 if (args->children != 1 || args->child[0]->kind == ZEND_AST_UNPACK) { in zend_compile_func_typecheck()
3454 if (args->children != 1 || args->child[0]->kind == ZEND_AST_UNPACK) { in zend_compile_func_cast()
3470 if (args->children != 1 || args->child[0]->kind != ZEND_AST_ZVAL) { in zend_compile_func_defined()
3508 args->child[0]->kind == ZEND_AST_ZVAL && in zend_compile_func_chr()
3525 args->child[0]->kind == ZEND_AST_ZVAL && in zend_compile_func_ord()
3544 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()
3599 if (args->child[1]->kind == ZEND_AST_CALL in zend_compile_func_cufa()
3600 && args->child[1]->child[0]->kind == ZEND_AST_ZVAL in zend_compile_func_cufa()
3602 && args->child[1]->child[1]->kind == ZEND_AST_ARG_LIST) { in zend_compile_func_cufa()
3610 && list->child[1]->kind == ZEND_AST_ZVAL) { in zend_compile_func_cufa()
3688 (args->child[0]->kind != ZEND_AST_ZVAL || in zend_compile_assert()
3718 if (args->child[2]->kind == ZEND_AST_ZVAL) { in zend_compile_func_in_array()
3720 } else if (args->child[2]->kind == ZEND_AST_CONST) { in zend_compile_func_in_array()
3742 if (args->child[1]->kind != ZEND_AST_ARRAY in zend_compile_func_in_array()
3800 if (args->children != 1 || args->child[0]->kind == ZEND_AST_UNPACK) { in zend_compile_func_count()
3817 if (args->children != 1 || args->child[0]->kind == ZEND_AST_UNPACK) { in zend_compile_func_get_class()
3843 if (args->children != 1 || args->child[0]->kind == ZEND_AST_UNPACK) { in zend_compile_func_gettype()
3879 && args->child[0]->kind == ZEND_AST_CALL in zend_compile_func_array_slice()
3880 && args->child[0]->child[0]->kind == ZEND_AST_ZVAL in zend_compile_func_array_slice()
3882 && args->child[0]->child[1]->kind == ZEND_AST_ARG_LIST in zend_compile_func_array_slice()
3883 && args->child[1]->kind == ZEND_AST_ZVAL) { in zend_compile_func_array_slice()
3991 if (name_ast->kind != ZEND_AST_ZVAL || Z_TYPE_P(zend_ast_get_zval(name_ast)) != IS_STRING) { in zend_compile_call()
4194 if (class_ast->kind == ZEND_AST_CLASS) { in zend_compile_new()
4278 if (var_ast->kind == ZEND_AST_ZVAL) { in zend_compile_static_var_common()
4336 switch (var_ast->kind) { in zend_compile_unset()
4537 ZEND_ASSERT(ast->kind == ZEND_AST_BREAK || ast->kind == ZEND_AST_CONTINUE); in zend_compile_break_continue()
4541 if (depth_ast->kind != ZEND_AST_ZVAL) { in zend_compile_break_continue()
4543 "is no longer supported", ast->kind == ZEND_AST_BREAK ? "break" : "continue"); in zend_compile_break_continue()
4549 ast->kind == ZEND_AST_BREAK ? "break" : "continue"); in zend_compile_break_continue()
4559 ast->kind == ZEND_AST_BREAK ? "break" : "continue"); in zend_compile_break_continue()
4563 ast->kind == ZEND_AST_BREAK ? "break" : "continue", in zend_compile_break_continue()
4568 if (ast->kind == ZEND_AST_CONTINUE) { in zend_compile_break_continue()
4590 opline = zend_emit_op(NULL, ast->kind == ZEND_AST_BREAK ? ZEND_BRK : ZEND_CONT, NULL, NULL); in zend_compile_break_continue()
4801 zend_bool by_ref = value_ast->kind == ZEND_AST_REF; in zend_compile_foreach()
4810 if (key_ast->kind == ZEND_AST_REF) { in zend_compile_foreach()
4813 if (key_ast->kind == ZEND_AST_ARRAY) { in zend_compile_foreach()
4822 if (value_ast->kind == ZEND_AST_ARRAY && zend_propagate_list_refs(value_ast)) { in zend_compile_foreach()
4846 } else if (value_ast->kind == ZEND_AST_VAR && in zend_compile_foreach()
4853 if (value_ast->kind == ZEND_AST_ARRAY) { in zend_compile_foreach()
4943 if ((*cond_ast)->kind != ZEND_AST_ZVAL) { in determine_switch_jumptable_type()
5307 if (value_ast->kind != ZEND_AST_ZVAL) { in zend_handle_encoding_declaration()
5359 } else if (file_ast->child[i]->kind != ZEND_AST_DECLARE) { in zend_declare_is_first_statement()
5382 if (value_ast->kind != ZEND_AST_ZVAL) { in zend_compile_declare()
5470 if (ast->kind == ZEND_AST_TYPE) { in zend_compile_typename()
5608 && Z_ASTVAL(default_node.u.constant)->kind == ZEND_AST_CONSTANT in zend_compile_params()
5622 if (type_ast->kind == ZEND_AST_TYPE) { in zend_compile_params()
6020 zend_bool is_method = decl->kind == ZEND_AST_METHOD; in zend_compile_func_decl()
6035 if (decl->kind == ZEND_AST_CLOSURE) { in zend_compile_func_decl()
6291 switch (adaptation_ast->kind) { in zend_compile_use_trait()
6422 extends_ast->kind == ZEND_AST_ZVAL ? extends_ast->attr : ZEND_NAME_FQ)); in zend_compile_class_decl()
7019 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
7022 ZVAL_LONG(&left, (kind == ZEND_AST_UNARY_PLUS) ? 1 : -1); in zend_try_ct_eval_unary_pm()
7027 static inline void zend_ct_eval_greater(zval *result, zend_ast_kind kind, zval *op1, zval *op2) /* … in zend_ct_eval_greater() argument
7029 binary_op_type fn = kind == ZEND_AST_GREATER in zend_ct_eval_greater()
7061 if (elem_ast->attr /* by_ref */ || elem_ast->child[0]->kind != ZEND_AST_ZVAL in zend_try_ct_eval_array()
7062 || (elem_ast->child[1] && elem_ast->child[1]->kind != ZEND_AST_ZVAL) in zend_try_ct_eval_array()
7197 ZEND_ASSERT(ast->kind == ZEND_AST_GREATER || ast->kind == ZEND_AST_GREATER_EQUAL); in zend_compile_greater()
7204 zend_ct_eval_greater(&result->u.constant, ast->kind, in zend_compile_greater()
7212 ast->kind == ZEND_AST_GREATER ? ZEND_IS_SMALLER : ZEND_IS_SMALLER_OR_EQUAL, in zend_compile_greater()
7243 ZEND_ASSERT(ast->kind == ZEND_AST_UNARY_PLUS || ast->kind == ZEND_AST_UNARY_MINUS); in zend_compile_unary_pm()
7248 if (zend_try_ct_eval_unary_pm(&result->u.constant, ast->kind, &expr_node.u.constant)) { in zend_compile_unary_pm()
7256 ZVAL_LONG(&lefthand_node.u.constant, (ast->kind == ZEND_AST_UNARY_PLUS) ? 1 : -1); in zend_compile_unary_pm()
7270 ZEND_ASSERT(ast->kind == ZEND_AST_AND || ast->kind == ZEND_AST_OR); in zend_compile_short_circuiting()
7275 if ((ast->kind == ZEND_AST_AND && !zend_is_true(&left_node.u.constant)) in zend_compile_short_circuiting()
7276 || (ast->kind == ZEND_AST_OR && zend_is_true(&left_node.u.constant))) { in zend_compile_short_circuiting()
7297 opline_jmpz = zend_emit_op(NULL, ast->kind == ZEND_AST_AND ? ZEND_JMPZ_EX : ZEND_JMPNZ_EX, in zend_compile_short_circuiting()
7320 ZEND_ASSERT(ast->kind == ZEND_AST_POST_INC || ast->kind == ZEND_AST_POST_DEC); in zend_compile_post_incdec()
7324 if (var_ast->kind == ZEND_AST_PROP) { in zend_compile_post_incdec()
7326 opline->opcode = ast->kind == ZEND_AST_POST_INC ? ZEND_POST_INC_OBJ : ZEND_POST_DEC_OBJ; in zend_compile_post_incdec()
7331 zend_emit_op_tmp(result, ast->kind == ZEND_AST_POST_INC ? ZEND_POST_INC : ZEND_POST_DEC, in zend_compile_post_incdec()
7340 ZEND_ASSERT(ast->kind == ZEND_AST_PRE_INC || ast->kind == ZEND_AST_PRE_DEC); in zend_compile_pre_incdec()
7344 if (var_ast->kind == ZEND_AST_PROP) { in zend_compile_pre_incdec()
7346 opline->opcode = ast->kind == ZEND_AST_PRE_INC ? ZEND_PRE_INC_OBJ : ZEND_PRE_DEC_OBJ; in zend_compile_pre_incdec()
7350 zend_emit_op(result, ast->kind == ZEND_AST_PRE_INC ? ZEND_PRE_INC : ZEND_PRE_DEC, in zend_compile_pre_incdec()
7597 ZEND_ASSERT(ast->kind == ZEND_AST_ISSET || ast->kind == ZEND_AST_EMPTY); in zend_compile_isset_or_empty()
7600 if (ast->kind == ZEND_AST_EMPTY) { in zend_compile_isset_or_empty()
7612 switch (var_ast->kind) { in zend_compile_isset_or_empty()
7639 if (!(ast->kind == ZEND_AST_ISSET)) { in zend_compile_isset_or_empty()
7654 if (expr_ast->kind == ZEND_AST_VAR) { in zend_compile_silence()
7769 while (last && last->kind == ZEND_AST_STMT_LIST) { in zend_compile_const()
7776 if (last && last->kind == ZEND_AST_HALT_COMPILER) { in zend_compile_const()
7835 if (class_ast->kind == ZEND_AST_ZVAL) { in zend_compile_class_const()
7839 …if (const_ast->kind == ZEND_AST_ZVAL && zend_try_ct_eval_class_const(&result->u.constant, resolved… in zend_compile_class_const()
7846 …if (const_ast->kind == ZEND_AST_ZVAL && zend_string_equals_literal_ci(zend_ast_get_str(const_ast),… in zend_compile_class_const()
8044 zend_bool zend_is_allowed_in_const_expr(zend_ast_kind kind) /* {{{ */ in zend_is_allowed_in_const_expr() argument
8046 return kind == ZEND_AST_ZVAL || kind == ZEND_AST_BINARY_OP in zend_is_allowed_in_const_expr()
8047 || kind == ZEND_AST_GREATER || kind == ZEND_AST_GREATER_EQUAL in zend_is_allowed_in_const_expr()
8048 || kind == ZEND_AST_AND || kind == ZEND_AST_OR in zend_is_allowed_in_const_expr()
8049 || kind == ZEND_AST_UNARY_OP in zend_is_allowed_in_const_expr()
8050 || kind == ZEND_AST_UNARY_PLUS || kind == ZEND_AST_UNARY_MINUS in zend_is_allowed_in_const_expr()
8051 || kind == ZEND_AST_CONDITIONAL || kind == ZEND_AST_DIM in zend_is_allowed_in_const_expr()
8052 || kind == ZEND_AST_ARRAY || kind == ZEND_AST_ARRAY_ELEM in zend_is_allowed_in_const_expr()
8053 || kind == ZEND_AST_CONST || kind == ZEND_AST_CLASS_CONST in zend_is_allowed_in_const_expr()
8054 || kind == ZEND_AST_MAGIC_CONST || kind == ZEND_AST_COALESCE; in zend_is_allowed_in_const_expr()
8069 if (class_ast->kind != ZEND_AST_ZVAL) { in zend_compile_const_expr_class_const()
8142 if (ast == NULL || ast->kind == ZEND_AST_ZVAL) { in zend_compile_const_expr()
8146 if (!zend_is_allowed_in_const_expr(ast->kind)) { in zend_compile_const_expr()
8150 switch (ast->kind) { in zend_compile_const_expr()
8172 if (ast->kind == ZEND_AST_ZVAL) { in zend_const_expr_to_zval()
8183 orig_ast->kind = 0; in zend_const_expr_to_zval()
8194 if (ast->kind == ZEND_AST_STMT_LIST) { in zend_compile_top_stmt()
8205 if (ast->kind != ZEND_AST_NAMESPACE && ast->kind != ZEND_AST_HALT_COMPILER) { in zend_compile_top_stmt()
8208 if (ast->kind == ZEND_AST_FUNC_DECL || ast->kind == ZEND_AST_CLASS) { in zend_compile_top_stmt()
8227 switch (ast->kind) { in zend_compile_stmt()
8333 switch (ast->kind) { in zend_compile_expr()
8456 switch (ast->kind) { in zend_compile_var()
8495 switch (ast->kind) { in zend_delayed_compile_var()
8524 switch (ast->kind) { in zend_eval_const_expr()
8528 if (ast->child[0]->kind != ZEND_AST_ZVAL || ast->child[1]->kind != ZEND_AST_ZVAL) { in zend_eval_const_expr()
8542 if (ast->child[0]->kind != ZEND_AST_ZVAL || ast->child[1]->kind != ZEND_AST_ZVAL) { in zend_eval_const_expr()
8546 zend_ct_eval_greater(&result, ast->kind, in zend_eval_const_expr()
8555 if (ast->child[0]->kind != ZEND_AST_ZVAL) { in zend_eval_const_expr()
8560 if (child0_is_true == (ast->kind == ZEND_AST_OR)) { in zend_eval_const_expr()
8561 ZVAL_BOOL(&result, ast->kind == ZEND_AST_OR); in zend_eval_const_expr()
8565 if (ast->child[1]->kind != ZEND_AST_ZVAL) { in zend_eval_const_expr()
8570 if (ast->kind == ZEND_AST_OR) { in zend_eval_const_expr()
8579 if (ast->child[0]->kind != ZEND_AST_ZVAL) { in zend_eval_const_expr()
8588 if (ast->child[0]->kind != ZEND_AST_ZVAL) { in zend_eval_const_expr()
8592 if (!zend_try_ct_eval_unary_pm(&result, ast->kind, zend_ast_get_zval(ast->child[0]))) { in zend_eval_const_expr()
8598 if (ast->child[0]->kind == ZEND_AST_DIM) { in zend_eval_const_expr()
8603 if (ast->child[0]->kind != ZEND_AST_ZVAL) { in zend_eval_const_expr()
8624 if (ast->child[0]->kind != ZEND_AST_ZVAL) { in zend_eval_const_expr()
8654 if (ast->attr == ZEND_DIM_IS && ast->child[0]->kind == ZEND_AST_DIM) { in zend_eval_const_expr()
8660 if (ast->child[0]->kind != ZEND_AST_ZVAL || ast->child[1]->kind != ZEND_AST_ZVAL) { in zend_eval_const_expr()
8754 …if (name_ast->kind == ZEND_AST_ZVAL && zend_string_equals_literal_ci(zend_ast_get_str(name_ast), "… in zend_eval_const_expr()
8759 if (class_ast->kind != ZEND_AST_ZVAL || name_ast->kind != ZEND_AST_ZVAL) { in zend_eval_const_expr()