Commit fe0b9fb5 by Ranjit Mathew

Formatting fixes.

        * expr.c (class_has_finalize_method): Fix method name indentation.
        (expand_java_call): Remove K&R style parameter declaration.
        (expand_invoke): Fix statement indentation.
        (expand_java_field_op): Likewise.
        * parse-scan.y: Fix typo.
        (reset_report): Fix method name indentation.
        * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
        line. Fix typos.
        * verify.c (verify_jvm_instructions): Document parameters, insert
        page break.
        * lang.c (lang_init_source): Fix method name indentation.
        * class.c (common_enclosing_context_p): Likewise.
        (emit_symbol_table): Fix parameter list indentation.
        * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
        parameter declaration.
        * constants.c: Fix copyright notice indentation.
        * typeck.c (find_method_in_superclasses): Fix parameter list
        indentation.
        (find_method_in_interfaces): Likewise.
        * zextract.c (makelong): Fix method name indentation.

From-SVN: r83738
parent a6048f29
2004-06-27 Ranjit Mathew <rmathew@hotmail.com>
Formatting fixes.
* expr.c (class_has_finalize_method): Fix method name indentation.
(expand_java_call): Remove K&R style parameter declaration.
(expand_invoke): Fix statement indentation.
(expand_java_field_op): Likewise.
* parse-scan.y: Fix typo.
(reset_report): Fix method name indentation.
* parse.y (unresolved_type_p, build_expr_block): Remove extra blank
line. Fix typos.
* verify.c (verify_jvm_instructions): Document parameters, insert
page break.
* lang.c (lang_init_source): Fix method name indentation.
* class.c (common_enclosing_context_p): Likewise.
(emit_symbol_table): Fix parameter list indentation.
* decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
parameter declaration.
* constants.c: Fix copyright notice indentation.
* typeck.c (find_method_in_superclasses): Fix parameter list
indentation.
(find_method_in_interfaces): Likewise.
* zextract.c (makelong): Fix method name indentation.
2004-06-26 Bryce McKinlay <mckinlay@redhat.com> 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
PR java/15715. PR java/15715.
...@@ -14697,7 +14721,7 @@ ...@@ -14697,7 +14721,7 @@
java.lang.Object. java.lang.Object.
(register_fields): Field initialization is now a MODIFY_EXPR (register_fields): Field initialization is now a MODIFY_EXPR
node. Chain initialization code to the matching lists (according node. Chain initialization code to the matching lists (according
the the field declaration modifiers). to the field declaration modifiers).
(maybe_generate_clinit): New function. (maybe_generate_clinit): New function.
(method_header): Don't set method's DECL_NAME to a WFL when adding (method_header): Don't set method's DECL_NAME to a WFL when adding
methods to java.lang.Object. methods to java.lang.Object.
......
...@@ -349,7 +349,8 @@ unmangle_classname (const char *name, int name_length) ...@@ -349,7 +349,8 @@ unmangle_classname (const char *name, int name_length)
} }
/* Given a class, create the DECLs for all its associated indirect dispatch tables. */ /* Given a class, create the DECLs for all its associated indirect
dispatch tables. */
void void
gen_indirect_dispatch_tables (tree type) gen_indirect_dispatch_tables (tree type)
{ {
...@@ -588,7 +589,8 @@ enclosing_context_p (tree type1, tree type2) ...@@ -588,7 +589,8 @@ enclosing_context_p (tree type1, tree type2)
/* Return 1 iff there exists a common enclosing context between TYPE1 /* Return 1 iff there exists a common enclosing context between TYPE1
and TYPE2. */ and TYPE2. */
int common_enclosing_context_p (tree type1, tree type2) int
common_enclosing_context_p (tree type1, tree type2)
{ {
if (!PURE_INNER_CLASS_TYPE_P (type1) || !PURE_INNER_CLASS_TYPE_P (type2)) if (!PURE_INNER_CLASS_TYPE_P (type1) || !PURE_INNER_CLASS_TYPE_P (type2))
return 0; return 0;
...@@ -2358,8 +2360,8 @@ build_symbol_entry (tree decl) ...@@ -2358,8 +2360,8 @@ build_symbol_entry (tree decl)
/* Emit a symbol table: used by -findirect-dispatch. */ /* Emit a symbol table: used by -findirect-dispatch. */
tree tree
emit_symbol_table (tree name, tree the_table, tree decl_list, tree the_syms_decl, emit_symbol_table (tree name, tree the_table, tree decl_list,
tree the_array_element_type) tree the_syms_decl, tree the_array_element_type)
{ {
tree method_list, method, table, list, null_symbol; tree method_list, method, table, list, null_symbol;
tree table_size, the_array_type; tree table_size, the_array_type;
......
/* Handle the constant pool of the Java(TM) Virtual Machine. /* Handle the constant pool of the Java(TM) Virtual Machine.
Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003, 2004 Free Software Foundation, Inc. Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003, 2004
Free Software Foundation, Inc.
This file is part of GCC. This file is part of GCC.
......
...@@ -1877,8 +1877,7 @@ java_mark_class_local (tree class) ...@@ -1877,8 +1877,7 @@ java_mark_class_local (tree class)
/* Add a statement to a compound_expr. */ /* Add a statement to a compound_expr. */
tree tree
add_stmt_to_compound (existing, type, stmt) add_stmt_to_compound (tree existing, tree type, tree stmt)
tree existing, type, stmt;
{ {
if (!stmt) if (!stmt)
return existing; return existing;
...@@ -1897,8 +1896,7 @@ add_stmt_to_compound (existing, type, stmt) ...@@ -1897,8 +1896,7 @@ add_stmt_to_compound (existing, type, stmt)
constructed. */ constructed. */
tree tree
java_add_stmt (stmt) java_add_stmt (tree stmt)
tree stmt;
{ {
if (input_filename) if (input_filename)
annotate_with_locus (stmt, input_location); annotate_with_locus (stmt, input_location);
......
...@@ -112,7 +112,7 @@ int always_initialize_class_p = 1; ...@@ -112,7 +112,7 @@ int always_initialize_class_p = 1;
If a variable is on the quick stack, it means the value of variable If a variable is on the quick stack, it means the value of variable
when the quick stack was last flushed. Conceptually, flush_quick_stack when the quick stack was last flushed. Conceptually, flush_quick_stack
saves all the the quick_stack elements in parallel. However, that is saves all the quick_stack elements in parallel. However, that is
complicated, so it actually saves them (i.e. copies each stack value complicated, so it actually saves them (i.e. copies each stack value
to is home virtual register) from low indexes. This allows a quick_stack to is home virtual register) from low indexes. This allows a quick_stack
element at index i (counting from the bottom of stack the) to references element at index i (counting from the bottom of stack the) to references
...@@ -1141,7 +1141,8 @@ build_address_of (tree value) ...@@ -1141,7 +1141,8 @@ build_address_of (tree value)
return build1 (ADDR_EXPR, build_pointer_type (TREE_TYPE (value)), value); return build1 (ADDR_EXPR, build_pointer_type (TREE_TYPE (value)), value);
} }
bool class_has_finalize_method (tree type) bool
class_has_finalize_method (tree type)
{ {
tree super = CLASSTYPE_SUPER (type); tree super = CLASSTYPE_SUPER (type);
...@@ -1697,7 +1698,6 @@ expand_java_add_case (tree switch_expr, int match, int target_pc) ...@@ -1697,7 +1698,6 @@ expand_java_add_case (tree switch_expr, int match, int target_pc)
#if 0 #if 0
static void static void
expand_java_call (int target_pc, int return_address) expand_java_call (int target_pc, int return_address)
int target_pc, return_address;
{ {
tree target_label = lookup_label (target_pc); tree target_label = lookup_label (target_pc);
tree value = build_int_2 (return_address, return_address < 0 ? -1 : 0); tree value = build_int_2 (return_address, return_address < 0 ? -1 : 0);
...@@ -2041,10 +2041,13 @@ build_invokeinterface (tree dtable, tree method) ...@@ -2041,10 +2041,13 @@ build_invokeinterface (tree dtable, tree method)
static void static void
expand_invoke (int opcode, int method_ref_index, int nargs ATTRIBUTE_UNUSED) expand_invoke (int opcode, int method_ref_index, int nargs ATTRIBUTE_UNUSED)
{ {
tree method_signature = COMPONENT_REF_SIGNATURE(&current_jcf->cpool, method_ref_index); tree method_signature
= COMPONENT_REF_SIGNATURE(&current_jcf->cpool, method_ref_index);
tree method_name = COMPONENT_REF_NAME (&current_jcf->cpool, method_ref_index); tree method_name = COMPONENT_REF_NAME (&current_jcf->cpool, method_ref_index);
tree self_type = get_class_constant tree self_type
(current_jcf, COMPONENT_REF_CLASS_INDEX(&current_jcf->cpool, method_ref_index)); = get_class_constant (current_jcf,
COMPONENT_REF_CLASS_INDEX(&current_jcf->cpool,
method_ref_index));
const char *const self_name const char *const self_name
= IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (self_type))); = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (self_type)));
tree call, func, method, arg_list, method_type; tree call, func, method, arg_list, method_type;
...@@ -2363,11 +2366,12 @@ build_jni_stub (tree method) ...@@ -2363,11 +2366,12 @@ build_jni_stub (tree method)
static void static void
expand_java_field_op (int is_static, int is_putting, int field_ref_index) expand_java_field_op (int is_static, int is_putting, int field_ref_index)
{ {
tree self_type = tree self_type
get_class_constant (current_jcf, = get_class_constant (current_jcf,
COMPONENT_REF_CLASS_INDEX (&current_jcf->cpool, COMPONENT_REF_CLASS_INDEX (&current_jcf->cpool,
field_ref_index)); field_ref_index));
const char *self_name = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (self_type))); const char *self_name
= IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (self_type)));
tree field_name = COMPONENT_REF_NAME (&current_jcf->cpool, field_ref_index); tree field_name = COMPONENT_REF_NAME (&current_jcf->cpool, field_ref_index);
tree field_signature = COMPONENT_REF_SIGNATURE (&current_jcf->cpool, tree field_signature = COMPONENT_REF_SIGNATURE (&current_jcf->cpool,
field_ref_index); field_ref_index);
......
...@@ -687,7 +687,8 @@ java_print_error_function (diagnostic_context *context ATTRIBUTE_UNUSED, ...@@ -687,7 +687,8 @@ java_print_error_function (diagnostic_context *context ATTRIBUTE_UNUSED,
2, function prototypes are fully resolved and can be printed when 2, function prototypes are fully resolved and can be printed when
reporting errors. */ reporting errors. */
void lang_init_source (int level) void
lang_init_source (int level)
{ {
inhibit_error_function_printing = (level == 1); inhibit_error_function_printing = (level == 1);
} }
......
/* Parser grammar for quick source code scan of Java(TM) language programs. /* Parser grammar for quick source code scan of Java(TM) language programs.
Copyright (C) 1998, 1999, 2000, 2002, 2003 Free Software Foundation, Inc. Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004
Free Software Foundation, Inc.
Contributed by Alexandre Petit-Bianco (apbianco@cygnus.com) Contributed by Alexandre Petit-Bianco (apbianco@cygnus.com)
This file is part of GCC. This file is part of GCC.
...@@ -553,8 +554,8 @@ static: /* Test lval.sub_token here */ ...@@ -553,8 +554,8 @@ static: /* Test lval.sub_token here */
/* 19.8.5 Productions from 8.6: Constructor Declarations */ /* 19.8.5 Productions from 8.6: Constructor Declarations */
/* NOTE FOR FURTHER WORK ON CONSTRUCTORS: /* NOTE FOR FURTHER WORK ON CONSTRUCTORS:
- If a forbidded modifier is found, the the error is either the use of - If a forbidden modifier is found, the error is either the use of
a forbidded modifier for a constructor OR bogus attempt to declare a a forbidden modifier for a constructor OR bogus attempt to declare a
method without having specified the return type. FIXME */ method without having specified the return type. FIXME */
constructor_declaration: constructor_declaration:
constructor_declarator throws constructor_body constructor_declarator throws constructor_body
...@@ -1344,7 +1345,8 @@ report (void) ...@@ -1344,7 +1345,8 @@ report (void)
/* Reset global status used by the report functions. */ /* Reset global status used by the report functions. */
void reset_report (void) void
reset_report (void)
{ {
previous_output = 0; previous_output = 0;
package_name = NULL; package_name = NULL;
......
...@@ -5014,7 +5014,6 @@ method_declarator (tree id, tree list) ...@@ -5014,7 +5014,6 @@ method_declarator (tree id, tree list)
static int static int
unresolved_type_p (tree wfl, tree *returned) unresolved_type_p (tree wfl, tree *returned)
{ {
if (TREE_CODE (wfl) == EXPR_WITH_FILE_LOCATION) if (TREE_CODE (wfl) == EXPR_WITH_FILE_LOCATION)
{ {
...@@ -12229,8 +12228,8 @@ complete_function_arguments (tree node) ...@@ -12229,8 +12228,8 @@ complete_function_arguments (tree node)
flag = 1; flag = 1;
continue; continue;
} }
/* If have a string literal that we haven't transformed yet or a /* If we have a string literal that we haven't transformed yet or a
crafted string buffer, as a result of use of the the String crafted string buffer, as a result of the use of the String
`+' operator. Build `parm.toString()' and expand it. */ `+' operator. Build `parm.toString()' and expand it. */
if ((temp = patch_string (parm))) if ((temp = patch_string (parm)))
parm = temp; parm = temp;
...@@ -12259,7 +12258,6 @@ build_debugable_stmt (int location, tree stmt) ...@@ -12259,7 +12258,6 @@ build_debugable_stmt (int location, tree stmt)
static tree static tree
build_expr_block (tree body, tree decls) build_expr_block (tree body, tree decls)
{ {
tree node = make_node (BLOCK); tree node = make_node (BLOCK);
BLOCK_EXPR_DECLS (node) = decls; BLOCK_EXPR_DECLS (node) = decls;
......
...@@ -771,8 +771,8 @@ shallow_find_method (tree searched_class, int flags, tree method_name, ...@@ -771,8 +771,8 @@ shallow_find_method (tree searched_class, int flags, tree method_name,
lookup_do. */ lookup_do. */
static tree static tree
find_method_in_superclasses (tree searched_class, int flags, find_method_in_superclasses (tree searched_class, int flags,
tree method_name, tree method_name, tree signature,
tree signature, tree (*signature_builder) (tree)) tree (*signature_builder) (tree))
{ {
tree klass; tree klass;
for (klass = CLASSTYPE_SUPER (searched_class); klass != NULL_TREE; for (klass = CLASSTYPE_SUPER (searched_class); klass != NULL_TREE;
...@@ -792,8 +792,8 @@ find_method_in_superclasses (tree searched_class, int flags, ...@@ -792,8 +792,8 @@ find_method_in_superclasses (tree searched_class, int flags,
for a method matching METHOD_NAME and signature SIGNATURE. A for a method matching METHOD_NAME and signature SIGNATURE. A
private helper for lookup_do. */ private helper for lookup_do. */
static tree static tree
find_method_in_interfaces (tree searched_class, int flags, tree method_name, find_method_in_interfaces (tree searched_class, int flags, tree method_name,
tree signature, tree (*signature_builder) (tree)) tree signature, tree (*signature_builder) (tree))
{ {
int i; int i;
int interface_len = int interface_len =
......
/* Handle verification of bytecoded methods for the GNU compiler for /* Handle verification of bytecoded methods for the GNU compiler for
the Java(TM) language. the Java(TM) language.
Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc. Free Software Foundation, Inc.
This file is part of GCC. This file is part of GCC.
...@@ -238,7 +238,7 @@ merge_types (tree type1, tree type2) ...@@ -238,7 +238,7 @@ merge_types (tree type1, tree type2)
} }
/* Merge the current type state with that at LABEL. /* Merge the current type state with that at LABEL.
Return -1 the the states are incompatible (i.e. on error), Return -1 if the states are incompatible (i.e. on error),
0 if there was no change, and 1 if there was a change. */ 0 if there was no change, and 1 if there was a change. */
int int
...@@ -408,8 +408,11 @@ pop_argument_types (tree arg_types) ...@@ -408,8 +408,11 @@ pop_argument_types (tree arg_types)
#define BCODE byte_ops #define BCODE byte_ops
/* Verify the bytecodes of the current method.
Return 1 on success, 0 on failure. */ /* Verify the bytecodes of the current method, with the instructions
starting at BYTE_OPS and LENGTH in number, from the class file pointed to
by JCF.
Return 1 on success, 0 on failure. */
int int
verify_jvm_instructions (JCF* jcf, const unsigned char *byte_ops, long length) verify_jvm_instructions (JCF* jcf, const unsigned char *byte_ops, long length)
{ {
......
/* Handle a .class file embedded in a .zip archive. /* Handle a .class file embedded in a .zip archive.
This extracts a member from a .zip file, but does not handle This extracts a member from a .zip file, but does not handle
uncompression (since that is not needed for classes.zip). uncompression (since that is not needed for classes.zip).
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003 Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004
Free Software Foundation, Inc. Free Software Foundation, Inc.
This file is part of GCC. This file is part of GCC.
...@@ -236,7 +236,8 @@ static ush makeword(const uch *b) ...@@ -236,7 +236,8 @@ static ush makeword(const uch *b)
/* Function makelong() */ /* Function makelong() */
/***********************/ /***********************/
static ulg makelong(const uch *sig) static ulg
makelong (const uch *sig)
{ {
/* /*
* Convert intel style 'long' variable to non-Intel non-16-bit * Convert intel style 'long' variable to non-Intel non-16-bit
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment