Merged gcj-eclipse branch to trunk.
From-SVN: r120621
This commit is contained in:
parent
c648dedbde
commit
97b8365caf
17478 changed files with 606493 additions and 100744 deletions
|
@ -1,3 +1,246 @@
|
|||
2007-01-09 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* expr.c (build_java_arrayaccess): Rewrite to generate array
|
||||
access in canonical form.
|
||||
(expand_java_arraystore): Use build_fold_addr_expr() on address of
|
||||
array access.
|
||||
|
||||
2007-01-03 Andrew Haley <aph@redhat.com>
|
||||
|
||||
PR java/28754
|
||||
* expr.c (expand_java_field_op): If we're initializing a field's
|
||||
declaring interface we should not also initialize the class
|
||||
context in which it was referenced.
|
||||
|
||||
2007-01-02 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* java-tree.h (compiling_from_source, current_encoding,
|
||||
JTI_FINIT_IDENTIFIER_NODE, JTI_INSTINIT_IDENTIFIER_NODE,
|
||||
JTI_LENGTH_IDENTIFIER_NODE, JTI_SUPER_IDENTIFIER_NODE,
|
||||
JTI_CONTINUE_IDENTIFIER_NODE, JTI_ACCESS0_IDENTIFIER_NODE,
|
||||
JTI_WFL_OPERATOR): Removed
|
||||
(finit_identifier_node, instinit_identifier_node,
|
||||
length_identifier_node, super_identifier_node,
|
||||
continue_identifier_node, access0_identifier_node, wfl_operator):
|
||||
Removed.
|
||||
(cyclic_inheritance_report,
|
||||
DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND,
|
||||
DECL_FUNCTION_NAP, DECL_FUNCTION_SYNTHETIC_CTOR,
|
||||
DECL_FIXED_CONSTRUCTOR_P): Removed.
|
||||
(struct lang_decl_func) <smic, nap, synthetic_ctor, fixed_ctor>:
|
||||
Removed.
|
||||
(TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST, TYPE_II_STMT_LIST,
|
||||
TYPE_IMPORT_LIST, TYPE_IMPORT_DEMAND_LIST): Removed.
|
||||
(struct lang_type) <finit_stmt_list, clinit_stmt_list, ii_block,
|
||||
import_list, import_demand_list>: Removed.
|
||||
(java_layout_seen_class_methods, init_jcf_parse, init_src_parse,
|
||||
cxx_keyword_p): Removed.
|
||||
(DECL_FINIT_P, DECL_INSTINIT_P, ID_FINIT_P, ID_INSTINIT_P,
|
||||
TYPE_UNUSED, TYPE_UNDERFLOW, TYPE_UNEXPECTED,
|
||||
CLASS_ACCESS0_GENERATED_P, CLASS_HAS_FINIT_P,
|
||||
IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
|
||||
IS_AN_IMPORT_ON_DEMAND_P, COMPOUND_ASSIGN_P, SWITCH_HAS_DEFAULT,
|
||||
PRIMARY_P, MODIFY_EXPR_FROM_INITIALIZATION_P,
|
||||
CLASS_METHOD_CHECKED_P, FOR_LOOP_P, ANONYMOUS_CLASS_P,
|
||||
LOCAL_CLASS_P, ARG_FINAL_P, SUPPRESS_UNREACHABLE_ERROR,
|
||||
RESOLVE_PACKAGE_NAME_P, RESOLVE_TYPE_NAME_P, IS_BREAK_STMT_P,
|
||||
IS_CRAFTED_STRING_BUFFER_P, IS_INIT_CHECKED, CALL_USING_SUPER,
|
||||
NESTED_FIELD_ACCESS_IDENTIFIER_P, TOPLEVEL_CLASS_DECL_P,
|
||||
PURE_INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
|
||||
CALL_CONSTRUCTOR_P, CALL_EXPLICIT_CONSTRUCTOR_P,
|
||||
CALL_THIS_CONSTRUCTOR_P, CALL_SUPER_CONSTRUCTOR_P,
|
||||
FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, BLOCK_IS_IMPLICIT,
|
||||
BLOCK_EMPTY_P, IS_UNCHECKED_EXCEPTION_P, java_error_count,
|
||||
java_parse_abort_on_error, extract_field_decl): Removed.
|
||||
(finput): Declare.
|
||||
* lang.c: (compiling_from_source, current_encoding): Removed.
|
||||
(java_handle_option): Ignore -fencoding.
|
||||
* parse.h: Don't include lex.h.
|
||||
(java_error_count, int_fits_type_p, stabilize_reference, RULE,
|
||||
RECOVERED, DRECOVERED, RECOVER, DRECOVER, YYERROR_NOW,
|
||||
YYNOT_TWICE, CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
|
||||
INTERFACE_MODIFIERS, INTERFACE_INNER_MODIFIERS,
|
||||
INTERFACE_METHOD_MODIFIERS, INTERFACE_FIELD_MODIFIERS,
|
||||
MODIFIER_WFL, THIS_MODIFIER_ONLY, parse_error_context,
|
||||
ABSTRACT_CHECK, JCONSTRUCTOR_CHECK, exit_java_complete_class,
|
||||
CLASS_OR_INTERFACE, GET_REAL_TYPE, GET_TYPE_NAME,
|
||||
OBSOLETE_MODIFIER_WARNING, OBSOLETE_MODIFIER_WARNING2,
|
||||
BUILD_PTR_FROM_NAME, INCOMPLETE_TYPE_P,
|
||||
JAVA_MAYBE_GENERATE_DEBUG_INFO, JBSC_TYPE_P, JSTRING_P,
|
||||
JNULLP_TYPE_P, JDECL_P, TYPE_INTERFACE_P, TYPE_CLASS_P,
|
||||
IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS,
|
||||
MANGLE_OUTER_LOCAL_VARIABLE_NAME,
|
||||
MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID,
|
||||
MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING,
|
||||
SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
|
||||
UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP,
|
||||
AIPL_FUNCTION_CREATION, AIPL_FUNCTION_DECLARATION,
|
||||
AIPL_FUNCTION_CTOR_INVOCATION, AIPL_FUNCTION_FINIT_INVOCATION,
|
||||
ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
|
||||
ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED,
|
||||
LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
|
||||
LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
|
||||
LOOP_EXPR_BODY_BODY_EXPR, PUSH_LABELED_BLOCK, POP_LABELED_BLOCK,
|
||||
PUSH_LOOP, POP_LOOP, PUSH_EXCEPTIONS, POP_EXCEPTIONS,
|
||||
IN_TRY_BLOCK_P, EXCEPTIONS_P, ANONYMOUS_ARRAY_BASE_TYPE,
|
||||
ANONYMOUS_ARRAY_DIMS_SIG, ANONYMOUS_ARRAY_INITIALIZER,
|
||||
INVOKE_STATIC, INVOKE_NONVIRTUAL, INVOKE_SUPER, INVOKE_INTERFACE,
|
||||
INVOKE_VIRTUAL, jdep_code, struct _jdep, JDEP_DECL, JDEP_DECL_WFL,
|
||||
JDEP_KIND, JDEP_WFL, JDEP_MISC, JDEP_ENCLOSING, JDEP_CLASS,
|
||||
JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN, JDEP_TO_RESOLVE,
|
||||
JDEP_RESOLVED_DECL, JDEP_RESOLVED, JDEP_RESOLVED_P, struct
|
||||
jdeplist_s, jdeplists, CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN,
|
||||
JDEP_INSERT, SET_TYPE_FOR_RESOLUTION, WFL_STRIP_BRACKET,
|
||||
STRING_STRIP_BRACKETS, PROMOTE_RECORD_IF_COMPLETE,
|
||||
BLOCK_CHAIN_DECL, GET_CURRENT_BLOCK, EXPR_WFL_GET_LINECOL,
|
||||
EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION, QUAL_DECL_TYPE,
|
||||
GET_SKIP_TYPE, COMPLETE_CHECK_OP, COMPLETE_CHECK_OP_0,
|
||||
COMPLETE_CHECK_OP_1, COMPLETE_CHECK_OP_2, BUILD_APPEND,
|
||||
BUILD_STRING_BUFFER, BUILD_THROW, SET_WFL_OPERATOR,
|
||||
PATCH_METHOD_RETURN_ERROR, CHECK_METHODS, CLEAR_DEPRECATED,
|
||||
CHECK_DEPRECATED_NO_RESET, CHECK_DEPRECATED, REGISTER_IMPORT,
|
||||
CURRENT_OSB, struct parser_ctxt, GET_CPC_LIST, CPC_INNER_P,
|
||||
GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE, GET_CPC_DECL_NODE,
|
||||
GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
|
||||
GET_ENCLOSING_CPC_CONTEXT, INNER_ENCLOSING_SCOPE_CHECK, PUSH_CPC,
|
||||
PUSH_ERROR, POP_CPC, DEBUG_CPC, CPC_INITIALIZER_LIST,
|
||||
CPC_STATIC_INITIALIZER_LIST, CPC_INSTANCE_INITIALIZER_LIST,
|
||||
CPC_INITIALIZER_STMT, CPC_STATIC_INITIALIZER_STMT,
|
||||
CPC_INSTANCE_INITIALIZER_STMT, SET_CPC_INITIALIZER_STMT,
|
||||
SET_CPC_STATIC_INITIALIZER_STMT,
|
||||
SET_CPC_INSTANCE_INITIALIZER_STMT, JAVA_NOT_RADIX10_FLAG,
|
||||
java_complete_class, java_check_circular_reference,
|
||||
java_fix_constructors, java_layout_classes, java_reorder_fields,
|
||||
java_method_add_stmt, java_get_line_col, reset_report,
|
||||
java_init_lex, yyparse, java_parse, yyerror, java_expand_classes,
|
||||
java_finish_classes, ctxp, ctxp_for_generation,
|
||||
ctxp_for_generation_last): Removed.
|
||||
* expr.c (force_evaluation_order): Don't mention NEW_CLASS_EXPR.
|
||||
* mangle.c (utf8_cmp): New function.
|
||||
(cxx_keywords): New global.
|
||||
(cxx_keyword_p): New function.
|
||||
* jvspec.c (JAVA_START_CHAR): Removed obsolete comment.
|
||||
* java-tree.def (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR,
|
||||
NEW_ANONYMOUS_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
|
||||
CASE_EXPR, DEFAULT_EXPR, JAVA_CATCH_EXPR, SYNCHRONIZED_EXPR,
|
||||
THROW_EXPR, CONDITIONAL_EXPR, INSTANCEOF_EXPR, NEW_ARRAY_INIT,
|
||||
CLASS_LITERAL, JAVA_EXC_OBJ_EXPR): Removed.
|
||||
* Make-lang.in (java.srcextra): Do nothing.
|
||||
(parse.c, keyword.h, gt-java-parse.h): Removed targets.
|
||||
(JAVA_OBJS): Don't mention deleted files.
|
||||
(java.mostlyclean): Likewise.
|
||||
(java.clean): Likewise.
|
||||
(JAVA_LEX_C): Removed.
|
||||
(buffer.o, check-init.o, parse.o): Remove unused targets.
|
||||
(typeck.o): Updated.
|
||||
* jcf-parse.c (read_class): Comment out unused code.
|
||||
(java_layout_seen_class_methods): New function.
|
||||
(parse_source_file_1, parse_source_file_2, parse_source_file_3):
|
||||
Removed.
|
||||
(java_parse_file): Comment out unused code. Don't use 'ctxp'.
|
||||
(init_jcf_parse): Removed.
|
||||
* config-lang.in (gtfiles): Remove deleted files.
|
||||
* decl.c (java_init_decl_processing): Don't initialize
|
||||
finit_identifier_node, instinit_identifier_node,
|
||||
length_identifier_node, super_identifier_node,
|
||||
continue_identifier_node, access0_identifier_node. Don't call
|
||||
init_jcf_parse.
|
||||
* class.c (cyclic_inheritance_report): New global.
|
||||
(add_method_1): Don't use
|
||||
DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND.
|
||||
(maybe_layout_super_class): Comment out code.
|
||||
(safe_layout_class): New function.
|
||||
* java-gimplify.c (java_gimplify_expr): Removed CASE_EXPR,
|
||||
DEFAULT_EXPR, NEW_ARRAY_INIT, JAVA_CATCH_EXPR, JAVA_EXC_OBJ_EXPR,
|
||||
UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_ANONYMOUS_ARRAY_EXPR,
|
||||
NEW_CLASS_EXPR, SYNCHRONIZED_EXPR, CONDITIONAL_EXPR,
|
||||
INSTANCEOF_EXPR, CLASS_LITERAL, THIS_EXPR.
|
||||
(java_gimplify_case_expr): Removed.
|
||||
(java_gimplify_default_expr): Likewise.
|
||||
(java_gimplify_new_array_init): Likewise.
|
||||
* parse.y: Removed.
|
||||
* keyword.gperf, keyword.h: Removed.
|
||||
* chartables.h: Removed.
|
||||
* check-init.c: Removed.
|
||||
* buffer.c, buffer.h: Removed.
|
||||
* convert.h: Removed.
|
||||
* gen-table.pl: Removed.
|
||||
* lex.c, lex.h: Removed.
|
||||
|
||||
2007-01-02 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* expr.c (expand_java_arraystore): Make sure we perform a bounds
|
||||
check at runtime before we perform a type check.
|
||||
|
||||
2006-12-19 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* decl.c: Bump minor BC ABI version.
|
||||
|
||||
2006-12-13 Gary Benson <gbenson@redhat.com>
|
||||
|
||||
* jcf-depend.c (jcf_dependency_add_file): Mark filename unused.
|
||||
|
||||
2006-12-12 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* lang-specs.h: Pass -M options to jc1.
|
||||
* jcf-depend.c (jcf_dependency_add_file): Don't emit
|
||||
dependencies.
|
||||
|
||||
2006-12-07 Mohan Embar <gnustuff@thisiscool.com>
|
||||
|
||||
* jcf-path.c (jcf_path_compute): Use platform PATH_SEPARATOR.
|
||||
|
||||
2006-12-06 Mohan Embar <gnustuff@thisiscool.com>
|
||||
|
||||
* lang-specs.h: Pass '%U'-based options as separate arguments.
|
||||
|
||||
2006-12-05 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
PR java/29495:
|
||||
* jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Mark fields and
|
||||
classes as well.
|
||||
* class.c (add_field): Handle ACC_SYNTHETIC.
|
||||
(add_method_1): Likewise. Handle bridge and varargs.
|
||||
(get_access_flags_from_decl): Handle synthetic, bridge, varargs,
|
||||
annotation.
|
||||
(set_class_decl_access_flags): Handle synthetic and annotation.
|
||||
* java-tree.h (METHOD_BRIDGE): New macro.
|
||||
(METHOD_VARARGS): Likewise.
|
||||
(TYPE_SYNTHETIC): Likewise.
|
||||
(TYPE_ANNOTATION): Likewise.
|
||||
(lang_type): New fields 'synthetic' and 'annotation'.
|
||||
(lang_decl_func): New fields 'varargs' and 'bridge'.
|
||||
|
||||
2006-12-04 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* jcf-parse.c (rewrite_reflection_indexes): Don't do anything if
|
||||
there's no map.
|
||||
|
||||
2006-11-29 Gary Benson <gbenson@redhat.com>
|
||||
|
||||
* expr.c (rewrite_arglist_getcaller): Reorder.
|
||||
|
||||
2006-11-29 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* expr.c (rewrite_arglist_getcaller): Remove DECL_INLINE.
|
||||
* lang.c (java_decl_ok_for_sibcall): Check for DECL_INLINE.
|
||||
|
||||
2006-11-23 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* expr.c (rewrite_arglist_getcaller): New.
|
||||
(rewrite_arglist_getclass): Fix indentation.
|
||||
(rules): Add gnu.classpath.VMStackWalker.getCallingClass() and
|
||||
gnu.classpath.VMStackWalker.getCallingClassLoader().
|
||||
* builtins.c (initialize_builtins): Remove duplicate def'n of
|
||||
__sync_synchronize.
|
||||
Add __builtin_return_address.
|
||||
|
||||
2006-11-22 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* jcf-reader.c (get_attribute): Mark attr_type unused.
|
||||
|
||||
* builtins.c (compareAndSwapObject_builtin): Fix declaration.
|
||||
|
||||
2007-01-08 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
* lex.c (do_java_lex): Use build_int_cst_wide_type.
|
||||
|
@ -18,6 +261,346 @@
|
|||
* check-init.c (check_init): Remove handling of FIX_CEIL_EXPR,
|
||||
FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
|
||||
|
||||
2006-11-06 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* java-tree.h (CONSTANT_LazyFlag): New.
|
||||
* constants.c (build_constants_constructor): Mask CONSTANT_LazyFlag.
|
||||
* jcf-parse.c (handle_innerclass_attribute): Write attribute to
|
||||
reflection_data.
|
||||
(handle_constant): Return 0 for dummy cpool entries.
|
||||
Handle constants of kind Class.
|
||||
Handle constants of kind NameAndType.
|
||||
(handle_enclosingmethod_attribute): New.
|
||||
(handle_signature_attribute): New.
|
||||
(HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New.
|
||||
(HANDLE_SIGNATURE_ATTRIBUTE): New.
|
||||
(handle_constant): Use unmangle_classname()rather than calling
|
||||
identifier_subst() directly.
|
||||
|
||||
2006-11-02 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* java-tree.h (FIELD_ENUM): New.
|
||||
(lang_decl_var.field_enum): New.
|
||||
(lang_type.enum_class): New.
|
||||
(CLASS_ENUM): New.
|
||||
* class.c (set_class_decl_access_flags): Handle enum types.
|
||||
(add_field): Handle enum fields.
|
||||
(get_access_flags_from_decl): Likewise.
|
||||
|
||||
* class.c (make_class_data): Put reflection_data into rodata.
|
||||
|
||||
2006-11-01 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* jcf-parse.c (field_offsets, bit_obstack): New variables.
|
||||
(jcf_parse): Write end marker to annotation_data.
|
||||
(java_parse_file): Create field_offsets bitmap. Destroy it.
|
||||
(annotation_grow, annotation_rewrite_byte)
|
||||
(annotation_rewrite_short, annotation_rewrite_int)
|
||||
(annotation_read_short, annotation_write_byte)
|
||||
(annotation_write_short, annotation_write_int)
|
||||
(handle_long_constant, handle_constant, handle_element_value)
|
||||
(handle_annotation, handle_annotations)
|
||||
(handle_annotation_attribute, rewrite_reflection_indexes)
|
||||
(handle_member_annotations, handle_parameter_annotations)
|
||||
(handle_default_annotation): New functions.
|
||||
(HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE)
|
||||
(HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE)
|
||||
(HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE)
|
||||
(HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE)
|
||||
(HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): New definitions.
|
||||
* java-tree.h (enum jv_attr_type, enum jv_attr_kind): New.
|
||||
(TYPE_REFLECTION_DATA): New.
|
||||
(TYPE_REFLECTION_DATASIZE): New.
|
||||
* jcf.h (enum cpool_tag): Convert a bunch of #define constants to
|
||||
an enum.
|
||||
* jcf-reader.c (get_attribute): Pass field/method index and
|
||||
attribute type to get_attribute().
|
||||
* constants.c (find_class_or_string_constant): Make nonstatic.
|
||||
(cpool_for_class): Likewise.
|
||||
(build_constants_constructor): Separate string and scalar types.
|
||||
* class.c (make_class_data): Generate field_indexes permutation.
|
||||
Pass it to rewrite_reflection_indexes().
|
||||
(make_class_data): Generate constructor for reflection_data field.
|
||||
|
||||
2006-10-20 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* gcj.texi (Top): Don't mention jv-scan.
|
||||
(Invoking gcj): Likewise.
|
||||
(Invoking gcjh): Likewise.
|
||||
(Invoking gjnih): Likewise.
|
||||
(Invoking gij): Likewise.
|
||||
(Invoking gcj-dbtool): Likewise.
|
||||
(Invoking jv-scan): Removed.
|
||||
* parse-scan.y: Removed.
|
||||
* jv-scan.c: Removed.
|
||||
* config-lang.in (stagestuff): Don't mention jv-scan.
|
||||
* Make-lang.in (java): Removed jv-scan.
|
||||
(JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
|
||||
(JVSCAN_OBJS): Removed.
|
||||
(jv-scan$(exeext)): Likewise.
|
||||
(JAVA_MANFILES): Removed jv-scan.1.
|
||||
(java.uninstall): Don't mention jv-scan.
|
||||
(java.mostlyclean): Likewise.
|
||||
(java.maintainer-clean): Likewise.
|
||||
(.INTERMEDIATE): Likewise.
|
||||
(java/jv-scan.o): Removed.
|
||||
(jv-scan.pod): Likewise.
|
||||
(java.srcextra): Don't mention parse-scan.c.
|
||||
(java.mostlyclean): Likewise.
|
||||
(java/parse-scan.c): Removed.
|
||||
(java/parse-scan.o-warn): Removed.
|
||||
(java/parse-scan.o): Removed.
|
||||
|
||||
2006-10-20 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* lang.c (java_handle_option): Don't use
|
||||
jcf_write_base_directory.
|
||||
* jcf.h (jcf_write_base_directory): Removed.
|
||||
* parse.y (java_expand_classes): Don't call write_classfile.
|
||||
* config-lang.in (gtfiles): Removed jcf-write.c.
|
||||
* Make-lang.in (JAVA_OBJS): Removed jcf-write.o.
|
||||
(java/jcf-write.o): Removed.
|
||||
* jcf-parse.c (parse_class_file): Don't call write_classfile.
|
||||
* java-tree.h (write_classfile): Removed declaration.
|
||||
* jcf-write.c: Removed.
|
||||
|
||||
2006-10-20 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* Make-lang.in (java): Removed gjnih, gcjh.
|
||||
(JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
|
||||
(GCJH_OBJS): Removed.
|
||||
(GJNIH_OBJS): Likewise.
|
||||
(gjnih$(exeext)): Likewise.
|
||||
(gcjh$(exeext)): Likewise.
|
||||
(JAVA_MANFILES): Removed gcjh.1, gjnih.1.
|
||||
(java.install-common): Don't special case gcjh.
|
||||
(java.uninstall): Don't mention gcjh, gjnih.
|
||||
(java.mostlyclean): Likewise.
|
||||
(java.maintainer-clean): Likewise.
|
||||
(.INTERMEDIATE): Likewise.
|
||||
(gcjh.pod): Removed.
|
||||
(gjnih.pod): Likewise.
|
||||
(GCJH_TARGET_INSTALL_NAME): Removed.
|
||||
(java/gjavah-jni.o): Removed.
|
||||
(java/gjavah.o): Likewise.
|
||||
* config-lang.in (stagestuff): Removed gjnih, gcjh.
|
||||
* gjavah.c: Removed.
|
||||
|
||||
2006-10-17 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* jcf-dump.c (print_element_value): Expect a utf8 constant in the
|
||||
"string" case.
|
||||
|
||||
2006-10-17 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* jvgenmain.c (main): Handle -findirect-dispatch.
|
||||
* jvspec.c (jvgenmain_spec): Pass -findirect-dispatch to
|
||||
jvgenmain.
|
||||
|
||||
2006-10-06 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* builtins.c (compareAndSwapInt_builtin): Check that we really do
|
||||
have a compare_and_swap builtin.
|
||||
(compareAndSwapLong_builtin): Likewise.
|
||||
(compareAndSwapObject_builtin): Likewise.
|
||||
|
||||
2006-10-04 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* builtins.c (java_builtins): Add compareAndSwapInt,
|
||||
compareAndSwapLong, compareAndSwapObject, putOrderedInt,
|
||||
putOrderedLong, putOrderedObject, putIntVolatile, putLongVolatile,
|
||||
putObjectVolatile, getObjectVolatile, getIntVolatile,
|
||||
getLongVolatile, getLong.
|
||||
(UNMARSHAL3): New macro.
|
||||
(UNMARSHAL4): Likewise.
|
||||
(UNMARSHAL5): Likewise.
|
||||
(build_arglist_for_builtin): New function.
|
||||
(build_addr_sum, build_check_this): New functions.
|
||||
(putObject_builtin. compareAndSwapInt_builtin,
|
||||
compareAndSwapLong_builtin, compareAndSwapObject_builtin,
|
||||
putVolatile_builtin, getVolatile_builtin): New builtins.
|
||||
|
||||
2006-06-08 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
|
||||
get_symbol_table_index().
|
||||
(maybe_rewrite_invocation): Set SPECIAL if we need to access a
|
||||
private method.
|
||||
(build_known_method_ref): New arg: special. Pass it to
|
||||
get_symbol_table_index.
|
||||
(get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
|
||||
the method list.
|
||||
(build_invokevirtual): New arg: special. Pass it to
|
||||
get_symbol_table_index.
|
||||
(expand_invoke): New variable: special.
|
||||
Pass it to maybe_rewrite_invocation().
|
||||
Pass it to build_known_method_ref().
|
||||
* class.c (build_symbol_entry): Add new arg: special. Use it to
|
||||
build the symbol table conbstructor.
|
||||
(emit_symbol_table): Extract SPECIAL from the method list and pass
|
||||
it to build_symbol_entry().
|
||||
* parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
|
||||
special accordingly.
|
||||
|
||||
2006-09-08 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* class.c (layout_class_method): Use build_java_signature, not
|
||||
build_java_argument_signature. Use lookup_java_method, not
|
||||
lookup_argument_method.
|
||||
|
||||
2006-08-16 Jakub Jelinek <jakub@redhat.com>
|
||||
Bryce McKinlay <bryce@mckinlay.net.nz>
|
||||
|
||||
* jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
|
||||
|
||||
2006-07-18 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* lang.opt: Added missing -W options.
|
||||
|
||||
2006-07-12 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
PR java/28329:
|
||||
* lang-specs.h: Pass '%U'-based options as separate arguments.
|
||||
Use -faux-classpath.
|
||||
* lang.c (java_handle_option): Handle OPT_faux_classpath.
|
||||
* lang.opt (faux-classpath): New option.
|
||||
|
||||
2006-07-07 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* class.c (make_class_data): Set value for reflection_data field.
|
||||
* decl.c (java_init_decl_processing): Add reflection_data field.
|
||||
|
||||
2006-07-07 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): Declare locals
|
||||
earlier.
|
||||
(HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
|
||||
|
||||
2006-07-07 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* jcf-parse.c (set_source_filename): Don't check for
|
||||
CLASS_FROM_CURRENTLY_COMPILED_P.
|
||||
Remove // comments.
|
||||
|
||||
2006-07-07 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* java-tree.h (java_read_sourcefilenames): Declare.
|
||||
* lang.c (java_handle_option): Call java_read_sourcefilenames().
|
||||
* lang.opt (fsource-filename): New opt.
|
||||
* lang-specs.h: Add -fsource-filename.
|
||||
* jcf-parse.c (num_files, filenames): New variables.
|
||||
(reverse, cmpstringp, java_read_sourcefilenames,
|
||||
find_sourcefile): New.
|
||||
(set_source_filename): Call find_sourcefile to find the real name
|
||||
of a source file.
|
||||
|
||||
2006-06-27 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* jcf-reader.c (get_attribute): Handle EnclosingMethod,
|
||||
Signature, LocalVariableTypeTable, annotation attributes.
|
||||
* jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New macro.
|
||||
(HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
|
||||
(HANDLE_START_FIELD): Mention 'descriptor', not 'signature'.
|
||||
(HANDLE_METHOD): Likewise.
|
||||
(HANDLE_LOCALVARIABLETYPETABLE_ATTRIBUTE): New macro.
|
||||
(print_annotation): New function.
|
||||
(print_element_value): Likewise.
|
||||
(indent): Likewise.
|
||||
(HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE): New macro.
|
||||
(HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE): Likewise.
|
||||
(print_parameter_annotations): New function.
|
||||
(HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE): New macro.
|
||||
(HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE):
|
||||
Likewise.
|
||||
(HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): Likewise.
|
||||
(print_annotations): New function.
|
||||
|
||||
2006-06-23 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* lang-specs.h: Default -fsource and -ftarget to 1.5. If
|
||||
emitting class files, always use 1.5.
|
||||
* gcj.texi (Input Options): Document -fsource.
|
||||
(Code Generation): Document -ftarget.
|
||||
|
||||
2006-06-21 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
PR java/28089:
|
||||
* expr.c (expand_java_field_op): Initialize field's declaring
|
||||
class.
|
||||
|
||||
2006-06-20 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* expr.c (push_value): Always flush quick stack.
|
||||
|
||||
2006-06-19 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* expr.c (push_value): Also flush quick stack if value is a
|
||||
component_ref.
|
||||
|
||||
2006-06-19 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* expr.c (push_value): Flush quick stack if value has side
|
||||
effects.
|
||||
|
||||
2006-06-13 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* class.c (is_compiled_class): Explicitly check for current
|
||||
class.
|
||||
|
||||
2006-06-09 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* gjavah.c (decompile_method): Don't decompile a static field
|
||||
accessor method.
|
||||
|
||||
2006-06-06 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* lang-specs.h <jc1>: Add .jar file to command line if
|
||||
-fsaw-java-file. Also, remove -ffilelist-file in this case.
|
||||
|
||||
2006-06-05 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* jcf-dump.c (print_access_flags): Handle varargs, bridge,
|
||||
synthetic, enum, annotation.
|
||||
* jcf.h (ACC_BRIDGE): New macro.
|
||||
(ACC_VARARGS): Likewise.
|
||||
(ACC_SYNTHETIC): Likewise.
|
||||
(ACC_ENUM): Likewise.
|
||||
(ACC_ANNOTATION): Likewise.
|
||||
|
||||
2006-06-04 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* lang.opt (-fsaw-java-file, -fsource, -ftarget): New options.
|
||||
* jvspec.c (jvgenmain_spec): Remove -fsaw-java-file, -fsource,
|
||||
and -ftarget.
|
||||
(lang_specific_driver): Removed dead code. Add -fsaw-java-file
|
||||
when needed. Handle classpath-setting.
|
||||
* Make-lang.in ($(GCJ)$(exeext)): Link in jcf-path.o.
|
||||
* lang-specs.h: Rewrote.
|
||||
|
||||
2006-06-04 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* jcf-io.c (find_class): Set source_ok to 0.
|
||||
* jcf-parse.c (jcf_parse): Disable gnu.gcj.gcj-compiled warning.
|
||||
(parse_class_file): Don't call java_mark_class_local.
|
||||
(java_parse_file): Skip .java files. Call java_mark_class_local
|
||||
before lowering any code.
|
||||
(parse_zip_file_entries): Don't call duplicate_class_warning
|
||||
here.
|
||||
(process_zip_dir): ... call it here.
|
||||
* class.c (add_field): Don't mark field external if it is being
|
||||
compiled into this object.
|
||||
(make_class_data): Handle situation where class_dtable_decl is
|
||||
created before Class is compiled.
|
||||
(is_compiled_class): Don't assume files in zip are compiled into
|
||||
this object.
|
||||
(layout_class_method): Don't mark method external if it is being
|
||||
compiled into this object.
|
||||
|
||||
2006-06-04 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* jcf-path.c (jcf_path_compute): New function.
|
||||
* jcf.h (jcf_path_compute): Declare.
|
||||
|
||||
2006-10-23 Rafael Avila de Espindola <rafael.espindola@gmail.com>
|
||||
|
||||
* decl.c: Include langhooks.h.
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# Top level -*- makefile -*- fragment for the GNU compiler for the Java(TM)
|
||||
# language.
|
||||
# Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||
# 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
#This file is part of GCC.
|
||||
|
||||
|
@ -43,18 +44,15 @@
|
|||
# Actual names to use when installing a native compiler.
|
||||
JAVA_INSTALL_NAME := $(shell echo gcj|sed '$(program_transform_name)')
|
||||
JAVA_TARGET_INSTALL_NAME := $(target_noncanonical)-$(shell echo gcj|sed '$(program_transform_name)')
|
||||
GCJH_TARGET_INSTALL_NAME := $(target_noncanonical)-$(shell echo gcjh|sed '$(program_transform_name)')
|
||||
|
||||
GCJ = gcj
|
||||
|
||||
# Define the names for selecting java in LANGUAGES.
|
||||
java: jc1$(exeext) $(GCJ)$(exeext) jvgenmain$(exeext) \
|
||||
gcjh$(exeext) jv-scan$(exeext) jcf-dump$(exeext) \
|
||||
gjnih$(exeext)
|
||||
java: jc1$(exeext) $(GCJ)$(exeext) jvgenmain$(exeext) jcf-dump$(exeext)
|
||||
|
||||
# Define the name of target independent tools to be installed in $(bindir)
|
||||
# Names are subject to changes
|
||||
JAVA_TARGET_INDEPENDENT_BIN_TOOLS = gcjh gjnih jv-scan jcf-dump
|
||||
JAVA_TARGET_INDEPENDENT_BIN_TOOLS = jcf-dump
|
||||
|
||||
# Tell GNU make to ignore these if they exist.
|
||||
.PHONY: java
|
||||
|
@ -67,55 +65,28 @@ jvspec.o: $(srcdir)/java/jvspec.c $(SYSTEM_H) coretypes.h $(TM_H) \
|
|||
$(INCLUDES) $(srcdir)/java/jvspec.c $(OUTPUT_OPTION))
|
||||
|
||||
# Create the compiler driver for $(GCJ).
|
||||
$(GCJ)$(exeext): $(GCC_OBJS) jvspec.o version.o \
|
||||
$(GCJ)$(exeext): $(GCC_OBJS) jvspec.o java/jcf-path.o version.o \
|
||||
prefix.o intl.o $(LIBDEPS) $(EXTRA_GCC_OBJS)
|
||||
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(GCC_OBJS) jvspec.o \
|
||||
prefix.o intl.o version.o $(EXTRA_GCC_OBJS) $(LIBS)
|
||||
java/jcf-path.o prefix.o intl.o \
|
||||
version.o $(EXTRA_GCC_OBJS) $(LIBS)
|
||||
|
||||
# Create a version of the $(GCJ) driver which calls the cross-compiler.
|
||||
$(GCJ)-cross$(exeext): $(GCJ)$(exeext)
|
||||
-rm -f $(GCJ)-cross$(exeext)
|
||||
cp $(GCJ)$(exeext) $(GCJ)-cross$(exeext)
|
||||
|
||||
java.srcextra: java/parse.c java/parse-scan.c
|
||||
-cp -p $^ $(srcdir)/java
|
||||
|
||||
java/parse.c: java/parse.y
|
||||
-$(BISON) -t --name-prefix=java_ $(BISONFLAGS) -o $@ $<
|
||||
|
||||
java/parse-scan.c: java/parse-scan.y
|
||||
-$(BISON) -t $(BISONFLAGS) -o $@ $<
|
||||
|
||||
$(srcdir)/java/keyword.h: $(srcdir)/java/keyword.gperf
|
||||
(cd $(srcdir)/java || exit 1; \
|
||||
gperf -L ANSI-C -C -F ', 0' -p -t -j1 -i 1 -g -o -N java_keyword -k1,4,$$ \
|
||||
keyword.gperf > k$$$$.h || { \
|
||||
echo "Please update gperf from ftp://ftp.gnu.org/pub/gnu/gperf/" >&2; \
|
||||
rm -f k$$$$.h; \
|
||||
exit 1; } ; \
|
||||
mv -f k$$$$.h keyword.h)
|
||||
|
||||
gt-java-parse.h : s-gtype ; @true
|
||||
java.srcextra:
|
||||
|
||||
# Executables built by this Makefile:
|
||||
JAVA_OBJS = java/parse.o java/class.o java/decl.o java/expr.o \
|
||||
JAVA_OBJS = java/class.o java/decl.o java/expr.o \
|
||||
java/constants.o java/lang.o java/typeck.o java/except.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 \
|
||||
java/jcf-depend.o \
|
||||
java/jcf-path.o java/boehm.o java/java-gimplify.o
|
||||
|
||||
GCJH_OBJS = java/gjavah.o java/jcf-io.o java/jcf-depend.o java/jcf-path.o \
|
||||
java/win32-host.o java/zextract.o version.o errors.o ggc-none.o \
|
||||
intl.o
|
||||
|
||||
GJNIH_OBJS = java/gjavah-jni.o java/jcf-io.o java/jcf-depend.o java/jcf-path.o \
|
||||
java/win32-host.o java/zextract.o version.o errors.o \
|
||||
ggc-none.o intl.o
|
||||
|
||||
JVSCAN_OBJS = java/parse-scan.o java/jv-scan.o version.o intl.o
|
||||
|
||||
JCFDUMP_OBJS = java/jcf-dump.o java/jcf-io.o java/jcf-depend.o java/jcf-path.o \
|
||||
java/win32-host.o java/zextract.o errors.o version.o ggc-none.o intl.o
|
||||
|
||||
|
@ -128,7 +99,6 @@ java-warn = $(STRICT_WARN)
|
|||
jvspec.o-warn = -Wno-error
|
||||
|
||||
# Bison-1.75 output often yields (harmless) -Wtraditional warnings
|
||||
java/parse-scan.o-warn = -Wno-error
|
||||
java/parse.o-warn = -Wno-error
|
||||
|
||||
jc1$(exeext): $(JAVA_OBJS) $(BACKEND) $(LIBDEPS) attribs.o
|
||||
|
@ -136,18 +106,6 @@ jc1$(exeext): $(JAVA_OBJS) $(BACKEND) $(LIBDEPS) attribs.o
|
|||
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
|
||||
$(JAVA_OBJS) $(BACKEND) $(ZLIB) $(LIBICONV) $(LIBS) attribs.o
|
||||
|
||||
gcjh$(exeext): $(GCJH_OBJS) $(LIBDEPS)
|
||||
rm -f $@
|
||||
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(GCJH_OBJS) $(CPPLIBS) $(ZLIB) $(LIBS)
|
||||
|
||||
gjnih$(exeext): $(GJNIH_OBJS) $(LIBDEPS)
|
||||
rm -f $@
|
||||
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(GJNIH_OBJS) $(CPPLIBS) $(ZLIB) $(LIBS)
|
||||
|
||||
jv-scan$(exeext): $(JVSCAN_OBJS) $(LIBDEPS)
|
||||
rm -f $@
|
||||
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(JVSCAN_OBJS) $(LIBICONV) $(LIBS)
|
||||
|
||||
jcf-dump$(exeext): $(JCFDUMP_OBJS) $(LIBDEPS)
|
||||
rm -f $@
|
||||
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(JCFDUMP_OBJS) \
|
||||
|
@ -179,9 +137,9 @@ java.srcinfo: doc/gcj.info
|
|||
java.dvi: doc/gcj.dvi
|
||||
java.pdf: doc/gcj.pdf
|
||||
java.html: $(build_htmldir)/java/index.html
|
||||
JAVA_MANFILES = doc/gcj.1 doc/gcjh.1 doc/jv-scan.1 doc/jcf-dump.1 doc/gij.1 \
|
||||
JAVA_MANFILES = doc/gcj.1 doc/jcf-dump.1 doc/gij.1 \
|
||||
doc/jv-convert.1 doc/grmic.1 doc/grmiregistry.1 \
|
||||
doc/gcj-dbtool.1 doc/gjnih.1
|
||||
doc/gcj-dbtool.1
|
||||
|
||||
java.man: $(JAVA_MANFILES)
|
||||
|
||||
|
@ -191,14 +149,10 @@ java.srcman: $(JAVA_MANFILES)
|
|||
check-java :
|
||||
|
||||
# Install hooks:
|
||||
# jc1, gcj, jvgenmain, and gcjh are installed elsewhere as part
|
||||
# jc1, gcj, and jvgenmain are installed elsewhere as part
|
||||
# of $(COMPILERS).
|
||||
|
||||
# Install gcj as well as the target-independent tools.
|
||||
# For a native build, we special-case gcjh and also install
|
||||
# its explicitly-prefixed variant. This allows us to write
|
||||
# portable makefiles for both cross builds (where gcjh *must*
|
||||
# be explicitly prefixed) and native builds.
|
||||
java.install-common: installdirs
|
||||
-if [ -f $(GCJ)$(exeext) ]; then \
|
||||
rm -f $(DESTDIR)$(bindir)/$(JAVA_INSTALL_NAME)$(exeext); \
|
||||
|
@ -218,13 +172,6 @@ java.install-common: installdirs
|
|||
rm -f $(DESTDIR)$(bindir)/$$tool_transformed_name$(exeext); \
|
||||
$(INSTALL_PROGRAM) $$tool$(exeext) $(DESTDIR)$(bindir)/$$tool_transformed_name$(exeext); \
|
||||
chmod a+x $(DESTDIR)$(bindir)/$$tool_transformed_name$(exeext); \
|
||||
if [ -f $(GCJ)-cross$(exeext) ]; then \
|
||||
true; \
|
||||
elif [ $$tool = gcjh ]; then \
|
||||
rm -f $(DESTDIR)$(bindir)/$(GCJH_TARGET_INSTALL_NAME)$(exeext); \
|
||||
( cd $(DESTDIR)$(bindir) && \
|
||||
$(LN) $$tool_transformed_name$(exeext) $(GCJH_TARGET_INSTALL_NAME)$(exeext) ); \
|
||||
fi; \
|
||||
fi ; \
|
||||
done
|
||||
|
||||
|
@ -233,9 +180,6 @@ java.install-man:
|
|||
java.uninstall:
|
||||
-rm -rf $(DESTDIR)$(bindir)/$(JAVA_INSTALL_NAME)$(exeext)
|
||||
-rm -rf $(DESTDIR)$(man1dir)/$(JAVA_INSTALL_NAME)$(man1ext)
|
||||
-rm -rf $(DESTDIR)$(man1dir)/gcjh$(man1ext)
|
||||
-rm -rf $(DESTDIR)$(man1dir)/gjnih$(man1ext)
|
||||
-rm -rf $(DESTDIR)$(man1dir)/jv-scan$(man1ext)
|
||||
-rm -rf $(DESTDIR)$(man1dir)/jcf-dump$(man1ext)
|
||||
-rm -rf $(DESTDIR)$(man1dir)/gij$(man1ext)
|
||||
-rm -rf $(DESTDIR)$(man1dir)/jv-convert$(man1ext)
|
||||
|
@ -249,18 +193,16 @@ java.install-info: $(DESTDIR)$(infodir)/gcj.info
|
|||
# We just have to delete files specific to us.
|
||||
|
||||
java.mostlyclean:
|
||||
-rm -f java/parse.c java/parse-scan.c
|
||||
-rm -f java/*$(objext) $(DEMANGLER_PROG)
|
||||
-rm -f java/*$(coverageexts)
|
||||
-rm -f jc1$(exeext) $(GCJ)$(exeext) jvgenmain$(exeext) gcjh$(exeext) \
|
||||
gjnih$(exeext) jv-scan$(exeext) jcf-dump$(exeext) s-java
|
||||
-rm -f jc1$(exeext) $(GCJ)$(exeext) jvgenmain$(exeext) \
|
||||
jcf-dump$(exeext) s-java
|
||||
java.clean:
|
||||
java.distclean:
|
||||
-rm -f java/config.status java/Makefile
|
||||
-rm -f java/parse.output java/y.tab.c
|
||||
java.maintainer-clean:
|
||||
-rm -f $(docobjdir)/gcj.1 $(docobjdir)/gcjh.1 $(docobjdir)/gjnih.1
|
||||
-rm -f $(docobjdir)/jv-scan.1 $(docobjdir)/jcf-dump.1
|
||||
-rm -f $(docobjdir)/gcj.1
|
||||
-rm -f $(docobjdir)/jcf-dump.1
|
||||
-rm -f $(docobjdir)/gij.1
|
||||
-rm -f $(docobjdir)/jv-convert.1
|
||||
-rm -f $(docobjdir)/grmic.1
|
||||
|
@ -286,22 +228,14 @@ java.stagefeedback: stageprofile-start
|
|||
#
|
||||
# .o:.h dependencies.
|
||||
JAVA_TREE_H = $(TREE_H) $(HASHTAB_H) java/java-tree.h java/java-tree.def
|
||||
JAVA_LEX_C = java/lex.c java/keyword.h java/chartables.h
|
||||
|
||||
java/jcf-dump.o: $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(JAVA_TREE_H) \
|
||||
java/jcf-dump.c java/jcf-reader.c java/jcf.h java/javaop.h java/javaop.def \
|
||||
version.h $(GGC_H) intl.h
|
||||
java/gjavah.o: $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(JAVA_TREE_H) \
|
||||
java/gjavah.c java/jcf-reader.c java/jcf.h java/javaop.h version.h $(GGC_H) \
|
||||
intl.h
|
||||
java/boehm.o: java/boehm.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
|
||||
$(TREE_H) $(JAVA_TREE_H) java/parse.h toplev.h
|
||||
java/buffer.o: java/buffer.c $(CONFIG_H) java/buffer.h $(SYSTEM_H) coretypes.h \
|
||||
$(TM_H) toplev.h
|
||||
java/builtins.o: java/builtins.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
|
||||
$(JAVA_TREE_H) $(GGC_H) $(FLAGS_H) langhooks.h gt-java-builtins.h
|
||||
java/check-init.o: java/check-init.c $(CONFIG_H) $(JAVA_TREE_H) $(SYSTEM_H) \
|
||||
coretypes.h $(TM_H) toplev.h
|
||||
java/class.o: java/class.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
|
||||
$(JAVA_TREE_H) $(RTL_H) java/jcf.h java/parse.h toplev.h output.h $(GGC_H) \
|
||||
$(TARGET_H) $(FUNCTION_H) gt-java-class.h $(CGRAPH_H)
|
||||
|
@ -323,11 +257,6 @@ java/jcf-depend.o: java/jcf-depend.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
|
|||
java/jcf-parse.o: java/jcf-parse.c $(CONFIG_H) $(JAVA_TREE_H) $(FLAGS_H) \
|
||||
input.h java/java-except.h $(SYSTEM_H) coretypes.h $(TM_H) toplev.h \
|
||||
java/parse.h $(GGC_H) debug.h $(REAL_H) gt-java-jcf-parse.h $(TM_P_H)
|
||||
java/jcf-write.o: java/jcf-write.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h \
|
||||
$(RTL_H) java/java-opcodes.h java/parse.h java/buffer.h $(SYSTEM_H) \
|
||||
coretypes.h $(TM_H) toplev.h $(GGC_H) gt-java-jcf-write.h $(TM_P_H)
|
||||
java/jv-scan.o: java/jv-scan.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
|
||||
version.h intl.h
|
||||
java/jvgenmain.o: java/jvgenmain.c $(CONFIG_H) $(JAVA_TREE_H) $(SYSTEM_H) \
|
||||
coretypes.h $(TM_H) intl.h
|
||||
java/lang.o: java/lang.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h input.h \
|
||||
|
@ -341,7 +270,7 @@ java/resource.o: java/resource.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
|
|||
$(JAVA_TREE_H) $(RTL_H) java/jcf.h java/parse.h toplev.h output.h $(GGC_H) \
|
||||
$(TARGET_H) $(FUNCTION_H) gt-java-resource.h $(EXPR_H)
|
||||
java/typeck.o: java/typeck.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h \
|
||||
java/convert.h toplev.h $(SYSTEM_H) coretypes.h $(TM_H) $(GGC_H) $(REAL_H)
|
||||
toplev.h $(SYSTEM_H) coretypes.h $(TM_H) $(GGC_H) $(REAL_H)
|
||||
java/win32-host.o: java/win32-host.c $(CONFIG_H) $(SYSTEM_H) coretypes.h java/jcf.h
|
||||
java/verify-glue.o: java/verify-glue.c $(CONFIG_H) $(SYSTEM_H) $(JAVA_TREE_H) \
|
||||
coretypes.h $(TM_H) java/verify.h toplev.h
|
||||
|
@ -352,13 +281,6 @@ java/zextract.o: java/zextract.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
|
|||
java/java-gimplify.o: java/java-gimplify.c $(CONFIG_H) $(SYSTEM_H) \
|
||||
coretypes.h $(TM_H) $(JAVA_TREE_H) $(TREE_GIMPLE_H) toplev.h
|
||||
|
||||
java/parse-scan.o: java/parse-scan.c $(CONFIG_H) $(SYSTEM_H) \
|
||||
coretypes.h $(TM_H) toplev.h $(JAVA_LEX_C) java/parse.h java/lex.h input.h
|
||||
java/parse.o: java/parse.c java/jcf-reader.c $(CONFIG_H) $(SYSTEM_H) \
|
||||
coretypes.h $(TM_H) $(FUNCTION_H) $(JAVA_TREE_H) $(JAVA_LEX_C) java/parse.h \
|
||||
java/lex.h input.h $(GGC_H) debug.h gt-java-parse.h gtype-java.h $(TARGET_H) \
|
||||
$(TREE_DUMP_H)
|
||||
|
||||
# jcf-io.o needs $(ZLIBINC) added to cflags.
|
||||
java/jcf-io.o: java/jcf-io.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
|
||||
$(JAVA_TREE_H)
|
||||
|
@ -373,14 +295,6 @@ java/jcf-path.o: java/jcf-path.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
|
|||
-DDEFAULT_TARGET_VERSION=\"$(version)\" \
|
||||
$(srcdir)/java/jcf-path.c $(OUTPUT_OPTION)
|
||||
|
||||
# create gjnih's object
|
||||
java/gjavah-jni.o: $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(JAVA_TREE_H) \
|
||||
java/gjavah.c java/jcf-reader.c java/jcf.h java/javaop.h version.h $(GGC_H) \
|
||||
intl.h
|
||||
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(ZLIBINC) \
|
||||
-DJNI_DEFAULT=1 \
|
||||
$(srcdir)/java/gjavah.c $(OUTPUT_OPTION)
|
||||
|
||||
TEXI_JAVA_FILES = java/gcj.texi $(gcc_docdir)/include/fdl.texi \
|
||||
$(gcc_docdir)/include/gpl.texi $(gcc_docdir)/include/gcc-common.texi \
|
||||
gcc-vers.texi
|
||||
|
@ -403,17 +317,11 @@ $(build_htmldir)/java/index.html: $(TEXI_JAVA_FILES)
|
|||
rm -f $(@D)/*
|
||||
$(TEXI2HTML) -I $(gcc_docdir)/include -I $(srcdir)/java -o $(@D) $<
|
||||
|
||||
.INTERMEDIATE: gcj.pod gcjh.pod jv-scan.pod jcf-dump.pod gij.pod \
|
||||
jv-convert.pod grmic.pod grmiregistry.pod gcj-dbtool.pod gjnih.pod
|
||||
.INTERMEDIATE: gcj.pod jcf-dump.pod gij.pod \
|
||||
jv-convert.pod grmic.pod grmiregistry.pod gcj-dbtool.pod
|
||||
|
||||
gcj.pod: java/gcj.texi
|
||||
-$(TEXI2POD) -D gcj < $< > $@
|
||||
gcjh.pod: java/gcj.texi
|
||||
-$(TEXI2POD) -D gcjh < $< > $@
|
||||
gjnih.pod: java/gcj.texi
|
||||
-$(TEXI2POD) -D gjnih < $< > $@
|
||||
jv-scan.pod: java/gcj.texi
|
||||
-$(TEXI2POD) -D jv-scan < $< > $@
|
||||
jcf-dump.pod: java/gcj.texi
|
||||
-$(TEXI2POD) -D jcf-dump < $< > $@
|
||||
gij.pod: java/gcj.texi
|
||||
|
|
|
@ -1,51 +0,0 @@
|
|||
/* A "buffer" utility type.
|
||||
Copyright (C) 1998, 2003 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, 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA. */
|
||||
|
||||
/* Written by Per Bothner <bothner@cygnus.com>, July 1998. */
|
||||
|
||||
#include "config.h"
|
||||
#include "system.h"
|
||||
#include "coretypes.h"
|
||||
#include "tm.h"
|
||||
#include "buffer.h"
|
||||
|
||||
/* Grow BUFP so there is room for at least SIZE more bytes. */
|
||||
|
||||
void
|
||||
buffer_grow (struct buffer *bufp, int size)
|
||||
{
|
||||
if (bufp->limit - bufp->ptr >= size)
|
||||
return;
|
||||
if (bufp->data == 0)
|
||||
{
|
||||
if (size < 120)
|
||||
size = 120;
|
||||
bufp->data = XNEWVEC (unsigned char, size);
|
||||
bufp->ptr = bufp->data;
|
||||
}
|
||||
else
|
||||
{
|
||||
int index = bufp->ptr - bufp->data;
|
||||
size += 2 * (bufp->limit - bufp->data);
|
||||
bufp->data = xrealloc (bufp->data, size);
|
||||
bufp->ptr = bufp->data + index;
|
||||
}
|
||||
bufp->limit = bufp->data + size;
|
||||
}
|
|
@ -1,46 +0,0 @@
|
|||
/* A "buffer" utility type.
|
||||
Copyright (C) 1998, 2000, 2003 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, 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA. */
|
||||
|
||||
/* Written by Per Bothner <bothner@cygnus.com>, July 1998. */
|
||||
|
||||
/* A simple data structure for an expandable buffer. */
|
||||
|
||||
struct buffer
|
||||
{
|
||||
/* The start of the actual data buffer. */
|
||||
unsigned char *data;
|
||||
|
||||
/* Where to write next in the buffer. */
|
||||
unsigned char *ptr;
|
||||
|
||||
/* The end of the allocated data buffer. */
|
||||
unsigned char *limit;
|
||||
};
|
||||
|
||||
#define NULL_BUFFER { (void*) 0, (void*) 0, (void*) 0 }
|
||||
|
||||
#define BUFFER_INIT(BUFP) \
|
||||
((BUFP)->data = NULL, (BUFP)->ptr = NULL, (BUFP)->limit = NULL)
|
||||
|
||||
#define BUFFER_LENGTH(BUFP) ((BUFP)->ptr - (BUFP)->data)
|
||||
|
||||
#define BUFFER_RESET(BUFP) ((BUFP)->ptr = (BUFP)->data)
|
||||
|
||||
extern void buffer_grow (struct buffer*, int);
|
|
@ -34,7 +34,12 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
|
|||
#include "flags.h"
|
||||
#include "langhooks.h"
|
||||
#include "java-tree.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
#include "convert.h"
|
||||
#include "rtl.h"
|
||||
#include "insn-codes.h"
|
||||
#include "expr.h"
|
||||
#include "optabs.h"
|
||||
|
||||
static tree max_builtin (tree, tree);
|
||||
static tree min_builtin (tree, tree);
|
||||
|
@ -43,6 +48,13 @@ static tree convert_real (tree, tree);
|
|||
|
||||
static tree java_build_function_call_expr (tree, tree);
|
||||
|
||||
static tree putObject_builtin (tree, tree);
|
||||
static tree compareAndSwapInt_builtin (tree, tree);
|
||||
static tree compareAndSwapLong_builtin (tree, tree);
|
||||
static tree compareAndSwapObject_builtin (tree, tree);
|
||||
static tree putVolatile_builtin (tree, tree);
|
||||
static tree getVolatile_builtin (tree, tree);
|
||||
|
||||
|
||||
|
||||
/* Functions of this type are used to inline a given call. Such a
|
||||
|
@ -90,6 +102,25 @@ static GTY(()) struct builtin_record java_builtins[] =
|
|||
{ { "java.lang.Double" }, { "longBitsToDouble" }, convert_real, 0 },
|
||||
{ { "java.lang.Float" }, { "floatToRawIntBits" }, convert_real, 0 },
|
||||
{ { "java.lang.Double" }, { "doubleToRawLongBits" }, convert_real, 0 },
|
||||
{ { "sun.misc.Unsafe" }, { "putInt" }, putObject_builtin, 0},
|
||||
{ { "sun.misc.Unsafe" }, { "putLong" }, putObject_builtin, 0},
|
||||
{ { "sun.misc.Unsafe" }, { "putObject" }, putObject_builtin, 0},
|
||||
{ { "sun.misc.Unsafe" }, { "compareAndSwapInt" },
|
||||
compareAndSwapInt_builtin, 0},
|
||||
{ { "sun.misc.Unsafe" }, { "compareAndSwapLong" },
|
||||
compareAndSwapLong_builtin, 0},
|
||||
{ { "sun.misc.Unsafe" }, { "compareAndSwapObject" },
|
||||
compareAndSwapObject_builtin, 0},
|
||||
{ { "sun.misc.Unsafe" }, { "putOrderedInt" }, putVolatile_builtin, 0},
|
||||
{ { "sun.misc.Unsafe" }, { "putOrderedLong" }, putVolatile_builtin, 0},
|
||||
{ { "sun.misc.Unsafe" }, { "putOrderedObject" }, putVolatile_builtin, 0},
|
||||
{ { "sun.misc.Unsafe" }, { "putIntVolatile" }, putVolatile_builtin, 0},
|
||||
{ { "sun.misc.Unsafe" }, { "putLongVolatile" }, putVolatile_builtin, 0},
|
||||
{ { "sun.misc.Unsafe" }, { "putObjectVolatile" }, putVolatile_builtin, 0},
|
||||
{ { "sun.misc.Unsafe" }, { "getObjectVolatile" }, getVolatile_builtin, 0},
|
||||
{ { "sun.misc.Unsafe" }, { "getIntVolatile" }, getVolatile_builtin, 0},
|
||||
{ { "sun.misc.Unsafe" }, { "getLongVolatile" }, getVolatile_builtin, 0},
|
||||
{ { "sun.misc.Unsafe" }, { "getLong" }, getVolatile_builtin, 0},
|
||||
{ { NULL }, { NULL }, NULL, END_BUILTINS }
|
||||
};
|
||||
|
||||
|
@ -145,6 +176,265 @@ convert_real (tree method_return_type, tree method_arguments)
|
|||
|
||||
|
||||
|
||||
/* Provide builtin support for atomic operations. These are
|
||||
documented at length in libjava/sun/misc/Unsafe.java. */
|
||||
|
||||
/* FIXME. There are still a few things wrong with this logic. In
|
||||
particular, atomic writes of multi-word integers are not truly
|
||||
atomic: this requires more work.
|
||||
|
||||
In general, double-word compare-and-swap cannot portably be
|
||||
implemented, so we need some kind of fallback for 32-bit machines.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/* Macros to unmarshal arguments from a TREE_LIST into a few
|
||||
variables. We also convert the offset arg from a long to an
|
||||
integer that is the same size as a pointer. */
|
||||
|
||||
#define UNMARSHAL3(METHOD_ARGUMENTS) \
|
||||
tree this_arg, obj_arg, offset_arg; \
|
||||
do \
|
||||
{ \
|
||||
tree chain = METHOD_ARGUMENTS; \
|
||||
this_arg = TREE_VALUE (chain); \
|
||||
chain = TREE_CHAIN (chain); \
|
||||
obj_arg = TREE_VALUE (chain); \
|
||||
chain = TREE_CHAIN (chain); \
|
||||
offset_arg = fold_convert (java_type_for_size (POINTER_SIZE, 0), \
|
||||
TREE_VALUE (chain)); \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
#define UNMARSHAL4(METHOD_ARGUMENTS) \
|
||||
tree value_type, this_arg, obj_arg, offset_arg, value_arg; \
|
||||
do \
|
||||
{ \
|
||||
tree chain = METHOD_ARGUMENTS; \
|
||||
this_arg = TREE_VALUE (chain); \
|
||||
chain = TREE_CHAIN (chain); \
|
||||
obj_arg = TREE_VALUE (chain); \
|
||||
chain = TREE_CHAIN (chain); \
|
||||
offset_arg = fold_convert (java_type_for_size (POINTER_SIZE, 0), \
|
||||
TREE_VALUE (chain)); \
|
||||
chain = TREE_CHAIN (chain); \
|
||||
value_arg = TREE_VALUE (chain); \
|
||||
value_type = TREE_TYPE (value_arg); \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
#define UNMARSHAL5(METHOD_ARGUMENTS) \
|
||||
tree value_type, this_arg, obj_arg, offset_arg, expected_arg, value_arg; \
|
||||
do \
|
||||
{ \
|
||||
tree chain = METHOD_ARGUMENTS; \
|
||||
this_arg = TREE_VALUE (chain); \
|
||||
chain = TREE_CHAIN (chain); \
|
||||
obj_arg = TREE_VALUE (chain); \
|
||||
chain = TREE_CHAIN (chain); \
|
||||
offset_arg = fold_convert (java_type_for_size (POINTER_SIZE, 0), \
|
||||
TREE_VALUE (chain)); \
|
||||
chain = TREE_CHAIN (chain); \
|
||||
expected_arg = TREE_VALUE (chain); \
|
||||
chain = TREE_CHAIN (chain); \
|
||||
value_arg = TREE_VALUE (chain); \
|
||||
value_type = TREE_TYPE (value_arg); \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
/* Construct an arglist from a call. */
|
||||
|
||||
static tree
|
||||
build_arglist_for_builtin (tree arg, ...)
|
||||
{
|
||||
va_list ap;
|
||||
tree nextarg;
|
||||
tree newarglist = build_tree_list (NULL_TREE, arg);
|
||||
|
||||
va_start(ap, arg);
|
||||
while ((nextarg = va_arg(ap, tree)))
|
||||
newarglist = tree_cons (NULL_TREE, nextarg, newarglist);
|
||||
|
||||
return nreverse (newarglist);
|
||||
}
|
||||
|
||||
/* Add an address to an offset, forming a sum. */
|
||||
|
||||
static tree
|
||||
build_addr_sum (tree type, tree addr, tree offset)
|
||||
{
|
||||
tree ptr_type = build_pointer_type (type);
|
||||
return fold_build2 (PLUS_EXPR,
|
||||
ptr_type,
|
||||
fold_convert (ptr_type, addr), offset);
|
||||
}
|
||||
|
||||
/* Make sure that this-arg is non-NULL. This is a security check. */
|
||||
|
||||
static tree
|
||||
build_check_this (tree stmt, tree this_arg)
|
||||
{
|
||||
return build2 (COMPOUND_EXPR, TREE_TYPE (stmt),
|
||||
java_check_reference (this_arg, 1), stmt);
|
||||
}
|
||||
|
||||
/* Now the builtins. These correspond to the primitive functions in
|
||||
libjava/sun/misc/natUnsafe.cc. */
|
||||
|
||||
static tree
|
||||
putObject_builtin (tree method_return_type ATTRIBUTE_UNUSED,
|
||||
tree method_arguments)
|
||||
{
|
||||
tree addr, stmt;
|
||||
UNMARSHAL4 (method_arguments);
|
||||
|
||||
addr = build_addr_sum (value_type, obj_arg, offset_arg);
|
||||
stmt = fold_build2 (MODIFY_EXPR, value_type,
|
||||
build_java_indirect_ref (value_type, addr,
|
||||
flag_check_references),
|
||||
value_arg);
|
||||
|
||||
return build_check_this (stmt, this_arg);
|
||||
}
|
||||
|
||||
static tree
|
||||
compareAndSwapInt_builtin (tree method_return_type ATTRIBUTE_UNUSED,
|
||||
tree method_arguments)
|
||||
{
|
||||
enum machine_mode mode = TYPE_MODE (int_type_node);
|
||||
if (sync_compare_and_swap_cc[mode] != CODE_FOR_nothing
|
||||
|| sync_compare_and_swap[mode] != CODE_FOR_nothing)
|
||||
{
|
||||
tree newarglist, addr, stmt;
|
||||
UNMARSHAL5 (method_arguments);
|
||||
|
||||
addr = build_addr_sum (int_type_node, obj_arg, offset_arg);
|
||||
|
||||
newarglist
|
||||
= build_arglist_for_builtin (addr, expected_arg, value_arg, NULL_TREE);
|
||||
stmt = (build_function_call_expr
|
||||
(built_in_decls[BUILT_IN_BOOL_COMPARE_AND_SWAP_4],
|
||||
newarglist));
|
||||
|
||||
return build_check_this (stmt, this_arg);
|
||||
}
|
||||
return NULL_TREE;
|
||||
}
|
||||
|
||||
static tree
|
||||
compareAndSwapLong_builtin (tree method_return_type ATTRIBUTE_UNUSED,
|
||||
tree method_arguments)
|
||||
{
|
||||
enum machine_mode mode = TYPE_MODE (long_type_node);
|
||||
if (sync_compare_and_swap_cc[mode] != CODE_FOR_nothing
|
||||
|| sync_compare_and_swap[mode] != CODE_FOR_nothing)
|
||||
{
|
||||
tree newarglist, addr, stmt;
|
||||
UNMARSHAL5 (method_arguments);
|
||||
|
||||
addr = build_addr_sum (long_type_node, obj_arg, offset_arg);
|
||||
|
||||
newarglist
|
||||
= build_arglist_for_builtin (addr, expected_arg, value_arg, NULL_TREE);
|
||||
stmt = (build_function_call_expr
|
||||
(built_in_decls[BUILT_IN_BOOL_COMPARE_AND_SWAP_8],
|
||||
newarglist));
|
||||
|
||||
return build_check_this (stmt, this_arg);
|
||||
}
|
||||
return NULL_TREE;
|
||||
}
|
||||
static tree
|
||||
compareAndSwapObject_builtin (tree method_return_type ATTRIBUTE_UNUSED,
|
||||
tree method_arguments)
|
||||
{
|
||||
enum machine_mode mode = TYPE_MODE (ptr_type_node);
|
||||
if (sync_compare_and_swap_cc[mode] != CODE_FOR_nothing
|
||||
|| sync_compare_and_swap[mode] != CODE_FOR_nothing)
|
||||
{
|
||||
tree newarglist, addr, stmt;
|
||||
int builtin;
|
||||
|
||||
UNMARSHAL5 (method_arguments);
|
||||
builtin = (POINTER_SIZE == 32
|
||||
? BUILT_IN_BOOL_COMPARE_AND_SWAP_4
|
||||
: BUILT_IN_BOOL_COMPARE_AND_SWAP_8);
|
||||
|
||||
addr = build_addr_sum (value_type, obj_arg, offset_arg);
|
||||
|
||||
newarglist
|
||||
= build_arglist_for_builtin (addr, expected_arg, value_arg, NULL_TREE);
|
||||
stmt = (build_function_call_expr
|
||||
(built_in_decls[builtin],
|
||||
newarglist));
|
||||
|
||||
return build_check_this (stmt, this_arg);
|
||||
}
|
||||
return NULL_TREE;
|
||||
}
|
||||
|
||||
static tree
|
||||
putVolatile_builtin (tree method_return_type ATTRIBUTE_UNUSED,
|
||||
tree method_arguments)
|
||||
{
|
||||
tree newarglist, addr, stmt, modify_stmt;
|
||||
UNMARSHAL4 (method_arguments);
|
||||
|
||||
addr = build_addr_sum (value_type, obj_arg, offset_arg);
|
||||
addr
|
||||
= fold_convert (build_pointer_type (build_type_variant (value_type, 0, 1)),
|
||||
addr);
|
||||
|
||||
newarglist = NULL_TREE;
|
||||
stmt = (build_function_call_expr
|
||||
(built_in_decls[BUILT_IN_SYNCHRONIZE],
|
||||
newarglist));
|
||||
modify_stmt = fold_build2 (MODIFY_EXPR, value_type,
|
||||
build_java_indirect_ref (value_type, addr,
|
||||
flag_check_references),
|
||||
value_arg);
|
||||
stmt = build2 (COMPOUND_EXPR, TREE_TYPE (modify_stmt),
|
||||
stmt, modify_stmt);
|
||||
|
||||
return build_check_this (stmt, this_arg);
|
||||
}
|
||||
|
||||
static tree
|
||||
getVolatile_builtin (tree method_return_type ATTRIBUTE_UNUSED,
|
||||
tree method_arguments)
|
||||
{
|
||||
tree newarglist, addr, stmt, modify_stmt, tmp;
|
||||
UNMARSHAL3 (method_arguments);
|
||||
|
||||
addr = build_addr_sum (method_return_type, obj_arg, offset_arg);
|
||||
addr
|
||||
= fold_convert (build_pointer_type (build_type_variant
|
||||
(method_return_type, 0, 1)), addr);
|
||||
|
||||
newarglist = NULL_TREE;
|
||||
stmt = (build_function_call_expr
|
||||
(built_in_decls[BUILT_IN_SYNCHRONIZE],
|
||||
newarglist));
|
||||
|
||||
tmp = build_decl (VAR_DECL, NULL, method_return_type);
|
||||
DECL_IGNORED_P (tmp) = 1;
|
||||
DECL_ARTIFICIAL (tmp) = 1;
|
||||
pushdecl (tmp);
|
||||
|
||||
modify_stmt = fold_build2 (MODIFY_EXPR, method_return_type,
|
||||
tmp,
|
||||
build_java_indirect_ref (method_return_type, addr,
|
||||
flag_check_references));
|
||||
|
||||
stmt = build2 (COMPOUND_EXPR, void_type_node, modify_stmt, stmt);
|
||||
stmt = build2 (COMPOUND_EXPR, method_return_type, stmt, tmp);
|
||||
|
||||
return stmt;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#define BUILTIN_NOTHROW 1
|
||||
#define BUILTIN_CONST 2
|
||||
/* Define a single builtin. */
|
||||
|
@ -258,10 +548,27 @@ initialize_builtins (void)
|
|||
boolean_ftype_boolean_boolean,
|
||||
"__builtin_expect",
|
||||
BUILTIN_CONST | BUILTIN_NOTHROW);
|
||||
|
||||
define_builtin (BUILT_IN_BOOL_COMPARE_AND_SWAP_4,
|
||||
"__sync_bool_compare_and_swap_4",
|
||||
build_function_type_list (boolean_type_node,
|
||||
int_type_node,
|
||||
build_pointer_type (int_type_node),
|
||||
int_type_node, NULL_TREE),
|
||||
"__sync_bool_compare_and_swap_4", 0);
|
||||
define_builtin (BUILT_IN_BOOL_COMPARE_AND_SWAP_8,
|
||||
"__sync_bool_compare_and_swap_8",
|
||||
build_function_type_list (boolean_type_node,
|
||||
long_type_node,
|
||||
build_pointer_type (long_type_node),
|
||||
int_type_node, NULL_TREE),
|
||||
"__sync_bool_compare_and_swap_8", 0);
|
||||
define_builtin (BUILT_IN_SYNCHRONIZE, "__sync_synchronize",
|
||||
build_function_type (void_type_node, void_list_node),
|
||||
"__sync_synchronize", BUILTIN_NOTHROW);
|
||||
|
||||
define_builtin (BUILT_IN_RETURN_ADDRESS, "__builtin_return_address",
|
||||
build_function_type_list (ptr_type_node, int_type_node, NULL_TREE),
|
||||
"__builtin_return_address", BUILTIN_NOTHROW);
|
||||
|
||||
build_common_builtin_nodes ();
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
207
gcc/java/class.c
207
gcc/java/class.c
|
@ -1,6 +1,6 @@
|
|||
/* Functions related to building classes and their related objects.
|
||||
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
|
||||
Free Software Foundation, Inc.
|
||||
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||
2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
|
@ -46,6 +46,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
|
|||
#include "cgraph.h"
|
||||
#include "tree-iterator.h"
|
||||
#include "cgraph.h"
|
||||
#include "vecprim.h"
|
||||
|
||||
/* DOS brain-damage */
|
||||
#ifndef O_BINARY
|
||||
|
@ -68,6 +69,8 @@ static void register_class (void);
|
|||
|
||||
struct obstack temporary_obstack;
|
||||
|
||||
static const char *cyclic_inheritance_report;
|
||||
|
||||
/* The compiler generates different code depending on whether or not
|
||||
it can assume certain classes have been compiled down to native
|
||||
code or not. The compiler options -fassume-compiled= and
|
||||
|
@ -497,6 +500,9 @@ set_class_decl_access_flags (int access_flags, tree class_decl)
|
|||
if (access_flags & ACC_PRIVATE) CLASS_PRIVATE (class_decl) = 1;
|
||||
if (access_flags & ACC_PROTECTED) CLASS_PROTECTED (class_decl) = 1;
|
||||
if (access_flags & ACC_STRICT) CLASS_STRICTFP (class_decl) = 1;
|
||||
if (access_flags & ACC_ENUM) CLASS_ENUM (class_decl) = 1;
|
||||
if (access_flags & ACC_SYNTHETIC) CLASS_SYNTHETIC (class_decl) = 1;
|
||||
if (access_flags & ACC_ANNOTATION) CLASS_ANNOTATION (class_decl) = 1;
|
||||
}
|
||||
|
||||
/* Return length of inheritance chain of CLAS, where java.lang.Object is 0,
|
||||
|
@ -719,9 +725,6 @@ add_method_1 (tree this_class, int access_flags, tree name, tree function_type)
|
|||
DECL_FUNCTION_INITIALIZED_CLASS_TABLE (fndecl) =
|
||||
htab_create_ggc (50, htab_hash_pointer, htab_eq_pointer, NULL);
|
||||
|
||||
/* Initialize the static method invocation compound list */
|
||||
DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND (fndecl) = NULL_TREE;
|
||||
|
||||
TREE_CHAIN (fndecl) = TYPE_METHODS (this_class);
|
||||
TYPE_METHODS (this_class) = fndecl;
|
||||
|
||||
|
@ -748,6 +751,9 @@ add_method_1 (tree this_class, int access_flags, tree name, tree function_type)
|
|||
if (access_flags & ACC_SYNCHRONIZED) METHOD_SYNCHRONIZED (fndecl) = 1;
|
||||
if (access_flags & ACC_ABSTRACT) METHOD_ABSTRACT (fndecl) = 1;
|
||||
if (access_flags & ACC_STRICT) METHOD_STRICTFP (fndecl) = 1;
|
||||
if (access_flags & ACC_SYNTHETIC) DECL_ARTIFICIAL (fndecl) = 1;
|
||||
if (access_flags & ACC_BRIDGE) METHOD_BRIDGE (fndecl) = 1;
|
||||
if (access_flags & ACC_VARARGS) METHOD_VARARGS (fndecl) = 1;
|
||||
return fndecl;
|
||||
}
|
||||
|
||||
|
@ -780,6 +786,7 @@ add_field (tree class, tree name, tree field_type, int flags)
|
|||
TREE_CHAIN (field) = TYPE_FIELDS (class);
|
||||
TYPE_FIELDS (class) = field;
|
||||
DECL_CONTEXT (field) = class;
|
||||
MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC (field);
|
||||
|
||||
if (flags & ACC_PUBLIC) FIELD_PUBLIC (field) = 1;
|
||||
if (flags & ACC_PROTECTED) FIELD_PROTECTED (field) = 1;
|
||||
|
@ -791,15 +798,17 @@ add_field (tree class, tree name, tree field_type, int flags)
|
|||
TREE_THIS_VOLATILE (field) = 1;
|
||||
}
|
||||
if (flags & ACC_TRANSIENT) FIELD_TRANSIENT (field) = 1;
|
||||
if (flags & ACC_ENUM) FIELD_ENUM (field) = 1;
|
||||
if (flags & ACC_SYNTHETIC) FIELD_SYNTHETIC (field) = 1;
|
||||
if (is_static)
|
||||
{
|
||||
FIELD_STATIC (field) = 1;
|
||||
/* Always make field externally visible. This is required so
|
||||
that native methods can always access the field. */
|
||||
TREE_PUBLIC (field) = 1;
|
||||
/* Considered external until we know what classes are being
|
||||
compiled into this object file. */
|
||||
DECL_EXTERNAL (field) = 1;
|
||||
/* Considered external unless we are compiling it into this
|
||||
object file. */
|
||||
DECL_EXTERNAL (field) = (is_compiled_class (class) != 2);
|
||||
}
|
||||
|
||||
return field;
|
||||
|
@ -1219,6 +1228,10 @@ get_access_flags_from_decl (tree decl)
|
|||
access_flags |= ACC_VOLATILE;
|
||||
if (FIELD_TRANSIENT (decl))
|
||||
access_flags |= ACC_TRANSIENT;
|
||||
if (FIELD_ENUM (decl))
|
||||
access_flags |= ACC_ENUM;
|
||||
if (FIELD_SYNTHETIC (decl))
|
||||
access_flags |= ACC_SYNTHETIC;
|
||||
return access_flags;
|
||||
}
|
||||
if (TREE_CODE (decl) == TYPE_DECL)
|
||||
|
@ -1241,6 +1254,12 @@ get_access_flags_from_decl (tree decl)
|
|||
access_flags |= ACC_PROTECTED;
|
||||
if (CLASS_STRICTFP (decl))
|
||||
access_flags |= ACC_STRICT;
|
||||
if (CLASS_ENUM (decl))
|
||||
access_flags |= ACC_ENUM;
|
||||
if (CLASS_SYNTHETIC (decl))
|
||||
access_flags |= ACC_SYNTHETIC;
|
||||
if (CLASS_ANNOTATION (decl))
|
||||
access_flags |= ACC_ANNOTATION;
|
||||
return access_flags;
|
||||
}
|
||||
if (TREE_CODE (decl) == FUNCTION_DECL)
|
||||
|
@ -1265,6 +1284,12 @@ get_access_flags_from_decl (tree decl)
|
|||
access_flags |= ACC_STRICT;
|
||||
if (METHOD_INVISIBLE (decl))
|
||||
access_flags |= ACC_INVISIBLE;
|
||||
if (DECL_ARTIFICIAL (decl))
|
||||
access_flags |= ACC_SYNTHETIC;
|
||||
if (METHOD_BRIDGE (decl))
|
||||
access_flags |= ACC_BRIDGE;
|
||||
if (METHOD_VARARGS (decl))
|
||||
access_flags |= ACC_VARARGS;
|
||||
return access_flags;
|
||||
}
|
||||
gcc_unreachable ();
|
||||
|
@ -1646,6 +1671,8 @@ make_class_data (tree type)
|
|||
to where objects actually point at, following new g++ ABI. */
|
||||
tree dtable_start_offset = build_int_cst (NULL_TREE,
|
||||
2 * POINTER_SIZE / BITS_PER_UNIT);
|
||||
VEC(int, heap) *field_indexes;
|
||||
tree first_real_field;
|
||||
|
||||
this_class_addr = build_static_class_ref (type);
|
||||
decl = TREE_OPERAND (this_class_addr, 0);
|
||||
|
@ -1655,15 +1682,28 @@ make_class_data (tree type)
|
|||
{
|
||||
tree dtable = get_dispatch_table (type, this_class_addr);
|
||||
uses_jv_markobj = uses_jv_markobj_p (dtable);
|
||||
dtable_decl = build_dtable_decl (type);
|
||||
DECL_INITIAL (dtable_decl) = dtable;
|
||||
TREE_STATIC (dtable_decl) = 1;
|
||||
DECL_ARTIFICIAL (dtable_decl) = 1;
|
||||
DECL_IGNORED_P (dtable_decl) = 1;
|
||||
if (type == class_type_node && class_dtable_decl != NULL_TREE)
|
||||
{
|
||||
/* We've already created some other class, and consequently
|
||||
we made class_dtable_decl. Now we just want to fill it
|
||||
in. */
|
||||
dtable_decl = class_dtable_decl;
|
||||
}
|
||||
else
|
||||
{
|
||||
dtable_decl = build_dtable_decl (type);
|
||||
TREE_STATIC (dtable_decl) = 1;
|
||||
DECL_ARTIFICIAL (dtable_decl) = 1;
|
||||
DECL_IGNORED_P (dtable_decl) = 1;
|
||||
}
|
||||
|
||||
TREE_PUBLIC (dtable_decl) = 1;
|
||||
DECL_INITIAL (dtable_decl) = dtable;
|
||||
if (! flag_indirect_classes)
|
||||
rest_of_decl_compilation (dtable_decl, 1, 0);
|
||||
if (type == class_type_node)
|
||||
/* Maybe we're compiling Class as the first class. If so, set
|
||||
class_dtable_decl to the decl we just made. */
|
||||
if (type == class_type_node && class_dtable_decl == NULL_TREE)
|
||||
class_dtable_decl = dtable_decl;
|
||||
}
|
||||
|
||||
|
@ -1673,7 +1713,54 @@ make_class_data (tree type)
|
|||
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))
|
||||
first_real_field = field;
|
||||
|
||||
/* First count static and instance fields. */
|
||||
for ( ; field != NULL_TREE; field = TREE_CHAIN (field))
|
||||
{
|
||||
if (! DECL_ARTIFICIAL (field))
|
||||
{
|
||||
if (FIELD_STATIC (field))
|
||||
static_field_count++;
|
||||
else if (uses_jv_markobj || !flag_reduced_reflection)
|
||||
instance_field_count++;
|
||||
}
|
||||
}
|
||||
field_count = static_field_count + instance_field_count;
|
||||
field_indexes = VEC_alloc (int, heap, field_count);
|
||||
|
||||
/* gcj sorts fields so that static fields come first, followed by
|
||||
instance fields. Unfortunately, by the time this takes place we
|
||||
have already generated the reflection_data for this class, and
|
||||
that data contians indexes into the fields. So, we generate a
|
||||
permutation that maps each original field index to its final
|
||||
position. Then we pass this permutation to
|
||||
rewrite_reflection_indexes(), which fixes up the reflection
|
||||
data. */
|
||||
{
|
||||
int i;
|
||||
int static_count = 0;
|
||||
int instance_count = static_field_count;
|
||||
int field_index;
|
||||
|
||||
for (i = 0, field = first_real_field;
|
||||
field != NULL_TREE;
|
||||
field = TREE_CHAIN (field), i++)
|
||||
{
|
||||
if (! DECL_ARTIFICIAL (field))
|
||||
{
|
||||
field_index = 0;
|
||||
if (FIELD_STATIC (field))
|
||||
field_index = static_count++;
|
||||
else if (uses_jv_markobj || !flag_reduced_reflection)
|
||||
field_index = instance_count++;
|
||||
VEC_quick_push (int, field_indexes, field_index);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (field = first_real_field; field != NULL_TREE;
|
||||
field = TREE_CHAIN (field))
|
||||
{
|
||||
if (! DECL_ARTIFICIAL (field))
|
||||
{
|
||||
|
@ -1683,7 +1770,6 @@ make_class_data (tree type)
|
|||
as it is used in the creation of the field itself. */
|
||||
tree init = make_field_value (field);
|
||||
tree initial = DECL_INITIAL (field);
|
||||
static_field_count++;
|
||||
static_fields = tree_cons (NULL_TREE, init, static_fields);
|
||||
/* If the initial value is a string constant,
|
||||
prevent output_constant from trying to assemble the value. */
|
||||
|
@ -1696,12 +1782,11 @@ make_class_data (tree type)
|
|||
else if (uses_jv_markobj || !flag_reduced_reflection)
|
||||
{
|
||||
tree init = make_field_value (field);
|
||||
instance_field_count++;
|
||||
instance_fields = tree_cons (NULL_TREE, init, instance_fields);
|
||||
}
|
||||
}
|
||||
}
|
||||
field_count = static_field_count + instance_field_count;
|
||||
|
||||
if (field_count > 0)
|
||||
{
|
||||
static_fields = nreverse (static_fields);
|
||||
|
@ -1781,8 +1866,10 @@ make_class_data (tree type)
|
|||
DECL_ARTIFICIAL (class_dtable_decl) = 1;
|
||||
DECL_IGNORED_P (class_dtable_decl) = 1;
|
||||
if (is_compiled_class (class_type_node) != 2)
|
||||
DECL_EXTERNAL (class_dtable_decl) = 1;
|
||||
rest_of_decl_compilation (class_dtable_decl, 1, 0);
|
||||
{
|
||||
DECL_EXTERNAL (class_dtable_decl) = 1;
|
||||
rest_of_decl_compilation (class_dtable_decl, 1, 0);
|
||||
}
|
||||
}
|
||||
|
||||
super = CLASSTYPE_SUPER (type);
|
||||
|
@ -2001,6 +2088,48 @@ make_class_data (tree type)
|
|||
PUSH_FIELD_VALUE (cons, "aux_info", null_pointer_node);
|
||||
PUSH_FIELD_VALUE (cons, "engine", null_pointer_node);
|
||||
|
||||
if (TYPE_REFLECTION_DATA (current_class))
|
||||
{
|
||||
int i;
|
||||
int count = TYPE_REFLECTION_DATASIZE (current_class);
|
||||
VEC (constructor_elt, gc) *v
|
||||
= VEC_alloc (constructor_elt, gc, count);
|
||||
unsigned char *data = TYPE_REFLECTION_DATA (current_class);
|
||||
tree max_index = build_int_cst (sizetype, count);
|
||||
tree index = build_index_type (max_index);
|
||||
tree type = build_array_type (unsigned_byte_type_node, index);
|
||||
char buf[64];
|
||||
tree array;
|
||||
static int reflection_data_count;
|
||||
|
||||
sprintf (buf, "_reflection_data_%d", reflection_data_count++);
|
||||
array = build_decl (VAR_DECL, get_identifier (buf), type);
|
||||
|
||||
rewrite_reflection_indexes (field_indexes);
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
constructor_elt *elt = VEC_quick_push (constructor_elt, v, NULL);
|
||||
elt->index = build_int_cst (sizetype, i);
|
||||
elt->value = build_int_cstu (byte_type_node, data[i]);
|
||||
}
|
||||
|
||||
DECL_INITIAL (array) = build_constructor (type, v);
|
||||
TREE_STATIC (array) = 1;
|
||||
DECL_ARTIFICIAL (array) = 1;
|
||||
DECL_IGNORED_P (array) = 1;
|
||||
TREE_READONLY (array) = 1;
|
||||
TREE_CONSTANT (DECL_INITIAL (array)) = 1;
|
||||
rest_of_decl_compilation (array, 1, 0);
|
||||
|
||||
PUSH_FIELD_VALUE (cons, "reflection_data", build_address_of (array));
|
||||
|
||||
free (data);
|
||||
TYPE_REFLECTION_DATA (current_class) = NULL;
|
||||
}
|
||||
else
|
||||
PUSH_FIELD_VALUE (cons, "reflection_data", null_pointer_node);
|
||||
|
||||
FINISH_RECORD_CONSTRUCTOR (cons);
|
||||
|
||||
DECL_INITIAL (decl) = cons;
|
||||
|
@ -2066,11 +2195,13 @@ is_compiled_class (tree class)
|
|||
return 1;
|
||||
if (TYPE_ARRAY_P (class))
|
||||
return 0;
|
||||
/* We have to check this explicitly to avoid trying to load a class
|
||||
that we're currently parsing. */
|
||||
if (class == current_class)
|
||||
return 2;
|
||||
|
||||
seen_in_zip = (TYPE_JCF (class) && JCF_SEEN_IN_ZIP (TYPE_JCF (class)));
|
||||
if (CLASS_FROM_CURRENTLY_COMPILED_P (class) || seen_in_zip)
|
||||
if (CLASS_FROM_CURRENTLY_COMPILED_P (class))
|
||||
{
|
||||
/* The class was seen in the current ZIP file and will be
|
||||
available as a compiled class in the future but may not have
|
||||
|
@ -2182,7 +2313,7 @@ push_super_field (tree this_class, tree super_class)
|
|||
/* Handle the different manners we may have to lay out a super class. */
|
||||
|
||||
static tree
|
||||
maybe_layout_super_class (tree super_class, tree this_class)
|
||||
maybe_layout_super_class (tree super_class, tree this_class ATTRIBUTE_UNUSED)
|
||||
{
|
||||
if (!super_class)
|
||||
return NULL_TREE;
|
||||
|
@ -2201,6 +2332,7 @@ maybe_layout_super_class (tree super_class, tree this_class)
|
|||
super_class = TREE_TYPE (super_class);
|
||||
else
|
||||
{
|
||||
#if 0
|
||||
/* do_resolve_class expects an EXPR_WITH_FILE_LOCATION, so
|
||||
we give it one. */
|
||||
tree this_wrap = NULL_TREE;
|
||||
|
@ -2226,6 +2358,8 @@ maybe_layout_super_class (tree super_class, tree this_class)
|
|||
if (!super_class)
|
||||
return NULL_TREE; /* FIXME, NULL_TREE not checked by caller. */
|
||||
super_class = TREE_TYPE (super_class);
|
||||
#endif
|
||||
gcc_unreachable ();
|
||||
}
|
||||
}
|
||||
if (!TYPE_SIZE (super_class))
|
||||
|
@ -2234,6 +2368,22 @@ maybe_layout_super_class (tree super_class, tree this_class)
|
|||
return super_class;
|
||||
}
|
||||
|
||||
/* safe_layout_class just makes sure that we can load a class without
|
||||
disrupting the current_class, input_file, input_line, etc, information
|
||||
about the class processed currently. */
|
||||
|
||||
void
|
||||
safe_layout_class (tree class)
|
||||
{
|
||||
tree save_current_class = current_class;
|
||||
location_t save_location = input_location;
|
||||
|
||||
layout_class (class);
|
||||
|
||||
current_class = save_current_class;
|
||||
input_location = save_location;
|
||||
}
|
||||
|
||||
void
|
||||
layout_class (tree this_class)
|
||||
{
|
||||
|
@ -2450,9 +2600,10 @@ layout_class_method (tree this_class, tree super_class,
|
|||
tree method_name = DECL_NAME (method_decl);
|
||||
|
||||
TREE_PUBLIC (method_decl) = 1;
|
||||
/* Considered external until we know what classes are being
|
||||
compiled into this object file. */
|
||||
DECL_EXTERNAL (method_decl) = 1;
|
||||
/* Considered external unless it is being compiled into this object
|
||||
file. */
|
||||
DECL_EXTERNAL (method_decl) = ((is_compiled_class (this_class) != 2)
|
||||
|| METHOD_NATIVE (method_decl));
|
||||
|
||||
if (ID_INIT_P (method_name))
|
||||
{
|
||||
|
@ -2464,14 +2615,14 @@ layout_class_method (tree this_class, tree super_class,
|
|||
p = ptr;
|
||||
}
|
||||
DECL_CONSTRUCTOR_P (method_decl) = 1;
|
||||
build_java_argument_signature (TREE_TYPE (method_decl));
|
||||
build_java_signature (TREE_TYPE (method_decl));
|
||||
}
|
||||
else if (! METHOD_STATIC (method_decl))
|
||||
{
|
||||
tree method_sig =
|
||||
build_java_argument_signature (TREE_TYPE (method_decl));
|
||||
build_java_signature (TREE_TYPE (method_decl));
|
||||
bool method_override = false;
|
||||
tree super_method = lookup_argument_method (super_class, method_name,
|
||||
tree super_method = lookup_java_method (super_class, method_name,
|
||||
method_sig);
|
||||
if (super_method != NULL_TREE
|
||||
&& ! METHOD_DUMMY (super_method))
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Top level configure fragment for the GNU compiler for the Java(TM)
|
||||
# language.
|
||||
# Copyright (C) 1994, 1995, 2000, 2001, 2003 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994, 1995, 2000, 2001, 2003, 2007 Free Software Foundation, Inc.
|
||||
|
||||
#This file is part of GCC.
|
||||
|
||||
|
@ -34,9 +34,9 @@ language="java"
|
|||
|
||||
compilers="jc1\$(exeext) jvgenmain\$(exeext)"
|
||||
|
||||
stagestuff="jc1\$(exeext) gcj\$(exeext) jvgenmain\$(exeext) gcjh\$(exeext) gjnih\$(exeext) jv-scan\$(exeext) jcf-dump\$(exeext)"
|
||||
stagestuff="jc1\$(exeext) gcj\$(exeext) jvgenmain\$(exeext) jcf-dump\$(exeext)"
|
||||
|
||||
gtfiles="\$(srcdir)/java/java-tree.h \$(srcdir)/java/jcf.h \$(srcdir)/java/lex.h \$(srcdir)/java/parse.h \$(srcdir)/java/builtins.c \$(srcdir)/java/class.c \$(srcdir)/java/constants.c \$(srcdir)/java/decl.c \$(srcdir)/java/expr.c \$(srcdir)/java/jcf-parse.c \$(srcdir)/java/jcf-write.c \$(srcdir)/java/lang.c \$(srcdir)/java/mangle.c \$(srcdir)/java/parse.y \$(srcdir)/java/resource.c"
|
||||
gtfiles="\$(srcdir)/java/java-tree.h \$(srcdir)/java/jcf.h \$(srcdir)/java/parse.h \$(srcdir)/java/builtins.c \$(srcdir)/java/class.c \$(srcdir)/java/constants.c \$(srcdir)/java/decl.c \$(srcdir)/java/expr.c \$(srcdir)/java/jcf-parse.c \$(srcdir)/java/lang.c \$(srcdir)/java/mangle.c \$(srcdir)/java/resource.c"
|
||||
|
||||
target_libs=${libgcj_saved}
|
||||
lang_dirs="zlib fastjar"
|
||||
|
|
|
@ -34,11 +34,9 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
|
|||
|
||||
static void set_constant_entry (CPool *, int, int, jword);
|
||||
static int find_tree_constant (CPool *, int, tree);
|
||||
static int find_class_or_string_constant (CPool *, int, tree);
|
||||
static int find_name_and_type_constant (CPool *, tree, tree);
|
||||
static tree get_tag_node (int);
|
||||
static tree build_constant_data_ref (void);
|
||||
static CPool *cpool_for_class (tree);
|
||||
|
||||
/* Set the INDEX'th constant in CPOOL to have the given TAG and VALUE. */
|
||||
|
||||
|
@ -134,7 +132,7 @@ find_utf8_constant (CPool *cpool, tree name)
|
|||
return find_tree_constant (cpool, CONSTANT_Utf8, name);
|
||||
}
|
||||
|
||||
static int
|
||||
int
|
||||
find_class_or_string_constant (CPool *cpool, int tag, tree name)
|
||||
{
|
||||
jword j = find_utf8_constant (cpool, name);
|
||||
|
@ -322,6 +320,9 @@ get_tag_node (int tag)
|
|||
{
|
||||
/* A Cache for build_int_cst (CONSTANT_XXX, 0). */
|
||||
|
||||
if (tag >= 13)
|
||||
return build_int_cst (NULL_TREE, tag);
|
||||
|
||||
if (tag_nodes[tag] == NULL_TREE)
|
||||
tag_nodes[tag] = build_int_cst (NULL_TREE, tag);
|
||||
return tag_nodes[tag];
|
||||
|
@ -329,7 +330,7 @@ get_tag_node (int tag)
|
|||
|
||||
/* Given a class, return its constant pool, creating one if necessary. */
|
||||
|
||||
static CPool *
|
||||
CPool *
|
||||
cpool_for_class (tree class)
|
||||
{
|
||||
CPool *cpool = TYPE_CPOOL (class);
|
||||
|
@ -495,11 +496,20 @@ build_constants_constructor (void)
|
|||
tree tags_list = NULL_TREE;
|
||||
tree data_list = NULL_TREE;
|
||||
int i;
|
||||
|
||||
for (i = outgoing_cpool->count; --i > 0; )
|
||||
switch (outgoing_cpool->tags[i])
|
||||
switch (outgoing_cpool->tags[i] & ~CONSTANT_LazyFlag)
|
||||
{
|
||||
case CONSTANT_None: /* The second half of a Double or Long on a
|
||||
32-bit target. */
|
||||
case CONSTANT_Fieldref:
|
||||
case CONSTANT_NameAndType:
|
||||
case CONSTANT_Float:
|
||||
case CONSTANT_Integer:
|
||||
case CONSTANT_Double:
|
||||
case CONSTANT_Long:
|
||||
case CONSTANT_Methodref:
|
||||
case CONSTANT_InterfaceMethodref:
|
||||
{
|
||||
unsigned HOST_WIDE_INT temp = outgoing_cpool->data[i].w;
|
||||
|
||||
|
@ -512,8 +522,7 @@ build_constants_constructor (void)
|
|||
temp <<= BITS_PER_WORD - 32;
|
||||
|
||||
tags_list
|
||||
= tree_cons (NULL_TREE,
|
||||
build_int_cst (NULL_TREE, outgoing_cpool->tags[i]),
|
||||
= tree_cons (NULL_TREE, get_tag_node (outgoing_cpool->tags[i]),
|
||||
tags_list);
|
||||
data_list
|
||||
= tree_cons (NULL_TREE,
|
||||
|
@ -522,7 +531,11 @@ build_constants_constructor (void)
|
|||
data_list);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
||||
case CONSTANT_Class:
|
||||
case CONSTANT_String:
|
||||
case CONSTANT_Unicode:
|
||||
case CONSTANT_Utf8:
|
||||
tags_list
|
||||
= tree_cons (NULL_TREE, get_tag_node (outgoing_cpool->tags[i]),
|
||||
tags_list);
|
||||
|
@ -530,6 +543,9 @@ build_constants_constructor (void)
|
|||
= tree_cons (NULL_TREE, build_utf8_ref (outgoing_cpool->data[i].t),
|
||||
data_list);
|
||||
break;
|
||||
|
||||
default:
|
||||
gcc_assert (false);
|
||||
}
|
||||
if (outgoing_cpool->count > 0)
|
||||
{
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
/* Definition of conversion functions.
|
||||
Copyright (C) 1993, 1998, 2000, 2003 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, 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA. */
|
||||
|
||||
/* Written by Jeffrey Hsu <hsu@cygnus.com> */
|
||||
|
||||
extern tree convert_to_integer (tree type, tree expr);
|
||||
extern tree convert_to_real (tree type, tree expr);
|
||||
extern tree convert_to_pointer (tree type, tree expr);
|
|
@ -1,7 +1,7 @@
|
|||
/* Process declarations and variables for the GNU compiler for the
|
||||
Java(TM) language.
|
||||
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||||
Free Software Foundation, Inc.
|
||||
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||
2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
|
@ -75,9 +75,9 @@ static void parse_version (void);
|
|||
loader. */
|
||||
|
||||
/* If an ABI change is made within a GCC release series, rendering current
|
||||
binaries incompatible with the old runtimes, this number can be set to
|
||||
binaries incompatible with the old runtimes, this number must be set to
|
||||
enforce the compatibility rules. */
|
||||
#define MINOR_BINARYCOMPAT_ABI_VERSION 0
|
||||
#define MINOR_BINARYCOMPAT_ABI_VERSION 1
|
||||
|
||||
/* The runtime may recognize a variety of BC ABIs (objects generated by
|
||||
different version of gcj), but will probably always require strict
|
||||
|
@ -755,15 +755,9 @@ java_init_decl_processing (void)
|
|||
TYPE_identifier_node = get_identifier ("TYPE");
|
||||
init_identifier_node = get_identifier ("<init>");
|
||||
clinit_identifier_node = get_identifier ("<clinit>");
|
||||
finit_identifier_node = get_identifier ("finit$");
|
||||
instinit_identifier_node = get_identifier ("instinit$");
|
||||
void_signature_node = get_identifier ("()V");
|
||||
length_identifier_node = get_identifier ("length");
|
||||
finalize_identifier_node = get_identifier ("finalize");
|
||||
this_identifier_node = get_identifier ("this");
|
||||
super_identifier_node = get_identifier ("super");
|
||||
continue_identifier_node = get_identifier ("continue");
|
||||
access0_identifier_node = get_identifier ("access$0");
|
||||
classdollar_identifier_node = get_identifier ("class$");
|
||||
|
||||
java_lang_cloneable_identifier_node = get_identifier ("java.lang.Cloneable");
|
||||
|
@ -854,6 +848,7 @@ java_init_decl_processing (void)
|
|||
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);
|
||||
PUSH_FIELD (class_type_node, field, "reflection_data", 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);
|
||||
|
@ -1109,8 +1104,6 @@ java_init_decl_processing (void)
|
|||
|
||||
lang_eh_runtime_type = do_nothing;
|
||||
|
||||
init_jcf_parse ();
|
||||
|
||||
initialize_builtins ();
|
||||
soft_fmod_node = built_in_decls[BUILT_IN_FMOD];
|
||||
#if 0
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* Process expressions for the GNU compiler for the Java(TM) language.
|
||||
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
|
||||
Free Software Foundation, Inc.
|
||||
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||
2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
|
@ -885,6 +885,7 @@ build_java_arrayaccess (tree array, tree type, tree index)
|
|||
tree data_field;
|
||||
tree ref;
|
||||
tree array_type = TREE_TYPE (TREE_TYPE (array));
|
||||
tree size_exp = fold_convert (sizetype, size_in_bytes (type));
|
||||
|
||||
if (!is_array_type_p (TREE_TYPE (array)))
|
||||
{
|
||||
|
@ -919,16 +920,34 @@ build_java_arrayaccess (tree array, tree type, tree index)
|
|||
to have the bounds check evaluated first. */
|
||||
if (throw != NULL_TREE)
|
||||
index = build2 (COMPOUND_EXPR, int_type_node, throw, index);
|
||||
|
||||
|
||||
data_field = lookup_field (&array_type, get_identifier ("data"));
|
||||
|
||||
ref = build3 (COMPONENT_REF, TREE_TYPE (data_field),
|
||||
build_java_indirect_ref (array_type, array,
|
||||
flag_check_references),
|
||||
data_field, NULL_TREE);
|
||||
|
||||
node = build4 (ARRAY_REF, type, ref, index, NULL_TREE, NULL_TREE);
|
||||
return node;
|
||||
|
||||
/* Take the address of the data field and convert it to a pointer to
|
||||
the element type. */
|
||||
node = build1 (NOP_EXPR, build_pointer_type (type), build_address_of (ref));
|
||||
|
||||
/* Multiply the index by the size of an element to obtain a byte
|
||||
offset. Convert the result to a pointer to the element type. */
|
||||
index = fold_convert (TREE_TYPE (node),
|
||||
build2 (MULT_EXPR, sizetype,
|
||||
fold_convert (sizetype, index),
|
||||
size_exp));
|
||||
|
||||
/* Sum the byte offset and the address of the data field. */
|
||||
node = fold_build2 (PLUS_EXPR, TREE_TYPE (node), node, index);
|
||||
|
||||
/* Finally, return
|
||||
|
||||
*((&array->data) + index*size_exp)
|
||||
|
||||
*/
|
||||
return build1 (INDIRECT_REF, TREE_TYPE (TREE_TYPE (node)), node);
|
||||
}
|
||||
|
||||
/* Generate code to throw an ArrayStoreException if OBJECT is not assignable
|
||||
|
@ -1127,7 +1146,7 @@ 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_type, array;
|
||||
tree array_type, array, temp, access;
|
||||
|
||||
/* If we're processing an `aaload' we might as well just pick
|
||||
`Object'. */
|
||||
|
@ -1149,14 +1168,31 @@ expand_java_arraystore (tree rhs_type_node)
|
|||
index = save_expr (index);
|
||||
array = save_expr (array);
|
||||
|
||||
/* We want to perform the bounds check (done by
|
||||
build_java_arrayaccess) before the type check (done by
|
||||
build_java_arraystore_check). So, we call build_java_arrayaccess
|
||||
-- which returns an ARRAY_REF lvalue -- and we then generate code
|
||||
to stash the address of that lvalue in a temp. Then we call
|
||||
build_java_arraystore_check, and finally we generate a
|
||||
MODIFY_EXPR to set the array element. */
|
||||
|
||||
access = build_java_arrayaccess (array, rhs_type_node, index);
|
||||
temp = build_decl (VAR_DECL, NULL_TREE,
|
||||
build_pointer_type (TREE_TYPE (access)));
|
||||
java_add_local_var (temp);
|
||||
java_add_stmt (build2 (MODIFY_EXPR, TREE_TYPE (temp),
|
||||
temp,
|
||||
build_fold_addr_expr (access)));
|
||||
|
||||
if (TREE_CODE (rhs_type_node) == POINTER_TYPE)
|
||||
{
|
||||
tree check = build_java_arraystore_check (array, rhs_node);
|
||||
java_add_stmt (check);
|
||||
}
|
||||
|
||||
array = build_java_arrayaccess (array, rhs_type_node, index);
|
||||
java_add_stmt (build2 (MODIFY_EXPR, TREE_TYPE (array), array, rhs_node));
|
||||
java_add_stmt (build2 (MODIFY_EXPR, TREE_TYPE (access),
|
||||
build1 (INDIRECT_REF, TREE_TYPE (access), temp),
|
||||
rhs_node));
|
||||
}
|
||||
|
||||
/* Expand the evaluation of ARRAY[INDEX]. build_java_check_indexed_type makes
|
||||
|
@ -2048,13 +2084,32 @@ typedef struct
|
|||
tree (*rewrite_arglist) (tree arglist);
|
||||
} rewrite_rule;
|
||||
|
||||
/* Add __builtin_return_address(0) to the end of an arglist. */
|
||||
|
||||
|
||||
static tree
|
||||
rewrite_arglist_getcaller (tree arglist)
|
||||
{
|
||||
tree retaddr
|
||||
= (build_function_call_expr
|
||||
(built_in_decls[BUILT_IN_RETURN_ADDRESS],
|
||||
build_tree_list (NULL_TREE, integer_zero_node)));
|
||||
|
||||
DECL_INLINE (current_function_decl) = 0;
|
||||
|
||||
return chainon (arglist,
|
||||
tree_cons (NULL_TREE, retaddr,
|
||||
NULL_TREE));
|
||||
}
|
||||
|
||||
/* Add this.class to the end of an arglist. */
|
||||
|
||||
static tree
|
||||
rewrite_arglist_getclass (tree arglist)
|
||||
{
|
||||
return chainon (arglist,
|
||||
tree_cons (NULL_TREE, build_class_ref (output_class), NULL_TREE));
|
||||
tree_cons (NULL_TREE, build_class_ref (output_class),
|
||||
NULL_TREE));
|
||||
}
|
||||
|
||||
static rewrite_rule rules[] =
|
||||
|
@ -2064,6 +2119,14 @@ static rewrite_rule rules[] =
|
|||
{"java.lang.Class", "forName", "(Ljava/lang/String;)Ljava/lang/Class;",
|
||||
"(Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Class;",
|
||||
ACC_FINAL|ACC_PRIVATE|ACC_STATIC, rewrite_arglist_getclass},
|
||||
{"gnu.classpath.VMStackWalker", "getCallingClass", "()Ljava/lang/Class;",
|
||||
"(Lgnu/gcj/RawData;)Ljava/lang/Class;",
|
||||
ACC_FINAL|ACC_PRIVATE|ACC_STATIC, rewrite_arglist_getcaller},
|
||||
{"gnu.classpath.VMStackWalker", "getCallingClassLoader",
|
||||
"()Ljava/lang/ClassLoader;",
|
||||
"(Lgnu/gcj/RawData;)Ljava/lang/ClassLoader;",
|
||||
ACC_FINAL|ACC_PRIVATE|ACC_STATIC, rewrite_arglist_getcaller},
|
||||
|
||||
{NULL, NULL, NULL, NULL, 0, NULL}};
|
||||
|
||||
/* Scan the rules list for replacements for *METHOD_P and replace the
|
||||
|
@ -2848,7 +2911,8 @@ expand_java_field_op (int is_static, int is_putting, int field_ref_index)
|
|||
tree context = DECL_CONTEXT (field_ref);
|
||||
if (context != self_type && CLASS_INTERFACE (TYPE_NAME (context)))
|
||||
field_ref = build_class_init (context, field_ref);
|
||||
field_ref = build_class_init (self_type, field_ref);
|
||||
else
|
||||
field_ref = build_class_init (self_type, field_ref);
|
||||
}
|
||||
if (is_putting)
|
||||
{
|
||||
|
@ -3645,7 +3709,6 @@ force_evaluation_order (tree node)
|
|||
if (flag_syntax_only)
|
||||
return node;
|
||||
if (TREE_CODE (node) == CALL_EXPR
|
||||
|| TREE_CODE (node) == NEW_CLASS_EXPR
|
||||
|| (TREE_CODE (node) == COMPOUND_EXPR
|
||||
&& TREE_CODE (TREE_OPERAND (node, 0)) == CALL_EXPR
|
||||
&& TREE_CODE (TREE_OPERAND (node, 1)) == SAVE_EXPR))
|
||||
|
|
|
@ -68,8 +68,6 @@ man page gfdl(7).
|
|||
Generate header files from Java class files
|
||||
* gjnih: (gcj)Invoking gjnih.
|
||||
Generate JNI header files from Java class files
|
||||
* jv-scan: (gcj)Invoking jv-scan.
|
||||
Print information about Java source files
|
||||
* jcf-dump: (gcj)Invoking jcf-dump.
|
||||
Print information about Java class files
|
||||
* gij: (gcj)Invoking gij. GNU interpreter for Java bytecode
|
||||
|
@ -121,7 +119,6 @@ files and object files, and it can read both Java source code and
|
|||
* Compatibility:: Compatibility between gcj and other tools for Java
|
||||
* Invoking gcjh:: Generate header files from class files
|
||||
* Invoking gjnih:: Generate JNI header files from class files
|
||||
* Invoking jv-scan:: Print information about source files
|
||||
* Invoking jcf-dump:: Print information about class files
|
||||
* Invoking gij:: Interpreting Java bytecodes
|
||||
* Invoking gcj-dbtool:: Tool for manipulating class file databases.
|
||||
|
@ -156,7 +153,7 @@ gcj [@option{-I}@var{dir}@dots{}] [@option{-d} @var{dir}@dots{}]
|
|||
@var{sourcefile}@dots{}
|
||||
@c man end
|
||||
@c man begin SEEALSO gcj
|
||||
gcc(1), gcjh(1), gjnih(1), gij(1), jv-scan(1), jcf-dump(1), gfdl(7),
|
||||
gcc(1), gcjh(1), gjnih(1), gij(1), jcf-dump(1), gfdl(7),
|
||||
and the Info entries for @file{gcj} and @file{gcc}.
|
||||
@c man end
|
||||
@end ignore
|
||||
|
@ -305,6 +302,10 @@ behavior in this particular case.)
|
|||
This forces the compiler to always check for the special zero length
|
||||
attribute @code{gnu.gcj.gcj-compiled} in @code{java.lang.Object} and
|
||||
issue an error if it isn't found.
|
||||
|
||||
@item -fsource=@var{VERSION}
|
||||
This option is used to choose the source version accepted by
|
||||
@command{gcj}. The default is @samp{1.5}.
|
||||
@end table
|
||||
|
||||
@node Encodings
|
||||
|
@ -457,6 +458,11 @@ instance, it could be used in a call to @code{ResourceBundle.getBundle}.
|
|||
The actual file name to be compiled this way must be specified
|
||||
separately.
|
||||
|
||||
@item -ftarget=@var{VERSION}
|
||||
This can be used with @option{-C} to choose the version of bytecode
|
||||
emitted by @command{gcj}. The default is @samp{1.5}. When not
|
||||
generating bytecode, this option has no effect.
|
||||
|
||||
@item -d @var{directory}
|
||||
When used with @code{-C}, this causes all generated @file{.class} files
|
||||
to be put in the appropriate subdirectory of @var{directory}. By
|
||||
|
@ -751,7 +757,7 @@ gcjh [@option{-stubs}] [@option{-jni}]
|
|||
@var{classname}@dots{}
|
||||
@c man end
|
||||
@c man begin SEEALSO gcjh
|
||||
gcc(1), gcj(1), gij(1), jv-scan(1), jcf-dump(1), gfdl(7),
|
||||
gcc(1), gcj(1), gij(1), jcf-dump(1), gfdl(7),
|
||||
and the Info entries for @file{gcj} and @file{gcc}.
|
||||
@c man end
|
||||
@end ignore
|
||||
|
@ -865,7 +871,7 @@ gjnih [@option{-stubs}] [@option{-jni}]
|
|||
@var{classname}@dots{}
|
||||
@c man end
|
||||
@c man begin SEEALSO gjnih
|
||||
gcc(1), gcj(1), gcjh(1), gij(1), jv-scan(1), jcf-dump(1), gfdl(7),
|
||||
gcc(1), gcj(1), gcjh(1), gij(1), jcf-dump(1), gfdl(7),
|
||||
and the Info entries for @file{gcj} and @file{gcc}.
|
||||
@c man end
|
||||
@end ignore
|
||||
|
@ -952,69 +958,6 @@ All remaining options are considered to be names of classes.
|
|||
|
||||
@c man end
|
||||
|
||||
@node Invoking jv-scan
|
||||
@chapter Invoking jv-scan
|
||||
|
||||
@c man title jv-scan print information about Java source file
|
||||
|
||||
@c man begin DESCRIPTION jv-scan
|
||||
|
||||
The @code{jv-scan} program can be used to print information about a Java
|
||||
source file (@file{.java} file).
|
||||
|
||||
@c man end
|
||||
|
||||
@ignore
|
||||
@c man begin SYNOPSIS jv-scan
|
||||
jv-scan [@option{--no-assert}] [@option{--complexity}]
|
||||
[@option{--encoding}=@var{name}] [@option{--print-main}]
|
||||
[@option{--list-class}] [@option{--list-filename}]
|
||||
[@option{--version}] [@option{--help}]
|
||||
[@option{-o} @var{file}] @var{inputfile}@dots{}
|
||||
@c man end
|
||||
@c man begin SEEALSO jv-scan
|
||||
gcc(1), gcj(1), gcjh(1), gij(1), jcf-dump(1), gfdl(7),
|
||||
and the Info entries for @file{gcj} and @file{gcc}.
|
||||
@c man end
|
||||
@end ignore
|
||||
|
||||
@c man begin OPTIONS jv-scan
|
||||
|
||||
@table @gcctabopt
|
||||
@item --no-assert
|
||||
Don't recognize the @code{assert} keyword, for backwards compatibility
|
||||
with older versions of the language specification.
|
||||
|
||||
@item --complexity
|
||||
This prints a complexity measure, related to cyclomatic complexity, for
|
||||
each input file.
|
||||
|
||||
@item --encoding=@var{name}
|
||||
This works like the corresponding @command{gcj} option.
|
||||
|
||||
@item --print-main
|
||||
This prints the name of the class in this file containing a @code{main}
|
||||
method.
|
||||
|
||||
@item --list-class
|
||||
This lists the names of all classes defined in the input files.
|
||||
|
||||
@item --list-filename
|
||||
If @code{--list-class} is given, this option causes @code{jv-scan} to
|
||||
also print the name of the file in which each class was found.
|
||||
|
||||
@item -o @var{file}
|
||||
Print output to the named file.
|
||||
|
||||
@item --help
|
||||
Print help, then exit.
|
||||
|
||||
@item --version
|
||||
Print version number, then exit.
|
||||
@end table
|
||||
|
||||
@c man end
|
||||
|
||||
@node Invoking jcf-dump
|
||||
@chapter Invoking jcf-dump
|
||||
|
||||
|
@ -1092,7 +1035,7 @@ gij [@option{-jar}] [@option{OPTION}] @dots{} @var{CLASS} [@var{ARGS}@dots{}]
|
|||
[@option{--showversion}] [@option{--version}] [@option{--help}][@option{-?}]
|
||||
@c man end
|
||||
@c man begin SEEALSO gij
|
||||
gcc(1), gcj(1), gcjh(1), jv-scan(1), jcf-dump(1), gfdl(7),
|
||||
gcc(1), gcj(1), gcjh(1), jcf-dump(1), gfdl(7),
|
||||
and the Info entries for @file{gcj} and @file{gcc}.
|
||||
@c man end
|
||||
@end ignore
|
||||
|
@ -1219,7 +1162,7 @@ gcj-dbtool [@option{-0}] [@option{-}] [@option{-n}] [@option{-a}] [@option{-f}]
|
|||
|
||||
@c man end
|
||||
@c man begin SEEALSO gij
|
||||
gcc(1), gcj(1), gcjh(1), jv-scan(1), jcf-dump(1), gfdl(7),
|
||||
gcc(1), gcj(1), gcjh(1), jcf-dump(1), gfdl(7),
|
||||
and the Info entries for @file{gcj} and @file{gcc}.
|
||||
@c man end
|
||||
@end ignore
|
||||
|
|
|
@ -1,273 +0,0 @@
|
|||
#! /usr/bin/perl
|
||||
|
||||
# Copyright (C) 2000, 2001, 2003 Free Software Foundation
|
||||
|
||||
# This program 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.
|
||||
|
||||
# This program 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 this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301, USA.
|
||||
|
||||
# gen-table.pl - Generate tables for gcj from Unicode data.
|
||||
# Usage: perl gen-table.pl DATA-FILE
|
||||
#
|
||||
# You can find the Unicode data file here:
|
||||
# ftp://www.unicode.org/Public/3.0-Update1/UnicodeData-3.0.1.txt
|
||||
# Please update this URL when this program is used with a more
|
||||
# recent version of the table. Note that this table cannot be
|
||||
# distributed with gcc.
|
||||
# This program should not be re-run indiscriminately. Care must be
|
||||
# taken that what it generates is in sync with the Java specification.
|
||||
|
||||
# Names of fields in Unicode data table.
|
||||
$CODE = 0;
|
||||
$NAME = 1;
|
||||
$CATEGORY = 2;
|
||||
$COMBINING_CLASSES = 3;
|
||||
$BIDI_CATEGORY = 4;
|
||||
$DECOMPOSITION = 5;
|
||||
$DECIMAL_VALUE = 6;
|
||||
$DIGIT_VALUE = 7;
|
||||
$NUMERIC_VALUE = 8;
|
||||
$MIRRORED = 9;
|
||||
$OLD_NAME = 10;
|
||||
$COMMENT = 11;
|
||||
$UPPER = 12;
|
||||
$LOWER = 13;
|
||||
$TITLE = 14;
|
||||
|
||||
# Start of special-cased gaps in Unicode data table.
|
||||
%gaps = (
|
||||
0x4e00 => "CJK",
|
||||
0xac00 => "Hangul",
|
||||
0xd800 => "Unassigned High Surrogate",
|
||||
0xdb80 => "Private Use High Surrogate",
|
||||
0xdc00 => "Low Surrogate",
|
||||
0xe000 => "Private Use"
|
||||
);
|
||||
|
||||
# This lists control characters which are also considered whitespace.
|
||||
# This is a somewhat odd list, taken from the JCL definition of
|
||||
# Character.isIdentifierIgnorable.
|
||||
%whitespace_controls =
|
||||
(
|
||||
0x0009 => 1,
|
||||
0x000a => 1,
|
||||
0x000b => 1,
|
||||
0x000c => 1,
|
||||
0x000d => 1,
|
||||
0x001c => 1,
|
||||
0x001d => 1,
|
||||
0x001e => 1,
|
||||
0x001f => 1
|
||||
);
|
||||
|
||||
open (INPUT, "< $ARGV[0]") || exit 1;
|
||||
|
||||
$last_code = -1;
|
||||
while (<INPUT>)
|
||||
{
|
||||
chop;
|
||||
@fields = split (';', $_, 30);
|
||||
if ($#fields != 14)
|
||||
{
|
||||
print STDERR "Entry for $fields[$CODE] has wrong number of fields\n";
|
||||
}
|
||||
|
||||
$code = hex ($fields[$CODE]);
|
||||
last if $code > 0xffff;
|
||||
if ($code > $last_code + 1)
|
||||
{
|
||||
# Found a gap.
|
||||
if (defined $gaps{$code})
|
||||
{
|
||||
# Fill the gap with the last character read.
|
||||
@gfields = @fields;
|
||||
}
|
||||
else
|
||||
{
|
||||
# The gap represents undefined characters. Only the type
|
||||
# matters.
|
||||
@gfields = ('', '', 'Cn', '0', '', '', '', '', '', '', '',
|
||||
'', '', '', '');
|
||||
}
|
||||
for (++$last_code; $last_code < $code; ++$last_code)
|
||||
{
|
||||
$gfields{$CODE} = sprintf ("%04x", $last_code);
|
||||
&process_one ($last_code, @gfields);
|
||||
}
|
||||
}
|
||||
&process_one ($code, @fields);
|
||||
$last_code = $code;
|
||||
}
|
||||
|
||||
close (INPUT);
|
||||
|
||||
@gfields = ('', '', 'Cn', '0', '', '', '', '', '', '', '',
|
||||
'', '', '', '');
|
||||
for (++$last_code; $last_code < 0x10000; ++$last_code)
|
||||
{
|
||||
$gfields{$CODE} = sprintf ("%04x", $last_code);
|
||||
&process_one ($last_code, @gfields);
|
||||
}
|
||||
--$last_code; # Want last to be 0xFFFF.
|
||||
|
||||
&print_tables ($last_code);
|
||||
|
||||
exit 0;
|
||||
|
||||
# Process a single character.
|
||||
sub process_one
|
||||
{
|
||||
my ($code, @fields) = @_;
|
||||
|
||||
my @value = ();
|
||||
my $type = $fields[$CATEGORY];
|
||||
|
||||
# See if the character is a valid identifier start.
|
||||
if ($type =~ /L./ # Letter
|
||||
|| $type eq 'Pc' # Connecting punctuation
|
||||
|| $type eq 'Sc') # Currency symbol
|
||||
{
|
||||
push (@value, 'LETTER_START');
|
||||
}
|
||||
|
||||
# See if the character is a valid identifier member.
|
||||
if ($type =~ /L./ # Letter
|
||||
|| $type eq 'Pc' # Connecting punctuation
|
||||
|| $type eq 'Sc' # Currency symbol
|
||||
|| $type =~ /N[dl]/ # Number: decimal or letter
|
||||
|| $type =~ /M[nc]/ # Mark: non-spacing or combining
|
||||
|| ($type eq 'Cc' # Certain controls
|
||||
&& ! defined $whitespace_controls{$code})
|
||||
|| ($code >= 0x200c # Join controls
|
||||
&& $code <= 0x200f)
|
||||
|| ($code >= 0x202a # Bidi controls -- note that there
|
||||
# is a typo in the JCL where these are
|
||||
# concerned.
|
||||
&& $code <= 0x202e)
|
||||
|| ($code >= 0x206a # Format controls
|
||||
&& $code <= 0x206f)
|
||||
|| $code == 0xfeff) # ZWNBSP
|
||||
{
|
||||
push (@value, 'LETTER_PART');
|
||||
}
|
||||
|
||||
if (($type =~ /Z./
|
||||
# Java treats some values specially as non-spaces.
|
||||
&& $code != 0x00a0
|
||||
&& $code != 0x2007
|
||||
&& $code != 0x202f)
|
||||
# And for our purposes there are some that should be specially
|
||||
# treated as spaces.
|
||||
|| $code == 0x000b
|
||||
|| ($code >= 0x001c && $code <= 0x001f))
|
||||
{
|
||||
push (@value, 'LETTER_SPACE');
|
||||
}
|
||||
|
||||
if (! @value)
|
||||
{
|
||||
$value = '0';
|
||||
}
|
||||
else
|
||||
{
|
||||
$value = '(' . join (' | ', @value) . ')';
|
||||
}
|
||||
|
||||
$map[$code] = $value;
|
||||
}
|
||||
|
||||
sub print_tables
|
||||
{
|
||||
my ($last) = @_;
|
||||
|
||||
local ($bytes_out) = 0;
|
||||
|
||||
open (OUT, "> chartables.h");
|
||||
|
||||
print OUT "/* This file is automatically generated. DO NOT EDIT!\n";
|
||||
print OUT " Instead, edit gen-table.pl and re-run. */\n\n";
|
||||
|
||||
print OUT "#ifndef GCC_CHARTABLES_H\n";
|
||||
print OUT "#define GCC_CHARTABLES_H\n\n";
|
||||
|
||||
print OUT "#define LETTER_START 1\n";
|
||||
print OUT "#define LETTER_PART 2\n";
|
||||
print OUT "#define LETTER_SPACE 4\n\n";
|
||||
print OUT "#define LETTER_MASK 7\n\n";
|
||||
|
||||
for ($count = 0; $count <= $last; $count += 256)
|
||||
{
|
||||
$row[$count / 256] = &print_row ($count, '(char *) ', 'const char', 1,
|
||||
'page');
|
||||
}
|
||||
|
||||
print OUT "static const char *const type_table[256] = {\n";
|
||||
for ($count = 0; $count <= $last; $count += 256)
|
||||
{
|
||||
print OUT ",\n" if $count > 0;
|
||||
print OUT " ", $row[$count / 256];
|
||||
$bytes_out += 4;
|
||||
}
|
||||
print OUT "\n};\n\n";
|
||||
|
||||
print OUT "#endif /* ! GCC_CHARTABLES_H */\n";
|
||||
|
||||
close (OUT);
|
||||
|
||||
printf "Generated %d bytes\n", $bytes_out;
|
||||
}
|
||||
|
||||
# Print a single "row" of a two-level table.
|
||||
sub print_row
|
||||
{
|
||||
my ($start, $def_pfx, $typname, $typsize, $name) = @_;
|
||||
|
||||
my ($i);
|
||||
my (@values);
|
||||
my ($flag) = 1;
|
||||
my ($off);
|
||||
for ($off = 0; $off < 256; ++$off)
|
||||
{
|
||||
$values[$off] = $map[$off + $start];
|
||||
if ($values[$off] ne $values[0])
|
||||
{
|
||||
$flag = 0;
|
||||
}
|
||||
}
|
||||
if ($flag)
|
||||
{
|
||||
return $def_pfx . $values[0];
|
||||
}
|
||||
|
||||
printf OUT "static %s %s%d[256] = {\n ", $typname, $name, $start / 256;
|
||||
my ($column) = 2;
|
||||
for ($i = $start; $i < $start + 256; ++$i)
|
||||
{
|
||||
print OUT ", "
|
||||
if $i > $start;
|
||||
my ($text) = $values[$i - $start];
|
||||
if (length ($text) + $column + 2 > 78)
|
||||
{
|
||||
print OUT "\n ";
|
||||
$column = 2;
|
||||
}
|
||||
print OUT $text;
|
||||
$column += length ($text) + 2;
|
||||
}
|
||||
print OUT "\n};\n\n";
|
||||
|
||||
$bytes_out += 256 * $typsize;
|
||||
|
||||
return sprintf "%s%d", $name, $start / 256;
|
||||
}
|
2673
gcc/java/gjavah.c
2673
gcc/java/gjavah.c
File diff suppressed because it is too large
Load diff
|
@ -1,5 +1,5 @@
|
|||
/* Java(TM) language-specific gimplification routines.
|
||||
Copyright (C) 2003, 2004 Free Software Foundation, Inc.
|
||||
Copyright (C) 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
|
@ -34,10 +34,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
|
|||
|
||||
static tree java_gimplify_labeled_block_expr (tree);
|
||||
static tree java_gimplify_exit_block_expr (tree);
|
||||
static tree java_gimplify_case_expr (tree);
|
||||
static tree java_gimplify_default_expr (tree);
|
||||
static tree java_gimplify_block (tree);
|
||||
static tree java_gimplify_new_array_init (tree);
|
||||
static tree java_gimplify_try_expr (tree);
|
||||
static enum gimplify_status java_gimplify_modify_expr (tree*, tree*, tree *);
|
||||
static enum gimplify_status java_gimplify_component_ref (tree*, tree*, tree *);
|
||||
|
@ -92,30 +89,10 @@ java_gimplify_expr (tree *expr_p, tree *pre_p ATTRIBUTE_UNUSED,
|
|||
*expr_p = java_gimplify_exit_block_expr (*expr_p);
|
||||
break;
|
||||
|
||||
case CASE_EXPR:
|
||||
*expr_p = java_gimplify_case_expr (*expr_p);
|
||||
break;
|
||||
|
||||
case DEFAULT_EXPR:
|
||||
*expr_p = java_gimplify_default_expr (*expr_p);
|
||||
break;
|
||||
|
||||
case NEW_ARRAY_INIT:
|
||||
*expr_p = java_gimplify_new_array_init (*expr_p);
|
||||
break;
|
||||
|
||||
case TRY_EXPR:
|
||||
*expr_p = java_gimplify_try_expr (*expr_p);
|
||||
break;
|
||||
|
||||
case JAVA_CATCH_EXPR:
|
||||
*expr_p = TREE_OPERAND (*expr_p, 0);
|
||||
break;
|
||||
|
||||
case JAVA_EXC_OBJ_EXPR:
|
||||
*expr_p = build_exception_object_ref (TREE_TYPE (*expr_p));
|
||||
break;
|
||||
|
||||
case VAR_DECL:
|
||||
*expr_p = java_replace_reference (*expr_p, /* want_lvalue */ false);
|
||||
return GS_UNHANDLED;
|
||||
|
@ -147,15 +124,6 @@ java_gimplify_expr (tree *expr_p, tree *pre_p ATTRIBUTE_UNUSED,
|
|||
case COMPARE_EXPR:
|
||||
case COMPARE_L_EXPR:
|
||||
case COMPARE_G_EXPR:
|
||||
case UNARY_PLUS_EXPR:
|
||||
case NEW_ARRAY_EXPR:
|
||||
case NEW_ANONYMOUS_ARRAY_EXPR:
|
||||
case NEW_CLASS_EXPR:
|
||||
case THIS_EXPR:
|
||||
case SYNCHRONIZED_EXPR:
|
||||
case CONDITIONAL_EXPR:
|
||||
case INSTANCEOF_EXPR:
|
||||
case CLASS_LITERAL:
|
||||
gcc_unreachable ();
|
||||
|
||||
case COMPONENT_REF:
|
||||
|
@ -360,21 +328,6 @@ java_gimplify_self_mod_expr (tree *expr_p, tree *pre_p ATTRIBUTE_UNUSED,
|
|||
}
|
||||
|
||||
|
||||
static tree
|
||||
java_gimplify_case_expr (tree expr)
|
||||
{
|
||||
tree label = create_artificial_label ();
|
||||
return build3 (CASE_LABEL_EXPR, void_type_node,
|
||||
TREE_OPERAND (expr, 0), NULL_TREE, label);
|
||||
}
|
||||
|
||||
static tree
|
||||
java_gimplify_default_expr (tree expr ATTRIBUTE_UNUSED)
|
||||
{
|
||||
tree label = create_artificial_label ();
|
||||
return build3 (CASE_LABEL_EXPR, void_type_node, NULL_TREE, NULL_TREE, label);
|
||||
}
|
||||
|
||||
/* Gimplify BLOCK into a BIND_EXPR. */
|
||||
|
||||
static tree
|
||||
|
@ -411,46 +364,6 @@ java_gimplify_block (tree java_block)
|
|||
return build3 (BIND_EXPR, TREE_TYPE (java_block), decls, body, block);
|
||||
}
|
||||
|
||||
/* Gimplify a NEW_ARRAY_INIT node into array/element assignments. */
|
||||
|
||||
static tree
|
||||
java_gimplify_new_array_init (tree exp)
|
||||
{
|
||||
tree array_type = TREE_TYPE (TREE_TYPE (exp));
|
||||
tree data_field = lookup_field (&array_type, get_identifier ("data"));
|
||||
tree element_type = TYPE_ARRAY_ELEMENT (array_type);
|
||||
HOST_WIDE_INT ilength = java_array_type_length (array_type);
|
||||
tree length = build_int_cst (NULL_TREE, ilength);
|
||||
tree init = TREE_OPERAND (exp, 0);
|
||||
tree value;
|
||||
unsigned HOST_WIDE_INT cnt;
|
||||
|
||||
tree array_ptr_type = build_pointer_type (array_type);
|
||||
tree tmp = create_tmp_var (array_ptr_type, "array");
|
||||
tree body = build2 (GIMPLE_MODIFY_STMT, array_ptr_type, tmp,
|
||||
build_new_array (element_type, length));
|
||||
|
||||
int index = 0;
|
||||
|
||||
/* FIXME: try to allocate array statically? */
|
||||
FOR_EACH_CONSTRUCTOR_VALUE (CONSTRUCTOR_ELTS (init), cnt, value)
|
||||
{
|
||||
/* FIXME: Should use build_java_arrayaccess here, but avoid
|
||||
bounds checking. */
|
||||
tree lhs = build3 (COMPONENT_REF, TREE_TYPE (data_field),
|
||||
build_java_indirect_ref (array_type, tmp, 0),
|
||||
data_field, NULL_TREE);
|
||||
tree assignment = build2 (GIMPLE_MODIFY_STMT, element_type,
|
||||
build4 (ARRAY_REF, element_type, lhs,
|
||||
build_int_cst (NULL_TREE, index++),
|
||||
NULL_TREE, NULL_TREE),
|
||||
value);
|
||||
body = build2 (COMPOUND_EXPR, element_type, body, assignment);
|
||||
}
|
||||
|
||||
return build2 (COMPOUND_EXPR, array_ptr_type, body, tmp);
|
||||
}
|
||||
|
||||
static tree
|
||||
java_gimplify_try_expr (tree try_expr)
|
||||
{
|
||||
|
|
|
@ -11,36 +11,6 @@ DEFTREECODE (COMPARE_L_EXPR, "compare_l_expr", tcc_binary, 2)
|
|||
/* Same as COMPARE_EXPR, but if either value is NaN, the result is 1. */
|
||||
DEFTREECODE (COMPARE_G_EXPR, "compare_g_expr", tcc_binary, 2)
|
||||
|
||||
/* Unary plus. Operand 0 is the expression the unary plus is applied
|
||||
to */
|
||||
DEFTREECODE (UNARY_PLUS_EXPR, "unary_plus_expr", tcc_unary, 1)
|
||||
|
||||
/* New array creation expression.
|
||||
Operand 0 is the array base type.
|
||||
Operand 1 is the list of dimension expressions.
|
||||
Operand 2 is the number of other dimensions of unspecified range.
|
||||
Once patched, the node will bear the type of the created array. */
|
||||
DEFTREECODE (NEW_ARRAY_EXPR, "new_array_expr", tcc_expression, 3)
|
||||
|
||||
/* New anonymous array creation expression.
|
||||
Operand 0 is the base type of the anonymous array.
|
||||
Operand 1 is the signature of the dimensions this array contains.
|
||||
Operand 2 is the anonymous array initializer.
|
||||
Once patched, the node will bear the type of the created array. */
|
||||
DEFTREECODE (NEW_ANONYMOUS_ARRAY_EXPR, "new_anonymous_array",
|
||||
tcc_expression, 3)
|
||||
|
||||
/* New class creation expression.
|
||||
Operand 0 is the name of the class to be created
|
||||
Operand 1 is the argument list used to select a constructor.
|
||||
There is no operand 2. That slot is used for the
|
||||
CALL_EXPR_RTL macro (see preexpand_calls).
|
||||
The type should be the one of the created class. */
|
||||
DEFTREECODE (NEW_CLASS_EXPR, "new_class_expr", tcc_expression, 3)
|
||||
|
||||
/* Defines `this' as an expression. */
|
||||
DEFTREECODE (THIS_EXPR, "this", tcc_expression, 0)
|
||||
|
||||
/* A labeled block. Operand 0 is the label that will be generated to
|
||||
mark the end of the block. Operand 1 is the labeled block body. */
|
||||
DEFTREECODE (LABELED_BLOCK_EXPR, "labeled_block_expr", tcc_expression, 2)
|
||||
|
@ -49,57 +19,11 @@ DEFTREECODE (LABELED_BLOCK_EXPR, "labeled_block_expr", tcc_expression, 2)
|
|||
LABELED_BLOCK_EXPR to exit. */
|
||||
DEFTREECODE (EXIT_BLOCK_EXPR, "exit_block_expr", tcc_statement, 1)
|
||||
|
||||
/* Case statement expression.
|
||||
Operand 1 is the case value. */
|
||||
DEFTREECODE (CASE_EXPR, "case", tcc_expression, 1)
|
||||
|
||||
/* Default statement expression. */
|
||||
DEFTREECODE (DEFAULT_EXPR, "default", tcc_expression, 0)
|
||||
|
||||
/* Try expression
|
||||
Operand 0 is the tried block,
|
||||
Operand 1 contains chained catch nodes. */
|
||||
DEFTREECODE (TRY_EXPR, "try-catch", tcc_expression, 2)
|
||||
|
||||
/* Catch clause.
|
||||
Operand 0 is the catch clause block, which contains the declaration of
|
||||
the catch clause parameter. */
|
||||
DEFTREECODE (JAVA_CATCH_EXPR, "catch", tcc_unary, 1)
|
||||
|
||||
/* Synchronized statement.
|
||||
Operand 0 is the expression on which we wish to synchronize,
|
||||
Operand 1 is the synchronized expression block. */
|
||||
DEFTREECODE (SYNCHRONIZED_EXPR, "synchronized", tcc_expression, 2)
|
||||
|
||||
/* Throw statement.
|
||||
Operand 0 is the throw expression. */
|
||||
DEFTREECODE (THROW_EXPR, "throw", tcc_unary, 1)
|
||||
|
||||
/* Conditional operator.
|
||||
Operand 0 is the condition expression
|
||||
Operand 1 is the then-value
|
||||
Operand 2 is the else-value. */
|
||||
DEFTREECODE (CONDITIONAL_EXPR, "?:", tcc_expression, 3)
|
||||
|
||||
/* instanceof operator.
|
||||
Operand 0 is the expression that is getting tested
|
||||
Operand 1 is the class used for the test. */
|
||||
DEFTREECODE (INSTANCEOF_EXPR, "instanceof", tcc_expression, 2)
|
||||
|
||||
/* Array initializers.
|
||||
Operand 0 is the (sub) array target to initialize, left to NULL_TREE
|
||||
when the node is created.
|
||||
Operand 1 is a CONSTRUCTOR node. */
|
||||
DEFTREECODE (NEW_ARRAY_INIT, "new_array_init", tcc_unary, 1)
|
||||
|
||||
/* Class literal.
|
||||
Operand 0 is the name of the class we're trying to build a
|
||||
reference from. */
|
||||
DEFTREECODE (CLASS_LITERAL, "class_literal", tcc_unary, 1)
|
||||
|
||||
/* The Java object within the exception object from the runtime. */
|
||||
DEFTREECODE (JAVA_EXC_OBJ_EXPR, "java_exc_obj_expr", tcc_expression, 0)
|
||||
|
||||
/* Annotates a tree node (usually an expression) with source location
|
||||
information: a file name (EXPR_WFL_FILENAME); a line number
|
||||
(EXPR_WFL_LINENO); and column number (EXPR_WFL_COLNO). It is
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* Definitions for parsing and type checking for the GNU compiler for
|
||||
the Java(TM) language.
|
||||
Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
|
||||
Free Software Foundation, Inc.
|
||||
Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||
2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
|
@ -43,37 +43,15 @@ enum java_tree_code {
|
|||
struct JCF;
|
||||
|
||||
/* Usage of TREE_LANG_FLAG_?:
|
||||
0: IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P (in IDENTIFIER_NODE)
|
||||
FOR_LOOP_P (in LOOP_EXPR)
|
||||
SUPPRESS_UNREACHABLE_ERROR (for other _EXPR nodes)
|
||||
ANONYMOUS_CLASS_P (in RECORD_TYPE)
|
||||
ARG_FINAL_P (in TREE_LIST)
|
||||
1: IS_A_CLASSFILE_NAME (in IDENTIFIER_NODE)
|
||||
COMPOUND_ASSIGN_P (in EXPR (binop_*))
|
||||
LOCAL_CLASS_P (in RECORD_TYPE)
|
||||
BLOCK_IS_IMPLICIT (in BLOCK)
|
||||
2: QUALIFIED_P (in IDENTIFIER_NODE)
|
||||
PRIMARY_P (in EXPR_WITH_FILE_LOCATION)
|
||||
MODIFY_EXPR_FROM_INITIALIZATION_P (in MODIFY_EXPR)
|
||||
CLASS_METHOD_CHECKED_P (in RECORD_TYPE)
|
||||
CLASS_FILE_P (in a TRANSLATION_UNIT_DECL in current_file_list)
|
||||
3: IS_AN_IMPORT_ON_DEMAND_P (in IDENTIFIER_NODE)
|
||||
RESOLVE_PACKAGE_NAME_P (in EXPR_WITH_FILE_LOCATION)
|
||||
SWITCH_HAS_DEFAULT (in SWITCH_EXPR)
|
||||
HAS_FINALIZER (in RECORD_TYPE)
|
||||
3: HAS_FINALIZER (in RECORD_TYPE)
|
||||
4: IS_A_COMMAND_LINE_FILENAME_P (in IDENTIFIER_NODE)
|
||||
RESOLVE_TYPE_NAME_P (in EXPR_WITH_FILE_LOCATION)
|
||||
CALL_USING_SUPER (in CALL_EXPR)
|
||||
IS_ARRAY_LENGTH_ACCESS (in INDIRECT_REF)
|
||||
5: HAS_BEEN_ALREADY_PARSED_P (in IDENTIFIER_NODE)
|
||||
IS_BREAK_STMT_P (in EXPR_WITH_FILE_LOCATION)
|
||||
IS_CRAFTED_STRING_BUFFER_P (in CALL_EXPR)
|
||||
IS_INIT_CHECKED (in SAVE_EXPR)
|
||||
6: CAN_COMPLETE_NORMALLY (in statement nodes)
|
||||
NESTED_FIELD_ACCESS_IDENTIFIER_P (in IDENTIFIER_NODE)
|
||||
|
||||
Usage of TYPE_LANG_FLAG_?:
|
||||
0: CLASS_ACCESS0_GENERATED_P (in RECORD_TYPE)
|
||||
1: TYPE_ARRAY_P (in RECORD_TYPE).
|
||||
2: CLASS_PARSED_P (in RECORD_TYPE).
|
||||
3: CLASS_FROM_SOURCE_P (in RECORD_TYPE).
|
||||
|
@ -124,10 +102,6 @@ struct JCF;
|
|||
? BINFO_TYPE (BINFO_BASE_BINFO (TYPE_BINFO (TYPE), 0)) \
|
||||
: NULL_TREE)
|
||||
|
||||
/* True if the class we are compiling is a .java source file;
|
||||
false if it is a .class bytecode file. */
|
||||
extern int compiling_from_source;
|
||||
|
||||
/* The class defined by the actual (main) file we are compiling. */
|
||||
#define main_class \
|
||||
java_global_trees[JTI_MAIN_CLASS]
|
||||
|
@ -221,9 +195,6 @@ extern int flag_store_check;
|
|||
/* When nonzero, generate only a limited set of class meta-data. */
|
||||
extern int flag_reduced_reflection;
|
||||
|
||||
/* Encoding used for source files. */
|
||||
extern const char *current_encoding;
|
||||
|
||||
/* The Java .class file that provides main_class; the main input file. */
|
||||
extern GTY(()) struct JCF * current_jcf;
|
||||
|
||||
|
@ -243,6 +214,11 @@ typedef struct CPool constant_pool;
|
|||
|
||||
#define CONSTANT_ResolvedFlag 16
|
||||
|
||||
/* Don't eagerly resolve this entry. When this flag is set, constant
|
||||
pool entries are resolved only at runtime when the entry is first
|
||||
referred to. */
|
||||
#define CONSTANT_LazyFlag 32
|
||||
|
||||
/* The cpool->data[i] for a ResolvedString points to a STRING_CST. */
|
||||
#define CONSTANT_ResolvedString (CONSTANT_String+CONSTANT_ResolvedFlag)
|
||||
|
||||
|
@ -332,15 +308,9 @@ enum java_tree_index
|
|||
JTI_TYPE_IDENTIFIER_NODE,
|
||||
JTI_INIT_IDENTIFIER_NODE,
|
||||
JTI_CLINIT_IDENTIFIER_NODE,
|
||||
JTI_FINIT_IDENTIFIER_NODE,
|
||||
JTI_INSTINIT_IDENTIFIER_NODE,
|
||||
JTI_VOID_SIGNATURE_NODE,
|
||||
JTI_LENGTH_IDENTIFIER_NODE,
|
||||
JTI_FINALIZE_IDENTIFIER_NODE,
|
||||
JTI_THIS_IDENTIFIER_NODE,
|
||||
JTI_SUPER_IDENTIFIER_NODE,
|
||||
JTI_CONTINUE_IDENTIFIER_NODE,
|
||||
JTI_ACCESS0_IDENTIFIER_NODE,
|
||||
JTI_CLASSDOLLAR_IDENTIFIER_NODE,
|
||||
JTI_ONE_ELT_ARRAY_DOMAIN_TYPE,
|
||||
|
||||
|
@ -418,8 +388,6 @@ enum java_tree_index
|
|||
|
||||
JTI_NATIVECODE_PTR_ARRAY_TYPE_NODE,
|
||||
|
||||
JTI_WFL_OPERATOR,
|
||||
|
||||
JTI_MAIN_CLASS,
|
||||
JTI_CURRENT_CLASS,
|
||||
JTI_OUTPUT_CLASS,
|
||||
|
@ -532,25 +500,12 @@ extern GTY(()) tree java_global_trees[JTI_MAX];
|
|||
java_global_trees[JTI_INIT_IDENTIFIER_NODE] /* "<init>" */
|
||||
#define clinit_identifier_node \
|
||||
java_global_trees[JTI_CLINIT_IDENTIFIER_NODE] /* "<clinit>" */
|
||||
#define finit_identifier_node \
|
||||
java_global_trees[JTI_FINIT_IDENTIFIER_NODE] /* "finit$" */
|
||||
/* FIXME "instinit$" and "finit$" should be merged */
|
||||
#define instinit_identifier_node \
|
||||
java_global_trees[JTI_INSTINIT_IDENTIFIER_NODE] /* "instinit$" */
|
||||
#define void_signature_node \
|
||||
java_global_trees[JTI_VOID_SIGNATURE_NODE] /* "()V" */
|
||||
#define length_identifier_node \
|
||||
java_global_trees[JTI_LENGTH_IDENTIFIER_NODE] /* "length" */
|
||||
#define finalize_identifier_node \
|
||||
java_global_trees[JTI_FINALIZE_IDENTIFIER_NODE] /* "finalize" */
|
||||
#define this_identifier_node \
|
||||
java_global_trees[JTI_THIS_IDENTIFIER_NODE] /* "this" */
|
||||
#define super_identifier_node \
|
||||
java_global_trees[JTI_SUPER_IDENTIFIER_NODE] /* "super" */
|
||||
#define continue_identifier_node \
|
||||
java_global_trees[JTI_CONTINUE_IDENTIFIER_NODE] /* "continue" */
|
||||
#define access0_identifier_node \
|
||||
java_global_trees[JTI_ACCESS0_IDENTIFIER_NODE] /* "access$0" */
|
||||
#define classdollar_identifier_node \
|
||||
java_global_trees[JTI_CLASSDOLLAR_IDENTIFIER_NODE] /* "class$" */
|
||||
#define one_elt_array_domain_type \
|
||||
|
@ -703,14 +658,9 @@ extern GTY(()) tree java_global_trees[JTI_MAX];
|
|||
|
||||
#define nativecode_ptr_type_node ptr_type_node
|
||||
|
||||
#define wfl_operator \
|
||||
java_global_trees[JTI_WFL_OPERATOR]
|
||||
|
||||
/* The decl for "_Jv_ResolvePoolEntry". */
|
||||
extern GTY(()) tree soft_resolvepoolentry_node;
|
||||
|
||||
extern const char *cyclic_inheritance_report;
|
||||
|
||||
struct lang_identifier GTY(())
|
||||
{
|
||||
struct tree_identifier ignore;
|
||||
|
@ -824,20 +774,6 @@ union lang_tree_node
|
|||
in DECL. */
|
||||
#define DECL_FUNCTION_INITIALIZED_CLASS_TABLE(DECL) \
|
||||
(DECL_LANG_SPECIFIC(DECL)->u.f.ict)
|
||||
/* A list of all the static method calls in the method DECL (if optimizing).
|
||||
Actually each TREE_VALUE points to a COMPONT_EXPR that wraps the
|
||||
invocation so we can later patch it. */
|
||||
#define DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND(DECL) \
|
||||
(DECL_LANG_SPECIFIC(DECL)->u.f.smic)
|
||||
/* The Number of Artificial Parameters (NAP) DECL contains. this$<n>
|
||||
is excluded, because sometimes created as a parameter before the
|
||||
function decl exists. */
|
||||
#define DECL_FUNCTION_NAP(DECL) (DECL_LANG_SPECIFIC(DECL)->u.f.nap)
|
||||
/* True if DECL is a synthetic ctor. */
|
||||
#define DECL_FUNCTION_SYNTHETIC_CTOR(DECL) \
|
||||
(DECL_LANG_SPECIFIC(DECL)->u.f.synthetic_ctor)
|
||||
#define DECL_FIXED_CONSTRUCTOR_P(DECL) \
|
||||
(DECL_LANG_SPECIFIC(DECL)->u.f.fixed_ctor)
|
||||
|
||||
#define DECL_LOCAL_CNI_METHOD_P(NODE) \
|
||||
(DECL_LANG_SPECIFIC (NODE)->u.f.local_cni)
|
||||
|
@ -902,6 +838,7 @@ union lang_tree_node
|
|||
/* True if NODE is a final field. */
|
||||
#define FINAL_VARIABLE_P(NODE) (FIELD_FINAL (NODE) && !FIELD_STATIC (NODE))
|
||||
/* True if NODE is a class final field. */
|
||||
#define FIELD_ENUM(DECL) (DECL_LANG_SPECIFIC (DECL)->u.v.field_enum)
|
||||
#define CLASS_FINAL_VARIABLE_P(NODE) \
|
||||
(FIELD_FINAL (NODE) && FIELD_STATIC (NODE))
|
||||
/* True if NODE is a class initialization flag. This macro accesses
|
||||
|
@ -971,14 +908,10 @@ struct lang_decl_func GTY(())
|
|||
/* Initialized (static) Class Table */
|
||||
htab_t GTY ((param_is (union tree_node))) ict;
|
||||
|
||||
tree smic; /* Static method invocation compound */
|
||||
tree inner_access; /* The identifier of the access method
|
||||
used for invocation from inner classes */
|
||||
int nap; /* Number of artificial parameters */
|
||||
unsigned int native : 1; /* Nonzero if this is a native method */
|
||||
unsigned int synthetic_ctor : 1; /* Nonzero if this is a synthetic ctor */
|
||||
unsigned int init_final : 1; /* Nonzero all finals are initialized */
|
||||
unsigned int fixed_ctor : 1;
|
||||
unsigned int init_calls_this : 1;
|
||||
unsigned int strictfp : 1;
|
||||
unsigned int invisible : 1; /* Set for methods we generate
|
||||
|
@ -986,6 +919,8 @@ struct lang_decl_func GTY(())
|
|||
written to the .class file. */
|
||||
unsigned int dummy : 1;
|
||||
unsigned int local_cni : 1; /* Decl needs mangle_local_cni_method. */
|
||||
unsigned int bridge : 1; /* Bridge method. */
|
||||
unsigned int varargs : 1; /* Varargs method. */
|
||||
};
|
||||
|
||||
struct treetreehash_entry GTY(())
|
||||
|
@ -994,7 +929,7 @@ struct treetreehash_entry GTY(())
|
|||
tree value;
|
||||
};
|
||||
|
||||
/* These represent the possible assertion_code's that can be emitted in the
|
||||
/* These represent the possible assertion_codes that can be emitted in the
|
||||
type assertion table. */
|
||||
enum
|
||||
{
|
||||
|
@ -1003,6 +938,28 @@ enum
|
|||
JV_ASSERT_IS_INSTANTIABLE = 2 /* Operand A is an instantiable class. */
|
||||
};
|
||||
|
||||
/* Annotation types used in the reflection_data. See
|
||||
java.lang.Class.getDeclaredAnnotations() in the runtime library for
|
||||
an example of how these are used. */
|
||||
|
||||
typedef enum
|
||||
{
|
||||
JV_CLASS_ATTR,
|
||||
JV_METHOD_ATTR,
|
||||
JV_FIELD_ATTR,
|
||||
JV_DONE_ATTR
|
||||
} jv_attr_type;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
JV_INNER_CLASSES_KIND,
|
||||
JV_ENCLOSING_METHOD_KIND,
|
||||
JV_SIGNATURE_KIND,
|
||||
JV_ANNOTATIONS_KIND,
|
||||
JV_PARAMETER_ANNOTATIONS_KIND,
|
||||
JV_ANNOTATION_DEFAULT_KIND
|
||||
} jv_attr_kind;
|
||||
|
||||
typedef struct type_assertion GTY(())
|
||||
{
|
||||
int assertion_code; /* 'opcode' for the type of this assertion. */
|
||||
|
@ -1031,6 +988,7 @@ struct lang_decl_var GTY(())
|
|||
unsigned int local_slot : 1; /* Decl is a temporary in the stack frame. */
|
||||
unsigned int class_field : 1; /* Decl needs mangle_class_field. */
|
||||
unsigned int vtable : 1; /* Decl needs mangle_vtable. */
|
||||
unsigned int field_enum:1; /* Field is an enum. */
|
||||
};
|
||||
|
||||
/* This is what 'lang_decl' really points to. */
|
||||
|
@ -1058,10 +1016,6 @@ struct lang_decl GTY(())
|
|||
TYPE_LANG_SPECIFIC ((T)) \
|
||||
= ggc_alloc_cleared (sizeof (struct lang_type));
|
||||
|
||||
#define TYPE_FINIT_STMT_LIST(T) (TYPE_LANG_SPECIFIC (T)->finit_stmt_list)
|
||||
#define TYPE_CLINIT_STMT_LIST(T) (TYPE_LANG_SPECIFIC (T)->clinit_stmt_list)
|
||||
#define TYPE_II_STMT_LIST(T) (TYPE_LANG_SPECIFIC (T)->ii_block)
|
||||
|
||||
#define TYPE_DUMMY(T) (TYPE_LANG_SPECIFIC(T)->dummy_class)
|
||||
|
||||
/* The decl of the synthetic method `class$' used to handle `.class'
|
||||
|
@ -1069,11 +1023,13 @@ struct lang_decl GTY(())
|
|||
|
||||
#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)
|
||||
#define TYPE_IMPORT_DEMAND_LIST(T) (TYPE_LANG_SPECIFIC (T)->import_demand_list)
|
||||
#define TYPE_PRIVATE_INNER_CLASS(T) (TYPE_LANG_SPECIFIC (T)->pic)
|
||||
#define TYPE_PROTECTED_INNER_CLASS(T) (TYPE_LANG_SPECIFIC (T)->poic)
|
||||
#define TYPE_STRICTFP(T) (TYPE_LANG_SPECIFIC (T)->strictfp)
|
||||
#define TYPE_ENUM(T) (TYPE_LANG_SPECIFIC (T)->enum_class)
|
||||
#define TYPE_SYNTHETIC(T) (TYPE_LANG_SPECIFIC (T)->synthetic)
|
||||
#define TYPE_ANNOTATION(T) (TYPE_LANG_SPECIFIC (T)->annotation)
|
||||
|
||||
#define TYPE_USES_ASSERTIONS(T) (TYPE_LANG_SPECIFIC (T)->assertions)
|
||||
|
||||
#define TYPE_ATABLE_METHODS(T) (TYPE_LANG_SPECIFIC (T)->atable_methods)
|
||||
|
@ -1096,22 +1052,21 @@ struct lang_decl GTY(())
|
|||
#define TYPE_ASSERTIONS(T) (TYPE_LANG_SPECIFIC (T)->type_assertions)
|
||||
#define TYPE_PACKAGE(T) (TYPE_LANG_SPECIFIC (T)->package)
|
||||
|
||||
#define TYPE_REFLECTION_DATA(T) (TYPE_LANG_SPECIFIC (T)->reflection_data)
|
||||
#define TYPE_REFLECTION_DATASIZE(T) \
|
||||
(TYPE_LANG_SPECIFIC (T)->reflection_datasize)
|
||||
|
||||
struct lang_type GTY(())
|
||||
{
|
||||
tree signature;
|
||||
struct JCF *jcf;
|
||||
struct CPool *cpool;
|
||||
tree cpool_data_ref; /* Cached */
|
||||
tree finit_stmt_list; /* List of statements finit$ will use */
|
||||
tree clinit_stmt_list; /* List of statements <clinit> will use */
|
||||
tree ii_block; /* Instance initializer block */
|
||||
tree dot_class; /* The decl of the `class$' function that
|
||||
needs to be invoked and generated when
|
||||
compiling to bytecode to implement
|
||||
<non_primitive_type>.class */
|
||||
tree package_list; /* List of package names, progressive */
|
||||
tree import_list; /* Imported types, in the CU of this class */
|
||||
tree import_demand_list; /* Imported types, in the CU of this class */
|
||||
|
||||
tree otable_methods; /* List of static decls referred to by this
|
||||
class. */
|
||||
|
@ -1146,11 +1101,20 @@ struct lang_type GTY(())
|
|||
tree package; /* IDENTIFIER_NODE for package this class is
|
||||
a member of. */
|
||||
|
||||
unsigned char* GTY((skip)) reflection_data; /* The raw reflection
|
||||
data for this
|
||||
class. */
|
||||
long reflection_datasize; /* The size of the raw reflection data
|
||||
for this class, in bytes. */
|
||||
|
||||
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. */
|
||||
unsigned dummy_class:1; /* Not a real class, just a placeholder. */
|
||||
unsigned enum_class:1; /* Class is an enum type. */
|
||||
unsigned synthetic:1; /* Class is synthetic. */
|
||||
unsigned annotation:1; /* Class is an annotation type. */
|
||||
};
|
||||
|
||||
#define JCF_u4 unsigned long
|
||||
|
@ -1294,8 +1258,9 @@ extern void lang_init_source (int);
|
|||
extern void write_classfile (tree);
|
||||
extern char *print_int_node (tree);
|
||||
extern void finish_class (void);
|
||||
extern void java_layout_seen_class_methods (void);
|
||||
extern void check_for_initialization (tree, tree);
|
||||
extern struct CPool *cpool_for_class (tree);
|
||||
extern int find_class_or_string_constant (struct CPool *, int, tree);
|
||||
|
||||
extern tree pushdecl_top_level (tree);
|
||||
extern tree pushdecl_function_level (tree);
|
||||
|
@ -1362,10 +1327,7 @@ extern tree get_boehm_type_descriptor (tree);
|
|||
extern bool uses_jv_markobj_p (tree);
|
||||
extern bool class_has_finalize_method (tree);
|
||||
extern void java_check_methods (tree);
|
||||
extern void init_jcf_parse (void);
|
||||
extern void init_src_parse (void);
|
||||
|
||||
extern int cxx_keyword_p (const char *, int);
|
||||
extern void java_mangle_decl (tree);
|
||||
extern tree java_mangle_class_field (struct obstack *, tree);
|
||||
extern tree java_mangle_vtable (struct obstack *, tree);
|
||||
|
@ -1403,6 +1365,10 @@ extern void gen_indirect_dispatch_tables (tree type);
|
|||
extern int split_qualified_name (tree *left, tree *right, tree source);
|
||||
extern int in_same_package (tree, tree);
|
||||
|
||||
extern void java_read_sourcefilenames (const char *fsource_filename);
|
||||
|
||||
extern void rewrite_reflection_indexes (void *);
|
||||
|
||||
#define DECL_FINAL(DECL) DECL_LANG_FLAG_3 (DECL)
|
||||
|
||||
/* Access flags etc for a method (a FUNCTION_DECL): */
|
||||
|
@ -1422,6 +1388,10 @@ extern int in_same_package (tree, tree);
|
|||
(DECL_LANG_SPECIFIC (FUNCTION_DECL_CHECK (DECL))->u.f.strictfp)
|
||||
#define METHOD_INVISIBLE(DECL) \
|
||||
(DECL_LANG_SPECIFIC (FUNCTION_DECL_CHECK (DECL))->u.f.invisible)
|
||||
#define METHOD_BRIDGE(DECL) \
|
||||
(DECL_LANG_SPECIFIC (FUNCTION_DECL_CHECK (DECL))->u.f.bridge)
|
||||
#define METHOD_VARARGS(DECL) \
|
||||
(DECL_LANG_SPECIFIC (FUNCTION_DECL_CHECK (DECL))->u.f.varargs)
|
||||
|
||||
#define CLASS_FILE_P(NODE) TREE_LANG_FLAG_3 (NODE)
|
||||
|
||||
|
@ -1430,17 +1400,13 @@ extern int in_same_package (tree, tree);
|
|||
#define DECL_CONSTRUCTOR_P(DECL) DECL_LANG_FLAG_7 (FUNCTION_DECL_CHECK (DECL))
|
||||
|
||||
#define DECL_INIT_P(DECL) (ID_INIT_P (DECL_NAME (DECL)))
|
||||
#define DECL_FINIT_P(DECL) (ID_FINIT_P (DECL_NAME (DECL)))
|
||||
#define DECL_CLINIT_P(DECL) (ID_CLINIT_P (DECL_NAME (DECL)))
|
||||
#define DECL_INSTINIT_P(DECL) (ID_INSTINIT_P (DECL_NAME (DECL)))
|
||||
|
||||
/* Predicates on method identifiers. Kept close to other macros using
|
||||
them */
|
||||
#define ID_INIT_P(ID) ((ID) == init_identifier_node)
|
||||
#define ID_FINIT_P(ID) ((ID) == finit_identifier_node)
|
||||
#define ID_CLINIT_P(ID) ((ID) == clinit_identifier_node)
|
||||
#define ID_CLASSDOLLAR_P(ID) ((ID) == classdollar_identifier_node)
|
||||
#define ID_INSTINIT_P(ID) ((ID) == instinit_identifier_node)
|
||||
|
||||
/* Access flags etc for variable/field (FIELD_DECL, VAR_DECL, or PARM_DECL): */
|
||||
|
||||
|
@ -1463,7 +1429,10 @@ extern int in_same_package (tree, tree);
|
|||
#define CLASS_PRIVATE(DECL) (TYPE_PRIVATE_INNER_CLASS (TREE_TYPE (DECL)))
|
||||
#define CLASS_PROTECTED(DECL) (TYPE_PROTECTED_INNER_CLASS (TREE_TYPE (DECL)))
|
||||
#define CLASS_STRICTFP(DECL) (TYPE_STRICTFP (TREE_TYPE (DECL)))
|
||||
#define CLASS_ENUM(DECL) (TYPE_ENUM (TREE_TYPE (DECL)))
|
||||
#define CLASS_USES_ASSERTIONS(DECL) (TYPE_USES_ASSERTIONS (TREE_TYPE (DECL)))
|
||||
#define CLASS_SYNTHETIC(DECL) (TYPE_SYNTHETIC (TREE_TYPE (DECL)))
|
||||
#define CLASS_ANNOTATION(DECL) (TYPE_ANNOTATION (TREE_TYPE (DECL)))
|
||||
|
||||
/* @deprecated marker flag on methods, fields and classes */
|
||||
|
||||
|
@ -1527,16 +1496,6 @@ extern int linenumber_count;
|
|||
/* In a type map means the type the address subroutine return address. */
|
||||
#define TYPE_RETURN_ADDR return_address_type_node
|
||||
|
||||
/* In a subroutine's return type map, indicates that the slot was neither
|
||||
used nor set in the subroutine. */
|
||||
#define TYPE_UNUSED error_mark_node
|
||||
|
||||
/* When returned from pop_type_0, indicates stack underflow. */
|
||||
#define TYPE_UNDERFLOW integer_zero_node
|
||||
|
||||
/* When returned from pop_type_0, indicates a type mismatch. */
|
||||
#define TYPE_UNEXPECTED NULL_TREE
|
||||
|
||||
/* A array mapping variable/stack slot index to the type current
|
||||
in that variable/stack slot.
|
||||
TYPE_UNKNOWN, TYPE_SECOND, and TYPE_NULL are special cases. */
|
||||
|
@ -1549,9 +1508,6 @@ extern tree *type_map;
|
|||
#define TYPE_IS_WIDE(TYPE) \
|
||||
((TYPE) == double_type_node || (TYPE) == long_type_node)
|
||||
|
||||
/* True iif CLASS has it's access$0 method generated. */
|
||||
#define CLASS_ACCESS0_GENERATED_P(CLASS) TYPE_LANG_FLAG_0 (CLASS)
|
||||
|
||||
/* True iff TYPE is a Java array type. */
|
||||
#define TYPE_ARRAY_P(TYPE) TYPE_LANG_FLAG_1 (TYPE)
|
||||
|
||||
|
@ -1588,119 +1544,32 @@ extern tree *type_map;
|
|||
layout of a class. */
|
||||
#define CLASS_BEING_LAIDOUT(TYPE) TYPE_LANG_FLAG_6 (TYPE)
|
||||
|
||||
/* True if class TYPE has a field initializer finit$ function */
|
||||
#define CLASS_HAS_FINIT_P(TYPE) TYPE_FINIT_STMT_LIST (TYPE)
|
||||
|
||||
/* True if identifier ID was seen while processing a single type import stmt */
|
||||
#define IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P(ID) TREE_LANG_FLAG_0 (ID)
|
||||
|
||||
/* True if identifier ID was seen while processing an import statement */
|
||||
#define IS_A_CLASSFILE_NAME(ID) TREE_LANG_FLAG_1 (ID)
|
||||
|
||||
/* True if ID is a qualified named (contains . or /) */
|
||||
#define QUALIFIED_P(ID) TREE_LANG_FLAG_2 (ID)
|
||||
|
||||
/* True if ID is an already processed import on demand */
|
||||
#define IS_AN_IMPORT_ON_DEMAND_P(ID) TREE_LANG_FLAG_3 (ID)
|
||||
|
||||
/* True if ID is a command-line specified filename */
|
||||
#define IS_A_COMMAND_LINE_FILENAME_P(ID) TREE_LANG_FLAG_4 (ID)
|
||||
|
||||
/* True if filename ID has already been parsed */
|
||||
#define HAS_BEEN_ALREADY_PARSED_P(ID) TREE_LANG_FLAG_5 (ID)
|
||||
|
||||
/* True if EXPR is RHS sub-tree of a compound assign expression */
|
||||
#define COMPOUND_ASSIGN_P(EXPR) TREE_LANG_FLAG_1 (EXPR)
|
||||
|
||||
/* True if a SWITCH_EXPR has a DEFAULT_EXPR. */
|
||||
#define SWITCH_HAS_DEFAULT(NODE) TREE_LANG_FLAG_3 (SWITCH_EXPR_CHECK (NODE))
|
||||
|
||||
/* True if EXPR (a WFL in that case) was created after the
|
||||
reduction of PRIMARY . XXX */
|
||||
#define PRIMARY_P(EXPR) TREE_LANG_FLAG_2 (EXPR_CHECK (EXPR))
|
||||
|
||||
/* True if EXPR (a MODIFY_EXPR in that case) is the result of variable
|
||||
initialization during its declaration */
|
||||
#define MODIFY_EXPR_FROM_INITIALIZATION_P(EXPR) \
|
||||
TREE_LANG_FLAG_2 (MODIFY_EXPR_CHECK (EXPR))
|
||||
|
||||
/* True if EXPR (a TREE_TYPE denoting a class type) has its methods
|
||||
already checked (for redefinitions, etc, see java_check_regular_methods.) */
|
||||
#define CLASS_METHOD_CHECKED_P(EXPR) TREE_LANG_FLAG_2 (EXPR)
|
||||
|
||||
/* True if TYPE (a TREE_TYPE denoting a class type) was found to
|
||||
feature a finalizer method. */
|
||||
#define HAS_FINALIZER_P(EXPR) TREE_LANG_FLAG_3 (EXPR)
|
||||
|
||||
/* True if EXPR (a LOOP_EXPR in that case) is part of a for statement */
|
||||
#define FOR_LOOP_P(EXPR) TREE_LANG_FLAG_0 (EXPR_CHECK (EXPR))
|
||||
|
||||
/* True if NODE (a RECORD_TYPE in that case) is an anonymous class. */
|
||||
#define ANONYMOUS_CLASS_P(NODE) TREE_LANG_FLAG_0 (RECORD_TYPE_CHECK (NODE))
|
||||
|
||||
/* True if NODE (a RECORD_TYPE in that case) is a block local class. */
|
||||
#define LOCAL_CLASS_P(NODE) TREE_LANG_FLAG_1 (RECORD_TYPE_CHECK (NODE))
|
||||
|
||||
/* True if NODE (a TREE_LIST) hold a pair of argument name/type
|
||||
declared with the final modifier */
|
||||
#define ARG_FINAL_P(NODE) TREE_LANG_FLAG_0 (TREE_LIST_CHECK (NODE))
|
||||
|
||||
/* True if NODE (some kind of EXPR, but not a WFL) should not give an
|
||||
error if it is found to be unreachable. This can only be applied
|
||||
to those EXPRs which can be used as the update expression of a
|
||||
`for' loop. In particular it can't be set on a LOOP_EXPR. */
|
||||
#define SUPPRESS_UNREACHABLE_ERROR(NODE) TREE_LANG_FLAG_0 (EXPR_CHECK (NODE))
|
||||
|
||||
/* True if EXPR (a WFL in that case) resolves into a package name */
|
||||
#define RESOLVE_PACKAGE_NAME_P(WFL) TREE_LANG_FLAG_3 (EXPR_CHECK (WFL))
|
||||
|
||||
/* True if EXPR (a WFL in that case) resolves into a type name */
|
||||
#define RESOLVE_TYPE_NAME_P(WFL) TREE_LANG_FLAG_4 (EXPR_CHECK (WFL))
|
||||
|
||||
/* True if STMT (a WFL in that case) holds a BREAK statement */
|
||||
#define IS_BREAK_STMT_P(WFL) TREE_LANG_FLAG_5 (WFL)
|
||||
|
||||
/* True if EXPR (a CALL_EXPR in that case) is a crafted StringBuffer */
|
||||
#define IS_CRAFTED_STRING_BUFFER_P(EXPR) TREE_LANG_FLAG_5 (EXPR)
|
||||
|
||||
/* True if EXPR (a SAVE_EXPR in that case) had its content already
|
||||
checked for (un)initialized local variables. */
|
||||
#define IS_INIT_CHECKED(EXPR) TREE_LANG_FLAG_5 (SAVE_EXPR_CHECK (EXPR))
|
||||
|
||||
/* If set in CALL_EXPR, the receiver is 'super'. */
|
||||
#define CALL_USING_SUPER(EXPR) TREE_LANG_FLAG_4 (EXPR_CHECK (EXPR))
|
||||
|
||||
/* True if NODE (a statement) can complete normally. */
|
||||
#define CAN_COMPLETE_NORMALLY(NODE) TREE_LANG_FLAG_6 (NODE)
|
||||
|
||||
/* True if NODE (an IDENTIFIER) bears the name of an outer field from
|
||||
inner class (or vice versa) access function. */
|
||||
#define NESTED_FIELD_ACCESS_IDENTIFIER_P(NODE) \
|
||||
TREE_LANG_FLAG_6 (IDENTIFIER_NODE_CHECK (NODE))
|
||||
|
||||
/* True if NODE belongs to an inner class TYPE_DECL node.
|
||||
Verifies that NODE as the attributes of a decl. */
|
||||
#define INNER_CLASS_DECL_P(NODE) (TYPE_NAME (TREE_TYPE (NODE)) == NODE \
|
||||
&& DECL_CONTEXT (NODE))
|
||||
|
||||
/* True if NODE is a top level class TYPE_DECL node: NODE isn't
|
||||
an inner class or NODE is a static class. */
|
||||
#define TOPLEVEL_CLASS_DECL_P(NODE) (!INNER_CLASS_DECL_P (NODE) \
|
||||
|| CLASS_STATIC (NODE))
|
||||
|
||||
/* True if the class decl NODE was declared in an inner scope and is
|
||||
not a toplevel class */
|
||||
#define PURE_INNER_CLASS_DECL_P(NODE) \
|
||||
(INNER_CLASS_DECL_P (NODE) && !CLASS_STATIC (NODE))
|
||||
|
||||
/* True if NODE belongs to an inner class RECORD_TYPE node. Checks
|
||||
that TYPE_NAME bears a decl. An array type wouldn't. */
|
||||
#define INNER_CLASS_TYPE_P(NODE) (TREE_CODE (TYPE_NAME (NODE)) == TYPE_DECL \
|
||||
&& DECL_CONTEXT (TYPE_NAME (NODE)))
|
||||
|
||||
#define TOPLEVEL_CLASS_TYPE_P(NODE) (!INNER_CLASS_TYPE_P (NODE) \
|
||||
|| CLASS_STATIC (TYPE_NAME (NODE)))
|
||||
|
||||
/* True if the class type NODE was declared in an inner scope and is
|
||||
not a toplevel class */
|
||||
#define PURE_INNER_CLASS_TYPE_P(NODE) \
|
||||
|
@ -1782,33 +1651,9 @@ extern tree *type_map;
|
|||
#define FINISH_RECORD_CONSTRUCTOR(CONS) \
|
||||
VEC_pop (constructor_elt, CONSTRUCTOR_ELTS (CONS))
|
||||
|
||||
/* Macros on constructors invocations. */
|
||||
#define CALL_CONSTRUCTOR_P(NODE) \
|
||||
(TREE_CODE (NODE) == NEW_CLASS_EXPR || CALL_EXPLICIT_CONSTRUCTOR_P (NODE))
|
||||
|
||||
#define CALL_EXPLICIT_CONSTRUCTOR_P(NODE) \
|
||||
(CALL_THIS_CONSTRUCTOR_P (NODE) || CALL_SUPER_CONSTRUCTOR_P (NODE))
|
||||
|
||||
#define CALL_THIS_CONSTRUCTOR_P(NODE) \
|
||||
(TREE_CODE (NODE) == CALL_EXPR \
|
||||
&& EXPR_WFL_NODE (TREE_OPERAND (NODE, 0)) == this_identifier_node)
|
||||
|
||||
#define CALL_SUPER_CONSTRUCTOR_P(NODE) \
|
||||
(TREE_CODE (NODE) == CALL_EXPR \
|
||||
&& EXPR_WFL_NODE (TREE_OPERAND (NODE, 0)) == super_identifier_node)
|
||||
|
||||
/* Using a FINALLY_EXPR node */
|
||||
#define FINALLY_EXPR_LABEL(NODE) TREE_OPERAND (FINALLY_EXPR_CHECK (NODE), 0)
|
||||
#define FINALLY_EXPR_BLOCK(NODE) TREE_OPERAND (FINALLY_EXPR_CHECK (NODE), 1)
|
||||
|
||||
#define BLOCK_EXPR_DECLS(NODE) BLOCK_VARS(NODE)
|
||||
#define BLOCK_EXPR_BODY(NODE) BLOCK_SUBBLOCKS(NODE)
|
||||
|
||||
/* True for an implicit block surrounding declaration not at start of {...}. */
|
||||
#define BLOCK_IS_IMPLICIT(NODE) TREE_LANG_FLAG_1 (BLOCK_CHECK (NODE))
|
||||
#define BLOCK_EMPTY_P(NODE) \
|
||||
(TREE_CODE (NODE) == BLOCK && BLOCK_EXPR_BODY (NODE) == empty_stmt_node)
|
||||
|
||||
#define BUILD_MONITOR_ENTER(WHERE, ARG) \
|
||||
{ \
|
||||
(WHERE) = build3 (CALL_EXPR, int_type_node, \
|
||||
|
@ -1827,25 +1672,10 @@ extern tree *type_map;
|
|||
TREE_SIDE_EFFECTS (WHERE) = 1; \
|
||||
}
|
||||
|
||||
/* Nonzero if TYPE is an unchecked exception */
|
||||
#define IS_UNCHECKED_EXCEPTION_P(TYPE) \
|
||||
(inherits_from_p ((TYPE), runtime_exception_type_node) \
|
||||
|| inherits_from_p ((TYPE), error_exception_type_node))
|
||||
|
||||
/* True when we can perform static class initialization optimization */
|
||||
#define STATIC_CLASS_INIT_OPT_P() \
|
||||
(flag_optimize_sci && (optimize >= 2) && ! flag_emit_class_files)
|
||||
|
||||
extern int java_error_count;
|
||||
|
||||
/* Make the current function where this macro is invoked report error
|
||||
messages and and return, if any */
|
||||
#define java_parse_abort_on_error() \
|
||||
{ \
|
||||
if (java_error_count > save_error_count) \
|
||||
return; \
|
||||
}
|
||||
|
||||
/* These are the possible values for the `state' field of the class
|
||||
structure. This must be kept in sync with libgcj. */
|
||||
enum
|
||||
|
@ -1913,6 +1743,6 @@ extern tree build_expr_wfl (tree, const char *, int, int);
|
|||
extern void java_genericize (tree);
|
||||
extern int java_gimplify_expr (tree *, tree *, tree *);
|
||||
|
||||
extern tree extract_field_decl (tree);
|
||||
extern FILE *finput;
|
||||
|
||||
#endif /* ! GCC_JAVA_TREE_H */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* Functions for handling dependency tracking when reading .class files.
|
||||
|
||||
Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
|
||||
Copyright (C) 1998, 1999, 2000, 2001, 2003, 2006 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
|
@ -100,7 +100,7 @@ jcf_dependency_set_dep_file (const char *name)
|
|||
}
|
||||
|
||||
void
|
||||
jcf_dependency_add_file (const char *filename, int system_p)
|
||||
jcf_dependency_add_file (const char *filename ATTRIBUTE_UNUSED, int system_p)
|
||||
{
|
||||
if (! dependencies)
|
||||
return;
|
||||
|
@ -109,7 +109,10 @@ jcf_dependency_add_file (const char *filename, int system_p)
|
|||
if (system_p && ! system_files)
|
||||
return;
|
||||
|
||||
deps_add_dep (dependencies, filename);
|
||||
|
||||
/* FIXME: Don't emit any dependencies. In many cases we'll just see
|
||||
temporary files emitted by ecj... */
|
||||
/* deps_add_dep (dependencies, filename); */
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -96,6 +96,7 @@ int flag_javap_compatible = 0;
|
|||
|
||||
static void print_access_flags (FILE *, uint16, char);
|
||||
static void print_constant_terse (FILE*, JCF*, int, int);
|
||||
static void print_constant_terse_with_index (FILE *, JCF *, int, int);
|
||||
static void print_constant (FILE *, JCF *, int, int);
|
||||
static void print_constant_ref (FILE *, JCF *, int);
|
||||
static void disassemble_method (JCF*, const unsigned char *, int);
|
||||
|
@ -109,6 +110,11 @@ static void process_class (struct JCF *);
|
|||
static void print_constant_pool (struct JCF *);
|
||||
static void print_exception_table (struct JCF *, const unsigned char *entries,
|
||||
int);
|
||||
static void indent (FILE *, int);
|
||||
static void print_element_value (FILE *, JCF *, int);
|
||||
static void print_annotation (FILE *, JCF *, int);
|
||||
static void print_annotations (FILE *, JCF *, int);
|
||||
static void print_parameter_annotations (FILE *, JCF *, int);
|
||||
|
||||
#define PRINT_SIGNATURE_RESULT_ONLY 1
|
||||
#define PRINT_SIGNATURE_ARGS_ONLY 2
|
||||
|
@ -184,7 +190,7 @@ utf8_equal_string (JCF *jcf, int index, const char * value)
|
|||
{ fprintf (out, "Field name:"); \
|
||||
print_constant_terse (out, jcf, NAME, CONSTANT_Utf8); \
|
||||
print_access_flags (out, ACCESS_FLAGS, 'f'); \
|
||||
fprintf (out, " Signature: "); \
|
||||
fprintf (out, " Descriptor: "); \
|
||||
if (flag_print_constant_pool) \
|
||||
fprintf (out, "%d=", SIGNATURE); \
|
||||
print_signature (out, jcf, SIGNATURE, 0); \
|
||||
|
@ -227,7 +233,7 @@ utf8_equal_string (JCF *jcf, int index, const char * value)
|
|||
fprintf (out, "\nMethod name:"); \
|
||||
print_constant_terse (out, jcf, NAME, CONSTANT_Utf8); \
|
||||
print_access_flags (out, ACCESS_FLAGS, 'm'); \
|
||||
fprintf (out, " Signature: "); \
|
||||
fprintf (out, " Descriptor: "); \
|
||||
if (flag_print_constant_pool) \
|
||||
fprintf (out, "%d=", SIGNATURE); \
|
||||
print_signature (out, jcf, SIGNATURE, 0); \
|
||||
|
@ -295,6 +301,26 @@ utf8_equal_string (JCF *jcf, int index, const char * value)
|
|||
print_signature (out, jcf, signature_index, 0); \
|
||||
fprintf (out, " (pc: %d length: %d)\n", start_pc, length); }}
|
||||
|
||||
#define HANDLE_LOCALVARIABLETYPETABLE_ATTRIBUTE(COUNT) \
|
||||
{ int n = (COUNT); int i; \
|
||||
COMMON_HANDLE_ATTRIBUTE(JCF, attribute_name, attribute_length); \
|
||||
fprintf (out, ", count: %d\n", n); \
|
||||
for (i = 0; i < n; i++) { \
|
||||
int start_pc = JCF_readu2 (jcf); \
|
||||
int length = JCF_readu2 (jcf); \
|
||||
int name_index = JCF_readu2 (jcf); \
|
||||
int signature_index = JCF_readu2 (jcf); \
|
||||
int slot = JCF_readu2 (jcf); \
|
||||
fprintf (out, " slot#%d: name: ", slot); \
|
||||
if (flag_print_constant_pool) \
|
||||
fprintf (out, "%d=", name_index); \
|
||||
print_name (out, jcf, name_index); \
|
||||
fprintf (out, ", type: "); \
|
||||
if (flag_print_constant_pool) \
|
||||
fprintf (out, "%d=", signature_index); \
|
||||
print_signature (out, jcf, signature_index, 0); \
|
||||
fprintf (out, " (pc: %d length: %d)\n", start_pc, length); }}
|
||||
|
||||
#define HANDLE_LINENUMBERTABLE_ATTRIBUTE(COUNT) \
|
||||
{ int n = (COUNT); int i; \
|
||||
COMMON_HANDLE_ATTRIBUTE(jcf, attribute_name, attribute_length); \
|
||||
|
@ -357,6 +383,60 @@ utf8_equal_string (JCF *jcf, int index, const char * value)
|
|||
for (i = 0; i < n; i++) { c = JCF_readu(jcf); fputc(c, out); } \
|
||||
if (c != '\r' && c != '\n') fputc('\n', out); }
|
||||
|
||||
#define HANDLE_ENCLOSINGMETHOD_ATTRIBUTE() \
|
||||
{ uint16 class_index, method_index; \
|
||||
COMMON_HANDLE_ATTRIBUTE(jcf, attribute_name, attribute_length); \
|
||||
class_index = JCF_readu2 (jcf); \
|
||||
method_index = JCF_readu2 (jcf); \
|
||||
fprintf (out, "\n Class: "); \
|
||||
print_constant_terse_with_index (out, jcf, class_index, CONSTANT_Class); \
|
||||
fprintf (out, "\n Method: "); \
|
||||
print_constant_terse_with_index (out, jcf, method_index, \
|
||||
CONSTANT_NameAndType); \
|
||||
fputc ('\n', out); \
|
||||
}
|
||||
|
||||
#define HANDLE_SIGNATURE_ATTRIBUTE() \
|
||||
{ \
|
||||
uint16 signature; \
|
||||
COMMON_HANDLE_ATTRIBUTE(jcf, attribute_name, attribute_length); \
|
||||
signature = JCF_readu2 (jcf); \
|
||||
fprintf (out, "\n Value: "); \
|
||||
print_constant_terse_with_index (out, jcf, signature, CONSTANT_Utf8); \
|
||||
fputc ('\n', out); \
|
||||
}
|
||||
|
||||
#define HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE() \
|
||||
{ \
|
||||
COMMON_HANDLE_ATTRIBUTE(jcf, attribute_name, attribute_length); \
|
||||
print_annotations (out, jcf, 1); \
|
||||
}
|
||||
|
||||
#define HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE() \
|
||||
{ \
|
||||
COMMON_HANDLE_ATTRIBUTE(jcf, attribute_name, attribute_length); \
|
||||
print_annotations (out, jcf, 1); \
|
||||
}
|
||||
|
||||
#define HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE() \
|
||||
{ \
|
||||
COMMON_HANDLE_ATTRIBUTE(jcf, attribute_name, attribute_length); \
|
||||
print_parameter_annotations (out, jcf, 1); \
|
||||
}
|
||||
|
||||
#define HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE() \
|
||||
{ \
|
||||
COMMON_HANDLE_ATTRIBUTE(jcf, attribute_name, attribute_length); \
|
||||
print_parameter_annotations (out, jcf, 1); \
|
||||
}
|
||||
|
||||
#define HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE() \
|
||||
{ \
|
||||
COMMON_HANDLE_ATTRIBUTE(jcf, attribute_name, attribute_length); \
|
||||
print_element_value (out, jcf, 1); \
|
||||
}
|
||||
|
||||
|
||||
#define PROCESS_OTHER_ATTRIBUTE(JCF, INDEX, LENGTH) \
|
||||
{ COMMON_HANDLE_ATTRIBUTE(JCF, INDEX, LENGTH); \
|
||||
fputc ('\n', out); JCF_SKIP (JCF, LENGTH); }
|
||||
|
@ -367,6 +447,158 @@ utf8_equal_string (JCF *jcf, int index, const char * value)
|
|||
|
||||
#include "javaop.h"
|
||||
|
||||
|
||||
|
||||
static void
|
||||
indent (FILE *stream, int level)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < level; ++i)
|
||||
fprintf (stream, " ");
|
||||
}
|
||||
|
||||
static void
|
||||
print_element_value (FILE *stream, JCF *jcf, int level)
|
||||
{
|
||||
uint8 tag = JCF_readu (jcf);
|
||||
indent (stream, level);
|
||||
switch (tag)
|
||||
{
|
||||
case 'B':
|
||||
case 'C':
|
||||
case 'S':
|
||||
case 'Z':
|
||||
case 'I':
|
||||
{
|
||||
uint16 cindex = JCF_readu2 (jcf);
|
||||
print_constant_terse_with_index (stream, jcf, cindex,
|
||||
CONSTANT_Integer);
|
||||
}
|
||||
break;
|
||||
case 'D':
|
||||
{
|
||||
uint16 cindex = JCF_readu2 (jcf);
|
||||
print_constant_terse_with_index (stream, jcf, cindex,
|
||||
CONSTANT_Double);
|
||||
}
|
||||
break;
|
||||
case 'F':
|
||||
{
|
||||
uint16 cindex = JCF_readu2 (jcf);
|
||||
print_constant_terse_with_index (stream, jcf, cindex,
|
||||
CONSTANT_Float);
|
||||
}
|
||||
break;
|
||||
case 'J':
|
||||
{
|
||||
uint16 cindex = JCF_readu2 (jcf);
|
||||
print_constant_terse_with_index (stream, jcf, cindex,
|
||||
CONSTANT_Long);
|
||||
}
|
||||
break;
|
||||
case 's':
|
||||
{
|
||||
uint16 cindex = JCF_readu2 (jcf);
|
||||
/* Despite what the JVM spec says, compilers generate a Utf8
|
||||
constant here, not a String. */
|
||||
print_constant_terse_with_index (stream, jcf, cindex,
|
||||
CONSTANT_Utf8);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'e':
|
||||
{
|
||||
uint16 type_name_index = JCF_readu2 (jcf);
|
||||
uint16 const_name_index = JCF_readu2 (jcf);
|
||||
fprintf (stream, "enum class: ");
|
||||
print_constant_terse_with_index (stream, jcf, type_name_index,
|
||||
CONSTANT_Utf8);
|
||||
fprintf (stream, "\n");
|
||||
indent (stream, level);
|
||||
fprintf (stream, "Field: ");
|
||||
print_constant_terse_with_index (stream, jcf, const_name_index,
|
||||
CONSTANT_Utf8);
|
||||
}
|
||||
break;
|
||||
case 'c':
|
||||
{
|
||||
uint16 class_info_index = JCF_readu2 (jcf);
|
||||
print_constant_terse_with_index (stream, jcf, class_info_index,
|
||||
CONSTANT_Utf8);
|
||||
}
|
||||
break;
|
||||
case '@':
|
||||
{
|
||||
fprintf (stream, "Annotation:\n");
|
||||
print_annotation (stream, jcf, level + 1);
|
||||
}
|
||||
break;
|
||||
case '[':
|
||||
{
|
||||
uint16 n_array_elts = JCF_readu2 (jcf);
|
||||
fprintf (stream, "array[%d]: [\n", (int) n_array_elts);
|
||||
while (n_array_elts--)
|
||||
print_element_value (stream, jcf, level + 1);
|
||||
indent (stream, level);
|
||||
fprintf (stream, "]");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
fprintf (stream, "Unexpected tag value: %d", (int) tag);
|
||||
break;
|
||||
}
|
||||
fputc ('\n', stream);
|
||||
}
|
||||
|
||||
static void
|
||||
print_annotation (FILE *stream, JCF *jcf, int level)
|
||||
{
|
||||
uint16 type_index = JCF_readu2 (jcf);
|
||||
uint16 npairs = JCF_readu2 (jcf);
|
||||
fprintf (stream, "\n");
|
||||
indent (stream, level);
|
||||
fprintf (stream, "Annotation name: ");
|
||||
print_constant_terse_with_index (stream, jcf, type_index,
|
||||
CONSTANT_Utf8);
|
||||
if (npairs)
|
||||
{
|
||||
fprintf (stream, "\n");
|
||||
while (npairs--)
|
||||
{
|
||||
uint16 name_index = JCF_readu2 (jcf);
|
||||
indent (stream, level + 1);
|
||||
fprintf (stream, "Name: ");
|
||||
print_constant_terse_with_index (stream, jcf, name_index,
|
||||
CONSTANT_Utf8);
|
||||
fprintf (stream, "\n");
|
||||
print_element_value (stream, jcf, level + 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
print_annotations (FILE *stream, JCF *jcf, int level)
|
||||
{
|
||||
uint16 num = JCF_readu2 (jcf);
|
||||
while (num--)
|
||||
print_annotation (stream, jcf, level);
|
||||
}
|
||||
|
||||
static void
|
||||
print_parameter_annotations (FILE *stream, JCF *jcf, int level)
|
||||
{
|
||||
uint8 nparams = JCF_readu (jcf);
|
||||
uint8 i;
|
||||
for (i = 0; i < nparams; ++i)
|
||||
{
|
||||
indent (stream, level);
|
||||
fprintf (stream, "Parameter annotations (%d):\n", (int) i);
|
||||
print_annotations (stream, jcf, level + 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void
|
||||
print_constant_ref (FILE *stream, JCF *jcf, int index)
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Utility routines for finding and reading Java(TM) .class files.
|
||||
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2005
|
||||
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2005, 2006
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
@ -450,6 +450,9 @@ find_class (const char *classname, int classname_length, JCF *jcf,
|
|||
char *buffer;
|
||||
hashval_t hash;
|
||||
|
||||
/* FIXME: ecj hack. */
|
||||
source_ok = 0;
|
||||
|
||||
/* Create the hash table, if it does not already exist. */
|
||||
if (!memoized_class_lookups)
|
||||
memoized_class_lookups = htab_create (37,
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,5 +1,5 @@
|
|||
/* Handle CLASSPATH, -classpath, and path searching.
|
||||
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004
|
||||
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
@ -457,6 +457,38 @@ jcf_path_next (void *x)
|
|||
return (void *) ent->next;
|
||||
}
|
||||
|
||||
static const char
|
||||
PATH_SEPARATOR_STR[] = {PATH_SEPARATOR, '\0'};
|
||||
|
||||
char *
|
||||
jcf_path_compute (const char *prefix)
|
||||
{
|
||||
struct entry *iter;
|
||||
char *result;
|
||||
int length = strlen (prefix) + 1;
|
||||
int first;
|
||||
|
||||
for (iter = sealed; iter != NULL; iter = iter->next)
|
||||
length += strlen (iter->name) + 1;
|
||||
|
||||
result = (char *) xmalloc (length);
|
||||
strcpy (result, prefix);
|
||||
first = 1;
|
||||
for (iter = sealed; iter != NULL; iter = iter->next)
|
||||
{
|
||||
if (! first)
|
||||
strcat (result, PATH_SEPARATOR_STR);
|
||||
first = 0;
|
||||
strcat (result, iter->name);
|
||||
/* Ugly: we want to strip the '/' from zip entries when
|
||||
computing a string classpath. */
|
||||
if ((iter->flags & FLAG_ZIP) != 0)
|
||||
result[strlen (result) - 1] = '\0';
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/* We guarantee that the return path will either be a zip file, or it
|
||||
will end with a directory separator. */
|
||||
char *
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* This file read a Java(TM) .class file.
|
||||
It is not stand-alone: It depends on tons of macros, and the
|
||||
intent is you #include this file after you've defined the macros.
|
||||
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005
|
||||
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
@ -28,12 +28,12 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
|
|||
#include "jcf.h"
|
||||
#include "zipfile.h"
|
||||
|
||||
static int get_attribute (JCF *);
|
||||
static int get_attribute (JCF *, int, jv_attr_type);
|
||||
static int jcf_parse_preamble (JCF *);
|
||||
static int jcf_parse_constant_pool (JCF *);
|
||||
static void jcf_parse_class (JCF *);
|
||||
static int jcf_parse_fields (JCF *);
|
||||
static int jcf_parse_one_method (JCF *);
|
||||
static int jcf_parse_one_method (JCF *, int);
|
||||
static int jcf_parse_methods (JCF *);
|
||||
static int jcf_parse_final_attributes (JCF *);
|
||||
#ifdef NEED_PEEK_ATTRIBUTE
|
||||
|
@ -103,7 +103,8 @@ skip_attribute (JCF *jcf, int number_of_attribute)
|
|||
#endif
|
||||
|
||||
static int
|
||||
get_attribute (JCF *jcf)
|
||||
get_attribute (JCF *jcf, int index,
|
||||
jv_attr_type attr_type ATTRIBUTE_UNUSED)
|
||||
{
|
||||
uint16 attribute_name = (JCF_FILL (jcf, 6), JCF_readu2 (jcf));
|
||||
uint32 attribute_length = JCF_readu4 (jcf);
|
||||
|
@ -168,7 +169,7 @@ get_attribute (JCF *jcf)
|
|||
attributes_count = JCF_readu2 (jcf);
|
||||
for (j = 0; j < attributes_count; j++)
|
||||
{
|
||||
int code = get_attribute (jcf);
|
||||
int code = get_attribute (jcf, index, JV_METHOD_ATTR);
|
||||
if (code != 0)
|
||||
return code;
|
||||
}
|
||||
|
@ -199,6 +200,14 @@ get_attribute (JCF *jcf)
|
|||
}
|
||||
else
|
||||
#endif
|
||||
#ifdef HANDLE_LOCALVARIABLETYPETABLE_ATTRIBUTE
|
||||
if (MATCH_ATTRIBUTE ("LocalVariableTypeTable"))
|
||||
{
|
||||
uint16 count = JCF_readu2 (jcf);
|
||||
HANDLE_LOCALVARIABLETYPETABLE_ATTRIBUTE (count);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
#ifdef HANDLE_INNERCLASSES_ATTRIBUTE
|
||||
if (MATCH_ATTRIBUTE ("InnerClasses"))
|
||||
{
|
||||
|
@ -234,6 +243,55 @@ get_attribute (JCF *jcf)
|
|||
HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE (attribute_length);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
#ifdef HANDLE_ENCLOSINGMETHOD_ATTRIBUTE
|
||||
if (MATCH_ATTRIBUTE ("EnclosingMethod"))
|
||||
{
|
||||
HANDLE_ENCLOSINGMETHOD_ATTRIBUTE ();
|
||||
}
|
||||
else
|
||||
#endif
|
||||
#ifdef HANDLE_SIGNATURE_ATTRIBUTE
|
||||
if (MATCH_ATTRIBUTE ("Signature"))
|
||||
{
|
||||
HANDLE_SIGNATURE_ATTRIBUTE ();
|
||||
}
|
||||
else
|
||||
#endif
|
||||
#ifdef HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE
|
||||
if (MATCH_ATTRIBUTE ("RuntimeVisibleAnnotations"))
|
||||
{
|
||||
HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE ();
|
||||
}
|
||||
else
|
||||
#endif
|
||||
#ifdef HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE
|
||||
if (MATCH_ATTRIBUTE ("RuntimeInvisibleAnnotations"))
|
||||
{
|
||||
HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE ();
|
||||
}
|
||||
else
|
||||
#endif
|
||||
#ifdef HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE
|
||||
if (MATCH_ATTRIBUTE ("RuntimeVisibleParameterAnnotations"))
|
||||
{
|
||||
HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE ();
|
||||
}
|
||||
else
|
||||
#endif
|
||||
#ifdef HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE
|
||||
if (MATCH_ATTRIBUTE ("RuntimeInvisibleParameterAnnotations"))
|
||||
{
|
||||
HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE ();
|
||||
}
|
||||
else
|
||||
#endif
|
||||
#ifdef HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE
|
||||
if (MATCH_ATTRIBUTE ("AnnotationDefault"))
|
||||
{
|
||||
HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE ();
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
#ifdef PROCESS_OTHER_ATTRIBUTE
|
||||
|
@ -384,7 +442,7 @@ jcf_parse_fields (JCF* jcf)
|
|||
#endif
|
||||
for (j = 0; j < attribute_count; j++)
|
||||
{
|
||||
int code = get_attribute (jcf);
|
||||
int code = get_attribute (jcf, i, JV_FIELD_ATTR);
|
||||
if (code != 0)
|
||||
return code;
|
||||
}
|
||||
|
@ -401,7 +459,7 @@ jcf_parse_fields (JCF* jcf)
|
|||
/* Read methods. */
|
||||
|
||||
static int
|
||||
jcf_parse_one_method (JCF* jcf)
|
||||
jcf_parse_one_method (JCF* jcf, int index)
|
||||
{
|
||||
int i;
|
||||
uint16 access_flags = (JCF_FILL (jcf, 8), JCF_readu2 (jcf));
|
||||
|
@ -413,7 +471,7 @@ jcf_parse_one_method (JCF* jcf)
|
|||
#endif
|
||||
for (i = 0; i < attribute_count; i++)
|
||||
{
|
||||
int code = get_attribute (jcf);
|
||||
int code = get_attribute (jcf, index, JV_METHOD_ATTR);
|
||||
if (code != 0)
|
||||
return code;
|
||||
}
|
||||
|
@ -435,7 +493,7 @@ jcf_parse_methods (JCF* jcf)
|
|||
#endif
|
||||
for (i = 0; i < methods_count; i++)
|
||||
{
|
||||
int code = jcf_parse_one_method (jcf);
|
||||
int code = jcf_parse_one_method (jcf, i);
|
||||
if (code != 0)
|
||||
return code;
|
||||
}
|
||||
|
@ -456,7 +514,7 @@ jcf_parse_final_attributes (JCF *jcf)
|
|||
#endif
|
||||
for (i = 0; i < attributes_count; i++)
|
||||
{
|
||||
int code = get_attribute (jcf);
|
||||
int code = get_attribute (jcf, i, JV_CLASS_ATTR);
|
||||
if (code != 0)
|
||||
return code;
|
||||
}
|
||||
|
|
3569
gcc/java/jcf-write.c
3569
gcc/java/jcf-write.c
File diff suppressed because it is too large
Load diff
|
@ -241,18 +241,22 @@ typedef struct JCF GTY(()) {
|
|||
|
||||
#define ACC_VISIBILITY (ACC_PUBLIC | ACC_PRIVATE | ACC_PROTECTED)
|
||||
|
||||
#define CONSTANT_Class 7
|
||||
#define CONSTANT_Fieldref 9
|
||||
#define CONSTANT_Methodref 10
|
||||
#define CONSTANT_InterfaceMethodref 11
|
||||
#define CONSTANT_String 8
|
||||
#define CONSTANT_Integer 3
|
||||
#define CONSTANT_Float 4
|
||||
#define CONSTANT_Long 5
|
||||
#define CONSTANT_Double 6
|
||||
#define CONSTANT_NameAndType 12
|
||||
#define CONSTANT_Utf8 1
|
||||
#define CONSTANT_Unicode 2
|
||||
enum cpool_tag
|
||||
{
|
||||
CONSTANT_Class = 7,
|
||||
CONSTANT_Fieldref = 9,
|
||||
CONSTANT_Methodref = 10,
|
||||
CONSTANT_InterfaceMethodref = 11,
|
||||
CONSTANT_String = 8,
|
||||
CONSTANT_Integer = 3,
|
||||
CONSTANT_Float = 4,
|
||||
CONSTANT_Long = 5,
|
||||
CONSTANT_Double = 6,
|
||||
CONSTANT_NameAndType = 12,
|
||||
CONSTANT_Utf8 = 1,
|
||||
CONSTANT_Unicode = 2,
|
||||
CONSTANT_None = 0
|
||||
};
|
||||
|
||||
#define DEFAULT_CLASS_PATH "."
|
||||
|
||||
|
@ -309,6 +313,7 @@ extern void jcf_path_seal (int);
|
|||
extern void *jcf_path_start (void);
|
||||
extern void *jcf_path_next (void *);
|
||||
extern char *jcf_path_name (void *);
|
||||
extern char *jcf_path_compute (const char *);
|
||||
extern int jcf_path_is_zipfile (void *);
|
||||
extern int jcf_path_is_system (void *);
|
||||
extern int jcf_path_max_len (void);
|
||||
|
|
|
@ -1,290 +0,0 @@
|
|||
/* Main for jv-scan
|
||||
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
|
||||
Free Software Foundation, Inc.
|
||||
Contributed by Alexandre Petit-Bianco (apbianco@cygnus.com)
|
||||
|
||||
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, 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA. */
|
||||
|
||||
#include "config.h"
|
||||
#include "system.h"
|
||||
#include "coretypes.h"
|
||||
#include "tm.h"
|
||||
#include "intl.h"
|
||||
|
||||
#include "obstack.h" /* We use obstacks in lex.c */
|
||||
|
||||
#include "version.h"
|
||||
|
||||
#ifdef HAVE_LOCALE_H
|
||||
#include <locale.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LANGINFO_CODESET
|
||||
#include <langinfo.h>
|
||||
#endif
|
||||
|
||||
#include <getopt.h>
|
||||
|
||||
extern void fatal_error (const char *gmsgid, ...)
|
||||
ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
|
||||
void warning (int opt, const char *gmsgid, ...) ATTRIBUTE_PRINTF_2;
|
||||
void warning0 (const char *gmsgid, ...) ATTRIBUTE_PRINTF_1;
|
||||
void report (void);
|
||||
|
||||
static void usage (void) ATTRIBUTE_NORETURN;
|
||||
static void help (void) ATTRIBUTE_NORETURN;
|
||||
static void version (void) ATTRIBUTE_NORETURN;
|
||||
|
||||
#define JC1_LITE
|
||||
#include "jcf.h"
|
||||
#include "parse.h"
|
||||
|
||||
/* Current input file and output file IO streams. */
|
||||
FILE *finput, *out;
|
||||
|
||||
/* Executable name. */
|
||||
char *exec_name;
|
||||
|
||||
struct line_maps line_table;
|
||||
|
||||
/* Flags matching command line options. */
|
||||
int flag_find_main = 0;
|
||||
int flag_dump_class = 0;
|
||||
int flag_list_filename = 0;
|
||||
int flag_complexity = 0;
|
||||
int flag_assert = 1;
|
||||
|
||||
int pedantic = 0;
|
||||
|
||||
|
||||
|
||||
/* This is used to mark options with no short value. */
|
||||
#define LONG_OPT(Num) ((Num) + 128)
|
||||
|
||||
#define OPT_HELP LONG_OPT (0)
|
||||
#define OPT_VERSION LONG_OPT (1)
|
||||
#define OPT_ENCODING LONG_OPT (2)
|
||||
|
||||
static const struct option options[] =
|
||||
{
|
||||
{ "help", no_argument, NULL, OPT_HELP },
|
||||
{ "version", no_argument, NULL, OPT_VERSION },
|
||||
{ "print-main", no_argument, &flag_find_main, 1 },
|
||||
{ "list-filename", no_argument, &flag_list_filename, 1 },
|
||||
{ "list-class", no_argument, &flag_dump_class, 1 },
|
||||
{ "encoding", required_argument, NULL, OPT_ENCODING },
|
||||
{ "complexity", no_argument, &flag_complexity, 1 },
|
||||
{ "no-assert", no_argument, &flag_assert, 0 },
|
||||
{ "assert", no_argument, &flag_assert, 1 },
|
||||
{ NULL, no_argument, NULL, 0 }
|
||||
};
|
||||
|
||||
static void
|
||||
usage (void)
|
||||
{
|
||||
fprintf (stderr, _("Try 'jv-scan --help' for more information.\n"));
|
||||
exit (1);
|
||||
}
|
||||
|
||||
static void
|
||||
help (void)
|
||||
{
|
||||
printf (_("Usage: jv-scan [OPTION]... FILE...\n\n"));
|
||||
printf (_("Print useful information read from Java source files.\n\n"));
|
||||
printf (_(" --no-assert Don't recognize the assert keyword\n"));
|
||||
printf (_(" --complexity Print cyclomatic complexity of input file\n"));
|
||||
printf (_(" --encoding NAME Specify encoding of input file\n"));
|
||||
printf (_(" --print-main Print name of class containing 'main'\n"));
|
||||
printf (_(" --list-class List all classes defined in file\n"));
|
||||
printf (_(" --list-filename Print input filename when listing class names\n"));
|
||||
printf (_(" -o FILE Set output file name\n"));
|
||||
printf ("\n");
|
||||
printf (_(" --help Print this help, then exit\n"));
|
||||
printf (_(" --version Print version number, then exit\n"));
|
||||
printf ("\n");
|
||||
printf (_("For bug reporting instructions, please see:\n"
|
||||
"%s.\n"), bug_report_url);
|
||||
exit (0);
|
||||
}
|
||||
|
||||
static void
|
||||
version (void)
|
||||
{
|
||||
printf ("jv-scan (GCC) %s\n\n", version_string);
|
||||
printf ("Copyright %s 2006 Free Software Foundation, Inc.\n", _("(C)"));
|
||||
printf (_("This is free software; see the source for copying conditions. There is NO\n"
|
||||
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"));
|
||||
exit (0);
|
||||
}
|
||||
|
||||
/* jc1-lite main entry point */
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
int i = 1;
|
||||
const char *output_file = NULL;
|
||||
const char *encoding = NULL;
|
||||
long ft;
|
||||
int opt;
|
||||
|
||||
exec_name = argv[0];
|
||||
|
||||
/* Default for output */
|
||||
out = stdout;
|
||||
|
||||
/* Unlock the stdio streams. */
|
||||
unlock_std_streams ();
|
||||
|
||||
gcc_init_libintl ();
|
||||
|
||||
/* Process options first. We use getopt_long and not
|
||||
getopt_long_only because we only support `--' long options here. */
|
||||
while ((opt = getopt_long (argc, argv, "o:", options, NULL)) != -1)
|
||||
{
|
||||
switch (opt)
|
||||
{
|
||||
case 0:
|
||||
/* Already handled. */
|
||||
break;
|
||||
|
||||
case 'o':
|
||||
output_file = optarg;
|
||||
break;
|
||||
|
||||
case OPT_HELP:
|
||||
help ();
|
||||
break;
|
||||
|
||||
case OPT_VERSION:
|
||||
version ();
|
||||
break;
|
||||
|
||||
case OPT_ENCODING:
|
||||
encoding = optarg;
|
||||
break;
|
||||
|
||||
default:
|
||||
usage ();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* No flags? Do nothing */
|
||||
if (! flag_find_main && ! flag_dump_class && ! flag_complexity)
|
||||
return 0;
|
||||
|
||||
/* Check on bad usage */
|
||||
if (flag_find_main + flag_dump_class + flag_complexity > 1)
|
||||
fatal_error
|
||||
("only one of '--print-main', '--list-class', and '--complexity' allowed");
|
||||
|
||||
if (output_file && !(out = fopen (output_file, "w")))
|
||||
fatal_error ("can't open output file '%s'", output_file);
|
||||
|
||||
ft = ftell (out);
|
||||
|
||||
gcc_obstack_init (&temporary_obstack);
|
||||
java_push_parser_context ();
|
||||
|
||||
for ( i = optind; i < argc; i++ )
|
||||
if (argv [i])
|
||||
{
|
||||
char *filename = argv[i];
|
||||
if ( (finput = fopen (filename, "r")) )
|
||||
{
|
||||
/* There's no point in trying to find the current encoding
|
||||
unless we are going to do something intelligent with it
|
||||
-- hence the test for iconv. */
|
||||
#if defined (HAVE_LOCALE_H) && defined (HAVE_ICONV) && defined (HAVE_LANGINFO_CODESET)
|
||||
setlocale (LC_CTYPE, "");
|
||||
if (encoding == NULL)
|
||||
encoding = nl_langinfo (CODESET);
|
||||
#endif
|
||||
if (encoding == NULL || *encoding == '\0')
|
||||
encoding = DEFAULT_ENCODING;
|
||||
|
||||
main_input_filename = filename;
|
||||
java_init_lex (finput, encoding);
|
||||
ctxp->filename = filename;
|
||||
yyparse ();
|
||||
report ();
|
||||
if (ftell (out) != ft)
|
||||
fputc ('\n', out);
|
||||
ft = ftell (out);
|
||||
fclose (finput);
|
||||
reset_report ();
|
||||
}
|
||||
else
|
||||
fatal_error ("file not found '%s'", argv [i]);
|
||||
}
|
||||
|
||||
/* Flush and close */
|
||||
if (ftell (out) != ft)
|
||||
fputc ('\n', out);
|
||||
if (!output_file)
|
||||
fclose (out);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Error report, memory, obstack initialization and other utility
|
||||
functions. Use actually c-format msgid, but as functions with
|
||||
the same name elsewhere use gcc-internal-format, assume all users
|
||||
here use intersection between c-format and gcc-internal-format. */
|
||||
|
||||
void
|
||||
fatal_error (const char *gmsgid, ...)
|
||||
{
|
||||
va_list ap;
|
||||
va_start (ap, gmsgid);
|
||||
fprintf (stderr, _("%s: error: "), exec_name);
|
||||
vfprintf (stderr, _(gmsgid), ap);
|
||||
fputc ('\n', stderr);
|
||||
va_end (ap);
|
||||
exit (1);
|
||||
}
|
||||
|
||||
void
|
||||
warning (int opt ATTRIBUTE_UNUSED, const char *gmsgid, ...)
|
||||
{
|
||||
va_list ap;
|
||||
va_start (ap, gmsgid);
|
||||
fprintf (stderr, _("%s: warning: "), exec_name);
|
||||
vfprintf (stderr, _(gmsgid), ap);
|
||||
fputc ('\n', stderr);
|
||||
va_end (ap);
|
||||
}
|
||||
|
||||
void
|
||||
warning0 (const char *gmsgid, ...)
|
||||
{
|
||||
va_list ap;
|
||||
va_start (ap, gmsgid);
|
||||
fprintf (stderr, _("%s: warning: "), exec_name);
|
||||
vfprintf (stderr, _(gmsgid), ap);
|
||||
fputc ('\n', stderr);
|
||||
va_end (ap);
|
||||
}
|
||||
|
||||
void
|
||||
fancy_abort (const char *file, int line, const char *func)
|
||||
{
|
||||
fatal_error ("abort in %s, at %s:%d", func, file, line);
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
/* Program to generate "main" a Java(TM) class containing a main method.
|
||||
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||||
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
@ -57,14 +57,23 @@ main (int argc, char **argv)
|
|||
FILE *stream;
|
||||
const char *mangled_classname;
|
||||
int i, last_arg;
|
||||
int indirect = 0;
|
||||
char *prog_name = argv[0];
|
||||
|
||||
/* Unlock the stdio streams. */
|
||||
unlock_std_streams ();
|
||||
|
||||
gcc_init_libintl ();
|
||||
|
||||
if (argc > 1 && ! strcmp (argv[1], "-findirect-dispatch"))
|
||||
{
|
||||
indirect = 1;
|
||||
++argv;
|
||||
--argc;
|
||||
}
|
||||
|
||||
if (argc < 2)
|
||||
usage (argv[0]);
|
||||
usage (prog_name);
|
||||
|
||||
for (i = 1; i < argc; ++i)
|
||||
{
|
||||
|
@ -77,7 +86,7 @@ main (int argc, char **argv)
|
|||
}
|
||||
|
||||
if (i < argc - 2 || i == argc)
|
||||
usage (argv[0]);
|
||||
usage (prog_name);
|
||||
last_arg = i;
|
||||
|
||||
classname = argv[i];
|
||||
|
@ -85,7 +94,7 @@ main (int argc, char **argv)
|
|||
/* gcj always appends `main' to classname. We need to strip this here. */
|
||||
p = strrchr (classname, 'm');
|
||||
if (p == NULL || p == classname || strcmp (p, "main") != 0)
|
||||
usage (argv[0]);
|
||||
usage (prog_name);
|
||||
else
|
||||
*p = '\0';
|
||||
|
||||
|
@ -99,7 +108,7 @@ main (int argc, char **argv)
|
|||
if (stream == NULL)
|
||||
{
|
||||
fprintf (stderr, _("%s: Cannot open output file: %s\n"),
|
||||
argv[0], outfile);
|
||||
prog_name, outfile);
|
||||
exit (1);
|
||||
}
|
||||
}
|
||||
|
@ -130,13 +139,18 @@ main (int argc, char **argv)
|
|||
fprintf (stream, "int main (int argc, const char **argv)\n");
|
||||
fprintf (stream, "{\n");
|
||||
fprintf (stream, " _Jv_Compiler_Properties = props;\n");
|
||||
fprintf (stream, " extern void *%s;\n", mangled_classname);
|
||||
fprintf (stream, " JvRunMain (%s, argc, argv);\n", mangled_classname);
|
||||
if (indirect)
|
||||
fprintf (stream, " JvRunMainName (\"%s\", argc, argv);\n", classname);
|
||||
else
|
||||
{
|
||||
fprintf (stream, " extern void *%s;\n", mangled_classname);
|
||||
fprintf (stream, " JvRunMain (%s, argc, argv);\n", mangled_classname);
|
||||
}
|
||||
fprintf (stream, "}\n");
|
||||
if (stream != stdout && fclose (stream) != 0)
|
||||
{
|
||||
fprintf (stderr, _("%s: Failed to close output file %s\n"),
|
||||
argv[0], argv[2]);
|
||||
prog_name, argv[2]);
|
||||
exit (1);
|
||||
}
|
||||
return 0;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* Specific flags and argument handling of the front-end of the
|
||||
GNU compiler for the Java(TM) language.
|
||||
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
|
||||
Free Software Foundation, Inc.
|
||||
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||
2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
|
@ -29,6 +29,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
|
|||
#include "coretypes.h"
|
||||
#include "tm.h"
|
||||
#include "gcc.h"
|
||||
#include "jcf.h"
|
||||
|
||||
/* Name of spec file. */
|
||||
#define SPEC_FILE "libgcj.spec"
|
||||
|
@ -58,7 +59,7 @@ int lang_specific_extra_outfiles = 0;
|
|||
int shared_libgcc = 1;
|
||||
|
||||
static const char jvgenmain_spec[] =
|
||||
"jvgenmain %{D*} %b %m.i |\n\
|
||||
"jvgenmain %{findirect-dispatch} %{D*} %b %m.i |\n\
|
||||
cc1 %m.i %1 \
|
||||
%{!Q:-quiet} -dumpbase %b.c %{d*} %{m*} %{a*}\
|
||||
%{g*} %{O*} \
|
||||
|
@ -74,7 +75,7 @@ static const char jvgenmain_spec[] =
|
|||
%<fextdirs*\
|
||||
%<fuse-divide-subroutine %<fno-use-divide-subroutine\
|
||||
%<fcheck-references %<fno-check-references\
|
||||
%<ffilelist-file\
|
||||
%<ffilelist-file %<fsaw-java-file %<fsource* %<ftarget*\
|
||||
%{f*} -fdollars-in-identifiers\
|
||||
%{aux-info*}\
|
||||
%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
|
||||
|
@ -103,7 +104,6 @@ find_spec_file (const char *dir)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/* FIXME: these should come from lex.h. */
|
||||
#define JAVA_START_CHAR_P(c) (c < 128 && (ISIDST (c) || c == '$'))
|
||||
#define JAVA_PART_CHAR_P(c) (c < 128 \
|
||||
&& (ISIDNUM (c) \
|
||||
|
@ -189,23 +189,6 @@ lang_specific_driver (int *in_argc, const char *const **in_argv,
|
|||
already gave a language for the file. */
|
||||
int saw_speclang = 0;
|
||||
|
||||
#if 0
|
||||
/* "-lm" or "-lmath" if it appears on the command line. */
|
||||
const char *saw_math ATTRIBUTE_UNUSED = 0;
|
||||
|
||||
/* "-lc" if it appears on the command line. */
|
||||
const char *saw_libc ATTRIBUTE_UNUSED = 0;
|
||||
|
||||
/* "-lgcjgc" if it appears on the command line. */
|
||||
const char *saw_gc ATTRIBUTE_UNUSED = 0;
|
||||
|
||||
/* Saw `-l' option for the thread library. */
|
||||
const char *saw_threadlib ATTRIBUTE_UNUSED = 0;
|
||||
|
||||
/* Saw `-lgcj' on command line. */
|
||||
int saw_libgcj ATTRIBUTE_UNUSED = 0;
|
||||
#endif
|
||||
|
||||
/* Saw --resource, -C or -o options, respectively. */
|
||||
int saw_resource = 0;
|
||||
int saw_C = 0;
|
||||
|
@ -231,6 +214,10 @@ lang_specific_driver (int *in_argc, const char *const **in_argv,
|
|||
/* The number of libraries added in. */
|
||||
int added_libraries;
|
||||
|
||||
/* The total number of arguments having to do with classpath
|
||||
setting. */
|
||||
int classpath_args = 0;
|
||||
|
||||
/* The total number of arguments with the new stuff. */
|
||||
int num_args = 1;
|
||||
|
||||
|
@ -467,14 +454,6 @@ lang_specific_driver (int *in_argc, const char *const **in_argv,
|
|||
num_args -= java_files_count + class_files_count + zip_files_count;
|
||||
num_args += 3; /* for the combined arg "-xjava", and "-xnone" */
|
||||
}
|
||||
/* If we know we don't have to do anything, bail now. */
|
||||
#if 0
|
||||
if (! added && ! library && main_class_name == NULL && ! saw_C)
|
||||
{
|
||||
free (args);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (main_class_name)
|
||||
{
|
||||
|
@ -483,6 +462,8 @@ lang_specific_driver (int *in_argc, const char *const **in_argv,
|
|||
if (saw_g + saw_O == 0)
|
||||
num_args++;
|
||||
num_args++;
|
||||
/* An additional entry for the classpath. */
|
||||
num_args++;
|
||||
|
||||
if (combine_inputs || indirect_files_count > 0)
|
||||
num_args += 1; /* for "-ffilelist-file" */
|
||||
|
@ -495,6 +476,9 @@ lang_specific_driver (int *in_argc, const char *const **in_argv,
|
|||
shared_libgcc = 0;
|
||||
#endif
|
||||
|
||||
if (java_files_count > 0)
|
||||
++num_args;
|
||||
|
||||
num_args += shared_libgcc;
|
||||
|
||||
num_args += link_for_bc_abi;
|
||||
|
@ -514,6 +498,10 @@ lang_specific_driver (int *in_argc, const char *const **in_argv,
|
|||
arglist[j++] = "-xnone";
|
||||
}
|
||||
|
||||
if (java_files_count > 0)
|
||||
arglist[j++] = "-fsaw-java-file";
|
||||
|
||||
jcf_path_init ();
|
||||
for (i = 1; i < argc; i++, j++)
|
||||
{
|
||||
arglist[j] = argv[i];
|
||||
|
@ -528,11 +516,51 @@ lang_specific_driver (int *in_argc, const char *const **in_argv,
|
|||
arglist[j] = "-xnone";
|
||||
}
|
||||
|
||||
if (strcmp (argv[i], "-classpath") == 0
|
||||
|| strcmp (argv[i], "-bootclasspath") == 0
|
||||
|| strcmp (argv[i], "-CLASSPATH") == 0
|
||||
|| strcmp (argv[i], "-encoding") == 0
|
||||
|| strcmp (argv[i], "-extdirs") == 0)
|
||||
if (argv[i][1] == 'I')
|
||||
{
|
||||
jcf_path_include_arg (&argv[i][2]);
|
||||
--j;
|
||||
continue;
|
||||
}
|
||||
if (! strcmp (argv[i], "-classpath")
|
||||
|| ! strcmp (argv[i], "-CLASSPATH"))
|
||||
{
|
||||
jcf_path_classpath_arg (argv[i + 1]);
|
||||
++i;
|
||||
--j;
|
||||
continue;
|
||||
}
|
||||
if (! strcmp (argv[i], "-bootclasspath"))
|
||||
{
|
||||
jcf_path_bootclasspath_arg (argv[i + 1]);
|
||||
++i;
|
||||
--j;
|
||||
continue;
|
||||
}
|
||||
if (! strncmp (argv[i], "-fCLASSPATH=", 12)
|
||||
|| ! strncmp (argv[i], "-fclasspath=", 12))
|
||||
{
|
||||
char *p = strchr (argv[i], '=');
|
||||
jcf_path_classpath_arg (p + 1);
|
||||
--j;
|
||||
continue;
|
||||
}
|
||||
if (! strncmp (argv[i], "-fbootclasspath=", 16))
|
||||
{
|
||||
char *p = strchr (argv[i], '=');
|
||||
jcf_path_bootclasspath_arg (p + 1);
|
||||
--j;
|
||||
continue;
|
||||
}
|
||||
if (! strcmp (argv[i], "-extdirs"))
|
||||
{
|
||||
jcf_path_extdirs_arg (argv[i + 1]);
|
||||
++i;
|
||||
--j;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (strcmp (argv[i], "-encoding") == 0)
|
||||
{
|
||||
arglist[j] = concat ("-f", argv[i]+1, "=", argv[i+1], NULL);
|
||||
i++;
|
||||
|
@ -580,6 +608,11 @@ lang_specific_driver (int *in_argc, const char *const **in_argv,
|
|||
}
|
||||
}
|
||||
|
||||
/* Handle classpath setting. We specify the bootclasspath since
|
||||
that requires the fewest changes to our existing code... */
|
||||
jcf_path_seal (0);
|
||||
arglist[j++] = jcf_path_compute ("-fbootclasspath=");
|
||||
|
||||
if (combine_inputs)
|
||||
{
|
||||
if (fclose (filelist_file))
|
||||
|
|
|
@ -1,91 +0,0 @@
|
|||
%{
|
||||
/* Keyword definition for the GNU compiler for the Java(TM) language.
|
||||
Copyright (C) 1997, 1998, 2001, 2002, 2003
|
||||
Free Software Foundation, Inc.
|
||||
Contributed by Alexandre Petit-Bianco (apbianco@cygnus.com)
|
||||
|
||||
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, 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, 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. */
|
||||
|
||||
%}
|
||||
struct java_keyword { const char *const name; const int token; };
|
||||
#ifdef __GNUC__
|
||||
__inline
|
||||
#endif
|
||||
static unsigned int hash (const char *, unsigned int);
|
||||
#ifdef __GNUC__
|
||||
__inline
|
||||
#endif
|
||||
const struct java_keyword *java_keyword (const char *, unsigned int);
|
||||
%%
|
||||
abstract, ABSTRACT_TK
|
||||
default, DEFAULT_TK
|
||||
if, IF_TK
|
||||
private, PRIVATE_TK
|
||||
throw, THROW_TK
|
||||
boolean, BOOLEAN_TK
|
||||
do, DO_TK
|
||||
implements, IMPLEMENTS_TK
|
||||
protected, PROTECTED_TK
|
||||
throws, THROWS_TK
|
||||
break, BREAK_TK
|
||||
double, DOUBLE_TK
|
||||
import, IMPORT_TK
|
||||
public, PUBLIC_TK
|
||||
transient, TRANSIENT_TK
|
||||
byte, BYTE_TK
|
||||
else, ELSE_TK
|
||||
instanceof, INSTANCEOF_TK
|
||||
return, RETURN_TK
|
||||
try, TRY_TK
|
||||
case, CASE_TK
|
||||
extends, EXTENDS_TK
|
||||
int, INT_TK
|
||||
short, SHORT_TK
|
||||
void, VOID_TK
|
||||
catch, CATCH_TK
|
||||
final, FINAL_TK
|
||||
interface, INTERFACE_TK
|
||||
static, STATIC_TK
|
||||
volatile, VOLATILE_TK
|
||||
char, CHAR_TK
|
||||
finally, FINALLY_TK
|
||||
long, LONG_TK
|
||||
super, SUPER_TK
|
||||
while, WHILE_TK
|
||||
class, CLASS_TK
|
||||
float, FLOAT_TK
|
||||
native, NATIVE_TK
|
||||
switch, SWITCH_TK
|
||||
const, CONST_TK
|
||||
for, FOR_TK
|
||||
new, NEW_TK
|
||||
synchronized, SYNCHRONIZED_TK
|
||||
continue, CONTINUE_TK
|
||||
goto, GOTO_TK
|
||||
package, PACKAGE_TK
|
||||
this, THIS_TK
|
||||
strictfp, STRICT_TK
|
||||
# true, false and null aren't keyword. But we match them easily this way
|
||||
true, TRUE_TK
|
||||
false, FALSE_TK
|
||||
null, NULL_TK
|
||||
assert, ASSERT_TK
|
|
@ -1,189 +0,0 @@
|
|||
/* ANSI-C code produced by gperf version 2.7.2 */
|
||||
/* Command-line: gperf -L ANSI-C -C -F ', 0' -p -t -j1 -i 1 -g -o -N java_keyword -k'1,4,$' keyword.gperf */
|
||||
/* Keyword definition for the GNU compiler for the Java(TM) language.
|
||||
Copyright (C) 1997, 1998, 2001, 2002, 2003
|
||||
Free Software Foundation, Inc.
|
||||
Contributed by Alexandre Petit-Bianco (apbianco@cygnus.com)
|
||||
|
||||
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, 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, 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. */
|
||||
|
||||
struct java_keyword { const char *const name; const int token; };
|
||||
#ifdef __GNUC__
|
||||
__inline
|
||||
#endif
|
||||
static unsigned int hash (const char *, unsigned int);
|
||||
#ifdef __GNUC__
|
||||
__inline
|
||||
#endif
|
||||
const struct java_keyword *java_keyword (const char *, unsigned int);
|
||||
|
||||
#define TOTAL_KEYWORDS 52
|
||||
#define MIN_WORD_LENGTH 2
|
||||
#define MAX_WORD_LENGTH 12
|
||||
#define MIN_HASH_VALUE 7
|
||||
#define MAX_HASH_VALUE 85
|
||||
/* maximum key range = 79, duplicates = 0 */
|
||||
|
||||
#ifdef __GNUC__
|
||||
__inline
|
||||
#else
|
||||
#ifdef __cplusplus
|
||||
inline
|
||||
#endif
|
||||
#endif
|
||||
static unsigned int
|
||||
hash (const char *str, unsigned int len)
|
||||
{
|
||||
static const unsigned char asso_values[] =
|
||||
{
|
||||
86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
|
||||
86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
|
||||
86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
|
||||
86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
|
||||
86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
|
||||
86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
|
||||
86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
|
||||
86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
|
||||
86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
|
||||
86, 86, 86, 86, 86, 86, 86, 1, 34, 3,
|
||||
1, 1, 18, 7, 21, 28, 86, 14, 1, 86,
|
||||
18, 20, 37, 86, 15, 6, 2, 5, 40, 36,
|
||||
86, 36, 86, 86, 86, 86, 86, 86, 86, 86,
|
||||
86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
|
||||
86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
|
||||
86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
|
||||
86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
|
||||
86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
|
||||
86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
|
||||
86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
|
||||
86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
|
||||
86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
|
||||
86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
|
||||
86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
|
||||
86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
|
||||
86, 86, 86, 86, 86, 86
|
||||
};
|
||||
int hval = len;
|
||||
|
||||
switch (hval)
|
||||
{
|
||||
default:
|
||||
case 4:
|
||||
hval += asso_values[(unsigned char)str[3]];
|
||||
case 3:
|
||||
case 2:
|
||||
case 1:
|
||||
hval += asso_values[(unsigned char)str[0]];
|
||||
break;
|
||||
}
|
||||
return hval + asso_values[(unsigned char)str[len - 1]];
|
||||
}
|
||||
|
||||
#ifdef __GNUC__
|
||||
__inline
|
||||
#endif
|
||||
const struct java_keyword *
|
||||
java_keyword (const char *str, unsigned int len)
|
||||
{
|
||||
static const struct java_keyword wordlist[] =
|
||||
{
|
||||
{"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0},
|
||||
{"", 0},
|
||||
{"else", ELSE_TK},
|
||||
{"true", TRUE_TK},
|
||||
{"case", CASE_TK},
|
||||
{"assert", ASSERT_TK},
|
||||
{"default", DEFAULT_TK},
|
||||
{"", 0},
|
||||
{"abstract", ABSTRACT_TK},
|
||||
{"continue", CONTINUE_TK},
|
||||
{"extends", EXTENDS_TK},
|
||||
{"const", CONST_TK},
|
||||
{"static", STATIC_TK},
|
||||
{"this", THIS_TK},
|
||||
{"long", LONG_TK},
|
||||
{"class", CLASS_TK},
|
||||
{"", 0},
|
||||
{"synchronized", SYNCHRONIZED_TK},
|
||||
{"do", DO_TK},
|
||||
{"null", NULL_TK},
|
||||
{"final", FINAL_TK},
|
||||
{"float", FLOAT_TK},
|
||||
{"super", SUPER_TK},
|
||||
{"short", SHORT_TK},
|
||||
{"", 0},
|
||||
{"false", FALSE_TK},
|
||||
{"transient", TRANSIENT_TK},
|
||||
{"catch", CATCH_TK},
|
||||
{"int", INT_TK},
|
||||
{"throws", THROWS_TK},
|
||||
{"switch", SWITCH_TK},
|
||||
{"for", FOR_TK},
|
||||
{"char", CHAR_TK},
|
||||
{"", 0},
|
||||
{"interface", INTERFACE_TK},
|
||||
{"byte", BYTE_TK},
|
||||
{"try", TRY_TK},
|
||||
{"double", DOUBLE_TK},
|
||||
{"while", WHILE_TK},
|
||||
{"return", RETURN_TK},
|
||||
{"implements", IMPLEMENTS_TK},
|
||||
{"void", VOID_TK},
|
||||
{"public", PUBLIC_TK},
|
||||
{"if", IF_TK},
|
||||
{"protected", PROTECTED_TK},
|
||||
{"volatile", VOLATILE_TK},
|
||||
{"goto", GOTO_TK},
|
||||
{"", 0},
|
||||
{"native", NATIVE_TK},
|
||||
{"break", BREAK_TK},
|
||||
{"", 0},
|
||||
{"import", IMPORT_TK},
|
||||
{"new", NEW_TK},
|
||||
{"instanceof", INSTANCEOF_TK},
|
||||
{"package", PACKAGE_TK},
|
||||
{"boolean", BOOLEAN_TK},
|
||||
{"", 0},
|
||||
{"finally", FINALLY_TK},
|
||||
{"throw", THROW_TK},
|
||||
{"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0},
|
||||
{"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0},
|
||||
{"", 0}, {"", 0}, {"", 0},
|
||||
{"strictfp", STRICT_TK},
|
||||
{"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0},
|
||||
{"private", PRIVATE_TK}
|
||||
};
|
||||
|
||||
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
|
||||
{
|
||||
int key = hash (str, len);
|
||||
|
||||
if (key <= MAX_HASH_VALUE && key >= 0)
|
||||
{
|
||||
const char *s = wordlist[key].name;
|
||||
|
||||
if (*str == *s && !strcmp (str + 1, s + 1))
|
||||
return &wordlist[key];
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
/* Definitions for specs for the GNU compiler for the Java(TM) language.
|
||||
Copyright (C) 1996, 1998, 1999, 2000, 2001, 2003, 2004
|
||||
Copyright (C) 1996, 1998, 1999, 2000, 2001, 2003, 2004, 2006
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
@ -35,7 +35,30 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
|
|||
%{fjni:%{femit-class-file:%e-fjni and -femit-class-file are incompatible}}\
|
||||
%{femit-class-file:%{!fsyntax-only:%e-femit-class-file should used along with -fsyntax-only}}\
|
||||
%{femit-class-files:%{!fsyntax-only:%e-femit-class-file should used along with -fsyntax-only}}\
|
||||
%{!E:jc1 %i %(jc1) %(cc1_options) %{+e*} %{I*}\
|
||||
%{MD:-MD_} %{MMD:-MMD_} %{M} %{MM} %{MA} %{MT*} %{MF*}\
|
||||
%{!fsyntax-only:%(invoke_as)}}", 0, 0, 0},
|
||||
%{E:%{e-E is not valid for gcj}}\
|
||||
%{.java|fsaw-java-file:ecj1 %i %{W*} %{w} %{g*} \
|
||||
%{fbootclasspath*} \
|
||||
%{fenable-assertions*} \
|
||||
%{fdisable-assertions*} \
|
||||
%{fencoding*} %{ffilelist-file} \
|
||||
%{foutput-class-dir*} %{g*} \
|
||||
%{fsource*} %{!fsource*:-fsource=1.5} \
|
||||
%{ftarget*} %{!femit-class-files|!ftarget*:-ftarget=1.5} \
|
||||
%{!findirect-dispatch:-fzip-dependency %U.zip} \
|
||||
%{!fsyntax-only:-fzip-target %U.jar}}\n \
|
||||
%{.class|.zip|.jar|!fsyntax-only:jc1 \
|
||||
%{.java|fsaw-java-file:%U.jar -fsource-filename=%i %<ffilelist-file} \
|
||||
%{.class|.zip|.jar|ffilelist-file|fcompile-resource*:%i} \
|
||||
%(jc1) %(cc1_options) %{I*} %{!findirect-dispatch:-faux-classpath %U.zip} \
|
||||
%{MD:-MD_} %{MMD:-MMD_} %{M} %{MM} %{MA} %{MT*} %{MF*}\
|
||||
%(invoke_as)}",
|
||||
0, 0, 0},
|
||||
|
||||
/*
|
||||
FIXME: we don't use %|, even though we could, because we need the
|
||||
dependency zip to be ready early enough. We could work around
|
||||
this by not having a dependency zip and instead teaching jc1 to
|
||||
read a special manifest file included in the sole zip, this
|
||||
manifest would say which files are to be compiled and which are
|
||||
not.
|
||||
*/
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* Java(TM) language-specific utility routines.
|
||||
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||||
Free Software Foundation, Inc.
|
||||
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||
2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
|
@ -120,16 +120,11 @@ const struct attribute_spec java_attribute_table[] =
|
|||
prototypes. Starts out false. */
|
||||
static bool inhibit_error_function_printing;
|
||||
|
||||
int compiling_from_source;
|
||||
|
||||
const char *resource_name;
|
||||
|
||||
/* When nonzero, -Wall was turned on. */
|
||||
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;
|
||||
|
||||
|
@ -313,6 +308,7 @@ java_handle_option (size_t scode, const char *arg, int value)
|
|||
jcf_path_bootclasspath_arg (arg);
|
||||
break;
|
||||
|
||||
case OPT_faux_classpath:
|
||||
case OPT_fclasspath_:
|
||||
case OPT_fCLASSPATH_:
|
||||
jcf_path_classpath_arg (arg);
|
||||
|
@ -328,7 +324,7 @@ java_handle_option (size_t scode, const char *arg, int value)
|
|||
break;
|
||||
|
||||
case OPT_fencoding_:
|
||||
current_encoding = arg;
|
||||
/* Nothing. */
|
||||
break;
|
||||
|
||||
case OPT_fextdirs_:
|
||||
|
@ -336,13 +332,17 @@ java_handle_option (size_t scode, const char *arg, int value)
|
|||
break;
|
||||
|
||||
case OPT_foutput_class_dir_:
|
||||
jcf_write_base_directory = arg;
|
||||
/* FIXME: remove; this is handled by ecj1 now. */
|
||||
break;
|
||||
|
||||
case OPT_version:
|
||||
v_flag = 1;
|
||||
break;
|
||||
|
||||
case OPT_fsource_filename_:
|
||||
java_read_sourcefilenames (arg);
|
||||
break;
|
||||
|
||||
default:
|
||||
if (cl_options[code].flags & CL_Java)
|
||||
break;
|
||||
|
@ -994,7 +994,8 @@ java_dump_tree (void *dump_info, tree t)
|
|||
static bool
|
||||
java_decl_ok_for_sibcall (tree decl)
|
||||
{
|
||||
return decl != NULL && DECL_CONTEXT (decl) == output_class;
|
||||
return (decl != NULL && DECL_CONTEXT (decl) == output_class
|
||||
&& DECL_INLINE (decl));
|
||||
}
|
||||
|
||||
/* Given a call_expr, try to figure out what its target might be. In
|
||||
|
|
|
@ -81,6 +81,9 @@ fCLASSPATH=
|
|||
Java JoinedOrMissing RejectNegative
|
||||
--CLASSPATH Deprecated; use --classpath instead
|
||||
|
||||
faux-classpath
|
||||
Java Separate RejectNegative Undocumented
|
||||
|
||||
fassert
|
||||
Java Var(flag_assert) Init(1)
|
||||
Permit the use of the assert keyword
|
||||
|
@ -134,10 +137,16 @@ fextdirs=
|
|||
Java Joined RejectNegative
|
||||
--extdirs=<path> Set the extension directory path
|
||||
|
||||
fsource-filename=
|
||||
Java Joined Undocumented
|
||||
|
||||
ffilelist-file
|
||||
Java Var(flag_filelist_file)
|
||||
Input file is a file with a list of filenames to compile
|
||||
|
||||
fsaw-java-file
|
||||
Java Undocumented RejectNegative
|
||||
|
||||
fforce-classes-archive-check
|
||||
Java Var(flag_force_classes_archive_check)
|
||||
Always check for non gcj generated classes archives
|
||||
|
@ -188,5 +197,175 @@ fbootstrap-classes
|
|||
Java Var(flag_bootstrap_classes)
|
||||
Generated should be loaded by bootstrap loader
|
||||
|
||||
fsource=
|
||||
Java Joined
|
||||
Set the source language version
|
||||
|
||||
ftarget=
|
||||
Java Joined
|
||||
Set the target VM version
|
||||
|
||||
version
|
||||
Java
|
||||
|
||||
;
|
||||
; Warnings handled by ecj.
|
||||
; FIXME: document them
|
||||
;
|
||||
|
||||
Wconstructor-name
|
||||
Java
|
||||
|
||||
Wpkg-default-method
|
||||
Java
|
||||
|
||||
Wmasked-catch-block
|
||||
Java
|
||||
|
||||
Wall-deprecation
|
||||
Java
|
||||
|
||||
Wunused-local
|
||||
Java
|
||||
|
||||
Wunused-argument
|
||||
Java
|
||||
|
||||
Wunused-import
|
||||
Java
|
||||
|
||||
Wunused-private
|
||||
Java
|
||||
|
||||
Wunused-label
|
||||
Java
|
||||
|
||||
Wlocal-hiding
|
||||
Java
|
||||
|
||||
Wfield-hiding
|
||||
Java
|
||||
|
||||
Wspecial-param-hiding
|
||||
Java
|
||||
|
||||
Wcondition-assign
|
||||
Java
|
||||
|
||||
Wsynthetic-access
|
||||
Java
|
||||
|
||||
Wnls
|
||||
Java
|
||||
|
||||
Wstatic-receiver
|
||||
Java
|
||||
|
||||
Windirect-static
|
||||
Java
|
||||
|
||||
Wno-effect-assign
|
||||
Java
|
||||
|
||||
Wintf-non-inherited
|
||||
Java
|
||||
|
||||
Wchar-concat
|
||||
Java
|
||||
|
||||
Wserial
|
||||
Java
|
||||
|
||||
Wempty-block
|
||||
Java
|
||||
|
||||
Wuseless-type-check
|
||||
Java
|
||||
|
||||
Wuncheck
|
||||
Java
|
||||
|
||||
Wraw
|
||||
Java
|
||||
|
||||
Wfinal-bound
|
||||
Java
|
||||
|
||||
Wsuppress
|
||||
Java
|
||||
|
||||
Wwarning-token
|
||||
Java
|
||||
|
||||
Wunnecessary-else
|
||||
Java
|
||||
|
||||
Wjavadoc
|
||||
Java
|
||||
|
||||
Wall-javadoc
|
||||
Java
|
||||
|
||||
Wtasks
|
||||
Java
|
||||
|
||||
Wassert-identifier
|
||||
Java
|
||||
|
||||
Wenum-identifier
|
||||
Java
|
||||
|
||||
Wfinally
|
||||
Java
|
||||
|
||||
Wunused-thrown
|
||||
Java
|
||||
|
||||
Wunqualified-field
|
||||
Java
|
||||
|
||||
Wtype-hiding
|
||||
Java
|
||||
|
||||
Wvarargs-cast
|
||||
Java
|
||||
|
||||
Wnull
|
||||
Java
|
||||
|
||||
Wboxing
|
||||
Java
|
||||
|
||||
Wover-ann
|
||||
Java
|
||||
|
||||
Wdep-ann
|
||||
Java
|
||||
|
||||
Wintf-annotation
|
||||
Java
|
||||
|
||||
Wenum-switch
|
||||
Java
|
||||
|
||||
Whiding
|
||||
Java
|
||||
|
||||
Wstatic-access
|
||||
Java
|
||||
|
||||
Wunused
|
||||
Java
|
||||
|
||||
Wparam-assign
|
||||
Java
|
||||
|
||||
Wdiscouraged
|
||||
Java
|
||||
|
||||
Wforbidden
|
||||
Java
|
||||
|
||||
Wfallthrough
|
||||
Java
|
||||
|
||||
|
|
2073
gcc/java/lex.c
2073
gcc/java/lex.c
File diff suppressed because it is too large
Load diff
247
gcc/java/lex.h
247
gcc/java/lex.h
|
@ -1,247 +0,0 @@
|
|||
/* Language lexer definitions for the GNU compiler for the Java(TM) language.
|
||||
Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
|
||||
Free Software Foundation, Inc.
|
||||
Contributed by Alexandre Petit-Bianco (apbianco@cygnus.com)
|
||||
|
||||
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, 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, 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. */
|
||||
|
||||
#ifndef GCC_JAVA_LEX_H
|
||||
#define GCC_JAVA_LEX_H
|
||||
|
||||
#include "input.h"
|
||||
|
||||
/* Extern global variables declarations */
|
||||
extern FILE *finput;
|
||||
|
||||
/* A Unicode character, as read from the input file */
|
||||
typedef unsigned short unicode_t;
|
||||
|
||||
#ifndef HAVE_ICONV_H
|
||||
#undef HAVE_ICONV
|
||||
#endif
|
||||
|
||||
#if defined HAVE_ICONV
|
||||
#include <iconv.h>
|
||||
#endif /* HAVE_ICONV */
|
||||
|
||||
/* Default encoding to use if no encoding is specified. */
|
||||
#define DEFAULT_ENCODING "UTF-8"
|
||||
|
||||
typedef struct java_lc_s GTY(()) {
|
||||
int line; /* line number (1-based) */
|
||||
int col; /* column number number (1-based) */
|
||||
} java_lc;
|
||||
|
||||
struct java_lexer
|
||||
{
|
||||
/* The file from which we're reading. */
|
||||
FILE *finput;
|
||||
|
||||
/* Number of consecutive backslashes we've read. */
|
||||
int bs_count;
|
||||
|
||||
/* Next available Unicode character.
|
||||
* This is post-Unicode-escape-processing. -1 if EOF. */
|
||||
int next_unicode;
|
||||
|
||||
/* True if next_unicode is next available character, or EOF. */
|
||||
bool avail_unicode;
|
||||
|
||||
/* Number of source columns of the previous Unicode character (next_unicode).
|
||||
If next_unicode==-2, then this is the number of columns of the previous
|
||||
Unicode character (most recent result of java_{get,peek}_unicode). */
|
||||
int next_columns;
|
||||
|
||||
/* If nonzero, a value that was pushed back. This is a unicode character,
|
||||
but (unlike next_unicode) is pre-'\uXXXX'-processing. It is also used
|
||||
when a '\r' is *not* followed by a '\n'. */
|
||||
unicode_t unget_value;
|
||||
|
||||
/* Name of the character encoding we're using. */
|
||||
const char *encoding;
|
||||
|
||||
/* Current source position. */
|
||||
java_lc position;
|
||||
|
||||
#ifndef USE_MAPPED_LOCATION
|
||||
java_lc token_start; /* Error's line column info */
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ICONV
|
||||
/* Nonzero if we've read any bytes. We only recognize the
|
||||
byte-order-marker (BOM) as the first word. */
|
||||
unsigned int read_anything : 1;
|
||||
|
||||
/* Nonzero if we have to byte swap. */
|
||||
unsigned int byte_swap : 1;
|
||||
|
||||
/* Nonzero if we're using the fallback decoder. */
|
||||
unsigned int use_fallback : 1;
|
||||
|
||||
/* The handle for the iconv converter we're using. */
|
||||
iconv_t handle;
|
||||
|
||||
/* Bytes we've read from the file but have not sent to iconv. */
|
||||
char buffer[1024];
|
||||
|
||||
/* Index of first valid character in buffer, -1 if no valid
|
||||
characters. */
|
||||
int first;
|
||||
|
||||
/* Index of last valid character in buffer, plus one. -1 if no
|
||||
valid characters in buffer. */
|
||||
int last;
|
||||
|
||||
/* This is a buffer of characters already converted by iconv. We
|
||||
use `char' here because we're assuming that iconv() converts to
|
||||
UCS-2, and then we convert it ourselves. */
|
||||
unsigned char out_buffer[1024];
|
||||
|
||||
/* Index of first valid output character. -1 if no valid
|
||||
characters. */
|
||||
int out_first;
|
||||
|
||||
/* Index of last valid output character, plus one. -1 if no valid
|
||||
characters. */
|
||||
int out_last;
|
||||
|
||||
#endif /* HAVE_ICONV */
|
||||
};
|
||||
typedef struct java_lexer java_lexer;
|
||||
|
||||
/* Destroy a lexer object. */
|
||||
extern void java_destroy_lexer (java_lexer *);
|
||||
|
||||
#define JAVA_LINE_MAX 80
|
||||
|
||||
/* Build a location compound integer */
|
||||
#ifdef USE_MAPPED_LOCATION
|
||||
#define BUILD_LOCATION() input_location
|
||||
#else
|
||||
#define BUILD_LOCATION() ((ctxp->lexer->token_start.line << 12) \
|
||||
| (ctxp->lexer->token_start.col & 0xfff))
|
||||
#endif
|
||||
|
||||
/* Those macros are defined differently if we compile jc1-lite
|
||||
(JC1_LITE defined) or jc1. */
|
||||
#ifdef JC1_LITE
|
||||
|
||||
#define DCONST0 0
|
||||
#define REAL_VALUE_TYPE int
|
||||
#define GET_IDENTIFIER(S) xstrdup ((S))
|
||||
#define REAL_VALUE_ATOF(LIT,MODE) 0
|
||||
#define REAL_VALUE_ISINF(VALUE) 0
|
||||
#define REAL_VALUE_ISNAN(VALUE) 0
|
||||
#define SET_REAL_VALUE_ATOF(TARGET,SOURCE)
|
||||
#define FLOAT_TYPE_NODE 0
|
||||
#define DOUBLE_TYPE_NODE 0
|
||||
#define SET_MODIFIER_CTX(TOKEN) java_lval->value = (TOKEN)
|
||||
#define GET_TYPE_PRECISION(NODE) 4
|
||||
#define BUILD_OPERATOR(TOKEN) return TOKEN
|
||||
#define BUILD_OPERATOR2(TOKEN) return ASSIGN_ANY_TK
|
||||
#define SET_LVAL_NODE(NODE)
|
||||
#define BUILD_ID_WFL(EXP) (EXP)
|
||||
#define JAVA_FLOAT_RANGE_ERROR(S) {}
|
||||
#define JAVA_RANGE_ERROR(S) do { } while (0)
|
||||
|
||||
#else
|
||||
|
||||
#define DCONST0 dconst0
|
||||
#define GET_IDENTIFIER(S) get_identifier ((S))
|
||||
#define SET_REAL_VALUE_ATOF(TARGET,SOURCE) (TARGET) = (SOURCE)
|
||||
#define FLOAT_TYPE_NODE float_type_node
|
||||
#define DOUBLE_TYPE_NODE double_type_node
|
||||
/* Set modifier_ctx according to TOKEN */
|
||||
#define SET_MODIFIER_CTX(TOKEN) \
|
||||
{ \
|
||||
ctxp->modifier_ctx [(TOKEN)-PUBLIC_TK] = build_wfl_node (NULL_TREE); \
|
||||
java_lval->value = (TOKEN)-PUBLIC_TK; \
|
||||
}
|
||||
/* Type precision for long */
|
||||
#define GET_TYPE_PRECISION(NODE) TYPE_PRECISION (long_type_node) / 8;
|
||||
/* Build an operator tree node and return TOKEN */
|
||||
#define BUILD_OPERATOR(TOKEN) \
|
||||
{ \
|
||||
java_lval->operator.token = (TOKEN); \
|
||||
java_lval->operator.location = BUILD_LOCATION(); \
|
||||
return (TOKEN); \
|
||||
}
|
||||
|
||||
/* Build an operator tree node but return ASSIGN_ANY_TK */
|
||||
#define BUILD_OPERATOR2(TOKEN) \
|
||||
{ \
|
||||
java_lval->operator.token = (TOKEN); \
|
||||
java_lval->operator.location = BUILD_LOCATION(); \
|
||||
return ASSIGN_ANY_TK; \
|
||||
}
|
||||
/* Set java_lval->node and TREE_TYPE(java_lval->node) in macros */
|
||||
#define SET_LVAL_NODE(NODE) java_lval->node = (NODE)
|
||||
/* Wrap identifier around a wfl */
|
||||
#define BUILD_ID_WFL(EXP) build_wfl_node ((EXP))
|
||||
/* Special ways to report error on numeric literals */
|
||||
#define JAVA_FLOAT_RANGE_ERROR(m) \
|
||||
{ \
|
||||
char *msg = XNEWVEC (char, 100 + strlen (m)); \
|
||||
sprintf (msg, "Floating point literal exceeds range of `%s'", (m)); \
|
||||
JAVA_RANGE_ERROR(msg); \
|
||||
free (msg); \
|
||||
}
|
||||
#define JAVA_RANGE_ERROR(msg) \
|
||||
do { \
|
||||
int save_col = ctxp->lexer->position.col; \
|
||||
ctxp->lexer->position.col = number_beginning; \
|
||||
java_lex_error (msg, 0); \
|
||||
ctxp->lexer->position.col = save_col; \
|
||||
} while (0)
|
||||
|
||||
#endif /* Definitions for jc1 compilation only */
|
||||
|
||||
/* Macros to decode character ranges */
|
||||
#define RANGE(c, l, h) (((c) >= l && (c) <= h))
|
||||
#define JAVA_WHITE_SPACE_P(c) (c == ' ' || c == '\t' || c == '\f')
|
||||
#define JAVA_START_CHAR_P(c) ((c < 128 \
|
||||
&& (ISIDST (c) || c == '$')) \
|
||||
|| (c >= 128 && java_start_char_p (c)))
|
||||
#define JAVA_PART_CHAR_P(c) ((c < 128 \
|
||||
&& (ISIDNUM (c) \
|
||||
|| c == '$' \
|
||||
|| c == 0x0000 \
|
||||
|| RANGE (c, 0x01, 0x08) \
|
||||
|| RANGE (c, 0x0e, 0x1b) \
|
||||
|| c == 0x7f)) \
|
||||
|| (c >= 128 && java_part_char_p (c)))
|
||||
#define JAVA_ASCII_DIGIT(c) ISDIGIT (c)
|
||||
#define JAVA_ASCII_OCTDIGIT(c) RANGE (c, '0', '7')
|
||||
#define JAVA_ASCII_HEXDIGIT(c) ISXDIGIT (c)
|
||||
#define JAVA_ASCII_FPCHAR(c) (RANGE (c, 'd', 'f') || RANGE (c, 'D', 'F') || \
|
||||
c == '.' || JAVA_ASCII_DIGIT (c))
|
||||
#define JAVA_FP_SUFFIX(c) (c == 'D' || c == 'd' || c == 'f' || c == 'F')
|
||||
#define JAVA_FP_EXP(c) (c == 'E' || c == 'F')
|
||||
#define JAVA_FP_PM(c) (c == '-' || c == '+')
|
||||
#define JAVA_ASCII_LETTER(c) ISALPHA (c)
|
||||
|
||||
/* Constants */
|
||||
#define JAVA_READ_BUFFER 256
|
||||
#define JAVA_CHAR_ERROR -2
|
||||
#define UEOF -1
|
||||
|
||||
#endif /* ! GCC_JAVA_LEX_H */
|
|
@ -1,6 +1,6 @@
|
|||
/* Functions related to mangling class names for the GNU compiler
|
||||
for the Java(TM) language.
|
||||
Copyright (C) 1998, 1999, 2001, 2002, 2003
|
||||
Copyright (C) 1998, 1999, 2001, 2002, 2003, 2006, 2007
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
@ -73,6 +73,167 @@ struct obstack *mangle_obstack;
|
|||
/* atms: array template mangled string. */
|
||||
static GTY(()) tree atms;
|
||||
|
||||
static int
|
||||
utf8_cmp (const unsigned char *str, int length, const char *name)
|
||||
{
|
||||
const unsigned char *limit = str + length;
|
||||
int i;
|
||||
|
||||
for (i = 0; name[i]; ++i)
|
||||
{
|
||||
int ch = UTF8_GET (str, limit);
|
||||
if (ch != name[i])
|
||||
return ch - name[i];
|
||||
}
|
||||
|
||||
return str == limit ? 0 : 1;
|
||||
}
|
||||
|
||||
/* A sorted list of all C++ keywords. */
|
||||
static const char *const cxx_keywords[] =
|
||||
{
|
||||
"_Complex",
|
||||
"__alignof",
|
||||
"__alignof__",
|
||||
"__asm",
|
||||
"__asm__",
|
||||
"__attribute",
|
||||
"__attribute__",
|
||||
"__builtin_va_arg",
|
||||
"__complex",
|
||||
"__complex__",
|
||||
"__const",
|
||||
"__const__",
|
||||
"__extension__",
|
||||
"__imag",
|
||||
"__imag__",
|
||||
"__inline",
|
||||
"__inline__",
|
||||
"__label__",
|
||||
"__null",
|
||||
"__real",
|
||||
"__real__",
|
||||
"__restrict",
|
||||
"__restrict__",
|
||||
"__signed",
|
||||
"__signed__",
|
||||
"__typeof",
|
||||
"__typeof__",
|
||||
"__volatile",
|
||||
"__volatile__",
|
||||
"and",
|
||||
"and_eq",
|
||||
"asm",
|
||||
"auto",
|
||||
"bitand",
|
||||
"bitor",
|
||||
"bool",
|
||||
"break",
|
||||
"case",
|
||||
"catch",
|
||||
"char",
|
||||
"class",
|
||||
"compl",
|
||||
"const",
|
||||
"const_cast",
|
||||
"continue",
|
||||
"default",
|
||||
"delete",
|
||||
"do",
|
||||
"double",
|
||||
"dynamic_cast",
|
||||
"else",
|
||||
"enum",
|
||||
"explicit",
|
||||
"export",
|
||||
"extern",
|
||||
"false",
|
||||
"float",
|
||||
"for",
|
||||
"friend",
|
||||
"goto",
|
||||
"if",
|
||||
"inline",
|
||||
"int",
|
||||
"long",
|
||||
"mutable",
|
||||
"namespace",
|
||||
"new",
|
||||
"not",
|
||||
"not_eq",
|
||||
"operator",
|
||||
"or",
|
||||
"or_eq",
|
||||
"private",
|
||||
"protected",
|
||||
"public",
|
||||
"register",
|
||||
"reinterpret_cast",
|
||||
"return",
|
||||
"short",
|
||||
"signed",
|
||||
"sizeof",
|
||||
"static",
|
||||
"static_cast",
|
||||
"struct",
|
||||
"switch",
|
||||
"template",
|
||||
"this",
|
||||
"throw",
|
||||
"true",
|
||||
"try",
|
||||
"typedef",
|
||||
"typeid",
|
||||
"typename",
|
||||
"typeof",
|
||||
"union",
|
||||
"unsigned",
|
||||
"using",
|
||||
"virtual",
|
||||
"void",
|
||||
"volatile",
|
||||
"wchar_t",
|
||||
"while",
|
||||
"xor",
|
||||
"xor_eq"
|
||||
};
|
||||
|
||||
/* Return true if NAME is a C++ keyword. */
|
||||
static int
|
||||
cxx_keyword_p (const char *name, int length)
|
||||
{
|
||||
int last = ARRAY_SIZE (cxx_keywords);
|
||||
int first = 0;
|
||||
int mid = (last + first) / 2;
|
||||
int old = -1;
|
||||
|
||||
for (mid = (last + first) / 2;
|
||||
mid != old;
|
||||
old = mid, mid = (last + first) / 2)
|
||||
{
|
||||
int kwl = strlen (cxx_keywords[mid]);
|
||||
int min_length = kwl > length ? length : kwl;
|
||||
int r = utf8_cmp ((const unsigned char *) name, min_length, cxx_keywords[mid]);
|
||||
|
||||
if (r == 0)
|
||||
{
|
||||
int i;
|
||||
/* We've found a match if all the remaining characters are `$'. */
|
||||
for (i = min_length; i < length && name[i] == '$'; ++i)
|
||||
;
|
||||
if (i == length)
|
||||
return 1;
|
||||
r = 1;
|
||||
}
|
||||
|
||||
if (r < 0)
|
||||
last = mid;
|
||||
else
|
||||
first = mid;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* This is the mangling interface: a decl, a class field (.class) and
|
||||
the vtable. */
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
899
gcc/java/parse.h
899
gcc/java/parse.h
|
@ -1,6 +1,6 @@
|
|||
/* Language parser definitions for the GNU compiler for the Java(TM) language.
|
||||
Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||||
Free Software Foundation, Inc.
|
||||
Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||
2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
Contributed by Alexandre Petit-Bianco (apbianco@cygnus.com)
|
||||
|
||||
This file is part of GCC.
|
||||
|
@ -27,26 +27,10 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
|
|||
#ifndef GCC_JAVA_PARSE_H
|
||||
#define GCC_JAVA_PARSE_H
|
||||
|
||||
#include "lex.h"
|
||||
|
||||
/* Extern global variable declarations */
|
||||
extern int java_error_count;
|
||||
extern struct obstack temporary_obstack;
|
||||
extern int quiet_flag;
|
||||
|
||||
#ifndef JC1_LITE
|
||||
/* Function extern to java/ */
|
||||
extern int int_fits_type_p (tree, tree);
|
||||
extern tree stabilize_reference (tree);
|
||||
#endif
|
||||
|
||||
/* Macros for verbose debug info */
|
||||
#ifdef VERBOSE_SKELETON
|
||||
#define RULE( rule ) printf ( "jv_yacc:%d: rule %s\n", lineno, rule )
|
||||
#else
|
||||
#define RULE( rule )
|
||||
#endif
|
||||
|
||||
#ifdef VERBOSE_SKELETON
|
||||
#undef SOURCE_FRONTEND_DEBUG
|
||||
#define SOURCE_FRONTEND_DEBUG(X) \
|
||||
|
@ -55,144 +39,6 @@ extern tree stabilize_reference (tree);
|
|||
#define SOURCE_FRONTEND_DEBUG(X)
|
||||
#endif
|
||||
|
||||
/* Macro for error recovering */
|
||||
#ifdef YYDEBUG
|
||||
#define RECOVERED \
|
||||
{ if (!quiet_flag) {printf ("** Recovered\n");} }
|
||||
#define DRECOVERED(s) \
|
||||
{ if (!quiet_flag) {printf ("** Recovered (%s)\n", #s);}}
|
||||
#else
|
||||
#define RECOVERED
|
||||
#define DRECOVERED(s)
|
||||
#endif
|
||||
|
||||
#define DRECOVER(s) {yyerrok; DRECOVERED(s);}
|
||||
#define RECOVER {yyerrok; RECOVERED;}
|
||||
|
||||
#define YYERROR_NOW ctxp->java_error_flag = 1
|
||||
#define YYNOT_TWICE if (ctxp->prevent_ese != input_line)
|
||||
|
||||
/* Accepted modifiers */
|
||||
#define CLASS_MODIFIERS ACC_PUBLIC|ACC_ABSTRACT|ACC_FINAL|ACC_STRICT
|
||||
#define FIELD_MODIFIERS ACC_PUBLIC|ACC_PROTECTED|ACC_PRIVATE|ACC_FINAL| \
|
||||
ACC_STATIC|ACC_TRANSIENT|ACC_VOLATILE
|
||||
#define METHOD_MODIFIERS ACC_PUBLIC|ACC_PROTECTED|ACC_PRIVATE|ACC_ABSTRACT| \
|
||||
ACC_STATIC|ACC_FINAL|ACC_SYNCHRONIZED|ACC_NATIVE| \
|
||||
ACC_STRICT
|
||||
#define INTERFACE_MODIFIERS ACC_PUBLIC|ACC_ABSTRACT|ACC_STRICT
|
||||
#define INTERFACE_INNER_MODIFIERS ACC_PUBLIC|ACC_PROTECTED|ACC_ABSTRACT| \
|
||||
ACC_STATIC|ACC_PRIVATE
|
||||
#define INTERFACE_METHOD_MODIFIERS ACC_PUBLIC|ACC_ABSTRACT
|
||||
#define INTERFACE_FIELD_MODIFIERS ACC_PUBLIC|ACC_STATIC|ACC_FINAL
|
||||
|
||||
/* Getting a modifier WFL */
|
||||
#define MODIFIER_WFL(M) (ctxp->modifier_ctx [(M) - PUBLIC_TK])
|
||||
|
||||
/* Check on modifiers */
|
||||
#ifdef USE_MAPPED_LOCATION
|
||||
#define THIS_MODIFIER_ONLY(f, m, v, count, l) \
|
||||
if ((f) & (m)) \
|
||||
{ \
|
||||
tree node = MODIFIER_WFL (v); \
|
||||
if (!l) \
|
||||
l = node; \
|
||||
else \
|
||||
{ \
|
||||
expanded_location lloc = expand_location (EXPR_LOCATION (l)); \
|
||||
expanded_location nloc = expand_location (EXPR_LOCATION (node)); \
|
||||
if (nloc.column > lloc.column || nloc.line > lloc.line) \
|
||||
l = node; \
|
||||
} \
|
||||
count++; \
|
||||
}
|
||||
#else
|
||||
#define THIS_MODIFIER_ONLY(f, m, v, count, l) \
|
||||
if ((f) & (m)) \
|
||||
{ \
|
||||
tree node = MODIFIER_WFL (v); \
|
||||
if ((l) \
|
||||
&& ((EXPR_WFL_COLNO (node) > EXPR_WFL_COLNO (l)) \
|
||||
|| (EXPR_WFL_LINENO (node) > EXPR_WFL_LINENO (l)))) \
|
||||
l = node; \
|
||||
else if (!(l)) \
|
||||
l = node; \
|
||||
count++; \
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef ATTRIBUTE_GCC_DIAG
|
||||
extern void parse_error_context (tree cl, const char *gmsgid, ...) ATTRIBUTE_GCC_DIAG(2,3);
|
||||
#endif
|
||||
|
||||
#define ABSTRACT_CHECK(FLAG, V, CL, S) \
|
||||
if ((FLAG) & (V)) \
|
||||
parse_error_context ((CL), "%s method can't be abstract", (S));
|
||||
|
||||
#define JCONSTRUCTOR_CHECK(FLAG, V, CL, S) \
|
||||
if ((FLAG) & (V)) \
|
||||
parse_error_context ((CL), "Constructor can't be %s", (S)); \
|
||||
|
||||
/* Misc. */
|
||||
#define exit_java_complete_class() \
|
||||
{ \
|
||||
return; \
|
||||
}
|
||||
|
||||
#define CLASS_OR_INTERFACE(decl, s1, s2) \
|
||||
(decl ? \
|
||||
((get_access_flags_from_decl (TYPE_NAME (TREE_TYPE (decl))) \
|
||||
& ACC_INTERFACE) ? \
|
||||
s2 : s1) : ((s1 [0]=='S'|| s1 [0]=='s') ? \
|
||||
(s1 [0]=='S' ? "Supertype" : "supertype") : \
|
||||
(s1 [0] > 'A' ? "Type" : "type")))
|
||||
|
||||
#define GET_REAL_TYPE(TYPE) \
|
||||
(TREE_CODE (TYPE) == TREE_LIST ? TREE_PURPOSE (TYPE) : TYPE)
|
||||
|
||||
/* Get TYPE name string, regardless whether TYPE is a class or an
|
||||
array. */
|
||||
#define GET_TYPE_NAME(TYPE) \
|
||||
(TREE_CODE (TYPE_NAME (TYPE)) == IDENTIFIER_NODE ? \
|
||||
IDENTIFIER_POINTER (TYPE_NAME (TYPE)) : \
|
||||
IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (TYPE))))
|
||||
|
||||
/* Pedantic warning on obsolete modifiers. Note: when cl is NULL,
|
||||
flags was set artificially, such as for an interface method. */
|
||||
#define OBSOLETE_MODIFIER_WARNING(cl, flags, __modifier, arg) \
|
||||
{ \
|
||||
if (flag_redundant && (cl) && ((flags) & (__modifier))) \
|
||||
parse_warning_context (cl, \
|
||||
"Discouraged redundant use of %qs modifier in declaration of %s", \
|
||||
java_accstring_lookup (__modifier), arg); \
|
||||
}
|
||||
#define OBSOLETE_MODIFIER_WARNING2(cl, flags, __modifier, arg1, arg2) \
|
||||
{ \
|
||||
if (flag_redundant && (cl) && ((flags) & (__modifier))) \
|
||||
parse_warning_context (cl, \
|
||||
"Discouraged redundant use of %qs modifier in declaration of %s %qs", \
|
||||
java_accstring_lookup (__modifier), arg1, arg2);\
|
||||
}
|
||||
|
||||
/* Quickly build a temporary pointer on hypothetical type NAME. */
|
||||
#define BUILD_PTR_FROM_NAME(ptr, name) \
|
||||
do { \
|
||||
ptr = make_node (POINTER_TYPE); \
|
||||
TYPE_NAME (ptr) = name; \
|
||||
} while (0)
|
||||
|
||||
#define INCOMPLETE_TYPE_P(NODE) \
|
||||
((TREE_CODE (NODE) == POINTER_TYPE) \
|
||||
&& !TREE_TYPE (NODE) \
|
||||
&& TREE_CODE (TYPE_NAME (NODE)) == IDENTIFIER_NODE)
|
||||
|
||||
#ifndef USE_MAPPED_LOCATION
|
||||
/* Set the EMIT_LINE_NOTE flag of a EXPR_WLF to 1 if debug information
|
||||
are requested. Works in the context of a parser rule. */
|
||||
#define JAVA_MAYBE_GENERATE_DEBUG_INFO(node) \
|
||||
do {if (debug_info_level != DINFO_LEVEL_NONE) \
|
||||
EXPR_WFL_EMIT_LINE_NOTE (node) = 1; } while (0)
|
||||
#endif
|
||||
|
||||
/* Types classification, according to the JLS, section 4.2 */
|
||||
#define JFLOAT_TYPE_P(TYPE) (TYPE && TREE_CODE ((TYPE)) == REAL_TYPE)
|
||||
#define JINTEGRAL_TYPE_P(TYPE) ((TYPE) \
|
||||
|
@ -204,765 +50,24 @@ extern void parse_error_context (tree cl, const char *gmsgid, ...) ATTRIBUTE_GCC
|
|||
&& (JNUMERIC_TYPE_P ((TYPE)) \
|
||||
|| TREE_CODE ((TYPE)) == BOOLEAN_TYPE))
|
||||
|
||||
#define JBSC_TYPE_P(TYPE) ((TYPE) && (((TYPE) == byte_type_node) \
|
||||
|| ((TYPE) == short_type_node) \
|
||||
|| ((TYPE) == char_type_node)))
|
||||
|
||||
/* Not defined in the LRM */
|
||||
#define JSTRING_TYPE_P(TYPE) ((TYPE) \
|
||||
&& ((TYPE) == string_type_node || \
|
||||
(TREE_CODE (TYPE) == POINTER_TYPE && \
|
||||
TREE_TYPE (TYPE) == string_type_node)))
|
||||
#define JSTRING_P(NODE) ((NODE) \
|
||||
&& (TREE_CODE (NODE) == STRING_CST \
|
||||
|| IS_CRAFTED_STRING_BUFFER_P (NODE) \
|
||||
|| JSTRING_TYPE_P (TREE_TYPE (NODE))))
|
||||
|
||||
#define JREFERENCE_TYPE_P(TYPE) ((TYPE) \
|
||||
&& (TREE_CODE (TYPE) == RECORD_TYPE \
|
||||
|| (TREE_CODE (TYPE) == POINTER_TYPE \
|
||||
&& TREE_CODE (TREE_TYPE (TYPE)) == \
|
||||
RECORD_TYPE)))
|
||||
#define JNULLP_TYPE_P(TYPE) ((TYPE) && (TREE_CODE (TYPE) == POINTER_TYPE) \
|
||||
&& (TYPE) == TREE_TYPE (null_pointer_node))
|
||||
|
||||
/* Other predicates */
|
||||
#define JDECL_P(NODE) (NODE && (TREE_CODE (NODE) == PARM_DECL \
|
||||
|| TREE_CODE (NODE) == VAR_DECL \
|
||||
|| TREE_CODE (NODE) == FIELD_DECL))
|
||||
|
||||
#define TYPE_INTERFACE_P(TYPE) \
|
||||
(CLASS_P (TYPE) && CLASS_INTERFACE (TYPE_NAME (TYPE)))
|
||||
|
||||
#define TYPE_CLASS_P(TYPE) (CLASS_P (TYPE) \
|
||||
&& !CLASS_INTERFACE (TYPE_NAME (TYPE)))
|
||||
|
||||
/* Identifier business related to 1.1 language extensions. */
|
||||
|
||||
#define IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS(NODE) \
|
||||
(TREE_CODE (NODE) == IDENTIFIER_NODE && \
|
||||
IDENTIFIER_LENGTH (NODE) >= 8 && \
|
||||
IDENTIFIER_POINTER (NODE)[7] != '0')
|
||||
|
||||
/* Build the string val$<O> and store it into N. The is used to
|
||||
construct the name of inner class hidden fields used to alias outer
|
||||
scope local variables. */
|
||||
#define MANGLE_OUTER_LOCAL_VARIABLE_NAME(N, O) \
|
||||
{ \
|
||||
char *mangled_name; \
|
||||
obstack_grow (&temporary_obstack, "val$", 4); \
|
||||
obstack_grow (&temporary_obstack, \
|
||||
IDENTIFIER_POINTER ((O)), IDENTIFIER_LENGTH ((O))); \
|
||||
obstack_1grow (&temporary_obstack, '\0'); \
|
||||
mangled_name = obstack_finish (&temporary_obstack); \
|
||||
(N) = get_identifier (mangled_name); \
|
||||
obstack_free (&temporary_obstack, mangled_name); \
|
||||
}
|
||||
|
||||
/* Build the string parm$<O> and store in into the identifier N. This
|
||||
is used to construct the name of hidden parameters used to
|
||||
initialize outer scope aliases. */
|
||||
#define MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID(N, O) \
|
||||
{ \
|
||||
char *mangled_name; \
|
||||
obstack_grow (&temporary_obstack, "parm$", 5); \
|
||||
obstack_grow (&temporary_obstack, \
|
||||
IDENTIFIER_POINTER ((O)), IDENTIFIER_LENGTH ((O))); \
|
||||
obstack_1grow (&temporary_obstack, '\0'); \
|
||||
mangled_name = obstack_finish (&temporary_obstack); \
|
||||
(N) = get_identifier (mangled_name); \
|
||||
obstack_free (&temporary_obstack, mangled_name); \
|
||||
}
|
||||
|
||||
#define MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR(N, S) \
|
||||
{ \
|
||||
char *mangled_name; \
|
||||
obstack_grow (&temporary_obstack, "parm$", 5); \
|
||||
obstack_grow (&temporary_obstack, (S), strlen ((S))); \
|
||||
obstack_1grow (&temporary_obstack, '\0'); \
|
||||
mangled_name = obstack_finish (&temporary_obstack); \
|
||||
(N) = get_identifier (mangled_name); \
|
||||
obstack_free (&temporary_obstack, mangled_name); \
|
||||
}
|
||||
|
||||
/* Skip THIS and artificial parameters found in function decl M and
|
||||
assign the result to C. We don't do that for $finit$, since it's
|
||||
knowingly called with artificial parms. */
|
||||
#define SKIP_THIS_AND_ARTIFICIAL_PARMS(C,M) \
|
||||
{ \
|
||||
int i; \
|
||||
(C) = TYPE_ARG_TYPES (TREE_TYPE ((M))); \
|
||||
if (!METHOD_STATIC ((M))) \
|
||||
(C) = TREE_CHAIN (C); \
|
||||
if (DECL_CONSTRUCTOR_P ((M)) \
|
||||
&& PURE_INNER_CLASS_TYPE_P (DECL_CONTEXT ((M)))) \
|
||||
(C) = TREE_CHAIN (C); \
|
||||
if (!DECL_FINIT_P ((M))) \
|
||||
for (i = DECL_FUNCTION_NAP ((M)); i; i--) \
|
||||
(C) = TREE_CHAIN (C); \
|
||||
}
|
||||
|
||||
/* Mark final parameters in method M, by comparison of the argument
|
||||
list L. This macro is used to set the flag once the method has been
|
||||
build. */
|
||||
#define MARK_FINAL_PARMS(M, L) \
|
||||
{ \
|
||||
tree current = TYPE_ARG_TYPES (TREE_TYPE ((M))); \
|
||||
tree list = (L); \
|
||||
if (!METHOD_STATIC ((M))) \
|
||||
current = TREE_CHAIN (current); \
|
||||
for (; current != end_params_node; \
|
||||
current = TREE_CHAIN (current), list = TREE_CHAIN (list)) \
|
||||
ARG_FINAL_P (current) = ARG_FINAL_P (list); \
|
||||
if (current != list) \
|
||||
abort (); \
|
||||
}
|
||||
|
||||
/* Reset the ARG_FINAL_P that might have been set in method M args. */
|
||||
#define UNMARK_FINAL_PARMS(M) \
|
||||
{ \
|
||||
tree current; \
|
||||
for (current = TYPE_ARG_TYPES (TREE_TYPE ((M))); \
|
||||
current != end_params_node; current = TREE_CHAIN (current)) \
|
||||
ARG_FINAL_P (current) = 0; \
|
||||
}
|
||||
|
||||
/* Reverse a crafted parameter list as required. */
|
||||
#define CRAFTED_PARAM_LIST_FIXUP(P) \
|
||||
{ \
|
||||
if ((P)) \
|
||||
{ \
|
||||
tree last = (P); \
|
||||
(P) = nreverse (P); \
|
||||
TREE_CHAIN (last) = end_params_node; \
|
||||
} \
|
||||
else \
|
||||
(P) = end_params_node; \
|
||||
}
|
||||
|
||||
/* Modes governing the creation of a alias initializer parameter
|
||||
lists. AIPL stands for Alias Initializer Parameter List. */
|
||||
enum {
|
||||
AIPL_FUNCTION_CREATION, /* Suitable for artificial method creation */
|
||||
AIPL_FUNCTION_DECLARATION, /* Suitable for declared methods */
|
||||
AIPL_FUNCTION_CTOR_INVOCATION, /* Invocation of constructors */
|
||||
AIPL_FUNCTION_FINIT_INVOCATION /* Invocation of $finit$ */
|
||||
};
|
||||
|
||||
/* Standard error messages */
|
||||
#define ERROR_CANT_CONVERT_TO_BOOLEAN(OPERATOR, NODE, TYPE) \
|
||||
parse_error_context ((OPERATOR), \
|
||||
"Incompatible type for %qs. Can't convert %qs to boolean", \
|
||||
operator_string ((NODE)), lang_printable_name ((TYPE),0))
|
||||
|
||||
#define ERROR_CANT_CONVERT_TO_NUMERIC(OPERATOR, NODE, TYPE) \
|
||||
parse_error_context ((OPERATOR), \
|
||||
"Incompatible type for %qs. Can't convert %qs to numeric type", \
|
||||
operator_string ((NODE)), lang_printable_name ((TYPE), 0))
|
||||
|
||||
#define ERROR_CAST_NEEDED_TO_INTEGRAL(OPERATOR, NODE, TYPE) \
|
||||
do { \
|
||||
tree _operator = (OPERATOR), _node = (NODE), _type = (TYPE); \
|
||||
if (JPRIMITIVE_TYPE_P (_type)) \
|
||||
parse_error_context (_operator, \
|
||||
"Incompatible type for %qs. Explicit cast needed to convert %qs to integral",\
|
||||
operator_string(_node), \
|
||||
lang_printable_name (_type, 0)); \
|
||||
else \
|
||||
parse_error_context (_operator, \
|
||||
"Incompatible type for %qs. Can't convert %qs to integral", \
|
||||
operator_string(_node), \
|
||||
lang_printable_name (_type, 0)); \
|
||||
} while (0)
|
||||
|
||||
#define ERROR_VARIABLE_NOT_INITIALIZED(WFL, V) \
|
||||
parse_error_context \
|
||||
((WFL), "Variable %qs may not have been initialized", \
|
||||
IDENTIFIER_POINTER (V))
|
||||
|
||||
/* Definition for loop handling. This is Java's own definition of a
|
||||
loop body. See parse.y for documentation. It's valid once you hold
|
||||
a loop's body (LOOP_EXPR_BODY) */
|
||||
|
||||
/* The loop main block is the one hold the condition and the loop body */
|
||||
#define LOOP_EXPR_BODY_MAIN_BLOCK(NODE) TREE_OPERAND (NODE, 0)
|
||||
/* And then there is the loop update block */
|
||||
#define LOOP_EXPR_BODY_UPDATE_BLOCK(NODE) TREE_OPERAND (NODE, 1)
|
||||
|
||||
/* Inside the loop main block, there is the loop condition and the
|
||||
loop body. They may be reversed if the loop being described is a
|
||||
do-while loop. NOTE: if you use a WFL around the EXIT_EXPR so you
|
||||
can issue debug info for it, the EXIT_EXPR will be one operand
|
||||
further. */
|
||||
#define LOOP_EXPR_BODY_CONDITION_EXPR(NODE, R) \
|
||||
TREE_OPERAND (LOOP_EXPR_BODY_MAIN_BLOCK (NODE), (R ? 1 : 0))
|
||||
|
||||
/* Here is the labeled block the loop real body is encapsulated in */
|
||||
#define LOOP_EXPR_BODY_LABELED_BODY(NODE, R) \
|
||||
TREE_OPERAND (LOOP_EXPR_BODY_MAIN_BLOCK (NODE), (R ? 0 : 1))
|
||||
/* And here is the loop's real body */
|
||||
#define LOOP_EXPR_BODY_BODY_EXPR(NODE, R) \
|
||||
LABELED_BLOCK_BODY (LOOP_EXPR_BODY_LABELED_BODY(NODE, R))
|
||||
|
||||
#define PUSH_LABELED_BLOCK(B) \
|
||||
{ \
|
||||
TREE_CHAIN (B) = ctxp->current_labeled_block; \
|
||||
ctxp->current_labeled_block = (B); \
|
||||
}
|
||||
#define POP_LABELED_BLOCK() \
|
||||
ctxp->current_labeled_block = TREE_CHAIN (ctxp->current_labeled_block)
|
||||
|
||||
#define PUSH_LOOP(L) \
|
||||
{ \
|
||||
TREE_CHAIN (L) = ctxp->current_loop; \
|
||||
ctxp->current_loop = (L); \
|
||||
}
|
||||
#define POP_LOOP() ctxp->current_loop = TREE_CHAIN (ctxp->current_loop)
|
||||
|
||||
#define PUSH_EXCEPTIONS(E) \
|
||||
currently_caught_type_list = \
|
||||
tree_cons (NULL_TREE, (E), currently_caught_type_list);
|
||||
|
||||
#define POP_EXCEPTIONS() \
|
||||
currently_caught_type_list = TREE_CHAIN (currently_caught_type_list)
|
||||
|
||||
/* Check that we're inside a try block. */
|
||||
#define IN_TRY_BLOCK_P() \
|
||||
(currently_caught_type_list \
|
||||
&& ((TREE_VALUE (currently_caught_type_list) != \
|
||||
DECL_FUNCTION_THROWS (current_function_decl)) \
|
||||
|| TREE_CHAIN (currently_caught_type_list)))
|
||||
|
||||
/* Check that we have exceptions in E. */
|
||||
#define EXCEPTIONS_P(E) ((E) ? TREE_VALUE (E) : NULL_TREE)
|
||||
|
||||
/* Anonymous array access */
|
||||
#define ANONYMOUS_ARRAY_BASE_TYPE(N) TREE_OPERAND ((N), 0)
|
||||
#define ANONYMOUS_ARRAY_DIMS_SIG(N) TREE_OPERAND ((N), 1)
|
||||
#define ANONYMOUS_ARRAY_INITIALIZER(N) TREE_OPERAND ((N), 2)
|
||||
|
||||
/* Invocation modes, as returned by invocation_mode (). */
|
||||
enum {
|
||||
INVOKE_STATIC,
|
||||
INVOKE_NONVIRTUAL,
|
||||
INVOKE_SUPER,
|
||||
INVOKE_INTERFACE,
|
||||
INVOKE_VIRTUAL
|
||||
};
|
||||
|
||||
/* Unresolved type identifiers handling. When we process the source
|
||||
code, we blindly accept an unknown type identifier and try to
|
||||
resolve it later. When an unknown type identifier is encountered
|
||||
and used, we record in a struct jdep element what the incomplete
|
||||
type is and what it should patch. Later, java_complete_class will
|
||||
process all classes known to have unresolved type
|
||||
dependencies. Within each of these classes, this routine will
|
||||
process unresolved type dependencies (JDEP_TO_RESOLVE), patch what
|
||||
needs to be patched in the dependent tree node (JDEP_GET_PATCH,
|
||||
JDEP_APPLY_PATCH) and perform other actions dictated by the context
|
||||
of the patch (JDEP_KIND). The ideas are: we patch only what needs
|
||||
to be patched, and with java_complete_class called at the right
|
||||
time, we will start processing incomplete function bodies tree
|
||||
nodes with everything external to function's bodies already
|
||||
completed, it makes things much simpler. */
|
||||
|
||||
enum jdep_code {
|
||||
JDEP_NO_PATCH, /* Must be first */
|
||||
JDEP_SUPER, /* Patch the type of one type
|
||||
supertype. Requires some check
|
||||
before it's done */
|
||||
JDEP_FIELD, /* Patch the type of a class field */
|
||||
|
||||
/* JDEP_{METHOD,METHOD_RETURN,METHOD_END} to be kept in order */
|
||||
JDEP_METHOD, /* Mark the beginning of the patching
|
||||
of a method declaration, including
|
||||
it's arguments */
|
||||
JDEP_METHOD_RETURN, /* Mark the beginning of the patching
|
||||
of a method declaration. Arguments
|
||||
aren't patched, only the returned
|
||||
type is */
|
||||
JDEP_METHOD_END, /* Mark the end of the patching of a
|
||||
method declaration. It indicates
|
||||
that it's time to compute and
|
||||
install a new signature */
|
||||
|
||||
JDEP_INTERFACE, /* Patch the type of a Class/interface
|
||||
extension */
|
||||
JDEP_VARIABLE, /* Patch the type of a variable declaration */
|
||||
JDEP_PARM, /* Patch the type of a parm declaration */
|
||||
JDEP_TYPE, /* Patch a random tree node type,
|
||||
without the need for any specific
|
||||
actions */
|
||||
JDEP_EXCEPTION, /* Patch exceptions specified by `throws' */
|
||||
JDEP_ANONYMOUS /* Patch anonymous classes
|
||||
(implementation or extension.) */
|
||||
|
||||
};
|
||||
|
||||
typedef struct _jdep {
|
||||
ENUM_BITFIELD(jdep_code) kind : 8; /* Type of patch */
|
||||
|
||||
unsigned int flag0 : 1; /* Some flags */
|
||||
tree decl; /* Tied decl/or WFL */
|
||||
tree solv; /* What to solve */
|
||||
tree wfl; /* Where thing to resolve where found */
|
||||
tree misc; /* Miscellaneous info (optional). */
|
||||
tree enclosing; /* The enclosing (current) class */
|
||||
tree *patch; /* Address of a location to patch */
|
||||
struct _jdep *next; /* Linked list */
|
||||
} jdep;
|
||||
|
||||
|
||||
#define JDEP_DECL(J) ((J)->decl)
|
||||
#define JDEP_DECL_WFL(J) ((J)->decl)
|
||||
#define JDEP_KIND(J) ((J)->kind)
|
||||
#define JDEP_WFL(J) ((J)->wfl)
|
||||
#define JDEP_MISC(J) ((J)->misc)
|
||||
#define JDEP_ENCLOSING(J) ((J)->enclosing)
|
||||
#define JDEP_CLASS(J) ((J)->class)
|
||||
#define JDEP_APPLY_PATCH(J,P) (*(J)->patch = (P))
|
||||
#define JDEP_GET_PATCH(J) ((J)->patch)
|
||||
#define JDEP_CHAIN(J) ((J)->next)
|
||||
#define JDEP_TO_RESOLVE(J) ((J)->solv)
|
||||
#define JDEP_RESOLVED_DECL(J) ((J)->solv)
|
||||
#define JDEP_RESOLVED(J, D) ((J)->solv = D)
|
||||
#define JDEP_RESOLVED_P(J) \
|
||||
(!(J)->solv || TREE_CODE ((J)->solv) != POINTER_TYPE)
|
||||
|
||||
struct jdeplist_s {
|
||||
jdep *first;
|
||||
jdep *last;
|
||||
struct jdeplist_s *next;
|
||||
};
|
||||
typedef struct jdeplist_s jdeplist;
|
||||
|
||||
#define CLASSD_FIRST(CD) ((CD)->first)
|
||||
#define CLASSD_LAST(CD) ((CD)->last)
|
||||
#define CLASSD_CHAIN(CD) ((CD)->next)
|
||||
|
||||
#define JDEP_INSERT(L,J) \
|
||||
{ \
|
||||
if (!(L)->first) \
|
||||
(L)->last = (L)->first = (J); \
|
||||
else \
|
||||
{ \
|
||||
JDEP_CHAIN ((L)->last) = (J); \
|
||||
(L)->last = (J); \
|
||||
} \
|
||||
}
|
||||
|
||||
/* if TYPE can't be resolved, obtain something suitable for its
|
||||
resolution (TYPE is saved in SAVE before being changed). and set
|
||||
CHAIN to 1. Otherwise, type is set to something usable. CHAIN is
|
||||
usually used to determine that a new DEP must be installed on TYPE.
|
||||
Note that when compiling java.lang.Object, references to Object are
|
||||
java.lang.Object. */
|
||||
#define SET_TYPE_FOR_RESOLUTION(TYPE, SAVE, CHAIN) \
|
||||
{ \
|
||||
tree _returned_type; \
|
||||
(CHAIN) = 0; \
|
||||
if (TREE_TYPE (GET_CPC ()) == object_type_node \
|
||||
&& TREE_CODE (TYPE) == EXPR_WITH_FILE_LOCATION \
|
||||
&& EXPR_WFL_NODE (TYPE) == unqualified_object_id_node) \
|
||||
(TYPE) = object_type_node; \
|
||||
else \
|
||||
{ \
|
||||
if (unresolved_type_p (type, &_returned_type)) \
|
||||
{ \
|
||||
if (_returned_type) \
|
||||
(TYPE) = _returned_type; \
|
||||
else \
|
||||
{ \
|
||||
tree _type; \
|
||||
WFL_STRIP_BRACKET (_type, TYPE); \
|
||||
(SAVE) = (_type); \
|
||||
(TYPE) = obtain_incomplete_type (TYPE); \
|
||||
CHAIN = 1; \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
|
||||
#define WFL_STRIP_BRACKET(TARGET, TYPE) \
|
||||
{ \
|
||||
tree __type = (TYPE); \
|
||||
if (TYPE && TREE_CODE (TYPE) == EXPR_WITH_FILE_LOCATION) \
|
||||
{ \
|
||||
tree _node; \
|
||||
if (build_type_name_from_array_name (EXPR_WFL_NODE (TYPE), &_node)) \
|
||||
{ \
|
||||
tree _new = copy_node (TYPE); \
|
||||
EXPR_WFL_NODE (_new) = _node; \
|
||||
__type = _new; \
|
||||
} \
|
||||
} \
|
||||
(TARGET) = __type; \
|
||||
}
|
||||
|
||||
/* If NAME contains one or more trailing []s, NAMELEN will be the
|
||||
adjusted to be the index of the last non bracket character in
|
||||
NAME. ARRAY_DIMS will contain the number of []s found. */
|
||||
|
||||
#define STRING_STRIP_BRACKETS(NAME, NAMELEN, ARRAY_DIMS) \
|
||||
{ \
|
||||
ARRAY_DIMS = 0; \
|
||||
while (NAMELEN >= 2 && (NAME)[NAMELEN - 1] == ']') \
|
||||
{ \
|
||||
NAMELEN -= 2; \
|
||||
(ARRAY_DIMS)++; \
|
||||
} \
|
||||
}
|
||||
|
||||
/* Promote a type if it won't be registered as a patch */
|
||||
#define PROMOTE_RECORD_IF_COMPLETE(TYPE, IS_INCOMPLETE) \
|
||||
{ \
|
||||
if (!(IS_INCOMPLETE) && TREE_CODE (TYPE) == RECORD_TYPE) \
|
||||
(TYPE) = promote_type (TYPE); \
|
||||
}
|
||||
|
||||
/* Insert a DECL in the current block */
|
||||
#define BLOCK_CHAIN_DECL(NODE) \
|
||||
{ \
|
||||
TREE_CHAIN ((NODE)) = \
|
||||
BLOCK_EXPR_DECLS (GET_CURRENT_BLOCK (current_function_decl)); \
|
||||
BLOCK_EXPR_DECLS (GET_CURRENT_BLOCK (current_function_decl)) = (NODE); \
|
||||
}
|
||||
|
||||
/* Return the current block, either found in the body of the currently
|
||||
declared function or in the current static block being defined. */
|
||||
#define GET_CURRENT_BLOCK(F) ((F) ? DECL_FUNCTION_BODY ((F)) : \
|
||||
current_static_block)
|
||||
|
||||
#ifndef USE_MAPPED_LOCATION
|
||||
/* Retrieve line/column from a WFL. */
|
||||
#define EXPR_WFL_GET_LINECOL(V,LINE,COL) \
|
||||
{ \
|
||||
(LINE) = (V) >> 12; \
|
||||
(COL) = (V) & 0xfff; \
|
||||
}
|
||||
#endif
|
||||
|
||||
#define EXPR_WFL_QUALIFICATION(WFL) TREE_OPERAND ((WFL), 1)
|
||||
#define QUAL_WFL(NODE) TREE_PURPOSE (NODE)
|
||||
#define QUAL_RESOLUTION(NODE) TREE_VALUE (NODE)
|
||||
#define QUAL_DECL_TYPE(NODE) GET_SKIP_TYPE (NODE)
|
||||
|
||||
#define GET_SKIP_TYPE(NODE) \
|
||||
(TREE_CODE (TREE_TYPE (NODE)) == POINTER_TYPE ? \
|
||||
TREE_TYPE (TREE_TYPE (NODE)): TREE_TYPE (NODE))
|
||||
|
||||
/* Handy macros for the walk operation */
|
||||
#define COMPLETE_CHECK_OP(NODE, N) \
|
||||
{ \
|
||||
TREE_OPERAND ((NODE), (N)) = \
|
||||
java_complete_tree (TREE_OPERAND ((NODE), (N))); \
|
||||
if (TREE_OPERAND ((NODE), (N)) == error_mark_node) \
|
||||
return error_mark_node; \
|
||||
}
|
||||
#define COMPLETE_CHECK_OP_0(NODE) COMPLETE_CHECK_OP(NODE, 0)
|
||||
#define COMPLETE_CHECK_OP_1(NODE) COMPLETE_CHECK_OP(NODE, 1)
|
||||
#define COMPLETE_CHECK_OP_2(NODE) COMPLETE_CHECK_OP(NODE, 2)
|
||||
|
||||
/* Building invocations: append(ARG) and StringBuffer(ARG) */
|
||||
#define BUILD_APPEND(ARG) \
|
||||
((JSTRING_TYPE_P (TREE_TYPE (ARG)) || JPRIMITIVE_TYPE_P (TREE_TYPE (ARG))) \
|
||||
? build_method_invocation (wfl_append, \
|
||||
ARG ? build_tree_list (NULL, (ARG)) : NULL_TREE)\
|
||||
: build_method_invocation (wfl_append, \
|
||||
ARG ? build_tree_list (NULL, \
|
||||
build1 (CONVERT_EXPR, \
|
||||
object_type_node,\
|
||||
(ARG))) \
|
||||
: NULL_TREE))
|
||||
#define BUILD_STRING_BUFFER(ARG) \
|
||||
build_new_invocation (wfl_string_buffer, \
|
||||
(ARG ? build_tree_list (NULL, (ARG)) : NULL_TREE))
|
||||
|
||||
#define BUILD_THROW(WHERE, WHAT) \
|
||||
{ \
|
||||
(WHERE) = \
|
||||
build3 (CALL_EXPR, void_type_node, \
|
||||
build_address_of (throw_node), \
|
||||
build_tree_list (NULL_TREE, (WHAT)), NULL_TREE); \
|
||||
TREE_SIDE_EFFECTS ((WHERE)) = 1; \
|
||||
}
|
||||
|
||||
/* Set wfl_operator for the most accurate error location */
|
||||
#ifdef USE_MAPPED_LOCATION
|
||||
#define SET_WFL_OPERATOR(WHICH, NODE, WFL) \
|
||||
SET_EXPR_LOCATION (WHICH, \
|
||||
(TREE_CODE (WFL) == EXPR_WITH_FILE_LOCATION ? \
|
||||
EXPR_LOCATION (WFL) : EXPR_LOCATION (NODE)))
|
||||
#else
|
||||
#define SET_WFL_OPERATOR(WHICH, NODE, WFL) \
|
||||
EXPR_WFL_LINECOL (WHICH) = \
|
||||
(TREE_CODE (WFL) == EXPR_WITH_FILE_LOCATION ? \
|
||||
EXPR_WFL_LINECOL (WFL) : EXPR_WFL_LINECOL (NODE))
|
||||
#endif
|
||||
|
||||
#define PATCH_METHOD_RETURN_ERROR() \
|
||||
{ \
|
||||
if (ret_decl) \
|
||||
*ret_decl = NULL_TREE; \
|
||||
return error_mark_node; \
|
||||
}
|
||||
|
||||
/* Convenient macro to check. Assumes that CLASS is a CLASS_DECL. */
|
||||
#define CHECK_METHODS(CLASS) \
|
||||
{ \
|
||||
if (CLASS_INTERFACE ((CLASS))) \
|
||||
java_check_abstract_methods ((CLASS)); \
|
||||
else \
|
||||
java_check_regular_methods ((CLASS)); \
|
||||
}
|
||||
|
||||
#define CLEAR_DEPRECATED ctxp->deprecated = 0
|
||||
|
||||
#define CHECK_DEPRECATED_NO_RESET(DECL) \
|
||||
{ \
|
||||
if (ctxp->deprecated) \
|
||||
DECL_DEPRECATED (DECL) = 1; \
|
||||
}
|
||||
|
||||
/* Using and reseting the @deprecated tag flag */
|
||||
#define CHECK_DEPRECATED(DECL) \
|
||||
{ \
|
||||
if (ctxp->deprecated) \
|
||||
DECL_DEPRECATED (DECL) = 1; \
|
||||
ctxp->deprecated = 0; \
|
||||
}
|
||||
|
||||
/* Register an import */
|
||||
#define REGISTER_IMPORT(WHOLE, NAME) \
|
||||
{ \
|
||||
IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P ((NAME)) = 1; \
|
||||
ctxp->import_list = tree_cons ((WHOLE), (NAME), ctxp->import_list); \
|
||||
}
|
||||
|
||||
/* Macro to access the osb (opening square bracket) count */
|
||||
#define CURRENT_OSB(C) (C)->osb_number [(C)->osb_depth]
|
||||
|
||||
/* Parser context data structure. */
|
||||
struct parser_ctxt GTY(()) {
|
||||
const char *filename; /* Current filename */
|
||||
location_t file_start_location;
|
||||
location_t save_location;
|
||||
struct parser_ctxt *next;
|
||||
|
||||
java_lexer * GTY((skip)) lexer; /* Current lexer state */
|
||||
char marker_begining; /* Marker. Should be a sub-struct */
|
||||
int ccb_indent; /* Number of unmatched { seen. */
|
||||
/* The next two fields are only source_location if USE_MAPPED_LOCATION.
|
||||
Otherwise, they are integer line number, but we can't have #ifdefs
|
||||
in GTY structures. */
|
||||
source_location first_ccb_indent1; /* First { at ident level 1 */
|
||||
source_location last_ccb_indent1; /* Last } at ident level 1 */
|
||||
int parser_ccb_indent; /* Keep track of {} indent, parser */
|
||||
int osb_depth; /* Current depth of [ in an expression */
|
||||
int osb_limit; /* Limit of this depth */
|
||||
int * GTY ((skip)) osb_number; /* Keep track of ['s */
|
||||
char marker_end; /* End marker. Should be a sub-struct */
|
||||
|
||||
/* The flags section */
|
||||
|
||||
/* Indicates a context used for saving the parser status. The
|
||||
context must be popped when the status is restored. */
|
||||
unsigned saved_data_ctx:1;
|
||||
/* Indicates that a context already contains saved data and that the
|
||||
next save operation will require a new context to be created. */
|
||||
unsigned saved_data:1;
|
||||
/* Report error when true */
|
||||
unsigned java_error_flag:1;
|
||||
/* @deprecated tag seen */
|
||||
unsigned deprecated:1;
|
||||
/* Flag to report certain errors (fix this documentation. FIXME) */
|
||||
unsigned class_err:1;
|
||||
|
||||
/* This section is used only if we compile jc1 */
|
||||
tree modifier_ctx [12]; /* WFL of modifiers */
|
||||
tree class_type; /* Current class */
|
||||
tree function_decl; /* Current function decl, save/restore */
|
||||
|
||||
int prevent_ese; /* Prevent expression statement error */
|
||||
|
||||
int formal_parameter_number; /* Number of parameters found */
|
||||
int interface_number; /* # itfs declared to extend an itf def */
|
||||
|
||||
tree package; /* Defined package ID */
|
||||
|
||||
/* These two lists won't survive file traversal */
|
||||
tree class_list; /* List of classes in a CU */
|
||||
jdeplist * GTY((skip)) classd_list; /* Classe dependencies in a CU */
|
||||
|
||||
tree current_parsed_class; /* Class currently parsed */
|
||||
tree current_parsed_class_un; /* Curr. parsed class unqualified name */
|
||||
|
||||
tree non_static_initialized; /* List of non static initialized fields */
|
||||
tree static_initialized; /* List of static non final initialized */
|
||||
tree instance_initializers; /* List of instance initializers stmts */
|
||||
|
||||
tree import_list; /* List of import */
|
||||
tree import_demand_list; /* List of import on demand */
|
||||
|
||||
tree current_loop; /* List of the currently nested
|
||||
loops/switches */
|
||||
tree current_labeled_block; /* List of currently nested
|
||||
labeled blocks. */
|
||||
|
||||
int pending_block; /* Pending block to close */
|
||||
|
||||
int explicit_constructor_p; /* >0 when processing an explicit
|
||||
constructor. This flag is used to trap
|
||||
illegal argument usage during an
|
||||
explicit constructor invocation. */
|
||||
};
|
||||
|
||||
/* A set of macros to push/pop/access the currently parsed class. */
|
||||
#define GET_CPC_LIST() ctxp->current_parsed_class
|
||||
|
||||
/* Currently class being parsed is an inner class if an enclosing
|
||||
class has been already pushed. This truth value is only valid prior
|
||||
an inner class is pushed. After, use FIXME. */
|
||||
#define CPC_INNER_P() GET_CPC_LIST ()
|
||||
|
||||
/* The TYPE_DECL node of the class currently being parsed. */
|
||||
#define GET_CPC() TREE_VALUE (GET_CPC_LIST ())
|
||||
|
||||
/* Get the currently parsed class unqualified IDENTIFIER_NODE. */
|
||||
#define GET_CPC_UN() TREE_PURPOSE (GET_CPC_LIST ())
|
||||
|
||||
/* Get a parsed class unqualified IDENTIFIER_NODE from its CPC node. */
|
||||
#define GET_CPC_UN_NODE(N) TREE_PURPOSE (N)
|
||||
|
||||
/* Get the currently parsed class DECL_TYPE from its CPC node. */
|
||||
#define GET_CPC_DECL_NODE(N) TREE_VALUE (N)
|
||||
|
||||
/* The currently parsed enclosing currently parsed TREE_LIST node. */
|
||||
#define GET_ENCLOSING_CPC() TREE_CHAIN (GET_CPC_LIST ())
|
||||
|
||||
/* Get the next enclosing context. */
|
||||
#define GET_NEXT_ENCLOSING_CPC(C) TREE_CHAIN (C)
|
||||
|
||||
/* The DECL_TYPE node of the enclosing currently parsed
|
||||
class. NULL_TREE if the currently parsed class isn't an inner
|
||||
class. */
|
||||
#define GET_ENCLOSING_CPC_CONTEXT() (GET_ENCLOSING_CPC () ? \
|
||||
TREE_VALUE (GET_ENCLOSING_CPC ()) : \
|
||||
NULL_TREE)
|
||||
|
||||
/* Make sure that innerclass T sits in an appropriate enclosing
|
||||
context. */
|
||||
#define INNER_ENCLOSING_SCOPE_CHECK(T) \
|
||||
(INNER_CLASS_TYPE_P ((T)) && !ANONYMOUS_CLASS_P ((T)) \
|
||||
&& ((current_this \
|
||||
/* We have a this and it's not the right one */ \
|
||||
&& (DECL_CONTEXT (TYPE_NAME ((T))) \
|
||||
!= TYPE_NAME (TREE_TYPE (TREE_TYPE (current_this)))) \
|
||||
&& !inherits_from_p (TREE_TYPE (TREE_TYPE (current_this)), \
|
||||
TREE_TYPE (DECL_CONTEXT (TYPE_NAME (T)))) \
|
||||
&& !common_enclosing_instance_p (TREE_TYPE (TREE_TYPE (current_this)),\
|
||||
(T)) \
|
||||
&& INNER_CLASS_TYPE_P (TREE_TYPE (TREE_TYPE (current_this))) \
|
||||
&& !inherits_from_p \
|
||||
(TREE_TYPE (DECL_CONTEXT \
|
||||
(TYPE_NAME (TREE_TYPE (TREE_TYPE (current_this))))),\
|
||||
TREE_TYPE (DECL_CONTEXT (TYPE_NAME (T))))) \
|
||||
/* We don't have a this, which is OK if the current function is \
|
||||
static. */ \
|
||||
|| (!current_this \
|
||||
&& current_function_decl \
|
||||
&& ! METHOD_STATIC (current_function_decl))))
|
||||
|
||||
/* Push macro. First argument to PUSH_CPC is a DECL_TYPE, second
|
||||
argument is the unqualified currently parsed class name. */
|
||||
#define PUSH_CPC(C,R) { \
|
||||
ctxp->current_parsed_class = \
|
||||
tree_cons ((R), (C), GET_CPC_LIST ()); \
|
||||
}
|
||||
|
||||
/* In case of an error, push an error. */
|
||||
#define PUSH_ERROR() PUSH_CPC (error_mark_node, error_mark_node)
|
||||
|
||||
/* Pop macro. Before we pop, we link the current inner class decl (if any)
|
||||
to its enclosing class. */
|
||||
#define POP_CPC() { \
|
||||
link_nested_class_to_enclosing (); \
|
||||
ctxp->current_parsed_class = \
|
||||
TREE_CHAIN (GET_CPC_LIST ()); \
|
||||
}
|
||||
|
||||
#define DEBUG_CPC() \
|
||||
do \
|
||||
{ \
|
||||
tree tmp = ctxp->current_parsed_class; \
|
||||
while (tmp) \
|
||||
{ \
|
||||
fprintf (stderr, "%s ", \
|
||||
IDENTIFIER_POINTER (TREE_PURPOSE (tmp))); \
|
||||
tmp = TREE_CHAIN (tmp); \
|
||||
} \
|
||||
} \
|
||||
while (0);
|
||||
|
||||
/* Access to the various initializer statement lists */
|
||||
#define CPC_INITIALIZER_LIST(C) ((C)->non_static_initialized)
|
||||
#define CPC_STATIC_INITIALIZER_LIST(C) ((C)->static_initialized)
|
||||
#define CPC_INSTANCE_INITIALIZER_LIST(C) ((C)->instance_initializers)
|
||||
|
||||
/* Access to the various initializer statements */
|
||||
#define CPC_INITIALIZER_STMT(C) (TREE_PURPOSE (CPC_INITIALIZER_LIST (C)))
|
||||
#define CPC_STATIC_INITIALIZER_STMT(C) \
|
||||
(TREE_PURPOSE (CPC_STATIC_INITIALIZER_LIST (C)))
|
||||
#define CPC_INSTANCE_INITIALIZER_STMT(C) \
|
||||
(TREE_PURPOSE (CPC_INSTANCE_INITIALIZER_LIST (C)))
|
||||
|
||||
/* Set various initializer statements */
|
||||
#define SET_CPC_INITIALIZER_STMT(C,S) \
|
||||
if (CPC_INITIALIZER_LIST (C)) \
|
||||
TREE_PURPOSE (CPC_INITIALIZER_LIST (C)) = (S);
|
||||
#define SET_CPC_STATIC_INITIALIZER_STMT(C,S) \
|
||||
if (CPC_STATIC_INITIALIZER_LIST (C)) \
|
||||
TREE_PURPOSE (CPC_STATIC_INITIALIZER_LIST (C)) = (S);
|
||||
#define SET_CPC_INSTANCE_INITIALIZER_STMT(C,S) \
|
||||
if (CPC_INSTANCE_INITIALIZER_LIST(C)) \
|
||||
TREE_PURPOSE (CPC_INSTANCE_INITIALIZER_LIST (C)) = (S);
|
||||
|
||||
/* This is used by the lexer to communicate with the parser. It is
|
||||
set on an integer constant if the radix is NOT 10, so that the parser
|
||||
can correctly diagnose a numeric overflow. */
|
||||
#define JAVA_NOT_RADIX10_FLAG(NODE) TREE_LANG_FLAG_0(NODE)
|
||||
|
||||
#ifndef JC1_LITE
|
||||
void java_complete_class (void);
|
||||
void java_check_circular_reference (void);
|
||||
void java_fix_constructors (void);
|
||||
void java_layout_classes (void);
|
||||
void java_reorder_fields (void);
|
||||
tree java_method_add_stmt (tree, tree);
|
||||
int java_report_errors (void);
|
||||
extern tree do_resolve_class (tree, tree, tree, tree, tree);
|
||||
#endif
|
||||
char *java_get_line_col (const char *, int, int);
|
||||
extern void reset_report (void);
|
||||
|
||||
/* Always in use, no matter what you compile */
|
||||
void java_push_parser_context (void);
|
||||
void java_pop_parser_context (int);
|
||||
void java_init_lex (FILE *, const char *);
|
||||
extern void java_parser_context_save_global (void);
|
||||
extern void java_parser_context_restore_global (void);
|
||||
int yyparse (void);
|
||||
extern int java_parse (void);
|
||||
extern void yyerror (const char *)
|
||||
#ifdef JC1_LITE
|
||||
ATTRIBUTE_NORETURN
|
||||
#endif
|
||||
;
|
||||
extern void java_expand_classes (void);
|
||||
extern void java_finish_classes (void);
|
||||
|
||||
extern GTY(()) struct parser_ctxt *ctxp;
|
||||
extern GTY(()) struct parser_ctxt *ctxp_for_generation;
|
||||
extern GTY(()) struct parser_ctxt *ctxp_for_generation_last;
|
||||
|
||||
#endif /* ! GCC_JAVA_PARSE_H */
|
||||
|
|
16552
gcc/java/parse.y
16552
gcc/java/parse.y
File diff suppressed because it is too large
Load diff
|
@ -356,7 +356,7 @@ tree
|
|||
build_java_array_type (tree element_type, HOST_WIDE_INT length)
|
||||
{
|
||||
tree sig, t, fld, atype, arfld;
|
||||
char buf[23]; /* 20 for the digits of a 64 bit number + "[]" + \0 */
|
||||
char buf[23];
|
||||
tree elsig = build_java_signature (element_type);
|
||||
tree el_name = element_type;
|
||||
buf[0] = '[';
|
||||
|
|
1231
libjava/ChangeLog
1231
libjava/ChangeLog
File diff suppressed because it is too large
Load diff
|
@ -62,9 +62,14 @@ To import a new release:
|
|||
scripts/makemake.tcl > sources.am
|
||||
automake
|
||||
- Build, fix, till everything works.
|
||||
Be sure to update gnu/classpath/Configuration.java to reflect
|
||||
the new version
|
||||
Possibly update the gcj/javaprims.h file with scripts/classes.pl
|
||||
(See below, it can only be done after the first source->bytecode
|
||||
pass has finished.)
|
||||
You will need to configure with --enable-maintainer-mode and you
|
||||
will need to update the .class files and generated CNI header files in
|
||||
your working tree
|
||||
|
||||
Over time we plan to remove as many of the remaining divergences as
|
||||
possible.
|
||||
|
|
|
@ -29,6 +29,8 @@ target_noncanonical = @target_noncanonical@
|
|||
# This is required by TL_AC_GXX_INCLUDE_DIR.
|
||||
libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)
|
||||
|
||||
libexecsubdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
|
||||
|
||||
##
|
||||
## What gets installed, and where.
|
||||
##
|
||||
|
@ -50,6 +52,9 @@ pkgconfigdir = $(libdir)/pkgconfig
|
|||
|
||||
jardir = $(datadir)/java
|
||||
jar_DATA = libgcj-$(gcc_version).jar libgcj-tools-$(gcc_version).jar
|
||||
if INSTALL_ECJ_JAR
|
||||
jar_DATA += $(ECJ_BUILD_JAR)
|
||||
endif
|
||||
|
||||
if JAVA_HOME_SET
|
||||
JAVA_HOME_DIR = $(JAVA_HOME)
|
||||
|
@ -67,7 +72,8 @@ db_pathtail = gcj-$(gcc_version)/$(db_name)
|
|||
## For now, only on native systems. FIXME.
|
||||
if NATIVE
|
||||
bin_PROGRAMS = jv-convert gij grmic grmiregistry gcj-dbtool \
|
||||
gappletviewer gjarsigner gkeytool
|
||||
gappletviewer gjarsigner gkeytool gjar gjavah gnative2ascii \
|
||||
gorbd grmid gserialver gtnameserv
|
||||
|
||||
## It is convenient to actually build and install the default database
|
||||
## when gcj-dbtool is available.
|
||||
|
@ -76,6 +82,13 @@ endif
|
|||
|
||||
bin_SCRIPTS = addr2name.awk
|
||||
|
||||
if BUILD_ECJ1
|
||||
## We build ecjx and not ecj1 because in one mode, ecjx will not work
|
||||
## until after 'make install', and we don't want it to be picked up in
|
||||
## the build tree by gcj via a -B option.
|
||||
libexecsub_PROGRAMS = ecjx
|
||||
endif
|
||||
|
||||
## ################################################################
|
||||
|
||||
##
|
||||
|
@ -94,6 +107,8 @@ extra_ldflags_libjava = @extra_ldflags_libjava@
|
|||
|
||||
GCJLINK = $(LIBTOOL) --tag=GCJ --mode=link $(GCJ) -L$(here) $(JC1FLAGS) \
|
||||
$(LDFLAGS) -o $@
|
||||
GCJ_FOR_ECJX = @GCJ_FOR_ECJX@
|
||||
GCJ_FOR_ECJX_LINK = $(GCJ_FOR_ECJX) -o $@
|
||||
LIBLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXX) -L$(here) $(JC1FLAGS) \
|
||||
$(LDFLAGS) $(extra_ldflags_libjava) -o $@
|
||||
|
||||
|
@ -154,7 +169,7 @@ AM_CPPFLAGS = -I$(top_srcdir) \
|
|||
$(GCINCS) $(THREADINCS) $(INCLTDL) \
|
||||
$(GCC_UNWIND_INCLUDE) $(ZINCS) $(LIBFFIINCS)
|
||||
|
||||
BOOTCLASSPATH = $(here)/classpath/lib
|
||||
BOOTCLASSPATH = $(srcdir)/classpath/lib
|
||||
|
||||
## ################################################################
|
||||
|
||||
|
@ -172,7 +187,6 @@ libgij_la_LDFLAGS = -rpath $(toolexeclibdir) \
|
|||
|
||||
libgcj_la_SOURCES = prims.cc jni.cc jvmti.cc exception.cc stacktrace.cc \
|
||||
link.cc defineclass.cc interpret.cc verify.cc \
|
||||
java/lang/Class.java java/lang/Object.java \
|
||||
$(nat_source_files)
|
||||
|
||||
if USING_BOEHMGC
|
||||
|
@ -219,17 +233,28 @@ libgcj_la_LDFLAGS = -rpath $(toolexeclibdir) $(THREADLDFLAGS) $(THREADLIBS) \
|
|||
-version-info `grep -v '^\#' $(srcdir)/libtool-version`
|
||||
libgcj_la_LIBADD = \
|
||||
classpath/native/fdlibm/libfdlibm.la \
|
||||
java/lang/Object.lo \
|
||||
java/lang/Class.lo \
|
||||
java/process-$(PLATFORM).lo \
|
||||
$(all_packages_source_files:.list=.lo) \
|
||||
$(bc_objects) \
|
||||
$(propertyo_files) \
|
||||
$(LIBFFI) $(ZLIBS) $(GCLIBS)
|
||||
$(LIBMAGIC) $(LIBFFI) $(ZLIBS) $(GCLIBS)
|
||||
libgcj_la_DEPENDENCIES = libgcj-$(gcc_version).jar \
|
||||
java/lang/Object.lo \
|
||||
java/lang/Class.lo \
|
||||
java/process-$(PLATFORM).lo \
|
||||
$(all_packages_source_files:.list=.lo) \
|
||||
$(LIBLTDL) $(libgcj_la_LIBADD)
|
||||
libgcj_la_LINK = $(LIBLINK)
|
||||
|
||||
libgcj_tools_la_SOURCES = classpath/tools/tools.jar
|
||||
libgcj_tools_la_GCJFLAGS = $(AM_GCJFLAGS) -findirect-dispatch -fno-indirect-classes
|
||||
## A hack to make sure the various gcj-related macros, like
|
||||
## LTGCJCOMPILE, are defined by automake. This is never actually
|
||||
## compiled.
|
||||
EXTRA_libgcj_la_SOURCES = java/lang/Object.java
|
||||
|
||||
libgcj_tools_la_SOURCES = classpath/tools/tools.zip
|
||||
libgcj_tools_la_GCJFLAGS = $(AM_GCJFLAGS) -findirect-dispatch -fno-indirect-classes -fsource-filename=$(here)/classpath/tools/all-classes.lst
|
||||
libgcj_tools_la_LDFLAGS = -rpath $(toolexeclibdir) \
|
||||
-version-info `grep -v '^\#' $(srcdir)/libtool-version`
|
||||
libgcj_tools_la_DEPENDENCIES = libgcj.la libgcj.spec
|
||||
|
@ -303,10 +328,12 @@ $(propertyo_files): %.lo: classpath/resource/%
|
|||
$(LTGCJCOMPILE) -o $@ -c $< -Wc,--resource,$(@:.lo=)
|
||||
|
||||
libgcj-$(gcc_version).jar: classpath/lib/compile-classes
|
||||
cd classpath/lib; $(JAR) -cfM \
|
||||
../../libgcj-$(gcc_version).jar gnu java javax org
|
||||
## Note that this now omits the property files.
|
||||
## It doesn't matter since we don't use the jar at runtime.
|
||||
here=`pwd`; cd $(srcdir)/classpath/lib; $(JAR) -cfM \
|
||||
$$here/libgcj-$(gcc_version).jar gnu java javax org sun
|
||||
|
||||
libgcj-tools-$(gcc_version).jar: classpath/tools/tools.jar
|
||||
libgcj-tools-$(gcc_version).jar: classpath/tools/tools.zip
|
||||
cp $< $@
|
||||
|
||||
CLEANFILES = libgcj-$(gcc_version).jar libgcj-tools-$(gcc_version).jar
|
||||
|
@ -339,7 +366,13 @@ lib-gnu-awt-xlib.la: $(lib_gnu_awt_xlib_la_OBJECTS) $(lib_gnu_awt_xlib_la_DEPEND
|
|||
## Compiling a list of java sources to a single .o.
|
||||
|
||||
%.lo: %.list
|
||||
$(LTGCJCOMPILE) -c -o $@ -MT $@ -MD -MP -MF $(basename $@).deps @$<
|
||||
$(LTGCJCOMPILE) -c -o $@ -fsource-filename=$(here)/classpath/lib/classes -MT $@ -MD -MP -MF $(basename $@).deps @$<
|
||||
|
||||
java/lang/Object.lo: classpath/lib/java/lang/Object.class
|
||||
$(LTGCJCOMPILE) -c -o $@ -fsource-filename=$(srcdir)/$(basename $@).java $<
|
||||
|
||||
java/lang/Class.lo: classpath/lib/java/lang/Class.class
|
||||
$(LTGCJCOMPILE) -c -o $@ -fsource-filename=$(srcdir)/$(basename $@).java $<
|
||||
|
||||
## ################################################################
|
||||
|
||||
|
@ -358,13 +391,18 @@ omitted_headers = java/lang/ClassLoader.h java/lang/Thread.h \
|
|||
java/lang/reflect/Field.h java/lang/reflect/Method.h \
|
||||
java/lang/reflect/Proxy.h gnu/gcj/runtime/ExtensionClassLoader.h
|
||||
|
||||
generic_header_files = $(filter-out $(omitted_headers),$(ordinary_header_files) $(xlib_nat_headers)) \
|
||||
gnu/gcj/tools/gcj_dbtool/Main.h
|
||||
generic_header_files = $(ordinary_header_files) $(xlib_nat_headers)
|
||||
|
||||
$(generic_header_files): %.h: classpath/lib/%.class
|
||||
name=`echo $< | sed -e 's/\.class$$//' -e 's,classpath/lib/,,'`; \
|
||||
$(mkinstalldirs) `dirname $$name`; \
|
||||
$(GCJH) -d . -classpath '' -bootclasspath classpath/lib $$name
|
||||
MYGCJH = gjavah
|
||||
|
||||
$(generic_header_files): gcjh.stamp
|
||||
|
||||
gcjh.stamp: classpath/lib/compile-classes
|
||||
if JAVA_MAINTAINER_MODE
|
||||
$(MYGCJH) --cni --all $(srcdir)/classpath/lib \
|
||||
--cmdfile=$(srcdir)/headers.txt -d $(srcdir) --force
|
||||
endif
|
||||
echo > gcjh.stamp
|
||||
|
||||
inner_nat_headers = java/io/ObjectOutputStream$$PutField.h \
|
||||
java/io/ObjectInputStream$$GetField.h \
|
||||
|
@ -376,170 +414,42 @@ inner_nat_headers = java/io/ObjectOutputStream$$PutField.h \
|
|||
gnu/java/net/PlainSocketImpl$$SocketInputStream.h \
|
||||
gnu/java/net/PlainSocketImpl$$SocketOutputStream.h \
|
||||
gnu/java/nio/PipeImpl$$SinkChannelImpl.h \
|
||||
gnu/java/nio/PipeImpl$$SourceChannelImpl.h \
|
||||
$(PLATFORM_INNER_NAT_HDRS)
|
||||
gnu/java/nio/PipeImpl$$SourceChannelImpl.h
|
||||
|
||||
nat_headers = $(ordinary_header_files) $(inner_nat_headers) \
|
||||
gnu/gcj/tools/gcj_dbtool/Main.h
|
||||
nat_headers = $(ordinary_header_files) $(inner_nat_headers)
|
||||
nat_headers_install = $(ordinary_header_files)
|
||||
|
||||
xlib_nat_headers = $(gnu_awt_xlib_header_files) $(gnu_gcj_xlib_header_files)
|
||||
|
||||
java/lang/ClassLoader.h: classpath/lib/java/lang/ClassLoader.class
|
||||
$(GCJH) -classpath '' -bootclasspath classpath/lib \
|
||||
-prepend 'jclass _Jv_FindClass (_Jv_Utf8Const *name, java::lang::ClassLoader *loader);' \
|
||||
-prepend 'void _Jv_RunMain (jclass klass, const char *name, int argc, const char **argv, bool is_jar);' \
|
||||
-friend 'jclass (::_Jv_FindClass) (_Jv_Utf8Const *name, java::lang::ClassLoader *loader);' \
|
||||
-friend 'void ::_Jv_RunMain (jclass klass, const char *name, int argc, const char **argv, bool is_jar);' \
|
||||
java/lang/ClassLoader
|
||||
|
||||
java/lang/Thread.h: classpath/lib/java/lang/Thread.class
|
||||
$(GCJH) -classpath '' -bootclasspath classpath/lib \
|
||||
-prepend 'class _Jv_JNIEnv;' \
|
||||
-prepend 'class _Jv_Thread_t;' \
|
||||
-prepend '#define _JV_NOT_OWNER 1' \
|
||||
-prepend '#define _JV_INTERRUPTED 2' \
|
||||
-prepend '_Jv_JNIEnv * _Jv_GetCurrentJNIEnv ();' \
|
||||
-prepend 'void _Jv_SetCurrentJNIEnv (_Jv_JNIEnv *env);' \
|
||||
-prepend 'void _Jv_ThreadRun (java::lang::Thread* thread);' \
|
||||
-prepend 'jint _Jv_AttachCurrentThread(java::lang::Thread* thread);' \
|
||||
-prepend 'java::lang::Thread* _Jv_AttachCurrentThread (jstring name, java::lang::ThreadGroup* group);' \
|
||||
-prepend 'java::lang::Thread* _Jv_AttachCurrentThreadAsDaemon (jstring name, java::lang::ThreadGroup* group);' \
|
||||
-prepend 'jint _Jv_DetachCurrentThread ();' \
|
||||
-prepend '_Jv_Thread_t* _Jv_ThreadGetData (java::lang::Thread* thread);' \
|
||||
-friend '_Jv_JNIEnv * ::_Jv_GetCurrentJNIEnv ();' \
|
||||
-friend 'void ::_Jv_SetCurrentJNIEnv (_Jv_JNIEnv *env);' \
|
||||
-friend 'void ::_Jv_ThreadRun (java::lang::Thread* thread);' \
|
||||
-friend 'jint (::_Jv_AttachCurrentThread) (java::lang::Thread* thread);' \
|
||||
-friend 'java::lang::Thread* ::_Jv_AttachCurrentThread (jstring name, java::lang::ThreadGroup* group);' \
|
||||
-friend 'java::lang::Thread* ::_Jv_AttachCurrentThreadAsDaemon (jstring name, java::lang::ThreadGroup* group);' \
|
||||
-friend 'jint (::_Jv_DetachCurrentThread) ();' \
|
||||
-friend '_Jv_Thread_t* ::_Jv_ThreadGetData (java::lang::Thread* thread);' \
|
||||
java/lang/Thread
|
||||
|
||||
java/lang/String.h: classpath/lib/java/lang/String.class
|
||||
$(GCJH) -classpath '' -bootclasspath classpath/lib \
|
||||
-prepend 'jchar* _Jv_GetStringChars (jstring str);' \
|
||||
-prepend 'jstring* _Jv_StringFindSlot (jchar*, jint, jint);' \
|
||||
-prepend 'jstring* _Jv_StringGetSlot (jstring);' \
|
||||
-prepend 'jstring _Jv_NewStringUtf8Const (_Jv_Utf8Const* str);' \
|
||||
-prepend 'jstring _Jv_NewStringLatin1 (const char*, jsize);' \
|
||||
-prepend 'jstring _Jv_AllocString (jsize);' \
|
||||
-friend 'jchar* ::_Jv_GetStringChars (jstring str);' \
|
||||
-friend 'jstring* ::_Jv_StringFindSlot (jchar*, jint, jint);' \
|
||||
-friend 'jstring* ::_Jv_StringGetSlot (jstring);' \
|
||||
-friend 'jstring (::_Jv_NewStringUtf8Const) (_Jv_Utf8Const* str);' \
|
||||
-friend 'jstring (::_Jv_NewStringLatin1) (const char*, jsize);' \
|
||||
-friend 'jstring (::_Jv_AllocString) (jsize);' \
|
||||
java/lang/String
|
||||
|
||||
java/lang/reflect/Constructor.h: classpath/lib/java/lang/reflect/Constructor.class
|
||||
$(GCJH) -classpath '' -bootclasspath classpath/lib \
|
||||
-prepend 'jmethodID _Jv_FromReflectedConstructor (java::lang::reflect::Constructor *);' \
|
||||
-prepend 'jobject _Jv_JNI_ToReflectedMethod (_Jv_JNIEnv *, jclass, jmethodID, jboolean);' \
|
||||
-friend 'jmethodID (::_Jv_FromReflectedConstructor) (java::lang::reflect::Constructor *);' \
|
||||
-friend 'jobject (::_Jv_JNI_ToReflectedMethod) (_Jv_JNIEnv *, jclass, jmethodID, jboolean);' \
|
||||
-friend 'class java::lang::Class;' \
|
||||
java/lang/reflect/Constructor
|
||||
|
||||
java/lang/reflect/Field.h: classpath/lib/java/lang/reflect/Field.class
|
||||
$(GCJH) -classpath '' -bootclasspath classpath/lib \
|
||||
-prepend 'jfieldID _Jv_FromReflectedField (java::lang::reflect::Field *);' \
|
||||
-prepend 'jobject _Jv_JNI_ToReflectedField (_Jv_JNIEnv*, jclass, jfieldID, jboolean);' \
|
||||
-friend 'jfieldID (::_Jv_FromReflectedField) (java::lang::reflect::Field *);' \
|
||||
-friend 'jobject (::_Jv_JNI_ToReflectedField) (_Jv_JNIEnv*, jclass, jfieldID, jboolean);' \
|
||||
-friend 'class java::lang::Class;' \
|
||||
java/lang/reflect/Field
|
||||
|
||||
java/lang/reflect/Method.h: classpath/lib/java/lang/reflect/Method.class
|
||||
$(GCJH) -classpath '' -bootclasspath classpath/lib \
|
||||
-prepend 'jmethodID _Jv_FromReflectedMethod (java::lang::reflect::Method *);' \
|
||||
-prepend 'jobject _Jv_JNI_ToReflectedMethod (_Jv_JNIEnv *, jclass, jmethodID, jboolean);' \
|
||||
-friend 'jmethodID (::_Jv_FromReflectedMethod) (java::lang::reflect::Method *);' \
|
||||
-friend 'jobject (::_Jv_JNI_ToReflectedMethod) (_Jv_JNIEnv *, jclass, jmethodID, jboolean);' \
|
||||
-friend 'class java::lang::Class;' \
|
||||
-friend 'class java::io::ObjectInputStream;' \
|
||||
java/lang/reflect/Method
|
||||
|
||||
java/lang/reflect/Proxy.h: classpath/lib/java/lang/reflect/Proxy.class
|
||||
$(GCJH) -classpath '' -bootclasspath classpath/lib \
|
||||
java/lang/reflect/Proxy
|
||||
|
||||
java/lang/reflect/Proxy$$ProxyData.h: classpath/lib/java/lang/reflect/Proxy.class
|
||||
$(GCJH) -classpath '' -bootclasspath classpath/lib \
|
||||
'java/lang/reflect/Proxy$$ProxyData'
|
||||
|
||||
java/lang/reflect/Proxy$$ProxyType.h: classpath/lib/java/lang/reflect/Proxy.class
|
||||
$(GCJH) -classpath '' -bootclasspath classpath/lib \
|
||||
'java/lang/reflect/Proxy$$ProxyType'
|
||||
|
||||
gnu/gcj/runtime/ExtensionClassLoader.h: classpath/lib/gnu/gcj/runtime/ExtensionClassLoader.class
|
||||
$(GCJH) -classpath '' -bootclasspath classpath/lib \
|
||||
-friend 'class ::java::lang::ClassLoader;' \
|
||||
gnu/gcj/runtime/ExtensionClassLoader
|
||||
|
||||
java/io/ObjectInputStream$$GetField.h: classpath/lib/java/io/ObjectInputStream.class
|
||||
$(GCJH) -classpath '' -bootclasspath classpath/lib \
|
||||
'java/io/ObjectInputStream$$GetField'
|
||||
|
||||
java/io/ObjectOutputStream$$PutField.h: classpath/lib/java/io/ObjectOutputStream.class
|
||||
$(GCJH) -classpath '' -bootclasspath classpath/lib \
|
||||
'java/io/ObjectOutputStream$$PutField'
|
||||
|
||||
java/nio/DirectByteBufferImpl$$ReadWrite.h: classpath/lib/java/nio/DirectByteBufferImpl.class
|
||||
$(GCJH) -classpath '' -bootclasspath classpath/lib \
|
||||
'java/nio/DirectByteBufferImpl$$ReadWrite'
|
||||
|
||||
java/nio/channels/Pipe$$SinkChannel.h: classpath/lib/java/nio/channels/Pipe.class
|
||||
$(GCJH) -classpath '' -bootclasspath classpath/lib \
|
||||
'java/nio/channels/Pipe$$SinkChannel'
|
||||
|
||||
java/nio/channels/Pipe$$SourceChannel.h: classpath/lib/java/nio/channels/Pipe.class
|
||||
$(GCJH) -classpath '' -bootclasspath classpath/lib \
|
||||
'java/nio/channels/Pipe$$SourceChannel'
|
||||
|
||||
gnu/java/net/PlainSocketImpl$$SocketInputStream.h: classpath/lib/gnu/java/net/PlainSocketImpl.class
|
||||
$(GCJH) -classpath '' -bootclasspath classpath/lib \
|
||||
'gnu/java/net/PlainSocketImpl$$SocketInputStream'
|
||||
|
||||
gnu/java/net/PlainSocketImpl$$SocketOutputStream.h: classpath/lib/gnu/java/net/PlainSocketImpl.class
|
||||
$(GCJH) -classpath '' -bootclasspath classpath/lib \
|
||||
'gnu/java/net/PlainSocketImpl$$SocketOutputStream'
|
||||
|
||||
gnu/java/nio/PipeImpl$$SinkChannelImpl.h: classpath/lib/gnu/java/nio/PipeImpl.class
|
||||
$(GCJH) -classpath '' -bootclasspath classpath/lib \
|
||||
'gnu/java/nio/PipeImpl$$SinkChannelImpl'
|
||||
|
||||
gnu/java/nio/PipeImpl$$SourceChannelImpl.h: classpath/lib/gnu/java/nio/PipeImpl.class
|
||||
$(GCJH) -classpath '' -bootclasspath classpath/lib \
|
||||
'gnu/java/nio/PipeImpl$$SourceChannelImpl'
|
||||
|
||||
## Only used by PosixProcess.java
|
||||
java/lang/ConcreteProcess$$ProcessManager.h: classpath/lib/java/lang/ConcreteProcess.class
|
||||
$(GCJH) -classpath '' -bootclasspath classpath/lib \
|
||||
'java/lang/ConcreteProcess$$ProcessManager'
|
||||
|
||||
## Headers we maintain by hand and which we want to install.
|
||||
extra_headers = java/lang/Object.h java/lang/Class.h
|
||||
|
||||
$(extra_headers) $(srcdir)/java/lang/Object.h $(srcdir)/java/lang/Class.h:
|
||||
@:
|
||||
|
||||
install-exec-hook: install-toolexeclibLTLIBRARIES install-libexecsubPROGRAMS
|
||||
## Support for libgcj_bc: dummy shared library used only at link-time.
|
||||
if USE_LIBGCJ_BC
|
||||
## Install libgcj_bc dummy lib in the target directory. We also need to delete
|
||||
## libtool's .la file, this prevents libtool resetting the lib again
|
||||
## later.
|
||||
install-exec-hook: install-toolexeclibLTLIBRARIES
|
||||
@echo Installing dummy lib libgcj_bc.so.1.0.0; \
|
||||
rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so; \
|
||||
mv $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1.0.0 $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so; \
|
||||
rm $(toolexeclibdir)/libgcj_bc.so; \
|
||||
mv $(toolexeclibdir)/libgcj_bc.so.1.0.0 $(toolexeclibdir)/libgcj_bc.so; \
|
||||
$(libgcj_bc_dummy_LINK) -xc /dev/null -Wl,-soname,libgcj_bc.so.1 \
|
||||
-o $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1.0.0 -lgcj || exit; \
|
||||
rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1; \
|
||||
$(LN_S) libgcj_bc.so.1.0.0 $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1; \
|
||||
rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.la;
|
||||
-o $(toolexeclibdir)/libgcj_bc.so.1.0.0 -lgcj || exit; \
|
||||
rm $(toolexeclibdir)/libgcj_bc.so.1; \
|
||||
$(LN_S) libgcj_bc.so.1.0.0 $(toolexeclibdir)/libgcj_bc.so.1; \
|
||||
rm $(toolexeclibdir)/libgcj_bc.la;
|
||||
endif
|
||||
if BUILD_ECJ1
|
||||
if NATIVE
|
||||
mv $(DESTDIR)$(libexecsubdir)/ecjx$(EXEEXT) $(DESTDIR)$(libexecsubdir)/ecj1$(host_exeext)
|
||||
else !NATIVE
|
||||
## Undo the prepending of the target prefix
|
||||
mv $(DESTDIR)$(libexecsubdir)/$(target_noncanonical)-ecjx$(EXEEXT) $(DESTDIR)$(libexecsubdir)/ecj1$(host_exeext)
|
||||
endif !NATIVE
|
||||
endif BUILD_ECJ1
|
||||
|
||||
## Install the headers. It is fairly ugly that we have to do this by
|
||||
## hand.
|
||||
|
@ -564,16 +474,16 @@ install-data-local:
|
|||
done
|
||||
-@rm -f tmp-ilist
|
||||
## Install inner class headers.
|
||||
$(INSTALL_DATA) 'java/io/ObjectOutputStream$$PutField.h' $(DESTDIR)$(gxx_include_dir)/java/io/
|
||||
$(INSTALL_DATA) 'java/io/ObjectInputStream$$GetField.h' $(DESTDIR)$(gxx_include_dir)/java/io/
|
||||
$(INSTALL_DATA) 'java/nio/channels/Pipe$$SinkChannel.h' $(DESTDIR)$(gxx_include_dir)/java/nio/channels/
|
||||
$(INSTALL_DATA) 'java/nio/channels/Pipe$$SourceChannel.h' $(DESTDIR)$(gxx_include_dir)/java/nio/channels/
|
||||
$(INSTALL_DATA) 'java/lang/reflect/Proxy$$ProxyData.h' $(DESTDIR)$(gxx_include_dir)/java/lang/reflect/
|
||||
$(INSTALL_DATA) 'java/lang/reflect/Proxy$$ProxyType.h' $(DESTDIR)$(gxx_include_dir)/java/lang/reflect/
|
||||
$(INSTALL_DATA) 'gnu/java/net/PlainSocketImpl$$SocketInputStream.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/net/
|
||||
$(INSTALL_DATA) 'gnu/java/net/PlainSocketImpl$$SocketOutputStream.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/net/
|
||||
$(INSTALL_DATA) 'gnu/java/nio/PipeImpl$$SinkChannelImpl.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/nio/
|
||||
$(INSTALL_DATA) 'gnu/java/nio/PipeImpl$$SourceChannelImpl.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/nio/
|
||||
$(INSTALL_DATA) $(srcdir)/'java/io/ObjectOutputStream$$PutField.h' $(DESTDIR)$(gxx_include_dir)/java/io/
|
||||
$(INSTALL_DATA) $(srcdir)/'java/io/ObjectInputStream$$GetField.h' $(DESTDIR)$(gxx_include_dir)/java/io/
|
||||
$(INSTALL_DATA) $(srcdir)/'java/nio/channels/Pipe$$SinkChannel.h' $(DESTDIR)$(gxx_include_dir)/java/nio/channels/
|
||||
$(INSTALL_DATA) $(srcdir)/'java/nio/channels/Pipe$$SourceChannel.h' $(DESTDIR)$(gxx_include_dir)/java/nio/channels/
|
||||
$(INSTALL_DATA) $(srcdir)/'java/lang/reflect/Proxy$$ProxyData.h' $(DESTDIR)$(gxx_include_dir)/java/lang/reflect/
|
||||
$(INSTALL_DATA) $(srcdir)/'java/lang/reflect/Proxy$$ProxyType.h' $(DESTDIR)$(gxx_include_dir)/java/lang/reflect/
|
||||
$(INSTALL_DATA) $(srcdir)/'gnu/java/net/PlainSocketImpl$$SocketInputStream.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/net/
|
||||
$(INSTALL_DATA) $(srcdir)/'gnu/java/net/PlainSocketImpl$$SocketOutputStream.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/net/
|
||||
$(INSTALL_DATA) $(srcdir)/'gnu/java/nio/PipeImpl$$SinkChannelImpl.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/nio/
|
||||
$(INSTALL_DATA) $(srcdir)/'gnu/java/nio/PipeImpl$$SourceChannelImpl.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/nio/
|
||||
## Don't install java/nio/DirectByteBufferImpl$$ReadWrite.h here. It's for internal use only.
|
||||
|
||||
|
||||
|
@ -709,7 +619,6 @@ 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 \
|
||||
gnu/gcj/tools/gcj_dbtool/natMain.cc
|
||||
|
||||
## We need -nodefaultlibs because we want to avoid gcj's `-lgcj'. We
|
||||
|
@ -725,10 +634,10 @@ gcj_dbtool_LINK = $(GCJLINK)
|
|||
## 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
|
||||
gcj_dbtool_LDADD = gnu/gcj/tools/gcj_dbtool.lo -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
|
||||
gcj_dbtool_DEPENDENCIES = gnu/gcj/tools/gcj_dbtool.lo libgcj.la libgcj.spec
|
||||
|
||||
gij_SOURCES =
|
||||
## We need -nodefaultlibs because we want to avoid gcj's `-lgcj'. We
|
||||
|
@ -743,27 +652,38 @@ gij_LDADD = -L$(here)/.libs libgij.la
|
|||
## linking this program.
|
||||
gij_DEPENDENCIES = libgij.la
|
||||
|
||||
## This is a dummy definition.
|
||||
grmic_SOURCES =
|
||||
grmic_LDFLAGS = --main=gnu.java.rmi.rmic.RMIC \
|
||||
-rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
grmic_LINK = $(GCJLINK)
|
||||
## See jv_convert_LDADD.
|
||||
grmic_LDADD = -L$(here)/.libs libgcj.la
|
||||
## Depend on the spec file to make sure it is up to date before
|
||||
## linking this program.
|
||||
grmic_DEPENDENCIES = libgcj.la libgcj.spec
|
||||
## Build an ecjx from a .jar.
|
||||
ecjx_SOURCES =
|
||||
## We use the BC ABI here so that we don't need to compile ecj.jar.
|
||||
## Hopefully the user has compiled it into his system .db.
|
||||
## However, even if not it will run reasonably quickly.
|
||||
|
||||
## This is a dummy definition.
|
||||
grmiregistry_SOURCES =
|
||||
grmiregistry_LDFLAGS = --main=gnu.java.rmi.registry.RegistryImpl \
|
||||
-rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
grmiregistry_LINK = $(GCJLINK)
|
||||
## See jv_convert_LDADD.
|
||||
grmiregistry_LDADD = -L$(here)/.libs libgcj.la
|
||||
## Depend on the spec file to make sure it is up to date before
|
||||
## linking this program.
|
||||
grmiregistry_DEPENDENCIES = libgcj.la libgcj.spec
|
||||
ECJX_BASE_FLAGS = -findirect-dispatch \
|
||||
--main=org.eclipse.jdt.internal.compiler.batch.GCCMain
|
||||
|
||||
if NATIVE
|
||||
|
||||
ecjx_LINK = $(GCJLINK)
|
||||
|
||||
if ENABLE_SHARED
|
||||
## Use ecj.jar at runtime.
|
||||
ecjx_LDFLAGS = $(ECJX_BASE_FLAGS) -Djava.class.path=$(ECJ_JAR)
|
||||
else !ENABLE_SHARED
|
||||
## Use ecj.jar at compile time.
|
||||
ecjx_LDFLAGS = $(ECJX_BASE_FLAGS) $(ECJ_BUILD_JAR)
|
||||
endif !ENABLE_SHARED
|
||||
|
||||
ecjx_LDADD = -L$(here)/.libs libgcj.la
|
||||
ecjx_DEPENDENCIES = libgcj.la libgcj.spec
|
||||
|
||||
else !NATIVE
|
||||
|
||||
ecjx_LINK = $(GCJ_FOR_ECJX_LINK)
|
||||
ecjx_LDFLAGS = $(ECJX_BASE_FLAGS) $(ECJ_BUILD_JAR)
|
||||
ecjx_LDADD =
|
||||
ecjx_DEPENDENCIES =
|
||||
|
||||
endif !NATIVE
|
||||
|
||||
## This is a dummy definition.
|
||||
gappletviewer_SOURCES =
|
||||
|
@ -772,8 +692,6 @@ gappletviewer_LDFLAGS = --main=gnu.classpath.tools.appletviewer.Main \
|
|||
gappletviewer_LINK = $(GCJLINK)
|
||||
## See jv_convert_LDADD.
|
||||
gappletviewer_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
## Depend on the spec file to make sure it is up to date before
|
||||
## linking this program.
|
||||
gappletviewer_DEPENDENCIES = libgcj-tools.la
|
||||
|
||||
## This is a dummy definition.
|
||||
|
@ -783,8 +701,6 @@ gjarsigner_LDFLAGS = --main=gnu.classpath.tools.jarsigner.Main \
|
|||
gjarsigner_LINK = $(GCJLINK)
|
||||
## See jv_convert_LDADD.
|
||||
gjarsigner_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
## Depend on the spec file to make sure it is up to date before
|
||||
## linking this program.
|
||||
gjarsigner_DEPENDENCIES = libgcj-tools.la
|
||||
|
||||
## This is a dummy definition.
|
||||
|
@ -794,18 +710,99 @@ gkeytool_LDFLAGS = --main=gnu.classpath.tools.keytool.Main \
|
|||
gkeytool_LINK = $(GCJLINK)
|
||||
## See jv_convert_LDADD.
|
||||
gkeytool_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
## Depend on the spec file to make sure it is up to date before
|
||||
## linking this program.
|
||||
gkeytool_DEPENDENCIES = libgcj-tools.la
|
||||
|
||||
## This is a dummy definition.
|
||||
gjar_SOURCES =
|
||||
gjar_LDFLAGS = --main=gnu.classpath.tools.jar.Main \
|
||||
-rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
gjar_LINK = $(GCJLINK)
|
||||
## See jv_convert_LDADD.
|
||||
gjar_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
gjar_DEPENDENCIES = libgcj-tools.la
|
||||
|
||||
## This is a dummy definition.
|
||||
gjavah_SOURCES =
|
||||
gjavah_LDFLAGS = --main=gnu.classpath.tools.javah.Main \
|
||||
-rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
gjavah_LINK = $(GCJLINK)
|
||||
## See jv_convert_LDADD.
|
||||
gjavah_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
gjavah_DEPENDENCIES = libgcj-tools.la
|
||||
|
||||
## This is a dummy definition.
|
||||
gnative2ascii_SOURCES =
|
||||
gnative2ascii_LDFLAGS = --main=gnu.classpath.tools.native2ascii.Native2ASCII \
|
||||
-rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
gnative2ascii_LINK = $(GCJLINK)
|
||||
## See jv_convert_LDADD.
|
||||
gnative2ascii_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
gnative2ascii_DEPENDENCIES = libgcj-tools.la
|
||||
|
||||
## This is a dummy definition.
|
||||
gorbd_SOURCES =
|
||||
gorbd_LDFLAGS = --main=gnu.classpath.tools.orbd.Main \
|
||||
-rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
gorbd_LINK = $(GCJLINK)
|
||||
## See jv_convert_LDADD.
|
||||
gorbd_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
gorbd_DEPENDENCIES = libgcj-tools.la
|
||||
|
||||
## This is a dummy definition.
|
||||
grmid_SOURCES =
|
||||
grmid_LDFLAGS = --main=gnu.classpath.tools.rmid.Main \
|
||||
-rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
grmid_LINK = $(GCJLINK)
|
||||
## See jv_convert_LDADD.
|
||||
grmid_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
grmid_DEPENDENCIES = libgcj-tools.la
|
||||
|
||||
## This is a dummy definition.
|
||||
gserialver_SOURCES =
|
||||
gserialver_LDFLAGS = --main=gnu.classpath.tools.serialver.SerialVer \
|
||||
-rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
gserialver_LINK = $(GCJLINK)
|
||||
## See jv_convert_LDADD.
|
||||
gserialver_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
gserialver_DEPENDENCIES = libgcj-tools.la
|
||||
|
||||
## This is a dummy definition.
|
||||
gtnameserv_SOURCES =
|
||||
gtnameserv_LDFLAGS = --main=gnu.classpath.tools.tnameserv.Main \
|
||||
-rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
gtnameserv_LINK = $(GCJLINK)
|
||||
## See jv_convert_LDADD.
|
||||
gtnameserv_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
gtnameserv_DEPENDENCIES = libgcj-tools.la
|
||||
|
||||
## This is a dummy definition.
|
||||
grmic_SOURCES =
|
||||
grmic_LDFLAGS = --main=gnu.classpath.tools.rmic.Main \
|
||||
-rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
grmic_LINK = $(GCJLINK)
|
||||
## See jv_convert_LDADD.
|
||||
grmic_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
grmic_DEPENDENCIES = libgcj-tools.la
|
||||
|
||||
## This is a dummy definition.
|
||||
grmiregistry_SOURCES =
|
||||
grmiregistry_LDFLAGS = --main=gnu.classpath.tools.rmiregistry.Main \
|
||||
-rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
grmiregistry_LINK = $(GCJLINK)
|
||||
## See jv_convert_LDADD.
|
||||
grmiregistry_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
grmiregistry_DEPENDENCIES = libgcj-tools.la
|
||||
|
||||
## ################################################################
|
||||
|
||||
## This lists all the C++ source files in subdirectories.
|
||||
nat_source_files = \
|
||||
gnu/classpath/natSystemProperties.cc \
|
||||
gnu/classpath/jdwp/natVMFrame.cc \
|
||||
gnu/classpath/jdwp/natVMMethod.cc \
|
||||
gnu/classpath/jdwp/natVMVirtualMachine.cc \
|
||||
gnu/classpath/natConfiguration.cc \
|
||||
gnu/classpath/natSystemProperties.cc \
|
||||
gnu/classpath/natVMStackWalker.cc \
|
||||
gnu/gcj/natCore.cc \
|
||||
gnu/gcj/convert/JIS0208_to_Unicode.cc \
|
||||
gnu/gcj/convert/JIS0212_to_Unicode.cc \
|
||||
|
@ -824,16 +821,26 @@ gnu/gcj/runtime/natSystemClassLoader.cc \
|
|||
gnu/gcj/runtime/natStringBuffer.cc \
|
||||
gnu/gcj/util/natDebug.cc \
|
||||
gnu/java/lang/natMainThread.cc \
|
||||
gnu/java/lang/management/natVMClassLoadingMXBeanImpl.cc \
|
||||
gnu/java/lang/management/natVMCompilationMXBeanImpl.cc \
|
||||
gnu/java/lang/management/natVMGarbageCollectorMXBeanImpl.cc \
|
||||
gnu/java/lang/management/natVMMemoryMXBeanImpl.cc \
|
||||
gnu/java/lang/management/natVMMemoryManagerMXBeanImpl.cc \
|
||||
gnu/java/lang/management/natVMMemoryPoolMXBeanImpl.cc \
|
||||
gnu/java/lang/management/natVMRuntimeMXBeanImpl.cc \
|
||||
gnu/java/lang/management/natVMThreadMXBeanImpl.cc \
|
||||
gnu/java/net/natPlainDatagramSocketImpl.cc \
|
||||
gnu/java/net/natPlainSocketImpl.cc \
|
||||
gnu/java/net/protocol/core/natCoreInputStream.cc \
|
||||
gnu/java/nio/natPipeImpl.cc \
|
||||
gnu/java/nio/natSelectorImpl.cc \
|
||||
gnu/java/nio/natNIOServerSocket.cc \
|
||||
gnu/java/nio/natVMChannel.cc \
|
||||
gnu/java/nio/channels/natFileChannelImpl.cc \
|
||||
java/io/natFile.cc \
|
||||
java/io/natObjectInputStream.cc \
|
||||
java/io/natVMObjectStreamClass.cc \
|
||||
java/lang/management/natVMManagementFactory.cc \
|
||||
java/lang/natCharacter.cc \
|
||||
java/lang/natClass.cc \
|
||||
java/lang/natClassLoader.cc \
|
||||
|
@ -848,27 +855,29 @@ java/lang/natStringBuffer.cc \
|
|||
java/lang/natStringBuilder.cc \
|
||||
java/lang/natSystem.cc \
|
||||
java/lang/natThread.cc \
|
||||
java/lang/natThreadLocal.cc \
|
||||
java/lang/natVMClassLoader.cc \
|
||||
java/lang/natVMSecurityManager.cc \
|
||||
java/lang/natVMThrowable.cc \
|
||||
java/lang/ref/natReference.cc \
|
||||
java/lang/reflect/natArray.cc \
|
||||
java/lang/reflect/natConstructor.cc \
|
||||
java/lang/reflect/natField.cc \
|
||||
java/lang/reflect/natMethod.cc \
|
||||
java/net/natVMNetworkInterface.cc \
|
||||
java/lang/reflect/natVMProxy.cc \
|
||||
java/net/natVMInetAddress.cc \
|
||||
java/net/natURLClassLoader.cc \
|
||||
java/net/natVMNetworkInterface.cc \
|
||||
java/net/natVMURLConnection.cc \
|
||||
java/nio/channels/natVMChannels.cc \
|
||||
java/nio/natDirectByteBufferImpl.cc \
|
||||
java/security/natVMAccessController.cc \
|
||||
java/security/natVMAccessControlState.cc \
|
||||
java/text/natCollator.cc \
|
||||
java/util/natResourceBundle.cc \
|
||||
java/util/natVMTimeZone.cc \
|
||||
java/util/concurrent/atomic/natAtomicLong.cc \
|
||||
java/util/logging/natLogger.cc \
|
||||
java/util/zip/natDeflater.cc \
|
||||
java/util/zip/natInflater.cc
|
||||
java/util/zip/natInflater.cc \
|
||||
sun/misc/natUnsafe.cc
|
||||
|
||||
xlib_nat_source_files = \
|
||||
gnu/gcj/xlib/natClip.cc \
|
||||
|
@ -905,7 +914,7 @@ src.zip:
|
|||
here=`pwd`; \
|
||||
( \
|
||||
( cd $(srcdir)/classpath; \
|
||||
find java gnu javax org -name '*.java' -print | \
|
||||
find java gnu javax org sun -name '*.java' -print | \
|
||||
while read file; do \
|
||||
## Ugly code to avoid "echo -C". Must separate each entry by a newline
|
||||
## Gross but easy.
|
||||
|
@ -913,6 +922,27 @@ src.zip:
|
|||
echo $(srcdir)/classpath; \
|
||||
echo $$file; \
|
||||
done ); \
|
||||
( cd $(srcdir)/classpath/external/sax; \
|
||||
find org -name '*.java' -print | \
|
||||
while read file; do \
|
||||
echo "x-C" | sed -e 's/^.//'; \
|
||||
echo $(srcdir)/classpath/external/sax; \
|
||||
echo $$file; \
|
||||
done ); \
|
||||
( cd $(srcdir)/classpath/external/relaxngDatatype; \
|
||||
find org -name '*.java' -print | \
|
||||
while read file; do \
|
||||
echo "x-C" | sed -e 's/^.//'; \
|
||||
echo $(srcdir)/classpath/external/relaxngDatatype; \
|
||||
echo $$file; \
|
||||
done ); \
|
||||
( cd $(srcdir)/classpath/external/w3c_dom; \
|
||||
find org -name '*.java' -print | \
|
||||
while read file; do \
|
||||
echo "x-C" | sed -e 's/^.//'; \
|
||||
echo $(srcdir)/classpath/external/w3c_dom; \
|
||||
echo $$file; \
|
||||
done ); \
|
||||
## Now the build tree.
|
||||
( cd classpath; \
|
||||
find gnu java -name '*.java' -print | \
|
||||
|
@ -1026,7 +1056,8 @@ AM_MAKEFLAGS = \
|
|||
"NM=$(NM)" \
|
||||
"PICFLAG=$(PICFLAG)" \
|
||||
"RANLIB=$(RANLIB)" \
|
||||
"DESTDIR=$(DESTDIR)"
|
||||
"DESTDIR=$(DESTDIR)" \
|
||||
"JAR=$(JAR)"
|
||||
|
||||
# Subdir rules rely on $(FLAGS_TO_PASS)
|
||||
FLAGS_TO_PASS = $(AM_MAKEFLAGS)
|
||||
|
|
3100
libjava/Makefile.in
3100
libjava/Makefile.in
File diff suppressed because it is too large
Load diff
|
@ -168,6 +168,9 @@ _Jv_MarkObj (void *addr, void *msp, void *msl, void *env)
|
|||
p = (GC_PTR) c->aux_info;
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c);
|
||||
|
||||
p = (GC_PTR) c->reflection_data;
|
||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c);
|
||||
|
||||
// The class chain must be marked for runtime-allocated Classes
|
||||
// loaded by the bootstrap ClassLoader.
|
||||
p = (GC_PTR) c->next_or_version;
|
||||
|
|
3
libjava/classpath/.cdtproject
Normal file
3
libjava/classpath/.cdtproject
Normal file
|
@ -0,0 +1,3 @@
|
|||
<?xml version='1.0'?>
|
||||
<?eclipse-cdt version="2.0"?>
|
||||
<cdtproject/>
|
14
libjava/classpath/.classpath
Normal file
14
libjava/classpath/.classpath
Normal file
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry excluding=".externalToolBuilders/|.settings/|ChangeLog*|Makefile*|autom4te.cache/|compat/|config*|doc/|examples/|external/|external/relaxngDatatype/|include/|install/|lib/|m4/|native/|resource/|scripts/|test/|testsuite/|tools/|vm/reference/|tools/external/asm/|gnu/java/awt/peer/x/" kind="src" path=""/>
|
||||
<classpathentry excluding=".cvsignore|Makefile|Makefile.am|Makefile.in|README.txt" kind="src" path="external/relaxngDatatype"/>
|
||||
<classpathentry kind="src" path="external/jsr166"/>
|
||||
<classpathentry excluding=".cvsignore|Makefile|Makefile.am|Makefile.in|README|gnu/classpath/tools/javah/|external/asm/" kind="src" path="tools"/>
|
||||
<classpathentry excluding=".cvsignore|Makefile|Makefile.am|Makefile.in" kind="src" path="resource"/>
|
||||
<classpathentry excluding=".cvsignore|Makefile.am" kind="src" path="vm/reference"/>
|
||||
<classpathentry excluding=".cvsignore|Makefile|Makefile.am|Makefile.in|README" kind="src" path="external/sax"/>
|
||||
<classpathentry excluding=".cvsignore|Makefile|Makefile.am|Makefile.in|README" kind="src" path="external/w3c_dom"/>
|
||||
<classpathentry excluding=".cvsignore|Makefile|Makefile.am|Makefile.in|Makefile.jawt|Makefile.jawt.in|README" kind="src" path="examples"/>
|
||||
<classpathentry kind="src" path="tools/external/asm"/>
|
||||
<classpathentry kind="output" path="install/share/classpath"/>
|
||||
</classpath>
|
18
libjava/classpath/.cvsignore
Normal file
18
libjava/classpath/.cvsignore
Normal file
|
@ -0,0 +1,18 @@
|
|||
aclocal.m4
|
||||
compile
|
||||
configure
|
||||
config.guess
|
||||
config.log
|
||||
config.cache
|
||||
config.status
|
||||
config.sub
|
||||
config.h.in
|
||||
config.h
|
||||
libtool
|
||||
ltmain.sh
|
||||
Makefile
|
||||
Makefile.in
|
||||
stamp-h
|
||||
stamp-h.in
|
||||
autom4te*.cache
|
||||
install
|
2
libjava/classpath/.externalToolBuilders/Autogen.launch
Normal file
2
libjava/classpath/.externalToolBuilders/Autogen.launch
Normal file
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,2 @@
|
|||
<?xml version='1.0'?>
|
||||
<launchConfiguration type='org.eclipse.ui.externaltools.ProgramBuilderLaunchConfigurationType'><stringAttribute key='org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS' value='full,incremental,auto,'/><stringAttribute key='org.eclipse.ui.externaltools.ATTR_BUILD_SCOPE' value='${working_set:<?xml version="1.0" encoding="UTF-8"?> <launchConfigurationWorkingSet factoryID="org.eclipse.ui.internal.WorkingSetFactory" name="workingSet" editPageId="org.eclipse.ui.resourceWorkingSetPage"> <item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/classpath/include/Makefile" type="1"/> </launchConfigurationWorkingSet>}'/><stringAttribute key='org.eclipse.ui.externaltools.ATTR_LOCATION' value='${system_path:make}'/><booleanAttribute key='org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED' value='true'/><stringAttribute key='org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY' value='${build_project}'/><stringAttribute key='org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS' value='-C ${build_project}/include CLASSDIR=install/share/classpath USER_CLASSLIB=../install/share/classpath all install'/><booleanAttribute key='org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND' value='false'/><booleanAttribute key='org.eclipse.debug.core.appendEnvironmentVariables' value='true'/></launchConfiguration>
|
11
libjava/classpath/.externalToolBuilders/ClasspathJar.launch
Normal file
11
libjava/classpath/.externalToolBuilders/ClasspathJar.launch
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<launchConfiguration type="org.eclipse.ui.externaltools.ProgramBuilderLaunchConfigurationType">
|
||||
<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="true"/>
|
||||
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_BUILD_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?> <launchConfigurationWorkingSet editPageId="org.eclipse.ui.resourceWorkingSetPage" factoryID="org.eclipse.ui.internal.WorkingSetFactory" label="workingSet" name="workingSet"> <item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/classpath/install/share/classpath" type="2"/> </launchConfigurationWorkingSet>}"/>
|
||||
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="-cf glibj.zip META-INF java gnu org javax vm sun"/>
|
||||
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,auto,"/>
|
||||
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${build_project:install/share/classpath}"/>
|
||||
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${system_path:jar}"/>
|
||||
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
|
||||
<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
|
||||
</launchConfiguration>
|
|
@ -0,0 +1,2 @@
|
|||
<?xml version='1.0'?>
|
||||
<launchConfiguration type='org.eclipse.ui.externaltools.ProgramBuilderLaunchConfigurationType'><stringAttribute key='org.eclipse.debug.core.ATTR_REFRESH_SCOPE' value='${working_set:<?xml version="1.0" encoding="UTF-8"?> <launchConfigurationWorkingSet factoryID="org.eclipse.ui.internal.WorkingSetFactory" name="working set" editPageId="org.eclipse.ui.resourceWorkingSetPage"> <item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/classpath/native" type="2"/> </launchConfigurationWorkingSet>}'/><stringAttribute key='org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS' value='full,incremental,auto,'/><stringAttribute key='org.eclipse.ui.externaltools.ATTR_BUILD_SCOPE' value='${working_set:<?xml version="1.0" encoding="UTF-8"?> <launchConfigurationWorkingSet factoryID="org.eclipse.ui.internal.WorkingSetFactory" name="workingSet"> <item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/classpath/native" type="2"/> </launchConfigurationWorkingSet>}'/><stringAttribute key='org.eclipse.ui.externaltools.ATTR_LOCATION' value='${system_path:make}'/><booleanAttribute key='org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED' value='true'/><stringAttribute key='org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY' value='${build_project}'/><stringAttribute key='org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS' value='-C ${build_project}/native all install'/><booleanAttribute key='org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND' value='false'/><booleanAttribute key='org.eclipse.debug.core.appendEnvironmentVariables' value='true'/></launchConfiguration>
|
13
libjava/classpath/.externalToolBuilders/Configure.launch
Normal file
13
libjava/classpath/.externalToolBuilders/Configure.launch
Normal file
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<launchConfiguration type="org.eclipse.ui.externaltools.ProgramBuilderLaunchConfigurationType">
|
||||
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_BUILDER_ENABLED" value="true"/>
|
||||
<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
|
||||
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_BUILD_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?> <launchConfigurationWorkingSet editPageId="org.eclipse.ui.resourceWorkingSetPage" factoryID="org.eclipse.ui.internal.WorkingSetFactory" name="workingSet"> <item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/classpath/Makefile.in" type="1"/> </launchConfigurationWorkingSet>}"/>
|
||||
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="--prefix=${build_project}/install --enable-regen-headers --with-ecj"/>
|
||||
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,auto,"/>
|
||||
<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${project}"/>
|
||||
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${build_project}"/>
|
||||
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${build_project}/configure"/>
|
||||
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
|
||||
<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
|
||||
</launchConfiguration>
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<launchConfiguration type="org.eclipse.ui.externaltools.ProgramBuilderLaunchConfigurationType">
|
||||
<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
|
||||
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_BUILD_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?> <launchConfigurationWorkingSet factoryID="org.eclipse.ui.internal.WorkingSetFactory" name="workingSet"> <item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/classpath/resource/gnu/java/locale" type="2"/> <item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/classpath/scripts/generate-locale-list.sh" type="1"/> </launchConfigurationWorkingSet>}"/>
|
||||
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="-C ${build_project}/lib ../gnu/java/locale/LocaleData.java"/>
|
||||
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,"/>
|
||||
<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?> <launchConfigurationWorkingSet editPageId="org.eclipse.ui.resourceWorkingSetPage" factoryID="org.eclipse.ui.internal.WorkingSetFactory" name="working set"> <item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/classpath/gnu/java/locale" type="2"/> </launchConfigurationWorkingSet>}"/>
|
||||
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${build_project}"/>
|
||||
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${system_path:make}"/>
|
||||
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
|
||||
<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
|
||||
</launchConfiguration>
|
77
libjava/classpath/.project
Normal file
77
libjava/classpath/.project
Normal file
|
@ -0,0 +1,77 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>classpath</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
|
||||
<triggers>auto,full,incremental,</triggers>
|
||||
<arguments>
|
||||
<dictionary>
|
||||
<key>LaunchConfigHandle</key>
|
||||
<value><project>/.externalToolBuilders/Autogen.launch</value>
|
||||
</dictionary>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
|
||||
<triggers>auto,full,incremental,</triggers>
|
||||
<arguments>
|
||||
<dictionary>
|
||||
<key>LaunchConfigHandle</key>
|
||||
<value><project>/.externalToolBuilders/Configure.launch</value>
|
||||
</dictionary>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
|
||||
<triggers>full,incremental,</triggers>
|
||||
<arguments>
|
||||
<dictionary>
|
||||
<key>LaunchConfigHandle</key>
|
||||
<value><project>/.externalToolBuilders/CreateLocaleData.launch</value>
|
||||
</dictionary>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
|
||||
<triggers>auto,full,incremental,</triggers>
|
||||
<arguments>
|
||||
<dictionary>
|
||||
<key>LaunchConfigHandle</key>
|
||||
<value><project>/.externalToolBuilders/ClasspathHeaders.launch</value>
|
||||
</dictionary>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
|
||||
<triggers>auto,full,incremental,</triggers>
|
||||
<arguments>
|
||||
<dictionary>
|
||||
<key>LaunchConfigHandle</key>
|
||||
<value><project>/.externalToolBuilders/CompileNative.launch</value>
|
||||
</dictionary>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
|
||||
<triggers>auto,full,incremental,</triggers>
|
||||
<arguments>
|
||||
<dictionary>
|
||||
<key>LaunchConfigHandle</key>
|
||||
<value><project>/.externalToolBuilders/ClasspathJar.launch</value>
|
||||
</dictionary>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
243
libjava/classpath/.settings/org.eclipse.jdt.core.prefs
Normal file
243
libjava/classpath/.settings/org.eclipse.jdt.core.prefs
Normal file
|
@ -0,0 +1,243 @@
|
|||
#Tue Feb 07 05:21:36 EST 2006
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=next_line
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
|
||||
org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
|
||||
org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
|
||||
org.eclipse.jdt.core.compiler.compliance=1.5
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_switch=next_line_shifted
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=next_line
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=18
|
||||
org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_method=1
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
|
||||
org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=insert
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
|
||||
org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
|
||||
org.eclipse.jdt.core.formatter.tabulation.size=2
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
|
||||
org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
|
||||
org.eclipse.jdt.core.formatter.tabulation.char=space
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
|
||||
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=18
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=17
|
||||
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=17
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=next_line
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_block=next_line_shifted
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
|
||||
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
|
||||
org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
|
||||
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
|
||||
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_field=1
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
|
||||
org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=true
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
|
||||
org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=next_line
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
|
||||
org.eclipse.jdt.core.formatter.lineSplit=80
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
|
||||
org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
|
||||
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=18
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=18
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_package=2
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=next_line
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=next_line
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
|
||||
org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
|
||||
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=next_line
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
|
||||
org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=82
|
||||
org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=next_line
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=18
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
|
||||
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=18
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
|
||||
org.eclipse.jdt.core.formatter.blank_lines_after_package=1
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
|
||||
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=18
|
||||
org.eclipse.jdt.core.formatter.alignment_for_binary_expression=18
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.compact_else_if=true
|
||||
org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.compiler.source=1.5
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=insert
|
||||
org.eclipse.jdt.core.formatter.continuation_indentation=2
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
|
||||
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
|
||||
org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=insert
|
||||
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
|
12
libjava/classpath/.settings/org.eclipse.jdt.ui.prefs
Normal file
12
libjava/classpath/.settings/org.eclipse.jdt.ui.prefs
Normal file
|
@ -0,0 +1,12 @@
|
|||
#Tue Jan 11 17:36:31 MST 2005
|
||||
comment_format_source_code=true
|
||||
comment_new_line_for_parameter=true
|
||||
comment_format_html=true
|
||||
comment_line_length=80
|
||||
comment_format_header=false
|
||||
eclipse.preferences.version=1
|
||||
comment_indent_parameter_description=true
|
||||
comment_format_comments=true
|
||||
comment_separate_root_tags=true
|
||||
comment_clear_blank_lines=true
|
||||
comment_indent_root_tags=true
|
|
@ -9,6 +9,7 @@ Anthony Balkissoon (abalkiss@redhat.com)
|
|||
Stuart Ballard (stuart.a.ballard@gmail.com)
|
||||
Mark Benvenuto (mcb54@columbia.edu)
|
||||
Gary Benson (gbenson@redhat.com)
|
||||
Tania Bento (tbento@redhat.com)
|
||||
Geoff Berry (gcb@gnu.org)
|
||||
James E. Blair (corvus@gnu.org)
|
||||
Eric Blake (ebb9@email.byu.edu)
|
||||
|
@ -17,16 +18,19 @@ Chris Burdess (dog@gnu.org)
|
|||
David Daney (ddaney@avtrex.com)
|
||||
Nic Ferrier (nferrier@tapsellferrier.co.uk)
|
||||
Paul Fisher (rao@gnu.org)
|
||||
Thomas Fitzsimmons (fitzsim@redhat.com)
|
||||
Jeroen Frijters (jeroen@frijters.net)
|
||||
David Gilbert (david.gilbert@object-refinery.com)
|
||||
Anthony Green (green@redhat.com)
|
||||
Jochen Hoenicke (Jochen.Hoenicke@Informatik.Uni-Oldenburg.de)
|
||||
Kazumitsu Ito (kaz@maczuka.gcd.org)
|
||||
Andrew John Hughes (gnu_andrew@member.fsf.org)
|
||||
Kazumitsu Ito (kaz@maczuka.gcd.org)
|
||||
Olivier Jolly (olivier.jolly@pcedev.com)
|
||||
Brian Jones (cbj@gnu.org)
|
||||
Roman Kennke (roman@kennke.org)
|
||||
Michael Koch (konqueror@gmx.de)
|
||||
John Keiser (jkeiser@iname.com)
|
||||
Roman Kennke (roman@kennke.org)
|
||||
Michael Koch (konqueror@gmx.de)
|
||||
Francis Kung (fkung@redhat.com)
|
||||
John Leuner (jewel@debian.org)
|
||||
Warren Levy (warrenl@cygnus.com)
|
||||
Sven de Marothy (sven@physto.se)
|
||||
|
@ -37,6 +41,9 @@ Raif S. Naffah (raif@swiftdsl.com.au)
|
|||
Aaron M. Renn (arenn@urbanophile.com)
|
||||
Andrew Selkirk (aselkirk@sympatico.ca)
|
||||
Christian Thalinger (twisti@complang.tuwien.ac.at)
|
||||
Andreas Tobler (a.tobler@schweiz.org)
|
||||
Mario Torre (neugens@limasoftware.net)
|
||||
Dalibor Topic (robilad@kaffe.org)
|
||||
Tom Tromey (tromey@cygnus.com)
|
||||
Ronald Veldema (rveldema@cs.vu.nl)
|
||||
Mark Wielaard (mark@klomp.org)
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,182 +1,80 @@
|
|||
2006-11-03 Gary Benson <gbenson@redhat.com>
|
||||
2006-12-23 Andreas Tobler <a.tobler@schweiz.org>
|
||||
|
||||
* java/net/Inet4Address.java
|
||||
(FAMILY): Renamed to AF_INET.
|
||||
(<init>, writeReplace): Reflect the above.
|
||||
* java/net/Inet6Address.java
|
||||
(FAMILY): Renamed to AF_INET6.
|
||||
(<init>): Reflect the above.
|
||||
* classpath/tools/Makefile.am: Replace cp -a with a more portable
|
||||
cp -pR.
|
||||
* classpath/tools/Makefile.in: Regenerate.
|
||||
|
||||
2006-10-10 Tom Tromey <tromey@redhat.com>
|
||||
2006-12-18 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
PR classpath/29362:
|
||||
* gnu/xml/transform/TransformerImpl.java (transform): Only strip if
|
||||
there is a stylesheet.
|
||||
* tools/Makefile.in: Rebuilt.
|
||||
* tools/Makefile.am (GLIBJ_CLASSPATH): Look in srcdir.
|
||||
|
||||
2006-10-05 Gary Benson <gbenson@redhat.com>
|
||||
2006-12-18 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* java/net/SocketPermission.java
|
||||
(processHostport): Cope with IPv6 addresses with a
|
||||
one-digit first component.
|
||||
* tools/Makefile.in: Rebuilt.
|
||||
* tools/Makefile.am ($(TOOLS_ZIP)): Put classes in srcdir.
|
||||
* tools/asm, tools/classes: Check in .class files.
|
||||
|
||||
2006-09-25 Tom Tromey <tromey@redhat.com>
|
||||
2006-12-18 Gary Benson <gbenson@redhat.com>
|
||||
|
||||
* native/jni/gconf-peer/Makefile.in: Rebuilt.
|
||||
* native/jni/gconf-peer/Makefile.am (libgconfpeer_la_LDFLAGS): New
|
||||
variable.
|
||||
* tools/Makefile.am: Fix typo.
|
||||
* tools/Makefile.in: Rebuilt.
|
||||
|
||||
2006-09-25 Tom Tromey <tromey@redhat.com>
|
||||
2006-12-15 Andrew Haley <aph@redhat.com>
|
||||
|
||||
PR libgcj/29178:
|
||||
* gnu/java/nio/charset/US_ASCII.java (Encoder.canEncode): New method.
|
||||
(Encoder.canEncode): Likewise.
|
||||
(Encoder.encodeLoop): Return unmappable for all non-ASCII characters.
|
||||
* gnu/java/nio/charset/ByteCharset.java (Encoder.canEncode): New
|
||||
method.
|
||||
(Encoder.canEncode): Likewise.
|
||||
* gnu/java/nio/charset/ISO_8859_1.java (Encoder.canEncode): New
|
||||
method.
|
||||
(Encoder.canEncode): Likewise.
|
||||
* tools/Makefile.am (TOOLS_ZIP): Pass -g -w to javac.
|
||||
Create all-classes.lst that contains all source filenames.
|
||||
Delete asm.lst.
|
||||
|
||||
2006-09-25 Tom Tromey <tromey@redhat.com>
|
||||
2006-12-15 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* native/fdlibm/mprec.c (mprec_calloc): Renamed.
|
||||
(Balloc): Updated.
|
||||
* configure, lib/Makefile.in: Rebuilt.
|
||||
* lib/Makefile.am (compile-classes): Use JAVA_MAINTAINER_MODE.
|
||||
* configure.ac: Added --enable-java-maintainer-mode.
|
||||
|
||||
2006-09-25 Mark Wielaard <mark@klomp.org>
|
||||
2006-12-12 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
Suggested by Aaron M. Ucko <ucko@debian.org>
|
||||
Fixes bug #29203
|
||||
* native/fdlibm/mprec.c (ulp): Define L as int32_t.
|
||||
* Makefile.in, tools/Makefile.in: Rebuilt.
|
||||
* Makefile.am (SUBDIRS): Removed gcj-local change.
|
||||
(DIST_SUBDIRS): Likewise.
|
||||
* tools/Makefile.am (JCOMPILER): Use gcj, not gcjx.
|
||||
(GLIBJ_BOOTCLASSPATH): Find core classes in srcdir.
|
||||
|
||||
2006-09-22 David Daney <ddaney@avtrex.com>
|
||||
2006-12-11 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
PR classpath/28661
|
||||
* gnu/java/net/protocol/http/HTTPURLConnection.java (connect): Add
|
||||
default content-type for POST method.
|
||||
* Merged in Classpath from libgcj-import-20061211.
|
||||
|
||||
2006-09-20 Gary Benson <gbenson@redhat.com>
|
||||
2006-10-17 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* java/net/InetAddress.java: Updated to latest.
|
||||
* java/net/Inet4Address.java: Likewise.
|
||||
* java/net/Inet6Address.java: Likewise.
|
||||
* java/net/ResolverCache.java: Likewise.
|
||||
* java/net/SocketPermission.java: Likewise.
|
||||
* sun/reflect/annotation/AnnotationInvocationHandler.java
|
||||
(invoke): Clone array values before return.
|
||||
(create): New method.
|
||||
(arrayClone): Likewise.
|
||||
|
||||
* java/net/Inet4Address.java
|
||||
(AF_INET): Renamed to FAMILY.
|
||||
(<init>, writeReplace): Reflect the above.
|
||||
* java/net/Inet6Address.java
|
||||
(AF_INET6): Renamed to FAMILY.
|
||||
(<init>): Reflect the above.
|
||||
2006-10-12 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
2006-09-18 Tom Tromey <tromey@redhat.com>
|
||||
* lib/Makefile.in: Rebuilt.
|
||||
* lib/Makefile.am (JAVAC): Put classes in srcdir.
|
||||
(compile-classes): Conditional on MAINTAINER_MODE.
|
||||
|
||||
* gnu/javax/net/ssl/provider/SSLSocket.java (isBound, isClosed,
|
||||
isConnected): Removed old comment.
|
||||
(getRemoteSocketAddress): Uncommented.
|
||||
(setOOBInline, getOOBInline, setKeepAlive, getKeepAlive,
|
||||
setTrafficClass, getTrafficClass, setReuseAddress,
|
||||
getReuseAddress, shutdownInput, shutdownOutput, isInputShutdown,
|
||||
isOutputShutdown): Uncommented.
|
||||
2006-07-18 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
2006-09-11 David Daney <ddaney@avtrex.com>
|
||||
* lib/Makefile.in: Rebuilt.
|
||||
* lib/Makefile.am (JAVAC): Add -w, -g, and --encoding.
|
||||
|
||||
PR classpath/28580
|
||||
* gnu/java/net/protocol/http/Request.java (readResponse): Call
|
||||
createResponseBodyStream in more cases and with new parameter.
|
||||
(createResponseBodyStream): Added new parameter mayHaveBody. Handle
|
||||
HEAD and !mayHaveBody responses specially.
|
||||
2006-07-06 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
2006-09-05 Gary Benson <gbenson@redhat.com>
|
||||
* lib/Makefile.in: Rebuilt.
|
||||
* lib/Makefile.am (JAVAC): Define when FOUND_GCJ is true.
|
||||
(compile-classes): Remove special case for gcj.
|
||||
|
||||
* java/net/SocketPermission.java
|
||||
(maybeBracketIPv6Address): Renamed to processHostport.
|
||||
(processHostport): Also translate "" to "localhost".
|
||||
(setHostPort): Remove special cases for empty hostport and for
|
||||
extra colons in hostport (processHostport handles these now).
|
||||
|
||||
2006-08-31 Keith Seitz <keiths@redhat.com>
|
||||
2006-06-23 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* include/jvmti.h: Update from Classpath to get latest fixes and
|
||||
improvements.
|
||||
|
||||
2006-08-29 Gary Benson <gbenson@redhat.com>
|
||||
|
||||
* java/net/SocketPermission.java
|
||||
(maybeBracketIPv6Address): New method.
|
||||
(<init>): Pass the hostport argument through the above.
|
||||
|
||||
* java/net/NetworkInterface.java (getInetAddresses):
|
||||
Revert the previous change.
|
||||
|
||||
2006-08-24 Gary Benson <gbenson@redhat.com>
|
||||
|
||||
* java/net/NetworkInterface.java (getInetAddresses): Bracket IPv6
|
||||
addresses.
|
||||
|
||||
2006-08-18 Roger Sayle <roger@eyesopen.com>
|
||||
|
||||
* scripts/check_jni_methods.sh: Don't use the "set -C" command
|
||||
which isn't available in all shells.
|
||||
|
||||
2006-08-18 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* gnu/java/util/prefs/NodeWriter.java (writeParents): Removed
|
||||
debugging prints.
|
||||
* gnu/java/util/prefs/NodeReader.java (readNodes): Removed debugging
|
||||
print.
|
||||
(readEntries): Likewise.
|
||||
|
||||
2006-08-09 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
PR classpath/28666:
|
||||
* native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkScreenGraphicsDevice.c
|
||||
(Java_gnu_java_awt_peer_gtk_GdkScreenGraphicsDevice_nativeGetDisplayModes):
|
||||
Create a 'short' array.
|
||||
|
||||
2006-08-07 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
PR libgcj/28609:
|
||||
* ltconfig: Copied from gcc.
|
||||
|
||||
2006-07-20 Keith Seitz <keiths@redhat.com>
|
||||
|
||||
* include/jvmti.h: Include copy from upstream before next merge.
|
||||
|
||||
2006-07-12 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
PR libgcj/27271:
|
||||
* java/util/zip/ZipFile.java (getInputStream): Call addDummyByte
|
||||
on PartialInputStream.
|
||||
(PartialInputStream.dummyByteCount): New field.
|
||||
(PartialInputStream.fillBuffer): Handle dummy byte.
|
||||
(PartialInputStream.read): Likewise.
|
||||
(PartialInputStream.addDummyByte): New method.
|
||||
|
||||
2006-06-14 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
PR java/28024:
|
||||
* aclocal.m4, configure: Rebuilt.
|
||||
* m4/acinclude.m4 (REGEN_WITH_JAY): Use backquote, not $(...).
|
||||
* configure.ac (QT_INCLUDE_DIR): Use backquote, not $(...).
|
||||
* Imported Classpath generics 0.91, presesrving local changes.
|
||||
|
||||
2006-06-09 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
PR classpath/23863:
|
||||
* native/fdlibm/dtoa.c (_dtoa): Free contents of _Jv_reent when
|
||||
finished.
|
||||
* native/fdlibm/mprec.c: New version from newlib. Commented out
|
||||
some includes. Added <assert.h>.
|
||||
(_reent, _Bigint): New defines.
|
||||
(_REENT_CHECK_MP, _REENT_MP_FREELIST, _REENT_MP_P5S): Likewise.
|
||||
(__ULong, __Long): New types.
|
||||
(_calloc_r): New function.
|
||||
(Balloc): Dynamically add new _freelist entries as needed.
|
||||
* native/fdlibm/mprec.h (struct _Jv_Bigint): Don't use
|
||||
MAX_BIGNUMS to size _x[].
|
||||
(struct _Jv_reent): _freelist now a _Jv_Bigint**. Removed
|
||||
_allocation_map, num. Added _max_k.
|
||||
* lib/Makefile.gcj (GCJF): Added -g and -ftarget=1.5.
|
||||
|
||||
2006-05-30 Thomas Fitzsimmons <fitzsim@redhat.com>
|
||||
|
||||
|
|
60
libjava/classpath/ChangeLog.usermap
Normal file
60
libjava/classpath/ChangeLog.usermap
Normal file
|
@ -0,0 +1,60 @@
|
|||
abies:'Artur Biesiadowski <abies@pg.gda.pl>'
|
||||
alexl:'Alex Lancaster <alexl@gnu.org>'
|
||||
anwalt:'Andy Walter <anwalt_pop@aicas.com>'
|
||||
aph:'Andrew Haley <aph@redhat.com>'
|
||||
archie172:'Archie Cobbs <archie@dellroad.org>'
|
||||
arenn:'Aaron M. Renn <arenn@urbanophile.com>'
|
||||
aselkirk:'Andrew Selkirk <aselkirk@sympatico.ca>'
|
||||
audriusa:'Audrius Meskauskas <audriusa@Bioinformatics.org>'
|
||||
avdyk:'Arnaud Vandyck <arnaud.vandyck@ulg.ac.be>'
|
||||
brawer:'Sascha Brawer <brawer@dandelis.ch>'
|
||||
bryce:'Bryce McKinlay <mckinlay@redhat.com>'
|
||||
cbj:'Brian Jones <cbj@gnu.org>'
|
||||
corvus:'James E. Blair <corvus@gnu.org>'
|
||||
craig:'Craig Black <craig.black@aonix.com>'
|
||||
daryllee:'Daryl Lee <dlee@altaregos.com>'
|
||||
djee:'David Jee <djee@redhat.com>'
|
||||
dog:'Chris Burdess <dog@bluezoo.org>'
|
||||
egagnon:'Etienne M. Gagnon <etienne.gagnon@uqam.ca>'
|
||||
ericb:'Eric Blake <ebb9@byu.net>'
|
||||
fitzsim:'Thomas Fitzsimmons <fitzsim@redhat.com>'
|
||||
fnasser:'Fernando Nasser <fnasser@redhat.com>'
|
||||
gadek:'Grzegorz B. Prokopski <gadek@debian.org>'
|
||||
gcb:'Geoff Berry <gcb@gnu.org>'
|
||||
glavaux:'Guilhem Lavaux <guilhem@kaffe.org>'
|
||||
gnu_andrew:'Andrew John Hughes <gnu_andrew@member.fsf.org>'
|
||||
graydon:'graydon hoare <graydon@pobox.com>'
|
||||
green:'Anthony Green <green@redhat.com>'
|
||||
iproetel:'Ingo Proetel <proetel@aicas.com>'
|
||||
jaz:'Jon A. Zeppieri <jon@eease.com>'
|
||||
jewel:'John Leuner <jewel@pixie.co.za>'
|
||||
jfrijters:'Jeroen Frijters <jeroen@sumatra.nl>'
|
||||
jgeorgal:'Giannis Georgalis <jgeorgal@csd.uoc.gr>'
|
||||
jochen:'Jochen Hoenicke <jochen@gnu.org>'
|
||||
joey:'Joseph C. Lesh <joey@gnu.org>'
|
||||
jsturm:'Jeff Sturm <jsturm@one-point.com>'
|
||||
julian:'Julian Scheid <scheid@sektor37.de>'
|
||||
kho:'Kim Ho <kho@redhat.com>'
|
||||
mark:'Mark Wielaard <mark@klomp.org>'
|
||||
mcb:'Mark Benvenuto <mcb54@columbia.edu>'
|
||||
mkoch:'Michael Koch <konqueror@gmx.de>'
|
||||
nferrier:'Nic Ferrier <nferrier@gnu.org>'
|
||||
noa:'Noa Resare <noa@resare.com>'
|
||||
overholt:'Andrew Overholt <overholt@redhat.com>'
|
||||
patrik_reali:'Patrik Reali <patrik@reali.ch>'
|
||||
rabbit78:'Roman Kennke <roman@kennke.org>'
|
||||
raif:'Raif S. Naffah <raif@swiftdsl.com.au>'
|
||||
rao:'Paul Fisher <rao@gnu.org>'
|
||||
robilad:'Dalibor Topic <robilad@yahoo.com>'
|
||||
rodimina:'Olga Rodimina <rodimina@redhat.com>'
|
||||
rschuster:'Robert Schuster <theBohemian@gmx.net>'
|
||||
rsdio:'Casey Marshall <csm@gnu.org>'
|
||||
rupp:'Torsten Rupp <rupp@aicas.com>'
|
||||
rveldema:'Ronald Veldema <rveldema@cs.vu.nl>'
|
||||
saugart:'Steven Augart <augart@watson.ibm.com>'
|
||||
shalom:'John Keiser <shalom@gnu.org>'
|
||||
siebert:'Fridtjof Siebert <siebert@aicas.com>'
|
||||
smarothy:'Sven de Marothy <sven@physto.se>'
|
||||
stuart:'Stuart Ballard <stuart.ballard@mcmail.com>'
|
||||
tromey:'Tom Tromey <tromey@redhat.com>'
|
||||
warrenl:'Warren Levy <warrenl@redhat.com>'
|
|
@ -1,4 +1,4 @@
|
|||
Installing GNU Classpath - Last updated: September 7, 2005
|
||||
Installing GNU Classpath - Last updated: June 19, 2006
|
||||
|
||||
First, this is a development release only! Unless you are interested in
|
||||
active development and debugging, or just like running random alpha code,
|
||||
|
@ -54,6 +54,11 @@ Suggested Software
|
|||
For building gcjwebplugin you'll need the Mozilla plugin
|
||||
support headers and libraries.
|
||||
|
||||
The GConf-based backend for java.util.prefs needs the following
|
||||
library headers:
|
||||
|
||||
- gconf 2.11.2 (or higher)
|
||||
|
||||
For building the Qt AWT peer JNI native libraries you have to
|
||||
specify --enable-qt-peer and need the following library:
|
||||
|
||||
|
@ -65,10 +70,10 @@ Suggested Software
|
|||
http://escher.sourceforge.net
|
||||
|
||||
Please note that at the moment most operating systems do not
|
||||
ship Qt4 by default. We recommend using GNU Classpath' Qt4
|
||||
support only for its developers and bug reporters. See
|
||||
http://developer.classpath.org/mediation/ClasspathShowcase
|
||||
for details on how to get it to work.
|
||||
ship Qt4 by default. We recommend using GNU Classpath' Qt4
|
||||
support only for its developers and bug reporters. See
|
||||
http://developer.classpath.org/mediation/ClasspathShowcase
|
||||
for details on how to get it to work.
|
||||
|
||||
For building the xmlj JAXP implementation (disabled by default, use
|
||||
configure --enable-xmlj) you need the following installed:
|
||||
|
|
|
@ -299,6 +299,19 @@ terms:
|
|||
above copyright notice and this permission notice are included in
|
||||
all copies or substantial portions of the software.
|
||||
|
||||
The files in java/util/concurrent and subdirectories (with the
|
||||
exception of CopyOnWriteArrayList.java), along with
|
||||
java.util.NavigableMap, java.util.NavigableSet, java.util.Deque and
|
||||
java.util.ArrayDeque, are taken from JSR166 concurrency materials
|
||||
maintained by Doug Lea and distributed under the following terms:
|
||||
|
||||
Written by Doug Lea with assistance from members of JCP JSR-166
|
||||
Expert Group and released to the public domain, as explained at
|
||||
http://creativecommons.org/licenses/publicdomain
|
||||
|
||||
CopyOnWriteArrayList.java has been reimplemented for GNU Classpath,
|
||||
and is distributed under the same terms as other GNU Classpath files,
|
||||
as specified at the top of this file.
|
||||
|
||||
Directory external/relaxngDatatype
|
||||
RELAX NG Pluggable Datatype Libraries. All files are distributed under
|
||||
|
@ -345,4 +358,3 @@ the following notice:
|
|||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE.
|
||||
|
||||
|
|
|
@ -48,12 +48,14 @@ subdir = .
|
|||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
|
||||
$(top_srcdir)/../../config/lead-dot.m4 \
|
||||
$(top_srcdir)/../../config/no-executables.m4 \
|
||||
$(top_srcdir)/../../libtool.m4 $(top_srcdir)/m4/acattribute.m4 \
|
||||
$(top_srcdir)/m4/accross.m4 $(top_srcdir)/m4/acinclude.m4 \
|
||||
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
|
||||
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \
|
||||
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
|
||||
$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
|
||||
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
|
||||
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
|
||||
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
|
@ -186,6 +188,8 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION = @JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION@
|
||||
JAVA_MAINTAINER_MODE_FALSE = @JAVA_MAINTAINER_MODE_FALSE@
|
||||
JAVA_MAINTAINER_MODE_TRUE = @JAVA_MAINTAINER_MODE_TRUE@
|
||||
JAY = @JAY@
|
||||
JAY_SKELETON = @JAY_SKELETON@
|
||||
JIKES = @JIKES@
|
||||
|
@ -307,7 +311,6 @@ target_alias = @target_alias@
|
|||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
toolexeclibdir = @toolexeclibdir@
|
||||
vm_classes = @vm_classes@
|
||||
|
||||
# lib first, to compile .class files before native code, last examples
|
||||
|
|
|
@ -1,5 +1,59 @@
|
|||
New in release 0.94 (UNRELEASED)
|
||||
|
||||
* The ASM library is now included. A separate copy is no longer needed.
|
||||
|
||||
* The setReadTimeout and getReadTimeout methods have been added to
|
||||
java.net.URLConnection. They are now fully implemented for http URLs.
|
||||
|
||||
New in release 0.93 (Dec 8, 2006)
|
||||
|
||||
* CORBA objects that exist on the same virtual machine and only are connected
|
||||
to another ORB are now accessed directly and no longer via network. It is
|
||||
the same feature that RMI implementation provides. These faster calls should
|
||||
be completely transparent, as the parameters are cloned, where required.
|
||||
Currently the direct calls are only possible for the non-deprecated objects
|
||||
that are connected to the ORB via POA.
|
||||
* The 'javah' tool has been added. It requires the ASM library
|
||||
(see asm.objectweb.org); it can be enabled with the --with-asm
|
||||
option to configure
|
||||
* Added the rmi and corbaname URL context factories for JNDI.
|
||||
* Fixes in the JNDI InitialContext now allows to plug-in user implementation.
|
||||
* Removed currentClassLoader method from
|
||||
vm/reference/java/io/ObjectInputStream.java.
|
||||
* Added firstNonNullClassLoader method to
|
||||
vm/reference/gnu/classpath/VMStackWalker.java. VMs are encouraged to
|
||||
provide a more efficient implementation.
|
||||
* Added aton method to vm/reference/java/net/VMInetAddress.java.
|
||||
* NetworkInterface has been implemented for systems that provide the
|
||||
`getifaddrs' function.
|
||||
* java.nio.channels.Selector implementations have been added that use
|
||||
the kqueue notification mechanism on Mac OS X and *BSD, and that use
|
||||
the epoll notification mechanism on Linux 2.6.
|
||||
* java.nio has been refactored to support more non-blocking operations
|
||||
natively. Blocking IO classes have been refactored to call
|
||||
non-blocking classes. Non-blocking accepts, connects, and
|
||||
scatter-gather IO should now be better supported.
|
||||
* HTML support for Swing has been greatly enhanced.
|
||||
|
||||
Runtime interface changes:
|
||||
|
||||
* java.net.VMNetworkInterface and java.net.NetworkInterface have been
|
||||
updated to keep native-modified state in the former, and to simplify
|
||||
the native code in our reference implementation.
|
||||
* gnu.java.nio.VMChannel has been expanded to better support native
|
||||
non-blocking IO. Most native state data (such as file descriptor
|
||||
integers) has been abstracted away into private state in the runtime
|
||||
interface.
|
||||
* gnu.java.nio.VMPipe has been similarly changed.
|
||||
* gnu.java.net.VMPlainSocketImpl has been changed to remove some
|
||||
functionality now provided by VMChannel; datagram socket-specific
|
||||
methods have also been moved here, deprecating VMPlainDatagramSocketImpl.
|
||||
* gnu.java.net.VMPlainDatagramSocketImpl removed.
|
||||
|
||||
New in release 0.92 (Aug 9, 2006)
|
||||
|
||||
* GConf is used as a backend for java.util.prefs. GNU Classpath
|
||||
thanks to Mario Torre for this contribution!
|
||||
* libjawtgnu.so has been renamed libjawt.so for binary compatibility.
|
||||
libjawt.so should be installed in a VM-specific directory rather
|
||||
than directly in /usr/lib. Proprietary VMs put their libjawt.so
|
||||
|
@ -29,6 +83,7 @@ New in release 0.92 (Aug 9, 2006)
|
|||
* jarsigner
|
||||
A new configure option --enable-tool-wrappers causes wrapper
|
||||
binaries to be built for VMs that support the JNI Invocation API.
|
||||
* We've imported the JSR 166 (concurrency) reference implementation.
|
||||
* javax.sound.midi providers have been added to read and
|
||||
write standard MIDI files.
|
||||
* A javax.sound.sampled .au and .wav file readers have been added.
|
||||
|
|
2
libjava/classpath/aclocal.m4
vendored
2
libjava/classpath/aclocal.m4
vendored
|
@ -875,11 +875,13 @@ AC_SUBST([am__untar])
|
|||
|
||||
m4_include([../../config/depstand.m4])
|
||||
m4_include([../../config/lead-dot.m4])
|
||||
m4_include([../../config/no-executables.m4])
|
||||
m4_include([../../libtool.m4])
|
||||
m4_include([m4/acattribute.m4])
|
||||
m4_include([m4/accross.m4])
|
||||
m4_include([m4/acinclude.m4])
|
||||
m4_include([m4/ax_create_stdint_h.m4])
|
||||
m4_include([m4/gcc_attribute.m4])
|
||||
m4_include([m4/iconv.m4])
|
||||
m4_include([m4/lib-ld.m4])
|
||||
m4_include([m4/lib-link.m4])
|
||||
|
|
142
libjava/classpath/compile
Executable file
142
libjava/classpath/compile
Executable file
|
@ -0,0 +1,142 @@
|
|||
#! /bin/sh
|
||||
# Wrapper for compilers which do not understand `-c -o'.
|
||||
|
||||
scriptversion=2005-05-14.22
|
||||
|
||||
# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: compile [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Wrapper for compilers which do not understand `-c -o'.
|
||||
Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
|
||||
arguments, and rename the output as expected.
|
||||
|
||||
If you are trying to build a whole package this is not the
|
||||
right script to run: please start by reading the file `INSTALL'.
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "compile $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
ofile=
|
||||
cfile=
|
||||
eat=
|
||||
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as `compile cc -o foo foo.c'.
|
||||
# So we strip `-o arg' only if arg is an object.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.obj)
|
||||
ofile=$2
|
||||
;;
|
||||
*)
|
||||
set x "$@" -o "$2"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*.c)
|
||||
cfile=$1
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
|
||||
if test -z "$ofile" || test -z "$cfile"; then
|
||||
# If no `-o' option was seen then we might have been invoked from a
|
||||
# pattern rule where we don't need one. That is ok -- this is a
|
||||
# normal compilation that the losing compiler can handle. If no
|
||||
# `.c' file was seen then we are probably linking. That is also
|
||||
# ok.
|
||||
exec "$@"
|
||||
fi
|
||||
|
||||
# Name of file we expect compiler to create.
|
||||
cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
|
||||
|
||||
# Create the lock directory.
|
||||
# Note: use `[/.-]' here to ensure that we don't use the same name
|
||||
# that we are using for the .o file. Also, base the name on the expected
|
||||
# object file name, since that is what matters with a parallel build.
|
||||
lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
|
||||
while true; do
|
||||
if mkdir "$lockdir" >/dev/null 2>&1; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
# FIXME: race condition here if user kills between mkdir and trap.
|
||||
trap "rmdir '$lockdir'; exit 1" 1 2 15
|
||||
|
||||
# Run the compile.
|
||||
"$@"
|
||||
ret=$?
|
||||
|
||||
if test -f "$cofile"; then
|
||||
mv "$cofile" "$ofile"
|
||||
elif test -f "${cofile}bj"; then
|
||||
mv "${cofile}bj" "$ofile"
|
||||
fi
|
||||
|
||||
rmdir "$lockdir"
|
||||
exit $ret
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
664
libjava/classpath/config.guess
vendored
664
libjava/classpath/config.guess
vendored
File diff suppressed because it is too large
Load diff
218
libjava/classpath/config.sub
vendored
218
libjava/classpath/config.sub
vendored
|
@ -1,10 +1,9 @@
|
|||
#! /bin/sh
|
||||
# Configuration validation subroutine script.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
|
||||
# Inc.
|
||||
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2006-05-13'
|
||||
timestamp='2003-06-18'
|
||||
|
||||
# This file is (in principle) common to ALL GNU software.
|
||||
# The presence of a machine in this file suggests that SOME GNU software
|
||||
|
@ -22,15 +21,14 @@ timestamp='2006-05-13'
|
|||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
|
||||
# 02110-1301, USA.
|
||||
#
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
# Boston, MA 02111-1307, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
|
||||
# Please send patches to <config-patches@gnu.org>. Submit a context
|
||||
# diff and a properly formatted ChangeLog entry.
|
||||
#
|
||||
|
@ -72,7 +70,7 @@ Report bugs and patches to <config-patches@gnu.org>."
|
|||
version="\
|
||||
GNU config.sub ($timestamp)
|
||||
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
|
@ -85,11 +83,11 @@ Try \`$me --help' for more information."
|
|||
while test $# -gt 0 ; do
|
||||
case $1 in
|
||||
--time-stamp | --time* | -t )
|
||||
echo "$timestamp" ; exit ;;
|
||||
echo "$timestamp" ; exit 0 ;;
|
||||
--version | -v )
|
||||
echo "$version" ; exit ;;
|
||||
echo "$version" ; exit 0 ;;
|
||||
--help | --h* | -h )
|
||||
echo "$usage"; exit ;;
|
||||
echo "$usage"; exit 0 ;;
|
||||
-- ) # Stop option processing
|
||||
shift; break ;;
|
||||
- ) # Use stdin as input.
|
||||
|
@ -101,7 +99,7 @@ while test $# -gt 0 ; do
|
|||
*local*)
|
||||
# First pass through any local machine types.
|
||||
echo $1
|
||||
exit ;;
|
||||
exit 0;;
|
||||
|
||||
* )
|
||||
break ;;
|
||||
|
@ -120,9 +118,7 @@ esac
|
|||
# Here we must recognize all the valid KERNEL-OS combinations.
|
||||
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
|
||||
case $maybe_os in
|
||||
nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
|
||||
uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
|
||||
storm-chaos* | os2-emx* | rtmk-nova*)
|
||||
nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
|
||||
os=-$maybe_os
|
||||
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
|
||||
;;
|
||||
|
@ -148,7 +144,7 @@ case $os in
|
|||
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
|
||||
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
|
||||
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
|
||||
-apple | -axis | -knuth | -cray)
|
||||
-apple | -axis)
|
||||
os=
|
||||
basic_machine=$1
|
||||
;;
|
||||
|
@ -173,10 +169,6 @@ case $os in
|
|||
-hiux*)
|
||||
os=-hiuxwe2
|
||||
;;
|
||||
-sco6)
|
||||
os=-sco5v6
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-sco5)
|
||||
os=-sco3.2v5
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
|
@ -193,10 +185,6 @@ case $os in
|
|||
# Don't forget version if it is 3.2v4 or newer.
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-sco5v6*)
|
||||
# Don't forget version if it is 3.2v4 or newer.
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-sco*)
|
||||
os=-sco3.2v2
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
|
@ -240,17 +228,14 @@ case $basic_machine in
|
|||
| a29k \
|
||||
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
|
||||
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
|
||||
| am33_2.0 \
|
||||
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
|
||||
| bfin \
|
||||
| c4x | clipper \
|
||||
| d10v | d30v | dlx | dsp16xx \
|
||||
| fr30 | frv \
|
||||
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
|
||||
| i370 | i860 | i960 | ia64 \
|
||||
| ip2k | iq2000 \
|
||||
| m32c | m32r | m32rle | m68000 | m68k | m88k \
|
||||
| maxq | mb | microblaze | mcore \
|
||||
| ip2k \
|
||||
| m32r | m68000 | m68k | m88k | mcore \
|
||||
| mips | mipsbe | mipseb | mipsel | mipsle \
|
||||
| mips16 \
|
||||
| mips64 | mips64el \
|
||||
|
@ -259,32 +244,28 @@ case $basic_machine in
|
|||
| mips64vr4100 | mips64vr4100el \
|
||||
| mips64vr4300 | mips64vr4300el \
|
||||
| mips64vr5000 | mips64vr5000el \
|
||||
| mips64vr5900 | mips64vr5900el \
|
||||
| mipsisa32 | mipsisa32el \
|
||||
| mipsisa32r2 | mipsisa32r2el \
|
||||
| mipsisa64 | mipsisa64el \
|
||||
| mipsisa64r2 | mipsisa64r2el \
|
||||
| mipsisa64sb1 | mipsisa64sb1el \
|
||||
| mipsisa64sr71k | mipsisa64sr71kel \
|
||||
| mipstx39 | mipstx39el \
|
||||
| mn10200 | mn10300 \
|
||||
| mt \
|
||||
| msp430 \
|
||||
| nios | nios2 \
|
||||
| ns16k | ns32k \
|
||||
| or32 \
|
||||
| openrisc | or32 \
|
||||
| pdp10 | pdp11 | pj | pjl \
|
||||
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
|
||||
| pyramid \
|
||||
| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
|
||||
| s390 | s390x \
|
||||
| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
|
||||
| sh64 | sh64le \
|
||||
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
|
||||
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
|
||||
| spu | strongarm \
|
||||
| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \
|
||||
| strongarm \
|
||||
| tahoe | thumb | tic4x | tic80 | tron \
|
||||
| v850 | v850e \
|
||||
| we32k \
|
||||
| x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
|
||||
| x86 | xscale | xstormy16 | xtensa \
|
||||
| z8k)
|
||||
basic_machine=$basic_machine-unknown
|
||||
;;
|
||||
|
@ -295,9 +276,6 @@ case $basic_machine in
|
|||
;;
|
||||
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
|
||||
;;
|
||||
ms1)
|
||||
basic_machine=mt-unknown
|
||||
;;
|
||||
|
||||
# We use `pc' rather than `unknown'
|
||||
# because (1) that's what they normally are, and
|
||||
|
@ -318,19 +296,19 @@ case $basic_machine in
|
|||
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
|
||||
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
|
||||
| avr-* \
|
||||
| bfin-* | bs2000-* \
|
||||
| bs2000-* \
|
||||
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
|
||||
| clipper-* | craynv-* | cydra-* \
|
||||
| clipper-* | cydra-* \
|
||||
| d10v-* | d30v-* | dlx-* \
|
||||
| elxsi-* \
|
||||
| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
|
||||
| h8300-* | h8500-* \
|
||||
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
|
||||
| i*86-* | i860-* | i960-* | ia64-* \
|
||||
| ip2k-* | iq2000-* \
|
||||
| m32c-* | m32r-* | m32rle-* \
|
||||
| ip2k-* \
|
||||
| m32r-* \
|
||||
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
|
||||
| m88110-* | m88k-* | maxq-* | mcore-* \
|
||||
| m88110-* | m88k-* | mcore-* \
|
||||
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
|
||||
| mips16-* \
|
||||
| mips64-* | mips64el-* \
|
||||
|
@ -339,36 +317,31 @@ case $basic_machine in
|
|||
| mips64vr4100-* | mips64vr4100el-* \
|
||||
| mips64vr4300-* | mips64vr4300el-* \
|
||||
| mips64vr5000-* | mips64vr5000el-* \
|
||||
| mips64vr5900-* | mips64vr5900el-* \
|
||||
| mipsisa32-* | mipsisa32el-* \
|
||||
| mipsisa32r2-* | mipsisa32r2el-* \
|
||||
| mipsisa64-* | mipsisa64el-* \
|
||||
| mipsisa64r2-* | mipsisa64r2el-* \
|
||||
| mipsisa64sb1-* | mipsisa64sb1el-* \
|
||||
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
|
||||
| mipstx39-* | mipstx39el-* \
|
||||
| mmix-* \
|
||||
| mt-* \
|
||||
| msp430-* \
|
||||
| nios-* | nios2-* \
|
||||
| none-* | np1-* | ns16k-* | ns32k-* \
|
||||
| none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
|
||||
| orion-* \
|
||||
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
|
||||
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
|
||||
| pyramid-* \
|
||||
| romp-* | rs6000-* \
|
||||
| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
|
||||
| s390-* | s390x-* \
|
||||
| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
|
||||
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
|
||||
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
|
||||
| sparclite-* \
|
||||
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
|
||||
| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
|
||||
| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
|
||||
| tahoe-* | thumb-* \
|
||||
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
|
||||
| tron-* \
|
||||
| v850-* | v850e-* | vax-* \
|
||||
| we32k-* \
|
||||
| x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
|
||||
| xstormy16-* | xtensa-* \
|
||||
| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
|
||||
| xtensa-* \
|
||||
| ymp-* \
|
||||
| z8k-*)
|
||||
;;
|
||||
|
@ -388,9 +361,6 @@ case $basic_machine in
|
|||
basic_machine=a29k-amd
|
||||
os=-udi
|
||||
;;
|
||||
abacus)
|
||||
basic_machine=abacus-unknown
|
||||
;;
|
||||
adobe68k)
|
||||
basic_machine=m68010-adobe
|
||||
os=-scout
|
||||
|
@ -408,9 +378,6 @@ case $basic_machine in
|
|||
amd64)
|
||||
basic_machine=x86_64-pc
|
||||
;;
|
||||
amd64-*)
|
||||
basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
amdahl)
|
||||
basic_machine=580-amdahl
|
||||
os=-sysv
|
||||
|
@ -470,27 +437,12 @@ case $basic_machine in
|
|||
basic_machine=j90-cray
|
||||
os=-unicos
|
||||
;;
|
||||
craynv)
|
||||
basic_machine=craynv-cray
|
||||
os=-unicosmp
|
||||
;;
|
||||
cr16c)
|
||||
basic_machine=cr16c-unknown
|
||||
os=-elf
|
||||
;;
|
||||
crds | unos)
|
||||
basic_machine=m68k-crds
|
||||
;;
|
||||
crisv32 | crisv32-* | etraxfs*)
|
||||
basic_machine=crisv32-axis
|
||||
;;
|
||||
cris | cris-* | etrax*)
|
||||
basic_machine=cris-axis
|
||||
;;
|
||||
crx)
|
||||
basic_machine=crx-unknown
|
||||
os=-elf
|
||||
;;
|
||||
da30 | da30-*)
|
||||
basic_machine=m68k-da30
|
||||
;;
|
||||
|
@ -513,10 +465,6 @@ case $basic_machine in
|
|||
basic_machine=m88k-motorola
|
||||
os=-sysv3
|
||||
;;
|
||||
djgpp)
|
||||
basic_machine=i586-pc
|
||||
os=-msdosdjgpp
|
||||
;;
|
||||
dpx20 | dpx20-*)
|
||||
basic_machine=rs6000-bull
|
||||
os=-bosx
|
||||
|
@ -695,6 +643,10 @@ case $basic_machine in
|
|||
mips3*)
|
||||
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
|
||||
;;
|
||||
mmix*)
|
||||
basic_machine=mmix-knuth
|
||||
os=-mmixware
|
||||
;;
|
||||
monitor)
|
||||
basic_machine=m68k-rom68k
|
||||
os=-coff
|
||||
|
@ -707,9 +659,6 @@ case $basic_machine in
|
|||
basic_machine=i386-pc
|
||||
os=-msdos
|
||||
;;
|
||||
ms1-*)
|
||||
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
|
||||
;;
|
||||
mvs)
|
||||
basic_machine=i370-ibm
|
||||
os=-mvs
|
||||
|
@ -778,6 +727,10 @@ case $basic_machine in
|
|||
np1)
|
||||
basic_machine=np1-gould
|
||||
;;
|
||||
nv1)
|
||||
basic_machine=nv1-cray
|
||||
os=-unicosmp
|
||||
;;
|
||||
nsr-tandem)
|
||||
basic_machine=nsr-tandem
|
||||
;;
|
||||
|
@ -785,12 +738,9 @@ case $basic_machine in
|
|||
basic_machine=hppa1.1-oki
|
||||
os=-proelf
|
||||
;;
|
||||
openrisc | openrisc-*)
|
||||
or32 | or32-*)
|
||||
basic_machine=or32-unknown
|
||||
;;
|
||||
os400)
|
||||
basic_machine=powerpc-ibm
|
||||
os=-os400
|
||||
os=-coff
|
||||
;;
|
||||
OSE68000 | ose68000)
|
||||
basic_machine=m68000-ericsson
|
||||
|
@ -817,12 +767,6 @@ case $basic_machine in
|
|||
pc532 | pc532-*)
|
||||
basic_machine=ns32k-pc532
|
||||
;;
|
||||
pc98)
|
||||
basic_machine=i386-pc
|
||||
;;
|
||||
pc98-*)
|
||||
basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pentium | p5 | k5 | k6 | nexgen | viac3)
|
||||
basic_machine=i586-pc
|
||||
;;
|
||||
|
@ -879,10 +823,6 @@ case $basic_machine in
|
|||
basic_machine=i586-unknown
|
||||
os=-pw32
|
||||
;;
|
||||
rdos)
|
||||
basic_machine=i386-pc
|
||||
os=-rdos
|
||||
;;
|
||||
rom68k)
|
||||
basic_machine=m68k-rom68k
|
||||
os=-coff
|
||||
|
@ -893,12 +833,6 @@ case $basic_machine in
|
|||
rtpc | rtpc-*)
|
||||
basic_machine=romp-ibm
|
||||
;;
|
||||
s390 | s390-*)
|
||||
basic_machine=s390-ibm
|
||||
;;
|
||||
s390x | s390x-*)
|
||||
basic_machine=s390x-ibm
|
||||
;;
|
||||
sa29200)
|
||||
basic_machine=a29k-amd
|
||||
os=-udi
|
||||
|
@ -1022,10 +956,6 @@ case $basic_machine in
|
|||
tower | tower-32)
|
||||
basic_machine=m68k-ncr
|
||||
;;
|
||||
tpf)
|
||||
basic_machine=s390x-ibm
|
||||
os=-tpf
|
||||
;;
|
||||
udi29k)
|
||||
basic_machine=a29k-amd
|
||||
os=-udi
|
||||
|
@ -1069,10 +999,6 @@ case $basic_machine in
|
|||
basic_machine=hppa1.1-winbond
|
||||
os=-proelf
|
||||
;;
|
||||
xbox)
|
||||
basic_machine=i686-pc
|
||||
os=-mingw32
|
||||
;;
|
||||
xps | xps100)
|
||||
basic_machine=xps100-honeywell
|
||||
;;
|
||||
|
@ -1103,9 +1029,6 @@ case $basic_machine in
|
|||
romp)
|
||||
basic_machine=romp-ibm
|
||||
;;
|
||||
mmix)
|
||||
basic_machine=mmix-knuth
|
||||
;;
|
||||
rs6000)
|
||||
basic_machine=rs6000-ibm
|
||||
;;
|
||||
|
@ -1122,10 +1045,13 @@ case $basic_machine in
|
|||
we32k)
|
||||
basic_machine=we32k-att
|
||||
;;
|
||||
sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
|
||||
sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
|
||||
basic_machine=sh-unknown
|
||||
;;
|
||||
sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
|
||||
sh64)
|
||||
basic_machine=sh64-unknown
|
||||
;;
|
||||
sparc | sparcv8 | sparcv9 | sparcv9b)
|
||||
basic_machine=sparc-sun
|
||||
;;
|
||||
cydra)
|
||||
|
@ -1198,23 +1124,19 @@ case $os in
|
|||
| -aos* \
|
||||
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
|
||||
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
|
||||
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
|
||||
| -openbsd* | -solidbsd* \
|
||||
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
|
||||
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
|
||||
| -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
|
||||
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
|
||||
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
|
||||
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
|
||||
| -chorusos* | -chorusrdb* \
|
||||
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||||
| -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
|
||||
| -uxpv* | -beos* | -mpeix* | -udk* \
|
||||
| -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
|
||||
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
|
||||
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
|
||||
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
|
||||
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
|
||||
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
|
||||
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
|
||||
| -skyos* | -haiku* | -rdos*)
|
||||
| -powermax* | -dnix* | -nx6 | -nx7 | -sei*)
|
||||
# Remember, each alternative MUST END IN *, to match a version number.
|
||||
;;
|
||||
-qnx*)
|
||||
|
@ -1232,15 +1154,12 @@ case $os in
|
|||
os=`echo $os | sed -e 's|nto|nto-qnx|'`
|
||||
;;
|
||||
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
|
||||
| -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
|
||||
| -windows* | -osx | -abug | -netware* | -os9* | -beos* \
|
||||
| -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
|
||||
;;
|
||||
-mac*)
|
||||
os=`echo $os | sed -e 's|mac|macos|'`
|
||||
;;
|
||||
-linux-dietlibc)
|
||||
os=-linux-dietlibc
|
||||
;;
|
||||
-linux*)
|
||||
os=`echo $os | sed -e 's|linux|linux-gnu|'`
|
||||
;;
|
||||
|
@ -1253,9 +1172,6 @@ case $os in
|
|||
-opened*)
|
||||
os=-openedition
|
||||
;;
|
||||
-os400*)
|
||||
os=-os400
|
||||
;;
|
||||
-wince*)
|
||||
os=-wince
|
||||
;;
|
||||
|
@ -1277,9 +1193,6 @@ case $os in
|
|||
-atheos*)
|
||||
os=-atheos
|
||||
;;
|
||||
-syllable*)
|
||||
os=-syllable
|
||||
;;
|
||||
-386bsd)
|
||||
os=-bsd
|
||||
;;
|
||||
|
@ -1302,9 +1215,6 @@ case $os in
|
|||
-sinix*)
|
||||
os=-sysv4
|
||||
;;
|
||||
-tpf*)
|
||||
os=-tpf
|
||||
;;
|
||||
-triton*)
|
||||
os=-sysv3
|
||||
;;
|
||||
|
@ -1341,9 +1251,6 @@ case $os in
|
|||
-kaos*)
|
||||
os=-kaos
|
||||
;;
|
||||
-zvmoe)
|
||||
os=-zvmoe
|
||||
;;
|
||||
-none)
|
||||
;;
|
||||
*)
|
||||
|
@ -1366,9 +1273,6 @@ else
|
|||
# system, and we'll never get to this point.
|
||||
|
||||
case $basic_machine in
|
||||
spu-*)
|
||||
os=-elf
|
||||
;;
|
||||
*-acorn)
|
||||
os=-riscix1.2
|
||||
;;
|
||||
|
@ -1378,8 +1282,8 @@ case $basic_machine in
|
|||
arm*-semi)
|
||||
os=-aout
|
||||
;;
|
||||
c4x-* | tic4x-*)
|
||||
os=-coff
|
||||
c4x-* | tic4x-*)
|
||||
os=-coff
|
||||
;;
|
||||
# This must come before the *-dec entry.
|
||||
pdp10-*)
|
||||
|
@ -1424,15 +1328,9 @@ case $basic_machine in
|
|||
*-be)
|
||||
os=-beos
|
||||
;;
|
||||
*-haiku)
|
||||
os=-haiku
|
||||
;;
|
||||
*-ibm)
|
||||
os=-aix
|
||||
;;
|
||||
*-knuth)
|
||||
os=-mmixware
|
||||
;;
|
||||
*-wec)
|
||||
os=-proelf
|
||||
;;
|
||||
|
@ -1565,15 +1463,9 @@ case $basic_machine in
|
|||
-mvs* | -opened*)
|
||||
vendor=ibm
|
||||
;;
|
||||
-os400*)
|
||||
vendor=ibm
|
||||
;;
|
||||
-ptx*)
|
||||
vendor=sequent
|
||||
;;
|
||||
-tpf*)
|
||||
vendor=ibm
|
||||
;;
|
||||
-vxsim* | -vxworks* | -windiss*)
|
||||
vendor=wrs
|
||||
;;
|
||||
|
@ -1598,7 +1490,7 @@ case $basic_machine in
|
|||
esac
|
||||
|
||||
echo $basic_machine$os
|
||||
exit
|
||||
exit 0
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
|
|
2508
libjava/classpath/configure
vendored
2508
libjava/classpath/configure
vendored
File diff suppressed because it is too large
Load diff
|
@ -6,11 +6,18 @@ dnl -----------------------------------------------------------
|
|||
dnl define([AC_CACHE_LOAD], )dnl
|
||||
dnl define([AC_CACHE_SAVE], )dnl
|
||||
|
||||
AC_INIT([GNU Classpath],[0.92],[classpath@gnu.org],[classpath])
|
||||
AC_INIT([GNU Classpath],[0.94-pre],[classpath@gnu.org],[classpath])
|
||||
AC_CONFIG_SRCDIR(java/lang/System.java)
|
||||
|
||||
AC_CANONICAL_TARGET
|
||||
|
||||
dnl GCJ LOCAL
|
||||
AC_ARG_ENABLE(java-maintainer-mode,
|
||||
AS_HELP_STRING([--enable-java-maintainer-mode],
|
||||
[allow rebuilding of .class and .h files]))
|
||||
AM_CONDITIONAL(JAVA_MAINTAINER_MODE, test "$enable_java_maintainer_mode" = yes)
|
||||
dnl END GCJ LOCAL
|
||||
|
||||
dnl -----------------------------------------------------------
|
||||
dnl Fold all IA-32 CPU architectures into "x86"
|
||||
dnl -----------------------------------------------------------
|
||||
|
@ -41,6 +48,9 @@ AM_INIT_AUTOMAKE([1.9.0 gnu std-options tar-ustar])
|
|||
AC_CONFIG_HEADERS([include/config.h])
|
||||
AC_PREFIX_DEFAULT(/usr/local/classpath)
|
||||
|
||||
dnl GCC LOCAL
|
||||
GCC_NO_EXECUTABLES
|
||||
|
||||
dnl -----------------------------------------------------------
|
||||
dnl Enable collections.jar (disabled by default)
|
||||
dnl -----------------------------------------------------------
|
||||
|
@ -85,13 +95,17 @@ AM_CONDITIONAL(CREATE_CORE_JNI_LIBRARIES, test "x${COMPILE_CORE_JNI}" = xyes)
|
|||
dnl -----------------------------------------------------------
|
||||
dnl Default Preference Backend
|
||||
dnl -----------------------------------------------------------
|
||||
AC_ARG_ENABLE(default-preferences-peer,
|
||||
AS_HELP_STRING([--enable-default-preferences-peer],
|
||||
[fully qualified class name of default Preferences API Backend]))
|
||||
DEFAULT_PREFS_PEER=$enable_default_preferences_peer
|
||||
if test "$DEFAULT_PREFS_PEER" = ""; then
|
||||
DEFAULT_PREFS_PEER=gnu.java.util.prefs.FileBasedFactory
|
||||
fi
|
||||
AC_ARG_ENABLE([default-preferences-peer],
|
||||
[AS_HELP_STRING([--enable-default-preferences-peer@<:@=peer type or class name@:>@],
|
||||
[specify one of: "gconf" [default] for a GConf based backend, "file" for a file based one, "memory" for a transient one, or a fully qualified class name implementing java.util.prefs.PreferencesFactory])],
|
||||
[case "${enableval}" in
|
||||
file) DEFAULT_PREFS_PEER=gnu.java.util.prefs.FileBasedFactory ;;
|
||||
gconf|yes|true) DEFAULT_PREFS_PEER=gnu.java.util.prefs.GConfBasedFactory ;;
|
||||
memory) DEFAULT_PREFS_PEER=gnu.java.util.prefs.MemoryBasedFactory ;;
|
||||
no|false) AC_MSG_ERROR(bad value '${enableval}' for --enable-default-preferences-peer) ;;
|
||||
*) DEFAULT_PREFS_PEER=${enableval} ;;
|
||||
esac],
|
||||
[DEFAULT_PREFS_PEER=gnu.java.util.prefs.GConfBasedFactory])
|
||||
dnl AC_SUBST(DEFAULT_PREFS_PEER)
|
||||
|
||||
dnl -----------------------------------------------------------
|
||||
|
@ -120,9 +134,9 @@ AC_ARG_ENABLE([Werror],
|
|||
[case "${enableval}" in
|
||||
yes) ENABLE_WERROR=yes ;;
|
||||
no) ENABLE_WERROR=no ;;
|
||||
*) ENABLE_WERROR=no ;;
|
||||
*) ENABLE_WERROR=default ;;
|
||||
esac],
|
||||
[ENABLE_WERROR=no])
|
||||
[ENABLE_WERROR=default])
|
||||
|
||||
dnl -----------------------------------------------------------
|
||||
dnl Default AWT toolkit
|
||||
|
@ -221,25 +235,16 @@ AC_ARG_ENABLE([plugin],
|
|||
[COMPILE_PLUGIN=yes])
|
||||
AM_CONDITIONAL(CREATE_PLUGIN, test "x${COMPILE_PLUGIN}" = xyes)
|
||||
|
||||
dnl -----------------------------------------------------------
|
||||
dnl GCJ LOCAL: Calculates and substitutes toolexeclibdir. $libdir is
|
||||
dnl defined to the same value for all multilibs. We define toolexeclibdir
|
||||
dnl so that we can refer to the multilib installation directories from
|
||||
dnl classpath's build files.
|
||||
dnl -----------------------------------------------------------
|
||||
CLASSPATH_TOOLEXECLIBDIR
|
||||
|
||||
dnl -----------------------------------------------------------
|
||||
dnl Sets the native libraries installation dir
|
||||
dnl -----------------------------------------------------------
|
||||
dnl GCJ LOCAL: default to ${toolexeclibdir}/gcj-${gcc_version}
|
||||
AC_ARG_WITH([native-libdir],
|
||||
[AS_HELP_STRING(--with-native-libdir,sets the installation directory for native libraries [default='${libdir}/${PACKAGE}'])],
|
||||
[
|
||||
nativeexeclibdir=${withval}
|
||||
],
|
||||
[
|
||||
nativeexeclibdir='${toolexeclibdir}/gcj-'`cat ${srcdir}/../../gcc/BASE-VER`
|
||||
nativeexeclibdir='${libdir}/${PACKAGE}'
|
||||
])
|
||||
|
||||
AC_SUBST(nativeexeclibdir)
|
||||
|
@ -292,7 +297,11 @@ dnl -----------------------------------------------------------
|
|||
AC_ARG_ENABLE([tool-wrappers],
|
||||
[AS_HELP_STRING(--enable-tool-wrappers,create tool wrapper binaries [default=no])],
|
||||
[case x"${enableval}" in
|
||||
xyes) COMPILE_WRAPPERS=yes ;;
|
||||
xyes)
|
||||
COMPILE_WRAPPERS=yes;
|
||||
AC_CHECK_HEADERS([ltdl.h],, [AC_MSG_ERROR(cannot find ltdl.h)])
|
||||
AC_CHECK_LIB(ltdl, lt_dlopen,, [AC_MSG_ERROR(cannot find libltdl)])
|
||||
;;
|
||||
xno) COMPILE_WRAPPERS=no ;;
|
||||
x) COMPILE_WRAPPERS=yes ;;
|
||||
*) COMPILE_WRAPPERS=yes ;;
|
||||
|
@ -306,13 +315,25 @@ AC_PROG_INSTALL
|
|||
dnl -----------------------------------------------------------
|
||||
dnl Checks for programs.
|
||||
dnl -----------------------------------------------------------
|
||||
AC_PROG_CXX
|
||||
|
||||
dnl Initialize libtool
|
||||
AC_DISABLE_STATIC
|
||||
AC_PROG_LIBTOOL
|
||||
dnl AC_PROG_AWK
|
||||
AC_PROG_CC
|
||||
AC_PROG_CPP
|
||||
AC_PROG_CXX
|
||||
|
||||
# Handle -Werror default case.
|
||||
if test "$ENABLE_WERROR" = default; then
|
||||
case "$host_os" in
|
||||
*linux*)
|
||||
if test "$GCC" = yes; then
|
||||
ENABLE_WERROR=yes
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if test "x${COMPILE_COLLECTIONS}" = xyes; then
|
||||
AC_PATH_PROG(PERL, [perl])
|
||||
|
@ -323,6 +344,8 @@ if test "x${COMPILE_COLLECTIONS}" = xyes; then
|
|||
fi
|
||||
|
||||
if test "x${COMPILE_JNI}" = xyes; then
|
||||
GCC_ATTRIBUTE_UNUSED
|
||||
|
||||
AC_HEADER_STDC
|
||||
|
||||
dnl Checking sizeof void * is needed for fdlibm to work properly on ppc64,
|
||||
|
@ -344,7 +367,9 @@ if test "x${COMPILE_JNI}" = xyes; then
|
|||
crt_externs.h \
|
||||
fcntl.h \
|
||||
sys/mman.h \
|
||||
magic.h])
|
||||
magic.h \
|
||||
sys/event.h sys/epoll.h \
|
||||
ifaddrs.h])
|
||||
|
||||
AC_EGREP_HEADER(uint32_t, stdint.h, AC_DEFINE(HAVE_INT32_DEFINED, 1, [Define to 1 if you have uint32_t]))
|
||||
AC_EGREP_HEADER(uint32_t, inttypes.h, AC_DEFINE(HAVE_INT32_DEFINED, 1, [Define to 1 if you have uint32_t]))
|
||||
|
@ -353,20 +378,29 @@ if test "x${COMPILE_JNI}" = xyes; then
|
|||
|
||||
AC_CHECK_FUNCS([ftruncate fsync select \
|
||||
gethostname socket strerror fork pipe execve open close \
|
||||
lseek fstat read write htonl memset htons connect \
|
||||
lseek fstat read readv write writev htonl memset htons connect \
|
||||
getsockname getpeername bind listen accept \
|
||||
recvfrom send sendto setsockopt getsockopt time mktime \
|
||||
localtime_r \
|
||||
gethostbyname_r localtime_r \
|
||||
strerror_r \
|
||||
fcntl \
|
||||
mmap munmap mincore msync madvise getpagesize sysconf \
|
||||
lstat readlink \
|
||||
])
|
||||
inet_aton inet_addr inet_pton \
|
||||
getifaddrs kqueue kevent epoll_create \
|
||||
readdir_r ])
|
||||
|
||||
LIBMAGIC=
|
||||
AC_CHECK_LIB(magic, magic_open, LIBMAGIC=-lmagic)
|
||||
AC_SUBST(LIBMAGIC)
|
||||
|
||||
AC_MSG_CHECKING([whether struct sockaddr_in6 is in netinet/in.h])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <netinet/in.h>]], [[struct sockaddr_in6 addr6;]])],
|
||||
[AC_DEFINE(HAVE_INET6, 1,
|
||||
[Define if inet6 structures are defined in netinet/in.h.])
|
||||
AC_MSG_RESULT(yes)],
|
||||
[AC_MSG_RESULT(no)])
|
||||
|
||||
AC_HEADER_TIME
|
||||
AC_STRUCT_TM
|
||||
AC_STRUCT_TIMEZONE
|
||||
|
@ -401,17 +435,17 @@ if test "x${COMPILE_JNI}" = xyes; then
|
|||
|
||||
dnl When using gcc we want warnings, lots of warnings :-)
|
||||
if test "x${GCC}" = xyes; then
|
||||
dnl We want ISO C90 pedantic ansi, but with longlong (jlong) support
|
||||
dnl We want ISO C90 ansi, but with longlong (jlong) support
|
||||
dnl and modern POSIX and BSD C library functions/prototypes.
|
||||
|
||||
dnl Warning flags for (almost) everybody.
|
||||
dnl Should probably be configurable
|
||||
WARNING_CFLAGS='-pedantic -W -Wall -Wmissing-declarations -Wwrite-strings -Wmissing-prototypes -Wno-long-long'
|
||||
WARNING_CFLAGS='-W -Wall -Wmissing-declarations -Wwrite-strings -Wmissing-prototypes -Wno-long-long'
|
||||
AC_SUBST(WARNING_CFLAGS)
|
||||
|
||||
dnl Strict warning flags which not every module uses.
|
||||
dnl Should probably be configurable.
|
||||
STRICT_WARNING_CFLAGS=-Wstrict-prototypes
|
||||
STRICT_WARNING_CFLAGS='-Wstrict-prototypes -pedantic'
|
||||
AC_SUBST(STRICT_WARNING_CFLAGS)
|
||||
|
||||
dnl Whether or not to add -Werror, also not used by all modueles.
|
||||
|
@ -538,6 +572,28 @@ if test "x${COMPILE_JNI}" = xyes; then
|
|||
AC_SUBST(QT_CFLAGS)
|
||||
AC_SUBST(QT_LIBS)
|
||||
fi
|
||||
dnl **********************************************************************
|
||||
dnl Check for MSG_NOSIGNAL
|
||||
dnl **********************************************************************
|
||||
AC_MSG_CHECKING(for MSG_NOSIGNAL)
|
||||
AC_TRY_COMPILE([#include <sys/socket.h>],
|
||||
[ int f = MSG_NOSIGNAL; ],
|
||||
[ AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_MSG_NOSIGNAL, 1,
|
||||
[Define this symbol if you have MSG_NOSIGNAL]) ],
|
||||
[ AC_MSG_RESULT(no)]
|
||||
)
|
||||
dnl **********************************************************************
|
||||
dnl Check for SO_NOSIGPIPE (Darwin equivalent for MSG_NOSIGNAL)
|
||||
dnl **********************************************************************
|
||||
AC_MSG_CHECKING(for SO_NOSIGPIPE )
|
||||
AC_TRY_COMPILE([#include <sys/socket.h>],
|
||||
[ int f = SO_NOSIGPIPE; ],
|
||||
[ AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_SO_NOSIGPIPE, 1,
|
||||
[Define this symbol if you have SO_NOSIGPIPE]) ],
|
||||
[ AC_MSG_RESULT(no)]
|
||||
)
|
||||
|
||||
dnl Check for plugin support headers and libraries.
|
||||
if test "x${COMPILE_PLUGIN}" = xyes; then
|
||||
|
@ -551,6 +607,9 @@ if test "x${COMPILE_JNI}" = xyes; then
|
|||
if test "x${MOZILLA_FOUND}" = xno; then
|
||||
PKG_CHECK_MODULES(MOZILLA, mozilla-firefox-plugin, [MOZILLA_FOUND=yes], [MOZILLA_FOUND=no])
|
||||
fi
|
||||
if test "x${MOZILLA_FOUND}" = xno; then
|
||||
PKG_CHECK_MODULES(MOZILLA, seamonkey-plugin, [MOZILLA_FOUND=yes], [MOZILLA_FOUND=no])
|
||||
fi
|
||||
PKG_CHECK_MODULES(GLIB, glib-2.0)
|
||||
|
||||
AC_SUBST(MOZILLA_CFLAGS)
|
||||
|
@ -568,7 +627,7 @@ dnl -----------------------------------------------------------
|
|||
dnl Add the include files for the native abstraction layer.
|
||||
dnl Used by AM_CPPFLAGS in the different modules.
|
||||
dnl -----------------------------------------------------------
|
||||
CLASSPATH_INCLUDES="-I\$(top_srcdir)/include -I\$(top_srcdir)/native/jni/classpath -I\$(top_srcdir)/native/target/Linux -I\$(top_srcdir)/native/target/generic"
|
||||
CLASSPATH_INCLUDES="-I\$(top_srcdir)/include -I\$(top_srcdir)/native/jni/classpath -I\$(top_srcdir)/native/jni/native-lib"
|
||||
AC_SUBST(CLASSPATH_INCLUDES)
|
||||
|
||||
dnl -----------------------------------------------------------
|
||||
|
@ -746,13 +805,13 @@ case "$with_escher" in
|
|||
use_escher=false
|
||||
;;
|
||||
"yes")
|
||||
AC_MSG_ERROR([Please suply an absolute path to Escher library])
|
||||
AC_MSG_ERROR([Please supply an absolute path to Escher library])
|
||||
;;
|
||||
*)
|
||||
use_escher=true
|
||||
PATH_TO_ESCHER=$with_escher
|
||||
;;
|
||||
esac;
|
||||
esac
|
||||
|
||||
AM_CONDITIONAL(USE_ESCHER, test x$use_escher = xtrue)
|
||||
AC_SUBST(PATH_TO_ESCHER)
|
||||
|
@ -795,6 +854,7 @@ external/Makefile
|
|||
external/sax/Makefile
|
||||
external/w3c_dom/Makefile
|
||||
external/relaxngDatatype/Makefile
|
||||
external/jsr166/Makefile
|
||||
gnu/classpath/Configuration.java
|
||||
gnu/java/security/Configuration.java
|
||||
include/Makefile
|
||||
|
@ -814,10 +874,8 @@ native/jni/qt-peer/Makefile
|
|||
native/jni/xmlj/Makefile
|
||||
native/jni/midi-alsa/Makefile
|
||||
native/jni/midi-dssi/Makefile
|
||||
native/jni/native-lib/Makefile
|
||||
native/plugin/Makefile
|
||||
native/target/Makefile
|
||||
native/target/Linux/Makefile
|
||||
native/target/generic/Makefile
|
||||
resource/Makefile
|
||||
resource/META-INF/services/java.util.prefs.PreferencesFactory
|
||||
scripts/Makefile
|
||||
|
@ -837,24 +895,25 @@ tools/gjarsigner
|
|||
tools/gkeytool
|
||||
tools/gjar
|
||||
tools/gnative2ascii
|
||||
tools/gserialver])
|
||||
tools/gserialver
|
||||
tools/grmiregistry
|
||||
tools/gtnameserv
|
||||
tools/gorbd
|
||||
tools/grmid
|
||||
tools/grmic
|
||||
tools/gjavah])
|
||||
AC_CONFIG_COMMANDS([gappletviewer],[chmod 755 tools/gappletviewer])
|
||||
AC_CONFIG_COMMANDS([gjarsigner],[chmod 755 tools/gjarsigner])
|
||||
AC_CONFIG_COMMANDS([gkeytool],[chmod 755 tools/gkeytool])
|
||||
AC_CONFIG_COMMANDS([gjar],[chmod 755 tools/gjar])
|
||||
AC_CONFIG_COMMANDS([gnative2ascii],[chmod 755 tools/gnative2ascii])
|
||||
AC_CONFIG_COMMANDS([gserialver],[chmod 755 tools/gserialver])
|
||||
fi
|
||||
|
||||
|
||||
if test "x${COMPILE_WRAPPERS}" = xno
|
||||
then
|
||||
AC_CONFIG_FILES([tools/appletviewer
|
||||
tools/jarsigner
|
||||
tools/keytool])
|
||||
AC_CONFIG_COMMANDS([appletviewer],[chmod 755 tools/appletviewer])
|
||||
AC_CONFIG_COMMANDS([jarsigner],[chmod 755 tools/jarsigner])
|
||||
AC_CONFIG_COMMANDS([keytool],[chmod 755 tools/keytool])
|
||||
AC_CONFIG_COMMANDS([grmiregistry],[chmod 755 tools/grmiregistry])
|
||||
AC_CONFIG_COMMANDS([gtnameserv],[chmod 755 tools/gtnameserv])
|
||||
AC_CONFIG_COMMANDS([gorbd],[chmod 755 tools/gorbd])
|
||||
AC_CONFIG_COMMANDS([grmid],[chmod 755 tools/grmid])
|
||||
AC_CONFIG_COMMANDS([grmic],[chmod 755 tools/grmic])
|
||||
AC_CONFIG_COMMANDS([gjavah], [chmod 755 tools/gjavah])
|
||||
fi
|
||||
|
||||
AC_CONFIG_COMMANDS([gen-classlist],[chmod 755 lib/gen-classlist.sh])
|
||||
|
@ -866,4 +925,3 @@ cat ${srcdir}/lib/standard.omit.in > lib/standard.omit
|
|||
if test x$use_escher != xtrue; then
|
||||
echo gnu/java/awt/peer/x/.*java$ >> lib/standard.omit
|
||||
fi
|
||||
|
||||
|
|
13
libjava/classpath/doc/.cvsignore
Normal file
13
libjava/classpath/doc/.cvsignore
Normal file
|
@ -0,0 +1,13 @@
|
|||
Makefile
|
||||
Makefile.in
|
||||
*.info
|
||||
*.aux
|
||||
*.cp
|
||||
*.dvi
|
||||
*.fn
|
||||
*.ky
|
||||
*.log
|
||||
*.pg
|
||||
*.toc
|
||||
*.tp
|
||||
*.vr
|
|
@ -41,12 +41,14 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in texinfo.tex
|
|||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
|
||||
$(top_srcdir)/../../config/lead-dot.m4 \
|
||||
$(top_srcdir)/../../config/no-executables.m4 \
|
||||
$(top_srcdir)/../../libtool.m4 $(top_srcdir)/m4/acattribute.m4 \
|
||||
$(top_srcdir)/m4/accross.m4 $(top_srcdir)/m4/acinclude.m4 \
|
||||
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
|
||||
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \
|
||||
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
|
||||
$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
|
||||
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
|
||||
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
|
||||
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
|
@ -166,6 +168,8 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION = @JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION@
|
||||
JAVA_MAINTAINER_MODE_FALSE = @JAVA_MAINTAINER_MODE_FALSE@
|
||||
JAVA_MAINTAINER_MODE_TRUE = @JAVA_MAINTAINER_MODE_TRUE@
|
||||
JAY = @JAY@
|
||||
JAY_SKELETON = @JAY_SKELETON@
|
||||
JIKES = @JIKES@
|
||||
|
@ -287,7 +291,6 @@ target_alias = @target_alias@
|
|||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
toolexeclibdir = @toolexeclibdir@
|
||||
vm_classes = @vm_classes@
|
||||
SUBDIRS = api
|
||||
EXTRA_DIST = README.jaxp
|
||||
|
|
2
libjava/classpath/doc/api/.cvsignore
Normal file
2
libjava/classpath/doc/api/.cvsignore
Normal file
|
@ -0,0 +1,2 @@
|
|||
Makefile
|
||||
Makefile.in
|
|
@ -36,6 +36,7 @@ clean-local:
|
|||
|
||||
create_html:
|
||||
-$(MKDIR) html > /dev/null 2>&1
|
||||
if CREATE_API_DOCS
|
||||
$(GJDOC) \
|
||||
-use \
|
||||
-sourcepath "$(sourcepath)" \
|
||||
|
@ -51,3 +52,4 @@ create_html:
|
|||
-header $(classpathbox) -footer $(classpathbox) \
|
||||
-subpackages java:javax:org
|
||||
touch create_html
|
||||
endif
|
||||
|
|
|
@ -42,12 +42,14 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
|||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
|
||||
$(top_srcdir)/../../config/lead-dot.m4 \
|
||||
$(top_srcdir)/../../config/no-executables.m4 \
|
||||
$(top_srcdir)/../../libtool.m4 $(top_srcdir)/m4/acattribute.m4 \
|
||||
$(top_srcdir)/m4/accross.m4 $(top_srcdir)/m4/acinclude.m4 \
|
||||
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
|
||||
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \
|
||||
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
|
||||
$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
|
||||
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
|
||||
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
|
||||
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
|
@ -159,6 +161,8 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION = @JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION@
|
||||
JAVA_MAINTAINER_MODE_FALSE = @JAVA_MAINTAINER_MODE_FALSE@
|
||||
JAVA_MAINTAINER_MODE_TRUE = @JAVA_MAINTAINER_MODE_TRUE@
|
||||
JAY = @JAY@
|
||||
JAY_SKELETON = @JAY_SKELETON@
|
||||
JIKES = @JIKES@
|
||||
|
@ -280,7 +284,6 @@ target_alias = @target_alias@
|
|||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
toolexeclibdir = @toolexeclibdir@
|
||||
vm_classes = @vm_classes@
|
||||
@CREATE_API_DOCS_TRUE@noinst_DATA = html
|
||||
sourcepath = $(top_builddir):$(top_srcdir):$(top_srcdir)/vm/reference:$(top_srcdir)/external/w3c_dom:$(top_srcdir)/external/sax
|
||||
|
@ -475,21 +478,21 @@ clean-local:
|
|||
|
||||
create_html:
|
||||
-$(MKDIR) html > /dev/null 2>&1
|
||||
$(GJDOC) \
|
||||
-use \
|
||||
-sourcepath "$(sourcepath)" \
|
||||
-encoding UTF-8 \
|
||||
-breakiterator \
|
||||
-licensetext \
|
||||
-linksource \
|
||||
-splitindex \
|
||||
-validhtml \
|
||||
-d html \
|
||||
-doctitle "GNU Classpath $(VERSION)" \
|
||||
-windowtitle "GNU Classpath $(VERSION) Documentation" \
|
||||
-header $(classpathbox) -footer $(classpathbox) \
|
||||
-subpackages java:javax:org
|
||||
touch create_html
|
||||
@CREATE_API_DOCS_TRUE@ $(GJDOC) \
|
||||
@CREATE_API_DOCS_TRUE@ -use \
|
||||
@CREATE_API_DOCS_TRUE@ -sourcepath "$(sourcepath)" \
|
||||
@CREATE_API_DOCS_TRUE@ -encoding UTF-8 \
|
||||
@CREATE_API_DOCS_TRUE@ -breakiterator \
|
||||
@CREATE_API_DOCS_TRUE@ -licensetext \
|
||||
@CREATE_API_DOCS_TRUE@ -linksource \
|
||||
@CREATE_API_DOCS_TRUE@ -splitindex \
|
||||
@CREATE_API_DOCS_TRUE@ -validhtml \
|
||||
@CREATE_API_DOCS_TRUE@ -d html \
|
||||
@CREATE_API_DOCS_TRUE@ -doctitle "GNU Classpath $(VERSION)" \
|
||||
@CREATE_API_DOCS_TRUE@ -windowtitle "GNU Classpath $(VERSION) Documentation" \
|
||||
@CREATE_API_DOCS_TRUE@ -header $(classpathbox) -footer $(classpathbox) \
|
||||
@CREATE_API_DOCS_TRUE@ -subpackages java:javax:org
|
||||
@CREATE_API_DOCS_TRUE@ touch create_html
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
|
|
|
@ -144,7 +144,7 @@ A simple, small bytecode interpreter that works out-of-the-box with
|
|||
pure GNU Classpath; it is emerging as the preferred platform for
|
||||
quickly testing a new build of GNU Classpath. Licensed under the GPL.
|
||||
|
||||
@item @uref{http://oss.software.ibm.com/jikesrvm,Jikes RVM}
|
||||
@item @uref{http://jikesrvm.sourceforge.net/,Jikes RVM}
|
||||
A free runtime environment for Java, written in Java. Works
|
||||
out-of-the-box with pure GNU Classpath. Features an optimizing JIT.
|
||||
Runs on the x86 and PowerPC architectures, on the AIX, Linux, and Mac
|
||||
|
@ -1859,8 +1859,7 @@ Classpath places a few requirements on the VM that uses it.
|
|||
|
||||
Classpath currently uses only JNI 1.1, except for one JNI 1.2 function
|
||||
in the JNI Invocation API: GetEnv(). And GetEnv() is only used in the
|
||||
``portable native sync'' code, so it's only actually used by Jikes RVM
|
||||
and Kaffe.
|
||||
now deprecated ``portable native sync'' code.
|
||||
|
||||
A future direction will probably be to require that all VMs provide
|
||||
JNI 1.2. If this poses problems, please raise them on the classpath
|
||||
|
@ -1870,42 +1869,95 @@ mailing list.
|
|||
@comment node-name, next, previous, up
|
||||
@section VM Threading Model
|
||||
|
||||
Classpath's AWT peers use GTK+. GTK+ uses GLIB. Normally, Classpath
|
||||
will initialize GLIB's @dfn{gthreads} to use
|
||||
the platform's native threading model@footnote{The native threading
|
||||
model is pthreads on Linux and AIX, the two platforms Classpath
|
||||
currently runs on.}
|
||||
VM authors can implement a number of different threading models. When
|
||||
native code is also threaded there is the potential for one threading
|
||||
model to deadlock the other. The
|
||||
@uref{http://java.sun.com/docs/books/jni/html/other.html#29406,Java
|
||||
Native Interface Programmer's Guide and Specification} suggests
|
||||
consulting VM documentation in such situations. Classpath uses
|
||||
existing libraries, for example the AWT peers can use the GTK+
|
||||
graphics library. As these libraries assume a different threading
|
||||
model, there is the potential for the native code to deadlock a VM.
|
||||
|
||||
If the Java runtime doesn't use the native threading model, then you
|
||||
will want Classpath to tell GLIB to use the Java threading primitives
|
||||
instead. Otherwise, GLIB would use the native threading model to
|
||||
perform operations such as creating thread-local data, and that just
|
||||
doesn't work on systems (such as Kaffe in some configurations, and
|
||||
such as Jikes RVM) that use @i{m}:@i{n} threading.
|
||||
The different threading models available to a VM author are:
|
||||
@enumerate
|
||||
@item
|
||||
@i{Native threads}: Map a Java thread to an underlying operating system
|
||||
thread (normally a POSIX compatible pthread). This approach reduces
|
||||
the potential for deadlock as there is only one thread scheduling
|
||||
mechanism.
|
||||
@item
|
||||
@i{Green threads 1}: Green threads are threads scheduled by the VM,
|
||||
typically by switching swapping registers. In early VMs green threads
|
||||
were seen as advantageous as they didn't require the operating system
|
||||
to resechedule, save and swap all of a threads registers. The green
|
||||
thread 1 model switches thread on an externally created event, such as
|
||||
a timer interrupt. An example of a VM using this approach is Kaffe
|
||||
configured with its jthreads model.
|
||||
@item
|
||||
@i{Green threads 2}: The essential difference with this model is to
|
||||
not switch threads on an event, but at fixed points in the code being
|
||||
executed by the VM. Points chosen could be backward branches (loops)
|
||||
or method calls. This approach can be advantageous to nonconservative
|
||||
garbage collectors, as non-running threads would be at known points
|
||||
and can have fixed register maps. It can also reduce the number of
|
||||
registers it is necessary to swap when switching threads.
|
||||
@item
|
||||
@i{M:N threading}: a flaw to green threading is that it is unable to
|
||||
use multiple processors. @i{M}:@i{N} threading fixes this problem by
|
||||
running groups of green threads on multiple underlying native
|
||||
threads. An example of a VM using this approach is the Jikes RVM,
|
||||
which uses @i{M}:@i{N} threading combined with the green thread 2
|
||||
model.
|
||||
@end enumerate
|
||||
|
||||
Historically, enabling the Java threading primitives had been done at
|
||||
build time, by configuring classpath with the
|
||||
@option{--portable-native-sync} option. This had bad consequences,
|
||||
though -- it meant that the prebuild GNU Classpath package distributed
|
||||
with Debian GNU/Linux would not be usable with VMs that could
|
||||
otherwise have used it. Instead, we encourage
|
||||
the use of the Java system property
|
||||
@code{gnu.classpath.awt.gtk.portable.native.sync}. A VM that wants
|
||||
GLIB to use the Java threading primitives should modify
|
||||
@code{VMRuntime.insertSystemProperties()} to include code like the
|
||||
following:
|
||||
An example of the problem of mixing threading models is:
|
||||
@itemize @bullet
|
||||
@item
|
||||
A Java thread calls a native method. The native method aquires a lock.
|
||||
@item
|
||||
The native method calls back into the VM.
|
||||
@item
|
||||
An event triggers the VM to reschedule the currently running thread.
|
||||
@item
|
||||
A new VM thread, executing on the same underlying native thread, calls
|
||||
a native method.
|
||||
@item
|
||||
The native method tries to aquire the lock already aquired earlier. As
|
||||
the lock is busy the thread waits and allows the operating system to
|
||||
reschedule native threads.
|
||||
@item
|
||||
The operating system reschedules the VM thread again, but the lock is
|
||||
still busy and in some threading models will remain busy forever
|
||||
(the VM is deadlocked).
|
||||
@end itemize
|
||||
|
||||
@example
|
||||
static void insertSystemProperties(Properties @var{p})
|
||||
@end example
|
||||
...
|
||||
@example
|
||||
@var{p}.put("gnu.classpath.awt.gtk.portable.native.sync", "true");
|
||||
@end example
|
||||
VMs that don't use the underlying operating system thread scheduling
|
||||
mechanism need to avoid deadlock. One now deprecated approach was to
|
||||
build Classpath and VMs on top of a wrapper thread library (aka
|
||||
portable native sync). The wrapper thread library used was GLIB's
|
||||
@dfn{gthreads}. This approach has been deprecated because:
|
||||
@enumerate
|
||||
@item
|
||||
The wrapper library is only in use by some native libraries. For
|
||||
example, GTK+ uses the gthread library but QT does not.
|
||||
@item
|
||||
The wrapper library can't be in use prior to the VM starting as the VM
|
||||
must replace the wrapper libraries functions with its own. This
|
||||
prevents the VM from running as a plugin in an application that
|
||||
already uses the wrapper library.
|
||||
@end enumerate
|
||||
|
||||
So, the configure option
|
||||
@option{--portable-native-sync} is deprecated, and should go away in a
|
||||
subsequent release of GNU Classpath.
|
||||
An alternative approach is for the VM to detect deadlocked native code
|
||||
and swap Java threads off of that native thread. The VM can't,
|
||||
however, swap two blocked native threads that are potentially
|
||||
deadlocking each other on a lock. The lock will be associated with the
|
||||
native thread. To prevent this from happening the VM must hijack
|
||||
functions that operate on locks. This is done by redifining the lock
|
||||
functions inside the VM and configuring the linker so that it uses the
|
||||
VMs symbol in preference to that of the external thread support
|
||||
library. The VM's lock function can then reschedule Java threads if it
|
||||
must wait for the lock.
|
||||
|
||||
@node Boot Library Path Property, , VM Threading Model, Miscellaneous VM Requirements
|
||||
@comment node-name, next, previous, up
|
||||
|
|
6
libjava/classpath/examples/.cvsignore
Normal file
6
libjava/classpath/examples/.cvsignore
Normal file
|
@ -0,0 +1,6 @@
|
|||
Makefile
|
||||
Makefile.in
|
||||
examples.zip
|
||||
Makefile.jawt
|
||||
Makefile.java2d
|
||||
|
|
@ -1,23 +1,23 @@
|
|||
## Input file for automake to generate the Makefile.in used by configure
|
||||
GLIBJ_CLASSPATH='$(top_builddir)/lib':'$(top_builddir)/lib/glibj.zip'
|
||||
GLIBJ_CLASSPATH='$(top_builddir)/lib':'$(top_builddir)/lib/glibj.zip':'$(top_builddir)/tools/tools.zip'
|
||||
|
||||
# Setup the compiler to use the GNU Classpath library we just build
|
||||
if FOUND_GCJ
|
||||
JCOMPILER = $(GCJ) -encoding UTF-8 --bootclasspath $(GLIBJ_CLASSPATH) --classpath . -C
|
||||
else
|
||||
if FOUND_JIKES
|
||||
JCOMPILER = $(JIKES) $(JIKESENCODING) -bootclasspath '' -extdirs '' -sourcepath '' --classpath $(GLIBJ_CLASSPATH):.
|
||||
else
|
||||
#if FOUND_GCJ
|
||||
#JCOMPILER = $(GCJ) --bootclasspath '$(top_builddir)/lib' --classpath . -C
|
||||
#else
|
||||
#if FOUND_JIKES
|
||||
#JCOMPILER = $(JIKES) -bootclasspath '' -extdirs '' -sourcepath '' --classpath $(top_builddir)/lib:.
|
||||
#else
|
||||
if FOUND_GCJX
|
||||
JCOMPILER = $(GCJX) -encoding UTF-8 -bootclasspath '' -sourcepath '' -classpath $(GLIBJ_CLASSPATH):.
|
||||
else
|
||||
if FOUND_ECJ
|
||||
JCOMPILER = $(ECJ) -encoding UTF-8 -bootclasspath $(GLIBJ_CLASSPATH) -classpath .
|
||||
JCOMPILER = $(ECJ) -1.5 -encoding UTF-8 -bootclasspath $(GLIBJ_CLASSPATH) -classpath .
|
||||
else
|
||||
error dunno how to setup the JCOMPILER and compile
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
#endif
|
||||
#endif
|
||||
endif
|
||||
|
||||
# All our example java source files
|
||||
|
@ -36,11 +36,14 @@ BUILT_SOURCES = $(EXAMPLE_ZIP)
|
|||
# the png icons we use in some of the examples.
|
||||
EXAMPLE_ICONS = $(srcdir)/gnu/classpath/examples/icons/*.png
|
||||
|
||||
# the html pages we use in the swing demo example.
|
||||
EXAMPLE_HTML = $(srcdir)/gnu/classpath/examples/swing/*.html
|
||||
|
||||
# The example specific README files.
|
||||
READMES = $(srcdir)/gnu/classpath/examples/CORBA/swing/README.html
|
||||
|
||||
# All the files we find "interesting"
|
||||
ALL_EXAMPLE_FILES = $(EXAMPLE_JAVA_FILES) $(EXAMPLE_C_FILES) $(EXAMPLE_CH_FILES) $(EXAMPLE_ICONS) $(READMES)
|
||||
ALL_EXAMPLE_FILES = $(EXAMPLE_JAVA_FILES) $(EXAMPLE_C_FILES) $(EXAMPLE_CH_FILES) $(EXAMPLE_ICONS) $(EXAMPLE_HTML) $(READMES)
|
||||
|
||||
# Some architecture independent data to be installed.
|
||||
example_DATA = $(EXAMPLE_ZIP) README
|
||||
|
@ -100,6 +103,8 @@ dist-hook:
|
|||
$(EXAMPLE_ZIP): $(EXAMPLE_JAVA_FILES)
|
||||
mkdir -p classes/gnu/classpath/examples/icons
|
||||
cp $(EXAMPLE_ICONS) classes/gnu/classpath/examples/icons
|
||||
mkdir -p classes/gnu/classpath/examples/swing
|
||||
cp $(EXAMPLE_HTML) classes/gnu/classpath/examples/swing
|
||||
$(JCOMPILER) -d classes $(EXAMPLE_JAVA_FILES)
|
||||
(cd classes; \
|
||||
if test "$(ZIP)" != ""; then $(ZIP) -r ../$(EXAMPLE_ZIP) .; fi; \
|
||||
|
|
|
@ -43,12 +43,14 @@ DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
|
|||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
|
||||
$(top_srcdir)/../../config/lead-dot.m4 \
|
||||
$(top_srcdir)/../../config/no-executables.m4 \
|
||||
$(top_srcdir)/../../libtool.m4 $(top_srcdir)/m4/acattribute.m4 \
|
||||
$(top_srcdir)/m4/accross.m4 $(top_srcdir)/m4/acinclude.m4 \
|
||||
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
|
||||
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \
|
||||
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
|
||||
$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
|
||||
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
|
||||
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
|
||||
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
|
@ -168,6 +170,8 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION = @JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION@
|
||||
JAVA_MAINTAINER_MODE_FALSE = @JAVA_MAINTAINER_MODE_FALSE@
|
||||
JAVA_MAINTAINER_MODE_TRUE = @JAVA_MAINTAINER_MODE_TRUE@
|
||||
JAY = @JAY@
|
||||
JAY_SKELETON = @JAY_SKELETON@
|
||||
JIKES = @JIKES@
|
||||
|
@ -289,15 +293,20 @@ target_alias = @target_alias@
|
|||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
toolexeclibdir = @toolexeclibdir@
|
||||
vm_classes = @vm_classes@
|
||||
GLIBJ_CLASSPATH = '$(top_builddir)/lib':'$(top_builddir)/lib/glibj.zip'
|
||||
@FOUND_ECJ_TRUE@@FOUND_GCJX_FALSE@@FOUND_GCJ_FALSE@@FOUND_JIKES_FALSE@JCOMPILER = $(ECJ) -encoding UTF-8 -bootclasspath $(GLIBJ_CLASSPATH) -classpath .
|
||||
@FOUND_GCJX_TRUE@@FOUND_GCJ_FALSE@@FOUND_JIKES_FALSE@JCOMPILER = $(GCJX) -encoding UTF-8 -bootclasspath '' -sourcepath '' -classpath $(GLIBJ_CLASSPATH):.
|
||||
@FOUND_GCJ_FALSE@@FOUND_JIKES_TRUE@JCOMPILER = $(JIKES) $(JIKESENCODING) -bootclasspath '' -extdirs '' -sourcepath '' --classpath $(GLIBJ_CLASSPATH):.
|
||||
GLIBJ_CLASSPATH = '$(top_builddir)/lib':'$(top_builddir)/lib/glibj.zip':'$(top_builddir)/tools/tools.zip'
|
||||
@FOUND_ECJ_TRUE@@FOUND_GCJX_FALSE@JCOMPILER = $(ECJ) -1.5 -encoding UTF-8 -bootclasspath $(GLIBJ_CLASSPATH) -classpath .
|
||||
|
||||
# Setup the compiler to use the GNU Classpath library we just build
|
||||
@FOUND_GCJ_TRUE@JCOMPILER = $(GCJ) -encoding UTF-8 --bootclasspath $(GLIBJ_CLASSPATH) --classpath . -C
|
||||
#if FOUND_GCJ
|
||||
#JCOMPILER = $(GCJ) --bootclasspath '$(top_builddir)/lib' --classpath . -C
|
||||
#else
|
||||
#if FOUND_JIKES
|
||||
#JCOMPILER = $(JIKES) -bootclasspath '' -extdirs '' -sourcepath '' --classpath $(top_builddir)/lib:.
|
||||
#else
|
||||
@FOUND_GCJX_TRUE@JCOMPILER = $(GCJX) -encoding UTF-8 -bootclasspath '' -sourcepath '' -classpath $(GLIBJ_CLASSPATH):.
|
||||
#endif
|
||||
#endif
|
||||
|
||||
# All our example java source files
|
||||
EXAMPLE_JAVA_FILES = $(srcdir)/gnu/classpath/examples/*/*.java $(srcdir)/gnu/classpath/examples/*/*/*.java $(srcdir)/gnu/classpath/examples/*/*/*/*.java
|
||||
|
@ -315,11 +324,14 @@ BUILT_SOURCES = $(EXAMPLE_ZIP)
|
|||
# the png icons we use in some of the examples.
|
||||
EXAMPLE_ICONS = $(srcdir)/gnu/classpath/examples/icons/*.png
|
||||
|
||||
# the html pages we use in the swing demo example.
|
||||
EXAMPLE_HTML = $(srcdir)/gnu/classpath/examples/swing/*.html
|
||||
|
||||
# The example specific README files.
|
||||
READMES = $(srcdir)/gnu/classpath/examples/CORBA/swing/README.html
|
||||
|
||||
# All the files we find "interesting"
|
||||
ALL_EXAMPLE_FILES = $(EXAMPLE_JAVA_FILES) $(EXAMPLE_C_FILES) $(EXAMPLE_CH_FILES) $(EXAMPLE_ICONS) $(READMES)
|
||||
ALL_EXAMPLE_FILES = $(EXAMPLE_JAVA_FILES) $(EXAMPLE_C_FILES) $(EXAMPLE_CH_FILES) $(EXAMPLE_ICONS) $(EXAMPLE_HTML) $(READMES)
|
||||
|
||||
# Some architecture independent data to be installed.
|
||||
example_DATA = $(EXAMPLE_ZIP) README
|
||||
|
@ -522,7 +534,7 @@ uninstall-am: uninstall-exampleDATA uninstall-info-am uninstall-local
|
|||
uninstall uninstall-am uninstall-exampleDATA uninstall-info-am \
|
||||
uninstall-local
|
||||
|
||||
@FOUND_ECJ_FALSE@@FOUND_GCJX_FALSE@@FOUND_GCJ_FALSE@@FOUND_JIKES_FALSE@error dunno how to setup the JCOMPILER and compile
|
||||
@FOUND_ECJ_FALSE@@FOUND_GCJX_FALSE@error dunno how to setup the JCOMPILER and compile
|
||||
|
||||
# Make sure all sources and icons are also installed so users can use them.
|
||||
# (Be careful to strip off the srcdir part of the path when installing.)
|
||||
|
@ -573,6 +585,8 @@ dist-hook:
|
|||
$(EXAMPLE_ZIP): $(EXAMPLE_JAVA_FILES)
|
||||
mkdir -p classes/gnu/classpath/examples/icons
|
||||
cp $(EXAMPLE_ICONS) classes/gnu/classpath/examples/icons
|
||||
mkdir -p classes/gnu/classpath/examples/swing
|
||||
cp $(EXAMPLE_HTML) classes/gnu/classpath/examples/swing
|
||||
$(JCOMPILER) -d classes $(EXAMPLE_JAVA_FILES)
|
||||
(cd classes; \
|
||||
if test "$(ZIP)" != ""; then $(ZIP) -r ../$(EXAMPLE_ZIP) .; fi; \
|
||||
|
|
|
@ -39,7 +39,6 @@ exception statement from your version. */
|
|||
package gnu.classpath.examples.CORBA.NamingService;
|
||||
|
||||
import gnu.CORBA.IOR;
|
||||
import gnu.CORBA.NamingService.NamingServiceTransient;
|
||||
|
||||
import org.omg.CORBA.ORB;
|
||||
import org.omg.CORBA.Object;
|
||||
|
@ -97,7 +96,7 @@ public class Demo
|
|||
{
|
||||
public void run()
|
||||
{
|
||||
NamingServiceTransient.main(args);
|
||||
gnu.classpath.tools.tnameserv.Main.main(args);
|
||||
}
|
||||
}.start();
|
||||
|
||||
|
|
BIN
libjava/classpath/examples/gnu/classpath/examples/awt/aicas.png
Normal file
BIN
libjava/classpath/examples/gnu/classpath/examples/awt/aicas.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.3 KiB |
BIN
libjava/classpath/examples/gnu/classpath/examples/awt/palme.gif
Normal file
BIN
libjava/classpath/examples/gnu/classpath/examples/awt/palme.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 502 B |
BIN
libjava/classpath/examples/gnu/classpath/examples/icons/back.png
Normal file
BIN
libjava/classpath/examples/gnu/classpath/examples/icons/back.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 828 B |
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.3 KiB |
Binary file not shown.
After Width: | Height: | Size: 502 B |
|
@ -0,0 +1,57 @@
|
|||
/* BrowserEditorKit.java -- A tweaked editor kit for the browser
|
||||
Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
|
||||
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., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
02110-1301 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 gnu.classpath.examples.swing;
|
||||
|
||||
import javax.swing.text.html.HTMLEditorKit;
|
||||
|
||||
/**
|
||||
* A tweaked editor kit for out browser.
|
||||
*/
|
||||
public class BrowserEditorKit
|
||||
extends HTMLEditorKit
|
||||
{
|
||||
public BrowserEditorKit()
|
||||
{
|
||||
super();
|
||||
// Turn off automatic form submission so that we can receive notification
|
||||
// instead and can update out location field.
|
||||
setAutoFormSubmission(false);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<launchConfiguration type="org.eclipse.cdt.launch.localCLaunch">
|
||||
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_ID" value="org.eclipse.cdt.debug.mi.core.CDebugger"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.protocol" value="mi"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.mi.core.STOP_ON_SOLIB_EVENTS" value="false"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_START_MODE" value="run"/>
|
||||
<listAttribute key="org.eclipse.cdt.debug.mi.core.SOLIB_PATH"/>
|
||||
<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.launch.ENABLE_REGISTER_BOOKKEEPING" value="false"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.mi.core.AUTO_SOLIB" value="true"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN" value="true"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.launch.use_terminal" value="true"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="jamvm"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.launch.ENABLE_VARIABLE_BOOKKEEPING" value="false"/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.mi.core.DEBUG_NAME" value="gdb"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="src/jamvm"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_ARGUMENTS" value="-Dswing.defaultlaf=javax.swing.plaf.metal.MetalLookAndFeel gnu.classpath.examples.swing.Demo"/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.mi.core.GDB_INIT" value=""/>
|
||||
</launchConfiguration>
|
|
@ -28,7 +28,6 @@ import java.awt.*;
|
|||
import java.awt.event.*;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.tree.*;
|
||||
|
||||
import javax.swing.plaf.basic.BasicLookAndFeel;
|
||||
import javax.swing.plaf.metal.DefaultMetalTheme;
|
||||
|
@ -67,7 +66,7 @@ public class Demo
|
|||
return getIcon("/gnu/classpath/examples/icons/big-" + s + ".png", s);
|
||||
}
|
||||
|
||||
private static Icon getIcon(String location, String name)
|
||||
static Icon getIcon(String location, String name)
|
||||
{
|
||||
URL url = Demo.class.getResource(location);
|
||||
if (url == null) System.err.println("WARNING " + location + " not found.");
|
||||
|
@ -161,6 +160,8 @@ public class Demo
|
|||
NavigationFilterDemo.createDemoFactory())));
|
||||
examples.add(new JMenuItem(new PopupAction("JNI Overhead",
|
||||
JNIOverhead.createDemoFactory())));
|
||||
examples.add(new JMenuItem(new PopupAction("HTML Demo",
|
||||
HtmlDemo.createDemoFactory())));
|
||||
|
||||
|
||||
final JMenuItem vmMenu;
|
||||
|
@ -294,21 +295,6 @@ public class Demo
|
|||
return bar;
|
||||
}
|
||||
|
||||
private static String valign2str(int a)
|
||||
{
|
||||
switch (a)
|
||||
{
|
||||
case SwingConstants.CENTER:
|
||||
return "Center";
|
||||
case SwingConstants.TOP:
|
||||
return "Top";
|
||||
case SwingConstants.BOTTOM:
|
||||
return "Bottom";
|
||||
default:
|
||||
return "Unknown";
|
||||
}
|
||||
}
|
||||
|
||||
static String halign2str(int a)
|
||||
{
|
||||
switch (a)
|
||||
|
@ -354,17 +340,6 @@ public class Demo
|
|||
return mkButton(null, i, -1, -1, -1, -1);
|
||||
}
|
||||
|
||||
|
||||
private static JScrollPane mkScrollPane(JComponent inner)
|
||||
{
|
||||
JScrollPane jsp;
|
||||
jsp = new JScrollPane(inner,
|
||||
JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
|
||||
JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
|
||||
|
||||
return jsp;
|
||||
}
|
||||
|
||||
public Demo()
|
||||
{
|
||||
frame = new JFrame("Swing Activity Board");
|
||||
|
@ -376,10 +351,7 @@ public class Demo
|
|||
JPanel main = new JPanel();
|
||||
main.setLayout(new BoxLayout(main, BoxLayout.Y_AXIS));
|
||||
desktop = createDesktop();
|
||||
|
||||
// Put the desktop in a scrollpane. The scrollbars may show then
|
||||
// up when the them or LaF is changed.
|
||||
main.add(new JScrollPane(desktop));
|
||||
main.add(desktop);
|
||||
main.add(mkButtonBar());
|
||||
component.add(main, BorderLayout.CENTER);
|
||||
frame.pack();
|
||||
|
@ -391,7 +363,7 @@ public class Demo
|
|||
{
|
||||
public void run()
|
||||
{
|
||||
Demo demo = new Demo();
|
||||
new Demo();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -407,16 +379,6 @@ public class Demo
|
|||
return b;
|
||||
}
|
||||
|
||||
private static JPanel mkPanel(JComponent[] inners)
|
||||
{
|
||||
JPanel p = new JPanel();
|
||||
for (int i = 0; i < inners.length; ++i)
|
||||
{
|
||||
p.add(inners[i]);
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
static JButton mkDisposerButton(final JFrame c)
|
||||
{
|
||||
JButton close = mkBigButton("Close");
|
||||
|
@ -479,52 +441,6 @@ public class Demo
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create the tree.
|
||||
*
|
||||
* @return thr scroll pane, containing the tree.
|
||||
*/
|
||||
private static JComponent mkTree()
|
||||
{
|
||||
DefaultMutableTreeNode root = new DefaultMutableTreeNode("Root node");
|
||||
|
||||
addChildren("Node", root, 12);
|
||||
|
||||
JTree tree = new JTree(root);
|
||||
tree.setLargeModel(true);
|
||||
DefaultTreeSelectionModel dtsm = new DefaultTreeSelectionModel();
|
||||
dtsm.setSelectionMode(DefaultTreeSelectionModel.SINGLE_TREE_SELECTION);
|
||||
tree.setSelectionModel(dtsm);
|
||||
|
||||
// Make it editable.
|
||||
tree.setEditable(true);
|
||||
|
||||
JComponent t = mkScrollPane(tree);
|
||||
t.setPreferredSize(new Dimension(200,200));
|
||||
return t;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the specified number of children to this parent node. For each
|
||||
* child, the method is called recursively adding the nChildren-3 number of
|
||||
* grandchildren.
|
||||
*
|
||||
* @param parent the parent node
|
||||
* @param nChildren the number of children
|
||||
*/
|
||||
private static void addChildren(String name, DefaultMutableTreeNode parent,
|
||||
int nChildren)
|
||||
{
|
||||
for (int i = 0; i < nChildren; i++)
|
||||
{
|
||||
String child_name = parent+"."+i;
|
||||
DefaultMutableTreeNode child = new DefaultMutableTreeNode
|
||||
(child_name);
|
||||
parent.add(child);
|
||||
addChildren(child_name, child, nChildren-3);
|
||||
}
|
||||
}
|
||||
|
||||
private JPanel mkButtonBar()
|
||||
{
|
||||
JPanel panel = new JPanel(new GridLayout(3, 1, 5, 5));
|
||||
|
@ -558,6 +474,8 @@ public class Demo
|
|||
MetalThemeEditor.createDemoFactory())));
|
||||
panel.add(new JButton(new PopupAction("JNI Overhead",
|
||||
JNIOverhead.createDemoFactory())));
|
||||
panel.add(new JButton(new PopupAction("HTML",
|
||||
HtmlDemo.createDemoFactory())));
|
||||
|
||||
JButton exitDisposer = mkDisposerButton(frame);
|
||||
panel.add(exitDisposer);
|
||||
|
|
|
@ -40,20 +40,31 @@ package gnu.classpath.examples.swing;
|
|||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.GridLayout;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.io.PrintWriter;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
import java.util.LinkedList;
|
||||
|
||||
import javax.swing.BoxLayout;
|
||||
import javax.swing.Icon;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JEditorPane;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JScrollPane;
|
||||
import javax.swing.JTextArea;
|
||||
import javax.swing.JTextField;
|
||||
import javax.swing.JTextPane;
|
||||
import javax.swing.JToolBar;
|
||||
import javax.swing.SwingUtilities;
|
||||
import javax.swing.text.Element;
|
||||
import javax.swing.text.html.HTMLDocument;
|
||||
import javax.swing.event.HyperlinkEvent;
|
||||
import javax.swing.event.HyperlinkListener;
|
||||
import javax.swing.text.html.FormSubmitEvent;
|
||||
|
||||
/**
|
||||
* Parses and displays HTML content.
|
||||
|
@ -62,28 +73,54 @@ import javax.swing.text.html.HTMLDocument;
|
|||
*/
|
||||
public class HtmlDemo extends JPanel
|
||||
{
|
||||
|
||||
JTextPane html = new JTextPane();
|
||||
|
||||
JTextArea text = new JTextArea("<html><body>" +
|
||||
"123456789HR!<hr>987654321"+
|
||||
"123456789BR!<br>987654321"+
|
||||
"<p id='insertHere'>Insertion target</p><p>"+
|
||||
"<font color=red>ma</font>"+
|
||||
"<sup>sup</sup>normal<sub>sub</sub>normal</p><p>Table:"+
|
||||
"<table><tr>a<td>b<td>c<tr>x<td>y<td>z</table></body></html>");
|
||||
|
||||
JPanel buttons;
|
||||
private class LoadActionListener
|
||||
implements ActionListener
|
||||
{
|
||||
|
||||
public void actionPerformed(ActionEvent event)
|
||||
{
|
||||
String urlStr = url.getText();
|
||||
try
|
||||
{
|
||||
setPage(new URL(url.getText()));
|
||||
}
|
||||
catch (MalformedURLException ex)
|
||||
{
|
||||
// Do something more useful here.
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Setting this to true causes the parsed element structure to be dumped.
|
||||
*/
|
||||
private static final boolean DEBUG = true;
|
||||
|
||||
/**
|
||||
* The URL entry field.
|
||||
*/
|
||||
JTextField url = new JTextField();
|
||||
|
||||
JTextPane html = new JTextPane();
|
||||
|
||||
int n;
|
||||
|
||||
/**
|
||||
* The browsing history.
|
||||
*
|
||||
* Package private to avoid accessor method.
|
||||
*/
|
||||
LinkedList history;
|
||||
|
||||
public HtmlDemo()
|
||||
{
|
||||
super();
|
||||
html.setContentType("text/html"); // not now.
|
||||
history = new LinkedList();
|
||||
createContent();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns a panel with the demo content. The panel uses a BorderLayout(), and
|
||||
* the BorderLayout.SOUTH area is empty, to allow callers to add controls to
|
||||
|
@ -93,158 +130,128 @@ public class HtmlDemo extends JPanel
|
|||
private void createContent()
|
||||
{
|
||||
setLayout(new BorderLayout());
|
||||
|
||||
JPanel center = new JPanel();
|
||||
GridLayout layout = new GridLayout();
|
||||
layout.setRows(2);
|
||||
center.setLayout(layout);
|
||||
center.add(new JScrollPane(text));
|
||||
center.add(new JScrollPane(html));
|
||||
|
||||
buttons = new JPanel();
|
||||
|
||||
JButton parse = new JButton("parse");
|
||||
parse.addActionListener(new ActionListener()
|
||||
{
|
||||
public void actionPerformed(ActionEvent event)
|
||||
{
|
||||
String t = text.getText();
|
||||
System.out.println("HtmlDemo.java.createContent:Parsing started");
|
||||
html.setText(t);
|
||||
System.out.println("HtmlDemo.java.createContent:Parsing completed");
|
||||
}
|
||||
});
|
||||
|
||||
buttons.add(parse);
|
||||
|
||||
JButton insertBeforeEnd = new JButton("before end");
|
||||
insertBeforeEnd.addActionListener(new ActionListener()
|
||||
{
|
||||
public void actionPerformed(ActionEvent event)
|
||||
{
|
||||
HTMLDocument doc = (HTMLDocument) html.getDocument();
|
||||
Element el = doc.getElement("insertHere");
|
||||
System.out.println("Element found:"+el);
|
||||
try
|
||||
{
|
||||
doc.insertBeforeEnd(el,"before end "+(n++));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
JButton insertBeforeStart = new JButton("before start");
|
||||
insertBeforeStart.addActionListener(new ActionListener()
|
||||
{
|
||||
public void actionPerformed(ActionEvent event)
|
||||
{
|
||||
HTMLDocument doc = (HTMLDocument) html.getDocument();
|
||||
Element el = doc.getElement("insertHere");
|
||||
System.out.println("Element found:"+el);
|
||||
try
|
||||
{
|
||||
doc.insertBeforeStart(el,"before start "+(n++));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
JButton insertAfterEnd = new JButton("after end");
|
||||
insertAfterEnd.addActionListener(new ActionListener()
|
||||
{
|
||||
public void actionPerformed(ActionEvent event)
|
||||
{
|
||||
HTMLDocument doc = (HTMLDocument) html.getDocument();
|
||||
Element el = doc.getElement("insertHere");
|
||||
System.out.println("Element found:"+el);
|
||||
try
|
||||
{
|
||||
doc.insertAfterEnd(el,"after end "+(n++));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
JButton insertAfterStart = new JButton("after start");
|
||||
insertAfterStart.addActionListener(new ActionListener()
|
||||
{
|
||||
public void actionPerformed(ActionEvent event)
|
||||
{
|
||||
HTMLDocument doc = (HTMLDocument) html.getDocument();
|
||||
Element el = doc.getElement("insertHere");
|
||||
System.out.println("Element found:"+el);
|
||||
try
|
||||
{
|
||||
doc.insertAfterStart(el,"after start "+(n++));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
JButton setInner = new JButton("inner");
|
||||
setInner.addActionListener(new ActionListener()
|
||||
JEditorPane.registerEditorKitForContentType("text/html",
|
||||
BrowserEditorKit.class.getName());
|
||||
html.setEditable(false);
|
||||
html.addHyperlinkListener(new HyperlinkListener()
|
||||
{
|
||||
|
||||
public void hyperlinkUpdate(HyperlinkEvent event)
|
||||
{
|
||||
public void actionPerformed(ActionEvent event)
|
||||
if (event instanceof FormSubmitEvent)
|
||||
{
|
||||
HTMLDocument doc = (HTMLDocument) html.getDocument();
|
||||
Element el = doc.getElement("insertHere");
|
||||
System.out.println("Element found:"+el);
|
||||
try
|
||||
submitForm((FormSubmitEvent) event);
|
||||
}
|
||||
else
|
||||
{
|
||||
URL u = event.getURL();
|
||||
if (u != null)
|
||||
{
|
||||
doc.setInnerHTML(el,"inner "+(n++));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
setPage(u);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
JButton setOuter = new JButton("outer");
|
||||
setOuter.addActionListener(new ActionListener()
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
JScrollPane scroller = new JScrollPane(html);
|
||||
JPanel urlPanel = new JPanel();
|
||||
urlPanel.setLayout(new BoxLayout(urlPanel, BoxLayout.X_AXIS));
|
||||
url.setMaximumSize(new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE));
|
||||
LoadActionListener action = new LoadActionListener();
|
||||
url.addActionListener(action);
|
||||
urlPanel.add(url);
|
||||
JButton loadButton = new JButton("go");
|
||||
urlPanel.add(loadButton);
|
||||
loadButton.addActionListener(action);
|
||||
|
||||
// Setup control panel.
|
||||
JToolBar controlPanel = createToolBar();
|
||||
JPanel browserPanel = new JPanel();
|
||||
browserPanel.setLayout(new BorderLayout());
|
||||
browserPanel.add(urlPanel, BorderLayout.NORTH);
|
||||
browserPanel.add(scroller, BorderLayout.CENTER);
|
||||
add(controlPanel, BorderLayout.NORTH);
|
||||
add(browserPanel, BorderLayout.CENTER);
|
||||
|
||||
// Load start page.
|
||||
try
|
||||
{
|
||||
public void actionPerformed(ActionEvent event)
|
||||
{
|
||||
HTMLDocument doc = (HTMLDocument) html.getDocument();
|
||||
Element el = doc.getElement("insertHere");
|
||||
System.out.println("Element found:"+el);
|
||||
try
|
||||
{
|
||||
doc.setOuterHTML(el,"outer "+(n++));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
buttons.add(insertBeforeStart);
|
||||
buttons.add(insertAfterStart);
|
||||
buttons.add(insertBeforeEnd);
|
||||
buttons.add(insertAfterEnd);
|
||||
|
||||
buttons.add(setInner);
|
||||
buttons.add(setOuter);
|
||||
|
||||
add(center, BorderLayout.CENTER);
|
||||
add(buttons, BorderLayout.SOUTH);
|
||||
URL startpage = getClass().getResource("welcome.html");
|
||||
html.setPage(startpage);
|
||||
url.setText(startpage.toString());
|
||||
history.addLast(startpage);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
System.err.println("couldn't load page: "/* + startpage*/);
|
||||
ex.printStackTrace();
|
||||
}
|
||||
setPreferredSize(new Dimension(800, 600));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Creates the toolbar with the control buttons.
|
||||
*
|
||||
* @return the toolbar with the control buttons
|
||||
*/
|
||||
JToolBar createToolBar()
|
||||
{
|
||||
JToolBar tb = new JToolBar();
|
||||
Icon backIcon = Demo.getIcon("/gnu/classpath/examples/icons/back.png",
|
||||
"back");
|
||||
JButton back = new JButton(backIcon);
|
||||
back.addActionListener(new ActionListener()
|
||||
{
|
||||
public void actionPerformed(ActionEvent ev)
|
||||
{
|
||||
if (history.size() > 1)
|
||||
{
|
||||
URL last = (URL) history.removeLast();
|
||||
last = (URL) history.getLast();
|
||||
url.setText(last.toString());
|
||||
try
|
||||
{
|
||||
html.setPage(last);
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
// Do something more useful.
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
tb.add(back);
|
||||
Icon reloadIcon = Demo.getIcon("/gnu/classpath/examples/icons/reload.png",
|
||||
"reload");
|
||||
JButton reload = new JButton(reloadIcon);
|
||||
reload.addActionListener(new ActionListener()
|
||||
{
|
||||
public void actionPerformed(ActionEvent ev)
|
||||
{
|
||||
if (history.size() > 0)
|
||||
{
|
||||
URL last = (URL) history.getLast();
|
||||
url.setText(last.toString());
|
||||
try
|
||||
{
|
||||
html.setPage(last);
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
// Do something more useful.
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
tb.add(reload);
|
||||
return tb;
|
||||
}
|
||||
|
||||
/**
|
||||
* The executable method to display the editable table.
|
||||
*
|
||||
|
@ -259,26 +266,101 @@ public class HtmlDemo extends JPanel
|
|||
public void run()
|
||||
{
|
||||
HtmlDemo demo = new HtmlDemo();
|
||||
|
||||
JButton exit = new JButton("exit");
|
||||
exit.addActionListener(new ActionListener()
|
||||
{
|
||||
public void actionPerformed(ActionEvent event)
|
||||
{
|
||||
System.exit(0);
|
||||
}
|
||||
});
|
||||
|
||||
demo.buttons.add(exit);
|
||||
|
||||
JFrame frame = new JFrame();
|
||||
frame.getContentPane().add(demo);
|
||||
frame.setSize(new Dimension(700, 480));
|
||||
frame.setSize(new Dimension(750, 480));
|
||||
frame.setVisible(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method to navigate to a new URL.
|
||||
*
|
||||
* @param u the new URL to navigate to
|
||||
*/
|
||||
void setPage(URL u)
|
||||
{
|
||||
try
|
||||
{
|
||||
url.setText(u.toString());
|
||||
html.setPage(u);
|
||||
history.addLast(u);
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
// Do something more useful here.
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Submits a form when a FormSubmitEvent is received. The HTML API
|
||||
* provides automatic form submit but when this is enabled we don't
|
||||
* receive any notification and can't update our location field.
|
||||
*
|
||||
* @param ev the form submit event
|
||||
*/
|
||||
void submitForm(FormSubmitEvent ev)
|
||||
{
|
||||
URL url = ev.getURL();
|
||||
String data = ev.getData();
|
||||
FormSubmitEvent.MethodType method = ev.getMethod();
|
||||
if (method == FormSubmitEvent.MethodType.POST)
|
||||
{
|
||||
try
|
||||
{
|
||||
URLConnection conn = url.openConnection();
|
||||
postData(conn, data);
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
// Deal with this.
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
url = new URL(url.toString() + "?" + data);
|
||||
}
|
||||
catch (MalformedURLException ex)
|
||||
{
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
setPage(url);
|
||||
}
|
||||
|
||||
/**
|
||||
* Posts the form data for forms with HTTP POST method.
|
||||
*
|
||||
* @param conn the connection
|
||||
* @param data the form data
|
||||
*/
|
||||
private void postData(URLConnection conn, String data)
|
||||
{
|
||||
conn.setDoOutput(true);
|
||||
PrintWriter out = null;
|
||||
try
|
||||
{
|
||||
out = new PrintWriter(new OutputStreamWriter(conn.getOutputStream()));
|
||||
out.print(data);
|
||||
out.flush();
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
// Deal with this!
|
||||
ex.printStackTrace();
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (out != null)
|
||||
out.close();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a DemoFactory that creates a HtmlDemo.
|
||||
*
|
||||
|
|
|
@ -39,15 +39,24 @@ exception statement from your version. */
|
|||
package gnu.classpath.examples.swing;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Color;
|
||||
import java.awt.GridLayout;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.awt.event.MouseAdapter;
|
||||
import java.awt.event.MouseEvent;
|
||||
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JMenu;
|
||||
import javax.swing.JMenuItem;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JPopupMenu;
|
||||
import javax.swing.JScrollPane;
|
||||
import javax.swing.JTabbedPane;
|
||||
import javax.swing.JTextArea;
|
||||
import javax.swing.SwingConstants;
|
||||
import javax.swing.SwingUtilities;
|
||||
|
||||
|
@ -55,6 +64,10 @@ public class TabbedPaneDemo
|
|||
extends JPanel
|
||||
implements ActionListener
|
||||
{
|
||||
static Color[] colors = { Color.BLUE, Color.CYAN, Color.GRAY, Color.GREEN,
|
||||
Color.MAGENTA, Color.ORANGE, Color.PINK,
|
||||
Color.ORANGE, Color.RED, Color.BLUE, Color.YELLOW
|
||||
};
|
||||
TabbedPaneDemo()
|
||||
{
|
||||
super();
|
||||
|
@ -64,25 +77,123 @@ public class TabbedPaneDemo
|
|||
private void createContent()
|
||||
{
|
||||
JPanel p = new JPanel();
|
||||
p.setLayout(new GridLayout(2, 2));
|
||||
JTabbedPane tabs1 = new JTabbedPane(SwingConstants.TOP);
|
||||
tabs1.add("Top Item 1", new JButton("Content: Top Item 1"));
|
||||
tabs1.add("Top Item 2", new JButton("Content: Top Item 2"));
|
||||
JTabbedPane tabs2 = new JTabbedPane(SwingConstants.LEFT);
|
||||
tabs2.add("Left Item 1", new JButton("Content: Left Item 1"));
|
||||
tabs2.add("Left Item 2", new JButton("Content: Left Item 2"));
|
||||
JTabbedPane tabs3 = new JTabbedPane(SwingConstants.BOTTOM);
|
||||
tabs3.add("Bottom Item 1", new JButton("Content: Bottom Item 1"));
|
||||
tabs3.add("Bottom Item 2", new JButton("Content: Bottom Item 2"));
|
||||
JTabbedPane tabs4 = new JTabbedPane(SwingConstants.RIGHT);
|
||||
tabs4.add("Right Item 1", new JButton("Content: Right Item 1"));
|
||||
tabs4.add("Right Item 2", new JButton("Content: Right Item 2"));
|
||||
p.add(tabs1);
|
||||
p.add(tabs2);
|
||||
p.add(tabs3);
|
||||
p.add(tabs4);
|
||||
p.setLayout(new GridLayout(1, 1));
|
||||
|
||||
int COUNT = 25;
|
||||
JTabbedPane tp = createTabbedPane(SwingConstants.TOP, "tab", COUNT);
|
||||
p.add(tp);
|
||||
|
||||
final JPopupMenu popup = new JPopupMenu();
|
||||
|
||||
JMenu menu = new JMenu("tab placement");
|
||||
menu.add(createPlacementChangingMenuItem("top",
|
||||
SwingConstants.TOP,
|
||||
tp));
|
||||
|
||||
menu.add(createPlacementChangingMenuItem("bottom",
|
||||
SwingConstants.BOTTOM,
|
||||
tp));
|
||||
|
||||
menu.add(createPlacementChangingMenuItem("left",
|
||||
SwingConstants.LEFT,
|
||||
tp));
|
||||
|
||||
menu.add(createPlacementChangingMenuItem("right",
|
||||
SwingConstants.RIGHT,
|
||||
tp));
|
||||
popup.add(menu);
|
||||
|
||||
menu = new JMenu("tab layout");
|
||||
menu.add(createLayoutPolicyChangingMenuItem("wrapping tabs",
|
||||
JTabbedPane.WRAP_TAB_LAYOUT,
|
||||
tp));
|
||||
|
||||
menu.add(createLayoutPolicyChangingMenuItem("scrolling tabs",
|
||||
JTabbedPane.SCROLL_TAB_LAYOUT,
|
||||
tp));
|
||||
popup.add(menu);
|
||||
|
||||
tp.addMouseListener(new MouseAdapter()
|
||||
{
|
||||
public void mousePressed(MouseEvent e) {
|
||||
showPopup(e);
|
||||
}
|
||||
|
||||
public void mouseReleased(MouseEvent e) {
|
||||
showPopup(e);
|
||||
}
|
||||
|
||||
void showPopup(MouseEvent e) {
|
||||
if (e.isPopupTrigger()) {
|
||||
popup.show(e.getComponent(), e.getX(), e.getY());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
setLayout(new BorderLayout());
|
||||
add(p, BorderLayout.CENTER);
|
||||
|
||||
}
|
||||
|
||||
private JMenuItem createPlacementChangingMenuItem(String t,
|
||||
final int v,
|
||||
final JTabbedPane dst)
|
||||
{
|
||||
JMenuItem item = new JMenuItem(t);
|
||||
|
||||
item.addActionListener(new ActionListener()
|
||||
{
|
||||
public void actionPerformed(ActionEvent ae)
|
||||
{
|
||||
dst.setTabPlacement(v);
|
||||
}
|
||||
});
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
private JMenuItem createLayoutPolicyChangingMenuItem(String t,
|
||||
final int v,
|
||||
final JTabbedPane dst)
|
||||
{
|
||||
JMenuItem item = new JMenuItem(t);
|
||||
|
||||
item.addActionListener(new ActionListener()
|
||||
{
|
||||
public void actionPerformed(ActionEvent ae)
|
||||
{
|
||||
dst.setTabLayoutPolicy(v);
|
||||
}
|
||||
});
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
private JTabbedPane createTabbedPane(int direction, String name, int count)
|
||||
{
|
||||
JTabbedPane pane = new JTabbedPane(direction);
|
||||
|
||||
for(int i = 0; i< count; i++)
|
||||
{
|
||||
pane.addTab(name + " " + i, createTabContent(name + " " + i));
|
||||
if (Math.random() >= 0.75)
|
||||
pane.setEnabledAt(i, false);
|
||||
}
|
||||
|
||||
return pane;
|
||||
}
|
||||
|
||||
private JPanel createTabContent(String name)
|
||||
{
|
||||
JTextArea ta;
|
||||
JPanel panel = new JPanel();
|
||||
panel.add(new JLabel(name));
|
||||
panel.add(new JButton(name));
|
||||
panel.add(new JScrollPane(ta = new JTextArea(5, 5)));
|
||||
|
||||
ta.setBackground(colors[(int) (Math.random() * colors.length)]);
|
||||
|
||||
return panel;
|
||||
}
|
||||
|
||||
public void actionPerformed(ActionEvent e)
|
||||
|
|
|
@ -39,17 +39,17 @@ exception statement from your version. */
|
|||
package gnu.classpath.examples.swing;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.JobAttributes.DefaultSelectionType;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
|
||||
import javax.swing.DebugGraphics;
|
||||
import javax.swing.ButtonGroup;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JCheckBox;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JRadioButton;
|
||||
import javax.swing.JScrollPane;
|
||||
import javax.swing.JTree;
|
||||
import javax.swing.SwingUtilities;
|
||||
|
@ -59,7 +59,6 @@ import javax.swing.tree.DefaultMutableTreeNode;
|
|||
import javax.swing.tree.DefaultTreeModel;
|
||||
import javax.swing.tree.DefaultTreeSelectionModel;
|
||||
import javax.swing.tree.TreePath;
|
||||
import javax.swing.tree.TreeSelectionModel;
|
||||
|
||||
public class TreeDemo
|
||||
extends JPanel
|
||||
|
@ -222,11 +221,39 @@ public class TreeDemo
|
|||
p2.add(add);
|
||||
p2.add(cbSingle);
|
||||
p2.add(cbRoot);
|
||||
|
||||
|
||||
tree.getSelectionModel().
|
||||
setSelectionMode(DefaultTreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION);
|
||||
|
||||
// Panel for selecting line style.
|
||||
ActionListener l = new ActionListener()
|
||||
{
|
||||
public void actionPerformed(ActionEvent e)
|
||||
{
|
||||
JRadioButton b = (JRadioButton) e.getSource();
|
||||
tree.putClientProperty("JTree.lineStyle", b.getText());
|
||||
tree.repaint();
|
||||
}
|
||||
};
|
||||
JPanel lineStylePanel = new JPanel();
|
||||
ButtonGroup buttons = new ButtonGroup();
|
||||
lineStylePanel.add(new JLabel("Line style: "));
|
||||
JRadioButton none = new JRadioButton("None");
|
||||
lineStylePanel.add(none);
|
||||
buttons.add(none);
|
||||
none.addActionListener(l);
|
||||
JRadioButton angled = new JRadioButton("Angled");
|
||||
lineStylePanel.add(angled);
|
||||
buttons.add(angled);
|
||||
angled.addActionListener(l);
|
||||
JRadioButton horizontal = new JRadioButton("Horizontal");
|
||||
lineStylePanel.add(horizontal);
|
||||
buttons.add(horizontal);
|
||||
horizontal.addActionListener(l);
|
||||
p2.add(lineStylePanel);
|
||||
|
||||
add(p2, BorderLayout.NORTH);
|
||||
|
||||
add(new JScrollPane(tree), BorderLayout.CENTER);
|
||||
add(choice, BorderLayout.SOUTH);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,98 @@
|
|||
<!-- welcome.html -- Some HTML stuff to show Swing HTML
|
||||
Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
|
||||
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., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
02110-1301 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. -->
|
||||
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>HTML text styles</title>
|
||||
</head>
|
||||
<body>
|
||||
<form>
|
||||
<a href="welcome.html">Back to start page</a>
|
||||
<h1>Some form elements</h1>
|
||||
<h2>Textarea</h2>
|
||||
<textarea cols="30" rows="5">
|
||||
Hello GNU Classpath world. This text should show up in a text area
|
||||
that has a size of 30 columns and 5 rows
|
||||
</textarea>
|
||||
|
||||
<h2>Input fields</h2>
|
||||
<p>
|
||||
<input type="text" value="This is a normal textfield">
|
||||
<input type="password" value="secret password">
|
||||
</p>
|
||||
|
||||
<h2>Buttons</h2>
|
||||
<p>
|
||||
<input type="submit"></input>
|
||||
<input type="reset"></input>
|
||||
<input type="button" value="Some button"></input>
|
||||
</p>
|
||||
|
||||
<h2>Checkboxes and Radiobuttons</h2>
|
||||
<p>
|
||||
<input type="checkbox" name="2">Check this!</input>
|
||||
<input type="checkbox" name="2">Or this</input>
|
||||
</p>
|
||||
<p>
|
||||
<input type="radio" name="1">A radio button</input>
|
||||
<input type="radio" name="1">Another radio</input>
|
||||
</p>
|
||||
<h2>Select lists and combo boxes</h2>
|
||||
<p>
|
||||
<select>
|
||||
<option>Value1</option>
|
||||
<option>Value2</option>
|
||||
<option>Value3</option>
|
||||
<option label="Labeled value 4">Value4</option>
|
||||
<option>Value5</option>
|
||||
<option>Value6</option>
|
||||
</select>
|
||||
</p>
|
||||
<p>
|
||||
<select size="3">
|
||||
<option>Value1</option>
|
||||
<option>Value2</option>
|
||||
<option>Value3</option>
|
||||
<option label="Labeled value 4">Value4</option>
|
||||
<option>Value5</option>
|
||||
<option>Value6</option>
|
||||
</select>
|
||||
</p>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,41 @@
|
|||
<!-- frame1.html -- Some HTML stuff to show Swing HTML
|
||||
Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
|
||||
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., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
02110-1301 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. -->
|
||||
<html>
|
||||
<body>
|
||||
<h1>Top Left Frame</h1>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,42 @@
|
|||
<!-- frame2.html -- Some HTML stuff to show Swing HTML
|
||||
Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
|
||||
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., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
02110-1301 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. -->
|
||||
<html>
|
||||
<body>
|
||||
<h1>Top Right
|
||||
Frame</h1>
|
||||
</body>
|
||||
</html>
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue