1. 14 Oct, 2006 1 commit
    • java-insns.h (enum java_code): Add op_breakpoint. · 0f546316
              * include/java-insns.h (enum java_code): Add op_breakpoint.
              * include/java-interp.h (_Jv_InterpMethod): Declare breakpoint_insn.
              [INTERPRETER]: Declare _Jv_InterpMethod::bp_insn_slot.
              [!INTERPRETER]: Declare _Jv_InterpMethod::bp_insn_opcode.
              (install_break): Declare.
              * interpret.cc (breakpoint_insn): Define breakpoint insn.
              (compile): Add op_breakpoint to "can't happen" cases.
              [INTERPRETER] Initialize breakpoint insn if necessary.
              (install_break): New method.
              * interpret-run.cc: Add op_breakpoint to insn_targets.
              Add insn_breakpoint label.
              * verify.cc (branch_prepass): Add op_breakpoint to unrecognized
              opcodes section of switch statement.
              (verify_instructions_0): Likewise.
      
      From-SVN: r117734
      Keith Seitz committed
  2. 08 Feb, 2006 1 commit
    • link.cc (_Jv_Linker::print_class_loaded): Declare string constants as "const char *". · 2cf94e58
      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
      Bryce McKinlay committed
  3. 01 Feb, 2006 1 commit
    • 2006-02-01 Robert Schuster <robertschuster@fsfe.org> · c1a9321f
      	* 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
      Robert Schuster committed
  4. 15 Sep, 2005 1 commit
    • re PR libgcj/16032 (libgcj should reject class files with incorrect version numbers) · a022cd59
      	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
      Tom Tromey committed
  5. 08 Jul, 2005 1 commit
  6. 24 Jun, 2005 1 commit
  7. 05 Apr, 2005 1 commit
    • jni.cc (_Jv_JNI_GetAnyFieldID): Throw ClassNotFoundException. · 8b6e7690
      	* 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
      Tom Tromey committed
  8. 22 Feb, 2005 1 commit
  9. 19 Feb, 2005 2 commits
  10. 25 Nov, 2004 1 commit
  11. 03 Nov, 2004 1 commit
  12. 12 Aug, 2004 1 commit
    • javaprims.h (_Jv_Utf8Const): Change struct to a class, with private fields and access methods. · b4d49f49
      	* 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
      Per Bothner committed
  13. 19 Mar, 2004 1 commit
  14. 01 Feb, 2004 1 commit
  15. 23 Jan, 2004 1 commit
    • re PR libgcj/13107 (Wrong verification error in gij: recursive subroutine call) · fe1081b0
      	PR libgcj/13107:
      	* testsuite/libjava.lang/pr13107_2.xfail: New file.
      	* testsuite/libjava.lang/pr13107_3.xfail: New file.
      	* testsuite/libjava.lang/pr13107_3.java: New file.
      	* testsuite/libjava.lang/pr13107_3.out: New file.
      	* testsuite/libjava.lang/pr13107_2.java: New file.
      	* testsuite/libjava.lang/pr13107_2.out: New file.
      	* testsuite/libjava.lang/pr13107.java: New file.
      	* testsuite/libjava.lang/pr13107.out: New file.
      	* verify.cc (jsr_ptrs): Removed.
      	(entry_points): Likewise.
      	(struct subr_info): Likewise.
      	(struct subr_entry_info): Likewise.
      	(type_val::unused_by_subroutine_type): Likewise.
      	(type::merge): Don't handle unused_by_subroutine_type.
      	(type::print): Likewise.
      	(state::flags): Removed.
      	(state::subroutine): Likewise.
      	(state::seen_subrs): Likewise.
      	(state::NO_STACK): Likewise.
      	(state::FLAG_CHANGED, state::FLAG_UNUSED): Likewise.
      	(state): Updated all methods.
      	(state::clean_subrs): Removed.
      	(state::state): Removed `ret_semantics' flag.
      	(state::copy): Likewise.
      	(state::add_subr): Removed.
      	(state::enter_subroutine): Likewise.
      	(type::set_return_address): New method.
      	(handle_jsr_insn): Set return address on the type.  Always
      	invalidate PC after call.
      	(check_nonrecursive_call): Removed.
      	(~_Jv_BytecodeVerifier): Updated.
      	(branch_prepass): Removed special handling of jsr.
      	(note_branch_target): Likewise.
      	(get_subroutine): Removed.
      	(state::merge): Don't merge subroutines and don't handle
      	NO_STACK.  Removed ret_semantics and jsr_semantics arguments.
      	(state::note_variable): Removed.
      	(state::is_unmerged_ret_state): Likewise.
      	(state::print): Updated.
      	(set_variable): Likewise.
      	(merge_into): Renamed from push_jump_merge.  Removed ret_semantics
      	and jsr_semantics arguments.  Updated for new reverification
      	list.
      	(pop_jump): Rewrote.
      	(construct_primitive_array_type): Updated.
      	(state::next): Removed.
      	(INVALID_STATE): New define.
      	(state::INVALID): Removed.
      	(state::NO_NEXT): New value.
      	(state::pc, state::next): New fields.
      	(state::get_pc): New method.
      	(next_verify_pc): Removed.
      	(next_verify_state): New field.
      	(verify_instructions_0): Always check for falling off end.
      	(linked): New type.
      	(linked_utf8): Removed.
      	(states): Changed type.
      	(type::state_mergeable_p): New method.
      	(state::state_mergeable_p): Likewise.
      	(handle_ret_insn): Removed most code.
      	(state::reverify): New method.
      	(add_new_state): Likewise.
      	(state::set_pc): Likewise.
      
      From-SVN: r76395
      Tom Tromey committed
  16. 08 Jan, 2004 1 commit
    • re PR libgcj/13439 (gij VerifyError; works with JDK 1.4) · 11e584ed
      	PR libgcj/13439:
      	* verify.cc (state::merge): Copy changed locals out of subroutine
      	in NO_STACK case.
      	(state::FLAG_CHANGED): New const.
      	(state::FLAG_UNUSED): Likewise.
      	(state::local_changed): Removed.  Updated all users.
      	(state::flags): New field.
      	(state::merge): Added jsr_semantics argument, more logic.
      	(push_jump_merge): Added jsr_semantics argument.
      	(handle_jsr_insn): Set jsr_semantics on push_jump_merge when
      	merging through the jsr instruction.
      
      From-SVN: r75533
      Tom Tromey committed
  17. 02 Dec, 2003 1 commit
  18. 19 Nov, 2003 1 commit
  19. 24 Jul, 2003 1 commit
    • For PR libgcj/7482: · b6d2b0f7
      	* verify.cc (ref_intersection): New class.
      	(type_val): Removed unresolved_reference_type,
      	uninitialized_unresolved_reference_type.
      	(is_assignable_from_slow): Rewrote.
      	(type::data): Removed.
      	(type::klass): New field.
      	(type::type): Added verifier argument.
      	(type::resolve): Removed.
      	(type::set_uninitialized): Updated for change to type_val.
      	(type::set_initialized): Likewise.
      	(type::isinitialized): Likewise.
      	(type::print): Likewise.
      	(construct_primitive_array_type): Likewise.
      	(type::compatible): Updated for change to type_val and to use
      	ref_intersection.
      	(type::isarray): Updated to use ref_intersection.
      	(type::isinterface): Likewise.
      	(type::element_type): Likewise.
      	(type::to_array): Likewise.
      	(type::verify_dimensions): Rewrote.
      	(type::merge): Likewise.
      	(check_class_constant): Updated for type constructor change.
      	(check_constant): Likewise.
      	(check_field_constant): Likewise.
      	(get_one_type): Likewise.
      	(initialize_stack): Likewise.
      	(verify_instructions_0): Likewise.
      	(verify_instructions_0) [op_invokeinterface]: Removed special
      	case.
      	(isect_list): New field.
      	(_Jv_BytecodeVerifier): Initialize it.
      	(~_Jv_BytecodeVerifier): Destroy ref_intersection objects.
      
      From-SVN: r69751
      Tom Tromey committed
  20. 07 May, 2003 1 commit
  21. 01 May, 2003 1 commit
  22. 11 Apr, 2003 1 commit
    • verify.cc (pop64): Removed. · bc9150d3
      	* verify.cc (pop64): Removed.
      	(verify_instructions_0) <op_pop2>: Inline code.  Don't throw
      	exception if top-of-stack is narrow.
      	(initialize_stack): Check to ensure that <init> is not static and
      	<clinit> is.
      
      From-SVN: r65453
      Tom Tromey committed
  23. 03 Mar, 2003 1 commit
  24. 16 Feb, 2003 1 commit
  25. 13 Feb, 2003 1 commit
    • verify.cc (state::seen_subrs): New field. · 6f2ffb37
      	* verify.cc (state::seen_subrs): New field.
      	(state::state): Initialize it.
      	(state::clean_subrs): New method.
      	(state::~state): Call it.
      	(state::copy): Copy subroutine list.
      	(state::add_subr): New method.
      	(state::merge): Only register a change if the current subroutine
      	hasn't yet been noted.
      
      From-SVN: r62878
      Tom Tromey committed
  26. 28 Dec, 2002 1 commit
    • boehm.cc: Remove stray semicolon. · dfe5a36e
      	* boehm.cc: Remove stray semicolon.
      	* interpret.cc: Likewise.
      	* prims.cc: Likewise.
      	* verify.cc (_Jv_BytecodeVerifier::verify_fail): Move definition
      	earlier to ensure default arguments are processed.
      	* gcj/array.h (JArray): Add forward declaration.
      	(elements): Likewise.
      	* gcj/javaprim.h: Remove stray semicolons.
      	* include/bohm-gc.h: Likewise.
      	* include/jni.h: Likewise.
      	* include/jvm.h: Likewise.
      	* java/lang/Class.h (_Jv_GetArrayClass): Declare _Jv_NewArrayClass.
      
      From-SVN: r60556
      Mark Mitchell committed
  27. 05 Dec, 2002 2 commits
  28. 03 Dec, 2002 1 commit
    • natClassLoader.cc (_Jv_PrepareCompiledClass): Call _Jv_PushClass. · 421f9e60
      2002-12-03  Andrew Haley  <aph@redhat.com>
      
              * java/lang/natClassLoader.cc (_Jv_PrepareCompiledClass): Call
      	_Jv_PushClass.
              (_Jv_InitNewClassFields): Set protectionDomain and chain = NULL.
              (_Jv_PopClass): New.
              (_Jv_PushClass): New.
              * java/lang/natClass.cc (forName (jstring)): Use a StackTrace to
              discover the ClassLoader of our caller.
              (_Jv_CheckArrayStore): Don't check that a class is assignment
              compatible with Object.
              * java/lang/natVMTHrowable.cc: Delete.
              * gnu/gcj/runtime/StackTrace.java: New, partly copied from
      	java.lang.VMThrowable.
              (StackTrace(), StackTrace(int)): New constructors.
              (classAt, methodAt, update, methodAtAddress): New methods.
              (map): New field.
      	* java/lang/VMThrowable.java: Use StackTrace instead of
      	natVMTHrowable.
      	* java/lang/Class.h (getClassLoaderInternal): New.
              (class Class): Be friendly with _Jv_PopClass and _Jv_PushClass.
              Be friendly with gnu::gcj::runtime::StackTrace.
              (Object.chain): New field.
              * include/java-interp.h (class _Jv_InterpMethod): Be friendly with
              gnu::gcj::runtime::StackTrace.
              * prims.cc (_Jv_NewObjectArray): Use getClassLoaderInternal()
              instead of getClassLoader().
              * verify.cc (class _Jv_BytecodeVerifier): Likewise.
              java::lang::VMThrowable.
              * Makefile.am (core_java_source_files): Add MethodRef.java,
      	StackTrace.java.
              (nat_source_files): Remove natVMThrowable.cc; add natStackTrace.cc.
              * Makefile.in: Rebuild.
      
      2002-12-03  Andrew Haley  <aph@redhat.com>
      
      	* class.c (make_class_data): New field, "chain".
      	* decl.c (java_init_decl_processing): Likewise.
      
      From-SVN: r59769
      Andrew Haley committed
  29. 27 Nov, 2002 1 commit
    • verify.cc (pop_init_ref): New method. · 02077425
      	* verify.cc (pop_init_ref): New method.
      	(verify_instructions_0) [op_iaload, op_laload, op_faload,
      	op_daload, op_aaload, op_baload, op_caload, op_saload, op_iastore,
      	op_lastore, op_fastore, op_dastore, op_aastore, op_bastore,
      	op_castore, op_sastore, op_areturn, op_arraylength, op_checkcast,
      	op_instanceof, op_monitorenter, op_monitorexit]: Use it.
      	(verify_instructions_0) [op_invokevirtual, op_invokespecial,
      	op_invokestatic, op_invokeinterface]:  Use pop_init_ref.  Don't
      	let `this' argument be uninitialized.  Don't let `null' be passed
      	as `this' to construtor.
      
      From-SVN: r59558
      Tom Tromey committed
  30. 26 Nov, 2002 2 commits
  31. 24 Jun, 2002 1 commit
    • verify.cc (branch_prepass): Updated for change to exception handler type. · fdae83ab
      	* 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
      Tom Tromey committed
  32. 26 Apr, 2002 1 commit
    • verify.cc (construct_primitive_array_type): New case. · b446a5f1
      	* verify.cc (construct_primitive_array_type) [void_type]: New
      	case.
      	(branch_prepass): Added dummy entries for unused instruction
      	values.
      	(verify_instructions_0): Likewise.
      	* interpret.cc (continue1): Comment fix.
      	* include/java-insns.h (op_xxxunusedxxx1): Removed.
      	* Makefile.in: Rebuilt.
      	* Makefile.am: Added -Wswitch-enum.
      
      From-SVN: r52814
      Tom Tromey committed
  33. 10 Mar, 2002 1 commit
    • verify.cc (state::NO_STACK): New constant. · 621fba99
      	* verify.cc (state::NO_STACK): New constant.
      	(state::is_unmerged_ret_state): Handle case where stacktop is
      	NO_STACK.
      	(state::merge): Handle NO_STACK merges.
      	(handle_jsr_insn): Invalidate PC, and use special NO_STACK state
      	for instruction following jsr.
      	(stacktop, stackdepth): Removed unused variables.
      	(pop_jump): Ignore case where all remaining states are skipped.
      
      From-SVN: r50526
      Tom Tromey committed
  34. 20 Feb, 2002 1 commit
    • re PR libgcj/5696 (natClass.cc run through superclasses of target if they exist… · e4e35417
      re PR libgcj/5696 (natClass.cc run through superclasses of target if they exist while comparing variable types.)
      
      	Fix for PR libgcj/5696:
      	* verify.cc (is_assignable_from_slow): Never call
      	_Jv_IsAssignableFrom.
      	(verify_instructions_0): Added new debug statement.
      	(state::print): Print information about whether local has
      	changed.
      	(state::merge): Don't call note_variable when merging locals.
      	(state::set_exception): Removed old FIXME comment.
      
      From-SVN: r49886
      Tom Tromey committed
  35. 15 Feb, 2002 1 commit
  36. 14 Feb, 2002 1 commit
  37. 13 Feb, 2002 1 commit