summaryrefslogtreecommitdiff
path: root/gcc/java/lang.c
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2000-05-02 20:32:31 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2000-05-02 20:32:31 +0000
commit47efb553e61e0cb9aefdf84c50bc1b19ba46c929 (patch)
treef6a3da973a9c08d0deefae724ed229eadde9cd1c /gcc/java/lang.c
parent049ccec11c335a08a6f28a508197f788c2569b39 (diff)
downloadgcc-47efb553e61e0cb9aefdf84c50bc1b19ba46c929.tar.gz
* class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
on native function. * jcf-parse.c (parse_class_file): Call build_jni_stub for native JNI methods. * expr.c (build_jni_stub): New function. * lang-specs.h: -fjni and -femit-class-file are incompatible. * parse.c: Rebuilt. * parse.y (java_complete_expand_methods): Expand a native method and call build_jni_stub if -fjni given. * lang-options.h: Document -fjni. * lang.c (flag_jni): New global. (lang_f_options): Added `jni' entry. * java-tree.h (soft_lookupjnimethod_node, soft_getjnienvnewframe_node, soft_jnipopsystemframe_node): Declare. (flag_jni): Declare. (build_jni_stub): Declare. (struct lang_decl): Added `native' flag. (METHOD_NATIVE): Redefined to use `native' field of lang specific structure. * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node, soft_jnipopsystemframe_node): New globals. (init_decl_processing): Set them. _Jv_InitClass only takes one argument. * java-tree.def: Put into `C' mode. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33615 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java/lang.c')
-rw-r--r--gcc/java/lang.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/java/lang.c b/gcc/java/lang.c
index ad1b8261a16..f8c37f2ad81 100644
--- a/gcc/java/lang.c
+++ b/gcc/java/lang.c
@@ -117,6 +117,10 @@ int flag_use_boehm_gc = 0;
object to its synchronization structure. */
int flag_hash_synchronization;
+/* When non zero, assume all native functions are implemented with
+ JNI, not CNI. */
+int flag_jni = 0;
+
/* From gcc/flags.h, and indicates if exceptions are turned on or not. */
extern int flag_new_exceptions;
@@ -135,7 +139,8 @@ lang_f_options[] =
{"emit-class-files", &flag_emit_class_files, 1},
{"use-divide-subroutine", &flag_use_divide_subroutine, 1},
{"use-boehm-gc", &flag_use_boehm_gc, 1},
- {"hash-synchronization", &flag_hash_synchronization, 1}
+ {"hash-synchronization", &flag_hash_synchronization, 1},
+ {"jni", &flag_jni, 1}
};
JCF *current_jcf;