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]

[gcjx] FYI: Skip native methods for CNI; Fix Minor Typo


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

  I've committed the following patch after offline
approval from Tom. This patch skips native methods
while generating code when not using JNI, just as
the current mainline. It stops cgraph from freaking
out in --enable-checking mode.

I also fix a small typo with this patch.

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

iD8DBQFDUwmxYb1hx2wRS48RAiNoAJ4w8S0dRcK/jlslp74LKOSqWQGx4QCgnP07
FMd1KQc2ayUawo0rZJP9Kjw=
=ZwyP
-----END PGP SIGNATURE-----
Index: ChangeLog
from  Ranjit Mathew  <rmathew@gcc.gnu.org>

	* treegen.cc (tree_code_generator::generate): Skip native methods
	when not using JNI.
	* tree.cc (tree_generator::build_array_reference): Correct a minor
	typo.

Index: treegen.cc
===================================================================
--- treegen.cc	2005-10-16 15:24:22.000000000 +0530
+++ treegen.cc	2005-10-17 07:38:07.000000000 +0530
@@ -76,6 +76,10 @@ tree_code_generator::generate (model_cla
       if (((*i)->get_modifiers () & ACC_ABSTRACT) != 0)
 	continue;
 
+      // Skip native methods when not using JNI.
+      if ((*i)->native_p () && ! flag_jni)
+        continue;
+
       tree_generator gen (builtins, wrapper);
       tree method = gen.generate ((*i).get ());
 
Index: tree.cc
===================================================================
--- tree.cc	2005-10-16 20:18:48.000000000 +0530
+++ tree.cc	2005-10-16 20:22:43.000000000 +0530
@@ -2756,7 +2756,7 @@ tree_generator::build_array_reference (t
       // comparison also takes care of checking for INDEX < 0.
       tree length = build3 (COMPONENT_REF, type_jint,
 			    // Note we don't use check_reference here,
-			    // as we it would be redundant.
+			    // as it would be redundant.
 			    build1 (INDIRECT_REF, array_type, array),
 			    field, NULL_TREE);
       tree call = build3 (CALL_EXPR, void_type_node,

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