summaryrefslogtreecommitdiffstats
path: root/gcc/java/java-tree.h
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/java-tree.h
parent049ccec11c335a08a6f28a508197f788c2569b39 (diff)
downloadppe42-gcc-47efb553e61e0cb9aefdf84c50bc1b19ba46c929.tar.gz
ppe42-gcc-47efb553e61e0cb9aefdf84c50bc1b19ba46c929.zip
* 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/java-tree.h')
-rw-r--r--gcc/java/java-tree.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/gcc/java/java-tree.h b/gcc/java/java-tree.h
index 5e56a17da32..1bf166a1a4b 100644
--- a/gcc/java/java-tree.h
+++ b/gcc/java/java-tree.h
@@ -135,6 +135,11 @@ extern int flag_assume_compiled;
extern int flag_emit_class_files;
+/* When non zero, assume all native functions are implemented with
+ JNI, not CNI. */
+
+extern int flag_jni;
+
/* When non zero, we emit xref strings. Values of the flag for xref
backends are defined in xref.h. */
@@ -296,6 +301,9 @@ extern tree soft_checkarraystore_node;
extern tree soft_monitorenter_node;
extern tree soft_monitorexit_node;
extern tree soft_lookupinterfacemethod_node;
+extern tree soft_lookupjnimethod_node;
+extern tree soft_getjnienvnewframe_node;
+extern tree soft_jnipopsystemframe_node;
extern tree soft_fmod_node;
extern tree soft_exceptioninfo_call_node;
extern tree soft_idiv_node;
@@ -514,6 +522,9 @@ struct lang_decl
tree inner_access; /* The identifier of the access method
used for invocation from inner classes */
int nap; /* Number of artificial parameters */
+
+ int native : 1; /* Nonzero if this is a native
+ method. */
};
/* init_test_table hash table entry structure. */
@@ -649,6 +660,7 @@ extern tree build_known_method_ref PARAMS ((tree, tree, tree, tree, tree));
extern tree build_class_init PARAMS ((tree, tree));
extern tree build_invokevirtual PARAMS ((tree, tree));
extern tree build_invokeinterface PARAMS ((tree, tree));
+extern tree build_jni_stub PARAMS ((tree));
extern tree invoke_build_dtable PARAMS ((int, tree));
extern tree build_field_ref PARAMS ((tree, tree, tree));
extern void pushdecl_force_head PARAMS ((tree));
@@ -773,7 +785,7 @@ struct rtx_def * java_lang_expand_expr PARAMS ((tree, rtx, enum machine_mode,
#define METHOD_STATIC(DECL) DECL_LANG_FLAG_2 (DECL)
#define METHOD_FINAL(DECL) DECL_LANG_FLAG_3 (DECL)
#define METHOD_SYNCHRONIZED(DECL) DECL_LANG_FLAG_4 (DECL)
-#define METHOD_NATIVE(DECL) DECL_EXTERNAL(DECL)
+#define METHOD_NATIVE(DECL) (DECL_LANG_SPECIFIC(DECL)->native)
#define METHOD_ABSTRACT(DECL) DECL_LANG_FLAG_5 (DECL)
#define METHOD_TRANSIENT(DECL) DECL_LANG_FLAG_6 (DECL)
OpenPOWER on IntegriCloud