This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
The patch for the mangling changes is below. I don't have any problem assigning copyright. What do I need to do in order to do that? I had thought about using aliases to maintain BC. There are a couple of problems as I see it: 1. Right now, I am mangling the return type consistent with the IA64 ABI in the same manner as is done for the return type on C++ function templates. In essence, this means that the return type is being mangled just prior to the first argument of the function (or if no args, then just prior to the implicit void arg). If we were to emit an alias for the original encoding, then we open ourselves up to unintended name collisions under certain circumstances. For example, take the two methods: static void someMethod(String s, int i) static String someMethod(int i) I believe that the mangled form of the first method without the return type included (ie. the backward compatible alias) would be the same as the mangled form for the second method with the return type included (ie. the "new way"). The only way I see to get around this is to diverge from the IA64 ABI and invent a new mechanism for encoding the return types using a delimiter of some kind to separate them from the rest of the argument list. That way, new style mangling and old style aliases would have no chance of conflicting. Thoughts? 2. It is probably academic, but we would need to decide on how to select which method is eligible to receive the compatibility alias. In practice, we could probably just choose the first method with a given signature (not including return type), since no existing code would have more than one method with the same signature excluding return type. Patch file is attached.
Attachment:
mangle-gcc-4.1-20050515.patch
Description: Binary data
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |