diff options
Diffstat (limited to 'gcc/java')
-rw-r--r-- | gcc/java/check-init.c | 6 | ||||
-rw-r--r-- | gcc/java/class.c | 6 | ||||
-rw-r--r-- | gcc/java/decl.c | 4 | ||||
-rw-r--r-- | gcc/java/expr.c | 4 | ||||
-rw-r--r-- | gcc/java/jcf-parse.c | 16 | ||||
-rw-r--r-- | gcc/java/jcf-write.c | 10 | ||||
-rw-r--r-- | gcc/java/lex.c | 12 | ||||
-rw-r--r-- | gcc/java/lex.h | 2 | ||||
-rw-r--r-- | gcc/java/parse-scan.y | 4 | ||||
-rw-r--r-- | gcc/java/parse.h | 2 | ||||
-rw-r--r-- | gcc/java/parse.y | 62 |
11 files changed, 64 insertions, 64 deletions
diff --git a/gcc/java/check-init.c b/gcc/java/check-init.c index 3ca989b..82b14b5 100644 --- a/gcc/java/check-init.c +++ b/gcc/java/check-init.c @@ -890,15 +890,15 @@ check_init (tree exp, words before) const char *saved_input_filename = input_filename; tree saved_wfl = wfl; tree body = EXPR_WFL_NODE (exp); - int saved_lineno = lineno; + int saved_lineno = input_line; if (body == empty_stmt_node) break; wfl = exp; input_filename = EXPR_WFL_FILENAME (exp); - lineno = EXPR_WFL_LINENO (exp); + input_line = EXPR_WFL_LINENO (exp); check_init (body, before); input_filename = saved_input_filename; - lineno = saved_lineno; + input_line = saved_lineno; wfl = saved_wfl; } break; diff --git a/gcc/java/class.c b/gcc/java/class.c index fff4247..e51e7999 100644 --- a/gcc/java/class.c +++ b/gcc/java/class.c @@ -309,18 +309,18 @@ push_class (tree class_type, tree class_name) { tree decl, signature; const char *save_input_filename = input_filename; - int save_lineno = lineno; + int save_lineno = input_line; tree source_name = identifier_subst (class_name, "", '.', '/', ".java"); CLASS_P (class_type) = 1; input_filename = IDENTIFIER_POINTER (source_name); - lineno = 0; + input_line = 0; decl = build_decl (TYPE_DECL, class_name, class_type); /* dbxout needs a DECL_SIZE if in gstabs mode */ DECL_SIZE (decl) = integer_zero_node; input_filename = save_input_filename; - lineno = save_lineno; + input_line = save_lineno; signature = identifier_subst (class_name, "L", '.', '/', ";"); IDENTIFIER_SIGNATURE_TYPE (signature) = build_pointer_type (class_type); diff --git a/gcc/java/decl.c b/gcc/java/decl.c index 70d6e59..a4b1c43 100644 --- a/gcc/java/decl.c +++ b/gcc/java/decl.c @@ -1670,7 +1670,7 @@ complete_start_java_method (tree fndecl) if (! flag_emit_class_files) { /* Initialize the RTL code for the function. */ - init_function_start (fndecl, input_filename, lineno); + init_function_start (fndecl, input_filename, input_line); /* Set up parameters and prepare for return, for the function. */ expand_function_start (fndecl, 0); @@ -1810,7 +1810,7 @@ end_java_method (void) BLOCK_SUPERCONTEXT (DECL_INITIAL (fndecl)) = fndecl; /* Generate rtl for function exit. */ - expand_function_end (input_filename, lineno, 0); + expand_function_end (input_filename, input_line, 0); /* Run the optimizers and output assembler code for this function. */ rest_of_compilation (fndecl); diff --git a/gcc/java/expr.c b/gcc/java/expr.c index 1174823..6cbfbc9 100644 --- a/gcc/java/expr.c +++ b/gcc/java/expr.c @@ -2827,8 +2827,8 @@ expand_byte_code (JCF *jcf, tree method) linenumber_pointer += 4; if (pc == PC) { - lineno = GET_u2 (linenumber_pointer - 2); - emit_line_note (input_filename, lineno); + input_line = GET_u2 (linenumber_pointer - 2); + emit_line_note (input_filename, input_line); if (!(instruction_bits[PC] & BCODE_HAS_MULTI_LINENUMBERS)) break; } diff --git a/gcc/java/jcf-parse.c b/gcc/java/jcf-parse.c index 8dacecc..d642bdc 100644 --- a/gcc/java/jcf-parse.c +++ b/gcc/java/jcf-parse.c @@ -418,7 +418,7 @@ give_name_to_class (JCF *jcf, int i) JPOOL_UTF_LENGTH (jcf, j)); this_class = lookup_class (class_name); input_filename = DECL_SOURCE_FILE (TYPE_NAME (this_class)); - lineno = 0; + input_line = 0; if (main_input_filename == NULL && jcf == main_jcf) main_input_filename = input_filename; @@ -703,13 +703,13 @@ parse_class_file (void) { tree method, field; const char *save_input_filename = input_filename; - int save_lineno = lineno; + int save_lineno = input_line; java_layout_seen_class_methods (); input_filename = DECL_SOURCE_FILE (TYPE_NAME (current_class)); - lineno = 0; - (*debug_hooks->start_source_file) (lineno, input_filename); + input_line = 0; + (*debug_hooks->start_source_file) (input_line, input_filename); init_outgoing_cpool (); /* Currently we always have to emit calls to _Jv_InitClass when @@ -760,7 +760,7 @@ parse_class_file (void) continue; } - lineno = 0; + input_line = 0; if (DECL_LINENUMBERS_OFFSET (method)) { register int i; @@ -774,8 +774,8 @@ parse_class_file (void) int line = GET_u2 (ptr); /* Set initial lineno lineno to smallest linenumber. * Needs to be set before init_function_start. */ - if (lineno == 0 || line < lineno) - lineno = line; + if (input_line == 0 || line < input_line) + input_line = line; } } else @@ -803,7 +803,7 @@ parse_class_file (void) (*debug_hooks->end_source_file) (save_lineno); input_filename = save_input_filename; - lineno = save_lineno; + input_line = save_lineno; } /* Parse a source file, as pointed by the current value of INPUT_FILENAME. */ diff --git a/gcc/java/jcf-write.c b/gcc/java/jcf-write.c index 9c05a5ae..59ef514 100644 --- a/gcc/java/jcf-write.c +++ b/gcc/java/jcf-write.c @@ -1425,17 +1425,17 @@ generate_bytecode_insns (tree exp, int target, struct jcf_partial *state) { const char *saved_input_filename = input_filename; tree body = EXPR_WFL_NODE (exp); - int saved_lineno = lineno; + int saved_lineno = input_line; if (body == empty_stmt_node) break; input_filename = EXPR_WFL_FILENAME (exp); - lineno = EXPR_WFL_LINENO (exp); - if (EXPR_WFL_EMIT_LINE_NOTE (exp) && lineno > 0 + input_line = EXPR_WFL_LINENO (exp); + if (EXPR_WFL_EMIT_LINE_NOTE (exp) && input_line > 0 && debug_info_level > DINFO_LEVEL_NONE) - put_linenumber (lineno, state); + put_linenumber (input_line, state); generate_bytecode_insns (body, target, state); input_filename = saved_input_filename; - lineno = saved_lineno; + input_line = saved_lineno; } break; case INTEGER_CST: diff --git a/gcc/java/lex.c b/gcc/java/lex.c index d18aa1b..e21bfd6 100644 --- a/gcc/java/lex.c +++ b/gcc/java/lex.c @@ -135,7 +135,7 @@ java_init_lex (FILE *finput, const char *encoding) #endif ctxp->filename = input_filename; - ctxp->lineno = lineno = 0; + ctxp->lineno = input_line = 0; ctxp->p_line = NULL; ctxp->c_line = NULL; ctxp->java_error_flag = 0; @@ -212,7 +212,7 @@ java_allocate_new_line (void) } ctxp->c_line->ahead [0] = 0; ctxp->c_line->unicode_escape_ahead_p = 0; - ctxp->c_line->lineno = ++lineno; + ctxp->c_line->lineno = ++input_line; ctxp->c_line->white_space_only = 1; } @@ -1351,9 +1351,9 @@ do_java_lex (YYSTYPE *java_lval) } if (c == '\n' || c == UEOF) /* ULT. */ { - lineno--; /* Refer to the line where the terminator was seen. */ + input_line--; /* Refer to the line where the terminator was seen. */ java_lex_error ("String not terminated at end of line", 0); - lineno++; + input_line++; } obstack_1grow (&temporary_obstack, '\0'); @@ -1381,14 +1381,14 @@ do_java_lex (YYSTYPE *java_lval) case '{': JAVA_LEX_SEP (c); if (ctxp->ccb_indent == 1) - ctxp->first_ccb_indent1 = lineno; + ctxp->first_ccb_indent1 = input_line; ctxp->ccb_indent++; BUILD_OPERATOR (OCB_TK); case '}': JAVA_LEX_SEP (c); ctxp->ccb_indent--; if (ctxp->ccb_indent == 1) - ctxp->last_ccb_indent1 = lineno; + ctxp->last_ccb_indent1 = input_line; BUILD_OPERATOR (CCB_TK); case '[': JAVA_LEX_SEP (c); diff --git a/gcc/java/lex.h b/gcc/java/lex.h index aa9a2be..3c924e4 100644 --- a/gcc/java/lex.h +++ b/gcc/java/lex.h @@ -29,7 +29,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */ /* Extern global variables declarations */ extern FILE *finput; -extern int lineno; +extern int input_lineno; /* A Unicode character, as read from the input file */ typedef unsigned short unicode_t; diff --git a/gcc/java/parse-scan.y b/gcc/java/parse-scan.y index 0c8795f..233a987 100644 --- a/gcc/java/parse-scan.y +++ b/gcc/java/parse-scan.y @@ -58,7 +58,7 @@ static struct parser_ctxt *ctxp; elsewhere */ int java_error_count; int java_warning_count; -int lineno; +int input_line; /* Tweak default rules when necessary. */ static int absorber; @@ -1354,6 +1354,6 @@ void reset_report (void) void yyerror (const char *msg ATTRIBUTE_UNUSED) { - fprintf (stderr, "%s: %d: %s\n", input_filename, lineno, msg); + fprintf (stderr, "%s: %d: %s\n", input_filename, input_line, msg); exit (1); } diff --git a/gcc/java/parse.h b/gcc/java/parse.h index 17806dc..207bb8d 100644 --- a/gcc/java/parse.h +++ b/gcc/java/parse.h @@ -70,7 +70,7 @@ extern tree stabilize_reference (tree); #define RECOVER {yyerrok; RECOVERED;} #define YYERROR_NOW ctxp->java_error_flag = 1 -#define YYNOT_TWICE if (ctxp->prevent_ese != lineno) +#define YYNOT_TWICE if (ctxp->prevent_ese != input_line) /* Accepted modifiers */ #define CLASS_MODIFIERS ACC_PUBLIC|ACC_ABSTRACT|ACC_FINAL|ACC_STRICT diff --git a/gcc/java/parse.y b/gcc/java/parse.y index df60f9e..c35d4e5 100644 --- a/gcc/java/parse.y +++ b/gcc/java/parse.y @@ -1452,7 +1452,7 @@ empty_statement: (DECL_CONTEXT (current_function_decl))))) { - EXPR_WFL_SET_LINECOL (wfl_operator, lineno, -1); + EXPR_WFL_SET_LINECOL (wfl_operator, input_line, -1); parse_warning_context (wfl_operator, "An empty declaration is a deprecated feature that should not be used"); } $$ = empty_stmt_node; @@ -1489,7 +1489,7 @@ expression_statement: { /* We have a statement. Generate a WFL around it so we can debug it */ - $$ = build_expr_wfl ($1, input_filename, lineno, 0); + $$ = build_expr_wfl ($1, input_filename, input_line, 0); /* We know we have a statement, so set the debug info to be eventually generate here. */ $$ = JAVA_MAYBE_GENERATE_DEBUG_INFO ($$); @@ -2692,7 +2692,7 @@ java_pop_parser_context (int generate) next = ctxp->next; if (next) { - lineno = ctxp->lineno; + input_line = ctxp->lineno; current_class = ctxp->class_type; } @@ -2737,7 +2737,7 @@ java_parser_context_save_global (void) else if (ctxp->saved_data) create_new_parser_context (1); - ctxp->lineno = lineno; + ctxp->lineno = input_line; ctxp->class_type = current_class; ctxp->filename = input_filename; ctxp->function_decl = current_function_decl; @@ -2750,7 +2750,7 @@ java_parser_context_save_global (void) void java_parser_context_restore_global (void) { - lineno = ctxp->lineno; + input_line = ctxp->lineno; current_class = ctxp->class_type; input_filename = ctxp->filename; if (wfl_operator) @@ -2989,7 +2989,7 @@ yyerror (const char *msg) int save_lineno; char *remainder, *code_from_source; - if (!force_error && prev_lineno == lineno) + if (!force_error && prev_lineno == input_line) return; /* Save current error location but report latter, when the context is @@ -3022,8 +3022,8 @@ yyerror (const char *msg) elc.line = ctxp->p_line->lineno; } - save_lineno = lineno; - prev_lineno = lineno = elc.line; + save_lineno = input_line; + prev_lineno = input_line = elc.line; prev_msg = msg; code_from_source = java_get_line_col (ctxp->filename, elc.line, elc.col); @@ -3040,7 +3040,7 @@ yyerror (const char *msg) the same line. This occurs when we report an error but don't have a synchronization point other than ';', which expression_statement is the only one to take care of. */ - ctxp->prevent_ese = lineno = save_lineno; + ctxp->prevent_ese = input_line = save_lineno; } static void @@ -4225,7 +4225,7 @@ register_fields (int flags, tree type, tree variable_list) { tree current, saved_type; tree class_type = NULL_TREE; - int saved_lineno = lineno; + int saved_lineno = input_line; int must_chain = 0; tree wfl = NULL_TREE; @@ -4295,9 +4295,9 @@ register_fields (int flags, tree type, tree variable_list) /* Set lineno to the line the field was found and create a declaration for it. Eventually sets the @deprecated tag flag. */ if (flag_emit_xref) - lineno = EXPR_WFL_LINECOL (cl); + input_line = EXPR_WFL_LINECOL (cl); else - lineno = EXPR_WFL_LINENO (cl); + input_line = EXPR_WFL_LINENO (cl); field_decl = add_field (class_type, current_name, real_type, flags); CHECK_DEPRECATED_NO_RESET (field_decl); @@ -4359,7 +4359,7 @@ register_fields (int flags, tree type, tree variable_list) } CLEAR_DEPRECATED; - lineno = saved_lineno; + input_line = saved_lineno; } /* Generate finit$, using the list of initialized fields to populate @@ -4611,11 +4611,11 @@ method_header (int flags, tree type, tree mdecl, tree throws) else TREE_TYPE (meth) = type; - saved_lineno = lineno; + saved_lineno = input_line; /* When defining an abstract or interface method, the curly bracket at level 1 doesn't exist because there is no function body */ - lineno = (ctxp->first_ccb_indent1 ? ctxp->first_ccb_indent1 : + input_line = (ctxp->first_ccb_indent1 ? ctxp->first_ccb_indent1 : EXPR_WFL_LINENO (id)); /* Remember the original argument list */ @@ -4649,7 +4649,7 @@ method_header (int flags, tree type, tree mdecl, tree throws) /* Register the parameter number and re-install the current line number */ DECL_MAX_LOCALS (meth) = ctxp->formal_parameter_number+1; - lineno = saved_lineno; + input_line = saved_lineno; /* Register exception specified by the `throws' keyword for resolution and set the method decl appropriate field to the list. @@ -5451,13 +5451,13 @@ safe_layout_class (tree class) { tree save_current_class = current_class; const char *save_input_filename = input_filename; - int save_lineno = lineno; + int save_lineno = input_line; layout_class (class); current_class = save_current_class; input_filename = save_input_filename; - lineno = save_lineno; + input_line = save_lineno; } static tree @@ -6867,7 +6867,7 @@ find_in_imports_on_demand (tree enclosing_type, tree class_type) for (; import; import = TREE_CHAIN (import)) { - int saved_lineno = lineno; + int saved_lineno = input_line; int access_check; const char *id_name; tree decl, type_name_copy; @@ -6886,7 +6886,7 @@ find_in_imports_on_demand (tree enclosing_type, tree class_type) /* Setup lineno so that it refers to the line of the import (in case we parse a class file and encounter errors */ - lineno = EXPR_WFL_LINENO (TREE_PURPOSE (import)); + input_line = EXPR_WFL_LINENO (TREE_PURPOSE (import)); type_name_copy = TYPE_NAME (class_type); TYPE_NAME (class_type) = node; @@ -6908,7 +6908,7 @@ find_in_imports_on_demand (tree enclosing_type, tree class_type) /* 6.6.1: Inner classes are subject to member access rules. */ access_check = 0; - lineno = saved_lineno; + input_line = saved_lineno; /* If the loaded class is not accessible or couldn't be loaded, we restore the original TYPE_NAME and process the next @@ -7297,7 +7297,7 @@ create_artificial_method (tree class, int flags, tree type, tree mdecl; java_parser_context_save_global (); - lineno = 0; + input_line = 0; mdecl = make_node (FUNCTION_TYPE); TREE_TYPE (mdecl) = type; TYPE_ARG_TYPES (mdecl) = args; @@ -7357,7 +7357,7 @@ source_end_java_method (void) return; java_parser_context_save_global (); - lineno = ctxp->last_ccb_indent1; + input_line = ctxp->last_ccb_indent1; /* Turn function bodies with only a NOP expr null, so they don't get generated at all and we won't get warnings when using the -W @@ -7385,8 +7385,8 @@ source_end_java_method (void) /* Generate rtl for function exit. */ if (! flag_emit_class_files && ! flag_emit_xref) { - lineno = DECL_SOURCE_LINE_LAST (fndecl); - expand_function_end (input_filename, lineno, 0); + input_line = DECL_SOURCE_LINE_LAST (fndecl); + expand_function_end (input_filename, input_line, 0); DECL_SOURCE_LINE (fndecl) = DECL_SOURCE_LINE_FIRST (fndecl); @@ -7894,7 +7894,7 @@ start_complete_expand_method (tree mdecl) TREE_CHAIN (tem) = next; } pushdecl_force_head (DECL_ARGUMENTS (mdecl)); - lineno = DECL_SOURCE_LINE_FIRST (mdecl); + input_line = DECL_SOURCE_LINE_FIRST (mdecl); build_result_decl (mdecl); } @@ -8572,7 +8572,7 @@ build_thisn_assign (void) tree lhs = make_qualified_primary (build_wfl_node (this_identifier_node), build_wfl_node (thisn), 0); tree rhs = build_wfl_node (thisn); - EXPR_WFL_SET_LINECOL (lhs, lineno, 0); + EXPR_WFL_SET_LINECOL (lhs, input_line, 0); return build_assignment (ASSIGN_TK, EXPR_WFL_LINECOL (lhs), lhs, rhs); } return NULL_TREE; @@ -11824,10 +11824,10 @@ java_complete_lhs (tree node) else { tree body; - int save_lineno = lineno; - lineno = EXPR_WFL_LINENO (node); + int save_lineno = input_line; + input_line = EXPR_WFL_LINENO (node); body = java_complete_tree (EXPR_WFL_NODE (node)); - lineno = save_lineno; + input_line = save_lineno; EXPR_WFL_NODE (node) = body; TREE_SIDE_EFFECTS (node) = TREE_SIDE_EFFECTS (body); CAN_COMPLETE_NORMALLY (node) = CAN_COMPLETE_NORMALLY (body); @@ -12375,7 +12375,7 @@ maybe_absorb_scoping_blocks (void) { tree b = exit_block (); java_method_add_stmt (current_function_decl, b); - SOURCE_FRONTEND_DEBUG (("Absorbing scoping block at line %d", lineno)); + SOURCE_FRONTEND_DEBUG (("Absorbing scoping block at line %d", input_line)); } } |