aboutsummaryrefslogtreecommitdiff
path: root/gcc/java
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/java')
-rw-r--r--gcc/java/ChangeLog30
-rw-r--r--gcc/java/expr.c81
-rw-r--r--gcc/java/java-gimplify.c12
-rw-r--r--gcc/java/java-tree.def13
-rw-r--r--gcc/java/java-tree.h55
-rw-r--r--gcc/java/lang.c7
6 files changed, 30 insertions, 168 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 19fd506..a71bfbb 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,33 @@
+2007-01-15 Tom Tromey <tromey@redhat.com>
+
+ * lang.c (dump_compound_expr) <EXPR_WITH_FILE_LOCATION>: Removed
+ case.
+ * java-gimplify.c (java_gimplify_expr) <EXPR_WITH_FILE_LOCATION>:
+ Removed case.
+ * java-tree.h (EXPR_WFL_EMIT_LINE_NOTE): Removed.
+ (EXPR_WFL_NODE): Likewise.
+ (EXPR_WFL_LINECOL): Likewise.
+ (EXPR_WFL_FILENAME): Likewise.
+ (EXPR_WFL_LINENO): Likewise.
+ (build_expr_wfl, expr_add_location): Don't declare.
+ (build_unknown_wfl): Removed.
+ (EXPR_WFL_FILENAME_NODE): Removed.
+ (EXPR_WFL_COLNO): Removed.
+ (EXPR_WFL_SET_LINECOL): Removed.
+ (DECL_FUNCTION_WFL): Removed.
+ (DECL_FIELD_FINAL_WFL): Removed.
+ (struct lang_decl_func) <wfl>: Removed field.
+ <called_constructor>: Likewise.
+ <inner_access>: Likewise.
+ (struct lang_decl_var) <wfl>: Removed field.
+ (DECL_CONSTRUCTOR_CALLS): Removed.
+ (DECL_FUNCTION_ACCESS_DECL): Likewise.
+ (DECL_FUNCTION_INNER_ACCESS): Likewise.
+ (DECL_SPECIFIC_COUNT): Likewise.
+ * java-tree.def (EXPR_WITH_FILE_LOCATION): Removed.
+ * expr.c (build_expr_wfl): Removed.
+ (expr_add_location): Likewise.
+
2007-01-12 Tom Tromey <tromey@redhat.com>
* jcf-dump.c (main): Updated call to find_class.
diff --git a/gcc/java/expr.c b/gcc/java/expr.c
index 85d732c..c51b5cd 100644
--- a/gcc/java/expr.c
+++ b/gcc/java/expr.c
@@ -3757,87 +3757,6 @@ force_evaluation_order (tree node)
return node;
}
-/* EXPR_WITH_FILE_LOCATION are used to keep track of the exact
- location where an expression or an identifier were encountered. It
- is necessary for languages where the frontend parser will handle
- recursively more than one file (Java is one of them). */
-
-tree
-build_expr_wfl (tree node,
-#ifdef USE_MAPPED_LOCATION
- source_location location
-#else
- const char *file, int line, int col
-#endif
-)
-{
- tree wfl;
-
-#ifdef USE_MAPPED_LOCATION
- wfl = make_node (EXPR_WITH_FILE_LOCATION);
- SET_EXPR_LOCATION (wfl, location);
-#else
- static const char *last_file = 0;
- static tree last_filenode = NULL_TREE;
-
- wfl = make_node (EXPR_WITH_FILE_LOCATION);
-
- EXPR_WFL_SET_LINECOL (wfl, line, col);
- if (file != last_file)
- {
- last_file = file;
- last_filenode = file ? get_identifier (file) : NULL_TREE;
- }
- EXPR_WFL_FILENAME_NODE (wfl) = last_filenode;
-#endif
- EXPR_WFL_NODE (wfl) = node;
- if (node)
- {
- if (!TYPE_P (node))
- TREE_SIDE_EFFECTS (wfl) = TREE_SIDE_EFFECTS (node);
- TREE_TYPE (wfl) = TREE_TYPE (node);
- }
-
- return wfl;
-}
-
-#ifdef USE_MAPPED_LOCATION
-tree
-expr_add_location (tree node, source_location location, bool statement)
-{
- tree wfl;
-#if 0
- /* FIXME. This optimization causes failures in code that expects an
- EXPR_WITH_FILE_LOCATION. E.g. in resolve_qualified_expression_name. */
- if (node && ! (statement && flag_emit_class_files))
- {
- source_location node_loc = EXPR_LOCATION (node);
- if (node_loc == location || location == UNKNOWN_LOCATION)
- return node;
- if (node_loc == UNKNOWN_LOCATION
- && IS_EXPR_CODE_CLASS (TREE_CODE_CLASS (TREE_CODE (node))))
- {
- SET_EXPR_LOCATION (node, location);
- return node;
- }
- }
-#endif
- wfl = make_node (EXPR_WITH_FILE_LOCATION);
- SET_EXPR_LOCATION (wfl, location);
- EXPR_WFL_NODE (wfl) = node;
- if (statement && debug_info_level != DINFO_LEVEL_NONE)
- EXPR_WFL_EMIT_LINE_NOTE (wfl) = 1;
- if (node)
- {
- if (!TYPE_P (node))
- TREE_SIDE_EFFECTS (wfl) = TREE_SIDE_EFFECTS (node);
- TREE_TYPE (wfl) = TREE_TYPE (node);
- }
-
- return wfl;
-}
-#endif
-
/* Build a node to represent empty statements and blocks. */
tree
diff --git a/gcc/java/java-gimplify.c b/gcc/java/java-gimplify.c
index f084154..96e9009 100644
--- a/gcc/java/java-gimplify.c
+++ b/gcc/java/java-gimplify.c
@@ -69,18 +69,6 @@ java_gimplify_expr (tree *expr_p, tree *pre_p ATTRIBUTE_UNUSED,
*expr_p = java_gimplify_block (*expr_p);
break;
- case EXPR_WITH_FILE_LOCATION:
-#ifdef USE_MAPPED_LOCATION
- input_location = EXPR_LOCATION (*expr_p);
-#else
- input_location.file = EXPR_WFL_FILENAME (*expr_p);
- input_location.line = EXPR_WFL_LINENO (*expr_p);
-#endif
- *expr_p = EXPR_WFL_NODE (*expr_p);
- if (EXPR_P (*expr_p))
- SET_EXPR_LOCATION (*expr_p, input_location);
- break;
-
case LABELED_BLOCK_EXPR:
*expr_p = java_gimplify_labeled_block_expr (*expr_p);
break;
diff --git a/gcc/java/java-tree.def b/gcc/java/java-tree.def
index a93d413a..63fc865 100644
--- a/gcc/java/java-tree.def
+++ b/gcc/java/java-tree.def
@@ -24,19 +24,6 @@ DEFTREECODE (EXIT_BLOCK_EXPR, "exit_block_expr", tcc_statement, 1)
Operand 1 contains chained catch nodes. */
DEFTREECODE (TRY_EXPR, "try-catch", tcc_expression, 2)
-/* Annotates a tree node (usually an expression) with source location
- information: a file name (EXPR_WFL_FILENAME); a line number
- (EXPR_WFL_LINENO); and column number (EXPR_WFL_COLNO). It is
- expanded as the contained node (EXPR_WFL_NODE); a line note should
- be emitted first if EXPR_WFL_EMIT_LINE_NOTE. */
-#ifdef USE_MAPPED_LOCATION
-DEFTREECODE (EXPR_WITH_FILE_LOCATION, "expr_with_file_location",
- tcc_expression, 2)
-#else
-DEFTREECODE (EXPR_WITH_FILE_LOCATION, "expr_with_file_location",
- tcc_expression, 3)
-#endif
-
/*
Local variables:
mode:c
diff --git a/gcc/java/java-tree.h b/gcc/java/java-tree.h
index dbc85d56..1f71764 100644
--- a/gcc/java/java-tree.h
+++ b/gcc/java/java-tree.h
@@ -728,30 +728,13 @@ union lang_tree_node
(DECL_LANG_SPECIFIC(DECL)->u.f.arg_slot_count)
/* Source location of end of function. */
#define DECL_FUNCTION_LAST_LINE(DECL) (DECL_LANG_SPECIFIC(DECL)->u.f.last_line)
-/* Information on declaration location */
-#define DECL_FUNCTION_WFL(DECL) (DECL_LANG_SPECIFIC(DECL)->u.f.wfl)
/* List of checked thrown exceptions, as specified with the `throws'
keyword */
#define DECL_FUNCTION_THROWS(DECL) (DECL_LANG_SPECIFIC(DECL)->u.f.throws_list)
-/* List of other constructors of the same class that this constructor
- calls */
-#define DECL_CONSTRUCTOR_CALLS(DECL) \
- (DECL_LANG_SPECIFIC(DECL)->u.f.called_constructor)
-/* When the function is an access function, the DECL it was trying to
- access */
-#define DECL_FUNCTION_ACCESS_DECL(DECL) \
- (DECL_LANG_SPECIFIC(DECL)->u.f.called_constructor)
-/* The identifier of the access method used to invoke this method from
- an inner class. */
-#define DECL_FUNCTION_INNER_ACCESS(DECL) \
- (DECL_LANG_SPECIFIC(DECL)->u.f.inner_access)
/* Pointer to the function's current's COMPOUND_EXPR tree (while
completing its body) or the function's block */
#define DECL_FUNCTION_BODY(DECL) \
(DECL_LANG_SPECIFIC(DECL)->u.f.function_decl_body)
-/* How specific the function is (for method selection - Java source
- code front-end */
-#define DECL_SPECIFIC_COUNT(DECL) DECL_ARG_SLOT_COUNT(DECL)
/* For each function decl, init_test_table contains a hash table whose
entries are keyed on class names, and whose values are local
boolean decls. The variables are intended to be TRUE when the
@@ -819,8 +802,6 @@ union lang_tree_node
/* True if a final field was initialized upon its declaration
or in an initializer. Set after definite assignment. */
#define DECL_FIELD_FINAL_IUD(NODE) (DECL_LANG_SPECIFIC (NODE)->u.v.final_iud)
-/* The original WFL of a final variable. */
-#define DECL_FIELD_FINAL_WFL(NODE) (DECL_LANG_SPECIFIC(NODE)->u.v.wfl)
/* The class that's the owner of a dynamic binding table. */
#define DECL_OWNER(NODE) (DECL_LANG_SPECIFIC(NODE)->u.v.owner)
/* True if NODE is a local variable final. */
@@ -888,11 +869,8 @@ struct lang_decl_func GTY(())
/* A temporary lie for the sake of ggc. Actually, last_line is
only a source_location if USE_MAPPED_LOCATION. FIXME. */
source_location last_line; /* End line number for a function decl */
- tree wfl; /* Information on the original location */
tree throws_list; /* Exception specified by `throws' */
tree function_decl_body; /* Hold all function's statements */
- tree called_constructor; /* When decl is a constructor, the
- list of other constructor it calls */
/* Class initialization test variables */
htab_t GTY ((param_is (struct treetreehash_entry))) init_test_table;
@@ -900,8 +878,6 @@ struct lang_decl_func GTY(())
/* Initialized (static) Class Table */
htab_t GTY ((param_is (union tree_node))) ict;
- tree inner_access; /* The identifier of the access method
- used for invocation from inner classes */
unsigned int native : 1; /* Nonzero if this is a native method */
unsigned int init_final : 1; /* Nonzero all finals are initialized */
unsigned int init_calls_this : 1;
@@ -972,7 +948,6 @@ struct lang_decl_var GTY(())
int end_pc;
tree slot_chain;
tree am; /* Access method for this field (1.1) */
- tree wfl; /* Original wfl */
tree owner;
unsigned int final_iud : 1; /* Final initialized upon declaration */
unsigned int cif : 1; /* True: decl is a class initialization flag */
@@ -1702,36 +1677,6 @@ enum
#define EXIT_BLOCK_LABELED_BLOCK(NODE) \
TREE_OPERAND_CHECK_CODE (NODE, EXIT_BLOCK_EXPR, 0)
-/* In an EXPR_WITH_FILE_LOCATION node. */
-#define EXPR_WFL_EMIT_LINE_NOTE(NODE) \
- (EXPR_WITH_FILE_LOCATION_CHECK (NODE)->base.public_flag)
-#undef EXPR_WFL_NODE
-#define EXPR_WFL_NODE(NODE) \
- TREE_OPERAND (EXPR_WITH_FILE_LOCATION_CHECK (NODE), 0)
-#ifdef USE_MAPPED_LOCATION
-#define EXPR_WFL_LINECOL(NODE) EXPR_LOCUS(NODE)
-#define EXPR_WFL_FILENAME(NODE) EXPR_FILENAME (NODE)
-#define EXPR_WFL_LINENO(NODE) EXPR_LINENO (NODE)
-extern tree build_expr_wfl (tree, source_location);
-extern tree expr_add_location (tree, source_location, bool);
-#define build_unknown_wfl(NODE) build_expr_wfl(NODE, UNKNOWN_LOCATION)
-#else
-#define EXPR_WFL_LINECOL(NODE) (EXPR_CHECK (NODE)->exp.complexity)
-#define EXPR_WFL_LINENO(NODE) (EXPR_WFL_LINECOL (NODE) >> 12)
-#define EXPR_WFL_COLNO(NODE) (EXPR_WFL_LINECOL (NODE) & 0xfff)
-#undef EXPR_WFL_FILENAME_NODE
-#define EXPR_WFL_FILENAME_NODE(NODE) \
- TREE_OPERAND (EXPR_WITH_FILE_LOCATION_CHECK (NODE), 2)
-#define EXPR_WFL_FILENAME(NODE) \
- IDENTIFIER_POINTER (EXPR_WFL_FILENAME_NODE (NODE))
-/* ??? Java uses this in all expressions. */
-#define EXPR_WFL_SET_LINECOL(NODE, LINE, COL) \
- (EXPR_WFL_LINECOL(NODE) = ((LINE) << 12) | ((COL) & 0xfff))
-
-extern tree build_expr_wfl (tree, const char *, int, int);
-#define build_unknown_wfl(NODE) build_expr_wfl(NODE, NULL, 0, 0)
-#endif
-
extern void java_genericize (tree);
extern int java_gimplify_expr (tree *, tree *, tree *);
diff --git a/gcc/java/lang.c b/gcc/java/lang.c
index e5d2543..51459c5 100644
--- a/gcc/java/lang.c
+++ b/gcc/java/lang.c
@@ -876,13 +876,6 @@ dump_compound_expr (dump_info_p di, tree t)
dump_compound_expr (di, TREE_OPERAND (t, i));
break;
- case EXPR_WITH_FILE_LOCATION:
- {
- tree wfl_node = EXPR_WFL_NODE (TREE_OPERAND (t, i));
- dump_child ("expr", wfl_node);
- break;
- }
-
default:
dump_child ("expr", TREE_OPERAND (t, i));
}