diff options
author | Andrew Haley <aph@redhat.com> | 2007-04-03 15:28:16 +0000 |
---|---|---|
committer | Andrew Haley <aph@gcc.gnu.org> | 2007-04-03 15:28:16 +0000 |
commit | 696fbee71016c152278c38048421cf291e1566a4 (patch) | |
tree | 60fe445d5b46b75e3d08f3d3944f489dda85b945 /gcc/java/expr.c | |
parent | 83ff0d10edd6af76343e00f4cd8cdb78c1c0b640 (diff) | |
download | gcc-696fbee71016c152278c38048421cf291e1566a4.zip gcc-696fbee71016c152278c38048421cf291e1566a4.tar.gz gcc-696fbee71016c152278c38048421cf291e1566a4.tar.bz2 |
jvgenmain.c (main): Change main to use class$, not class$$.
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.
From-SVN: r123476
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 46300ef..1a5ec68 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.*/ |