diff options
author | apbianco <apbianco@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-08-11 22:01:37 +0000 |
---|---|---|
committer | apbianco <apbianco@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-08-11 22:01:37 +0000 |
commit | 4177eed1152ce56d43e4453e4573d31b6402f29b (patch) | |
tree | c88a7c7ce85707c22a2566ab9425e0d0382392f1 /gcc/java/parse.h | |
parent | 13cc7b4dfa538dace2fa0a006770252e1f397c35 (diff) | |
download | gcc-4177eed1152ce56d43e4453e4573d31b6402f29b.tar.gz |
2000-08-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
* class.c (maybe_layout_super_class): Fixed indentation.
* java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
(java_check_methods): New function declaration.
* jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
instead of `str_ptr'.
* jcf-write.c (generate_bytecode_insns): Emit number the of args
of a `invokeinterface' at the right time.
* parse.h (WFL_STRIP_BRACKET): New macro.
(SET_TYPE_FOR_RESOLUTION): Use it.
* parse.y (build_unresolved_array_type): Reuse `type_or_wfl.'
(check_class_interface_creation): Don't check for cross package
innerclass name clashes.
(method_header): Behave properly if MDECL is `error_mark_node.'
(method_declarator): Return `error_mark_node' if bogus current
class.
(resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
(resolve_and_layout): New local `decl_type', set and used. Call
java_check_methods.
(java_check_methods): New method.
(java_layout_classes): Use it.
(resolve_qualified_expression_name): No EH check necessary in
access$<n>.
(java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
`case' statement.
(patch_assignment): Set DECL_INITIAL on integral final local.
(http://gcc.gnu.org/ml/gcc-patches/2000-08/msg00516.html)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35644 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java/parse.h')
-rw-r--r-- | gcc/java/parse.h | 35 |
1 files changed, 29 insertions, 6 deletions
diff --git a/gcc/java/parse.h b/gcc/java/parse.h index 50a9e3e14cd..80712370d8d 100644 --- a/gcc/java/parse.h +++ b/gcc/java/parse.h @@ -535,27 +535,50 @@ typedef struct _jdeplist { java.lang.Object. */ #define SET_TYPE_FOR_RESOLUTION(TYPE, SAVE, CHAIN) \ { \ - tree returned_type; \ + tree _returned_type; \ (CHAIN) = 0; \ if (TREE_TYPE (GET_CPC ()) == object_type_node \ - && TREE_CODE (TYPE) == EXPR_WITH_FILE_LOCATION \ + && TREE_CODE (TYPE) == EXPR_WITH_FILE_LOCATION \ && EXPR_WFL_NODE (TYPE) == unqualified_object_id_node) \ (TYPE) = object_type_node; \ else \ { \ - if (unresolved_type_p (type, &returned_type)) \ + if (unresolved_type_p (type, &_returned_type)) \ { \ - if (returned_type) \ - (TYPE) = returned_type; \ + if (_returned_type) \ + (TYPE) = _returned_type; \ else \ { \ - (SAVE) = (TYPE); \ + tree _type; \ + WFL_STRIP_BRACKET (_type, TYPE); \ + (SAVE) = (_type); \ (TYPE) = obtain_incomplete_type (TYPE); \ CHAIN = 1; \ } \ } \ } \ } + +#define WFL_STRIP_BRACKET(TARGET, TYPE) \ +{ \ + tree __type = (TYPE); \ + if (TYPE && TREE_CODE (TYPE) == EXPR_WITH_FILE_LOCATION) \ + { \ + tree _node = EXPR_WFL_NODE (TYPE); \ + const char *_ptr = IDENTIFIER_POINTER (_node); \ + const char *_ref = _ptr; \ + while (_ptr[0] == '[') \ + _ptr++; \ + if (_ref != _ptr) \ + { \ + tree _new = copy_node (TYPE); \ + EXPR_WFL_NODE (_new) = get_identifier (_ptr); \ + __type = _new; \ + } \ + } \ + (TARGET) = __type; \ +} + /* Promote a type if it won't be registered as a patch */ #define PROMOTE_RECORD_IF_COMPLETE(TYPE, IS_INCOMPLETE) \ { \ |