From 0bd2e6dbbf09e94c5c1d0575b2183acea257a518 Mon Sep 17 00:00:00 2001 From: Per Bothner Date: Wed, 25 Nov 1998 09:10:49 -0800 Subject: java-tree.h (end_params_node): Declare global. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit � * java-tree.h (end_params_node): Declare global. * decl.c (end_params_node): New global. (init_decl_processing, start_java_method): Use end_params_node for end of list of parameter types. Follows correct gcc conventions. * expr.c (pop_argument_types, pop_arguments): Likewise. * lang.c (put_decl_node): Likewise. * typeck.c (various places): Likewise. * class.y (various places): Likewise. * parse.y (various places): Likewise. * parse.y (java_complete_tree): Move CAN_COMPLETE_NORMALLY. (build_jump_to_finally): Add missing CAN_COMPLETE_NORMALLY. * class.c: Add #include flags.h, remove no-longer needed declaration. * class.c (layout_class_method): Remove commented-out code, re-format. Don't add vtable entry (or index) for private methods. * expr.c (expand_invoke): A private method is implicitly final. * class.c (make_class_data): If inlining or optimizing, skip private methods. * class.c (finish_class): New function. Calls existing methods, but alls emits deferred inline functions. * jcf-parse.c (parse_class_file): Call finish_class. * parse.y (java_complete_expand_methods): Likewise. * expr.c (build_java_binop): Explicit default, to silence -Wall. From-SVN: r23870 --- gcc/java/expr.c | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) (limited to 'gcc/java/expr.c') diff --git a/gcc/java/expr.c b/gcc/java/expr.c index b19b655..e97569d 100644 --- a/gcc/java/expr.c +++ b/gcc/java/expr.c @@ -1028,23 +1028,7 @@ build_java_binop (op, type, arg1, arg2) return call; } break; - -#if 0 /* not required */ - case PLUS_EXPR: - case MULT_EXPR: - case MINUS_EXPR: - case TRUNC_DIV_EXPR: - case RDIV_EXPR: -/* case REM_EXPR: */ - case BIT_AND_EXPR: - case BIT_IOR_EXPR: - case BIT_XOR_EXPR: - break; - default: - error ("unknown opcode"); - return error_mark_node; -#endif - + default: ; } return fold (build (op, type, arg1, arg2)); } @@ -1278,7 +1262,7 @@ void pop_argument_types (arg_types) tree arg_types; { - if (arg_types == NULL_TREE) + if (arg_types == end_params_node) return; if (TREE_CODE (arg_types) == TREE_LIST) { @@ -1293,7 +1277,7 @@ tree pop_arguments (arg_types) tree arg_types; { - if (arg_types == NULL_TREE) + if (arg_types == end_params_node) return NULL_TREE; if (TREE_CODE (arg_types) == TREE_LIST) { @@ -1542,7 +1526,8 @@ expand_invoke (opcode, method_ref_index, nargs) func = NULL_TREE; if (opcode == OPCODE_invokestatic || opcode == OPCODE_invokespecial || (opcode == OPCODE_invokevirtual - && (METHOD_FINAL (method) || CLASS_FINAL (TYPE_NAME (self_type))))) + && (METHOD_PRIVATE (method) + || METHOD_FINAL (method) || CLASS_FINAL (TYPE_NAME (self_type))))) func = build_known_method_ref (method, method_type, self_type, method_signature, arg_list); else -- cgit v1.1