Lines Matching refs:var_ast

2678 static inline void zend_emit_assign_znode(zend_ast *var_ast, znode *value_node) /* {{{ */  in zend_emit_assign_znode()  argument
2681 if (var_ast->kind == ZEND_AST_ARRAY) { in zend_emit_assign_znode()
2682 zend_compile_list_assign(&dummy_node, var_ast, value_node, var_ast->attr); in zend_emit_assign_znode()
2684 zend_ast *assign_ast = zend_ast_create(ZEND_AST_ASSIGN, var_ast, in zend_emit_assign_znode()
2694 zend_ast *var_ast = ast->child[0]; in zend_delayed_compile_dim() local
2699 zend_delayed_compile_var(&var_node, var_ast, type); in zend_delayed_compile_dim()
2700 zend_separate_if_call_and_write(&var_node, var_ast, type); in zend_delayed_compile_dim()
2815 static void zend_verify_list_assign_target(zend_ast *var_ast, zend_bool old_style) /* {{{ */ { in zend_verify_list_assign_target() argument
2816 if (var_ast->kind == ZEND_AST_ARRAY) { in zend_verify_list_assign_target()
2817 if (var_ast->attr == ZEND_ARRAY_SYNTAX_LONG) { in zend_verify_list_assign_target()
2820 if (old_style != var_ast->attr) { in zend_verify_list_assign_target()
2823 } else if (!zend_can_write_to_variable(var_ast)) { in zend_verify_list_assign_target()
2840 zend_ast *var_ast, *key_ast; in zend_compile_list_assign() local
2856 var_ast = elem_ast->child[0]; in zend_compile_list_assign()
2881 zend_verify_list_assign_target(var_ast, old_style); in zend_compile_list_assign()
2884 zend_emit_assign_znode(var_ast, &fetch_result); in zend_compile_list_assign()
2907 zend_bool zend_is_assign_to_self(zend_ast *var_ast, zend_ast *expr_ast) /* {{{ */ in zend_is_assign_to_self() argument
2913 while (zend_is_variable(var_ast) && var_ast->kind != ZEND_AST_VAR) { in zend_is_assign_to_self()
2914 var_ast = var_ast->child[0]; in zend_is_assign_to_self()
2917 if (var_ast->kind != ZEND_AST_VAR || var_ast->child[0]->kind != ZEND_AST_ZVAL) { in zend_is_assign_to_self()
2922 zend_string *name1 = zval_get_string(zend_ast_get_zval(var_ast->child[0])); in zend_is_assign_to_self()
2939 zend_ast *var_ast; in zend_list_has_assign_to() local
2944 var_ast = elem_ast->child[0]; in zend_list_has_assign_to()
2947 if (var_ast->kind == ZEND_AST_ARRAY && zend_list_has_assign_to(var_ast, name)) { in zend_list_has_assign_to()
2951 if (var_ast->kind == ZEND_AST_VAR && var_ast->child[0]->kind == ZEND_AST_ZVAL) { in zend_list_has_assign_to()
2952 zend_string *var_name = zval_get_string(zend_ast_get_zval(var_ast->child[0])); in zend_list_has_assign_to()
2981 zend_ast *var_ast = ast->child[0]; in zend_compile_assign() local
2988 if (is_this_fetch(var_ast)) { in zend_compile_assign()
2992 zend_ensure_writable_variable(var_ast); in zend_compile_assign()
2994 switch (var_ast->kind) { in zend_compile_assign()
2998 zend_delayed_compile_var(&var_node, var_ast, BP_VAR_W); in zend_compile_assign()
3005 zend_delayed_compile_dim(result, var_ast, BP_VAR_W); in zend_compile_assign()
3007 if (zend_is_assign_to_self(var_ast, expr_ast) in zend_compile_assign()
3022 zend_delayed_compile_prop(result, var_ast, BP_VAR_W); in zend_compile_assign()
3031 if (zend_list_has_assign_to_self(var_ast, expr_ast)) { in zend_compile_assign()
3038 zend_compile_list_assign(result, var_ast, &expr_node, var_ast->attr); in zend_compile_assign()
3089 static inline void zend_emit_assign_ref_znode(zend_ast *var_ast, znode *value_node) /* {{{ */ in zend_emit_assign_ref_znode() argument
3091 zend_ast *assign_ast = zend_ast_create(ZEND_AST_ASSIGN_REF, var_ast, in zend_emit_assign_ref_znode()
3099 zend_ast *var_ast = ast->child[0]; in zend_compile_compound_assign() local
3107 zend_ensure_writable_variable(var_ast); in zend_compile_compound_assign()
3109 switch (var_ast->kind) { in zend_compile_compound_assign()
3113 zend_delayed_compile_var(&var_node, var_ast, BP_VAR_RW); in zend_compile_compound_assign()
3120 zend_delayed_compile_dim(result, var_ast, BP_VAR_RW); in zend_compile_compound_assign()
3131 zend_delayed_compile_prop(result, var_ast, BP_VAR_RW); in zend_compile_compound_assign()
3966 zend_ast *var_ast = ast->child[0]; in zend_compile_global_var() local
3967 zend_ast *name_ast = var_ast->child[0]; in zend_compile_global_var()
3976 if (is_this_fetch(var_ast)) { in zend_compile_global_var()
3978 } else if (zend_try_compile_cv(&result, var_ast) == SUCCESS) { in zend_compile_global_var()
4000 static void zend_compile_static_var_common(zend_ast *var_ast, zval *value, zend_bool by_ref) /* {{{… in zend_compile_static_var_common() argument
4005 zend_compile_expr(&var_node, var_ast); in zend_compile_static_var_common()
4036 zend_ast *var_ast = ast->child[0]; in zend_compile_static_var() local
4046 zend_compile_static_var_common(var_ast, &value_zv, 1); in zend_compile_static_var()
4052 zend_ast *var_ast = ast->child[0]; in zend_compile_unset() local
4056 zend_ensure_writable_variable(var_ast); in zend_compile_unset()
4058 switch (var_ast->kind) { in zend_compile_unset()
4060 if (is_this_fetch(var_ast)) { in zend_compile_unset()
4062 } else if (zend_try_compile_cv(&var_node, var_ast) == SUCCESS) { in zend_compile_unset()
4066 opline = zend_compile_simple_var_no_cv(NULL, var_ast, BP_VAR_UNSET, 0); in zend_compile_unset()
4071 opline = zend_compile_dim_common(NULL, var_ast, BP_VAR_UNSET); in zend_compile_unset()
4075 opline = zend_compile_prop_common(NULL, var_ast, BP_VAR_UNSET); in zend_compile_unset()
4079 opline = zend_compile_static_prop_common(NULL, var_ast, BP_VAR_UNSET, 0); in zend_compile_unset()
4772 zend_ast *var_ast = catch_ast->child[1]; in zend_compile_try() local
4774 zval *var_name = zend_ast_get_zval(var_ast); in zend_compile_try()
5131 zend_ast *var_ast = param_ast->child[1]; in zend_compile_params() local
5133 zend_string *name = zend_ast_get_str(var_ast); in zend_compile_params()
5329 zend_ast *var_ast = list->child[i]; in zend_compile_closure_uses() local
5330 zend_string *var_name = zend_ast_get_str(var_ast); in zend_compile_closure_uses()
5331 zend_bool by_ref = var_ast->attr; in zend_compile_closure_uses()
5351 zend_compile_static_var_common(var_ast, &zv, by_ref); in zend_compile_closure_uses()
6876 zend_ast *var_ast = ast->child[0]; in zend_compile_post_incdec() local
6879 zend_ensure_writable_variable(var_ast); in zend_compile_post_incdec()
6881 if (var_ast->kind == ZEND_AST_PROP) { in zend_compile_post_incdec()
6882 zend_op *opline = zend_compile_prop_common(NULL, var_ast, BP_VAR_RW); in zend_compile_post_incdec()
6887 zend_compile_var(&var_node, var_ast, BP_VAR_RW); in zend_compile_post_incdec()
6896 zend_ast *var_ast = ast->child[0]; in zend_compile_pre_incdec() local
6899 zend_ensure_writable_variable(var_ast); in zend_compile_pre_incdec()
6901 if (var_ast->kind == ZEND_AST_PROP) { in zend_compile_pre_incdec()
6902 zend_op *opline = zend_compile_prop_common(result, var_ast, BP_VAR_RW); in zend_compile_pre_incdec()
6906 zend_compile_var(&var_node, var_ast, BP_VAR_RW); in zend_compile_pre_incdec()
7142 zend_ast *var_ast = ast->child[0]; in zend_compile_isset_or_empty() local
7149 if (!zend_is_variable(var_ast) || zend_is_call(var_ast)) { in zend_compile_isset_or_empty()
7152 zend_ast *not_ast = zend_ast_create_ex(ZEND_AST_UNARY_OP, ZEND_BOOL_NOT, var_ast); in zend_compile_isset_or_empty()
7162 switch (var_ast->kind) { in zend_compile_isset_or_empty()
7164 if (is_this_fetch(var_ast)) { in zend_compile_isset_or_empty()
7166 } else if (zend_try_compile_cv(&var_node, var_ast) == SUCCESS) { in zend_compile_isset_or_empty()
7170 opline = zend_compile_simple_var_no_cv(result, var_ast, BP_VAR_IS, 0); in zend_compile_isset_or_empty()
7175 opline = zend_compile_dim_common(result, var_ast, BP_VAR_IS); in zend_compile_isset_or_empty()
7179 opline = zend_compile_prop_common(result, var_ast, BP_VAR_IS); in zend_compile_isset_or_empty()
7183 opline = zend_compile_static_prop_common(result, var_ast, BP_VAR_IS, 0); in zend_compile_isset_or_empty()