Skip to content
Snippets Groups Projects
  1. Feb 19, 2005
    • tromey's avatar
      PR java/20056: · fa8f03c4
      tromey authored
      	* verify.cc (type::equals): Fixed test.
      	* testsuite/libjava.lang/PR20056.out: New file.
      	* testsuite/libjava.lang/PR20056.java: New file.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95266 138bc75d-0d04-0410-961f-82ee72b054a4
      fa8f03c4
    • tromey's avatar
      PR java/20056: · d00d5d35
      tromey authored
      	* 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.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95259 138bc75d-0d04-0410-961f-82ee72b054a4
      d00d5d35
  2. Nov 25, 2004
  3. Nov 03, 2004
  4. Aug 12, 2004
    • bothner's avatar
      · 307719b9
      bothner authored
      	* 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.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85854 138bc75d-0d04-0410-961f-82ee72b054a4
      307719b9
  5. Mar 19, 2004
  6. Feb 01, 2004
  7. Jan 23, 2004
    • tromey's avatar
      PR libgcj/13107: · 7eda2b88
      tromey authored
      	* 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.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@76395 138bc75d-0d04-0410-961f-82ee72b054a4
      7eda2b88
  8. Jan 08, 2004
    • tromey's avatar
      PR libgcj/13439: · 00537348
      tromey authored
      	* 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.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@75533 138bc75d-0d04-0410-961f-82ee72b054a4
      00537348
  9. Dec 02, 2003
  10. Nov 19, 2003
    • tromey's avatar
      PR libgcj/13026: · 0b64b5a6
      tromey authored
      	* verify.cc (state::copy): Only set local_changed if we're in a
      	subroutine.  Correctly copy local variables which were modified
      	by the subroutine.
      	(push_jump_merge): Added more debugging output.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73722 138bc75d-0d04-0410-961f-82ee72b054a4
      0b64b5a6
  11. Jul 24, 2003
    • tromey's avatar
      For PR libgcj/7482: · b8487aa4
      tromey authored
      	* 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.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69751 138bc75d-0d04-0410-961f-82ee72b054a4
      b8487aa4
  12. May 07, 2003
  13. May 01, 2003
    • tromey's avatar
      PR libgcj/10582: · 268d48e0
      tromey authored
      	* verify.cc (_Jv_BytecodeVerifier::is_assignable_from_slow):
      	Removed.
      	(type::compatible): Use _Jv_IsAssignableFrom.
      	* java/lang/natClass.cc (iindex_mutex_initialized): Now static.
      	(_Jv_IsAssignableFrom): Work even when source or target class is
      	not prepared.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66348 138bc75d-0d04-0410-961f-82ee72b054a4
      268d48e0
  14. Apr 11, 2003
  15. Mar 03, 2003
  16. Feb 16, 2003
  17. Feb 13, 2003
  18. Dec 28, 2002
    • mmitchel's avatar
      * boehm.cc: Remove stray semicolon. · ae771b42
      mmitchel authored
      	* 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.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@60556 138bc75d-0d04-0410-961f-82ee72b054a4
      ae771b42
  19. Dec 05, 2002
  20. Dec 03, 2002
    • aph's avatar
      2002-12-03 Andrew Haley <aph@redhat.com> · 56797587
      aph authored
              * 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.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@59769 138bc75d-0d04-0410-961f-82ee72b054a4
      56797587
  21. Nov 27, 2002
    • tromey's avatar
      * verify.cc (pop_init_ref): New method. · 9eb84402
      tromey authored
      	(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.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@59558 138bc75d-0d04-0410-961f-82ee72b054a4
      9eb84402
  22. Nov 26, 2002
  23. Jun 24, 2002
    • tromey's avatar
      * verify.cc (branch_prepass): Updated for change to exception · 5b783ef3
      tromey authored
      	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.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54968 138bc75d-0d04-0410-961f-82ee72b054a4
      5b783ef3
  24. Apr 26, 2002
  25. Mar 10, 2002
    • tromey's avatar
      * verify.cc (state::NO_STACK): New constant. · 5922d6f0
      tromey authored
      	(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.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@50526 138bc75d-0d04-0410-961f-82ee72b054a4
      5922d6f0
  26. Feb 20, 2002
    • tromey's avatar
      Fix for PR libgcj/5696: · 77baee3f
      tromey authored
      	* 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.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49886 138bc75d-0d04-0410-961f-82ee72b054a4
      77baee3f
  27. Feb 15, 2002
    • tromey's avatar
      Fix for PR libgcj/5695: · b06ffad8
      tromey authored
      	* verify.cc (is_assignable_from_slow): Check to see if target is
      	an Object before checking to see if source is an interface.
      	(verify_instructions_0) [op_invokeinterface]: Handle case where
      	we're making an interface call on Object.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49783 138bc75d-0d04-0410-961f-82ee72b054a4
      b06ffad8
  28. Feb 14, 2002
  29. Feb 13, 2002
  30. Feb 07, 2002
  31. Feb 06, 2002
  32. Feb 01, 2002
  33. Jan 30, 2002
  34. Jan 28, 2002
  35. Jan 26, 2002
    • bothner's avatar
      · a21155c0
      bothner authored
      	* verify.cc (verify_fail):  Change from being a top-level function
      	to e method of _Jv_BytecodeVerifier.  Emit current method name.
      	Pass the current verifier to type: and state: methods as needed,
      	for better error messages, and for resolve.
      	(resolve):  Pass current class's loader for Class.forName and
      	_Jv_FindClassFromSignature, rather than using the default loader.
      	(various type: and state: methods):  Take _Jv_BytecodeVerifier* arg.
      	(get_type_val_for_signature):  Make non-static.
      	(various methods):  Pass start_PC implicitly, not explicitly.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49240 138bc75d-0d04-0410-961f-82ee72b054a4
      a21155c0
Loading