aboutsummaryrefslogtreecommitdiff
path: root/libjava/defineclass.cc
AgeCommit message (Collapse)AuthorFilesLines
2008-09-23re PR libgcj/8995 (race cases in interpreter)Andrew Haley1-1/+3
2008-09-17 Andrew Haley <aph@redhat.com> PR libgcj/8995: * defineclass.cc (_Jv_ClassReader::handleCodeAttribute): Initialize thread_count. * include/java-interp.h (_Jv_InterpMethod::thread_count): New field. (_Jv_InterpMethod::rewrite_insn_mutex): New mutex. (_Jv_InterpFrame:: _Jv_InterpFrame): Pass frame_type. * interpret.cc (ThreadCountAdjuster): New class. (_Jv_InterpMethod::thread_count): New field. (_Jv_InitInterpreter): Initialize rewrite_insn_mutex. Increment and decrement thread_count field in methods. * interpret-run.cc (REWRITE_INSN): Check thread_count <= 1. (REWRITE_INSN): Likewise. Declare a ThreadCountAdjuster. * java/lang/reflect/natVMProxy.cc (run_proxy): Initialize frame type as frame_proxy. From-SVN: r140593
2007-09-17defineclass.cc (MAJOR_1_6): New define.Tom Tromey1-3/+5
* defineclass.cc (MAJOR_1_6): New define. (MINOR_1_6): Likewise. (_Jv_ClassReader::parse): Handle 1.6 bytecode. From-SVN: r128551
2007-06-15java-interp.h (_Jv_LocalVarTableEntry): Add union for bytecode_pc and ↵Keith Seitz1-4/+3
direct-threaded pc. * include/java-interp.h (_Jv_LocalVarTableEntry): Add union for bytecode_pc and direct-threaded pc. Add field descriptions inline. * defineclass.cc (read_one_code_attribute): Change from bytecode_start_pc to bytecode_pc. Remove unused variable "len". * interpret.cc (compile): Remap the variable table, too. (get_local_var_table) [DIRECT_THREADED]: Use insn_index on the start location to map from pc_t to code index. From-SVN: r125734
2007-03-07ffi.h.in (ffi_closure_alloc, [...]): New.Alexandre Oliva1-3/+4
libffi/ChangeLog: * include/ffi.h.in (ffi_closure_alloc, ffi_closure_free): New. (ffi_prep_closure_loc): New. (ffi_prep_raw_closure_loc): New. (ffi_prep_java_raw_closure_loc): New. * src/closures.c: New file. * src/dlmalloc.c [FFI_MMAP_EXEC_WRIT] (struct malloc_segment): Replace sflags with exec_offset. [FFI_MMAP_EXEC_WRIT] (mmap_exec_offset, add_segment_exec_offset, sub_segment_exec_offset): New macros. (get_segment_flags, set_segment_flags, check_segment_merge): New macros. (is_mmapped_segment, is_extern_segment): Use get_segment_flags. (add_segment, sys_alloc, create_mspace, create_mspace_with_base, destroy_mspace): Use new macros. (sys_alloc): Silence warning. * Makefile.am (libffi_la_SOURCES): Add src/closures.c. * Makefile.in: Rebuilt. * src/prep_cif [FFI_CLOSURES] (ffi_prep_closure): Implement in terms of ffi_prep_closure_loc. * src/raw_api.c (ffi_prep_raw_closure_loc): Renamed and adjusted from... (ffi_prep_raw_closure): ... this. Re-implement in terms of the renamed version. * src/java_raw_api (ffi_prep_java_raw_closure_loc): Renamed and adjusted from... (ffi_prep_java_raw_closure): ... this. Re-implement in terms of the renamed version. * src/alpha/ffi.c (ffi_prep_closure_loc): Renamed from (ffi_prep_closure): ... this. * src/pa/ffi.c: Likewise. * src/cris/ffi.c: Likewise. Adjust. * src/frv/ffi.c: Likewise. * src/ia64/ffi.c: Likewise. * src/mips/ffi.c: Likewise. * src/powerpc/ffi_darwin.c: Likewise. * src/s390/ffi.c: Likewise. * src/sh/ffi.c: Likewise. * src/sh64/ffi.c: Likewise. * src/sparc/ffi.c: Likewise. * src/x86/ffi64.c: Likewise. * src/x86/ffi.c: Likewise. (FFI_INIT_TRAMPOLINE): Adjust. (ffi_prep_raw_closure_loc): Renamed and adjusted from... (ffi_prep_raw_closure): ... this. * src/powerpc/ffi.c (ffi_prep_closure_loc): Renamed from (ffi_prep_closure): ... this. (flush_icache): Adjust. boehm-gc/ChangeLog: * include/gc.h (GC_REGISTER_FINALIZER_UNREACHABLE): New. (GC_register_finalizer_unreachable): Declare. (GC_debug_register_finalizer_unreachable): Declare. * finalize.c (GC_unreachable_finalize_mark_proc): New. (GC_register_finalizer_unreachable): New. (GC_finalize): Handle it. * dbg_mlc.c (GC_debug_register_finalizer_unreachable): New. (GC_debug_register_finalizer_no_order): Fix whitespace. libjava/ChangeLog: * include/jvm.h (_Jv_ClosureListFinalizer): New. (_Jv_Linker::create_error_method): Adjust. * boehm.cc (_Jv_ClosureListFinalizer): New. * nogc.cc (_Jv_ClosureListFinalizer): New. * java/lang/Class.h (class _Jv_ClosureList): New. (class java::lang::Class): Declare it as friend. * java/lang/natClass.cc (_Jv_ClosureList::releaseClosures): New. (_Jv_ClosureList::registerClousure): New. * include/execution.h (_Jv_ExecutionEngine): Add get_closure_list. (_Jv_CompiledEngine::do_get_closure_list): New. (_Jv_CompiledEngine::_Jv_CompiledEngine): Use it. (_Jv_IndirectCompiledClass): Add closures. (_Jv_IndirectCompiledEngine::get_aux_info): New. (_Jv_IndirectCompiledEngine::do_allocate_field_initializers): Use it. (_Jv_IndirectCompiledEngine::do_get_closure_list): New. (_Jv_IndirectCompiledEngine::_Jv_IndirectCompiledEngine): Use it. (_Jv_InterpreterEngine::do_get_closure_list): Declare. (_Jv_InterpreterEngine::_Jv_InterpreterEngine): Use it. * interpret.cc (FFI_PREP_RAW_CLOSURE): Use _loc variants. (node_closure): Add closure list. (_Jv_InterpMethod::ncode): Add jclass argument. Use ffi_closure_alloc and the separate code pointer. Register the closure for finalization. (_Jv_JNIMethod::ncode): Likewise. (_Jv_InterpreterEngine::do_create_ncode): Pass klass to ncode. (_Jv_InterpreterEngine::do_get_closure_list): New. * include/java-interp.h (_Jv_InterpMethod::ncode): Adjust. (_Jv_InterpClass): Add closures field. (_Jv_JNIMethod::ncode): Adjust. * defineclass.cc (_Jv_ClassReader::handleCodeAttribute): Adjust. (_Jv_ClassReader::handleMethodsEnd): Likewise. * link.cc (struct method_closure): Add closure list. (_Jv_Linker::create_error_method): Add jclass argument. Use ffi_closure_alloc and the separate code pointer. Register the closure for finalization. (_Jv_Linker::link_symbol_table): Remove outdated comment about sharing of otable and atable. Adjust. * java/lang/reflect/natVMProxy.cc (ncode_closure): Add closure list. (ncode): Add jclass argument. Use ffi_closure_alloc and the separate code pointer. Register the closure for finalization. (java::lang::reflect::VMProxy::generateProxyClass): Adjust. * testsuite/libjava.jar/TestClosureGC.java: New. * testsuite/libjava.jar/TestClosureGC.out: New. * testsuite/libjava.jar/TestClosureGC.xfail: New. * testsuite/libjava.jar/TestClosureGC.jar: New. From-SVN: r122652
2007-02-15defineclass.cc (_Jv_ClassReader::read_one_code_attribute): Added ↵Kyle Galloway1-0/+43
LocalVariableTable attribute handling. 2007-02-15 Kyle Galloway <kgallowa@redhat.com> * defineclass.cc (_Jv_ClassReader::read_one_code_attribute): Added LocalVariableTable attribute handling. (_Jv_ClassReader::pool_Utf8_to_char_arr): New method. * jvmti.cc (_Jv_JVMTI_GetLocalVariableTable): New method. * include/java-interp.h: Added local_var_table and local_var_table_len fields to _Jv_InterpMethod. (_Jv_InterpMethod::get_local_var_table): New method. * testsuite/libjava.jvmti/interp/getlocalvartable.java: New test. * testsuite/libjava.jvmti/interp/getlocalvartable.jar: New test. * testsuite/libjava.jvmti/interp/getlocalvartable.out: Output for new test. * testsuite/libjava.jvmti/interp/getlocalvartable.h: New test. * testsuite/libjava.jvmti/interp/natgetlocalvartable.cc: New test. From-SVN: r121999
2007-01-09Merged gcj-eclipse branch to trunk.Tom Tromey1-98/+395
From-SVN: r120621
2006-02-08link.cc (_Jv_Linker::print_class_loaded): Declare string constants as "const ↵Bryce McKinlay1-8/+8
char *". 2006-02-08 Bryce McKinlay <mckinlay@redhat.com> * link.cc (_Jv_Linker::print_class_loaded): Declare string constants as "const char *". * verify.cc (verify_fail): Likewise. * gnu/classpath/natSystemProperties.cc (file_encoding): Likewise. * interpret.cc (throw_internal_error, throw_class_format_error): Likewise. * gcj/javaprims.h (_Jv_hashUtf8String, _Jv_Utf8Const::space_needed, _Jv_Utf8Const::init, _Jv_makeUtf8Const): Likewise. * java/lang/Class.h (_Jv_InitPrimClass): Likewise. * include/jvm.h (_Jv_strLengthUtf8, _Jv_makeUtf8Const): Likewise. * defineclass.cc (throw_internal_error, throw_no_class_def_found_error, is_attribute_name): Likewise. * prims.cc (_Jv_strLengthUtf8, _Jv_hashUtf8String, _Jv_Utf8Const::init, _Jv_makeUtf8Const, _Jv_InitPrimClass): Likewise. From-SVN: r110767
2006-02-08PR libgcj/26063, PR libgcj/17978, PR libgcj/10598:Tom Tromey1-19/+16
* defineclass.cc (parse): Use _Jv_AllocRawObj. (read_constpool): Likewise. (read_one_code_attribute): Use internal function name. (handleConstantPool): Use _Jv_AllocRawObj. (handleInterfacesBegin): Likewise. (handleFieldsBegin): Likewise. (handleMethodsBegin): Likewise. (handleCodeAttribute): Likewise. (handleMethodsEnd): Likewise. * include/jvm.h (new_vtable): Use _Jv_AllocRawObj. * interpret.cc (do_allocate_static_fields): Use _Jv_AllocRawObj. Allocate reference fields separately. * link.cc (prepare_constant_time_tables): Use _Jv_AllocRawObj. (add_miranda_methods): Likewise. (generate_itable): Use _Jv_AllocBytes. (find_iindex): Likewise. (struct method_closure): New structure. (create_error_method): Use struct method_closure; allocate with _Jv_AllocBytes. (ensure_fields_laid_out): Separate reference fields from non-reference fields. * boehm.cc (_Jv_MarkObj): Mark vtable. Only mark direct fields of Class. (_Jv_MarkArray): Mark vtable. (_Jv_AllocRawObj): Don't allocate objects of size 0. * include/execution.h (_Jv_ExecutionEngine::allocate_static_fields): Added 'int' parameter. (struct _Jv_CompiledEngine): Updated. (class _Jv_InterpreterEngine): Updated. From-SVN: r110763
2005-09-15re PR libgcj/16032 (libgcj should reject class files with incorrect version ↵Tom Tromey1-7/+27
numbers) PR libgcj/16032: * interpret.cc (AVAL1U): Resolve pool entry when not direct threaded. (AVAL2U): Likewise. (compile): Handle 'ldc class' specially. (_Jv_InterpMethod::run): Added special 'ldc class' instruction. * verify.cc (check_constant): Handle 'ldc class' for 1.5 classes. * defineclass.cc (handleCodeAttribute): Set new field. (MAJOR_1_1, MINOR_1_1, MAJOR_1_2, MINOR_1_2, MAJOR_1_3, MINOR_1_3, MAJOR_1_4, MINOR_1_4, MAJOR_1_5, MINOR_1_5): New defines. (parse): Check version numbers. (_Jv_ClassReader::is_15): New field. (_Jv_ClassReader): Initialize it. * include/java-interp.h (_Jv_InterpMethod::is_15): New field. From-SVN: r104325
2005-07-17* defineclass.cc (handleClassBegin): Remove unused variable.Andreas Jaeger1-1/+0
From-SVN: r102109
2005-06-24natClassLoader.cc (_Jv_UnregisterClass): Handle case where class' name is NULL.Tom Tromey1-13/+27
* java/lang/natClassLoader.cc (_Jv_UnregisterClass): Handle case where class' name is NULL. (_Jv_FindClass): Don't wait for class state. * java/lang/natVMClassLoader.cc (defineClass): Only unregister if name found. * include/java-interp.h (_Jv_DefineClass): Updated. * defineclass.cc (_Jv_DefineClass): Added 'name_result' argument. (struct _Jv_ClassReader): Likewise. (found_name): New field. (handleClassBegin): Set *found_name. (_Jv_VerifyMethodSignature): Handle case where ptr==NULL. (handleClassBegin): Throw error if super class not set. (read_methods): Correctly call check_tag and prepare_pool_entry. From-SVN: r101301
2005-06-15re PR libgcj/21906 (hang when invoking abstract method)Tom Tromey1-1/+2
gcc/java/: PR libgcj/21906: * class.c (make_method_value): Use soft_abstractmethod_node for abstract method. * java-tree.h (soft_abstractmethod_node): New define. (JTI_SOFT_ABSTRACTMETHOD_NODE): New enum constant. * decl.c (java_init_decl_processing): Initialize soft_abstractmethod_node. libjava/: PR libgcj/21906: * defineclass.cc (handleMethodsEnd): Set ncode for abstract methods. * include/jvm.h (_Jv_ThrowAbstractMethodError): Declare. * link.cc (_Jv_ThrowAbstractMethodError): Renamed. No longer static. (append_partial_itable): Use it. (set_vtable_entries): Likewise. From-SVN: r100992
2005-03-10New Stack Trace infrastructure.Bryce McKinlay1-13/+45
2005-03-10 Bryce McKinlay <mckinlay@redhat.com> New Stack Trace infrastructure. * Makefile.am (libgcj0_convenience_la_SOURCES): Add stacktrace.cc. (gnu/gcj/runtime/StackTrace.lo): Removed. (ordinary_java_source_files): Remove obsolete files. (nat_source_files): Remove obsolete files. Add natVMThrowable.cc. * configure.host (fallback_backtrace_h): Set backtrace header for mingw and cygwin targets. * configure.ac: Make symlink for fallback backtrace headers. * Makefile.in, configure: Rebuilt. * defineclass.cc (_Jv_ClassReader::read_one_code_attribute): Read 'LineNumberTable' attribute. (_Jv_ClassReader::read_one_class_attribute): Read 'SourceFile' attribute. (_Jv_ClassReader::handleCodeAttribute): Initialize method line table fields. * exception.cc: Remove unused include. * interpret.cc (DIRECT_THREADED, insn_slot): Moved to java-interp.h. (SAVE_PC): New macro. Save current PC in the interpreter frame. (NULLCHECK, NULLARRAYCHECK): Use SAVE_PC. (_Jv_InterpMethod::compile): Translate bytecode PC values in the line table to direct threaded instruction values. (_Jv_StartOfInterpreter, _Jv_EndOfInterpreter): Removed. (_Jv_InterpMethod::run): No longer member function. All callers updated. Remove _Unwind calls. Call SAVE_PC whenever a call is made or where an instruction could throw. (_Jv_InterpMethod::get_source_line): New. Look up source line numbers in line_table. * prims.cc (catch_segv): Construct exception after MAKE_THROW_FRAME. (catch_fpe): Likewise. * stacktrace.cc: New file. Stack trace code now here. * gnu/gcj/runtime/MethodRef.java: * gnu/gcj/runtime/NameFinder.java: Mostly reimplemented. Now simply calls addr2line to look up PC addresses in a given binary or shared library. * gnu/gcj/runtime/StackTrace.java, gnu/gcj/runtime/natNameFinder.cc, gnu/gcj/runtime/natStackTrace.cc: Removed. * gnu/java/lang/MainThread.java (call_main): Add comment warning that this function name is specially recognised by the stack trace code and shouldn't be changed. * include/java-interp.h (DIRECT_THREADED, insn_slot): Moved here. (struct _Jv_LineTableEntry, line_table, line_table_len): New. (_Jv_InterpMethod::run): Update declaration. (_Jv_StackTrace_): New friend. NameFinder and StackTrace no longer friends. (_Jv_InterpFrame): Renamed from _Jv_MethodChain. Add PC field. * include/java-stack.h: New file. Declarations for stack tracing. * include/jvm.h (_Jv_Frame_info): Removed. * java/lang/Class.h: Update friend declarations. * java/lang/VMClassLoader.java (getSystemClassLoader): Simplify exception message. * java/lang/VMThrowable.java (fillInStackTrace): Now native. (getStackTrace): Now native. (data): New RawDataManaged field. * java/lang/natClass.cc: Update includes. (forName): Use _Jv_StackTrace::GetCallingClass for calling-classloader check. (getClassLoader): Likewise. * java/lang/natRuntime.cc: Update includes. (_load): Use _Jv_StackTrace::GetFirstNonSystemClassLoader. * java/lang/natVMSecurityManager.cc: Update includes. (getClassContext): Use _Jv_StackTrace::GetClassContext. * java/lang/natVMThrowable.cc: New file. Native methods for VMThrowable. * java/lang/reflect/natArray.cc: Update includes. (newInstance): Use _Jv_StackTrace::GetCallingClass to implement accessibility check. * java/lang/reflect/natConstructor.cc: Update includes. (newInstance): Use _Jv_StackTrace::GetCallingClass to implement accessibility check. * java/lang/reflect/natField.cc: Update includes. (getAddr): Use _Jv_StackTrace::GetCallingClass to implement accessibility check. * java/lang/reflect/natMethod.cc: Update includes. (invoke): Use _Jv_StackTrace::GetCallingClass to implement accessibility check. * java/util/natResourceBundle.cc: Update includes. (getCallingClassLoader): Use _Jv_StackTrace::GetCallingClass. * java/util/logging/natLogger.cc: Update includes. Use _Jv_StackTrace::GetCallerInfo to get call-site info. * sysdep/generic/backtrace.h: Fallback backtrace code. Stub implementation. * sysdep/i386/backtrace.h: New. Fallback backtrace code. i386 implementation. From-SVN: r96253
2005-02-07defineclass.cc (handleClassBegin): Use _Jv_RegisterInitiatingLoader.Tom Tromey1-8/+6
* defineclass.cc (handleClassBegin): Use _Jv_RegisterInitiatingLoader. * java/lang/Class.h (_Jv_UnregisterInitiatingLoader): Declare. * java/lang/natVMClassLoader.cc (resolveClass): Don't register class. Use _Jv_UnregisterInitiatingLoader. * java/lang/natClassLoader.cc (_Jv_UnregisterInitiatingLoader): New function. From-SVN: r94717
2005-01-10PR libgcj/12016, PR libgcj/18405, PR libgcj/17738:Tom Tromey1-2/+2
* java/lang/Package.java (getPackages): Use VMClassLoader when appropriate. (getPackage): Likewise. * prims.cc (_Jv_CreateJavaVM): Call _Jv_RegisterBootstrapPackages. * include/jvm.h (_Jv_RegisterBootstrapPackages): Declare. * java/lang/VMClassLoader.java (getPackage): Rewrote. (getPackages): Likewise. (definedPackages): New field. (definePackageForNative): New method. * java/lang/Class.h (_Jv_FindClassInCache): Updated. * java/lang/natVMClassLoader.cc (loadClass): Updated. * defineclass.cc (handleClassBegin): Use ClassLoader.findLoadedClass. * java/lang/natClassLoader.cc (_Jv_RegisterInitiatingLoader): Rewrote. (struct _Jv_LoaderInfo): Removed. (initiated_classes): Likewise. (_Jv_UnregisterClass): Don't use initiated_classes. (_Jv_FindClassInCache): Likewise. Removed 'loader' argument. (_Jv_FindClass): Register classes found during boostrap. (BOOTSTRAP_CLASS_LIST_SIZE): New define. (bootstrap_class_list): New global. (bootstrap_index): Likewise. (_Jv_RegisterBootstrapPackages): New function. * gnu/gcj/runtime/natVMClassLoader.cc (findClass): Call definePackageForNative. (findClass): Updated. * gnu/gcj/runtime/VMClassLoader.java (definePackageForNative): New method. From-SVN: r93155
2004-11-25* Merged gcj-abi-2-dev-branch to trunk.Tom Tromey1-43/+39
(Actual changes too large to list in the commit message; see ChangeLog.) From-SVN: r91270
2004-08-23defineclass.cc: Include <stdio.h>.Hans Boehm1-0/+1
* defineclass.cc: Include <stdio.h>. * java/lang/natClassLoader.cc: Include <stdio.h>. From-SVN: r86434
2004-08-13re PR libgcj/17020 (gij should ignore all reserved method flags)Bryce McKinlay1-11/+10
PR libgcj/17020 Reported by Robin Green. * defineclass.cc (handleField): Don't throw exception on unrecognised modifier. Add FIXME comments for spec compliance. (handleMethod): Likewise. From-SVN: r85952
2004-08-11javaprims.h (_Jv_Utf8Const): Change struct to a class, with private fields ↵Per Bothner1-20/+18
and access methods. * gcj/javaprims.h (_Jv_Utf8Const): Change struct to a class, with private fields and access methods. (_Jv_NewStringUTF, _Jv_hashUtf8String): New function declarations. * gcj/cni.h (_Jv_NewStringUTF): Move to javaprims.h. * prims.cc (_Jv_Utf8COnst::init): New method implementation. ( _Jv_makeUtf8Const): Rewrite using new constructors. (hashUtf8String): Rename to +_Jv_hashUtf8String and make non-static. * defineclass.cc: Use new _Utf8Const access/convenience methods. * jni.cc: Likewise. * resolve.cc: Likewise. * gcj/field.h: Likewise. * include/jvm.h: Likewise. * java/lang/Class.h: Likewise. * java/lang/natClass.cc: Likwise. * java/lang/natClassLoader.cc: Likewise * java/lang/reflect/natMethod.cc: Likewise * verify.cc: Likewise. (_Jv_BytecodeVerifier::make_utf8_const): Optimize. (~_Jv_BytecodeVerifier): Don't need second _Jv_Free call. From-SVN: r85854
2004-07-19Print -verbose:message on "loading", not initialization.Per Bothner1-0/+2
* java/lang/Class.h (JV_STATE_LOADED, JV_STATE_COMPILED): Swap order. * defineclass.cc (_Jv_ClassReader::parse): Print message if gcj::verbose_class_flag. * java/lang/natClass.cc (initializeClass): Don't print message here. * java/lang/natClassLoader.cc (_Jv_WaitForState): If state was _JV_STATE_COMPILED, set to JV_STATE_LOADED and may print message. (_Jv_PrepareCompiledClass): Likewise. From-SVN: r84926
2004-05-06defineclass.cc (_Jv_ClassReader::prepare_pool_entry): Use ↵Bryce McKinlay1-4/+4
verify_field_signature and verify_method_signature... * defineclass.cc (_Jv_ClassReader::prepare_pool_entry): Use verify_field_signature and verify_method_signature, not _Jv_VerifyFieldSignature and _Jv_VerifyMethodSigntature. (_Jv_ClassReader::handleField): Likewise. (_Jv_ClassReader::handleMethod): Likewise. From-SVN: r81563
2004-04-20class.c (make_class_data): Add new field aux_info.Bryce McKinlay1-14/+18
2004-04-19 Bryce McKinlay <mckinlay@redhat.com> * class.c (make_class_data): Add new field aux_info. * decl.c (java_init_decl_processing): Push type and decl for `aux_info'. 2004-04-19 Bryce McKinlay <mckinlay@redhat.com> * gcj/cni.h (JvAllocObject): Remove these obsolete, undocumented CNI calls. * include/java-interp.h (_Jv_InterpClass): No longer extends java.lang.Class. * java/lang/Class.h (Class): Add new field `aux_info'. * boehm.cc (_Jv_MarkObj): Update java.lang.Class marking. * defineclass.cc: Remove Class<->_Jv_InterpClass casts. Use Class->aux_info instead. * jni.cc (_Jv_JNI_AllocObject): Use _Jv_AllocObject. * resolve.cc: Remove Class<->_Jv_InterpClass casts. Use Class->aux_info instead. * java/io/natObjectInputStream.cc (allocateObject): Use _Jv_AllocObject. * java/lang/natClass.cc (newInstance): Likewise. * java/lang/natClassLoader.cc (_Jv_NewClass): Likewise. * java/lang/natObject.cc (clone): Likewise. * java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Likewise. * java/lang/natVMClassLoader.cc (defineClass): Don't use JvAllocObject. Allocate klass->aux_info here for interpreted class. From-SVN: r80875
2003-10-24lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.Andrew Haley1-0/+2
2003-10-22 Andrew Haley <aph@redhat.com> * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New. (java_get_callee_fndecl): New. * jcf-parse.c (java_parse_file): Call emit_catch_table(). * java-tree.h (ctable_decl): New. (catch_classes): New. (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES. * decl.c (java_init_decl_processing): Add catch_class_type. Add ctable_decl. Add catch_classes field. * class.c (build_indirect_class_ref): Break out from build_class_ref. (make_field_value): Check flag_indirect_dispatch. (make_class_data): Ditto. Tidy uses of PUSH_FIELD_VALUE. Add field catch_classes. (make_catch_class_record): New. * java-tree.h (PUSH_FIELD_VALUE): Tidy. 2003-10-22 Andrew Haley <aph@redhat.com> * java/lang/natClass.cc (initializeClass): Call _Jv_linkExceptionClassTable. (_Jv_LinkSymbolTable): Call )_Jv_ThrowNoSuchMethodError. Call _Jv_Defer_Resolution on a method whose ncode is NULL. (_Jv_linkExceptionClassTable): New function. (_Jv_LayoutVTableMethods): If superclass looks like a constant pool entry, look it up. * java/lang/Class.h (struct _Jv_CatchClass): New. (_Jv_linkExceptionClassTable): New friend. (_Jv_Defer_Resolution): New friend. (class Class.catch_classes): New field. * include/java-interp.h (Jv_Defer_Resolution): New method. (_Jv_PrepareClass): Make a friend of _Jv_MethodBase. (_Jv_MethodBase.deferred): New field. (_Jv_Defer_Resolution): New function. * resolve.cc (_Jv_PrepareClass): Resolve deferred handlers. * exception.cc (get_ttype_entry): Change return type to void**. (PERSONALITY_FUNCTION): Remove all code related to using a Utf8Const* for a match type. Change match type to be a pointer to a pointer, rather than a pointer to a Class. * defineclass.cc (handleCodeAttribute): Initialize method->deferred. (handleMethodsEnd): Likewise. From-SVN: r72886
2003-07-29defineclass.cc (handleField): Throw exception if field name is duplicated.Tom Tromey1-10/+27
* defineclass.cc (handleField): Throw exception if field name is duplicated. (handleMethod): Throw exception for duplicate method. From-SVN: r69928
2003-01-24defineclass.cc (handleMethodsEnd): Precompute code for static method.Tom Tromey1-1/+20
* defineclass.cc (handleMethodsEnd): Precompute code for static method. (handleCodeAttribute): Likewise. * resolve.cc (ncode): Use run_class for unsynchronized static methods. * include/java-interp.h (class _Jv_InterpMethod): Declare run_class. * interpret.cc (run_synch_class): Initialize class. (run) [insn_invokestatic]: Don't initialize class. [insn_anewarray]: Likewise. [insn_multianewarray]: Likewise. (run_class): New function. From-SVN: r61727
2002-12-19natClassLoader.cc (defineClass0): Removed erroneous comment.Tom Tromey1-1/+1
* java/lang/natClassLoader.cc (defineClass0): Removed erroneous comment. * java/lang/ClassLoader.java (defineClass): Use chained exception when rethrowing. * defineclass.cc (handleClassBegin): Mark class as interpreted. * java/lang/reflect/Modifier.java (INVISIBLE, INTERPRETED): New constants. * resolve.cc (_Jv_PrepareMissingMethods): New function. (_Jv_PrepareClass): Use it. * include/java-interp.h (_Jv_IsInterpretedClass): Rewrote. (_Jv_InterpClass): _Jv_PrepareMissingMethods now friend. * java/lang/Class.h (Class::getModifiers): Mask with ALL_FLAGS. (Class): _Jv_PrepareMissingMethods now friend. * java/lang/natClassLoader.cc (defineClass0): Use JvSynchronize. Record `NULL' for system class loader. (_Jv_RegisterInitiatingLoader): Use JvSynchronize. Special case system class loader. (_Jv_FindClassInCache): Likewise. (_Jv_UnregisterClass): Use JvSynchronize. Free old loader info. (_Jv_FindClass): Special case system class loader. * java/lang/natClass.cc (_Jv_abstractMethodError): New function. (_Jv_SetVTableEntries): Put _Jv_abstractMethodError into empty vtable slots. (_Jv_LayoutVTableMethods): Don't generate vtable slot for a method in a final class. (_getDeclaredMethod): Don't return synthetic methods. (getDeclaredMethods): Likewise. (_getMethod): Likewise. (_getMethods): Likewise. From-SVN: r60319
2002-12-05Class.h (_Jv_SetVTableEntries): Updated declaration.Tom Tromey1-5/+9
* java/lang/Class.h (_Jv_SetVTableEntries): Updated declaration. * resolve.cc: Don't include AbstractMethodError.h. (_Jv_abstractMethodError): Removed. * defineclass.cc (handleMethodsBegin): Initialize method index to -1. * java/lang/natClass.cc (_Jv_LayoutVTableMethods): Don't set method index for "new" final method. (_Jv_SetVTableEntries): Compare index against -1 instead of using isVirtualMethod. Added `flags' argument. (_Jv_MakeVTable): Throw exception for abstract method in concrete class. From-SVN: r59847
2002-09-25* java/lang/natClassLoader.cc:Tom Tromey1-1/+0
(_Jv_PrepareCompiledClass): Throw NoClassDefFoundError, per spec. * resolve.cc: Include NoClassDefFoundError.h, not ClassNotFoundException.h. (_Jv_ResolvePoolEntry): Throw NoClassDefFoundError, per spec. * defineclass.cc: Don't include ClassNotFoundException.h. From-SVN: r57516
2002-06-24verify.cc (branch_prepass): Updated for change to exception handler type.Tom Tromey1-5/+6
* verify.cc (branch_prepass): Updated for change to exception handler type. (verify_instructions_0): Likewise. * defineclass.cc (handleCodeAttribute): Initialize `prepared'. (handleExceptionTableEntry): Updated for change to exception handler type. * java/lang/Class.h (Class): Removed _Jv_InterpMethodInvocation. * include/java-interp.h (_Jv_InterpMethodInvocation): Removed. (union _Jv_InterpPC): New. (class _Jv_InterpException): Changed types to _Jv_InterpPC. (class _Jv_InterpMethod): Added new `prepared' field. (class _Jv_InterpMethod): Added `compile' method. Removed `continue1' and `find_exception'. Changed arguments to `run'. * interpret.cc (union insn_slot): New. (find_exception): Removed. (run_normal): Removed most logic. (run_synch_object): Likewise; also, use JvSynchronize. (run_synch_class): Likewise. (run): Removed. (continue1): Renamed as `run'. Compile bytecode if required. Add new code to allow refinement of direct-threaded code at runtime. Handle exceptions. (SAVE_PC): Removed. (compile): New method. (SET_ONE, SET_INSN, SET_INT, SET_DATUM): New defines. (NULLARRAYCHECK): Don't use SAVE_PC. (pc_t): New typedef. (TAKE_GOTO, GET1S, GET1U, GET2U, AVAL1U, AVAL2U, AVAL2UP, SKIP_GOTO, GOTO_VAL, PCVAL, AMPAMP): New macros. From-SVN: r54968
2002-06-20For PR libgcj/7073:Tom Tromey1-19/+15
* resolve.cc (_Jv_PrepareClass): Only resolve superclass if it exists. * defineclass.cc (handleClassBegin): Superclass for interface is `null'. From-SVN: r54835
2001-12-10resolve.cc (_Jv_PrepareClass): Verify method here...Tom Tromey1-10/+1
* resolve.cc (_Jv_PrepareClass): Verify method here... * defineclass.cc (handleMethodsEnd): ... not here. * verify.cc (_Jv_BytecodeVerifier::initialize_stack): New method. (_Jv_BytecodeVerifier::verify_instructions_0) [op_return]: Ensure there are no uninitialized objects. (_Jv_BytecodeVerifier::state::this_type): New field. (_Jv_BytecodeVerifier::state::state): Initialize this_type. (_Jv_BytecodeVerifier::state::copy): Copy this_type. (_Jv_BytecodeVerifier::state::merge): Merge this_type. (_Jv_BytecodeVerifier::state::check_no_uninitialized_objects): Handle this_type. (_Jv_BytecodeVerifier::state::check_this_initialized): New method. (_Jv_BytecodeVerifier::state::set_initialized): Handle this_type. (_Jv_BytecodeVerifier::state::set_this_type): New method. (_Jv_BytecodeVerifier::verify_instructions_0) [op_putfield]: Allow assignment to fields of `this' before another initializer is run. From-SVN: r47826
2001-12-05defineclass.cc (character): Removed.Tom Tromey1-17/+2
* defineclass.cc (character): Removed. (prepare_character): Removed. (is_identifier_start): Use Character, not character. (is_identifier_part): Likewise. From-SVN: r47684
2001-12-04defineclass.cc (read_one_method_attribute): `end_pc' for an exception can be ↵Tom Tromey1-1/+3
equal to code length. * defineclass.cc (read_one_method_attribute): `end_pc' for an exception can be equal to code length. * verify.cc (_Jv_BytecodeVerifier::verify_instructions_0): Removed `start_PC' from error invocation where it didn't make sense, and updated error message. Use `copy' to copy a state. Only try to merge current state with saved state when we've fallen through from the previous instruction. (_Jv_BytecodeVerifier::pop_ref_or_return): New method. (_Jv_BytecodeVerifier::verify_instructions_0) [op_astore_0]: Use pop_ref_or_return. (_Jv_BytecodeVerifier::verify_instructions_0) [op_astore]: Likewise. (_Jv_BytecodeVerifier::push_jump_merge): Pass max_locals, not max_stack, to merge. (_Jv_BytecodeVerifier::verify_instructions_0): Likewise. (_Jv_BytecodeVerifier::push_jump_merge): Merge from new state into state at branch target, not vice versa. (_Jv_BytecodeVerifier::branch_prepass): Allow end of exception to be equal to code length. Removed redundant test to see if exception start is after exception end. (_Jv_BytecodeVerifier::verify_instructions_0): Type of argument to `finally' is Throwable. From-SVN: r47623
2001-12-04defineclass.cc (handleMethodsEnd): Invoke verifier here...Tom Tromey1-7/+11
* defineclass.cc (handleMethodsEnd): Invoke verifier here... (handleCodeAttribute): ... not here. * verify.cc (_Jv_BytecodeVerifier::state::state): Use `copy', not structure assignment. From-SVN: r47591
2001-11-26Fix for PR libgcj/2024, plus other class name cleanups:Tom Tromey1-77/+77
* include/jvm.h (_Jv_VerifyFieldSignature, _Jv_VerifyMethodSignature, _Jv_VerifyClassName, _Jv_VerifyIdentifier, _Jv_ClassNameSamePackage): Moved from ... * include/java-interp.h: ... here. * defineclass.cc (UTF8_PEEK): No longer conditional on interpreter. (_Jv_VerifyOne): Likewise. (_Jv_VerifyFieldSignature): Likewise. (_Jv_VerifyMethodSignature): Likewise. (is_identifier_start): Likewise. (is_identifier_part): Likewise. (_Jv_VerifyIdentifier): Likewise. (_Jv_VerifyClassName): Likewise. (_Jv_VerifyClassName): Likewise. (_Jv_ClassNameSamePackage): Likewise. (_Jv_VerifyClassName): Fail if class name is too long. * java/lang/natClassLoader.cc (_Jv_NewArrayClass): Disallow array of void. * java/lang/natClass.cc (forName): Check syntax of class name. Include IllegalArgumentException.h. From-SVN: r47334
2001-11-05Class.h (Class): Made _Jv_BytecodeVerifier a friend.Tom Tromey1-17/+7
* java/lang/Class.h (Class): Made _Jv_BytecodeVerifier a friend. * Makefile.in: Rebuilt. * Makefile.am (libgcj_la_SOURCES): Added verify.cc. * verify.cc: New file. * include/java-interp.h (_Jv_count_arguments): Declare. (_Jv_VerifyMethod): Likewise. (class _Jv_InterpMethod): Made _Jv_BytecodeVerifier a friend. (class _Jv_InterpException): Likewise. * resolve.cc (_Jv_count_arguments): Renamed from count_arguments. No longer static. Updated callers. * defineclass.cc (int_bits_to_float): Removed. (long_bits_to_double): Likewise. (prepare_pool_entry): Updated. (handleCodeAttribute): Verify method (commented out for now). From-SVN: r46796
2001-11-04defineclass.cc (handleClassBegin): Use Object::class$, not Class::class$, ↵Tom Tromey1-2/+2
when initializing interface superclass. * defineclass.cc (handleClassBegin): Use Object::class$, not Class::class$, when initializing interface superclass. From-SVN: r46754
2001-10-16Eliminate use of C++ static constructors.Bryce McKinlay1-5/+6
* interpret.cc: Remove static Utf8Consts. Use namespace gcj. * jni.cc: Likewise. * resolve.cc: Likewise. * defineclass.cc: Likewise. (_Jv_ClassReader::handleClassBegin): Synchronize call to _Jv_RegisterClass. * include/jvm.h (void_signature, clinit_name, init_name, finit_name): Declare in namespace gcj. * java/lang/Class.h (Class): Remove initialization for primitive types. (friend void _Jv_InitPrimClass): This is in prims.cc. * prims.cc (_Jv_InitPrimClass): Do primitive type initialization here instead. (void_signature, clinit_name, init_name, finit_name): Define in namespace gcj. (_Jv_CreateJavaVM): Call _Jv_InitThreads, _Jv_InitGC, and _Jv_InitializeSyncMutex from here. Initialize Utf8 constants. Initialize primitive types. * java/lang/natClassLoader.cc (_Jv_RegisterClasses): Don't call initialization routines. Don't synchronize. * java/lang/natRuntime.cc (_load): Synchronize on java.lang.Class across dlopen call. From-SVN: r46282
2001-10-07acinclude.m4: Fix spelling error of "separate" as "seperate".Joseph Myers1-1/+1
config: * acinclude.m4: Fix spelling error of "separate" as "seperate". gcc: * ChangeLog.2, c-decl.c, config/i386/i386.md, doc/gcc.texi, gcc.c, genmultilib, toplev.c: Fix spelling errors of "separate" as "seperate", and corresponding spelling errors of related words. gcc/ada: * 5oosinte.adb: Fix spelling error of "separate" as "seperate". gcc/testsuite: * gcc.c-torture/unsorted/unsorted.exp, lib/file-format.exp: Fix spelling errors of "separate" as "seperate". libffi: * src/x86/ffi.c: Fix spelling error of "separate" as "seperate". libjava: * defineclass.cc, java/awt/image/ColorModel.java, java/awt/image/SampleModel.java, java/lang/Package.java, java/security/cert/X509Extension.java: Fix spelling errors of "separate" as "seperate", and corresponding spelling errors of related words. libstdc++-v3: * docs/html/22_locale/locale.html, docs/html/faq/index.html: Fix spelling errors of "separate" as "seperate", and corresponding spelling errors of related words. * docs/html/faq/index.txt: Regenerate. From-SVN: r46063
2001-08-24Field.java (toString): Use Method.appendClassName.Tom Tromey1-3/+36
* java/lang/reflect/Field.java (toString): Use Method.appendClassName. * java/lang/reflect/Constructor.java (toString): Use Method.appendClassName. * java/lang/reflect/Method.java: Reindented. (appendClassName): New method. (toString): Use it. * defineclass.cc (handleMethod ): Initialize `throws' field of method. (read_one_method_attribute): Handle Exceptions attribute. * java/lang/reflect/natMethod.cc (ClassClass): Removed. (ObjectClass): Removed. (getType): Compute `exception_types'. * java/lang/Class.h (struct _Jv_Method): Added `throws' field. From-SVN: r45153
2001-05-24[multiple changes]Tom Tromey1-12/+12
2001-05-23 Tom Tromey <tromey@redhat.com> * posix-threads.cc (_Jv_self_cache): Renamed from self_cache. * gcj/Makefile.in: Rebuilt. * gcj/Makefile.am (gcj_HEADERS): Added libgcj-config.h. * gcj/javaprims.h: Include gcj/libgcj-config.h. * gcj/libgcj-config.h.in: New file. * libgcj.spec.in (*jc1): Added @HASH_SYNC_SPEC@. * configure: Rebuilt. * configure.in: Enable hash synchronization by default on some platforms. (HASH_SYNC_SPEC): New subst. (AC_CONFIG_HEADER): Added gcj/libgcj-config.h. Correctly use `test -z' instead of `test -n' in a couple places. (JV_HASH_SYNCHRONIZATION): Use AC_DEFINE; don't add to LIBGCJ_CXXFLAGS. * configure.host (enable_java_net_default): Initialize. (enable_hash_synchronization_default): New variable. 2001-05-23 Hans Boehm <Hans_Boehm@hp.com> * boehm.cc (_Jv_MarkObj): Don't mark sync_info when hash synchronization in use. (_Jv_MarkArray): Likewise. (_Jv_AllocBytes): Don't check return result. (handle_out_of_memory): New function. (_Jv_InitGC): Set GC_oom_fn. (trace_one_vtable): New global. (_Jv_AllocTraceOne): New function. * configure.in: Added --enable-hash-synchronization. * defineclass.cc, prims.cc, resolve.cc, java/lang/natString.cc, java/net/natInetAddress.cc: Remove _Jv_AllocBytesChecked. * nogc.cc (_Jv_AllocObj): Throw out-of-memory. (_Jv_AllocArray): Likewise. (_Jv_AllocBytes): Likewise. (_Jv_AllocPtrFreeObject): New function. (_Jv_AllocTraceOne): Likewise. * posix-threads.cc (_Jv_ThreadRegister): Handle slow pthread_self(). (self_cache): New global. (_Jv_ThreadSelf_out_of_line): New function. * prims.cc (_Jv_AllocBytesChecked): Removed. (_Jv_ThrowNoMemory): New function. (_Jv_AllocObject): Don't check for null return from allocator. (_Jv_NewObjectArray): Likewise. (_Jv_AllocPtrFreeObject): New function. (_Jv_NewPrimArray): Allocate pointer-free object if possible. * include/javaprims.h (_Jv_AllocPtrFreeObject): Declare. (_Jv_MonitorEnter, _Jv_MonitorExit): Don't return value. * include/boehm-gc.h (_Jv_AllocObj): Define. (_Jv_AllocPtrFreeObj): Define. * include/jvm.h (_Jv_AllocPtrFreeObj): Declare. (_Jv_ThrowNoMemory): Declare. (_Jv_AllocTraceOne): Declare. (_Jv_AllocBytesChecked): Removed. * include/posix-threads.h (_Jv_MutexInit, _Jv_MutexLock, _Jv_MutexUnlock): Handle LOCK_DEBUG. (_Jv_ThreadSelf): Handle case where system pthread_self() is slow. * java/lang/Class.h (Class): Declare _Jv_AllocPtrFreeObj as friend. * java/lang/Object.h (sync_info): Conditional upon presence of hash synchronization. * java/lang/natObject.cc: Much new code to handle thin locks and hash synchronization. * java/lang/natString.cc (_Jv_AllocString): Allocate pointer-free object if possible. From-SVN: r42519
2001-03-25exception.cc (java_eh_info): Make value type jthrowable.Richard Henderson1-13/+10
* exception.cc (java_eh_info): Make value type jthrowable. (_Jv_type_matcher): Remove now unneeded cast. (_Jv_Throw): Make argument type jthrowable. Munge name for SJLJ_EXCEPTIONS here ... * gcj/cni.h: ... not here. (JvThrow): Remove. * gcj/javaprims.h (_Jv_Throw, _Jv_Sjlj_Throw): Update declarations. * defineclass.cc, interpret.cc, jni.cc, posix-threads.cc, prims.cc, resolve.cc, gnu/gcj/runtime/natFirstThread.cc, gnu/gcj/xlib/natDrawable.cc, gnu/gcj/xlib/natFont.cc, gnu/gcj/xlib/natWMSizeHints.cc, gnu/gcj/xlib/natWindowAttributes.cc, gnu/gcj/xlib/natXImage.cc, java/io/natFile.cc, java/io/natFileDescriptorEcos.cc, java/io/natFileDescriptorPosix.cc, java/io/natFileDescriptorWin32.cc, java/io/natFileWin32.cc, java/lang/natClass.cc, java/lang/natClassLoader.cc, java/lang/natDouble.cc, java/lang/natObject.cc, java/lang/natPosixProcess.cc, java/lang/natRuntime.cc, java/lang/natString.cc, java/lang/natSystem.cc, java/lang/natThread.cc, java/lang/reflect/natArray.cc, java/lang/reflect/natConstructor.cc, java/lang/reflect/natField.cc, java/lang/reflect/natMethod.cc, java/util/zip/natDeflater.cc, java/util/zip/natInflater.cc: Use throw, not JvThrow or _Jv_Throw. From-SVN: r40838
2001-02-23Change to sometimes include class name in ClassFormatError message.Per Bothner1-49/+93
From-SVN: r40030
2001-02-15defineclass.cc: Don't include alloca.h.Anthony Green1-4/+1
2001-02-15 Anthony Green <green@redhat.com> * defineclass.cc: Don't include alloca.h. (prepare_pool_entry): Convert alloca to __builtin_alloca. * interpret.cc (run_normal): Ditto. (continue1): Ditto. * java/lang/natDouble.cc (parseDouble): Ditto. From-SVN: r39719
2000-10-20From Arno J. Klaassen:Tom Tromey1-0/+1
* interpret.cc: Include <stdlib.h> for alloca. * defineclass.cc: Include <stdlib.h> for alloca. From-SVN: r36986
2000-10-06natField.cc (BooleanClass): Don't define.Tom Tromey1-7/+3
* java/lang/reflect/natField.cc (BooleanClass): Don't define. * java/lang/reflect/natArray.cc (BooleanClass): Don't define. * java/lang/Class.h (Object): Added `class$' field. * java/lang/Object.h (Object): Added `class$' field. * defineclass.cc (ClassClass): Use `class$' form. (ClassObject): Likewise. * resolve.cc (ClassObject): Use `class$' form. (ObjectClass): Likewise. * interpret.cc (ClassError): Removed. * java/net/natPlainDatagramSocketImpl.cc (BooleanClass): Use `class$' form. (IntegerClass): Likewise. * java/net/natPlainSocketImpl.cc (BooleanClass): Use `class$' form. * java/lang/natClassLoader.cc (CloneableClass): Use `class$' form. (ObjectClass, ClassClass, VMClassLoaderClass, ClassLoaderClass, SerializableClass): Likewise. Include Serializable.h, Cloneable.h. * java/lang/natSystem.cc (SystemClass): Removed. (init_properties): Use `class$' form. * java/lang/natObject.cc (CloneableClass): Removed. (clone): Use `class$' form. * java/lang/natClass.cc (CloneableClass): Use `class$' form. (ObjectClass, ErrorClass, ClassClass, MethodClass, FieldClass, ConstructorClass): Likewise. * java/lang/reflect/natMethod.cc (ObjectClass): Use `class$' form. (ClassClass, VoidClass, ByteClass, ShortClass, CharacterClass, IntegerClass, LongClass, FloatClass, DoubleClass): Likewise. * java/io/natObjectInputStream.cc (ObjectClass): Use `class$' form. (ClassClass): Likewise. * include/jvm.h (StringClass): Use `class$' form. * prims.cc (ObjectClass): Removed. (_Jv_RunMain): Use `class$' form. (_Jv_AllocObject): Likewise. * jni.cc (ClassClass): Use `class$' form. (ThrowableClass): Likewise. (ObjectClass): Likewise. (MethodClass): Likewise. (ThreadGroupClass): Likewise. (NativeThreadClass): Likewise. * boehm.cc (ObjectClass): Removed. (ClassClass): Removed. (_Jv_MarkObj): Use `class$' form. * gcj/field.h (JvFieldIsRef): Use `class$' form. Include RawData.h. From-SVN: r36740
2000-09-14defineclass.cc: Include alloca.h only if HAVE_ALLOCA_H.Alexandre Oliva1-0/+2
* defineclass.cc: Include alloca.h only if HAVE_ALLOCA_H. * java/lang/natDouble.cc: Likewise. * java/lang/reflect/natMethod.cc: Likewise. * interpret.cc: Likewise. Fix NULLCHECKs that tested a _Jv_word. From-SVN: r36404
2000-05-31cni.h: Include <string.h>.Bryce McKinlay1-0/+1
2000-05-31 Bryce McKinlay <bryce@albatross.co.nz> * gcj/cni.h: Include <string.h>. * defineclass.cc: Include <alloca.h>. * interpret.cc: Ditto. * gij.cc: Include <stdlib.h>. From-SVN: r34311
2000-03-07All files: Updated copyright information.Tom Tromey1-1/+1
* All files: Updated copyright information. * COPYING: New file. * COPYING.LIB: Removed. * LIBGCJ_LICENSE: We now use GPL + special exception. From-SVN: r32387
2000-02-04defineclass.cc (handleMethodsBegin): Allocate _Jv_MethodBase pointers.Tom Tromey1-9/+24
* defineclass.cc (handleMethodsBegin): Allocate _Jv_MethodBase pointers. (handleMethodsEnd): Fixed error messages. Create a _Jv_JNIMethod if the method is native. * resolve.cc (ncode): Don't handle native methods. (_Jv_JNIMethod::ncode): New method. (_Jv_PrepareClass): Handle native methods. * jni.cc (call): Renamed from _Jv_JNI_conversion_call. Include AbstractMethodError.h. (add_char): New function. (mangled_name): Likewise. * include/java-interp.h (class _Jv_JNIMethod): New class. (class _Jv_MethodBase): New class. (class _Jv_InterpMethod): Derive from _Jv_MethodBase. (_Jv_InterpClass): Changed `interpreted_methods' field to type `_Jv_MethodBase'. * include/jvm.h (_Jv_FindSymbolInExecutable): Declare. * java/lang/natRuntime.cc (libraries_size, libraries_count, libraries): New globals. (add_library): New function. (_Jv_FindSymbolInExecutable): New function. * java/lang/natClassLoader.cc (initiated_classes, loaded_classes): Now static. From-SVN: r31790