This is the mail archive of the java-patches@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: RFC: Tell do_allocate_static_fields which fields to allocate


Andrew Haley wrote:
This is a better patch.

It mimics the technique used when allocating an interpreted class.
It's all rather complicated, but that's hard to avoid as long as we
want to continue to support the "old" BC-ABI.

Instead of duplicating it, couldn't this code actually be shared with the interpreter? It looks to me that this could be done by making _Jv_InterpClass a specialization of _Jv_IndirectClass (with the field_initializers field in _Jv_IndirectClass), and moving do_allocate_static_fields to link.cc to make it more generic.


I think in general we should try to minimize/eliminate code duplication between the BC-ABI and the interpreter wherever possible - it looks like its mostly just a matter of tweaking the data structures to make this possible, the semantics/behaviour should be pretty much identical.

Bryce


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