Lines Matching refs:child

130 	ast->child[0] = child0;  in zend_ast_create_decl()
131 ast->child[1] = child1; in zend_ast_create_decl()
132 ast->child[2] = child2; in zend_ast_create_decl()
133 ast->child[3] = child3; in zend_ast_create_decl()
134 ast->child[4] = child4; in zend_ast_create_decl()
152 ZEND_API zend_ast * ZEND_FASTCALL zend_ast_create_1(zend_ast_kind kind, zend_ast *child) { in zend_ast_create_1() argument
160 ast->child[0] = child; in zend_ast_create_1()
161 if (child) { in zend_ast_create_1()
162 lineno = zend_ast_get_lineno(child); in zend_ast_create_1()
179 ast->child[0] = child1; in zend_ast_create_2()
180 ast->child[1] = child2; in zend_ast_create_2()
201 ast->child[0] = child1; in zend_ast_create_3()
202 ast->child[1] = child2; in zend_ast_create_3()
203 ast->child[2] = child3; in zend_ast_create_3()
226 ast->child[0] = child1; in zend_ast_create_4()
227 ast->child[1] = child2; in zend_ast_create_4()
228 ast->child[2] = child3; in zend_ast_create_4()
229 ast->child[3] = child4; in zend_ast_create_4()
254 ast->child[0] = child1; in zend_ast_create_5()
255 ast->child[1] = child2; in zend_ast_create_5()
256 ast->child[2] = child3; in zend_ast_create_5()
257 ast->child[3] = child4; in zend_ast_create_5()
258 ast->child[4] = child5; in zend_ast_create_5()
291 ZEND_API zend_ast * ZEND_FASTCALL zend_ast_create_list_1(zend_ast_kind kind, zend_ast *child) { in zend_ast_create_list_1() argument
301 list->child[0] = child; in zend_ast_create_list_1()
302 if (child) { in zend_ast_create_list_1()
303 lineno = zend_ast_get_lineno(child); in zend_ast_create_list_1()
325 list->child[0] = child1; in zend_ast_create_list_2()
326 list->child[1] = child2; in zend_ast_create_list_2()
356 ast->child[i] = va_arg(va, zend_ast *); in zend_ast_create_from_va_list()
357 if (ast->child[i] != NULL) { in zend_ast_create_from_va_list()
358 uint32_t lineno = zend_ast_get_lineno(ast->child[i]); in zend_ast_create_from_va_list()
410 zend_ast *child = va_arg(va, zend_ast *); in zend_ast_create_list() local
411 ast = zend_ast_list_add(ast, child); in zend_ast_create_list()
412 if (child != NULL) { in zend_ast_create_list()
413 uint32_t lineno = zend_ast_get_lineno(child); in zend_ast_create_list()
436 list->child[list->children++] = op; in zend_ast_list_add()
514 if (UNEXPECTED(zend_ast_evaluate(&op1, ast->child[0], scope) != SUCCESS)) { in zend_ast_evaluate()
516 } else if (UNEXPECTED(zend_ast_evaluate(&op2, ast->child[1], scope) != SUCCESS)) { in zend_ast_evaluate()
528 if (UNEXPECTED(zend_ast_evaluate(&op1, ast->child[0], scope) != SUCCESS)) { in zend_ast_evaluate()
530 } else if (UNEXPECTED(zend_ast_evaluate(&op2, ast->child[1], scope) != SUCCESS)) { in zend_ast_evaluate()
543 if (UNEXPECTED(zend_ast_evaluate(&op1, ast->child[0], scope) != SUCCESS)) { in zend_ast_evaluate()
596 if (UNEXPECTED(zend_ast_evaluate(&op1, ast->child[0], scope) != SUCCESS)) { in zend_ast_evaluate()
601 if (UNEXPECTED(zend_ast_evaluate(&op2, ast->child[1], scope) != SUCCESS)) { in zend_ast_evaluate()
614 if (UNEXPECTED(zend_ast_evaluate(&op1, ast->child[0], scope) != SUCCESS)) { in zend_ast_evaluate()
621 if (UNEXPECTED(zend_ast_evaluate(&op2, ast->child[1], scope) != SUCCESS)) { in zend_ast_evaluate()
632 if (UNEXPECTED(zend_ast_evaluate(&op1, ast->child[0], scope) != SUCCESS)) { in zend_ast_evaluate()
637 if (!ast->child[1]) { in zend_ast_evaluate()
640 if (UNEXPECTED(zend_ast_evaluate(result, ast->child[1], scope) != SUCCESS)) { in zend_ast_evaluate()
648 if (UNEXPECTED(zend_ast_evaluate(result, ast->child[2], scope) != SUCCESS)) { in zend_ast_evaluate()
657 if (UNEXPECTED(zend_ast_evaluate(&op1, ast->child[0], scope) != SUCCESS)) { in zend_ast_evaluate()
664 if (UNEXPECTED(zend_ast_evaluate(result, ast->child[1], scope) != SUCCESS)) { in zend_ast_evaluate()
673 if (UNEXPECTED(zend_ast_evaluate(&op2, ast->child[0], scope) != SUCCESS)) { in zend_ast_evaluate()
682 if (UNEXPECTED(zend_ast_evaluate(&op2, ast->child[0], scope) != SUCCESS)) { in zend_ast_evaluate()
701 zend_ast *elem = list->child[i]; in zend_ast_evaluate()
703 if (UNEXPECTED(zend_ast_evaluate(&op1, elem->child[0], scope) != SUCCESS)) { in zend_ast_evaluate()
715 if (elem->child[1]) { in zend_ast_evaluate()
716 if (UNEXPECTED(zend_ast_evaluate(&op1, elem->child[1], scope) != SUCCESS)) { in zend_ast_evaluate()
723 if (UNEXPECTED(zend_ast_evaluate(&op2, elem->child[0], scope) != SUCCESS)) { in zend_ast_evaluate()
738 if (ast->child[1] == NULL) { in zend_ast_evaluate()
742 if (UNEXPECTED(zend_ast_evaluate(&op1, ast->child[0], scope) != SUCCESS)) { in zend_ast_evaluate()
744 } else if (UNEXPECTED(zend_ast_evaluate(&op2, ast->child[1], scope) != SUCCESS)) { in zend_ast_evaluate()
776 if (list->child[i]) { in zend_ast_tree_size()
777 size += zend_ast_tree_size(list->child[i]); in zend_ast_tree_size()
785 if (ast->child[i]) { in zend_ast_tree_size()
786 size += zend_ast_tree_size(ast->child[i]); in zend_ast_tree_size()
816 if (list->child[i]) { in zend_ast_tree_copy()
817 new->child[i] = (zend_ast*)buf; in zend_ast_tree_copy()
818 buf = zend_ast_tree_copy(list->child[i], buf); in zend_ast_tree_copy()
820 new->child[i] = NULL; in zend_ast_tree_copy()
830 if (ast->child[i]) { in zend_ast_tree_copy()
831 new->child[i] = (zend_ast*)buf; in zend_ast_tree_copy()
832 buf = zend_ast_tree_copy(ast->child[i], buf); in zend_ast_tree_copy()
834 new->child[i] = NULL; in zend_ast_tree_copy()
866 zend_ast_destroy(ast->child[i]); in zend_ast_destroy()
868 ast = ast->child[0]; in zend_ast_destroy()
878 zend_ast_destroy(list->child[i]); in zend_ast_destroy()
880 ast = list->child[0]; in zend_ast_destroy()
894 zend_ast_destroy(decl->child[0]); in zend_ast_destroy()
895 zend_ast_destroy(decl->child[1]); in zend_ast_destroy()
896 zend_ast_destroy(decl->child[2]); in zend_ast_destroy()
897 zend_ast_destroy(decl->child[3]); in zend_ast_destroy()
898 ast = decl->child[4]; in zend_ast_destroy()
914 fn(&list->child[i]); in zend_ast_apply()
919 fn(&ast->child[i]); in zend_ast_apply()
1131 zend_ast_export_ex(str, list->child[i], priority, indent); in zend_ast_export_list()
1142 ast = list->child[i]; in zend_ast_export_encaps_list()
1149 ast->child[0]->kind == ZEND_AST_ZVAL && in zend_ast_export_encaps_list()
1151 list->child[i + 1]->kind != ZEND_AST_ZVAL || in zend_ast_export_encaps_list()
1154 zend_ast_get_zval(list->child[i + 1]))))) { in zend_ast_export_encaps_list()
1173 zend_ast_export_name(str, list->child[i], 0, indent); in zend_ast_export_name_list_ex()
1189 if (list->child[i]->attr & ZEND_BIND_REF) { in zend_ast_export_var_list()
1193 zend_ast_export_name(str, list->child[i], 20, indent); in zend_ast_export_var_list()
1210 ast = list->child[i]; in zend_ast_export_stmt()
1248 ast = list->child[i]; in zend_ast_export_if_stmt()
1250 if (ast->child[0]) { in zend_ast_export_if_stmt()
1257 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_if_stmt()
1259 zend_ast_export_stmt(str, ast->child[1], indent + 1); in zend_ast_export_if_stmt()
1263 if (ast->child[1] && ast->child[1]->kind == ZEND_AST_IF) { in zend_ast_export_if_stmt()
1264 list = (zend_ast_list*)ast->child[1]; in zend_ast_export_if_stmt()
1268 zend_ast_export_stmt(str, ast->child[1], indent + 1); in zend_ast_export_if_stmt()
1337 if (decl->child[0]) { in zend_ast_export_class_no_header()
1339 zend_ast_export_ns_name(str, decl->child[0], 0, indent); in zend_ast_export_class_no_header()
1341 if (decl->child[1]) { in zend_ast_export_class_no_header()
1343 zend_ast_export_ex(str, decl->child[1], 0, indent); in zend_ast_export_class_no_header()
1346 zend_ast_export_stmt(str, decl->child[2], indent + 1); in zend_ast_export_class_no_header()
1356 zend_ast *attr = list->child[i]; in zend_ast_export_attribute_group()
1361 zend_ast_export_ns_name(str, attr->child[0], 0, indent); in zend_ast_export_attribute_group()
1363 if (attr->child[1]) { in zend_ast_export_attribute_group()
1364 zend_ast_list *args = zend_ast_get_list(attr->child[1]); in zend_ast_export_attribute_group()
1371 zend_ast_export_ex(str, args->child[j], 0, indent); in zend_ast_export_attribute_group()
1384 zend_ast_export_attribute_group(str, list->child[i], indent); in zend_ast_export_attributes()
1413 zend_ast_export_type(str, list->child[i], indent); in zend_ast_export_type()
1499 if (decl->child[4]) { in zend_ast_export_ex()
1501 zend_ast_export_attributes(str, decl->child[4], indent, newlines); in zend_ast_export_ex()
1527 zend_ast_export_ex(str, decl->child[0], 0, indent); in zend_ast_export_ex()
1529 zend_ast_export_ex(str, decl->child[1], 0, indent); in zend_ast_export_ex()
1530 if (decl->child[3]) { in zend_ast_export_ex()
1532 zend_ast_export_type(str, decl->child[3], indent); in zend_ast_export_ex()
1534 if (decl->child[2]) { in zend_ast_export_ex()
1536 ZEND_ASSERT(decl->child[2]->kind == ZEND_AST_RETURN); in zend_ast_export_ex()
1538 zend_ast_export_ex(str, decl->child[2]->child[0], 0, indent); in zend_ast_export_ex()
1543 zend_ast_export_stmt(str, decl->child[2], indent + 1); in zend_ast_export_ex()
1555 if (decl->child[3]) { in zend_ast_export_ex()
1556 zend_ast_export_attributes(str, decl->child[3], indent, 1); in zend_ast_export_ex()
1611 zend_ast *type_ast = ast->child[0]; in zend_ast_export_ex()
1612 zend_ast *prop_ast = ast->child[1]; in zend_ast_export_ex()
1614 if (ast->child[2]) { in zend_ast_export_ex()
1615 zend_ast_export_attributes(str, ast->child[2], indent, 1); in zend_ast_export_ex()
1637 if (ast->child[1]) { in zend_ast_export_ex()
1638 zend_ast_export_attributes(str, ast->child[1], indent, 1); in zend_ast_export_ex()
1644 ast = ast->child[0]; in zend_ast_export_ex()
1686 zend_ast_export_var(str, ast->child[0], 0, indent); in zend_ast_export_ex()
1689 zend_ast_export_ns_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
1693 ast = ast->child[0]; in zend_ast_export_ex()
1717 if (ast->child[0]->kind == ZEND_AST_ENCAPS_LIST) { in zend_ast_export_ex()
1718 zend_ast_export_encaps_list(str, '`', (zend_ast_list*)ast->child[0], indent); in zend_ast_export_ex()
1721 ZEND_ASSERT(ast->child[0]->kind == ZEND_AST_ZVAL); in zend_ast_export_ex()
1722 zv = zend_ast_get_zval(ast->child[0]); in zend_ast_export_ex()
1731 if (ast->child[0]) { in zend_ast_export_ex()
1772 zend_ast_export_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
1777 ast = ast->child[0]; in zend_ast_export_ex()
1787 zend_ast_export_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
1796 zend_ast_export_ex(str, ast->child[0], 260, indent); in zend_ast_export_ex()
1798 if (ast->child[1]) { in zend_ast_export_ex()
1799 zend_ast_export_ex(str, ast->child[1], 0, indent); in zend_ast_export_ex()
1805 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
1807 zend_ast_export_var(str, ast->child[1], 0, indent); in zend_ast_export_ex()
1810 zend_ast_export_ns_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
1812 zend_ast_export_var(str, ast->child[1], 0, indent); in zend_ast_export_ex()
1815 zend_ast_export_ns_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
1817 zend_ast_export_ex(str, ast->child[1], 0, indent); in zend_ast_export_ex()
1821 zend_ast_export_ns_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
1823 zend_ast_export_name(str, ast->child[1], 0, indent); in zend_ast_export_ex()
1826 zend_ast_export_ns_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
1879 if (ast->child[1]) { in zend_ast_export_ex()
1880 zend_ast_export_ex(str, ast->child[1], 80, indent); in zend_ast_export_ex()
1885 zend_ast_export_ex(str, ast->child[0], 80, indent); in zend_ast_export_ex()
1889 if (ast->child[0]->kind == ZEND_AST_CLASS) { in zend_ast_export_ex()
1890 zend_ast_decl *decl = (zend_ast_decl *) ast->child[0]; in zend_ast_export_ex()
1891 if (decl->child[3]) { in zend_ast_export_ex()
1892 zend_ast_export_attributes(str, decl->child[3], indent, 0); in zend_ast_export_ex()
1895 if (zend_ast_get_list(ast->child[1])->children) { in zend_ast_export_ex()
1897 zend_ast_export_ex(str, ast->child[1], 0, indent); in zend_ast_export_ex()
1902 zend_ast_export_ns_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
1904 zend_ast_export_ex(str, ast->child[1], 0, indent); in zend_ast_export_ex()
1909 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
1911 zend_ast_export_ns_name(str, ast->child[1], 0, indent); in zend_ast_export_ex()
1916 if (ast->child[0]) { in zend_ast_export_ex()
1917 if (ast->child[1]) { in zend_ast_export_ex()
1918 zend_ast_export_ex(str, ast->child[1], 70, indent); in zend_ast_export_ex()
1921 zend_ast_export_ex(str, ast->child[0], 70, indent); in zend_ast_export_ex()
1930 zend_ast_export_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
1934 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
1936 zend_ast_export_stmt(str, ast->child[1], indent + 1); in zend_ast_export_ex()
1942 zend_ast_export_stmt(str, ast->child[0], indent + 1); in zend_ast_export_ex()
1945 zend_ast_export_ex(str, ast->child[1], 0, indent); in zend_ast_export_ex()
1950 if (ast->child[0]) { in zend_ast_export_ex()
1952 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
1954 zend_ast_export_stmt(str, ast->child[1], indent + 1); in zend_ast_export_ex()
1957 zend_ast_export_stmt(str, ast->child[1], indent + 1); in zend_ast_export_ex()
1964 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
1966 zend_ast_export_ex(str, ast->child[1], 0, indent + 1); in zend_ast_export_ex()
1972 if (ast->child[0]) { in zend_ast_export_ex()
1974 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
1979 zend_ast_export_stmt(str, ast->child[1], indent + 1); in zend_ast_export_ex()
1983 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
1985 zend_ast_export_ex(str, ast->child[1], 0, indent + 1); in zend_ast_export_ex()
1991 if (ast->child[0]) { in zend_ast_export_ex()
1992 zend_ast_export_list(str, (zend_ast_list*)ast->child[0], 1, 0, indent); in zend_ast_export_ex()
1997 zend_ast_export_ex(str, ast->child[1], 0, 0); in zend_ast_export_ex()
2002 ZEND_ASSERT(ast->child[0]->kind == ZEND_AST_CONST_DECL); in zend_ast_export_ex()
2003 zend_ast_export_list(str, (zend_ast_list*)ast->child[0], 1, 0, indent); in zend_ast_export_ex()
2005 if (ast->child[1]) { in zend_ast_export_ex()
2007 zend_ast_export_stmt(str, ast->child[1], indent + 1); in zend_ast_export_ex()
2018 zend_ast_export_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2022 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2023 if (ast->child[1]) { in zend_ast_export_ex()
2025 zend_ast_export_ex(str, ast->child[1], 0, indent + 1); in zend_ast_export_ex()
2033 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2035 zend_ast_export_ex(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2038 if (ast->child[0]) { in zend_ast_export_ex()
2039 zend_ast_export_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2042 zend_ast_export_name(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2046 if (ast->child[0]) { in zend_ast_export_ex()
2048 zend_ast_export_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2050 if (ast->child[1]) { in zend_ast_export_ex()
2052 zend_ast_export_stmt(str, ast->child[1], indent + 1); in zend_ast_export_ex()
2061 zend_ast_export_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2068 } else if (ast->child[1]) { in zend_ast_export_ex()
2071 if (ast->child[1]) { in zend_ast_export_ex()
2073 zend_ast_export_name(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2077 smart_str_append(str, zend_ast_get_str(ast->child[0])); in zend_ast_export_ex()
2079 ast = ast->child[1]; in zend_ast_export_ex()
2085 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2087 zend_ast_export_var(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2089 zend_ast_export_ex(str, ast->child[2], 0, indent); in zend_ast_export_ex()
2093 zend_ast_export_ns_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2095 zend_ast_export_var(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2097 zend_ast_export_ex(str, ast->child[2], 0, indent); in zend_ast_export_ex()
2102 zend_ast_export_ex(str, ast->child[0], 100, indent); in zend_ast_export_ex()
2103 if (ast->child[1]) { in zend_ast_export_ex()
2105 zend_ast_export_ex(str, ast->child[1], 101, indent); in zend_ast_export_ex()
2110 zend_ast_export_ex(str, ast->child[2], 101, indent); in zend_ast_export_ex()
2116 zend_ast_export_stmt(str, ast->child[0], indent + 1); in zend_ast_export_ex()
2118 zend_ast_export_ex(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2119 if (ast->child[2]) { in zend_ast_export_ex()
2121 zend_ast_export_stmt(str, ast->child[2], indent + 1); in zend_ast_export_ex()
2128 zend_ast_export_catch_name_list(str, zend_ast_get_list(ast->child[0]), indent); in zend_ast_export_ex()
2129 if (ast->child[1]) { in zend_ast_export_ex()
2131 zend_ast_export_var(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2134 zend_ast_export_stmt(str, ast->child[2], indent + 1); in zend_ast_export_ex()
2138 if (ast->child[3]) { in zend_ast_export_ex()
2139 zend_ast_export_attributes(str, ast->child[3], indent, 0); in zend_ast_export_ex()
2141 if (ast->child[0]) { in zend_ast_export_ex()
2142 zend_ast_export_type(str, ast->child[0], indent); in zend_ast_export_ex()
2152 zend_ast_export_name(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2158 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2160 if (ast->child[1]) { in zend_ast_export_ex()
2162 zend_ast_export_ex(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2165 if (ast->child[2]) { in zend_ast_export_ex()
2167 zend_ast_export_ex(str, ast->child[2], 0, indent); in zend_ast_export_ex()
2170 zend_ast_export_stmt(str, ast->child[3], indent + 1); in zend_ast_export_ex()
2176 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2178 if (ast->child[2]) { in zend_ast_export_ex()
2179 zend_ast_export_ex(str, ast->child[2], 0, indent); in zend_ast_export_ex()
2182 zend_ast_export_ex(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2184 zend_ast_export_stmt(str, ast->child[3], indent + 1); in zend_ast_export_ex()
2194 zend_ast_export_ex(str, ast->child[0], pl, indent); in zend_ast_export_ex()
2196 zend_ast_export_ex(str, ast->child[1], pr, indent); in zend_ast_export_ex()
2203 zend_ast_export_ex(str, ast->child[0], pl, indent); in zend_ast_export_ex()
2209 zend_ast_export_ex(str, ast->child[0], pl, indent); in zend_ast_export_ex()
2217 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2223 if (ast->child[0]) { in zend_ast_export_ex()
2225 ast = ast->child[0]; in zend_ast_export_ex()
2235 if (ast->child[p]) { in zend_ast_export_ex()
2237 ast = ast->child[p]; in zend_ast_export_ex()
2263 ((zend_ast_decl *) ast)->child[4] = attr; in zend_ast_with_attributes()
2266 ((zend_ast_decl *) ast)->child[3] = attr; in zend_ast_with_attributes()
2269 ast->child[2] = attr; in zend_ast_with_attributes()
2272 ast->child[3] = attr; in zend_ast_with_attributes()
2275 ast->child[1] = attr; in zend_ast_with_attributes()