Lines Matching refs:kind

335 static void zend_register_seen_symbol(zend_string *name, uint32_t kind) {  in zend_register_seen_symbol()  argument
338 Z_LVAL_P(zv) |= kind; in zend_register_seen_symbol()
341 ZVAL_LONG(&tmp, kind); in zend_register_seen_symbol()
346 static zend_bool zend_have_seen_symbol(zend_string *name, uint32_t kind) { in zend_have_seen_symbol() argument
348 return zv && (Z_LVAL_P(zv) & kind) != 0; in zend_have_seen_symbol()
1400 if (class_ast->kind != ZEND_AST_ZVAL) { in zend_try_compile_const_expr_resolve_class_name()
2188 return ast->kind == ZEND_AST_VAR || ast->kind == ZEND_AST_DIM in zend_is_variable()
2189 || ast->kind == ZEND_AST_PROP || ast->kind == ZEND_AST_STATIC_PROP; in zend_is_variable()
2195 return ast->kind == ZEND_AST_CALL in zend_is_call()
2196 || ast->kind == ZEND_AST_METHOD_CALL in zend_is_call()
2197 || ast->kind == ZEND_AST_STATIC_CALL; in zend_is_call()
2209 return ast->kind == ZEND_AST_STMT_LIST || ast->kind == ZEND_AST_LABEL in zend_is_unticked_stmt()
2210 || ast->kind == ZEND_AST_PROP_DECL || ast->kind == ZEND_AST_CLASS_CONST_DECL in zend_is_unticked_stmt()
2211 || ast->kind == ZEND_AST_USE_TRAIT || ast->kind == ZEND_AST_METHOD; in zend_is_unticked_stmt()
2217 while (ast->kind == ZEND_AST_DIM || ast->kind == ZEND_AST_PROP) { in zend_can_write_to_variable()
2227 if (name_ast->kind != ZEND_AST_ZVAL) { in zend_is_const_default_class_ref()
2283 if (name_ast->kind != ZEND_AST_ZVAL) { in zend_compile_class_ref()
2337 if (name_ast->kind == ZEND_AST_ZVAL) { in zend_try_compile_cv()
2397 if (ast->kind == ZEND_AST_VAR && ast->child[0]->kind == ZEND_AST_ZVAL) { in is_this_fetch()
2584 if (var_ast->kind == ZEND_AST_ARRAY) { in zend_verify_list_assign_target()
2610 if (var_ast->kind == ZEND_AST_ARRAY) { in zend_propagate_list_refs()
2649 if (elem_ast->kind == ZEND_AST_UNPACK) { in zend_compile_list_assign()
2688 if (var_ast->kind == ZEND_AST_ARRAY) { in zend_compile_list_assign()
2714 if (ast->kind == ZEND_AST_CALL) { in zend_ensure_writable_variable()
2717 if (ast->kind == ZEND_AST_METHOD_CALL || ast->kind == ZEND_AST_STATIC_CALL) { in zend_ensure_writable_variable()
2726 if (expr_ast->kind != ZEND_AST_VAR || expr_ast->child[0]->kind != ZEND_AST_ZVAL) { in zend_is_assign_to_self()
2730 while (zend_is_variable(var_ast) && var_ast->kind != ZEND_AST_VAR) { in zend_is_assign_to_self()
2734 if (var_ast->kind != ZEND_AST_VAR || var_ast->child[0]->kind != ZEND_AST_ZVAL) { in zend_is_assign_to_self()
2764 switch (var_ast->kind) { in zend_compile_assign()
2827 if (expr_ast->kind == ZEND_AST_VAR) { in zend_compile_assign()
2866 if ((target_ast->kind != ZEND_AST_VAR in zend_compile_assign_ref()
2867 || target_ast->child[0]->kind != ZEND_AST_ZVAL) in zend_compile_assign_ref()
2927 switch (var_ast->kind) { in zend_compile_compound_assign()
2993 if (arg->kind == ZEND_AST_UNPACK) { in zend_compile_args()
3043 if (arg->kind == ZEND_AST_VAR) { in zend_compile_args()
3219 if (args->child[i]->kind == ZEND_AST_UNPACK) { in zend_args_contain_unpack()
3290 if (args->children != 1 || args->child[0]->kind != ZEND_AST_ZVAL) { in zend_compile_func_defined()
3328 args->child[0]->kind == ZEND_AST_ZVAL && in zend_compile_func_chr()
3345 args->child[0]->kind == ZEND_AST_ZVAL && in zend_compile_func_ord()
3370 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()
3426 if (args->child[1]->kind == ZEND_AST_CALL in zend_compile_func_cufa()
3427 && args->child[1]->child[0]->kind == ZEND_AST_ZVAL in zend_compile_func_cufa()
3429 && args->child[1]->child[1]->kind == ZEND_AST_ARG_LIST) { in zend_compile_func_cufa()
3437 && list->child[1]->kind == ZEND_AST_ZVAL) { in zend_compile_func_cufa()
3514 (args->child[0]->kind != ZEND_AST_ZVAL || in zend_compile_assert()
3544 if (args->child[2]->kind == ZEND_AST_ZVAL) { in zend_compile_func_in_array()
3546 } else if (args->child[2]->kind == ZEND_AST_CONST) { in zend_compile_func_in_array()
3568 if (args->child[1]->kind != ZEND_AST_ARRAY in zend_compile_func_in_array()
3724 && args->child[0]->kind == ZEND_AST_CALL in zend_compile_func_array_slice()
3725 && args->child[0]->child[0]->kind == ZEND_AST_ZVAL in zend_compile_func_array_slice()
3727 && args->child[0]->child[1]->kind == ZEND_AST_ARG_LIST in zend_compile_func_array_slice()
3728 && args->child[1]->kind == ZEND_AST_ZVAL) { in zend_compile_func_array_slice()
3842 if (name_ast->kind != ZEND_AST_ZVAL || Z_TYPE_P(zend_ast_get_zval(name_ast)) != IS_STRING) { in zend_compile_call()
4049 if (class_ast->kind == ZEND_AST_CLASS) { in zend_compile_new()
4168 switch (var_ast->kind) { in zend_compile_unset()
4369 ZEND_ASSERT(ast->kind == ZEND_AST_BREAK || ast->kind == ZEND_AST_CONTINUE); in zend_compile_break_continue()
4373 if (depth_ast->kind != ZEND_AST_ZVAL) { in zend_compile_break_continue()
4375 "is no longer supported", ast->kind == ZEND_AST_BREAK ? "break" : "continue"); in zend_compile_break_continue()
4381 ast->kind == ZEND_AST_BREAK ? "break" : "continue"); in zend_compile_break_continue()
4391 ast->kind == ZEND_AST_BREAK ? "break" : "continue"); in zend_compile_break_continue()
4395 ast->kind == ZEND_AST_BREAK ? "break" : "continue", in zend_compile_break_continue()
4400 if (ast->kind == ZEND_AST_CONTINUE) { in zend_compile_break_continue()
4422 opline = zend_emit_op(NULL, ast->kind == ZEND_AST_BREAK ? ZEND_BRK : ZEND_CONT, NULL, NULL); in zend_compile_break_continue()
4633 zend_bool by_ref = value_ast->kind == ZEND_AST_REF; in zend_compile_foreach()
4641 if (key_ast->kind == ZEND_AST_REF) { in zend_compile_foreach()
4644 if (key_ast->kind == ZEND_AST_ARRAY) { in zend_compile_foreach()
4653 if (value_ast->kind == ZEND_AST_ARRAY && zend_propagate_list_refs(value_ast)) { in zend_compile_foreach()
4677 } else if (value_ast->kind == ZEND_AST_VAR && in zend_compile_foreach()
4684 if (value_ast->kind == ZEND_AST_ARRAY) { in zend_compile_foreach()
4775 if ((*cond_ast)->kind != ZEND_AST_ZVAL) { in determine_switch_jumptable_type()
5138 if (value_ast->kind != ZEND_AST_ZVAL) { in zend_handle_encoding_declaration()
5190 } else if (file_ast->child[i]->kind != ZEND_AST_DECLARE) { in zend_declare_is_first_statement()
5213 if (value_ast->kind != ZEND_AST_ZVAL) { in zend_compile_declare()
5309 if (ast->kind == ZEND_AST_TYPE) { in zend_compile_typename()
5436 && Z_ASTVAL(default_node.u.constant)->kind == ZEND_AST_CONSTANT in zend_compile_params()
5446 if (type_ast->kind == ZEND_AST_TYPE) { in zend_compile_params()
5591 if (ast->kind == ZEND_AST_VAR) { in find_implicit_binds_recursively()
5593 if (name_ast->kind == ZEND_AST_ZVAL && Z_TYPE_P(zend_ast_get_zval(name_ast)) == IS_STRING) { in find_implicit_binds_recursively()
5616 } else if (ast->kind == ZEND_AST_CLOSURE) { in find_implicit_binds_recursively()
5627 } else if (ast->kind == ZEND_AST_ARROW_FUNC) { in find_implicit_binds_recursively()
5981 zend_bool is_method = decl->kind == ZEND_AST_METHOD; in zend_compile_func_decl()
6008 if (decl->kind == ZEND_AST_CLOSURE || decl->kind == ZEND_AST_ARROW_FUNC) { in zend_compile_func_decl()
6017 if (decl->kind == ZEND_AST_ARROW_FUNC) { in zend_compile_func_decl()
6030 if (decl->kind == ZEND_AST_FUNC_DECL) { in zend_compile_func_decl()
6058 if (decl->kind == ZEND_AST_ARROW_FUNC) { in zend_compile_func_decl()
6335 switch (adaptation_ast->kind) { in zend_compile_use_trait()
6473 extends_ast->kind == ZEND_AST_ZVAL ? extends_ast->attr : ZEND_NAME_FQ); in zend_compile_class_decl()
7076 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
7079 ZVAL_LONG(&left, (kind == ZEND_AST_UNARY_PLUS) ? 1 : -1); in zend_try_ct_eval_unary_pm()
7084 static inline void zend_ct_eval_greater(zval *result, zend_ast_kind kind, zval *op1, zval *op2) /* … in zend_ct_eval_greater() argument
7086 binary_op_type fn = kind == ZEND_AST_GREATER in zend_ct_eval_greater()
7115 if (elem_ast->kind != ZEND_AST_UNPACK) { in zend_try_ct_eval_array()
7119 if (elem_ast->attr /* by_ref */ || elem_ast->child[0]->kind != ZEND_AST_ZVAL in zend_try_ct_eval_array()
7120 || (elem_ast->child[1] && elem_ast->child[1]->kind != ZEND_AST_ZVAL) in zend_try_ct_eval_array()
7127 if (elem_ast->child[0]->kind != ZEND_AST_ZVAL) { in zend_try_ct_eval_array()
7151 if (elem_ast->kind == ZEND_AST_UNPACK) { in zend_try_ct_eval_array()
7222 …if ((opcode == ZEND_ADD || opcode == ZEND_SUB) && left_ast->kind == ZEND_AST_BINARY_OP && left_ast… in zend_compile_binary_op()
7225 …| opcode == ZEND_SR) && ((left_ast->kind == ZEND_AST_BINARY_OP && left_ast->attr == ZEND_CONCAT) |… in zend_compile_binary_op()
7304 ZEND_ASSERT(ast->kind == ZEND_AST_GREATER || ast->kind == ZEND_AST_GREATER_EQUAL); in zend_compile_greater()
7311 zend_ct_eval_greater(&result->u.constant, ast->kind, in zend_compile_greater()
7319 ast->kind == ZEND_AST_GREATER ? ZEND_IS_SMALLER : ZEND_IS_SMALLER_OR_EQUAL, in zend_compile_greater()
7350 ZEND_ASSERT(ast->kind == ZEND_AST_UNARY_PLUS || ast->kind == ZEND_AST_UNARY_MINUS); in zend_compile_unary_pm()
7355 if (zend_try_ct_eval_unary_pm(&result->u.constant, ast->kind, &expr_node.u.constant)) { in zend_compile_unary_pm()
7363 ZVAL_LONG(&lefthand_node.u.constant, (ast->kind == ZEND_AST_UNARY_PLUS) ? 1 : -1); in zend_compile_unary_pm()
7377 ZEND_ASSERT(ast->kind == ZEND_AST_AND || ast->kind == ZEND_AST_OR); in zend_compile_short_circuiting()
7382 if ((ast->kind == ZEND_AST_AND && !zend_is_true(&left_node.u.constant)) in zend_compile_short_circuiting()
7383 || (ast->kind == ZEND_AST_OR && zend_is_true(&left_node.u.constant))) { in zend_compile_short_circuiting()
7404 opline_jmpz = zend_emit_op(NULL, ast->kind == ZEND_AST_AND ? ZEND_JMPZ_EX : ZEND_JMPNZ_EX, in zend_compile_short_circuiting()
7427 ZEND_ASSERT(ast->kind == ZEND_AST_POST_INC || ast->kind == ZEND_AST_POST_DEC); in zend_compile_post_incdec()
7431 if (var_ast->kind == ZEND_AST_PROP) { in zend_compile_post_incdec()
7433 opline->opcode = ast->kind == ZEND_AST_POST_INC ? ZEND_POST_INC_OBJ : ZEND_POST_DEC_OBJ; in zend_compile_post_incdec()
7435 } else if (var_ast->kind == ZEND_AST_STATIC_PROP) { in zend_compile_post_incdec()
7437 …opline->opcode = ast->kind == ZEND_AST_POST_INC ? ZEND_POST_INC_STATIC_PROP : ZEND_POST_DEC_STATIC… in zend_compile_post_incdec()
7442 zend_emit_op_tmp(result, ast->kind == ZEND_AST_POST_INC ? ZEND_POST_INC : ZEND_POST_DEC, in zend_compile_post_incdec()
7451 ZEND_ASSERT(ast->kind == ZEND_AST_PRE_INC || ast->kind == ZEND_AST_PRE_DEC); in zend_compile_pre_incdec()
7455 if (var_ast->kind == ZEND_AST_PROP) { in zend_compile_pre_incdec()
7457 opline->opcode = ast->kind == ZEND_AST_PRE_INC ? ZEND_PRE_INC_OBJ : ZEND_PRE_DEC_OBJ; in zend_compile_pre_incdec()
7458 } else if (var_ast->kind == ZEND_AST_STATIC_PROP) { in zend_compile_pre_incdec()
7460 …opline->opcode = ast->kind == ZEND_AST_PRE_INC ? ZEND_PRE_INC_STATIC_PROP : ZEND_PRE_DEC_STATIC_PR… in zend_compile_pre_incdec()
7464 zend_emit_op(result, ast->kind == ZEND_AST_PRE_INC ? ZEND_PRE_INC : ZEND_PRE_DEC, in zend_compile_pre_incdec()
7522 if (cond_ast->kind == ZEND_AST_CONDITIONAL in zend_compile_conditional()
7641 switch (var_ast->kind) { in zend_compile_assign_coalesce()
7833 ZEND_ASSERT(ast->kind == ZEND_AST_ISSET || ast->kind == ZEND_AST_EMPTY); in zend_compile_isset_or_empty()
7836 if (ast->kind == ZEND_AST_EMPTY) { in zend_compile_isset_or_empty()
7848 switch (var_ast->kind) { in zend_compile_isset_or_empty()
7876 if (!(ast->kind == ZEND_AST_ISSET)) { in zend_compile_isset_or_empty()
7889 if (expr_ast->kind == ZEND_AST_VAR) { in zend_compile_silence()
7946 if (elem_ast->kind == ZEND_AST_UNPACK) { in zend_compile_array()
8011 while (last && last->kind == ZEND_AST_STMT_LIST) { in zend_compile_const()
8018 if (last && last->kind == ZEND_AST_HALT_COMPILER) { in zend_compile_const()
8067 if (class_ast->kind == ZEND_AST_ZVAL) { in zend_compile_class_const()
8071 …if (const_ast->kind == ZEND_AST_ZVAL && zend_try_ct_eval_class_const(&result->u.constant, resolved… in zend_compile_class_const()
8280 zend_bool zend_is_allowed_in_const_expr(zend_ast_kind kind) /* {{{ */ in zend_is_allowed_in_const_expr() argument
8282 return kind == ZEND_AST_ZVAL || kind == ZEND_AST_BINARY_OP in zend_is_allowed_in_const_expr()
8283 || kind == ZEND_AST_GREATER || kind == ZEND_AST_GREATER_EQUAL in zend_is_allowed_in_const_expr()
8284 || kind == ZEND_AST_AND || kind == ZEND_AST_OR in zend_is_allowed_in_const_expr()
8285 || kind == ZEND_AST_UNARY_OP in zend_is_allowed_in_const_expr()
8286 || kind == ZEND_AST_UNARY_PLUS || kind == ZEND_AST_UNARY_MINUS in zend_is_allowed_in_const_expr()
8287 || kind == ZEND_AST_CONDITIONAL || kind == ZEND_AST_DIM in zend_is_allowed_in_const_expr()
8288 || kind == ZEND_AST_ARRAY || kind == ZEND_AST_ARRAY_ELEM in zend_is_allowed_in_const_expr()
8289 || kind == ZEND_AST_UNPACK in zend_is_allowed_in_const_expr()
8290 || kind == ZEND_AST_CONST || kind == ZEND_AST_CLASS_CONST in zend_is_allowed_in_const_expr()
8291 || kind == ZEND_AST_CLASS_NAME in zend_is_allowed_in_const_expr()
8292 || kind == ZEND_AST_MAGIC_CONST || kind == ZEND_AST_COALESCE; in zend_is_allowed_in_const_expr()
8306 if (class_ast->kind != ZEND_AST_ZVAL) { in zend_compile_const_expr_class_const()
8397 if (ast == NULL || ast->kind == ZEND_AST_ZVAL) { in zend_compile_const_expr()
8401 if (!zend_is_allowed_in_const_expr(ast->kind)) { in zend_compile_const_expr()
8405 switch (ast->kind) { in zend_compile_const_expr()
8430 if (ast->kind == ZEND_AST_ZVAL) { in zend_const_expr_to_zval()
8441 orig_ast->kind = 0; in zend_const_expr_to_zval()
8452 if (ast->kind == ZEND_AST_STMT_LIST) { in zend_compile_top_stmt()
8461 if (ast->kind == ZEND_AST_FUNC_DECL) { in zend_compile_top_stmt()
8465 } else if (ast->kind == ZEND_AST_CLASS) { in zend_compile_top_stmt()
8472 if (ast->kind != ZEND_AST_NAMESPACE && ast->kind != ZEND_AST_HALT_COMPILER) { in zend_compile_top_stmt()
8490 switch (ast->kind) { in zend_compile_stmt()
8601 switch (ast->kind) { in zend_compile_expr()
8731 switch (ast->kind) { in zend_compile_var()
8766 switch (ast->kind) { in zend_delayed_compile_var()
8796 switch (ast->kind) { in zend_eval_const_expr()
8800 if (ast->child[0]->kind != ZEND_AST_ZVAL || ast->child[1]->kind != ZEND_AST_ZVAL) { in zend_eval_const_expr()
8814 if (ast->child[0]->kind != ZEND_AST_ZVAL || ast->child[1]->kind != ZEND_AST_ZVAL) { in zend_eval_const_expr()
8818 zend_ct_eval_greater(&result, ast->kind, in zend_eval_const_expr()
8827 if (ast->child[0]->kind != ZEND_AST_ZVAL) { in zend_eval_const_expr()
8832 if (child0_is_true == (ast->kind == ZEND_AST_OR)) { in zend_eval_const_expr()
8833 ZVAL_BOOL(&result, ast->kind == ZEND_AST_OR); in zend_eval_const_expr()
8837 if (ast->child[1]->kind != ZEND_AST_ZVAL) { in zend_eval_const_expr()
8842 if (ast->kind == ZEND_AST_OR) { in zend_eval_const_expr()
8851 if (ast->child[0]->kind != ZEND_AST_ZVAL) { in zend_eval_const_expr()
8860 if (ast->child[0]->kind != ZEND_AST_ZVAL) { in zend_eval_const_expr()
8864 if (!zend_try_ct_eval_unary_pm(&result, ast->kind, zend_ast_get_zval(ast->child[0]))) { in zend_eval_const_expr()
8870 if (ast->child[0]->kind == ZEND_AST_DIM) { in zend_eval_const_expr()
8875 if (ast->child[0]->kind != ZEND_AST_ZVAL) { in zend_eval_const_expr()
8896 if (ast->child[0]->kind != ZEND_AST_ZVAL) { in zend_eval_const_expr()
8931 if (ast->attr & ZEND_DIM_IS && ast->child[0]->kind == ZEND_AST_DIM) { in zend_eval_const_expr()
8937 if (ast->child[0]->kind != ZEND_AST_ZVAL || ast->child[1]->kind != ZEND_AST_ZVAL) { in zend_eval_const_expr()
9020 if (class_ast->kind != ZEND_AST_ZVAL || name_ast->kind != ZEND_AST_ZVAL) { in zend_eval_const_expr()