diff options
author | aph <aph@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-04-03 15:28:16 +0000 |
---|---|---|
committer | aph <aph@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-04-03 15:28:16 +0000 |
commit | c12658407f04b6b664cd69a5142b30e79f2feee0 (patch) | |
tree | 60fe445d5b46b75e3d08f3d3944f489dda85b945 /gcc/java/expr.c | |
parent | d88977362f2ba59a2210028ab26a49fd61906fa4 (diff) |
2007-04-03 Andrew Haley <aph@redhat.com>
* jvgenmain.c (main): Change main to use class$, not class$$.
(do_mangle_classname): Likewise.
* class.c (hide): New function.
(add_field): Hide everything that shouldn't be visible outside a
DSO.
(build_static_class_ref): Likewise.
(build_classdollar_field): Likewise.
(make_class_data): Likewise.
(layout_class_method): Likewise.
* expr.c (special_method_p): New function.
* class.c (push_class): Don't bogusly guess the source filename.
* jcf-parse.c (give_name_to_class): Don't set input_location from
DECL_ARTIFICIAL decls.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123476 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java/expr.c')
-rw-r--r-- | gcc/java/expr.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/java/expr.c b/gcc/java/expr.c index 46300efd07a5..1a5ec68648bc 100644 --- a/gcc/java/expr.c +++ b/gcc/java/expr.c @@ -2095,6 +2095,25 @@ static rewrite_rule rules[] = {NULL, NULL, NULL, NULL, 0, NULL}}; +/* True if this method is special, i.e. it's a private method that + should be exported from a DSO. */ + +bool +special_method_p (tree candidate_method) +{ + tree context = DECL_NAME (TYPE_NAME (DECL_CONTEXT (candidate_method))); + tree method = DECL_NAME (candidate_method); + rewrite_rule *p; + + for (p = rules; p->classname; p++) + { + if (get_identifier (p->classname) == context + && get_identifier (p->method) == method) + return true; + } + return false; +} + /* Scan the rules list for replacements for *METHOD_P and replace the args accordingly. If the rewrite results in an access to a private method, update SPECIAL.*/ |