* Merged gcj-abi-2-dev-branch to trunk.
(Actual changes too large to list in the commit message; see ChangeLog.) From-SVN: r91270
This commit is contained in:
parent
ec0641f612
commit
367390404d
70 changed files with 11301 additions and 3355 deletions
|
@ -1,3 +1,586 @@
|
|||
2004-11-24 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* Merged gcj-abi-2-dev-branch to trunk.
|
||||
|
||||
2004-11-24 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* jcf-parse.c (parse_class_file): Set file_start_location.
|
||||
|
||||
2004-11-10 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* class.c (make_field_value): Don't call build_static_field_ref.
|
||||
(build_static_field_ref): Don't emit direct references when using
|
||||
indirect dispatch.
|
||||
|
||||
* gcj.texi (Invoking gij): Document -verbose. Put -verbose and
|
||||
-verbose:class into man page synopsis.
|
||||
|
||||
2004-11-09 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* expr.c (build_java_arraystore_check): Still generate check if
|
||||
element type is itself an array.
|
||||
|
||||
2004-11-08 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* java-tree.h (soft_check_assignment_node): Removed.
|
||||
(enum java_tree_index): Removed JTI_SOFT_CHECK_ASSIGNMENT_NODE.
|
||||
* decl.c (java_init_decl_processing): Don't initialize
|
||||
soft_check_assignment_node.
|
||||
|
||||
2004-11-05 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* class.c (layout_class_methods): Don't add Miranda methods when
|
||||
using indirect dispatch.
|
||||
|
||||
2004-11-05 Bryce McKinlay <mckinlay@redhat.com>
|
||||
|
||||
* class.c (make_class_data): Call emit_assertion_table to set the
|
||||
'assertion_table' field.
|
||||
(build_signature_for_libgcj): Move here from expr.c.
|
||||
(add_assertion_table_entry): New function. Callback for assertion
|
||||
hashtable traversal.
|
||||
(emit_assertion_table): New. Take class argument, and generate
|
||||
assertion table DECL based on the TYPE_ASSERTIONS hashtable.
|
||||
* decl.c (init_decl_processing): Define assertion_entry_type record.
|
||||
Push 'assertion_table' class field instead of 'verify'.
|
||||
* expr.c (type_assertion_eq): Compare 'assertion_code' field.
|
||||
(type_assertion_hash): Include 'assertion_code' in hash.
|
||||
(add_type_assertion): Rewritten. Take class and assertion_code
|
||||
arguments. Add assertions to the TYPE_ASSERTIONS hashtable.
|
||||
(can_widen_reference_to): Use new add_type_assertion() arguments.
|
||||
* java-tree.h (java_tree_index): Add JTI_ASSERTION_ENTRY_TYPE,
|
||||
JTI_ASSERTION_TABLE_TYPE. Remove JTI_VERIFY_IDENTIFIER_NODE.
|
||||
(verify_identifier_node): Removed.
|
||||
(assertion_entry_type, assertion_table_type): New.
|
||||
(ASSERTION_TYPES_COMPATIBLE, ASSERTION_IS_INSTANTIABLE): New. Type
|
||||
assertion code definitions.
|
||||
(struct type_assertion): Add assertion_code. Rename 'source_type' and
|
||||
'target_type' to 'op1' and 'op2'.
|
||||
(add_type_assertion): Declare.
|
||||
(lang_printable_name_wls): Remove unused definition.
|
||||
* verify-glue.c: (vfy_is_assignable_from): New. Call add_type_assertion
|
||||
to emit runtime assertion.
|
||||
(vfy_note_stack_type): Clean up non-C90 declarations.
|
||||
(vfy_note_local_type): Likewise.
|
||||
* verify.h (vfy_is_assignable_from): Declare.
|
||||
* verify-impl.c (is_assignable_from_slow): Remove unused function.
|
||||
(ref_compatible): Rename arguments. Call vfy_is_assignable_from()
|
||||
instead of is_assignable_from_slow().
|
||||
(types_compatible): Reinstate ref_compatible() call.
|
||||
|
||||
2004-11-04 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* class.c (build_static_field_ref): Reverted previous patch.
|
||||
|
||||
* class.c (build_static_field_ref): Don't emit direct references
|
||||
when using indirect dispatch.
|
||||
|
||||
2004-11-03 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* expr.c (expand_java_arrayload): Set lhs_type_node.
|
||||
(expand_java_arraystore): Set rhs_type_node.
|
||||
|
||||
2004-11-02 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* jcf-parse.c (compute_class_name): Use filename length from zip
|
||||
directory, not strlen.
|
||||
|
||||
* expr.c (expand_invoke): Mark new interface methods as abstract.
|
||||
|
||||
2004-11-01 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* verify-impl.c (push_jump): Removed check for uninitialized
|
||||
objects.
|
||||
(push_exception_jump): Likewise.
|
||||
(handle_ret_insn): Likewise.
|
||||
(handle_jsr_insn): Likewise.
|
||||
(state_check_no_uninitialized_objects): Removed.
|
||||
|
||||
* decl.c (check_local_unnamed_variable): Recognize
|
||||
promoted-to-int parameters when using the new verifier.
|
||||
* expr.c (expand_java_arraystore): Explicitly request array type
|
||||
when using new verifier.
|
||||
(expand_java_arrayload): Likewise.
|
||||
(invoke_build_dtable): Don't pass object_type_node as
|
||||
expression argument to build_java_indirect_ref.
|
||||
(build_java_check_indexed_type): Do nothing.
|
||||
(build_java_arraystore_check): Handle case where array doesn't
|
||||
have array type.
|
||||
(build_java_array_length_access): Likewise.
|
||||
(expand_invoke): Handle case where interface overrides a method
|
||||
from Object.
|
||||
(pop_type_0): Always succeed for reference types.
|
||||
(process_jvm_instruction): Don't pop a value in a dead
|
||||
exception handler.
|
||||
(pop_arguments): Convert arguments to correct types.
|
||||
|
||||
2004-10-29 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* jcf-parse.c (give_name_to_class): Remove line that was
|
||||
incorrectly merged.
|
||||
|
||||
2004-10-29 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* jcf-parse.c (set_source_filename): Add code to build new sfname.
|
||||
|
||||
2004-10-20 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* decl.c (end_java_method): Don't expand if flag_syntax_only.
|
||||
|
||||
2004-10-26 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* verify.h (vfy_notify_verified): Removed.
|
||||
* verify-glue.c (vfy_notify_verified): Removed.
|
||||
|
||||
2004-10-26 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* verify-impl.c (debug_print_state): Declare `i' before code.
|
||||
(merge_types): Modify `t' when it is null_type.
|
||||
|
||||
2004-10-26 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* verify-impl.c (type_print): Renamed from print. Now static and
|
||||
takes an argument.
|
||||
(debug_print_state): Use type_print.
|
||||
|
||||
2004-10-25 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* expr.c (build_invokeinterface): Compute correct offset for
|
||||
index into interface methods.
|
||||
|
||||
2004-10-20 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* java-tree.h (verify_jvm_instructions_new): Declare.
|
||||
|
||||
* jvspec.c (jvgenmain_spec): Remove -fnew-verifier from cc1
|
||||
command line.
|
||||
|
||||
* verify-impl.c (verify_instructions): Correctly handle wide
|
||||
types on the stack.
|
||||
* verify-glue.c (vfy_get_class_name): Use DECL_NAME.
|
||||
(vfy_get_component_type): Strip pointer types.
|
||||
(vfy_find_class): Use get_type_from_signature. Strip pointer
|
||||
types.
|
||||
Include java-except.h.
|
||||
|
||||
2004-10-20 Bryce McKinlay <mckinlay@redhat.com>
|
||||
|
||||
* verify-impl.c (type_array_elementpop_raw, vfy_pop_type_t,
|
||||
vfy_push_type_t, set_variable, add_new_state, merge_into,
|
||||
handle_jsr_insn, branch_prepass, check_class_constant,
|
||||
check_wide_constant, get_one_type, compute_static_types,
|
||||
verify_instructions_0): Clean up C99 declarations after statements.
|
||||
|
||||
2004-10-20 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* verify-impl.c (merge_refs): Compare reference against iterator,
|
||||
not ref2.
|
||||
|
||||
* verify-glue.c (vfy_tag): Mask off resolved flag.
|
||||
|
||||
2004-10-19 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* verify-impl.c (verify_instructions): Call vfy_note_local_type.
|
||||
(init_state_with_stack): Initialize `this_type' in state.
|
||||
(verify_method): Use debug_print.
|
||||
* verify-glue.c (vfy_is_primitive): Removed debugging print.
|
||||
(vfy_note_stack_depth): Reverted last patch.
|
||||
(vfy_note_stack_type): Note pointer to Object, not Object.
|
||||
(vfy_note_local_type): Likewise.
|
||||
|
||||
* verify.h (vfy_note_instruction_seen): Declare.
|
||||
* verify-glue.c (verify_jvm_instructions_new): Set
|
||||
BCODE_EXCEPTION_TARGET on target instruction.
|
||||
(vfy_note_instruction_seen): New function.
|
||||
* verify-impl.c (FLAG_INSN_SEEN): New define.
|
||||
(verify_instructions_0): Set flag on instruction. Save state for
|
||||
PC=0 later.
|
||||
(verify_instructions): Call vfy_note_instruction_seen.
|
||||
|
||||
* verify-glue.c (vfy_note_stack_depth): Fix off-by-one error.
|
||||
(verify_jvm_instructions_new): Call method_init_exceptions,
|
||||
add_handler, and handle_nested_ranges.
|
||||
* verify-impl.c (verify_method): Return 1 on success.
|
||||
(verify_instructions_0): Save the state at PC=0.
|
||||
|
||||
* verify-impl.c (init_type_from_class): Set is_resolved and
|
||||
ref_next on new ref_intersection.
|
||||
(init_type_from_string): Likewise.
|
||||
|
||||
2004-10-15 Bryce McKinlay <mckinlay@redhat.com>
|
||||
|
||||
* expr.c (expand_bytecode): Use verify_jvm_instructions_new
|
||||
if flag_new_verifier is set.
|
||||
* java-tree.h (flag_new_verifier): Declare.
|
||||
* lang.opt (fnew-verifier): New option.
|
||||
* verify-impl.c: Work around namespace pollution by undef'ing
|
||||
'current_class'.
|
||||
(struct verifier_context): Make 'bytecode' const.
|
||||
(verify_fail_pc): Pass -1 PC argument to vfy_fail.
|
||||
(types_compatible): For the BC-ABI, always consider reference types
|
||||
compatible.
|
||||
(check_class_constant): Use vfr->current_class.
|
||||
(check_constant): Likewise.
|
||||
(check_wide_constant): Likewise.
|
||||
(check_field_constant): Check for 'L' at start of type name.
|
||||
(get_one_type): Return pointer instead of type. Set type result in
|
||||
caller via passed type pointer.
|
||||
(compute_argument_types): Update to use new get_one_type arguments.
|
||||
(compute_return_type): Likewise.
|
||||
(make_verifier_context): New. Allocate and initialize 'vfr'.
|
||||
(free_verifier_context): New. Free 'vfr' and its contents.
|
||||
(verify_method): Remove ATTRIBUTE_UNUSED. Call make_verifier_context
|
||||
and free_verifier_context.
|
||||
|
||||
2004-10-15 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* verify-glue.c (vfy_note_local_type): Mark argument as unused.
|
||||
* verify.h (vfy_fail): Fixed formatting.
|
||||
|
||||
* verify-impl.c (vfr): Fixed comment formatting.
|
||||
(collapse_type): New function.
|
||||
(verify_instructions): Notify compiler about type map.
|
||||
* verify.h (vfy_note_stack_depth): Updated.
|
||||
(vfy_note_stack_type): Likewise.
|
||||
(vfy_note_local_type): Likewise.
|
||||
(vfy_unsuitable_type, vfy_return_address_type, vfy_null_type):
|
||||
Declare.
|
||||
* verify-glue.c (vfy_note_stack_depth): Correctly size type
|
||||
state. Added `method' argument.
|
||||
(vfy_note_stack_type): Renamed from vfy_note_type. Added `method'
|
||||
argument.
|
||||
(vfy_note_local_type): New function.
|
||||
(vfy_unsuitable_type): Likewise.
|
||||
(vfy_return_address_type): Likewise.
|
||||
(vfy_null_type): Likewise.
|
||||
|
||||
* verify.h (VFY_IN_GCC): Removed.
|
||||
(VFY_WANT_TYPEMAP): Removed.
|
||||
* verify-impl.c (verify_instructions_0): Removed useless "\".
|
||||
(struct state) <next>: Uncomment.
|
||||
|
||||
2004-10-13 Bryce McKinlay <mckinlay@redhat.com>
|
||||
|
||||
* verify-impl.c: Formatting fixes. Reformat C++-style comments to
|
||||
C-style.
|
||||
|
||||
2004-10-06 Bryce McKinlay <mckinlay@redhat.com>
|
||||
|
||||
* Make-lang.in (verify.o): Re-enabled this target.
|
||||
* verify-glue.c (vfy_get_interface_count): Add ATTRIBUTE_UNUSED.
|
||||
(vfy_get_interface): Likewise.
|
||||
(verify_jvm_instructions_new): Renamed from verify_jvm_instructions.
|
||||
* verify.h (verify_jvm_instructions_new): Declare.
|
||||
* verify-impl.c (free_state): Temporarily comment out unused
|
||||
function.
|
||||
|
||||
2004-10-06 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* java-tree.h (JV_STATE_READ): New enum value.
|
||||
|
||||
2004-10-06 Bryce McKinlay <mckinlay@redhat.com>
|
||||
|
||||
* verify.h: New file.
|
||||
|
||||
2004-10-05 Bryce McKinlay <mckinlay@redhat.com>
|
||||
|
||||
* verify-impl.c, verify-glue.c, verify.h: New files.
|
||||
* Make-lang.in: Add rules for verify-impl.o and verify-glue.o.
|
||||
|
||||
2004-09-24 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* decl.c (check_local_unnamed_variable): Always use the PARM_DECL
|
||||
for a slot if it's of pointer type.
|
||||
|
||||
2004-09-14 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* class.c (make_class_data): Correctly initialize "state" field.
|
||||
Initialize "engine" field.
|
||||
* decl.c (java_init_decl_processing): Add "engine" field.
|
||||
|
||||
2004-09-10 Andrew Haley <aph@redhat.com>
|
||||
|
||||
PR java/12760
|
||||
* expr.c (build_invokeinterface): Use fast method for interface
|
||||
dispatch.
|
||||
* java-tree.h (enum java_tree_index): Add JTI_ITABLE_TYPE,
|
||||
JTI_ITABLE_PTR_TYPE.
|
||||
(struct lang_type): Add itable_methods, itable_decl, itable_syms_decl.
|
||||
(emit_symbol_table): Add new arg, element_size.
|
||||
* decl.c (java_init_decl_processing): Initialize Class.itable.
|
||||
* class.c (GEN_TABLE): New macro.
|
||||
(gen_indirect_dispatch_tables): Use it. Add itable.
|
||||
(make_class_data): Add new arg for emit_symbol_table().
|
||||
Emit itable.
|
||||
(add_miranda_methods): Make sure search_class has been parsed.
|
||||
(emit_symbol_table): Add new arg, element_size.
|
||||
|
||||
2004-09-06 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* verify.c (merge_types): Return Object for all merges of
|
||||
interfaces.
|
||||
* expr.c (add_type_assertion): Don't generate assertions when
|
||||
source type is array of Object.
|
||||
|
||||
2004-09-03 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* class.c (finish_class): Nullify TYPE_VERIFY_METHOD.
|
||||
|
||||
* lang.c (java_post_options): Force flag_verify_invocations if
|
||||
we're not using indirect dispatch.
|
||||
|
||||
* expr.c (pop_type_0): Move test for interfaces before call to
|
||||
can_widen_reference_to().
|
||||
(build_signature_for_libgcj): Remove generation of canonical array
|
||||
type.
|
||||
(add_type_assertion): Canonicalize both arrays.
|
||||
Don't assert that type X can be assigned to Object.
|
||||
Don't assert that type X an be assigned to type X.
|
||||
Don't assert that Object can be assigned to type X.
|
||||
(can_widen_reference_to): Warn whenever we generate an assertion.
|
||||
(process_jvm_instruction): Use throwable_type_node for the type of
|
||||
an exception class.
|
||||
|
||||
2004-09-01 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* decl.c (java_init_decl_processing): Change
|
||||
verify_identifier_node to "__verify".
|
||||
* expr.c (add_type_assertion): Use verify_identifier_node for name.
|
||||
* java-tree.h (verify_identifier_node): Change to "__verify".
|
||||
|
||||
* expr.c (build_signature_for_libgcj): New function.
|
||||
(add_type_assertion): Use it to construct signatures for
|
||||
source_type and target_type.
|
||||
|
||||
2004-08-27 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* java-tree.h (enum java_tree_index): Add JTI_VERIFY_IDENTIFIER_NODE.
|
||||
(verify_identifier_node): New.
|
||||
(TYPE_VERIFY_METHOD): New.
|
||||
(struct type_assertion): New type.
|
||||
* expr.c (type_assertion_eq): New function.
|
||||
(type_assertion_hash): New function.
|
||||
(add_type_assertion): New function.
|
||||
(can_widen_reference_to): Call add_type_assertion().
|
||||
* decl.c (java_init_decl_processing): Add verify_identifier_node.
|
||||
* class.c (make_class_data): Initialize TYPE_VERIFY_METHOD (type).
|
||||
(finish_class): Output TYPE_VERIFY_METHOD (type).
|
||||
|
||||
* decl.c (end_java_method): Nullify unused fields.
|
||||
|
||||
2004-08-17 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* verify.c (defer_merging): Quieten.
|
||||
* jcf-parse.c (load_class): Only try to open a class file if it's
|
||||
java.lang.Object or if it's part of the current compilation.
|
||||
Check that the class we just tried to load is the class we just
|
||||
loaded. Quieten.
|
||||
(java_parse_file): Set flag_verify_invocations off if we're
|
||||
compiling from .class.
|
||||
(parse_zip_file_entries): Abort if we try to read a dummy class.
|
||||
* expr.c (can_widen_reference_to): Quieten.
|
||||
(build_invokevirtual): Abort if we try to invokevirtual an
|
||||
interface.
|
||||
(expand_invoke): Don't build a non-interface call to an interface.
|
||||
(build_instanceof): Don't do premature optimization if
|
||||
flag_verify_invocations is not set.
|
||||
* class.c (set_super_info): Disable code that inherits TYPE_DUMMY
|
||||
from superclass.
|
||||
(build_static_field_ref): Add correct type conversion for
|
||||
field_address.
|
||||
(add_miranda_methods): Disable generation of Miranda methods for
|
||||
dummy classes.
|
||||
(layout_class_method): Don't complain about non-static method
|
||||
overrides static method with dummy classes.
|
||||
|
||||
2004-08-13 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* class.c (build_static_field_ref): Re-enable atable lookups for
|
||||
static fields.
|
||||
|
||||
* parse.y (strip_out_static_field_access_decl): Indentation fix.
|
||||
|
||||
2004-08-11 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* gcj.texi (libgcj Runtime Properties): Document new properties.
|
||||
|
||||
2004-08-06 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* jcf-parse.c (load_class): Check that we really have loaded the
|
||||
class we're looking for.
|
||||
|
||||
2004-07-19 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* verify.c (verify_jvm_instructions): Comment change only.
|
||||
|
||||
* typeck.c (build_java_array_type): Add size field to array name.
|
||||
|
||||
* java-tree.h (LOCAL_SLOT_P): New.
|
||||
(update_aliases): Add PC argument.
|
||||
(pushdecl_function_level): New function.
|
||||
|
||||
* java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
|
||||
MODIFY_EXPR, and SAVE_EXPR.
|
||||
(java_gimplify_modify_expr): New function.
|
||||
|
||||
* expr.c (push_type_0): Call find_stack_slot() to create temporary.
|
||||
(expand_iinc): Pass PC to update_aliases().
|
||||
(STORE_INTERNAL): Likewise.
|
||||
(process_jvm_instruction): Likewise.
|
||||
|
||||
* decl.c (base_decl_map): New variable.
|
||||
(uniq): New variable.
|
||||
(update_aliases): Rewrite with more thorough checking.
|
||||
(debug_variable_p): New function.
|
||||
(push_jvm_slot): Don't initialize local variable. Don't pushdecl.
|
||||
(check_local_named_variable): Delete whole function.
|
||||
(initialize_local_variable): New function.
|
||||
(check_local_unnamed_variable): Add checks and comments.
|
||||
(find_local_variable): Rewrite.
|
||||
(java_replace_reference): New function.
|
||||
(function_binding_level): New variable.
|
||||
(pushdecl_function_level): New function.
|
||||
(maybe_pushlevels): Set DECL_LOCAL_END_PC.
|
||||
(maybe_pushlevels): Call pushdecl() on each of the new decls.
|
||||
(start_java_method): Reset uniq. Create base_decl_map. Set
|
||||
function_binding_level.
|
||||
(end_java_method): Null unused fields to save memory.
|
||||
|
||||
2004-06-29 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* except.c (expand_start_java_handler): Push a new binding level.
|
||||
Don't build a TRY_CATCH_EXPR now, we'll do it later. Call
|
||||
register_exception_range() to register where we'll do it.
|
||||
(expand_end_java_handler): Remove old bogus code. Replace with
|
||||
new logic that simply builds TRY_CATCH_EXPRs and inserts them at
|
||||
the top of the expression we're curently building.
|
||||
(maybe_end_try): Delete.
|
||||
* decl.c (binding_level.exception_range): New field.
|
||||
(clear_binding_level): Add field exception_range. Reformat.
|
||||
(poplevel): Call expand_end_java_handler().
|
||||
(poplevel): Call java_add_stmt only if functionbody is false.
|
||||
(maybe_poplevels): Don't call maybe_end_try() from here.
|
||||
(end_java_method): Clear no longer used trees in function decl.
|
||||
(register_exception_range): New function.
|
||||
* java-tree.h (register_exception_range, struct eh_range): Declare.
|
||||
|
||||
2004-06-22 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* class.c (gen_indirect_dispatch_tables): Set the DECL_OWNER of
|
||||
the otable.
|
||||
* check-init.c (get_variable_decl): Teach check-init about
|
||||
FIELD_DECLs addressed via the otable.
|
||||
* jcf-parse.c (load_class): Check CLASS_LOADED_P, not
|
||||
CLASS_PARSED_P.
|
||||
|
||||
2004-05-28 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* jcf-parse.c (load_class): Don't try to read a class that we've
|
||||
already read.
|
||||
|
||||
* expr.c (build_invokeinterface): Use the old-fashioned way of
|
||||
doing indirect dispatch: look up interfaces by name.
|
||||
* java-tree.h (enum java_tree_index): Add
|
||||
JTI_SOFT_LOOKUPINTERFACEMETHODBYNAME_NODE
|
||||
* decl.c (java_init_decl_processing): Add
|
||||
soft_lookupinterfacemethodbyname_node.
|
||||
|
||||
* gjavah.c (print_method_info): Final methods have vtable entries,
|
||||
so gjavah needs to output them.
|
||||
* class.c (layout_class_method): Generate vtable entries for final
|
||||
methods.
|
||||
* parse.y (invocation_mode): Use INVOKE_VIRTUAL for indirect
|
||||
dispatch, even if a method is final.
|
||||
|
||||
2004-05-25 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* class.c (build_symbol_entry): Convert the names of constructors
|
||||
to init_identifier_node when generating an entry for the indirect
|
||||
dispatch table.
|
||||
|
||||
* expr.c (build_known_method_ref): Generate indirect calls for
|
||||
all methods marked DECL_EXTERNAL or TREE_PUBLIC.
|
||||
|
||||
2004-05-24 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* expr.c (build_known_method_ref): Make sure ARRAY_REF access to
|
||||
atable element is of the right type.
|
||||
|
||||
* class.c (build_static_field_ref): Cast pointer to correct type
|
||||
for field.
|
||||
|
||||
2004-04-20 Bryce McKinlay <mckinlay@redhat.com>
|
||||
|
||||
* Merged with HEAD as of 20040514. Diff against
|
||||
gcj-abi-2-merge-20040514.
|
||||
|
||||
2004-04-16 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* verify.c (check_pending_block): Disable subroutine checks.
|
||||
(defer_merging): New function.
|
||||
(merge_types): If types are dummy, use defer_merging to combine them.
|
||||
(verify_jvm_instructions): If invocation is invokeinterface and
|
||||
target is dummy, assume target really is an interface.
|
||||
|
||||
* parse.y (patch_invoke): Break out call to java_create_object.
|
||||
|
||||
* lang.c (flag_verify_invocations): New.
|
||||
|
||||
* jcf-parse.c (load_class): If we've already failed to load a
|
||||
class, don't try again.
|
||||
(load_class): If we can't find a .class file, don't fail, but emit
|
||||
a warning.
|
||||
(parse_class_file): Don't act on dummy methods.
|
||||
|
||||
* java-tree.h (flag_verify_invocations): New.
|
||||
(TYPE_DUMMY): New.
|
||||
(lang_type.dummy_class): New field.
|
||||
(java_create_object): New function.
|
||||
(METHOD_DUMMY): New.
|
||||
|
||||
* expr.c (build_field_ref): Widen field offset.
|
||||
(pop_type_0): If the type in stack_type_map is a TREE_LIST, check
|
||||
that each of its elements is compatible with the one we're
|
||||
popping.
|
||||
(pop_type_0): Issue a warning to say that we need to generate a
|
||||
runtime check.
|
||||
(java_create_object): New function.
|
||||
(build_field_ref): Only generate hard refs if we're not using
|
||||
indirect dispatch.
|
||||
(expand_java_field_op): If we're using !verify_invocations and we
|
||||
see a missing field, generate a decl for it.
|
||||
|
||||
(expand_invoke): If a class doesn't have the method we seek and
|
||||
we're using !flag_verify_invocations, generate a decl for the
|
||||
method now.
|
||||
|
||||
(build_known_method_ref): Always use indirect dispatch via the
|
||||
atable for static methods.
|
||||
|
||||
(expand_java_NEW): Break out object creation into new function,
|
||||
java_create_object.
|
||||
|
||||
(can_widen_reference_to): Issue a warning to say that we need to
|
||||
generate a runtime check.
|
||||
|
||||
* class.c (set_super_info): Inherit TYPE_DUMMY from sureclass.
|
||||
(make_method_value): Also use index for interfaces.
|
||||
(make_class_data): Skip dummy field for inherited data.
|
||||
Don't build method array for dummy methods.
|
||||
Set size_in_byte to -1 when using inirect dispatch
|
||||
Don't build a hard class ref if we don't have a hard ref to our
|
||||
superclass, or if we're using inirect dispatch.
|
||||
Null out dispatch tables.
|
||||
|
||||
(layout_class_method): Don't complain about non-static method
|
||||
overrides static method is method is artificial.
|
||||
|
||||
(build_static_field_ref): Disable atable references to static
|
||||
fields for the time being.
|
||||
|
||||
(layout_class_methods): Check for CLASS_INTERFACE as
|
||||
well as CLASS_ABSTRACT.
|
||||
|
||||
2004-11-24 Steven Bosscher <stevenb@suse.de>
|
||||
|
||||
* class.c (make_class_data): Don't check flag_inline_functions.
|
||||
|
|
|
@ -102,6 +102,7 @@ gt-java-builtins.h gtype-java.h gt-java-resource.h : s-gtype ; @true
|
|||
# Executables built by this Makefile:
|
||||
JAVA_OBJS = java/parse.o java/class.o java/decl.o java/expr.o \
|
||||
java/constants.o java/lang.o java/typeck.o java/except.o java/verify.o \
|
||||
java/verify-glue.o java/verify-impl.o \
|
||||
java/zextract.o java/jcf-io.o java/win32-host.o java/jcf-parse.o java/mangle.o \
|
||||
java/mangle_name.o java/builtins.o java/resource.o \
|
||||
java/jcf-write.o java/buffer.o java/check-init.o java/jcf-depend.o \
|
||||
|
@ -338,6 +339,10 @@ java/win32-host.o: java/win32-host.c $(CONFIG_H) $(SYSTEM_H) coretypes.h java/jc
|
|||
java/verify.o: java/verify.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h \
|
||||
java/javaop.h java/java-opcodes.h java/java-except.h toplev.h $(SYSTEM_H) \
|
||||
coretypes.h $(TM_H)
|
||||
java/verify-glue.o: java/verify-glue.c $(CONFIG_H) $(SYSTEM_H) $(JAVA_TREE_H) \
|
||||
coretypes.h $(TM_H) java/verify.h
|
||||
java/verify-impl.o: java/verify-impl.c $(CONFIG_H) java/verify.h $(SYSTEM_H) \
|
||||
coretypes.h java/jcf.h $(JAVA_TREE_H)
|
||||
java/xref.o: java/xref.c java/xref.h $(CONFIG_H) $(JAVA_TREE_H) toplev.h \
|
||||
$(SYSTEM_H) coretypes.h $(TM_H)
|
||||
java/zextract.o: java/zextract.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
|
||||
|
|
|
@ -36,7 +36,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
|
|||
/* The basic idea is that we assign each local variable declaration
|
||||
and each blank final field an index, and then we pass around
|
||||
bitstrings, where the (2*i)'th bit is set if decl whose DECL_BIT_INDEX
|
||||
is i is definitely assigned, and the (2*i+1)'th bit is set if
|
||||
is i is definitely assigned, and the the (2*i=1)'th bit is set if
|
||||
decl whose DECL_BIT_INDEX is i is definitely unassigned */
|
||||
|
||||
/* One segment of a bitstring. */
|
||||
|
@ -45,7 +45,7 @@ typedef unsigned int word;
|
|||
/* Pointer to a bitstring. */
|
||||
typedef word *words;
|
||||
|
||||
/* Number of local variables currently active. */
|
||||
/* Number of locals variables currently active. */
|
||||
static int num_current_locals = 0;
|
||||
|
||||
/* The value of num_current_locals when we entered the closest
|
||||
|
@ -191,6 +191,50 @@ get_variable_decl (tree exp)
|
|||
return op1;
|
||||
}
|
||||
}
|
||||
else if (TREE_CODE (exp) == INDIRECT_REF)
|
||||
{
|
||||
/* For indirect dispatch, look for an expression of the form
|
||||
(indirect_ref (+ (array_ref otable <N>) this)).
|
||||
FIXME: it would probably be better to generate a JAVA_FIELD_REF
|
||||
expression that gets converted to OTABLE access at
|
||||
gimplification time. */
|
||||
exp = TREE_OPERAND (exp, 0);
|
||||
if (TREE_CODE (exp) == PLUS_EXPR)
|
||||
{
|
||||
tree op0 = TREE_OPERAND (exp, 0);
|
||||
STRIP_NOPS (op0);
|
||||
if (TREE_CODE (op0) == ARRAY_REF)
|
||||
{
|
||||
tree table = TREE_OPERAND (op0, 0);
|
||||
if (TREE_CODE (table) == VAR_DECL
|
||||
&& DECL_LANG_SPECIFIC (table)
|
||||
&& DECL_OWNER (table)
|
||||
&& TYPE_OTABLE_DECL (DECL_OWNER (table)) == table)
|
||||
{
|
||||
HOST_WIDE_INT index
|
||||
= TREE_INT_CST_LOW (TREE_OPERAND (op0, 1));
|
||||
tree otable_methods
|
||||
= TYPE_OTABLE_METHODS (DECL_OWNER (table));
|
||||
tree element;
|
||||
for (element = otable_methods;
|
||||
element;
|
||||
element = TREE_CHAIN (element))
|
||||
{
|
||||
if (index == 1)
|
||||
{
|
||||
tree purpose = TREE_PURPOSE (element);
|
||||
if (TREE_CODE (purpose) == FIELD_DECL)
|
||||
return purpose;
|
||||
else
|
||||
return NULL_TREE;
|
||||
}
|
||||
--index;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return NULL_TREE;
|
||||
}
|
||||
|
||||
|
@ -306,7 +350,7 @@ check_bool2_init (enum tree_code code, tree exp0, tree exp1,
|
|||
/* Check a boolean expression EXP for definite [un]assignment.
|
||||
BEFORE is the set of variables definitely [un]assigned before the
|
||||
conditional. (This bitstring may be modified arbitrarily in this function.)
|
||||
On output, WHEN_FALSE is the set of variables definitely [un]assigned after
|
||||
On output, WHEN_FALSE is the set of variables [un]definitely assigned after
|
||||
the conditional when the conditional is false.
|
||||
On output, WHEN_TRUE is the set of variables definitely [un]assigned after
|
||||
the conditional when the conditional is true.
|
||||
|
@ -432,8 +476,8 @@ done_alternative (words after, struct alternatives *current)
|
|||
WORDS_NEEDED (2 * current->num_locals));
|
||||
}
|
||||
|
||||
/* Used when we are done with a control flow branch and are all merged again.
|
||||
AFTER is the merged state of [un]assigned variables,
|
||||
/* Used when we done with a control flow branch and are all merged again.
|
||||
* AFTER is the merged state of [un]assigned variables,
|
||||
CURRENT is a struct alt that was passed to BEGIN_ALTERNATIVES. */
|
||||
|
||||
#define END_ALTERNATIVES(after, current) \
|
||||
|
@ -445,7 +489,7 @@ done_alternative (words after, struct alternatives *current)
|
|||
start_current_locals = current.save_start_current_locals; \
|
||||
}
|
||||
|
||||
/* Check for [un]initialized local variables in EXP. */
|
||||
/* Check for (un)initialized local variables in EXP. */
|
||||
|
||||
static void
|
||||
check_init (tree exp, words before)
|
||||
|
@ -460,7 +504,7 @@ check_init (tree exp, words before)
|
|||
&& DECL_NAME (exp) != this_identifier_node)
|
||||
{
|
||||
int index = DECL_BIT_INDEX (exp);
|
||||
/* We don't want to report and mark as non-initialized class
|
||||
/* We don't want to report and mark as non initialized class
|
||||
initialization flags. */
|
||||
if (! LOCAL_CLASS_INITIALIZATION_FLAG_P (exp)
|
||||
&& index >= 0 && ! ASSIGNED_P (before, index))
|
||||
|
@ -604,7 +648,7 @@ check_init (tree exp, words before)
|
|||
"hypothetical" analysis model. We do something much
|
||||
simpler: We just disallow assignments inside loops to final
|
||||
variables declared outside the loop. This means we may
|
||||
disallow some contrived assignments that the JLS allows, but I
|
||||
disallow some contrived assignments that the JLS, but I
|
||||
can't see how anything except a very contrived testcase (a
|
||||
do-while whose condition is false?) would care. */
|
||||
|
||||
|
|
349
gcc/java/class.c
349
gcc/java/class.c
|
@ -43,6 +43,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
|
|||
#include "stdio.h"
|
||||
#include "target.h"
|
||||
#include "except.h"
|
||||
#include "cgraph.h"
|
||||
#include "tree-iterator.h"
|
||||
|
||||
/* DOS brain-damage */
|
||||
|
@ -61,6 +62,7 @@ static tree maybe_layout_super_class (tree, tree);
|
|||
static void add_miranda_methods (tree, tree);
|
||||
static int assume_compiled (const char *);
|
||||
static tree build_symbol_entry (tree);
|
||||
static tree emit_assertion_table (tree);
|
||||
|
||||
struct obstack temporary_obstack;
|
||||
|
||||
|
@ -342,6 +344,34 @@ unmangle_classname (const char *name, int name_length)
|
|||
return to_return;
|
||||
}
|
||||
|
||||
#define GEN_TABLE(TABLE, NAME, TABLE_TYPE, TYPE) \
|
||||
do \
|
||||
{ \
|
||||
const char *typename = IDENTIFIER_POINTER (mangled_classname ("", TYPE)); \
|
||||
char *buf = alloca (strlen (typename) + strlen (#NAME "_syms_") + 1); \
|
||||
tree decl; \
|
||||
\
|
||||
sprintf (buf, #NAME "_%s", typename); \
|
||||
TYPE_## TABLE ##_DECL (type) = decl = \
|
||||
build_decl (VAR_DECL, get_identifier (buf), TABLE_TYPE); \
|
||||
DECL_EXTERNAL (decl) = 1; \
|
||||
TREE_STATIC (decl) = 1; \
|
||||
TREE_READONLY (decl) = 1; \
|
||||
TREE_CONSTANT (decl) = 1; \
|
||||
DECL_IGNORED_P (decl) = 1; \
|
||||
/* Mark the table as belonging to this class. */ \
|
||||
pushdecl (decl); \
|
||||
MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC (decl); \
|
||||
DECL_OWNER (decl) = TYPE; \
|
||||
sprintf (buf, #NAME "_syms_%s", typename); \
|
||||
TYPE_## TABLE ##_SYMS_DECL (TYPE) = \
|
||||
build_decl (VAR_DECL, get_identifier (buf), symbols_array_type); \
|
||||
TREE_STATIC (TYPE_## TABLE ##_SYMS_DECL (TYPE)) = 1; \
|
||||
TREE_CONSTANT (TYPE_## TABLE ##_SYMS_DECL (TYPE)) = 1; \
|
||||
DECL_IGNORED_P (TYPE_## TABLE ##_SYMS_DECL (TYPE)) = 1; \
|
||||
pushdecl (TYPE_## TABLE ##_SYMS_DECL (TYPE)); \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
/* Given a class, create the DECLs for all its associated indirect
|
||||
dispatch tables. */
|
||||
|
@ -372,54 +402,14 @@ gen_indirect_dispatch_tables (tree type)
|
|||
|
||||
if (flag_indirect_dispatch)
|
||||
{
|
||||
{
|
||||
char *buf = alloca (strlen (typename) + strlen ("_otable_syms_") + 1);
|
||||
|
||||
sprintf (buf, "_otable_%s", typename);
|
||||
TYPE_OTABLE_DECL (type) =
|
||||
build_decl (VAR_DECL, get_identifier (buf), otable_type);
|
||||
DECL_EXTERNAL (TYPE_OTABLE_DECL (type)) = 1;
|
||||
TREE_STATIC (TYPE_OTABLE_DECL (type)) = 1;
|
||||
TREE_READONLY (TYPE_OTABLE_DECL (type)) = 1;
|
||||
TREE_CONSTANT (TYPE_OTABLE_DECL (type)) = 1;
|
||||
DECL_IGNORED_P (TYPE_OTABLE_DECL (type)) = 1;
|
||||
pushdecl (TYPE_OTABLE_DECL (type));
|
||||
sprintf (buf, "_otable_syms_%s", typename);
|
||||
TYPE_OTABLE_SYMS_DECL (type) =
|
||||
build_decl (VAR_DECL, get_identifier (buf), symbols_array_type);
|
||||
TREE_STATIC (TYPE_OTABLE_SYMS_DECL (type)) = 1;
|
||||
TREE_CONSTANT (TYPE_OTABLE_SYMS_DECL (type)) = 1;
|
||||
DECL_IGNORED_P(TYPE_OTABLE_SYMS_DECL (type)) = 1;
|
||||
pushdecl (TYPE_OTABLE_SYMS_DECL (type));
|
||||
}
|
||||
|
||||
{
|
||||
char *buf = alloca (strlen (typename) + strlen ("_atable_syms_") + 1);
|
||||
tree decl;
|
||||
|
||||
sprintf (buf, "_atable_%s", typename);
|
||||
TYPE_ATABLE_DECL (type) = decl =
|
||||
build_decl (VAR_DECL, get_identifier (buf), atable_type);
|
||||
DECL_EXTERNAL (decl) = 1;
|
||||
TREE_STATIC (decl) = 1;
|
||||
TREE_READONLY (decl) = 1;
|
||||
TREE_CONSTANT (decl) = 1;
|
||||
DECL_IGNORED_P (decl) = 1;
|
||||
/* Mark the atable as belonging to this class. */
|
||||
pushdecl (decl);
|
||||
MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC (decl);
|
||||
DECL_OWNER (decl) = type;
|
||||
sprintf (buf, "_atable_syms_%s", typename);
|
||||
TYPE_ATABLE_SYMS_DECL (type) =
|
||||
build_decl (VAR_DECL, get_identifier (buf), symbols_array_type);
|
||||
TREE_STATIC (TYPE_ATABLE_SYMS_DECL (type)) = 1;
|
||||
TREE_CONSTANT (TYPE_ATABLE_SYMS_DECL (type)) = 1;
|
||||
DECL_IGNORED_P (TYPE_ATABLE_SYMS_DECL (type)) = 1;
|
||||
pushdecl (TYPE_ATABLE_SYMS_DECL (type));
|
||||
}
|
||||
GEN_TABLE (ATABLE, _atable, atable_type, type);
|
||||
GEN_TABLE (OTABLE, _otable, otable_type, type);
|
||||
GEN_TABLE (ITABLE, _itable, itable_type, type);
|
||||
}
|
||||
}
|
||||
|
||||
#undef GEN_TABLE
|
||||
|
||||
tree
|
||||
push_class (tree class_type, tree class_name)
|
||||
{
|
||||
|
@ -959,7 +949,7 @@ build_class_ref (tree type)
|
|||
we always emit this hard superclass reference. */
|
||||
if (flag_indirect_dispatch
|
||||
&& type != output_class
|
||||
&& type != CLASSTYPE_SUPER (output_class)
|
||||
// && type != CLASSTYPE_SUPER (output_class)
|
||||
&& TREE_CODE (type) == RECORD_TYPE)
|
||||
return build_indirect_class_ref (type);
|
||||
|
||||
|
@ -1062,8 +1052,7 @@ build_static_field_ref (tree fdecl)
|
|||
However, currently sometimes gcj is too eager and will end up
|
||||
returning the field itself, leading to an incorrect external
|
||||
reference being generated. */
|
||||
if ((is_compiled
|
||||
&& (! flag_indirect_dispatch || current_class == fclass))
|
||||
if ((is_compiled && !flag_indirect_dispatch)
|
||||
|| (FIELD_FINAL (fdecl) && DECL_INITIAL (fdecl) != NULL_TREE
|
||||
&& (JSTRING_TYPE_P (TREE_TYPE (fdecl))
|
||||
|| JNUMERIC_TYPE_P (TREE_TYPE (fdecl)))
|
||||
|
@ -1084,16 +1073,19 @@ build_static_field_ref (tree fdecl)
|
|||
= build_int_cst (NULL_TREE, get_symbol_table_index
|
||||
(fdecl, &TYPE_ATABLE_METHODS (output_class)));
|
||||
tree field_address
|
||||
= build4 (ARRAY_REF, build_pointer_type (TREE_TYPE (fdecl)),
|
||||
= build4 (ARRAY_REF,
|
||||
TREE_TYPE (TREE_TYPE (TYPE_ATABLE_DECL (output_class))),
|
||||
TYPE_ATABLE_DECL (output_class), table_index,
|
||||
NULL_TREE, NULL_TREE);
|
||||
field_address = convert (build_pointer_type (TREE_TYPE (fdecl)),
|
||||
field_address);
|
||||
return fold (build1 (INDIRECT_REF, TREE_TYPE (fdecl),
|
||||
field_address));
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Compile as:
|
||||
* *(FTYPE*)build_class_ref(FCLASS)->fields[INDEX].info.addr */
|
||||
*(FTYPE*)build_class_ref(FCLASS)->fields[INDEX].info.addr */
|
||||
tree ref = build_class_ref (fclass);
|
||||
tree fld;
|
||||
int field_index = 0;
|
||||
|
@ -1117,7 +1109,7 @@ build_static_field_ref (tree fdecl)
|
|||
ref, build_int_cst (NULL_TREE, field_index)));
|
||||
ref = build1 (INDIRECT_REF, field_type_node, ref);
|
||||
ref = build3 (COMPONENT_REF, field_info_union_node,
|
||||
ref, lookup_field (&field_type_node, info_ident),
|
||||
ref, lookup_field (&field_type_node, info_ident),
|
||||
NULL_TREE);
|
||||
ref = build3 (COMPONENT_REF, ptr_type_node,
|
||||
ref, TREE_CHAIN (TYPE_FIELDS (field_info_union_node)),
|
||||
|
@ -1284,7 +1276,7 @@ make_field_value (tree fdecl)
|
|||
? TREE_CHAIN (TYPE_FIELDS (field_info_union_node))
|
||||
: TYPE_FIELDS (field_info_union_node)),
|
||||
(FIELD_STATIC (fdecl)
|
||||
? build_address_of (build_static_field_ref (fdecl))
|
||||
? build_address_of (fdecl)
|
||||
: byte_position (fdecl)))));
|
||||
|
||||
FINISH_RECORD_CONSTRUCTOR (finit);
|
||||
|
@ -1565,7 +1557,9 @@ make_class_data (tree type)
|
|||
|
||||
/* Build Field array. */
|
||||
field = TYPE_FIELDS (type);
|
||||
if (DECL_NAME (field) == NULL_TREE)
|
||||
while (field && DECL_ARTIFICIAL (field))
|
||||
field = TREE_CHAIN (field); /* Skip dummy fields. */
|
||||
if (field && DECL_NAME (field) == NULL_TREE)
|
||||
field = TREE_CHAIN (field); /* Skip dummy field for inherited data. */
|
||||
for ( ; field != NULL_TREE; field = TREE_CHAIN (field))
|
||||
{
|
||||
|
@ -1620,6 +1614,11 @@ make_class_data (tree type)
|
|||
&& ! flag_keep_inline_functions
|
||||
&& optimize)
|
||||
continue;
|
||||
/* Even if we have a decl, we don't necessaily have the code.
|
||||
This can happen if we inherit a method from a superclass for
|
||||
which we don't have a .class file. */
|
||||
if (METHOD_DUMMY (method))
|
||||
continue;
|
||||
init = make_method_value (method);
|
||||
method_count++;
|
||||
methods = tree_cons (NULL_TREE, init, methods);
|
||||
|
@ -1663,10 +1662,8 @@ make_class_data (tree type)
|
|||
super = CLASSTYPE_SUPER (type);
|
||||
if (super == NULL_TREE)
|
||||
super = null_pointer_node;
|
||||
else if (/* FIXME: we should also test for (!
|
||||
flag_indirect_dispatch) here, but libgcj can't cope with
|
||||
a symbolic reference a superclass in the class data. */
|
||||
assume_compiled (IDENTIFIER_POINTER (DECL_NAME (type_decl)))
|
||||
else if (! flag_indirect_dispatch
|
||||
&& assume_compiled (IDENTIFIER_POINTER (DECL_NAME (type_decl)))
|
||||
&& assume_compiled (IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (super)))))
|
||||
super = build_class_ref (super);
|
||||
else
|
||||
|
@ -1721,13 +1718,19 @@ make_class_data (tree type)
|
|||
= emit_symbol_table
|
||||
(DECL_NAME (TYPE_OTABLE_DECL (type)),
|
||||
TYPE_OTABLE_DECL (type), TYPE_OTABLE_METHODS (type),
|
||||
TYPE_OTABLE_SYMS_DECL (type), integer_type_node);
|
||||
TYPE_OTABLE_SYMS_DECL (type), integer_type_node, 1);
|
||||
|
||||
TYPE_ATABLE_DECL (type)
|
||||
= emit_symbol_table
|
||||
(DECL_NAME (TYPE_ATABLE_DECL (type)),
|
||||
TYPE_ATABLE_DECL (type), TYPE_ATABLE_METHODS (type),
|
||||
TYPE_ATABLE_SYMS_DECL (type), ptr_type_node);
|
||||
TYPE_ATABLE_SYMS_DECL (type), ptr_type_node, 1);
|
||||
|
||||
TYPE_ITABLE_DECL (type)
|
||||
= emit_symbol_table
|
||||
(DECL_NAME (TYPE_ITABLE_DECL (type)),
|
||||
TYPE_ITABLE_DECL (type), TYPE_ITABLE_METHODS (type),
|
||||
TYPE_ITABLE_SYMS_DECL (type), ptr_type_node, 2);
|
||||
}
|
||||
|
||||
TYPE_CTABLE_DECL (type) = emit_catch_table (type);
|
||||
|
@ -1765,8 +1768,13 @@ make_class_data (tree type)
|
|||
PUSH_FIELD_VALUE (cons, "fields",
|
||||
fields_decl == NULL_TREE ? null_pointer_node
|
||||
: build1 (ADDR_EXPR, field_ptr_type_node, fields_decl));
|
||||
PUSH_FIELD_VALUE (cons, "size_in_bytes", size_in_bytes (type));
|
||||
PUSH_FIELD_VALUE (cons, "field_count",
|
||||
/* If we're using the binary compatibility ABI we don't know the
|
||||
size until load time. */
|
||||
PUSH_FIELD_VALUE (cons, "size_in_bytes",
|
||||
(flag_indirect_dispatch
|
||||
? integer_minus_one_node
|
||||
: size_in_bytes (type)));
|
||||
PUSH_FIELD_VALUE (cons, "field_count",
|
||||
build_int_cst (NULL_TREE, field_count));
|
||||
PUSH_FIELD_VALUE (cons, "static_field_count",
|
||||
build_int_cst (NULL_TREE, static_field_count));
|
||||
|
@ -1810,6 +1818,21 @@ make_class_data (tree type)
|
|||
TREE_CONSTANT (TYPE_ATABLE_DECL (type)) = 1;
|
||||
TREE_INVARIANT (TYPE_ATABLE_DECL (type)) = 1;
|
||||
}
|
||||
if (TYPE_ITABLE_METHODS(type) == NULL_TREE)
|
||||
{
|
||||
PUSH_FIELD_VALUE (cons, "itable", null_pointer_node);
|
||||
PUSH_FIELD_VALUE (cons, "itable_syms", null_pointer_node);
|
||||
}
|
||||
else
|
||||
{
|
||||
PUSH_FIELD_VALUE (cons, "itable",
|
||||
build1 (ADDR_EXPR, itable_ptr_type, TYPE_ITABLE_DECL (type)));
|
||||
PUSH_FIELD_VALUE (cons, "itable_syms",
|
||||
build1 (ADDR_EXPR, symbols_array_ptr_type,
|
||||
TYPE_ITABLE_SYMS_DECL (type)));
|
||||
TREE_CONSTANT (TYPE_ITABLE_DECL (type)) = 1;
|
||||
TREE_INVARIANT (TYPE_ITABLE_DECL (type)) = 1;
|
||||
}
|
||||
|
||||
PUSH_FIELD_VALUE (cons, "catch_classes",
|
||||
build1 (ADDR_EXPR, ptr_type_node, TYPE_CTABLE_DECL (type)));
|
||||
|
@ -1817,7 +1840,13 @@ make_class_data (tree type)
|
|||
PUSH_FIELD_VALUE (cons, "loader", null_pointer_node);
|
||||
PUSH_FIELD_VALUE (cons, "interface_count",
|
||||
build_int_cst (NULL_TREE, interface_len));
|
||||
PUSH_FIELD_VALUE (cons, "state", integer_zero_node);
|
||||
PUSH_FIELD_VALUE
|
||||
(cons, "state",
|
||||
convert (byte_type_node,
|
||||
build_int_cst (NULL_TREE,
|
||||
flag_indirect_dispatch
|
||||
? JV_STATE_PRELOADING
|
||||
: JV_STATE_COMPILED)));
|
||||
|
||||
PUSH_FIELD_VALUE (cons, "thread", null_pointer_node);
|
||||
PUSH_FIELD_VALUE (cons, "depth", integer_zero_node);
|
||||
|
@ -1825,9 +1854,23 @@ make_class_data (tree type)
|
|||
PUSH_FIELD_VALUE (cons, "idt", null_pointer_node);
|
||||
PUSH_FIELD_VALUE (cons, "arrayclass", null_pointer_node);
|
||||
PUSH_FIELD_VALUE (cons, "protectionDomain", null_pointer_node);
|
||||
|
||||
{
|
||||
tree assertion_table_ref;
|
||||
if (TYPE_ASSERTIONS (type) == NULL)
|
||||
assertion_table_ref = null_pointer_node;
|
||||
else
|
||||
assertion_table_ref = build1 (ADDR_EXPR,
|
||||
build_pointer_type (assertion_table_type),
|
||||
emit_assertion_table (type));
|
||||
|
||||
PUSH_FIELD_VALUE (cons, "assertion_table", assertion_table_ref);
|
||||
}
|
||||
|
||||
PUSH_FIELD_VALUE (cons, "hack_signers", null_pointer_node);
|
||||
PUSH_FIELD_VALUE (cons, "chain", null_pointer_node);
|
||||
PUSH_FIELD_VALUE (cons, "aux_info", null_pointer_node);
|
||||
PUSH_FIELD_VALUE (cons, "engine", null_pointer_node);
|
||||
|
||||
FINISH_RECORD_CONSTRUCTOR (cons);
|
||||
|
||||
|
@ -1838,11 +1881,26 @@ make_class_data (tree type)
|
|||
DECL_ALIGN (decl) = 64;
|
||||
|
||||
rest_of_decl_compilation (decl, 1, 0);
|
||||
|
||||
TYPE_OTABLE_DECL (type) = NULL_TREE;
|
||||
TYPE_ATABLE_DECL (type) = NULL_TREE;
|
||||
TYPE_CTABLE_DECL (type) = NULL_TREE;
|
||||
}
|
||||
|
||||
void
|
||||
finish_class (void)
|
||||
{
|
||||
if (TYPE_VERIFY_METHOD (output_class))
|
||||
{
|
||||
tree verify_method = TYPE_VERIFY_METHOD (output_class);
|
||||
DECL_SAVED_TREE (verify_method)
|
||||
= add_stmt_to_compound (DECL_SAVED_TREE (verify_method), void_type_node,
|
||||
build (RETURN_EXPR, void_type_node, NULL));
|
||||
java_genericize (verify_method);
|
||||
cgraph_finalize_function (verify_method, false);
|
||||
TYPE_ASSERTIONS (current_class) = NULL;
|
||||
}
|
||||
|
||||
java_expand_catch_classes (current_class);
|
||||
|
||||
current_function_decl = NULL_TREE;
|
||||
|
@ -2095,20 +2153,22 @@ layout_class (tree this_class)
|
|||
if (!CLASS_FROM_SOURCE_P (this_class))
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = BINFO_N_BASE_BINFOS (TYPE_BINFO (this_class)) - 1; i > 0; i--)
|
||||
if (TYPE_BINFO (this_class))
|
||||
{
|
||||
tree binfo = BINFO_BASE_BINFO (TYPE_BINFO (this_class), i);
|
||||
tree super_interface = BINFO_TYPE (binfo);
|
||||
tree maybe_super_interface
|
||||
= maybe_layout_super_class (super_interface, NULL_TREE);
|
||||
if (maybe_super_interface == NULL
|
||||
|| TREE_CODE (TYPE_SIZE (maybe_super_interface)) == ERROR_MARK)
|
||||
for (i = BINFO_N_BASE_BINFOS (TYPE_BINFO (this_class)) - 1; i > 0; i--)
|
||||
{
|
||||
TYPE_SIZE (this_class) = error_mark_node;
|
||||
CLASS_BEING_LAIDOUT (this_class) = 0;
|
||||
class_list = TREE_CHAIN (class_list);
|
||||
return;
|
||||
tree binfo = BINFO_BASE_BINFO (TYPE_BINFO (this_class), i);
|
||||
tree super_interface = BINFO_TYPE (binfo);
|
||||
tree maybe_super_interface
|
||||
= maybe_layout_super_class (super_interface, NULL_TREE);
|
||||
if (maybe_super_interface == NULL
|
||||
|| TREE_CODE (TYPE_SIZE (maybe_super_interface)) == ERROR_MARK)
|
||||
{
|
||||
TYPE_SIZE (this_class) = error_mark_node;
|
||||
CLASS_BEING_LAIDOUT (this_class) = 0;
|
||||
class_list = TREE_CHAIN (class_list);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2124,8 +2184,11 @@ layout_class (tree this_class)
|
|||
static void
|
||||
add_miranda_methods (tree base_class, tree search_class)
|
||||
{
|
||||
tree binfo, base_binfo;
|
||||
int i;
|
||||
tree binfo, base_binfo;
|
||||
|
||||
if (!CLASS_PARSED_P (search_class))
|
||||
load_class (search_class, 1);
|
||||
|
||||
for (binfo = TYPE_BINFO (search_class), i = 1;
|
||||
BINFO_BASE_ITERATE (binfo, i, base_binfo); i++)
|
||||
|
@ -2133,6 +2196,11 @@ add_miranda_methods (tree base_class, tree search_class)
|
|||
tree method_decl;
|
||||
tree elt = BINFO_TYPE (base_binfo);
|
||||
|
||||
/* FIXME: This is totally bogus. We should not be handling
|
||||
Miranda methods at all if we're using the BC ABI. */
|
||||
if (TYPE_DUMMY (elt))
|
||||
continue;
|
||||
|
||||
/* Ensure that interface methods are seen in declared order. */
|
||||
if (!CLASS_LOADED_P (elt))
|
||||
load_class (elt, 1);
|
||||
|
@ -2193,7 +2261,8 @@ layout_class_methods (tree this_class)
|
|||
dtable_count = integer_zero_node;
|
||||
|
||||
type_name = TYPE_NAME (this_class);
|
||||
if (CLASS_ABSTRACT (type_name) || CLASS_INTERFACE (type_name))
|
||||
if (!flag_indirect_dispatch
|
||||
&& (CLASS_ABSTRACT (type_name) || CLASS_INTERFACE (type_name)))
|
||||
{
|
||||
/* An abstract class can have methods which are declared only in
|
||||
an implemented interface. These are called "Miranda
|
||||
|
@ -2273,7 +2342,9 @@ layout_class_method (tree this_class, tree super_class,
|
|||
bool method_override = false;
|
||||
tree super_method = lookup_argument_method (super_class, method_name,
|
||||
method_sig);
|
||||
if (super_method != NULL_TREE)
|
||||
if (super_method != NULL_TREE
|
||||
&& ! METHOD_DUMMY (super_method)
|
||||
&& ! DECL_ARTIFICIAL (super_method))
|
||||
{
|
||||
method_override = true;
|
||||
if (! METHOD_PUBLIC (super_method) &&
|
||||
|
@ -2296,11 +2367,19 @@ layout_class_method (tree this_class, tree super_class,
|
|||
error ("%Jnon-static method '%D' overrides static method",
|
||||
method_decl, method_decl);
|
||||
}
|
||||
else if (! METHOD_FINAL (method_decl)
|
||||
&& ! METHOD_PRIVATE (method_decl)
|
||||
&& ! CLASS_FINAL (TYPE_NAME (this_class))
|
||||
else if (this_class == object_type_node
|
||||
&& (METHOD_FINAL (method_decl)
|
||||
|| METHOD_PRIVATE (method_decl)))
|
||||
{
|
||||
/* We don't generate vtable entries for final Object
|
||||
methods. This is simply to save space, since every
|
||||
object would otherwise have to define them. */
|
||||
}
|
||||
else if (! METHOD_PRIVATE (method_decl)
|
||||
&& dtable_count)
|
||||
{
|
||||
/* We generate vtable entries for final methods because they
|
||||
may one day be changed to non-final. */
|
||||
set_method_index (method_decl, dtable_count);
|
||||
dtable_count = fold (build2 (PLUS_EXPR, integer_type_node,
|
||||
dtable_count, integer_one_node));
|
||||
|
@ -2387,14 +2466,20 @@ static tree
|
|||
build_symbol_entry (tree decl)
|
||||
{
|
||||
tree clname, name, signature, sym;
|
||||
|
||||
clname = build_utf8_ref (DECL_NAME (TYPE_NAME (DECL_CONTEXT (decl))));
|
||||
name = build_utf8_ref (DECL_NAME (decl));
|
||||
/* ??? Constructors are given the name foo.foo all the way through
|
||||
the compiler, but in the method table they're all renamed
|
||||
foo.<init>. So, we have to do the same here unless we want an
|
||||
unresolved reference at runtime. */
|
||||
name = build_utf8_ref ((TREE_CODE (decl) == FUNCTION_DECL
|
||||
&& DECL_CONSTRUCTOR_P (decl))
|
||||
? init_identifier_node
|
||||
: DECL_NAME (decl));
|
||||
signature = build_java_signature (TREE_TYPE (decl));
|
||||
signature = build_utf8_ref (unmangle_classname
|
||||
(IDENTIFIER_POINTER (signature),
|
||||
IDENTIFIER_LENGTH (signature)));
|
||||
|
||||
|
||||
START_RECORD_CONSTRUCTOR (sym, symbol_type);
|
||||
PUSH_FIELD_VALUE (sym, "clname", clname);
|
||||
PUSH_FIELD_VALUE (sym, "name", name);
|
||||
|
@ -2410,7 +2495,8 @@ build_symbol_entry (tree decl)
|
|||
|
||||
tree
|
||||
emit_symbol_table (tree name, tree the_table, tree decl_list,
|
||||
tree the_syms_decl, tree the_array_element_type)
|
||||
tree the_syms_decl, tree the_array_element_type,
|
||||
int element_size)
|
||||
{
|
||||
tree method_list, method, table, list, null_symbol;
|
||||
tree table_size, the_array_type;
|
||||
|
@ -2457,7 +2543,8 @@ emit_symbol_table (tree name, tree the_table, tree decl_list,
|
|||
uninitialized static array of INDEX + 1 elements. The extra entry
|
||||
is used by the runtime to track whether the table has been
|
||||
initialized. */
|
||||
table_size = build_index_type (build_int_cst (NULL_TREE, index));
|
||||
table_size
|
||||
= build_index_type (build_int_cst (NULL_TREE, index * element_size + 1));
|
||||
the_array_type = build_array_type (the_array_element_type, table_size);
|
||||
the_table = build_decl (VAR_DECL, name, the_array_type);
|
||||
TREE_STATIC (the_table) = 1;
|
||||
|
@ -2467,7 +2554,7 @@ emit_symbol_table (tree name, tree the_table, tree decl_list,
|
|||
return the_table;
|
||||
}
|
||||
|
||||
/* make an entry for the catch_classes list. */
|
||||
/* Make an entry for the catch_classes list. */
|
||||
tree
|
||||
make_catch_class_record (tree catch_class, tree classname)
|
||||
{
|
||||
|
@ -2512,7 +2599,95 @@ emit_catch_table (tree this_class)
|
|||
rest_of_decl_compilation (table, 1, 0);
|
||||
return table;
|
||||
}
|
||||
|
||||
|
||||
/* Given a type, return the signature used by
|
||||
_Jv_FindClassFromSignature() in libgcj. This isn't exactly the
|
||||
same as build_java_signature() because we want the canonical array
|
||||
type. */
|
||||
|
||||
static tree
|
||||
build_signature_for_libgcj (tree type)
|
||||
{
|
||||
tree sig, ref;
|
||||
|
||||
sig = build_java_signature (type);
|
||||
ref = build_utf8_ref (unmangle_classname (IDENTIFIER_POINTER (sig),
|
||||
IDENTIFIER_LENGTH (sig)));
|
||||
return ref;
|
||||
}
|
||||
|
||||
/* Add an entry to the type assertion table. Callback used during hashtable
|
||||
traversal. */
|
||||
|
||||
static int
|
||||
add_assertion_table_entry (void **htab_entry, void *ptr)
|
||||
{
|
||||
tree entry;
|
||||
tree code_val, op1_utf8, op2_utf8;
|
||||
tree *list = (tree *) ptr;
|
||||
type_assertion *as = (type_assertion *) *htab_entry;
|
||||
|
||||
code_val = build_int_cst (NULL_TREE, as->assertion_code);
|
||||
|
||||
if (as->op1 == NULL_TREE)
|
||||
op1_utf8 = null_pointer_node;
|
||||
else
|
||||
op1_utf8 = build_signature_for_libgcj (as->op1);
|
||||
|
||||
if (as->op2 == NULL_TREE)
|
||||
op2_utf8 = null_pointer_node;
|
||||
else
|
||||
op2_utf8 = build_signature_for_libgcj (as->op2);
|
||||
|
||||
START_RECORD_CONSTRUCTOR (entry, assertion_entry_type);
|
||||
PUSH_FIELD_VALUE (entry, "assertion_code", code_val);
|
||||
PUSH_FIELD_VALUE (entry, "op1", op1_utf8);
|
||||
PUSH_FIELD_VALUE (entry, "op2", op2_utf8);
|
||||
FINISH_RECORD_CONSTRUCTOR (entry);
|
||||
|
||||
*list = tree_cons (NULL_TREE, entry, *list);
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Generate the type assertion table for CLASS, and return its DECL. */
|
||||
|
||||
static tree
|
||||
emit_assertion_table (tree class)
|
||||
{
|
||||
tree null_entry, ctor, table_decl;
|
||||
tree list = NULL_TREE;
|
||||
htab_t assertions_htab = TYPE_ASSERTIONS (class);
|
||||
|
||||
/* Iterate through the hash table. */
|
||||
htab_traverse (assertions_htab, add_assertion_table_entry, &list);
|
||||
|
||||
/* Finish with a null entry. */
|
||||
START_RECORD_CONSTRUCTOR (null_entry, assertion_entry_type);
|
||||
PUSH_FIELD_VALUE (null_entry, "assertion_code", integer_zero_node);
|
||||
PUSH_FIELD_VALUE (null_entry, "op1", null_pointer_node);
|
||||
PUSH_FIELD_VALUE (null_entry, "op2", null_pointer_node);
|
||||
FINISH_RECORD_CONSTRUCTOR (null_entry);
|
||||
|
||||
list = tree_cons (NULL_TREE, null_entry, list);
|
||||
|
||||
/* Put the list in the right order and make it a constructor. */
|
||||
list = nreverse (list);
|
||||
ctor = build_constructor (assertion_table_type, list);
|
||||
|
||||
table_decl = build_decl (VAR_DECL, mangled_classname ("_type_assert_", class),
|
||||
assertion_table_type);
|
||||
|
||||
TREE_STATIC (table_decl) = 1;
|
||||
TREE_READONLY (table_decl) = 1;
|
||||
TREE_CONSTANT (table_decl) = 1;
|
||||
DECL_IGNORED_P (table_decl) = 1;
|
||||
|
||||
DECL_INITIAL (table_decl) = ctor;
|
||||
DECL_ARTIFICIAL (table_decl) = 1;
|
||||
rest_of_decl_compilation (table_decl, 1, 0);
|
||||
|
||||
return table_decl;
|
||||
}
|
||||
|
||||
void
|
||||
init_class_processing (void)
|
||||
|
|
|
@ -242,17 +242,44 @@ check_local_unnamed_variable (tree best, tree decl, tree type)
|
|||
|| (INTEGRAL_TYPE_P (decl_type)
|
||||
&& INTEGRAL_TYPE_P (type)
|
||||
&& TYPE_PRECISION (decl_type) <= 32
|
||||
&& TYPE_PRECISION (type) <= 32
|
||||
&& TYPE_PRECISION (type) <= 32
|
||||
&& TYPE_PRECISION (decl_type) >= TYPE_PRECISION (type))
|
||||
|| (TREE_CODE (TREE_TYPE (decl)) == POINTER_TYPE
|
||||
&& type == ptr_type_node))
|
||||
{
|
||||
if (best == NULL_TREE
|
||||
|| (decl_type == type && TREE_TYPE (best) != type))
|
||||
return decl;
|
||||
}
|
||||
/* ptr_type_node is used for null pointers, which are
|
||||
assignment compatible with everything. */
|
||||
|| (TREE_CODE (decl_type) == POINTER_TYPE
|
||||
&& type == ptr_type_node)
|
||||
/* Whenever anyone wants to use a slot that is initially
|
||||
occupied by a PARM_DECL of pointer type they must get that
|
||||
decl, even if they asked for a pointer to a different type.
|
||||
However, if someone wants a scalar variable in a slot that
|
||||
initially held a pointer arg -- or vice versa -- we create a
|
||||
new VAR_DECL.
|
||||
|
||||
return best;
|
||||
???: As long as verification is correct, this will be a
|
||||
compatible type. But maybe we should create a dummy vribale
|
||||
and replace all references to it with the DECL and a
|
||||
NOP_EXPR.
|
||||
*/
|
||||
|| (TREE_CODE (decl_type) == POINTER_TYPE
|
||||
&& TREE_CODE (decl) == PARM_DECL
|
||||
&& TREE_CODE (type) == POINTER_TYPE)
|
||||
|
||||
/* The new verifier requires a similar treatment in the
|
||||
situation where the parameter has an integral type which
|
||||
promotes to `int'. */
|
||||
|| (flag_new_verifier
|
||||
&& TREE_CODE (decl) == PARM_DECL
|
||||
&& INTEGRAL_TYPE_P (decl_type)
|
||||
&& TYPE_PRECISION (decl_type) <= 32
|
||||
&& INTEGRAL_TYPE_P (type)
|
||||
&& TYPE_PRECISION (type) <= 32))
|
||||
{
|
||||
if (best == NULL_TREE
|
||||
|| (decl_type == type && TREE_TYPE (best) != type))
|
||||
return decl;
|
||||
}
|
||||
|
||||
return best;
|
||||
}
|
||||
|
||||
|
||||
|
@ -286,9 +313,9 @@ find_local_variable (int index, tree type, int pc ATTRIBUTE_UNUSED)
|
|||
variable that is used for every reference in that local variable
|
||||
slot. */
|
||||
if (! decl)
|
||||
{
|
||||
char buf[64];
|
||||
tree name;
|
||||
{
|
||||
char buf[64];
|
||||
tree name;
|
||||
sprintf (buf, "#slot#%d#%d", index, uniq++);
|
||||
name = get_identifier (buf);
|
||||
decl = build_decl (VAR_DECL, name, type);
|
||||
|
@ -688,6 +715,11 @@ java_init_decl_processing (void)
|
|||
TYPE_NONALIASED_COMPONENT (atable_type) = 1;
|
||||
atable_ptr_type = build_pointer_type (atable_type);
|
||||
|
||||
itable_type = build_array_type (ptr_type_node,
|
||||
one_elt_array_domain_type);
|
||||
TYPE_NONALIASED_COMPONENT (itable_type) = 1;
|
||||
itable_ptr_type = build_pointer_type (itable_type);
|
||||
|
||||
symbol_type = make_node (RECORD_TYPE);
|
||||
PUSH_FIELD (symbol_type, field, "clname", utf8const_ptr_type);
|
||||
PUSH_FIELD (symbol_type, field, "name", utf8const_ptr_type);
|
||||
|
@ -698,6 +730,15 @@ java_init_decl_processing (void)
|
|||
one_elt_array_domain_type);
|
||||
symbols_array_ptr_type = build_pointer_type (symbols_array_type);
|
||||
|
||||
assertion_entry_type = make_node (RECORD_TYPE);
|
||||
PUSH_FIELD (assertion_entry_type, field, "assertion_code", integer_type_node);
|
||||
PUSH_FIELD (assertion_entry_type, field, "op1", utf8const_ptr_type);
|
||||
PUSH_FIELD (assertion_entry_type, field, "op2", utf8const_ptr_type);
|
||||
FINISH_RECORD (assertion_entry_type);
|
||||
|
||||
assertion_table_type = build_array_type (assertion_entry_type,
|
||||
one_elt_array_domain_type);
|
||||
|
||||
/* As you're adding items here, please update the code right after
|
||||
this section, so that the filename containing the source code of
|
||||
the pre-defined class gets registered correctly. */
|
||||
|
@ -813,6 +854,9 @@ java_init_decl_processing (void)
|
|||
PUSH_FIELD (class_type_node, field, "atable", atable_ptr_type);
|
||||
PUSH_FIELD (class_type_node, field, "atable_syms",
|
||||
symbols_array_ptr_type);
|
||||
PUSH_FIELD (class_type_node, field, "itable", itable_ptr_type);
|
||||
PUSH_FIELD (class_type_node, field, "itable_syms",
|
||||
symbols_array_ptr_type);
|
||||
PUSH_FIELD (class_type_node, field, "catch_classes", ptr_type_node);
|
||||
PUSH_FIELD (class_type_node, field, "interfaces",
|
||||
build_pointer_type (class_ptr_type));
|
||||
|
@ -825,9 +869,11 @@ java_init_decl_processing (void)
|
|||
PUSH_FIELD (class_type_node, field, "idt", ptr_type_node);
|
||||
PUSH_FIELD (class_type_node, field, "arrayclass", ptr_type_node);
|
||||
PUSH_FIELD (class_type_node, field, "protectionDomain", ptr_type_node);
|
||||
PUSH_FIELD (class_type_node, field, "assertion_table", ptr_type_node);
|
||||
PUSH_FIELD (class_type_node, field, "hack_signers", ptr_type_node);
|
||||
PUSH_FIELD (class_type_node, field, "chain", ptr_type_node);
|
||||
PUSH_FIELD (class_type_node, field, "aux_info", ptr_type_node);
|
||||
PUSH_FIELD (class_type_node, field, "engine", ptr_type_node);
|
||||
for (t = TYPE_FIELDS (class_type_node); t != NULL_TREE; t = TREE_CHAIN (t))
|
||||
FIELD_PRIVATE (t) = 1;
|
||||
push_super_field (class_type_node, object_type_node);
|
||||
|
@ -993,8 +1039,14 @@ java_init_decl_processing (void)
|
|||
= builtin_function ("_Jv_LookupInterfaceMethodIdx",
|
||||
build_function_type (ptr_type_node, t),
|
||||
0, NOT_BUILT_IN, NULL, NULL_TREE);
|
||||
|
||||
DECL_IS_PURE (soft_lookupinterfacemethod_node) = 1;
|
||||
t = tree_cons (NULL_TREE, ptr_type_node,
|
||||
tree_cons (NULL_TREE, ptr_type_node,
|
||||
tree_cons (NULL_TREE, ptr_type_node, endlink)));
|
||||
soft_lookupinterfacemethodbyname_node
|
||||
= builtin_function ("_Jv_LookupInterfaceMethod",
|
||||
build_function_type (ptr_type_node, t),
|
||||
0, NOT_BUILT_IN, NULL, NULL_TREE);
|
||||
t = tree_cons (NULL_TREE, object_ptr_type_node,
|
||||
tree_cons (NULL_TREE, ptr_type_node,
|
||||
tree_cons (NULL_TREE, ptr_type_node,
|
||||
|
|
541
gcc/java/expr.c
541
gcc/java/expr.c
|
@ -323,26 +323,63 @@ pop_type_0 (tree type, char **messagep)
|
|||
t = stack_type_map[--stack_pointer];
|
||||
if (type == NULL_TREE || t == type)
|
||||
return t;
|
||||
if (TREE_CODE (t) == TREE_LIST)
|
||||
{
|
||||
do
|
||||
{
|
||||
tree tt = TREE_PURPOSE (t);
|
||||
if (! can_widen_reference_to (tt, type))
|
||||
{
|
||||
t = tt;
|
||||
goto fail;
|
||||
}
|
||||
t = TREE_CHAIN (t);
|
||||
}
|
||||
while (t);
|
||||
return t;
|
||||
}
|
||||
if (INTEGRAL_TYPE_P (type) && INTEGRAL_TYPE_P (t)
|
||||
&& TYPE_PRECISION (type) <= 32 && TYPE_PRECISION (t) <= 32)
|
||||
return t;
|
||||
return t;
|
||||
if (TREE_CODE (type) == POINTER_TYPE && TREE_CODE (t) == POINTER_TYPE)
|
||||
{
|
||||
if (type == ptr_type_node || type == object_ptr_type_node)
|
||||
return t;
|
||||
else if (t == ptr_type_node) /* Special case for null reference. */
|
||||
return type;
|
||||
else if (can_widen_reference_to (t, type))
|
||||
return t;
|
||||
/* This is a kludge, but matches what Sun's verifier does.
|
||||
It can be tricked, but is safe as long as type errors
|
||||
(i.e. interface method calls) are caught at run-time. */
|
||||
else if (CLASS_INTERFACE (TYPE_NAME (TREE_TYPE (type))))
|
||||
return object_ptr_type_node;
|
||||
if (flag_new_verifier)
|
||||
{
|
||||
/* Since the verifier has already run, we know that any
|
||||
types we see will be compatible. In BC mode, this fact
|
||||
may be checked at runtime, but if that is so then we can
|
||||
assume its truth here as well. So, we always succeed
|
||||
here, with the expected type. */
|
||||
return type;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (type == ptr_type_node || type == object_ptr_type_node)
|
||||
return t;
|
||||
else if (t == ptr_type_node) /* Special case for null reference. */
|
||||
return type;
|
||||
/* This is a kludge, but matches what Sun's verifier does.
|
||||
It can be tricked, but is safe as long as type errors
|
||||
(i.e. interface method calls) are caught at run-time. */
|
||||
else if (CLASS_INTERFACE (TYPE_NAME (TREE_TYPE (type))))
|
||||
return object_ptr_type_node;
|
||||
else if (can_widen_reference_to (t, type))
|
||||
return t;
|
||||
}
|
||||
}
|
||||
|
||||
if (! flag_verify_invocations && flag_indirect_dispatch
|
||||
&& t == object_ptr_type_node)
|
||||
{
|
||||
if (type != ptr_type_node)
|
||||
warning ("need to insert runtime check for %s",
|
||||
xstrdup (lang_printable_name (type, 0)));
|
||||
return type;
|
||||
}
|
||||
|
||||
/* lang_printable_name uses a static buffer, so we must save the result
|
||||
from calling it the first time. */
|
||||
fail:
|
||||
{
|
||||
char *temp = xstrdup (lang_printable_name (type, 0));
|
||||
*messagep = concat ("expected type '", temp,
|
||||
|
@ -370,6 +407,68 @@ pop_type (tree type)
|
|||
return type;
|
||||
}
|
||||
|
||||
|
||||
/* Return true if two type assertions are equal. */
|
||||
|
||||
static int
|
||||
type_assertion_eq (const void * k1_p, const void * k2_p)
|
||||
{
|
||||
type_assertion k1 = *(type_assertion *)k1_p;
|
||||
type_assertion k2 = *(type_assertion *)k2_p;
|
||||
return (k1.assertion_code == k2.assertion_code
|
||||
&& k1.op1 == k2.op1
|
||||
&& k1.op2 == k2.op2);
|
||||
}
|
||||
|
||||
/* Hash a type assertion. */
|
||||
|
||||
static hashval_t
|
||||
type_assertion_hash (const void *p)
|
||||
{
|
||||
const type_assertion *k_p = p;
|
||||
hashval_t hash = iterative_hash (&k_p->assertion_code, sizeof
|
||||
k_p->assertion_code, 0);
|
||||
hash = iterative_hash (&k_p->op1, sizeof k_p->op1, hash);
|
||||
return iterative_hash (&k_p->op2, sizeof k_p->op2, hash);
|
||||
}
|
||||
|
||||
/* Add an entry to the type assertion table for the given class.
|
||||
CLASS is the class for which this assertion will be evaluated by the
|
||||
runtime during loading/initialization.
|
||||
ASSERTION_CODE is the 'opcode' or type of this assertion: see java-tree.h.
|
||||
OP1 and OP2 are the operands. The tree type of these arguments may be
|
||||
specific to each assertion_code. */
|
||||
|
||||
void
|
||||
add_type_assertion (tree class, int assertion_code, tree op1, tree op2)
|
||||
{
|
||||
htab_t assertions_htab;
|
||||
type_assertion as;
|
||||
void **as_pp;
|
||||
|
||||
assertions_htab = TYPE_ASSERTIONS (class);
|
||||
if (assertions_htab == NULL)
|
||||
{
|
||||
assertions_htab = htab_create_ggc (7, type_assertion_hash,
|
||||
type_assertion_eq, NULL);
|
||||
TYPE_ASSERTIONS (current_class) = assertions_htab;
|
||||
}
|
||||
|
||||
as.assertion_code = assertion_code;
|
||||
as.op1 = op1;
|
||||
as.op2 = op2;
|
||||
|
||||
as_pp = htab_find_slot (assertions_htab, &as, true);
|
||||
|
||||
/* Don't add the same assertion twice. */
|
||||
if (*as_pp)
|
||||
return;
|
||||
|
||||
*as_pp = ggc_alloc (sizeof (type_assertion));
|
||||
**(type_assertion **)as_pp = as;
|
||||
}
|
||||
|
||||
|
||||
/* Return 1 if SOURCE_TYPE can be safely widened to TARGET_TYPE.
|
||||
Handles array types and interfaces. */
|
||||
|
||||
|
@ -387,6 +486,28 @@ can_widen_reference_to (tree source_type, tree target_type)
|
|||
|
||||
if (source_type == target_type)
|
||||
return 1;
|
||||
|
||||
/* FIXME: This is very pessimistic, in that it checks everything,
|
||||
even if we already know that the types are compatible. If we're
|
||||
to support full Java class loader semantics, we need this.
|
||||
However, we could do something more optimal. */
|
||||
if (! flag_verify_invocations)
|
||||
{
|
||||
add_type_assertion (current_class, JV_ASSERT_TYPES_COMPATIBLE,
|
||||
source_type, target_type);
|
||||
|
||||
if (!quiet_flag)
|
||||
warning ("assert: %s is assign compatible with %s",
|
||||
xstrdup (lang_printable_name (target_type, 0)),
|
||||
xstrdup (lang_printable_name (source_type, 0)));
|
||||
/* Punt everything to runtime. */
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (TYPE_DUMMY (source_type) || TYPE_DUMMY (target_type))
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (TYPE_ARRAY_P (source_type) || TYPE_ARRAY_P (target_type))
|
||||
|
@ -420,7 +541,16 @@ can_widen_reference_to (tree source_type, tree target_type)
|
|||
int source_depth = class_depth (source_type);
|
||||
int target_depth = class_depth (target_type);
|
||||
|
||||
/* class_depth can return a negative depth if an error occurred */
|
||||
if (TYPE_DUMMY (source_type) || TYPE_DUMMY (target_type))
|
||||
{
|
||||
if (! quiet_flag)
|
||||
warning ("assert: %s is assign compatible with %s",
|
||||
xstrdup (lang_printable_name (target_type, 0)),
|
||||
xstrdup (lang_printable_name (source_type, 0)));
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* class_depth can return a negative depth if an error occurred */
|
||||
if (source_depth < 0 || target_depth < 0)
|
||||
return 0;
|
||||
|
||||
|
@ -687,13 +817,18 @@ build_java_array_length_access (tree node)
|
|||
throws a NullPointerException. The only way we could get a node
|
||||
of type ptr_type_node at this point is `aconst_null; arraylength'
|
||||
or something equivalent. */
|
||||
if (type == ptr_type_node)
|
||||
if (!flag_new_verifier && type == ptr_type_node)
|
||||
return build3 (CALL_EXPR, int_type_node,
|
||||
build_address_of (soft_nullpointer_node),
|
||||
NULL_TREE, NULL_TREE);
|
||||
|
||||
if (!is_array_type_p (type))
|
||||
abort ();
|
||||
{
|
||||
/* With the new verifier, we will see an ordinary pointer type
|
||||
here. In this case, we just use an arbitrary array type. */
|
||||
array_type = build_java_array_type (object_ptr_type_node, -1);
|
||||
type = promote_type (array_type);
|
||||
}
|
||||
|
||||
length = java_array_type_length (type);
|
||||
if (length >= 0)
|
||||
|
@ -754,6 +889,13 @@ build_java_arrayaccess (tree array, tree type, tree index)
|
|||
tree ref;
|
||||
tree array_type = TREE_TYPE (TREE_TYPE (array));
|
||||
|
||||
if (!is_array_type_p (TREE_TYPE (array)))
|
||||
{
|
||||
/* With the new verifier, we will see an ordinary pointer type
|
||||
here. In this case, we just use the correct array type. */
|
||||
array_type = build_java_array_type (type, -1);
|
||||
}
|
||||
|
||||
if (flag_bounds_check)
|
||||
{
|
||||
/* Generate:
|
||||
|
@ -803,11 +945,21 @@ build_java_arraystore_check (tree array, tree object)
|
|||
tree array_type_p = TREE_TYPE (array);
|
||||
tree object_type = TYPE_NAME (TREE_TYPE (TREE_TYPE (object)));
|
||||
|
||||
if (! is_array_type_p (array_type_p))
|
||||
abort ();
|
||||
if (! flag_verify_invocations)
|
||||
{
|
||||
/* With the new verifier, we don't track precise types. FIXME:
|
||||
performance regression here. */
|
||||
element_type = TYPE_NAME (object_type_node);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (! is_array_type_p (array_type_p))
|
||||
abort ();
|
||||
|
||||
/* Get the TYPE_DECL for ARRAY's element type. */
|
||||
element_type = TYPE_NAME (TREE_TYPE (TREE_TYPE (TREE_TYPE (array_type_p))));
|
||||
/* Get the TYPE_DECL for ARRAY's element type. */
|
||||
element_type
|
||||
= TYPE_NAME (TREE_TYPE (TREE_TYPE (TREE_TYPE (array_type_p))));
|
||||
}
|
||||
|
||||
if (TREE_CODE (element_type) != TYPE_DECL
|
||||
|| TREE_CODE (object_type) != TYPE_DECL)
|
||||
|
@ -816,13 +968,14 @@ build_java_arraystore_check (tree array, tree object)
|
|||
if (!flag_store_check)
|
||||
return build1 (NOP_EXPR, array_type_p, array);
|
||||
|
||||
/* No check is needed if the element type is final or is itself an array.
|
||||
Also check that element_type matches object_type, since in the bytecode
|
||||
compilation case element_type may be the actual element type of the array
|
||||
rather than its declared type. */
|
||||
/* No check is needed if the element type is final. Also check that
|
||||
element_type matches object_type, since in the bytecode
|
||||
compilation case element_type may be the actual element type of
|
||||
the array rather than its declared type. However, if we're doing
|
||||
indirect dispatch, we can't do the `final' optimization. */
|
||||
if (element_type == object_type
|
||||
&& (TYPE_ARRAY_P (TREE_TYPE (element_type))
|
||||
|| CLASS_FINAL (element_type)))
|
||||
&& ! flag_indirect_dispatch
|
||||
&& CLASS_FINAL (element_type))
|
||||
return build1 (NOP_EXPR, array_type_p, array);
|
||||
|
||||
/* OBJECT might be wrapped by a SAVE_EXPR. */
|
||||
|
@ -864,24 +1017,30 @@ build_java_arraystore_check (tree array, tree object)
|
|||
ARRAY_NODE. This function is used to retrieve something less vague than
|
||||
a pointer type when indexing the first dimension of something like [[<t>.
|
||||
May return a corrected type, if necessary, otherwise INDEXED_TYPE is
|
||||
return unchanged.
|
||||
As a side effect, it also makes sure that ARRAY_NODE is an array. */
|
||||
return unchanged. */
|
||||
|
||||
static tree
|
||||
build_java_check_indexed_type (tree array_node, tree indexed_type)
|
||||
{
|
||||
tree elt_type;
|
||||
|
||||
/* We used to check to see if ARRAY_NODE really had array type.
|
||||
However, with the new verifier, this is not necessary, as we know
|
||||
that the object will be an array of the appropriate type. */
|
||||
|
||||
if (flag_new_verifier)
|
||||
return indexed_type;
|
||||
|
||||
if (!is_array_type_p (TREE_TYPE (array_node)))
|
||||
abort ();
|
||||
|
||||
elt_type = (TYPE_ARRAY_ELEMENT (TREE_TYPE (TREE_TYPE (array_node))));
|
||||
|
||||
if (indexed_type == ptr_type_node )
|
||||
return promote_type (elt_type);
|
||||
if (indexed_type == ptr_type_node)
|
||||
return promote_type (elt_type);
|
||||
|
||||
/* BYTE/BOOLEAN store and load are used for both type */
|
||||
if (indexed_type == byte_type_node && elt_type == boolean_type_node )
|
||||
if (indexed_type == byte_type_node && elt_type == boolean_type_node)
|
||||
return boolean_type_node;
|
||||
|
||||
if (indexed_type != elt_type )
|
||||
|
@ -992,7 +1151,25 @@ expand_java_arraystore (tree rhs_type_node)
|
|||
&& TYPE_PRECISION (rhs_type_node) <= 32) ?
|
||||
int_type_node : rhs_type_node);
|
||||
tree index = pop_value (int_type_node);
|
||||
tree array = pop_value (ptr_type_node);
|
||||
tree array_type, array;
|
||||
|
||||
if (flag_new_verifier)
|
||||
{
|
||||
/* If we're processing an `aaload' we might as well just pick
|
||||
`Object'. */
|
||||
if (TREE_CODE (rhs_type_node) == POINTER_TYPE)
|
||||
{
|
||||
array_type = build_java_array_type (object_ptr_type_node, -1);
|
||||
rhs_type_node = object_ptr_type_node;
|
||||
}
|
||||
else
|
||||
array_type = build_java_array_type (rhs_type_node, -1);
|
||||
}
|
||||
else
|
||||
array_type = ptr_type_node;
|
||||
array = pop_value (array_type);
|
||||
if (flag_new_verifier)
|
||||
array = build1 (NOP_EXPR, promote_type (array_type), array);
|
||||
|
||||
rhs_type_node = build_java_check_indexed_type (array, rhs_type_node);
|
||||
|
||||
|
@ -1019,25 +1196,45 @@ expand_java_arraystore (tree rhs_type_node)
|
|||
*/
|
||||
|
||||
static void
|
||||
expand_java_arrayload (tree lhs_type_node )
|
||||
expand_java_arrayload (tree lhs_type_node)
|
||||
{
|
||||
tree load_node;
|
||||
tree index_node = pop_value (int_type_node);
|
||||
tree array_node = pop_value (ptr_type_node);
|
||||
tree array_type;
|
||||
tree array_node;
|
||||
|
||||
if (flag_new_verifier)
|
||||
{
|
||||
/* If we're processing an `aaload' we might as well just pick
|
||||
`Object'. */
|
||||
if (TREE_CODE (lhs_type_node) == POINTER_TYPE)
|
||||
{
|
||||
array_type = build_java_array_type (object_ptr_type_node, -1);
|
||||
lhs_type_node = object_ptr_type_node;
|
||||
}
|
||||
else
|
||||
array_type = build_java_array_type (lhs_type_node, -1);
|
||||
}
|
||||
else
|
||||
array_type = ptr_type_node;
|
||||
array_node = pop_value (array_type);
|
||||
if (flag_new_verifier)
|
||||
array_node = build1 (NOP_EXPR, promote_type (array_type), array_node);
|
||||
|
||||
index_node = save_expr (index_node);
|
||||
array_node = save_expr (array_node);
|
||||
|
||||
|
||||
if (TREE_TYPE (array_node) == ptr_type_node)
|
||||
/* The only way we could get a node of type ptr_type_node at this
|
||||
point is `aconst_null; arraylength' or something equivalent, so
|
||||
unconditionally throw NullPointerException. */
|
||||
unconditionally throw NullPointerException. */
|
||||
load_node = build3 (CALL_EXPR, lhs_type_node,
|
||||
build_address_of (soft_nullpointer_node),
|
||||
NULL_TREE, NULL_TREE);
|
||||
else
|
||||
{
|
||||
lhs_type_node = build_java_check_indexed_type (array_node, lhs_type_node);
|
||||
lhs_type_node = build_java_check_indexed_type (array_node,
|
||||
lhs_type_node);
|
||||
load_node = build_java_arrayaccess (array_node,
|
||||
lhs_type_node,
|
||||
index_node);
|
||||
|
@ -1156,6 +1353,19 @@ class_has_finalize_method (tree type)
|
|||
return HAS_FINALIZER_P (type) || class_has_finalize_method (super);
|
||||
}
|
||||
|
||||
tree
|
||||
java_create_object (tree type)
|
||||
{
|
||||
tree alloc_node = (class_has_finalize_method (type)
|
||||
? alloc_object_node
|
||||
: alloc_no_finalizer_node);
|
||||
|
||||
return build (CALL_EXPR, promote_type (type),
|
||||
build_address_of (alloc_node),
|
||||
build_tree_list (NULL_TREE, build_class_ref (type)),
|
||||
NULL_TREE);
|
||||
}
|
||||
|
||||
static void
|
||||
expand_java_NEW (tree type)
|
||||
{
|
||||
|
@ -1221,7 +1431,8 @@ build_instanceof (tree value, tree type)
|
|||
we only need to check for `null'. */
|
||||
expr = build2 (NE_EXPR, itype, value, null_pointer_node);
|
||||
}
|
||||
else if (! TYPE_ARRAY_P (type)
|
||||
else if (flag_verify_invocations
|
||||
&& ! TYPE_ARRAY_P (type)
|
||||
&& ! TYPE_ARRAY_P (valtype)
|
||||
&& DECL_P (klass) && DECL_P (valclass)
|
||||
&& ! CLASS_INTERFACE (valclass)
|
||||
|
@ -1292,7 +1503,7 @@ expand_iinc (unsigned int local_var_index, int ival, int pc)
|
|||
update_aliases (local_var, local_var_index, pc);
|
||||
}
|
||||
|
||||
|
||||
|
||||
tree
|
||||
build_java_soft_divmod (enum tree_code op, tree type, tree op1, tree op2)
|
||||
{
|
||||
|
@ -1529,12 +1740,13 @@ build_field_ref (tree self_value, tree self_class, tree name)
|
|||
tree base_type = promote_type (base_class);
|
||||
if (base_type != TREE_TYPE (self_value))
|
||||
self_value = fold (build1 (NOP_EXPR, base_type, self_value));
|
||||
if (flag_indirect_dispatch
|
||||
&& output_class != self_class)
|
||||
/* FIXME: output_class != self_class is not exactly the right
|
||||
test. What we really want to know is whether self_class is
|
||||
in the same translation unit as output_class. If it is,
|
||||
we can make a direct reference. */
|
||||
if (! flag_syntax_only
|
||||
&& (flag_indirect_dispatch
|
||||
/* DECL_FIELD_OFFSET == 0 if we have no reference for
|
||||
the field, perhaps because we couldn't find the class
|
||||
in which the field is defined.
|
||||
FIXME: We should investigate this. */
|
||||
|| DECL_FIELD_OFFSET (field_decl) == 0))
|
||||
{
|
||||
tree otable_index
|
||||
= build_int_cst (NULL_TREE, get_symbol_table_index
|
||||
|
@ -1696,29 +1908,6 @@ expand_java_add_case (tree switch_expr, int match, int target_pc)
|
|||
append_to_statement_list (x, &SWITCH_BODY (switch_expr));
|
||||
}
|
||||
|
||||
#if 0
|
||||
static void
|
||||
expand_java_call (int target_pc, int return_address)
|
||||
{
|
||||
tree target_label = lookup_label (target_pc);
|
||||
tree value = build_int_cst (NULL_TREE, return_address);
|
||||
push_value (value);
|
||||
flush_quick_stack ();
|
||||
expand_goto (target_label);
|
||||
}
|
||||
|
||||
static void
|
||||
expand_java_ret (tree return_address ATTRIBUTE_UNUSED)
|
||||
{
|
||||
warning ("ret instruction not implemented");
|
||||
#if 0
|
||||
tree target_label = lookup_label (target_pc);
|
||||
flush_quick_stack ();
|
||||
expand_goto (target_label);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
static tree
|
||||
pop_arguments (tree arg_types)
|
||||
{
|
||||
|
@ -1729,9 +1918,17 @@ pop_arguments (tree arg_types)
|
|||
tree tail = pop_arguments (TREE_CHAIN (arg_types));
|
||||
tree type = TREE_VALUE (arg_types);
|
||||
tree arg = pop_value (type);
|
||||
if (targetm.calls.promote_prototypes (type)
|
||||
&& TYPE_PRECISION (type) < TYPE_PRECISION (integer_type_node)
|
||||
&& INTEGRAL_TYPE_P (type))
|
||||
|
||||
/* With the new verifier we simply cast each argument to its
|
||||
proper type. This is needed since we lose type information
|
||||
coming out of the verifier. We also have to do this with the
|
||||
old verifier when we pop an integer type that must be
|
||||
promoted for the function call. */
|
||||
if (flag_new_verifier && TREE_CODE (type) == POINTER_TYPE)
|
||||
arg = build1 (NOP_EXPR, type, arg);
|
||||
else if (targetm.calls.promote_prototypes (type)
|
||||
&& TYPE_PRECISION (type) < TYPE_PRECISION (integer_type_node)
|
||||
&& INTEGRAL_TYPE_P (type))
|
||||
arg = convert (integer_type_node, arg);
|
||||
return tree_cons (NULL_TREE, arg, tail);
|
||||
}
|
||||
|
@ -1824,8 +2021,12 @@ build_known_method_ref (tree method, tree method_type ATTRIBUTE_UNUSED,
|
|||
tree func;
|
||||
if (is_compiled_class (self_type))
|
||||
{
|
||||
if (!flag_indirect_dispatch
|
||||
|| (!TREE_PUBLIC (method) && DECL_CONTEXT (method)))
|
||||
/* With indirect dispatch we have to use indirect calls for all
|
||||
publically visible methods or gcc will use PLT indirections
|
||||
to reach them. We also have to use indirect dispatch for all
|
||||
external methods. */
|
||||
if (! flag_indirect_dispatch
|
||||
|| (! DECL_EXTERNAL (method) && ! TREE_PUBLIC (method)))
|
||||
{
|
||||
make_decl_rtl (method);
|
||||
func = build1 (ADDR_EXPR, build_pointer_type (TREE_TYPE (method)),
|
||||
|
@ -1836,9 +2037,11 @@ build_known_method_ref (tree method, tree method_type ATTRIBUTE_UNUSED,
|
|||
tree table_index
|
||||
= build_int_cst (NULL_TREE, get_symbol_table_index
|
||||
(method, &TYPE_ATABLE_METHODS (output_class)));
|
||||
func = build4 (ARRAY_REF, method_ptr_type_node,
|
||||
TYPE_ATABLE_DECL (output_class), table_index,
|
||||
NULL_TREE, NULL_TREE);
|
||||
func
|
||||
= build4 (ARRAY_REF,
|
||||
TREE_TYPE (TREE_TYPE (TYPE_ATABLE_DECL (output_class))),
|
||||
TYPE_ATABLE_DECL (output_class), table_index,
|
||||
NULL_TREE, NULL_TREE);
|
||||
}
|
||||
func = convert (method_ptr_type_node, func);
|
||||
}
|
||||
|
@ -1899,9 +2102,9 @@ invoke_build_dtable (int is_invoke_interface, tree arg_list)
|
|||
argument is an array then get the dispatch table of the class
|
||||
Object rather than the one from the objectref. */
|
||||
objectref = (is_invoke_interface
|
||||
&& is_array_type_p (TREE_TYPE (TREE_VALUE (arg_list))) ?
|
||||
object_type_node : TREE_VALUE (arg_list));
|
||||
|
||||
&& is_array_type_p (TREE_TYPE (TREE_VALUE (arg_list)))
|
||||
? build_class_ref (object_type_node) : TREE_VALUE (arg_list));
|
||||
|
||||
if (dtable_ident == NULL_TREE)
|
||||
dtable_ident = get_identifier ("vtable");
|
||||
dtable = build_java_indirect_ref (object_type_node, objectref,
|
||||
|
@ -1914,8 +2117,8 @@ invoke_build_dtable (int is_invoke_interface, tree arg_list)
|
|||
|
||||
/* Determine the index in SYMBOL_TABLE for a reference to the decl
|
||||
T. If this decl has not been seen before, it will be added to the
|
||||
otable_methods. If it has, the existing table slot will be
|
||||
reused. */
|
||||
[oa]table_methods. If it has, the existing table slot will be
|
||||
reused. */
|
||||
|
||||
int
|
||||
get_symbol_table_index (tree t, tree *symbol_table)
|
||||
|
@ -1935,7 +2138,7 @@ get_symbol_table_index (tree t, tree *symbol_table)
|
|||
{
|
||||
tree value = TREE_VALUE (method_list);
|
||||
if (value == t)
|
||||
return i;
|
||||
return i;
|
||||
i++;
|
||||
if (TREE_CHAIN (method_list) == NULL_TREE)
|
||||
break;
|
||||
|
@ -1958,6 +2161,9 @@ build_invokevirtual (tree dtable, tree method)
|
|||
|
||||
if (flag_indirect_dispatch)
|
||||
{
|
||||
if (CLASS_INTERFACE (TYPE_NAME (DECL_CONTEXT (method))))
|
||||
abort ();
|
||||
|
||||
otable_index
|
||||
= build_int_cst (NULL_TREE, get_symbol_table_index
|
||||
(method, &TYPE_OTABLE_METHODS (output_class)));
|
||||
|
@ -1997,11 +2203,8 @@ build_invokeinterface (tree dtable, tree method)
|
|||
tree lookup_arg;
|
||||
tree interface;
|
||||
tree idx;
|
||||
tree otable_index;
|
||||
|
||||
/* We expand invokeinterface here. _Jv_LookupInterfaceMethod() will
|
||||
ensure that the selected method exists, is public and not
|
||||
abstract nor static. */
|
||||
/* We expand invokeinterface here. */
|
||||
|
||||
if (class_ident == NULL_TREE)
|
||||
class_ident = get_identifier ("class");
|
||||
|
@ -2018,28 +2221,42 @@ build_invokeinterface (tree dtable, tree method)
|
|||
|
||||
if (flag_indirect_dispatch)
|
||||
{
|
||||
otable_index
|
||||
= build_int_cst (NULL_TREE, get_symbol_table_index
|
||||
(method, &TYPE_OTABLE_METHODS (output_class)));
|
||||
idx = build4 (ARRAY_REF, integer_type_node,
|
||||
TYPE_OTABLE_DECL (output_class), otable_index,
|
||||
NULL_TREE, NULL_TREE);
|
||||
int itable_index
|
||||
= 2 * (get_symbol_table_index
|
||||
(method, &TYPE_ITABLE_METHODS (output_class)));
|
||||
interface
|
||||
= build4 (ARRAY_REF,
|
||||
TREE_TYPE (TREE_TYPE (TYPE_ITABLE_DECL (output_class))),
|
||||
TYPE_ITABLE_DECL (output_class),
|
||||
build_int_cst (NULL_TREE, itable_index-1),
|
||||
NULL_TREE, NULL_TREE);
|
||||
idx
|
||||
= build4 (ARRAY_REF,
|
||||
TREE_TYPE (TREE_TYPE (TYPE_ITABLE_DECL (output_class))),
|
||||
TYPE_ITABLE_DECL (output_class),
|
||||
build_int_cst (NULL_TREE, itable_index),
|
||||
NULL_TREE, NULL_TREE);
|
||||
interface = convert (class_ptr_type, interface);
|
||||
idx = convert (integer_type_node, idx);
|
||||
}
|
||||
else
|
||||
idx = build_int_cst (NULL_TREE,
|
||||
get_interface_method_index (method, interface));
|
||||
|
||||
lookup_arg = tree_cons (NULL_TREE, dtable,
|
||||
tree_cons (NULL_TREE, build_class_ref (interface),
|
||||
build_tree_list (NULL_TREE, idx)));
|
||||
{
|
||||
idx = build_int_cst (NULL_TREE,
|
||||
get_interface_method_index (method, interface));
|
||||
interface = build_class_ref (interface);
|
||||
}
|
||||
|
||||
lookup_arg = tree_cons (NULL_TREE, dtable,
|
||||
tree_cons (NULL_TREE, interface,
|
||||
build_tree_list (NULL_TREE, idx)));
|
||||
|
||||
return build3 (CALL_EXPR, ptr_type_node,
|
||||
build_address_of (soft_lookupinterfacemethod_node),
|
||||
lookup_arg, NULL_TREE);
|
||||
}
|
||||
|
||||
/* Expand one of the invoke_* opcodes.
|
||||
OCPODE is the specific opcode.
|
||||
OPCODE is the specific opcode.
|
||||
METHOD_REF_INDEX is an index into the constant pool.
|
||||
NARGS is the number of arguments, or -1 if not specified. */
|
||||
|
||||
|
@ -2048,7 +2265,8 @@ expand_invoke (int opcode, int method_ref_index, int nargs ATTRIBUTE_UNUSED)
|
|||
{
|
||||
tree method_signature
|
||||
= COMPONENT_REF_SIGNATURE(¤t_jcf->cpool, method_ref_index);
|
||||
tree method_name = COMPONENT_REF_NAME (¤t_jcf->cpool, method_ref_index);
|
||||
tree method_name = COMPONENT_REF_NAME (¤t_jcf->cpool,
|
||||
method_ref_index);
|
||||
tree self_type
|
||||
= get_class_constant (current_jcf,
|
||||
COMPONENT_REF_CLASS_INDEX(¤t_jcf->cpool,
|
||||
|
@ -2071,38 +2289,82 @@ expand_invoke (int opcode, int method_ref_index, int nargs ATTRIBUTE_UNUSED)
|
|||
method = lookup_java_constructor (self_type, method_signature);
|
||||
else
|
||||
method = lookup_java_method (self_type, method_name, method_signature);
|
||||
|
||||
/* We've found a method in an interface, but this isn't an interface
|
||||
call. */
|
||||
if (opcode != OPCODE_invokeinterface
|
||||
&& method
|
||||
&& (CLASS_INTERFACE (TYPE_NAME (DECL_CONTEXT (method)))))
|
||||
method = NULL_TREE;
|
||||
|
||||
/* We've found a non-interface method but we are making an
|
||||
interface call. This can happen if the interface overrides a
|
||||
method in Object. */
|
||||
if (! flag_verify_invocations
|
||||
&& opcode == OPCODE_invokeinterface
|
||||
&& method
|
||||
&& ! CLASS_INTERFACE (TYPE_NAME (DECL_CONTEXT (method))))
|
||||
method = NULL_TREE;
|
||||
|
||||
if (method == NULL_TREE)
|
||||
{
|
||||
error ("class '%s' has no method named '%s' matching signature '%s'",
|
||||
self_name,
|
||||
IDENTIFIER_POINTER (method_name),
|
||||
IDENTIFIER_POINTER (method_signature));
|
||||
if (flag_verify_invocations || ! flag_indirect_dispatch)
|
||||
{
|
||||
error ("class '%s' has no method named '%s' matching signature '%s'",
|
||||
self_name,
|
||||
IDENTIFIER_POINTER (method_name),
|
||||
IDENTIFIER_POINTER (method_signature));
|
||||
}
|
||||
else
|
||||
{
|
||||
int flags = ACC_PUBLIC;
|
||||
if (opcode == OPCODE_invokestatic)
|
||||
flags |= ACC_STATIC;
|
||||
if (opcode == OPCODE_invokeinterface)
|
||||
{
|
||||
flags |= ACC_INTERFACE | ACC_ABSTRACT;
|
||||
CLASS_INTERFACE (TYPE_NAME (self_type)) = 1;
|
||||
}
|
||||
method = add_method (self_type, flags, method_name,
|
||||
method_signature);
|
||||
DECL_ARTIFICIAL (method) = 1;
|
||||
METHOD_DUMMY (method) = 1;
|
||||
layout_class_method (self_type, NULL,
|
||||
method, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
/* Invoke static can't invoke static/abstract method */
|
||||
else if (opcode == OPCODE_invokestatic)
|
||||
if (method != NULL_TREE)
|
||||
{
|
||||
if (!METHOD_STATIC (method))
|
||||
if (opcode == OPCODE_invokestatic)
|
||||
{
|
||||
error ("invokestatic on non static method");
|
||||
method = NULL_TREE;
|
||||
if (!METHOD_STATIC (method))
|
||||
{
|
||||
error ("invokestatic on non static method");
|
||||
method = NULL_TREE;
|
||||
}
|
||||
else if (METHOD_ABSTRACT (method))
|
||||
{
|
||||
error ("invokestatic on abstract method");
|
||||
method = NULL_TREE;
|
||||
}
|
||||
}
|
||||
else if (METHOD_ABSTRACT (method))
|
||||
else
|
||||
{
|
||||
error ("invokestatic on abstract method");
|
||||
method = NULL_TREE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (METHOD_STATIC (method))
|
||||
{
|
||||
error ("invoke[non-static] on static method");
|
||||
method = NULL_TREE;
|
||||
if (METHOD_STATIC (method))
|
||||
{
|
||||
error ("invoke[non-static] on static method");
|
||||
method = NULL_TREE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (method == NULL_TREE)
|
||||
{
|
||||
/* If we got here, we emitted an error message above. So we
|
||||
just pop the arguments, push a properly-typed zero, and
|
||||
continue. */
|
||||
method_type = get_type_from_signature (method_signature);
|
||||
pop_arguments (TYPE_ARG_TYPES (method_type));
|
||||
if (opcode != OPCODE_invokestatic)
|
||||
|
@ -2385,6 +2647,7 @@ expand_java_field_op (int is_static, int is_putting, int field_ref_index)
|
|||
tree new_value = is_putting ? pop_value (field_type) : NULL_TREE;
|
||||
tree field_ref;
|
||||
int is_error = 0;
|
||||
tree original_self_type = self_type;
|
||||
tree field_decl;
|
||||
|
||||
if (! CLASS_LOADED_P (self_type))
|
||||
|
@ -2396,9 +2659,23 @@ expand_java_field_op (int is_static, int is_putting, int field_ref_index)
|
|||
}
|
||||
else if (field_decl == NULL_TREE)
|
||||
{
|
||||
error ("missing field '%s' in '%s'",
|
||||
IDENTIFIER_POINTER (field_name), self_name);
|
||||
is_error = 1;
|
||||
if (! flag_verify_invocations)
|
||||
{
|
||||
int flags = ACC_PUBLIC;
|
||||
if (is_static)
|
||||
flags |= ACC_STATIC;
|
||||
self_type = original_self_type;
|
||||
field_decl = add_field (original_self_type, field_name,
|
||||
field_type, flags);
|
||||
DECL_ARTIFICIAL (field_decl) = 1;
|
||||
DECL_IGNORED_P (field_decl) = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
error ("missing field '%s' in '%s'",
|
||||
IDENTIFIER_POINTER (field_name), self_name);
|
||||
is_error = 1;
|
||||
}
|
||||
}
|
||||
else if (build_java_signature (TREE_TYPE (field_decl)) != field_signature)
|
||||
{
|
||||
|
@ -2637,8 +2914,16 @@ expand_byte_code (JCF *jcf, tree method)
|
|||
}
|
||||
}
|
||||
|
||||
if (! verify_jvm_instructions (jcf, byte_ops, length))
|
||||
return;
|
||||
if (flag_new_verifier)
|
||||
{
|
||||
if (! verify_jvm_instructions_new (jcf, byte_ops, length))
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (! verify_jvm_instructions (jcf, byte_ops, length))
|
||||
return;
|
||||
}
|
||||
|
||||
/* Translate bytecodes. */
|
||||
linenumber_pointer = linenumber_table;
|
||||
|
@ -2749,8 +3034,14 @@ process_jvm_instruction (int PC, const unsigned char* byte_ops,
|
|||
replace the top of the stack with the thrown object reference */
|
||||
if (instruction_bits [PC] & BCODE_EXCEPTION_TARGET)
|
||||
{
|
||||
tree type = pop_type (ptr_type_node);
|
||||
push_value (build_exception_object_ref (type));
|
||||
/* Note that the new verifier will not emit a type map at all
|
||||
for dead exception handlers. In this case we just ignore
|
||||
the situation. */
|
||||
if (! flag_new_verifier || (instruction_bits[PC] & BCODE_VERIFIED) != 0)
|
||||
{
|
||||
tree type = pop_type (promote_type (throwable_type_node));
|
||||
push_value (build_exception_object_ref (type));
|
||||
}
|
||||
}
|
||||
|
||||
switch (byte_ops[PC++])
|
||||
|
|
|
@ -873,7 +873,7 @@ gij [@option{-jar}] [@option{OPTION}] @dots{} @var{CLASS} [@var{ARGS}@dots{}]
|
|||
[@option{-cp} @var{path}] [@option{-classpath} @var{path}]
|
||||
[@option{-D}@var{name}[=@var{value}]@dots{}]
|
||||
[@option{-ms=}@var{number}] [@option{-mx=}@var{number}]
|
||||
[@option{-X@var{argument}]
|
||||
[@option{-X@var{argument}}] [@option{-verbose}] [@option{-verbose:class}]
|
||||
[@option{--showversion}] [@option{--version}] [@option{--help}][@option{-?}]
|
||||
@c man end
|
||||
@c man begin SEEALSO gij
|
||||
|
@ -954,7 +954,8 @@ Print version number and continue.
|
|||
@item --version
|
||||
Print version number, then exit.
|
||||
|
||||
@item -verbose:class
|
||||
@item -verbose
|
||||
@itemx -verbose:class
|
||||
Each time a class is initialized, print a short message on standard error.
|
||||
@end table
|
||||
|
||||
|
@ -2385,6 +2386,24 @@ property is set to @samp{cache}, then any failed lookups are cached
|
|||
and not tried again. If this property is set to @samp{never}, then
|
||||
lookups are never done. For more information, @xref{Extensions}.
|
||||
|
||||
@item gnu.gcj.jit.compiler
|
||||
@c FIXME we should probably have a whole node on this...
|
||||
This is the full path to @command{gcj} executable which should be
|
||||
used to compile classes just-in-time when
|
||||
@code{ClassLoader.defineClass} is called. If not set, @command{gcj}
|
||||
will not be invoked by the runtime; this can also be controlled via
|
||||
@code{Compiler.disable}.
|
||||
|
||||
@item gnu.gcj.jit.options
|
||||
This is a space-separated string of options which should be passed to
|
||||
@command{gcj} when in JIT mode. If not set, a sensible default is
|
||||
chosen.
|
||||
|
||||
@item gnu.gcj.jit.cachedir
|
||||
This is the directory where cached shared library files are
|
||||
stored. If not set, JIT compilation is disabled. This should never
|
||||
be set to a directory that is writable by any other user.
|
||||
|
||||
@end table
|
||||
|
||||
|
||||
|
|
|
@ -112,6 +112,9 @@ static JCF_u2 last_access;
|
|||
#define METHOD_IS_NATIVE(Method) \
|
||||
((Method) & ACC_NATIVE)
|
||||
|
||||
#define METHOD_IS_PRIVATE(Class, Method) \
|
||||
(((Method) & ACC_PRIVATE) != 0)
|
||||
|
||||
/* We keep a linked list of all method names we have seen. This lets
|
||||
us determine if a method name and a field name are in conflict. */
|
||||
struct method_name
|
||||
|
@ -937,7 +940,7 @@ print_method_info (FILE *stream, JCF* jcf, int name_index, int sig_index,
|
|||
fputs (" ", out);
|
||||
if ((flags & ACC_STATIC))
|
||||
fputs ("static ", out);
|
||||
else if (! METHOD_IS_FINAL (jcf->access_flags, flags))
|
||||
else if (! METHOD_IS_PRIVATE (jcf->access_flags, flags))
|
||||
{
|
||||
/* Don't print `virtual' if we have a constructor. */
|
||||
if (! is_init)
|
||||
|
|
|
@ -53,6 +53,8 @@ struct eh_range
|
|||
|
||||
/* The TRY_CATCH_EXPR for this EH range. */
|
||||
tree stmt;
|
||||
|
||||
tree handler;
|
||||
};
|
||||
|
||||
/* A dummy range that represents the entire method. */
|
||||
|
|
|
@ -227,6 +227,9 @@ extern int flag_indirect_dispatch;
|
|||
/* When zero, don't generate runtime array store checks. */
|
||||
extern int flag_store_check;
|
||||
|
||||
/* When nonzero, use the new bytecode verifier. */
|
||||
extern int flag_new_verifier;
|
||||
|
||||
/* Encoding used for source files. */
|
||||
extern const char *current_encoding;
|
||||
|
||||
|
@ -237,6 +240,8 @@ extern GTY(()) struct JCF * current_jcf;
|
|||
before static field references. */
|
||||
extern int always_initialize_class_p;
|
||||
|
||||
extern int flag_verify_invocations;
|
||||
|
||||
typedef struct CPool constant_pool;
|
||||
|
||||
#define CONSTANT_ResolvedFlag 16
|
||||
|
@ -367,9 +372,13 @@ enum java_tree_index
|
|||
JTI_OTABLE_PTR_TYPE,
|
||||
JTI_ATABLE_TYPE,
|
||||
JTI_ATABLE_PTR_TYPE,
|
||||
JTI_ITABLE_TYPE,
|
||||
JTI_ITABLE_PTR_TYPE,
|
||||
JTI_SYMBOL_TYPE,
|
||||
JTI_SYMBOLS_ARRAY_TYPE,
|
||||
JTI_SYMBOLS_ARRAY_PTR_TYPE,
|
||||
JTI_ASSERTION_ENTRY_TYPE,
|
||||
JTI_ASSERTION_TABLE_TYPE,
|
||||
|
||||
JTI_END_PARAMS_NODE,
|
||||
|
||||
|
@ -388,6 +397,7 @@ enum java_tree_index
|
|||
JTI_SOFT_MONITORENTER_NODE,
|
||||
JTI_SOFT_MONITOREXIT_NODE,
|
||||
JTI_SOFT_LOOKUPINTERFACEMETHOD_NODE,
|
||||
JTI_SOFT_LOOKUPINTERFACEMETHODBYNAME_NODE,
|
||||
JTI_SOFT_LOOKUPJNIMETHOD_NODE,
|
||||
JTI_SOFT_GETJNIENVNEWFRAME_NODE,
|
||||
JTI_SOFT_JNIPOPSYSTEMFRAME_NODE,
|
||||
|
@ -597,18 +607,24 @@ extern GTY(()) tree java_global_trees[JTI_MAX];
|
|||
java_global_trees[JTI_OTABLE_TYPE]
|
||||
#define atable_type \
|
||||
java_global_trees[JTI_ATABLE_TYPE]
|
||||
#define itable_type \
|
||||
java_global_trees[JTI_ITABLE_TYPE]
|
||||
#define otable_ptr_type \
|
||||
java_global_trees[JTI_OTABLE_PTR_TYPE]
|
||||
#define atable_ptr_type \
|
||||
java_global_trees[JTI_ATABLE_PTR_TYPE]
|
||||
#define itable_ptr_type \
|
||||
java_global_trees[JTI_ITABLE_PTR_TYPE]
|
||||
#define symbol_type \
|
||||
java_global_trees[JTI_SYMBOL_TYPE]
|
||||
#define symbols_array_type \
|
||||
java_global_trees[JTI_SYMBOLS_ARRAY_TYPE]
|
||||
#define symbols_array_ptr_type \
|
||||
java_global_trees[JTI_SYMBOLS_ARRAY_PTR_TYPE]
|
||||
#define class_refs_decl \
|
||||
Jjava_global_trees[TI_CLASS_REFS_DECL]
|
||||
java_global_trees[JTI_SYMBOLS_ARRAY_PTR_TYPE]
|
||||
#define assertion_entry_type \
|
||||
java_global_trees[JTI_ASSERTION_ENTRY_TYPE]
|
||||
#define assertion_table_type \
|
||||
java_global_trees[JTI_ASSERTION_TABLE_TYPE]
|
||||
|
||||
#define end_params_node \
|
||||
java_global_trees[JTI_END_PARAMS_NODE]
|
||||
|
@ -644,6 +660,8 @@ extern GTY(()) tree java_global_trees[JTI_MAX];
|
|||
java_global_trees[JTI_SOFT_MONITOREXIT_NODE]
|
||||
#define soft_lookupinterfacemethod_node \
|
||||
java_global_trees[JTI_SOFT_LOOKUPINTERFACEMETHOD_NODE]
|
||||
#define soft_lookupinterfacemethodbyname_node \
|
||||
java_global_trees[JTI_SOFT_LOOKUPINTERFACEMETHODBYNAME_NODE]
|
||||
#define soft_lookupjnimethod_node \
|
||||
java_global_trees[JTI_SOFT_LOOKUPJNIMETHOD_NODE]
|
||||
#define soft_getjnienvnewframe_node \
|
||||
|
@ -984,6 +1002,7 @@ struct lang_decl_func GTY(())
|
|||
unsigned int invisible : 1; /* Set for methods we generate
|
||||
internally but which shouldn't be
|
||||
written to the .class file. */
|
||||
unsigned int dummy:1;
|
||||
};
|
||||
|
||||
struct treetreehash_entry GTY(())
|
||||
|
@ -992,6 +1011,22 @@ struct treetreehash_entry GTY(())
|
|||
tree value;
|
||||
};
|
||||
|
||||
/* These represent the possible assertion_code's that can be emitted in the
|
||||
type assertion table. */
|
||||
enum
|
||||
{
|
||||
JV_ASSERT_END_OF_TABLE = 0, /* Last entry in table. */
|
||||
JV_ASSERT_TYPES_COMPATIBLE = 1, /* Operand A is assignable to Operand B. */
|
||||
JV_ASSERT_IS_INSTANTIABLE = 2 /* Operand A is an instantiable class. */
|
||||
};
|
||||
|
||||
typedef struct type_assertion GTY(())
|
||||
{
|
||||
int assertion_code; /* 'opcode' for the type of this assertion. */
|
||||
tree op1; /* First operand. */
|
||||
tree op2; /* Second operand. */
|
||||
} type_assertion;
|
||||
|
||||
extern tree java_treetreehash_find (htab_t, tree);
|
||||
extern tree * java_treetreehash_new (htab_t, tree);
|
||||
extern htab_t java_treetreehash_create (size_t size, int ggc);
|
||||
|
@ -1043,6 +1078,9 @@ struct lang_decl GTY(())
|
|||
#define TYPE_II_STMT_LIST(T) (TYPE_LANG_SPECIFIC (T)->ii_block)
|
||||
/* The decl of the synthetic method `class$' used to handle `.class'
|
||||
for non primitive types when compiling to bytecode. */
|
||||
|
||||
#define TYPE_DUMMY(T) (TYPE_LANG_SPECIFIC(T)->dummy_class)
|
||||
|
||||
#define TYPE_DOT_CLASS(T) (TYPE_LANG_SPECIFIC (T)->dot_class)
|
||||
#define TYPE_PACKAGE_LIST(T) (TYPE_LANG_SPECIFIC (T)->package_list)
|
||||
#define TYPE_IMPORT_LIST(T) (TYPE_LANG_SPECIFIC (T)->import_list)
|
||||
|
@ -1060,10 +1098,16 @@ struct lang_decl GTY(())
|
|||
#define TYPE_OTABLE_SYMS_DECL(T) (TYPE_LANG_SPECIFIC (T)->otable_syms_decl)
|
||||
#define TYPE_OTABLE_DECL(T) (TYPE_LANG_SPECIFIC (T)->otable_decl)
|
||||
|
||||
#define TYPE_ITABLE_METHODS(T) (TYPE_LANG_SPECIFIC (T)->itable_methods)
|
||||
#define TYPE_ITABLE_SYMS_DECL(T) (TYPE_LANG_SPECIFIC (T)->itable_syms_decl)
|
||||
#define TYPE_ITABLE_DECL(T) (TYPE_LANG_SPECIFIC (T)->itable_decl)
|
||||
|
||||
#define TYPE_CTABLE_DECL(T) (TYPE_LANG_SPECIFIC (T)->ctable_decl)
|
||||
#define TYPE_CATCH_CLASSES(T) (TYPE_LANG_SPECIFIC (T)->catch_classes)
|
||||
#define TYPE_VERIFY_METHOD(T) (TYPE_LANG_SPECIFIC (T)->verify_method)
|
||||
|
||||
#define TYPE_TO_RUNTIME_MAP(T) (TYPE_LANG_SPECIFIC (T)->type_to_runtime_map)
|
||||
#define TYPE_ASSERTIONS(T) (TYPE_LANG_SPECIFIC (T)->type_assertions)
|
||||
|
||||
struct lang_type GTY(())
|
||||
{
|
||||
|
@ -1092,18 +1136,31 @@ struct lang_type GTY(())
|
|||
tree atable_decl; /* The static address table. */
|
||||
tree atable_syms_decl;
|
||||
|
||||
tree itable_methods; /* List of interfaces methods referred
|
||||
to by this class. */
|
||||
tree itable_decl; /* The interfaces table. */
|
||||
tree itable_syms_decl;
|
||||
|
||||
tree ctable_decl; /* The table of classes for the runtime
|
||||
type matcher. */
|
||||
tree catch_classes;
|
||||
|
||||
tree verify_method; /* The verify method for this class.
|
||||
Used in split verification. */
|
||||
|
||||
htab_t GTY ((param_is (struct treetreehash_entry))) type_to_runtime_map;
|
||||
/* The mapping of classes to exception region
|
||||
markers. */
|
||||
|
||||
htab_t GTY ((param_is (struct type_assertion))) type_assertions;
|
||||
/* Table of type assertions to be evaluated
|
||||
by the runtime when this class is loaded. */
|
||||
|
||||
unsigned pic:1; /* Private Inner Class. */
|
||||
unsigned poic:1; /* Protected Inner Class. */
|
||||
unsigned strictfp:1; /* `strictfp' class. */
|
||||
unsigned assertions:1; /* Any method uses `assert'. */
|
||||
unsigned dummy_class:1; /* Not a real class, just a placeholder. */
|
||||
};
|
||||
|
||||
#define JCF_u4 unsigned long
|
||||
|
@ -1243,7 +1300,7 @@ extern void make_class_data (tree);
|
|||
extern void register_class (void);
|
||||
extern int alloc_name_constant (int, tree);
|
||||
extern void emit_register_classes (tree *);
|
||||
extern tree emit_symbol_table (tree, tree, tree, tree, tree);
|
||||
extern tree emit_symbol_table (tree, tree, tree, tree, tree, int);
|
||||
extern void lang_init_source (int);
|
||||
extern void write_classfile (tree);
|
||||
extern char *print_int_node (tree);
|
||||
|
@ -1259,9 +1316,12 @@ extern int alloc_class_constant (tree);
|
|||
extern void init_expr_processing (void);
|
||||
extern void push_super_field (tree, tree);
|
||||
extern void init_class_processing (void);
|
||||
extern void add_type_assertion (tree, int, tree, tree);
|
||||
extern int can_widen_reference_to (tree, tree);
|
||||
extern int class_depth (tree);
|
||||
extern int verify_jvm_instructions (struct JCF *, const unsigned char *, long);
|
||||
extern int verify_jvm_instructions_new (struct JCF *, const unsigned char *,
|
||||
long);
|
||||
extern void maybe_pushlevels (int);
|
||||
extern void maybe_poplevels (int);
|
||||
extern void force_poplevels (int);
|
||||
|
@ -1274,6 +1334,7 @@ extern void push_type (tree);
|
|||
extern void load_type_state (tree);
|
||||
extern void add_interface (tree, tree);
|
||||
extern tree force_evaluation_order (tree);
|
||||
extern tree java_create_object (tree);
|
||||
extern int verify_constant_pool (struct JCF *);
|
||||
extern void start_java_method (tree);
|
||||
extern void end_java_method (void);
|
||||
|
@ -1321,7 +1382,6 @@ extern tree java_mangle_decl (struct obstack *, tree);
|
|||
extern tree java_mangle_class_field (struct obstack *, tree);
|
||||
extern tree java_mangle_class_field_from_string (struct obstack *, char *);
|
||||
extern tree java_mangle_vtable (struct obstack *, tree);
|
||||
extern const char *lang_printable_name_wls (tree, int);
|
||||
extern void append_gpp_mangled_name (const char *, int);
|
||||
|
||||
extern void add_predefined_file (tree);
|
||||
|
@ -1363,6 +1423,8 @@ extern tree builtin_function (const char *, tree, int, enum built_in_class,
|
|||
|
||||
/* Access flags etc for a method (a FUNCTION_DECL): */
|
||||
|
||||
#define METHOD_DUMMY(DECL) (DECL_LANG_SPECIFIC (DECL)->u.f.dummy)
|
||||
|
||||
#define METHOD_PUBLIC(DECL) DECL_LANG_FLAG_1 (FUNCTION_DECL_CHECK (DECL))
|
||||
#define METHOD_PRIVATE(DECL) TREE_PRIVATE (FUNCTION_DECL_CHECK (DECL))
|
||||
#define METHOD_PROTECTED(DECL) TREE_PROTECTED (FUNCTION_DECL_CHECK (DECL))
|
||||
|
@ -1800,7 +1862,8 @@ enum
|
|||
|
||||
JV_STATE_PRELOADING = 1, /* Can do _Jv_FindClass. */
|
||||
JV_STATE_LOADING = 3, /* Has super installed. */
|
||||
JV_STATE_LOADED = 5, /* Is complete. */
|
||||
JV_STATE_READ = 4, /* Has been completely defined. */
|
||||
JV_STATE_LOADED = 5, /* Has Miranda methods defined. */
|
||||
|
||||
JV_STATE_COMPILED = 6, /* This was a compiled class. */
|
||||
|
||||
|
|
|
@ -610,8 +610,14 @@ void
|
|||
load_class (tree class_or_name, int verbose)
|
||||
{
|
||||
tree name, saved;
|
||||
int class_loaded;
|
||||
tree class_decl;
|
||||
int class_loaded = 0;
|
||||
tree class_decl = NULL_TREE;
|
||||
bool is_compiled_class = false;
|
||||
|
||||
/* We've already failed, don't try again. */
|
||||
if (TREE_CODE (class_or_name) == RECORD_TYPE
|
||||
&& TYPE_DUMMY (class_or_name))
|
||||
return;
|
||||
|
||||
/* class_or_name can be the name of the class we want to load */
|
||||
if (TREE_CODE (class_or_name) == IDENTIFIER_NODE)
|
||||
|
@ -624,41 +630,99 @@ load_class (tree class_or_name, int verbose)
|
|||
else
|
||||
name = DECL_NAME (TYPE_NAME (class_or_name));
|
||||
|
||||
class_decl = IDENTIFIER_CLASS_VALUE (name);
|
||||
if (class_decl != NULL_TREE)
|
||||
{
|
||||
tree type = TREE_TYPE (class_decl);
|
||||
is_compiled_class
|
||||
= ((TYPE_JCF (type) && JCF_SEEN_IN_ZIP (TYPE_JCF (type)))
|
||||
|| CLASS_FROM_CURRENTLY_COMPILED_P (type));
|
||||
}
|
||||
|
||||
/* If the class is from source code, then it must already be loaded. */
|
||||
class_decl = IDENTIFIER_CLASS_VALUE (name);
|
||||
if (class_decl && CLASS_FROM_SOURCE_P (TREE_TYPE (class_decl)))
|
||||
return;
|
||||
|
||||
saved = name;
|
||||
while (1)
|
||||
|
||||
/* If flag_verify_invocations is unset, we don't try to load a class
|
||||
unless we're looking for Object (which is fixed by the ABI) or
|
||||
it's a class that we're going to compile. */
|
||||
if (flag_verify_invocations
|
||||
|| class_or_name == object_type_node
|
||||
|| is_compiled_class
|
||||
|| TREE_CODE (class_or_name) == IDENTIFIER_NODE)
|
||||
{
|
||||
char *separator;
|
||||
|
||||
if ((class_loaded = read_class (name)))
|
||||
break;
|
||||
|
||||
/* We failed loading name. Now consider that we might be looking
|
||||
for a inner class. */
|
||||
if ((separator = strrchr (IDENTIFIER_POINTER (name), '$'))
|
||||
|| (separator = strrchr (IDENTIFIER_POINTER (name), '.')))
|
||||
while (1)
|
||||
{
|
||||
int c = *separator;
|
||||
*separator = '\0';
|
||||
name = get_identifier (IDENTIFIER_POINTER (name));
|
||||
*separator = c;
|
||||
char *separator;
|
||||
|
||||
/* Otherwise we might get infinite recursion, if say we have
|
||||
String.class but not String$CaseInsensitiveComparator.class. */
|
||||
if (current_jcf && current_jcf->java_source == 0)
|
||||
/* We've already loaded it. */
|
||||
if (IDENTIFIER_CLASS_VALUE (name) != NULL_TREE)
|
||||
{
|
||||
tree tmp_decl = IDENTIFIER_CLASS_VALUE (name);
|
||||
if (CLASS_PARSED_P (TREE_TYPE (tmp_decl)))
|
||||
break;
|
||||
}
|
||||
|
||||
if (read_class (name))
|
||||
break;
|
||||
|
||||
/* We failed loading name. Now consider that we might be looking
|
||||
for a inner class. */
|
||||
if ((separator = strrchr (IDENTIFIER_POINTER (name), '$'))
|
||||
|| (separator = strrchr (IDENTIFIER_POINTER (name), '.')))
|
||||
{
|
||||
int c = *separator;
|
||||
*separator = '\0';
|
||||
name = get_identifier (IDENTIFIER_POINTER (name));
|
||||
*separator = c;
|
||||
|
||||
/* Otherwise we might get infinite recursion, if say we
|
||||
have String.class but not
|
||||
String$CaseInsensitiveComparator.class. */
|
||||
if (current_jcf && current_jcf->java_source == 0)
|
||||
break;
|
||||
}
|
||||
/* Otherwise, we failed, we bail. */
|
||||
else
|
||||
break;
|
||||
}
|
||||
/* Otherwise, we failed, we bail. */
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
||||
if (!class_loaded && verbose)
|
||||
error ("cannot find file for class %s", IDENTIFIER_POINTER (saved));
|
||||
{
|
||||
/* have we found the class we're looking for? */
|
||||
tree type_decl = IDENTIFIER_CLASS_VALUE (saved);
|
||||
tree type = type_decl ? TREE_TYPE (type_decl) : NULL;
|
||||
class_loaded = type && CLASS_PARSED_P (type);
|
||||
}
|
||||
}
|
||||
|
||||
if (!class_loaded)
|
||||
{
|
||||
if (flag_verify_invocations || ! flag_indirect_dispatch
|
||||
|| flag_emit_class_files)
|
||||
{
|
||||
if (verbose)
|
||||
error ("cannot find file for class %s", IDENTIFIER_POINTER (saved));
|
||||
}
|
||||
else if (verbose)
|
||||
{
|
||||
/* This is just a diagnostic during testing, not a real problem. */
|
||||
if (!quiet_flag)
|
||||
warning("cannot find file for class %s",
|
||||
IDENTIFIER_POINTER (saved));
|
||||
|
||||
/* Fake it. */
|
||||
if (TREE_CODE (class_or_name) == RECORD_TYPE)
|
||||
{
|
||||
set_super_info (0, class_or_name, object_type_node, 0);
|
||||
TYPE_DUMMY (class_or_name) = 1;
|
||||
/* We won't be able to output any debug info for this class. */
|
||||
DECL_IGNORED_P (TYPE_NAME (class_or_name)) = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Parse the .class file JCF. */
|
||||
|
@ -760,6 +824,7 @@ parse_class_file (void)
|
|||
java_layout_seen_class_methods ();
|
||||
|
||||
input_location = DECL_SOURCE_LOCATION (TYPE_NAME (current_class));
|
||||
file_start_location = input_location;
|
||||
(*debug_hooks->start_source_file) (input_line, input_filename);
|
||||
|
||||
/* Currently we always have to emit calls to _Jv_InitClass when
|
||||
|
@ -775,7 +840,7 @@ parse_class_file (void)
|
|||
{
|
||||
JCF *jcf = current_jcf;
|
||||
|
||||
if (METHOD_ABSTRACT (method))
|
||||
if (METHOD_ABSTRACT (method) || METHOD_DUMMY (method))
|
||||
continue;
|
||||
|
||||
if (METHOD_NATIVE (method))
|
||||
|
@ -911,6 +976,7 @@ static void
|
|||
parse_source_file_2 (void)
|
||||
{
|
||||
int save_error_count = java_error_count;
|
||||
flag_verify_invocations = true;
|
||||
java_complete_class (); /* Parse unsatisfied class decl. */
|
||||
java_parse_abort_on_error ();
|
||||
}
|
||||
|
@ -1196,7 +1262,12 @@ java_parse_file (int set_yydebug ATTRIBUTE_UNUSED)
|
|||
input_location = DECL_SOURCE_LOCATION (node);
|
||||
if (CLASS_FILE_P (node))
|
||||
{
|
||||
/* FIXME: These two flags really should be independent. We
|
||||
should be able to compile fully binary compatible, but
|
||||
with flag_verify_invocations on. */
|
||||
flag_verify_invocations = ! flag_indirect_dispatch;
|
||||
output_class = current_class = TREE_TYPE (node);
|
||||
|
||||
current_jcf = TYPE_JCF (current_class);
|
||||
layout_class (current_class);
|
||||
load_inner_classes (current_class);
|
||||
|
@ -1232,13 +1303,15 @@ compute_class_name (struct ZipDirectory *zdir)
|
|||
char *class_name_in_zip_dir = ZIPDIR_FILENAME (zdir);
|
||||
char *class_name;
|
||||
int i;
|
||||
int filename_length;
|
||||
int filename_length = zdir->filename_length;
|
||||
|
||||
while (strncmp (class_name_in_zip_dir, "./", 2) == 0)
|
||||
class_name_in_zip_dir += 2;
|
||||
while (filename_length > 2 && strncmp (class_name_in_zip_dir, "./", 2) == 0)
|
||||
{
|
||||
class_name_in_zip_dir += 2;
|
||||
filename_length -= 2;
|
||||
}
|
||||
|
||||
filename_length = (strlen (class_name_in_zip_dir)
|
||||
- strlen (".class"));
|
||||
filename_length -= strlen (".class");
|
||||
class_name = ALLOC (filename_length + 1);
|
||||
memcpy (class_name, class_name_in_zip_dir, filename_length);
|
||||
class_name [filename_length] = '\0';
|
||||
|
@ -1300,6 +1373,13 @@ parse_zip_file_entries (void)
|
|||
current_jcf = TYPE_JCF (class);
|
||||
output_class = current_class = class;
|
||||
|
||||
if (TYPE_DUMMY (class))
|
||||
{
|
||||
/* This is a dummy class, and now we're compiling it
|
||||
for real. */
|
||||
abort ();
|
||||
}
|
||||
|
||||
/* This is for a corner case where we have a superclass
|
||||
but no superclass fields.
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ static const char jvgenmain_spec[] =
|
|||
%<fcompile-resource* %<fassert %<fno-assert \
|
||||
%<femit-class-file %<femit-class-files %<fencoding*\
|
||||
%<fuse-boehm-gc %<fhash-synchronization %<fjni\
|
||||
%<findirect-dispatch \
|
||||
%<findirect-dispatch %<fnew-verifier\
|
||||
%<fno-store-check %<foutput-class-dir\
|
||||
%<fclasspath* %<fCLASSPATH* %<fbootclasspath*\
|
||||
%<fextdirs*\
|
||||
|
|
|
@ -128,6 +128,17 @@ int flag_wall = 0;
|
|||
/* The encoding of the source file. */
|
||||
const char *current_encoding = NULL;
|
||||
|
||||
/* When nonzero, report use of deprecated classes, methods, or fields. */
|
||||
int flag_deprecated = 1;
|
||||
|
||||
/* When zero, don't optimize static class initialization. This flag shouldn't
|
||||
be tested alone, use STATIC_CLASS_INITIALIZATION_OPTIMIZATION_P instead. */
|
||||
/* FIXME: Make this work with gimplify. */
|
||||
/* int flag_optimize_sci = 0; */
|
||||
|
||||
/* Don't attempt to verify invocations. */
|
||||
int flag_verify_invocations = 0;
|
||||
|
||||
/* When nonzero, print extra version information. */
|
||||
static int v_flag = 0;
|
||||
|
||||
|
@ -593,6 +604,11 @@ java_post_options (const char **pfilename)
|
|||
if (flag_inline_functions)
|
||||
flag_inline_trees = 2;
|
||||
|
||||
/* An absolute requirement: if we're not using indirect dispatch, we
|
||||
must always verify everything. */
|
||||
if (! flag_indirect_dispatch)
|
||||
flag_verify_invocations = true;
|
||||
|
||||
/* Open input file. */
|
||||
|
||||
if (filename == 0 || !strcmp (filename, "-"))
|
||||
|
@ -972,6 +988,10 @@ java_get_callee_fndecl (tree call_expr)
|
|||
|
||||
HOST_WIDE_INT index;
|
||||
|
||||
/* FIXME: This is disabled because we end up passing calls through
|
||||
the PLT, and we do NOT want to do that. */
|
||||
return NULL;
|
||||
|
||||
if (TREE_CODE (call_expr) != CALL_EXPR)
|
||||
return NULL;
|
||||
method = TREE_OPERAND (call_expr, 0);
|
||||
|
|
|
@ -176,5 +176,9 @@ fuse-divide-subroutine
|
|||
Java Var(flag_use_divide_subroutine) Init(1)
|
||||
Call a library routine to do integer divisions
|
||||
|
||||
fnew-verifier
|
||||
Java Var(flag_new_verifier)
|
||||
Enable the new bytecode verifier
|
||||
|
||||
version
|
||||
Java
|
||||
|
|
|
@ -9690,8 +9690,8 @@ strip_out_static_field_access_decl (tree node)
|
|||
tree call = TREE_OPERAND (op1, 0);
|
||||
if (TREE_CODE (call) == CALL_EXPR
|
||||
&& TREE_CODE (TREE_OPERAND (call, 0)) == ADDR_EXPR
|
||||
&& TREE_OPERAND (TREE_OPERAND (call, 0), 0)
|
||||
== soft_initclass_node)
|
||||
&& (TREE_OPERAND (TREE_OPERAND (call, 0), 0)
|
||||
== soft_initclass_node))
|
||||
return TREE_OPERAND (op1, 1);
|
||||
}
|
||||
else if (JDECL_P (op1))
|
||||
|
@ -11025,7 +11025,7 @@ patch_invoke (tree patch, tree method, tree args)
|
|||
if (TREE_CODE (original_call) == NEW_CLASS_EXPR)
|
||||
{
|
||||
tree class = DECL_CONTEXT (method);
|
||||
tree c1, saved_new, size, new;
|
||||
tree c1, saved_new, new;
|
||||
tree alloc_node;
|
||||
|
||||
if (flag_emit_class_files || flag_emit_xref)
|
||||
|
@ -11035,7 +11035,6 @@ patch_invoke (tree patch, tree method, tree args)
|
|||
}
|
||||
if (!TYPE_SIZE (class))
|
||||
safe_layout_class (class);
|
||||
size = size_in_bytes (class);
|
||||
alloc_node =
|
||||
(class_has_finalize_method (class) ? alloc_object_node
|
||||
: alloc_no_finalizer_node);
|
||||
|
@ -11109,11 +11108,20 @@ invocation_mode (tree method, int super)
|
|||
if (DECL_CONSTRUCTOR_P (method))
|
||||
return INVOKE_STATIC;
|
||||
|
||||
if (access & ACC_FINAL || access & ACC_PRIVATE)
|
||||
if (access & ACC_PRIVATE)
|
||||
return INVOKE_NONVIRTUAL;
|
||||
|
||||
if (CLASS_FINAL (TYPE_NAME (DECL_CONTEXT (method))))
|
||||
return INVOKE_NONVIRTUAL;
|
||||
/* Binary compatibility: just because it's final today, that doesn't
|
||||
mean it'll be final tomorrow. */
|
||||
if (! flag_indirect_dispatch
|
||||
|| DECL_CONTEXT (method) == object_type_node)
|
||||
{
|
||||
if (access & ACC_FINAL)
|
||||
return INVOKE_NONVIRTUAL;
|
||||
|
||||
if (CLASS_FINAL (TYPE_NAME (DECL_CONTEXT (method))))
|
||||
return INVOKE_NONVIRTUAL;
|
||||
}
|
||||
|
||||
if (CLASS_INTERFACE (TYPE_NAME (DECL_CONTEXT (method))))
|
||||
return INVOKE_INTERFACE;
|
||||
|
|
|
@ -743,7 +743,7 @@ lookup_java_method (tree searched_class, tree method_name,
|
|||
method_signature, build_java_signature);
|
||||
}
|
||||
|
||||
/* Return true iff CLASS (or its ancestors) has a method METHOD_NAME. */
|
||||
/* Return true iff CLASS (or its ancestors) has a method METHOD_NAME. */
|
||||
int
|
||||
has_method (tree class, tree method_name)
|
||||
{
|
||||
|
|
514
gcc/java/verify-glue.c
Normal file
514
gcc/java/verify-glue.c
Normal file
|
@ -0,0 +1,514 @@
|
|||
/* Glue to interface gcj with bytecode verifier.
|
||||
Copyright (C) 2003, 2004 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
GCC is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GCC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
|
||||
Java and all Java-based marks are trademarks or registered trademarks
|
||||
of Sun Microsystems, Inc. in the United States and other countries.
|
||||
The Free Software Foundation is independent of Sun Microsystems, Inc. */
|
||||
|
||||
/* Written by Tom Tromey <tromey@redhat.com>. */
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "system.h"
|
||||
#include "coretypes.h"
|
||||
#include "tm.h"
|
||||
#include "tree.h"
|
||||
#include "errors.h"
|
||||
#include "parse.h"
|
||||
|
||||
#include "verify.h"
|
||||
#include "java-tree.h"
|
||||
#include "java-except.h"
|
||||
|
||||
void *
|
||||
vfy_alloc (size_t bytes)
|
||||
{
|
||||
return xmalloc (bytes);
|
||||
}
|
||||
|
||||
void
|
||||
vfy_free (void *mem)
|
||||
{
|
||||
free (mem);
|
||||
}
|
||||
|
||||
bool
|
||||
vfy_strings_equal (vfy_string one, vfy_string two)
|
||||
{
|
||||
return one == two;
|
||||
}
|
||||
|
||||
const char *
|
||||
vfy_string_bytes (vfy_string str)
|
||||
{
|
||||
return IDENTIFIER_POINTER (str);
|
||||
}
|
||||
|
||||
int
|
||||
vfy_string_length (vfy_string str)
|
||||
{
|
||||
return IDENTIFIER_LENGTH (str);
|
||||
}
|
||||
|
||||
vfy_string
|
||||
vfy_init_name ()
|
||||
{
|
||||
return init_identifier_node;
|
||||
}
|
||||
|
||||
vfy_string
|
||||
vfy_clinit_name ()
|
||||
{
|
||||
return clinit_identifier_node;
|
||||
}
|
||||
|
||||
static const char*
|
||||
skip_one_type (const char* ptr)
|
||||
{
|
||||
int ch = *ptr++;
|
||||
|
||||
while (ch == '[')
|
||||
{
|
||||
ch = *ptr++;
|
||||
}
|
||||
|
||||
if (ch == 'L')
|
||||
{
|
||||
do { ch = *ptr++; } while (ch != ';');
|
||||
}
|
||||
|
||||
return ptr;
|
||||
}
|
||||
|
||||
int
|
||||
vfy_count_arguments (vfy_string signature)
|
||||
{
|
||||
const char *ptr = IDENTIFIER_POINTER (signature);
|
||||
int arg_count = 0;
|
||||
|
||||
/* Skip '('. */
|
||||
ptr++;
|
||||
|
||||
/* Count args. */
|
||||
while (*ptr != ')')
|
||||
{
|
||||
ptr = skip_one_type (ptr);
|
||||
arg_count += 1;
|
||||
}
|
||||
|
||||
return arg_count;
|
||||
}
|
||||
|
||||
vfy_string
|
||||
vfy_get_string (const char *s, int len)
|
||||
{
|
||||
return get_identifier_with_length (s, len);
|
||||
}
|
||||
|
||||
vfy_string
|
||||
vfy_get_signature (vfy_method *method)
|
||||
{
|
||||
return method->signature;
|
||||
}
|
||||
|
||||
vfy_string
|
||||
vfy_get_method_name (vfy_method *method)
|
||||
{
|
||||
return method->name;
|
||||
}
|
||||
|
||||
bool
|
||||
vfy_is_static (vfy_method *method)
|
||||
{
|
||||
return METHOD_STATIC (method->method);
|
||||
}
|
||||
|
||||
const unsigned char *
|
||||
vfy_get_bytecode (vfy_method *method)
|
||||
{
|
||||
return method->bytes;
|
||||
}
|
||||
|
||||
vfy_exception *
|
||||
vfy_get_exceptions (vfy_method *method)
|
||||
{
|
||||
return method->exceptions;
|
||||
}
|
||||
|
||||
void
|
||||
vfy_get_exception (vfy_exception *exceptions, int index, int *handler,
|
||||
int *start, int *end, int *handler_type)
|
||||
{
|
||||
*handler = exceptions[index].handler;
|
||||
*start = exceptions[index].start;
|
||||
*end = exceptions[index].end;
|
||||
*handler_type = exceptions[index].type;
|
||||
}
|
||||
|
||||
int
|
||||
vfy_tag (vfy_constants *pool, int index)
|
||||
{
|
||||
int result = JPOOL_TAG (pool, index);
|
||||
/* gcj will resolve constant pool entries other than string and
|
||||
class references. The verifier doesn't care about the values, so
|
||||
we just strip off the resolved flag. */
|
||||
if ((result & CONSTANT_ResolvedFlag) != 0
|
||||
&& result != CONSTANT_ResolvedString
|
||||
&& result != CONSTANT_ResolvedClass)
|
||||
result &= ~ CONSTANT_ResolvedFlag;
|
||||
return result;
|
||||
}
|
||||
|
||||
void
|
||||
vfy_load_indexes (vfy_constants *pool, int index,
|
||||
vfy_uint_16 *index0, vfy_uint_16 *index1)
|
||||
{
|
||||
*index0 = JPOOL_USHORT1 (pool, index);
|
||||
*index1 = JPOOL_USHORT2 (pool, index);
|
||||
}
|
||||
|
||||
vfy_constants *
|
||||
vfy_get_constants (vfy_jclass klass)
|
||||
{
|
||||
return TYPE_JCF (klass);
|
||||
}
|
||||
|
||||
int
|
||||
vfy_get_constants_size (vfy_jclass klass)
|
||||
{
|
||||
return JPOOL_SIZE (TYPE_JCF (klass));
|
||||
}
|
||||
|
||||
vfy_string
|
||||
vfy_get_pool_string (vfy_constants *pool, int index)
|
||||
{
|
||||
return get_name_constant (pool, index);
|
||||
}
|
||||
|
||||
vfy_jclass
|
||||
vfy_get_pool_class (vfy_constants *pool, int index)
|
||||
{
|
||||
vfy_jclass k;
|
||||
k = get_class_constant (pool, index);
|
||||
return k;
|
||||
}
|
||||
|
||||
vfy_string
|
||||
vfy_make_string (const char *s, int len)
|
||||
{
|
||||
tree result;
|
||||
char *s2 = (char *) s;
|
||||
char save = s2[len];
|
||||
s2[len] = '\0';
|
||||
result = get_identifier (s2);
|
||||
s2[len] = save;
|
||||
return result;
|
||||
}
|
||||
|
||||
vfy_string
|
||||
vfy_get_class_name (vfy_jclass klass)
|
||||
{
|
||||
return DECL_NAME (TYPE_NAME (klass));
|
||||
}
|
||||
|
||||
bool
|
||||
vfy_is_assignable_from (vfy_jclass target, vfy_jclass source)
|
||||
{
|
||||
/* At compile time, for the BC-ABI we assume that reference types are always
|
||||
compatible. However, a type assertion table entry is emitted so that the
|
||||
runtime can detect binary-incompatible changes. */
|
||||
|
||||
/* FIXME: implement real test for old ABI. */
|
||||
|
||||
/* Any class is always assignable to itself, or java.lang.Object. */
|
||||
if (source == target || target == object_type_node)
|
||||
return true;
|
||||
|
||||
/* Otherwise, a type assertion is required. */
|
||||
add_type_assertion (current_class, JV_ASSERT_TYPES_COMPATIBLE, source,
|
||||
target);
|
||||
return true;
|
||||
}
|
||||
|
||||
char
|
||||
vfy_get_primitive_char (vfy_jclass klass)
|
||||
{
|
||||
tree sig;
|
||||
if (! vfy_is_primitive (klass))
|
||||
abort ();
|
||||
sig = build_java_signature (klass);
|
||||
return (IDENTIFIER_POINTER (sig))[0];
|
||||
}
|
||||
|
||||
int
|
||||
vfy_get_interface_count (vfy_jclass klass ATTRIBUTE_UNUSED)
|
||||
{
|
||||
/* FIXME: Need to merge from mainline to get this. */
|
||||
#if 0
|
||||
return BINFO_N_BASE_BINFOS (klass);
|
||||
#endif
|
||||
return -1;
|
||||
}
|
||||
|
||||
vfy_jclass
|
||||
vfy_get_interface (vfy_jclass klass ATTRIBUTE_UNUSED, int index ATTRIBUTE_UNUSED)
|
||||
{
|
||||
/* FIXME: Need to merge from mainline to get this. */
|
||||
#if 0
|
||||
vfy_jclass k;
|
||||
k = BINFO_BASE_BINFO (klass, index);
|
||||
return k;
|
||||
#endif
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bool
|
||||
vfy_is_array (vfy_jclass klass)
|
||||
{
|
||||
return TYPE_ARRAY_P (klass);
|
||||
}
|
||||
|
||||
bool
|
||||
vfy_is_interface (vfy_jclass klass)
|
||||
{
|
||||
return CLASS_INTERFACE (TYPE_NAME (klass));
|
||||
}
|
||||
|
||||
bool
|
||||
vfy_is_primitive (vfy_jclass klass)
|
||||
{
|
||||
return JPRIMITIVE_TYPE_P (klass);
|
||||
}
|
||||
|
||||
vfy_jclass
|
||||
vfy_get_superclass (vfy_jclass klass)
|
||||
{
|
||||
vfy_jclass k;
|
||||
k = CLASSTYPE_SUPER (klass);
|
||||
return k;
|
||||
}
|
||||
|
||||
vfy_jclass
|
||||
vfy_get_array_class (vfy_jclass klass)
|
||||
{
|
||||
vfy_jclass k;
|
||||
k = build_java_array_type (klass, -1);
|
||||
return k;
|
||||
}
|
||||
|
||||
vfy_jclass
|
||||
vfy_get_component_type (vfy_jclass klass)
|
||||
{
|
||||
vfy_jclass k;
|
||||
if (! vfy_is_array (klass))
|
||||
abort ();
|
||||
k = TYPE_ARRAY_ELEMENT (klass);
|
||||
if (TREE_CODE (k) == POINTER_TYPE)
|
||||
k = TREE_TYPE (k);
|
||||
return k;
|
||||
}
|
||||
|
||||
bool
|
||||
vfy_is_abstract (vfy_jclass klass)
|
||||
{
|
||||
return CLASS_ABSTRACT (TYPE_NAME (klass));
|
||||
}
|
||||
|
||||
vfy_jclass
|
||||
vfy_find_class (vfy_jclass ignore ATTRIBUTE_UNUSED, vfy_string name)
|
||||
{
|
||||
vfy_jclass k;
|
||||
|
||||
k = get_type_from_signature (name);
|
||||
if (TREE_CODE (k) == POINTER_TYPE)
|
||||
k = TREE_TYPE (k);
|
||||
|
||||
return k;
|
||||
}
|
||||
|
||||
vfy_jclass
|
||||
vfy_object_type ()
|
||||
{
|
||||
vfy_jclass k;
|
||||
k = object_type_node;
|
||||
return k;
|
||||
}
|
||||
|
||||
vfy_jclass
|
||||
vfy_string_type ()
|
||||
{
|
||||
vfy_jclass k;
|
||||
k = string_type_node;
|
||||
return k;
|
||||
}
|
||||
|
||||
vfy_jclass
|
||||
vfy_throwable_type ()
|
||||
{
|
||||
vfy_jclass k;
|
||||
k = throwable_type_node;
|
||||
return k;
|
||||
}
|
||||
|
||||
vfy_jclass
|
||||
vfy_unsuitable_type (void)
|
||||
{
|
||||
return TYPE_SECOND;
|
||||
}
|
||||
|
||||
vfy_jclass
|
||||
vfy_return_address_type (void)
|
||||
{
|
||||
return TYPE_RETURN_ADDR;
|
||||
}
|
||||
|
||||
vfy_jclass
|
||||
vfy_null_type (void)
|
||||
{
|
||||
return TYPE_NULL;
|
||||
}
|
||||
|
||||
int
|
||||
vfy_fail (const char *message, int pc, vfy_jclass ignore1 ATTRIBUTE_UNUSED,
|
||||
vfy_method *ignore2 ATTRIBUTE_UNUSED)
|
||||
{
|
||||
if (pc == -1)
|
||||
error ("verification failed: %s", message);
|
||||
else
|
||||
error ("verification failed at PC=%d: %s", pc, message);
|
||||
/* We have to return a value for the verifier to throw. */
|
||||
return 1;
|
||||
}
|
||||
|
||||
vfy_jclass
|
||||
vfy_get_primitive_type (int type)
|
||||
{
|
||||
vfy_jclass k;
|
||||
k = decode_newarray_type (type);
|
||||
return k;
|
||||
}
|
||||
|
||||
void
|
||||
vfy_note_stack_depth (vfy_method *method, int pc, int depth)
|
||||
{
|
||||
tree label = lookup_label (pc);
|
||||
LABEL_TYPE_STATE (label) = make_tree_vec (method->max_locals + depth);
|
||||
}
|
||||
|
||||
void
|
||||
vfy_note_stack_type (vfy_method *method, int pc, int slot, vfy_jclass type)
|
||||
{
|
||||
tree label, vec;
|
||||
|
||||
slot += method->max_locals;
|
||||
|
||||
if (type == object_type_node)
|
||||
type = object_ptr_type_node;
|
||||
|
||||
label = lookup_label (pc);
|
||||
vec = LABEL_TYPE_STATE (label);
|
||||
TREE_VEC_ELT (vec, slot) = type;
|
||||
}
|
||||
|
||||
void
|
||||
vfy_note_local_type (vfy_method *method ATTRIBUTE_UNUSED, int pc, int slot,
|
||||
vfy_jclass type)
|
||||
{
|
||||
tree label, vec;
|
||||
|
||||
if (type == object_type_node)
|
||||
type = object_ptr_type_node;
|
||||
|
||||
label = lookup_label (pc);
|
||||
vec = LABEL_TYPE_STATE (label);
|
||||
TREE_VEC_ELT (vec, slot) = type;
|
||||
}
|
||||
|
||||
void
|
||||
vfy_note_instruction_seen (int pc)
|
||||
{
|
||||
instruction_bits[pc] |= BCODE_VERIFIED;
|
||||
}
|
||||
|
||||
/* Verify the bytecodes of the current method.
|
||||
Return 1 on success, 0 on failure. */
|
||||
int
|
||||
verify_jvm_instructions_new (JCF *jcf, const unsigned char *byte_ops,
|
||||
long length)
|
||||
{
|
||||
vfy_method method;
|
||||
int i, result, eh_count;
|
||||
vfy_exception *exceptions;
|
||||
|
||||
method_init_exceptions ();
|
||||
|
||||
JCF_SEEK (jcf, DECL_CODE_OFFSET (current_function_decl) + length);
|
||||
eh_count = JCF_readu2 (jcf);
|
||||
|
||||
exceptions = (vfy_exception *) xmalloc (eh_count * sizeof (vfy_exception));
|
||||
for (i = 0; i < eh_count; ++i)
|
||||
{
|
||||
int start_pc, end_pc, handler_pc, catch_type;
|
||||
unsigned char *p = jcf->read_ptr + 8 * i;
|
||||
start_pc = GET_u2 (p);
|
||||
end_pc = GET_u2 (p+2);
|
||||
handler_pc = GET_u2 (p+4);
|
||||
catch_type = GET_u2 (p+6);
|
||||
|
||||
if (start_pc < 0 || start_pc >= length
|
||||
|| end_pc < 0 || end_pc > length || start_pc >= end_pc
|
||||
|| handler_pc < 0 || handler_pc >= length)
|
||||
{
|
||||
error ("bad pc in exception_table");
|
||||
free (exceptions);
|
||||
return 0;
|
||||
}
|
||||
|
||||
exceptions[i].handler = handler_pc;
|
||||
exceptions[i].start = start_pc;
|
||||
exceptions[i].end = end_pc;
|
||||
exceptions[i].type = catch_type;
|
||||
|
||||
add_handler (start_pc, end_pc,
|
||||
lookup_label (handler_pc),
|
||||
catch_type == 0 ? NULL_TREE
|
||||
: get_class_constant (jcf, catch_type));
|
||||
instruction_bits[handler_pc] |= BCODE_EXCEPTION_TARGET;
|
||||
}
|
||||
|
||||
handle_nested_ranges ();
|
||||
|
||||
method.method = current_function_decl;
|
||||
method.signature = build_java_signature (TREE_TYPE (current_function_decl));
|
||||
method.name = DECL_NAME (current_function_decl);
|
||||
method.bytes = byte_ops;
|
||||
method.exceptions = exceptions;
|
||||
method.defining_class = DECL_CONTEXT (current_function_decl);
|
||||
method.max_stack = DECL_MAX_STACK (current_function_decl);
|
||||
method.max_locals = DECL_MAX_LOCALS (current_function_decl);
|
||||
method.code_length = length;
|
||||
method.exc_count = eh_count;
|
||||
|
||||
result = verify_method (&method);
|
||||
|
||||
free (exceptions);
|
||||
|
||||
return result;
|
||||
}
|
3418
gcc/java/verify-impl.c
Normal file
3418
gcc/java/verify-impl.c
Normal file
File diff suppressed because it is too large
Load diff
|
@ -89,23 +89,23 @@ check_pending_block (tree target_label)
|
|||
|
||||
if (current_subr == NULL_TREE)
|
||||
{
|
||||
if (LABEL_IN_SUBR (target_label))
|
||||
return "might transfer control into subroutine";
|
||||
/* if (LABEL_IN_SUBR (target_label)) */
|
||||
/* return "might transfer control into subroutine"; */
|
||||
}
|
||||
else
|
||||
{
|
||||
if (LABEL_IN_SUBR (target_label))
|
||||
{
|
||||
if (LABEL_SUBR_START (target_label) != current_subr)
|
||||
return "transfer out of subroutine";
|
||||
/* if (LABEL_SUBR_START (target_label) != current_subr) */
|
||||
/* return "transfer out of subroutine"; */
|
||||
}
|
||||
else if (! LABEL_VERIFIED (target_label))
|
||||
{
|
||||
LABEL_IN_SUBR (target_label) = 1;
|
||||
LABEL_SUBR_START (target_label) = current_subr;
|
||||
}
|
||||
else
|
||||
return "transfer out of subroutine";
|
||||
/* else */
|
||||
/* return "transfer out of subroutine"; */
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
@ -126,6 +126,54 @@ subroutine_nesting (tree label)
|
|||
return nesting;
|
||||
}
|
||||
|
||||
static tree
|
||||
defer_merging (tree type1, tree type2)
|
||||
{
|
||||
// FIXME: This is just a placeholder until we replace the verifier
|
||||
// altogether. We really need to ouput a type assertion for all of
|
||||
// the types, every time they are used.
|
||||
return object_ptr_type_node;
|
||||
|
||||
if (TREE_CODE (type1) == POINTER_TYPE)
|
||||
type1 = TREE_TYPE (type1);
|
||||
if (TREE_CODE (type2) == POINTER_TYPE)
|
||||
type2 = TREE_TYPE (type2);
|
||||
|
||||
if (TREE_CODE (type1) == RECORD_TYPE && TREE_CODE (type2) == RECORD_TYPE)
|
||||
{
|
||||
tree list = build_tree_list (type1, NULL_TREE);
|
||||
list = tree_cons (type2, NULL_TREE, list);
|
||||
return list;
|
||||
}
|
||||
|
||||
if (TREE_CODE (type1) == TREE_LIST && TREE_CODE (type2) == TREE_LIST)
|
||||
{
|
||||
return chainon (copy_list (type1), copy_list (type2));
|
||||
}
|
||||
|
||||
if (TREE_CODE (type1) == TREE_LIST && TREE_CODE (type2) == RECORD_TYPE)
|
||||
{
|
||||
tree tmp = type1;
|
||||
do
|
||||
{
|
||||
if (TREE_PURPOSE (tmp) == type2)
|
||||
return type1;
|
||||
tmp = TREE_CHAIN (tmp);
|
||||
}
|
||||
while (tmp);
|
||||
|
||||
return tree_cons (type2, NULL_TREE, copy_list (type1));
|
||||
}
|
||||
|
||||
if (TREE_CODE (type2) == TREE_LIST && TREE_CODE (type1) == RECORD_TYPE)
|
||||
{
|
||||
return defer_merging (type2, type1);
|
||||
}
|
||||
|
||||
abort ();
|
||||
}
|
||||
|
||||
|
||||
/* Return the "merged" types of TYPE1 and TYPE2.
|
||||
If either is primitive, the other must match (after promotion to int).
|
||||
For reference types, return the common super-class.
|
||||
|
@ -138,7 +186,11 @@ merge_types (tree type1, tree type2)
|
|||
return type1;
|
||||
if (type1 == TYPE_UNKNOWN || type2 == TYPE_UNKNOWN
|
||||
|| type1 == TYPE_RETURN_ADDR || type2 == TYPE_RETURN_ADDR)
|
||||
return TYPE_UNKNOWN;
|
||||
return TYPE_UNKNOWN;
|
||||
|
||||
if (TREE_CODE (type1) == TREE_LIST || TREE_CODE (type2) == TREE_LIST)
|
||||
return defer_merging (type1, type2);
|
||||
|
||||
if (TREE_CODE (type1) == POINTER_TYPE && TREE_CODE (type2) == POINTER_TYPE)
|
||||
{
|
||||
int depth1, depth2;
|
||||
|
@ -153,6 +205,9 @@ merge_types (tree type1, tree type2)
|
|||
tt1 = TREE_TYPE (type1);
|
||||
tt2 = TREE_TYPE (type2);
|
||||
|
||||
if (TYPE_DUMMY (tt1) || TYPE_DUMMY (tt2))
|
||||
return defer_merging (tt1, tt2);
|
||||
|
||||
/* If tt{1,2} haven't been properly loaded, now is a good time
|
||||
to do it. */
|
||||
if (!TYPE_SIZE (tt1))
|
||||
|
@ -193,31 +248,10 @@ merge_types (tree type1, tree type2)
|
|||
return object_ptr_type_node;
|
||||
}
|
||||
|
||||
if (CLASS_INTERFACE (TYPE_NAME (tt1)))
|
||||
if (CLASS_INTERFACE (TYPE_NAME (tt1))
|
||||
|| (CLASS_INTERFACE (TYPE_NAME (tt2))))
|
||||
{
|
||||
/* FIXME: should see if two interfaces have a common
|
||||
superinterface. */
|
||||
if (CLASS_INTERFACE (TYPE_NAME (tt2)))
|
||||
{
|
||||
/* This is a kludge, but matches what Sun's verifier does.
|
||||
It can be tricked, but is safe as long as type errors
|
||||
(i.e. interface method calls) are caught at run-time. */
|
||||
return object_ptr_type_node;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (can_widen_reference_to (tt2, tt1))
|
||||
return type1;
|
||||
else
|
||||
return object_ptr_type_node;
|
||||
}
|
||||
}
|
||||
else if (CLASS_INTERFACE (TYPE_NAME (tt2)))
|
||||
{
|
||||
if (can_widen_reference_to (tt1, tt2))
|
||||
return type2;
|
||||
else
|
||||
return object_ptr_type_node;
|
||||
return object_ptr_type_node;
|
||||
}
|
||||
|
||||
type1 = tt1;
|
||||
|
@ -675,6 +709,8 @@ verify_jvm_instructions (JCF* jcf, const unsigned char *byte_ops, long length)
|
|||
VERIFICATION_ERROR_WITH_INDEX
|
||||
("invalid local variable index %d in load");
|
||||
tmp = type_map[index];
|
||||
if (TREE_CODE (tmp) != TREE_LIST)
|
||||
{
|
||||
if (tmp == TYPE_UNKNOWN)
|
||||
VERIFICATION_ERROR_WITH_INDEX
|
||||
("loading local variable %d which has unknown type");
|
||||
|
@ -688,6 +724,7 @@ verify_jvm_instructions (JCF* jcf, const unsigned char *byte_ops, long length)
|
|||
: type != tmp))
|
||||
VERIFICATION_ERROR_WITH_INDEX
|
||||
("loading local variable %d which has invalid type");
|
||||
}
|
||||
PUSH_TYPE (tmp);
|
||||
goto note_used;
|
||||
case OPCODE_istore: type = int_type_node; goto general_store;
|
||||
|
@ -736,7 +773,7 @@ verify_jvm_instructions (JCF* jcf, const unsigned char *byte_ops, long length)
|
|||
prev_eh_ranges = NULL_EH_RANGE;
|
||||
|
||||
/* Allocate decl for this variable now, so we get a temporary
|
||||
! that survives the whole method. */
|
||||
that survives the whole method. */
|
||||
find_local_variable (index, type, oldpc);
|
||||
|
||||
if (TYPE_IS_WIDE (type))
|
||||
|
@ -1092,6 +1129,10 @@ verify_jvm_instructions (JCF* jcf, const unsigned char *byte_ops, long length)
|
|||
if (! CLASS_LOADED_P (self_type))
|
||||
load_class (self_type, 1);
|
||||
|
||||
if (TYPE_DUMMY (self_type) && op_code == OPCODE_invokeinterface)
|
||||
/* Assume we are an interface. */
|
||||
CLASS_INTERFACE (TYPE_NAME (self_type)) = 1;
|
||||
|
||||
self_is_interface = CLASS_INTERFACE (TYPE_NAME (self_type));
|
||||
method_name = COMPONENT_REF_NAME (¤t_jcf->cpool, index);
|
||||
method_type = parse_signature_string ((const unsigned char *) IDENTIFIER_POINTER (sig),
|
||||
|
@ -1129,7 +1170,6 @@ verify_jvm_instructions (JCF* jcf, const unsigned char *byte_ops, long length)
|
|||
if (!nargs || notZero)
|
||||
VERIFICATION_ERROR
|
||||
("invalid argument number in invokeinterface");
|
||||
|
||||
/* If we verify/resolve the constant pool, as we should,
|
||||
this test (and the one just following) are redundant. */
|
||||
if (! self_is_interface)
|
||||
|
|
160
gcc/java/verify.h
Normal file
160
gcc/java/verify.h
Normal file
|
@ -0,0 +1,160 @@
|
|||
/* Declarations to interface gcj with bytecode verifier.
|
||||
Copyright (C) 2003, 2004 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
GCC is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GCC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
|
||||
Java and all Java-based marks are trademarks or registered trademarks
|
||||
of Sun Microsystems, Inc. in the United States and other countries.
|
||||
The Free Software Foundation is independent of Sun Microsystems, Inc. */
|
||||
|
||||
/* Written by Tom Tromey <tromey@redhat.com>. */
|
||||
|
||||
#ifndef GCC_VERIFY_H
|
||||
#define GCC_VERIFY_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include "system.h"
|
||||
#include "coretypes.h"
|
||||
#include "jcf.h"
|
||||
#include "tree.h"
|
||||
#include "java-tree.h"
|
||||
|
||||
typedef JCF vfy_constants;
|
||||
|
||||
/* For our purposes a string is the same as an identifier. */
|
||||
typedef tree vfy_string;
|
||||
|
||||
/* The TYPE_DECL for a class or primitive type. */
|
||||
typedef tree vfy_jclass;
|
||||
|
||||
/* An unsigned jshort. */
|
||||
typedef uint16 vfy_uint_16;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int handler, start, end, type;
|
||||
} vfy_exception;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
tree method;
|
||||
vfy_string signature;
|
||||
vfy_string name;
|
||||
const unsigned char *bytes;
|
||||
vfy_exception *exceptions;
|
||||
|
||||
/* These fields are referred to directly by the verifier. */
|
||||
vfy_jclass defining_class;
|
||||
int max_stack;
|
||||
int max_locals;
|
||||
int code_length;
|
||||
int exc_count;
|
||||
} vfy_method;
|
||||
|
||||
/* Entry point to the verifier. */
|
||||
int verify_jvm_instructions_new (JCF *jcf, const unsigned char *byte_ops,
|
||||
long length);
|
||||
|
||||
void *vfy_alloc (size_t bytes);
|
||||
void vfy_free (void *mem);
|
||||
bool vfy_strings_equal (vfy_string one, vfy_string two);
|
||||
const char *vfy_string_bytes (vfy_string str);
|
||||
int vfy_string_length (vfy_string str);
|
||||
vfy_string vfy_get_string (const char *chars, int length);
|
||||
vfy_string vfy_init_name (void);
|
||||
vfy_string vfy_clinit_name (void);
|
||||
int vfy_count_arguments (vfy_string signature);
|
||||
vfy_string vfy_get_signature (vfy_method *method);
|
||||
vfy_string vfy_get_method_name (vfy_method *method);
|
||||
bool vfy_is_static (vfy_method *method);
|
||||
const unsigned char *vfy_get_bytecode (vfy_method *method);
|
||||
vfy_exception *vfy_get_exceptions (vfy_method *method);
|
||||
void vfy_get_exception (vfy_exception *, int index, int *handler,
|
||||
int *start, int *end, int *handler_type);
|
||||
int vfy_tag (vfy_constants *pool, int index);
|
||||
void vfy_load_indexes (vfy_constants *pool, int index,
|
||||
vfy_uint_16 *index0, vfy_uint_16 *index1);
|
||||
vfy_constants *vfy_get_constants (vfy_jclass klass);
|
||||
int vfy_get_constants_size (vfy_jclass klass);
|
||||
vfy_string vfy_get_pool_string (vfy_constants *pool, int index);
|
||||
vfy_jclass vfy_get_pool_class (vfy_constants *pool, int index);
|
||||
vfy_string vfy_make_string (const char *s, int len);
|
||||
vfy_string vfy_get_class_name (vfy_jclass klass);
|
||||
bool vfy_is_assignable_from (vfy_jclass target, vfy_jclass source);
|
||||
char vfy_get_primitive_char (vfy_jclass klass);
|
||||
int vfy_get_interface_count (vfy_jclass klass);
|
||||
vfy_jclass vfy_get_interface (vfy_jclass klass, int index);
|
||||
bool vfy_is_array (vfy_jclass klass);
|
||||
bool vfy_is_interface (vfy_jclass klass);
|
||||
bool vfy_is_primitive (vfy_jclass klass);
|
||||
vfy_jclass vfy_get_superclass (vfy_jclass klass);
|
||||
vfy_jclass vfy_get_array_class (vfy_jclass klass);
|
||||
vfy_jclass vfy_get_component_type (vfy_jclass klass);
|
||||
bool vfy_is_abstract (vfy_jclass klass);
|
||||
vfy_jclass vfy_find_class (vfy_jclass klass, vfy_string name);
|
||||
vfy_jclass vfy_object_type (void);
|
||||
vfy_jclass vfy_string_type (void);
|
||||
vfy_jclass vfy_throwable_type (void);
|
||||
vfy_jclass vfy_unsuitable_type (void);
|
||||
vfy_jclass vfy_return_address_type (void);
|
||||
vfy_jclass vfy_null_type (void);
|
||||
int vfy_fail (const char *message, int pc, vfy_jclass ignore1,
|
||||
vfy_method *method);
|
||||
vfy_jclass vfy_get_primitive_type (int type);
|
||||
void vfy_note_stack_depth (vfy_method *method, int pc, int depth);
|
||||
void vfy_note_stack_type (vfy_method *method, int pc, int slot,
|
||||
vfy_jclass type);
|
||||
void vfy_note_local_type (vfy_method *method, int pc, int slot,
|
||||
vfy_jclass type);
|
||||
void vfy_note_instruction_seen (int pc);
|
||||
|
||||
#define GLOM(name, stuff) name ## stuff
|
||||
#define VFY_PRIMITIVE_CLASS(name) \
|
||||
vfy_get_primitive_type ((int) (GLOM (name, _type)))
|
||||
|
||||
typedef enum
|
||||
{
|
||||
#define JAVAOP(name, num, ignore1, ignore2, ignore3) \
|
||||
GLOM (op_, name) = num,
|
||||
#include "javaop.def"
|
||||
} java_opcode;
|
||||
|
||||
|
||||
#define JV_CONSTANT_Class CONSTANT_Class
|
||||
#define JV_CONSTANT_ResolvedClass CONSTANT_ResolvedClass
|
||||
#define JV_CONSTANT_String CONSTANT_String
|
||||
#define JV_CONSTANT_ResolvedString CONSTANT_ResolvedString
|
||||
#define JV_CONSTANT_Integer CONSTANT_Integer
|
||||
#define JV_CONSTANT_Float CONSTANT_Float
|
||||
#define JV_CONSTANT_Long CONSTANT_Long
|
||||
#define JV_CONSTANT_Double CONSTANT_Double
|
||||
#define JV_CONSTANT_Fieldref CONSTANT_Fieldref
|
||||
#define JV_CONSTANT_InterfaceMethodref CONSTANT_InterfaceMethodref
|
||||
#define JV_CONSTANT_Methodref CONSTANT_Methodref
|
||||
|
||||
int verify_method (vfy_method *meth);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* ! GCC_VERIFY_H */
|
|
@ -1,3 +1,758 @@
|
|||
2004-11-24 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* Merged gcj-abi-2-dev-branch to trunk.
|
||||
|
||||
2004-11-16 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* include/java-interp.h (_Jv_DefineClass): Updated.
|
||||
* java/lang/natVMClassLoader.cc (defineClass): Pass protection
|
||||
domain to class reader.
|
||||
* defineclass.cc (parse): Use print_class_loaded.
|
||||
Include ProtectionDomain.h.
|
||||
(_Jv_DefineClass): Added ProtectionDomain argument.
|
||||
(_Jv_ClassReader): Likewise.
|
||||
* include/jvm.h (_Jv_Linker::print_class_loaded): Declare.
|
||||
* link.cc: Include CodeSource.h.
|
||||
(print_class_loaded): New function.
|
||||
(wait_for_state): Use it.
|
||||
|
||||
2004-11-16 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* gnu/gcj/util/Debug.java (print): Add RawDataManaged.
|
||||
|
||||
2004-11-16 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* configure.ac (LIBGCJ_LD_SYMBOLIC): AC_SUBST this definition.
|
||||
* configure.host: Define libgcj_ld_symbolic for Linux hosts.
|
||||
* Makefile.am (lib_*_la_LDFLAGS): Add LIBGCJ_LD_SYMBOLIC.
|
||||
* configure: Regenerate.
|
||||
* Makefile.in: Regenerate.
|
||||
|
||||
2004-11-15 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* boehm.cc (_Jv_GCRegisterDisappearingLink): Check that *objp is a
|
||||
gc-allocated object.
|
||||
|
||||
2004-11-15 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* java/net/URLClassLoader.java
|
||||
(URLLoader.getClassPath): New method.
|
||||
(JarURLLoader.JarURLLoader): Read mainfest to parse "Class-Path"
|
||||
attribute and add URLs for each entry.
|
||||
(JarURLLoader.classPath): New field.
|
||||
(JarURLLoader.getClassPath): New method.
|
||||
(addURLImpl): Scan through the list of extraUrls in the new
|
||||
loader, adding them to our urlinfos.
|
||||
(definePackage, findURLResource, findResources): Use
|
||||
urlinfos.size(), not urls.size().
|
||||
|
||||
2004-11-11 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* gnu/gcj/runtime/natSharedLibLoader.cc (ensureSupersLinked): New
|
||||
method.
|
||||
* gnu/gcj/runtime/SharedLibHelper.java (findClass): Ensure supers
|
||||
linked.
|
||||
(ensureSupersLinked): Declare.
|
||||
* java/lang/natVMClassLoader.cc (loadClass): Ensure supers
|
||||
linked.
|
||||
|
||||
2004-11-10 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* gij.cc (main): Treat -verbose the same as -verbose:class.
|
||||
(help): Document -verbose and -verbose:class.
|
||||
|
||||
* link.cc (verbose_class_flag): Declare.
|
||||
(wait_for_state): Print message when handling precompiled class.
|
||||
* java/lang/natClass.cc (verbose_class_flag): Moved to link.cc.
|
||||
|
||||
2004-11-09 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* testsuite/libjava.lang/assign2.out: New file.
|
||||
* testsuite/libjava.lang/assign2.java: New file.
|
||||
|
||||
* java/lang/natRuntime.cc (insertSystemProperties): Set
|
||||
java.version to 1.4.2 and java.specification.version to 1.4. Set
|
||||
java.runtime.version.
|
||||
|
||||
2004-11-08 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* java/lang/natClass.cc (_Jv_IsAssignableFromSlow): Ensure
|
||||
supers installed.
|
||||
* link.cc (verify_type_assertions): Don't link supers.
|
||||
|
||||
* include/jvm.h (_Jv_Linker::search_method_in_class): Declare.
|
||||
* include/java-interp.h (class _Jv_InterpClass)
|
||||
<_Jv_PrepareMissingMethods>: No longer `friend'.
|
||||
* java/lang/Class.h (_Jv_SearchMethodInClass): No longer
|
||||
`friend'.
|
||||
(_Jv_PrepareMissingMethods, _Jv_PrepareCompiledClass,
|
||||
_Jv_GetInterfaces, _Jv_GenerateITable, _Jv_FindIIndex,
|
||||
_Jv_AppendPartialITable, _Jv_LinkSymbolTable,
|
||||
_Jv_LayoutInterfaceMethods, _Jv_SetVTableEntries, _Jv_MakeVTable,
|
||||
_Jv_linkExceptionClassTable, _Jv_WaitForState): Likewise.
|
||||
* link.cc (search_method_in_class): Renamed from
|
||||
_Jv_SearchMethodInClass.
|
||||
(resolve_pool_entry): Updated.
|
||||
|
||||
* include/jvm.h (_Jv_CheckAssignment): Removed.
|
||||
* java/lang/natClass.cc (_Jv_CheckAssignment): Removed.
|
||||
|
||||
2004-11-05 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* link.cc (verify_type_assertions): Ensure classes have supers
|
||||
linked. Strip off array types first.
|
||||
|
||||
2004-11-05 Bryce McKinlay <mckinlay@redhat.com>
|
||||
|
||||
* link.cc: Include VerifyError.h.
|
||||
(_Jv_Linker::verify_type_assertions): New. Read and evaluate entries
|
||||
in the type assertion table.
|
||||
* include/execution.h (_Jv_CompiledEngine::do_verify): Use
|
||||
verify_type_assertions.
|
||||
* include/jvm.h (_Jv_Linker::verify_type_assertions): declare.
|
||||
* java/lang/Class.h (JV_ASSERT_END_OF_TABLE,
|
||||
JV_ASSERT_TYPES_COMPATIBLE, JV_ASSERT_IS_INSTANTIABLE): Declare
|
||||
assertion code values.
|
||||
(struct _Jv_TypeAssertion): Declare.
|
||||
(assertion_table): New class field.
|
||||
(verify): Remove class field.
|
||||
|
||||
2004-11-05 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* Makefile.am: Move jv_dbtool.java to
|
||||
gnu/gcj/tools/gcj_dbtool/Main.java.
|
||||
* Makefile.in: Rebuild.
|
||||
* java/lang/VMCompiler.java: Rename property
|
||||
"gnu.gcj.precompiled.db" to "gnu.gcj.precompiled.db.path".
|
||||
* gnu/gcj/tools/gcj_dbtool/Main.java: moved here from
|
||||
jv_dbtool.java.
|
||||
|
||||
2004-11-05 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* jv_dbtool.java (main): Allow the user to specify the size of the
|
||||
database. Display the capacity and the size.
|
||||
(usage): Show the new option.
|
||||
|
||||
2004-11-04 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* include/jvm.h (_Jv_Linker::set_vtable_entries): Updated.
|
||||
* link.cc (make_vtable): Use correct index when searching for
|
||||
missing method's name. Don't use `flags'.
|
||||
(set_vtable_entries): Removed `flags' argument. Don't recurse
|
||||
into superclasses.
|
||||
(link_symbol_table): Ensure target class method table is
|
||||
complete. Ensure target fields are laid out before entering
|
||||
loop.
|
||||
|
||||
* java/lang/natClass.cc (_Jv_getInterfaceMethod): Indentation
|
||||
fix.
|
||||
|
||||
* interpret.cc (do_verify): Don't verify abstract methods.
|
||||
|
||||
2004-11-01 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* link.cc (wait_for_state): Call verify_class.
|
||||
|
||||
* verify.cc (state::check_no_uninitialized_objects): Removed.
|
||||
(push_jump): Updated.
|
||||
(push_exception_jump): Likewise.
|
||||
(handle_ret_insn): Likewise.
|
||||
(handle_jsr_insn): Likewise.
|
||||
|
||||
2004-10-28 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* gnu/gcj/runtime/PersistentByteMap.java: New file.
|
||||
* jv_dbtool.java: New file.
|
||||
* Makefile.am (bin_PROGRAMS): Add jv-dbtool
|
||||
(jv_dbtool_SOURCES, jv_dbtool_LDFLAGS, jv_dbtool_LINK)
|
||||
(jv_dbtool_LDADD, jv_dbtool_DEPENDENCIES): New.
|
||||
* Makefile.in: Regenerate,
|
||||
* java/lang/VMCompiler.java: Import NoSuchAlgorithmException,
|
||||
Enumeration, StringTokenizer, Vector, PersistentByteMap.
|
||||
(precompiledMapFiles): New variable.
|
||||
(VMCompiler static intializer): Read "gnu.gcj.precompiled.db" to
|
||||
initialize precompiledMapFiles.
|
||||
(compileClass): Look at the database of precompiled class files
|
||||
before firing up gcj.
|
||||
|
||||
* gnu/gcj/runtime/VMClassLoader.java (findClass): Fix comment.
|
||||
|
||||
2004-10-27 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* java/lang/VMCompiler.java (compileClass): try looking for
|
||||
precompiledMapFiles.
|
||||
* gnu/gcj/runtime/PersistentByteMap.java: New file.
|
||||
|
||||
2004-10-27 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* link.cc (ensure_class_linked): Only resolve classes for
|
||||
compiled classes.
|
||||
(add_miranda_methods): Ensure interface supers are installed.
|
||||
(resolve_pool_entry): Better error message.
|
||||
|
||||
2004-10-25 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* boehm.cc (_Jv_MarkObj): Test aux_info before dereferencing it.
|
||||
|
||||
* java/util/ResourceBundle.java (tryBundle): Use
|
||||
Class.isAssignableFrom rather than catching ClassCastException.
|
||||
|
||||
* java/util/zip/InflaterInputStream.java (fill): Don't throw an
|
||||
exception if we hit EOF of `in'.
|
||||
(read): Handle case where inflating returns -1.
|
||||
|
||||
* gnu/java/text/WordBreakIterator.java (WordBreakIterator): Don't
|
||||
initialize `iter'.
|
||||
* gnu/java/text/SentenceBreakIterator.java
|
||||
(SentenceBreakIterator): Don't initialize `iter'.
|
||||
* gnu/java/text/LineBreakIterator.java (LineBreakIterator): Don't
|
||||
initialize `iter'.
|
||||
* gnu/java/text/CharacterBreakIterator.java
|
||||
(CharacterBreakIterator): Don't initialize `iter'.
|
||||
* gnu/java/text/BaseBreakIterator.java (BaseBreakIterator): New
|
||||
constructor.
|
||||
* java/text/BreakIterator.java: Updated documentation.
|
||||
|
||||
2004-10-20 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* java/util/ResourceBundle.java (tryBundle): Also ignore
|
||||
ClassCastException.
|
||||
|
||||
2004-10-18 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* interpret.cc (do_post_miranda_hook): New method.
|
||||
* include/execution.h (_Jv_ExecutionEngine::post_miranda_hook):
|
||||
New field.
|
||||
(_Jv_CompiledEngine::do_post_miranda_hook): New method.
|
||||
(_Jv_CompiledEngine): Initialize new field.
|
||||
(_Jv_InterpreterEngine::do_post_miranda_hook): Declare.
|
||||
(_Jv_InterpreterEngine): Initialize new field.
|
||||
* link.cc (resolve_pool_entry): Put Miranda methods in target
|
||||
class.
|
||||
(ensure_method_table_complete): Call post_miranda_hook.
|
||||
* java/lang/natVMClassLoader.cc (defineClass): Don't set class'
|
||||
aux_info.
|
||||
* defineclass.cc (read_one_method_attribute): Use _Jv_AllocBytes.
|
||||
(parse): Set class' aux_info here.
|
||||
|
||||
* boehm.cc (_Jv_MarkObj): Mark `throws'.
|
||||
|
||||
* boehm.cc: Re-merged with trunk.
|
||||
|
||||
2004-10-18 Andrew Haley <aph@redhat.com>
|
||||
|
||||
PR java/18036:
|
||||
* gnu/gcj/runtime/natStackTrace.cc (fillInStackTrace): Reorganize
|
||||
and correct logic used to find interpreter.
|
||||
|
||||
2004-10-13 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* interpret.cc (_Jv_InterpMethod::run): Initialize
|
||||
_Jv_StartOfInterpreter.
|
||||
(_Jv_StartOfInterpreter, _Jv_EndOfInterpreter): Functions removed.
|
||||
(_Jv_StartOfInterpreter, _Jv_EndOfInterpreter): New variables.
|
||||
* gnu/gcj/runtime/natStackTrace.cc (fillInStackTrace): Use
|
||||
_Unwind_FindEnclosingFunction to discover whether PC is within the
|
||||
interpreter.
|
||||
|
||||
2004-10-13 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* link.cc (find_iindex): Copy correct number of slots to new
|
||||
ioffsets.
|
||||
|
||||
2004-10-12 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* testsuite/libjava.loader/loader.exp (gcj_object_file_name): New
|
||||
proc.
|
||||
(gcj_loader_test_one): Use it.
|
||||
(gcj_loader_run): Likewise.
|
||||
|
||||
* prims.cc: Don't include FirstThread.h.
|
||||
|
||||
2004-10-06 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* link.cc (ensure_method_table_complete): Ensure superclass
|
||||
Miranda methods installed.
|
||||
|
||||
* include/java-interp.h (class _Jv_JNIMethod): Added
|
||||
JV_MARKOBJ_DECL as a friend.
|
||||
* interpret.cc (ncode): Allocate jni_arg_types field with GC.
|
||||
* boehm.cc (_Jv_MarkObj): Skip abstract methods when marking
|
||||
interpreter method structures. Mark jni_arg_types of JNI
|
||||
methods.
|
||||
|
||||
* defineclass.cc (parse): Use JV_STATE_READ.
|
||||
* java/lang/Class.h (JV_STATE_READ): New enum value.
|
||||
|
||||
2004-10-05 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* link.cc (resolve_pool_entry): Add signature info to missing
|
||||
method's information.
|
||||
|
||||
* gnu/gcj/util/Debug.java (Debug(int,boolean)): New constructor.
|
||||
* gnu/gcj/util/natDebug.cc (_Jv_StaticDeepDebug): New function.
|
||||
|
||||
2004-10-04 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* boehm.cc (_Jv_MarkObj): Correctly indicate base pointer when
|
||||
marking IDT.
|
||||
|
||||
2004-09-29 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* Makefile.am (libgcj_la_SOURCES): Mention link.cc, not
|
||||
resolve.cc.
|
||||
* include/jvm.h (class _Jv_Linker): Renamed from _Jv_Resolver.
|
||||
* jni.cc: Use _Jv_Linker.
|
||||
* interpret.cc: Use _Jv_Linker.
|
||||
* java/lang/reflect/natField.cc (getType): Use _Jv_Linker.
|
||||
* java/lang/natClassLoader.cc: Use _Jv_Linker.
|
||||
* java/lang/natVMClassLoader.cc (resolveClass): Use _Jv_Linker.
|
||||
* java/lang/Class.h: Use _Jv_Linker.
|
||||
* java/lang/natClass.cc (initializeClass): Use _Jv_Linker.
|
||||
* resolve.cc: Renamed ...
|
||||
* link.cc: ... here. Use _Jv_Linker.
|
||||
* defineclass.cc (checkExtends): Use _Jv_Linker.
|
||||
|
||||
2004-09-17 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* defineclass.cc (handleCodeAttribute): Don't reference
|
||||
`deferred'.
|
||||
(handleMethodsEnd): Likewise.
|
||||
* include/java-interp.h (_Jv_MethodBase::deferred): Removed
|
||||
field.
|
||||
(_Jv_Defer_Resolution): Don't declare or define.
|
||||
* interpret.cc (do_create_ncode): Don't resolve deferred method
|
||||
pointers.
|
||||
* java/lang/Class.h (_Jv_Defer_Resolution): Don't declare.
|
||||
* resolve.cc (link_symbol_table): No need to defer resolution.
|
||||
|
||||
2004-09-14 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* boehm.cc (MAYBE_MARK): Remove unused `Exit' argument.
|
||||
(_Jv_MarkObj): Updated.
|
||||
(_Jv_MarkArray): Likewise.
|
||||
|
||||
* include/jvm.h (StringClass): Removed.
|
||||
* jni.cc (_Jv_JNI_ThrowNew): Don't use StringClass.
|
||||
* interpret.cc (_Jv_InitField): Don't use StringClass.
|
||||
* java/lang/natString.cc (_Jv_StringFindSlot): Don't use
|
||||
StringClass.
|
||||
(rehash): Likewise
|
||||
(intern): Likewise.
|
||||
(_Jv_FinalizeString): Likewise.
|
||||
(_Jv_NewStringUtf8Const): Likewise.
|
||||
(equals): Likewise.
|
||||
* prims.cc (JvConvertArgv): Don't use StringClass.
|
||||
|
||||
* gcj/field.h (struct _Jv_Field): Don't mention COMPACT_FIELDS.
|
||||
* resolve.cc (ensure_fields_laid_out): Don't mention
|
||||
COMPACT_FIELDS.
|
||||
* defineclass.cc (handleField): Don't mention COMPACT_FIELDS.
|
||||
* boehm.cc (_Jv_MarkObj): Don't mention COMPACT_FIELDS.
|
||||
|
||||
* java/lang/reflect/natField.cc (getType): Use resolve_field.
|
||||
* java/lang/natVMClassLoader.cc (resolveClass): New native
|
||||
implementation.
|
||||
(linkClass0): Removed.
|
||||
(markClassErrorState0): Likewise.
|
||||
* java/lang/natClassLoader.cc: Include execution.h. Moved class
|
||||
preparation code to resolve.cc.
|
||||
(_Jv_RegisterClassHookDefault): Set class's execution engine if
|
||||
not already set.
|
||||
(_Jv_FindClass): Use wait_for_state.
|
||||
(_Jv_NewArrayClass): Likewise. Simplified permissions setting.
|
||||
* java/lang/natClass.cc (_Jv_IsInstanceOf): Include execution.h.
|
||||
Moved interface table and class preparation code to resolve.cc.
|
||||
(finalize): Rewrote.
|
||||
(initializeClass): Simplified locking and class preparation.
|
||||
* java/lang/VMClassLoader.java (linkClass0): Removed.
|
||||
(markClassErrorState0): Likewise.
|
||||
(resolveClass): Now native.
|
||||
(transformException): New method.
|
||||
* java/lang/Class.h (getSuperclass): Don't try to resolve super
|
||||
reference.
|
||||
(getInterface): Likewise.
|
||||
(size): Likewise.
|
||||
(set_state): New method.
|
||||
(Class): Updated friend declarations.
|
||||
(verify): Field now private.
|
||||
(engine): New field.
|
||||
* include/jvm.h (class _Jv_Resolver): New class declaration.
|
||||
(_Jv_ResolveField): Removed declaration.
|
||||
(_Jv_CheckAccessNoInit): Likewise.
|
||||
(_Jv_isBinaryCompatible): Removed.
|
||||
* include/java-interp.h (class _Jv_MethodBase): Updated friend
|
||||
declarations.
|
||||
(class _Jv_InterpMethod): Likewise.
|
||||
(class _Jv_InterpClass): Likewise.
|
||||
(class _Jv_JNIMethod): Likewise.
|
||||
* include/execution.h: New file.
|
||||
* gnu/gcj/runtime/natSharedLibLoader.cc: Include execution.h.
|
||||
(_Jv_sharedlib_register_hook): Set `engine' on loaded class.
|
||||
Register class after setting fields.
|
||||
* resolve.cc: Include execution.h, VerifyError.h. Moved
|
||||
interpreter-specific code to interpret.cc.
|
||||
(uaddr): New location.
|
||||
(struct aligner): Likewise.
|
||||
(ALIGNOF): Likewise.
|
||||
(INITIAL_IOFFSETS_LEN): Interface dispatch code moved here.
|
||||
(INITIAL_IFACES_LEN): Likewise.
|
||||
(null_idt): Likewise.
|
||||
(_Jv_GetMethodString): Likewise.
|
||||
(_Jv_ThrowNoSuchMethodError): Likewise.
|
||||
(_Jv_abstractMethodError): Likewise.
|
||||
(_Jv_Resolver::get_alignment_from_class): Renamed.
|
||||
(_Jv_Resolver::resolve_field): Likewise.
|
||||
(_Jv_Resolver::resolve_pool_entry): Likewise.
|
||||
(_Jv_Resolver::resolve_class_ref): Likewise.
|
||||
(_Jv_Resolver::prepare_constant_time_tables): Likewise.
|
||||
(_Jv_Resolver::indexof): Likewise.
|
||||
(_Jv_Resolver::get_interfaces): Likewise.
|
||||
(_Jv_Resolver::generate_itable): Likewise.
|
||||
(_Jv_Resolver::append_partial_itable): Likewise.
|
||||
(_Jv_Resolver::find_iindex): Likewise.
|
||||
(_Jv_Resolver::link_symbol_table): Likewise.
|
||||
(_Jv_Resolver::link_exception_table): Likewise.
|
||||
(_Jv_Resolver::layout_interface_methods): Likewise.
|
||||
(_Jv_Resolver::layout_vtable_methods): Likewise.
|
||||
(_Jv_Resolver::set_vtable_entries): Likewise.
|
||||
(_Jv_Resolver::make_vtable): Likewise.
|
||||
(_Jv_Resolver::ensure_fields_laid_out): Likewise.
|
||||
(_Jv_Resolver::ensure_class_linked): Likewise.
|
||||
(_Jv_Resolver::ensure_supers_installed): Likewise.
|
||||
(_Jv_Resolver::add_miranda_methods): Likewise.
|
||||
(_Jv_Resolver::ensure_method_table_complete): Likewise.
|
||||
(_Jv_Resolver::verify_class): Likewise.
|
||||
(_Jv_Resolver::wait_for_state): Likewise.
|
||||
* prims.cc (_Jv_soleCompiledEngine): New global.
|
||||
(_Jv_CheckAccess): Use _Jv_IsAssignableFromSlow.
|
||||
(_Jv_CheckAccessNoInit): Removed.
|
||||
* jni.cc (_Jv_JNI_GetAnyFieldID): Use resolve_field.
|
||||
* interpret.cc: Include platform.h, ClassFormatError.h,
|
||||
Modifier.h, execution.h.
|
||||
(_Jv_soleInterpreterEngine): New global.
|
||||
(compile): Use resolve_pool_entry.
|
||||
(run): Likewise.
|
||||
(_Jv_InitField): New location.
|
||||
(skip_one_type): Likewise.
|
||||
(get_ffi_type_from_signature): Likewise.
|
||||
(_Jv_count_arguments): Likewise.
|
||||
(init_cif): Likewise.
|
||||
(ncode_closure): Likewise.
|
||||
(ffi_closure_fun): Likewise.
|
||||
(ncode): Likewise.
|
||||
(throw_class_format_error): Likewise.
|
||||
(throw_class_format_error): Likewise.
|
||||
(_Jv_InterpreterEngine::do_verify): New method.
|
||||
(_Jv_InterpreterEngine::do_create_ncode): Likewise.
|
||||
(_Jv_InterpreterEngine::do_allocate_static_fields): Likewise.
|
||||
(_Jv_InterpreterEngine::do_resolve_method): Likewise.
|
||||
* defineclass.cc: Include execution.h.
|
||||
(_Jv_ClassReader): Initialize size_in_bytes, vtable_method_count,
|
||||
engine.
|
||||
(checkExtends): Ensure superclass has supers installed.
|
||||
(_Jv_ClassNameSamePackage): Clarify usage constraints.
|
||||
* boehm.cc (GC_enable, GC_disable): Declare at top of file.
|
||||
(_Jv_MarkObj): Unconditionally mark vtable. Mark interface
|
||||
dispatch tables.
|
||||
|
||||
2004-09-13 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* mauve-libgcj: List some classes we don't have.
|
||||
|
||||
2004-09-10 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* java/lang/Class.h (_Jv_getInterfaceMethod(): new friend.
|
||||
* java/lang/natClass.cc (initializeClass): Check itable.
|
||||
(_Jv_getInterfaceMethod): New.
|
||||
(_Jv_LinkSymbolTable): Rewrite code that handles inerface calls.
|
||||
Check that an interface method isn't called with invokevirtual.
|
||||
|
||||
* java/lang/natClass.cc (_Jv_LayoutVTableMethods): Make sure
|
||||
super_meth is virtual.
|
||||
|
||||
2004-09-01 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* java/lang/Class.h (_Jv_CheckAccessNoInit): Declare as friend.
|
||||
* java/lang/natClass.cc (_Jv_LayoutVTableMethods): Use
|
||||
_Jv_CheckAccessNoInit.
|
||||
* include/jvm.h (_Jv_CheckAccessNoInit): Declare.
|
||||
* prims.cc (_Jv_CheckAccessNoInit): New method.
|
||||
|
||||
* java/lang/reflect/natMethod.cc (invoke): Check access against
|
||||
declaring class, not object's class.
|
||||
* java/lang/natClass.cc (_Jv_LookupDeclaredMethod): Added another
|
||||
argument.
|
||||
(_Jv_LayoutVTableMethods): Perform checks of accessibility of
|
||||
overridden method.
|
||||
* java/lang/Class.h (_Jv_LookupDeclaredMethod): Added another
|
||||
argument.
|
||||
|
||||
2004-08-30 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* java/lang/natClass.cc (_Jv_CheckAssignment): Catch
|
||||
ClassNotFoundException.
|
||||
Throw NoClassDefFoundError.
|
||||
|
||||
* java/lang/natClassLoader.cc (_Jv_FindClassInCache): Remove call
|
||||
to klass->verify() from here ...
|
||||
(_Jv_PrepareCompiledClass): ...and put it here.
|
||||
|
||||
2004-08-27 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* java/lang/natClassLoader.cc (_Jv_FindClassInCache): Call
|
||||
klass->verify().
|
||||
* java/lang/natClass.cc (_Jv_LinkSymbolTable): Add debugging.
|
||||
(_Jv_LinkSymbolTable): Call Jv_LayoutClass on target class.
|
||||
|
||||
2004-08-27 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* java/lang/Class.h (_Jv_IsAssignableFromSlow): Declare as
|
||||
friend.
|
||||
* java/lang/natClass.cc (_Jv_CheckAssignment): New function.
|
||||
(_Jv_IsAssignableFromSlow): New function.
|
||||
Include VerifyError.h.
|
||||
* include/jvm.h (_Jv_CheckAssignment): Declare.
|
||||
|
||||
2004-08-18 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* java/lang/VMCompiler.java (loadSharedLibrary): Add className
|
||||
argument. Pass it to findClass instead of fileName.
|
||||
(compileClass): Pass class name to loadSharedLibrary.
|
||||
|
||||
2004-06-22 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* testsuite/libjava.compile/compile.exp: Force indirect dispatch.
|
||||
|
||||
2004-06-15 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* java/lang/natSystem.cc (getenv0): Don't assume environment
|
||||
variable is Latin 1 coded.
|
||||
|
||||
2004-06-07 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* java/lang/System.java: (getenv0): New method.
|
||||
(getenv): Add security check. Do the right thing.
|
||||
* java/lang/natSystem.cc (getenv0): New method.
|
||||
|
||||
2004-04-19 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* gnu/gcj/runtime/NameFinder.java: Call waitFor() on the processes
|
||||
we destroy.
|
||||
|
||||
* gnu/java/net/natPlainSocketImplPosix.cc (read): The value byte
|
||||
is returned as an int in the range 0 to 255.
|
||||
|
||||
2004-08-13 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* java/lang/natClass.cc (_Jv_LinkSymbolTable): Prepare the target
|
||||
class if it is interpreted.
|
||||
|
||||
2004-08-12 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* java/lang/natClassLoader.cc (_Jv_WaitForState): Updated.
|
||||
* java/lang/Class.h (_Jv_ResolveClassRef): Updated declaration.
|
||||
(Class::getSuperclass): Updated.
|
||||
(Class::getInterfaces): Likewise.
|
||||
(Class::size): Updated.
|
||||
(_Jv_LayoutClass): Updated declaration.
|
||||
* java/lang/natClass.cc (_Jv_ResolveClassRef): Changed interface.
|
||||
Synchronize on class.
|
||||
(_Jv_LayoutClass): Changed interface.
|
||||
(initializeClass): Updated.
|
||||
(_Jv_LinkSymbolTable): Likewise.
|
||||
|
||||
* java/lang/Class.h (Class::_Jv_isBinaryCompatible): Declare as
|
||||
friend.
|
||||
* java/lang/natClassLoader.cc (_Jv_WaitForState): Use
|
||||
_Jv_isBinaryCompatible.
|
||||
* java/lang/natClass.cc (initializeClass): Use
|
||||
_Jv_isBinaryCompatible.
|
||||
(_Jv_LinkSymbolTable): Likewise.
|
||||
* include/jvm.h (_Jv_isBinaryCompatible): New function.
|
||||
|
||||
2004-08-11 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* gcj/javaprims.h: Regenerated.
|
||||
* java/lang/natClassLoader.cc (getClassLoader0): Removed.
|
||||
(_registerClass): Likewise.
|
||||
* Makefile.in: Rebuilt.
|
||||
* Makefile.am (core_java_source_files): Added VMCompiler.
|
||||
* java/lang/Compiler.java: Rewrote in terms of VMCompiler.
|
||||
* java/lang/VMCompiler.java: New file.
|
||||
* gnu/gcj/runtime/SharedLibHelper.java (findClass): Removed
|
||||
`verbose' code.
|
||||
(copyFile): Don't use fully-qualified name.
|
||||
(h): Removed.
|
||||
* java/lang/natVMClassLoader.cc: Include VMCompiler.h.
|
||||
(defineClass): Use VMCompiler.
|
||||
* java/lang/ClassLoader.java (defineClass): Removed jit
|
||||
compilation code and `verbose' code.
|
||||
(getClassLoader0): Removed.
|
||||
(_registerClass): Likewise.
|
||||
(SharedLibHelpers): Removed.
|
||||
|
||||
2004-08-10 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* java/net/URLClassLoader.java (URLLoader(URLClassLoader, URL,
|
||||
URL)): New constructor.
|
||||
(SoURLLoader): Likewise.
|
||||
(JarURLLoader): Create SoURLLoader with override URL.
|
||||
|
||||
2004-08-10 Mark Wielaard <mark@klomp.org>
|
||||
|
||||
* Makefile.in: Rebuilt.
|
||||
* Makefile.am (interpret.lo): New rule.
|
||||
|
||||
2004-08-05 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* java/net/URLClassLoader.java (JarURLLoader.JarURLLoader): Look
|
||||
aside for "GCJLIBS" in directory where jarfiles are loaded.
|
||||
(JarURLLoader.getClass): New method.
|
||||
(JarURLLoader.toString): New method.
|
||||
(FileResource.toString): New method.
|
||||
* java/lang/natClassLoader.cc (_Jv_RegisterClassHookDefault):
|
||||
Remove "Duplicate class registration: " bug.
|
||||
(_registerClass): New method.
|
||||
* java/lang/natClass.cc (_Jv_LinkSymbolTable): Check method index.
|
||||
(_Jv_LinkSymbolTable): Call _Jv_LayoutClass().
|
||||
Add debugging.
|
||||
(_Jv_LayoutClass): Use getSuperclass() rather than directly
|
||||
accessing the field.
|
||||
* java/lang/ClassLoader.java (SharedLibHelpers): New variable.
|
||||
(defineClass): Call gcj to JIT-compile a class.
|
||||
(_registerClass): New method.
|
||||
* gnu/gcj/runtime/SharedLibHelper.java (findHelper): A shared
|
||||
library name can refer to more than one loaded library, so use a
|
||||
Set of SharedLibHelpers.
|
||||
If a shared library is already loaded, take a copy.
|
||||
(copyFile): New function.
|
||||
|
||||
* testsuite/libjava.compile/compile.exp: Force
|
||||
-findirect-dispatch.
|
||||
|
||||
* java/security/BasicPermission.java: Remove bogus checks.
|
||||
|
||||
* java/lang/System.java (getenv0): New method.
|
||||
* java/lang/natSystem.cc (getenv0): New method.
|
||||
|
||||
2004-05-24 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* java/lang/natClass.cc (_Jv_LayoutClass): Remove warning message.
|
||||
|
||||
2004-04-20 Bryce McKinlay <mckinlay@redhat.com>
|
||||
|
||||
* Merged with HEAD as of 20040514. Diff against
|
||||
gcj-abi-2-merge-20040514.
|
||||
|
||||
2004-04-16 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* java/lang/natClassLoader.cc (_Jv_WaitForState): Call
|
||||
_Jv_LayoutClass.
|
||||
(_Jv_PrepareCompiledClass): Cast address to uaddr for comparison.
|
||||
(_Jv_PrepareCompiledClass): If we throw an exception during
|
||||
preparation, restore state.
|
||||
(ClassLoader::getClassLoader0): New method.
|
||||
|
||||
* java/lang/natClass.cc (get_alignment_from_class): Moved here
|
||||
from resolve.cc.
|
||||
(ALIGNOF): Use offsetof, not __alignof__.
|
||||
(_Jv_ResolveClassRef): Resolve a reference to a class in a
|
||||
constant pool.
|
||||
(getInterfaces): Emit debug output if interface hasn't been
|
||||
resolved.
|
||||
(initializeClass): Call _Jv_LayoutClass.
|
||||
(_Jv_LinkSymbolTable): Add debugging output.
|
||||
(_Jv_LinkSymbolTable): NoClassDefFoundError if target_class isn't
|
||||
found.
|
||||
(_Jv_LinkSymbolTable): Call _Jv_PrepareClass.
|
||||
(_Jv_LinkSymbolTable): Pass the real class loader to
|
||||
_Jv_FindClass.
|
||||
(_Jv_linkExceptionClassTable): Don't throw if we fail to find an
|
||||
exception class.
|
||||
(_Jv_LinkSymbolTable): Assert if we find a static field reference
|
||||
to an interpreted class.
|
||||
(_Jv_LayoutVTableMethods): Use klass->getSuperclass to get the
|
||||
superclass.
|
||||
(_Jv_LayoutClass): Moved here; it was part of _Jv_PrepareClass in
|
||||
resolve.cc.
|
||||
|
||||
* java/lang/VMSecurityManager.java: Check for the system class
|
||||
loader as well as loader != null.
|
||||
|
||||
* java/lang/SecurityManager.java (checkPermission): Remove
|
||||
security check.
|
||||
(checkRead): Likewise.
|
||||
(checkConnect): Likewise.
|
||||
|
||||
* java/lang/ClassLoader.java (loadClass): Include all class
|
||||
loaders in stack trace string.
|
||||
Look for class in "gcjlib.so" in the same directory.
|
||||
(getSystemClassLoader) Use getClassLoader0.
|
||||
(getClassLoader0): New native method.
|
||||
|
||||
* java/lang/Class.h (getSuperclass): New method.
|
||||
(getInterface): New method.
|
||||
(size): Lay out class if needed.
|
||||
(firstMethodIndex): New method.
|
||||
(Jv_ResolveClassRef): New declaration.
|
||||
(_Jv_LinkSymbolTable): New declaration.
|
||||
|
||||
* java/io/ObjectOutputStream.java: Add DEBUG statements
|
||||
everywhere.
|
||||
(dumpElementln): New method.
|
||||
(depth): New field.
|
||||
* java/io/ObjectInputStream.java (MyIOException): new, for
|
||||
debugging.
|
||||
Everywhere: use MyIOException rather than IOException.
|
||||
Indent debugging output to make nesting visible.
|
||||
(currentClassLoader): Make native
|
||||
(callersClassLoader): New field.
|
||||
(depth): New field.
|
||||
* java/io/natObjectInputStream.cc (getCallersClassLoader): New
|
||||
method.
|
||||
|
||||
(readObject): ENDBLOCKDATA is generated if the class has a write
|
||||
method, not if it has a read method.
|
||||
|
||||
* include/jvm.h (_Jv_CallAnyMethodA): Add new arg, iface.
|
||||
|
||||
* gnu/javax/rmi/CORBA/DelegateFactory.java: Use the
|
||||
getContextClassLoader form the current thread after our own class
|
||||
loader.
|
||||
|
||||
* gnu/gcj/runtime/SharedLibHelper.java (findClass): Class loader
|
||||
debugging.
|
||||
(toString): New method.
|
||||
|
||||
* verify.cc (class _Jv_BytecodeVerifier): Don't directly access
|
||||
interfaces array.
|
||||
|
||||
* resolve.cc (_Jv_PrepareMissingMethods): If interface looks like
|
||||
a constant pool entry, resolve it now.
|
||||
(_Jv_PrepareClass): Break out part of this function to Jv_LayoutClass
|
||||
in natClass.cc.
|
||||
Move get_alignment_from_class to natClass.cc.
|
||||
|
||||
* prims.cc (_Jv_AllocObjectNoFinalizer): Use size field from class.
|
||||
(_Jv_AllocObjectNoInitNoFinalizer): Likewise.
|
||||
|
||||
* defineclass.cc (checkExtends): Don't access superclass field
|
||||
directly.
|
||||
|
||||
* Makefile.in: regenerate.
|
||||
|
||||
* gnu/gcj/util/natDebug.cc: New
|
||||
* gnu/gcj/util/Debug.java: New.
|
||||
|
||||
* Makefile.am (java/io/ObjectInputStream.lo): Use
|
||||
-fno-optimize-sibling-calls.
|
||||
|
||||
* java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Use
|
||||
_Jv_LookupInterfaceMethodIdx to calculate the address of a method
|
||||
in an interface.
|
||||
* include/jvm.h (_Jv_CallAnyMethodA): Add new arg: iface.
|
||||
|
||||
2004-11-24 Kelley Cook <kcook@gcc.gnu.org>
|
||||
|
||||
* configure: Regenerate for libtool change.
|
||||
|
|
|
@ -124,7 +124,7 @@ propdir = $(libdir)
|
|||
|
||||
## For now, only on native systems. FIXME.
|
||||
if NATIVE
|
||||
bin_PROGRAMS = jv-convert gij grmic grmiregistry
|
||||
bin_PROGRAMS = jv-convert gij grmic grmiregistry gcj-dbtool
|
||||
endif
|
||||
|
||||
bin_SCRIPTS = addr2name.awk
|
||||
|
@ -207,7 +207,7 @@ libgij_la_LIBADD = libgcj.la
|
|||
libgij_la_DEPENDENCIES = libgcj.la libgcj.spec
|
||||
|
||||
libgcj_la_SOURCES = prims.cc jni.cc exception.cc \
|
||||
resolve.cc defineclass.cc interpret.cc verify.cc \
|
||||
link.cc defineclass.cc interpret.cc verify.cc \
|
||||
$(nat_source_files) $(math_c_source_files) $(java_source_files) \
|
||||
$(built_java_source_files) \
|
||||
$(BOEHMGC_SRC) $(NOGC_SRC) \
|
||||
|
@ -363,7 +363,7 @@ lib_gnu_java_awt_peer_gtk_la_LIBADD = $(GTK_LIBS) $(GLIB_LIBS) $(LIBART_LIBS) $(
|
|||
lib_gnu_java_awt_peer_gtk_la_DEPENDENCIES = $(gtk_jni_headers) libgcj-@gcc_version@.jar libgcj.la libgcj.spec
|
||||
## The mysterious backslash in the grep pattern is consumed by make.
|
||||
lib_gnu_java_awt_peer_gtk_la_LDFLAGS = \
|
||||
-version-info `grep -v '^\#' $(srcdir)/libtool-version`
|
||||
-version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC)
|
||||
lib_gnu_java_awt_peer_gtk_la_LINK = $(LIBLINK)
|
||||
|
||||
lib_org_ietf_jgss_la_SOURCES = \
|
||||
|
@ -384,7 +384,7 @@ lib_org_ietf_jgss_la_LIBADD = -L$(here)/.libs $(jgss_propertyo_files) \
|
|||
|
||||
## The mysterious backslash in the grep pattern is consumed by make.
|
||||
lib_org_ietf_jgss_la_LDFLAGS = -rpath $(toolexeclibdir) \
|
||||
-version-info `grep -v '^\#' $(srcdir)/libtool-version`
|
||||
-version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC)
|
||||
|
||||
lib_org_w3c_dom_la_SOURCES = org/w3c/dom/Attr.java \
|
||||
org/w3c/dom/CDATASection.java \
|
||||
|
@ -415,7 +415,7 @@ org/w3c/dom/traversal/TreeWalker.java
|
|||
lib_org_w3c_dom_la_LIBADD = -L$(here)/.libs libgcj.la
|
||||
## The mysterious backslash in the grep pattern is consumed by make.
|
||||
lib_org_w3c_dom_la_LDFLAGS = -rpath $(toolexeclibdir) \
|
||||
-version-info `grep -v '^\#' $(srcdir)/libtool-version`
|
||||
-version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC)
|
||||
|
||||
lib_org_xml_sax_la_SOURCES = org/xml/sax/ext/DeclHandler.java \
|
||||
org/xml/sax/ext/LexicalHandler.java \
|
||||
|
@ -451,7 +451,7 @@ org/xml/sax/XMLReader.java
|
|||
lib_org_xml_sax_la_LIBADD = -L$(here)/.libs libgcj.la
|
||||
## The mysterious backslash in the grep pattern is consumed by make.
|
||||
lib_org_xml_sax_la_LDFLAGS = -rpath $(toolexeclibdir) \
|
||||
-version-info `grep -v '^\#' $(srcdir)/libtool-version`
|
||||
-version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC)
|
||||
|
||||
lib_gnu_awt_xlib_la_SOURCES = \
|
||||
$(xlib_java_source_files) \
|
||||
|
@ -467,7 +467,7 @@ lib_gnu_awt_xlib_la_CPPFLAGS = \
|
|||
lib_gnu_awt_xlib_la_LDFLAGS = ../libstdc++-v3/src/libstdc++.la \
|
||||
@X_PRE_LIBS@ @X_LIBS@ -lX11 @X_EXTRA_LIBS@ \
|
||||
-rpath $(toolexeclibdir) \
|
||||
-version-info `grep -v '^\#' $(srcdir)/libtool-version`
|
||||
-version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC)
|
||||
lib_gnu_awt_xlib_la_LINK = $(LIBLINK)
|
||||
|
||||
all_java_source_files = \
|
||||
|
@ -945,6 +945,25 @@ jv_convert_LDADD = -L$(here)/.libs libgcj.la
|
|||
## linking this program.
|
||||
jv_convert_DEPENDENCIES = libgcj.la libgcj.spec
|
||||
|
||||
gcj_dbtool_SOURCES = gnu/gcj/tools/gcj_dbtool/Main.java
|
||||
## We need -nodefaultlibs because we want to avoid gcj's `-lgcj'. We
|
||||
## need this because we are explicitly using libtool to link using the
|
||||
## `.la' file.
|
||||
gcj_dbtool_LDFLAGS = --main=gnu.gcj.tools.gcj_dbtool.Main \
|
||||
-rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
gcj_dbtool_LINK = $(GCJLINK)
|
||||
## We don't explicitly link in the libraries we need; libgcj.la brings
|
||||
## in all dependencies. We need the -L so that gcj can find libgcj
|
||||
## with `-lgcj', but it must come first, otherwise the -L flags
|
||||
## brought in from libgcj.la would cause the install directories to be
|
||||
## searched before the build-tree ones, and we'd get errors because of
|
||||
## different libraries with the same SONAME from picky linkers such as
|
||||
## Solaris'. FIXME: should be _libs on some systems.
|
||||
gcj_dbtool_LDADD = -L$(here)/.libs libgcj.la
|
||||
## Depend on the spec file to make sure it is up to date before
|
||||
## linking this program.
|
||||
gcj_dbtool_DEPENDENCIES = libgcj.la libgcj.spec
|
||||
|
||||
gij_SOURCES =
|
||||
## We need -nodefaultlibs because we want to avoid gcj's `-lgcj'. We
|
||||
## need this because we are explicitly using libtool to link using the
|
||||
|
@ -2140,65 +2159,35 @@ javax/print/attribute/SupportedValuesAttribute.java \
|
|||
javax/print/attribute/TextSyntax.java \
|
||||
javax/print/attribute/UnmodifiableSetException.java \
|
||||
javax/print/attribute/URISyntax.java \
|
||||
javax/print/attribute/standard/ColorSupported.java \
|
||||
javax/print/attribute/standard/Compression.java \
|
||||
javax/print/attribute/standard/Copies.java \
|
||||
javax/print/attribute/standard/CopiesSupported.java \
|
||||
javax/print/attribute/standard/DateTimeAtCompleted.java \
|
||||
javax/print/attribute/standard/DateTimeAtCreation.java \
|
||||
javax/print/attribute/standard/DateTimeAtProcessing.java \
|
||||
javax/print/attribute/standard/DocumentName.java \
|
||||
javax/print/attribute/standard/Fidelity.java \
|
||||
javax/print/attribute/standard/Finishings.java \
|
||||
javax/print/attribute/standard/JobHoldUntil.java \
|
||||
javax/print/attribute/standard/JobImpressions.java \
|
||||
javax/print/attribute/standard/JobImpressionsCompleted.java \
|
||||
javax/print/attribute/standard/JobImpressionsSupported.java \
|
||||
javax/print/attribute/standard/JobKOctets.java \
|
||||
javax/print/attribute/standard/JobKOctetsProcessed.java \
|
||||
javax/print/attribute/standard/JobKOctetsSupported.java \
|
||||
javax/print/attribute/standard/JobMediaSheets.java \
|
||||
javax/print/attribute/standard/JobMediaSheetsCompleted.java \
|
||||
javax/print/attribute/standard/JobMediaSheetsSupported.java \
|
||||
javax/print/attribute/standard/JobMessageFromOperator.java \
|
||||
javax/print/attribute/standard/JobName.java \
|
||||
javax/print/attribute/standard/JobOriginatingUserName.java \
|
||||
javax/print/attribute/standard/JobPriority.java \
|
||||
javax/print/attribute/standard/JobPrioritySupported.java \
|
||||
javax/print/attribute/standard/JobSheets.java \
|
||||
javax/print/attribute/standard/JobState.java \
|
||||
javax/print/attribute/standard/JobStateReason.java \
|
||||
javax/print/attribute/standard/JobStateReasons.java \
|
||||
javax/print/attribute/standard/Media.java \
|
||||
javax/print/attribute/standard/MediaSizeName.java \
|
||||
javax/print/attribute/standard/MultipleDocumentHandling.java \
|
||||
javax/print/attribute/standard/NumberOfDocuments.java \
|
||||
javax/print/attribute/standard/NumberOfInterveningJobs.java \
|
||||
javax/print/attribute/standard/NumberUp.java \
|
||||
javax/print/attribute/standard/NumberUpSupported.java \
|
||||
javax/print/attribute/standard/OrientationRequested.java \
|
||||
javax/print/attribute/standard/OutputDeviceAssigned.java \
|
||||
javax/print/attribute/standard/PDLOverrideSupported.java \
|
||||
javax/print/attribute/standard/PageRanges.java \
|
||||
javax/print/attribute/standard/PagesPerMinute.java \
|
||||
javax/print/attribute/standard/PagesPerMinuteColor.java \
|
||||
javax/print/attribute/standard/PresentationDirection.java \
|
||||
javax/print/attribute/standard/PrintQuality.java \
|
||||
javax/print/attribute/standard/PrinterInfo.java \
|
||||
javax/print/attribute/standard/PrinterIsAcceptingJobs.java \
|
||||
javax/print/attribute/standard/PrinterLocation.java \
|
||||
javax/print/attribute/standard/PrinterMakeAndModel.java \
|
||||
javax/print/attribute/standard/PrinterMessageFromOperator.java \
|
||||
javax/print/attribute/standard/PrinterMoreInfo.java \
|
||||
javax/print/attribute/standard/PrinterMoreInfoManufacturer.java \
|
||||
javax/print/attribute/standard/PrinterName.java \
|
||||
javax/print/attribute/standard/PrinterResolution.java \
|
||||
javax/print/attribute/standard/PrinterState.java \
|
||||
javax/print/attribute/standard/PrinterStateReason.java \
|
||||
javax/print/attribute/standard/PrinterStateReasons.java \
|
||||
javax/print/attribute/standard/PrinterURI.java \
|
||||
javax/print/attribute/standard/QueuedJobCount.java \
|
||||
javax/print/attribute/standard/ReferenceUriSchemesSupported.java \
|
||||
javax/print/attribute/standard/RequestingUserName.java \
|
||||
javax/print/attribute/standard/Severity.java \
|
||||
javax/print/attribute/standard/SheetCollate.java \
|
||||
|
@ -2379,6 +2368,7 @@ java/lang/UnsupportedOperationException.java \
|
|||
java/lang/VerifyError.java \
|
||||
java/lang/VirtualMachineError.java \
|
||||
java/lang/VMClassLoader.java \
|
||||
java/lang/VMCompiler.java \
|
||||
java/lang/VMSecurityManager.java \
|
||||
java/lang/VMThrowable.java \
|
||||
java/lang/Void.java \
|
||||
|
@ -2567,11 +2557,13 @@ gnu/gcj/runtime/FinalizerThread.java \
|
|||
gnu/gcj/runtime/JNIWeakRef.java \
|
||||
gnu/gcj/runtime/MethodRef.java \
|
||||
gnu/gcj/runtime/NameFinder.java \
|
||||
gnu/gcj/runtime/PersistentByteMap.java \
|
||||
gnu/gcj/runtime/SharedLibHelper.java \
|
||||
gnu/gcj/runtime/SharedLibLoader.java \
|
||||
gnu/gcj/runtime/StackTrace.java \
|
||||
gnu/gcj/runtime/StringBuffer.java \
|
||||
gnu/gcj/runtime/VMClassLoader.java \
|
||||
gnu/gcj/util/Debug.java \
|
||||
gnu/java/io/ASN1ParsingException.java \
|
||||
gnu/java/io/Base64InputStream.java \
|
||||
gnu/java/io/ClassLoaderObjectInputStream.java \
|
||||
|
@ -3282,6 +3274,7 @@ gnu/gcj/runtime/natSharedLibLoader.cc \
|
|||
gnu/gcj/runtime/natStackTrace.cc \
|
||||
gnu/gcj/runtime/natStringBuffer.cc \
|
||||
gnu/gcj/runtime/natVMClassLoader.cc \
|
||||
gnu/gcj/util/natDebug.cc \
|
||||
gnu/java/lang/natMainThread.cc \
|
||||
gnu/java/net/natPlainDatagramSocketImpl.cc \
|
||||
gnu/java/net/natPlainSocketImpl.cc \
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
|
||||
|
||||
SOURCES = $(lib_gnu_awt_xlib_la_SOURCES) $(lib_gnu_java_awt_peer_gtk_la_SOURCES) $(lib_org_ietf_jgss_la_SOURCES) $(lib_org_w3c_dom_la_SOURCES) $(lib_org_xml_sax_la_SOURCES) $(libgcj_la_SOURCES) $(libgij_la_SOURCES) $(gen_from_JIS_SOURCES) $(gij_SOURCES) $(grmic_SOURCES) $(grmiregistry_SOURCES) $(jv_convert_SOURCES)
|
||||
SOURCES = $(lib_gnu_awt_xlib_la_SOURCES) $(lib_gnu_java_awt_peer_gtk_la_SOURCES) $(lib_org_ietf_jgss_la_SOURCES) $(lib_org_w3c_dom_la_SOURCES) $(lib_org_xml_sax_la_SOURCES) $(libgcj_la_SOURCES) $(libgij_la_SOURCES) $(gcj_dbtool_SOURCES) $(gen_from_JIS_SOURCES) $(gij_SOURCES) $(grmic_SOURCES) $(grmiregistry_SOURCES) $(jv_convert_SOURCES)
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
@ -43,7 +43,8 @@ build_triplet = @build@
|
|||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
@NATIVE_TRUE@bin_PROGRAMS = jv-convert$(EXEEXT) gij$(EXEEXT) \
|
||||
@NATIVE_TRUE@ grmic$(EXEEXT) grmiregistry$(EXEEXT)
|
||||
@NATIVE_TRUE@ grmic$(EXEEXT) grmiregistry$(EXEEXT) \
|
||||
@NATIVE_TRUE@ gcj-dbtool$(EXEEXT)
|
||||
@MAINTAINER_MODE_TRUE@@NATIVE_TRUE@noinst_PROGRAMS = \
|
||||
@MAINTAINER_MODE_TRUE@@NATIVE_TRUE@ gen-from-JIS$(EXEEXT)
|
||||
DIST_COMMON = README $(am__configure_deps) $(srcdir)/../compile \
|
||||
|
@ -371,7 +372,7 @@ lib_org_xml_sax_la_OBJECTS = $(am_lib_org_xml_sax_la_OBJECTS)
|
|||
am__DEPENDENCIES_4 = gnu/regexp/MessagesBundle.properties.lo \
|
||||
gnu/regexp/MessagesBundle_fr.properties.lo
|
||||
am__DEPENDENCIES_5 = $(am__DEPENDENCIES_4)
|
||||
am__libgcj_la_SOURCES_DIST = prims.cc jni.cc exception.cc resolve.cc \
|
||||
am__libgcj_la_SOURCES_DIST = prims.cc jni.cc exception.cc link.cc \
|
||||
defineclass.cc interpret.cc verify.cc gnu/gcj/natCore.cc \
|
||||
gnu/gcj/convert/JIS0208_to_Unicode.cc \
|
||||
gnu/gcj/convert/JIS0212_to_Unicode.cc \
|
||||
|
@ -386,7 +387,7 @@ am__libgcj_la_SOURCES_DIST = prims.cc jni.cc exception.cc resolve.cc \
|
|||
gnu/gcj/runtime/natSharedLibLoader.cc \
|
||||
gnu/gcj/runtime/natStackTrace.cc \
|
||||
gnu/gcj/runtime/natStringBuffer.cc \
|
||||
gnu/gcj/runtime/natVMClassLoader.cc \
|
||||
gnu/gcj/runtime/natVMClassLoader.cc gnu/gcj/util/natDebug.cc \
|
||||
gnu/java/lang/natMainThread.cc \
|
||||
gnu/java/net/natPlainDatagramSocketImpl.cc \
|
||||
gnu/java/net/natPlainSocketImpl.cc \
|
||||
|
@ -481,9 +482,9 @@ am__libgcj_la_SOURCES_DIST = prims.cc jni.cc exception.cc resolve.cc \
|
|||
java/lang/UnsupportedClassVersionError.java \
|
||||
java/lang/UnsupportedOperationException.java \
|
||||
java/lang/VerifyError.java java/lang/VirtualMachineError.java \
|
||||
java/lang/VMClassLoader.java java/lang/VMSecurityManager.java \
|
||||
java/lang/VMThrowable.java java/lang/Void.java \
|
||||
java/io/BufferedInputStream.java \
|
||||
java/lang/VMClassLoader.java java/lang/VMCompiler.java \
|
||||
java/lang/VMSecurityManager.java java/lang/VMThrowable.java \
|
||||
java/lang/Void.java java/io/BufferedInputStream.java \
|
||||
java/io/BufferedOutputStream.java java/io/BufferedReader.java \
|
||||
java/io/BufferedWriter.java java/io/ByteArrayInputStream.java \
|
||||
java/io/ByteArrayOutputStream.java \
|
||||
|
@ -597,11 +598,12 @@ am__libgcj_la_SOURCES_DIST = prims.cc jni.cc exception.cc resolve.cc \
|
|||
gnu/gcj/runtime/FinalizerThread.java \
|
||||
gnu/gcj/runtime/JNIWeakRef.java gnu/gcj/runtime/MethodRef.java \
|
||||
gnu/gcj/runtime/NameFinder.java \
|
||||
gnu/gcj/runtime/PersistentByteMap.java \
|
||||
gnu/gcj/runtime/SharedLibHelper.java \
|
||||
gnu/gcj/runtime/SharedLibLoader.java \
|
||||
gnu/gcj/runtime/StackTrace.java \
|
||||
gnu/gcj/runtime/StringBuffer.java \
|
||||
gnu/gcj/runtime/VMClassLoader.java \
|
||||
gnu/gcj/runtime/VMClassLoader.java gnu/gcj/util/Debug.java \
|
||||
gnu/java/io/ASN1ParsingException.java \
|
||||
gnu/java/io/Base64InputStream.java \
|
||||
gnu/java/io/ClassLoaderObjectInputStream.java \
|
||||
|
@ -2174,65 +2176,35 @@ am__libgcj_la_SOURCES_DIST = prims.cc jni.cc exception.cc resolve.cc \
|
|||
javax/print/attribute/TextSyntax.java \
|
||||
javax/print/attribute/UnmodifiableSetException.java \
|
||||
javax/print/attribute/URISyntax.java \
|
||||
javax/print/attribute/standard/ColorSupported.java \
|
||||
javax/print/attribute/standard/Compression.java \
|
||||
javax/print/attribute/standard/Copies.java \
|
||||
javax/print/attribute/standard/CopiesSupported.java \
|
||||
javax/print/attribute/standard/DateTimeAtCompleted.java \
|
||||
javax/print/attribute/standard/DateTimeAtCreation.java \
|
||||
javax/print/attribute/standard/DateTimeAtProcessing.java \
|
||||
javax/print/attribute/standard/DocumentName.java \
|
||||
javax/print/attribute/standard/Fidelity.java \
|
||||
javax/print/attribute/standard/Finishings.java \
|
||||
javax/print/attribute/standard/JobHoldUntil.java \
|
||||
javax/print/attribute/standard/JobImpressions.java \
|
||||
javax/print/attribute/standard/JobImpressionsCompleted.java \
|
||||
javax/print/attribute/standard/JobImpressionsSupported.java \
|
||||
javax/print/attribute/standard/JobKOctets.java \
|
||||
javax/print/attribute/standard/JobKOctetsProcessed.java \
|
||||
javax/print/attribute/standard/JobKOctetsSupported.java \
|
||||
javax/print/attribute/standard/JobMediaSheets.java \
|
||||
javax/print/attribute/standard/JobMediaSheetsCompleted.java \
|
||||
javax/print/attribute/standard/JobMediaSheetsSupported.java \
|
||||
javax/print/attribute/standard/JobMessageFromOperator.java \
|
||||
javax/print/attribute/standard/JobName.java \
|
||||
javax/print/attribute/standard/JobOriginatingUserName.java \
|
||||
javax/print/attribute/standard/JobPriority.java \
|
||||
javax/print/attribute/standard/JobPrioritySupported.java \
|
||||
javax/print/attribute/standard/JobSheets.java \
|
||||
javax/print/attribute/standard/JobState.java \
|
||||
javax/print/attribute/standard/JobStateReason.java \
|
||||
javax/print/attribute/standard/JobStateReasons.java \
|
||||
javax/print/attribute/standard/Media.java \
|
||||
javax/print/attribute/standard/MediaSizeName.java \
|
||||
javax/print/attribute/standard/MultipleDocumentHandling.java \
|
||||
javax/print/attribute/standard/NumberOfDocuments.java \
|
||||
javax/print/attribute/standard/NumberOfInterveningJobs.java \
|
||||
javax/print/attribute/standard/NumberUp.java \
|
||||
javax/print/attribute/standard/NumberUpSupported.java \
|
||||
javax/print/attribute/standard/OrientationRequested.java \
|
||||
javax/print/attribute/standard/OutputDeviceAssigned.java \
|
||||
javax/print/attribute/standard/PDLOverrideSupported.java \
|
||||
javax/print/attribute/standard/PageRanges.java \
|
||||
javax/print/attribute/standard/PagesPerMinute.java \
|
||||
javax/print/attribute/standard/PagesPerMinuteColor.java \
|
||||
javax/print/attribute/standard/PresentationDirection.java \
|
||||
javax/print/attribute/standard/PrintQuality.java \
|
||||
javax/print/attribute/standard/PrinterInfo.java \
|
||||
javax/print/attribute/standard/PrinterIsAcceptingJobs.java \
|
||||
javax/print/attribute/standard/PrinterLocation.java \
|
||||
javax/print/attribute/standard/PrinterMakeAndModel.java \
|
||||
javax/print/attribute/standard/PrinterMessageFromOperator.java \
|
||||
javax/print/attribute/standard/PrinterMoreInfo.java \
|
||||
javax/print/attribute/standard/PrinterMoreInfoManufacturer.java \
|
||||
javax/print/attribute/standard/PrinterName.java \
|
||||
javax/print/attribute/standard/PrinterResolution.java \
|
||||
javax/print/attribute/standard/PrinterState.java \
|
||||
javax/print/attribute/standard/PrinterStateReason.java \
|
||||
javax/print/attribute/standard/PrinterStateReasons.java \
|
||||
javax/print/attribute/standard/PrinterURI.java \
|
||||
javax/print/attribute/standard/QueuedJobCount.java \
|
||||
javax/print/attribute/standard/ReferenceUriSchemesSupported.java \
|
||||
javax/print/attribute/standard/RequestingUserName.java \
|
||||
javax/print/attribute/standard/Severity.java \
|
||||
javax/print/attribute/standard/SheetCollate.java \
|
||||
|
@ -2337,7 +2309,7 @@ am__objects_6 = gnu/gcj/natCore.lo \
|
|||
gnu/gcj/runtime/natSharedLibLoader.lo \
|
||||
gnu/gcj/runtime/natStackTrace.lo \
|
||||
gnu/gcj/runtime/natStringBuffer.lo \
|
||||
gnu/gcj/runtime/natVMClassLoader.lo \
|
||||
gnu/gcj/runtime/natVMClassLoader.lo gnu/gcj/util/natDebug.lo \
|
||||
gnu/java/lang/natMainThread.lo \
|
||||
gnu/java/net/natPlainDatagramSocketImpl.lo \
|
||||
gnu/java/net/natPlainSocketImpl.lo \
|
||||
|
@ -2428,11 +2400,11 @@ am__objects_9 = java/lang/AbstractMethodError.lo \
|
|||
java/lang/UnsupportedClassVersionError.lo \
|
||||
java/lang/UnsupportedOperationException.lo \
|
||||
java/lang/VerifyError.lo java/lang/VirtualMachineError.lo \
|
||||
java/lang/VMClassLoader.lo java/lang/VMSecurityManager.lo \
|
||||
java/lang/VMThrowable.lo java/lang/Void.lo \
|
||||
java/io/BufferedInputStream.lo java/io/BufferedOutputStream.lo \
|
||||
java/io/BufferedReader.lo java/io/BufferedWriter.lo \
|
||||
java/io/ByteArrayInputStream.lo \
|
||||
java/lang/VMClassLoader.lo java/lang/VMCompiler.lo \
|
||||
java/lang/VMSecurityManager.lo java/lang/VMThrowable.lo \
|
||||
java/lang/Void.lo java/io/BufferedInputStream.lo \
|
||||
java/io/BufferedOutputStream.lo java/io/BufferedReader.lo \
|
||||
java/io/BufferedWriter.lo java/io/ByteArrayInputStream.lo \
|
||||
java/io/ByteArrayOutputStream.lo java/io/CharArrayReader.lo \
|
||||
java/io/CharArrayWriter.lo java/io/CharConversionException.lo \
|
||||
java/io/DataInput.lo java/io/DataInputStream.lo \
|
||||
|
@ -3435,65 +3407,35 @@ am__objects_13 = javax/accessibility/Accessible.lo \
|
|||
javax/print/attribute/TextSyntax.lo \
|
||||
javax/print/attribute/UnmodifiableSetException.lo \
|
||||
javax/print/attribute/URISyntax.lo \
|
||||
javax/print/attribute/standard/ColorSupported.lo \
|
||||
javax/print/attribute/standard/Compression.lo \
|
||||
javax/print/attribute/standard/Copies.lo \
|
||||
javax/print/attribute/standard/CopiesSupported.lo \
|
||||
javax/print/attribute/standard/DateTimeAtCompleted.lo \
|
||||
javax/print/attribute/standard/DateTimeAtCreation.lo \
|
||||
javax/print/attribute/standard/DateTimeAtProcessing.lo \
|
||||
javax/print/attribute/standard/DocumentName.lo \
|
||||
javax/print/attribute/standard/Fidelity.lo \
|
||||
javax/print/attribute/standard/Finishings.lo \
|
||||
javax/print/attribute/standard/JobHoldUntil.lo \
|
||||
javax/print/attribute/standard/JobImpressions.lo \
|
||||
javax/print/attribute/standard/JobImpressionsCompleted.lo \
|
||||
javax/print/attribute/standard/JobImpressionsSupported.lo \
|
||||
javax/print/attribute/standard/JobKOctets.lo \
|
||||
javax/print/attribute/standard/JobKOctetsProcessed.lo \
|
||||
javax/print/attribute/standard/JobKOctetsSupported.lo \
|
||||
javax/print/attribute/standard/JobMediaSheets.lo \
|
||||
javax/print/attribute/standard/JobMediaSheetsCompleted.lo \
|
||||
javax/print/attribute/standard/JobMediaSheetsSupported.lo \
|
||||
javax/print/attribute/standard/JobMessageFromOperator.lo \
|
||||
javax/print/attribute/standard/JobName.lo \
|
||||
javax/print/attribute/standard/JobOriginatingUserName.lo \
|
||||
javax/print/attribute/standard/JobPriority.lo \
|
||||
javax/print/attribute/standard/JobPrioritySupported.lo \
|
||||
javax/print/attribute/standard/JobSheets.lo \
|
||||
javax/print/attribute/standard/JobState.lo \
|
||||
javax/print/attribute/standard/JobStateReason.lo \
|
||||
javax/print/attribute/standard/JobStateReasons.lo \
|
||||
javax/print/attribute/standard/Media.lo \
|
||||
javax/print/attribute/standard/MediaSizeName.lo \
|
||||
javax/print/attribute/standard/MultipleDocumentHandling.lo \
|
||||
javax/print/attribute/standard/NumberOfDocuments.lo \
|
||||
javax/print/attribute/standard/NumberOfInterveningJobs.lo \
|
||||
javax/print/attribute/standard/NumberUp.lo \
|
||||
javax/print/attribute/standard/NumberUpSupported.lo \
|
||||
javax/print/attribute/standard/OrientationRequested.lo \
|
||||
javax/print/attribute/standard/OutputDeviceAssigned.lo \
|
||||
javax/print/attribute/standard/PDLOverrideSupported.lo \
|
||||
javax/print/attribute/standard/PageRanges.lo \
|
||||
javax/print/attribute/standard/PagesPerMinute.lo \
|
||||
javax/print/attribute/standard/PagesPerMinuteColor.lo \
|
||||
javax/print/attribute/standard/PresentationDirection.lo \
|
||||
javax/print/attribute/standard/PrintQuality.lo \
|
||||
javax/print/attribute/standard/PrinterInfo.lo \
|
||||
javax/print/attribute/standard/PrinterIsAcceptingJobs.lo \
|
||||
javax/print/attribute/standard/PrinterLocation.lo \
|
||||
javax/print/attribute/standard/PrinterMakeAndModel.lo \
|
||||
javax/print/attribute/standard/PrinterMessageFromOperator.lo \
|
||||
javax/print/attribute/standard/PrinterMoreInfo.lo \
|
||||
javax/print/attribute/standard/PrinterMoreInfoManufacturer.lo \
|
||||
javax/print/attribute/standard/PrinterName.lo \
|
||||
javax/print/attribute/standard/PrinterResolution.lo \
|
||||
javax/print/attribute/standard/PrinterState.lo \
|
||||
javax/print/attribute/standard/PrinterStateReason.lo \
|
||||
javax/print/attribute/standard/PrinterStateReasons.lo \
|
||||
javax/print/attribute/standard/PrinterURI.lo \
|
||||
javax/print/attribute/standard/QueuedJobCount.lo \
|
||||
javax/print/attribute/standard/ReferenceUriSchemesSupported.lo \
|
||||
javax/print/attribute/standard/RequestingUserName.lo \
|
||||
javax/print/attribute/standard/Severity.lo \
|
||||
javax/print/attribute/standard/SheetCollate.lo \
|
||||
|
@ -3585,10 +3527,11 @@ am__objects_14 = $(am__objects_9) gnu/classpath/ServiceFactory.lo \
|
|||
gnu/gcj/runtime/FinalizerThread.lo \
|
||||
gnu/gcj/runtime/JNIWeakRef.lo gnu/gcj/runtime/MethodRef.lo \
|
||||
gnu/gcj/runtime/NameFinder.lo \
|
||||
gnu/gcj/runtime/PersistentByteMap.lo \
|
||||
gnu/gcj/runtime/SharedLibHelper.lo \
|
||||
gnu/gcj/runtime/SharedLibLoader.lo \
|
||||
gnu/gcj/runtime/StackTrace.lo gnu/gcj/runtime/StringBuffer.lo \
|
||||
gnu/gcj/runtime/VMClassLoader.lo \
|
||||
gnu/gcj/runtime/VMClassLoader.lo gnu/gcj/util/Debug.lo \
|
||||
gnu/java/io/ASN1ParsingException.lo \
|
||||
gnu/java/io/Base64InputStream.lo \
|
||||
gnu/java/io/ClassLoaderObjectInputStream.lo \
|
||||
|
@ -4151,7 +4094,7 @@ am__objects_16 = java/lang/ConcreteProcess.lo \
|
|||
@USING_POSIX_THREADS_TRUE@am__objects_24 = posix-threads.lo
|
||||
@USING_WIN32_THREADS_TRUE@am__objects_25 = win32-threads.lo
|
||||
@USING_NO_THREADS_TRUE@am__objects_26 = no-threads.lo
|
||||
am_libgcj_la_OBJECTS = prims.lo jni.lo exception.lo resolve.lo \
|
||||
am_libgcj_la_OBJECTS = prims.lo jni.lo exception.lo link.lo \
|
||||
defineclass.lo interpret.lo verify.lo $(am__objects_6) \
|
||||
$(am__objects_7) $(am__objects_15) $(am__objects_16) \
|
||||
$(am__objects_17) $(am__objects_18) $(am__objects_19) \
|
||||
|
@ -4163,6 +4106,8 @@ am_libgij_la_OBJECTS = gij.lo
|
|||
libgij_la_OBJECTS = $(am_libgij_la_OBJECTS)
|
||||
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
|
||||
PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)
|
||||
am_gcj_dbtool_OBJECTS = gnu/gcj/tools/gcj_dbtool/Main.$(OBJEXT)
|
||||
gcj_dbtool_OBJECTS = $(am_gcj_dbtool_OBJECTS)
|
||||
am__gen_from_JIS_SOURCES_DIST = gnu/gcj/convert/gen-from-JIS.c \
|
||||
gnu/gcj/convert/make-trie.c
|
||||
@MAINTAINER_MODE_TRUE@@NATIVE_TRUE@am_gen_from_JIS_OBJECTS = gnu/gcj/convert/gen-from-JIS.$(OBJEXT) \
|
||||
|
@ -4206,15 +4151,16 @@ SOURCES = $(lib_gnu_awt_xlib_la_SOURCES) \
|
|||
$(lib_gnu_java_awt_peer_gtk_la_SOURCES) \
|
||||
$(lib_org_ietf_jgss_la_SOURCES) $(lib_org_w3c_dom_la_SOURCES) \
|
||||
$(lib_org_xml_sax_la_SOURCES) $(libgcj_la_SOURCES) \
|
||||
$(libgij_la_SOURCES) $(gen_from_JIS_SOURCES) $(gij_SOURCES) \
|
||||
$(grmic_SOURCES) $(grmiregistry_SOURCES) $(jv_convert_SOURCES)
|
||||
$(libgij_la_SOURCES) $(gcj_dbtool_SOURCES) \
|
||||
$(gen_from_JIS_SOURCES) $(gij_SOURCES) $(grmic_SOURCES) \
|
||||
$(grmiregistry_SOURCES) $(jv_convert_SOURCES)
|
||||
DIST_SOURCES = $(lib_gnu_awt_xlib_la_SOURCES) \
|
||||
$(am__lib_gnu_java_awt_peer_gtk_la_SOURCES_DIST) \
|
||||
$(lib_org_ietf_jgss_la_SOURCES) $(lib_org_w3c_dom_la_SOURCES) \
|
||||
$(lib_org_xml_sax_la_SOURCES) $(am__libgcj_la_SOURCES_DIST) \
|
||||
$(libgij_la_SOURCES) $(am__gen_from_JIS_SOURCES_DIST) \
|
||||
$(gij_SOURCES) $(grmic_SOURCES) $(grmiregistry_SOURCES) \
|
||||
$(jv_convert_SOURCES)
|
||||
$(libgij_la_SOURCES) $(gcj_dbtool_SOURCES) \
|
||||
$(am__gen_from_JIS_SOURCES_DIST) $(gij_SOURCES) \
|
||||
$(grmic_SOURCES) $(grmiregistry_SOURCES) $(jv_convert_SOURCES)
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
html-recursive info-recursive install-data-recursive \
|
||||
install-exec-recursive install-info-recursive \
|
||||
|
@ -4314,6 +4260,7 @@ LIBGCJTESTSPEC = @LIBGCJTESTSPEC@
|
|||
LIBGCJ_CFLAGS = @LIBGCJ_CFLAGS@
|
||||
LIBGCJ_CXXFLAGS = @LIBGCJ_CXXFLAGS@
|
||||
LIBGCJ_JAVAFLAGS = @LIBGCJ_JAVAFLAGS@
|
||||
LIBGCJ_LD_SYMBOLIC = @LIBGCJ_LD_SYMBOLIC@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBLTDL = @LIBLTDL@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
|
@ -4546,7 +4493,7 @@ libgij_la_SOURCES = gij.cc
|
|||
libgij_la_LIBADD = libgcj.la
|
||||
libgij_la_DEPENDENCIES = libgcj.la libgcj.spec
|
||||
libgcj_la_SOURCES = prims.cc jni.cc exception.cc \
|
||||
resolve.cc defineclass.cc interpret.cc verify.cc \
|
||||
link.cc defineclass.cc interpret.cc verify.cc \
|
||||
$(nat_source_files) $(math_c_source_files) $(java_source_files) \
|
||||
$(built_java_source_files) \
|
||||
$(BOEHMGC_SRC) $(NOGC_SRC) \
|
||||
|
@ -4686,7 +4633,7 @@ lib_gnu_java_awt_peer_gtk_la_GCJFLAGS = $(AM_GCJFLAGS) -fjni
|
|||
lib_gnu_java_awt_peer_gtk_la_LIBADD = $(GTK_LIBS) $(GLIB_LIBS) $(LIBART_LIBS) $(CAIRO_LIBS) $(PANGOFT2_LIBS)
|
||||
lib_gnu_java_awt_peer_gtk_la_DEPENDENCIES = $(gtk_jni_headers) libgcj-@gcc_version@.jar libgcj.la libgcj.spec
|
||||
lib_gnu_java_awt_peer_gtk_la_LDFLAGS = \
|
||||
-version-info `grep -v '^\#' $(srcdir)/libtool-version`
|
||||
-version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC)
|
||||
|
||||
lib_gnu_java_awt_peer_gtk_la_LINK = $(LIBLINK)
|
||||
lib_org_ietf_jgss_la_SOURCES = \
|
||||
|
@ -4706,7 +4653,7 @@ lib_org_ietf_jgss_la_LIBADD = -L$(here)/.libs $(jgss_propertyo_files) \
|
|||
libgcj.la
|
||||
|
||||
lib_org_ietf_jgss_la_LDFLAGS = -rpath $(toolexeclibdir) \
|
||||
-version-info `grep -v '^\#' $(srcdir)/libtool-version`
|
||||
-version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC)
|
||||
|
||||
lib_org_w3c_dom_la_SOURCES = org/w3c/dom/Attr.java \
|
||||
org/w3c/dom/CDATASection.java \
|
||||
|
@ -4736,7 +4683,7 @@ org/w3c/dom/traversal/TreeWalker.java
|
|||
|
||||
lib_org_w3c_dom_la_LIBADD = -L$(here)/.libs libgcj.la
|
||||
lib_org_w3c_dom_la_LDFLAGS = -rpath $(toolexeclibdir) \
|
||||
-version-info `grep -v '^\#' $(srcdir)/libtool-version`
|
||||
-version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC)
|
||||
|
||||
lib_org_xml_sax_la_SOURCES = org/xml/sax/ext/DeclHandler.java \
|
||||
org/xml/sax/ext/LexicalHandler.java \
|
||||
|
@ -4771,7 +4718,7 @@ org/xml/sax/XMLReader.java
|
|||
|
||||
lib_org_xml_sax_la_LIBADD = -L$(here)/.libs libgcj.la
|
||||
lib_org_xml_sax_la_LDFLAGS = -rpath $(toolexeclibdir) \
|
||||
-version-info `grep -v '^\#' $(srcdir)/libtool-version`
|
||||
-version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC)
|
||||
|
||||
lib_gnu_awt_xlib_la_SOURCES = \
|
||||
$(xlib_java_source_files) \
|
||||
|
@ -4787,7 +4734,7 @@ lib_gnu_awt_xlib_la_CPPFLAGS = \
|
|||
lib_gnu_awt_xlib_la_LDFLAGS = ../libstdc++-v3/src/libstdc++.la \
|
||||
@X_PRE_LIBS@ @X_LIBS@ -lX11 @X_EXTRA_LIBS@ \
|
||||
-rpath $(toolexeclibdir) \
|
||||
-version-info `grep -v '^\#' $(srcdir)/libtool-version`
|
||||
-version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC)
|
||||
|
||||
lib_gnu_awt_xlib_la_LINK = $(LIBLINK)
|
||||
all_java_source_files = \
|
||||
|
@ -4851,6 +4798,13 @@ jv_convert_LDFLAGS = --main=gnu.gcj.convert.Convert \
|
|||
jv_convert_LINK = $(GCJLINK)
|
||||
jv_convert_LDADD = -L$(here)/.libs libgcj.la
|
||||
jv_convert_DEPENDENCIES = libgcj.la libgcj.spec
|
||||
gcj_dbtool_SOURCES = gnu/gcj/tools/gcj_dbtool/Main.java
|
||||
gcj_dbtool_LDFLAGS = --main=gnu.gcj.tools.gcj_dbtool.Main \
|
||||
-rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
|
||||
gcj_dbtool_LINK = $(GCJLINK)
|
||||
gcj_dbtool_LDADD = -L$(here)/.libs libgcj.la
|
||||
gcj_dbtool_DEPENDENCIES = libgcj.la libgcj.spec
|
||||
gij_SOURCES =
|
||||
gij_LDFLAGS = -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
gij_LINK = $(GCJLINK)
|
||||
|
@ -6022,65 +5976,35 @@ javax/print/attribute/SupportedValuesAttribute.java \
|
|||
javax/print/attribute/TextSyntax.java \
|
||||
javax/print/attribute/UnmodifiableSetException.java \
|
||||
javax/print/attribute/URISyntax.java \
|
||||
javax/print/attribute/standard/ColorSupported.java \
|
||||
javax/print/attribute/standard/Compression.java \
|
||||
javax/print/attribute/standard/Copies.java \
|
||||
javax/print/attribute/standard/CopiesSupported.java \
|
||||
javax/print/attribute/standard/DateTimeAtCompleted.java \
|
||||
javax/print/attribute/standard/DateTimeAtCreation.java \
|
||||
javax/print/attribute/standard/DateTimeAtProcessing.java \
|
||||
javax/print/attribute/standard/DocumentName.java \
|
||||
javax/print/attribute/standard/Fidelity.java \
|
||||
javax/print/attribute/standard/Finishings.java \
|
||||
javax/print/attribute/standard/JobHoldUntil.java \
|
||||
javax/print/attribute/standard/JobImpressions.java \
|
||||
javax/print/attribute/standard/JobImpressionsCompleted.java \
|
||||
javax/print/attribute/standard/JobImpressionsSupported.java \
|
||||
javax/print/attribute/standard/JobKOctets.java \
|
||||
javax/print/attribute/standard/JobKOctetsProcessed.java \
|
||||
javax/print/attribute/standard/JobKOctetsSupported.java \
|
||||
javax/print/attribute/standard/JobMediaSheets.java \
|
||||
javax/print/attribute/standard/JobMediaSheetsCompleted.java \
|
||||
javax/print/attribute/standard/JobMediaSheetsSupported.java \
|
||||
javax/print/attribute/standard/JobMessageFromOperator.java \
|
||||
javax/print/attribute/standard/JobName.java \
|
||||
javax/print/attribute/standard/JobOriginatingUserName.java \
|
||||
javax/print/attribute/standard/JobPriority.java \
|
||||
javax/print/attribute/standard/JobPrioritySupported.java \
|
||||
javax/print/attribute/standard/JobSheets.java \
|
||||
javax/print/attribute/standard/JobState.java \
|
||||
javax/print/attribute/standard/JobStateReason.java \
|
||||
javax/print/attribute/standard/JobStateReasons.java \
|
||||
javax/print/attribute/standard/Media.java \
|
||||
javax/print/attribute/standard/MediaSizeName.java \
|
||||
javax/print/attribute/standard/MultipleDocumentHandling.java \
|
||||
javax/print/attribute/standard/NumberOfDocuments.java \
|
||||
javax/print/attribute/standard/NumberOfInterveningJobs.java \
|
||||
javax/print/attribute/standard/NumberUp.java \
|
||||
javax/print/attribute/standard/NumberUpSupported.java \
|
||||
javax/print/attribute/standard/OrientationRequested.java \
|
||||
javax/print/attribute/standard/OutputDeviceAssigned.java \
|
||||
javax/print/attribute/standard/PDLOverrideSupported.java \
|
||||
javax/print/attribute/standard/PageRanges.java \
|
||||
javax/print/attribute/standard/PagesPerMinute.java \
|
||||
javax/print/attribute/standard/PagesPerMinuteColor.java \
|
||||
javax/print/attribute/standard/PresentationDirection.java \
|
||||
javax/print/attribute/standard/PrintQuality.java \
|
||||
javax/print/attribute/standard/PrinterInfo.java \
|
||||
javax/print/attribute/standard/PrinterIsAcceptingJobs.java \
|
||||
javax/print/attribute/standard/PrinterLocation.java \
|
||||
javax/print/attribute/standard/PrinterMakeAndModel.java \
|
||||
javax/print/attribute/standard/PrinterMessageFromOperator.java \
|
||||
javax/print/attribute/standard/PrinterMoreInfo.java \
|
||||
javax/print/attribute/standard/PrinterMoreInfoManufacturer.java \
|
||||
javax/print/attribute/standard/PrinterName.java \
|
||||
javax/print/attribute/standard/PrinterResolution.java \
|
||||
javax/print/attribute/standard/PrinterState.java \
|
||||
javax/print/attribute/standard/PrinterStateReason.java \
|
||||
javax/print/attribute/standard/PrinterStateReasons.java \
|
||||
javax/print/attribute/standard/PrinterURI.java \
|
||||
javax/print/attribute/standard/QueuedJobCount.java \
|
||||
javax/print/attribute/standard/ReferenceUriSchemesSupported.java \
|
||||
javax/print/attribute/standard/RequestingUserName.java \
|
||||
javax/print/attribute/standard/Severity.java \
|
||||
javax/print/attribute/standard/SheetCollate.java \
|
||||
|
@ -6255,6 +6179,7 @@ java/lang/UnsupportedOperationException.java \
|
|||
java/lang/VerifyError.java \
|
||||
java/lang/VirtualMachineError.java \
|
||||
java/lang/VMClassLoader.java \
|
||||
java/lang/VMCompiler.java \
|
||||
java/lang/VMSecurityManager.java \
|
||||
java/lang/VMThrowable.java \
|
||||
java/lang/Void.java \
|
||||
|
@ -6437,11 +6362,13 @@ gnu/gcj/runtime/FinalizerThread.java \
|
|||
gnu/gcj/runtime/JNIWeakRef.java \
|
||||
gnu/gcj/runtime/MethodRef.java \
|
||||
gnu/gcj/runtime/NameFinder.java \
|
||||
gnu/gcj/runtime/PersistentByteMap.java \
|
||||
gnu/gcj/runtime/SharedLibHelper.java \
|
||||
gnu/gcj/runtime/SharedLibLoader.java \
|
||||
gnu/gcj/runtime/StackTrace.java \
|
||||
gnu/gcj/runtime/StringBuffer.java \
|
||||
gnu/gcj/runtime/VMClassLoader.java \
|
||||
gnu/gcj/util/Debug.java \
|
||||
gnu/java/io/ASN1ParsingException.java \
|
||||
gnu/java/io/Base64InputStream.java \
|
||||
gnu/java/io/ClassLoaderObjectInputStream.java \
|
||||
|
@ -7147,6 +7074,7 @@ gnu/gcj/runtime/natSharedLibLoader.cc \
|
|||
gnu/gcj/runtime/natStackTrace.cc \
|
||||
gnu/gcj/runtime/natStringBuffer.cc \
|
||||
gnu/gcj/runtime/natVMClassLoader.cc \
|
||||
gnu/gcj/util/natDebug.cc \
|
||||
gnu/java/lang/natMainThread.cc \
|
||||
gnu/java/net/natPlainDatagramSocketImpl.cc \
|
||||
gnu/java/net/natPlainSocketImpl.cc \
|
||||
|
@ -8042,6 +7970,14 @@ gnu/gcj/runtime/natStringBuffer.lo: gnu/gcj/runtime/$(am__dirstamp) \
|
|||
gnu/gcj/runtime/$(DEPDIR)/$(am__dirstamp)
|
||||
gnu/gcj/runtime/natVMClassLoader.lo: gnu/gcj/runtime/$(am__dirstamp) \
|
||||
gnu/gcj/runtime/$(DEPDIR)/$(am__dirstamp)
|
||||
gnu/gcj/util/$(am__dirstamp):
|
||||
@$(mkdir_p) gnu/gcj/util
|
||||
@: > gnu/gcj/util/$(am__dirstamp)
|
||||
gnu/gcj/util/$(DEPDIR)/$(am__dirstamp):
|
||||
@$(mkdir_p) gnu/gcj/util/$(DEPDIR)
|
||||
@: > gnu/gcj/util/$(DEPDIR)/$(am__dirstamp)
|
||||
gnu/gcj/util/natDebug.lo: gnu/gcj/util/$(am__dirstamp) \
|
||||
gnu/gcj/util/$(DEPDIR)/$(am__dirstamp)
|
||||
gnu/java/lang/$(am__dirstamp):
|
||||
@$(mkdir_p) gnu/java/lang
|
||||
@: > gnu/java/lang/$(am__dirstamp)
|
||||
|
@ -8456,6 +8392,8 @@ java/lang/VirtualMachineError.lo: java/lang/$(am__dirstamp) \
|
|||
java/lang/$(DEPDIR)/$(am__dirstamp)
|
||||
java/lang/VMClassLoader.lo: java/lang/$(am__dirstamp) \
|
||||
java/lang/$(DEPDIR)/$(am__dirstamp)
|
||||
java/lang/VMCompiler.lo: java/lang/$(am__dirstamp) \
|
||||
java/lang/$(DEPDIR)/$(am__dirstamp)
|
||||
java/lang/VMSecurityManager.lo: java/lang/$(am__dirstamp) \
|
||||
java/lang/$(DEPDIR)/$(am__dirstamp)
|
||||
java/lang/VMThrowable.lo: java/lang/$(am__dirstamp) \
|
||||
|
@ -8852,6 +8790,8 @@ gnu/gcj/runtime/MethodRef.lo: gnu/gcj/runtime/$(am__dirstamp) \
|
|||
gnu/gcj/runtime/$(DEPDIR)/$(am__dirstamp)
|
||||
gnu/gcj/runtime/NameFinder.lo: gnu/gcj/runtime/$(am__dirstamp) \
|
||||
gnu/gcj/runtime/$(DEPDIR)/$(am__dirstamp)
|
||||
gnu/gcj/runtime/PersistentByteMap.lo: gnu/gcj/runtime/$(am__dirstamp) \
|
||||
gnu/gcj/runtime/$(DEPDIR)/$(am__dirstamp)
|
||||
gnu/gcj/runtime/SharedLibHelper.lo: gnu/gcj/runtime/$(am__dirstamp) \
|
||||
gnu/gcj/runtime/$(DEPDIR)/$(am__dirstamp)
|
||||
gnu/gcj/runtime/SharedLibLoader.lo: gnu/gcj/runtime/$(am__dirstamp) \
|
||||
|
@ -8862,6 +8802,8 @@ gnu/gcj/runtime/StringBuffer.lo: gnu/gcj/runtime/$(am__dirstamp) \
|
|||
gnu/gcj/runtime/$(DEPDIR)/$(am__dirstamp)
|
||||
gnu/gcj/runtime/VMClassLoader.lo: gnu/gcj/runtime/$(am__dirstamp) \
|
||||
gnu/gcj/runtime/$(DEPDIR)/$(am__dirstamp)
|
||||
gnu/gcj/util/Debug.lo: gnu/gcj/util/$(am__dirstamp) \
|
||||
gnu/gcj/util/$(DEPDIR)/$(am__dirstamp)
|
||||
gnu/java/io/$(am__dirstamp):
|
||||
@$(mkdir_p) gnu/java/io
|
||||
@: > gnu/java/io/$(am__dirstamp)
|
||||
|
@ -13836,18 +13778,9 @@ javax/print/attribute/standard/$(am__dirstamp):
|
|||
javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp):
|
||||
@$(mkdir_p) javax/print/attribute/standard/$(DEPDIR)
|
||||
@: > javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp)
|
||||
javax/print/attribute/standard/ColorSupported.lo: \
|
||||
javax/print/attribute/standard/$(am__dirstamp) \
|
||||
javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp)
|
||||
javax/print/attribute/standard/Compression.lo: \
|
||||
javax/print/attribute/standard/$(am__dirstamp) \
|
||||
javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp)
|
||||
javax/print/attribute/standard/Copies.lo: \
|
||||
javax/print/attribute/standard/$(am__dirstamp) \
|
||||
javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp)
|
||||
javax/print/attribute/standard/CopiesSupported.lo: \
|
||||
javax/print/attribute/standard/$(am__dirstamp) \
|
||||
javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp)
|
||||
javax/print/attribute/standard/DateTimeAtCompleted.lo: \
|
||||
javax/print/attribute/standard/$(am__dirstamp) \
|
||||
javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp)
|
||||
|
@ -13860,12 +13793,6 @@ javax/print/attribute/standard/DateTimeAtProcessing.lo: \
|
|||
javax/print/attribute/standard/DocumentName.lo: \
|
||||
javax/print/attribute/standard/$(am__dirstamp) \
|
||||
javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp)
|
||||
javax/print/attribute/standard/Fidelity.lo: \
|
||||
javax/print/attribute/standard/$(am__dirstamp) \
|
||||
javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp)
|
||||
javax/print/attribute/standard/Finishings.lo: \
|
||||
javax/print/attribute/standard/$(am__dirstamp) \
|
||||
javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp)
|
||||
javax/print/attribute/standard/JobHoldUntil.lo: \
|
||||
javax/print/attribute/standard/$(am__dirstamp) \
|
||||
javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp)
|
||||
|
@ -13875,27 +13802,18 @@ javax/print/attribute/standard/JobImpressions.lo: \
|
|||
javax/print/attribute/standard/JobImpressionsCompleted.lo: \
|
||||
javax/print/attribute/standard/$(am__dirstamp) \
|
||||
javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp)
|
||||
javax/print/attribute/standard/JobImpressionsSupported.lo: \
|
||||
javax/print/attribute/standard/$(am__dirstamp) \
|
||||
javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp)
|
||||
javax/print/attribute/standard/JobKOctets.lo: \
|
||||
javax/print/attribute/standard/$(am__dirstamp) \
|
||||
javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp)
|
||||
javax/print/attribute/standard/JobKOctetsProcessed.lo: \
|
||||
javax/print/attribute/standard/$(am__dirstamp) \
|
||||
javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp)
|
||||
javax/print/attribute/standard/JobKOctetsSupported.lo: \
|
||||
javax/print/attribute/standard/$(am__dirstamp) \
|
||||
javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp)
|
||||
javax/print/attribute/standard/JobMediaSheets.lo: \
|
||||
javax/print/attribute/standard/$(am__dirstamp) \
|
||||
javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp)
|
||||
javax/print/attribute/standard/JobMediaSheetsCompleted.lo: \
|
||||
javax/print/attribute/standard/$(am__dirstamp) \
|
||||
javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp)
|
||||
javax/print/attribute/standard/JobMediaSheetsSupported.lo: \
|
||||
javax/print/attribute/standard/$(am__dirstamp) \
|
||||
javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp)
|
||||
javax/print/attribute/standard/JobMessageFromOperator.lo: \
|
||||
javax/print/attribute/standard/$(am__dirstamp) \
|
||||
javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp)
|
||||
|
@ -13911,27 +13829,6 @@ javax/print/attribute/standard/JobPriority.lo: \
|
|||
javax/print/attribute/standard/JobPrioritySupported.lo: \
|
||||
javax/print/attribute/standard/$(am__dirstamp) \
|
||||
javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp)
|
||||
javax/print/attribute/standard/JobSheets.lo: \
|
||||
javax/print/attribute/standard/$(am__dirstamp) \
|
||||
javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp)
|
||||
javax/print/attribute/standard/JobState.lo: \
|
||||
javax/print/attribute/standard/$(am__dirstamp) \
|
||||
javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp)
|
||||
javax/print/attribute/standard/JobStateReason.lo: \
|
||||
javax/print/attribute/standard/$(am__dirstamp) \
|
||||
javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp)
|
||||
javax/print/attribute/standard/JobStateReasons.lo: \
|
||||
javax/print/attribute/standard/$(am__dirstamp) \
|
||||
javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp)
|
||||
javax/print/attribute/standard/Media.lo: \
|
||||
javax/print/attribute/standard/$(am__dirstamp) \
|
||||
javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp)
|
||||
javax/print/attribute/standard/MediaSizeName.lo: \
|
||||
javax/print/attribute/standard/$(am__dirstamp) \
|
||||
javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp)
|
||||
javax/print/attribute/standard/MultipleDocumentHandling.lo: \
|
||||
javax/print/attribute/standard/$(am__dirstamp) \
|
||||
javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp)
|
||||
javax/print/attribute/standard/NumberOfDocuments.lo: \
|
||||
javax/print/attribute/standard/$(am__dirstamp) \
|
||||
javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp)
|
||||
|
@ -13941,39 +13838,18 @@ javax/print/attribute/standard/NumberOfInterveningJobs.lo: \
|
|||
javax/print/attribute/standard/NumberUp.lo: \
|
||||
javax/print/attribute/standard/$(am__dirstamp) \
|
||||
javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp)
|
||||
javax/print/attribute/standard/NumberUpSupported.lo: \
|
||||
javax/print/attribute/standard/$(am__dirstamp) \
|
||||
javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp)
|
||||
javax/print/attribute/standard/OrientationRequested.lo: \
|
||||
javax/print/attribute/standard/$(am__dirstamp) \
|
||||
javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp)
|
||||
javax/print/attribute/standard/OutputDeviceAssigned.lo: \
|
||||
javax/print/attribute/standard/$(am__dirstamp) \
|
||||
javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp)
|
||||
javax/print/attribute/standard/PDLOverrideSupported.lo: \
|
||||
javax/print/attribute/standard/$(am__dirstamp) \
|
||||
javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp)
|
||||
javax/print/attribute/standard/PageRanges.lo: \
|
||||
javax/print/attribute/standard/$(am__dirstamp) \
|
||||
javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp)
|
||||
javax/print/attribute/standard/PagesPerMinute.lo: \
|
||||
javax/print/attribute/standard/$(am__dirstamp) \
|
||||
javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp)
|
||||
javax/print/attribute/standard/PagesPerMinuteColor.lo: \
|
||||
javax/print/attribute/standard/$(am__dirstamp) \
|
||||
javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp)
|
||||
javax/print/attribute/standard/PresentationDirection.lo: \
|
||||
javax/print/attribute/standard/$(am__dirstamp) \
|
||||
javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp)
|
||||
javax/print/attribute/standard/PrintQuality.lo: \
|
||||
javax/print/attribute/standard/$(am__dirstamp) \
|
||||
javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp)
|
||||
javax/print/attribute/standard/PrinterInfo.lo: \
|
||||
javax/print/attribute/standard/$(am__dirstamp) \
|
||||
javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp)
|
||||
javax/print/attribute/standard/PrinterIsAcceptingJobs.lo: \
|
||||
javax/print/attribute/standard/$(am__dirstamp) \
|
||||
javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp)
|
||||
javax/print/attribute/standard/PrinterLocation.lo: \
|
||||
javax/print/attribute/standard/$(am__dirstamp) \
|
||||
javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp)
|
||||
|
@ -13983,36 +13859,12 @@ javax/print/attribute/standard/PrinterMakeAndModel.lo: \
|
|||
javax/print/attribute/standard/PrinterMessageFromOperator.lo: \
|
||||
javax/print/attribute/standard/$(am__dirstamp) \
|
||||
javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp)
|
||||
javax/print/attribute/standard/PrinterMoreInfo.lo: \
|
||||
javax/print/attribute/standard/$(am__dirstamp) \
|
||||
javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp)
|
||||
javax/print/attribute/standard/PrinterMoreInfoManufacturer.lo: \
|
||||
javax/print/attribute/standard/$(am__dirstamp) \
|
||||
javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp)
|
||||
javax/print/attribute/standard/PrinterName.lo: \
|
||||
javax/print/attribute/standard/$(am__dirstamp) \
|
||||
javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp)
|
||||
javax/print/attribute/standard/PrinterResolution.lo: \
|
||||
javax/print/attribute/standard/$(am__dirstamp) \
|
||||
javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp)
|
||||
javax/print/attribute/standard/PrinterState.lo: \
|
||||
javax/print/attribute/standard/$(am__dirstamp) \
|
||||
javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp)
|
||||
javax/print/attribute/standard/PrinterStateReason.lo: \
|
||||
javax/print/attribute/standard/$(am__dirstamp) \
|
||||
javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp)
|
||||
javax/print/attribute/standard/PrinterStateReasons.lo: \
|
||||
javax/print/attribute/standard/$(am__dirstamp) \
|
||||
javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp)
|
||||
javax/print/attribute/standard/PrinterURI.lo: \
|
||||
javax/print/attribute/standard/$(am__dirstamp) \
|
||||
javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp)
|
||||
javax/print/attribute/standard/QueuedJobCount.lo: \
|
||||
javax/print/attribute/standard/$(am__dirstamp) \
|
||||
javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp)
|
||||
javax/print/attribute/standard/ReferenceUriSchemesSupported.lo: \
|
||||
javax/print/attribute/standard/$(am__dirstamp) \
|
||||
javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp)
|
||||
javax/print/attribute/standard/RequestingUserName.lo: \
|
||||
javax/print/attribute/standard/$(am__dirstamp) \
|
||||
javax/print/attribute/standard/$(DEPDIR)/$(am__dirstamp)
|
||||
|
@ -14379,6 +14231,18 @@ clean-noinstPROGRAMS:
|
|||
echo " rm -f $$p $$f"; \
|
||||
rm -f $$p $$f ; \
|
||||
done
|
||||
gnu/gcj/tools/gcj_dbtool/$(am__dirstamp):
|
||||
@$(mkdir_p) gnu/gcj/tools/gcj_dbtool
|
||||
@: > gnu/gcj/tools/gcj_dbtool/$(am__dirstamp)
|
||||
gnu/gcj/tools/gcj_dbtool/$(DEPDIR)/$(am__dirstamp):
|
||||
@$(mkdir_p) gnu/gcj/tools/gcj_dbtool/$(DEPDIR)
|
||||
@: > gnu/gcj/tools/gcj_dbtool/$(DEPDIR)/$(am__dirstamp)
|
||||
gnu/gcj/tools/gcj_dbtool/Main.$(OBJEXT): \
|
||||
gnu/gcj/tools/gcj_dbtool/$(am__dirstamp) \
|
||||
gnu/gcj/tools/gcj_dbtool/$(DEPDIR)/$(am__dirstamp)
|
||||
gcj-dbtool$(EXEEXT): $(gcj_dbtool_OBJECTS) $(gcj_dbtool_DEPENDENCIES)
|
||||
@rm -f gcj-dbtool$(EXEEXT)
|
||||
$(gcj_dbtool_LINK) $(gcj_dbtool_LDFLAGS) $(gcj_dbtool_OBJECTS) $(gcj_dbtool_LDADD) $(LIBS)
|
||||
gnu/gcj/convert/gen-from-JIS.$(OBJEXT): \
|
||||
gnu/gcj/convert/$(am__dirstamp) \
|
||||
gnu/gcj/convert/$(DEPDIR)/$(am__dirstamp)
|
||||
|
@ -14549,6 +14413,8 @@ mostlyclean-compile:
|
|||
-rm -f gnu/gcj/runtime/MethodRef.lo
|
||||
-rm -f gnu/gcj/runtime/NameFinder.$(OBJEXT)
|
||||
-rm -f gnu/gcj/runtime/NameFinder.lo
|
||||
-rm -f gnu/gcj/runtime/PersistentByteMap.$(OBJEXT)
|
||||
-rm -f gnu/gcj/runtime/PersistentByteMap.lo
|
||||
-rm -f gnu/gcj/runtime/SharedLibHelper.$(OBJEXT)
|
||||
-rm -f gnu/gcj/runtime/SharedLibHelper.lo
|
||||
-rm -f gnu/gcj/runtime/SharedLibLoader.$(OBJEXT)
|
||||
|
@ -14571,6 +14437,11 @@ mostlyclean-compile:
|
|||
-rm -f gnu/gcj/runtime/natStringBuffer.lo
|
||||
-rm -f gnu/gcj/runtime/natVMClassLoader.$(OBJEXT)
|
||||
-rm -f gnu/gcj/runtime/natVMClassLoader.lo
|
||||
-rm -f gnu/gcj/tools/gcj_dbtool/Main.$(OBJEXT)
|
||||
-rm -f gnu/gcj/util/Debug.$(OBJEXT)
|
||||
-rm -f gnu/gcj/util/Debug.lo
|
||||
-rm -f gnu/gcj/util/natDebug.$(OBJEXT)
|
||||
-rm -f gnu/gcj/util/natDebug.lo
|
||||
-rm -f gnu/gcj/xlib/Clip.$(OBJEXT)
|
||||
-rm -f gnu/gcj/xlib/Clip.lo
|
||||
-rm -f gnu/gcj/xlib/Colormap.$(OBJEXT)
|
||||
|
@ -16531,6 +16402,8 @@ mostlyclean-compile:
|
|||
-rm -f java/lang/UnsupportedOperationException.lo
|
||||
-rm -f java/lang/VMClassLoader.$(OBJEXT)
|
||||
-rm -f java/lang/VMClassLoader.lo
|
||||
-rm -f java/lang/VMCompiler.$(OBJEXT)
|
||||
-rm -f java/lang/VMCompiler.lo
|
||||
-rm -f java/lang/VMSecurityManager.$(OBJEXT)
|
||||
-rm -f java/lang/VMSecurityManager.lo
|
||||
-rm -f java/lang/VMThrowable.$(OBJEXT)
|
||||
|
@ -18259,14 +18132,8 @@ mostlyclean-compile:
|
|||
-rm -f javax/print/attribute/URISyntax.lo
|
||||
-rm -f javax/print/attribute/UnmodifiableSetException.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/UnmodifiableSetException.lo
|
||||
-rm -f javax/print/attribute/standard/ColorSupported.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/ColorSupported.lo
|
||||
-rm -f javax/print/attribute/standard/Compression.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/Compression.lo
|
||||
-rm -f javax/print/attribute/standard/Copies.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/Copies.lo
|
||||
-rm -f javax/print/attribute/standard/CopiesSupported.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/CopiesSupported.lo
|
||||
-rm -f javax/print/attribute/standard/DateTimeAtCompleted.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/DateTimeAtCompleted.lo
|
||||
-rm -f javax/print/attribute/standard/DateTimeAtCreation.$(OBJEXT)
|
||||
|
@ -18275,30 +18142,20 @@ mostlyclean-compile:
|
|||
-rm -f javax/print/attribute/standard/DateTimeAtProcessing.lo
|
||||
-rm -f javax/print/attribute/standard/DocumentName.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/DocumentName.lo
|
||||
-rm -f javax/print/attribute/standard/Fidelity.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/Fidelity.lo
|
||||
-rm -f javax/print/attribute/standard/Finishings.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/Finishings.lo
|
||||
-rm -f javax/print/attribute/standard/JobHoldUntil.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/JobHoldUntil.lo
|
||||
-rm -f javax/print/attribute/standard/JobImpressions.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/JobImpressions.lo
|
||||
-rm -f javax/print/attribute/standard/JobImpressionsCompleted.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/JobImpressionsCompleted.lo
|
||||
-rm -f javax/print/attribute/standard/JobImpressionsSupported.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/JobImpressionsSupported.lo
|
||||
-rm -f javax/print/attribute/standard/JobKOctets.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/JobKOctets.lo
|
||||
-rm -f javax/print/attribute/standard/JobKOctetsProcessed.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/JobKOctetsProcessed.lo
|
||||
-rm -f javax/print/attribute/standard/JobKOctetsSupported.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/JobKOctetsSupported.lo
|
||||
-rm -f javax/print/attribute/standard/JobMediaSheets.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/JobMediaSheets.lo
|
||||
-rm -f javax/print/attribute/standard/JobMediaSheetsCompleted.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/JobMediaSheetsCompleted.lo
|
||||
-rm -f javax/print/attribute/standard/JobMediaSheetsSupported.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/JobMediaSheetsSupported.lo
|
||||
-rm -f javax/print/attribute/standard/JobMessageFromOperator.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/JobMessageFromOperator.lo
|
||||
-rm -f javax/print/attribute/standard/JobName.$(OBJEXT)
|
||||
|
@ -18309,74 +18166,30 @@ mostlyclean-compile:
|
|||
-rm -f javax/print/attribute/standard/JobPriority.lo
|
||||
-rm -f javax/print/attribute/standard/JobPrioritySupported.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/JobPrioritySupported.lo
|
||||
-rm -f javax/print/attribute/standard/JobSheets.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/JobSheets.lo
|
||||
-rm -f javax/print/attribute/standard/JobState.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/JobState.lo
|
||||
-rm -f javax/print/attribute/standard/JobStateReason.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/JobStateReason.lo
|
||||
-rm -f javax/print/attribute/standard/JobStateReasons.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/JobStateReasons.lo
|
||||
-rm -f javax/print/attribute/standard/Media.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/Media.lo
|
||||
-rm -f javax/print/attribute/standard/MediaSizeName.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/MediaSizeName.lo
|
||||
-rm -f javax/print/attribute/standard/MultipleDocumentHandling.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/MultipleDocumentHandling.lo
|
||||
-rm -f javax/print/attribute/standard/NumberOfDocuments.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/NumberOfDocuments.lo
|
||||
-rm -f javax/print/attribute/standard/NumberOfInterveningJobs.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/NumberOfInterveningJobs.lo
|
||||
-rm -f javax/print/attribute/standard/NumberUp.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/NumberUp.lo
|
||||
-rm -f javax/print/attribute/standard/NumberUpSupported.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/NumberUpSupported.lo
|
||||
-rm -f javax/print/attribute/standard/OrientationRequested.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/OrientationRequested.lo
|
||||
-rm -f javax/print/attribute/standard/OutputDeviceAssigned.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/OutputDeviceAssigned.lo
|
||||
-rm -f javax/print/attribute/standard/PDLOverrideSupported.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/PDLOverrideSupported.lo
|
||||
-rm -f javax/print/attribute/standard/PageRanges.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/PageRanges.lo
|
||||
-rm -f javax/print/attribute/standard/PagesPerMinute.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/PagesPerMinute.lo
|
||||
-rm -f javax/print/attribute/standard/PagesPerMinuteColor.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/PagesPerMinuteColor.lo
|
||||
-rm -f javax/print/attribute/standard/PresentationDirection.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/PresentationDirection.lo
|
||||
-rm -f javax/print/attribute/standard/PrintQuality.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/PrintQuality.lo
|
||||
-rm -f javax/print/attribute/standard/PrinterInfo.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/PrinterInfo.lo
|
||||
-rm -f javax/print/attribute/standard/PrinterIsAcceptingJobs.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/PrinterIsAcceptingJobs.lo
|
||||
-rm -f javax/print/attribute/standard/PrinterLocation.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/PrinterLocation.lo
|
||||
-rm -f javax/print/attribute/standard/PrinterMakeAndModel.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/PrinterMakeAndModel.lo
|
||||
-rm -f javax/print/attribute/standard/PrinterMessageFromOperator.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/PrinterMessageFromOperator.lo
|
||||
-rm -f javax/print/attribute/standard/PrinterMoreInfo.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/PrinterMoreInfo.lo
|
||||
-rm -f javax/print/attribute/standard/PrinterMoreInfoManufacturer.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/PrinterMoreInfoManufacturer.lo
|
||||
-rm -f javax/print/attribute/standard/PrinterName.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/PrinterName.lo
|
||||
-rm -f javax/print/attribute/standard/PrinterResolution.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/PrinterResolution.lo
|
||||
-rm -f javax/print/attribute/standard/PrinterState.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/PrinterState.lo
|
||||
-rm -f javax/print/attribute/standard/PrinterStateReason.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/PrinterStateReason.lo
|
||||
-rm -f javax/print/attribute/standard/PrinterStateReasons.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/PrinterStateReasons.lo
|
||||
-rm -f javax/print/attribute/standard/PrinterURI.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/PrinterURI.lo
|
||||
-rm -f javax/print/attribute/standard/QueuedJobCount.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/QueuedJobCount.lo
|
||||
-rm -f javax/print/attribute/standard/ReferenceUriSchemesSupported.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/ReferenceUriSchemesSupported.lo
|
||||
-rm -f javax/print/attribute/standard/RequestingUserName.$(OBJEXT)
|
||||
-rm -f javax/print/attribute/standard/RequestingUserName.lo
|
||||
-rm -f javax/print/attribute/standard/Severity.$(OBJEXT)
|
||||
|
@ -19490,12 +19303,12 @@ distclean-compile:
|
|||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gij.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/interpret.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jni.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/link.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/no-threads.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nogc.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/posix-threads.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/posix.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prims.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resolve.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/verify.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/win32-threads.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/win32.Plo@am__quote@
|
||||
|
@ -19564,6 +19377,7 @@ distclean-compile:
|
|||
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/runtime/$(DEPDIR)/JNIWeakRef.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/runtime/$(DEPDIR)/MethodRef.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/runtime/$(DEPDIR)/NameFinder.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/runtime/$(DEPDIR)/PersistentByteMap.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/runtime/$(DEPDIR)/SharedLibHelper.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/runtime/$(DEPDIR)/SharedLibLoader.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/runtime/$(DEPDIR)/StackTrace.Plo@am__quote@
|
||||
|
@ -19575,6 +19389,9 @@ distclean-compile:
|
|||
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/runtime/$(DEPDIR)/natStackTrace.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/runtime/$(DEPDIR)/natStringBuffer.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/runtime/$(DEPDIR)/natVMClassLoader.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/tools/gcj_dbtool/$(DEPDIR)/Main.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/util/$(DEPDIR)/Debug.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/util/$(DEPDIR)/natDebug.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/xlib/$(DEPDIR)/Clip.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/xlib/$(DEPDIR)/Colormap.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/xlib/$(DEPDIR)/Display.Plo@am__quote@
|
||||
|
@ -20555,6 +20372,7 @@ distclean-compile:
|
|||
@AMDEP_TRUE@@am__include@ @am__quote@java/lang/$(DEPDIR)/UnsupportedClassVersionError.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@java/lang/$(DEPDIR)/UnsupportedOperationException.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@java/lang/$(DEPDIR)/VMClassLoader.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@java/lang/$(DEPDIR)/VMCompiler.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@java/lang/$(DEPDIR)/VMSecurityManager.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@java/lang/$(DEPDIR)/VMThrowable.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@java/lang/$(DEPDIR)/VerifyError.Plo@am__quote@
|
||||
|
@ -21419,65 +21237,35 @@ distclean-compile:
|
|||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/$(DEPDIR)/TextSyntax.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/$(DEPDIR)/URISyntax.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/$(DEPDIR)/UnmodifiableSetException.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/ColorSupported.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/Compression.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/Copies.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/CopiesSupported.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/DateTimeAtCompleted.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/DateTimeAtCreation.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/DateTimeAtProcessing.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/DocumentName.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/Fidelity.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/Finishings.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/JobHoldUntil.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/JobImpressions.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/JobImpressionsCompleted.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/JobImpressionsSupported.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/JobKOctets.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/JobKOctetsProcessed.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/JobKOctetsSupported.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/JobMediaSheets.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/JobMediaSheetsCompleted.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/JobMediaSheetsSupported.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/JobMessageFromOperator.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/JobName.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/JobOriginatingUserName.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/JobPriority.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/JobPrioritySupported.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/JobSheets.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/JobState.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/JobStateReason.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/JobStateReasons.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/Media.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/MediaSizeName.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/MultipleDocumentHandling.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/NumberOfDocuments.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/NumberOfInterveningJobs.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/NumberUp.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/NumberUpSupported.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/OrientationRequested.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/OutputDeviceAssigned.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/PDLOverrideSupported.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/PageRanges.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/PagesPerMinute.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/PagesPerMinuteColor.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/PresentationDirection.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/PrintQuality.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/PrinterInfo.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/PrinterIsAcceptingJobs.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/PrinterLocation.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/PrinterMakeAndModel.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/PrinterMessageFromOperator.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/PrinterMoreInfo.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/PrinterMoreInfoManufacturer.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/PrinterName.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/PrinterResolution.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/PrinterState.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/PrinterStateReason.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/PrinterStateReasons.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/PrinterURI.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/QueuedJobCount.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/ReferenceUriSchemesSupported.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/RequestingUserName.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/Severity.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@javax/print/attribute/standard/$(DEPDIR)/SheetCollate.Plo@am__quote@
|
||||
|
@ -22857,6 +22645,7 @@ clean-libtool:
|
|||
-rm -rf gnu/gcj/convert/.libs gnu/gcj/convert/_libs
|
||||
-rm -rf gnu/gcj/io/.libs gnu/gcj/io/_libs
|
||||
-rm -rf gnu/gcj/runtime/.libs gnu/gcj/runtime/_libs
|
||||
-rm -rf gnu/gcj/util/.libs gnu/gcj/util/_libs
|
||||
-rm -rf gnu/gcj/xlib/.libs gnu/gcj/xlib/_libs
|
||||
-rm -rf gnu/java/awt/.libs gnu/java/awt/_libs
|
||||
-rm -rf gnu/java/awt/image/.libs gnu/java/awt/image/_libs
|
||||
|
@ -23358,6 +23147,10 @@ distclean-generic:
|
|||
-rm -f gnu/gcj/io/$(am__dirstamp)
|
||||
-rm -f gnu/gcj/runtime/$(DEPDIR)/$(am__dirstamp)
|
||||
-rm -f gnu/gcj/runtime/$(am__dirstamp)
|
||||
-rm -f gnu/gcj/tools/gcj_dbtool/$(DEPDIR)/$(am__dirstamp)
|
||||
-rm -f gnu/gcj/tools/gcj_dbtool/$(am__dirstamp)
|
||||
-rm -f gnu/gcj/util/$(DEPDIR)/$(am__dirstamp)
|
||||
-rm -f gnu/gcj/util/$(am__dirstamp)
|
||||
-rm -f gnu/gcj/xlib/$(DEPDIR)/$(am__dirstamp)
|
||||
-rm -f gnu/gcj/xlib/$(am__dirstamp)
|
||||
-rm -f gnu/java/awt/$(DEPDIR)/$(am__dirstamp)
|
||||
|
@ -23646,7 +23439,7 @@ clean-am: clean-binPROGRAMS clean-generic clean-libtool clean-local \
|
|||
|
||||
distclean: distclean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf ./$(DEPDIR) gnu/awt/$(DEPDIR) gnu/awt/j2d/$(DEPDIR) gnu/awt/xlib/$(DEPDIR) gnu/classpath/$(DEPDIR) gnu/gcj/$(DEPDIR) gnu/gcj/convert/$(DEPDIR) gnu/gcj/io/$(DEPDIR) gnu/gcj/runtime/$(DEPDIR) gnu/gcj/xlib/$(DEPDIR) gnu/java/awt/$(DEPDIR) gnu/java/awt/image/$(DEPDIR) gnu/java/awt/peer/$(DEPDIR) gnu/java/awt/peer/gtk/$(DEPDIR) gnu/java/beans/$(DEPDIR) gnu/java/beans/editors/$(DEPDIR) gnu/java/beans/info/$(DEPDIR) gnu/java/io/$(DEPDIR) gnu/java/lang/$(DEPDIR) gnu/java/lang/reflect/$(DEPDIR) gnu/java/locale/$(DEPDIR) gnu/java/math/$(DEPDIR) gnu/java/net/$(DEPDIR) gnu/java/net/protocol/core/$(DEPDIR) gnu/java/net/protocol/file/$(DEPDIR) gnu/java/net/protocol/gcjlib/$(DEPDIR) gnu/java/net/protocol/http/$(DEPDIR) gnu/java/net/protocol/jar/$(DEPDIR) gnu/java/nio/$(DEPDIR) gnu/java/nio/channels/$(DEPDIR) gnu/java/nio/charset/$(DEPDIR) gnu/java/rmi/$(DEPDIR) gnu/java/rmi/dgc/$(DEPDIR) gnu/java/rmi/registry/$(DEPDIR) gnu/java/rmi/rmic/$(DEPDIR) gnu/java/rmi/server/$(DEPDIR) gnu/java/security/$(DEPDIR) gnu/java/security/action/$(DEPDIR) gnu/java/security/der/$(DEPDIR) gnu/java/security/provider/$(DEPDIR) gnu/java/security/util/$(DEPDIR) gnu/java/security/x509/$(DEPDIR) gnu/java/security/x509/ext/$(DEPDIR) gnu/java/text/$(DEPDIR) gnu/java/util/$(DEPDIR) gnu/java/util/prefs/$(DEPDIR) gnu/regexp/$(DEPDIR) java/applet/$(DEPDIR) java/awt/$(DEPDIR) java/awt/color/$(DEPDIR) java/awt/datatransfer/$(DEPDIR) java/awt/dnd/$(DEPDIR) java/awt/dnd/peer/$(DEPDIR) java/awt/event/$(DEPDIR) java/awt/font/$(DEPDIR) java/awt/geom/$(DEPDIR) java/awt/im/$(DEPDIR) java/awt/im/spi/$(DEPDIR) java/awt/image/$(DEPDIR) java/awt/image/renderable/$(DEPDIR) java/awt/peer/$(DEPDIR) java/awt/print/$(DEPDIR) java/beans/$(DEPDIR) java/beans/beancontext/$(DEPDIR) java/io/$(DEPDIR) java/lang/$(DEPDIR) java/lang/ref/$(DEPDIR) java/lang/reflect/$(DEPDIR) java/math/$(DEPDIR) java/net/$(DEPDIR) java/nio/$(DEPDIR) java/nio/channels/$(DEPDIR) java/nio/channels/spi/$(DEPDIR) java/nio/charset/$(DEPDIR) java/nio/charset/spi/$(DEPDIR) java/rmi/$(DEPDIR) java/rmi/activation/$(DEPDIR) java/rmi/dgc/$(DEPDIR) java/rmi/registry/$(DEPDIR) java/rmi/server/$(DEPDIR) java/security/$(DEPDIR) java/security/acl/$(DEPDIR) java/security/cert/$(DEPDIR) java/security/interfaces/$(DEPDIR) java/security/spec/$(DEPDIR) java/sql/$(DEPDIR) java/text/$(DEPDIR) java/util/$(DEPDIR) java/util/jar/$(DEPDIR) java/util/logging/$(DEPDIR) java/util/prefs/$(DEPDIR) java/util/regex/$(DEPDIR) java/util/zip/$(DEPDIR) javax/accessibility/$(DEPDIR) javax/crypto/$(DEPDIR) javax/crypto/interfaces/$(DEPDIR) javax/crypto/spec/$(DEPDIR) javax/imageio/$(DEPDIR) javax/imageio/event/$(DEPDIR) javax/imageio/metadata/$(DEPDIR) javax/imageio/spi/$(DEPDIR) javax/imageio/stream/$(DEPDIR) javax/naming/$(DEPDIR) javax/naming/directory/$(DEPDIR) javax/naming/event/$(DEPDIR) javax/naming/ldap/$(DEPDIR) javax/naming/spi/$(DEPDIR) javax/net/$(DEPDIR) javax/net/ssl/$(DEPDIR) javax/print/$(DEPDIR) javax/print/attribute/$(DEPDIR) javax/print/attribute/standard/$(DEPDIR) javax/print/event/$(DEPDIR) javax/security/auth/$(DEPDIR) javax/security/auth/callback/$(DEPDIR) javax/security/auth/login/$(DEPDIR) javax/security/auth/spi/$(DEPDIR) javax/security/auth/x500/$(DEPDIR) javax/security/cert/$(DEPDIR) javax/security/sasl/$(DEPDIR) javax/sql/$(DEPDIR) javax/swing/$(DEPDIR) javax/swing/border/$(DEPDIR) javax/swing/colorchooser/$(DEPDIR) javax/swing/event/$(DEPDIR) javax/swing/filechooser/$(DEPDIR) javax/swing/plaf/$(DEPDIR) javax/swing/plaf/basic/$(DEPDIR) javax/swing/plaf/metal/$(DEPDIR) javax/swing/table/$(DEPDIR) javax/swing/text/$(DEPDIR) javax/swing/text/html/$(DEPDIR) javax/swing/text/html/parser/$(DEPDIR) javax/swing/tree/$(DEPDIR) javax/swing/undo/$(DEPDIR) javax/transaction/$(DEPDIR) javax/transaction/xa/$(DEPDIR) jni/classpath/$(DEPDIR) jni/gtk-peer/$(DEPDIR) org/ietf/jgss/$(DEPDIR) org/w3c/dom/$(DEPDIR) org/w3c/dom/ranges/$(DEPDIR) org/w3c/dom/traversal/$(DEPDIR) org/xml/sax/$(DEPDIR) org/xml/sax/ext/$(DEPDIR) org/xml/sax/helpers/$(DEPDIR) sysdep/$(DEPDIR)
|
||||
-rm -rf ./$(DEPDIR) gnu/awt/$(DEPDIR) gnu/awt/j2d/$(DEPDIR) gnu/awt/xlib/$(DEPDIR) gnu/classpath/$(DEPDIR) gnu/gcj/$(DEPDIR) gnu/gcj/convert/$(DEPDIR) gnu/gcj/io/$(DEPDIR) gnu/gcj/runtime/$(DEPDIR) gnu/gcj/tools/gcj_dbtool/$(DEPDIR) gnu/gcj/util/$(DEPDIR) gnu/gcj/xlib/$(DEPDIR) gnu/java/awt/$(DEPDIR) gnu/java/awt/image/$(DEPDIR) gnu/java/awt/peer/$(DEPDIR) gnu/java/awt/peer/gtk/$(DEPDIR) gnu/java/beans/$(DEPDIR) gnu/java/beans/editors/$(DEPDIR) gnu/java/beans/info/$(DEPDIR) gnu/java/io/$(DEPDIR) gnu/java/lang/$(DEPDIR) gnu/java/lang/reflect/$(DEPDIR) gnu/java/locale/$(DEPDIR) gnu/java/math/$(DEPDIR) gnu/java/net/$(DEPDIR) gnu/java/net/protocol/core/$(DEPDIR) gnu/java/net/protocol/file/$(DEPDIR) gnu/java/net/protocol/gcjlib/$(DEPDIR) gnu/java/net/protocol/http/$(DEPDIR) gnu/java/net/protocol/jar/$(DEPDIR) gnu/java/nio/$(DEPDIR) gnu/java/nio/channels/$(DEPDIR) gnu/java/nio/charset/$(DEPDIR) gnu/java/rmi/$(DEPDIR) gnu/java/rmi/dgc/$(DEPDIR) gnu/java/rmi/registry/$(DEPDIR) gnu/java/rmi/rmic/$(DEPDIR) gnu/java/rmi/server/$(DEPDIR) gnu/java/security/$(DEPDIR) gnu/java/security/action/$(DEPDIR) gnu/java/security/der/$(DEPDIR) gnu/java/security/provider/$(DEPDIR) gnu/java/security/util/$(DEPDIR) gnu/java/security/x509/$(DEPDIR) gnu/java/security/x509/ext/$(DEPDIR) gnu/java/text/$(DEPDIR) gnu/java/util/$(DEPDIR) gnu/java/util/prefs/$(DEPDIR) gnu/regexp/$(DEPDIR) java/applet/$(DEPDIR) java/awt/$(DEPDIR) java/awt/color/$(DEPDIR) java/awt/datatransfer/$(DEPDIR) java/awt/dnd/$(DEPDIR) java/awt/dnd/peer/$(DEPDIR) java/awt/event/$(DEPDIR) java/awt/font/$(DEPDIR) java/awt/geom/$(DEPDIR) java/awt/im/$(DEPDIR) java/awt/im/spi/$(DEPDIR) java/awt/image/$(DEPDIR) java/awt/image/renderable/$(DEPDIR) java/awt/peer/$(DEPDIR) java/awt/print/$(DEPDIR) java/beans/$(DEPDIR) java/beans/beancontext/$(DEPDIR) java/io/$(DEPDIR) java/lang/$(DEPDIR) java/lang/ref/$(DEPDIR) java/lang/reflect/$(DEPDIR) java/math/$(DEPDIR) java/net/$(DEPDIR) java/nio/$(DEPDIR) java/nio/channels/$(DEPDIR) java/nio/channels/spi/$(DEPDIR) java/nio/charset/$(DEPDIR) java/nio/charset/spi/$(DEPDIR) java/rmi/$(DEPDIR) java/rmi/activation/$(DEPDIR) java/rmi/dgc/$(DEPDIR) java/rmi/registry/$(DEPDIR) java/rmi/server/$(DEPDIR) java/security/$(DEPDIR) java/security/acl/$(DEPDIR) java/security/cert/$(DEPDIR) java/security/interfaces/$(DEPDIR) java/security/spec/$(DEPDIR) java/sql/$(DEPDIR) java/text/$(DEPDIR) java/util/$(DEPDIR) java/util/jar/$(DEPDIR) java/util/logging/$(DEPDIR) java/util/prefs/$(DEPDIR) java/util/regex/$(DEPDIR) java/util/zip/$(DEPDIR) javax/accessibility/$(DEPDIR) javax/crypto/$(DEPDIR) javax/crypto/interfaces/$(DEPDIR) javax/crypto/spec/$(DEPDIR) javax/imageio/$(DEPDIR) javax/imageio/event/$(DEPDIR) javax/imageio/metadata/$(DEPDIR) javax/imageio/spi/$(DEPDIR) javax/imageio/stream/$(DEPDIR) javax/naming/$(DEPDIR) javax/naming/directory/$(DEPDIR) javax/naming/event/$(DEPDIR) javax/naming/ldap/$(DEPDIR) javax/naming/spi/$(DEPDIR) javax/net/$(DEPDIR) javax/net/ssl/$(DEPDIR) javax/print/$(DEPDIR) javax/print/attribute/$(DEPDIR) javax/print/attribute/standard/$(DEPDIR) javax/print/event/$(DEPDIR) javax/security/auth/$(DEPDIR) javax/security/auth/callback/$(DEPDIR) javax/security/auth/login/$(DEPDIR) javax/security/auth/spi/$(DEPDIR) javax/security/auth/x500/$(DEPDIR) javax/security/cert/$(DEPDIR) javax/security/sasl/$(DEPDIR) javax/sql/$(DEPDIR) javax/swing/$(DEPDIR) javax/swing/border/$(DEPDIR) javax/swing/colorchooser/$(DEPDIR) javax/swing/event/$(DEPDIR) javax/swing/filechooser/$(DEPDIR) javax/swing/plaf/$(DEPDIR) javax/swing/plaf/basic/$(DEPDIR) javax/swing/plaf/metal/$(DEPDIR) javax/swing/table/$(DEPDIR) javax/swing/text/$(DEPDIR) javax/swing/text/html/$(DEPDIR) javax/swing/text/html/parser/$(DEPDIR) javax/swing/tree/$(DEPDIR) javax/swing/undo/$(DEPDIR) javax/transaction/$(DEPDIR) javax/transaction/xa/$(DEPDIR) jni/classpath/$(DEPDIR) jni/gtk-peer/$(DEPDIR) org/ietf/jgss/$(DEPDIR) org/w3c/dom/$(DEPDIR) org/w3c/dom/ranges/$(DEPDIR) org/w3c/dom/traversal/$(DEPDIR) org/xml/sax/$(DEPDIR) org/xml/sax/ext/$(DEPDIR) org/xml/sax/helpers/$(DEPDIR) sysdep/$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-local distclean-tags
|
||||
|
@ -23676,7 +23469,7 @@ installcheck-am:
|
|||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf $(top_srcdir)/autom4te.cache
|
||||
-rm -rf ./$(DEPDIR) gnu/awt/$(DEPDIR) gnu/awt/j2d/$(DEPDIR) gnu/awt/xlib/$(DEPDIR) gnu/classpath/$(DEPDIR) gnu/gcj/$(DEPDIR) gnu/gcj/convert/$(DEPDIR) gnu/gcj/io/$(DEPDIR) gnu/gcj/runtime/$(DEPDIR) gnu/gcj/xlib/$(DEPDIR) gnu/java/awt/$(DEPDIR) gnu/java/awt/image/$(DEPDIR) gnu/java/awt/peer/$(DEPDIR) gnu/java/awt/peer/gtk/$(DEPDIR) gnu/java/beans/$(DEPDIR) gnu/java/beans/editors/$(DEPDIR) gnu/java/beans/info/$(DEPDIR) gnu/java/io/$(DEPDIR) gnu/java/lang/$(DEPDIR) gnu/java/lang/reflect/$(DEPDIR) gnu/java/locale/$(DEPDIR) gnu/java/math/$(DEPDIR) gnu/java/net/$(DEPDIR) gnu/java/net/protocol/core/$(DEPDIR) gnu/java/net/protocol/file/$(DEPDIR) gnu/java/net/protocol/gcjlib/$(DEPDIR) gnu/java/net/protocol/http/$(DEPDIR) gnu/java/net/protocol/jar/$(DEPDIR) gnu/java/nio/$(DEPDIR) gnu/java/nio/channels/$(DEPDIR) gnu/java/nio/charset/$(DEPDIR) gnu/java/rmi/$(DEPDIR) gnu/java/rmi/dgc/$(DEPDIR) gnu/java/rmi/registry/$(DEPDIR) gnu/java/rmi/rmic/$(DEPDIR) gnu/java/rmi/server/$(DEPDIR) gnu/java/security/$(DEPDIR) gnu/java/security/action/$(DEPDIR) gnu/java/security/der/$(DEPDIR) gnu/java/security/provider/$(DEPDIR) gnu/java/security/util/$(DEPDIR) gnu/java/security/x509/$(DEPDIR) gnu/java/security/x509/ext/$(DEPDIR) gnu/java/text/$(DEPDIR) gnu/java/util/$(DEPDIR) gnu/java/util/prefs/$(DEPDIR) gnu/regexp/$(DEPDIR) java/applet/$(DEPDIR) java/awt/$(DEPDIR) java/awt/color/$(DEPDIR) java/awt/datatransfer/$(DEPDIR) java/awt/dnd/$(DEPDIR) java/awt/dnd/peer/$(DEPDIR) java/awt/event/$(DEPDIR) java/awt/font/$(DEPDIR) java/awt/geom/$(DEPDIR) java/awt/im/$(DEPDIR) java/awt/im/spi/$(DEPDIR) java/awt/image/$(DEPDIR) java/awt/image/renderable/$(DEPDIR) java/awt/peer/$(DEPDIR) java/awt/print/$(DEPDIR) java/beans/$(DEPDIR) java/beans/beancontext/$(DEPDIR) java/io/$(DEPDIR) java/lang/$(DEPDIR) java/lang/ref/$(DEPDIR) java/lang/reflect/$(DEPDIR) java/math/$(DEPDIR) java/net/$(DEPDIR) java/nio/$(DEPDIR) java/nio/channels/$(DEPDIR) java/nio/channels/spi/$(DEPDIR) java/nio/charset/$(DEPDIR) java/nio/charset/spi/$(DEPDIR) java/rmi/$(DEPDIR) java/rmi/activation/$(DEPDIR) java/rmi/dgc/$(DEPDIR) java/rmi/registry/$(DEPDIR) java/rmi/server/$(DEPDIR) java/security/$(DEPDIR) java/security/acl/$(DEPDIR) java/security/cert/$(DEPDIR) java/security/interfaces/$(DEPDIR) java/security/spec/$(DEPDIR) java/sql/$(DEPDIR) java/text/$(DEPDIR) java/util/$(DEPDIR) java/util/jar/$(DEPDIR) java/util/logging/$(DEPDIR) java/util/prefs/$(DEPDIR) java/util/regex/$(DEPDIR) java/util/zip/$(DEPDIR) javax/accessibility/$(DEPDIR) javax/crypto/$(DEPDIR) javax/crypto/interfaces/$(DEPDIR) javax/crypto/spec/$(DEPDIR) javax/imageio/$(DEPDIR) javax/imageio/event/$(DEPDIR) javax/imageio/metadata/$(DEPDIR) javax/imageio/spi/$(DEPDIR) javax/imageio/stream/$(DEPDIR) javax/naming/$(DEPDIR) javax/naming/directory/$(DEPDIR) javax/naming/event/$(DEPDIR) javax/naming/ldap/$(DEPDIR) javax/naming/spi/$(DEPDIR) javax/net/$(DEPDIR) javax/net/ssl/$(DEPDIR) javax/print/$(DEPDIR) javax/print/attribute/$(DEPDIR) javax/print/attribute/standard/$(DEPDIR) javax/print/event/$(DEPDIR) javax/security/auth/$(DEPDIR) javax/security/auth/callback/$(DEPDIR) javax/security/auth/login/$(DEPDIR) javax/security/auth/spi/$(DEPDIR) javax/security/auth/x500/$(DEPDIR) javax/security/cert/$(DEPDIR) javax/security/sasl/$(DEPDIR) javax/sql/$(DEPDIR) javax/swing/$(DEPDIR) javax/swing/border/$(DEPDIR) javax/swing/colorchooser/$(DEPDIR) javax/swing/event/$(DEPDIR) javax/swing/filechooser/$(DEPDIR) javax/swing/plaf/$(DEPDIR) javax/swing/plaf/basic/$(DEPDIR) javax/swing/plaf/metal/$(DEPDIR) javax/swing/table/$(DEPDIR) javax/swing/text/$(DEPDIR) javax/swing/text/html/$(DEPDIR) javax/swing/text/html/parser/$(DEPDIR) javax/swing/tree/$(DEPDIR) javax/swing/undo/$(DEPDIR) javax/transaction/$(DEPDIR) javax/transaction/xa/$(DEPDIR) jni/classpath/$(DEPDIR) jni/gtk-peer/$(DEPDIR) org/ietf/jgss/$(DEPDIR) org/w3c/dom/$(DEPDIR) org/w3c/dom/ranges/$(DEPDIR) org/w3c/dom/traversal/$(DEPDIR) org/xml/sax/$(DEPDIR) org/xml/sax/ext/$(DEPDIR) org/xml/sax/helpers/$(DEPDIR) sysdep/$(DEPDIR)
|
||||
-rm -rf ./$(DEPDIR) gnu/awt/$(DEPDIR) gnu/awt/j2d/$(DEPDIR) gnu/awt/xlib/$(DEPDIR) gnu/classpath/$(DEPDIR) gnu/gcj/$(DEPDIR) gnu/gcj/convert/$(DEPDIR) gnu/gcj/io/$(DEPDIR) gnu/gcj/runtime/$(DEPDIR) gnu/gcj/tools/gcj_dbtool/$(DEPDIR) gnu/gcj/util/$(DEPDIR) gnu/gcj/xlib/$(DEPDIR) gnu/java/awt/$(DEPDIR) gnu/java/awt/image/$(DEPDIR) gnu/java/awt/peer/$(DEPDIR) gnu/java/awt/peer/gtk/$(DEPDIR) gnu/java/beans/$(DEPDIR) gnu/java/beans/editors/$(DEPDIR) gnu/java/beans/info/$(DEPDIR) gnu/java/io/$(DEPDIR) gnu/java/lang/$(DEPDIR) gnu/java/lang/reflect/$(DEPDIR) gnu/java/locale/$(DEPDIR) gnu/java/math/$(DEPDIR) gnu/java/net/$(DEPDIR) gnu/java/net/protocol/core/$(DEPDIR) gnu/java/net/protocol/file/$(DEPDIR) gnu/java/net/protocol/gcjlib/$(DEPDIR) gnu/java/net/protocol/http/$(DEPDIR) gnu/java/net/protocol/jar/$(DEPDIR) gnu/java/nio/$(DEPDIR) gnu/java/nio/channels/$(DEPDIR) gnu/java/nio/charset/$(DEPDIR) gnu/java/rmi/$(DEPDIR) gnu/java/rmi/dgc/$(DEPDIR) gnu/java/rmi/registry/$(DEPDIR) gnu/java/rmi/rmic/$(DEPDIR) gnu/java/rmi/server/$(DEPDIR) gnu/java/security/$(DEPDIR) gnu/java/security/action/$(DEPDIR) gnu/java/security/der/$(DEPDIR) gnu/java/security/provider/$(DEPDIR) gnu/java/security/util/$(DEPDIR) gnu/java/security/x509/$(DEPDIR) gnu/java/security/x509/ext/$(DEPDIR) gnu/java/text/$(DEPDIR) gnu/java/util/$(DEPDIR) gnu/java/util/prefs/$(DEPDIR) gnu/regexp/$(DEPDIR) java/applet/$(DEPDIR) java/awt/$(DEPDIR) java/awt/color/$(DEPDIR) java/awt/datatransfer/$(DEPDIR) java/awt/dnd/$(DEPDIR) java/awt/dnd/peer/$(DEPDIR) java/awt/event/$(DEPDIR) java/awt/font/$(DEPDIR) java/awt/geom/$(DEPDIR) java/awt/im/$(DEPDIR) java/awt/im/spi/$(DEPDIR) java/awt/image/$(DEPDIR) java/awt/image/renderable/$(DEPDIR) java/awt/peer/$(DEPDIR) java/awt/print/$(DEPDIR) java/beans/$(DEPDIR) java/beans/beancontext/$(DEPDIR) java/io/$(DEPDIR) java/lang/$(DEPDIR) java/lang/ref/$(DEPDIR) java/lang/reflect/$(DEPDIR) java/math/$(DEPDIR) java/net/$(DEPDIR) java/nio/$(DEPDIR) java/nio/channels/$(DEPDIR) java/nio/channels/spi/$(DEPDIR) java/nio/charset/$(DEPDIR) java/nio/charset/spi/$(DEPDIR) java/rmi/$(DEPDIR) java/rmi/activation/$(DEPDIR) java/rmi/dgc/$(DEPDIR) java/rmi/registry/$(DEPDIR) java/rmi/server/$(DEPDIR) java/security/$(DEPDIR) java/security/acl/$(DEPDIR) java/security/cert/$(DEPDIR) java/security/interfaces/$(DEPDIR) java/security/spec/$(DEPDIR) java/sql/$(DEPDIR) java/text/$(DEPDIR) java/util/$(DEPDIR) java/util/jar/$(DEPDIR) java/util/logging/$(DEPDIR) java/util/prefs/$(DEPDIR) java/util/regex/$(DEPDIR) java/util/zip/$(DEPDIR) javax/accessibility/$(DEPDIR) javax/crypto/$(DEPDIR) javax/crypto/interfaces/$(DEPDIR) javax/crypto/spec/$(DEPDIR) javax/imageio/$(DEPDIR) javax/imageio/event/$(DEPDIR) javax/imageio/metadata/$(DEPDIR) javax/imageio/spi/$(DEPDIR) javax/imageio/stream/$(DEPDIR) javax/naming/$(DEPDIR) javax/naming/directory/$(DEPDIR) javax/naming/event/$(DEPDIR) javax/naming/ldap/$(DEPDIR) javax/naming/spi/$(DEPDIR) javax/net/$(DEPDIR) javax/net/ssl/$(DEPDIR) javax/print/$(DEPDIR) javax/print/attribute/$(DEPDIR) javax/print/attribute/standard/$(DEPDIR) javax/print/event/$(DEPDIR) javax/security/auth/$(DEPDIR) javax/security/auth/callback/$(DEPDIR) javax/security/auth/login/$(DEPDIR) javax/security/auth/spi/$(DEPDIR) javax/security/auth/x500/$(DEPDIR) javax/security/cert/$(DEPDIR) javax/security/sasl/$(DEPDIR) javax/sql/$(DEPDIR) javax/swing/$(DEPDIR) javax/swing/border/$(DEPDIR) javax/swing/colorchooser/$(DEPDIR) javax/swing/event/$(DEPDIR) javax/swing/filechooser/$(DEPDIR) javax/swing/plaf/$(DEPDIR) javax/swing/plaf/basic/$(DEPDIR) javax/swing/plaf/metal/$(DEPDIR) javax/swing/table/$(DEPDIR) javax/swing/text/$(DEPDIR) javax/swing/text/html/$(DEPDIR) javax/swing/text/html/parser/$(DEPDIR) javax/swing/tree/$(DEPDIR) javax/swing/undo/$(DEPDIR) javax/transaction/$(DEPDIR) javax/transaction/xa/$(DEPDIR) jni/classpath/$(DEPDIR) jni/gtk-peer/$(DEPDIR) org/ietf/jgss/$(DEPDIR) org/w3c/dom/$(DEPDIR) org/w3c/dom/ranges/$(DEPDIR) org/w3c/dom/traversal/$(DEPDIR) org/xml/sax/$(DEPDIR) org/xml/sax/ext/$(DEPDIR) org/xml/sax/helpers/$(DEPDIR) sysdep/$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
|
|
2
libjava/aclocal.m4
vendored
2
libjava/aclocal.m4
vendored
|
@ -417,7 +417,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
|
|||
# 02111-1307, USA.
|
||||
|
||||
AC_DEFUN([AM_PROG_GCJ],[
|
||||
AC_CHECK_PROGS(GCJ, [gcj gcj-3.2 gcj-3.1 gcj-3.0 gcj-2.95], gcj)
|
||||
AC_CHECK_PROGS(GCJ, gcj, gcj)
|
||||
test -z "$GCJ" && AC_MSG_ERROR([no acceptable gcj found in \$PATH])
|
||||
if test "x${GCJFLAGS-unset}" = xunset; then
|
||||
GCJFLAGS="-g -O2"
|
||||
|
|
203
libjava/boehm.cc
203
libjava/boehm.cc
|
@ -1,6 +1,7 @@
|
|||
// boehm.cc - interface between libjava and Boehm GC.
|
||||
|
||||
/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation
|
||||
/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004
|
||||
Free Software Foundation
|
||||
|
||||
This file is part of libgcj.
|
||||
|
||||
|
@ -10,6 +11,21 @@ details. */
|
|||
|
||||
#include <config.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include <jvm.h>
|
||||
#include <gcj/cni.h>
|
||||
|
||||
#include <java/lang/Class.h>
|
||||
#include <java/lang/reflect/Modifier.h>
|
||||
#include <java-interp.h>
|
||||
|
||||
// More nastiness: the GC wants to define TRUE and FALSE. We don't
|
||||
// need the Java definitions (themselves a hack), so we undefine them.
|
||||
#undef TRUE
|
||||
#undef FALSE
|
||||
|
||||
extern "C"
|
||||
{
|
||||
#include <gc_config.h>
|
||||
|
@ -27,26 +43,20 @@ extern "C"
|
|||
# define GC_REDIRECT_TO_LOCAL
|
||||
# include <gc_local_alloc.h>
|
||||
#endif
|
||||
|
||||
// From boehm's misc.c
|
||||
void GC_enable();
|
||||
void GC_disable();
|
||||
};
|
||||
|
||||
#include <stdio.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include <jvm.h>
|
||||
#include <gcj/cni.h>
|
||||
|
||||
#include <java/lang/Class.h>
|
||||
#include <java/lang/reflect/Modifier.h>
|
||||
#include <java-interp.h>
|
||||
|
||||
#define MAYBE_MARK(Obj, Top, Limit, Source, Exit) \
|
||||
Top=GC_MARK_AND_PUSH((GC_PTR)Obj, Top, Limit, (GC_PTR *)Source)
|
||||
#define MAYBE_MARK(Obj, Top, Limit, Source) \
|
||||
Top=GC_MARK_AND_PUSH((GC_PTR) Obj, Top, Limit, (GC_PTR *) Source)
|
||||
|
||||
// `kind' index used when allocating Java arrays.
|
||||
static int array_kind_x;
|
||||
|
||||
// Freelist used for Java arrays.
|
||||
static void * *array_free_list;
|
||||
static void **array_free_list;
|
||||
|
||||
|
||||
|
||||
|
@ -54,7 +64,7 @@ static void * *array_free_list;
|
|||
// object. We use `void *' arguments and return, and not what the
|
||||
// Boehm GC wants, to avoid pollution in our headers.
|
||||
void *
|
||||
_Jv_MarkObj (void *addr, void *msp, void *msl, void * env)
|
||||
_Jv_MarkObj (void *addr, void *msp, void *msl, void *env)
|
||||
{
|
||||
struct GC_ms_entry *mark_stack_ptr = (struct GC_ms_entry *)msp;
|
||||
struct GC_ms_entry *mark_stack_limit = (struct GC_ms_entry *)msl;
|
||||
|
@ -78,11 +88,11 @@ _Jv_MarkObj (void *addr, void *msp, void *msl, void * env)
|
|||
# ifndef JV_HASH_SYNCHRONIZATION
|
||||
// Every object has a sync_info pointer.
|
||||
p = (GC_PTR) obj->sync_info;
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, obj, o1label);
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, obj);
|
||||
# endif
|
||||
// Mark the object's class.
|
||||
p = (GC_PTR) klass;
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, obj, o2label);
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, obj);
|
||||
|
||||
if (__builtin_expect (klass == &java::lang::Class::class$, false))
|
||||
{
|
||||
|
@ -101,33 +111,35 @@ _Jv_MarkObj (void *addr, void *msp, void *msl, void * env)
|
|||
jclass c = (jclass) addr;
|
||||
|
||||
p = (GC_PTR) c->name;
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c, c3label);
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c);
|
||||
p = (GC_PTR) c->superclass;
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c, c4label);
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c);
|
||||
for (int i = 0; i < c->constants.size; ++i)
|
||||
{
|
||||
/* FIXME: We could make this more precise by using the tags -KKT */
|
||||
p = (GC_PTR) c->constants.data[i].p;
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c, c5label);
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c);
|
||||
}
|
||||
|
||||
#ifdef INTERPRETER
|
||||
if (_Jv_IsInterpretedClass (c))
|
||||
{
|
||||
p = (GC_PTR) c->constants.tags;
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c, c5alabel);
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c);
|
||||
p = (GC_PTR) c->constants.data;
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c, c5blabel);
|
||||
p = (GC_PTR) c->vtable;
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c, c5clabel);
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c);
|
||||
}
|
||||
#endif
|
||||
|
||||
// The vtable might be allocated even for compiled code.
|
||||
p = (GC_PTR) c->vtable;
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c);
|
||||
|
||||
// If the class is an array, then the methods field holds a
|
||||
// pointer to the element class. If the class is primitive,
|
||||
// then the methods field holds a pointer to the array class.
|
||||
p = (GC_PTR) c->methods;
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c, c6label);
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c);
|
||||
|
||||
// The vtable might have been set, but the rest of the class
|
||||
// could still be uninitialized. If this is the case, then
|
||||
|
@ -143,34 +155,35 @@ _Jv_MarkObj (void *addr, void *msp, void *msl, void * env)
|
|||
for (int i = 0; i < c->method_count; ++i)
|
||||
{
|
||||
p = (GC_PTR) c->methods[i].name;
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c,
|
||||
cm1label);
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c);
|
||||
p = (GC_PTR) c->methods[i].signature;
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c,
|
||||
cm2label);
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c);
|
||||
|
||||
// Note that we don't have to mark each individual throw
|
||||
// separately, as these are stored in the constant pool.
|
||||
p = (GC_PTR) c->methods[i].throws;
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c);
|
||||
}
|
||||
}
|
||||
|
||||
// Mark all the fields.
|
||||
p = (GC_PTR) c->fields;
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c, c8label);
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c);
|
||||
for (int i = 0; i < c->field_count; ++i)
|
||||
{
|
||||
_Jv_Field* field = &c->fields[i];
|
||||
|
||||
#ifndef COMPACT_FIELDS
|
||||
p = (GC_PTR) field->name;
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c, c8alabel);
|
||||
#endif
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c);
|
||||
p = (GC_PTR) field->type;
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c, c8blabel);
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c);
|
||||
|
||||
// For the interpreter, we also need to mark the memory
|
||||
// containing static members
|
||||
if ((field->flags & java::lang::reflect::Modifier::STATIC))
|
||||
{
|
||||
p = (GC_PTR) field->u.addr;
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c, c8clabel);
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c);
|
||||
|
||||
// also, if the static member is a reference,
|
||||
// mark also the value pointed to. We check for isResolved
|
||||
|
@ -180,69 +193,110 @@ _Jv_MarkObj (void *addr, void *msp, void *msl, void * env)
|
|||
{
|
||||
jobject val = *(jobject*) field->u.addr;
|
||||
p = (GC_PTR) val;
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit,
|
||||
c, c8elabel);
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
p = (GC_PTR) c->vtable;
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c, c9label);
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c);
|
||||
p = (GC_PTR) c->interfaces;
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c, cAlabel);
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c);
|
||||
for (int i = 0; i < c->interface_count; ++i)
|
||||
{
|
||||
p = (GC_PTR) c->interfaces[i];
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c, cClabel);
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c);
|
||||
}
|
||||
p = (GC_PTR) c->loader;
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c, cBlabel);
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c);
|
||||
|
||||
// The dispatch tables can be allocated at runtime.
|
||||
p = (GC_PTR) c->ancestors;
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c);
|
||||
if (c->idt)
|
||||
{
|
||||
p = (GC_PTR) c->idt;
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c);
|
||||
|
||||
if (c->isInterface())
|
||||
{
|
||||
p = (GC_PTR) c->idt->iface.ioffsets;
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c->idt);
|
||||
}
|
||||
else if (! c->isPrimitive())
|
||||
{
|
||||
// This field is only valid for ordinary classes.
|
||||
p = (GC_PTR) c->idt->cls.itable;
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c->idt);
|
||||
}
|
||||
}
|
||||
|
||||
p = (GC_PTR) c->arrayclass;
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c, cDlabel);
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c);
|
||||
p = (GC_PTR) c->protectionDomain;
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c, cPlabel);
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c);
|
||||
p = (GC_PTR) c->hack_signers;
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c, cSlabel);
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c);
|
||||
p = (GC_PTR) c->aux_info;
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c, cTlabel);
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c);
|
||||
|
||||
#ifdef INTERPRETER
|
||||
if (_Jv_IsInterpretedClass (c))
|
||||
if (_Jv_IsInterpretedClass (c) && c->aux_info)
|
||||
{
|
||||
_Jv_InterpClass* ic = (_Jv_InterpClass*) c->aux_info;
|
||||
|
||||
p = (GC_PTR) ic->interpreted_methods;
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, ic, cElabel);
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, ic);
|
||||
|
||||
for (int i = 0; i < c->method_count; i++)
|
||||
{
|
||||
p = (GC_PTR) ic->interpreted_methods[i];
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, ic, \
|
||||
cFlabel);
|
||||
// The interpreter installs a heap-allocated trampoline
|
||||
// here, so we'll mark it.
|
||||
p = (GC_PTR) c->methods[i].ncode;
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c);
|
||||
|
||||
// Mark the direct-threaded code.
|
||||
if ((c->methods[i].accflags
|
||||
& java::lang::reflect::Modifier::NATIVE) == 0)
|
||||
using namespace java::lang::reflect;
|
||||
|
||||
// Mark the direct-threaded code. Note a subtlety here:
|
||||
// when we add Miranda methods to a class, we don't
|
||||
// resize its interpreted_methods array. If we try to
|
||||
// reference one of these methods, we may crash.
|
||||
// However, we know these are all abstract, and we know
|
||||
// that abstract methods have nothing useful in this
|
||||
// array. So, we skip all abstract methods to avoid the
|
||||
// problem. FIXME: this is pretty obscure, it may be
|
||||
// better to add a methods to the execution engine and
|
||||
// resize the array.
|
||||
if ((c->methods[i].accflags & Modifier::ABSTRACT) != 0)
|
||||
continue;
|
||||
|
||||
p = (GC_PTR) ic->interpreted_methods[i];
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, ic);
|
||||
|
||||
if ((c->methods[i].accflags & Modifier::NATIVE) != 0)
|
||||
{
|
||||
_Jv_JNIMethod *jm
|
||||
= (_Jv_JNIMethod *) ic->interpreted_methods[i];
|
||||
if (jm)
|
||||
{
|
||||
p = (GC_PTR) jm->jni_arg_types;
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, p);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_Jv_InterpMethod *im
|
||||
= (_Jv_InterpMethod *) ic->interpreted_methods[i];
|
||||
if (im)
|
||||
{
|
||||
p = (GC_PTR) im->prepared;
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, ic, \
|
||||
cFlabel);
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, ic);
|
||||
}
|
||||
}
|
||||
|
||||
// The interpreter installs a heap-allocated trampoline
|
||||
// here, so we'll mark it.
|
||||
p = (GC_PTR) c->methods[i].ncode;
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c,
|
||||
cm3label);
|
||||
}
|
||||
|
||||
p = (GC_PTR) ic->field_initializers;
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, ic, cGlabel);
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, ic);
|
||||
|
||||
}
|
||||
#endif
|
||||
|
@ -269,8 +323,7 @@ _Jv_MarkObj (void *addr, void *msp, void *msl, void * env)
|
|||
{
|
||||
jobject val = JvGetObjectField (obj, field);
|
||||
p = (GC_PTR) val;
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit,
|
||||
obj, elabel);
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, obj);
|
||||
}
|
||||
field = field->getNextField ();
|
||||
}
|
||||
|
@ -285,7 +338,7 @@ _Jv_MarkObj (void *addr, void *msp, void *msl, void * env)
|
|||
// array (of objects). We use `void *' arguments and return, and not
|
||||
// what the Boehm GC wants, to avoid pollution in our headers.
|
||||
void *
|
||||
_Jv_MarkArray (void *addr, void *msp, void *msl, void * env)
|
||||
_Jv_MarkArray (void *addr, void *msp, void *msl, void *env)
|
||||
{
|
||||
struct GC_ms_entry *mark_stack_ptr = (struct GC_ms_entry *)msp;
|
||||
struct GC_ms_entry *mark_stack_limit = (struct GC_ms_entry *)msl;
|
||||
|
@ -306,17 +359,17 @@ _Jv_MarkArray (void *addr, void *msp, void *msl, void * env)
|
|||
# ifndef JV_HASH_SYNCHRONIZATION
|
||||
// Every object has a sync_info pointer.
|
||||
p = (GC_PTR) array->sync_info;
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, array, e1label);
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, array);
|
||||
# endif
|
||||
// Mark the object's class.
|
||||
p = (GC_PTR) klass;
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, &(dt -> clas), o2label);
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, &(dt -> clas));
|
||||
|
||||
for (int i = 0; i < JvGetArrayLength (array); ++i)
|
||||
{
|
||||
jobject obj = elements (array)[i];
|
||||
p = (GC_PTR) obj;
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, array, e2label);
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, array);
|
||||
}
|
||||
|
||||
return mark_stack_ptr;
|
||||
|
@ -364,7 +417,7 @@ _Jv_BuildGCDescr(jclass self)
|
|||
// If we find a field outside the range of our bitmap,
|
||||
// fall back to procedure marker. The bottom 2 bits are
|
||||
// reserved.
|
||||
if (off >= (unsigned)bits_per_word - 2)
|
||||
if (off >= (unsigned) bits_per_word - 2)
|
||||
return (void *) (GCJ_DEFAULT_DESCR);
|
||||
desc |= 1ULL << (bits_per_word - off - 1);
|
||||
}
|
||||
|
@ -514,10 +567,6 @@ _Jv_GCSetMaximumHeapSize (size_t size)
|
|||
GC_set_max_heap_size ((GC_word) size);
|
||||
}
|
||||
|
||||
// From boehm's misc.c
|
||||
extern "C" void GC_enable();
|
||||
extern "C" void GC_disable();
|
||||
|
||||
void
|
||||
_Jv_DisableGC (void)
|
||||
{
|
||||
|
@ -585,7 +634,7 @@ _Jv_InitGC (void)
|
|||
proc = GC_new_proc((GC_mark_proc)_Jv_MarkArray);
|
||||
array_kind_x = GC_new_kind(array_free_list, GC_MAKE_PROC (proc, 0), 0, 1);
|
||||
|
||||
/* Arrange to have the GC print Java class names in backtraces, etc. */
|
||||
// Arrange to have the GC print Java class names in backtraces, etc.
|
||||
GC_register_describe_type_fn(GC_gcj_kind, gcj_describe_type_fn);
|
||||
GC_register_describe_type_fn(GC_gcj_debug_kind, gcj_describe_type_fn);
|
||||
}
|
||||
|
@ -640,7 +689,11 @@ _Jv_GCInitializeFinalizers (void (*notifier) (void))
|
|||
void
|
||||
_Jv_GCRegisterDisappearingLink (jobject *objp)
|
||||
{
|
||||
GC_general_register_disappearing_link ((GC_PTR *) objp, (GC_PTR) *objp);
|
||||
// This test helps to ensure that we meet a precondition of
|
||||
// GC_general_register_disappearing_link, viz. "Obj must be a
|
||||
// pointer to the first word of an object we allocated."
|
||||
if (GC_base(*objp))
|
||||
GC_general_register_disappearing_link ((GC_PTR *) objp, (GC_PTR) *objp);
|
||||
}
|
||||
|
||||
jboolean
|
||||
|
|
9
libjava/configure
vendored
9
libjava/configure
vendored
|
@ -310,7 +310,7 @@ ac_includes_default="\
|
|||
# include <unistd.h>
|
||||
#endif"
|
||||
|
||||
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS libgcj_basedir build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical LN_S mkinstalldirs CC ac_ct_CC EXEEXT OBJEXT CXX ac_ct_CXX CFLAGS CXXFLAGS LDFLAGS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE AS ac_ct_AS AR ac_ct_AR RANLIB ac_ct_RANLIB MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LIBGCJ_CFLAGS LIBGCJ_CXXFLAGS LIBGCJ_JAVAFLAGS INCLTDL LIBLTDL DIRLTDL LIBTOOL CXXCPP CPPFLAGS GCJ GCJFLAGS GCJDEPMODE am__fastdepGCJ_TRUE am__fastdepGCJ_FALSE subdirs COMPPATH TESTSUBDIR_TRUE TESTSUBDIR_FALSE ONESTEP_TRUE ONESTEP_FALSE LIBGCJDEBUG INTERPRETER LIBFFI LIBFFIINCS PLATFORM_INNER_NAT_HDRS CPP EGREP USING_WIN32_PLATFORM_TRUE USING_WIN32_PLATFORM_FALSE USING_POSIX_PLATFORM_TRUE USING_POSIX_PLATFORM_FALSE USING_ECOS_PLATFORM_TRUE USING_ECOS_PLATFORM_FALSE USING_DARWIN_CRT_TRUE USING_DARWIN_CRT_FALSE SYSTEMSPEC LIBGCJTESTSPEC ZLIBSPEC ZLIBTESTSPEC X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS TOOLKIT XLIB_AWT_TRUE XLIB_AWT_FALSE GTK_AWT_TRUE GTK_AWT_FALSE GTK_CAIRO_TRUE GTK_CAIRO_FALSE PKG_CONFIG CAIRO_CFLAGS CAIRO_LIBS PANGOFT2_CFLAGS PANGOFT2_LIBS GCLIBS GCINCS GCDEPS GCSPEC JC1GCSPEC GCTESTSPEC USING_BOEHMGC_TRUE USING_BOEHMGC_FALSE USING_NOGC_TRUE USING_NOGC_FALSE THREADLIBS THREADINCS THREADDEPS THREADSPEC THREADLDFLAGS THREADCXXFLAGS USING_POSIX_THREADS_TRUE USING_POSIX_THREADS_FALSE USING_WIN32_THREADS_TRUE USING_WIN32_THREADS_FALSE USING_NO_THREADS_TRUE USING_NO_THREADS_FALSE HASH_SYNC_SPEC USING_GCC_TRUE USING_GCC_FALSE tool_include_dir gcc_version LIBICONV LTLIBICONV GTK_CFLAGS GTK_LIBS GLIB_CFLAGS GLIB_LIBS LIBART_CFLAGS LIBART_LIBS SUPPLY_BACKTRACE_TRUE SUPPLY_BACKTRACE_FALSE GCJH ZIP CLASSPATH_SEPARATOR ac_ct_GCJ ZLIBS SYS_ZLIBS ZINCS DIVIDESPEC CHECKREFSPEC EXCEPTIONSPEC IEEESPEC NATIVE_TRUE NATIVE_FALSE NEEDS_DATA_START_TRUE NEEDS_DATA_START_FALSE GCC_UNWIND_INCLUDE toolexecdir toolexecmainlibdir toolexeclibdir GCJVERSION ALLOCA PERL BACKTRACESPEC SYSDEP_SOURCES here LIBOBJS LTLIBOBJS'
|
||||
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS libgcj_basedir build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical LN_S mkinstalldirs CC ac_ct_CC EXEEXT OBJEXT CXX ac_ct_CXX CFLAGS CXXFLAGS LDFLAGS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE AS ac_ct_AS AR ac_ct_AR RANLIB ac_ct_RANLIB MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LIBGCJ_CFLAGS LIBGCJ_CXXFLAGS LIBGCJ_JAVAFLAGS LIBGCJ_LD_SYMBOLIC INCLTDL LIBLTDL DIRLTDL LIBTOOL CXXCPP CPPFLAGS GCJ GCJFLAGS GCJDEPMODE am__fastdepGCJ_TRUE am__fastdepGCJ_FALSE subdirs COMPPATH TESTSUBDIR_TRUE TESTSUBDIR_FALSE ONESTEP_TRUE ONESTEP_FALSE LIBGCJDEBUG INTERPRETER LIBFFI LIBFFIINCS PLATFORM_INNER_NAT_HDRS CPP EGREP USING_WIN32_PLATFORM_TRUE USING_WIN32_PLATFORM_FALSE USING_POSIX_PLATFORM_TRUE USING_POSIX_PLATFORM_FALSE USING_ECOS_PLATFORM_TRUE USING_ECOS_PLATFORM_FALSE USING_DARWIN_CRT_TRUE USING_DARWIN_CRT_FALSE SYSTEMSPEC LIBGCJTESTSPEC ZLIBSPEC ZLIBTESTSPEC X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS TOOLKIT XLIB_AWT_TRUE XLIB_AWT_FALSE GTK_AWT_TRUE GTK_AWT_FALSE GTK_CAIRO_TRUE GTK_CAIRO_FALSE PKG_CONFIG CAIRO_CFLAGS CAIRO_LIBS PANGOFT2_CFLAGS PANGOFT2_LIBS GCLIBS GCINCS GCDEPS GCSPEC JC1GCSPEC GCTESTSPEC USING_BOEHMGC_TRUE USING_BOEHMGC_FALSE USING_NOGC_TRUE USING_NOGC_FALSE THREADLIBS THREADINCS THREADDEPS THREADSPEC THREADLDFLAGS THREADCXXFLAGS USING_POSIX_THREADS_TRUE USING_POSIX_THREADS_FALSE USING_WIN32_THREADS_TRUE USING_WIN32_THREADS_FALSE USING_NO_THREADS_TRUE USING_NO_THREADS_FALSE HASH_SYNC_SPEC USING_GCC_TRUE USING_GCC_FALSE tool_include_dir gcc_version LIBICONV LTLIBICONV GTK_CFLAGS GTK_LIBS GLIB_CFLAGS GLIB_LIBS LIBART_CFLAGS LIBART_LIBS SUPPLY_BACKTRACE_TRUE SUPPLY_BACKTRACE_FALSE GCJH ZIP CLASSPATH_SEPARATOR ac_ct_GCJ ZLIBS SYS_ZLIBS ZINCS DIVIDESPEC CHECKREFSPEC EXCEPTIONSPEC IEEESPEC NATIVE_TRUE NATIVE_FALSE NEEDS_DATA_START_TRUE NEEDS_DATA_START_FALSE GCC_UNWIND_INCLUDE toolexecdir toolexecmainlibdir toolexeclibdir GCJVERSION ALLOCA PERL BACKTRACESPEC SYSDEP_SOURCES here LIBOBJS LTLIBOBJS'
|
||||
ac_subst_files=''
|
||||
|
||||
# Initialize some variables set by options.
|
||||
|
@ -3983,6 +3983,8 @@ libgcj_javaflags=
|
|||
LIBGCJ_CFLAGS="${libgcj_cflags}"
|
||||
LIBGCJ_CXXFLAGS="${libgcj_cxxflags}"
|
||||
LIBGCJ_JAVAFLAGS="${libgcj_javaflags}"
|
||||
LIBGCJ_LD_SYMBOLIC="${libgcj_ld_symbolic}"
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -4741,7 +4743,7 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
|
|||
case $host in
|
||||
*-*-irix6*)
|
||||
# Find out which ABI we are using.
|
||||
echo '#line 4744 "configure"' > conftest.$ac_ext
|
||||
echo '#line 4746 "configure"' > conftest.$ac_ext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
(eval $ac_compile) 2>&5
|
||||
ac_status=$?
|
||||
|
@ -5772,7 +5774,7 @@ if test "${enable_sjlj_exceptions+set}" = set; then
|
|||
:
|
||||
else
|
||||
cat > conftest.$ac_ext << EOF
|
||||
#line 5775 "configure"
|
||||
#line 5777 "configure"
|
||||
struct S { ~S(); };
|
||||
void bar();
|
||||
void foo()
|
||||
|
@ -17182,6 +17184,7 @@ s,@MAINT@,$MAINT,;t t
|
|||
s,@LIBGCJ_CFLAGS@,$LIBGCJ_CFLAGS,;t t
|
||||
s,@LIBGCJ_CXXFLAGS@,$LIBGCJ_CXXFLAGS,;t t
|
||||
s,@LIBGCJ_JAVAFLAGS@,$LIBGCJ_JAVAFLAGS,;t t
|
||||
s,@LIBGCJ_LD_SYMBOLIC@,$LIBGCJ_LD_SYMBOLIC,;t t
|
||||
s,@INCLTDL@,$INCLTDL,;t t
|
||||
s,@LIBLTDL@,$LIBLTDL,;t t
|
||||
s,@DIRLTDL@,$DIRLTDL,;t t
|
||||
|
|
|
@ -134,9 +134,11 @@ libgcj_javaflags=
|
|||
LIBGCJ_CFLAGS="${libgcj_cflags}"
|
||||
LIBGCJ_CXXFLAGS="${libgcj_cxxflags}"
|
||||
LIBGCJ_JAVAFLAGS="${libgcj_javaflags}"
|
||||
LIBGCJ_LD_SYMBOLIC="${libgcj_ld_symbolic}"
|
||||
AC_SUBST(LIBGCJ_CFLAGS)
|
||||
AC_SUBST(LIBGCJ_CXXFLAGS)
|
||||
AC_SUBST(LIBGCJ_JAVAFLAGS)
|
||||
AC_SUBST(LIBGCJ_LD_SYMBOLIC)
|
||||
|
||||
AC_CONFIG_HEADERS([include/config.h gcj/libgcj-config.h])
|
||||
|
||||
|
|
|
@ -173,6 +173,7 @@ case "${host}" in
|
|||
hppa*-linux* | \
|
||||
sh-linux* | sh[34]*-linux*)
|
||||
can_unwind_signal=yes
|
||||
libgcj_ld_symbolic='-Wl,-Bsymbolic'
|
||||
if test x$slow_pthread_self = xyes \
|
||||
&& test x$cross_compiling != xyes; then
|
||||
cat > conftest.c <<EOF
|
||||
|
@ -226,7 +227,6 @@ EOF
|
|||
mips*-*-linux* )
|
||||
sysdeps_dir=mips
|
||||
can_unwind_signal=yes
|
||||
libgcj_interpreter=yes
|
||||
libgcj_flags="${libgcj_flags} -mxgot"
|
||||
DIVIDESPEC=-fno-use-divide-subroutine
|
||||
case "${host}" in
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// defineclass.cc - defining a class from .class format.
|
||||
|
||||
/* Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation
|
||||
/* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation
|
||||
|
||||
This file is part of libgcj.
|
||||
|
||||
|
@ -26,6 +26,7 @@ details. */
|
|||
#include <stdio.h>
|
||||
#include <java-cpool.h>
|
||||
#include <gcj/cni.h>
|
||||
#include <execution.h>
|
||||
|
||||
#include <java/lang/Class.h>
|
||||
#include <java/lang/Float.h>
|
||||
|
@ -38,6 +39,7 @@ details. */
|
|||
#include <java/lang/ClassCircularityError.h>
|
||||
#include <java/lang/IncompatibleClassChangeError.h>
|
||||
#include <java/lang/reflect/Modifier.h>
|
||||
#include <java/security/ProtectionDomain.h>
|
||||
|
||||
using namespace gcj;
|
||||
|
||||
|
@ -216,7 +218,8 @@ struct _Jv_ClassReader {
|
|||
throw_class_format_error ("erroneous type descriptor");
|
||||
}
|
||||
|
||||
_Jv_ClassReader (jclass klass, jbyteArray data, jint offset, jint length)
|
||||
_Jv_ClassReader (jclass klass, jbyteArray data, jint offset, jint length,
|
||||
java::security::ProtectionDomain *pd)
|
||||
{
|
||||
if (klass == 0 || length < 0 || offset+length > data->length)
|
||||
throw_internal_error ("arguments to _Jv_DefineClass");
|
||||
|
@ -226,7 +229,10 @@ struct _Jv_ClassReader {
|
|||
len = length;
|
||||
pos = 0;
|
||||
def = klass;
|
||||
def_interp = (_Jv_InterpClass *) def->aux_info;
|
||||
def->size_in_bytes = -1;
|
||||
def->vtable_method_count = -1;
|
||||
def->engine = &_Jv_soleInterpreterEngine;
|
||||
def->protectionDomain = pd;
|
||||
}
|
||||
|
||||
/** and here goes the parser members defined out-of-line */
|
||||
|
@ -273,9 +279,10 @@ struct _Jv_ClassReader {
|
|||
};
|
||||
|
||||
void
|
||||
_Jv_DefineClass (jclass klass, jbyteArray data, jint offset, jint length)
|
||||
_Jv_DefineClass (jclass klass, jbyteArray data, jint offset, jint length,
|
||||
java::security::ProtectionDomain *pd)
|
||||
{
|
||||
_Jv_ClassReader reader (klass, data, offset, length);
|
||||
_Jv_ClassReader reader (klass, data, offset, length, pd);
|
||||
reader.parse();
|
||||
|
||||
/* that's it! */
|
||||
|
@ -311,8 +318,13 @@ _Jv_ClassReader::parse ()
|
|||
|
||||
handleClassBegin (access_flags, this_class, super_class);
|
||||
|
||||
// Allocate our aux_info here, after the name is set, to fulfill our
|
||||
// contract with the collector interface.
|
||||
def->aux_info = (void *) _Jv_AllocBytes (sizeof (_Jv_InterpClass));
|
||||
def_interp = (_Jv_InterpClass *) def->aux_info;
|
||||
|
||||
int interfaces_count = read2u ();
|
||||
|
||||
|
||||
handleInterfacesBegin (interfaces_count);
|
||||
|
||||
for (int i = 0; i < interfaces_count; i++)
|
||||
|
@ -335,12 +347,11 @@ _Jv_ClassReader::parse ()
|
|||
if (pos != len)
|
||||
throw_class_format_error ("unused data before end of file");
|
||||
|
||||
// tell everyone we're done.
|
||||
def->state = JV_STATE_LOADED;
|
||||
// Tell everyone we're done.
|
||||
def->state = JV_STATE_READ;
|
||||
if (gcj::verbose_class_flag)
|
||||
fprintf (stderr, "[Loaded (bytecode) %s]\n", def->name->chars());
|
||||
_Jv_Linker::print_class_loaded (def);
|
||||
def->notifyAll ();
|
||||
|
||||
}
|
||||
|
||||
void _Jv_ClassReader::read_constpool ()
|
||||
|
@ -517,30 +528,20 @@ void _Jv_ClassReader::read_one_method_attribute (int method_index)
|
|||
throw_class_format_error ("only one Exceptions attribute allowed per method");
|
||||
|
||||
int num_exceptions = read2u ();
|
||||
// We use malloc here because the GC won't scan the method
|
||||
// objects. FIXME this means a memory leak if we GC a class.
|
||||
// (Currently we never do.)
|
||||
_Jv_Utf8Const **exceptions =
|
||||
(_Jv_Utf8Const **) _Jv_Malloc ((num_exceptions + 1) * sizeof (_Jv_Utf8Const *));
|
||||
(_Jv_Utf8Const **) _Jv_AllocBytes ((num_exceptions + 1)
|
||||
* sizeof (_Jv_Utf8Const *));
|
||||
|
||||
int out = 0;
|
||||
_Jv_word *pool_data = def->constants.data;
|
||||
for (int i = 0; i < num_exceptions; ++i)
|
||||
{
|
||||
try
|
||||
int ndx = read2u ();
|
||||
// JLS 2nd Ed. 4.7.5 requires that the tag not be 0.
|
||||
if (ndx != 0)
|
||||
{
|
||||
int ndx = read2u ();
|
||||
// JLS 2nd Ed. 4.7.5 requires that the tag not be 0.
|
||||
if (ndx != 0)
|
||||
{
|
||||
check_tag (ndx, JV_CONSTANT_Class);
|
||||
exceptions[out++] = pool_data[ndx].utf8;
|
||||
}
|
||||
}
|
||||
catch (java::lang::Throwable *exc)
|
||||
{
|
||||
_Jv_Free (exceptions);
|
||||
throw exc;
|
||||
check_tag (ndx, JV_CONSTANT_Class);
|
||||
exceptions[out++] = pool_data[ndx].utf8;
|
||||
}
|
||||
}
|
||||
exceptions[out] = NULL;
|
||||
|
@ -854,8 +855,7 @@ _Jv_ClassReader::prepare_pool_entry (int index, unsigned char this_tag)
|
|||
|
||||
|
||||
void
|
||||
_Jv_ClassReader::handleClassBegin
|
||||
(int access_flags, int this_class, int super_class)
|
||||
_Jv_ClassReader::handleClassBegin (int access_flags, int this_class, int super_class)
|
||||
{
|
||||
using namespace java::lang::reflect;
|
||||
|
||||
|
@ -950,23 +950,25 @@ _Jv_ClassReader::handleClassBegin
|
|||
def->notifyAll ();
|
||||
}
|
||||
|
||||
///// implements the checks described in sect. 5.3.5.3
|
||||
///// Implements the checks described in sect. 5.3.5.3
|
||||
void
|
||||
_Jv_ClassReader::checkExtends (jclass sub, jclass super)
|
||||
{
|
||||
using namespace java::lang::reflect;
|
||||
|
||||
// having an interface or a final class as a superclass is no good
|
||||
_Jv_Linker::wait_for_state (super, JV_STATE_LOADING);
|
||||
|
||||
// Having an interface or a final class as a superclass is no good.
|
||||
if ((super->accflags & (Modifier::INTERFACE | Modifier::FINAL)) != 0)
|
||||
{
|
||||
throw_incompatible_class_change_error (sub->getName ());
|
||||
}
|
||||
|
||||
// if the super class is not public, we need to check some more
|
||||
// If the super class is not public, we need to check some more.
|
||||
if ((super->accflags & Modifier::PUBLIC) == 0)
|
||||
{
|
||||
// With package scope, the classes must have the same
|
||||
// class loader.
|
||||
// With package scope, the classes must have the same class
|
||||
// loader.
|
||||
if ( sub->loader != super->loader
|
||||
|| !_Jv_ClassNameSamePackage (sub->name, super->name))
|
||||
{
|
||||
|
@ -974,7 +976,7 @@ _Jv_ClassReader::checkExtends (jclass sub, jclass super)
|
|||
}
|
||||
}
|
||||
|
||||
for (; super != 0; super = super->superclass)
|
||||
for (; super != 0; super = super->getSuperclass ())
|
||||
{
|
||||
if (super == sub)
|
||||
throw_class_circularity_error (sub->getName ());
|
||||
|
@ -1072,11 +1074,7 @@ void _Jv_ClassReader::handleField (int field_no,
|
|||
_Jv_Field *field = &def->fields[field_no];
|
||||
_Jv_Utf8Const *field_name = pool_data[name].utf8;
|
||||
|
||||
#ifndef COMPACT_FIELDS
|
||||
field->name = field_name;
|
||||
#else
|
||||
field->nameIndex = name;
|
||||
#endif
|
||||
|
||||
// Ignore flags we don't know about.
|
||||
field->flags = flags & Modifier::ALL_FLAGS;
|
||||
|
@ -1234,7 +1232,7 @@ void _Jv_ClassReader::handleMethod
|
|||
// ignore unknown flags
|
||||
method->accflags = accflags & Modifier::ALL_FLAGS;
|
||||
|
||||
// intialize...
|
||||
// Initialize...
|
||||
method->ncode = 0;
|
||||
method->throws = NULL;
|
||||
|
||||
|
@ -1276,7 +1274,6 @@ void _Jv_ClassReader::handleCodeAttribute
|
|||
_Jv_InterpMethod *method =
|
||||
(_Jv_InterpMethod*) (_Jv_AllocBytes (size));
|
||||
|
||||
method->deferred = NULL;
|
||||
method->max_stack = max_stack;
|
||||
method->max_locals = max_locals;
|
||||
method->code_length = code_length;
|
||||
|
@ -1335,7 +1332,6 @@ void _Jv_ClassReader::handleMethodsEnd ()
|
|||
m->self = method;
|
||||
m->function = NULL;
|
||||
def_interp->interpreted_methods[i] = m;
|
||||
m->deferred = NULL;
|
||||
|
||||
if ((method->accflags & Modifier::STATIC))
|
||||
{
|
||||
|
@ -1626,7 +1622,7 @@ _Jv_VerifyClassName (_Jv_Utf8Const *name)
|
|||
}
|
||||
|
||||
/* Returns true, if NAME1 and NAME2 represent classes in the same
|
||||
package. */
|
||||
package. Neither NAME2 nor NAME2 may name an array type. */
|
||||
bool
|
||||
_Jv_ClassNameSamePackage (_Jv_Utf8Const *name1, _Jv_Utf8Const *name2)
|
||||
{
|
||||
|
|
|
@ -146,6 +146,7 @@ LIBGCJTESTSPEC = @LIBGCJTESTSPEC@
|
|||
LIBGCJ_CFLAGS = @LIBGCJ_CFLAGS@
|
||||
LIBGCJ_CXXFLAGS = @LIBGCJ_CXXFLAGS@
|
||||
LIBGCJ_JAVAFLAGS = @LIBGCJ_JAVAFLAGS@
|
||||
LIBGCJ_LD_SYMBOLIC = @LIBGCJ_LD_SYMBOLIC@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBLTDL = @LIBLTDL@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// field.h - Header file for fieldID instances. -*- c++ -*-
|
||||
|
||||
/* Copyright (C) 1998, 1999, 2000 Free Software Foundation
|
||||
/* Copyright (C) 1998, 1999, 2000, 2004 Free Software Foundation
|
||||
|
||||
This file is part of libgcj.
|
||||
|
||||
|
@ -21,9 +21,7 @@ details. */
|
|||
|
||||
struct _Jv_Field
|
||||
{
|
||||
#ifndef COMPACT_FIELDS
|
||||
struct _Jv_Utf8Const* name;
|
||||
#endif
|
||||
|
||||
/* The type of the field, if isResolved().
|
||||
If !isResolved(): The fields's signature as a (Utf8Const*). */
|
||||
|
@ -31,11 +29,7 @@ struct _Jv_Field
|
|||
|
||||
_Jv_ushort flags;
|
||||
|
||||
#ifdef COMPACT_FIELDS
|
||||
jshort nameIndex; /* offset in class's name table */
|
||||
#else
|
||||
_Jv_ushort bsize; /* not really needed ... */
|
||||
#endif
|
||||
|
||||
union {
|
||||
jint boffset; /* offset in bytes for instance field */
|
||||
|
@ -91,13 +85,8 @@ struct _Jv_Field
|
|||
return flags & java::lang::reflect::Modifier::ALL_FLAGS;
|
||||
}
|
||||
|
||||
#ifdef COMPACT_FIELDS
|
||||
_Jv_Utf8Const * getNameUtf8Const (jclass cls)
|
||||
{ return clas->fieldNames + nameIndex; }
|
||||
#else
|
||||
_Jv_Utf8Const * getNameUtf8Const (jclass) { return name; }
|
||||
#endif
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// javaprims.h - Main external header file for libgcj. -*- c++ -*-
|
||||
|
||||
|
||||
/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004
|
||||
Free Software Foundation
|
||||
|
||||
|
@ -84,6 +85,7 @@ extern "Java"
|
|||
class LineNumberInputStream;
|
||||
class LineNumberReader;
|
||||
class MemberComparator;
|
||||
class MyIOException;
|
||||
class NotActiveException;
|
||||
class NotSerializableException;
|
||||
class ObjectInput;
|
||||
|
@ -214,6 +216,7 @@ extern "Java"
|
|||
class UnsupportedClassVersionError;
|
||||
class UnsupportedOperationException;
|
||||
class VMClassLoader;
|
||||
class VMCompiler;
|
||||
class VMSecurityManager;
|
||||
class VMThrowable;
|
||||
class VerifyError;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation
|
||||
/* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation
|
||||
|
||||
This file is part of libgcj.
|
||||
|
||||
|
@ -35,6 +35,7 @@ help ()
|
|||
printf (" -X print help on supported -X options, then exit\n");
|
||||
printf (" --ms=NUMBER set initial heap size\n");
|
||||
printf (" --mx=NUMBER set maximum heap size\n");
|
||||
printf (" --verbose[:class] print information about class loading\n");
|
||||
printf (" --showversion print version number, then keep going\n");
|
||||
printf (" --version print version number, then exit\n");
|
||||
printf ("\nOptions can be specified with `-' or `--'.\n");
|
||||
|
@ -133,7 +134,7 @@ main (int argc, const char **argv)
|
|||
// correct behavior.
|
||||
_Jv_Jar_Class_Path = argv[++i];
|
||||
}
|
||||
else if (! strcmp (arg, "-verbose:class"))
|
||||
else if (! strcmp (arg, "-verbose") || ! strcmp (arg, "-verbose:class"))
|
||||
gcj::verbose_class_flag = true;
|
||||
else if (arg[1] == 'X')
|
||||
{
|
||||
|
|
484
libjava/gnu/gcj/runtime/PersistentByteMap.java
Normal file
484
libjava/gnu/gcj/runtime/PersistentByteMap.java
Normal file
|
@ -0,0 +1,484 @@
|
|||
/* Copyright (C) 2004 Free Software Foundation
|
||||
|
||||
This file is part of libgcj.
|
||||
|
||||
This software is copyrighted work licensed under the terms of the
|
||||
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
|
||||
details. */
|
||||
|
||||
|
||||
|
||||
/* A PersistentByteMap maps a byte array to another byte array. It
|
||||
uses a file that does not need to be serialized but may be
|
||||
memory-mapped and read in-place. So, even if there are many instances
|
||||
of gcj applications running, the can share PersistentByteMaps.
|
||||
|
||||
The idea is to make searches as fast as possible: opening a
|
||||
PersistentByteMap is cheap and search time doesn't grow with the
|
||||
number of entries in the table. On the other hand, enumerating the
|
||||
map is slow, but that is a relatively uncommon operation.
|
||||
|
||||
The main use of this class is to provide a way to map the
|
||||
MessageDigest of a class file to the location of a DSO that contains
|
||||
the compiled version of that class. It is up the the installer of an
|
||||
application to keep the DSO up to date with the jar.
|
||||
|
||||
USAGE:
|
||||
MessageDigest md = MessageDigest.getInstance("MD5");
|
||||
digest = md.digest(bytes);
|
||||
|
||||
PersistentByteMap map
|
||||
= new PersistentByteMap
|
||||
(fileName, PersistentByteMap.AccessMode.READ_ONLY);
|
||||
|
||||
byte[] soName = map.get(digest);
|
||||
if (soName)
|
||||
{
|
||||
String SharedLibraryName = new String(soName);
|
||||
|
||||
BUGS/FEATURES:
|
||||
remove() isn't written yet.
|
||||
|
||||
we can't change the capacity of a PersistentByteMap.
|
||||
|
||||
0x12345678 is a bad choice for the magic number.
|
||||
|
||||
capacity is fixed once the map has been created.
|
||||
|
||||
We use linear probing to resolve collisions. It might be
|
||||
better to use a scheme that results in fewer probes to
|
||||
determine that an item isn't found. However, even when the
|
||||
table is half full there are only on average 1.5 probes for a
|
||||
successful search and 2.5 probes for an unsuccessful one.
|
||||
|
||||
We don't use unique strings. This wastes space.
|
||||
|
||||
capacity should probably be prime, but we don't check that.
|
||||
|
||||
we don't do any locking at all: adding to a PersistentByteMap
|
||||
at runtime is possible, but it requires filesystem locks
|
||||
around get(), put(), and remove().
|
||||
*/
|
||||
|
||||
package gnu.gcj.runtime;
|
||||
|
||||
import java.io.*;
|
||||
import java.nio.*;
|
||||
import java.nio.channels.*;
|
||||
import java.util.*;
|
||||
import java.security.MessageDigest;
|
||||
|
||||
public class PersistentByteMap
|
||||
{
|
||||
private MappedByteBuffer buf;
|
||||
|
||||
static private final int MAGIC = 0;
|
||||
static private final int VERSION = 4;
|
||||
static private final int CAPACITY = 8;
|
||||
static private final int TABLE_BASE = 12;
|
||||
static private final int STRING_BASE = 16;
|
||||
static private final int STRING_SIZE = 20;
|
||||
static private final int FILE_SIZE = 24;
|
||||
static private final int ELEMENTS = 28;
|
||||
|
||||
static private final int INT_SIZE = 4;
|
||||
|
||||
static private final int TABLE_ENTRY_SIZE = 2 * INT_SIZE;
|
||||
|
||||
private int capacity; // number of entries
|
||||
private int table_base; // offset from start of file, in bytes
|
||||
private int string_base; // offset from start of file, in bytes
|
||||
private int string_size; // size of string table, in bytes
|
||||
private int file_size; // size of file, in bytes;
|
||||
private int elements; // number of elements in table
|
||||
|
||||
private long length; // the length of the underlying file
|
||||
|
||||
static private final int UNUSED_ENTRY = -1;
|
||||
|
||||
static public final int KEYS = 0;
|
||||
static public final int VALUES = 1;
|
||||
static public final int ENTRIES = 2;
|
||||
|
||||
static final public class AccessMode
|
||||
{
|
||||
private final FileChannel.MapMode mapMode;
|
||||
|
||||
static
|
||||
{
|
||||
READ_ONLY = new AccessMode(FileChannel.MapMode.READ_ONLY);
|
||||
READ_WRITE = new AccessMode(FileChannel.MapMode.READ_WRITE);
|
||||
}
|
||||
|
||||
public static final AccessMode READ_ONLY;
|
||||
public static final AccessMode READ_WRITE;
|
||||
|
||||
private AccessMode(FileChannel.MapMode mode)
|
||||
{
|
||||
this.mapMode = mode;
|
||||
}
|
||||
}
|
||||
|
||||
private PersistentByteMap()
|
||||
{
|
||||
}
|
||||
|
||||
public PersistentByteMap(String filename, AccessMode mode)
|
||||
throws IOException
|
||||
{
|
||||
this(new File(filename), mode);
|
||||
}
|
||||
|
||||
public PersistentByteMap(File f, AccessMode mode)
|
||||
throws IOException
|
||||
{
|
||||
FileChannel fc;
|
||||
|
||||
if (mode == AccessMode.READ_ONLY)
|
||||
{
|
||||
FileInputStream fis = new FileInputStream(f);
|
||||
fc = fis.getChannel();
|
||||
}
|
||||
else
|
||||
{
|
||||
RandomAccessFile fos = new RandomAccessFile(f, "rw");
|
||||
fc = fos.getChannel();
|
||||
}
|
||||
|
||||
length = fc.size();
|
||||
buf = fc.map(mode.mapMode, 0, length);
|
||||
|
||||
int magic = getWord (MAGIC);
|
||||
if (magic != 0x12345678)
|
||||
throw new IllegalArgumentException(f.getName());
|
||||
|
||||
table_base = getWord (TABLE_BASE);
|
||||
capacity = getWord (CAPACITY);
|
||||
string_base = getWord (STRING_BASE);
|
||||
string_size = getWord (STRING_SIZE);
|
||||
file_size = getWord (FILE_SIZE);
|
||||
elements = getWord (ELEMENTS);
|
||||
|
||||
// FIXME: Insert a bunch of sanity checks here
|
||||
}
|
||||
|
||||
private void init (PersistentByteMap m, File f, int capacity, int strtabSize)
|
||||
throws IOException
|
||||
{
|
||||
f.createNewFile();
|
||||
RandomAccessFile raf = new RandomAccessFile(f, "rw");
|
||||
|
||||
this.capacity = capacity;
|
||||
table_base = 64;
|
||||
string_base = table_base + capacity * TABLE_ENTRY_SIZE;
|
||||
string_size = 0;
|
||||
file_size = string_base;
|
||||
elements = 0;
|
||||
|
||||
int totalFileSize = string_base + strtabSize;
|
||||
|
||||
// Create the file; this rounds up the size of the file to a fixed
|
||||
// number of 4k pages.
|
||||
byte[] _4k = new byte[4096];
|
||||
for (long i = 0; i < totalFileSize; i+= 4096)
|
||||
raf.write(_4k);
|
||||
|
||||
FileChannel fc = raf.getChannel();
|
||||
buf = fc.map(FileChannel.MapMode.READ_WRITE, 0, raf.length());
|
||||
|
||||
for (int i = 0; i < capacity; i++)
|
||||
putKeyPos(UNUSED_ENTRY, i);
|
||||
|
||||
putWord(0x12345678, MAGIC);
|
||||
putWord(0x01, VERSION);
|
||||
putWord(capacity, CAPACITY);
|
||||
putWord(table_base, TABLE_BASE);
|
||||
putWord(string_base, STRING_BASE);
|
||||
putWord(file_size, FILE_SIZE);
|
||||
putWord(elements, ELEMENTS);
|
||||
buf.force();
|
||||
}
|
||||
|
||||
static public PersistentByteMap emptyPersistentByteMap(String filename,
|
||||
int capacity, int strtabSize)
|
||||
throws IOException
|
||||
{
|
||||
File f = new File(filename);
|
||||
PersistentByteMap m = new PersistentByteMap();
|
||||
m.init(m, f, capacity, strtabSize);
|
||||
return m;
|
||||
}
|
||||
|
||||
private int getWord (int index)
|
||||
{
|
||||
buf.position(index);
|
||||
byte[] wordBuf = new byte[4];
|
||||
buf.get(wordBuf);
|
||||
|
||||
int result = (int)wordBuf[0]&0xff;
|
||||
result += ((int)wordBuf[1]&0xff) << 8;
|
||||
result += ((int)wordBuf[2]&0xff) << 16;
|
||||
result += ((int)wordBuf[3]&0xff) << 24;
|
||||
return result;
|
||||
}
|
||||
|
||||
private void putWord (int word, int index)
|
||||
{
|
||||
buf.position(index);
|
||||
byte[] wordBuf = new byte[4];
|
||||
wordBuf[0] = (byte)(word);
|
||||
wordBuf[1] = (byte)(word >>> 8);
|
||||
wordBuf[2] = (byte)(word >>> 16);
|
||||
wordBuf[3] = (byte)(word >>> 24);
|
||||
buf.put(wordBuf);
|
||||
}
|
||||
|
||||
public Set entrySet()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
private int getBucket(int n)
|
||||
{
|
||||
return table_base + (2*n * INT_SIZE);
|
||||
}
|
||||
|
||||
private int getKeyPos(int n)
|
||||
{
|
||||
return getWord(getBucket(n));
|
||||
}
|
||||
|
||||
private int getValuePos(int n)
|
||||
{
|
||||
return getWord(getBucket(n) + INT_SIZE);
|
||||
}
|
||||
|
||||
private void putKeyPos(int index, int n)
|
||||
{
|
||||
putWord(index, getBucket(n));
|
||||
}
|
||||
|
||||
private void putValuePos(int index, int n)
|
||||
{
|
||||
putWord(index, getBucket(n) + INT_SIZE);
|
||||
}
|
||||
|
||||
private byte[] getBytes(int n)
|
||||
{
|
||||
int len = getWord (string_base + n);
|
||||
int base = string_base + n + INT_SIZE;
|
||||
byte[] key = new byte[len];
|
||||
buf.position(base);
|
||||
buf.get(key, 0, len);
|
||||
return key;
|
||||
}
|
||||
|
||||
private int hash (byte[] b)
|
||||
{
|
||||
// We assume that the message digest is evenly distributed, so we
|
||||
// only need to use a few bytes of it as the hash function.
|
||||
long hashIndex
|
||||
= ((b[0]&0xffL)
|
||||
+ ((b[1]&0xffL)<<8)
|
||||
+ ((b[2]&0xffL)<<16)
|
||||
+ ((b[3]&0xffL)<<24));
|
||||
long result = hashIndex % (long)capacity;
|
||||
return (int)result;
|
||||
}
|
||||
|
||||
public byte[] get(byte[] digest)
|
||||
{
|
||||
int hashIndex = hash(digest);
|
||||
|
||||
do
|
||||
{
|
||||
int k = getKeyPos(hashIndex);
|
||||
if (k == UNUSED_ENTRY)
|
||||
return null;
|
||||
|
||||
if (Arrays.equals ((byte[])digest, getBytes(k)))
|
||||
return getBytes(getValuePos(hashIndex));
|
||||
|
||||
// Use linear probing to resolve hash collisions. This may
|
||||
// not be theoretically as good as open addressing, but it has
|
||||
// good cache behviour.
|
||||
hashIndex++;
|
||||
hashIndex %= capacity;
|
||||
}
|
||||
while (true);
|
||||
}
|
||||
|
||||
public void put(byte[] digest, byte[] value)
|
||||
throws IllegalAccessException
|
||||
{
|
||||
int hashIndex = hash(digest);
|
||||
|
||||
// With the the table 2/3 full there will be on average 2 probes
|
||||
// for a successful search and 5 probes for an unsuccessful one.
|
||||
if (elements >= capacity * 2/3)
|
||||
throw new IllegalAccessException("Table Full: " + elements);
|
||||
|
||||
do
|
||||
{
|
||||
int k = getKeyPos(hashIndex);
|
||||
if (k == UNUSED_ENTRY)
|
||||
{
|
||||
int newKey = addBytes(digest);
|
||||
putKeyPos(newKey, hashIndex);
|
||||
int newValue = addBytes(value);
|
||||
putValuePos(newValue, hashIndex);
|
||||
elements++;
|
||||
putWord(elements, ELEMENTS);
|
||||
return;
|
||||
}
|
||||
else if (Arrays.equals (digest, getBytes(k)))
|
||||
{
|
||||
int newValue = addBytes((byte[])value);
|
||||
putValuePos(newValue, hashIndex);
|
||||
return;
|
||||
}
|
||||
|
||||
hashIndex++;
|
||||
hashIndex %= capacity;
|
||||
}
|
||||
while (true);
|
||||
}
|
||||
|
||||
private int addBytes (byte[] data)
|
||||
throws IllegalAccessException
|
||||
{
|
||||
if (data.length + INT_SIZE >= this.length)
|
||||
throw new IllegalAccessException("String table Full");
|
||||
|
||||
int extent = string_base+string_size;
|
||||
int top = extent;
|
||||
putWord(data.length, extent);
|
||||
extent += INT_SIZE;
|
||||
buf.position(extent);
|
||||
buf.put(data, 0, data.length);
|
||||
extent += data.length;
|
||||
extent += INT_SIZE-1;
|
||||
extent &= ~(INT_SIZE-1); // align
|
||||
string_size = extent - string_base;
|
||||
file_size = extent;
|
||||
putWord (string_size, STRING_SIZE);
|
||||
putWord (file_size, FILE_SIZE);
|
||||
|
||||
return top - string_base;
|
||||
}
|
||||
|
||||
public Iterator iterator(int type)
|
||||
{
|
||||
return new HashIterator(type);
|
||||
}
|
||||
|
||||
public int size()
|
||||
{
|
||||
return elements;
|
||||
}
|
||||
|
||||
public int capacity()
|
||||
{
|
||||
return capacity;
|
||||
}
|
||||
|
||||
private final class HashIterator implements Iterator
|
||||
{
|
||||
/** Current index in the physical hash table. */
|
||||
|
||||
private int idx;
|
||||
private int count;
|
||||
private final int type;
|
||||
|
||||
/**
|
||||
* Construct a new HashIterator with the supplied type.
|
||||
* @param type {@link #KEYS}, {@link #VALUES}, or {@link #ENTRIES}
|
||||
*/
|
||||
HashIterator(int type)
|
||||
{
|
||||
this.type = type;
|
||||
count = elements;
|
||||
idx = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the Iterator has more elements.
|
||||
* @return true if there are more elements
|
||||
* @throws ConcurrentModificationException if the HashMap was modified
|
||||
*/
|
||||
public boolean hasNext()
|
||||
{
|
||||
return count > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the next element in the Iterator's sequential view.
|
||||
* @return the next element
|
||||
* @throws ConcurrentModificationException if the HashMap was modified
|
||||
* @throws NoSuchElementException if there is none
|
||||
*/
|
||||
public Object next()
|
||||
{
|
||||
count--;
|
||||
for (int i = idx; i < capacity; i++)
|
||||
if (getKeyPos(i) != UNUSED_ENTRY)
|
||||
{
|
||||
idx = i+1;
|
||||
if (type == VALUES)
|
||||
return getBytes(getValuePos(i));
|
||||
if (type == KEYS)
|
||||
return getBytes(getKeyPos(i));
|
||||
return new MapEntry(i,
|
||||
getBytes(getKeyPos(i)),
|
||||
getBytes(getValuePos(i)));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove from the underlying collection the last element returned
|
||||
* by next (optional operation). This method can be called only
|
||||
* once after each call to <code>next()</code>. It does not affect
|
||||
* what will be returned by subsequent calls to next.
|
||||
*
|
||||
* @throws IllegalStateException if next has not yet been called
|
||||
* or remove has already been called since the last call
|
||||
* to next.
|
||||
* @throws UnsupportedOperationException if this Iterator does not
|
||||
* support the remove operation.
|
||||
*/
|
||||
public void remove()
|
||||
{
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
|
||||
static public final class MapEntry
|
||||
{
|
||||
private final Object key;
|
||||
private final Object value;
|
||||
private final int bucket;
|
||||
|
||||
public MapEntry(int bucket, Object newKey, Object newValue)
|
||||
{
|
||||
this.key = newKey;
|
||||
this.value = newValue;
|
||||
this.bucket = bucket;
|
||||
}
|
||||
|
||||
public final Object getKey()
|
||||
{
|
||||
return key;
|
||||
}
|
||||
|
||||
public final Object getValue()
|
||||
{
|
||||
return value;
|
||||
}
|
||||
|
||||
public final int getBucket()
|
||||
{
|
||||
return bucket;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2001, 2003 Free Software Foundation
|
||||
/* Copyright (C) 2001, 2003, 2004 Free Software Foundation
|
||||
|
||||
This file is part of libgcj.
|
||||
|
||||
|
@ -13,6 +13,12 @@ import java.net.MalformedURLException;
|
|||
import java.util.HashMap;
|
||||
import java.security.*;
|
||||
import gnu.gcj.Core;
|
||||
import java.util.Set;
|
||||
import java.util.Iterator;
|
||||
import java.util.HashSet;
|
||||
import java.util.HashMap;
|
||||
import java.nio.channels.FileChannel;
|
||||
import java.io.*;
|
||||
|
||||
public class SharedLibHelper
|
||||
{
|
||||
|
@ -36,34 +42,82 @@ public class SharedLibHelper
|
|||
{
|
||||
synchronized (map)
|
||||
{
|
||||
WeakReference ref = (WeakReference) map.get(libname);
|
||||
if (ref != null)
|
||||
return (SharedLibHelper) ref.get();
|
||||
Set s = (Set)map.get(libname);
|
||||
if (s == null)
|
||||
return null;
|
||||
for (Iterator i=s.iterator(); i.hasNext();)
|
||||
{
|
||||
WeakReference ref = (WeakReference)i.next();
|
||||
if (ref != null)
|
||||
return (SharedLibHelper) ref.get();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
static void copyFile (File in, File out) throws IOException
|
||||
{
|
||||
FileChannel source = new FileInputStream(in).getChannel();
|
||||
FileChannel destination = new FileOutputStream(out).getChannel();
|
||||
source.transferTo(0, source.size(), destination);
|
||||
source.close();
|
||||
destination.close();
|
||||
}
|
||||
|
||||
public static SharedLibHelper findHelper (ClassLoader loader, String libname,
|
||||
CodeSource source)
|
||||
{
|
||||
synchronized (map)
|
||||
{
|
||||
SharedLibHelper result;
|
||||
WeakReference ref = (WeakReference) map.get(libname);
|
||||
if (ref != null)
|
||||
Set s = (Set)map.get(libname);
|
||||
if (s == null)
|
||||
{
|
||||
result = (SharedLibHelper) ref.get();
|
||||
if (result != null)
|
||||
s = new HashSet();
|
||||
map.put(libname, s);
|
||||
}
|
||||
else
|
||||
{
|
||||
for (Iterator i=s.iterator(); i.hasNext();)
|
||||
{
|
||||
if (result.loader != loader)
|
||||
// FIXME
|
||||
throw new UnknownError();
|
||||
return result;
|
||||
WeakReference ref = (WeakReference)i.next();
|
||||
if (ref != null)
|
||||
{
|
||||
result = (SharedLibHelper) ref.get();
|
||||
if (result != null)
|
||||
{
|
||||
// A match succeeds if the library is already
|
||||
// loaded by LOADER or any of its ancestors.
|
||||
ClassLoader l = loader;
|
||||
do
|
||||
{
|
||||
if (result.loader == l)
|
||||
return result;
|
||||
l = l.getParent();
|
||||
}
|
||||
while (l != null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Oh dear. We've already mapped this shared library, but
|
||||
// with a different class loader. We need to copy it.
|
||||
try
|
||||
{
|
||||
File copy
|
||||
= File.createTempFile(new File(libname).getName(),
|
||||
".so", new File ("/tmp"));
|
||||
File src = new File(libname);
|
||||
copyFile (src, copy);
|
||||
libname = copy.getPath();
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
result = new SharedLibHelper(libname, loader, source, 0);
|
||||
map.put(libname, new WeakReference(result));
|
||||
s.add(new WeakReference(result));
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
@ -73,7 +127,15 @@ public class SharedLibHelper
|
|||
public Class findClass(String name)
|
||||
{
|
||||
ensureInit();
|
||||
return (Class) classMap.get(name);
|
||||
Class result = (Class) classMap.get(name);
|
||||
if (result != null)
|
||||
{
|
||||
// We never want to return a class without its supers linked.
|
||||
// It isn't clear from the spec, but this is what other
|
||||
// implementations do in practice.
|
||||
ensureSupersLinked(result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public URL findResource (String name)
|
||||
|
@ -106,6 +168,12 @@ public class SharedLibHelper
|
|||
|
||||
native boolean hasResource(String name);
|
||||
native void init();
|
||||
native void ensureSupersLinked(Class k);
|
||||
|
||||
public String toString ()
|
||||
{
|
||||
return "shared object " + baseName;
|
||||
}
|
||||
|
||||
/** Called during dlopen's processing of the init section. */
|
||||
void registerClass(String name, Class cls)
|
||||
|
|
|
@ -105,7 +105,8 @@ public final class VMClassLoader extends java.net.URLClassLoader
|
|||
/** This is overridden to search the internal hash table, which
|
||||
* will only search existing linked-in classes. This will make
|
||||
* the default implementation of loadClass (in ClassLoader) work right.
|
||||
* The implementation of this method is in java/lang/natClassLoader.cc.
|
||||
* The implementation of this method is in
|
||||
* gnu/gcj/runtime/natVMClassLoader.cc.
|
||||
*/
|
||||
protected native Class findClass(String name)
|
||||
throws java.lang.ClassNotFoundException;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// natSharedLibLoader.cc - Implementation of SharedLibHelper native methods.
|
||||
|
||||
/* Copyright (C) 2001, 2003 Free Software Foundation
|
||||
/* Copyright (C) 2001, 2003, 2004 Free Software Foundation
|
||||
|
||||
This file is part of libgcj.
|
||||
|
||||
|
@ -12,6 +12,8 @@ details. */
|
|||
|
||||
#include <gcj/cni.h>
|
||||
#include <jvm.h>
|
||||
#include <execution.h>
|
||||
|
||||
#include <gnu/gcj/runtime/SharedLibHelper.h>
|
||||
#include <java/io/IOException.h>
|
||||
#include <java/lang/UnsupportedOperationException.h>
|
||||
|
@ -30,9 +32,10 @@ typedef void (*CoreHookFunc) (_Jv_core_chain *);
|
|||
void
|
||||
_Jv_sharedlib_register_hook (jclass cls)
|
||||
{
|
||||
curHelper->registerClass(cls->getName(), cls);
|
||||
cls->protectionDomain = curHelper->domain;
|
||||
cls->loader = curLoader;
|
||||
cls->engine = &_Jv_soleCompiledEngine;
|
||||
curHelper->registerClass(cls->getName(), cls);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -122,3 +125,9 @@ gnu::gcj::runtime::SharedLibHelper::finalize()
|
|||
dlclose (handler);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
gnu::gcj::runtime::SharedLibHelper::ensureSupersLinked(jclass k)
|
||||
{
|
||||
_Jv_Linker::wait_for_state (k, JV_STATE_LOADING);
|
||||
}
|
||||
|
|
272
libjava/gnu/gcj/tools/gcj_dbtool/Main.java
Normal file
272
libjava/gnu/gcj/tools/gcj_dbtool/Main.java
Normal file
|
@ -0,0 +1,272 @@
|
|||
/* Copyright (C) 2004 Free Software Foundation
|
||||
|
||||
This file is part of libgcj.
|
||||
|
||||
This software is copyrighted work licensed under the terms of the
|
||||
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
|
||||
details. */
|
||||
|
||||
package gnu.gcj.tools.gcj_dbtool;
|
||||
|
||||
|
||||
import gnu.gcj.runtime.PersistentByteMap;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
import java.util.jar.*;
|
||||
import java.security.MessageDigest;
|
||||
import java.math.BigInteger;
|
||||
|
||||
public class Main
|
||||
{
|
||||
public static void main (String[] s)
|
||||
{
|
||||
insist (s.length >= 1);
|
||||
if (s[0].equals("-v"))
|
||||
{
|
||||
insist (s.length == 1);
|
||||
System.out.println("jv-dbtool ("
|
||||
+ System.getProperty("java.vm.name")
|
||||
+ ") "
|
||||
+ System.getProperty("java.vm.version"));
|
||||
System.out.println();
|
||||
System.out.println("Copyright 2004 Free Software Foundation, Inc.");
|
||||
System.out.println("This is free software; see the source for copying conditions. There is NO");
|
||||
System.out.println("warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (s[0].equals("-n"))
|
||||
{
|
||||
insist (s.length >= 2 && s.length <= 3);
|
||||
|
||||
int capacity = 32749;
|
||||
|
||||
if (s.length == 3)
|
||||
{
|
||||
// The user has explicitly provided a size for the table.
|
||||
// We're going to make that size prime. This isn't
|
||||
// strictly necessary but it can't hurt.
|
||||
|
||||
BigInteger size = new BigInteger(s[2], 10);
|
||||
BigInteger two = BigInteger.ONE.add(BigInteger.ONE);
|
||||
|
||||
if (size.getLowestSetBit() != 0) // A hard way to say isEven()
|
||||
size = size.add(BigInteger.ONE);
|
||||
|
||||
while (! size.isProbablePrime(10))
|
||||
size = size.add(two);
|
||||
|
||||
capacity = size.intValue();
|
||||
|
||||
if (capacity <= 2)
|
||||
{
|
||||
usage();
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
PersistentByteMap b
|
||||
= PersistentByteMap.emptyPersistentByteMap (s[1], capacity, capacity*64);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
System.err.println ("error: could not create "
|
||||
+ s[1] + ": " + e.toString());
|
||||
System.exit(2);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (s[0].equals("-a"))
|
||||
{
|
||||
try
|
||||
{
|
||||
insist (s.length == 4);
|
||||
File jar = new File(s[2]);
|
||||
PersistentByteMap b
|
||||
= new PersistentByteMap(new File(s[1]),
|
||||
PersistentByteMap.AccessMode.READ_WRITE);
|
||||
File soFile = new File(s[3]);
|
||||
if (! soFile.isFile())
|
||||
throw new IllegalArgumentException(s[3] + " is not a file");
|
||||
|
||||
addJar(jar, b, soFile);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
System.err.println ("error: could not update " + s[1]
|
||||
+ ": " + e.toString());
|
||||
System.exit(2);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (s[0].equals("-t"))
|
||||
{
|
||||
try
|
||||
{
|
||||
insist (s.length == 2);
|
||||
PersistentByteMap b
|
||||
= new PersistentByteMap(new File(s[1]),
|
||||
PersistentByteMap.AccessMode.READ_ONLY);
|
||||
Iterator iterator = b.iterator(PersistentByteMap.ENTRIES);
|
||||
|
||||
while (iterator.hasNext())
|
||||
{
|
||||
PersistentByteMap.MapEntry entry
|
||||
= (PersistentByteMap.MapEntry)iterator.next();
|
||||
byte[] key = (byte[])entry.getKey();
|
||||
byte[] value = (byte[])b.get(key);
|
||||
if (! Arrays.equals (value, (byte[])entry.getValue()))
|
||||
{
|
||||
String err
|
||||
= ("Key " + bytesToString(key) + " at bucket "
|
||||
+ entry.getBucket());
|
||||
|
||||
throw new RuntimeException(err);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
System.exit(3);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (s[0].equals("-l"))
|
||||
{
|
||||
insist (s.length == 2);
|
||||
try
|
||||
{
|
||||
PersistentByteMap b
|
||||
= new PersistentByteMap(new File(s[1]),
|
||||
PersistentByteMap.AccessMode.READ_ONLY);
|
||||
|
||||
System.out.println ("Capacity: " + b.capacity());
|
||||
System.out.println ("Size: " + b.size());
|
||||
System.out.println ();
|
||||
|
||||
System.out.println ("Elements: ");
|
||||
Iterator iterator = b.iterator(PersistentByteMap.ENTRIES);
|
||||
|
||||
while (iterator.hasNext())
|
||||
{
|
||||
PersistentByteMap.MapEntry entry
|
||||
= (PersistentByteMap.MapEntry)iterator.next();
|
||||
byte[] digest = (byte[])entry.getKey();
|
||||
System.out.print ("[" + entry.getBucket() + "] "
|
||||
+ bytesToString(digest)
|
||||
+ " -> ");
|
||||
System.out.println (new String((byte[])entry.getValue()));
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
System.err.println ("error: could not list "
|
||||
+ s[1] + ": " + e.toString());
|
||||
System.exit(2);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (s[0].equals("-d"))
|
||||
{
|
||||
insist (s.length == 2);
|
||||
try
|
||||
{
|
||||
MessageDigest md = MessageDigest.getInstance("MD5");
|
||||
PersistentByteMap b
|
||||
= new PersistentByteMap(new File(s[1]),
|
||||
PersistentByteMap.AccessMode.READ_WRITE);
|
||||
int N = b.capacity();
|
||||
byte[] bytes = new byte[1];
|
||||
byte digest[] = md.digest(bytes);
|
||||
for (int i = 0; i < N; i++)
|
||||
{
|
||||
digest = md.digest(digest);
|
||||
b.put(digest, digest);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
System.exit(3);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
usage();
|
||||
System.exit(1);
|
||||
}
|
||||
|
||||
private static void insist(boolean ok)
|
||||
{
|
||||
if (! ok)
|
||||
{
|
||||
usage();
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
private static void usage()
|
||||
{
|
||||
System.err.println
|
||||
("jv-dbtool: Manipulate gcj map database files\n"
|
||||
+ "\n"
|
||||
+ " Usage: \n"
|
||||
+ " jv-dbtool -n file.gcjdb [size] - Create a new gcj map database\n"
|
||||
+ " jv-dbtool -a file.gcjdb file.jar file.so\n"
|
||||
+ " - Add the contents of file.jar to the database\n"
|
||||
+ " jv-dbtool -t file.gcjdb - Test a gcj map database\n"
|
||||
+ " jv-dbtool -l file.gcjdb - List a gcj map database\n");
|
||||
}
|
||||
|
||||
|
||||
private static void addJar(File f, PersistentByteMap b, File soFile)
|
||||
throws Exception
|
||||
{
|
||||
MessageDigest md = MessageDigest.getInstance("MD5");
|
||||
|
||||
JarFile jar = new JarFile (f);
|
||||
Enumeration entries = jar.entries();
|
||||
|
||||
while (entries.hasMoreElements())
|
||||
{
|
||||
JarEntry classfile = (JarEntry)entries.nextElement();
|
||||
if (classfile.getName().endsWith(".class"))
|
||||
{
|
||||
InputStream str = jar.getInputStream(classfile);
|
||||
long length = classfile.getSize();
|
||||
if (length == -1)
|
||||
throw new EOFException();
|
||||
|
||||
byte[] data = new byte[length];
|
||||
int pos = 0;
|
||||
while (length - pos > 0)
|
||||
{
|
||||
int len = str.read(data, pos, (int)(length - pos));
|
||||
if (len == -1)
|
||||
throw new EOFException("Not enough data reading from: "
|
||||
+ classfile.getName());
|
||||
pos += len;
|
||||
}
|
||||
b.put(md.digest(data),
|
||||
soFile.getCanonicalPath().getBytes());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static String bytesToString(byte[] b)
|
||||
{
|
||||
StringBuffer hexBytes = new StringBuffer();
|
||||
int length = b.length;
|
||||
for (int i = 0; i < length; ++i)
|
||||
hexBytes.append(Integer.toHexString(b[i] & 0xff));
|
||||
return hexBytes.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -145,6 +145,7 @@ LIBGCJTESTSPEC = @LIBGCJTESTSPEC@
|
|||
LIBGCJ_CFLAGS = @LIBGCJ_CFLAGS@
|
||||
LIBGCJ_CXXFLAGS = @LIBGCJ_CXXFLAGS@
|
||||
LIBGCJ_JAVAFLAGS = @LIBGCJ_JAVAFLAGS@
|
||||
LIBGCJ_LD_SYMBOLIC = @LIBGCJ_LD_SYMBOLIC@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBLTDL = @LIBLTDL@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
|
|
146
libjava/include/execution.h
Normal file
146
libjava/include/execution.h
Normal file
|
@ -0,0 +1,146 @@
|
|||
// execution.h - Execution engines. -*- c++ -*-
|
||||
|
||||
/* Copyright (C) 2004 Free Software Foundation
|
||||
|
||||
This file is part of libgcj.
|
||||
|
||||
This software is copyrighted work licensed under the terms of the
|
||||
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
|
||||
details. */
|
||||
|
||||
#ifndef __JAVA_EXECUTION_H__
|
||||
#define __JAVA_EXECUTION_H__
|
||||
|
||||
// This represents one execution engine. Note that we use function
|
||||
// pointers and not virtual methods to avoid calls to
|
||||
// __cxa_call_unexpected and the like.
|
||||
struct _Jv_ExecutionEngine
|
||||
{
|
||||
public:
|
||||
|
||||
void (*unregister) (jclass);
|
||||
// FIXME: probably should handle this elsewhere, see how
|
||||
// interpreter does it.
|
||||
bool (*need_resolve_string_fields) ();
|
||||
void (*verify) (jclass);
|
||||
void (*allocate_static_fields) (jclass, int);
|
||||
void (*create_ncode) (jclass);
|
||||
_Jv_ResolvedMethod *(*resolve_method) (_Jv_Method *, jclass,
|
||||
jboolean, jint);
|
||||
void (*post_miranda_hook) (jclass);
|
||||
};
|
||||
|
||||
// This handles all gcj-compiled code, including BC ABI.
|
||||
struct _Jv_CompiledEngine : public _Jv_ExecutionEngine
|
||||
{
|
||||
public:
|
||||
|
||||
static void do_unregister (jclass)
|
||||
{
|
||||
}
|
||||
|
||||
static bool do_need_resolve_string_fields ()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
static void do_verify (jclass klass)
|
||||
{
|
||||
_Jv_Linker::verify_type_assertions (klass);
|
||||
}
|
||||
|
||||
static _Jv_ResolvedMethod *do_resolve_method (_Jv_Method *, jclass,
|
||||
jboolean, jint)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void do_allocate_static_fields (jclass, int)
|
||||
{
|
||||
// Compiled classes don't need this.
|
||||
}
|
||||
|
||||
static void do_create_ncode (jclass)
|
||||
{
|
||||
// Not needed.
|
||||
}
|
||||
|
||||
static void do_post_miranda_hook (jclass)
|
||||
{
|
||||
// Not needed.
|
||||
}
|
||||
|
||||
_Jv_CompiledEngine ()
|
||||
{
|
||||
unregister = do_unregister;
|
||||
need_resolve_string_fields = do_need_resolve_string_fields;
|
||||
verify = do_verify;
|
||||
allocate_static_fields = do_allocate_static_fields;
|
||||
create_ncode = do_create_ncode;
|
||||
resolve_method = do_resolve_method;
|
||||
post_miranda_hook = do_post_miranda_hook;
|
||||
}
|
||||
|
||||
// These operators make it so we don't have to link in libstdc++.
|
||||
void *operator new (size_t bytes)
|
||||
{
|
||||
return _Jv_Malloc(bytes);
|
||||
}
|
||||
|
||||
void operator delete (void *mem)
|
||||
{
|
||||
_Jv_Free(mem);
|
||||
}
|
||||
};
|
||||
|
||||
// This handles interpreted code.
|
||||
class _Jv_InterpreterEngine : public _Jv_ExecutionEngine
|
||||
{
|
||||
public:
|
||||
|
||||
static void do_verify (jclass);
|
||||
static void do_allocate_static_fields (jclass, int);
|
||||
static void do_create_ncode (jclass);
|
||||
static _Jv_ResolvedMethod *do_resolve_method (_Jv_Method *, jclass,
|
||||
jboolean, jint);
|
||||
|
||||
static bool do_need_resolve_string_fields ()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static void do_unregister(jclass klass)
|
||||
{
|
||||
_Jv_UnregisterClass(klass);
|
||||
}
|
||||
|
||||
static void do_post_miranda_hook (jclass);
|
||||
|
||||
_Jv_InterpreterEngine ()
|
||||
{
|
||||
unregister = do_unregister;
|
||||
need_resolve_string_fields = do_need_resolve_string_fields;
|
||||
verify = do_verify;
|
||||
allocate_static_fields = do_allocate_static_fields;
|
||||
create_ncode = do_create_ncode;
|
||||
resolve_method = do_resolve_method;
|
||||
post_miranda_hook = do_post_miranda_hook;
|
||||
}
|
||||
|
||||
// These operators make it so we don't have to link in libstdc++.
|
||||
void *operator new (size_t bytes)
|
||||
{
|
||||
return _Jv_Malloc(bytes);
|
||||
}
|
||||
|
||||
void operator delete (void *mem)
|
||||
{
|
||||
_Jv_Free(mem);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
extern _Jv_InterpreterEngine _Jv_soleInterpreterEngine;
|
||||
extern _Jv_CompiledEngine _Jv_soleCompiledEngine;
|
||||
|
||||
#endif // __JAVA_EXECUTION_H__
|
|
@ -1,6 +1,6 @@
|
|||
// java-interp.h - Header file for the bytecode interpreter. -*- c++ -*-
|
||||
|
||||
/* Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation
|
||||
/* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation
|
||||
|
||||
This file is part of libgcj.
|
||||
|
||||
|
@ -36,7 +36,8 @@ _Jv_IsInterpretedClass (jclass c)
|
|||
struct _Jv_ResolvedMethod;
|
||||
|
||||
void _Jv_InitInterpreter ();
|
||||
void _Jv_DefineClass (jclass, jbyteArray, jint, jint);
|
||||
void _Jv_DefineClass (jclass, jbyteArray, jint, jint,
|
||||
java::security::ProtectionDomain *);
|
||||
|
||||
void _Jv_InitField (jobject, jclass, int);
|
||||
void * _Jv_AllocMethodInvocation (jsize size);
|
||||
|
@ -88,11 +89,7 @@ protected:
|
|||
// Size of raw arguments.
|
||||
_Jv_ushort args_raw_size;
|
||||
|
||||
// Chain of addresses to fill in. See _Jv_Defer_Resolution.
|
||||
void *deferred;
|
||||
|
||||
friend void _Jv_Defer_Resolution (void *cl, _Jv_Method *meth, void **);
|
||||
friend void _Jv_PrepareClass(jclass);
|
||||
friend class _Jv_InterpreterEngine;
|
||||
|
||||
public:
|
||||
_Jv_Method *get_method ()
|
||||
|
@ -150,10 +147,9 @@ class _Jv_InterpMethod : public _Jv_MethodBase
|
|||
friend class _Jv_BytecodeVerifier;
|
||||
friend class gnu::gcj::runtime::NameFinder;
|
||||
friend class gnu::gcj::runtime::StackTrace;
|
||||
friend class _Jv_InterpreterEngine;
|
||||
|
||||
|
||||
friend void _Jv_PrepareClass(jclass);
|
||||
|
||||
#ifdef JV_MARKOBJ_DECL
|
||||
friend JV_MARKOBJ_DECL;
|
||||
#endif
|
||||
|
@ -166,43 +162,15 @@ class _Jv_InterpClass
|
|||
|
||||
friend class _Jv_ClassReader;
|
||||
friend class _Jv_InterpMethod;
|
||||
friend void _Jv_PrepareClass(jclass);
|
||||
friend void _Jv_PrepareMissingMethods (jclass base2, jclass iface_class);
|
||||
friend class _Jv_InterpreterEngine;
|
||||
friend void _Jv_InitField (jobject, jclass, int);
|
||||
#ifdef JV_MARKOBJ_DECL
|
||||
friend JV_MARKOBJ_DECL;
|
||||
#endif
|
||||
|
||||
friend _Jv_MethodBase ** _Jv_GetFirstMethod (_Jv_InterpClass *klass);
|
||||
friend void _Jv_Defer_Resolution (void *cl, _Jv_Method *meth, void **);
|
||||
};
|
||||
|
||||
// We have an interpreted class CL and we're trying to find the
|
||||
// address of the ncode of a method METH. That interpreted class
|
||||
// hasn't yet been prepared, so we defer fixups until they are ready.
|
||||
// To do this, we create a chain of fixups that will be resolved by
|
||||
// _Jv_PrepareClass.
|
||||
extern inline void
|
||||
_Jv_Defer_Resolution (void *cl, _Jv_Method *meth, void **address)
|
||||
{
|
||||
int i;
|
||||
jclass self = (jclass) cl;
|
||||
_Jv_InterpClass *interp_cl = (_Jv_InterpClass*) self->aux_info;
|
||||
|
||||
for (i = 0; i < self->method_count; i++)
|
||||
{
|
||||
_Jv_Method *m = &self->methods[i];
|
||||
if (m == meth)
|
||||
{
|
||||
_Jv_MethodBase *imeth = interp_cl->interpreted_methods[i];
|
||||
*address = imeth->deferred;
|
||||
imeth->deferred = address;
|
||||
return;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
extern inline _Jv_MethodBase **
|
||||
_Jv_GetFirstMethod (_Jv_InterpClass *klass)
|
||||
{
|
||||
|
@ -240,7 +208,11 @@ class _Jv_JNIMethod : public _Jv_MethodBase
|
|||
void *ncode ();
|
||||
|
||||
friend class _Jv_ClassReader;
|
||||
friend void _Jv_PrepareClass(jclass);
|
||||
friend class _Jv_InterpreterEngine;
|
||||
|
||||
#ifdef JV_MARKOBJ_DECL
|
||||
friend JV_MARKOBJ_DECL;
|
||||
#endif
|
||||
|
||||
public:
|
||||
// FIXME: this is ugly.
|
||||
|
|
84
libjava/include/java-stack.h
Normal file
84
libjava/include/java-stack.h
Normal file
|
@ -0,0 +1,84 @@
|
|||
// java-stack.h - Definitions for unwinding & inspecting the call stack.
|
||||
|
||||
/* Copyright (C) 2003 Free Software Foundation
|
||||
|
||||
This file is part of libgcj.
|
||||
|
||||
This software is copyrighted work licensed under the terms of the
|
||||
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
|
||||
details. */
|
||||
|
||||
#ifndef __JV_STACKTRACE_H__
|
||||
#define __JV_STACKTRACE_H__
|
||||
|
||||
#include <unwind.h>
|
||||
|
||||
#include <gcj/cni.h>
|
||||
#include <gcj/javaprims.h>
|
||||
|
||||
#include <java-interp.h>
|
||||
|
||||
#include <java/lang/Class.h>
|
||||
#include <java/lang/StackTraceElement.h>
|
||||
#include <java/lang/Throwable.h>
|
||||
|
||||
#include <gnu/gcj/runtime/NameFinder.h>
|
||||
|
||||
using namespace gnu::gcj::runtime;
|
||||
|
||||
enum _Jv_FrameType
|
||||
{
|
||||
frame_native,
|
||||
frame_interpreter
|
||||
};
|
||||
|
||||
#ifdef INTERPRETER
|
||||
struct _Jv_InterpFrameInfo
|
||||
{
|
||||
_Jv_InterpMethod *meth;
|
||||
pc_t pc;
|
||||
};
|
||||
#endif
|
||||
|
||||
union _Jv_FrameInfo
|
||||
{
|
||||
};
|
||||
|
||||
struct _Jv_StackFrame
|
||||
{
|
||||
_Jv_FrameType type; /* Native or interpreted. */
|
||||
union {
|
||||
#ifdef INTERPRETER
|
||||
_Jv_InterpFrameInfo interp;
|
||||
#endif
|
||||
void *ip;
|
||||
};
|
||||
// _Jv_FrameInfo info; /* Frame-type specific data. */
|
||||
jclass klass;
|
||||
_Jv_Method *meth;
|
||||
};
|
||||
|
||||
class _Jv_StackTrace
|
||||
{
|
||||
private:
|
||||
int length;
|
||||
_Jv_StackFrame frames[];
|
||||
|
||||
static void UpdateNCodeMap ();
|
||||
static jclass ClassForIP (void *ip, void **ncode);
|
||||
static void FillInFrameInfo (_Jv_StackFrame *frame);
|
||||
static void getLineNumberForFrame(_Jv_StackFrame *frame, NameFinder *finder,
|
||||
jstring *sourceFileName, jint *lineNum);
|
||||
|
||||
static _Unwind_Reason_Code UnwindTraceFn (struct _Unwind_Context *context,
|
||||
void *state_ptr);
|
||||
|
||||
public:
|
||||
static _Jv_StackTrace *GetStackTrace (void);
|
||||
static JArray< ::java::lang::StackTraceElement *>*
|
||||
GetStackTraceElements (_Jv_StackTrace *trace,
|
||||
java::lang::Throwable *throwable);
|
||||
static jclass GetCallingClass (void);
|
||||
};
|
||||
|
||||
#endif /* __JV_STACKTRACE_H__ */
|
|
@ -1,6 +1,6 @@
|
|||
// jvm.h - Header file for private implementation information. -*- c++ -*-
|
||||
|
||||
/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation
|
||||
/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation
|
||||
|
||||
This file is part of libgcj.
|
||||
|
||||
|
@ -231,9 +231,6 @@ inline _Jv_TempUTFString::~_Jv_TempUTFString ()
|
|||
char utfstr##_buf[utfstr##_len <= 256 ? utfstr##_len : 0]; \
|
||||
_Jv_TempUTFString utfstr(utfstr##thejstr, sizeof(utfstr##_buf)==0 ? 0 : utfstr##_buf)
|
||||
|
||||
// FIXME: remove this define.
|
||||
#define StringClass java::lang::String::class$
|
||||
|
||||
namespace gcj
|
||||
{
|
||||
/* Some constants used during lookup of special class methods. */
|
||||
|
@ -249,6 +246,43 @@ namespace gcj
|
|||
extern bool verbose_class_flag;
|
||||
}
|
||||
|
||||
// This class handles all aspects of class preparation and linking.
|
||||
class _Jv_Linker
|
||||
{
|
||||
private:
|
||||
static void prepare_constant_time_tables(jclass);
|
||||
static jshort get_interfaces(jclass, _Jv_ifaces *);
|
||||
static void link_symbol_table(jclass);
|
||||
static void link_exception_table(jclass);
|
||||
static void layout_interface_methods(jclass);
|
||||
static void layout_vtable_methods(jclass);
|
||||
static void set_vtable_entries(jclass, _Jv_VTable *);
|
||||
static void make_vtable(jclass);
|
||||
static void ensure_fields_laid_out(jclass);
|
||||
static void ensure_class_linked(jclass);
|
||||
static void ensure_supers_installed(jclass);
|
||||
static void add_miranda_methods(jclass, jclass);
|
||||
static void ensure_method_table_complete(jclass);
|
||||
static void verify_class(jclass);
|
||||
static jshort find_iindex(jclass *, jshort *, jshort);
|
||||
static jshort indexof(void *, void **, jshort);
|
||||
static int get_alignment_from_class(jclass);
|
||||
static void generate_itable(jclass, _Jv_ifaces *, jshort *);
|
||||
static jshort append_partial_itable(jclass, jclass, void **, jshort);
|
||||
static _Jv_Method *search_method_in_class (jclass, jclass,
|
||||
_Jv_Utf8Const *,
|
||||
_Jv_Utf8Const *);
|
||||
|
||||
public:
|
||||
|
||||
static void print_class_loaded (jclass);
|
||||
static void resolve_class_ref (jclass, jclass *);
|
||||
static void wait_for_state(jclass, int);
|
||||
static _Jv_word resolve_pool_entry (jclass, int);
|
||||
static void resolve_field (_Jv_Field *, java::lang::ClassLoader *);
|
||||
static void verify_type_assertions (jclass);
|
||||
};
|
||||
|
||||
/* Type of pointer used as finalizer. */
|
||||
typedef void _Jv_FinalizerFunc (jobject);
|
||||
|
||||
|
@ -416,7 +450,6 @@ extern "C" void _Jv_RegisterClasses_Counted (const jclass *classes,
|
|||
size_t count);
|
||||
extern "C" void _Jv_RegisterResource (void *vptr);
|
||||
extern void _Jv_UnregisterClass (_Jv_Utf8Const*, java::lang::ClassLoader*);
|
||||
extern void _Jv_ResolveField (_Jv_Field *, java::lang::ClassLoader*);
|
||||
|
||||
extern jclass _Jv_FindClass (_Jv_Utf8Const *name,
|
||||
java::lang::ClassLoader *loader);
|
||||
|
|
|
@ -11,6 +11,7 @@ details. */
|
|||
/* Author: Kresten Krab Thorup <krab@gnu.org> */
|
||||
|
||||
#include <config.h>
|
||||
#include <platform.h>
|
||||
|
||||
// Define this to get the direct-threaded interpreter. If undefined,
|
||||
// we revert to a basic bytecode interpreter. The former is faster
|
||||
|
@ -38,9 +39,15 @@ details. */
|
|||
#include <java/lang/Thread.h>
|
||||
#include <java-insns.h>
|
||||
#include <java-signal.h>
|
||||
#include <java/lang/ClassFormatError.h>
|
||||
#include <execution.h>
|
||||
#include <java/lang/reflect/Modifier.h>
|
||||
|
||||
#ifdef INTERPRETER
|
||||
|
||||
// Execution engine for interpreted code.
|
||||
_Jv_InterpreterEngine _Jv_soleInterpreterEngine;
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
using namespace gcj;
|
||||
|
@ -54,6 +61,11 @@ static void throw_null_pointer_exception ()
|
|||
__attribute__ ((__noreturn__));
|
||||
#endif
|
||||
|
||||
static void throw_class_format_error (jstring msg)
|
||||
__attribute__ ((__noreturn__));
|
||||
static void throw_class_format_error (char *msg)
|
||||
__attribute__ ((__noreturn__));
|
||||
|
||||
#ifdef DIRECT_THREADED
|
||||
// Lock to ensure that methods are not compiled concurrently.
|
||||
// We could use a finer-grained lock here, however it is not safe to use
|
||||
|
@ -765,8 +777,9 @@ _Jv_InterpMethod::compile (const void * const *insn_targets)
|
|||
exc[i].start_pc.p = &insns[pc_mapping[exc[i].start_pc.i]];
|
||||
exc[i].end_pc.p = &insns[pc_mapping[exc[i].end_pc.i]];
|
||||
exc[i].handler_pc.p = &insns[pc_mapping[exc[i].handler_pc.i]];
|
||||
jclass handler = (_Jv_ResolvePoolEntry (defining_class,
|
||||
exc[i].handler_type.i)).clazz;
|
||||
jclass handler
|
||||
= (_Jv_Linker::resolve_pool_entry (defining_class,
|
||||
exc[i].handler_type.i)).clazz;
|
||||
exc[i].handler_type.p = handler;
|
||||
}
|
||||
|
||||
|
@ -1113,13 +1126,14 @@ _Jv_InterpMethod::run (void *retp, ffi_raw *args)
|
|||
{
|
||||
int index = GET2U ();
|
||||
|
||||
/* _Jv_ResolvePoolEntry returns immediately if the value already
|
||||
* is resolved. If we want to clutter up the code here to gain
|
||||
* a little performance, then we can check the corresponding bit
|
||||
* JV_CONSTANT_ResolvedFlag in the tag directly. For now, I
|
||||
* don't think it is worth it. */
|
||||
/* _Jv_Linker::resolve_pool_entry returns immediately if the
|
||||
* value already is resolved. If we want to clutter up the
|
||||
* code here to gain a little performance, then we can check
|
||||
* the corresponding bit JV_CONSTANT_ResolvedFlag in the tag
|
||||
* directly. For now, I don't think it is worth it. */
|
||||
|
||||
rmeth = (_Jv_ResolvePoolEntry (defining_class, index)).rmethod;
|
||||
rmeth = (_Jv_Linker::resolve_pool_entry (defining_class,
|
||||
index)).rmethod;
|
||||
|
||||
sp -= rmeth->stack_item_count;
|
||||
// We don't use NULLCHECK here because we can't rely on that
|
||||
|
@ -2409,7 +2423,7 @@ _Jv_InterpMethod::run (void *retp, ffi_raw *args)
|
|||
insn_getstatic:
|
||||
{
|
||||
jint fieldref_index = GET2U ();
|
||||
_Jv_ResolvePoolEntry (defining_class, fieldref_index);
|
||||
_Jv_Linker::resolve_pool_entry (defining_class, fieldref_index);
|
||||
_Jv_Field *field = pool_data[fieldref_index].field;
|
||||
|
||||
if ((field->flags & Modifier::STATIC) == 0)
|
||||
|
@ -2496,7 +2510,7 @@ _Jv_InterpMethod::run (void *retp, ffi_raw *args)
|
|||
insn_getfield:
|
||||
{
|
||||
jint fieldref_index = GET2U ();
|
||||
_Jv_ResolvePoolEntry (defining_class, fieldref_index);
|
||||
_Jv_Linker::resolve_pool_entry (defining_class, fieldref_index);
|
||||
_Jv_Field *field = pool_data[fieldref_index].field;
|
||||
|
||||
if ((field->flags & Modifier::STATIC) != 0)
|
||||
|
@ -2612,7 +2626,7 @@ _Jv_InterpMethod::run (void *retp, ffi_raw *args)
|
|||
insn_putstatic:
|
||||
{
|
||||
jint fieldref_index = GET2U ();
|
||||
_Jv_ResolvePoolEntry (defining_class, fieldref_index);
|
||||
_Jv_Linker::resolve_pool_entry (defining_class, fieldref_index);
|
||||
_Jv_Field *field = pool_data[fieldref_index].field;
|
||||
|
||||
jclass type = field->type;
|
||||
|
@ -2699,7 +2713,7 @@ _Jv_InterpMethod::run (void *retp, ffi_raw *args)
|
|||
insn_putfield:
|
||||
{
|
||||
jint fieldref_index = GET2U ();
|
||||
_Jv_ResolvePoolEntry (defining_class, fieldref_index);
|
||||
_Jv_Linker::resolve_pool_entry (defining_class, fieldref_index);
|
||||
_Jv_Field *field = pool_data[fieldref_index].field;
|
||||
|
||||
jclass type = field->type;
|
||||
|
@ -2825,7 +2839,8 @@ _Jv_InterpMethod::run (void *retp, ffi_raw *args)
|
|||
{
|
||||
int index = GET2U ();
|
||||
|
||||
rmeth = (_Jv_ResolvePoolEntry (defining_class, index)).rmethod;
|
||||
rmeth = (_Jv_Linker::resolve_pool_entry (defining_class,
|
||||
index)).rmethod;
|
||||
|
||||
sp -= rmeth->stack_item_count;
|
||||
|
||||
|
@ -2863,7 +2878,8 @@ _Jv_InterpMethod::run (void *retp, ffi_raw *args)
|
|||
{
|
||||
int index = GET2U ();
|
||||
|
||||
rmeth = (_Jv_ResolvePoolEntry (defining_class, index)).rmethod;
|
||||
rmeth = (_Jv_Linker::resolve_pool_entry (defining_class,
|
||||
index)).rmethod;
|
||||
|
||||
sp -= rmeth->stack_item_count;
|
||||
|
||||
|
@ -2892,7 +2908,8 @@ _Jv_InterpMethod::run (void *retp, ffi_raw *args)
|
|||
{
|
||||
int index = GET2U ();
|
||||
|
||||
rmeth = (_Jv_ResolvePoolEntry (defining_class, index)).rmethod;
|
||||
rmeth = (_Jv_Linker::resolve_pool_entry (defining_class,
|
||||
index)).rmethod;
|
||||
|
||||
sp -= rmeth->stack_item_count;
|
||||
|
||||
|
@ -2935,7 +2952,8 @@ _Jv_InterpMethod::run (void *retp, ffi_raw *args)
|
|||
insn_new:
|
||||
{
|
||||
int index = GET2U ();
|
||||
jclass klass = (_Jv_ResolvePoolEntry (defining_class, index)).clazz;
|
||||
jclass klass = (_Jv_Linker::resolve_pool_entry (defining_class,
|
||||
index)).clazz;
|
||||
jobject res = _Jv_AllocObject (klass);
|
||||
PUSHA (res);
|
||||
|
||||
|
@ -2968,7 +2986,8 @@ _Jv_InterpMethod::run (void *retp, ffi_raw *args)
|
|||
insn_anewarray:
|
||||
{
|
||||
int index = GET2U ();
|
||||
jclass klass = (_Jv_ResolvePoolEntry (defining_class, index)).clazz;
|
||||
jclass klass = (_Jv_Linker::resolve_pool_entry (defining_class,
|
||||
index)).clazz;
|
||||
int size = POPI();
|
||||
jobject result = _Jv_NewObjectArray (size, klass, 0);
|
||||
PUSHA (result);
|
||||
|
@ -3010,7 +3029,8 @@ _Jv_InterpMethod::run (void *retp, ffi_raw *args)
|
|||
{
|
||||
jobject value = POPA();
|
||||
jint index = GET2U ();
|
||||
jclass to = (_Jv_ResolvePoolEntry (defining_class, index)).clazz;
|
||||
jclass to = (_Jv_Linker::resolve_pool_entry (defining_class,
|
||||
index)).clazz;
|
||||
|
||||
if (value != NULL && ! to->isInstance (value))
|
||||
throw new java::lang::ClassCastException (to->getName());
|
||||
|
@ -3040,7 +3060,8 @@ _Jv_InterpMethod::run (void *retp, ffi_raw *args)
|
|||
{
|
||||
jobject value = POPA();
|
||||
jint index = GET2U ();
|
||||
jclass to = (_Jv_ResolvePoolEntry (defining_class, index)).clazz;
|
||||
jclass to = (_Jv_Linker::resolve_pool_entry (defining_class,
|
||||
index)).clazz;
|
||||
PUSHI (to->isInstance (value));
|
||||
|
||||
#ifdef DIRECT_THREADED
|
||||
|
@ -3102,7 +3123,8 @@ _Jv_InterpMethod::run (void *retp, ffi_raw *args)
|
|||
int dim = GET1U ();
|
||||
|
||||
jclass type
|
||||
= (_Jv_ResolvePoolEntry (defining_class, kind_index)).clazz;
|
||||
= (_Jv_Linker::resolve_pool_entry (defining_class,
|
||||
kind_index)).clazz;
|
||||
jint *sizes = (jint*) __builtin_alloca (sizeof (jint)*dim);
|
||||
|
||||
for (int i = dim - 1; i >= 0; i--)
|
||||
|
@ -3203,8 +3225,8 @@ _Jv_InterpMethod::run (void *retp, ffi_raw *args)
|
|||
#else
|
||||
jclass handler = NULL;
|
||||
if (exc[i].handler_type.i != 0)
|
||||
handler = (_Jv_ResolvePoolEntry (defining_class,
|
||||
exc[i].handler_type.i)).clazz;
|
||||
handler = (_Jv_Linker::resolve_pool_entry (defining_class,
|
||||
exc[i].handler_type.i)).clazz;
|
||||
#endif /* DIRECT_THREADED */
|
||||
|
||||
if (handler == NULL || handler->isAssignableFrom (exc_class))
|
||||
|
@ -3250,4 +3272,547 @@ throw_null_pointer_exception ()
|
|||
}
|
||||
#endif
|
||||
|
||||
/** Do static initialization for fields with a constant initializer */
|
||||
void
|
||||
_Jv_InitField (jobject obj, jclass klass, int index)
|
||||
{
|
||||
using namespace java::lang::reflect;
|
||||
|
||||
if (obj != 0 && klass == 0)
|
||||
klass = obj->getClass ();
|
||||
|
||||
if (!_Jv_IsInterpretedClass (klass))
|
||||
return;
|
||||
|
||||
_Jv_InterpClass *iclass = (_Jv_InterpClass*)klass->aux_info;
|
||||
|
||||
_Jv_Field * field = (&klass->fields[0]) + index;
|
||||
|
||||
if (index > klass->field_count)
|
||||
throw_internal_error ("field out of range");
|
||||
|
||||
int init = iclass->field_initializers[index];
|
||||
if (init == 0)
|
||||
return;
|
||||
|
||||
_Jv_Constants *pool = &klass->constants;
|
||||
int tag = pool->tags[init];
|
||||
|
||||
if (! field->isResolved ())
|
||||
throw_internal_error ("initializing unresolved field");
|
||||
|
||||
if (obj==0 && ((field->flags & Modifier::STATIC) == 0))
|
||||
throw_internal_error ("initializing non-static field with no object");
|
||||
|
||||
void *addr = 0;
|
||||
|
||||
if ((field->flags & Modifier::STATIC) != 0)
|
||||
addr = (void*) field->u.addr;
|
||||
else
|
||||
addr = (void*) (((char*)obj) + field->u.boffset);
|
||||
|
||||
switch (tag)
|
||||
{
|
||||
case JV_CONSTANT_String:
|
||||
{
|
||||
jstring str;
|
||||
str = _Jv_NewStringUtf8Const (pool->data[init].utf8);
|
||||
pool->data[init].string = str;
|
||||
pool->tags[init] = JV_CONSTANT_ResolvedString;
|
||||
}
|
||||
/* fall through */
|
||||
|
||||
case JV_CONSTANT_ResolvedString:
|
||||
if (! (field->type == &java::lang::String::class$
|
||||
|| field->type == &java::lang::Class::class$))
|
||||
throw_class_format_error ("string initialiser to non-string field");
|
||||
|
||||
*(jstring*)addr = pool->data[init].string;
|
||||
break;
|
||||
|
||||
case JV_CONSTANT_Integer:
|
||||
{
|
||||
int value = pool->data[init].i;
|
||||
|
||||
if (field->type == JvPrimClass (boolean))
|
||||
*(jboolean*)addr = (jboolean)value;
|
||||
|
||||
else if (field->type == JvPrimClass (byte))
|
||||
*(jbyte*)addr = (jbyte)value;
|
||||
|
||||
else if (field->type == JvPrimClass (char))
|
||||
*(jchar*)addr = (jchar)value;
|
||||
|
||||
else if (field->type == JvPrimClass (short))
|
||||
*(jshort*)addr = (jshort)value;
|
||||
|
||||
else if (field->type == JvPrimClass (int))
|
||||
*(jint*)addr = (jint)value;
|
||||
|
||||
else
|
||||
throw_class_format_error ("erroneous field initializer");
|
||||
}
|
||||
break;
|
||||
|
||||
case JV_CONSTANT_Long:
|
||||
if (field->type != JvPrimClass (long))
|
||||
throw_class_format_error ("erroneous field initializer");
|
||||
|
||||
*(jlong*)addr = _Jv_loadLong (&pool->data[init]);
|
||||
break;
|
||||
|
||||
case JV_CONSTANT_Float:
|
||||
if (field->type != JvPrimClass (float))
|
||||
throw_class_format_error ("erroneous field initializer");
|
||||
|
||||
*(jfloat*)addr = pool->data[init].f;
|
||||
break;
|
||||
|
||||
case JV_CONSTANT_Double:
|
||||
if (field->type != JvPrimClass (double))
|
||||
throw_class_format_error ("erroneous field initializer");
|
||||
|
||||
*(jdouble*)addr = _Jv_loadDouble (&pool->data[init]);
|
||||
break;
|
||||
|
||||
default:
|
||||
throw_class_format_error ("erroneous field initializer");
|
||||
}
|
||||
}
|
||||
|
||||
inline static unsigned char*
|
||||
skip_one_type (unsigned char* ptr)
|
||||
{
|
||||
int ch = *ptr++;
|
||||
|
||||
while (ch == '[')
|
||||
{
|
||||
ch = *ptr++;
|
||||
}
|
||||
|
||||
if (ch == 'L')
|
||||
{
|
||||
do { ch = *ptr++; } while (ch != ';');
|
||||
}
|
||||
|
||||
return ptr;
|
||||
}
|
||||
|
||||
static ffi_type*
|
||||
get_ffi_type_from_signature (unsigned char* ptr)
|
||||
{
|
||||
switch (*ptr)
|
||||
{
|
||||
case 'L':
|
||||
case '[':
|
||||
return &ffi_type_pointer;
|
||||
break;
|
||||
|
||||
case 'Z':
|
||||
// On some platforms a bool is a byte, on others an int.
|
||||
if (sizeof (jboolean) == sizeof (jbyte))
|
||||
return &ffi_type_sint8;
|
||||
else
|
||||
{
|
||||
JvAssert (sizeof (jbyte) == sizeof (jint));
|
||||
return &ffi_type_sint32;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'B':
|
||||
return &ffi_type_sint8;
|
||||
break;
|
||||
|
||||
case 'C':
|
||||
return &ffi_type_uint16;
|
||||
break;
|
||||
|
||||
case 'S':
|
||||
return &ffi_type_sint16;
|
||||
break;
|
||||
|
||||
case 'I':
|
||||
return &ffi_type_sint32;
|
||||
break;
|
||||
|
||||
case 'J':
|
||||
return &ffi_type_sint64;
|
||||
break;
|
||||
|
||||
case 'F':
|
||||
return &ffi_type_float;
|
||||
break;
|
||||
|
||||
case 'D':
|
||||
return &ffi_type_double;
|
||||
break;
|
||||
|
||||
case 'V':
|
||||
return &ffi_type_void;
|
||||
break;
|
||||
}
|
||||
|
||||
throw_internal_error ("unknown type in signature");
|
||||
}
|
||||
|
||||
/* this function yields the number of actual arguments, that is, if the
|
||||
* function is non-static, then one is added to the number of elements
|
||||
* found in the signature */
|
||||
|
||||
int
|
||||
_Jv_count_arguments (_Jv_Utf8Const *signature,
|
||||
jboolean staticp)
|
||||
{
|
||||
unsigned char *ptr = (unsigned char*) signature->chars();
|
||||
int arg_count = staticp ? 0 : 1;
|
||||
|
||||
/* first, count number of arguments */
|
||||
|
||||
// skip '('
|
||||
ptr++;
|
||||
|
||||
// count args
|
||||
while (*ptr != ')')
|
||||
{
|
||||
ptr = skip_one_type (ptr);
|
||||
arg_count += 1;
|
||||
}
|
||||
|
||||
return arg_count;
|
||||
}
|
||||
|
||||
/* This beast will build a cif, given the signature. Memory for
|
||||
* the cif itself and for the argument types must be allocated by the
|
||||
* caller.
|
||||
*/
|
||||
|
||||
static int
|
||||
init_cif (_Jv_Utf8Const* signature,
|
||||
int arg_count,
|
||||
jboolean staticp,
|
||||
ffi_cif *cif,
|
||||
ffi_type **arg_types,
|
||||
ffi_type **rtype_p)
|
||||
{
|
||||
unsigned char *ptr = (unsigned char*) signature->chars();
|
||||
|
||||
int arg_index = 0; // arg number
|
||||
int item_count = 0; // stack-item count
|
||||
|
||||
// setup receiver
|
||||
if (!staticp)
|
||||
{
|
||||
arg_types[arg_index++] = &ffi_type_pointer;
|
||||
item_count += 1;
|
||||
}
|
||||
|
||||
// skip '('
|
||||
ptr++;
|
||||
|
||||
// assign arg types
|
||||
while (*ptr != ')')
|
||||
{
|
||||
arg_types[arg_index++] = get_ffi_type_from_signature (ptr);
|
||||
|
||||
if (*ptr == 'J' || *ptr == 'D')
|
||||
item_count += 2;
|
||||
else
|
||||
item_count += 1;
|
||||
|
||||
ptr = skip_one_type (ptr);
|
||||
}
|
||||
|
||||
// skip ')'
|
||||
ptr++;
|
||||
ffi_type *rtype = get_ffi_type_from_signature (ptr);
|
||||
|
||||
ptr = skip_one_type (ptr);
|
||||
if (ptr != (unsigned char*)signature->chars() + signature->len())
|
||||
throw_internal_error ("did not find end of signature");
|
||||
|
||||
if (ffi_prep_cif (cif, FFI_DEFAULT_ABI,
|
||||
arg_count, rtype, arg_types) != FFI_OK)
|
||||
throw_internal_error ("ffi_prep_cif failed");
|
||||
|
||||
if (rtype_p != NULL)
|
||||
*rtype_p = rtype;
|
||||
|
||||
return item_count;
|
||||
}
|
||||
|
||||
#if FFI_NATIVE_RAW_API
|
||||
# define FFI_PREP_RAW_CLOSURE ffi_prep_raw_closure
|
||||
# define FFI_RAW_SIZE ffi_raw_size
|
||||
#else
|
||||
# define FFI_PREP_RAW_CLOSURE ffi_prep_java_raw_closure
|
||||
# define FFI_RAW_SIZE ffi_java_raw_size
|
||||
#endif
|
||||
|
||||
/* we put this one here, and not in interpret.cc because it
|
||||
* calls the utility routines _Jv_count_arguments
|
||||
* which are static to this module. The following struct defines the
|
||||
* layout we use for the stubs, it's only used in the ncode method. */
|
||||
|
||||
typedef struct {
|
||||
ffi_raw_closure closure;
|
||||
ffi_cif cif;
|
||||
ffi_type *arg_types[0];
|
||||
} ncode_closure;
|
||||
|
||||
typedef void (*ffi_closure_fun) (ffi_cif*,void*,ffi_raw*,void*);
|
||||
|
||||
void *
|
||||
_Jv_InterpMethod::ncode ()
|
||||
{
|
||||
using namespace java::lang::reflect;
|
||||
|
||||
if (self->ncode != 0)
|
||||
return self->ncode;
|
||||
|
||||
jboolean staticp = (self->accflags & Modifier::STATIC) != 0;
|
||||
int arg_count = _Jv_count_arguments (self->signature, staticp);
|
||||
|
||||
ncode_closure *closure =
|
||||
(ncode_closure*)_Jv_AllocBytes (sizeof (ncode_closure)
|
||||
+ arg_count * sizeof (ffi_type*));
|
||||
|
||||
init_cif (self->signature,
|
||||
arg_count,
|
||||
staticp,
|
||||
&closure->cif,
|
||||
&closure->arg_types[0],
|
||||
NULL);
|
||||
|
||||
ffi_closure_fun fun;
|
||||
|
||||
args_raw_size = FFI_RAW_SIZE (&closure->cif);
|
||||
|
||||
JvAssert ((self->accflags & Modifier::NATIVE) == 0);
|
||||
|
||||
if ((self->accflags & Modifier::SYNCHRONIZED) != 0)
|
||||
{
|
||||
if (staticp)
|
||||
fun = (ffi_closure_fun)&_Jv_InterpMethod::run_synch_class;
|
||||
else
|
||||
fun = (ffi_closure_fun)&_Jv_InterpMethod::run_synch_object;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (staticp)
|
||||
fun = (ffi_closure_fun)&_Jv_InterpMethod::run_class;
|
||||
else
|
||||
fun = (ffi_closure_fun)&_Jv_InterpMethod::run_normal;
|
||||
}
|
||||
|
||||
FFI_PREP_RAW_CLOSURE (&closure->closure,
|
||||
&closure->cif,
|
||||
fun,
|
||||
(void*)this);
|
||||
|
||||
self->ncode = (void*)closure;
|
||||
return self->ncode;
|
||||
}
|
||||
|
||||
void *
|
||||
_Jv_JNIMethod::ncode ()
|
||||
{
|
||||
using namespace java::lang::reflect;
|
||||
|
||||
if (self->ncode != 0)
|
||||
return self->ncode;
|
||||
|
||||
jboolean staticp = (self->accflags & Modifier::STATIC) != 0;
|
||||
int arg_count = _Jv_count_arguments (self->signature, staticp);
|
||||
|
||||
ncode_closure *closure =
|
||||
(ncode_closure*)_Jv_AllocBytes (sizeof (ncode_closure)
|
||||
+ arg_count * sizeof (ffi_type*));
|
||||
|
||||
ffi_type *rtype;
|
||||
init_cif (self->signature,
|
||||
arg_count,
|
||||
staticp,
|
||||
&closure->cif,
|
||||
&closure->arg_types[0],
|
||||
&rtype);
|
||||
|
||||
ffi_closure_fun fun;
|
||||
|
||||
args_raw_size = FFI_RAW_SIZE (&closure->cif);
|
||||
|
||||
// Initialize the argument types and CIF that represent the actual
|
||||
// underlying JNI function.
|
||||
int extra_args = 1;
|
||||
if ((self->accflags & Modifier::STATIC))
|
||||
++extra_args;
|
||||
jni_arg_types = (ffi_type **) _Jv_AllocBytes ((extra_args + arg_count)
|
||||
* sizeof (ffi_type *));
|
||||
int offset = 0;
|
||||
jni_arg_types[offset++] = &ffi_type_pointer;
|
||||
if ((self->accflags & Modifier::STATIC))
|
||||
jni_arg_types[offset++] = &ffi_type_pointer;
|
||||
memcpy (&jni_arg_types[offset], &closure->arg_types[0],
|
||||
arg_count * sizeof (ffi_type *));
|
||||
|
||||
if (ffi_prep_cif (&jni_cif, _Jv_platform_ffi_abi,
|
||||
extra_args + arg_count, rtype,
|
||||
jni_arg_types) != FFI_OK)
|
||||
throw_internal_error ("ffi_prep_cif failed for JNI function");
|
||||
|
||||
JvAssert ((self->accflags & Modifier::NATIVE) != 0);
|
||||
|
||||
// FIXME: for now we assume that all native methods for
|
||||
// interpreted code use JNI.
|
||||
fun = (ffi_closure_fun) &_Jv_JNIMethod::call;
|
||||
|
||||
FFI_PREP_RAW_CLOSURE (&closure->closure,
|
||||
&closure->cif,
|
||||
fun,
|
||||
(void*) this);
|
||||
|
||||
self->ncode = (void *) closure;
|
||||
return self->ncode;
|
||||
}
|
||||
|
||||
static void
|
||||
throw_class_format_error (jstring msg)
|
||||
{
|
||||
throw (msg
|
||||
? new java::lang::ClassFormatError (msg)
|
||||
: new java::lang::ClassFormatError);
|
||||
}
|
||||
|
||||
static void
|
||||
throw_class_format_error (char *msg)
|
||||
{
|
||||
throw_class_format_error (JvNewStringLatin1 (msg));
|
||||
}
|
||||
|
||||
|
||||
|
||||
void
|
||||
_Jv_InterpreterEngine::do_verify (jclass klass)
|
||||
{
|
||||
_Jv_InterpClass *iclass = (_Jv_InterpClass *) klass->aux_info;
|
||||
for (int i = 0; i < klass->method_count; i++)
|
||||
{
|
||||
using namespace java::lang::reflect;
|
||||
_Jv_MethodBase *imeth = iclass->interpreted_methods[i];
|
||||
_Jv_ushort accflags = klass->methods[i].accflags;
|
||||
if ((accflags & (Modifier::NATIVE | Modifier::ABSTRACT)) == 0)
|
||||
{
|
||||
_Jv_InterpMethod *im = reinterpret_cast<_Jv_InterpMethod *> (imeth);
|
||||
_Jv_VerifyMethod (im);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
_Jv_InterpreterEngine::do_create_ncode (jclass klass)
|
||||
{
|
||||
_Jv_InterpClass *iclass = (_Jv_InterpClass *) klass->aux_info;
|
||||
for (int i = 0; i < klass->method_count; i++)
|
||||
{
|
||||
// Just skip abstract methods. This is particularly important
|
||||
// because we don't resize the interpreted_methods array when
|
||||
// miranda methods are added to it.
|
||||
if ((klass->methods[i].accflags
|
||||
& java::lang::reflect::Modifier::ABSTRACT)
|
||||
!= 0)
|
||||
continue;
|
||||
|
||||
_Jv_MethodBase *imeth = iclass->interpreted_methods[i];
|
||||
|
||||
if ((klass->methods[i].accflags & java::lang::reflect::Modifier::NATIVE)
|
||||
!= 0)
|
||||
{
|
||||
// You might think we could use a virtual `ncode' method in
|
||||
// the _Jv_MethodBase and unify the native and non-native
|
||||
// cases. Well, we can't, because we don't allocate these
|
||||
// objects using `new', and thus they don't get a vtable.
|
||||
_Jv_JNIMethod *jnim = reinterpret_cast<_Jv_JNIMethod *> (imeth);
|
||||
klass->methods[i].ncode = jnim->ncode ();
|
||||
}
|
||||
else if (imeth != 0) // it could be abstract
|
||||
{
|
||||
_Jv_InterpMethod *im = reinterpret_cast<_Jv_InterpMethod *> (imeth);
|
||||
klass->methods[i].ncode = im->ncode ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
_Jv_InterpreterEngine::do_allocate_static_fields (jclass klass,
|
||||
int static_size)
|
||||
{
|
||||
_Jv_InterpClass *iclass = (_Jv_InterpClass *) klass->aux_info;
|
||||
|
||||
char *static_data = (char *) _Jv_AllocBytes (static_size);
|
||||
memset (static_data, 0, static_size);
|
||||
|
||||
for (int i = 0; i < klass->field_count; i++)
|
||||
{
|
||||
_Jv_Field *field = &klass->fields[i];
|
||||
|
||||
if ((field->flags & java::lang::reflect::Modifier::STATIC) != 0)
|
||||
{
|
||||
field->u.addr = static_data + field->u.boffset;
|
||||
|
||||
if (iclass->field_initializers[i] != 0)
|
||||
{
|
||||
_Jv_Linker::resolve_field (field, klass->loader);
|
||||
_Jv_InitField (0, klass, i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Now we don't need the field_initializers anymore, so let the
|
||||
// collector get rid of it.
|
||||
iclass->field_initializers = 0;
|
||||
}
|
||||
|
||||
_Jv_ResolvedMethod *
|
||||
_Jv_InterpreterEngine::do_resolve_method (_Jv_Method *method, jclass klass,
|
||||
jboolean staticp, jint vtable_index)
|
||||
{
|
||||
int arg_count = _Jv_count_arguments (method->signature, staticp);
|
||||
|
||||
_Jv_ResolvedMethod* result = (_Jv_ResolvedMethod*)
|
||||
_Jv_AllocBytes (sizeof (_Jv_ResolvedMethod)
|
||||
+ arg_count*sizeof (ffi_type*));
|
||||
|
||||
result->stack_item_count
|
||||
= init_cif (method->signature,
|
||||
arg_count,
|
||||
staticp,
|
||||
&result->cif,
|
||||
&result->arg_types[0],
|
||||
NULL);
|
||||
|
||||
result->vtable_index = vtable_index;
|
||||
result->method = method;
|
||||
result->klass = klass;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
void
|
||||
_Jv_InterpreterEngine::do_post_miranda_hook (jclass klass)
|
||||
{
|
||||
_Jv_InterpClass *iclass = (_Jv_InterpClass *) klass->aux_info;
|
||||
for (int i = 0; i < klass->method_count; i++)
|
||||
{
|
||||
// Just skip abstract methods. This is particularly important
|
||||
// because we don't resize the interpreted_methods array when
|
||||
// miranda methods are added to it.
|
||||
if ((klass->methods[i].accflags
|
||||
& java::lang::reflect::Modifier::ABSTRACT)
|
||||
!= 0)
|
||||
continue;
|
||||
// Miranda method additions mean that the `methods' array moves.
|
||||
// We cache a pointer into this array, so we have to update.
|
||||
iclass->interpreted_methods[i]->self = &klass->methods[i];
|
||||
}
|
||||
}
|
||||
|
||||
#endif // INTERPRETER
|
||||
|
|
|
@ -121,15 +121,15 @@ public class ObjectInputStream extends InputStream
|
|||
*/
|
||||
public final Object readObject() throws ClassNotFoundException, IOException
|
||||
{
|
||||
if (callersClassLoader == null)
|
||||
{
|
||||
callersClassLoader = getCallersClassLoader ();
|
||||
if (Configuration.DEBUG && dump)
|
||||
{
|
||||
dumpElementln ("CallersClassLoader = " + callersClassLoader);
|
||||
}
|
||||
}
|
||||
|
||||
if (callersClassLoader == null)
|
||||
{
|
||||
callersClassLoader = getCallersClassLoader ();
|
||||
if (Configuration.DEBUG && dump)
|
||||
{
|
||||
dumpElementln ("CallersClassLoader = " + callersClassLoader);
|
||||
}
|
||||
}
|
||||
|
||||
if (this.useSubclassMethod)
|
||||
return readObjectOverride();
|
||||
|
||||
|
@ -271,7 +271,7 @@ public class ObjectInputStream extends InputStream
|
|||
readArrayElements(array, componentType);
|
||||
if(dump)
|
||||
for (int i = 0, len = Array.getLength(array); i < len; i++)
|
||||
dumpElementln(" ELEMENT[" + i + "]=" + Array.get(array, i));
|
||||
dumpElementln(" ELEMENT[" + i + "]=" + Array.get(array, i));
|
||||
ret_val = processResolution(null, array, handle);
|
||||
break;
|
||||
}
|
||||
|
@ -398,6 +398,8 @@ public class ObjectInputStream extends InputStream
|
|||
setBlockDataMode(old_mode);
|
||||
|
||||
this.isDeserializing = was_deserializing;
|
||||
|
||||
depth -= 2;
|
||||
|
||||
depth -= 2;
|
||||
|
||||
|
@ -1806,6 +1808,7 @@ public class ObjectInputStream extends InputStream
|
|||
* @param sm SecurityManager instance which should be called.
|
||||
* @return The current class loader in the calling stack.
|
||||
*/
|
||||
|
||||
private static native ClassLoader currentClassLoader (SecurityManager sm);
|
||||
|
||||
private native ClassLoader getCallersClassLoader();
|
||||
|
@ -1875,7 +1878,7 @@ public class ObjectInputStream extends InputStream
|
|||
private int depth = 0;
|
||||
|
||||
private void dumpElement (String msg)
|
||||
{
|
||||
{
|
||||
System.out.print(msg);
|
||||
}
|
||||
|
||||
|
|
|
@ -347,8 +347,8 @@ public class ObjectOutputStream extends OutputStream
|
|||
fieldsAlreadyWritten = false;
|
||||
if (currentObjectStreamClass.hasWriteMethod())
|
||||
{
|
||||
if (dump)
|
||||
dumpElementln ("WRITE METHOD CALLED FOR: " + obj);
|
||||
if (dump)
|
||||
dumpElementln ("WRITE METHOD CALLED FOR: " + obj);
|
||||
setBlockDataMode(true);
|
||||
callWriteMethod(obj, currentObjectStreamClass);
|
||||
setBlockDataMode(false);
|
||||
|
@ -358,10 +358,10 @@ public class ObjectOutputStream extends OutputStream
|
|||
}
|
||||
else
|
||||
{
|
||||
if (dump)
|
||||
dumpElementln ("WRITE FIELDS CALLED FOR: " + obj);
|
||||
writeFields(obj, currentObjectStreamClass);
|
||||
}
|
||||
if (dump)
|
||||
dumpElementln ("WRITE FIELDS CALLED FOR: " + obj);
|
||||
writeFields(obj, currentObjectStreamClass);
|
||||
}
|
||||
}
|
||||
|
||||
this.currentObject = prevObject;
|
||||
|
|
|
@ -42,13 +42,15 @@ enum
|
|||
|
||||
JV_STATE_PRELOADING = 1, // Can do _Jv_FindClass.
|
||||
JV_STATE_LOADING = 3, // Has super installed.
|
||||
JV_STATE_COMPILED = 5, // This was a compiled class.
|
||||
JV_STATE_READ = 4, // Has been completely defined.
|
||||
JV_STATE_LOADED = 5, // Has Miranda methods defined.
|
||||
|
||||
JV_STATE_COMPILED = 6, // This was a compiled class.
|
||||
|
||||
JV_STATE_LOADED = 6, // Is complete.
|
||||
JV_STATE_PREPARED = 7, // Layout & static init done.
|
||||
JV_STATE_LINKED = 9, // Strings interned.
|
||||
|
||||
JV_STATE_IN_PROGRESS = 10, // <Clinit> running.
|
||||
JV_STATE_IN_PROGRESS = 10, // <clinit> running.
|
||||
|
||||
JV_STATE_ERROR = 12,
|
||||
|
||||
|
@ -59,6 +61,9 @@ struct _Jv_Field;
|
|||
struct _Jv_VTable;
|
||||
union _Jv_word;
|
||||
struct _Jv_ArrayVTable;
|
||||
class _Jv_ExecutionEngine;
|
||||
class _Jv_CompiledEngine;
|
||||
class _Jv_InterpreterEngine;
|
||||
|
||||
struct _Jv_Constants
|
||||
{
|
||||
|
@ -106,7 +111,7 @@ union _Jv_IDispatchTable
|
|||
} iface;
|
||||
};
|
||||
|
||||
// Used by _Jv_GetInterfaces ()
|
||||
// Used by _Jv_Linker::get_interfaces ()
|
||||
struct _Jv_ifaces
|
||||
{
|
||||
jclass *list;
|
||||
|
@ -139,6 +144,23 @@ struct _Jv_CatchClass
|
|||
_Jv_Utf8Const *classname;
|
||||
};
|
||||
|
||||
// Possible values for the assertion_code field in the type assertion table.
|
||||
enum
|
||||
{
|
||||
JV_ASSERT_END_OF_TABLE = 0,
|
||||
JV_ASSERT_TYPES_COMPATIBLE = 1,
|
||||
JV_ASSERT_IS_INSTANTIABLE = 2
|
||||
};
|
||||
|
||||
// Entry in the type assertion table, used to validate type constraints
|
||||
// for binary compatibility.
|
||||
struct _Jv_TypeAssertion
|
||||
{
|
||||
jint assertion_code;
|
||||
_Jv_Utf8Const *op1;
|
||||
_Jv_Utf8Const *op2;
|
||||
};
|
||||
|
||||
#define JV_PRIMITIVE_VTABLE ((_Jv_VTable *) -1)
|
||||
|
||||
#define JV_CLASS(Obj) ((jclass) (*(_Jv_VTable **) Obj)->clas)
|
||||
|
@ -149,11 +171,11 @@ struct _Jv_CatchClass
|
|||
_Jv_Method *_Jv_GetMethodLocal (jclass klass, _Jv_Utf8Const *name,
|
||||
_Jv_Utf8Const *signature);
|
||||
jboolean _Jv_IsAssignableFrom (jclass, jclass);
|
||||
jboolean _Jv_IsAssignableFromSlow (jclass, jclass);
|
||||
jboolean _Jv_InterfaceAssignableFrom (jclass, jclass);
|
||||
void _Jv_InitClass (jclass klass);
|
||||
|
||||
_Jv_Method* _Jv_LookupDeclaredMethod (jclass, _Jv_Utf8Const *,
|
||||
_Jv_Utf8Const*);
|
||||
_Jv_Utf8Const*, jclass * = NULL);
|
||||
jfieldID JvGetFirstInstanceField (jclass);
|
||||
jint JvNumInstanceFields (jclass);
|
||||
jfieldID JvGetFirstStaticField (jclass);
|
||||
|
@ -183,10 +205,6 @@ class java::io::ObjectOutputStream;
|
|||
class java::io::ObjectInputStream;
|
||||
class java::io::ObjectStreamClass;
|
||||
|
||||
void _Jv_WaitForState (jclass, int);
|
||||
void _Jv_RegisterClasses (const jclass *classes);
|
||||
void _Jv_RegisterClasses_Counted (const jclass *classes,
|
||||
size_t count);
|
||||
void _Jv_RegisterClassHookDefault (jclass klass);
|
||||
void _Jv_RegisterInitiatingLoader (jclass,java::lang::ClassLoader*);
|
||||
void _Jv_UnregisterClass (jclass);
|
||||
|
@ -205,19 +223,7 @@ void _Jv_InitNewClassFields (jclass klass);
|
|||
|
||||
// Friend functions and classes in prims.cc
|
||||
void _Jv_InitPrimClass (jclass, char *, char, int);
|
||||
void _Jv_PrepareCompiledClass (jclass);
|
||||
void _Jv_PrepareConstantTimeTables (jclass);
|
||||
jshort _Jv_GetInterfaces (jclass, _Jv_ifaces *);
|
||||
void _Jv_GenerateITable (jclass, _Jv_ifaces *, jshort *);
|
||||
jstring _Jv_GetMethodString (jclass, _Jv_Utf8Const *);
|
||||
jshort _Jv_AppendPartialITable (jclass, jclass, void **, jshort);
|
||||
jshort _Jv_FindIIndex (jclass *, jshort *, jshort);
|
||||
void _Jv_LinkSymbolTable (jclass);
|
||||
void _Jv_LayoutInterfaceMethods (jclass);
|
||||
void _Jv_LayoutVTableMethods (jclass klass);
|
||||
void _Jv_SetVTableEntries (jclass, _Jv_VTable *, jboolean *);
|
||||
void _Jv_MakeVTable (jclass);
|
||||
void _Jv_linkExceptionClassTable (jclass);
|
||||
|
||||
jboolean _Jv_CheckAccess (jclass self_klass, jclass other_klass,
|
||||
jint flags);
|
||||
|
@ -225,25 +231,14 @@ jclass _Jv_GetArrayClass (jclass klass, java::lang::ClassLoader *loader);
|
|||
|
||||
#ifdef INTERPRETER
|
||||
jboolean _Jv_IsInterpretedClass (jclass);
|
||||
void _Jv_InitField (jobject, jclass, _Jv_Field*);
|
||||
void _Jv_InitField (jobject, jclass, int);
|
||||
_Jv_word _Jv_ResolvePoolEntry (jclass, int);
|
||||
_Jv_Method *_Jv_SearchMethodInClass (jclass cls, jclass klass,
|
||||
_Jv_Utf8Const *method_name,
|
||||
_Jv_Utf8Const *method_signature);
|
||||
|
||||
void _Jv_PrepareClass (jclass);
|
||||
void _Jv_PrepareMissingMethods (jclass base, jclass iface_class);
|
||||
|
||||
void _Jv_Defer_Resolution (void *cl, _Jv_Method *meth, void **);
|
||||
|
||||
class _Jv_ClassReader;
|
||||
class _Jv_InterpClass;
|
||||
class _Jv_InterpMethod;
|
||||
#endif
|
||||
|
||||
class _Jv_BytecodeVerifier;
|
||||
class _Jv_StackTrace;
|
||||
class gnu::gcj::runtime::StackTrace;
|
||||
class java::io::VMObjectStreamClass;
|
||||
|
||||
|
@ -316,9 +311,14 @@ public:
|
|||
void setSigners(JArray<jobject> *);
|
||||
|
||||
inline jclass getSuperclass (void)
|
||||
{
|
||||
return superclass;
|
||||
}
|
||||
{
|
||||
return superclass;
|
||||
}
|
||||
|
||||
inline jclass getInterface (jint n)
|
||||
{
|
||||
return interfaces[n];
|
||||
}
|
||||
|
||||
inline jboolean isArray (void)
|
||||
{
|
||||
|
@ -351,9 +351,16 @@ public:
|
|||
|
||||
// FIXME: this probably shouldn't be public.
|
||||
jint size (void)
|
||||
{
|
||||
return size_in_bytes;
|
||||
}
|
||||
{
|
||||
return size_in_bytes;
|
||||
}
|
||||
|
||||
// The index of the first method we declare ourself (as opposed to
|
||||
// inheriting).
|
||||
inline jint firstMethodIndex (void)
|
||||
{
|
||||
return vtable_method_count - method_count;
|
||||
}
|
||||
|
||||
// finalization
|
||||
void finalize ();
|
||||
|
@ -372,10 +379,17 @@ private:
|
|||
|
||||
static jstring getPackagePortion (jstring);
|
||||
|
||||
void set_state (jint nstate)
|
||||
{
|
||||
state = nstate;
|
||||
notifyAll ();
|
||||
}
|
||||
|
||||
// Friend functions implemented in natClass.cc.
|
||||
friend _Jv_Method *::_Jv_GetMethodLocal (jclass klass, _Jv_Utf8Const *name,
|
||||
_Jv_Utf8Const *signature);
|
||||
friend jboolean (::_Jv_IsAssignableFrom) (jclass, jclass);
|
||||
friend jboolean (::_Jv_IsAssignableFromSlow) (jclass, jclass);
|
||||
friend jboolean (::_Jv_InterfaceAssignableFrom) (jclass, jclass);
|
||||
friend void *::_Jv_LookupInterfaceMethodIdx (jclass klass, jclass iface,
|
||||
int method_idx);
|
||||
|
@ -383,7 +397,7 @@ private:
|
|||
friend void ::_Jv_InitClass (jclass klass);
|
||||
|
||||
friend _Jv_Method* ::_Jv_LookupDeclaredMethod (jclass, _Jv_Utf8Const *,
|
||||
_Jv_Utf8Const*);
|
||||
_Jv_Utf8Const*, jclass *);
|
||||
friend jfieldID (::JvGetFirstInstanceField) (jclass);
|
||||
friend jint (::JvNumInstanceFields) (jclass);
|
||||
friend jfieldID (::JvGetFirstStaticField) (jclass);
|
||||
|
@ -413,7 +427,6 @@ private:
|
|||
friend class java::io::ObjectInputStream;
|
||||
friend class java::io::ObjectStreamClass;
|
||||
|
||||
friend void ::_Jv_WaitForState (jclass, int);
|
||||
friend void ::_Jv_RegisterClasses (const jclass *classes);
|
||||
friend void ::_Jv_RegisterClasses_Counted (const jclass *classes,
|
||||
size_t count);
|
||||
|
@ -436,40 +449,22 @@ private:
|
|||
// in prims.cc
|
||||
friend void ::_Jv_InitPrimClass (jclass, char *, char, int);
|
||||
|
||||
friend void ::_Jv_PrepareCompiledClass (jclass);
|
||||
friend void ::_Jv_PrepareConstantTimeTables (jclass);
|
||||
friend jshort (::_Jv_GetInterfaces) (jclass, _Jv_ifaces *);
|
||||
friend void ::_Jv_GenerateITable (jclass, _Jv_ifaces *, jshort *);
|
||||
friend jstring (::_Jv_GetMethodString) (jclass, _Jv_Utf8Const *);
|
||||
friend jshort (::_Jv_AppendPartialITable) (jclass, jclass, void **, jshort);
|
||||
friend jshort (::_Jv_FindIIndex) (jclass *, jshort *, jshort);
|
||||
friend void ::_Jv_LinkSymbolTable (jclass);
|
||||
friend void ::_Jv_LayoutInterfaceMethods (jclass);
|
||||
friend void ::_Jv_LayoutVTableMethods (jclass klass);
|
||||
friend void ::_Jv_SetVTableEntries (jclass, _Jv_VTable *, jboolean *);
|
||||
friend void ::_Jv_MakeVTable (jclass);
|
||||
friend void ::_Jv_linkExceptionClassTable (jclass);
|
||||
|
||||
friend jboolean (::_Jv_CheckAccess) (jclass self_klass, jclass other_klass,
|
||||
jint flags);
|
||||
|
||||
friend bool _Jv_getInterfaceMethod(jclass, jclass&, int&,
|
||||
const _Jv_Utf8Const*,
|
||||
const _Jv_Utf8Const*);
|
||||
|
||||
friend jclass (::_Jv_GetArrayClass) (jclass klass,
|
||||
java::lang::ClassLoader *loader);
|
||||
|
||||
#ifdef INTERPRETER
|
||||
friend jboolean (::_Jv_IsInterpretedClass) (jclass);
|
||||
friend void ::_Jv_InitField (jobject, jclass, _Jv_Field*);
|
||||
friend void ::_Jv_InitField (jobject, jclass, int);
|
||||
friend _Jv_word (::_Jv_ResolvePoolEntry) (jclass, int);
|
||||
friend _Jv_Method *::_Jv_SearchMethodInClass (jclass cls, jclass klass,
|
||||
_Jv_Utf8Const *method_name,
|
||||
_Jv_Utf8Const *method_signature);
|
||||
|
||||
friend void ::_Jv_PrepareClass (jclass);
|
||||
friend void ::_Jv_PrepareMissingMethods (jclass base, jclass iface_class);
|
||||
|
||||
friend void ::_Jv_Defer_Resolution (void *cl, _Jv_Method *meth, void **);
|
||||
|
||||
friend class ::_Jv_ClassReader;
|
||||
friend class ::_Jv_InterpClass;
|
||||
friend class ::_Jv_InterpMethod;
|
||||
|
@ -480,10 +475,14 @@ private:
|
|||
#endif
|
||||
|
||||
friend class ::_Jv_BytecodeVerifier;
|
||||
friend class ::_Jv_StackTrace;
|
||||
friend class gnu::gcj::runtime::StackTrace;
|
||||
friend class java::io::VMObjectStreamClass;
|
||||
|
||||
friend class _Jv_Linker;
|
||||
friend class _Jv_ExecutionEngine;
|
||||
friend class _Jv_CompiledEngine;
|
||||
friend class _Jv_InterpreterEngine;
|
||||
|
||||
friend void ::_Jv_sharedlib_register_hook (jclass klass);
|
||||
|
||||
// Chain for class pool.
|
||||
|
@ -518,8 +517,12 @@ private:
|
|||
_Jv_OffsetTable *otable;
|
||||
// Offset table symbols.
|
||||
_Jv_MethodSymbol *otable_syms;
|
||||
// Address table
|
||||
_Jv_AddressTable *atable;
|
||||
_Jv_MethodSymbol *atable_syms;
|
||||
// Interface table
|
||||
_Jv_AddressTable *itable;
|
||||
_Jv_MethodSymbol *itable_syms;
|
||||
_Jv_CatchClass *catch_classes;
|
||||
// Interfaces implemented by this class.
|
||||
jclass *interfaces;
|
||||
|
@ -542,13 +545,17 @@ private:
|
|||
jclass arrayclass;
|
||||
// Security Domain to which this class belongs (or null).
|
||||
java::security::ProtectionDomain *protectionDomain;
|
||||
// Pointer to the type assertion table for this class.
|
||||
_Jv_TypeAssertion *assertion_table;
|
||||
// Signers of this class (or null).
|
||||
JArray<jobject> *hack_signers;
|
||||
// Used by Jv_PopClass and _Jv_PushClass to communicate with StackTrace.
|
||||
jclass chain;
|
||||
// Additional data, specific to the generator (JIT, native, interpreter) of this
|
||||
// class.
|
||||
// Additional data, specific to the generator (JIT, native,
|
||||
// interpreter) of this class.
|
||||
void *aux_info;
|
||||
// Execution engine.
|
||||
_Jv_ExecutionEngine *engine;
|
||||
};
|
||||
|
||||
// Inline functions that are friends of java::lang::Class
|
||||
|
|
|
@ -288,6 +288,8 @@ public abstract class ClassLoader
|
|||
if (c != null)
|
||||
return c;
|
||||
|
||||
ClassNotFoundException ex = null;
|
||||
|
||||
// Can the class be loaded by a parent?
|
||||
try
|
||||
{
|
||||
|
@ -304,9 +306,20 @@ public abstract class ClassLoader
|
|||
}
|
||||
catch (ClassNotFoundException e)
|
||||
{
|
||||
ex = e;
|
||||
}
|
||||
// Still not found, we have to do it ourself.
|
||||
c = findClass(name);
|
||||
try
|
||||
{
|
||||
c = findClass(name);
|
||||
}
|
||||
catch (ClassNotFoundException cause)
|
||||
{
|
||||
if (ex != null)
|
||||
throw new ClassNotFoundException(ex.toString(), cause);
|
||||
else
|
||||
throw cause;
|
||||
}
|
||||
if (resolve)
|
||||
resolveClass(c);
|
||||
return c;
|
||||
|
@ -435,8 +448,9 @@ public abstract class ClassLoader
|
|||
domain = defaultProtectionDomain;
|
||||
if (! initialized)
|
||||
throw new SecurityException("attempt to define class from uninitialized class loader");
|
||||
|
||||
Class retval = VMClassLoader.defineClass(this, name, data,
|
||||
offset, len, domain);
|
||||
offset, len, domain);
|
||||
loadedClasses.put(retval.getName(), retval);
|
||||
return retval;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Compiler.java -- placeholder for Java-to-native runtime compilers
|
||||
Copyright (C) 1998, 1999, 2001, 2002 Free Software Foundation, Inc.
|
||||
Copyright (C) 1998, 1999, 2001, 2002, 2004 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Classpath.
|
||||
|
||||
|
@ -76,8 +76,7 @@ public final class Compiler
|
|||
*/
|
||||
public static boolean compileClass(Class oneClass)
|
||||
{
|
||||
// Never succeed.
|
||||
return false;
|
||||
return VMCompiler.compileClass(oneClass);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -90,8 +89,7 @@ public final class Compiler
|
|||
*/
|
||||
public static boolean compileClasses(String classNames)
|
||||
{
|
||||
// Note the incredibly lame interface. Always fail.
|
||||
return false;
|
||||
return VMCompiler.compileClasses(classNames);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -105,8 +103,7 @@ public final class Compiler
|
|||
*/
|
||||
public static Object command(Object arg)
|
||||
{
|
||||
// Our implementation defines this to a no-op.
|
||||
return null;
|
||||
return VMCompiler.command(arg);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -116,6 +113,7 @@ public final class Compiler
|
|||
*/
|
||||
public static void enable()
|
||||
{
|
||||
VMCompiler.enable();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -124,5 +122,6 @@ public final class Compiler
|
|||
*/
|
||||
public static void disable()
|
||||
{
|
||||
VMCompiler.disable();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -324,7 +324,7 @@ public class SecurityManager
|
|||
public void checkPermission(Permission perm)
|
||||
{
|
||||
// XXX Should be: AccessController.checkPermission(perm);
|
||||
throw new SecurityException("Operation not allowed");
|
||||
//.throw new SecurityException("Operation not allowed");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -553,7 +553,7 @@ public class SecurityManager
|
|||
// throw new SecurityException("Missing context");
|
||||
// AccessControlContext ac = (AccessControlContext) context;
|
||||
// ac.checkPermission(new FilePermission(filename, "read"));
|
||||
throw new SecurityException("Cannot read files via file names.");
|
||||
// throw new SecurityException("Cannot read files via file names.");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -677,7 +677,7 @@ public class SecurityManager
|
|||
// // Use the toString() hack to do the null check.
|
||||
// ac.checkPermission(new SocketPermission(host.toString + ":" +port,
|
||||
// "connect"));
|
||||
throw new SecurityException("Cannot make network connections.");
|
||||
// throw new SecurityException("Cannot make network connections.");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -97,44 +97,31 @@ final class VMClassLoader
|
|||
ProtectionDomain pd)
|
||||
throws ClassFormatError;
|
||||
|
||||
static final native void linkClass0 (Class klass);
|
||||
static final native void markClassErrorState0 (Class klass);
|
||||
|
||||
/**
|
||||
* Helper to resolve all references to other classes from this class.
|
||||
*
|
||||
* @param c the class to resolve
|
||||
*/
|
||||
static final void resolveClass(Class clazz)
|
||||
{
|
||||
synchronized (clazz)
|
||||
{
|
||||
try
|
||||
{
|
||||
linkClass0 (clazz);
|
||||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
markClassErrorState0 (clazz);
|
||||
static final native void resolveClass(Class clazz);
|
||||
|
||||
LinkageError e;
|
||||
if (x instanceof LinkageError)
|
||||
e = (LinkageError) x;
|
||||
else if (x instanceof ClassNotFoundException)
|
||||
{
|
||||
e = new NoClassDefFoundError("while resolving class: "
|
||||
+ clazz.getName());
|
||||
e.initCause (x);
|
||||
}
|
||||
else
|
||||
{
|
||||
e = new LinkageError ("unexpected exception during linking: "
|
||||
+ clazz.getName());
|
||||
e.initCause (x);
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
static final void transformException(Class clazz, Throwable x)
|
||||
{
|
||||
LinkageError e;
|
||||
if (x instanceof LinkageError)
|
||||
e = (LinkageError) x;
|
||||
else if (x instanceof ClassNotFoundException)
|
||||
{
|
||||
e = new NoClassDefFoundError("while resolving class: "
|
||||
+ clazz.getName());
|
||||
e.initCause (x);
|
||||
}
|
||||
else
|
||||
{
|
||||
e = new LinkageError ("unexpected exception during linking: "
|
||||
+ clazz.getName());
|
||||
e.initCause (x);
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
332
libjava/java/lang/VMCompiler.java
Normal file
332
libjava/java/lang/VMCompiler.java
Normal file
|
@ -0,0 +1,332 @@
|
|||
/* VMClassLoader.java -- Reference implementation of compiler interface
|
||||
Copyright (C) 2004 Free Software Foundation
|
||||
|
||||
This file is part of GNU Classpath.
|
||||
|
||||
GNU Classpath is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU Classpath is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
Linking this library statically or dynamically with other modules is
|
||||
making a combined work based on this library. Thus, the terms and
|
||||
conditions of the GNU General Public License cover the whole
|
||||
combination.
|
||||
|
||||
As a special exception, the copyright holders of this library give you
|
||||
permission to link this library with independent modules to produce an
|
||||
executable, regardless of the license terms of these independent
|
||||
modules, and to copy and distribute the resulting executable under
|
||||
terms of your choice, provided that you also meet, for each linked
|
||||
independent module, the terms and conditions of the license of that
|
||||
module. An independent module is a module which is not derived from
|
||||
or based on this library. If you modify this library, you may extend
|
||||
this exception to your version of the library, but you are not
|
||||
obligated to do so. If you do not wish to do so, delete this
|
||||
exception statement from your version. */
|
||||
|
||||
package java.lang;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.security.MessageDigest;
|
||||
import java.security.ProtectionDomain;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.util.WeakHashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Enumeration;
|
||||
import java.util.StringTokenizer;
|
||||
import java.util.Vector;
|
||||
import gnu.gcj.runtime.SharedLibHelper;
|
||||
import gnu.gcj.runtime.PersistentByteMap;
|
||||
|
||||
/**
|
||||
* This class is just a per-VM reflection of java.lang.Compiler.
|
||||
* All methods are defined identically.
|
||||
*/
|
||||
final class VMCompiler
|
||||
{
|
||||
// True if we want to use gcj-jit.
|
||||
public static boolean useCompiler = true;
|
||||
|
||||
// True if we're able to use gcj-jit.
|
||||
public static final boolean canUseCompiler;
|
||||
|
||||
// Compiler to use.
|
||||
public static String gcjJitCompiler;
|
||||
|
||||
// Compiler options.
|
||||
public static String gcjJitCompilerOptions;
|
||||
|
||||
// Temporary directory to use.
|
||||
public static String gcjJitTmpdir;
|
||||
|
||||
// This maps a ClassLoader to a set of SharedLibHelper objects that
|
||||
// it has used. We do things this way to ensure that a
|
||||
// SharedLibHelper is collected if and only if the ClassLoader is.
|
||||
private static WeakHashMap sharedHelperMap = new WeakHashMap();
|
||||
|
||||
private static Vector precompiledMapFiles;
|
||||
|
||||
static
|
||||
{
|
||||
gcjJitCompiler = System.getProperty("gnu.gcj.jit.compiler");
|
||||
if (gcjJitCompiler == null)
|
||||
canUseCompiler = false;
|
||||
else
|
||||
{
|
||||
gcjJitCompilerOptions = System.getProperty("gnu.gcj.jit.options",
|
||||
"-g");
|
||||
gcjJitTmpdir = System.getProperty("gnu.gcj.jit.cachedir");
|
||||
// Note that we *don't* choose java.io.tmpdir as a default --
|
||||
// that would allow easy attacks against the VM.
|
||||
if (gcjJitTmpdir == null)
|
||||
canUseCompiler = false;
|
||||
else
|
||||
canUseCompiler = true;
|
||||
}
|
||||
|
||||
String prop = System.getProperty ("gnu.gcj.precompiled.db.path");
|
||||
if (prop != null)
|
||||
{
|
||||
precompiledMapFiles = new Vector();
|
||||
// Add the
|
||||
StringTokenizer st
|
||||
= new StringTokenizer (prop,
|
||||
System.getProperty ("path.separator", ":"));
|
||||
{
|
||||
while (st.hasMoreElements ())
|
||||
{
|
||||
String e = st.nextToken ();
|
||||
try
|
||||
{
|
||||
PersistentByteMap map
|
||||
= new PersistentByteMap
|
||||
(e, PersistentByteMap.AccessMode.READ_ONLY);
|
||||
precompiledMapFiles.add(map);
|
||||
}
|
||||
catch (IllegalArgumentException _)
|
||||
{
|
||||
// Not a map file
|
||||
}
|
||||
catch (java.io.IOException _)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Don't allow new `Compiler's to be made.
|
||||
*/
|
||||
private VMCompiler()
|
||||
{
|
||||
}
|
||||
|
||||
private static Class loadSharedLibrary(ClassLoader loader,
|
||||
String fileName,
|
||||
ProtectionDomain domain,
|
||||
String className)
|
||||
{
|
||||
Class c = null;
|
||||
SharedLibHelper helper
|
||||
= SharedLibHelper.findHelper (loader, fileName, domain.getCodeSource());
|
||||
c = helper.findClass (className);
|
||||
if (c != null)
|
||||
{
|
||||
HashSet hs = (HashSet) sharedHelperMap.get(loader);
|
||||
if (hs == null)
|
||||
{
|
||||
hs = new HashSet();
|
||||
sharedHelperMap.put(loader, hs);
|
||||
}
|
||||
hs.add(helper);
|
||||
}
|
||||
return c;
|
||||
}
|
||||
|
||||
/**
|
||||
* Compile a class given the bytes for it. Returns the Class, or
|
||||
* null if compilation failed or otherwise could not be done.
|
||||
*/
|
||||
public static Class compileClass(ClassLoader loader,
|
||||
String name, byte[] data,
|
||||
int offset, int len,
|
||||
ProtectionDomain domain)
|
||||
{
|
||||
if (precompiledMapFiles == null
|
||||
&& (! useCompiler || ! canUseCompiler))
|
||||
return null;
|
||||
|
||||
byte digest[];
|
||||
|
||||
try
|
||||
{
|
||||
MessageDigest md = MessageDigest.getInstance("MD5");
|
||||
digest = md.digest(data);
|
||||
}
|
||||
catch (NoSuchAlgorithmException _)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
// We use lookaside cache files to determine whether these bytes
|
||||
// correspond to a class file that is part of a precompiled DSO.
|
||||
if (precompiledMapFiles != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
Enumeration elements = precompiledMapFiles.elements();
|
||||
while (elements.hasMoreElements())
|
||||
{
|
||||
PersistentByteMap map = (PersistentByteMap)elements.nextElement();
|
||||
byte[] soName = map.get(digest);
|
||||
if (soName != null)
|
||||
return loadSharedLibrary(loader,
|
||||
new String(soName),
|
||||
domain, name);
|
||||
}
|
||||
}
|
||||
catch (Exception _)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
if (! useCompiler || ! canUseCompiler)
|
||||
return null;
|
||||
|
||||
try
|
||||
{
|
||||
// FIXME: Make sure that the class represented by the
|
||||
// bytes in DATA really is the class named in NAME. Make
|
||||
// sure it's not "java.*".
|
||||
StringBuffer hexBytes = new StringBuffer(gcjJitTmpdir);
|
||||
hexBytes.append(File.separatorChar);
|
||||
int digestLength = digest.length;
|
||||
for (int i = 0; i < digestLength; ++i)
|
||||
hexBytes.append(Integer.toHexString(digest[i] & 0xff));
|
||||
|
||||
// FIXME: use System.mapLibraryName?
|
||||
// I'm thinking we should use that, plus a class specified
|
||||
// via a property that determines lookup policy.
|
||||
File soFile = new File(hexBytes + ".so");
|
||||
if (soFile.isFile())
|
||||
return loadSharedLibrary (loader, soFile.toString(), domain,
|
||||
name);
|
||||
|
||||
File classFile = new File(hexBytes + ".class");
|
||||
classFile.delete();
|
||||
if (classFile.createNewFile() != true)
|
||||
return null;
|
||||
|
||||
FileOutputStream f = new FileOutputStream (classFile);
|
||||
// FIXME: race condition if bytes change... ?
|
||||
f.write(data, offset, len);
|
||||
|
||||
// Invoke the compiler.
|
||||
StringBuffer command = new StringBuffer(gcjJitCompiler);
|
||||
command.append(" ");
|
||||
command.append(classFile);
|
||||
command.append(" ");
|
||||
command.append(gcjJitCompilerOptions);
|
||||
// These options are required.
|
||||
command.append(" -findirect-dispatch -fjni -shared -fPIC -o ");
|
||||
command.append(soFile);
|
||||
Process p = Runtime.getRuntime().exec(command.toString());
|
||||
|
||||
// Read the process' stderr into a string.
|
||||
StringBuffer err = new StringBuffer();
|
||||
InputStreamReader stderr = new InputStreamReader (p.getErrorStream());
|
||||
char[] inBuf = new char[500];
|
||||
int bytesRead;
|
||||
while ((bytesRead = stderr.read (inBuf)) != -1)
|
||||
err.append(inBuf, 0, bytesRead);
|
||||
|
||||
if (p.waitFor() != 0)
|
||||
{
|
||||
// FIXME: we could log err.toString() somewhere...
|
||||
return null;
|
||||
}
|
||||
|
||||
return loadSharedLibrary(loader, soFile.toString(), domain, name);
|
||||
}
|
||||
catch (Exception _)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Compile the class named by <code>oneClass</code>.
|
||||
*
|
||||
* @param oneClass the class to compile
|
||||
* @return <code>false</code> if no compiler is available or
|
||||
* compilation failed, <code>true</code> if compilation succeeded
|
||||
* @throws NullPointerException if oneClass is null
|
||||
*/
|
||||
public static boolean compileClass(Class oneClass)
|
||||
{
|
||||
// Never succeed.
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Compile the classes whose name matches <code>classNames</code>.
|
||||
*
|
||||
* @param classNames the name of classes to compile
|
||||
* @return <code>false</code> if no compiler is available or
|
||||
* compilation failed, <code>true</code> if compilation succeeded
|
||||
* @throws NullPointerException if classNames is null
|
||||
*/
|
||||
public static boolean compileClasses(String classNames)
|
||||
{
|
||||
// Note the incredibly lame interface. Always fail.
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method examines the argument and performs an operation
|
||||
* according to the compilers documentation. No specific operation
|
||||
* is required.
|
||||
*
|
||||
* @param arg a compiler-specific argument
|
||||
* @return a compiler-specific value, including null
|
||||
* @throws NullPointerException if the compiler doesn't like a null arg
|
||||
*/
|
||||
public static Object command(Object arg)
|
||||
{
|
||||
// Our implementation defines this to a no-op.
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Calling <code>Compiler.enable()</code> will cause the compiler
|
||||
* to resume operation if it was previously disabled; provided that a
|
||||
* compiler even exists.
|
||||
*/
|
||||
public static void enable()
|
||||
{
|
||||
useCompiler = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Calling <code>Compiler.disable()</code> will cause the compiler
|
||||
* to be suspended; provided that a compiler even exists.
|
||||
*/
|
||||
public static void disable()
|
||||
{
|
||||
useCompiler = false;
|
||||
}
|
||||
}
|
|
@ -54,11 +54,12 @@ class VMSecurityManager
|
|||
// The docs above are wrong. See the online docs.
|
||||
// FIXME this implementation is a bit wrong too -- the docs say we
|
||||
// must also consider ancestors of the system class loader.
|
||||
ClassLoader systemClassLoader = VMClassLoader.getSystemClassLoader();
|
||||
Class[] classStack = getClassContext ();
|
||||
for (int i = 0; i < classStack.length; i++)
|
||||
{
|
||||
ClassLoader loader = classStack[i].getClassLoader();
|
||||
if (loader != null)
|
||||
if (loader != null && loader != systemClassLoader)
|
||||
return loader;
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -18,6 +18,7 @@ details. */
|
|||
|
||||
#include <gcj/cni.h>
|
||||
#include <jvm.h>
|
||||
#include <execution.h>
|
||||
|
||||
#include <java-threads.h>
|
||||
#include <java-interp.h>
|
||||
|
@ -33,6 +34,7 @@ details. */
|
|||
#include <java/lang/ClassNotFoundException.h>
|
||||
#include <java/lang/ClassCircularityError.h>
|
||||
#include <java/lang/IncompatibleClassChangeError.h>
|
||||
#include <java/lang/ClassFormatError.h>
|
||||
#include <java/lang/VirtualMachineError.h>
|
||||
#include <java/lang/VMClassLoader.h>
|
||||
#include <java/lang/reflect/Modifier.h>
|
||||
|
@ -41,156 +43,6 @@ details. */
|
|||
#include <java/io/Serializable.h>
|
||||
#include <java/lang/Cloneable.h>
|
||||
|
||||
void
|
||||
_Jv_WaitForState (jclass klass, int state)
|
||||
{
|
||||
if (klass->state >= state)
|
||||
return;
|
||||
|
||||
_Jv_MonitorEnter (klass) ;
|
||||
|
||||
if (klass->state == JV_STATE_COMPILED)
|
||||
{
|
||||
klass->state = JV_STATE_LOADED;
|
||||
if (gcj::verbose_class_flag)
|
||||
fprintf (stderr, "[Loaded (pre-compiled) %s]\n", klass->name->chars());
|
||||
}
|
||||
if (state == JV_STATE_LINKED)
|
||||
{
|
||||
// Must call _Jv_PrepareCompiledClass while holding the class
|
||||
// mutex.
|
||||
#ifdef INTERPRETER
|
||||
if (_Jv_IsInterpretedClass (klass))
|
||||
_Jv_PrepareClass (klass);
|
||||
#endif
|
||||
_Jv_PrepareCompiledClass (klass);
|
||||
_Jv_MonitorExit (klass);
|
||||
return;
|
||||
}
|
||||
|
||||
java::lang::Thread *self = java::lang::Thread::currentThread();
|
||||
|
||||
// this is similar to the strategy for class initialization.
|
||||
// if we already hold the lock, just leave.
|
||||
while (klass->state <= state
|
||||
&& klass->thread
|
||||
&& klass->thread != self)
|
||||
klass->wait ();
|
||||
|
||||
_Jv_MonitorExit (klass);
|
||||
|
||||
if (klass->state == JV_STATE_ERROR)
|
||||
throw new java::lang::LinkageError;
|
||||
}
|
||||
|
||||
typedef unsigned int uaddr __attribute__ ((mode (pointer)));
|
||||
|
||||
/** This function does class-preparation for compiled classes.
|
||||
NOTE: It contains replicated functionality from
|
||||
_Jv_ResolvePoolEntry, and this is intentional, since that function
|
||||
lives in resolve.cc which is entirely conditionally compiled.
|
||||
*/
|
||||
void
|
||||
_Jv_PrepareCompiledClass (jclass klass)
|
||||
{
|
||||
jint state = klass->state;
|
||||
if (state >= JV_STATE_LINKED)
|
||||
return;
|
||||
|
||||
// Short-circuit, so that mutually dependent classes are ok.
|
||||
klass->state = JV_STATE_LINKED;
|
||||
|
||||
_Jv_Constants *pool = &klass->constants;
|
||||
|
||||
// Resolve class constants first, since other constant pool
|
||||
// entries may rely on these.
|
||||
for (int index = 1; index < pool->size; ++index)
|
||||
{
|
||||
if (pool->tags[index] == JV_CONSTANT_Class)
|
||||
{
|
||||
_Jv_Utf8Const *name = pool->data[index].utf8;
|
||||
|
||||
jclass found;
|
||||
if (name->first() == '[')
|
||||
found = _Jv_FindClassFromSignature (name->chars(),
|
||||
klass->loader);
|
||||
else
|
||||
found = _Jv_FindClass (name, klass->loader);
|
||||
|
||||
if (! found)
|
||||
{
|
||||
jstring str = name->toString();
|
||||
throw new java::lang::NoClassDefFoundError (str);
|
||||
}
|
||||
|
||||
pool->data[index].clazz = found;
|
||||
pool->tags[index] |= JV_CONSTANT_ResolvedFlag;
|
||||
}
|
||||
}
|
||||
|
||||
// If superclass looks like a constant pool entry,
|
||||
// resolve it now.
|
||||
if ((uaddr) klass->superclass < pool->size)
|
||||
klass->superclass = pool->data[(uaddr) klass->superclass].clazz;
|
||||
|
||||
// Likewise for interfaces.
|
||||
for (int i = 0; i < klass->interface_count; i++)
|
||||
if ((uaddr) klass->interfaces[i] < pool->size)
|
||||
klass->interfaces[i] = pool->data[(uaddr) klass->interfaces[i]].clazz;
|
||||
|
||||
// Resolve the remaining constant pool entries.
|
||||
for (int index = 1; index < pool->size; ++index)
|
||||
{
|
||||
if (pool->tags[index] == JV_CONSTANT_String)
|
||||
{
|
||||
jstring str;
|
||||
|
||||
str = _Jv_NewStringUtf8Const (pool->data[index].utf8);
|
||||
pool->data[index].o = str;
|
||||
pool->tags[index] |= JV_CONSTANT_ResolvedFlag;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef INTERPRETER
|
||||
// FIXME: although the comment up top says that this function is
|
||||
// only called for compiled classes, it is actually called for every
|
||||
// class.
|
||||
if (! _Jv_IsInterpretedClass (klass))
|
||||
{
|
||||
#endif /* INTERPRETER */
|
||||
jfieldID f = JvGetFirstStaticField (klass);
|
||||
for (int n = JvNumStaticFields (klass); n > 0; --n)
|
||||
{
|
||||
int mod = f->getModifiers ();
|
||||
// If we have a static String field with a non-null initial
|
||||
// value, we know it points to a Utf8Const.
|
||||
_Jv_ResolveField(f, klass->loader);
|
||||
if (f->getClass () == &java::lang::String::class$
|
||||
&& java::lang::reflect::Modifier::isStatic (mod))
|
||||
{
|
||||
jstring *strp = (jstring *) f->u.addr;
|
||||
if (*strp)
|
||||
*strp = _Jv_NewStringUtf8Const ((_Jv_Utf8Const *) *strp);
|
||||
}
|
||||
f = f->getNextField ();
|
||||
}
|
||||
#ifdef INTERPRETER
|
||||
}
|
||||
#endif /* INTERPRETER */
|
||||
|
||||
if (klass->isInterface ())
|
||||
_Jv_LayoutInterfaceMethods (klass);
|
||||
|
||||
if (state == JV_STATE_COMPILED && gcj::verbose_class_flag)
|
||||
fprintf (stderr, "[Loaded (pre-compiled) %s]\n",
|
||||
klass->name->chars());
|
||||
|
||||
klass->notifyAll ();
|
||||
|
||||
_Jv_PushClass (klass);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// A single class can have many "initiating" class loaders,
|
||||
// and a single "defining" class loader. The Defining
|
||||
|
@ -221,6 +73,8 @@ static _Jv_LoaderInfo *initiated_classes[HASH_LEN];
|
|||
static jclass loaded_classes[HASH_LEN];
|
||||
|
||||
// This is the root of a linked list of classes
|
||||
static jclass stack_head;
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -323,11 +177,6 @@ _Jv_RegisterClasses (const jclass *classes)
|
|||
jclass klass = *classes;
|
||||
|
||||
(*_Jv_RegisterClassHook) (klass);
|
||||
|
||||
// registering a compiled class causes
|
||||
// it to be immediately "prepared".
|
||||
if (klass->state == JV_STATE_NOTHING)
|
||||
klass->state = JV_STATE_COMPILED;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -341,11 +190,6 @@ _Jv_RegisterClasses_Counted (const jclass * classes, size_t count)
|
|||
jclass klass = classes[i];
|
||||
|
||||
(*_Jv_RegisterClassHook) (klass);
|
||||
|
||||
// registering a compiled class causes
|
||||
// it to be immediately "prepared".
|
||||
if (klass->state == JV_STATE_NOTHING)
|
||||
klass->state = JV_STATE_COMPILED;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -354,8 +198,10 @@ _Jv_RegisterClassHookDefault (jclass klass)
|
|||
{
|
||||
jint hash = HASH_UTF (klass->name);
|
||||
|
||||
jclass check_class = loaded_classes[hash];
|
||||
|
||||
// The BC ABI makes this check unnecessary: we always resolve all
|
||||
// data references via the appropriate class loader, so the kludge
|
||||
// that required this check has gone.
|
||||
#if 0
|
||||
// If the class is already registered, don't re-register it.
|
||||
while (check_class != NULL)
|
||||
{
|
||||
|
@ -381,7 +227,11 @@ _Jv_RegisterClassHookDefault (jclass klass)
|
|||
|
||||
check_class = check_class->next;
|
||||
}
|
||||
#endif
|
||||
|
||||
// FIXME: this is really bogus!
|
||||
if (! klass->engine)
|
||||
klass->engine = &_Jv_soleCompiledEngine;
|
||||
klass->next = loaded_classes[hash];
|
||||
loaded_classes[hash] = klass;
|
||||
}
|
||||
|
@ -442,7 +292,7 @@ _Jv_FindClass (_Jv_Utf8Const *name, java::lang::ClassLoader *loader)
|
|||
{
|
||||
// we need classes to be in the hash while
|
||||
// we're loading, so that they can refer to themselves.
|
||||
_Jv_WaitForState (klass, JV_STATE_LOADED);
|
||||
_Jv_Linker::wait_for_state (klass, JV_STATE_LOADED);
|
||||
}
|
||||
|
||||
return klass;
|
||||
|
@ -555,7 +405,7 @@ _Jv_NewArrayClass (jclass element, java::lang::ClassLoader *loader,
|
|||
// cache one and reuse it. It is not necessary to synchronize this.
|
||||
if (!array_idt)
|
||||
{
|
||||
_Jv_PrepareConstantTimeTables (array_class);
|
||||
_Jv_Linker::wait_for_state(array_class, JV_STATE_PREPARED);
|
||||
array_idt = array_class->idt;
|
||||
array_depth = array_class->depth;
|
||||
array_ancestors = array_class->ancestors;
|
||||
|
@ -569,19 +419,19 @@ _Jv_NewArrayClass (jclass element, java::lang::ClassLoader *loader,
|
|||
|
||||
using namespace java::lang::reflect;
|
||||
{
|
||||
// Array classes are "abstract final"...
|
||||
_Jv_ushort accflags = Modifier::FINAL | Modifier::ABSTRACT;
|
||||
// ... and inherit accessibility from element type, per vmspec 5.3.3.2
|
||||
accflags |= (element->accflags & Modifier::PUBLIC);
|
||||
accflags |= (element->accflags & Modifier::PROTECTED);
|
||||
accflags |= (element->accflags & Modifier::PRIVATE);
|
||||
// Array classes are "abstract final" and inherit accessibility
|
||||
// from element type, per vmspec 5.3.3.2
|
||||
_Jv_ushort accflags = (Modifier::FINAL | Modifier::ABSTRACT
|
||||
| (element->accflags
|
||||
& (Modifier::PUBLIC | Modifier::PROTECTED
|
||||
| Modifier::PRIVATE)));
|
||||
array_class->accflags = accflags;
|
||||
}
|
||||
|
||||
// An array class has no visible instance fields. "length" is invisible to
|
||||
// reflection.
|
||||
|
||||
// say this class is initialized and ready to go!
|
||||
// Say this class is initialized and ready to go!
|
||||
array_class->state = JV_STATE_DONE;
|
||||
|
||||
// vmspec, section 5.3.3 describes this
|
||||
|
@ -591,8 +441,6 @@ _Jv_NewArrayClass (jclass element, java::lang::ClassLoader *loader,
|
|||
element->arrayclass = array_class;
|
||||
}
|
||||
|
||||
static jclass stack_head;
|
||||
|
||||
// These two functions form a stack of classes. When a class is loaded
|
||||
// it is pushed onto the stack by the class loader; this is so that
|
||||
// StackTrace can quickly determine which classes have been loaded.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// natRuntime.cc - Implementation of native side of Runtime class.
|
||||
|
||||
/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation
|
||||
/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation
|
||||
|
||||
This file is part of libgcj.
|
||||
|
||||
|
@ -388,8 +388,11 @@ java::lang::Runtime::insertSystemProperties (java::util::Properties *newprops)
|
|||
newprops->put(JvNewStringLatin1 (Prop), JvNewStringLatin1 (Val))
|
||||
|
||||
// A mixture of the Java Product Versioning Specification
|
||||
// (introduced in 1.2), and earlier versioning properties.
|
||||
SET ("java.version", GCJVERSION);
|
||||
// (introduced in 1.2), and earlier versioning properties. Some
|
||||
// programs rely on seeing values that they expect, so we claim to
|
||||
// be a 1.4-ish VM for their sake.
|
||||
SET ("java.version", "1.4.2");
|
||||
SET ("java.runtime.version", "1.4.2");
|
||||
SET ("java.vendor", "Free Software Foundation, Inc.");
|
||||
SET ("java.vendor.url", "http://gcc.gnu.org/java/");
|
||||
SET ("java.class.version", "46.0");
|
||||
|
@ -399,7 +402,7 @@ java::lang::Runtime::insertSystemProperties (java::util::Properties *newprops)
|
|||
SET ("java.vm.version", __VERSION__);
|
||||
SET ("java.vm.vendor", "Free Software Foundation, Inc.");
|
||||
SET ("java.vm.name", "GNU libgcj");
|
||||
SET ("java.specification.version", "1.3");
|
||||
SET ("java.specification.version", "1.4");
|
||||
SET ("java.specification.name", "Java(tm) Platform API Specification");
|
||||
SET ("java.specification.vendor", "Sun Microsystems Inc.");
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// natString.cc - Implementation of java.lang.String native methods.
|
||||
|
||||
/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004
|
||||
Free Software Foundation
|
||||
/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation
|
||||
|
||||
This file is part of libgcj.
|
||||
|
||||
|
@ -57,7 +56,7 @@ static int strhash_size = 0; /* Number of slots available in strhash.
|
|||
jstring*
|
||||
_Jv_StringFindSlot (jchar* data, jint len, jint hash)
|
||||
{
|
||||
JvSynchronize sync (&StringClass);
|
||||
JvSynchronize sync (&java::lang::String::class$);
|
||||
|
||||
int start_index = hash & (strhash_size - 1);
|
||||
int deleted_index = -1;
|
||||
|
@ -120,7 +119,7 @@ _Jv_StringGetSlot (jstring str)
|
|||
static void
|
||||
rehash ()
|
||||
{
|
||||
JvSynchronize sync (&StringClass);
|
||||
JvSynchronize sync (&java::lang::String::class$);
|
||||
|
||||
if (strhash == NULL)
|
||||
{
|
||||
|
@ -167,7 +166,7 @@ rehash ()
|
|||
jstring
|
||||
java::lang::String::intern()
|
||||
{
|
||||
JvSynchronize sync (&StringClass);
|
||||
JvSynchronize sync (&java::lang::String::class$);
|
||||
if (3 * strhash_count >= 2 * strhash_size)
|
||||
rehash();
|
||||
jstring* ptr = _Jv_StringGetSlot(this);
|
||||
|
@ -194,7 +193,7 @@ java::lang::String::intern()
|
|||
void
|
||||
_Jv_FinalizeString (jobject obj)
|
||||
{
|
||||
JvSynchronize sync (&StringClass);
|
||||
JvSynchronize sync (&java::lang::String::class$);
|
||||
|
||||
// We might not actually have intern()d any strings at all, if
|
||||
// we're being called from Reference.
|
||||
|
@ -286,9 +285,9 @@ _Jv_NewStringUtf8Const (Utf8Const* str)
|
|||
}
|
||||
chrs -= length;
|
||||
|
||||
JvSynchronize sync (&StringClass);
|
||||
JvSynchronize sync (&java::lang::String::class$);
|
||||
if (3 * strhash_count >= 2 * strhash_size)
|
||||
rehash ();
|
||||
rehash();
|
||||
jstring* ptr = _Jv_StringFindSlot (chrs, length, hash);
|
||||
if (*ptr != NULL && *ptr != DELETED_STRING)
|
||||
return (jstring) UNMASK_PTR (*ptr);
|
||||
|
@ -527,7 +526,7 @@ java::lang::String::equals(jobject anObject)
|
|||
return false;
|
||||
if (anObject == this)
|
||||
return true;
|
||||
if (anObject->getClass() != &StringClass)
|
||||
if (anObject->getClass() != &java::lang::String::class$)
|
||||
return false;
|
||||
jstring other = (jstring) anObject;
|
||||
if (count != other->count)
|
||||
|
|
|
@ -22,6 +22,7 @@ details. */
|
|||
#include <java-interp.h>
|
||||
|
||||
#include <java/lang/VMClassLoader.h>
|
||||
#include <java/lang/VMCompiler.h>
|
||||
#include <gnu/gcj/runtime/VMClassLoader.h>
|
||||
#include <java/lang/ClassLoader.h>
|
||||
#include <java/lang/Class.h>
|
||||
|
@ -29,6 +30,21 @@ details. */
|
|||
#include <java/security/ProtectionDomain.h>
|
||||
#include <java/lang/ClassFormatError.h>
|
||||
|
||||
void
|
||||
java::lang::VMClassLoader::resolveClass (jclass klass)
|
||||
{
|
||||
JvSynchronize sync (klass);
|
||||
try
|
||||
{
|
||||
_Jv_Linker::wait_for_state (klass, JV_STATE_LINKED);
|
||||
}
|
||||
catch (java::lang::Throwable *x)
|
||||
{
|
||||
klass->set_state(JV_STATE_ERROR);
|
||||
transformException(klass, x);
|
||||
}
|
||||
}
|
||||
|
||||
java::lang::Class *
|
||||
java::lang::VMClassLoader::defineClass (java::lang::ClassLoader *loader,
|
||||
jstring name,
|
||||
|
@ -37,72 +53,61 @@ java::lang::VMClassLoader::defineClass (java::lang::ClassLoader *loader,
|
|||
jint length,
|
||||
java::security::ProtectionDomain *pd)
|
||||
{
|
||||
jclass klass = VMCompiler::compileClass(loader, name, data,
|
||||
offset, length, pd);
|
||||
|
||||
if (klass != NULL)
|
||||
{
|
||||
JvSynchronize sync (&java::lang::Class::class$);
|
||||
_Jv_RegisterClass (klass);
|
||||
}
|
||||
#ifdef INTERPRETER
|
||||
jclass klass;
|
||||
klass = new java::lang::Class ();
|
||||
klass->aux_info = (void *) _Jv_AllocBytes (sizeof (_Jv_InterpClass));
|
||||
|
||||
// Synchronize on the class, so that it is not attempted initialized
|
||||
// until we're done loading.
|
||||
JvSynchronize sync (klass);
|
||||
|
||||
// Record the defining loader. For the system class loader, we
|
||||
// record NULL.
|
||||
if (loader != java::lang::ClassLoader::getSystemClassLoader())
|
||||
klass->loader = loader;
|
||||
|
||||
if (name != 0)
|
||||
else
|
||||
{
|
||||
_Jv_Utf8Const *name2 = _Jv_makeUtf8Const (name);
|
||||
klass = new java::lang::Class ();
|
||||
|
||||
if (! _Jv_VerifyClassName (name2))
|
||||
throw new java::lang::ClassFormatError
|
||||
(JvNewStringLatin1 ("erroneous class name"));
|
||||
// Synchronize on the class, so that it is not attempted initialized
|
||||
// until we're done loading.
|
||||
JvSynchronize sync (klass);
|
||||
|
||||
klass->name = name2;
|
||||
// Record the defining loader. For the system class loader, we
|
||||
// record NULL.
|
||||
if (loader != java::lang::ClassLoader::getSystemClassLoader())
|
||||
klass->loader = loader;
|
||||
|
||||
if (name != 0)
|
||||
{
|
||||
_Jv_Utf8Const *name2 = _Jv_makeUtf8Const (name);
|
||||
|
||||
if (! _Jv_VerifyClassName (name2))
|
||||
throw new java::lang::ClassFormatError
|
||||
(JvNewStringLatin1 ("erroneous class name"));
|
||||
|
||||
klass->name = name2;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
_Jv_DefineClass (klass, data, offset, length, pd);
|
||||
}
|
||||
catch (java::lang::Throwable *ex)
|
||||
{
|
||||
klass->state = JV_STATE_ERROR;
|
||||
klass->notifyAll ();
|
||||
|
||||
_Jv_UnregisterClass (klass);
|
||||
|
||||
// If EX is not a ClassNotFoundException, that's ok, because we
|
||||
// account for the possibility in defineClass().
|
||||
throw ex;
|
||||
}
|
||||
|
||||
// if everything proceeded sucessfully, we're loaded.
|
||||
JvAssert (klass->state == JV_STATE_LOADED);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
_Jv_DefineClass (klass, data, offset, length);
|
||||
}
|
||||
catch (java::lang::Throwable *ex)
|
||||
{
|
||||
klass->state = JV_STATE_ERROR;
|
||||
klass->notifyAll ();
|
||||
|
||||
_Jv_UnregisterClass (klass);
|
||||
|
||||
// If EX is not a ClassNotFoundException, that's ok, because we
|
||||
// account for the possibility in defineClass().
|
||||
throw ex;
|
||||
}
|
||||
|
||||
klass->protectionDomain = pd;
|
||||
|
||||
// if everything proceeded sucessfully, we're loaded.
|
||||
JvAssert (klass->state == JV_STATE_LOADED);
|
||||
#endif // INTERPRETER
|
||||
|
||||
return klass;
|
||||
|
||||
#else // INTERPRETER
|
||||
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
// Finish linking a class. Only called from ClassLoader::resolveClass.
|
||||
void
|
||||
java::lang::VMClassLoader::linkClass0 (java::lang::Class *klass)
|
||||
{
|
||||
_Jv_WaitForState (klass, JV_STATE_LINKED);
|
||||
}
|
||||
|
||||
void
|
||||
java::lang::VMClassLoader::markClassErrorState0 (java::lang::Class *klass)
|
||||
{
|
||||
klass->state = JV_STATE_ERROR;
|
||||
klass->notifyAll ();
|
||||
}
|
||||
|
||||
java::lang::ClassLoader *
|
||||
|
@ -125,9 +130,16 @@ jclass
|
|||
java::lang::VMClassLoader::loadClass(jstring name, jboolean resolve)
|
||||
{
|
||||
_Jv_Utf8Const *utf = _Jv_makeUtf8Const (name);
|
||||
// FIXME: we culd make _Jv_FindClassFromSignature a template.
|
||||
jclass klass = _Jv_FindClassInCache (utf, NULL);
|
||||
if (klass && resolve)
|
||||
_Jv_InitClass (klass);
|
||||
if (klass)
|
||||
{
|
||||
// We never want to return a class without its supers linked.
|
||||
// It isn't clear from the spec, but this is what other
|
||||
// implementations do in practice.
|
||||
if (resolve)
|
||||
_Jv_InitClass (klass);
|
||||
else
|
||||
_Jv_Linker::wait_for_state (klass, JV_STATE_LOADING);
|
||||
}
|
||||
return klass;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// natField.cc - Implementation of java.lang.reflect.Field native methods.
|
||||
|
||||
/* Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation
|
||||
/* Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004 Free Software Foundation
|
||||
|
||||
This file is part of libgcj.
|
||||
|
||||
|
@ -47,7 +47,7 @@ java::lang::reflect::Field::getType ()
|
|||
{
|
||||
jfieldID fld = _Jv_FromReflectedField (this);
|
||||
JvSynchronize sync (declaringClass);
|
||||
_Jv_ResolveField (fld, declaringClass->getClassLoaderInternal ());
|
||||
_Jv_Linker::resolve_field (fld, declaringClass->getClassLoaderInternal ());
|
||||
return fld->type;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// natMethod.cc - Native code for Method class.
|
||||
|
||||
/* Copyright (C) 1998, 1999, 2000, 2001 , 2002, 2003 Free Software Foundation
|
||||
/* Copyright (C) 1998, 1999, 2000, 2001 , 2002, 2003, 2004 Free Software Foundation
|
||||
|
||||
This file is part of libgcj.
|
||||
|
||||
|
@ -149,7 +149,6 @@ java::lang::reflect::Method::invoke (jobject obj, jobjectArray args)
|
|||
getType ();
|
||||
|
||||
jmethodID meth = _Jv_FromReflectedMethod (this);
|
||||
jclass objClass;
|
||||
|
||||
if (Modifier::isStatic(meth->accflags))
|
||||
{
|
||||
|
@ -157,12 +156,10 @@ java::lang::reflect::Method::invoke (jobject obj, jobjectArray args)
|
|||
// here and not in _Jv_CallAnyMethodA because JNI initializes a
|
||||
// class whenever a method lookup is done.
|
||||
_Jv_InitClass (declaringClass);
|
||||
objClass = declaringClass;
|
||||
}
|
||||
else
|
||||
{
|
||||
objClass = JV_CLASS (obj);
|
||||
|
||||
jclass objClass = JV_CLASS (obj);
|
||||
if (! _Jv_IsAssignableFrom (declaringClass, objClass))
|
||||
throw new java::lang::IllegalArgumentException;
|
||||
}
|
||||
|
@ -184,7 +181,7 @@ java::lang::reflect::Method::invoke (jobject obj, jobjectArray args)
|
|||
{
|
||||
}
|
||||
|
||||
if (! _Jv_CheckAccess(caller, objClass, meth->accflags))
|
||||
if (! _Jv_CheckAccess(caller, declaringClass, meth->accflags))
|
||||
throw new IllegalAccessException;
|
||||
}
|
||||
|
||||
|
|
|
@ -54,6 +54,8 @@ import java.security.SecureClassLoader;
|
|||
import java.security.cert.Certificate;
|
||||
import java.util.Enumeration;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.StringTokenizer;
|
||||
import java.util.Vector;
|
||||
import java.util.jar.Attributes;
|
||||
import java.util.jar.JarEntry;
|
||||
|
@ -144,9 +146,10 @@ public class URLClassLoader extends SecureClassLoader
|
|||
private final Vector urls = new Vector();
|
||||
|
||||
/**
|
||||
* Store pre-parsed information for each url into this vector
|
||||
* each element is a URL loader, corresponding to the URL of
|
||||
* the same index in "urls"
|
||||
* Store pre-parsed information for each url into this vector: each
|
||||
* element is a URL loader. A jar file has its own class-path
|
||||
* attribute which adds to the URLs that will be searched, but this
|
||||
* does not add to the list of urls.
|
||||
*/
|
||||
private final Vector urlinfos = new Vector();
|
||||
|
||||
|
@ -188,10 +191,15 @@ public class URLClassLoader extends SecureClassLoader
|
|||
final CodeSource noCertCodeSource;
|
||||
|
||||
URLLoader(URLClassLoader classloader, URL baseURL)
|
||||
{
|
||||
this(classloader, baseURL, baseURL);
|
||||
}
|
||||
|
||||
URLLoader(URLClassLoader classloader, URL baseURL, URL overrideURL)
|
||||
{
|
||||
this.classloader = classloader;
|
||||
this.baseURL = baseURL;
|
||||
this.noCertCodeSource = new CodeSource(baseURL, null);
|
||||
this.noCertCodeSource = new CodeSource(overrideURL, null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -221,6 +229,11 @@ public class URLClassLoader extends SecureClassLoader
|
|||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
Vector getClassPath()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -290,6 +303,10 @@ public class URLClassLoader extends SecureClassLoader
|
|||
final JarFile jarfile; // The jar file for this url
|
||||
final URL baseJarURL; // Base jar: url for all resources loaded from jar
|
||||
|
||||
Vector classPath; // The "Class-Path" attribute of this Jar's manifest
|
||||
|
||||
SoURLLoader soURLLoader;
|
||||
|
||||
public JarURLLoader(URLClassLoader classloader, URL baseURL)
|
||||
{
|
||||
super(classloader, baseURL);
|
||||
|
@ -302,25 +319,87 @@ public class URLClassLoader extends SecureClassLoader
|
|||
sb.append("!/");
|
||||
String jarURL = sb.toString();
|
||||
|
||||
this.soURLLoader = null;
|
||||
this.classPath = null;
|
||||
URL baseJarURL = null;
|
||||
JarFile jarfile = null;
|
||||
try
|
||||
{
|
||||
baseJarURL =
|
||||
new URL(null, jarURL, classloader.getURLStreamHandler("jar"));
|
||||
{
|
||||
baseJarURL
|
||||
= new URL(null, jarURL, classloader.getURLStreamHandler("jar"));
|
||||
jarfile
|
||||
= ((JarURLConnection) baseJarURL.openConnection()).getJarFile();
|
||||
|
||||
jarfile =
|
||||
((JarURLConnection) baseJarURL.openConnection()).getJarFile();
|
||||
}
|
||||
if (jarfile != null)
|
||||
{
|
||||
String fileName = baseURL.getFile();
|
||||
if (fileName != null)
|
||||
{
|
||||
File f = new File(fileName);
|
||||
String libDirName = f.getCanonicalFile().getParent()
|
||||
+ File.separator + "GCJLIBS";
|
||||
File libDir = new File(libDirName);
|
||||
if (libDir != null && (libDir.isDirectory()))
|
||||
{
|
||||
File soFile = new File (libDirName
|
||||
+ File.separator + f.getName()
|
||||
+ ".so");
|
||||
if (soFile != null && soFile.isFile())
|
||||
this.soURLLoader
|
||||
= new SoURLLoader (classloader, soFile.toURL(),
|
||||
baseURL);
|
||||
}
|
||||
}
|
||||
|
||||
Manifest manifest;
|
||||
Attributes attributes;
|
||||
String classPathString;
|
||||
|
||||
if ((manifest = jarfile.getManifest()) != null
|
||||
&& (attributes = manifest.getMainAttributes()) != null
|
||||
&& ((classPathString
|
||||
= attributes.getValue(Attributes.Name.CLASS_PATH))
|
||||
!= null))
|
||||
{
|
||||
this.classPath = new Vector();
|
||||
|
||||
StringTokenizer st
|
||||
= new StringTokenizer
|
||||
(classPathString,
|
||||
System.getProperty ("path.separator", ":"));
|
||||
|
||||
while (st.hasMoreElements ())
|
||||
{
|
||||
String e = st.nextToken ();
|
||||
try
|
||||
{
|
||||
URL url = new URL(baseURL, e);
|
||||
this.classPath.add(url);
|
||||
}
|
||||
catch (java.net.MalformedURLException xx)
|
||||
{
|
||||
// Give up
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (IOException ioe)
|
||||
{
|
||||
/* ignored */
|
||||
/* ignored */
|
||||
}
|
||||
|
||||
this.baseJarURL = baseJarURL;
|
||||
this.jarfile = jarfile;
|
||||
}
|
||||
|
||||
Class getClass(String className)
|
||||
{
|
||||
if (soURLLoader != null)
|
||||
return soURLLoader.getClass(className);
|
||||
return null;
|
||||
}
|
||||
|
||||
/** get resource with the name "name" in the jar url */
|
||||
Resource getResource(String name)
|
||||
{
|
||||
|
@ -337,6 +416,11 @@ public class URLClassLoader extends SecureClassLoader
|
|||
return null;
|
||||
}
|
||||
|
||||
public String toString ()
|
||||
{
|
||||
return "jarfile " + jarfile.getName();
|
||||
}
|
||||
|
||||
Manifest getManifest()
|
||||
{
|
||||
try
|
||||
|
@ -348,6 +432,11 @@ public class URLClassLoader extends SecureClassLoader
|
|||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Vector getClassPath()
|
||||
{
|
||||
return classPath;
|
||||
}
|
||||
}
|
||||
|
||||
static final class JarURLResource extends Resource
|
||||
|
@ -486,7 +575,12 @@ public class URLClassLoader extends SecureClassLoader
|
|||
|
||||
SoURLLoader(URLClassLoader classloader, URL url)
|
||||
{
|
||||
super(classloader, url);
|
||||
this(classloader, url, url);
|
||||
}
|
||||
|
||||
SoURLLoader(URLClassLoader classloader, URL url, URL overrideURL)
|
||||
{
|
||||
super(classloader, url, overrideURL);
|
||||
helper = SharedLibHelper.findHelper(classloader, url.getFile(),
|
||||
noCertCodeSource);
|
||||
}
|
||||
|
@ -577,6 +671,11 @@ public class URLClassLoader extends SecureClassLoader
|
|||
return (int) file.length();
|
||||
}
|
||||
|
||||
public String toString ()
|
||||
{
|
||||
return "file " +file.getAbsolutePath();
|
||||
}
|
||||
|
||||
public URL getURL()
|
||||
{
|
||||
try
|
||||
|
@ -729,6 +828,7 @@ public class URLClassLoader extends SecureClassLoader
|
|||
*/
|
||||
protected void addURL(URL newUrl)
|
||||
{
|
||||
urls.add(newUrl);
|
||||
addURLImpl(newUrl);
|
||||
}
|
||||
|
||||
|
@ -761,8 +861,21 @@ public class URLClassLoader extends SecureClassLoader
|
|||
urlloaders.put(newUrl, loader);
|
||||
}
|
||||
|
||||
urls.add(newUrl);
|
||||
urlinfos.add(loader);
|
||||
urlinfos.add(loader);
|
||||
|
||||
Vector extraUrls = loader.getClassPath();
|
||||
if (extraUrls != null)
|
||||
{
|
||||
Iterator it = extraUrls.iterator();
|
||||
while (it.hasNext())
|
||||
{
|
||||
URL url = (URL)it.next();
|
||||
URLLoader extraLoader = (URLLoader) urlloaders.get(url);
|
||||
if (! urlinfos.contains (extraLoader))
|
||||
addURLImpl(url);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -773,7 +886,7 @@ public class URLClassLoader extends SecureClassLoader
|
|||
private void addURLs(URL[] newUrls)
|
||||
{
|
||||
for (int i = 0; i < newUrls.length; i++)
|
||||
addURLImpl(newUrls[i]);
|
||||
addURL(newUrls[i]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -830,7 +943,7 @@ public class URLClassLoader extends SecureClassLoader
|
|||
{
|
||||
// Just try to find the resource by the (almost) same name
|
||||
String resourceName = className.replace('.', '/') + ".class";
|
||||
int max = urls.size();
|
||||
int max = urlinfos.size();
|
||||
Resource resource = null;
|
||||
for (int i = 0; i < max && resource == null; i++)
|
||||
{
|
||||
|
@ -939,7 +1052,7 @@ public class URLClassLoader extends SecureClassLoader
|
|||
*/
|
||||
private Resource findURLResource(String resourceName)
|
||||
{
|
||||
int max = urls.size();
|
||||
int max = urlinfos.size();
|
||||
for (int i = 0; i < max; i++)
|
||||
{
|
||||
URLLoader loader = (URLLoader) urlinfos.elementAt(i);
|
||||
|
@ -1010,7 +1123,7 @@ public class URLClassLoader extends SecureClassLoader
|
|||
throws IOException
|
||||
{
|
||||
Vector resources = new Vector();
|
||||
int max = urls.size();
|
||||
int max = urlinfos.size();
|
||||
for (int i = 0; i < max; i++)
|
||||
{
|
||||
URLLoader loader = (URLLoader) urlinfos.elementAt(i);
|
||||
|
|
|
@ -563,11 +563,12 @@ _Jv_JNI_ThrowNew (JNIEnv *env, jclass clazz, const char *message)
|
|||
NULL);
|
||||
|
||||
jclass *elts = elements (argtypes);
|
||||
elts[0] = &StringClass;
|
||||
elts[0] = &java::lang::String::class$;
|
||||
|
||||
Constructor *cons = clazz->getConstructor (argtypes);
|
||||
|
||||
jobjectArray values = JvNewObjectArray (1, &StringClass, NULL);
|
||||
jobjectArray values = JvNewObjectArray (1, &java::lang::String::class$,
|
||||
NULL);
|
||||
jobject *velts = elements (values);
|
||||
velts[0] = JvNewStringUTF (message);
|
||||
|
||||
|
@ -1204,7 +1205,7 @@ _Jv_JNI_GetAnyFieldID (JNIEnv *env, jclass clazz,
|
|||
|
||||
// The field might be resolved or it might not be. It
|
||||
// is much simpler to always resolve it.
|
||||
_Jv_ResolveField (field, loader);
|
||||
_Jv_Linker::resolve_field (field, loader);
|
||||
if (_Jv_equalUtf8Consts (f_name, a_name)
|
||||
&& field->getClass() == field_class)
|
||||
return field;
|
||||
|
|
1764
libjava/link.cc
Normal file
1764
libjava/link.cc
Normal file
File diff suppressed because it is too large
Load diff
|
@ -61,12 +61,16 @@ details. */
|
|||
#include <java/lang/VirtualMachineError.h>
|
||||
#include <gnu/gcj/runtime/VMClassLoader.h>
|
||||
#include <gnu/gcj/runtime/FinalizerThread.h>
|
||||
#include <execution.h>
|
||||
#include <gnu/java/lang/MainThread.h>
|
||||
|
||||
#ifdef USE_LTDL
|
||||
#include <ltdl.h>
|
||||
#endif
|
||||
|
||||
// Execution engine for compiled code.
|
||||
_Jv_CompiledEngine _Jv_soleCompiledEngine;
|
||||
|
||||
// We allocate a single OutOfMemoryError exception which we keep
|
||||
// around for use if we run out of memory.
|
||||
static java::lang::OutOfMemoryError *no_memory;
|
||||
|
@ -723,7 +727,7 @@ JvConvertArgv (int argc, const char **argv)
|
|||
{
|
||||
if (argc < 0)
|
||||
argc = 0;
|
||||
jobjectArray ar = JvNewObjectArray(argc, &StringClass, NULL);
|
||||
jobjectArray ar = JvNewObjectArray(argc, &java::lang::String::class$, NULL);
|
||||
jobject *ptr = elements(ar);
|
||||
jbyteArray bytes = NULL;
|
||||
for (int i = 0; i < argc; i++)
|
||||
|
@ -1204,7 +1208,7 @@ _Jv_CheckAccess (jclass self_klass, jclass other_klass, jint flags)
|
|||
return ((self_klass == other_klass)
|
||||
|| ((flags & Modifier::PUBLIC) != 0)
|
||||
|| (((flags & Modifier::PROTECTED) != 0)
|
||||
&& other_klass->isAssignableFrom (self_klass))
|
||||
&& _Jv_IsAssignableFromSlow (other_klass, self_klass))
|
||||
|| (((flags & Modifier::PRIVATE) == 0)
|
||||
&& _Jv_ClassNameSamePackage (self_klass->name,
|
||||
other_klass->name)));
|
||||
|
|
1125
libjava/resolve.cc
1125
libjava/resolve.cc
File diff suppressed because it is too large
Load diff
|
@ -134,6 +134,7 @@ LIBGCJTESTSPEC = @LIBGCJTESTSPEC@
|
|||
LIBGCJ_CFLAGS = @LIBGCJ_CFLAGS@
|
||||
LIBGCJ_CXXFLAGS = @LIBGCJ_CXXFLAGS@
|
||||
LIBGCJ_JAVAFLAGS = @LIBGCJ_JAVAFLAGS@
|
||||
LIBGCJ_LD_SYMBOLIC = @LIBGCJ_LD_SYMBOLIC@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBLTDL = @LIBLTDL@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
|
|
21
libjava/testsuite/libjava.lang/assign2.java
Normal file
21
libjava/testsuite/libjava.lang/assign2.java
Normal file
|
@ -0,0 +1,21 @@
|
|||
// Test for an array assignment bug we've had.
|
||||
|
||||
public class assign2
|
||||
{
|
||||
public static Object[][] c () { return new Long[5][5]; }
|
||||
|
||||
public static Object[] d () { return new Integer[3]; }
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
try
|
||||
{
|
||||
Object[][] x = c();
|
||||
x[0] = d();
|
||||
}
|
||||
catch (ArrayStoreException _)
|
||||
{
|
||||
System.out.println("good");
|
||||
}
|
||||
}
|
||||
}
|
1
libjava/testsuite/libjava.lang/assign2.out
Normal file
1
libjava/testsuite/libjava.lang/assign2.out
Normal file
|
@ -0,0 +1 @@
|
|||
good
|
|
@ -1,5 +1,15 @@
|
|||
# Tests for ClassLoader and native library loader code.
|
||||
|
||||
# Compute the correct name for an object file.
|
||||
# This is an awful hack.
|
||||
proc gcj_object_file_name {compiler base} {
|
||||
verbose "OBJECT: compiler = $compiler"
|
||||
if {[string match *libtool* $compiler]} {
|
||||
return $base.lo
|
||||
}
|
||||
return $base.o
|
||||
}
|
||||
|
||||
# Do all the work for a single JNI test. Return 0 on failure.
|
||||
proc gcj_loader_test_one {srcfile} {
|
||||
global objdir srcdir subdir
|
||||
|
@ -9,9 +19,9 @@ proc gcj_loader_test_one {srcfile} {
|
|||
regsub "^.*/(\[^/.\]+)\[.\]\[^/]*$" "$srcfile" "\\1" out
|
||||
set executable "${objdir}/$out.exe"
|
||||
|
||||
set errname [file rootname [file tail $srcfile]]
|
||||
set args [libjava_arguments link]
|
||||
lappend args "additional_flags=--main=[file rootname [file tail $srcfile]] $srcdir/$subdir/MyLoader.java $objdir/dummy.o"
|
||||
set errname [file rootname [file tail $srcfile]]
|
||||
set args [libjava_arguments link]
|
||||
lappend args "additional_flags=--main=[file rootname [file tail $srcfile]] $srcdir/$subdir/MyLoader.java $objdir/[gcj_object_file_name $args dummy]"
|
||||
set x [libjava_prune_warnings \
|
||||
[libjava_tcompile $srcfile "$executable" executable $args]]
|
||||
|
||||
|
@ -47,7 +57,7 @@ proc gcj_loader_run {} {
|
|||
set args [libjava_arguments compile]
|
||||
lappend args "additional_flags=--resource $objdir/dummy.class"
|
||||
set x [libjava_prune_warnings \
|
||||
[libjava_tcompile "$objdir/dummy.class" "$objdir/dummy.o" object $args]]
|
||||
[libjava_tcompile "$objdir/dummy.class" "$objdir/[gcj_object_file_name $args dummy]" object $args]]
|
||||
|
||||
if { $x != "" } {
|
||||
verbose "resource compilation failed: $x" 2
|
||||
|
|
|
@ -553,7 +553,7 @@ private:
|
|||
{
|
||||
// We use a recursive call because we also need to
|
||||
// check superinterfaces.
|
||||
if (is_assignable_from_slow (target, source->interfaces[i]))
|
||||
if (is_assignable_from_slow (target, source->getInterface (i)))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue