aboutsummaryrefslogtreecommitdiff
path: root/gcc/treelang/parse.y
AgeCommit message (Collapse)AuthorFilesLines
2004-08-08Make-lang.in (TREE_BE_LIBS): Remove.James A. Morrison1-19/+27
treelang: 2004-08-01 James A. Morrison <phython@gcc.gnu.org> * Make-lang.in (TREE_BE_LIBS): Remove. (tree1): Depend on BACKEND and LIBDEPS. Use BACKEND and LIBS instead of TREE_BE_LIBS. * parse.y: Add variable_defs_opt before statements_opt. Use tree_code_get_type instead of get_type_for_numeric_type. Reformat long lines. (parameters_opt): New rule. (function_prototype): Use parameters_opt. (return): Remove calls to print_token in error cases. Use VOID_TYPE. (check_type_match): Use VOID_TYPE. * lex.l (update_lineno_charno): Ensure INPUT_LINE starts at 1. * tree1.c: Include version.h and cgraph.h (treelang_parse_file): Call cgraph_finalize_compilation_unit and cgraph_optimize. * treelang.h (item): Remove extraneous GTY. * treetree.h (get_type_for_numeric_type): Remove. * treetree.c: Include tree-dump.h, tree-iterator.h, tree-gimple.h, function.h, and cgraph.h. Don't include rtl.h (keep_level_p): Remove. (tree_push_atomic_type_decl): Remove. (get_type_for_numeric_type): Remove. (tree_code_get_numeric_type): Remove. (global_bindings_p): Make static. (getdecls): Likewise. (insert_block): Likewise. (tree_code_if_start): Create a COND_EXPR and add it to the tree instead of creating rtl. (tree_code_if_else): Create a BIND_EXPR if any variables were created in the if statement. (tree_code_end_if): Likewise. (tree_code_create_function_prototype): Use tree_code_get_type. Don't use SET_DECL_ASSEMBLER_NAME. (tree_code_create_function_initial): Set DECL_ARTIFICIAL and DECL_IGNORING_P on RESULT_DECL. Use tree_code_get_type. Don't call layout_decl on RESULT_DECL. Don't call rtl expand functions. (tree_code_create_function_wrapup): Don't call rtl expand functions. Create a BIND_EXPR for each function. Dump original and gimplified copies of the function tree. Gimplify function. (tree_code_create_variable): Use tree_code_get_type. Don't call layout_decl or expand_decl. Fold CONVERT_EXPRs. (tree_code_generate_return): Fold CONVERT_EXPRs and MODIFY_EXPRs. Add RETURN_EXPR to the current statement list. Don't call rtl expand functions. (tree_code_output_expression_statement): Append CODE to current statement list. (tree_code_get_expression): Fold expressions. Build a pointer to a FUNCTION_TYPE intead of the called functions return type. (struct binding_level): Add statement list STMTS. (getstmtlist): New Function. (pushlevel): Make static. Allocate an empty statement list. (poplevel): Make static. Don't clear BLOCK_NODE's BLOCK_VARS. Don't use DECL_ASSEMBLER_NAME. (tree_push_type_decl): Set TYPE_NAME of TYPE_NODE to ID. (treelang_init_decl_processing): Define basic types after unused types. Don't call tree_push_atomic_type_decl. (builtin_function): Don't call make_decl_rtl. (treelang_expand_function). New Function. testsuite/treelang: * compile/vars_def.tree: New File. * compile/badreturn.tree: New File. From-SVN: r85684
2004-01-08dwarf2.h, [...]: Add multiple-include guard.Zack Weinberg1-1/+1
* dwarf2.h, unwind-dw2-fde.h, unwind-pe.h, unwind.h: Add multiple-include guard. cp: * parser.c (cp_parser_save_member_function_body): Mark the definition static. treelang: * parse.y (yyerror): Mark the definition static. From-SVN: r75536
2003-07-28treetree.c: Convert remaining K&R prototypes to ISO C90.Andreas Jaeger1-2/+3
treelang: * treetree.c: Convert remaining K&R prototypes to ISO C90. * tree1.c: Likewise. * parse.y: Likewise. * tree-convert.c: Likewise. java: * jvspec.c: Convert to ISO C90 prototypes. From-SVN: r69881
2003-05-09Treelang fixes including built failures on PPC and others.Tim Josling1-2/+4
From-SVN: r66647
2003-05-06Make-lang.in (treelang/tree1.o): Depends on input.hNathan Sidwell1-30/+39
treelang: * Make-lang.in (treelang/tree1.o): Depends on input.h (treelang/treetree.o, treelang/parse.o, treelang/lex.o): Likewise. * treelang.h: #include input.h. (in_fname): Remove. (struct token_part): Remove lineno, add location. * lex.l (next_tree_lineno): Remove. (update_lineno_charno): Adjust. (dump_lex_value): Adjust. * parse.y (variable_def, function_prototype, function, statement, if_statement, return, function_invocation, variable_ref): Adjust. (print_token, yyerror, ensure_not_void): Adjust. tree1.c (in_fname): Remove. (treelang_init): Setup input_location. (lookup_tree_name): Adjust. (insert_tree_name): Adjust. * treetree.c (tree_code_if_start): Replace filename and lineno parms with loc. Adjust. (tree_code_if_else, tree_code_if_end, tree_code_create_function_prototype, tree_code_create_function_initial, tree_code_create_function_wrapup, tree_code_create_variable, tree_code_output_expression_statement): Likewise. * treetree.h (tree_code_if_start): Replace filename and lineno parms with loc. (tree_code_if_else, tree_code_if_end, tree_code_create_function_prototype, tree_code_create_function_initial, tree_code_create_function_wrapup, tree_code_create_variable, tree_code_output_expression_statement): Likewise. From-SVN: r66519
2003-04-30parse.y (make_plus_expression): New function.Steven Bosscher1-103/+63
* parse.y (make_plus_expression): New function. (expression:): Use make_plus_expression for PLUS, MINUS, ASSIGN and EQUALS. * tree1.c (treelang_decode_option): Don't fall through to options that start with a different character when an option was not recognized. From-SVN: r66303
2003-03-01Fix for bison 1.75 enum name clash.Tim Josling1-6/+6
From-SVN: r63606
2003-03-01Treelang fixes.Tim Josling1-2/+20
From-SVN: r63604
2002-12-16Merge basic-improvements-branch to trunkZack Weinberg1-12/+2
From-SVN: r60174
2002-08-13Fixes for treelang, mainly provide fake definition of rtx for parse.y includes.Tim Josling1-2/+5
From-SVN: r56248
2002-06-10Fixes to make treelang worg with PCH gengtype.c changes.Tim Josling1-178/+179
From-SVN: r54425
2002-05-05Added new sample language treelang.Tim Josling1-0/+1001
From-SVN: r53169