* 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
+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>
PR java/15715.
java.lang.Object.
(register_fields): Field initialization is now a MODIFY_EXPR
node. Chain initialization code to the matching lists (according
- the the field declaration modifiers).
+ to the field declaration modifiers).
(maybe_generate_clinit): New function.
(method_header): Don't set method's DECL_NAME to a WFL when adding
methods to java.lang.Object.
}
-/* 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
gen_indirect_dispatch_tables (tree type)
{
/* Return 1 iff there exists a common enclosing context between TYPE1
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))
return 0;
/* Emit a symbol table: used by -findirect-dispatch. */
tree
-emit_symbol_table (tree name, tree the_table, tree decl_list, tree the_syms_decl,
- tree the_array_element_type)
+emit_symbol_table (tree name, tree the_table, tree decl_list,
+ tree the_syms_decl, tree the_array_element_type)
{
tree method_list, method, table, list, null_symbol;
tree table_size, the_array_type;
/* 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.
/* Add a statement to a compound_expr. */
tree
-add_stmt_to_compound (existing, type, stmt)
- tree existing, type, stmt;
+add_stmt_to_compound (tree existing, tree type, tree stmt)
{
if (!stmt)
return existing;
constructed. */
tree
-java_add_stmt (stmt)
- tree stmt;
+java_add_stmt (tree stmt)
{
if (input_filename)
annotate_with_locus (stmt, input_location);
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
- 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
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
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);
#if 0
static void
expand_java_call (int target_pc, int return_address)
- int target_pc, return_address;
{
tree target_label = lookup_label (target_pc);
tree value = build_int_2 (return_address, return_address < 0 ? -1 : 0);
static void
expand_invoke (int opcode, int method_ref_index, int nargs ATTRIBUTE_UNUSED)
{
- tree method_signature = COMPONENT_REF_SIGNATURE(¤t_jcf->cpool, method_ref_index);
+ tree method_signature
+ = COMPONENT_REF_SIGNATURE(¤t_jcf->cpool, method_ref_index);
tree method_name = COMPONENT_REF_NAME (¤t_jcf->cpool, method_ref_index);
- tree self_type = get_class_constant
- (current_jcf, COMPONENT_REF_CLASS_INDEX(¤t_jcf->cpool, method_ref_index));
+ tree self_type
+ = get_class_constant (current_jcf,
+ COMPONENT_REF_CLASS_INDEX(¤t_jcf->cpool,
+ method_ref_index));
const char *const self_name
= IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (self_type)));
tree call, func, method, arg_list, method_type;
static void
expand_java_field_op (int is_static, int is_putting, int field_ref_index)
{
- tree self_type =
- get_class_constant (current_jcf,
- COMPONENT_REF_CLASS_INDEX (¤t_jcf->cpool,
- field_ref_index));
- const char *self_name = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (self_type)));
+ tree self_type
+ = get_class_constant (current_jcf,
+ COMPONENT_REF_CLASS_INDEX (¤t_jcf->cpool,
+ field_ref_index));
+ const char *self_name
+ = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (self_type)));
tree field_name = COMPONENT_REF_NAME (¤t_jcf->cpool, field_ref_index);
tree field_signature = COMPONENT_REF_SIGNATURE (¤t_jcf->cpool,
field_ref_index);
2, function prototypes are fully resolved and can be printed when
reporting errors. */
-void lang_init_source (int level)
+void
+lang_init_source (int level)
{
inhibit_error_function_printing = (level == 1);
}
/* 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)
This file is part of GCC.
/* 19.8.5 Productions from 8.6: Constructor Declarations */
/* NOTE FOR FURTHER WORK ON CONSTRUCTORS:
- - If a forbidded modifier is found, the the error is either the use of
- a forbidded modifier for a constructor OR bogus attempt to declare a
+ - If a forbidden modifier is found, the error is either the use of
+ a forbidden modifier for a constructor OR bogus attempt to declare a
method without having specified the return type. FIXME */
constructor_declaration:
constructor_declarator throws constructor_body
/* Reset global status used by the report functions. */
-void reset_report (void)
+void
+reset_report (void)
{
previous_output = 0;
package_name = NULL;
static int
unresolved_type_p (tree wfl, tree *returned)
-
{
if (TREE_CODE (wfl) == EXPR_WITH_FILE_LOCATION)
{
flag = 1;
continue;
}
- /* If have a string literal that we haven't transformed yet or a
- crafted string buffer, as a result of use of the the String
+ /* If we have a string literal that we haven't transformed yet or a
+ crafted string buffer, as a result of the use of the String
`+' operator. Build `parm.toString()' and expand it. */
if ((temp = patch_string (parm)))
parm = temp;
static tree
build_expr_block (tree body, tree decls)
-
{
tree node = make_node (BLOCK);
BLOCK_EXPR_DECLS (node) = decls;
lookup_do. */
static tree
find_method_in_superclasses (tree searched_class, int flags,
- tree method_name,
- tree signature, tree (*signature_builder) (tree))
+ tree method_name, tree signature,
+ tree (*signature_builder) (tree))
{
tree klass;
for (klass = CLASSTYPE_SUPER (searched_class); klass != NULL_TREE;
for a method matching METHOD_NAME and signature SIGNATURE. A
private helper for lookup_do. */
static tree
-find_method_in_interfaces (tree searched_class, int flags, tree method_name,
- tree signature, tree (*signature_builder) (tree))
+find_method_in_interfaces (tree searched_class, int flags, tree method_name,
+ tree signature, tree (*signature_builder) (tree))
{
int i;
int interface_len =
/* Handle verification of bytecoded methods for the GNU compiler for
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.
This file is part of GCC.
}
/* 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. */
int
#define BCODE byte_ops
-/* Verify the bytecodes of the current method.
- Return 1 on success, 0 on failure. */
+\f
+/* 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
verify_jvm_instructions (JCF* jcf, const unsigned char *byte_ops, long length)
{
/* Handle a .class file embedded in a .zip archive.
This extracts a member from a .zip file, but does not handle
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.
This file is part of GCC.
/* 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