aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/java-tree.h
diff options
context:
space:
mode:
authorNathan Froyd <froydnj@codesourcery.com>2010-05-14 20:47:39 +0000
committerNathan Froyd <froydnj@gcc.gnu.org>2010-05-14 20:47:39 +0000
commitc4e64f39d9f8ce4af60222415b522a4b07f8b86c (patch)
tree7d7e5aff53f6511668480301f6544e42fe904baa /gcc/java/java-tree.h
parentbc8ddfe63536d01d70f9dac63b8e47241cccdea5 (diff)
downloadgcc-c4e64f39d9f8ce4af60222415b522a4b07f8b86c.zip
gcc-c4e64f39d9f8ce4af60222415b522a4b07f8b86c.tar.gz
gcc-c4e64f39d9f8ce4af60222415b522a4b07f8b86c.tar.bz2
re PR middle-end/44103 (New Java test failures)
PR 44103 * java-tree.h (START_RECORD_CONSTRUCTOR): Change first argument to a vector. Move call to build_constructor... (FINISH_RECORD_CONSTRUCTOR): ...here. Add necessary arguments. Clear TREE_CONSTANT on the constructor. (PUSH_SUPER_VALUE): Change first argument to a vector. (PUSH_FIELD_VALUE): Likewise. * resource.c (compile_resource_data): Update calls to above macros. * constants.c (build_constants_constructor): Likewise. * class.c (build_utf8_ref): Likewise. (make_field_value): Likewise. (make_method_value): Likewise. (add_table_and_syms): New function. (make_class_data): Call it. Update calls to above macros. (build_symbol_table_entry): New function. (build_symbol_entry): Call it. Update calls to above macros. (emit_symbol_table): Likewise. (make_catch_class_record): Update calls to above macros. (build_assertion_table_entry): New function. (add_assertion_table_entry): Call it. (emit_assertion_table): Likewise. From-SVN: r159414
Diffstat (limited to 'gcc/java/java-tree.h')
-rw-r--r--gcc/java/java-tree.h40
1 files changed, 22 insertions, 18 deletions
diff --git a/gcc/java/java-tree.h b/gcc/java/java-tree.h
index 8ffe242..c60298b 100644
--- a/gcc/java/java-tree.h
+++ b/gcc/java/java-tree.h
@@ -1461,50 +1461,54 @@ extern tree *type_map;
#define FINISH_RECORD(RTYPE) layout_type (RTYPE)
-/* Start building a RECORD_TYPE constructor with a given TYPE in CONS. */
-#define START_RECORD_CONSTRUCTOR(CONS, CTYPE) \
+/* Start building a RECORD_TYPE constructor's elements in V. The
+ constructor will have type CTYPE. */
+#define START_RECORD_CONSTRUCTOR(V, CTYPE) \
do \
{ \
- CONS = build_constructor ((CTYPE), VEC_alloc (constructor_elt, gc, 0)); \
- CONSTRUCTOR_APPEND_ELT (CONSTRUCTOR_ELTS (CONS), TYPE_FIELDS (CTYPE), \
- NULL); \
+ V = VEC_alloc (constructor_elt, gc, 0); \
+ CONSTRUCTOR_APPEND_ELT (V, TYPE_FIELDS (CTYPE), NULL); \
} \
while (0)
-/* Append a field initializer to CONS for the dummy field for the inherited
+/* Append a field initializer to V for the dummy field for the inherited
fields. The dummy field has the given VALUE, and the same type as the
super-class. Must be specified before calls to PUSH_FIELD_VALUE. */
-#define PUSH_SUPER_VALUE(CONS, VALUE) \
+#define PUSH_SUPER_VALUE(V, VALUE) \
do \
{ \
- constructor_elt *_elt___ = VEC_last (constructor_elt, \
- CONSTRUCTOR_ELTS (CONS)); \
+ constructor_elt *_elt___ = VEC_last (constructor_elt, V); \
tree _next___ = TREE_CHAIN (_elt___->index); \
gcc_assert (!DECL_NAME (_elt___->index)); \
_elt___->value = VALUE; \
- CONSTRUCTOR_APPEND_ELT (CONSTRUCTOR_ELTS (CONS), _next___, NULL); \
+ CONSTRUCTOR_APPEND_ELT (V, _next___, NULL); \
} \
while (0)
-/* Append a field initializer to CONS for a field with the given VALUE.
+/* Append a field initializer to V for a field with the given VALUE.
NAME is a char* string used for error checking;
the initializer must be specified in order. */
-#define PUSH_FIELD_VALUE(CONS, NAME, VALUE) \
+#define PUSH_FIELD_VALUE(V, NAME, VALUE) \
do \
{ \
- constructor_elt *_elt___ = VEC_last (constructor_elt, \
- CONSTRUCTOR_ELTS (CONS)); \
+ constructor_elt *_elt___ = VEC_last (constructor_elt, V); \
tree _next___ = TREE_CHAIN (_elt___->index); \
gcc_assert (strcmp (IDENTIFIER_POINTER (DECL_NAME (_elt___->index)), \
NAME) == 0); \
_elt___->value = VALUE; \
- CONSTRUCTOR_APPEND_ELT (CONSTRUCTOR_ELTS (CONS), _next___, NULL); \
+ CONSTRUCTOR_APPEND_ELT (V, _next___, NULL); \
} \
while (0)
-/* Finish creating a record CONSTRUCTOR CONS. */
-#define FINISH_RECORD_CONSTRUCTOR(CONS) \
- VEC_pop (constructor_elt, CONSTRUCTOR_ELTS (CONS))
+/* Finish creating a record CONSTRUCTOR CONS with type CTYPE and elements V. */
+#define FINISH_RECORD_CONSTRUCTOR(CONS, V, CTYPE) \
+ do \
+ { \
+ VEC_pop (constructor_elt, V); \
+ CONS = build_constructor (CTYPE, V); \
+ TREE_CONSTANT (CONS) = 0; \
+ } \
+ while (0)
#define BLOCK_EXPR_DECLS(NODE) BLOCK_VARS(NODE)
#define BLOCK_EXPR_BODY(NODE) BLOCK_SUBBLOCKS(NODE)