From: Matthias Klose <doko@ubuntu.com>
To: GCJ-patches <java-patches@gcc.gnu.org>
Subject: [patch, 4.3 branch] Fix naming of bridge targets in gjavah
Date: Sun, 14 Sep 2008 18:23:00 -0000 [thread overview]
Message-ID: <48CD55A7.7080804@ubuntu.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 322 bytes --]
For the classpath checkin see
http://developer.classpath.org/pipermail/classpath-patches/2008-September/006249.html
Checked in on the classpath-0.98 merge branch (this contains the fixes for the
header files as well):
http://gcc.gnu.org/ml/java-patches/2008-q3/msg00080.html
Approved by Andrew Haley on irc.
Matthias
[-- Attachment #2: javah.diff --]
[-- Type: text/plain, Size: 1848 bytes --]
classpath/ChangeLog.gcj
2008-09-14 Matthias Klose <doko@ubuntu.com>
Merge from classpath:
2008-09-02 Andrew John Hughes <gnu_andrew at member.fsf.org>
* tools/gnu/classpath/tools/javah/ClassWrapper.java:
(makeVtable()): Populate methodNameMap.
(printMethods(CniPrintStream)): Always use pre-populated
methodNameMap for bridge targets.
* tools/classes/gnu/classpath/tools/javah/ClassWrapper.class: Update.
Index: classpath/tools/gnu/classpath/tools/javah/ClassWrapper.java
===================================================================
--- classpath/tools/gnu/classpath/tools/javah/ClassWrapper.java (revision 140358)
+++ classpath/tools/gnu/classpath/tools/javah/ClassWrapper.java (working copy)
@@ -217,7 +217,18 @@
MethodNode m = (MethodNode) i.next();
String desc = MethodHelper.getBridgeTarget(m);
if (desc != null)
- bridgeTargets.add(m.name + desc);
+ {
+ String sum = m.name + desc;
+ boolean newTarget = bridgeTargets.add(sum);
+ if (newTarget)
+ {
+ // Bridge target that is new in this class.
+ String cname = this.name;
+ int index = cname.lastIndexOf('/');
+ cname = cname.substring(index + 1);
+ methodNameMap.put(sum, cname + "$" + m.name);
+ }
+ }
}
}
@@ -247,18 +258,7 @@
String nameToUse;
String sum = m.name + m.desc;
if (bridgeTargets.contains(sum))
- {
- if (methodNameMap.containsKey(sum))
- nameToUse = (String) methodNameMap.get(sum);
- else
- {
- // Bridge target that is new in this class.
- String cname = this.name;
- int index = cname.lastIndexOf('/');
- cname = cname.substring(index + 1);
- nameToUse = cname + "$" + m.name;
- }
- }
+ nameToUse = (String) methodNameMap.get(sum);
else
nameToUse = Keywords.getCxxName(m.name);
methodNameMap.put(sum, nameToUse);
reply other threads:[~2008-09-14 18:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48CD55A7.7080804@ubuntu.com \
--to=doko@ubuntu.com \
--cc=java-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).