This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: libjava test suite keeps getting stuck


>>>>> "Zack" == Zack Weinberg <zackw@Stanford.EDU> writes:

Zack> jvm.h was the first header I found which was included by all the
Zack> C++ files that needed to get hit by the pragma, and marked
Zack> "implementation internals"; there may be a better place.

If we want all native code, both ours and random CNI users, to be
affected by this pragma then cni.h is probably the best choice.
Or maybe java/lang/Object.h.

Zack> I don't know where to document the new pragma.

At least in the C++ manual, I'd imagine.
CNI is documented in libjava/doc/cni.sgml.
Documenting it there would also be nice.

Zack> How is it that 'throw new <object>', which is all over the C++
Zack> code in libjava, generates calls to _Jv_AllocObject not _Znwj?

Magic in g++.

Zack> libjava:
Zack> 	* Makefile.am (libgcj.la): Remove libsupc++convenience.la from
Zack> 	link line.
Zack> 	* Makefile.in: Regenerate (by hand).
Zack> 	* include/jvm.h: Insert #pragma GCC java_exceptions here.
Zack> 	* prims.cc (_Jv_ThisExecutable): Use _Jv_Malloc.
Zack> 	* java/lang/natClassLoader.cc (_Jv_RegisterInitiatingLoader):
Zack> 	Likewise.

These patches look fine to me.

I'd like to see this go in to the branch once the EH code is moved
over, too.  This will solve the libstdc++/libsupc++ dependency
problem.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]