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]

Re: overhead of reflection info


Adam Megacz wrote:
I think I'm going to see how far I can get with a patch that disables
reflection.  Getting libgcj to live without it will be a challenge,
but I think it can be done.

I think such a flag will be worthwhile. I think it would be easier and do more if you also disable classloading, interpretation, and JNI, since those are big uses of reflection info.

I'd keep just enough to keep the "JDK 1.0" level of reflection:
Object's getClass() and Class's getName(), plus support for
classcast, instanceof, and method invocation.  If you have any
partial patches I'd be happy to help with those.

I wonder whether we should add a flag to disable class initialization?
That would save both time and space, since we don't need to generate
all these tests to check if a class is initialized.  However, we'd
have to make sure all classes can be initialized at compile-time,
and reject any non-trivial class initialization code.  I don't know
how much of the library should have to be changed - a good chunk,
I suspect, so this is not a trivial change.  We'd also have to figure
out how to handle String literals.
--
	--Per Bothner
per@bothner.com   http://per.bothner.com/


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