diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2003-06-20 09:08:23 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2003-06-20 09:08:23 +0000 |
commit | 1f9cc6db1b6ea3576abbdf5467abfd3a6ff8e520 (patch) | |
tree | 525f454b1423c8bdd021bc73e0febafbe12942c5 /gcc/java | |
parent | bbdfb3e8216ef29c48e73a530fe75dba987af6bf (diff) | |
download | gcc-1f9cc6db1b6ea3576abbdf5467abfd3a6ff8e520.zip gcc-1f9cc6db1b6ea3576abbdf5467abfd3a6ff8e520.tar.gz gcc-1f9cc6db1b6ea3576abbdf5467abfd3a6ff8e520.tar.bz2 |
tree.h (expand_function_end): Remove all parameters.
* tree.h (expand_function_end): Remove all parameters.
* function.c (expand_function_end): Remove all parameters.
Use input_location. Never expand_end_bindings.
* c-decl.c (c_expand_body_1): Adjust expand_function_end call.
* coverage.c (create_coverage): Likewise.
* ada/utils.c (end_subprog_body): Adjust expand_function_end
call.
* cp/semantics.c (genrtl_finish_function): Adjust
expand_function_end call.
* f/com.c (finish_function): Adjust expand_function_end call.
* java/class.c (push_class): Use a location_t to save place.
(emit_register_classes): Set input_location. Adjust
expand_function_end call.
* java/resource.c (write_resource_constructor): Likewise.
* java/decl.c (end_java_method): Adjust expand_function_end call.
* java/parse.y (source_end_java_method): Likewise.
* treelang/treetree.c (tree_code_create_function_wrapup): Adjust
expand_function_end call.
From-SVN: r68255
Diffstat (limited to 'gcc/java')
-rw-r--r-- | gcc/java/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/java/class.c | 12 | ||||
-rw-r--r-- | gcc/java/decl.c | 2 | ||||
-rw-r--r-- | gcc/java/parse.y | 2 | ||||
-rw-r--r-- | gcc/java/resource.c | 5 |
5 files changed, 21 insertions, 9 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index b370870..8c3aaad 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,12 @@ +2003-06-20 Nathan Sidwell <nathan@codesourcery.com> + + * class.c (push_class): Use a location_t to save place. + (emit_register_classes): Set input_location. Adjust + expand_function_end call. + * resource.c (write_resource_constructor): Likewise. + * decl.c (end_java_method): Adjust expand_function_end call. + * parse.y (source_end_java_method): Likewise. + 2003-06-17 Robert Abeles <rabeles@archaelogic.com> * lang.c (java_handle_option): Likewise. diff --git a/gcc/java/class.c b/gcc/java/class.c index fe00f78..ed1ae4d 100644 --- a/gcc/java/class.c +++ b/gcc/java/class.c @@ -308,8 +308,7 @@ tree push_class (tree class_type, tree class_name) { tree decl, signature; - const char *save_input_filename = input_filename; - int save_lineno = input_line; + location_t saved_loc = input_location; tree source_name = identifier_subst (class_name, "", '.', '/', ".java"); CLASS_P (class_type) = 1; input_filename = IDENTIFIER_POINTER (source_name); @@ -319,8 +318,7 @@ push_class (tree class_type, tree class_name) /* dbxout needs a DECL_SIZE if in gstabs mode */ DECL_SIZE (decl) = integer_zero_node; - input_filename = save_input_filename; - input_line = save_lineno; + input_location = saved_loc; signature = identifier_subst (class_name, "L", '.', '/', ";"); IDENTIFIER_SIGNATURE_TYPE (signature) = build_pointer_type (class_type); @@ -2000,6 +1998,7 @@ emit_register_classes (void) tree init_type = build_function_type (void_type_node, end_params_node); tree init_decl; tree t; + location_t saved_loc = input_location; init_decl = build_decl (FUNCTION_DECL, init_name, init_type); SET_DECL_ASSEMBLER_NAME (init_decl, init_name); @@ -2028,8 +2027,8 @@ emit_register_classes (void) for ( t = registered_class; t; t = TREE_CHAIN (t)) emit_library_call (registerClass_libfunc, 0, VOIDmode, 1, XEXP (DECL_RTL (t), 0), Pmode); - - expand_function_end (input_filename, 0, 0); + input_location = DECL_SOURCE_LOCATION (init_decl); + expand_function_end (); poplevel (1, 0, 1); rest_of_compilation (init_decl); current_function_decl = NULL_TREE; @@ -2037,6 +2036,7 @@ emit_register_classes (void) if (targetm.have_ctors_dtors) (* targetm.asm_out.constructor) (XEXP (DECL_RTL (init_decl), 0), DEFAULT_INIT_PRIORITY); + input_location = saved_loc; } } diff --git a/gcc/java/decl.c b/gcc/java/decl.c index 7d5507c..5354f89 100644 --- a/gcc/java/decl.c +++ b/gcc/java/decl.c @@ -1810,7 +1810,7 @@ end_java_method (void) BLOCK_SUPERCONTEXT (DECL_INITIAL (fndecl)) = fndecl; /* Generate rtl for function exit. */ - expand_function_end (input_filename, input_line, 0); + expand_function_end (); /* Run the optimizers and output assembler code for this function. */ rest_of_compilation (fndecl); diff --git a/gcc/java/parse.y b/gcc/java/parse.y index 854fd5f..a156be1 100644 --- a/gcc/java/parse.y +++ b/gcc/java/parse.y @@ -7386,7 +7386,7 @@ source_end_java_method (void) if (! flag_emit_class_files && ! flag_emit_xref) { input_line = DECL_FUNCTION_LAST_LINE (fndecl); - expand_function_end (input_filename, input_line, 0); + expand_function_end (); /* Run the optimizers and output assembler code for this function. */ rest_of_compilation (fndecl); diff --git a/gcc/java/resource.c b/gcc/java/resource.c index a1de225..b71a670 100644 --- a/gcc/java/resource.c +++ b/gcc/java/resource.c @@ -104,6 +104,7 @@ write_resource_constructor (void) { tree init_name, init_type, init_decl; tree iter; + location_t saved_loc = input_location; /* Only do work if required. */ if (resources == NULL_TREE) @@ -139,7 +140,8 @@ write_resource_constructor (void) Pmode); } - expand_function_end (input_filename, 0, 0); + input_location = DECL_SOURCE_LOCATION (init_decl); + expand_function_end (); poplevel (1, 0, 1); { /* Force generation, even with -O3 or deeper. Gross hack. @@ -152,6 +154,7 @@ write_resource_constructor (void) current_function_decl = NULL_TREE; (* targetm.asm_out.constructor) (XEXP (DECL_RTL (init_decl), 0), DEFAULT_INIT_PRIORITY); + input_location = saved_loc; } /* Generate a byte array representing the contents of FILENAME. The |