2005-02-23 Thomas Fitzsimmons <fitzsim@redhat.com>
PR libgcj/16923
* gcj.texi (Invocation): Add descriptions of JvVMInitArgs and
JvVMOption.
2005-02-23 Thomas Fitzsimmons <fitzsim@redhat.com>
PR libgcj/16923
* jni.cc (JNI_CreateJavaVM): Check JNI version. Cast args to
JvVMInitArgs. Pass args to _Jv_CreateJavaVM and check return
value. Move argument parsing code to prims.cc.
* prims.cc (no_properties): Remove.
(_Jv_Compiler_Properties): Initialize to NULL.
(_Jv_Properties_Count): Initialize to 0.
(parse_verbose_args): New function.
(parse_init_args): New function.
(_Jv_CreateJavaVM): Call parse_init_args.
(_Jv_RunMain): Check return value of _Jv_CreateJavaVM.
* gcj/cni.h (JvVMOption): New struct.
(JvVMInitArgs): Likewise.
(JvCreateJavaVM): Declare vm_args as JvVMInitArgs* rather than
void*.
* libjava/gcj/javaprims.h (_Jv_VMOption): New struct.
(_Jv_VMInitArgs): Likewise.
* include/java-props.h (_Jv_Properties_Count): Declare.
* java/lang/natRuntime.cc (insertSystemProperties): Use
_Jv_Properties_Count in for loop exit condition.
* testsuite/libjava.jni/jni.exp
(gcj_invocation_compile_c_to_binary): New procedure.
(gcj_invocation_test_one): Likewise.
(gcj_jni_run): Run JNI invocation API tests.
* testsuite/libjava.jni/invocation/PR16923.c,
testsuite/libjava.jni/invocation/PR16923.java,
testsuite/libjava.jni/invocation/PR16923.out: New test.
From-SVN: r95459
* gcj/cni.h: CNI now expands to Compiled Native Interface.
* java/lang/e_pow.c: CYGNUS LOCAL should be GCJ LOCAL.
* java/lang/fdlibm.h: Likewise.
From-SVN: r69104
* All files: Updated copyright information.
* COPYING: New file.
* COPYING.LIB: Removed.
* LIBGCJ_LICENSE: We now use GPL + special exception.
From-SVN: r32387
2000-03-07 Bryce McKinlay <bryce@albatross.co.nz>
* resolve.cc (_Jv_SearchMethodInClass): New function.
(_Jv_ResolvePoolEntry): Search superinterfaces for interface
methods.
* java/lang/Class.h (_Jv_SearchMethodInClass): New prototype.
2000-03-07 Bryce McKinlay <bryce@albatross.co.nz>
* java/lang/Class.h (union _Jv_IDispatchTable): New declaration.
(struct _Jv_ifaces): New declaration.
JV_CLASS: New macro definition.
(getComponentType): Relocate below isArray() for inlining.
(getModifiers): Declare `inline'.
(getSuperclass): Ditto.
(isArray): Ditto.
(isPrimitive): Ditto.
(_Jv_IsAssignableFrom): New prototype.
(_Jv_LookupInterfaceMethodIdx): New prototype. Predeclare with "C"
linkage.
(_Jv_InitClass): Move from natClass.cc. Declare `inline'.
Check for JV_STATE_DONE before invoking initializeClass().
(_Jv_PrepareConstantTimeTables): New prototype.
(_Jv_GetInterfaces): Ditto.
(_Jv_GenerateITable): Ditto.
(_Jv_GetMethodString): Ditto.
(_Jv_AppendPartialITable): Ditto.
(_Jv_FindIIndex): Ditto.
depth, ancestors, idt: New class fields.
* java/lang/natClass.cc (isAssignableFrom): Move functionality to
inline function `_Jv_IsAssignableFrom'. Use that function.
(isInstance): Declare `inline'.
(initializeClass): Get lock on class before checking `state'. Unlock
before calling resolveClass0. Call _Jv_PrepareConstantTimeTables
with the lock held.
(_Jv_LookupInterfaceMethod): Use _Jv_GetMessageString.
(_Jv_IsAssignableFrom): New inline function. Test assignability
using class->depth and ancestor table.
(_Jv_IsInstanceOf): Use _Jv_IsAssignableFrom.
(_Jv_CheckCast): Move from prims.cc. Use JV_CLASS and
_Jv_IsAssignableFrom.
(_Jv_CheckArrayStore): Ditto.
(_Jv_LookupInterfaceMethodIdx): New function.
INITIAL_IOFFSETS_LEN, INITIAL_IFACES_LEN: New #defines.
(_Jv_PrepareConstantTimeTables): New function.
(_Jv_IndexOf): Ditto.
(_Jv_GetInterfaces): Ditto.
(_Jv_GenerateITable): Ditto.
(_Jv_GetMethodString): Ditto.
(_Jv_AppendPartialITable): Ditto.
iindex_mutex, iindex_mutex_initialized: New static fields.
(_Jv_FindIIndex): New function.
* java/lang/natClassLoader.cc (_Jv_NewClass): Set new jclass fields.
* prims.cc (_Jv_CheckCast): Moved to natClass.cc.
(_Jv_CheckArrayStore): Ditto.
(JvNewCharArray, JvNewBooleanArray, JvNewByteArray, JvNewShortArray,
JvNewIntArray, JvNewLongArray, JvNewFloatArray, JvNewDoubleArray):
Moved to gcj/array.h.
(_Jv_Realloc): New function.
* gcj/cni.h: Move _Jv_PrimClass definitions to gcj/array.h.
* gcj/array.h: _Jv_PrimClass definitions moved from gcj/cni.h.
(JvNewCharArray, JvNewBooleanArray, JvNewByteArray,
JvNewShortArray, JvNewIntArray, JvNewLongArray, JvNewFloatArray,
JvNewDoubleArray): Implementations moved from prims.cc and
declared `inline'.
* gcj/javaprims.h (_Jv_Realloc): Prototype.
* include/jvm.h (_Jv_LookupInterfaceMethodIdx): Prototype.
From-SVN: r32382
* configure: Rebuilt.
* configure.in: Build include/Makefile.
* Makefile.in: Rebuilt.
* Makefile.am (SUBDIRS): Added gcj and include.
(install-data-local): New target.
(extra_headers): New macro.
* include/Makefile.in: New file.
* include/Makefile.am: New file.
* interpret.cc: Don't include gcj/field.h or gcj/cni.h.
* java/lang/reflect/natField.cc: Don't include gcj/field.h or
gcj/cni.h.
* boehm.cc: Don't include java-threads.h or gcj/field.h.
* resolve.cc: Include config.h.
* defineclass.cc: Include config.h.
* include/java-interp.h: Don't include config.h.
* include/jvm.h: Include java-threads.h, Object.h, java-gc.h,
cni.h.
* gcj/javaprims.h: Regenerated namespace decls.
* classes.pl (scan): Don't put `;' after closing brace.
* Makefile.in: Rebuilt.
* Makefile.am (INCLUDES): Added -I for top_srcdir.
* configure.in: Create gcj/Makefile.
* gcj/Makefile.in: New file.
* gcj/Makefile.am: New file.
* java/lang/Object.h: Don't include any other headers.
* gcj/array.h: Renamed from include/java-array.h.
* gcj/field.h: Renamed from include/java-field.h.
* gcj/method.h: Renamed from include/java-method.h.
* gcj/cni.h, gcj/javaprims.h: Moved from include/.
Updated all files to reflect new include structure.
From-SVN: r29278