aboutsummaryrefslogtreecommitdiff
path: root/libjava/link.cc
AgeCommit message (Collapse)AuthorFilesLines
2009-03-12[multiple changes]Andrew Haley1-1/+1
2009-03-11 Andrew Haley <aph@redhat.com> * java/lang/natClassLoader.cc (_Jv_RegisterClassHookDefault): Clear INTERPRETED access modifier. 2009-03-11 Tom Tromey <tromey@redhat.com> * link.cc (_Jv_Linker::find_field): Pass the field_type to _Jv_CheckOrCreateLoadingConstraint, not the class that is requesting the field. From-SVN: r144818
2008-08-22re PR libgcj/8995 (race cases in interpreter)Andrew Haley1-25/+51
2008-08-22 Andrew Haley <aph@redhat.com> PR libgcj/8895: * interpret-run.cc (REWRITE_INSN): Null this macro. * include/jvm.h (class _Jv_Linker): Declare resolve_mutex, init. (read_cpool_entry, write_cpool_entry): New functions. * link.cc (_Jv_Linker::resolve_mutex): new. (_Jv_Linker::init): New function. (_Jv_Linker::resolve_pool_entry): Use {read,write}_cpool_entry to ensure atomic access to constant pool entries. From-SVN: r139492
2008-03-13natClassLoader.cc (_Jv_RegisterInitiatingLoader): Check loading constraints.Tom Tromey1-40/+33
* java/lang/natClassLoader.cc (_Jv_RegisterInitiatingLoader): Check loading constraints. (_Jv_CheckOrCreateLoadingConstraint): New function. * java/lang/ClassLoader.java (loadingConstraints): New field. * link.cc (_Jv_Linker::find_field): Use _Jv_CheckOrCreateLoadingConstraint. (_Jv_Linker::check_loading_constraints): New function. (_Jv_Linker::resolve_method_entry): Use check_loading_constraints. (_Jv_Linker::append_partial_itable): Likewise. (_Jv_Linker::layout_vtable_methods): Likewise. * include/jvm.h (_Jv_Linker::check_loading_constraints): Declare. (_Jv_CheckOrCreateLoadingConstraint): Declare. From-SVN: r133172
2008-01-18re PR c++/33887 (Reference to bitfield gets wrong value when optimizing)Alexandre Oliva1-3/+5
PR c++/33887 * link.cc (_Jv_Linker::prepare_constant_time_tables): has_interfaces is boolean, treat it as such. From-SVN: r131632
2007-07-31configure.ac (INTERPRETER): New AM_CONDITIONAL.David Daney1-2/+6
* configure.ac (INTERPRETER): New AM_CONDITIONAL. * scripts/makemake.tcl (package_map): Mark jdwp and jvmti packages as being for interpreter only. Place interpreter related files in 'if INTERPRETER' block. (interpreter_package_files): New list. (interpreter_header_vars): Ditto. (emit_package_rule_to_list): Renamed from emit_package_rule with new target list parameter. (emit_package_rule): Rewritten to call emit_package_rule_to_list. (emit_interpreter_rule): New function. (emit_source_var): Place interpreter related files in interpreter_header_vars. * Makefile.am (ACLOCAL_AMFLAGS): Add -I libltdl. (libgcj_interpret_source_files): New variable. (libgcj_la_SOURCES): Move jvmti.cc and interpret.cc to libgcj_interpret_source_files and include libgcj_interpret_source_files. (nat_jdwp_source_files): New variable. (nat_jvmti_source_files): Ditto. (nat_source_files): Move jdwp and jvmti related files to nat_jdwp_source_files and nat_jvmti_source_files and include nat_jdwp_source_files and nat_jvmti_source_files. * Makefile.in: Regenerate. * include/Makefile.in: Ditto. * testsuite/Makefile.in: Ditto. * gcj/Makefile.in: Ditto. * sources.am: Ditto. * configure: Ditto. * include/config.h.in: Ditto. * interpret.cc: Remove #ifdef INTERPRETER block. * stacktrace.cc (UnwindTraceFn): Do not handle proxy frames if interpreter disabled. * include/java-interp.h (_Jv_FrameType): Move outside of #ifdef INTERPRETER block. * include/execution.h (_Jv_IndirectCompiledEngine::do_get_closure_list, _Jv_InterpreterEngine, _Jv_soleInterpreterEngine): Place in #ifdef INTERPRETER block. * jni.cc (jvmti.h, jvmti-int.h): Only include if INTERPRETER is defined. (_Jv_JNI_PopSystemFrame, _Jv_JNI_GetEnv): Only do jvmti processing if INTERPRETER is defined. * prims.cc (jvmti.h, jvmti-int.h, Jdwp.h, VMVirtualMachine.h): Only include if INTERPRETER is defined. (defaultJdwpOptions, jdwpOptions, jvmti_agent_onload_func, jvmti_agent_onunload_func, jvmti_agentonload, jvmti_agentonunload, jvmti_agent_opts, load_jvmti_agent): Only define if INTERPRETER is defined. (parse_x_arg): Only process 'runjdwp:' if INTERPRETER is defined. (parse_init_args): Only process jvmti related options if INTERPRETER is defined. (_Jv_CreateJavaVM): Only call _Jv_JVMTI_Init if INTERPRETER is defined. (_Jv_RunMain): Only do jvmti and jdwp processing if INTERPRETER is defined. * link.cc (jvmti.h, jvmti-int.h): Only include if INTERPRETER is defined. (_Jv_ThrowNoClassDefFoundError, _Jv_Linker::create_error_method): Define if if INTERPRETER is not defined. (_Jv_Linker::wait_for_state): Only do jvmti proccessing if INTERPRETER is defined. * boehm.cc (closure_list_pointer, finalize_closure_list, _Jv_ClosureListFinalizer): Only define if INTERPRETER is defined. * java/lang/natThread.cc (jvmti.h, jvmti-int.h): Only include if INTERPRETER is defined. (finish_, _Jv_NotifyThreadStart): Only do jvmti proccessing if INTERPRETER is defined. * java/lang/Class.h (_Jv_InterpreterEngine): Move declaration and friend declaration inside #ifdef INTERPRETER block. * java/lang/natClass.cc (_Jv_ClosureList::releaseClosures, _Jv_ClosureList::registerClosure, _Jv_GetInterpClassSourceFile): Only define if INTERPRETER is defined. * java/lang/reflect/natVMProxy.cc (UnsupportedOperationException.h): Include. (generateProxyClass): Throw UnsupportedOperationException unless INTERPRETER is defined. From-SVN: r127097
2007-03-23link.cc (_Jv_Linker::resolve_method_entry): Ensure that the argument types ↵Gary Benson1-8/+34
and the return type of the found method match... 2007-03-23 Gary Benson <gbenson@redhat.com> * link.cc (_Jv_Linker::resolve_method_entry): Ensure that the argument types and the return type of the found method match those expected by the calling method. From-SVN: r123156
2007-03-07ffi.h.in (ffi_closure_alloc, [...]): New.Alexandre Oliva1-12/+23
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-01-25link.cc (_Jv_Linker::wait_for_state): Add JVMTI CLASS_PREPARE notification.Keith Seitz1-63/+77
* link.cc (_Jv_Linker::wait_for_state): Add JVMTI CLASS_PREPARE notification. From-SVN: r121157
2007-01-10natDouble.cc (toString): Added parens.Tom Tromey1-11/+13
* java/lang/natDouble.cc (toString): Added parens. * gnu/gcj/io/shs.h (PROTO): Define. * link.cc (resolve_pool_entry): Added missing braces. From-SVN: r120652
2007-01-09Merged gcj-eclipse branch to trunk.Tom Tromey1-97/+120
From-SVN: r120621
2006-06-08jvm.h (_Jv_Linker::maybe_adjust_signature): New.Andrew Haley1-26/+63
2006-06-07 Andrew Haley <aph@redhat.com> * include/jvm.h (_Jv_Linker::maybe_adjust_signature): New. (_Jv_Linker::uaddr): New. * link.cc (resolve_pool_entry): Call search_method_in_superclasses instead of an open-coded loop around search_method_in_class. (search_method_in_class): Add a new arg, check_perms. (search_method_in_superclasses): New. (link_symbol_table): Call maybe_adjust_signature() to extract the least significnt bit of the signature pointer. Do this three times, for instace method calls, static methods, and interfaces. Call search_method_in_superclasses() instead of _Jv_LookupDeclaredMethod. (typedef uaddr): Delete. From-SVN: r114486
2006-06-05re PR libgcj/27860 (build failure on m68k: error: 'ffi_closure' does not ↵Andreas Schwab1-3/+3
name a type) PR libgcj/27860 * link.cc: Check for closure support in libffi with FFI_CLOSURES. From-SVN: r114411
2006-05-10prims.cc (_Jv_soleIndirectCompiledEngine): New.Andrew Haley1-1/+2
2006-05-09 Andrew Haley <aph@redhat.com> * prims.cc (_Jv_soleIndirectCompiledEngine): New. * include/execution.h (Jv_CompiledEngine::do_allocate_static_fields): Remove body. (_Jv_CompiledEngine::allocate_field_initializers): New. (_Jv_CompiledEngine::_Jv_CompiledEngine): Initialize allocate_field_initializers. (class _Jv_IndirectCompiledClass): New. (struct _Jv_IndirectCompiledEngine): New. * java/lang/Class.h: (IndirectCompiledEngine): New. * java/lang/natClassLoader.cc (_Jv_NewClassFromInitializer): Set engine to _Jv_soleIndirectCompiledEngine * link.cc (ensure_fields_laid_out): Call engine->allocate_field_initializers(). From-SVN: r113674
2006-05-04re PR libgcj/26861 (VirtualMachineError in interperter.)Tom Tromey1-15/+0
PR libgcj/26861: * interpret.cc (run) <insn_getfield>: Removed 0xffff check. <insn_putfield>: Likewise. (NULLCHECK): Define unconditionally. * link.cc (ensure_class_linked): Removed dead code. From-SVN: r113531
2006-04-29link.cc (_Jv_Linker::resolve_pool_entry): Don't pass vtable_index to ↵Bryce McKinlay1-6/+1
resolve_method. 2006-04-28 Bryce McKinlay <mckinlay@redhat.com> * link.cc (_Jv_Linker::resolve_pool_entry): Don't pass vtable_index to resolve_method. * interpret.cc (insn_invokevirtual): Use method->index, not vtable_index. Check accflag FINAL to determine finals. Only do explicit null check if calling a final method. Use throw_null_pointer_exception. (invokevirtual_resolved): Likewise. (null_pointer_exc): Remove static field. (throw_null_pointer_exception): Always define. Throw a new NullPointerException every time. * include/java-interp.h (_Jv_ResolvedMethod): Remove vtable_index field. * include/execution.h (resolve_method): Remove vtable_index argument. From-SVN: r113370
2006-04-24lang.c (java_init): Handle flag_indirect_classes.Andrew Haley1-0/+36
2006-04-21 Andrew Haley <aph@redhat.com> * lang.c (java_init): Handle flag_indirect_classes. * jvgenmain.c: Use "class$$" instead of "class$". * mangle.c (java_mangle_decl): Accept RECORD_TYPEs sw well as DECLs. (mangle_class_field): Special case "class$$" as well as "class$". * constants.c (build_ref_from_constant_pool): If flag_indirect_classes, generate a ref into the heap. * decl.c (constants_field_decl_node, constants_data_field_decl_node): New. * class.c (build_static_class_ref): New. (build_classdollar_field): Factor out from build_class_ref(). (make_field_value): Handle static fields in heap. (make_class_data): Make sure we get a static ref to class. Make class initializer const if flag_indirect_classes. (register_class): Build a class_ref for initialization if flag_indirect_classes. (emit_indirect_register_classes): New. 2006-04-21 Andrew Haley <aph@redhat.com> * include/execution.h (struct _Jv_CompiledEngine): Define for compiled classes. * java/lang/natClassLoader.cc (_Jv_RegisterClasses): Call _Jv_RegisterLibForGc. (_Jv_RegisterClasses_Counted): Likewise. (_Jv_NewClassFromInitializer): New. (_Jv_RegisterNewClasses): New. * sources.am: Regenerate. * boehm.cc (_Jv_GC_has_static_roots): new. (_Jv_InitGC): Call GC_register_has_static_roots_callback. (filename_node, find_file, _Jv_print_gc_store, new_node, _Jv_GC_has_static_roots, _Jv_RegisterLibForGc): New. * scripts/makemake.tcl: Add -fno-indirect-classes. * Makefile.in: Regenerate. * link.cc (resolve_pool_entry): Allocate constant pool. Allocate fields. From-SVN: r113224
2006-03-15re PR java/26390 (Problem dispatching method call when method does not exist ↵Tom Tromey1-9/+17
in superclass) gcc/java PR java/26390: * class.c (get_interface_method_index): Don't put <clinit> into interface table. libjava PR java/26390: * link.cc (get_interfaces): Skip <clinit>. (append_partial_itable): Likewise. From-SVN: r112093
2006-03-07* link.cc: Include ffi.h if USE_LIBFFI defined.David Daney1-0/+4
From-SVN: r111815
2006-02-21link.cc: Added variant of create_error_method that will not complain about ↵Robert Schuster1-14/+18
unused... 2006-02-21 Robert Schuster <robertschuster@fsfe.org> * link.cc: Added variant of create_error_method that will not complain about unused parameter if compiled with USE_LIBFFI not being defined. (_Jv_Linker::find_field_helper): Fixed indentation. (_Jv_Linker::create_error_method): Fixed indentation. (_Jv_Linker::link_symbol_table): Fixed indentation. From-SVN: r111331
2006-02-09Class.h (_Jv_IDispatchTable): Make it a struct.Bryce McKinlay1-26/+21
2006-02-09 Bryce McKinlay <mckinlay@redhat.com> * java/lang/Class.h (_Jv_IDispatchTable): Make it a struct. Put 'itable' inline, instead of as a pointer. (java::lang::Class): Put 'idt' in anonymous union with 'ioffsets'. * link.cc (null_idt): Update definition. (_Jv_Linker::prepare_constant_time_tables): Allocate klass->idt as a single struct. Use _Jv_AllocBytes, not _Jv_AllocRawObj. (_Jv_Linker::generate_itable): Update to use 'ioffsets'. (_Jv_Linker::find_iindex): Likewise. Update comment. * java/lang/natClass.cc (_Jv_LookupInterfaceMethodIdx): Update for _Jv_IDispatchTable change. (_Jv_IsAssignableFrom): Likewise. From-SVN: r110818
2006-02-08link.cc (_Jv_Linker::print_class_loaded): Declare string constants as "const ↵Bryce McKinlay1-2/+2
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-53/+69
* 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
2006-02-032006-02-03 Robert Schuster <robertschuster@fsfe.org>Robert Schuster1-1/+1
* link.cc: (_Jv_Linker::create_error_method): Added missing (void *) cast. From-SVN: r110544
2006-02-03re PR libgcj/26073 (libjava fails to compile)Robert Schuster1-45/+54
Fixes PR #26073. 2006-02-03 Robert Schuster <robertschuster@fsfe.org> * include/jvm.h: (_Jv_Linker::create_error_method): New method declaration. * link.cc: (_Jv_Linker::create_error_method): New method. (_Jv_Linker::link_symbol_table): Use new method above. From-SVN: r110543
2006-02-012006-02-01 Robert Schuster <robertschuster@fsfe.org>Robert Schuster1-33/+158
* link.cc: (_Jv_Linker::find_field_helper): Added checks. (_Jv_Linker::find_field): Use exception swallowing class resolution and added early return. (_Jv_ThrowNoClassDefFoundErrorTrampoline): New function. (_Jv_Linker::link_symbol_table): Use exception swallowing class resolution, added ffi_closure installation routine, use _Jv_ThrowNoClassDefFoundError for missing static method. (_Jv_Linker::ensure_class_linked): Added string check which does not trigger class resolution. * java/lang/natClassLoader.cc: (_Jv_FindClassNoException): New method. * java/lang/Class.h: (_Jv_FindClassNoException): New method declaration. * include/jvm.h: (_Jv_FindClassNoException): New method declaration. (_Jv_FindClassFromSignatureNoException): New method declaration. * prims.cc: (_Jv_FindClassFromSignatureNoException): New method. * gcj/javaprims.h: (_Jv_equalsUtf8Classname): New method declaration. (_Jv_isPrimitiveOrDerived): Dito. * prims.cc: (_Jv_equalsUtf8Classnames): New method. (_Jv_isPrimitiveOrDerived): New method. * verify.cc: (ref_intersection::equals): Use new classname comparison method. (type::compatible): Use new classname comparison method. Added check whether LHS' type is java.lang.Object . (type::resolve): Added new optional debug message and simplified if-expression. (type::to_array): Added codepath that generates an array type without resolving the element type. From-SVN: r110474
2005-12-08Object.h (throwNoSuchMethodError): New method.Andrew Haley1-18/+58
2005-12-08 Andrew Haley <aph@redhat.com> * java/lang/Object.h (throwNoSuchMethodError): New method. * java/lang/Object.java (throwNoSuchMethodError): New method. * include/jvm.h (_Jv_ThrowNoSuchFieldError): Declare. * link.cc (_Jv_ThrowNoSuchFieldError): New. (link_symbol_table): Don't throw a NoSuchFieldError if a field is missing. Instead, set the otable entry to zero. (link_symbol_table): If we don't find a nonstatic method, insert the vtable offset of Object.throwNoSuchMethodError() into the otable. From-SVN: r108231
2005-10-13re PR java/24251 (BC-compiled interfaces in libgcj can't be called from ↵Andrew Haley1-2/+3
non-BC code) 2005-10-12 Andrew Haley <aph@redhat.com> PR java/24251 * link.cc (ensure_method_table_complete): Install Miranda methods for interfaces too. From-SVN: r105375
2005-09-06re PR libgcj/23739 (JNI: IsAssignableFrom reverses arguments)Tom Tromey1-1/+1
PR libgcj/23739: * testsuite/libjava.jni/pr23739.c: New file. * testsuite/libjava.jni/pr23739.java: New file. * testsuite/libjava.jni/pr23739.out: New file. * jni.cc (_Jv_JNI_IsAssignableFrom): Reversed arguments. * java/lang/reflect/natMethod.cc (invoke): Updated. * java/lang/natClass.cc (isAssignableFrom): Updated. (isInstance): Likewise. (_Jv_IsAssignableFrom): Reversed arguments. (_Jv_IsInstanceOf): Updated. (_Jv_CheckCast): Likewise. (_Jv_CheckArrayStore): Likewise. (_Jv_IsAssignableFromSlow): Reversed arguments. (_Jv_InterfaceAssignableFrom): Likewise. * link.cc (verify_type_assertions): Updated. * prims.cc (_Jv_CheckAccess): Updated. From-SVN: r103953
2005-08-17class.c (make_class_data): Always emit JV_STATE_PRELOADING for class' ↵Tom Tromey1-2/+1
initial state. gcc/java: * class.c (make_class_data): Always emit JV_STATE_PRELOADING for class' initial state. libjava: * java/lang/Class.h (_Jv_IsBinaryCompatibilityABI): Declare as friend. * include/jvm.h (_Jv_IsBinaryCompatibilityABI): New function. * testsuite/libjava.lang/bclink.java: New file. * testsuite/libjava.lang/bclink.out: New file. * link.cc (print_class_loaded): Changed ABI test to look at various _syms fields. From-SVN: r103225
2005-06-15re PR libgcj/21906 (hang when invoking abstract method)Tom Tromey1-4/+5
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-05-13[multiple changes]Bryce McKinlay1-4/+2
2005-05-12 Bryce McKinlay <mckinlay@redhat.com> * include/jvm.h (gcj::verifyClasses): Declare. * link.cc (gcj::verbose_class_flag): Moved. * prims.cc (gcj::verifyClasses): Define here. (gcj::verbose_class_flag): Move definition here. (_Jv_Linker::wait_for_state): Don't call verify_class if gcj::verifyClasses is not set. * gij.cc (main): Set gcj::verifyClasses when '-noverify' is given. 2005-05-12 Aaron Luchko <aluchko@redhat.com> * gij.cc (main): Recognize '-verify', '-noverify', and '-verifyremote' 2005-05-12 Aaron Luchko <aluchko@redhat.com> * gcj.texi: Add '-verify', '-noverify', and '-verifyremote'. From-SVN: r99646
2005-04-29re PR java/19285 (Interfaces not initialized by static field access)Andrew Haley1-8/+16
2005-04-27 Andrew Haley <aph@redhat.com> PR java/19285 * prims.cc (_Jv_ResolvePoolEntry): New function. * include/jvm.h (_Jv_Linker::find_field): New arg: found_class. * link.cc (_Jv_Linker::find_field): New arg: found_class. (resolve_pool_entry): Initialize the class in which a field is found. (link_symbol_table): Pass new arg to found_class. From-SVN: r99006
2005-04-05jni.cc (_Jv_JNI_GetAnyFieldID): Throw ClassNotFoundException.Tom Tromey1-2/+7
* jni.cc (_Jv_JNI_GetAnyFieldID): Throw ClassNotFoundException. * java/lang/reflect/natMethod.cc (_Jv_GetTypesFromSignature): Rewrote to use _Jv_FindClassFromSignature. * verify.cc (resolve): throw NoClassDefFoundError. * link.cc (resolve_field): Throw NoClassDefFoundError. (find_field): Likewise. * prims.cc (_Jv_FindClassFromSignature): Removed recursion. Handle error cases. Added 'endp' argument. * include/jvm.h (_Jv_FindClassFromSignature): Updated prototype. From-SVN: r97660
2005-03-17link.cc (ensure_class_linked): Removed #ifdef.Tom Tromey1-10/+1
* link.cc (ensure_class_linked): Removed #ifdef. (print_class_loaded): Likewise. (wait_for_state): Likewise. * java/lang/Class.h (_Jv_IsInterpretedClass): Always declare. * include/jvm.h (_Jv_IsInterpretedClass): Moved from... * include/java-interp.h: ... here. From-SVN: r96589
2005-03-07re PR java/20215 (gcj does not accept classes with same name fields)Tom Tromey1-23/+28
PR java/20215: * include/jvm.h (_Jv_Linker::find_field_helper): Updated. * link.cc (find_field_helper): Added 'type' argument. (find_field): Updated. From-SVN: r96032
2005-02-19link.cc (make_vtable): Remove abstract method check.Tom Tromey1-35/+16
* link.cc (make_vtable): Remove abstract method check. (append_partial_itable): Likewise. From-SVN: r95268
2005-02-19re PR java/20056 ('verification failed: incompatible type on stack' with ↵Tom Tromey1-0/+12
--indirect-dispatch) PR java/20056: * include/jvm.h (_Jv_Linker::has_field_p): Declare. * link.cc (has_field_p): New function. * verify.cc (check_field_constant): Added 'putfield' argument. (verify_instructions_0): Updated. (type::equals): New method. From-SVN: r95259
2005-02-17Class.h (_Jv_GetMethodString): Updated declaration.Tom Tromey1-17/+23
* java/lang/Class.h (_Jv_GetMethodString): Updated declaration. * java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Updated. * java/lang/natClass.cc (_Jv_LookupInterfaceMethod): Updated. * link.cc (_Jv_GetMethodString): Added 'derived' argument. Changed type of second argument. Rewrote. (make_vtable): Use it. (append_partial_itable): Updated. (layout_vtable_methods): Updated. From-SVN: r95181
2005-02-02* link.cc: Include <stdio.h>Hans Boehm1-0/+2
From-SVN: r94623
2005-01-10re PR libgcj/18868 (Interface containing anonymous class breaks gij)Tom Tromey1-153/+119
PR libgcj/18868: * include/jvm.h (_Jv_Linker::find_field): Declare. (_Jv_Linker::find_field_helper): Likewise. * link.cc (find_field_helper): New method. (find_field): Likewise. (resolve_pool_entry): Use it. Throw NoSuchFieldError when field not found. (link_symbol_table): Use find_field. From-SVN: r93151
2004-12-01no-threads.h (_Jv_ThreadDestroyData): Removed argument name.Tom Tromey1-0/+1
* include/no-threads.h (_Jv_ThreadDestroyData): Removed argument name. (_Jv_ThreadRegister): Likewise. (_Jv_MutexCheckMonitor): Likewise. * link.cc: Include limits.h. From-SVN: r91581
2004-11-29* link.cc (link_symbol_table): Do not use intptr_t.Eric Botcazou1-2/+2
From-SVN: r91472
2004-11-27link.cc (ensure_class_linked): Conditionally compile _Jv_IsInterpretedClass ↵Andrew Haley1-1/+10
on INTERPRETER. 2004-11-27 Andrew Haley <aph@redhat.com> * link.cc (ensure_class_linked): Conditionally compile _Jv_IsInterpretedClass on INTERPRETER. (print_class_loaded): Likewise. (wait_for_state): Likewise. * include/jvm.h (ROUND): Move to here from include/java-interp.h. * include/java-interp.h (ROUND): Remove. From-SVN: r91375
2004-11-25* Merged gcj-abi-2-dev-branch to trunk.Tom Tromey1-0/+1764
(Actual changes too large to list in the commit message; see ChangeLog.) From-SVN: r91270