]> gcc.gnu.org Git - gcc.git/commitdiff
java-tree.h: Redefine some macros and add soem declaration to handle the USE_MAPPED_L...
authorPer Bothner <per@bothner.com>
Thu, 30 Sep 2004 02:16:00 +0000 (19:16 -0700)
committerPer Bothner <bothner@gcc.gnu.org>
Thu, 30 Sep 2004 02:16:00 +0000 (19:16 -0700)
* java-tree.h:  Redefine some macros and add soem declaration
to handle the USE_MAPPED_LOCATION case.
* parse.h (EXPR_WFL_QUALIFICATION):  Use operand 1, not 2.
* java-tree.h (EXPR_WFL_FILENAME_NODE):  Use operand 2, not 1.
* java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in
USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone.

From-SVN: r88323

gcc/java/ChangeLog
gcc/java/java-tree.def
gcc/java/java-tree.h
gcc/java/parse.h

index cd5b84fcd77001d266f1d9005d6662f6f54b5efd..2ae9141835e8276856a76d261fb1b1c0aa436d07 100644 (file)
@@ -1,3 +1,12 @@
+2004-09-29  Per Bothner  <per@bothner.com>
+
+       * java-tree.h:  Redefine some macros and add soem declaration
+       to handle the USE_MAPPED_LOCATION case.
+       * parse.h (EXPR_WFL_QUALIFICATION):  Use operand 1, not 2.
+       * java-tree.h (EXPR_WFL_FILENAME_NODE):  Use operand 2, not 1.
+       * java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in
+       USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone.
+
 2004-09-29  Andrew Haley  <aph@redhat.com>
 
        PR java/17007
index 2f2b9f467eb697917056b2c0c625c06f84067fb2..1cdbc5730678cdf25fa1ce1bbf077831fbe32ac4 100644 (file)
@@ -97,8 +97,13 @@ DEFTREECODE (JAVA_EXC_OBJ_EXPR, "java_exc_obj_expr", tcc_expression, 0)
    (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:
index 1b707c68efbf25fed3e2a92dbcc93c78004609d6..7ecf0917d68fda212dd8cf506be11a9534e5859e 100644 (file)
@@ -1824,19 +1824,29 @@ enum
 #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) ((NODE)->exp.locus)
+#define EXPR_WFL_FILENAME(NODE) EXPR_FILENAME (NODE)
+#define EXPR_WFL_LINENO(NODE) EXPR_LINENO (NODE)
+extern tree build_expr_wfl              PARAMS ((tree, source_location));
+extern tree expr_add_location           PARAMS ((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), 1)
+  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_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)
 #define EXPR_WFL_SET_LINECOL(NODE, LINE, COL) \
   (EXPR_WFL_LINECOL(NODE) = ((LINE) << 12) | ((COL) & 0xfff))
 
 extern tree build_expr_wfl              PARAMS ((tree, const char *, int, int));
+#define build_unknown_wfl(NODE) build_expr_wfl(NODE, NULL, 0, 0)
+#endif
 
 extern void java_genericize            PARAMS ((tree));
 extern int java_gimplify_expr          PARAMS ((tree *, tree *, tree *));
index 9e4e0f8fca4f661a8094e55404080b5160e49943..95e4b235fc70f135e414575296336259df28bbd6 100644 (file)
@@ -625,7 +625,7 @@ typedef struct jdeplist_s jdeplist;
   build_expr_wfl ((NODE), input_filename, EXPR_WFL_LINENO ((WFL)),     \
                  EXPR_WFL_COLNO ((WFL)))
 
-#define EXPR_WFL_QUALIFICATION(WFL) TREE_OPERAND ((WFL), 2)
+#define EXPR_WFL_QUALIFICATION(WFL) TREE_OPERAND ((WFL), 1)
 #define QUAL_WFL(NODE) TREE_PURPOSE (NODE)
 #define QUAL_RESOLUTION(NODE) TREE_VALUE (NODE)
 #define QUAL_DECL_TYPE(NODE) GET_SKIP_TYPE (NODE)
This page took 0.085535 seconds and 5 git commands to generate.