Patch to fix PR9861
TJ Laurenzo
tlaurenzo@gmail.com
Fri Sep 23 03:50:00 GMT 2005
I have implemented Ian's suggested encoding. This disambiguates the
forms by including a 'J' qualifier for java methods when the return
type is included. I'll get the patch out tomorrow. I'm getting a
build failure that has something to do with constructors and CNI and
haven't looked into it yet.
TJ
On 9/22/05, Ranjit Mathew <rmathew@gmail.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Ian Lance Taylor wrote:
> > Ian Lance Taylor <ian@airs.com> writes:
> >
> >
> >>TJ Laurenzo <tlaurenzo@gmail.com> writes:
> >>
> >>
> >>>The attached patch corrects PR9861 by including the return type in
> >>>mangled names in the C++ and Java compilers for Java class methods.
> >>>This changes the ABI for Java types but does not make any changes to
> >>>C++ programs that do not access Java types.
> >>
> >>How is the demangler going to work with this patch? Is there any way
> >>for the demangler to determine which names are Java names and which
> >>are C++ names? I don't see any obvious way, though I haven't looked
> >>that hard.
> >
> >
> > By the way, considering the demangler is not an unimportant point as
> > any ambiguity in demangling is an ambiguity that can be happen when
> > linking C++ and Java code together. For example, your proposed
> > mangling for
> > java.lang.Math.acos(double)
> > appears to be
> > _ZN4java4lang4Math4acosEdd
> > which is the mangled name which will be used for the C++ function
> > java::lang::Math::acos(double, double)
>
> If we are changing the mangling for "Java" classes, is it possible
> to have a mangling where the return type comes *before* the
> class-cum-method name to disambiguate a (say) "void foo::bar(int,int)"
> from an "int foo::bar(int)" when the return type is included?
>
> Right now, without this patch, these seem to be encoded as
> "ZN3foo3barEii" and "ZN3foo3barEi" respectively.
>
> Thanks,
> Ranjit.
>
> - --
> Ranjit Mathew Email: rmathew AT gmail DOT com
>
> Bangalore, INDIA. Web: http://ranjitmathew.hostingzero.com/
>
>
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
>
> iD8DBQFDM10IYb1hx2wRS48RAgOBAJ9gJIACog8fsSZax84eEJqjpPNV3gCfcdMt
> KOBMo/YAbKwv3IDf4FKs9ZE=
> =cHTC
> -----END PGP SIGNATURE-----
>
More information about the Java-patches
mailing list