Lines Matching refs:var_ast
3045 static inline void zend_emit_assign_znode(zend_ast *var_ast, znode *value_node) /* {{{ */ in zend_emit_assign_znode() argument
3048 zend_ast *assign_ast = zend_ast_create(ZEND_AST_ASSIGN, var_ast, in zend_emit_assign_znode()
3057 zend_ast *var_ast = ast->child[0]; in zend_delayed_compile_dim() local
3063 if (is_globals_fetch(var_ast)) { in zend_delayed_compile_dim()
3078 zend_short_circuiting_mark_inner(var_ast); in zend_delayed_compile_dim()
3079 opline = zend_delayed_compile_var(&var_node, var_ast, type, 0); in zend_delayed_compile_dim()
3092 zend_separate_if_call_and_write(&var_node, var_ast, type); in zend_delayed_compile_dim()
3253 static void zend_verify_list_assign_target(zend_ast *var_ast, zend_ast_attr array_style) /* {{{ */ { in zend_verify_list_assign_target() argument
3254 if (var_ast->kind == ZEND_AST_ARRAY) { in zend_verify_list_assign_target()
3255 if (var_ast->attr == ZEND_ARRAY_SYNTAX_LONG) { in zend_verify_list_assign_target()
3258 if (array_style != var_ast->attr) { in zend_verify_list_assign_target()
3261 } else if (!zend_can_write_to_variable(var_ast)) { in zend_verify_list_assign_target()
3267 static inline void zend_emit_assign_ref_znode(zend_ast *var_ast, znode *value_node);
3279 zend_ast *var_ast = elem_ast->child[0]; in zend_propagate_list_refs() local
3280 if (var_ast->kind == ZEND_AST_ARRAY) { in zend_propagate_list_refs()
3281 elem_ast->attr = zend_propagate_list_refs(var_ast); in zend_propagate_list_refs()
3316 zend_ast *var_ast, *key_ast; in zend_compile_list_assign() local
3334 var_ast = elem_ast->child[0]; in zend_compile_list_assign()
3359 zend_verify_list_assign_target(var_ast, array_style); in zend_compile_list_assign()
3371 if (var_ast->kind == ZEND_AST_ARRAY) { in zend_compile_list_assign()
3372 zend_compile_list_assign(NULL, var_ast, &fetch_result, var_ast->attr); in zend_compile_list_assign()
3374 zend_emit_assign_ref_znode(var_ast, &fetch_result); in zend_compile_list_assign()
3376 zend_emit_assign_znode(var_ast, &fetch_result); in zend_compile_list_assign()
3415 static bool zend_is_assign_to_self(zend_ast *var_ast, zend_ast *expr_ast) /* {{{ */ in zend_is_assign_to_self() argument
3421 while (zend_is_variable(var_ast) && var_ast->kind != ZEND_AST_VAR) { in zend_is_assign_to_self()
3422 var_ast = var_ast->child[0]; in zend_is_assign_to_self()
3425 if (var_ast->kind != ZEND_AST_VAR || var_ast->child[0]->kind != ZEND_AST_ZVAL) { in zend_is_assign_to_self()
3430 zend_string *name1 = zval_get_string(zend_ast_get_zval(var_ast->child[0])); in zend_is_assign_to_self()
3441 znode *expr_node, zend_ast *expr_ast, zend_ast *var_ast) { in zend_compile_expr_with_potential_assign_to_self() argument
3442 if (zend_is_assign_to_self(var_ast, expr_ast) && !is_this_fetch(expr_ast)) { in zend_compile_expr_with_potential_assign_to_self()
3458 zend_ast *var_ast = ast->child[0]; in zend_compile_assign() local
3464 if (is_this_fetch(var_ast)) { in zend_compile_assign()
3468 zend_ensure_writable_variable(var_ast); in zend_compile_assign()
3471 zend_ast_kind kind = is_global_var_fetch(var_ast) ? ZEND_AST_VAR : var_ast->kind; in zend_compile_assign()
3475 zend_delayed_compile_var(&var_node, var_ast, BP_VAR_W, 0); in zend_compile_assign()
3478 CG(zend_lineno) = zend_ast_get_lineno(var_ast); in zend_compile_assign()
3483 zend_delayed_compile_var(result, var_ast, BP_VAR_W, 0); in zend_compile_assign()
3495 zend_delayed_compile_dim(result, var_ast, BP_VAR_W, /* by_ref */ false); in zend_compile_assign()
3496 zend_compile_expr_with_potential_assign_to_self(&expr_node, expr_ast, var_ast); in zend_compile_assign()
3508 zend_delayed_compile_prop(result, var_ast, BP_VAR_W); in zend_compile_assign()
3519 if (zend_propagate_list_refs(var_ast)) { in zend_compile_assign()
3546 zend_compile_list_assign(result, var_ast, &expr_node, var_ast->attr); in zend_compile_assign()
3615 static inline void zend_emit_assign_ref_znode(zend_ast *var_ast, znode *value_node) /* {{{ */ in zend_emit_assign_ref_znode() argument
3618 zend_ast *assign_ast = zend_ast_create(ZEND_AST_ASSIGN_REF, var_ast, in zend_emit_assign_ref_znode()
3627 zend_ast *var_ast = ast->child[0]; in zend_compile_compound_assign() local
3635 zend_ensure_writable_variable(var_ast); in zend_compile_compound_assign()
3638 zend_ast_kind kind = is_global_var_fetch(var_ast) ? ZEND_AST_VAR : var_ast->kind; in zend_compile_compound_assign()
3642 zend_delayed_compile_var(&var_node, var_ast, BP_VAR_RW, 0); in zend_compile_compound_assign()
3650 zend_delayed_compile_var(result, var_ast, BP_VAR_RW, 0); in zend_compile_compound_assign()
3665 zend_delayed_compile_dim(result, var_ast, BP_VAR_RW, /* by_ref */ false); in zend_compile_compound_assign()
3666 zend_compile_expr_with_potential_assign_to_self(&expr_node, expr_ast, var_ast); in zend_compile_compound_assign()
3679 zend_delayed_compile_prop(result, var_ast, BP_VAR_RW); in zend_compile_compound_assign()
5424 zend_ast *var_ast = ast->child[0]; in zend_compile_global_var() local
5425 zend_ast *name_ast = var_ast->child[0]; in zend_compile_global_var()
5435 if (is_this_fetch(var_ast)) { in zend_compile_global_var()
5437 } else if (zend_try_compile_cv(&result, var_ast) == SUCCESS) { in zend_compile_global_var()
5484 zend_ast *var_ast = ast->child[0]; in zend_compile_static_var() local
5485 zend_string *var_name = zend_ast_get_str(var_ast); in zend_compile_static_var()
5538 zend_ast *var_ast = ast->child[0]; in zend_compile_unset() local
5542 zend_ensure_writable_variable(var_ast); in zend_compile_unset()
5544 if (is_global_var_fetch(var_ast)) { in zend_compile_unset()
5545 if (!var_ast->child[1]) { in zend_compile_unset()
5549 zend_compile_expr(&var_node, var_ast->child[1]); in zend_compile_unset()
5559 switch (var_ast->kind) { in zend_compile_unset()
5561 if (is_this_fetch(var_ast)) { in zend_compile_unset()
5563 } else if (zend_try_compile_cv(&var_node, var_ast) == SUCCESS) { in zend_compile_unset()
5566 opline = zend_compile_simple_var_no_cv(NULL, var_ast, BP_VAR_UNSET, 0); in zend_compile_unset()
5571 opline = zend_compile_dim(NULL, var_ast, BP_VAR_UNSET, /* by_ref */ false); in zend_compile_unset()
5576 opline = zend_compile_prop(NULL, var_ast, BP_VAR_UNSET, 0); in zend_compile_unset()
5580 opline = zend_compile_static_prop(NULL, var_ast, BP_VAR_UNSET, 0, 0); in zend_compile_unset()
6657 zend_ast *var_ast = catch_ast->child[1]; in zend_compile_try() local
6659 zend_string *var_name = var_ast ? zval_make_interned_string(zend_ast_get_zval(var_ast)) : NULL; in zend_compile_try()
7588 zend_ast *var_ast = param_ast->child[1]; in zend_compile_params() local
7593 zend_string *name = zval_make_interned_string(zend_ast_get_zval(var_ast)); in zend_compile_params()
7996 zend_ast *var_ast = list->child[i]; in zend_compile_closure_uses() local
7997 zend_string *var_name = zend_ast_get_str(var_ast); in zend_compile_closure_uses()
8011 CG(zend_lineno) = zend_ast_get_lineno(var_ast); in zend_compile_closure_uses()
8013 if (var_ast->attr) { in zend_compile_closure_uses()
10127 zend_ast *var_ast = ast->child[0]; in zend_compile_post_incdec() local
10130 zend_ensure_writable_variable(var_ast); in zend_compile_post_incdec()
10132 if (var_ast->kind == ZEND_AST_PROP || var_ast->kind == ZEND_AST_NULLSAFE_PROP) { in zend_compile_post_incdec()
10133 zend_op *opline = zend_compile_prop(NULL, var_ast, BP_VAR_RW, 0); in zend_compile_post_incdec()
10136 } else if (var_ast->kind == ZEND_AST_STATIC_PROP) { in zend_compile_post_incdec()
10137 zend_op *opline = zend_compile_static_prop(NULL, var_ast, BP_VAR_RW, 0, 0); in zend_compile_post_incdec()
10142 zend_op *opline = zend_compile_var(&var_node, var_ast, BP_VAR_RW, 0); in zend_compile_post_incdec()
10154 zend_ast *var_ast = ast->child[0]; in zend_compile_pre_incdec() local
10157 zend_ensure_writable_variable(var_ast); in zend_compile_pre_incdec()
10159 if (var_ast->kind == ZEND_AST_PROP || var_ast->kind == ZEND_AST_NULLSAFE_PROP) { in zend_compile_pre_incdec()
10160 zend_op *opline = zend_compile_prop(result, var_ast, BP_VAR_RW, 0); in zend_compile_pre_incdec()
10164 } else if (var_ast->kind == ZEND_AST_STATIC_PROP) { in zend_compile_pre_incdec()
10165 zend_op *opline = zend_compile_static_prop(result, var_ast, BP_VAR_RW, 0, 0); in zend_compile_pre_incdec()
10171 zend_op *opline = zend_compile_var(&var_node, var_ast, BP_VAR_RW, 0); in zend_compile_pre_incdec()
10319 zend_ast *var_ast = ast->child[0]; in zend_compile_assign_coalesce() local
10332 zend_ensure_writable_variable(var_ast); in zend_compile_assign_coalesce()
10333 if (is_this_fetch(var_ast)) { in zend_compile_assign_coalesce()
10341 zend_compile_var(&var_node_is, var_ast, BP_VAR_IS, 0); in zend_compile_assign_coalesce()
10347 if (var_ast->kind == ZEND_AST_DIM) { in zend_compile_assign_coalesce()
10348 zend_compile_expr_with_potential_assign_to_self(&default_node, default_ast, var_ast); in zend_compile_assign_coalesce()
10354 zend_compile_var(&var_node_w, var_ast, BP_VAR_W, 0); in zend_compile_assign_coalesce()
10359 zend_ast_kind kind = is_global_var_fetch(var_ast) ? ZEND_AST_VAR : var_ast->kind; in zend_compile_assign_coalesce()
10538 zend_ast *var_ast = ast->child[0]; in zend_compile_isset_or_empty() local
10545 if (!zend_is_variable(var_ast)) { in zend_compile_isset_or_empty()
10548 zend_ast *not_ast = zend_ast_create_ex(ZEND_AST_UNARY_OP, ZEND_BOOL_NOT, var_ast); in zend_compile_isset_or_empty()
10558 if (is_globals_fetch(var_ast)) { in zend_compile_isset_or_empty()
10564 if (is_global_var_fetch(var_ast)) { in zend_compile_isset_or_empty()
10565 if (!var_ast->child[1]) { in zend_compile_isset_or_empty()
10569 zend_compile_expr(&var_node, var_ast->child[1]); in zend_compile_isset_or_empty()
10580 zend_short_circuiting_mark_inner(var_ast); in zend_compile_isset_or_empty()
10581 switch (var_ast->kind) { in zend_compile_isset_or_empty()
10583 if (is_this_fetch(var_ast)) { in zend_compile_isset_or_empty()
10586 } else if (zend_try_compile_cv(&var_node, var_ast) == SUCCESS) { in zend_compile_isset_or_empty()
10589 opline = zend_compile_simple_var_no_cv(result, var_ast, BP_VAR_IS, 0); in zend_compile_isset_or_empty()
10594 opline = zend_compile_dim(result, var_ast, BP_VAR_IS, /* by_ref */ false); in zend_compile_isset_or_empty()
10599 opline = zend_compile_prop(result, var_ast, BP_VAR_IS, 0); in zend_compile_isset_or_empty()
10603 opline = zend_compile_static_prop(result, var_ast, BP_VAR_IS, 0, 0); in zend_compile_isset_or_empty()