diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-12-09 05:14:19 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-12-09 05:14:19 +0000 |
commit | ae9b7e746b26c83cfc2bfd9aba2fcd6377b1d83e (patch) | |
tree | cc5699d46e8fc436aec3fdbdba9b175fb86af3cd /gcc/java/gjavah.c | |
parent | e6754dc09f68844dce894c493344bb398bc2657e (diff) | |
download | gcc-ae9b7e746b26c83cfc2bfd9aba2fcd6377b1d83e.tar.gz |
* gjavah.c (decompile_method): Don't decompile to `return this'
for static methods.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47804 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java/gjavah.c')
-rw-r--r-- | gcc/java/gjavah.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/java/gjavah.c b/gcc/java/gjavah.c index 724877507e0..1e93ddef4a6 100644 --- a/gcc/java/gjavah.c +++ b/gcc/java/gjavah.c @@ -1065,7 +1065,10 @@ decompile_method (out, jcf, code_len) } else if (code_len == 2 && codes[0] == OPCODE_aload_0 - && codes[1] == OPCODE_areturn) + && codes[1] == OPCODE_areturn + /* We're going to generate `return this'. This only makes + sense for non-static methods. */ + && ! (method_access & ACC_STATIC)) { decompile_return_statement (out, jcf, method_signature, -1, JPOOL_USHORT1 (jcf, jcf->this_class)); |