Commit Graph

5 Commits

Author SHA1 Message Date
Andrew Haley fdafd4613f prims.cc (_Jv_soleIndirectCompiledEngine): New.
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-10 17:17:20 +00:00
Bryce McKinlay 23bc3a894d link.cc (_Jv_Linker::resolve_pool_entry): Don't pass vtable_index to 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-29 02:35:50 +01:00
Andrew Haley 621ae65dcd lang.c (java_init): Handle flag_indirect_classes.
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-04-24 15:33:16 +00:00
Tom Tromey 8b1753e3ec PR libgcj/26063, PR libgcj/17978, PR libgcj/10598:
* 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-08 20:07:29 +00:00
Tom Tromey 367390404d * Merged gcj-abi-2-dev-branch to trunk.
(Actual changes too large to list in the commit message;
see ChangeLog.)

From-SVN: r91270
2004-11-25 03:47:08 +00:00