This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: [BC] Patch: RFC: indirect dispatch on our own fields


Bryce> Perhaps we should consider just removing the condition and
Bryce> always access static fields via the atable?

Andrew> Sounds good.

Motion carried then.  I'm committing the appended instead.

Tom

Index: ChangeLog
from  Tom Tromey  <tromey@redhat.com>

	* class.c (build_static_field_ref): Don't emit direct references
	when using indirect dispatch.

Index: class.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/class.c,v
retrieving revision 1.180.2.14
diff -u -r1.180.2.14 class.c
--- class.c 12 Oct 2004 12:42:41 -0000 1.180.2.14
+++ class.c 4 Nov 2004 23:09:04 -0000
@@ -1054,8 +1054,7 @@
      However, currently sometimes gcj is too eager and will end up
      returning the field itself, leading to an incorrect external
      reference being generated.  */
-  if ((is_compiled 
-       && (! flag_indirect_dispatch || current_class == fclass))
+  if ((is_compiled && ! flag_indirect_dispatch)
       || (FIELD_FINAL (fdecl) && DECL_INITIAL (fdecl) != NULL_TREE
 	  && (JSTRING_TYPE_P (TREE_TYPE (fdecl))
 	      || JNUMERIC_TYPE_P (TREE_TYPE (fdecl)))


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