java-tree.h: Redefine some macros and add soem declaration to handle the USE_MAPPED_LOCATION...
* 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
This commit is contained in:
parent
7ce3fc8ffe
commit
d68acc044e
@ -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
|
||||
|
@ -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:
|
||||
|
@ -1824,19 +1824,29 @@ enum
|
||||
#undef EXPR_WFL_NODE
|
||||
#define EXPR_WFL_NODE(NODE) \
|
||||
TREE_OPERAND (EXPR_WITH_FILE_LOCATION_CHECK (NODE), 0)
|
||||
#undef EXPR_WFL_FILENAME_NODE
|
||||
#define EXPR_WFL_FILENAME_NODE(NODE) \
|
||||
TREE_OPERAND (EXPR_WITH_FILE_LOCATION_CHECK (NODE), 1)
|
||||
#define EXPR_WFL_FILENAME(NODE) \
|
||||
IDENTIFIER_POINTER (EXPR_WFL_FILENAME_NODE (NODE))
|
||||
/* ??? Java uses this in all expressions. */
|
||||
#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), 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 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 *));
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user